agileflow 2.36.2 → 2.37.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 +64 -64
- package/package.json +1 -1
- package/src/core/agents/accessibility.md +14 -14
- package/src/core/agents/adr-writer.md +5 -5
- package/src/core/agents/analytics.md +14 -14
- package/src/core/agents/api.md +22 -22
- package/src/core/agents/ci.md +20 -20
- package/src/core/agents/compliance.md +14 -14
- package/src/core/agents/configuration/archival.md +1 -1
- package/src/core/agents/configuration/ci.md +3 -3
- package/src/core/agents/configuration/hooks.md +1 -1
- package/src/core/agents/configuration/status-line.md +420 -0
- package/src/core/agents/database.md +18 -18
- package/src/core/agents/datamigration.md +14 -14
- package/src/core/agents/design.md +14 -14
- package/src/core/agents/devops.md +38 -38
- package/src/core/agents/documentation.md +4 -4
- package/src/core/agents/epic-planner.md +7 -7
- package/src/core/agents/integrations.md +17 -17
- package/src/core/agents/mentor.md +33 -33
- package/src/core/agents/mobile.md +15 -15
- package/src/core/agents/monitoring.md +14 -14
- package/src/core/agents/performance.md +16 -16
- package/src/core/agents/product.md +6 -6
- package/src/core/agents/qa.md +14 -14
- package/src/core/agents/readme-updater.md +2 -2
- package/src/core/agents/refactor.md +16 -16
- package/src/core/agents/security.md +20 -20
- package/src/core/agents/testing.md +16 -16
- package/src/core/agents/ui.md +23 -23
- package/src/core/commands/adr.md +5 -4
- package/src/core/commands/agent.md +1 -0
- package/src/core/commands/auto.md +1 -1
- package/src/core/commands/babysit.md +141 -70
- package/src/core/commands/baseline.md +34 -16
- package/src/core/commands/blockers.md +7 -7
- package/src/core/commands/board.md +1 -1
- package/src/core/commands/changelog.md +15 -9
- package/src/core/commands/compress.md +23 -5
- package/src/core/commands/configure.md +44 -9
- package/src/core/commands/context.md +6 -6
- package/src/core/commands/debt.md +1 -1
- package/src/core/commands/deps.md +10 -10
- package/src/core/commands/diagnose.md +11 -1
- package/src/core/commands/docs.md +2 -1
- package/src/core/commands/handoff.md +1 -0
- package/src/core/commands/help.md +9 -0
- package/src/core/commands/impact.md +2 -1
- package/src/core/commands/metrics.md +12 -12
- package/src/core/commands/multi-expert.md +1 -1
- package/src/core/commands/packages.md +12 -12
- package/src/core/commands/pr.md +1 -0
- package/src/core/commands/readme-sync.md +59 -87
- package/src/core/commands/retro.md +12 -12
- package/src/core/commands/review.md +2 -1
- package/src/core/commands/session/end.md +8 -8
- package/src/core/commands/session/history.md +13 -13
- package/src/core/commands/session/init.md +16 -16
- package/src/core/commands/session/resume.md +17 -17
- package/src/core/commands/session/status.md +14 -14
- package/src/core/commands/sprint.md +5 -5
- package/src/core/commands/story-validate.md +4 -3
- package/src/core/commands/story.md +1 -0
- package/src/core/commands/template.md +3 -3
- package/src/core/commands/tests.md +15 -0
- package/src/core/commands/update.md +1 -1
- package/src/core/commands/velocity.md +2 -2
- package/src/core/commands/verify.md +27 -9
- package/src/core/skills/agileflow-tech-debt/SKILL.md +2 -2
- package/src/core/templates/README-template.md +1 -1
- package/src/core/templates/agent-profile-template.md +1 -1
- package/src/core/templates/agileflow-statusline.sh +161 -0
- package/src/core/templates/claude-settings.advanced.example.json +2 -2
- package/src/core/templates/claude-settings.example.json +1 -1
- package/src/core/templates/resume-session.sh +2 -2
- package/src/core/templates/worktrees-guide.md +11 -11
- package/tools/cli/commands/config.js +1 -1
- package/tools/cli/commands/doctor.js +1 -1
- package/tools/cli/commands/status.js +1 -1
- package/tools/cli/commands/uninstall.js +1 -1
- package/tools/cli/installers/ide/claude-code.js +1 -1
- package/tools/cli/installers/ide/cursor.js +2 -2
- package/tools/cli/lib/content-injector.js +1 -1
- package/tools/cli/lib/docs-setup.js +22 -32
- package/tools/postinstall.js +1 -1
|
@@ -5,7 +5,7 @@ argument-hint: (no arguments)
|
|
|
5
5
|
|
|
6
6
|
# Session Status
|
|
7
7
|
|
|
8
|
-
You are running the `/
|
|
8
|
+
You are running the `/agileflow:session:status` command to view a quick snapshot of the current session state, including what you're working on, session duration, uncommitted changes, and test status.
|
|
9
9
|
|
|
10
10
|
## Command Purpose
|
|
11
11
|
|
|
@@ -25,7 +25,7 @@ Read from `docs/09-agents/session-state.json`:
|
|
|
25
25
|
if [ ! -f "docs/09-agents/session-state.json" ]; then
|
|
26
26
|
echo "⚠️ No active session"
|
|
27
27
|
echo ""
|
|
28
|
-
echo "Run /
|
|
28
|
+
echo "Run /agileflow:session:resume to start a session"
|
|
29
29
|
exit 0
|
|
30
30
|
fi
|
|
31
31
|
```
|
|
@@ -114,9 +114,9 @@ Command: npm test
|
|
|
114
114
|
⚡ Quick Actions
|
|
115
115
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
116
116
|
|
|
117
|
-
• Run tests: /
|
|
118
|
-
• End session: /
|
|
119
|
-
• View full context: /
|
|
117
|
+
• Run tests: /agileflow:verify
|
|
118
|
+
• End session: /agileflow:session:end
|
|
119
|
+
• View full context: /agileflow:session:resume
|
|
120
120
|
• View story: docs/06-stories/EP-0001/US-0043.md
|
|
121
121
|
|
|
122
122
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
@@ -139,7 +139,7 @@ For a shorter output, show minimal info:
|
|
|
139
139
|
No session is currently tracked.
|
|
140
140
|
|
|
141
141
|
To start a session:
|
|
142
|
-
/
|
|
142
|
+
/agileflow:session:resume
|
|
143
143
|
|
|
144
144
|
This will:
|
|
145
145
|
• Run environment initialization
|
|
@@ -171,7 +171,7 @@ Ready stories (5):
|
|
|
171
171
|
• US-0047: Add user roles
|
|
172
172
|
• US-0048: Implement audit logging
|
|
173
173
|
|
|
174
|
-
Assign a story: /
|
|
174
|
+
Assign a story: /agileflow:assign STORY=US-0044
|
|
175
175
|
|
|
176
176
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
177
177
|
```
|
|
@@ -196,7 +196,7 @@ Failed tests:
|
|
|
196
196
|
❌ auth.test.ts:42 - Session redirect
|
|
197
197
|
❌ auth.test.ts:67 - Token persistence
|
|
198
198
|
|
|
199
|
-
Run /
|
|
199
|
+
Run /agileflow:verify to see full output
|
|
200
200
|
|
|
201
201
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
202
202
|
```
|
|
@@ -215,7 +215,7 @@ Duration: 8h 15m
|
|
|
215
215
|
Consider:
|
|
216
216
|
• Taking a break
|
|
217
217
|
• Committing your work
|
|
218
|
-
• Running /
|
|
218
|
+
• Running /agileflow:session:end to save progress
|
|
219
219
|
|
|
220
220
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
221
221
|
```
|
|
@@ -224,10 +224,10 @@ Consider:
|
|
|
224
224
|
|
|
225
225
|
| Command | Purpose |
|
|
226
226
|
|---------|---------|
|
|
227
|
-
| `/
|
|
228
|
-
| `/
|
|
229
|
-
| `/
|
|
230
|
-
| `/
|
|
227
|
+
| `/agileflow:session:init` | One-time setup of session harness |
|
|
228
|
+
| `/agileflow:session:resume` | Start session with full verification |
|
|
229
|
+
| `/agileflow:session:end` | Cleanly end session and record summary |
|
|
230
|
+
| `/agileflow:session:history` | View past session history and metrics |
|
|
231
231
|
|
|
232
232
|
## Integration Points
|
|
233
233
|
|
|
@@ -237,7 +237,7 @@ Consider:
|
|
|
237
237
|
- Git status - Uncommitted changes
|
|
238
238
|
|
|
239
239
|
### Does NOT
|
|
240
|
-
- Run tests (use `/
|
|
240
|
+
- Run tests (use `/agileflow:verify` for that)
|
|
241
241
|
- Modify any files
|
|
242
242
|
- Start a new session
|
|
243
243
|
|
|
@@ -451,7 +451,7 @@ Committed: X stories, Y.Z estimated days (Y% of capacity)
|
|
|
451
451
|
1. Sequence stories: US-0043 (AG-API) → US-0042 (AG-UI) → US-0050 (AG-CI)
|
|
452
452
|
2. Daily standup focus: AG-API unblocking AG-UI (check /blockers)
|
|
453
453
|
3. Mid-sprint checkpoint: Day 5 - assess if US-0055 can be added
|
|
454
|
-
4. End-of-sprint: Run /
|
|
454
|
+
4. End-of-sprint: Run /agileflow:velocity to update historical data
|
|
455
455
|
|
|
456
456
|
📅 SPRINT TIMELINE
|
|
457
457
|
------------------
|
|
@@ -466,11 +466,11 @@ Definition of Done:
|
|
|
466
466
|
✅ Demo prepared for stakeholders
|
|
467
467
|
|
|
468
468
|
Next Steps:
|
|
469
|
-
${MODE == "suggest" && "1. Review commitment and run /
|
|
469
|
+
${MODE == "suggest" && "1. Review commitment and run /agileflow:sprint-plan MODE=commit to finalize"}
|
|
470
470
|
${MODE == "commit" && "1. ✅ Sprint committed! Stories updated in status.json"}
|
|
471
|
-
2. Assign first stories: /
|
|
472
|
-
3. Monitor progress: /
|
|
473
|
-
4. Track blockers: /
|
|
471
|
+
2. Assign first stories: /agileflow:assign STORY=US-0043 (highest priority)
|
|
472
|
+
3. Monitor progress: /agileflow:board
|
|
473
|
+
4. Track blockers: /agileflow:blockers
|
|
474
474
|
```
|
|
475
475
|
|
|
476
476
|
RULES
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Validate story completeness before development
|
|
3
|
+
argument-hint: STORY=<US-ID>
|
|
3
4
|
---
|
|
4
5
|
|
|
5
6
|
# story-validate
|
|
@@ -194,7 +195,7 @@ WORKFLOW
|
|
|
194
195
|
|
|
195
196
|
1. **Story Selection**:
|
|
196
197
|
- Ask user: "Which story would you like to validate? (provide story ID like US-0001)"
|
|
197
|
-
- Or: Auto-detect if run with `/
|
|
198
|
+
- Or: Auto-detect if run with `/agileflow:story-validate US-0001`
|
|
198
199
|
|
|
199
200
|
2. **Load Story File**:
|
|
200
201
|
- Find story file: `docs/06-stories/*/{{STORY_ID}}*.md`
|
|
@@ -217,7 +218,7 @@ WORKFLOW
|
|
|
217
218
|
- Determine if story is "ready for development"
|
|
218
219
|
|
|
219
220
|
5. **Next Steps Recommendation**:
|
|
220
|
-
- If "ready": "Story is ready for development. Assign to owner with /
|
|
221
|
+
- If "ready": "Story is ready for development. Assign to owner with /agileflow:assign"
|
|
221
222
|
- If warnings: "Story has X warnings. Consider addressing before assigning."
|
|
222
223
|
- If failed: "Story needs X critical fixes before development can start"
|
|
223
224
|
|
|
@@ -234,7 +235,7 @@ FIRST ACTION
|
|
|
234
235
|
|
|
235
236
|
When invoked:
|
|
236
237
|
1. Ask user: "Which story would you like to validate? (e.g., US-0001)"
|
|
237
|
-
2. Or parse story ID from command: `/
|
|
238
|
+
2. Or parse story ID from command: `/agileflow:story-validate US-0001`
|
|
238
239
|
3. Load story file
|
|
239
240
|
4. Run all validation checks
|
|
240
241
|
5. Generate comprehensive report
|
|
@@ -105,7 +105,7 @@ Show all available templates:
|
|
|
105
105
|
- incident-report.md (created 2025-10-10)
|
|
106
106
|
- sprint-retro.md (created 2025-10-01)
|
|
107
107
|
|
|
108
|
-
Usage: /
|
|
108
|
+
Usage: /agileflow:custom-template ACTION=use TYPE=custom NAME=meeting-notes
|
|
109
109
|
```
|
|
110
110
|
|
|
111
111
|
### 2. Create Template
|
|
@@ -433,9 +433,9 @@ INTEGRATION
|
|
|
433
433
|
|
|
434
434
|
### Story Creation
|
|
435
435
|
|
|
436
|
-
When `/
|
|
436
|
+
When `/agileflow:story-new` is called, use story-template.md:
|
|
437
437
|
```bash
|
|
438
|
-
/
|
|
438
|
+
/agileflow:story-new EPIC=EP-0001 STORY=US-0050 TITLE="Login form"
|
|
439
439
|
# Internally uses docs/00-meta/templates/story-template.md
|
|
440
440
|
```
|
|
441
441
|
|
|
@@ -10,6 +10,21 @@ Automatically set up testing infrastructure for projects without existing tests.
|
|
|
10
10
|
|
|
11
11
|
ROLE: Test Infrastructure Bootstrapper
|
|
12
12
|
|
|
13
|
+
INPUTS
|
|
14
|
+
FRAMEWORK=<name> jest|mocha|pytest|rspec|go-test|cargo-test (default: auto-detect)
|
|
15
|
+
COVERAGE=yes|no Enable coverage reporting (default: yes)
|
|
16
|
+
E2E=yes|no Include E2E tests (default: no)
|
|
17
|
+
|
|
18
|
+
ACTIONS
|
|
19
|
+
1) Detect language/runtime and framework
|
|
20
|
+
2) Check existing test setup
|
|
21
|
+
3) Install testing framework dependencies
|
|
22
|
+
4) Create test configuration files
|
|
23
|
+
5) Create example tests
|
|
24
|
+
6) Add test scripts to package.json/equivalent
|
|
25
|
+
7) Integrate with CI workflow
|
|
26
|
+
8) Run tests to verify setup
|
|
27
|
+
|
|
13
28
|
TODO LIST TRACKING
|
|
14
29
|
**CRITICAL**: Immediately create a todo list using TodoWrite tool to track test infrastructure setup:
|
|
15
30
|
```
|
|
@@ -334,7 +334,7 @@ Suggest adding to CI:
|
|
|
334
334
|
runs-on: ubuntu-latest
|
|
335
335
|
steps:
|
|
336
336
|
- name: Generate update
|
|
337
|
-
run: npx claude-code /
|
|
337
|
+
run: npx claude-code /agileflow:stakeholder-update PERIOD=week
|
|
338
338
|
|
|
339
339
|
- name: Email stakeholders
|
|
340
340
|
uses: dawidd6/action-send-mail@v3
|
|
@@ -203,7 +203,7 @@ Actual: ● ─ ●
|
|
|
203
203
|
|
|
204
204
|
3. **Long-term**:
|
|
205
205
|
- Maintain 8-10 points/week sustained velocity
|
|
206
|
-
- Reserve 20% for tech debt (/
|
|
206
|
+
- Reserve 20% for tech debt (/agileflow:tech-debt command)
|
|
207
207
|
- Keep story sizes ≤1.5d for predictability
|
|
208
208
|
|
|
209
209
|
---
|
|
@@ -358,7 +358,7 @@ WORKFLOW
|
|
|
358
358
|
INTEGRATION
|
|
359
359
|
|
|
360
360
|
- Save velocity history to docs/08-project/velocity/
|
|
361
|
-
- Update /
|
|
361
|
+
- Update /agileflow:stakeholder-update with velocity data
|
|
362
362
|
- Alert if velocity drops >20% from average
|
|
363
363
|
- Suggest sprint planning capacity based on velocity
|
|
364
364
|
|
|
@@ -5,7 +5,25 @@ argument-hint: [story_id] (optional)
|
|
|
5
5
|
|
|
6
6
|
# Verify Project Tests
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Execute project tests and update test status for stories.
|
|
9
|
+
|
|
10
|
+
## Prompt
|
|
11
|
+
|
|
12
|
+
ROLE: Test Verifier
|
|
13
|
+
|
|
14
|
+
INPUTS
|
|
15
|
+
STORY=<US-ID> Optional - verify specific story (default: all in_progress stories)
|
|
16
|
+
|
|
17
|
+
ACTIONS
|
|
18
|
+
1) Run pre-flight checks (session harness initialized)
|
|
19
|
+
2) Load test configuration from environment.json
|
|
20
|
+
3) Execute test command with timeout
|
|
21
|
+
4) Parse test results (exit code + output)
|
|
22
|
+
5) Update status.json with test_status for target stories
|
|
23
|
+
6) Update session-state.json (if exists)
|
|
24
|
+
7) Generate and display verification report
|
|
25
|
+
|
|
26
|
+
---
|
|
9
27
|
|
|
10
28
|
## Command Purpose
|
|
11
29
|
|
|
@@ -34,8 +52,8 @@ Mark each step complete as you finish it. This ensures nothing is forgotten.
|
|
|
34
52
|
|
|
35
53
|
## Usage
|
|
36
54
|
|
|
37
|
-
- `/
|
|
38
|
-
- `/
|
|
55
|
+
- `/agileflow:verify` - Run all tests, update all `in_progress` stories
|
|
56
|
+
- `/agileflow:verify US-0042` - Run tests and update specific story's test status
|
|
39
57
|
|
|
40
58
|
## Execution Flow
|
|
41
59
|
|
|
@@ -46,7 +64,7 @@ Mark each step complete as you finish it. This ensures nothing is forgotten.
|
|
|
46
64
|
if [ ! -f "docs/00-meta/environment.json" ]; then
|
|
47
65
|
echo "⚠️ Session harness not initialized"
|
|
48
66
|
echo ""
|
|
49
|
-
echo "Run /
|
|
67
|
+
echo "Run /agileflow:session:init to set up test verification"
|
|
50
68
|
exit 1
|
|
51
69
|
fi
|
|
52
70
|
```
|
|
@@ -212,7 +230,7 @@ Updated stories:
|
|
|
212
230
|
|
|
213
231
|
The verify command requires session harness configuration.
|
|
214
232
|
|
|
215
|
-
Run /
|
|
233
|
+
Run /agileflow:session:init to:
|
|
216
234
|
1. Detect your project type and test command
|
|
217
235
|
2. Create environment.json configuration
|
|
218
236
|
3. Enable test verification for all stories
|
|
@@ -247,7 +265,7 @@ Update environment.json if needed.
|
|
|
247
265
|
|
|
248
266
|
File docs/09-agents/status.json is invalid or missing.
|
|
249
267
|
|
|
250
|
-
Run /
|
|
268
|
+
Run /agileflow:setup to initialize AgileFlow structure.
|
|
251
269
|
```
|
|
252
270
|
|
|
253
271
|
### Specific Story Not Found
|
|
@@ -264,8 +282,8 @@ Run without story_id to verify all in_progress stories.
|
|
|
264
282
|
## Integration Points
|
|
265
283
|
|
|
266
284
|
### Used By
|
|
267
|
-
- `/
|
|
268
|
-
- `/
|
|
285
|
+
- `/agileflow:session:resume` - Runs verify as part of session startup
|
|
286
|
+
- `/agileflow:baseline` - Requires passing tests before creating baseline
|
|
269
287
|
- Development agents - Should run verify after implementation
|
|
270
288
|
|
|
271
289
|
### Uses
|
|
@@ -286,4 +304,4 @@ Run without story_id to verify all in_progress stories.
|
|
|
286
304
|
## Example Execution
|
|
287
305
|
|
|
288
306
|
```
|
|
289
|
-
User: /
|
|
307
|
+
User: /agileflow:verify
|
|
@@ -50,8 +50,8 @@ This skill activates when:
|
|
|
50
50
|
- Include: Problem, Impact, Proposed Solution, Effort, Priority Score, Status
|
|
51
51
|
|
|
52
52
|
6. **Suggest actions**:
|
|
53
|
-
- **High priority (>10)**: Create story via `/
|
|
54
|
-
- **Major refactoring**: Document via `/
|
|
53
|
+
- **High priority (>10)**: Create story via `/agileflow:story`
|
|
54
|
+
- **Major refactoring**: Document via `/agileflow:adr-new`
|
|
55
55
|
- **Blocking features**: Update status.json with blocked stories
|
|
56
56
|
|
|
57
57
|
## Tech Debt Item Template
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# AgileFlow Status Line for Claude Code
|
|
3
|
+
# Displays contextual information from status.json and session data
|
|
4
|
+
#
|
|
5
|
+
# This script is called by Claude Code and receives JSON via stdin.
|
|
6
|
+
# Customize this script to change what's displayed in your status line.
|
|
7
|
+
#
|
|
8
|
+
# Available data from stdin JSON:
|
|
9
|
+
# .model.display_name - Model name (Opus, Sonnet, etc.)
|
|
10
|
+
# .cost.total_cost_usd - Session cost in USD
|
|
11
|
+
# .context_window.context_window_size - Total context window size
|
|
12
|
+
# .context_window.current_usage.input_tokens - Current input tokens
|
|
13
|
+
# .workspace.current_dir - Current working directory
|
|
14
|
+
|
|
15
|
+
# Read JSON input from stdin (Claude Code provides this)
|
|
16
|
+
input=$(cat)
|
|
17
|
+
|
|
18
|
+
# Parse model info
|
|
19
|
+
MODEL_DISPLAY=$(echo "$input" | jq -r '.model.display_name // "Claude"')
|
|
20
|
+
|
|
21
|
+
# Parse context usage
|
|
22
|
+
CONTEXT_SIZE=$(echo "$input" | jq -r '.context_window.context_window_size // 200000')
|
|
23
|
+
USAGE=$(echo "$input" | jq '.context_window.current_usage // null')
|
|
24
|
+
|
|
25
|
+
CTX_DISPLAY=""
|
|
26
|
+
if [ "$USAGE" != "null" ]; then
|
|
27
|
+
CURRENT_TOKENS=$(echo "$USAGE" | jq '.input_tokens + (.cache_creation_input_tokens // 0) + (.cache_read_input_tokens // 0)')
|
|
28
|
+
if [ "$CURRENT_TOKENS" != "null" ] && [ "$CURRENT_TOKENS" -gt 0 ] 2>/dev/null; then
|
|
29
|
+
PERCENT_USED=$((CURRENT_TOKENS * 100 / CONTEXT_SIZE))
|
|
30
|
+
CTX_DISPLAY="${PERCENT_USED}% ctx"
|
|
31
|
+
fi
|
|
32
|
+
fi
|
|
33
|
+
|
|
34
|
+
# Parse cost
|
|
35
|
+
TOTAL_COST=$(echo "$input" | jq -r '.cost.total_cost_usd // 0')
|
|
36
|
+
COST_DISPLAY=""
|
|
37
|
+
if [ "$TOTAL_COST" != "0" ] && [ "$TOTAL_COST" != "null" ]; then
|
|
38
|
+
COST_DISPLAY=$(printf '$%.2f' "$TOTAL_COST")
|
|
39
|
+
fi
|
|
40
|
+
|
|
41
|
+
# AgileFlow Status - Read from status.json
|
|
42
|
+
STORY_DISPLAY=""
|
|
43
|
+
EPIC_DISPLAY=""
|
|
44
|
+
NEXT_STORY=""
|
|
45
|
+
WIP_DISPLAY=""
|
|
46
|
+
|
|
47
|
+
if [ -f "docs/09-agents/status.json" ]; then
|
|
48
|
+
STATUS_JSON=$(cat docs/09-agents/status.json 2>/dev/null)
|
|
49
|
+
|
|
50
|
+
# Find first in-progress story and its epic
|
|
51
|
+
STORY_ID=$(echo "$STATUS_JSON" | jq -r '.stories | to_entries | map(select(.value.status == "in-progress")) | .[0].key // empty')
|
|
52
|
+
|
|
53
|
+
if [ -n "$STORY_ID" ] && [ "$STORY_ID" != "null" ]; then
|
|
54
|
+
STORY_TITLE=$(echo "$STATUS_JSON" | jq -r ".stories[\"$STORY_ID\"].title // \"\"")
|
|
55
|
+
EPIC_ID=$(echo "$STATUS_JSON" | jq -r ".stories[\"$STORY_ID\"].epic // \"\"")
|
|
56
|
+
|
|
57
|
+
if [ -n "$STORY_TITLE" ] && [ "$STORY_TITLE" != "null" ]; then
|
|
58
|
+
# Truncate title if too long (max 25 chars)
|
|
59
|
+
if [ ${#STORY_TITLE} -gt 25 ]; then
|
|
60
|
+
STORY_TITLE="${STORY_TITLE:0:22}..."
|
|
61
|
+
fi
|
|
62
|
+
STORY_DISPLAY="${STORY_ID}: ${STORY_TITLE}"
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
# Get epic progress if we have an epic
|
|
66
|
+
if [ -n "$EPIC_ID" ] && [ "$EPIC_ID" != "null" ]; then
|
|
67
|
+
# Count total stories in this epic
|
|
68
|
+
TOTAL_IN_EPIC=$(echo "$STATUS_JSON" | jq "[.stories | to_entries[] | select(.value.epic == \"$EPIC_ID\")] | length")
|
|
69
|
+
# Count done stories in this epic
|
|
70
|
+
DONE_IN_EPIC=$(echo "$STATUS_JSON" | jq "[.stories | to_entries[] | select(.value.epic == \"$EPIC_ID\" and .value.status == \"done\")] | length")
|
|
71
|
+
|
|
72
|
+
if [ "$TOTAL_IN_EPIC" -gt 0 ] 2>/dev/null; then
|
|
73
|
+
EPIC_PCT=$((DONE_IN_EPIC * 100 / TOTAL_IN_EPIC))
|
|
74
|
+
EPIC_DISPLAY="${EPIC_ID}: ${DONE_IN_EPIC}/${TOTAL_IN_EPIC} (${EPIC_PCT}%)"
|
|
75
|
+
fi
|
|
76
|
+
fi
|
|
77
|
+
else
|
|
78
|
+
# No story in-progress - find next READY story (priority: high > medium > low)
|
|
79
|
+
# Look for stories with status "ready" or stories without blockers
|
|
80
|
+
NEXT_ID=$(echo "$STATUS_JSON" | jq -r '
|
|
81
|
+
.stories | to_entries
|
|
82
|
+
| map(select(.value.status == "ready" or .value.status == "backlog" or .value.status == "draft"))
|
|
83
|
+
| sort_by(
|
|
84
|
+
if .value.priority == "high" then 0
|
|
85
|
+
elif .value.priority == "medium" then 1
|
|
86
|
+
else 2
|
|
87
|
+
end
|
|
88
|
+
)
|
|
89
|
+
| .[0].key // empty
|
|
90
|
+
')
|
|
91
|
+
|
|
92
|
+
if [ -n "$NEXT_ID" ] && [ "$NEXT_ID" != "null" ]; then
|
|
93
|
+
NEXT_TITLE=$(echo "$STATUS_JSON" | jq -r ".stories[\"$NEXT_ID\"].title // \"\"")
|
|
94
|
+
NEXT_PRIORITY=$(echo "$STATUS_JSON" | jq -r ".stories[\"$NEXT_ID\"].priority // \"\"")
|
|
95
|
+
if [ ${#NEXT_TITLE} -gt 20 ]; then
|
|
96
|
+
NEXT_TITLE="${NEXT_TITLE:0:17}..."
|
|
97
|
+
fi
|
|
98
|
+
# Add priority indicator
|
|
99
|
+
PRIORITY_ICON=""
|
|
100
|
+
case "$NEXT_PRIORITY" in
|
|
101
|
+
high) PRIORITY_ICON="🔴" ;;
|
|
102
|
+
medium) PRIORITY_ICON="🟡" ;;
|
|
103
|
+
*) PRIORITY_ICON="🟢" ;;
|
|
104
|
+
esac
|
|
105
|
+
NEXT_STORY="${PRIORITY_ICON} Next: ${NEXT_ID}"
|
|
106
|
+
fi
|
|
107
|
+
fi
|
|
108
|
+
|
|
109
|
+
# Calculate WIP count
|
|
110
|
+
WIP_COUNT=$(echo "$STATUS_JSON" | jq '[.stories | to_entries[] | select(.value.status == "in-progress" or .value.status == "in-review")] | length')
|
|
111
|
+
WIP_LIMIT=3 # Default WIP limit
|
|
112
|
+
if [ -n "$WIP_COUNT" ] && [ "$WIP_COUNT" != "null" ]; then
|
|
113
|
+
WIP_DISPLAY="WIP: ${WIP_COUNT}/${WIP_LIMIT}"
|
|
114
|
+
fi
|
|
115
|
+
fi
|
|
116
|
+
|
|
117
|
+
# Get git branch
|
|
118
|
+
GIT_BRANCH=""
|
|
119
|
+
if git rev-parse --git-dir > /dev/null 2>&1; then
|
|
120
|
+
BRANCH=$(git branch --show-current 2>/dev/null)
|
|
121
|
+
if [ -n "$BRANCH" ]; then
|
|
122
|
+
GIT_BRANCH="$BRANCH"
|
|
123
|
+
fi
|
|
124
|
+
fi
|
|
125
|
+
|
|
126
|
+
# Build status line
|
|
127
|
+
OUTPUT="[${MODEL_DISPLAY}]"
|
|
128
|
+
|
|
129
|
+
# Add current story OR next story suggestion
|
|
130
|
+
if [ -n "$STORY_DISPLAY" ]; then
|
|
131
|
+
OUTPUT="${OUTPUT} 📋 ${STORY_DISPLAY}"
|
|
132
|
+
elif [ -n "$NEXT_STORY" ]; then
|
|
133
|
+
OUTPUT="${OUTPUT} ${NEXT_STORY}"
|
|
134
|
+
fi
|
|
135
|
+
|
|
136
|
+
# Add epic progress (if working on a story in an epic)
|
|
137
|
+
if [ -n "$EPIC_DISPLAY" ]; then
|
|
138
|
+
OUTPUT="${OUTPUT} | 📦 ${EPIC_DISPLAY}"
|
|
139
|
+
fi
|
|
140
|
+
|
|
141
|
+
# Add WIP count
|
|
142
|
+
if [ -n "$WIP_DISPLAY" ]; then
|
|
143
|
+
OUTPUT="${OUTPUT} | ${WIP_DISPLAY}"
|
|
144
|
+
fi
|
|
145
|
+
|
|
146
|
+
# Add context usage
|
|
147
|
+
if [ -n "$CTX_DISPLAY" ]; then
|
|
148
|
+
OUTPUT="${OUTPUT} | ${CTX_DISPLAY}"
|
|
149
|
+
fi
|
|
150
|
+
|
|
151
|
+
# Add cost
|
|
152
|
+
if [ -n "$COST_DISPLAY" ]; then
|
|
153
|
+
OUTPUT="${OUTPUT} | ${COST_DISPLAY}"
|
|
154
|
+
fi
|
|
155
|
+
|
|
156
|
+
# Add git branch
|
|
157
|
+
if [ -n "$GIT_BRANCH" ]; then
|
|
158
|
+
OUTPUT="${OUTPUT} | ${GIT_BRANCH}"
|
|
159
|
+
fi
|
|
160
|
+
|
|
161
|
+
echo "$OUTPUT"
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"hooks": [
|
|
7
7
|
{
|
|
8
8
|
"type": "command",
|
|
9
|
-
"command": "echo '🚀 AgileFlow v2.19.0 loaded - Type /
|
|
9
|
+
"command": "echo '🚀 AgileFlow v2.19.0 loaded - Type /agileflow:help for commands'"
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
"type": "command",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"type": "command",
|
|
21
|
-
"command": "if [ -d docs ]; then echo '✅ AgileFlow docs/ structure found'; else echo '⚠️ No docs/ structure - run /
|
|
21
|
+
"command": "if [ -d docs ]; then echo '✅ AgileFlow docs/ structure found'; else echo '⚠️ No docs/ structure - run /agileflow:setup-system'; fi"
|
|
22
22
|
}
|
|
23
23
|
]
|
|
24
24
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
# AgileFlow Session Resume Script
|
|
3
3
|
# This script is called by the SessionStart hook to automatically resume sessions.
|
|
4
|
-
# It replicates the functionality of /
|
|
4
|
+
# It replicates the functionality of /agileflow:session:resume as a shell script.
|
|
5
5
|
|
|
6
6
|
set -e
|
|
7
7
|
|
|
@@ -11,7 +11,7 @@ echo ""
|
|
|
11
11
|
# Load environment configuration
|
|
12
12
|
if [ ! -f "docs/00-meta/environment.json" ]; then
|
|
13
13
|
echo "⚠️ Session harness not initialized"
|
|
14
|
-
echo " Run /
|
|
14
|
+
echo " Run /agileflow:session:init to set up session management"
|
|
15
15
|
exit 0
|
|
16
16
|
fi
|
|
17
17
|
|
|
@@ -21,7 +21,7 @@ Git worktrees let you check out multiple branches into separate physical directo
|
|
|
21
21
|
```bash
|
|
22
22
|
# You're 2 hours into building a dashboard, Claude has full context
|
|
23
23
|
~/myapp/
|
|
24
|
-
/
|
|
24
|
+
/agileflow:babysit "Build analytics dashboard with charts and filters"
|
|
25
25
|
|
|
26
26
|
# URGENT: Production authentication is broken!
|
|
27
27
|
# Create hotfix worktree in 10 seconds
|
|
@@ -30,7 +30,7 @@ code ../myapp-hotfix # Opens in NEW window
|
|
|
30
30
|
|
|
31
31
|
# In hotfix window - fresh babysit session
|
|
32
32
|
cd ../myapp-hotfix
|
|
33
|
-
/
|
|
33
|
+
/agileflow:babysit "Fix authentication 500 error in src/auth/login.ts"
|
|
34
34
|
|
|
35
35
|
# Babysit reads CLAUDE.md, understands architecture, fixes bug
|
|
36
36
|
# Creates PR, merges to main
|
|
@@ -53,12 +53,12 @@ git worktree remove ../myapp-hotfix
|
|
|
53
53
|
# Test GraphQL implementation
|
|
54
54
|
git worktree add ../myapp-graphql experiment/graphql-api
|
|
55
55
|
cd ../myapp-graphql
|
|
56
|
-
/
|
|
56
|
+
/agileflow:babysit "Implement user API using GraphQL with Apollo Server"
|
|
57
57
|
|
|
58
58
|
# Test REST implementation
|
|
59
59
|
git worktree add ../myapp-rest experiment/rest-api
|
|
60
60
|
cd ../myapp-rest
|
|
61
|
-
/
|
|
61
|
+
/agileflow:babysit "Implement user API using Express REST endpoints"
|
|
62
62
|
|
|
63
63
|
# Compare: Performance, DX, bundle size, complexity
|
|
64
64
|
# Merge the winner, delete the loser
|
|
@@ -72,12 +72,12 @@ git worktree remove ../myapp-graphql ../myapp-rest
|
|
|
72
72
|
|
|
73
73
|
```bash
|
|
74
74
|
# Keep main work safe
|
|
75
|
-
~/myapp/ → /
|
|
75
|
+
~/myapp/ → /agileflow:babysit "Continue building features on stable codebase"
|
|
76
76
|
|
|
77
77
|
# Test risky migration in isolation
|
|
78
78
|
git worktree add ../myapp-ts-migration experiment/typescript
|
|
79
79
|
cd ../myapp-ts-migration
|
|
80
|
-
/
|
|
80
|
+
/agileflow:babysit "Migrate entire codebase from JavaScript to TypeScript"
|
|
81
81
|
|
|
82
82
|
# If migration succeeds → merge
|
|
83
83
|
# If it fails catastrophically → delete worktree (no git history pollution)
|
|
@@ -97,12 +97,12 @@ AgileFlow's status.json and bus/log.jsonl are **file-based** (docs-as-code philo
|
|
|
97
97
|
```bash
|
|
98
98
|
# Worktree 1
|
|
99
99
|
cd ~/myapp-feature-a
|
|
100
|
-
/
|
|
100
|
+
/agileflow:babysit "Work on EP-001: User Authentication"
|
|
101
101
|
# Updates status.json: US-001 → in-progress
|
|
102
102
|
|
|
103
103
|
# Worktree 2 (SIMULTANEOUSLY)
|
|
104
104
|
cd ~/myapp-feature-b
|
|
105
|
-
/
|
|
105
|
+
/agileflow:babysit "Work on EP-001: User Authentication"
|
|
106
106
|
# Updates status.json: US-002 → in-progress
|
|
107
107
|
|
|
108
108
|
# RESULT: Race condition! One update may be lost! ❌
|
|
@@ -112,11 +112,11 @@ cd ~/myapp-feature-b
|
|
|
112
112
|
```bash
|
|
113
113
|
# Worktree 1: Epic isolation
|
|
114
114
|
cd ~/myapp-auth
|
|
115
|
-
/
|
|
115
|
+
/agileflow:babysit "Work on EP-001: User Authentication"
|
|
116
116
|
|
|
117
117
|
# Worktree 2: DIFFERENT epic
|
|
118
118
|
cd ~/myapp-payment
|
|
119
|
-
/
|
|
119
|
+
/agileflow:babysit "Work on EP-002: Payment System"
|
|
120
120
|
|
|
121
121
|
# Different epics → different story files → no conflicts ✅
|
|
122
122
|
```
|
|
@@ -147,7 +147,7 @@ code ../myapp-new-feature
|
|
|
147
147
|
|
|
148
148
|
# Start babysit
|
|
149
149
|
cd ../myapp-new-feature
|
|
150
|
-
/
|
|
150
|
+
/agileflow:babysit
|
|
151
151
|
```
|
|
152
152
|
|
|
153
153
|
### Cleaning Up a Worktree
|
|
@@ -262,7 +262,7 @@ async function handleSet(directory, status, manifestPath, key, value) {
|
|
|
262
262
|
*/
|
|
263
263
|
function getIdeConfigPath(projectDir, ide) {
|
|
264
264
|
const paths = {
|
|
265
|
-
'claude-code': '.claude/commands/
|
|
265
|
+
'claude-code': '.claude/commands/agileflow',
|
|
266
266
|
'cursor': '.cursor/rules/agileflow',
|
|
267
267
|
'windsurf': '.windsurf/workflows/agileflow',
|
|
268
268
|
};
|
|
@@ -331,7 +331,7 @@ function compareVersions(a, b) {
|
|
|
331
331
|
*/
|
|
332
332
|
function getIdeConfigPath(projectDir, ide) {
|
|
333
333
|
const paths = {
|
|
334
|
-
'claude-code': '.claude/commands/
|
|
334
|
+
'claude-code': '.claude/commands/agileflow',
|
|
335
335
|
'cursor': '.cursor/rules/agileflow',
|
|
336
336
|
'windsurf': '.windsurf/workflows/agileflow',
|
|
337
337
|
};
|
|
@@ -97,7 +97,7 @@ module.exports = {
|
|
|
97
97
|
*/
|
|
98
98
|
function getIdeConfigPath(projectDir, ide) {
|
|
99
99
|
const paths = {
|
|
100
|
-
'claude-code': '.claude/commands/
|
|
100
|
+
'claude-code': '.claude/commands/agileflow',
|
|
101
101
|
'cursor': '.cursor/rules/agileflow',
|
|
102
102
|
'windsurf': '.windsurf/workflows/agileflow',
|
|
103
103
|
};
|