agileflow 2.76.0 → 2.78.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.
Files changed (124) hide show
  1. package/README.md +3 -3
  2. package/package.json +6 -1
  3. package/scripts/agileflow-configure.js +185 -13
  4. package/scripts/agileflow-statusline.sh +266 -27
  5. package/scripts/agileflow-welcome.js +160 -52
  6. package/scripts/auto-self-improve.js +63 -20
  7. package/scripts/check-update.js +1 -4
  8. package/scripts/damage-control-bash.js +232 -0
  9. package/scripts/damage-control-edit.js +243 -0
  10. package/scripts/damage-control-write.js +243 -0
  11. package/scripts/get-env.js +15 -7
  12. package/scripts/lib/frontmatter-parser.js +4 -1
  13. package/scripts/obtain-context.js +59 -48
  14. package/scripts/ralph-loop.js +25 -13
  15. package/scripts/validate-expertise.sh +19 -15
  16. package/src/core/agents/accessibility.md +124 -53
  17. package/src/core/agents/adr-writer.md +192 -52
  18. package/src/core/agents/analytics.md +139 -60
  19. package/src/core/agents/api.md +173 -63
  20. package/src/core/agents/ci.md +139 -57
  21. package/src/core/agents/compliance.md +159 -68
  22. package/src/core/agents/configuration/damage-control.md +356 -0
  23. package/src/core/agents/database.md +162 -61
  24. package/src/core/agents/datamigration.md +179 -66
  25. package/src/core/agents/design.md +179 -57
  26. package/src/core/agents/devops.md +160 -3
  27. package/src/core/agents/documentation.md +204 -60
  28. package/src/core/agents/epic-planner.md +147 -55
  29. package/src/core/agents/integrations.md +197 -69
  30. package/src/core/agents/mentor.md +158 -57
  31. package/src/core/agents/mobile.md +159 -67
  32. package/src/core/agents/monitoring.md +154 -65
  33. package/src/core/agents/multi-expert.md +115 -43
  34. package/src/core/agents/orchestrator.md +77 -24
  35. package/src/core/agents/performance.md +130 -75
  36. package/src/core/agents/product.md +151 -55
  37. package/src/core/agents/qa.md +162 -74
  38. package/src/core/agents/readme-updater.md +178 -76
  39. package/src/core/agents/refactor.md +148 -95
  40. package/src/core/agents/research.md +143 -72
  41. package/src/core/agents/security.md +154 -65
  42. package/src/core/agents/testing.md +176 -97
  43. package/src/core/agents/ui.md +170 -79
  44. package/src/core/commands/adr/list.md +171 -0
  45. package/src/core/commands/adr/update.md +235 -0
  46. package/src/core/commands/adr/view.md +252 -0
  47. package/src/core/commands/adr.md +207 -50
  48. package/src/core/commands/agent.md +16 -0
  49. package/src/core/commands/assign.md +148 -44
  50. package/src/core/commands/auto.md +18 -1
  51. package/src/core/commands/babysit.md +361 -36
  52. package/src/core/commands/baseline.md +14 -0
  53. package/src/core/commands/blockers.md +170 -51
  54. package/src/core/commands/board.md +144 -66
  55. package/src/core/commands/changelog.md +15 -0
  56. package/src/core/commands/ci.md +179 -69
  57. package/src/core/commands/compress.md +18 -0
  58. package/src/core/commands/configure.md +16 -0
  59. package/src/core/commands/context/export.md +193 -4
  60. package/src/core/commands/context/full.md +191 -18
  61. package/src/core/commands/context/note.md +248 -4
  62. package/src/core/commands/debt.md +17 -0
  63. package/src/core/commands/deploy.md +208 -65
  64. package/src/core/commands/deps.md +15 -0
  65. package/src/core/commands/diagnose.md +16 -0
  66. package/src/core/commands/docs.md +196 -64
  67. package/src/core/commands/epic/list.md +170 -0
  68. package/src/core/commands/epic/view.md +242 -0
  69. package/src/core/commands/epic.md +192 -69
  70. package/src/core/commands/feedback.md +191 -71
  71. package/src/core/commands/handoff.md +162 -48
  72. package/src/core/commands/help.md +9 -0
  73. package/src/core/commands/ideate.md +446 -0
  74. package/src/core/commands/impact.md +16 -0
  75. package/src/core/commands/metrics.md +141 -37
  76. package/src/core/commands/multi-expert.md +77 -0
  77. package/src/core/commands/packages.md +16 -0
  78. package/src/core/commands/pr.md +161 -67
  79. package/src/core/commands/readme-sync.md +16 -0
  80. package/src/core/commands/research/analyze.md +568 -0
  81. package/src/core/commands/research/ask.md +345 -20
  82. package/src/core/commands/research/import.md +562 -19
  83. package/src/core/commands/research/list.md +173 -5
  84. package/src/core/commands/research/view.md +181 -8
  85. package/src/core/commands/retro.md +135 -48
  86. package/src/core/commands/review.md +219 -47
  87. package/src/core/commands/session/end.md +209 -0
  88. package/src/core/commands/session/history.md +210 -0
  89. package/src/core/commands/session/init.md +116 -0
  90. package/src/core/commands/session/new.md +296 -0
  91. package/src/core/commands/session/resume.md +166 -0
  92. package/src/core/commands/session/status.md +166 -0
  93. package/src/core/commands/skill/create.md +115 -17
  94. package/src/core/commands/skill/delete.md +117 -0
  95. package/src/core/commands/skill/edit.md +104 -0
  96. package/src/core/commands/skill/list.md +128 -0
  97. package/src/core/commands/skill/test.md +135 -0
  98. package/src/core/commands/skill/upgrade.md +542 -0
  99. package/src/core/commands/sprint.md +17 -1
  100. package/src/core/commands/status.md +133 -21
  101. package/src/core/commands/story/list.md +176 -0
  102. package/src/core/commands/story/view.md +265 -0
  103. package/src/core/commands/story-validate.md +101 -1
  104. package/src/core/commands/story.md +204 -51
  105. package/src/core/commands/template.md +16 -1
  106. package/src/core/commands/tests.md +226 -64
  107. package/src/core/commands/update.md +17 -1
  108. package/src/core/commands/validate-expertise.md +16 -0
  109. package/src/core/commands/velocity.md +140 -36
  110. package/src/core/commands/verify.md +14 -0
  111. package/src/core/commands/whats-new.md +30 -0
  112. package/src/core/skills/_learnings/README.md +91 -0
  113. package/src/core/skills/_learnings/_template.yaml +106 -0
  114. package/src/core/skills/_learnings/commit.yaml +69 -0
  115. package/src/core/templates/damage-control-patterns.yaml +234 -0
  116. package/src/core/templates/skill-template.md +53 -11
  117. package/tools/cli/commands/list.js +3 -1
  118. package/tools/cli/commands/start.js +180 -0
  119. package/tools/cli/commands/uninstall.js +4 -5
  120. package/tools/cli/commands/update.js +11 -3
  121. package/tools/cli/lib/content-injector.js +6 -1
  122. package/tools/cli/tui/Dashboard.js +66 -0
  123. package/tools/cli/tui/StoryList.js +69 -0
  124. package/tools/cli/tui/index.js +16 -0
@@ -1,6 +1,22 @@
1
1
  ---
2
2
  description: Update story status and progress
3
3
  argument-hint: STORY=<US-ID> STATUS=<status> [SUMMARY=<text>] [PR=<url>] [TO=<agent-id>]
4
+ compact_context:
5
+ priority: high
6
+ preserve_rules:
7
+ - "ACTIVE COMMAND: /agileflow:status - Status updater broadcasting to message bus"
8
+ - "MUST update docs/09-agents/status.json (use jq or Edit tool, never echo/cat >)"
9
+ - "MUST validate JSON after modification (jq empty check)"
10
+ - "MUST append bus message to docs/09-agents/bus/log.jsonl"
11
+ - "MUST use AskUserQuestion for user confirmation (YES/NO format)"
12
+ - "MUST show diff preview before confirming (diff-first pattern)"
13
+ - "Status values: ready|in-progress|blocked|in-review|done"
14
+ - "MUST escape user text automatically (jq handles escaping)"
15
+ state_fields:
16
+ - story_id
17
+ - current_status
18
+ - new_status
19
+ - pr_url
4
20
  ---
5
21
 
6
22
  # status
@@ -33,30 +49,112 @@ This gathers git status, stories/epics, session state, and registers for PreComp
33
49
  ---
34
50
 
35
51
  <!-- COMPACT_SUMMARY_START -->
36
- ## Compact Summary
37
- - **Command**: /agileflow:status
38
- - **Purpose**: Update story status and broadcast to agents
39
- - **Arguments**: STORY=<US-ID> STATUS=<status> [SUMMARY=<text>] [PR=<url>] [TO=<agent-id>]
40
- - **Status Values**: in-progress, blocked, in-review, done
41
- - **Key Actions**:
42
- 1. Update docs/09-agents/status.json (status, summary, last_update, pr)
43
- 2. Validate JSON after update using jq
44
- 3. Append bus line to docs/09-agents/bus/log.jsonl
45
- - **JSON Safety**: ALWAYS use jq or Edit tool (never echo/cat > status.json)
46
- - **Validation**: Run jq empty check after ANY modification
47
- - **Bus Message**: {ts, from, to, type:"status", story, text}
48
- - **Backup**: Restore from docs/09-agents/status.json.backup if validation fails
49
- - **Output**: Diff-first, then YES/NO confirmation
50
- - **Critical**: User text automatically escaped by jq
51
- - **Related**: docs/09-agents/status.json, bus/log.jsonl
52
-
53
- **Tool Usage Examples**:
54
-
55
- AskUserQuestion:
52
+
53
+ ## ⚠️ COMPACT SUMMARY - /agileflow:status IS ACTIVE
54
+
55
+ **CRITICAL**: You update story status and broadcast to agents. This command updates core project state.
56
+
57
+ ---
58
+
59
+ ### 🚨 RULE #1: ALWAYS Use jq or Edit Tool (NEVER echo/cat >)
60
+
61
+ **REQUIRED**:
62
+ - ALWAYS use jq for status.json updates (prevents corruption)
63
+ - ALWAYS validate after modification:
64
+ ```bash
65
+ if ! jq empty docs/09-agents/status.json 2>/dev/null; then
66
+ echo "❌ ERROR: status.json is now invalid JSON!"
67
+ exit 1
68
+ fi
69
+ ```
70
+
71
+ ### 🚨 RULE #2: ALWAYS Show Diff Preview Before Confirming
72
+
73
+ **Workflow**:
74
+ 1. Parse inputs (STORY, STATUS, SUMMARY, PR, TO)
75
+ 2. Prepare status.json update
76
+ 3. Show diff of changes
77
+ 4. Ask YES/NO confirmation
78
+ 5. Only on YES: Execute update + append bus message
79
+
80
+ ### 🚨 RULE #3: VALID STATUS VALUES ONLY
81
+
82
+ Status must be one of:
83
+ - `ready` - Story ready to start
84
+ - `in-progress` - Currently being worked on
85
+ - `blocked` - Waiting on dependency
86
+ - `in-review` - Code review/PR in progress
87
+ - `done` - Completed and verified
88
+
89
+ ---
90
+
91
+ ## Key Files & Actions
92
+
93
+ **Input Parameters**:
94
+ ```
95
+ STORY=<US-ID> # e.g., US-0042 (required)
96
+ STATUS=<status> # ready|in-progress|blocked|in-review|done (required)
97
+ SUMMARY=<text> # 1-2 lines explaining status (optional)
98
+ PR=<url> # Pull request URL for in-review (optional)
99
+ TO=<agent-id> # Recipient agent for bus message (optional)
100
+ ```
101
+
102
+ **Update status.json**:
103
+ ```json
104
+ {
105
+ "stories": {
106
+ "US-0042": {
107
+ "status": "in-progress",
108
+ "summary": "Started work on login form",
109
+ "pr": "https://github.com/.../pull/42",
110
+ "last_update": "ISO-timestamp"
111
+ }
112
+ }
113
+ }
114
+ ```
115
+
116
+ **Append to bus/log.jsonl**:
117
+ ```json
118
+ {"ts":"ISO-timestamp","from":"SYSTEM","to":"<TO or ALL>","type":"status","story":"<STORY>","status":"<STATUS>","text":"<SUMMARY>"}
119
+ ```
120
+
121
+ ---
122
+
123
+ ## Anti-Patterns & Correct Usage
124
+
125
+ ❌ **DON'T**:
126
+ - Use echo or cat to write to status.json
127
+ - Skip validation after JSON changes
128
+ - Use invalid status values (e.g., "in_progress")
129
+ - Forget to show diff before confirming
130
+ - Let user text corrupt JSON (use jq escaping)
131
+
132
+ ✅ **DO**:
133
+ - Use jq for all JSON operations
134
+ - Validate with `jq empty` after every write
135
+ - Use only valid status values
136
+ - Show diff preview before confirmation
137
+ - Let jq handle text escaping automatically
138
+
139
+ ---
140
+
141
+ ## Confirmation Flow
142
+
143
+ 1. **Show diff preview**:
144
+ ```
145
+ docs/09-agents/status.json
146
+
147
+ - "status": "ready",
148
+ + "status": "in-progress",
149
+ + "summary": "Started work on login form",
150
+ + "pr": "https://github.com/.../pull/42",
151
+ ```
152
+
153
+ 2. **Ask confirmation**:
56
154
  ```xml
57
155
  <invoke name="AskUserQuestion">
58
156
  <parameter name="questions">[{
59
- "question": "Update US-0042 to in-review?",
157
+ "question": "Update US-0042 to in-progress?",
60
158
  "header": "Confirm Status Update",
61
159
  "multiSelect": false,
62
160
  "options": [
@@ -67,6 +165,20 @@ AskUserQuestion:
67
165
  </invoke>
68
166
  ```
69
167
 
168
+ 3. **On YES**: Execute update + validate JSON + append bus message
169
+ 4. **On NO**: Abort without changes
170
+
171
+ ---
172
+
173
+ ## REMEMBER AFTER COMPACTION
174
+
175
+ - Updates status.json (uses jq for safety)
176
+ - Broadcasts to agents via bus/log.jsonl
177
+ - ALWAYS validate JSON after modification
178
+ - ALWAYS show diff before confirming
179
+ - Status values: ready, in-progress, blocked, in-review, done
180
+ - Text escaping handled automatically by jq
181
+
70
182
  <!-- COMPACT_SUMMARY_END -->
71
183
 
72
184
  ---
@@ -0,0 +1,176 @@
1
+ ---
2
+ description: List all stories with status and filters
3
+ argument-hint: [EPIC=<EP-ID>] [STATUS=<status>] [OWNER=<id>]
4
+ ---
5
+
6
+ # /agileflow:story:list
7
+
8
+ Display all user stories with filtering and quick actions.
9
+
10
+ ---
11
+
12
+ ## Purpose
13
+
14
+ Shows all stories from `docs/09-agents/status.json` with:
15
+ - Status (ready, in_progress, blocked, done)
16
+ - Epic grouping
17
+ - Owner assignment
18
+ - Quick action options
19
+
20
+ **This is a read-only command** - no files are written.
21
+
22
+ ---
23
+
24
+ <!-- COMPACT_SUMMARY_START -->
25
+ ## Compact Summary
26
+
27
+ **Command**: `/agileflow:story:list [EPIC=<EP-ID>] [STATUS=<status>] [OWNER=<id>]`
28
+ **Purpose**: Display stories with filters and offer quick actions
29
+
30
+ ### Flow
31
+ 1. Read status.json
32
+ 2. Apply filters (epic, status, owner)
33
+ 3. Display formatted table
34
+ 4. Offer actions: view details, start work, create new
35
+
36
+ ### Critical Rules
37
+ - **Read-only**: No file writes
38
+ - **Always offer actions**: End with AskUserQuestion for next steps
39
+ - **Group by epic**: Show stories organized by their parent epic
40
+ <!-- COMPACT_SUMMARY_END -->
41
+
42
+ ---
43
+
44
+ ## Arguments
45
+
46
+ | Argument | Required | Description |
47
+ |----------|----------|-------------|
48
+ | EPIC | No | Filter by epic (e.g., EP-0001) |
49
+ | STATUS | No | Filter by status (ready, in_progress, blocked, done) |
50
+ | OWNER | No | Filter by owner |
51
+
52
+ ---
53
+
54
+ ## IMMEDIATE ACTIONS
55
+
56
+ Upon invocation, execute these steps:
57
+
58
+ ### Step 1: Read Status File
59
+
60
+ ```bash
61
+ cat docs/09-agents/status.json
62
+ ```
63
+
64
+ ### Step 2: Apply Filters
65
+
66
+ If filters provided:
67
+ - EPIC: Show only stories in that epic
68
+ - STATUS: Show only stories with that status
69
+ - OWNER: Show only stories assigned to that owner
70
+
71
+ ### Step 3: Display Stories
72
+
73
+ Format output as table grouped by epic:
74
+
75
+ ```markdown
76
+ ## Stories
77
+
78
+ ### EP-0001: Authentication System
79
+ | Story | Title | Status | Owner | Estimate |
80
+ |-------|-------|--------|-------|----------|
81
+ | US-0001 | Login form | done | AG-UI | 2h |
82
+ | US-0002 | Password reset | in_progress | AG-API | 3h |
83
+ | US-0003 | Session management | ready | AG-API | 4h |
84
+
85
+ ### EP-0002: User Dashboard
86
+ | Story | Title | Status | Owner | Estimate |
87
+ |-------|-------|--------|-------|----------|
88
+ | US-0004 | Dashboard layout | ready | AG-UI | 2h |
89
+ | US-0005 | Activity feed | ready | AG-UI | 3h |
90
+
91
+ ---
92
+ **Summary**: 5 stories (1 done, 1 in_progress, 3 ready)
93
+ ```
94
+
95
+ ### Step 4: Offer Actions
96
+
97
+ ```xml
98
+ <invoke name="AskUserQuestion">
99
+ <parameter name="questions">[{
100
+ "question": "What would you like to do?",
101
+ "header": "Actions",
102
+ "multiSelect": false,
103
+ "options": [
104
+ {"label": "View story details", "description": "See full story with acceptance criteria"},
105
+ {"label": "Start working on a story", "description": "Mark a ready story as in_progress"},
106
+ {"label": "Create new story", "description": "Add a new story to an epic"},
107
+ {"label": "Done", "description": "Exit"}
108
+ ]
109
+ }]</parameter>
110
+ </invoke>
111
+ ```
112
+
113
+ **If "View story details"**:
114
+ ```xml
115
+ <invoke name="AskUserQuestion">
116
+ <parameter name="questions">[{
117
+ "question": "Which story would you like to view?",
118
+ "header": "Select",
119
+ "multiSelect": false,
120
+ "options": [
121
+ {"label": "US-0003: Session management (ready)", "description": "EP-0001 - AG-API"},
122
+ {"label": "US-0004: Dashboard layout (ready)", "description": "EP-0002 - AG-UI"},
123
+ {"label": "US-0005: Activity feed (ready)", "description": "EP-0002 - AG-UI"}
124
+ ]
125
+ }]</parameter>
126
+ </invoke>
127
+ ```
128
+
129
+ Then invoke: `/agileflow:story:view STORY=<selected>`
130
+
131
+ **If "Start working on a story"**:
132
+ Show only `ready` stories, then invoke:
133
+ `/agileflow:status <selected> STATUS=in_progress`
134
+
135
+ **If "Create new story"**:
136
+ Invoke: `/agileflow:story`
137
+
138
+ ---
139
+
140
+ ## Example Usage
141
+
142
+ ```bash
143
+ # List all stories
144
+ /agileflow:story:list
145
+
146
+ # List stories for specific epic
147
+ /agileflow:story:list EPIC=EP-0001
148
+
149
+ # List only ready stories
150
+ /agileflow:story:list STATUS=ready
151
+
152
+ # List stories assigned to specific owner
153
+ /agileflow:story:list OWNER=AG-UI
154
+
155
+ # Combined filters
156
+ /agileflow:story:list EPIC=EP-0001 STATUS=ready
157
+ ```
158
+
159
+ ---
160
+
161
+ ## Rules
162
+
163
+ - **Read-only**: No file writes
164
+ - **Group by epic**: Always organize stories under their parent epic
165
+ - **Show summary**: Include counts by status at the bottom
166
+ - **Always offer actions**: End with next step options
167
+
168
+ ---
169
+
170
+ ## Related Commands
171
+
172
+ - `/agileflow:story:view` - View full story details
173
+ - `/agileflow:story` - Create new story
174
+ - `/agileflow:story-validate` - Validate story completeness
175
+ - `/agileflow:status` - Update story status
176
+ - `/agileflow:board` - Visual kanban board view
@@ -0,0 +1,265 @@
1
+ ---
2
+ description: View story details with contextual actions
3
+ argument-hint: STORY=<US-ID>
4
+ ---
5
+
6
+ # /agileflow:story:view
7
+
8
+ View full story details and take contextual actions based on story state.
9
+
10
+ ---
11
+
12
+ ## Purpose
13
+
14
+ Displays complete story information and offers **context-aware actions** based on the story's current status:
15
+ - **ready** → Start work, validate, assign
16
+ - **in_progress** → View progress, mark blocked, complete
17
+ - **blocked** → View blockers, unblock, reassign
18
+ - **done** → View summary, reopen if needed
19
+
20
+ ---
21
+
22
+ <!-- COMPACT_SUMMARY_START -->
23
+ ## Compact Summary
24
+
25
+ **Command**: `/agileflow:story:view STORY=<US-ID>`
26
+ **Purpose**: View story details with context-aware action suggestions
27
+
28
+ ### Flow
29
+ 1. Read story file and status.json entry
30
+ 2. Display full story details (AC, tests, progress)
31
+ 3. Offer actions based on current status
32
+ 4. Execute selected action
33
+
34
+ ### Critical Rules
35
+ - **Context-aware actions**: Different options based on story status
36
+ - **Show everything**: AC, test status, dependencies, blockers
37
+ - **Always offer next steps**: End with relevant AskUserQuestion
38
+ <!-- COMPACT_SUMMARY_END -->
39
+
40
+ ---
41
+
42
+ ## Arguments
43
+
44
+ | Argument | Required | Description |
45
+ |----------|----------|-------------|
46
+ | STORY | Yes | Story ID (e.g., US-0042) |
47
+
48
+ ---
49
+
50
+ ## IMMEDIATE ACTIONS
51
+
52
+ Upon invocation, execute these steps:
53
+
54
+ ### Step 1: Validate Input
55
+
56
+ If STORY not provided, list recent stories:
57
+
58
+ ```xml
59
+ <invoke name="AskUserQuestion">
60
+ <parameter name="questions">[{
61
+ "question": "Which story would you like to view?",
62
+ "header": "Select",
63
+ "multiSelect": false,
64
+ "options": [
65
+ {"label": "US-0042: Latest story", "description": "in_progress - AG-UI"},
66
+ {"label": "US-0041: Previous story", "description": "ready - AG-API"},
67
+ {"label": "Show all stories", "description": "View full story list"}
68
+ ]
69
+ }]</parameter>
70
+ </invoke>
71
+ ```
72
+
73
+ ### Step 2: Read Story Data
74
+
75
+ Read from multiple sources:
76
+
77
+ ```bash
78
+ # Story file
79
+ cat docs/06-stories/<EPIC>/<STORY>-*.md
80
+
81
+ # Status entry
82
+ cat docs/09-agents/status.json | jq '.stories["<STORY>"]'
83
+
84
+ # Test status (if exists)
85
+ cat docs/07-testing/test-cases/<STORY>.md
86
+ ```
87
+
88
+ ### Step 3: Display Story Details
89
+
90
+ ```markdown
91
+ ## US-0042: User Login Form
92
+
93
+ **Epic**: EP-0001 (Authentication System)
94
+ **Status**: in_progress
95
+ **Owner**: AG-UI
96
+ **Estimate**: 3h
97
+ **Created**: 2024-12-28
98
+ **Updated**: 2024-12-30
99
+
100
+ ---
101
+
102
+ ### Acceptance Criteria
103
+
104
+ - [x] Given a user on the login page
105
+ When they enter valid credentials
106
+ Then they are redirected to dashboard
107
+
108
+ - [ ] Given a user on the login page
109
+ When they enter invalid credentials
110
+ Then they see an error message
111
+
112
+ - [ ] Given a user on the login page
113
+ When they click "Forgot Password"
114
+ Then they are taken to password reset flow
115
+
116
+ ---
117
+
118
+ ### Dependencies
119
+
120
+ - US-0040: API authentication endpoint (done)
121
+ - US-0041: Session management (ready) ⚠️ Not started yet
122
+
123
+ ---
124
+
125
+ ### Test Status
126
+
127
+ | Test | Status |
128
+ |------|--------|
129
+ | Unit: LoginForm.test.tsx | passing |
130
+ | Integration: auth-flow.test.ts | pending |
131
+ | E2E: login.spec.ts | not created |
132
+
133
+ ---
134
+
135
+ ### Progress Notes
136
+
137
+ - 2024-12-30: Started form implementation
138
+ - 2024-12-29: Design approved
139
+ ```
140
+
141
+ ### Step 4: Offer Context-Aware Actions
142
+
143
+ **Based on story status, show different options:**
144
+
145
+ #### If STATUS = ready
146
+
147
+ ```xml
148
+ <invoke name="AskUserQuestion">
149
+ <parameter name="questions">[{
150
+ "question": "This story is ready to start. What would you like to do?",
151
+ "header": "Actions",
152
+ "multiSelect": false,
153
+ "options": [
154
+ {"label": "Start working on this story (Recommended)", "description": "Mark as in_progress and begin implementation"},
155
+ {"label": "Validate story first", "description": "Check if AC and dependencies are complete"},
156
+ {"label": "View related research", "description": "Find research notes linked to this epic"},
157
+ {"label": "Back to story list", "description": "Return to /agileflow:story:list"}
158
+ ]
159
+ }]</parameter>
160
+ </invoke>
161
+ ```
162
+
163
+ **If "Start working"**:
164
+ - Run `/agileflow:status <STORY> STATUS=in_progress`
165
+ - Suggest: "Enter plan mode to explore implementation?"
166
+
167
+ #### If STATUS = in_progress
168
+
169
+ ```xml
170
+ <invoke name="AskUserQuestion">
171
+ <parameter name="questions">[{
172
+ "question": "This story is in progress. What would you like to do?",
173
+ "header": "Actions",
174
+ "multiSelect": false,
175
+ "options": [
176
+ {"label": "Mark as complete", "description": "All AC done, move to done status"},
177
+ {"label": "Mark as blocked", "description": "Hit a blocker, need help"},
178
+ {"label": "View/run tests", "description": "Check test status for this story"},
179
+ {"label": "Add progress note", "description": "Document current progress"}
180
+ ]
181
+ }]</parameter>
182
+ </invoke>
183
+ ```
184
+
185
+ **If "Mark as complete"**:
186
+ - First ask: "Have all acceptance criteria been met?"
187
+ - If yes: Run `/agileflow:status <STORY> STATUS=done`
188
+ - Suggest: "View next ready story?"
189
+
190
+ **If "Mark as blocked"**:
191
+ - Ask: "What is blocking this story?"
192
+ - Run `/agileflow:status <STORY> STATUS=blocked BLOCKER=<reason>`
193
+ - Suggest: "Create blocker resolution task?"
194
+
195
+ #### If STATUS = blocked
196
+
197
+ ```xml
198
+ <invoke name="AskUserQuestion">
199
+ <parameter name="questions">[{
200
+ "question": "This story is blocked. What would you like to do?",
201
+ "header": "Actions",
202
+ "multiSelect": false,
203
+ "options": [
204
+ {"label": "View blocker details", "description": "See what's blocking this story"},
205
+ {"label": "Unblock and resume", "description": "Blocker resolved, continue work"},
206
+ {"label": "Reassign story", "description": "Assign to different owner"},
207
+ {"label": "Create research task", "description": "Need to research the blocker"}
208
+ ]
209
+ }]</parameter>
210
+ </invoke>
211
+ ```
212
+
213
+ **If "Unblock and resume"**:
214
+ - Run `/agileflow:status <STORY> STATUS=in_progress`
215
+ - Clear blocker note
216
+
217
+ #### If STATUS = done
218
+
219
+ ```xml
220
+ <invoke name="AskUserQuestion">
221
+ <parameter name="questions">[{
222
+ "question": "This story is complete. What would you like to do?",
223
+ "header": "Actions",
224
+ "multiSelect": false,
225
+ "options": [
226
+ {"label": "View completion summary", "description": "See what was delivered"},
227
+ {"label": "Reopen story", "description": "Found issue, needs more work"},
228
+ {"label": "View next story in epic", "description": "Continue with related work"},
229
+ {"label": "Back to story list", "description": "Return to /agileflow:story:list"}
230
+ ]
231
+ }]</parameter>
232
+ </invoke>
233
+ ```
234
+
235
+ ---
236
+
237
+ ## Example Usage
238
+
239
+ ```bash
240
+ # View specific story
241
+ /agileflow:story:view STORY=US-0042
242
+
243
+ # Will prompt for selection if no ID
244
+ /agileflow:story:view
245
+ ```
246
+
247
+ ---
248
+
249
+ ## Rules
250
+
251
+ - **Context-aware**: Actions must match current story status
252
+ - **Show everything**: AC, tests, dependencies, blockers, notes
253
+ - **Always offer next steps**: End with relevant action options
254
+ - **Connect to related commands**: Link to status, validate, tests, research
255
+
256
+ ---
257
+
258
+ ## Related Commands
259
+
260
+ - `/agileflow:story:list` - View all stories
261
+ - `/agileflow:story` - Create new story
262
+ - `/agileflow:story-validate` - Validate story completeness
263
+ - `/agileflow:status` - Update story status
264
+ - `/agileflow:tests` - Run/view tests
265
+ - `/agileflow:research:analyze` - Analyze related research