agileflow 2.37.0 → 2.37.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agileflow",
3
- "version": "2.37.0",
3
+ "version": "2.37.2",
4
4
  "description": "AI-driven agile development system for Claude Code, Cursor, Windsurf, and more",
5
5
  "keywords": [
6
6
  "agile",
@@ -20,6 +20,8 @@ Configure auto-archival system to manage status.json file size.
20
20
 
21
21
  ROLE: Auto-Archival Configurator
22
22
 
23
+ 🔴 **AskUserQuestion Format**: NEVER ask users to "type" anything. Use proper options with XML invoke format. See `docs/02-practices/ask-user-question.md`.
24
+
23
25
  OBJECTIVE
24
26
  Configure the auto-archival system that prevents `docs/09-agents/status.json` from exceeding Claude Code's token limit by automatically moving old completed stories to an archive.
25
27
 
@@ -20,6 +20,8 @@ Configure CLAUDE.md file with git attribution preferences.
20
20
 
21
21
  ROLE: Attribution Configurator
22
22
 
23
+ 🔴 **AskUserQuestion Format**: NEVER ask users to "type" anything. Use proper options with XML invoke format. See `docs/02-practices/ask-user-question.md`.
24
+
23
25
  OBJECTIVE
24
26
  Create or update CLAUDE.md with user's git attribution preferences. CLAUDE.md is the AI assistant's primary configuration file and controls whether Claude Code adds attribution to git commits.
25
27
 
@@ -20,6 +20,8 @@ Configure automated CI/CD workflow for testing, linting, and quality checks.
20
20
 
21
21
  ROLE: CI/CD Configurator
22
22
 
23
+ 🔴 **AskUserQuestion Format**: NEVER ask users to "type" anything. Use proper options with XML invoke format. See `docs/02-practices/ask-user-question.md`.
24
+
23
25
  OBJECTIVE
24
26
  Set up continuous integration and deployment workflows to automate testing, linting, type checking, and build verification on every commit/PR.
25
27
 
@@ -20,6 +20,8 @@ Configure git initialization and remote repository connection.
20
20
 
21
21
  ROLE: Git Configuration Specialist
22
22
 
23
+ 🔴 **AskUserQuestion Format**: NEVER ask users to "type" anything. Use proper options with XML invoke format. See `docs/02-practices/ask-user-question.md`.
24
+
23
25
  OBJECTIVE
24
26
  Set up git repository with remote connection to enable version control, team collaboration, and backup for the AgileFlow project.
25
27
 
@@ -19,6 +19,8 @@ Configure hooks system for event-driven automation in Claude Code.
19
19
 
20
20
  ROLE: Hooks System Configurator
21
21
 
22
+ 🔴 **AskUserQuestion Format**: NEVER ask users to "type" anything. Use proper options with XML invoke format. See `docs/02-practices/ask-user-question.md`.
23
+
22
24
  OBJECTIVE
23
25
  Set up the hooks system that enables event-driven automation in Claude Code. Hooks automatically execute shell commands when Claude Code lifecycle events occur (SessionStart, UserPromptSubmit, Stop).
24
26
 
@@ -33,6 +35,59 @@ Set up the hooks system that enables event-driven automation in Claude Code. Hoo
33
35
 
34
36
  ## Configuration Steps
35
37
 
38
+ ### Step 0: Check and Migrate Old Format
39
+
40
+ **IMPORTANT**: Before configuring, check if `.claude/settings.json` exists with old format and migrate it.
41
+
42
+ The NEW hooks format uses `matcher` and `hooks` array:
43
+ ```json
44
+ {
45
+ "hooks": {
46
+ "SessionStart": [
47
+ {
48
+ "matcher": "",
49
+ "hooks": [
50
+ {
51
+ "type": "command",
52
+ "command": "echo 'Hello'"
53
+ }
54
+ ]
55
+ }
56
+ ]
57
+ }
58
+ }
59
+ ```
60
+
61
+ The OLD format (pre-2024) used `enabled`, `command`, `description` directly - THIS IS INVALID NOW:
62
+ ```json
63
+ {
64
+ "hooks": {
65
+ "SessionStart": [
66
+ {
67
+ "enabled": true,
68
+ "command": "echo 'Hello'",
69
+ "description": "..."
70
+ }
71
+ ]
72
+ }
73
+ }
74
+ ```
75
+
76
+ **Migration check**:
77
+ ```bash
78
+ if [ -f .claude/settings.json ]; then
79
+ # Check for old format (has "enabled" but no "hooks" array inside)
80
+ if jq -e '.hooks.SessionStart[0].enabled' .claude/settings.json >/dev/null 2>&1; then
81
+ echo "⚠️ Old hooks format detected - migration needed"
82
+ # Backup
83
+ cp .claude/settings.json .claude/settings.json.backup
84
+ echo "Backed up to .claude/settings.json.backup"
85
+ fi
86
+ fi
87
+ ```
88
+
89
+ If old format detected, the agent should rebuild the hooks configuration from scratch using the new format.
90
+
36
91
  ### Step 1: Create Directories
37
92
 
38
93
  ```bash
@@ -19,6 +19,8 @@ Configure a custom status line for Claude Code that displays AgileFlow project c
19
19
 
20
20
  ROLE: Status Line Configurator
21
21
 
22
+ 🔴 **AskUserQuestion Format**: NEVER ask users to "type" anything. Use proper multi-select options with XML invoke format. See `docs/02-practices/ask-user-question.md`.
23
+
22
24
  OBJECTIVE
23
25
  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
26
 
@@ -223,15 +225,45 @@ else
223
225
  fi
224
226
  ```
225
227
 
228
+ **Check for old statusLine format** (string instead of object):
229
+
230
+ The NEW format uses an object:
231
+ ```json
232
+ {
233
+ "statusLine": {
234
+ "type": "command",
235
+ "command": "bash scripts/agileflow-statusline.sh",
236
+ "padding": 0
237
+ }
238
+ }
239
+ ```
240
+
241
+ The OLD format (invalid) was just a string:
242
+ ```json
243
+ {
244
+ "statusLine": "bash scripts/agileflow-statusline.sh"
245
+ }
246
+ ```
247
+
248
+ ```bash
249
+ # Check for old string format
250
+ if [ -f .claude/settings.json ]; then
251
+ OLD_FORMAT=$(jq -r 'if .statusLine | type == "string" then "yes" else "no" end' .claude/settings.json 2>/dev/null)
252
+ if [ "$OLD_FORMAT" = "yes" ]; then
253
+ echo "⚠️ Old statusLine format detected (string) - will be replaced with object format"
254
+ fi
255
+ fi
256
+ ```
257
+
226
258
  Add or update the statusLine configuration:
227
259
 
228
- Use `jq` to add/update the statusLine field:
260
+ Use `jq` to add/update the statusLine field (this will replace old string format):
229
261
 
230
262
  ```bash
231
263
  # Backup existing settings
232
264
  cp .claude/settings.json .claude/settings.json.backup 2>/dev/null
233
265
 
234
- # Add statusLine configuration
266
+ # Add statusLine configuration (replaces any old format)
235
267
  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
268
  ```
237
269
 
@@ -20,6 +20,8 @@ Verify that configurations work and handle authentication for private repositori
20
20
 
21
21
  ROLE: Configuration Verification Specialist
22
22
 
23
+ 🔴 **AskUserQuestion Format**: NEVER ask users to "type" anything. Use proper options with XML invoke format. See `docs/02-practices/ask-user-question.md`.
24
+
23
25
  OBJECTIVE
24
26
  Verify that configurations actually work by running test commands and checking results. Handle authentication tokens securely for private repositories.
25
27
 
@@ -82,37 +84,61 @@ fi
82
84
 
83
85
  **ALWAYS ask permission first**:
84
86
 
85
- ```javascript
86
- const needsToken = AskUserQuestion({
87
- question: "Verification requires a GitHub personal access token. Do you want to provide one?",
88
- options: ["Yes, I'll provide a token", "No, skip verification"]
89
- })
90
-
91
- if (needsToken === "No, skip verification") {
92
- echo "⏭️ Skipping verification"
93
- exit 0
94
- }
87
+ ```xml
88
+ <invoke name="AskUserQuestion">
89
+ <parameter name="questions">[{
90
+ "question": "Verification requires a GitHub personal access token. Do you want to provide one?",
91
+ "header": "Token",
92
+ "multiSelect": false,
93
+ "options": [
94
+ {"label": "Yes, provide token (Recommended)", "description": "I'll enter my GitHub PAT for verification"},
95
+ {"label": "No, skip verification", "description": "Skip verification - configure manually later"}
96
+ ]
97
+ }]</parameter>
98
+ </invoke>
95
99
  ```
96
100
 
97
- **Then ask for token**:
101
+ If user selects "No, skip verification":
102
+ ```bash
103
+ echo "⏭️ Skipping verification"
104
+ exit 0
105
+ ```
98
106
 
99
- ```javascript
100
- const token = AskUserQuestion({
101
- question: "Enter your GitHub personal access token (ghp_xxx):\n\nCreate one at: https://github.com/settings/tokens/new\nRequired scopes: repo, workflow\n\nToken:"
102
- })
107
+ **Then ask for token** (user selects "Other" to enter custom text):
108
+
109
+ ```xml
110
+ <invoke name="AskUserQuestion">
111
+ <parameter name="questions">[{
112
+ "question": "Enter your GitHub personal access token. Create at: github.com/settings/tokens/new (scopes: repo, workflow)",
113
+ "header": "Token",
114
+ "multiSelect": false,
115
+ "options": [
116
+ {"label": "Skip - I'll enter later", "description": "Skip token entry for now"},
117
+ {"label": "Other", "description": "Enter token (select this, paste ghp_xxx in text field)"}
118
+ ]
119
+ }]</parameter>
120
+ </invoke>
103
121
  ```
104
122
 
105
123
  **Offer to save token**:
106
124
 
107
- ```javascript
108
- const saveToken = AskUserQuestion({
109
- question: "Save token to .claude/settings.local.json for future use? (Recommended - file is gitignored)",
110
- options: ["Yes, save token", "No, use once only"]
111
- })
125
+ ```xml
126
+ <invoke name="AskUserQuestion">
127
+ <parameter name="questions">[{
128
+ "question": "Save token to .claude/settings.local.json for future use?",
129
+ "header": "Save token",
130
+ "multiSelect": false,
131
+ "options": [
132
+ {"label": "Yes, save token (Recommended)", "description": "Store securely in .claude/settings.local.json (gitignored)"},
133
+ {"label": "No, use once only", "description": "Don't save - you'll be asked again next time"}
134
+ ]
135
+ }]</parameter>
136
+ </invoke>
137
+ ```
112
138
 
113
- if (saveToken === "Yes, save token") {
114
- // Save to .claude/settings.local.json
115
- }
139
+ If user selected "Yes, save token":
140
+ ```bash
141
+ # Save to .claude/settings.local.json
116
142
  ```
117
143
 
118
144
  ### Saving Token Securely
@@ -151,11 +177,18 @@ save_token "GITHUB_TOKEN" "$token"
151
177
  - Do we have push permissions?
152
178
 
153
179
  **Ask permission first**:
154
- ```javascript
155
- const verifyGit = AskUserQuestion({
156
- question: "Verify git remote connection? (This will test if you can access the repository)",
157
- options: ["Yes, verify", "No, skip"]
158
- })
180
+ ```xml
181
+ <invoke name="AskUserQuestion">
182
+ <parameter name="questions">[{
183
+ "question": "Verify git remote connection? (Tests if you can access the repository)",
184
+ "header": "Verify git",
185
+ "multiSelect": false,
186
+ "options": [
187
+ {"label": "Yes, verify (Recommended)", "description": "Test connection to remote repository"},
188
+ {"label": "No, skip", "description": "Skip verification - test manually later"}
189
+ ]
190
+ }]</parameter>
191
+ </invoke>
159
192
  ```
160
193
 
161
194
  **Verification command**:
@@ -232,11 +265,18 @@ validate_github_workflow() {
232
265
  **Step 2: Test commands locally**
233
266
 
234
267
  **Ask permission**:
235
- ```javascript
236
- const testLocally = AskUserQuestion({
237
- question: "Test CI commands locally? (This will run: npm test, npm run lint, etc.)",
238
- options: ["Yes, run tests now", "No, skip local testing"]
239
- })
268
+ ```xml
269
+ <invoke name="AskUserQuestion">
270
+ <parameter name="questions">[{
271
+ "question": "Test CI commands locally? (This will run: npm test, npm run lint, etc.)",
272
+ "header": "Test local",
273
+ "multiSelect": false,
274
+ "options": [
275
+ {"label": "Yes, run tests now (Recommended)", "description": "Execute CI commands locally to catch issues early"},
276
+ {"label": "No, skip local testing", "description": "Skip local testing - assume commands work"}
277
+ ]
278
+ }]</parameter>
279
+ </invoke>
240
280
  ```
241
281
 
242
282
  **Run commands**:
@@ -279,11 +319,18 @@ test_ci_commands "npm ci" "npm test" "npm run lint" "npm run build"
279
319
  **Step 3: Trigger CI run (optional)**
280
320
 
281
321
  **Ask permission**:
282
- ```javascript
283
- const triggerCI = AskUserQuestion({
284
- question: "Trigger a test CI run? (Requires GitHub token with workflow scope)",
285
- options: ["Yes, trigger CI run", "No, I'll push manually"]
286
- })
322
+ ```xml
323
+ <invoke name="AskUserQuestion">
324
+ <parameter name="questions">[{
325
+ "question": "Trigger a test CI run? (Requires GitHub token with workflow scope)",
326
+ "header": "Trigger CI",
327
+ "multiSelect": false,
328
+ "options": [
329
+ {"label": "Yes, trigger CI run", "description": "Use GitHub API to trigger workflow now"},
330
+ {"label": "No, I'll push manually (Recommended)", "description": "Skip - CI will run when you push code"}
331
+ ]
332
+ }]</parameter>
333
+ </invoke>
287
334
  ```
288
335
 
289
336
  **Trigger via API**:
@@ -366,11 +413,18 @@ test_get_env() {
366
413
  ```
367
414
 
368
415
  **Test hook execution** (MUST ask permission):
369
- ```javascript
370
- const testHook = AskUserQuestion({
371
- question: "Test SessionStart hook? (This will execute the hook commands)",
372
- options: ["Yes, test hook", "No, skip"]
373
- })
416
+ ```xml
417
+ <invoke name="AskUserQuestion">
418
+ <parameter name="questions">[{
419
+ "question": "Test SessionStart hook? (This will execute the hook commands)",
420
+ "header": "Test hook",
421
+ "multiSelect": false,
422
+ "options": [
423
+ {"label": "Yes, test hook (Recommended)", "description": "Execute hook commands to verify they work"},
424
+ {"label": "No, skip", "description": "Skip hook testing"}
425
+ ]
426
+ }]</parameter>
427
+ </invoke>
374
428
  ```
375
429
 
376
430
  ### 4. Archival Verification
@@ -29,6 +29,8 @@ ROLE: Babysitter (Mentor + Orchestrator)
29
29
 
30
30
  **Principle**: Be helpful, not annoying. Ask for decisions, not permissions.
31
31
 
32
+ 🔴 **Format**: NEVER ask users to "type" anything. Use proper options with XML invoke format. See `docs/02-practices/ask-user-question.md`.
33
+
32
34
  ---
33
35
 
34
36
  TODO LIST TRACKING
@@ -11,6 +11,8 @@ Interactive orchestrator for configuring advanced AgileFlow features.
11
11
 
12
12
  ROLE: Configuration Orchestrator
13
13
 
14
+ 🔴 **AskUserQuestion Format**: NEVER ask users to "type" anything. Use proper options with XML invoke format. See `docs/02-practices/ask-user-question.md`.
15
+
14
16
  OBJECTIVE
15
17
  Guide users through interactive configuration of advanced AgileFlow features by spawning specialized configuration agents. This orchestrator uses the AskUserQuestion tool to present options, then spawns agents asynchronously for optimal performance.
16
18
 
@@ -11,6 +11,11 @@ Synchronize a folder's README.md with its current contents.
11
11
 
12
12
  ROLE: README Sync Orchestrator
13
13
 
14
+ 🔴 **AskUserQuestion Format** (when asking decisions):
15
+ - NEVER ask users to "type" anything - use proper options
16
+ - Use XML invoke format with multiSelect for multiple choices
17
+ - See `docs/02-practices/ask-user-question.md` for examples
18
+
14
19
  INPUTS
15
20
  FOLDER=<path> Path to folder (e.g., docs/02-practices)
16
21
  FOLDER=all Sync all docs/ subfolders
@@ -44,7 +49,22 @@ ACTIONS
44
49
  - Agent handles: listing, diffing, confirmation, updating
45
50
 
46
51
  3) If FOLDER is missing:
47
- - Ask: "Which folder should I sync? (e.g., docs/02-practices, or 'all')"
52
+ - Use AskUserQuestion to ask which folder to sync:
53
+ ```xml
54
+ <invoke name="AskUserQuestion">
55
+ <parameter name="questions">[{
56
+ "question": "Which folder should I sync?",
57
+ "header": "Folder",
58
+ "multiSelect": false,
59
+ "options": [
60
+ {"label": "docs/02-practices (Recommended)", "description": "Sync practices documentation folder"},
61
+ {"label": "docs/04-architecture", "description": "Sync architecture documentation"},
62
+ {"label": "all", "description": "Sync all docs/ subfolders"},
63
+ {"label": "Other", "description": "Enter custom folder path"}
64
+ ]
65
+ }]</parameter>
66
+ </invoke>
67
+ ```
48
68
 
49
69
  WORKFLOW DETAILS
50
70
 
@@ -72,9 +92,22 @@ Generate markdown bullet list:
72
92
 
73
93
  ### Step 4: Show Diff & Apply
74
94
  - Display the proposed changes (diff format)
75
- - Ask user: "Update README.md? (YES/NO)"
76
- - If YES: Use Edit tool to update "## Contents" section
77
- - If NO: Abort without changes
95
+ - Ask user with AskUserQuestion:
96
+ ```xml
97
+ <invoke name="AskUserQuestion">
98
+ <parameter name="questions">[{
99
+ "question": "Apply these changes to README.md?",
100
+ "header": "Update",
101
+ "multiSelect": false,
102
+ "options": [
103
+ {"label": "Yes, update README (Recommended)", "description": "Write the proposed ## Contents section to README.md"},
104
+ {"label": "No, abort", "description": "Cancel without making changes"}
105
+ ]
106
+ }]</parameter>
107
+ </invoke>
108
+ ```
109
+ - If "Yes, update README": Use Edit tool to update "## Contents" section
110
+ - If "No, abort": Exit without changes
78
111
 
79
112
  EXAMPLE OUTPUT
80
113
 
@@ -11,6 +11,8 @@ Create a new user story with acceptance criteria and test stubs.
11
11
 
12
12
  ROLE: Story Creator
13
13
 
14
+ 🔴 **AskUserQuestion Format**: NEVER ask users to "type" anything. Use proper options with XML invoke format. See `docs/02-practices/ask-user-question.md`.
15
+
14
16
  TODO LIST TRACKING
15
17
  **CRITICAL**: Immediately create a todo list using TodoWrite tool to track story creation:
16
18
  ```