kyro-ai 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/README.md +29 -0
- package/.claude-plugin/marketplace.json +52 -0
- package/.claude-plugin/plugin.json +40 -0
- package/.claude-plugin/settings.json +16 -0
- package/LICENSE +201 -0
- package/README.md +331 -0
- package/WORKFLOW.yaml +36 -0
- package/agents/orchestrator.md +393 -0
- package/commands/forge.md +55 -0
- package/commands/status.md +92 -0
- package/commands/wrap-up.md +85 -0
- package/config.json +17 -0
- package/contexts/init.md +64 -0
- package/contexts/review.md +89 -0
- package/contexts/sprint.md +90 -0
- package/dist/cli/adapters/codex.d.ts +3 -0
- package/dist/cli/adapters/codex.d.ts.map +1 -0
- package/dist/cli/adapters/codex.js +55 -0
- package/dist/cli/adapters/codex.js.map +1 -0
- package/dist/cli/adapters/command-skills.d.ts +5 -0
- package/dist/cli/adapters/command-skills.d.ts.map +1 -0
- package/dist/cli/adapters/command-skills.js +41 -0
- package/dist/cli/adapters/command-skills.js.map +1 -0
- package/dist/cli/adapters/opencode.d.ts +5 -0
- package/dist/cli/adapters/opencode.d.ts.map +1 -0
- package/dist/cli/adapters/opencode.js +41 -0
- package/dist/cli/adapters/opencode.js.map +1 -0
- package/dist/cli/adapters/registry-types.d.ts +13 -0
- package/dist/cli/adapters/registry-types.d.ts.map +1 -0
- package/dist/cli/adapters/registry-types.js +3 -0
- package/dist/cli/adapters/registry-types.js.map +1 -0
- package/dist/cli/adapters/registry.d.ts +7 -0
- package/dist/cli/adapters/registry.d.ts.map +1 -0
- package/dist/cli/adapters/registry.js +46 -0
- package/dist/cli/adapters/registry.js.map +1 -0
- package/dist/cli/app.d.ts +2 -0
- package/dist/cli/app.d.ts.map +1 -0
- package/dist/cli/app.js +46 -0
- package/dist/cli/app.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +2 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -0
- package/dist/cli/commands/doctor.js +133 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/install.d.ts +4 -0
- package/dist/cli/commands/install.d.ts.map +1 -0
- package/dist/cli/commands/install.js +42 -0
- package/dist/cli/commands/install.js.map +1 -0
- package/dist/cli/commands/tui.d.ts +2 -0
- package/dist/cli/commands/tui.d.ts.map +1 -0
- package/dist/cli/commands/tui.js +35 -0
- package/dist/cli/commands/tui.js.map +1 -0
- package/dist/cli/commands/uninstall.d.ts +3 -0
- package/dist/cli/commands/uninstall.d.ts.map +1 -0
- package/dist/cli/commands/uninstall.js +33 -0
- package/dist/cli/commands/uninstall.js.map +1 -0
- package/dist/cli/constants.d.ts +23 -0
- package/dist/cli/constants.d.ts.map +1 -0
- package/dist/cli/constants.js +27 -0
- package/dist/cli/constants.js.map +1 -0
- package/dist/cli/fs.d.ts +12 -0
- package/dist/cli/fs.d.ts.map +1 -0
- package/dist/cli/fs.js +133 -0
- package/dist/cli/fs.js.map +1 -0
- package/dist/cli/help.d.ts +4 -0
- package/dist/cli/help.d.ts.map +1 -0
- package/dist/cli/help.js +28 -0
- package/dist/cli/help.js.map +1 -0
- package/dist/cli/install-plan.d.ts +3 -0
- package/dist/cli/install-plan.d.ts.map +1 -0
- package/dist/cli/install-plan.js +93 -0
- package/dist/cli/install-plan.js.map +1 -0
- package/dist/cli/options.d.ts +8 -0
- package/dist/cli/options.d.ts.map +1 -0
- package/dist/cli/options.js +99 -0
- package/dist/cli/options.js.map +1 -0
- package/dist/cli/state.d.ts +4 -0
- package/dist/cli/state.d.ts.map +1 -0
- package/dist/cli/state.js +13 -0
- package/dist/cli/state.js.map +1 -0
- package/dist/cli/types.d.ts +50 -0
- package/dist/cli/types.d.ts.map +1 -0
- package/dist/cli/types.js +3 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +10 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/docs/HOW-TO-USE-CODEX.md +82 -0
- package/docs/HOW-TO-USE-OPENCODE.md +93 -0
- package/docs/agent-adapters.md +152 -0
- package/docs/agents-reference.md +153 -0
- package/docs/architecture.md +159 -0
- package/docs/architecture.mmd +21 -0
- package/docs/cli.md +87 -0
- package/docs/commands-reference.md +138 -0
- package/docs/context-management.md +92 -0
- package/docs/getting-started.md +165 -0
- package/docs/harness-migration.md +95 -0
- package/docs/programmatic-usage.md +109 -0
- package/docs/rules-guide.md +216 -0
- package/package.json +78 -0
- package/rules/context-persistence.md +54 -0
- package/rules/estimation.md +56 -0
- package/rules/learning-rules.md +66 -0
- package/rules/quality-gates.md +65 -0
- package/rules/sprint-discipline.md +49 -0
- package/scripts/check-markdown-links.mjs +97 -0
- package/scripts/check-versions.mjs +46 -0
- package/scripts/make-cli-executable.mjs +12 -0
- package/settings.example.json +27 -0
- package/skills/qa-review/SKILL.md +660 -0
- package/skills/qa-review/manifest.json +41 -0
- package/skills/sprint-forge/SKILL.md +260 -0
- package/skills/sprint-forge/assets/README.md +31 -0
- package/skills/sprint-forge/assets/helpers/analysis-guide.md +207 -0
- package/skills/sprint-forge/assets/helpers/analyzer.md +83 -0
- package/skills/sprint-forge/assets/helpers/debt-tracker.md +122 -0
- package/skills/sprint-forge/assets/helpers/handoff.md +103 -0
- package/skills/sprint-forge/assets/helpers/learner.md +69 -0
- package/skills/sprint-forge/assets/helpers/metrics.md +81 -0
- package/skills/sprint-forge/assets/helpers/reentry-generator.md +121 -0
- package/skills/sprint-forge/assets/helpers/reviewer.md +71 -0
- package/skills/sprint-forge/assets/helpers/sprint-generator.md +145 -0
- package/skills/sprint-forge/assets/modes/INIT.md +204 -0
- package/skills/sprint-forge/assets/modes/SPRINT.md +253 -0
- package/skills/sprint-forge/assets/modes/STATUS.md +145 -0
- package/skills/sprint-forge/assets/templates/PROJECT-README.md +107 -0
- package/skills/sprint-forge/assets/templates/REENTRY-PROMPTS.md +132 -0
- package/skills/sprint-forge/assets/templates/ROADMAP.md +126 -0
- package/skills/sprint-forge/assets/templates/SPRINT.md +189 -0
- package/skills/sprint-forge/manifest.json +165 -0
- package/templates/split-claude-md/AGENTS.md +96 -0
- package/templates/split-claude-md/CLAUDE.md +67 -0
- package/templates/split-claude-md/COMMANDS.md +37 -0
- package/templates/split-claude-md/LEARNED.md +39 -0
- package/templates/split-claude-md/SOUL.md +107 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Sprint Generator
|
|
2
|
+
|
|
3
|
+
This helper defines the step-by-step algorithm for generating a sprint from its inputs.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Inputs
|
|
8
|
+
|
|
9
|
+
Every sprint generation requires these inputs:
|
|
10
|
+
|
|
11
|
+
| Input | Source | Required |
|
|
12
|
+
|-------|--------|----------|
|
|
13
|
+
| Roadmap sprint section | `ROADMAP.md` → Sprint {N} definition | Yes |
|
|
14
|
+
| Previous sprint | `phases/SPRINT-{N-1}-*.md` → Retro, Recommendations, Debt table | Yes (except Sprint 1) |
|
|
15
|
+
| Finding file(s) | `findings/{NN}-*.md` → corresponding to this sprint's focus | Yes |
|
|
16
|
+
| User overrides | Direct user instructions (priority changes, scope adjustments) | No |
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Generation Algorithm
|
|
21
|
+
|
|
22
|
+
### Step 1 — Read Roadmap Section
|
|
23
|
+
|
|
24
|
+
Open `ROADMAP.md` and locate the section for Sprint {N}:
|
|
25
|
+
- Extract: title, focus, type, version target, suggested phases, dependencies
|
|
26
|
+
- Verify dependencies are met (previous sprints completed)
|
|
27
|
+
|
|
28
|
+
### Step 2 — Read Previous Sprint (Skip for Sprint 1)
|
|
29
|
+
|
|
30
|
+
Open the previous sprint file and extract:
|
|
31
|
+
- **Retro**: What went well, what didn't, surprises
|
|
32
|
+
- **Recommendations for Sprint N**: Numbered list of recommendations
|
|
33
|
+
- **Accumulated Debt Table**: Full table with all items and statuses
|
|
34
|
+
|
|
35
|
+
### Step 3 — Read Finding File(s)
|
|
36
|
+
|
|
37
|
+
Open the finding file(s) corresponding to this sprint:
|
|
38
|
+
- Extract: summary, details, severity, affected files, recommendations
|
|
39
|
+
- These become the primary source of tasks for the sprint
|
|
40
|
+
|
|
41
|
+
### Step 4 — Build Disposition of Recommendations
|
|
42
|
+
|
|
43
|
+
For Sprint 2+, create the Disposition table. For EACH recommendation from Sprint N-1:
|
|
44
|
+
|
|
45
|
+
| # | Recommendation | Action | Where | Justification |
|
|
46
|
+
|---|---------------|--------|-------|---------------|
|
|
47
|
+
| {n} | {text} | {action} | {location} | {why} |
|
|
48
|
+
|
|
49
|
+
**Action options**:
|
|
50
|
+
- **Incorporated**: This recommendation becomes a task in the current sprint. Specify which phase and task.
|
|
51
|
+
- **Deferred**: Postponed to a future sprint. Specify target sprint and justify why.
|
|
52
|
+
- **Resolved**: Already addressed by intervening work. Explain when and how.
|
|
53
|
+
- **N/A**: No longer applicable due to changed circumstances. Explain why.
|
|
54
|
+
- **Converted to Phase**: Recommendation was significant enough to become an entire phase (not just a task). Specify which phase.
|
|
55
|
+
|
|
56
|
+
**Rule**: Every recommendation MUST appear in this table. No recommendation can be silently dropped.
|
|
57
|
+
|
|
58
|
+
### Step 5 — Build Phases
|
|
59
|
+
|
|
60
|
+
Assemble the sprint's phases from three sources:
|
|
61
|
+
|
|
62
|
+
1. **Roadmap-suggested phases**: The phases defined in the roadmap for this sprint. These are the starting point.
|
|
63
|
+
2. **Recommendation phases**: If incorporated recommendations don't fit into existing phases, create new phases for them.
|
|
64
|
+
3. **Debt phases**: If debt items target this sprint, create a phase to address them (or integrate into existing phases).
|
|
65
|
+
|
|
66
|
+
For each phase:
|
|
67
|
+
- Define a clear objective
|
|
68
|
+
- List tasks with:
|
|
69
|
+
- Checkbox `[ ]`
|
|
70
|
+
- Task ID (T{phase}.{task}, e.g., T1.1, T1.2, T2.1)
|
|
71
|
+
- Description
|
|
72
|
+
- Affected files (if known from findings)
|
|
73
|
+
- Verification criteria
|
|
74
|
+
|
|
75
|
+
### Step 6 — Copy and Update Debt Table
|
|
76
|
+
|
|
77
|
+
1. Copy the FULL debt table from Sprint N-1 (or start empty for Sprint 1)
|
|
78
|
+
2. Add new debt items discovered in the finding file analysis
|
|
79
|
+
3. Update status for items targeting this sprint: `open` → `in-progress`
|
|
80
|
+
4. Follow all rules from [debt-tracker.md](debt-tracker.md)
|
|
81
|
+
|
|
82
|
+
### Step 7 — Write Definition of Done
|
|
83
|
+
|
|
84
|
+
Create a checklist of completion criteria:
|
|
85
|
+
- All phase tasks completed or explicitly skipped
|
|
86
|
+
- Emergent phase tasks completed (will be empty at generation time)
|
|
87
|
+
- Debt table updated
|
|
88
|
+
- Retro filled
|
|
89
|
+
- Recommendations documented
|
|
90
|
+
- Re-entry prompts updated
|
|
91
|
+
- Any project-specific criteria (e.g., "all tests pass", "pub.dev score maintained")
|
|
92
|
+
|
|
93
|
+
### Step 8 — Leave Retro and Recommendations Empty
|
|
94
|
+
|
|
95
|
+
The Retro and Recommendations sections are filled at sprint CLOSE, not during generation. Leave them with placeholder markers.
|
|
96
|
+
|
|
97
|
+
### Step 9 — Write Sprint File
|
|
98
|
+
|
|
99
|
+
Save to: `{sprints_dir}/SPRINT-{N}-{slug}.md`
|
|
100
|
+
|
|
101
|
+
Where `{slug}` is a short descriptive slug derived from the sprint's focus (e.g., `architecture-cleanup`, `api-surface`, `component-quality`).
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Sprint Numbering
|
|
106
|
+
|
|
107
|
+
- Sequential: Sprint 1, Sprint 2, Sprint 3, ...
|
|
108
|
+
- No gaps: If Sprint 3 is removed from the roadmap, Sprint 4 does NOT become Sprint 3
|
|
109
|
+
- Files: `SPRINT-{N}-{slug}.md`
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Emergent Phases
|
|
114
|
+
|
|
115
|
+
Emergent phases are added during EXECUTION, not during generation. However, the sprint template includes a placeholder section for them.
|
|
116
|
+
|
|
117
|
+
During execution, if new work is discovered:
|
|
118
|
+
1. Add an "Emergent Phase" section after the planned phases
|
|
119
|
+
2. Mark it clearly with the reason for emergence
|
|
120
|
+
3. Give tasks IDs using `TE.{n}` format (T for Task, E for Emergent)
|
|
121
|
+
4. Update the DoD to include emergent tasks
|
|
122
|
+
|
|
123
|
+
### Findings Consolidation
|
|
124
|
+
|
|
125
|
+
Before closing the sprint, consolidate all discoveries into a summary table. This is a recommended closing phase that captures institutional knowledge:
|
|
126
|
+
|
|
127
|
+
1. Add a "Findings Consolidation" section after the last phase (planned or emergent)
|
|
128
|
+
2. Create a summary table with columns: `#`, `Finding`, `Origin Phase`, `Impact`, `Action Taken`
|
|
129
|
+
3. Include every significant discovery, not just those that generated tasks
|
|
130
|
+
4. This table becomes a quick-reference for future sprints and stakeholders
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Validation Checklist
|
|
135
|
+
|
|
136
|
+
Before writing the sprint file, verify:
|
|
137
|
+
|
|
138
|
+
- [ ] Roadmap section for this sprint has been read
|
|
139
|
+
- [ ] Previous sprint's retro, recommendations, and debt table have been read (Sprint 2+)
|
|
140
|
+
- [ ] Finding file(s) have been read
|
|
141
|
+
- [ ] Disposition table covers ALL previous recommendations (Sprint 2+)
|
|
142
|
+
- [ ] Phases include roadmap-suggested phases + recommendation phases + debt phases
|
|
143
|
+
- [ ] Debt table is copied in full from previous sprint
|
|
144
|
+
- [ ] Definition of Done is specific and verifiable
|
|
145
|
+
- [ ] Retro and Recommendations sections are empty (to be filled at close)
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# INIT Mode — Analysis, Roadmap & Scaffolding
|
|
2
|
+
|
|
3
|
+
This mode performs deep analysis of a project, generates findings, creates an adaptive roadmap, scaffolds the working directory, and generates re-entry prompts.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## When This Mode Activates
|
|
8
|
+
|
|
9
|
+
| EN Signals | ES Signals |
|
|
10
|
+
|-----------|-----------|
|
|
11
|
+
| "analyze", "audit", "start project", "create roadmap", "analyze codebase" | "analiza", "audita", "inicia proyecto", "crea roadmap", "analiza el codebase" |
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Prerequisites
|
|
16
|
+
|
|
17
|
+
- Access to the codebase (local path or repository)
|
|
18
|
+
- No previous kyro-ai work for this project (if resuming, use SPRINT or STATUS mode)
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Workflow
|
|
23
|
+
|
|
24
|
+
### Step 1 — Detect Work Type
|
|
25
|
+
|
|
26
|
+
Determine the type of work from the user's request:
|
|
27
|
+
|
|
28
|
+
| Work Type | Signals |
|
|
29
|
+
|-----------|---------|
|
|
30
|
+
| Audit / Refactor | "analyze", "audit", "refactor", "review the codebase" |
|
|
31
|
+
| New Feature | "add feature", "implement", "build" |
|
|
32
|
+
| Bugfix | "fix", "broken", "error", "regression" |
|
|
33
|
+
| New Project | "start from scratch", "new project", "create project" |
|
|
34
|
+
| Tech Debt | "clean up", "deprecated", "reduce debt", "missing tests" |
|
|
35
|
+
|
|
36
|
+
**Reference**: See [analysis-guide.md](../helpers/analysis-guide.md) for detailed guidance per work type.
|
|
37
|
+
|
|
38
|
+
If the work type is ambiguous, ask the user:
|
|
39
|
+
|
|
40
|
+
> "Is this an audit/refactor, a new feature, a bugfix, a new project, or tech debt cleanup?"
|
|
41
|
+
|
|
42
|
+
### Step 2 — Resolve Configuration
|
|
43
|
+
|
|
44
|
+
Gather or detect the following configuration:
|
|
45
|
+
|
|
46
|
+
| Config | How to Resolve |
|
|
47
|
+
|--------|---------------|
|
|
48
|
+
| **Scope** | Ask the user. A short kebab-case name for the work topic (e.g., `oauth-implementation`, `ui-redesign`, `q2-growth`). NOT the repo name — the repo is already `{cwd}`. |
|
|
49
|
+
| **Codebase Path** | The absolute path to the codebase. Usually the current working directory. |
|
|
50
|
+
| **Sprint Output Dir** | `{output_kyro_dir}/phases/` (automatic, resolved below) |
|
|
51
|
+
|
|
52
|
+
**Resolve `{output_kyro_dir}`** — ask the user:
|
|
53
|
+
|
|
54
|
+
> "Where should I save kyro-ai documents for **{scope}**?
|
|
55
|
+
>
|
|
56
|
+
> 1. **Default** (Recommended) — `.agents/kyro/scopes/{scope}/`
|
|
57
|
+
> 2. **Custom path** — provide your preferred directory"
|
|
58
|
+
|
|
59
|
+
Set `{output_kyro_dir}` based on the choice. This path will be embedded in `README.md` and `RE-ENTRY-PROMPTS.md` — those are the only sources of truth. No other persistence needed.
|
|
60
|
+
|
|
61
|
+
Confirm with the user:
|
|
62
|
+
|
|
63
|
+
> **Scope**: {scope}
|
|
64
|
+
> **Codebase**: `{codebase_path}`
|
|
65
|
+
> **Output**: `{output_kyro_dir}`
|
|
66
|
+
>
|
|
67
|
+
> Proceed with this configuration?
|
|
68
|
+
|
|
69
|
+
### Step 3 — Deep Analysis
|
|
70
|
+
|
|
71
|
+
Perform thorough analysis based on the work type. This is the most critical step.
|
|
72
|
+
|
|
73
|
+
**Strategy**:
|
|
74
|
+
1. Use the **Explore agent** (Task tool with subagent_type=Explore) for broad codebase exploration
|
|
75
|
+
2. Use **Glob** to find files by pattern
|
|
76
|
+
3. Use **Grep** to search for specific patterns
|
|
77
|
+
4. Use **Read** to examine specific files in detail
|
|
78
|
+
|
|
79
|
+
**Analysis depth depends on work type**:
|
|
80
|
+
- **Audit/Refactor**: Explore the entire codebase. Every directory, every major file. Identify all areas of concern.
|
|
81
|
+
- **New Feature**: Focus on the integration points. Understand what exists and what gaps need filling.
|
|
82
|
+
- **Bugfix**: Trace the bug path. Reproduce, identify root cause, assess blast radius.
|
|
83
|
+
- **New Project**: Research requirements, comparable solutions, stack decisions.
|
|
84
|
+
- **Tech Debt**: Scan for debt indicators across the codebase.
|
|
85
|
+
|
|
86
|
+
**Reference**: See [analysis-guide.md](../helpers/analysis-guide.md) for the complete analysis strategy.
|
|
87
|
+
|
|
88
|
+
**Key Principle**: The analysis determines the structure. Do NOT start with a fixed list of categories. Let the project tell you what matters.
|
|
89
|
+
|
|
90
|
+
### Step 4 — Generate Findings
|
|
91
|
+
|
|
92
|
+
Write each distinct finding as a separate file:
|
|
93
|
+
|
|
94
|
+
**Location**: `{output_kyro_dir}/findings/`
|
|
95
|
+
|
|
96
|
+
**Naming**: `NN-descriptive-slug.md` (e.g., `01-architecture-issues.md`)
|
|
97
|
+
|
|
98
|
+
**Content per file**: YAML frontmatter properties (following the template in analysis-guide.md) + Summary, severity, details with code examples, affected files, recommendations.
|
|
99
|
+
|
|
100
|
+
**Number of findings**: VARIABLE. Determined entirely by what the analysis reveals:
|
|
101
|
+
- Small project: 2-4 findings
|
|
102
|
+
- Medium refactor: 5-8 findings
|
|
103
|
+
- Major audit: 10-20+ findings
|
|
104
|
+
|
|
105
|
+
**Reference**: See [analysis-guide.md](../helpers/analysis-guide.md) → Step 3 for the finding file format.
|
|
106
|
+
|
|
107
|
+
### Step 5 — Create Roadmap
|
|
108
|
+
|
|
109
|
+
Using the [ROADMAP.md template](../templates/ROADMAP.md), create the adaptive roadmap:
|
|
110
|
+
|
|
111
|
+
1. Fill in project paths (codebase, output dir, findings, phases)
|
|
112
|
+
2. Map each finding to a suggested sprint:
|
|
113
|
+
- Finding 01 → Sprint 1 (usually, but not always)
|
|
114
|
+
- Related findings may be grouped into a single sprint
|
|
115
|
+
- Large findings may be split across multiple sprints
|
|
116
|
+
3. Define sprint dependencies (which sprints must complete before others)
|
|
117
|
+
4. For each sprint, define:
|
|
118
|
+
- Title and focus
|
|
119
|
+
- Source finding file(s)
|
|
120
|
+
- Version target (if applicable)
|
|
121
|
+
- Type (audit/refactor/feature/bugfix/debt)
|
|
122
|
+
- Suggested phases (2-5 phases per sprint)
|
|
123
|
+
5. Fill in the Sprint Summary table
|
|
124
|
+
6. Write the dependency map
|
|
125
|
+
|
|
126
|
+
**Location**: `{output_kyro_dir}/ROADMAP.md`
|
|
127
|
+
|
|
128
|
+
### Step 6 — Scaffold Working Directory
|
|
129
|
+
|
|
130
|
+
Create the full directory structure:
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
{output_kyro_dir}/
|
|
134
|
+
├── README.md ← From PROJECT-README.md template
|
|
135
|
+
├── ROADMAP.md ← Created in Step 5
|
|
136
|
+
├── RE-ENTRY-PROMPTS.md ← Created in Step 7
|
|
137
|
+
├── findings/ ← Created in Step 4
|
|
138
|
+
│ ├── 01-*.md
|
|
139
|
+
│ ├── 02-*.md
|
|
140
|
+
│ └── ...
|
|
141
|
+
└── phases/ ← Empty directory, sprints created later
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**README.md**: Use the [PROJECT-README.md template](../templates/PROJECT-README.md). Fill in the frontmatter properties with actual values, then fill in:
|
|
145
|
+
- Project name, type, date
|
|
146
|
+
- Description of the work
|
|
147
|
+
- All absolute paths
|
|
148
|
+
- Baseline metrics (if applicable)
|
|
149
|
+
- Initial sprint map from the roadmap
|
|
150
|
+
|
|
151
|
+
### Step 7 — Generate Re-entry Prompts
|
|
152
|
+
|
|
153
|
+
Using the [reentry-generator.md](../helpers/reentry-generator.md) helper:
|
|
154
|
+
|
|
155
|
+
1. Use the [REENTRY-PROMPTS.md template](../templates/REENTRY-PROMPTS.md)
|
|
156
|
+
2. Fill in all template variables with actual values:
|
|
157
|
+
- `{scope}`, `{codebase_path}`, `{output_kyro_dir}`
|
|
158
|
+
- `{current_sprint}` = 1 (no sprints yet)
|
|
159
|
+
- Sprint 1 finding file path
|
|
160
|
+
3. Generate all 4 scenario prompts with real paths
|
|
161
|
+
4. Write to `{output_kyro_dir}/RE-ENTRY-PROMPTS.md`
|
|
162
|
+
|
|
163
|
+
## Output Summary
|
|
164
|
+
|
|
165
|
+
At the end of INIT, present a summary:
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
## INIT Complete
|
|
169
|
+
|
|
170
|
+
**Scope**: {scope}
|
|
171
|
+
**Type**: {work_type}
|
|
172
|
+
**Findings**: {N} files in findings/
|
|
173
|
+
**Sprints Planned**: {M} sprints in roadmap
|
|
174
|
+
**Files Created**:
|
|
175
|
+
- {output_kyro_dir}/README.md
|
|
176
|
+
- {output_kyro_dir}/ROADMAP.md
|
|
177
|
+
- {output_kyro_dir}/RE-ENTRY-PROMPTS.md
|
|
178
|
+
- {output_kyro_dir}/findings/01-{slug}.md
|
|
179
|
+
- {output_kyro_dir}/findings/02-{slug}.md
|
|
180
|
+
- ...
|
|
181
|
+
|
|
182
|
+
**Next Step**: Generate Sprint 1 using `/kyro:forge` or copy the re-entry prompt from RE-ENTRY-PROMPTS.md → Scenario 1.
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Error Handling
|
|
188
|
+
|
|
189
|
+
| Error | Action |
|
|
190
|
+
|-------|--------|
|
|
191
|
+
| Codebase path not found | Ask user for the correct path |
|
|
192
|
+
| Output directory already exists | Ask user: overwrite, use different name, or resume |
|
|
193
|
+
| No meaningful findings | Inform user — the codebase may be in good shape. Generate a minimal roadmap with maintenance sprints. |
|
|
194
|
+
| Analysis scope too large | Break into phases. Analyze the most critical areas first, note others as "needs deeper analysis" finding. |
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## References
|
|
199
|
+
|
|
200
|
+
- [analysis-guide.md](../helpers/analysis-guide.md) — Analysis strategy per work type
|
|
201
|
+
- [ROADMAP.md template](../templates/ROADMAP.md) — Roadmap structure
|
|
202
|
+
- [PROJECT-README.md template](../templates/PROJECT-README.md) — Project README structure
|
|
203
|
+
- [REENTRY-PROMPTS.md template](../templates/REENTRY-PROMPTS.md) — Re-entry prompts structure
|
|
204
|
+
- [reentry-generator.md](../helpers/reentry-generator.md) — How to generate re-entry prompts
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
# SPRINT Mode — Generate & Execute Sprints
|
|
2
|
+
|
|
3
|
+
This mode generates the next sprint from roadmap + previous sprint + debt, and optionally executes it task by task.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## When This Mode Activates
|
|
8
|
+
|
|
9
|
+
| EN Signals | ES Signals |
|
|
10
|
+
|-----------|-----------|
|
|
11
|
+
| "generate sprint", "next sprint", "execute sprint", "run sprint", "continue sprint" | "genera sprint", "siguiente sprint", "ejecuta sprint", "corre sprint", "continúa sprint" |
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Sub-Modes
|
|
16
|
+
|
|
17
|
+
| Sub-Mode | Trigger | What Happens |
|
|
18
|
+
|----------|---------|--------------|
|
|
19
|
+
| **GENERATE** | "generate", "create", default when sprint file doesn't exist | Creates the sprint document only |
|
|
20
|
+
| **EXECUTE** | "execute", "run", "implement", sprint file already exists | Implements tasks from an existing sprint |
|
|
21
|
+
| **GENERATE+EXECUTE** | "generate and execute", "do the next sprint" | Generates then immediately executes |
|
|
22
|
+
|
|
23
|
+
If ambiguous, ask:
|
|
24
|
+
|
|
25
|
+
> "Should I **generate** the sprint document, **execute** an existing sprint, or **both**?"
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## GENERATE Workflow
|
|
30
|
+
|
|
31
|
+
### Step 0 — Locate Output Directory
|
|
32
|
+
|
|
33
|
+
Determine `{output_kyro_dir}` before reading any sprint files:
|
|
34
|
+
|
|
35
|
+
1. **Re-entry prompt paths** — If the user's message contains absolute file paths (e.g. `/Users/.../ROADMAP.md`), extract `{output_kyro_dir}` from those paths. This is the most reliable source.
|
|
36
|
+
2. **Explicit path** — If the user mentions a path directly, use it.
|
|
37
|
+
3. **Auto-discover** — Scan `{cwd}/.agents/kyro/scopes/`:
|
|
38
|
+
- Single directory found → use it
|
|
39
|
+
- Multiple directories → ask: "Which project? Found: {list}"
|
|
40
|
+
4. **Ask** — If none of the above: "Where are your kyro-ai documents? (e.g. `.agents/kyro/scopes/my-project/`)"
|
|
41
|
+
|
|
42
|
+
Once resolved, all subsequent steps use `{output_kyro_dir}` as the base for all file paths.
|
|
43
|
+
|
|
44
|
+
### Step 1 — Determine Sprint Number
|
|
45
|
+
|
|
46
|
+
1. Read `ROADMAP.md` to understand the planned sprints
|
|
47
|
+
2. Scan `phases/` directory for existing sprint files
|
|
48
|
+
3. The next sprint number = highest existing sprint + 1
|
|
49
|
+
4. If no sprints exist, start with Sprint 1
|
|
50
|
+
|
|
51
|
+
### Step 2 — Gather Inputs
|
|
52
|
+
|
|
53
|
+
Read the required inputs as defined in [sprint-generator.md](../helpers/sprint-generator.md):
|
|
54
|
+
|
|
55
|
+
1. **Roadmap section**: Open `ROADMAP.md`, locate Sprint {N} definition
|
|
56
|
+
- Extract: title, focus, type, version target, suggested phases
|
|
57
|
+
2. **Previous sprint** (Sprint 2+): Open `phases/SPRINT-{N-1}-*.md`
|
|
58
|
+
- Extract: Retro, Recommendations, Accumulated Debt Table
|
|
59
|
+
3. **Finding file(s)**: Open the finding file(s) mapped to this sprint in the roadmap
|
|
60
|
+
- Extract: summary, details, affected files, recommendations
|
|
61
|
+
|
|
62
|
+
### Step 3 — Build Disposition Table (Sprint 2+)
|
|
63
|
+
|
|
64
|
+
For every recommendation from Sprint N-1, determine what happens to it:
|
|
65
|
+
|
|
66
|
+
| # | Recommendation | Action | Where | Justification |
|
|
67
|
+
|---|---------------|--------|-------|---------------|
|
|
68
|
+
| 1 | {text from sprint N-1} | Incorporated | Phase 2, T2.3 | Directly addresses API consistency |
|
|
69
|
+
| 2 | {text from sprint N-1} | Deferred | Sprint 5 | Requires schema migration first |
|
|
70
|
+
| 3 | {text from sprint N-1} | N/A | — | Fixed by Sprint 2 emergent phase |
|
|
71
|
+
| 4 | {text from sprint N-1} | Converted to Phase | Phase 4 | Significant enough to warrant its own phase |
|
|
72
|
+
|
|
73
|
+
**Every recommendation MUST appear in this table.** No exceptions.
|
|
74
|
+
|
|
75
|
+
**Action options**: Incorporated, Deferred, Resolved, N/A, **Converted to Phase** (when a recommendation becomes an entire phase, not just a task).
|
|
76
|
+
|
|
77
|
+
**Reference**: See [sprint-generator.md](../helpers/sprint-generator.md) → Step 4 for action options.
|
|
78
|
+
|
|
79
|
+
### Step 4 — Build Phases
|
|
80
|
+
|
|
81
|
+
Assemble phases from three sources:
|
|
82
|
+
|
|
83
|
+
1. **Roadmap-suggested phases**: Starting point from the roadmap
|
|
84
|
+
2. **Recommendation phases**: Incorporated recommendations that need their own phase
|
|
85
|
+
3. **Debt phases**: Debt items targeting this sprint
|
|
86
|
+
|
|
87
|
+
For each phase:
|
|
88
|
+
- **Objective**: Clear statement of what the phase accomplishes
|
|
89
|
+
- **Tasks**: List with checkboxes, task IDs (T{phase}.{task}), descriptions, file paths, verification criteria
|
|
90
|
+
|
|
91
|
+
**Reference**: See [sprint-generator.md](../helpers/sprint-generator.md) → Step 5 for phase assembly rules.
|
|
92
|
+
|
|
93
|
+
### Step 5 — Assemble Sprint Document
|
|
94
|
+
|
|
95
|
+
Use the [SPRINT.md template](../templates/SPRINT.md):
|
|
96
|
+
|
|
97
|
+
1. Fill frontmatter properties with actual values (title, date, project, sprint number, previous/next doc links, related findings)
|
|
98
|
+
2. Fill metadata: source finding, previous sprint, version target, type, carry-over count
|
|
99
|
+
3. Write sprint objective
|
|
100
|
+
4. Write Disposition table (Sprint 2+)
|
|
101
|
+
5. Write phases with tasks
|
|
102
|
+
6. Copy debt table from previous sprint + add new items
|
|
103
|
+
7. Write Definition of Done
|
|
104
|
+
8. Leave Retro and Recommendations sections EMPTY
|
|
105
|
+
|
|
106
|
+
**Reference**: See [debt-tracker.md](../helpers/debt-tracker.md) for debt table rules.
|
|
107
|
+
|
|
108
|
+
### Step 6 — Write Sprint File
|
|
109
|
+
|
|
110
|
+
Save to: `{sprints_dir}/SPRINT-{N}-{slug}.md`
|
|
111
|
+
|
|
112
|
+
The slug is derived from the sprint's focus area (e.g., `architecture-cleanup`, `api-consistency`).
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## EXECUTE Workflow
|
|
117
|
+
|
|
118
|
+
### Step 7 — Read Sprint
|
|
119
|
+
|
|
120
|
+
Load the sprint file to execute. Verify it has:
|
|
121
|
+
- Phases with tasks
|
|
122
|
+
- Debt table
|
|
123
|
+
- Definition of Done
|
|
124
|
+
|
|
125
|
+
**Fill execution metadata**: Set `Execution Date` to today's date and `Executed By` to the executor's name in the sprint header. Also update the frontmatter `updated` field to today's date. These fields track who executed the sprint and when.
|
|
126
|
+
|
|
127
|
+
### Step 8 — Execute Task by Task
|
|
128
|
+
|
|
129
|
+
For each task in each phase:
|
|
130
|
+
|
|
131
|
+
1. **Mark in-progress**: Change `[ ]` to `[~]`
|
|
132
|
+
2. **Do the work**:
|
|
133
|
+
- Read relevant files
|
|
134
|
+
- Write/modify code as needed
|
|
135
|
+
- Run verification commands
|
|
136
|
+
- Test changes
|
|
137
|
+
3. **Mark done**: Change `[~]` to `[x]`
|
|
138
|
+
4. **Or mark blocked**: Change `[~]` to `[!]` with explanation
|
|
139
|
+
5. **Or mark carry-over**: Change `[~]` to `[>]` — when a task cannot be completed in this sprint but is not blocked. It will be carried over to the next sprint.
|
|
140
|
+
|
|
141
|
+
**Document evidence inline**: For each task, fill the `Evidence` field with concrete proof of work — trace logs, before/after snapshots, tables of affected items, verification marks. Evidence is not optional; it makes the sprint auditable.
|
|
142
|
+
|
|
143
|
+
**Execution order**: Process phases in order (Phase 1 → Phase 2 → ...). Within a phase, process tasks in order unless dependencies require different ordering.
|
|
144
|
+
|
|
145
|
+
**Persistence rule — checkpoint per phase**: After completing all tasks in a phase, write the sprint file to disk with all status updates (`[x]`, `[!]`, `[>]`) and evidence for that phase. This ensures progress survives unexpected interruptions (agent crash, session timeout, context overflow) without disrupting task-to-task flow within a phase. Do NOT write the file after every individual task — that fragments the agent's focus and wastes I/O. Do NOT defer all writes to sprint close — that risks losing all progress tracking on failure.
|
|
146
|
+
|
|
147
|
+
**Code quality**: Write production-quality code. Follow existing project patterns. Do not introduce new patterns without justification.
|
|
148
|
+
|
|
149
|
+
### Step 9 — Handle Emergent Work
|
|
150
|
+
|
|
151
|
+
During execution, you may discover work not covered by the plan. This is expected.
|
|
152
|
+
|
|
153
|
+
**When to add an Emergent Phase**:
|
|
154
|
+
- Found a bug that must be fixed before continuing
|
|
155
|
+
- Discovered a dependency that was not in the analysis
|
|
156
|
+
- A task reveals additional scope that cannot be deferred
|
|
157
|
+
|
|
158
|
+
**How to add**:
|
|
159
|
+
1. Add an "Emergent Phase" section in the sprint document (after planned phases)
|
|
160
|
+
2. Include: phase name, reason for emergence, tasks with IDs (TE.1, TE.2, ...)
|
|
161
|
+
3. Update Definition of Done to include emergent tasks
|
|
162
|
+
|
|
163
|
+
**Rule**: Do not add emergent phases for nice-to-haves. Only for work that is necessary to meet the sprint objective or that would create debt if deferred.
|
|
164
|
+
|
|
165
|
+
### Step 10 — Close Sprint
|
|
166
|
+
|
|
167
|
+
When all tasks are done (or explicitly skipped/blocked/carried-over):
|
|
168
|
+
|
|
169
|
+
**10a. Consolidate Findings**: Before filling the retro, complete the **Findings Consolidation** table. Review all phases (planned and emergent) and list every significant discovery with its origin, impact, and action taken. This creates an auditable trail of what was learned.
|
|
170
|
+
|
|
171
|
+
1. **Fill Retro section**:
|
|
172
|
+
- What Went Well: Things that worked as expected or better
|
|
173
|
+
- What Didn't Go Well: Challenges, blockers, things that took longer
|
|
174
|
+
- Surprises: Unexpected findings or outcomes
|
|
175
|
+
- **New Technical Debt Detected**: List new debt items discovered during execution, referencing their D{n} numbers from the Accumulated Debt table
|
|
176
|
+
|
|
177
|
+
2. **Fill Recommendations for Sprint N+1**:
|
|
178
|
+
- Numbered list of specific, actionable recommendations
|
|
179
|
+
- These become formal input for the next sprint's Disposition table
|
|
180
|
+
- Include both technical and process recommendations
|
|
181
|
+
|
|
182
|
+
3. **Update Debt Table**:
|
|
183
|
+
- Mark resolved items: Status → `resolved`, fill "Resolved In"
|
|
184
|
+
- Add new items discovered during execution
|
|
185
|
+
- Update deferred items if timelines changed
|
|
186
|
+
- Follow all rules from [debt-tracker.md](../helpers/debt-tracker.md)
|
|
187
|
+
|
|
188
|
+
4. **Update Frontmatter**:
|
|
189
|
+
- Set `updated` to today's date
|
|
190
|
+
- Set `status` to `"completed"` (or `"active"` if carry-overs exist)
|
|
191
|
+
- Set `progress` to final completion percentage (0-100)
|
|
192
|
+
- Append changelog entry: `{"version": "1.1", "date": "{today}", "changes": ["Sprint completed"]}`
|
|
193
|
+
|
|
194
|
+
5. **Verify Definition of Done**:
|
|
195
|
+
- Check every DoD item
|
|
196
|
+
- Mark as complete or document why it's not
|
|
197
|
+
|
|
198
|
+
### Step 11 — Update Re-entry Prompts
|
|
199
|
+
|
|
200
|
+
After sprint execution:
|
|
201
|
+
|
|
202
|
+
1. Open `{output_kyro_dir}/RE-ENTRY-PROMPTS.md`
|
|
203
|
+
2. Update current sprint number
|
|
204
|
+
3. Update file references (last sprint, next finding)
|
|
205
|
+
4. Update Quick Reference table with new sprint status
|
|
206
|
+
5. Update "Last updated" date
|
|
207
|
+
|
|
208
|
+
**Reference**: See [reentry-generator.md](../helpers/reentry-generator.md) for update rules.
|
|
209
|
+
|
|
210
|
+
### Step 12 — Update Roadmap (If Needed)
|
|
211
|
+
|
|
212
|
+
If execution revealed that the roadmap needs adjustment:
|
|
213
|
+
|
|
214
|
+
- A planned sprint no longer makes sense → remove or modify it
|
|
215
|
+
- A new sprint is needed → add it to the roadmap
|
|
216
|
+
- Sprint dependencies changed → update the dependency map
|
|
217
|
+
- Phase suggestions for future sprints should change → update them
|
|
218
|
+
|
|
219
|
+
**This is the ADAPTIVE principle**: The roadmap serves execution, not the reverse.
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Critical Rules for Sprint Mode
|
|
224
|
+
|
|
225
|
+
1. **One sprint at a time** — NEVER generate Sprint N+1 before Sprint N is complete
|
|
226
|
+
2. **Disposition is mandatory** — Every recommendation from Sprint N-1 must be in the Disposition table
|
|
227
|
+
3. **Emergent phases are welcome** — But only for necessary work, not nice-to-haves
|
|
228
|
+
4. **Debt table is inherited completely** — Never drop items, never reset the table
|
|
229
|
+
5. **Re-entry prompts must be updated** — Every sprint execution ends with a prompt update
|
|
230
|
+
6. **Retro is honest** — Don't sugarcoat. Document real challenges and surprises.
|
|
231
|
+
7. **Recommendations are specific** — "Improve tests" is not a recommendation. "Add unit tests for the auth middleware error paths in auth.ts:45-80" is.
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## Error Handling
|
|
236
|
+
|
|
237
|
+
| Error | Action |
|
|
238
|
+
|-------|--------|
|
|
239
|
+
| No roadmap found | INIT mode must be run first. Inform user. |
|
|
240
|
+
| Previous sprint not found | Check if sprint numbering is correct. If Sprint 1, this is expected. |
|
|
241
|
+
| Finding file not found | Check roadmap mapping. The file may have been renamed or the mapping may be wrong. |
|
|
242
|
+
| All tasks blocked | Document blockers in retro, close sprint as incomplete, recommend resolution in Sprint N+1. |
|
|
243
|
+
| Sprint file already exists | Ask user: overwrite, resume execution, or skip to next sprint. |
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## References
|
|
248
|
+
|
|
249
|
+
- [sprint-generator.md](../helpers/sprint-generator.md) — Sprint generation algorithm
|
|
250
|
+
- [debt-tracker.md](../helpers/debt-tracker.md) — Debt table rules
|
|
251
|
+
- [reentry-generator.md](../helpers/reentry-generator.md) — Re-entry prompt updates
|
|
252
|
+
- [SPRINT.md template](../templates/SPRINT.md) — Sprint document structure
|
|
253
|
+
|