Skip to main content
Status: MUST (Constitutional Principle)Defined in .aiox-core/constitution.md - All development MUST follow story-driven principles. Violations blocked via gates.

The Principle

All development begins and ends with a story. No code is written without a story. No feature ships without story validation. Stories are the atomic unit of development in AIOX.

Core Tenet

Stories provide the context, requirements, acceptance criteria, and completion definition that enable AI agents to implement features autonomously and reliably.

Constitutional Rules

From the AIOX Constitution v1.0.0:

MUST Rules

These rules are mandatory and enforced via automated gates:
1

No Code Without Story

MUST: Nenhum código é escrito sem uma story associadaEvery implementation effort must be tied to a specific story file in docs/stories/.
2

Clear Acceptance Criteria

MUST: Stories DEVEM ter acceptance criteria claros antes de implementaçãoStories cannot be implemented until they have well-defined, verifiable acceptance criteria.
3

Progress Tracking

MUST: Progresso DEVE ser rastreado via checkboxes na storyTasks and subtasks are tracked using markdown checkboxes: [ ][x]
4

File List Maintenance

MUST: File List DEVE ser mantida atualizada na storyEvery file created, modified, or deleted must be documented in the story’s File List section.
5

Standard Workflow

SHOULD: Stories seguem o workflow: @po/@sm cria → @dev implementa → @qa valida → @devops pushThe recommended workflow ensures quality gates at each transition.

Gate Enforcement

Gate: dev-develop-story.md - BLOCK if no valid story exists

Story Anatomy

Every AIOX story follows a consistent structure:

The Story Lifecycle

Phase 1: Creation

@sm (Scrum Master) Drafts Story

Using *draft command and create-next-story.md task:
  1. Read epic context
  2. Extract requirements from PRD/architecture
  3. Define clear acceptance criteria
  4. Break down into sequenced tasks
  5. Populate all required sections
  6. Set status: “Draft”
Key Principle:
“Creating crystal-clear stories that dumb AI agents can implement without confusion”
Stories must be self-contained—all information needed for implementation is IN the story.

Phase 2: Validation

@po (Product Owner) Validates

Using *validate-story-draft {story-id} command:
  1. Check story completeness
  2. Verify acceptance criteria clarity
  3. Ensure PRD/architecture alignment
  4. Validate task sequencing
  5. Issue GO/NO-GO decision
Validation Checklist:
  • All required sections present?
  • Acceptance criteria testable?
  • Tasks properly sequenced?
  • References to PRD/arch docs?
  • Complexity appropriately assessed?
Outcomes:
  • GO: Status → “Approved”, ready for @dev
  • NO-GO: Status remains “Draft”, @sm revises

Phase 3: Implementation

@dev (Developer) Implements

Using *develop {story-id} command and dev-develop-story.md task:Order of Execution:
  1. Read first (or next) task
  2. Implement task and subtasks
  3. Write tests
  4. Execute validations
  5. ONLY if ALL pass → mark checkbox [x]
  6. Update File List with changes
  7. Repeat until all tasks complete
Implementation Modes:
*develop-interactive {story-id}Default mode: Checkpoints at each taskBest for: Learning, complex stories, high-risk changes
Critical Rules for @dev:
  • ✓ ONLY update Dev Agent Record sections
  • ✓ Mark tasks [x] ONLY when validated
  • ✓ Update File List continuously
  • ✗ NEVER modify Story, Acceptance Criteria, or other sections
  • ✗ NEVER skip tests (“I’ll add them later”)
Completion Criteria:
  1. All tasks marked [x]
  2. All validations pass (lint, typecheck, tests, build)
  3. File List complete
  4. Story DoD checklist executed
  5. Status → “Ready for Review”

Phase 4: Quality Assurance

@qa (QA Engineer) Reviews

Using *review {story-id} command and qa-review-story.md task:Review Process:
  1. Validate acceptance criteria met
  2. Review code quality and standards
  3. Check test coverage
  4. Verify File List accuracy
  5. Execute QA gate checks
  6. Issue verdict
QA Verdicts:
Story meets all quality standards
  • All acceptance criteria satisfied
  • Code follows standards
  • Tests comprehensive and passing
  • No critical issues
Next Step: @devops push
QA Feedback Loop: Maximum 5 iterations before escalation.

Phase 5: Deployment

@devops (DevOps) Deploys

Using *push command and github-devops-pre-push-quality-gate.md task:Pre-Push Quality Gate:
  1. npm run lint → Must pass
  2. npm run typecheck → Must pass
  3. npm test → Must pass
  4. npm run build → Must succeed
  5. Story status → “Done” or “Ready for Review”
  6. All checks pass → git push
  7. Create Pull Request (if configured)
Why Only @devops Can Push?
  • Centralized quality enforcement
  • Consistent deployment process
  • Audit trail for all pushes
  • Constitutional authority separation

Story Progress Tracking

Checkbox System

Task Tracking

Progress is tracked using markdown checkboxes:
## Tasks

- [ ] Incomplete task
- [x] Completed task
- [ ] Another incomplete task
Agents mark [x] ONLY when task is validated and complete.

File List Maintenance

Change Inventory

Every file touched during implementation is documented:Purpose:
  • Code review efficiency
  • Rollback capability
  • Impact analysis
  • Merge conflict prevention
Rule: Update CONTINUOUSLY, not at the end.

Status Transitions

Why Story-Driven?

For AI Agents

Context Sufficiency

Stories contain ALL information needed. Agents don’t need to search/guess.

Verifiable Progress

Checkbox tracking provides clear completion state.

Bounded Scope

Tasks define exact work—prevents scope creep.

Quality Gates

Each phase has clear entry/exit criteria.

For Humans

Traceability

Every change maps to a story with rationale.

Review Efficiency

File List + tasks provide review roadmap.

Knowledge Capture

Dev Agent Record preserves decisions.

Reproducibility

Clear tasks enable recreation if needed.

For Teams

Shared Understanding

Stories are single source of truth.

Parallel Work

Clear boundaries enable simultaneous stories.

Onboarding

New team members read stories to understand.

Audit Trail

Complete history of what/why/when.

Common Pitfalls

Anti-Pattern: Starting implementation before story validationResult:
  • Wasted effort on wrong requirements
  • Scope misalignment
  • Quality gate failures
  • Rework
Solution: Always wait for @po validation (GO decision)
Anti-Pattern: Vague acceptance criteriaExample: “User can authenticate” ❌Better: “User receives JWT token on successful login” ✅Result of vague: Ambiguous completion, agent confusion, incomplete implementationSolution: Make criteria specific, testable, complete
Anti-Pattern: Not updating File List during developmentResult:
  • Incomplete story record
  • Difficult code review
  • Merge conflicts
  • Lost context
Solution: Update File List CONTINUOUSLY as you modify files
Anti-Pattern: Modifying story sections outside agent authorityExample: @dev changing Acceptance Criteria ❌Result:
  • Scope drift
  • Requirement corruption
  • Loss of product vision
Solution: Respect section ownership boundaries

Integration with Other Principles

Story-Driven Development works in harmony with:

CLI First

All story workflows execute via CLI commands (*develop, *review, *push)

Agent Authority

Story lifecycle enforces agent authority boundaries

Quality First

Stories enforce quality gates at each transition

No Invention

Stories derive from PRD/architecture, never invent

Best Practices

Story Creation
  • Extract requirements from PRD/architecture
  • Make acceptance criteria specific and testable
  • Sequence tasks logically
  • Include all necessary context WITHOUT duplicating docs
  • Set appropriate complexity level
Story Implementation
  • Read full story before starting
  • Follow task sequence exactly
  • Mark checkboxes ONLY when validated
  • Update File List continuously
  • Use appropriate mode (interactive/yolo/preflight)
Story Review
  • Validate ALL acceptance criteria
  • Check File List completeness
  • Verify test coverage
  • Review code quality
  • Provide specific, actionable feedback

Summary

Story-Driven Development Essence

Stories are the atomic unit of development
  • Provide complete context for agents
  • Define clear success criteria
  • Track progress transparently
  • Enforce quality gates
  • Enable autonomous implementation
  • Maintain audit trail
No story = No code. Period.

Next Steps

Workflows

See how stories flow through workflows

Agent System

Learn which agents work with stories

Creating Stories

Practical guide to story creation

Quality Gates

Understand story quality enforcement

Build docs developers (and LLMs) love