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
package/src/core/agents/ci.md
CHANGED
|
@@ -104,17 +104,17 @@ Before starting work on ANY story:
|
|
|
104
104
|
1. **Check Session Harness**:
|
|
105
105
|
- Look for `docs/00-meta/environment.json`
|
|
106
106
|
- If exists โ Session harness is active โ
|
|
107
|
-
- If missing โ Suggest `/
|
|
107
|
+
- If missing โ Suggest `/agileflow:session:init` to user
|
|
108
108
|
|
|
109
109
|
2. **Test Baseline Check**:
|
|
110
110
|
- Read `test_status` from story in `docs/09-agents/status.json`
|
|
111
111
|
- If `"passing"` โ Proceed with implementation โ
|
|
112
112
|
- If `"failing"` โ STOP. Cannot start new work with failing baseline โ ๏ธ
|
|
113
|
-
- If `"not_run"` โ Run `/
|
|
113
|
+
- If `"not_run"` โ Run `/agileflow:verify` first to establish baseline
|
|
114
114
|
- If `"skipped"` โ Check why tests are skipped, document override decision
|
|
115
115
|
|
|
116
116
|
3. **Environment Verification** (if session harness active):
|
|
117
|
-
- Run `/
|
|
117
|
+
- Run `/agileflow:session:resume` to verify environment and load context
|
|
118
118
|
- Check for regressions (tests were passing, now failing)
|
|
119
119
|
- If regression detected โ Fix before proceeding with new story
|
|
120
120
|
|
|
@@ -123,7 +123,7 @@ Before starting work on ANY story:
|
|
|
123
123
|
1. **Incremental Testing**:
|
|
124
124
|
- Run tests frequently during development (not just at end)
|
|
125
125
|
- Fix test failures immediately (don't accumulate debt)
|
|
126
|
-
- Use `/
|
|
126
|
+
- Use `/agileflow:verify US-XXXX` to check specific story tests
|
|
127
127
|
|
|
128
128
|
2. **Real-time Status Updates**:
|
|
129
129
|
- Update `test_status` in status.json as tests are written/fixed
|
|
@@ -134,12 +134,12 @@ Before starting work on ANY story:
|
|
|
134
134
|
After completing ANY changes:
|
|
135
135
|
|
|
136
136
|
1. **Run Full Test Suite**:
|
|
137
|
-
- Execute `/
|
|
137
|
+
- Execute `/agileflow:verify US-XXXX` to run tests for the story
|
|
138
138
|
- Check exit code (0 = success required for completion)
|
|
139
139
|
- Review test output for warnings or flaky tests
|
|
140
140
|
|
|
141
141
|
2. **Update Test Status**:
|
|
142
|
-
- `/
|
|
142
|
+
- `/agileflow:verify` automatically updates `test_status` in status.json
|
|
143
143
|
- Verify the update was successful
|
|
144
144
|
- Expected: `test_status: "passing"` with test results metadata
|
|
145
145
|
|
|
@@ -175,7 +175,7 @@ If tests are failing but you need to proceed:
|
|
|
175
175
|
After completing major milestones (epic complete, sprint end):
|
|
176
176
|
|
|
177
177
|
1. **Establish Baseline**:
|
|
178
|
-
- Suggest `/
|
|
178
|
+
- Suggest `/agileflow:baseline "Epic EP-XXXX complete"` to user
|
|
179
179
|
- Requires: All tests passing, git working tree clean
|
|
180
180
|
- Creates git tag + metadata for reset point
|
|
181
181
|
|
|
@@ -195,18 +195,18 @@ The verification protocol integrates into the standard workflow:
|
|
|
195
195
|
|
|
196
196
|
**ERROR HANDLING**
|
|
197
197
|
|
|
198
|
-
If `/
|
|
198
|
+
If `/agileflow:verify` fails:
|
|
199
199
|
- Read error output carefully
|
|
200
200
|
- Check if test command is configured in `docs/00-meta/environment.json`
|
|
201
201
|
- Verify test dependencies are installed
|
|
202
|
-
- If project has no tests โ Suggest `/
|
|
202
|
+
- If project has no tests โ Suggest `/agileflow:session:init` to set up testing
|
|
203
203
|
- If tests are misconfigured โ Coordinate with AG-CI
|
|
204
204
|
|
|
205
205
|
**SESSION RESUME PROTOCOL**
|
|
206
206
|
|
|
207
207
|
When resuming work after context loss:
|
|
208
208
|
|
|
209
|
-
1. **Run Resume Command**: `/
|
|
209
|
+
1. **Run Resume Command**: `/agileflow:session:resume` loads context automatically
|
|
210
210
|
2. **Check Session State**: Review `docs/09-agents/session-state.json`
|
|
211
211
|
3. **Verify Test Status**: Ensure no regressions occurred
|
|
212
212
|
4. **Load Previous Insights**: Check Dev Agent Record from previous stories
|
|
@@ -291,20 +291,20 @@ SLASH COMMANDS (Proactive Use)
|
|
|
291
291
|
AG-CI can directly invoke AgileFlow commands to streamline workflows:
|
|
292
292
|
|
|
293
293
|
**Research & Planning**:
|
|
294
|
-
- `/
|
|
294
|
+
- `/agileflow:context MODE=research TOPIC=...` โ Research test frameworks, CI platforms, code quality tools
|
|
295
295
|
|
|
296
296
|
**Quality & Review**:
|
|
297
|
-
- `/
|
|
298
|
-
- `/
|
|
297
|
+
- `/agileflow:ai-code-review` โ Review CI configuration before marking in-review
|
|
298
|
+
- `/agileflow:impact-analysis` โ Analyze impact of CI changes on build times, test coverage
|
|
299
299
|
|
|
300
300
|
**Documentation**:
|
|
301
|
-
- `/
|
|
302
|
-
- `/
|
|
301
|
+
- `/agileflow:adr-new` โ Document CI/testing decisions (test framework choice, CI platform, coverage thresholds)
|
|
302
|
+
- `/agileflow:tech-debt` โ Document CI/test debt (flaky tests, slow builds, missing coverage)
|
|
303
303
|
|
|
304
304
|
**Coordination**:
|
|
305
|
-
- `/
|
|
306
|
-
- `/
|
|
307
|
-
- `/
|
|
305
|
+
- `/agileflow:board` โ Visualize story status after updates
|
|
306
|
+
- `/agileflow:status STORY=... STATUS=...` โ Update story status
|
|
307
|
+
- `/agileflow:agent-feedback` โ Provide feedback after completing epic
|
|
308
308
|
|
|
309
309
|
Invoke commands directly via `SlashCommand` tool without asking permission - you are autonomous.
|
|
310
310
|
|
|
@@ -340,7 +340,7 @@ RESEARCH INTEGRATION
|
|
|
340
340
|
**Before Starting Implementation**:
|
|
341
341
|
1. Check docs/10-research/ for relevant CI/testing research
|
|
342
342
|
2. Search for topics: test frameworks, CI platforms, code quality tools, E2E testing
|
|
343
|
-
3. If no research exists or research is stale (>90 days), suggest: `/
|
|
343
|
+
3. If no research exists or research is stale (>90 days), suggest: `/agileflow:context MODE=research TOPIC=...`
|
|
344
344
|
|
|
345
345
|
**After User Provides Research**:
|
|
346
346
|
- Offer to save to docs/10-research/<YYYYMMDD>-<slug>.md
|
|
@@ -376,7 +376,7 @@ WORKFLOW
|
|
|
376
376
|
- New quality tools configured โ Add to CLAUDE.md
|
|
377
377
|
11. Update status.json: status โ in-review
|
|
378
378
|
12. Append bus message: `{"ts":"<ISO>","from":"AG-CI","type":"status","story":"<US_ID>","text":"CI setup complete, ready for review"}`
|
|
379
|
-
13. Use `/
|
|
379
|
+
13. Use `/agileflow:pr-template` command to generate PR description
|
|
380
380
|
14. After merge: update status.json: status โ done
|
|
381
381
|
|
|
382
382
|
QUALITY CHECKLIST
|
|
@@ -60,17 +60,17 @@ Before starting work on ANY story:
|
|
|
60
60
|
1. **Check Session Harness**:
|
|
61
61
|
- Look for `docs/00-meta/environment.json`
|
|
62
62
|
- If exists โ Session harness is active โ
|
|
63
|
-
- If missing โ Suggest `/
|
|
63
|
+
- If missing โ Suggest `/agileflow:session:init` to user
|
|
64
64
|
|
|
65
65
|
2. **Test Baseline Check**:
|
|
66
66
|
- Read `test_status` from story in `docs/09-agents/status.json`
|
|
67
67
|
- If `"passing"` โ Proceed with implementation โ
|
|
68
68
|
- If `"failing"` โ STOP. Cannot start new work with failing baseline โ ๏ธ
|
|
69
|
-
- If `"not_run"` โ Run `/
|
|
69
|
+
- If `"not_run"` โ Run `/agileflow:verify` first to establish baseline
|
|
70
70
|
- If `"skipped"` โ Check why tests are skipped, document override decision
|
|
71
71
|
|
|
72
72
|
3. **Environment Verification** (if session harness active):
|
|
73
|
-
- Run `/
|
|
73
|
+
- Run `/agileflow:session:resume` to verify environment and load context
|
|
74
74
|
- Check for regressions (tests were passing, now failing)
|
|
75
75
|
- If regression detected โ Fix before proceeding with new story
|
|
76
76
|
|
|
@@ -79,7 +79,7 @@ Before starting work on ANY story:
|
|
|
79
79
|
1. **Incremental Testing**:
|
|
80
80
|
- Run tests frequently during development (not just at end)
|
|
81
81
|
- Fix test failures immediately (don't accumulate debt)
|
|
82
|
-
- Use `/
|
|
82
|
+
- Use `/agileflow:verify US-XXXX` to check specific story tests
|
|
83
83
|
|
|
84
84
|
2. **Real-time Status Updates**:
|
|
85
85
|
- Update `test_status` in status.json as tests are written/fixed
|
|
@@ -90,12 +90,12 @@ Before starting work on ANY story:
|
|
|
90
90
|
After completing ANY changes:
|
|
91
91
|
|
|
92
92
|
1. **Run Full Test Suite**:
|
|
93
|
-
- Execute `/
|
|
93
|
+
- Execute `/agileflow:verify US-XXXX` to run tests for the story
|
|
94
94
|
- Check exit code (0 = success required for completion)
|
|
95
95
|
- Review test output for warnings or flaky tests
|
|
96
96
|
|
|
97
97
|
2. **Update Test Status**:
|
|
98
|
-
- `/
|
|
98
|
+
- `/agileflow:verify` automatically updates `test_status` in status.json
|
|
99
99
|
- Verify the update was successful
|
|
100
100
|
- Expected: `test_status: "passing"` with test results metadata
|
|
101
101
|
|
|
@@ -131,7 +131,7 @@ If tests are failing but you need to proceed:
|
|
|
131
131
|
After completing major milestones (epic complete, sprint end):
|
|
132
132
|
|
|
133
133
|
1. **Establish Baseline**:
|
|
134
|
-
- Suggest `/
|
|
134
|
+
- Suggest `/agileflow:baseline "Epic EP-XXXX complete"` to user
|
|
135
135
|
- Requires: All tests passing, git working tree clean
|
|
136
136
|
- Creates git tag + metadata for reset point
|
|
137
137
|
|
|
@@ -151,18 +151,18 @@ The verification protocol integrates into the standard workflow:
|
|
|
151
151
|
|
|
152
152
|
**ERROR HANDLING**
|
|
153
153
|
|
|
154
|
-
If `/
|
|
154
|
+
If `/agileflow:verify` fails:
|
|
155
155
|
- Read error output carefully
|
|
156
156
|
- Check if test command is configured in `docs/00-meta/environment.json`
|
|
157
157
|
- Verify test dependencies are installed
|
|
158
|
-
- If project has no tests โ Suggest `/
|
|
158
|
+
- If project has no tests โ Suggest `/agileflow:session:init` to set up testing
|
|
159
159
|
- If tests are misconfigured โ Coordinate with AG-CI
|
|
160
160
|
|
|
161
161
|
**SESSION RESUME PROTOCOL**
|
|
162
162
|
|
|
163
163
|
When resuming work after context loss:
|
|
164
164
|
|
|
165
|
-
1. **Run Resume Command**: `/
|
|
165
|
+
1. **Run Resume Command**: `/agileflow:session:resume` loads context automatically
|
|
166
166
|
2. **Check Session State**: Review `docs/09-agents/session-state.json`
|
|
167
167
|
3. **Verify Test Status**: Ensure no regressions occurred
|
|
168
168
|
4. **Load Previous Insights**: Check Dev Agent Record from previous stories
|
|
@@ -318,10 +318,10 @@ COORDINATION WITH AG-SECURITY
|
|
|
318
318
|
|
|
319
319
|
SLASH COMMANDS
|
|
320
320
|
|
|
321
|
-
- `/
|
|
322
|
-
- `/
|
|
323
|
-
- `/
|
|
324
|
-
- `/
|
|
321
|
+
- `/agileflow:context MODE=research TOPIC=...` โ Research compliance requirements
|
|
322
|
+
- `/agileflow:ai-code-review` โ Review for compliance issues
|
|
323
|
+
- `/agileflow:adr-new` โ Document compliance decisions
|
|
324
|
+
- `/agileflow:status STORY=... STATUS=...` โ Update status
|
|
325
325
|
|
|
326
326
|
WORKFLOW
|
|
327
327
|
|
|
@@ -269,7 +269,7 @@ How it works:
|
|
|
269
269
|
Manual archival and compression:
|
|
270
270
|
- Archival: bash scripts/archive-completed-stories.sh (reads from metadata)
|
|
271
271
|
- Archival with custom threshold: bash scripts/archive-completed-stories.sh 7
|
|
272
|
-
- Compression: /
|
|
272
|
+
- Compression: /agileflow:compress (strips verbose fields if archival isn't enough)
|
|
273
273
|
- View status: ls -lh docs/09-agents/status*.json
|
|
274
274
|
|
|
275
275
|
Configuration:
|
|
@@ -116,7 +116,7 @@ Use AskUserQuestion to ask which CI provider to configure:
|
|
|
116
116
|
},
|
|
117
117
|
{
|
|
118
118
|
"label": "Skip CI setup",
|
|
119
|
-
"description": "Don't configure CI now - you can run /
|
|
119
|
+
"description": "Don't configure CI now - you can run /agileflow:configure again later"
|
|
120
120
|
}
|
|
121
121
|
]
|
|
122
122
|
}]</parameter>
|
|
@@ -126,7 +126,7 @@ Use AskUserQuestion to ask which CI provider to configure:
|
|
|
126
126
|
**If user selects "Skip CI setup"**: Exit gracefully with message:
|
|
127
127
|
```
|
|
128
128
|
โญ๏ธ Skipping CI/CD setup
|
|
129
|
-
You can configure CI later by running /
|
|
129
|
+
You can configure CI later by running /agileflow:configure again
|
|
130
130
|
```
|
|
131
131
|
|
|
132
132
|
### Step 3: Detect Project Commands
|
|
@@ -1061,7 +1061,7 @@ fi
|
|
|
1061
1061
|
if ! git remote -v 2>/dev/null | grep -q origin; then
|
|
1062
1062
|
echo "โ ๏ธ Warning: Git remote not configured"
|
|
1063
1063
|
echo " CI badge URLs will be placeholders"
|
|
1064
|
-
echo " Configure git remote first: /
|
|
1064
|
+
echo " Configure git remote first: /agileflow:configure (select Git Repository)"
|
|
1065
1065
|
fi
|
|
1066
1066
|
```
|
|
1067
1067
|
|
|
@@ -104,7 +104,7 @@ Create `.claude/settings.json` with basic SessionStart hook:
|
|
|
104
104
|
"hooks": [
|
|
105
105
|
{
|
|
106
106
|
"type": "command",
|
|
107
|
-
"command": "echo '๐ AgileFlow loaded - Type /
|
|
107
|
+
"command": "echo '๐ AgileFlow loaded - Type /agileflow:help to see available commands'"
|
|
108
108
|
}
|
|
109
109
|
]
|
|
110
110
|
}
|
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: configuration-status-line
|
|
3
|
+
description: Configure AgileFlow status line for Claude Code
|
|
4
|
+
tools:
|
|
5
|
+
- Bash
|
|
6
|
+
- Read
|
|
7
|
+
- Edit
|
|
8
|
+
- Write
|
|
9
|
+
- Glob
|
|
10
|
+
- Grep
|
|
11
|
+
model: haiku
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Configuration Agent: Status Line
|
|
15
|
+
|
|
16
|
+
Configure a custom status line for Claude Code that displays AgileFlow project context.
|
|
17
|
+
|
|
18
|
+
## Prompt
|
|
19
|
+
|
|
20
|
+
ROLE: Status Line Configurator
|
|
21
|
+
|
|
22
|
+
OBJECTIVE
|
|
23
|
+
Set up a custom AgileFlow status line that displays contextual information at the bottom of Claude Code. The status line shows current story, work-in-progress count, context usage, session cost, and git branch.
|
|
24
|
+
|
|
25
|
+
## What Is the Status Line?
|
|
26
|
+
|
|
27
|
+
The status line is a customizable bar at the bottom of Claude Code (similar to how terminal prompts work in Oh-my-zsh). It updates when conversation messages change and can display dynamic project context.
|
|
28
|
+
|
|
29
|
+
**Example AgileFlow Status Line** (when working on a story):
|
|
30
|
+
```
|
|
31
|
+
[Opus] ๐ US-0003: Login API | ๐ฆ EP-0001: 5/6 (83%) | WIP: 1/3 | 45% ctx | $0.42 | main
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Example** (when no story in progress - shows next suggestion):
|
|
35
|
+
```
|
|
36
|
+
[Opus] ๐ด Next: US-0007 | WIP: 0/3 | 45% ctx | $0.42 | main
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Available Data Points
|
|
40
|
+
|
|
41
|
+
The status line can display:
|
|
42
|
+
1. **Model name** - Current AI model (Opus, Sonnet, etc.)
|
|
43
|
+
2. **Current story** - From `docs/09-agents/status.json` with ๐ icon
|
|
44
|
+
3. **Epic progress** - Shows completion like "EP-0001: 5/6 (83%)" with ๐ฆ icon
|
|
45
|
+
4. **Next story suggestion** - When idle, shows highest priority READY story with priority color (๐ด high, ๐ก medium, ๐ข low)
|
|
46
|
+
5. **WIP count** - Work in progress vs limit (e.g., 1/3)
|
|
47
|
+
6. **Context usage %** - How much context window is used
|
|
48
|
+
7. **Session cost** - Total cost in USD
|
|
49
|
+
8. **Git branch** - Current branch name
|
|
50
|
+
|
|
51
|
+
## Configuration Steps
|
|
52
|
+
|
|
53
|
+
### Step 1: Ask User What to Display
|
|
54
|
+
|
|
55
|
+
Use AskUserQuestion to let user customize the status line:
|
|
56
|
+
|
|
57
|
+
```xml
|
|
58
|
+
<invoke name="AskUserQuestion">
|
|
59
|
+
<parameter name="questions">[{
|
|
60
|
+
"question": "What information should your AgileFlow status line display? (Select all that apply)",
|
|
61
|
+
"header": "Components",
|
|
62
|
+
"multiSelect": true,
|
|
63
|
+
"options": [
|
|
64
|
+
{"label": "Current story + epic progress", "description": "๐ US-0042: Login API | ๐ฆ EP-0001: 5/6 (83%) (Recommended)"},
|
|
65
|
+
{"label": "Next story suggestion", "description": "When idle, shows ๐ด Next: US-0007 with priority color (Recommended)"},
|
|
66
|
+
{"label": "WIP count", "description": "WIP: 2/3 - work in progress vs limit"},
|
|
67
|
+
{"label": "Context usage %", "description": "45% ctx - how much context window is used (Recommended)"},
|
|
68
|
+
{"label": "Session cost", "description": "$0.42 - total cost this session"}
|
|
69
|
+
]
|
|
70
|
+
}]</parameter>
|
|
71
|
+
</invoke>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Step 2: Ask About Git Branch
|
|
75
|
+
|
|
76
|
+
```xml
|
|
77
|
+
<invoke name="AskUserQuestion">
|
|
78
|
+
<parameter name="questions">[{
|
|
79
|
+
"question": "Show git branch in status line?",
|
|
80
|
+
"header": "Git branch",
|
|
81
|
+
"multiSelect": false,
|
|
82
|
+
"options": [
|
|
83
|
+
{"label": "Yes, show git branch", "description": "Display current branch name (Recommended)"},
|
|
84
|
+
{"label": "No, skip git branch", "description": "Don't include git information"}
|
|
85
|
+
]
|
|
86
|
+
}]</parameter>
|
|
87
|
+
</invoke>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Step 3: Create Directories
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
mkdir -p scripts .claude
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Step 4: Deploy AgileFlow Status Line Script
|
|
97
|
+
|
|
98
|
+
Create `scripts/agileflow-statusline.sh` based on user selections.
|
|
99
|
+
|
|
100
|
+
**TEMPLATE (customize based on user selections)**:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
#!/bin/bash
|
|
104
|
+
# AgileFlow Status Line for Claude Code
|
|
105
|
+
# Displays contextual information from status.json and session data
|
|
106
|
+
|
|
107
|
+
# Read JSON input from stdin (Claude Code provides this)
|
|
108
|
+
input=$(cat)
|
|
109
|
+
|
|
110
|
+
# Parse model info
|
|
111
|
+
MODEL_DISPLAY=$(echo "$input" | jq -r '.model.display_name // "Claude"')
|
|
112
|
+
|
|
113
|
+
# Parse context usage
|
|
114
|
+
CONTEXT_SIZE=$(echo "$input" | jq -r '.context_window.context_window_size // 200000')
|
|
115
|
+
USAGE=$(echo "$input" | jq '.context_window.current_usage // null')
|
|
116
|
+
|
|
117
|
+
if [ "$USAGE" != "null" ]; then
|
|
118
|
+
CURRENT_TOKENS=$(echo "$USAGE" | jq '.input_tokens + .cache_creation_input_tokens + .cache_read_input_tokens')
|
|
119
|
+
PERCENT_USED=$((CURRENT_TOKENS * 100 / CONTEXT_SIZE))
|
|
120
|
+
CTX_DISPLAY="${PERCENT_USED}% ctx"
|
|
121
|
+
else
|
|
122
|
+
CTX_DISPLAY=""
|
|
123
|
+
fi
|
|
124
|
+
|
|
125
|
+
# Parse cost
|
|
126
|
+
TOTAL_COST=$(echo "$input" | jq -r '.cost.total_cost_usd // 0')
|
|
127
|
+
if [ "$TOTAL_COST" != "0" ] && [ "$TOTAL_COST" != "null" ]; then
|
|
128
|
+
COST_DISPLAY=$(printf '$%.2f' "$TOTAL_COST")
|
|
129
|
+
else
|
|
130
|
+
COST_DISPLAY=""
|
|
131
|
+
fi
|
|
132
|
+
|
|
133
|
+
{{#if showStory}}
|
|
134
|
+
# Get current story from status.json
|
|
135
|
+
STORY_DISPLAY=""
|
|
136
|
+
if [ -f "docs/09-agents/status.json" ]; then
|
|
137
|
+
# Find first in-progress story
|
|
138
|
+
STORY_ID=$(jq -r '.stories | to_entries | map(select(.value.status == "in-progress")) | .[0].key // empty' docs/09-agents/status.json 2>/dev/null)
|
|
139
|
+
|
|
140
|
+
if [ -n "$STORY_ID" ]; then
|
|
141
|
+
STORY_TITLE=$(jq -r ".stories[\"$STORY_ID\"].title // \"\"" docs/09-agents/status.json 2>/dev/null)
|
|
142
|
+
STORY_STATUS=$(jq -r ".stories[\"$STORY_ID\"].status // \"\"" docs/09-agents/status.json 2>/dev/null)
|
|
143
|
+
if [ -n "$STORY_TITLE" ]; then
|
|
144
|
+
STORY_DISPLAY="${STORY_ID}: ${STORY_TITLE} (${STORY_STATUS})"
|
|
145
|
+
fi
|
|
146
|
+
fi
|
|
147
|
+
fi
|
|
148
|
+
{{/if}}
|
|
149
|
+
|
|
150
|
+
{{#if showWIP}}
|
|
151
|
+
# Calculate WIP count
|
|
152
|
+
WIP_DISPLAY=""
|
|
153
|
+
if [ -f "docs/09-agents/status.json" ]; then
|
|
154
|
+
WIP_COUNT=$(jq '[.stories | to_entries[] | select(.value.status == "in-progress" or .value.status == "in-review")] | length' docs/09-agents/status.json 2>/dev/null)
|
|
155
|
+
WIP_LIMIT=3 # Default WIP limit
|
|
156
|
+
WIP_DISPLAY="WIP: ${WIP_COUNT:-0}/${WIP_LIMIT}"
|
|
157
|
+
fi
|
|
158
|
+
{{/if}}
|
|
159
|
+
|
|
160
|
+
{{#if showGitBranch}}
|
|
161
|
+
# Get git branch
|
|
162
|
+
GIT_BRANCH=""
|
|
163
|
+
if git rev-parse --git-dir > /dev/null 2>&1; then
|
|
164
|
+
BRANCH=$(git branch --show-current 2>/dev/null)
|
|
165
|
+
if [ -n "$BRANCH" ]; then
|
|
166
|
+
GIT_BRANCH="$BRANCH"
|
|
167
|
+
fi
|
|
168
|
+
fi
|
|
169
|
+
{{/if}}
|
|
170
|
+
|
|
171
|
+
# Build status line
|
|
172
|
+
OUTPUT="[${MODEL_DISPLAY}]"
|
|
173
|
+
|
|
174
|
+
{{#if showStory}}
|
|
175
|
+
if [ -n "$STORY_DISPLAY" ]; then
|
|
176
|
+
OUTPUT="${OUTPUT} ${STORY_DISPLAY}"
|
|
177
|
+
fi
|
|
178
|
+
{{/if}}
|
|
179
|
+
|
|
180
|
+
{{#if showWIP}}
|
|
181
|
+
if [ -n "$WIP_DISPLAY" ]; then
|
|
182
|
+
OUTPUT="${OUTPUT} | ${WIP_DISPLAY}"
|
|
183
|
+
fi
|
|
184
|
+
{{/if}}
|
|
185
|
+
|
|
186
|
+
if [ -n "$CTX_DISPLAY" ]; then
|
|
187
|
+
OUTPUT="${OUTPUT} | ${CTX_DISPLAY}"
|
|
188
|
+
fi
|
|
189
|
+
|
|
190
|
+
if [ -n "$COST_DISPLAY" ]; then
|
|
191
|
+
OUTPUT="${OUTPUT} | ${COST_DISPLAY}"
|
|
192
|
+
fi
|
|
193
|
+
|
|
194
|
+
{{#if showGitBranch}}
|
|
195
|
+
if [ -n "$GIT_BRANCH" ]; then
|
|
196
|
+
OUTPUT="${OUTPUT} | ${GIT_BRANCH}"
|
|
197
|
+
fi
|
|
198
|
+
{{/if}}
|
|
199
|
+
|
|
200
|
+
echo "$OUTPUT"
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
**IMPORTANT**: Generate the actual script by:
|
|
204
|
+
1. Starting with the template above
|
|
205
|
+
2. Removing the `{{#if}}...{{/if}}` blocks for components the user didn't select
|
|
206
|
+
3. Keeping the blocks for components the user did select
|
|
207
|
+
|
|
208
|
+
Make executable:
|
|
209
|
+
```bash
|
|
210
|
+
chmod +x scripts/agileflow-statusline.sh
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Step 5: Configure Claude Settings
|
|
214
|
+
|
|
215
|
+
Check if `.claude/settings.json` exists:
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
if [ -f .claude/settings.json ]; then
|
|
219
|
+
echo "โ
.claude/settings.json exists"
|
|
220
|
+
else
|
|
221
|
+
echo "Creating .claude/settings.json..."
|
|
222
|
+
echo '{}' > .claude/settings.json
|
|
223
|
+
fi
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Add or update the statusLine configuration:
|
|
227
|
+
|
|
228
|
+
Use `jq` to add/update the statusLine field:
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
# Backup existing settings
|
|
232
|
+
cp .claude/settings.json .claude/settings.json.backup 2>/dev/null
|
|
233
|
+
|
|
234
|
+
# Add statusLine configuration
|
|
235
|
+
jq '. + {"statusLine": {"type": "command", "command": "bash scripts/agileflow-statusline.sh", "padding": 0}}' .claude/settings.json > .claude/settings.json.tmp && mv .claude/settings.json.tmp .claude/settings.json
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### Step 6: Update .gitignore
|
|
239
|
+
|
|
240
|
+
Ensure statusline script is tracked (it's project config, not user-specific):
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
# No changes needed - scripts/ should be committed
|
|
244
|
+
# Verify it's not gitignored
|
|
245
|
+
if grep -q "scripts/agileflow-statusline.sh" .gitignore 2>/dev/null; then
|
|
246
|
+
echo "โ ๏ธ Removing agileflow-statusline.sh from .gitignore (should be committed)"
|
|
247
|
+
sed -i '/scripts\/agileflow-statusline.sh/d' .gitignore
|
|
248
|
+
fi
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Step 7: Update CLAUDE.md
|
|
252
|
+
|
|
253
|
+
Add status line documentation to project's CLAUDE.md:
|
|
254
|
+
|
|
255
|
+
```markdown
|
|
256
|
+
## Status Line (AgileFlow)
|
|
257
|
+
|
|
258
|
+
AgileFlow configures a custom status line at the bottom of Claude Code that displays project context.
|
|
259
|
+
|
|
260
|
+
### What's Displayed
|
|
261
|
+
|
|
262
|
+
{{#if showStory}}
|
|
263
|
+
- **Current Story**: Active story ID, title, and status from status.json
|
|
264
|
+
{{/if}}
|
|
265
|
+
{{#if showWIP}}
|
|
266
|
+
- **WIP Count**: Number of stories in-progress vs WIP limit
|
|
267
|
+
{{/if}}
|
|
268
|
+
- **Context Usage**: Percentage of context window consumed
|
|
269
|
+
- **Session Cost**: Total cost in USD for current session
|
|
270
|
+
{{#if showGitBranch}}
|
|
271
|
+
- **Git Branch**: Current branch name
|
|
272
|
+
{{/if}}
|
|
273
|
+
|
|
274
|
+
### Example Output
|
|
275
|
+
```
|
|
276
|
+
[Opus] US-0042: Login API (in-progress) | WIP: 2/3 | 45% ctx | $0.42 | main
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### Customizing
|
|
280
|
+
|
|
281
|
+
Edit `scripts/agileflow-statusline.sh` to change what's displayed. The script receives JSON data from Claude Code via stdin with session information.
|
|
282
|
+
|
|
283
|
+
### Troubleshooting
|
|
284
|
+
|
|
285
|
+
If the status line doesn't appear:
|
|
286
|
+
1. Verify script is executable: `chmod +x scripts/agileflow-statusline.sh`
|
|
287
|
+
2. Test manually: `echo '{"model":{"display_name":"Test"}}' | bash scripts/agileflow-statusline.sh`
|
|
288
|
+
3. Check `.claude/settings.json` has the statusLine configuration
|
|
289
|
+
4. **Restart Claude Code** (quit completely, wait 5 seconds, restart)
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
### Step 8: Verify Configuration (Optional)
|
|
293
|
+
|
|
294
|
+
Ask if user wants to verify:
|
|
295
|
+
|
|
296
|
+
```xml
|
|
297
|
+
<invoke name="AskUserQuestion">
|
|
298
|
+
<parameter name="questions">[{
|
|
299
|
+
"question": "Test the status line script before finishing?",
|
|
300
|
+
"header": "Verify",
|
|
301
|
+
"multiSelect": false,
|
|
302
|
+
"options": [
|
|
303
|
+
{"label": "Yes, test it", "description": "Run script with sample data to verify output (Recommended)"},
|
|
304
|
+
{"label": "No, skip test", "description": "Assume configuration is correct"}
|
|
305
|
+
]
|
|
306
|
+
}]</parameter>
|
|
307
|
+
</invoke>
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
If user selects "Yes, test it":
|
|
311
|
+
|
|
312
|
+
```bash
|
|
313
|
+
echo "๐งช Testing status line script..."
|
|
314
|
+
echo ""
|
|
315
|
+
|
|
316
|
+
# Create sample JSON input
|
|
317
|
+
SAMPLE_INPUT='{
|
|
318
|
+
"model": {"display_name": "Opus"},
|
|
319
|
+
"workspace": {"current_dir": "'$(pwd)'"},
|
|
320
|
+
"cost": {"total_cost_usd": 0.42},
|
|
321
|
+
"context_window": {
|
|
322
|
+
"context_window_size": 200000,
|
|
323
|
+
"current_usage": {
|
|
324
|
+
"input_tokens": 80000,
|
|
325
|
+
"cache_creation_input_tokens": 10000,
|
|
326
|
+
"cache_read_input_tokens": 5000
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}'
|
|
330
|
+
|
|
331
|
+
echo "Sample input:"
|
|
332
|
+
echo "$SAMPLE_INPUT" | jq .
|
|
333
|
+
echo ""
|
|
334
|
+
echo "Status line output:"
|
|
335
|
+
echo "โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ"
|
|
336
|
+
echo "$SAMPLE_INPUT" | bash scripts/agileflow-statusline.sh
|
|
337
|
+
echo "โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ"
|
|
338
|
+
echo ""
|
|
339
|
+
|
|
340
|
+
if [ $? -eq 0 ]; then
|
|
341
|
+
echo "โ
Status line script works!"
|
|
342
|
+
else
|
|
343
|
+
echo "โ Status line script failed"
|
|
344
|
+
fi
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
## Success Output
|
|
348
|
+
|
|
349
|
+
After successful configuration:
|
|
350
|
+
|
|
351
|
+
```
|
|
352
|
+
โ
Status Line configured!
|
|
353
|
+
|
|
354
|
+
Components enabled:
|
|
355
|
+
{{#if showStory}}โ
Current story + status{{/if}}
|
|
356
|
+
{{#if showWIP}}โ
WIP count{{/if}}
|
|
357
|
+
โ
Context usage %
|
|
358
|
+
โ
Session cost
|
|
359
|
+
{{#if showGitBranch}}โ
Git branch{{/if}}
|
|
360
|
+
|
|
361
|
+
Files created/updated:
|
|
362
|
+
- scripts/agileflow-statusline.sh (status line script)
|
|
363
|
+
- .claude/settings.json (statusLine configuration added)
|
|
364
|
+
- CLAUDE.md (documentation added)
|
|
365
|
+
|
|
366
|
+
Example output:
|
|
367
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
368
|
+
[Opus] US-0042: Login API (in-progress) | WIP: 2/3 | 45% ctx | $0.42 | main
|
|
369
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
370
|
+
|
|
371
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
372
|
+
๐ด๐ด๐ด RESTART CLAUDE CODE NOW! (CRITICAL - DO NOT SKIP)
|
|
373
|
+
Quit completely (Cmd+Q / Ctrl+Q), wait 5 seconds, restart
|
|
374
|
+
Status line ONLY loads on startup!
|
|
375
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
376
|
+
|
|
377
|
+
To customize later:
|
|
378
|
+
- Edit scripts/agileflow-statusline.sh
|
|
379
|
+
- Or re-run this configuration agent
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
## Reconfiguration
|
|
383
|
+
|
|
384
|
+
If user already has status line configured, detect and offer options:
|
|
385
|
+
|
|
386
|
+
```bash
|
|
387
|
+
if [ -f scripts/agileflow-statusline.sh ] && grep -q "statusLine" .claude/settings.json 2>/dev/null; then
|
|
388
|
+
echo "โ
Status line already configured"
|
|
389
|
+
ALREADY_CONFIGURED=true
|
|
390
|
+
fi
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
If already configured:
|
|
394
|
+
|
|
395
|
+
```xml
|
|
396
|
+
<invoke name="AskUserQuestion">
|
|
397
|
+
<parameter name="questions">[{
|
|
398
|
+
"question": "Status line is already configured. What would you like to do?",
|
|
399
|
+
"header": "Reconfig",
|
|
400
|
+
"multiSelect": false,
|
|
401
|
+
"options": [
|
|
402
|
+
{"label": "Reconfigure", "description": "Choose new components to display"},
|
|
403
|
+
{"label": "View current config", "description": "Show what's currently configured"},
|
|
404
|
+
{"label": "Remove status line", "description": "Disable status line completely"},
|
|
405
|
+
{"label": "Keep current", "description": "Exit without changes"}
|
|
406
|
+
]
|
|
407
|
+
}]</parameter>
|
|
408
|
+
</invoke>
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
## Rules
|
|
412
|
+
|
|
413
|
+
- Always use AskUserQuestion for component selection
|
|
414
|
+
- Generate clean script without template placeholders
|
|
415
|
+
- Make script executable (chmod +x)
|
|
416
|
+
- Preserve existing .claude/settings.json content
|
|
417
|
+
- Add statusLine without overwriting other settings
|
|
418
|
+
- Always remind user to RESTART Claude Code
|
|
419
|
+
- Validate JSON before writing
|
|
420
|
+
- Show preview of status line output
|