aios-core
Version:
Synkra AIOS: AI-Orchestrated System for Full Stack Development - Core Framework
551 lines (390 loc) โข 11.6 kB
Markdown
# Story Template v2.0 Specification
**Version:** 2.0.0
**Last Updated:** 2025-12-09
**Status:** Official Standard
**Related:** Sprint 3-5 Implementation
## ๐ Table of Contents
- [Overview](#overview)
- [Template Structure](#template-structure)
- [Section Specifications](#section-specifications)
- [Story Types](#story-types)
- [Validation Checklist](#validation-checklist)
- [Examples](#examples)
## Overview
### Purpose
The Story Template v2.0 standardizes story documentation across the AIOS project, ensuring consistency, traceability, and integration with automated tools like CodeRabbit.
### What's New in v2.0
| Feature | v1.x | v2.0 |
|---------|------|------|
| Cross-Story Decisions | โ | โ
Required section |
| CodeRabbit Integration | โ | โ
Story Type Analysis, Agent Assignment |
| Dev Agent Record | โ | โ
Execution logging |
| QA Results | โ | โ
Structured test results |
| Testing Checklist | Informal | โ
Standardized format |
### Design Principles
1. **Structure is Sacred** - Consistent sections in consistent order
2. **Traceability** - Link to decisions, dependencies, and related stories
3. **Automation Ready** - Machine-parseable sections for CI/CD integration
4. **Progress Visibility** - Clear status indicators and checkboxes
5. **Agent Compatibility** - Works with @dev, @qa, @po agents
## Template Structure
### Complete Template
```markdown
# Story X.X: [Title]
**Epic:** [Parent Epic Name]
**Story ID:** X.X
**Sprint:** [Sprint Number]
**Priority:** ๐ด Critical | ๐ High | ๐ก Medium | ๐ข Low
**Points:** [Story Points]
**Effort:** [Estimated Hours]
**Status:** โช Ready | ๐ In Progress | โ
Done | โ Blocked
**Type:** ๐ง Infrastructure | ๐ป Feature | ๐ Documentation | โ
Validation | ๐ Bug Fix
## ๐ Cross-Story Decisions
| Decision | Source | Impact on This Story |
|----------|--------|----------------------|
| [Decision Name] | [Story ID/Meeting] | [How it affects this story] |
## ๐ User Story
**Como** [persona],
**Quero** [desired action/capability],
**Para** [benefit/value delivered].
## ๐ฏ Objective
[2-3 sentences describing the primary goal of this story]
## โ
Tasks
### Phase 1: [Phase Name] ([Estimated Time])
- [ ] **1.1** [Task description]
- [Sub-task or detail if needed]
- [ ] **1.2** [Task description]
### Phase 2: [Phase Name] ([Estimated Time])
- [ ] **2.1** [Task description]
- [ ] **2.2** [Task description]
## ๐ฏ Acceptance Criteria
```gherkin
GIVEN [initial context/state]
WHEN [action performed]
THEN [expected outcome]
AND [additional outcomes]
```
## ๐ค CodeRabbit Integration
### Story Type Analysis
| Attribute | Value | Rationale |
|-----------|-------|-----------|
| Type | [Infrastructure/Feature/Documentation/Validation] | [Why this type] |
| Complexity | [Low/Medium/High] | [Why this complexity] |
| Test Requirements | [Unit/Integration/E2E/Manual] | [Why these tests] |
| Review Focus | [Performance/Security/Logic/Documentation] | [Key review areas] |
### Agent Assignment
| Role | Agent | Responsibility |
|------|-------|----------------|
| Primary | @[agent] | [Main task] |
| Secondary | @[agent] | [Supporting task] |
| Review | @[agent] | [Review task] |
### Self-Healing Config
```yaml
reviews:
auto_review:
enabled: true
drafts: false
path_instructions:
- path: "[relevant path pattern]"
instructions: "[specific review instructions]"
chat:
auto_reply: true
```
### Focus Areas
- [ ] [Focus area 1]
- [ ] [Focus area 2]
- [ ] [Focus area 3]
## ๐ Dependencies
**Blocked by:**
- [Dependency 1 - status]
- [Dependency 2 - status]
**Blocks:**
- [What this story blocks]
## โ ๏ธ Risks & Mitigations
| Risk | Impact | Mitigation |
|------|--------|------------|
| [Risk description] | [High/Medium/Low] | [How to mitigate] |
## ๐ Definition of Done
- [ ] [DoD item 1]
- [ ] [DoD item 2]
- [ ] [DoD item 3]
- [ ] All acceptance criteria verified
- [ ] Tests passing
- [ ] Documentation updated
- [ ] PR approved and merged
## ๐ Dev Notes
### Key Files
```
path/to/relevant/files
โโโ file1.ts
โโโ file2.ts
โโโ file3.md
```
### Technical Notes
[Any technical details relevant to implementation]
### Testing Checklist
#### [Test Category 1]
- [ ] [Test item 1]
- [ ] [Test item 2]
#### [Test Category 2]
- [ ] [Test item 1]
- [ ] [Test item 2]
## ๐งโ๐ป Dev Agent Record
> This section is populated when @dev executes the story.
### Execution Log
| Timestamp | Phase | Action | Result |
|-----------|-------|--------|--------|
| - | - | Awaiting execution | - |
### Implementation Notes
_To be filled during execution._
### Issues Encountered
_None yet - story not started._
## ๐งช QA Results
> This section is populated after @qa reviews the implementation.
### Test Execution Summary
| Category | Tests | Passed | Failed | Skipped |
|----------|-------|--------|--------|---------|
| Unit | - | - | - | - |
| Integration | - | - | - | - |
| E2E | - | - | - | - |
### Validation Checklist
| Check | Status | Notes |
|-------|--------|-------|
| Acceptance criteria | โณ | |
| DoD items | โณ | |
| Edge cases | โณ | |
| Documentation | โณ | |
### QA Sign-off
- [ ] All acceptance criteria verified
- [ ] Tests passing (coverage โฅ80%)
- [ ] Documentation complete
- [ ] Ready for release
**QA Agent:** _Awaiting assignment_
**Date:** _Pending_
## ๐ Change Log
| Date | Version | Changes | Author |
|------|---------|---------|--------|
| [Date] | 1.0.0 | Initial story creation | @[agent] |
**Criado por:** [Agent Name] ([Role])
**Data:** [Creation Date]
**Atualizado:** [Last Update] ([Change description])
```
## Section Specifications
### Header Section
| Field | Required | Format | Valid Values |
|-------|----------|--------|--------------|
| Title | Yes | `# Story X.X: [Title]` | Descriptive, action-oriented |
| Epic | Yes | Text | Parent epic name |
| Story ID | Yes | `X.X` or `XXX-N` | Unique identifier |
| Sprint | Yes | Number | Sprint number |
| Priority | Yes | Emoji + Text | ๐ด Critical, ๐ High, ๐ก Medium, ๐ข Low |
| Points | Yes | Number | Fibonacci (1,2,3,5,8,13,21) |
| Effort | Recommended | `X-Y hours` | Time estimate range |
| Status | Yes | Emoji + Text | โช Ready, ๐ In Progress, โ
Done, โ Blocked |
| Type | Yes | Emoji + Text | ๐ง Infrastructure, ๐ป Feature, ๐ Documentation, โ
Validation, ๐ Bug Fix |
### Cross-Story Decisions (NEW in v2.0)
This section documents decisions made in other stories that affect this story.
**Purpose:**
- Track decision origin
- Ensure consistency across stories
- Enable impact analysis
**Required columns:**
- Decision: What was decided
- Source: Where/when it was decided
- Impact: How it affects this story
### User Story
Standard user story format:
- **Como** (As a) - The persona/role
- **Quero** (I want) - The desired capability
- **Para** (So that) - The value/benefit
### Tasks
- Organized by phases with time estimates
- Numbered hierarchically (1.1, 1.2, 2.1, etc.)
- Checkbox format for progress tracking
- Sub-tasks indented with bullet points
### Acceptance Criteria
Gherkin format preferred:
```gherkin
GIVEN [precondition]
WHEN [action]
THEN [expected result]
AND [additional result]
```
### CodeRabbit Integration (NEW in v2.0)
| Sub-section | Purpose |
|-------------|---------|
| Story Type Analysis | Helps CodeRabbit focus review |
| Agent Assignment | Assigns responsibility |
| Self-Healing Config | YAML for auto-configuration |
| Focus Areas | Key review points |
### Dev Agent Record (NEW in v2.0)
Tracks execution by @dev agent:
- Execution Log: Timestamped actions
- Implementation Notes: Technical details
- Issues Encountered: Problems and solutions
### QA Results (NEW in v2.0)
Tracks validation by @qa agent:
- Test Execution Summary: Test metrics
- Validation Checklist: Manual checks
- QA Sign-off: Final approval
## Story Types
### ๐ง Infrastructure
**Characteristics:**
- CI/CD changes
- Configuration updates
- Tool setup
- Migration scripts
**Review Focus:**
- Security implications
- Backwards compatibility
- Rollback procedures
**Example Tasks:**
- Update GitHub Actions
- Configure CodeRabbit
- Setup Husky hooks
### ๐ป Feature
**Characteristics:**
- New functionality
- User-facing changes
- Business logic
**Review Focus:**
- Requirements alignment
- UX impact
- Test coverage
**Example Tasks:**
- Implement API endpoint
- Create UI component
- Add validation logic
### ๐ Documentation
**Characteristics:**
- Standards updates
- Architecture docs
- Guides and tutorials
**Review Focus:**
- Accuracy
- Completeness
- Terminology consistency
**Example Tasks:**
- Update README
- Create architecture diagram
- Write API documentation
### โ
Validation
**Characteristics:**
- Testing improvements
- Quality gates
- Audit activities
**Review Focus:**
- Test coverage
- Edge cases
- Automation
**Example Tasks:**
- Add integration tests
- Create validation checklist
- Implement E2E tests
### ๐ Bug Fix
**Characteristics:**
- Defect correction
- Regression fixes
- Performance issues
**Review Focus:**
- Root cause
- Side effects
- Regression tests
**Example Tasks:**
- Fix authentication bug
- Resolve memory leak
- Correct calculation error
## Validation Checklist
### Story Draft Validation
Use this checklist when creating or reviewing stories:
#### Required Sections
- [ ] Header with all required fields
- [ ] Cross-Story Decisions (even if empty table)
- [ ] User Story in proper format
- [ ] At least one Acceptance Criteria
- [ ] Tasks organized by phases
- [ ] CodeRabbit Integration section
- [ ] Definition of Done
- [ ] Dev Agent Record (empty template)
- [ ] QA Results (empty template)
- [ ] Change Log
#### Quality Checks
- [ ] Story type matches content
- [ ] Priority justified
- [ ] Points appropriate for scope
- [ ] Dependencies documented
- [ ] Risks identified
- [ ] Testing strategy clear
#### Terminology
- [ ] Uses "Squad" not "Squad"
- [ ] Uses "@aios/" npm scope
- [ ] References v4.0.4 architecture
## Examples
### Example: Infrastructure Story
```markdown
# Story 6.1: GitHub Actions Optimization
**Epic:** Technical Debt
**Story ID:** 6.1
**Sprint:** 6
**Priority:** ๐ก Medium
**Points:** 5
**Status:** โช Ready
**Type:** ๐ง Infrastructure
## ๐ Cross-Story Decisions
| Decision | Source | Impact |
|----------|--------|--------|
| Use Ubuntu runners only | Sprint 5 Review | Simplifies matrix |
## ๐ User Story
**Como** desenvolvedor,
**Quero** CI mais rรกpido e barato,
**Para** ter feedback mais rรกpido e reduzir custos.
```
### Example: Documentation Story
```markdown
# Story 6.5: Standards Documentation Update
**Epic:** Technical Debt & Documentation
**Story ID:** 6.5
**Sprint:** 6
**Priority:** ๐ด Critical
**Points:** 13
**Status:** ๐ In Progress
**Type:** ๐ Documentation
## ๐ Cross-Story Decisions
| Decision | Source | Impact |
|----------|--------|--------|
| Multi-repo structure | OSR-2/OSR-11 | Standards must document 3-repo architecture |
| Squad terminology | OSR-4 | Replace all "Squad" references |
```
## Related Documents
- [AIOS-LIVRO-DE-OURO-V2.1-COMPLETE.md](./AIOS-LIVRO-DE-OURO-V2.1-COMPLETE.md)
- [QUALITY-GATES-SPECIFICATION.md](./QUALITY-GATES-SPECIFICATION.md)
- [STANDARDS-INDEX.md](./STANDARDS-INDEX.md)
**Last Updated:** 2025-12-09
**Version:** 2.0.0
**Maintainer:** @po (Pax)