agileflow 2.77.0 → 2.79.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/README.md +6 -6
- package/package.json +6 -1
- package/scripts/agileflow-configure.js +174 -2
- package/scripts/agileflow-statusline.sh +171 -78
- package/scripts/agileflow-welcome.js +88 -64
- package/scripts/auto-self-improve.js +23 -45
- package/scripts/check-update.js +35 -42
- package/scripts/damage-control/bash-tool-damage-control.js +257 -0
- package/scripts/damage-control/edit-tool-damage-control.js +279 -0
- package/scripts/damage-control/patterns.yaml +227 -0
- package/scripts/damage-control/write-tool-damage-control.js +274 -0
- package/scripts/damage-control-bash.js +232 -0
- package/scripts/damage-control-edit.js +243 -0
- package/scripts/damage-control-write.js +243 -0
- package/scripts/obtain-context.js +22 -3
- package/scripts/ralph-loop.js +191 -63
- package/scripts/screenshot-verifier.js +213 -0
- package/scripts/session-manager.js +12 -33
- package/src/core/agents/accessibility.md +124 -53
- package/src/core/agents/adr-writer.md +192 -52
- package/src/core/agents/analytics.md +139 -60
- package/src/core/agents/api.md +173 -63
- package/src/core/agents/ci.md +139 -57
- package/src/core/agents/compliance.md +159 -68
- package/src/core/agents/configuration/damage-control.md +356 -0
- package/src/core/agents/configuration-damage-control.md +248 -0
- package/src/core/agents/database.md +162 -61
- package/src/core/agents/datamigration.md +179 -66
- package/src/core/agents/design.md +179 -57
- package/src/core/agents/devops.md +160 -3
- package/src/core/agents/documentation.md +204 -60
- package/src/core/agents/epic-planner.md +147 -55
- package/src/core/agents/integrations.md +197 -69
- package/src/core/agents/mentor.md +158 -57
- package/src/core/agents/mobile.md +159 -67
- package/src/core/agents/monitoring.md +154 -65
- package/src/core/agents/multi-expert.md +115 -43
- package/src/core/agents/orchestrator.md +77 -24
- package/src/core/agents/performance.md +130 -75
- package/src/core/agents/product.md +151 -55
- package/src/core/agents/qa.md +162 -74
- package/src/core/agents/readme-updater.md +178 -76
- package/src/core/agents/refactor.md +148 -95
- package/src/core/agents/research.md +143 -72
- package/src/core/agents/security.md +154 -65
- package/src/core/agents/testing.md +176 -97
- package/src/core/agents/ui.md +170 -79
- package/src/core/commands/adr/list.md +171 -0
- package/src/core/commands/adr/update.md +235 -0
- package/src/core/commands/adr/view.md +252 -0
- package/src/core/commands/adr.md +207 -50
- package/src/core/commands/agent.md +16 -0
- package/src/core/commands/assign.md +148 -44
- package/src/core/commands/auto.md +18 -1
- package/src/core/commands/babysit.md +391 -38
- package/src/core/commands/baseline.md +14 -0
- package/src/core/commands/blockers.md +170 -51
- package/src/core/commands/board.md +144 -66
- package/src/core/commands/changelog.md +15 -0
- package/src/core/commands/ci.md +179 -69
- package/src/core/commands/compress.md +18 -0
- package/src/core/commands/configure.md +16 -0
- package/src/core/commands/context/export.md +193 -4
- package/src/core/commands/context/full.md +191 -18
- package/src/core/commands/context/note.md +248 -4
- package/src/core/commands/debt.md +17 -0
- package/src/core/commands/deploy.md +208 -65
- package/src/core/commands/deps.md +15 -0
- package/src/core/commands/diagnose.md +16 -0
- package/src/core/commands/docs.md +196 -64
- package/src/core/commands/epic/list.md +170 -0
- package/src/core/commands/epic/view.md +242 -0
- package/src/core/commands/epic.md +192 -69
- package/src/core/commands/feedback.md +191 -71
- package/src/core/commands/handoff.md +162 -48
- package/src/core/commands/help.md +9 -0
- package/src/core/commands/ideate.md +446 -0
- package/src/core/commands/impact.md +16 -0
- package/src/core/commands/metrics.md +141 -37
- package/src/core/commands/multi-expert.md +77 -0
- package/src/core/commands/packages.md +16 -0
- package/src/core/commands/pr.md +161 -67
- package/src/core/commands/readme-sync.md +16 -0
- package/src/core/commands/research/analyze.md +568 -0
- package/src/core/commands/research/ask.md +345 -20
- package/src/core/commands/research/import.md +562 -19
- package/src/core/commands/research/list.md +173 -5
- package/src/core/commands/research/view.md +181 -8
- package/src/core/commands/retro.md +135 -48
- package/src/core/commands/review.md +219 -47
- package/src/core/commands/session/end.md +209 -0
- package/src/core/commands/session/history.md +210 -0
- package/src/core/commands/session/init.md +116 -0
- package/src/core/commands/session/new.md +296 -0
- package/src/core/commands/session/resume.md +166 -0
- package/src/core/commands/session/status.md +166 -0
- package/src/core/commands/setup/visual-e2e.md +462 -0
- package/src/core/commands/skill/create.md +115 -17
- package/src/core/commands/skill/delete.md +117 -0
- package/src/core/commands/skill/edit.md +104 -0
- package/src/core/commands/skill/list.md +128 -0
- package/src/core/commands/skill/test.md +135 -0
- package/src/core/commands/skill/upgrade.md +542 -0
- package/src/core/commands/sprint.md +17 -1
- package/src/core/commands/status.md +133 -21
- package/src/core/commands/story/list.md +176 -0
- package/src/core/commands/story/view.md +265 -0
- package/src/core/commands/story-validate.md +101 -1
- package/src/core/commands/story.md +204 -51
- package/src/core/commands/template.md +16 -1
- package/src/core/commands/tests.md +226 -64
- package/src/core/commands/update.md +17 -1
- package/src/core/commands/validate-expertise.md +16 -0
- package/src/core/commands/velocity.md +140 -36
- package/src/core/commands/verify.md +14 -0
- package/src/core/commands/whats-new.md +30 -0
- package/src/core/skills/_learnings/README.md +91 -0
- package/src/core/skills/_learnings/_template.yaml +106 -0
- package/src/core/skills/_learnings/code-review.yaml +118 -0
- package/src/core/skills/_learnings/commit.yaml +69 -0
- package/src/core/skills/_learnings/story-writer.yaml +71 -0
- package/src/core/templates/damage-control-patterns.yaml +234 -0
- package/src/core/templates/skill-template.md +53 -11
- package/tools/cli/commands/start.js +180 -0
- package/tools/cli/installers/ide/claude-code.js +127 -0
- package/tools/cli/tui/Dashboard.js +66 -0
- package/tools/cli/tui/StoryList.js +69 -0
- package/tools/cli/tui/index.js +16 -0
package/src/core/commands/adr.md
CHANGED
|
@@ -1,9 +1,26 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Create an Architecture Decision Record
|
|
3
3
|
argument-hint: NUMBER=<4-digit> TITLE=<text> CONTEXT=<text> DECISION=<text> CONSEQUENCES=<text> [LINKS=<text>]
|
|
4
|
+
compact_context:
|
|
5
|
+
priority: medium
|
|
6
|
+
preserve_rules:
|
|
7
|
+
- "NUMBER is REQUIRED - must be 4-digit sequentially (0001, 0002, etc.)"
|
|
8
|
+
- "TITLE, CONTEXT, DECISION, CONSEQUENCES all REQUIRED"
|
|
9
|
+
- "Create ADR file in docs/03-decisions/adr-<NUMBER>-<slug>.md"
|
|
10
|
+
- "Always show preview FIRST, wait for YES/NO confirmation BEFORE writing"
|
|
11
|
+
- "Document BOTH positive and negative consequences"
|
|
12
|
+
- "Keep ADRs concise: 1-2 pages max"
|
|
13
|
+
- "Link related ADRs and stories in Related section"
|
|
14
|
+
- "Use template from @packages/cli/src/core/templates/adr-template.md"
|
|
15
|
+
state_fields:
|
|
16
|
+
- adr_number
|
|
17
|
+
- adr_title
|
|
18
|
+
- context
|
|
19
|
+
- decision
|
|
20
|
+
- consequences
|
|
4
21
|
---
|
|
5
22
|
|
|
6
|
-
# adr
|
|
23
|
+
# adr
|
|
7
24
|
|
|
8
25
|
Create a new Architecture Decision Record.
|
|
9
26
|
|
|
@@ -14,35 +31,56 @@ node .agileflow/scripts/obtain-context.js adr
|
|
|
14
31
|
```
|
|
15
32
|
|
|
16
33
|
<!-- COMPACT_SUMMARY_START -->
|
|
17
|
-
## Compact Summary
|
|
18
34
|
|
|
19
|
-
|
|
35
|
+
## ⚠️ COMPACT SUMMARY - /agileflow:adr IS ACTIVE
|
|
20
36
|
|
|
21
|
-
**
|
|
22
|
-
```
|
|
23
|
-
/agileflow:adr NUMBER=0042 TITLE="Use PostgreSQL for persistence" CONTEXT="Need reliable ACID database" DECISION="PostgreSQL chosen over MongoDB" CONSEQUENCES="Better data integrity, steeper learning curve"
|
|
24
|
-
```
|
|
37
|
+
**CRITICAL**: You are creating Architecture Decision Records (ADRs) that document architectural choices made in the project.
|
|
25
38
|
|
|
26
|
-
**
|
|
39
|
+
**ROLE**: ADR Writer
|
|
27
40
|
|
|
28
|
-
|
|
41
|
+
---
|
|
29
42
|
|
|
30
|
-
|
|
31
|
-
```xml
|
|
32
|
-
<invoke name="TodoWrite">
|
|
33
|
-
<parameter name="content">1. Parse inputs (NUMBER, TITLE, CONTEXT, DECISION, CONSEQUENCES, LINKS)
|
|
34
|
-
2. Create docs/03-decisions/adr-<NUMBER>-<slug>.md from template
|
|
35
|
-
3. Show preview and wait for YES/NO confirmation</parameter>
|
|
36
|
-
<parameter name="status">in-progress</parameter>
|
|
37
|
-
<parameter name="activeForm">1</parameter>
|
|
38
|
-
</invoke>
|
|
39
|
-
```
|
|
43
|
+
### 🚨 RULE #1: ALL INPUTS REQUIRED
|
|
40
44
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
Always require these inputs. Ask if missing:
|
|
46
|
+
|
|
47
|
+
| Input | Required? | Example |
|
|
48
|
+
|-------|-----------|---------|
|
|
49
|
+
| NUMBER | YES | `NUMBER=0042` (4-digit, sequential) |
|
|
50
|
+
| TITLE | YES | `TITLE="Use PostgreSQL for persistence"` |
|
|
51
|
+
| CONTEXT | YES | `CONTEXT="Need reliable ACID database..."` |
|
|
52
|
+
| DECISION | YES | `DECISION="PostgreSQL chosen over MongoDB"` |
|
|
53
|
+
| CONSEQUENCES | YES | `CONSEQUENCES="Better integrity, learning curve"` |
|
|
54
|
+
| LINKS | NO | `LINKS="ADR-0041, US-0055"` |
|
|
55
|
+
|
|
56
|
+
❌ WRONG: Create ADR without CONTEXT or DECISION
|
|
57
|
+
✅ RIGHT: Ask for missing inputs, then proceed
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
### 🚨 RULE #2: SEQUENTIAL NUMBERING
|
|
62
|
+
|
|
63
|
+
ADRs MUST be numbered sequentially (0001, 0002, 0003, etc.):
|
|
64
|
+
|
|
65
|
+
1. Check existing ADRs in docs/03-decisions/
|
|
66
|
+
2. Find highest number (e.g., 0041)
|
|
67
|
+
3. Next ADR should be 0042
|
|
68
|
+
4. Never skip numbers or reuse numbers
|
|
69
|
+
|
|
70
|
+
❌ WRONG: Create ADR-0100 when only 0042 exists
|
|
71
|
+
✅ RIGHT: Find next sequential number and use it
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
### 🚨 RULE #3: ADR FILE STRUCTURE
|
|
76
|
+
|
|
77
|
+
Create file at: `docs/03-decisions/adr-<NUMBER>-<slug>.md`
|
|
78
|
+
|
|
79
|
+
Example: `docs/03-decisions/adr-0042-postgresql.md`
|
|
80
|
+
|
|
81
|
+
Use template from `@packages/cli/src/core/templates/adr-template.md`:
|
|
82
|
+
```markdown
|
|
83
|
+
---
|
|
46
84
|
number: 0042
|
|
47
85
|
title: Use PostgreSQL for persistence
|
|
48
86
|
date: 2025-12-22
|
|
@@ -53,42 +91,112 @@ tags: [database, architecture]
|
|
|
53
91
|
# ADR-0042: Use PostgreSQL for persistence
|
|
54
92
|
|
|
55
93
|
## Context
|
|
56
|
-
|
|
94
|
+
[Why this decision - explain the problem/constraints]
|
|
57
95
|
|
|
58
96
|
## Decision
|
|
59
|
-
|
|
97
|
+
[What was chosen and why - be specific]
|
|
60
98
|
|
|
61
99
|
## Consequences
|
|
62
|
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
100
|
+
### Positive
|
|
101
|
+
- Better data integrity
|
|
102
|
+
- ACID guarantees
|
|
103
|
+
|
|
104
|
+
### Negative
|
|
105
|
+
- Team needs training
|
|
106
|
+
- Operational complexity
|
|
65
107
|
|
|
66
108
|
## Related
|
|
67
|
-
- [ADR-0041
|
|
68
|
-
- [US-0055
|
|
69
|
-
</invoke>
|
|
109
|
+
- [ADR-0041](adr-0041-db-selection.md)
|
|
110
|
+
- [US-0055](../06-stories/US-0055.md)
|
|
70
111
|
```
|
|
71
112
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
### 🚨 RULE #4: CONTEXT BEFORE DECISION
|
|
116
|
+
|
|
117
|
+
**ALWAYS explain the "why" in Context section:**
|
|
118
|
+
|
|
119
|
+
❌ WRONG: "We use PostgreSQL because it's good"
|
|
120
|
+
✅ RIGHT: "Need ACID guarantees for financial transactions. Considered MongoDB (eventual consistency risk), Redis (in-memory limits). PostgreSQL best fit for requirements."
|
|
121
|
+
|
|
122
|
+
Good context helps future readers understand the trade-offs.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
### 🚨 RULE #5: DOCUMENT BOTH POSITIVE AND NEGATIVE
|
|
127
|
+
|
|
128
|
+
**ALWAYS document consequences honestly:**
|
|
129
|
+
|
|
130
|
+
| Type | Examples |
|
|
131
|
+
|------|----------|
|
|
132
|
+
| **Positive** | Performance, maintenance, guarantees |
|
|
133
|
+
| **Negative** | Learning curve, cost, migration effort |
|
|
78
134
|
|
|
79
|
-
|
|
80
|
-
- Frontmatter (number, title, date, status, tags)
|
|
81
|
-
- Context section (why decision needed)
|
|
82
|
-
- Decision section (what was chosen)
|
|
83
|
-
- Consequences section (trade-offs and impacts)
|
|
84
|
-
- Optional links to related docs
|
|
135
|
+
Both are important - readers need full trade-off picture.
|
|
85
136
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
### 🚨 RULE #6: DIFF-FIRST, YES/NO PATTERN
|
|
140
|
+
|
|
141
|
+
**ALWAYS follow this pattern:**
|
|
142
|
+
|
|
143
|
+
1. Generate ADR content (don't write yet)
|
|
144
|
+
2. Show preview/diff to user
|
|
145
|
+
3. Ask: "Create this ADR? (YES/NO)"
|
|
146
|
+
4. Only write file if user says YES
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
### ANTI-PATTERNS (DON'T DO THESE)
|
|
151
|
+
|
|
152
|
+
❌ Create ADR with only DECISION (no CONTEXT)
|
|
153
|
+
❌ Reuse or skip ADR numbers
|
|
154
|
+
❌ Write vague consequences ("pros and cons")
|
|
155
|
+
❌ Create multi-page ADRs (keep concise)
|
|
156
|
+
❌ Write ADR without showing preview
|
|
157
|
+
❌ Document only positive consequences
|
|
158
|
+
|
|
159
|
+
### DO THESE INSTEAD
|
|
160
|
+
|
|
161
|
+
✅ Explain CONTEXT (the "why") thoroughly
|
|
162
|
+
✅ Use sequential numbering
|
|
163
|
+
✅ Document positive AND negative consequences
|
|
164
|
+
✅ Keep to 1-2 pages max
|
|
165
|
+
✅ Show preview before creating
|
|
166
|
+
✅ Honest about trade-offs
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
### WORKFLOW
|
|
171
|
+
|
|
172
|
+
1. **Input Validation**: Ensure all inputs (ask if missing)
|
|
173
|
+
2. **Check Number**: Verify next sequential ADR
|
|
174
|
+
3. **Generate ADR**: Create from template
|
|
175
|
+
4. **Show Preview**: Display to user
|
|
176
|
+
5. **Confirm**: Ask "Create this ADR? (YES/NO)"
|
|
177
|
+
6. **Write**: Only if approved
|
|
178
|
+
7. **Done**: Show success message
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
### KEY FILES TO REMEMBER
|
|
183
|
+
|
|
184
|
+
| File | Purpose |
|
|
185
|
+
|------|---------|
|
|
186
|
+
| `docs/03-decisions/adr-<NUMBER>-<slug>.md` | ADR file location |
|
|
187
|
+
| `@packages/cli/src/core/templates/adr-template.md` | ADR template |
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
### REMEMBER AFTER COMPACTION
|
|
192
|
+
|
|
193
|
+
- `/agileflow:adr` IS ACTIVE - creating ADRs
|
|
194
|
+
- All inputs required (NUMBER, TITLE, CONTEXT, DECISION, CONSEQUENCES)
|
|
195
|
+
- NUMBER must be sequential 4-digit
|
|
196
|
+
- Always explain CONTEXT (the "why")
|
|
197
|
+
- Document positive AND negative consequences
|
|
198
|
+
- Keep 1-2 pages max
|
|
199
|
+
- Show preview, wait for YES/NO before writing
|
|
92
200
|
|
|
93
201
|
<!-- COMPACT_SUMMARY_END -->
|
|
94
202
|
|
|
@@ -120,3 +228,52 @@ ACTIONS
|
|
|
120
228
|
2) Create docs/03-decisions/adr-<NUMBER>-<slug>.md from template
|
|
121
229
|
3) Show diff and wait for YES/NO confirmation
|
|
122
230
|
4) Write file if approved
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## POST-CREATION ACTIONS
|
|
235
|
+
|
|
236
|
+
After successfully creating the ADR, offer next steps:
|
|
237
|
+
|
|
238
|
+
```xml
|
|
239
|
+
<invoke name="AskUserQuestion">
|
|
240
|
+
<parameter name="questions">[{
|
|
241
|
+
"question": "ADR-<NUMBER> created! What would you like to do next?",
|
|
242
|
+
"header": "Next Steps",
|
|
243
|
+
"multiSelect": false,
|
|
244
|
+
"options": [
|
|
245
|
+
{"label": "Create implementation stories (Recommended)", "description": "Turn this decision into actionable work"},
|
|
246
|
+
{"label": "Link to existing research", "description": "Connect to research that led to this decision"},
|
|
247
|
+
{"label": "Create another ADR", "description": "Document another architecture decision"},
|
|
248
|
+
{"label": "View all ADRs", "description": "See full list with /agileflow:adr:list"}
|
|
249
|
+
]
|
|
250
|
+
}]</parameter>
|
|
251
|
+
</invoke>
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
**If "Create implementation stories"**:
|
|
255
|
+
1. Analyze the ADR's decision and consequences
|
|
256
|
+
2. Suggest potential stories/epic based on the decision
|
|
257
|
+
3. If confirmed, run `/agileflow:epic` or `/agileflow:story`
|
|
258
|
+
|
|
259
|
+
**If "Link to existing research"**:
|
|
260
|
+
1. Run `/agileflow:research:list` to show available research
|
|
261
|
+
2. Select research note
|
|
262
|
+
3. Add reference to ADR: `**Research**: See [Research Title](../10-research/...)`
|
|
263
|
+
|
|
264
|
+
**If "Create another ADR"**:
|
|
265
|
+
- Re-run `/agileflow:adr` with next number
|
|
266
|
+
|
|
267
|
+
**If "View all ADRs"**:
|
|
268
|
+
- Run `/agileflow:adr:list`
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## Related Commands
|
|
273
|
+
|
|
274
|
+
- `/agileflow:adr:list` - View all ADRs with status
|
|
275
|
+
- `/agileflow:adr:view` - View ADR details with contextual actions
|
|
276
|
+
- `/agileflow:adr:update` - Update ADR status
|
|
277
|
+
- `/agileflow:research:analyze` - Analyze research that may lead to ADR
|
|
278
|
+
- `/agileflow:epic` - Create implementation epic
|
|
279
|
+
- `/agileflow:story` - Create implementation story
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Onboard a new agent with profile and contract
|
|
3
3
|
argument-hint: AGENT_ID=<id> ROLE=<role> [TOOLS=<list>] [SCOPE=<dirs>]
|
|
4
|
+
compact_context:
|
|
5
|
+
priority: high
|
|
6
|
+
preserve_rules:
|
|
7
|
+
- "ACTIVE COMMAND: /agileflow:agent - Agent onboarding with profiles and contracts"
|
|
8
|
+
- "CRITICAL: Create agent profile markdown file at docs/02-practices/prompts/agents/agent-{AGENT_ID}.md"
|
|
9
|
+
- "CRITICAL: Update roster.yaml at docs/09-agents/roster.yaml with agent metadata"
|
|
10
|
+
- "MUST include System Prompt (contract) with scope boundaries, commit rules, test requirements"
|
|
11
|
+
- "MUST use diff-first approach: show preview, get YES/NO confirmation before writing"
|
|
12
|
+
- "Agent IDs must be descriptive (AG-UI, AG-API, AG-CI) not generic (AG-001)"
|
|
13
|
+
- "Profile includes: role, tools, scope directories, story tags, contract rules"
|
|
14
|
+
state_fields:
|
|
15
|
+
- agent_id
|
|
16
|
+
- role
|
|
17
|
+
- tools_list
|
|
18
|
+
- scope_directories
|
|
19
|
+
- scope_story_tags
|
|
4
20
|
---
|
|
5
21
|
|
|
6
22
|
# agent-new
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Assign or reassign a story to an owner
|
|
3
3
|
argument-hint: STORY=<US-ID> NEW_OWNER=<id> [NEW_STATUS=<status>] [NOTE=<text>]
|
|
4
|
+
compact_context:
|
|
5
|
+
priority: high
|
|
6
|
+
preserve_rules:
|
|
7
|
+
- "ACTIVE COMMAND: /agileflow:assign - Story assigner and owner changer"
|
|
8
|
+
- "MUST update story frontmatter (owner, status, updated timestamp)"
|
|
9
|
+
- "MUST update docs/09-agents/status.json using jq or Edit tool"
|
|
10
|
+
- "MUST validate JSON after modification"
|
|
11
|
+
- "MUST append assign event to docs/09-agents/bus/log.jsonl"
|
|
12
|
+
- "MUST use AskUserQuestion for user confirmation (YES/NO format)"
|
|
13
|
+
- "MUST show diff preview before confirming (diff-first pattern)"
|
|
14
|
+
- "Status values: ready|in-progress|blocked|in-review|done"
|
|
15
|
+
state_fields:
|
|
16
|
+
- story_id
|
|
17
|
+
- current_owner
|
|
18
|
+
- new_owner
|
|
19
|
+
- new_status
|
|
4
20
|
---
|
|
5
21
|
|
|
6
22
|
# assign
|
|
@@ -14,59 +30,134 @@ node .agileflow/scripts/obtain-context.js assign
|
|
|
14
30
|
```
|
|
15
31
|
|
|
16
32
|
<!-- COMPACT_SUMMARY_START -->
|
|
17
|
-
## Compact Summary
|
|
18
33
|
|
|
19
|
-
|
|
20
|
-
**Purpose**: Assign or reassign stories to owners with status updates
|
|
34
|
+
## ⚠️ COMPACT SUMMARY - /agileflow:assign IS ACTIVE
|
|
21
35
|
|
|
22
|
-
**
|
|
36
|
+
**CRITICAL**: You assign/reassign stories to owners. This modifies two files + bus log.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
### 🚨 RULE #1: ALWAYS Update Both Story File AND status.json
|
|
41
|
+
|
|
42
|
+
**Two-part update required**:
|
|
43
|
+
1. Update story frontmatter (owner, status, updated timestamp)
|
|
44
|
+
2. Update docs/09-agents/status.json (using jq or Edit tool)
|
|
45
|
+
|
|
46
|
+
### 🚨 RULE #2: ALWAYS Use jq or Edit Tool (NEVER echo/cat >)
|
|
47
|
+
|
|
48
|
+
**REQUIRED**:
|
|
49
|
+
- ALWAYS use jq for status.json updates (prevents corruption)
|
|
50
|
+
- ALWAYS validate after modification:
|
|
51
|
+
```bash
|
|
52
|
+
if ! jq empty docs/09-agents/status.json 2>/dev/null; then
|
|
53
|
+
echo "❌ ERROR: status.json is now invalid JSON!"
|
|
54
|
+
exit 1
|
|
55
|
+
fi
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### 🚨 RULE #3: ALWAYS Show Diff Preview Before Confirming
|
|
59
|
+
|
|
60
|
+
**Workflow**:
|
|
61
|
+
1. Parse inputs (STORY, NEW_OWNER, NEW_STATUS, NOTE)
|
|
62
|
+
2. Prepare story frontmatter update
|
|
63
|
+
3. Prepare status.json update
|
|
64
|
+
4. Show unified DIFF preview (story + status.json)
|
|
65
|
+
5. Ask YES/NO confirmation
|
|
66
|
+
6. Only on YES: Execute all updates + append bus message
|
|
67
|
+
|
|
68
|
+
### 🚨 RULE #4: VALID STATUS TRANSITIONS
|
|
69
|
+
|
|
70
|
+
Status can transition:
|
|
71
|
+
- `ready` → `in-progress` (starting work)
|
|
72
|
+
- `in-progress` → `blocked` (hit blocker)
|
|
73
|
+
- `in-progress` → `in-review` (finished, ready for review)
|
|
74
|
+
- `blocked` → `in-progress` (blocker resolved)
|
|
75
|
+
- `in-review` → `done` (review complete)
|
|
76
|
+
- Any → `ready` (reset story)
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Key Files & Actions
|
|
81
|
+
|
|
82
|
+
**Input Parameters**:
|
|
83
|
+
```
|
|
84
|
+
STORY=<US-ID> # e.g., US-0042 (required)
|
|
85
|
+
NEW_OWNER=<id> # New owner (required)
|
|
86
|
+
NEW_STATUS=<status> # ready|in-progress|blocked|in-review|done (optional)
|
|
87
|
+
NOTE=<text> # Brief note for bus message (optional)
|
|
23
88
|
```
|
|
24
|
-
|
|
89
|
+
|
|
90
|
+
**Files Updated**:
|
|
91
|
+
1. docs/06-stories/<EPIC>/<STORY>-<slug>.md (frontmatter)
|
|
92
|
+
2. docs/09-agents/status.json (story entry)
|
|
93
|
+
3. docs/09-agents/bus/log.jsonl (appended event)
|
|
94
|
+
|
|
95
|
+
**Story Frontmatter Update**:
|
|
96
|
+
```yaml
|
|
97
|
+
owner: AG-UI
|
|
98
|
+
status: in-progress
|
|
99
|
+
updated: 2025-10-22T14:30:00Z
|
|
25
100
|
```
|
|
26
101
|
|
|
27
|
-
**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
- `done` - Completed and verified
|
|
39
|
-
|
|
40
|
-
**JSON Safety Protocol**:
|
|
41
|
-
- **ALWAYS** use jq or Edit tool for JSON operations
|
|
42
|
-
- **NEVER** use echo/cat > status.json (can corrupt JSON)
|
|
43
|
-
- **VALIDATE** after modification:
|
|
44
|
-
```bash
|
|
45
|
-
if ! jq empty docs/09-agents/status.json 2>/dev/null; then
|
|
46
|
-
echo "❌ ERROR: status.json is now invalid JSON!"
|
|
47
|
-
exit 1
|
|
48
|
-
fi
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
**Example Workflow**:
|
|
102
|
+
**status.json Update**:
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"stories": {
|
|
106
|
+
"US-0042": {
|
|
107
|
+
"owner": "AG-UI",
|
|
108
|
+
"status": "in-progress",
|
|
109
|
+
"last_update": "ISO-timestamp"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
52
113
|
```
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
5. Review complete
|
|
58
|
-
6. /agileflow:assign STORY=US-0042 NEW_OWNER=AG-UI NEW_STATUS=done
|
|
114
|
+
|
|
115
|
+
**Append to bus/log.jsonl**:
|
|
116
|
+
```json
|
|
117
|
+
{"ts":"ISO-timestamp","from":"SYSTEM","type":"assign","from":"<user>","to":"<NEW_OWNER>","story":"<STORY>","status":"<NEW_STATUS>","text":"<NOTE>"}
|
|
59
118
|
```
|
|
60
119
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
-
|
|
64
|
-
|
|
65
|
-
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Anti-Patterns & Correct Usage
|
|
123
|
+
|
|
124
|
+
❌ **DON'T**:
|
|
125
|
+
- Update story file without updating status.json
|
|
126
|
+
- Use echo or cat for JSON changes
|
|
127
|
+
- Skip validation after JSON updates
|
|
128
|
+
- Forget to show diff before confirming
|
|
129
|
+
- Use invalid status values
|
|
130
|
+
|
|
131
|
+
✅ **DO**:
|
|
132
|
+
- Update story frontmatter AND status.json together
|
|
133
|
+
- Use jq for JSON operations
|
|
134
|
+
- Validate with `jq empty` after every write
|
|
135
|
+
- Show diff preview before confirmation
|
|
136
|
+
- Use only valid status values
|
|
137
|
+
|
|
138
|
+
---
|
|
66
139
|
|
|
67
|
-
|
|
140
|
+
## Confirmation Flow
|
|
68
141
|
|
|
69
|
-
|
|
142
|
+
1. **Show diff preview**:
|
|
143
|
+
```
|
|
144
|
+
Story: docs/06-stories/EP-0010/US-0042-login-form.md
|
|
145
|
+
-owner: unassigned
|
|
146
|
+
+owner: AG-UI
|
|
147
|
+
-status: ready
|
|
148
|
+
+status: in-progress
|
|
149
|
+
|
|
150
|
+
Status: docs/09-agents/status.json
|
|
151
|
+
"US-0042": {
|
|
152
|
+
-"owner": "unassigned",
|
|
153
|
+
+"owner": "AG-UI",
|
|
154
|
+
-"status": "ready",
|
|
155
|
+
+"status": "in-progress",
|
|
156
|
+
+"last_update": "ISO-timestamp"
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
2. **Ask confirmation**:
|
|
70
161
|
```xml
|
|
71
162
|
<invoke name="AskUserQuestion">
|
|
72
163
|
<parameter name="questions">[{
|
|
@@ -74,13 +165,26 @@ AskUserQuestion:
|
|
|
74
165
|
"header": "Confirm Assignment",
|
|
75
166
|
"multiSelect": false,
|
|
76
167
|
"options": [
|
|
77
|
-
{"label": "Yes, assign", "description": "Update
|
|
168
|
+
{"label": "Yes, assign", "description": "Update files"},
|
|
78
169
|
{"label": "No, cancel", "description": "Don't assign"}
|
|
79
170
|
]
|
|
80
171
|
}]</parameter>
|
|
81
172
|
</invoke>
|
|
82
173
|
```
|
|
83
174
|
|
|
175
|
+
3. **On YES**: Execute updates + validate JSON + append bus message
|
|
176
|
+
4. **On NO**: Abort without changes
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## REMEMBER AFTER COMPACTION
|
|
181
|
+
|
|
182
|
+
- Updates story frontmatter + status.json + bus log
|
|
183
|
+
- ALWAYS validate JSON after modification
|
|
184
|
+
- ALWAYS show diff before confirming
|
|
185
|
+
- Status values: ready, in-progress, blocked, in-review, done
|
|
186
|
+
- Two-part update: story file + status.json (don't forget either)
|
|
187
|
+
|
|
84
188
|
<!-- COMPACT_SUMMARY_END -->
|
|
85
189
|
|
|
86
190
|
## Prompt
|
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Auto-generate stories from PRDs, mockups, or specs
|
|
3
|
-
argument-hint:
|
|
3
|
+
argument-hint: SOURCE=<path|url> [EPIC=<id>] [OWNER=<agent>] [AUTO_CREATE=yes|no]
|
|
4
|
+
compact_context:
|
|
5
|
+
priority: high
|
|
6
|
+
preserve_rules:
|
|
7
|
+
- "ACTIVE COMMAND: /agileflow:auto-story - Auto-generate stories from product artifacts"
|
|
8
|
+
- "CRITICAL: Use TodoWrite to track 10-step generation process immediately"
|
|
9
|
+
- "CRITICAL: Always preview BEFORE creating (AUTO_CREATE=no default)"
|
|
10
|
+
- "MUST generate stories with Given/When/Then Acceptance Criteria format"
|
|
11
|
+
- "MUST estimate using INVEST: 0.5d (simple) | 1d (standard) | 1.5d (complex) | 2d (refactor)"
|
|
12
|
+
- "Stories >2d MUST be split into smaller stories"
|
|
13
|
+
- "MUST create story files, test stubs, update status.json, and bus log"
|
|
14
|
+
- "Supported sources: PRDs (.md/.pdf), mockups (Figma/PNG), API docs (OpenAPI/Swagger), flows (Mermaid)"
|
|
15
|
+
state_fields:
|
|
16
|
+
- source_file
|
|
17
|
+
- source_type
|
|
18
|
+
- epic_id
|
|
19
|
+
- owner_agent
|
|
20
|
+
- stories_generated
|
|
4
21
|
---
|
|
5
22
|
|
|
6
23
|
# auto-story
|