agileflow 2.92.1 → 2.93.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 (115) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/README.md +3 -3
  3. package/package.json +1 -1
  4. package/scripts/agileflow-statusline.sh +106 -0
  5. package/scripts/agileflow-welcome.js +57 -0
  6. package/scripts/document-repl.js +793 -0
  7. package/scripts/session-manager.js +195 -12
  8. package/scripts/spawn-parallel.js +41 -14
  9. package/src/core/agents/accessibility.md +19 -125
  10. package/src/core/agents/adr-writer.md +18 -1
  11. package/src/core/agents/analytics.md +19 -125
  12. package/src/core/agents/api.md +5 -130
  13. package/src/core/agents/ci.md +26 -131
  14. package/src/core/agents/compliance.md +21 -125
  15. package/src/core/agents/database.md +20 -125
  16. package/src/core/agents/datamigration.md +20 -125
  17. package/src/core/agents/design.md +19 -125
  18. package/src/core/agents/devops.md +12 -129
  19. package/src/core/agents/documentation.md +18 -1
  20. package/src/core/agents/epic-planner.md +31 -10
  21. package/src/core/agents/integrations.md +19 -125
  22. package/src/core/agents/mobile.md +19 -125
  23. package/src/core/agents/monitoring.md +19 -125
  24. package/src/core/agents/performance.md +19 -125
  25. package/src/core/agents/product.md +18 -1
  26. package/src/core/agents/qa.md +21 -125
  27. package/src/core/agents/readme-updater.md +18 -1
  28. package/src/core/agents/refactor.md +19 -125
  29. package/src/core/agents/research.md +3 -1
  30. package/src/core/agents/rlm-subcore.md +202 -0
  31. package/src/core/agents/security.md +7 -125
  32. package/src/core/agents/testing.md +20 -125
  33. package/src/core/agents/ui.md +14 -135
  34. package/src/core/commands/adr/list.md +20 -0
  35. package/src/core/commands/adr/update.md +24 -1
  36. package/src/core/commands/adr/view.md +23 -1
  37. package/src/core/commands/adr.md +2 -2
  38. package/src/core/commands/agent.md +11 -1
  39. package/src/core/commands/assign.md +15 -6
  40. package/src/core/commands/auto.md +11 -1
  41. package/src/core/commands/babysit.md +15 -4
  42. package/src/core/commands/baseline.md +11 -1
  43. package/src/core/commands/batch.md +11 -1
  44. package/src/core/commands/blockers.md +11 -1
  45. package/src/core/commands/board.md +11 -1
  46. package/src/core/commands/changelog.md +11 -0
  47. package/src/core/commands/choose.md +16 -1
  48. package/src/core/commands/ci.md +11 -1
  49. package/src/core/commands/configure.md +73 -2
  50. package/src/core/commands/context/export.md +8 -0
  51. package/src/core/commands/context/full.md +8 -0
  52. package/src/core/commands/context/note.md +8 -0
  53. package/src/core/commands/debt.md +11 -0
  54. package/src/core/commands/deploy.md +10 -0
  55. package/src/core/commands/deps.md +11 -1
  56. package/src/core/commands/diagnose.md +10 -0
  57. package/src/core/commands/docs.md +12 -2
  58. package/src/core/commands/epic/list.md +20 -0
  59. package/src/core/commands/epic/view.md +25 -0
  60. package/src/core/commands/epic.md +5 -6
  61. package/src/core/commands/feedback.md +11 -0
  62. package/src/core/commands/handoff.md +12 -2
  63. package/src/core/commands/help.md +10 -0
  64. package/src/core/commands/ideate.md +10 -0
  65. package/src/core/commands/impact.md +11 -1
  66. package/src/core/commands/metrics.md +11 -1
  67. package/src/core/commands/multi-expert.md +11 -1
  68. package/src/core/commands/packages.md +11 -0
  69. package/src/core/commands/pr.md +10 -0
  70. package/src/core/commands/readme-sync.md +10 -5
  71. package/src/core/commands/research/analyze.md +60 -3
  72. package/src/core/commands/research/ask.md +9 -1
  73. package/src/core/commands/research/import.md +8 -0
  74. package/src/core/commands/research/list.md +8 -0
  75. package/src/core/commands/research/synthesize.md +9 -1
  76. package/src/core/commands/research/view.md +8 -0
  77. package/src/core/commands/retro.md +12 -2
  78. package/src/core/commands/review.md +11 -1
  79. package/src/core/commands/rlm.md +363 -0
  80. package/src/core/commands/roadmap/analyze.md +1 -1
  81. package/src/core/commands/rpi.md +9 -1
  82. package/src/core/commands/session/cleanup.md +250 -0
  83. package/src/core/commands/session/end.md +10 -0
  84. package/src/core/commands/session/history.md +11 -1
  85. package/src/core/commands/session/init.md +10 -0
  86. package/src/core/commands/session/new.md +113 -13
  87. package/src/core/commands/session/resume.md +10 -0
  88. package/src/core/commands/session/spawn.md +8 -0
  89. package/src/core/commands/session/status.md +10 -0
  90. package/src/core/commands/skill/create.md +1 -1
  91. package/src/core/commands/skill/delete.md +11 -1
  92. package/src/core/commands/skill/edit.md +11 -1
  93. package/src/core/commands/skill/test.md +11 -1
  94. package/src/core/commands/skill/upgrade.md +11 -1
  95. package/src/core/commands/sprint.md +14 -3
  96. package/src/core/commands/status.md +15 -6
  97. package/src/core/commands/story/list.md +23 -0
  98. package/src/core/commands/story/view.md +24 -0
  99. package/src/core/commands/story.md +4 -5
  100. package/src/core/commands/template.md +10 -0
  101. package/src/core/commands/tests.md +10 -0
  102. package/src/core/commands/update.md +10 -0
  103. package/src/core/commands/validate-expertise.md +10 -1
  104. package/src/core/commands/velocity.md +11 -1
  105. package/src/core/commands/verify.md +13 -1
  106. package/src/core/commands/whats-new.md +8 -0
  107. package/src/core/commands/workflow.md +16 -1
  108. package/src/core/templates/agent-coordination-pattern.md +38 -0
  109. package/src/core/templates/agileflow-metadata.json +25 -0
  110. package/src/core/templates/preserve-rules-common.md +107 -0
  111. package/src/core/templates/preserve-rules.json +42 -0
  112. package/src/core/templates/proactive-action-spec.md +29 -0
  113. package/src/core/templates/quality-gate-priorities.md +34 -0
  114. package/src/core/templates/session-harness-protocol.md +128 -0
  115. package/tools/cli/lib/content-injector.js +336 -0
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  description: Synchronize documentation with code changes
3
- argument-hint: [BRANCH=<name>] [BASE=<branch>] [AUTO_CREATE=yes|no]
3
+ argument-hint: [BRANCH=<name>] [BASE=<branch>] [AUTO_CREATE=true|false]
4
4
  compact_context:
5
5
  priority: high
6
6
  preserve_rules:
@@ -8,7 +8,7 @@ compact_context:
8
8
  - "Categorize changes: API, UI, services, config, database"
9
9
  - "Generate gap report: missing, outdated, up-to-date docs"
10
10
  - "NEVER delete docs without explicit approval"
11
- - "ALWAYS use diff-first, YES/NO pattern before writing"
11
+ - "{{RULES:file_preview}}"
12
12
  - "PRESERVE custom content - use managed section markers"
13
13
  - "INFER docs from TypeScript types, JSDoc, OpenAPI, tests"
14
14
  - "Optional AUTO_CREATE mode auto-generates all missing docs"
@@ -396,3 +396,13 @@ OUTPUT
396
396
  - Gap report (markdown)
397
397
  - List of actions to take
398
398
  - Optional: PR with doc updates (if approved)
399
+
400
+ ---
401
+
402
+ ## Related Commands
403
+
404
+ - `/agileflow:readme-sync` - Sync folder README with contents
405
+ - `/agileflow:changelog` - Generate changelog from commits
406
+ - `/agileflow:update` - Generate stakeholder progress report
407
+ - `/agileflow:template` - Manage custom templates
408
+ - `/agileflow:pr` - Generate pull request from story
@@ -1,6 +1,18 @@
1
1
  ---
2
2
  description: List all epics with status and progress
3
3
  argument-hint: [STATUS=<status>]
4
+ compact_context:
5
+ priority: medium
6
+ preserve_rules:
7
+ - "ACTIVE COMMAND: /agileflow:epic:list - Lists all epics with progress tracking"
8
+ - "MUST read status.json for epic data"
9
+ - "MUST calculate story progress (completed/total) for each epic"
10
+ - "MUST display table with status, progress percentage, owner"
11
+ - "MUST offer actions: view details, add story, create new epic"
12
+ - "This is READ-ONLY - no file writes"
13
+ state_fields:
14
+ - status_filter
15
+ - epic_count
4
16
  ---
5
17
 
6
18
  # /agileflow:epic:list
@@ -21,6 +33,14 @@ Shows all epics from `docs/09-agents/status.json` with:
21
33
 
22
34
  ---
23
35
 
36
+ ## STEP 0: Gather Context
37
+
38
+ ```bash
39
+ node .agileflow/scripts/obtain-context.js epic:list
40
+ ```
41
+
42
+ ---
43
+
24
44
  <!-- COMPACT_SUMMARY_START -->
25
45
  ## Compact Summary
26
46
 
@@ -1,6 +1,23 @@
1
1
  ---
2
2
  description: View epic details with stories and contextual actions
3
3
  argument-hint: EPIC=<EP-ID>
4
+ compact_context:
5
+ priority: medium
6
+ preserve_rules:
7
+ - "ACTIVE COMMAND: /agileflow:epic:view - Views epic with all stories and context-aware actions"
8
+ - "MUST read epic from status.json and load all stories"
9
+ - "MUST display overview: title, owner, goal, progress bar"
10
+ - "MUST group stories by status: in_progress, ready, done"
11
+ - "MUST offer CONTEXT-AWARE actions based on progress"
12
+ - "Progress <50% → Add stories, start work, plan sprint"
13
+ - "Progress 50-99% → Work on remaining, view details"
14
+ - "Progress 100% → Close epic, view summary"
15
+ - "Status on-hold → Resume, view blockers, close"
16
+ - "ALWAYS offer next steps via AskUserQuestion"
17
+ state_fields:
18
+ - selected_epic_id
19
+ - epic_progress
20
+ - epic_status
4
21
  ---
5
22
 
6
23
  # /agileflow:epic:view
@@ -19,6 +36,14 @@ Displays complete epic information and offers **context-aware actions** based on
19
36
 
20
37
  ---
21
38
 
39
+ ## STEP 0: Gather Context
40
+
41
+ ```bash
42
+ node .agileflow/scripts/obtain-context.js epic:view
43
+ ```
44
+
45
+ ---
46
+
22
47
  <!-- COMPACT_SUMMARY_START -->
23
48
  ## Compact Summary
24
49
 
@@ -5,13 +5,12 @@ compact_context:
5
5
  priority: high
6
6
  preserve_rules:
7
7
  - "ACTIVE COMMAND: /agileflow:epic-new - Epic creator for feature planning"
8
- - "MUST create TodoWrite task list immediately (6 steps: parse, create epic, create stories, merge status, append bus, confirm)"
9
- - "MUST show file previews before confirming writes"
10
- - "MUST use Edit tool or jq for JSON operations (never echo/cat > status.json)"
11
- - "MUST validate JSON after every modification"
12
- - "MUST use AskUserQuestion for user confirmation (YES/NO/CANCEL format)"
8
+ - "{{RULES:todo_tracking}}"
9
+ - "{{RULES:file_preview}}"
10
+ - "{{RULES:json_operations}}"
11
+ - "{{RULES:user_confirmation}}"
13
12
  - "STORIES format: 'US-ID|title|owner,US-ID2|title2|owner2' (comma-separated triplets)"
14
- - "RESEARCH-FIRST: Validate research exists before creating epic; warn if missing for complex features"
13
+ - "{{RULES:research_first}}"
15
14
  state_fields:
16
15
  - epic_id
17
16
  - owner
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  description: Collect and process agent feedback
3
+ argument-hint: (no arguments)
3
4
  compact_context:
4
5
  priority: medium
5
6
  preserve_rules:
@@ -521,3 +522,13 @@ OUTPUT
521
522
  - Saved feedback (markdown)
522
523
  - Optional: Retrospective summary
523
524
  - Optional: Auto-generated improvement stories
525
+
526
+ ---
527
+
528
+ ## Related Commands
529
+
530
+ - `/agileflow:retro` - Sprint retrospective
531
+ - `/agileflow:status` - Update story status
532
+ - `/agileflow:sprint` - Sprint planning
533
+ - `/agileflow:story` - Create improvement stories
534
+ - `/agileflow:metrics` - Analytics and metrics dashboard
@@ -6,8 +6,8 @@ compact_context:
6
6
  preserve_rules:
7
7
  - "STORY, FROM, TO are REQUIRED - always ask if missing"
8
8
  - "Create handoff note from template in docs/09-agents/comms/"
9
- - "Append bus log entry with type='handoff' to docs/09-agents/bus/log.jsonl"
10
- - "Always show diff/preview FIRST, wait for YES/NO confirmation BEFORE writing"
9
+ - "{{RULES:bus_messaging}}"
10
+ - "{{RULES:file_preview}}"
11
11
  - "Include SUMMARY (what was done) and BLOCKERS (issues for next agent)"
12
12
  - "Use template: @packages/cli/src/core/templates/comms-note-template.md"
13
13
  state_fields:
@@ -374,3 +374,13 @@ Check the FROM and TO parameters.
374
374
  Usage:
375
375
  /agileflow:handoff STORY=US-0042 FROM=AG-API TO=AG-UI SUMMARY="..."
376
376
  ```
377
+
378
+ ---
379
+
380
+ ## Related Commands
381
+
382
+ - `/agileflow:assign` - Assign stories to owners
383
+ - `/agileflow:status` - Update story status
384
+ - `/agileflow:blockers` - Track blockers
385
+ - `/agileflow:board` - Kanban board view
386
+ - `/agileflow:sprint` - Sprint planning
@@ -167,3 +167,13 @@ docs/
167
167
  - `/agileflow:diagnose` - System health check
168
168
  - `/agileflow:configure` - Setup AgileFlow
169
169
  ```
170
+
171
+ ---
172
+
173
+ ## Related Commands
174
+
175
+ - `/agileflow:configure` - Manage AgileFlow features and hooks
176
+ - `/agileflow:diagnose` - System health diagnostics
177
+ - `/agileflow:whats-new` - Show what's new in AgileFlow
178
+ - `/agileflow:board` - Visual kanban board
179
+ - `/agileflow:babysit` - Interactive mentor workflow
@@ -444,3 +444,13 @@ After generating output, present options:
444
444
  | OUTPUT | report, stories, both | report | What to generate |
445
445
 
446
446
  {{argument}}
447
+
448
+ ---
449
+
450
+ ## Related Commands
451
+
452
+ - `/agileflow:multi-expert` - Deploy multiple experts for analysis
453
+ - `/agileflow:story` - Create user stories from ideas
454
+ - `/agileflow:epic` - Create epic for grouped improvements
455
+ - `/agileflow:review` - AI-powered code review
456
+ - `/agileflow:debt` - Track technical debt items
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  description: Analyze change impact across codebase
3
- argument-hint: [FILES=<paths>] [BASE=<branch>] [RUN_TESTS=yes|no]
3
+ argument-hint: [FILES=<paths>] [BASE=<branch>] [RUN_TESTS=true|false]
4
4
  compact_context:
5
5
  priority: high
6
6
  preserve_rules:
@@ -320,3 +320,13 @@ OUTPUT
320
320
  - List of affected files and tests
321
321
  - Test recommendations (critical/recommended/optional)
322
322
  - Optional: Run tests and report results
323
+
324
+ ---
325
+
326
+ ## Related Commands
327
+
328
+ - `/agileflow:tests` - Set up testing infrastructure
329
+ - `/agileflow:verify` - Run tests and update story status
330
+ - `/agileflow:pr` - Generate pull request from story
331
+ - `/agileflow:review` - AI-powered code review
332
+ - `/agileflow:batch` - Process multiple files
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  description: Analytics dashboard with cycle time and throughput
3
- argument-hint: "[TIMEFRAME=7d|30d|90d|all] [EPIC=<id>] [OWNER=<id>] [FORMAT=ascii|json|csv] [METRIC=cycle-time|lead-time|throughput|all]"
3
+ argument-hint: [TIMEFRAME=7d|30d|90d|all] [EPIC=<EP-ID>] [OWNER=<id>] [FORMAT=ascii|json|csv] [METRIC=cycle-time|lead-time|throughput|all]
4
4
  model: haiku
5
5
  type: output-only # Analytics display - read-only, not an ongoing task
6
6
  compact_context:
@@ -757,3 +757,13 @@ OUTPUT
757
757
  - Or JSON/CSV/Markdown based on FORMAT parameter
758
758
  - Always include timeframe and generation timestamp
759
759
  - Save to docs/08-project/metrics-reports/metrics-YYYYMMDD.md (optional)
760
+
761
+ ---
762
+
763
+ ## Related Commands
764
+
765
+ - `/agileflow:velocity` - Track velocity and forecast capacity
766
+ - `/agileflow:sprint` - Sprint planning
767
+ - `/agileflow:retro` - Sprint retrospective
768
+ - `/agileflow:board` - Kanban board view
769
+ - `/agileflow:deps` - Dependency visualization
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  description: Deploy multiple domain experts on the same problem for higher confidence
3
- argument-hint: <question or task>
3
+ argument-hint: <question>
4
4
  compact_context:
5
5
  priority: high
6
6
  preserve_rules:
@@ -360,3 +360,13 @@ Launching experts now...
360
360
  ### ARGUMENTS
361
361
 
362
362
  {{argument}}
363
+
364
+ ---
365
+
366
+ ## Related Commands
367
+
368
+ - `/agileflow:review` - AI-powered code review
369
+ - `/agileflow:diagnose` - System health diagnostics
370
+ - `/agileflow:impact` - Analyze change impact
371
+ - `/agileflow:babysit` - Mentor workflow
372
+ - `/agileflow:rpi` - Research-Plan-Implement workflow
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  description: Manage dependencies with updates and security audits
3
+ argument-hint: (no arguments)
3
4
  compact_context:
4
5
  priority: high
5
6
  preserve_rules:
@@ -453,3 +454,13 @@ Depending on ACTION:
453
454
  - **dashboard**: Dependency dashboard (markdown/html/json/csv)
454
455
  - **update**: Update report + optional PR with updates (if approved)
455
456
  - **audit**: Security audit report with severity levels
457
+
458
+ ---
459
+
460
+ ## Related Commands
461
+
462
+ - `/agileflow:diagnose` - System health diagnostics
463
+ - `/agileflow:debt` - Track technical debt items
464
+ - `/agileflow:ci` - Bootstrap CI/CD workflow
465
+ - `/agileflow:pr` - Generate pull request from story
466
+ - `/agileflow:story` - Create story for security updates
@@ -323,3 +323,13 @@ Searched:
323
323
  Create the story first:
324
324
  /agileflow:story EPIC=EP-0010 STORY=US-0042 TITLE="Login Form" OWNER=AG-UI
325
325
  ```
326
+
327
+ ---
328
+
329
+ ## Related Commands
330
+
331
+ - `/agileflow:story` - Create user stories
332
+ - `/agileflow:review` - AI-powered code review
333
+ - `/agileflow:verify` - Run tests and update story status
334
+ - `/agileflow:status` - Update story status and progress
335
+ - `/agileflow:ci` - Bootstrap CI/CD workflow
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  description: Synchronize a folder's README.md with its current contents
3
- argument-hint: FOLDER=<path> | FOLDER=all
3
+ argument-hint: FOLDER=<path>|all
4
4
  compact_context:
5
5
  priority: medium
6
6
  preserve_rules:
@@ -9,7 +9,7 @@ compact_context:
9
9
  - "If FOLDER=all, spawn agent for each docs/* subfolder in parallel"
10
10
  - "List all files and subdirectories with descriptions"
11
11
  - "Build '## Contents' section with file descriptions"
12
- - "Always show diff/preview FIRST, wait for YES/NO BEFORE updating"
12
+ - "{{RULES:file_preview}}"
13
13
  - "Only update '## Contents' section - preserve other sections"
14
14
  - "Use Edit tool to update README only after approval"
15
15
  state_fields:
@@ -255,6 +255,11 @@ Only the `## Contents` section of README.md:
255
255
  - Maintains all other sections unchanged
256
256
  - Preserves custom notes and links
257
257
 
258
- RELATED
259
- - CLAUDE.md - Project conventions and practices
260
- - Mermaid diagram syntax - For flowcharts and sequence diagrams
258
+ ---
259
+
260
+ ## Related Commands
261
+
262
+ - `/agileflow:docs` - Synchronize documentation with code
263
+ - `/agileflow:changelog` - Generate changelog from commits
264
+ - `/agileflow:template` - Manage custom templates
265
+ - `/agileflow:configure` - Manage AgileFlow features
@@ -11,9 +11,13 @@ compact_context:
11
11
  - "MUST intelligently recommend artifact type (ADR/Epic/Stories/Practice) based on scope"
12
12
  - "DO NOT assume a one-size-fits-all artifact type"
13
13
  - "Research type + analysis determines artifact: Architecture decision→ADR, Large feature→Epic+Stories, Focused improvement→Story"
14
+ - "For large research files (50k+ chars) or HIGH complexity: Use RLM approach with document-repl.js"
15
+ - "Assess file with --info before reading; use targeted extraction for large docs"
14
16
  state_fields:
15
17
  - selected_research_file
16
18
  - research_topic
19
+ - research_complexity
20
+ - research_chars
17
21
  - plan_mode_active
18
22
  - implementation_analysis
19
23
  ---
@@ -36,6 +40,14 @@ After importing research with `/agileflow:research:import`, you may not be ready
36
40
 
37
41
  ---
38
42
 
43
+ ## STEP 0: Gather Context
44
+
45
+ ```bash
46
+ node .agileflow/scripts/obtain-context.js research:analyze
47
+ ```
48
+
49
+ ---
50
+
39
51
  <!-- COMPACT_SUMMARY_START -->
40
52
 
41
53
  ## ⚠️ COMPACT SUMMARY - /agileflow:research:analyze IS ACTIVE
@@ -155,6 +167,25 @@ Every implementation analysis must include:
155
167
 
156
168
  ---
157
169
 
170
+ ### 🚨 RULE #5: USE RLM FOR LARGE RESEARCH FILES
171
+
172
+ **For research files > 50k chars or HIGH complexity, use document-repl.js:**
173
+
174
+ ```bash
175
+ # Assess first
176
+ node packages/cli/scripts/document-repl.js --load="docs/10-research/FILE.md" --info
177
+
178
+ # If large/complex, use targeted extraction:
179
+ node packages/cli/scripts/document-repl.js --load="FILE" --toc
180
+ node packages/cli/scripts/document-repl.js --load="FILE" --search="implementation"
181
+ node packages/cli/scripts/document-repl.js --load="FILE" --section="Key Findings"
182
+ ```
183
+
184
+ **❌ WRONG**: Read full 100k char research file into context
185
+ **✅ RIGHT**: Use document-repl.js to extract only relevant sections
186
+
187
+ ---
188
+
158
189
  ### ANTI-PATTERNS (DON'T DO THESE)
159
190
 
160
191
  ❌ Skip plan mode and analyze without project context
@@ -163,6 +194,7 @@ Every implementation analysis must include:
163
194
  ❌ Assume one artifact type for all research (Epic for everything)
164
195
  ❌ Create artifacts without user asking first
165
196
  ❌ Finish without asking "Should we implement this?"
197
+ ❌ Load full large research files (50k+) - use RLM approach
166
198
 
167
199
  ### DO THESE INSTEAD
168
200
 
@@ -172,6 +204,8 @@ Every implementation analysis must include:
172
204
  ✅ Show specific, quantifiable benefits
173
205
  ✅ Recommend artifact type based on research scope
174
206
  ✅ Confirm user wants to implement before creating anything
207
+ ✅ Assess research file size/complexity before reading
208
+ ✅ Use document-repl.js for large or complex research files
175
209
 
176
210
  ---
177
211
 
@@ -304,12 +338,34 @@ ls docs/10-research/*.md
304
338
  </invoke>
305
339
  ```
306
340
 
307
- ### Step 3: Read and Summarize Research
341
+ ### Step 3: Assess and Read Research
342
+
343
+ First, assess the research file size and complexity:
344
+
345
+ ```bash
346
+ # Assess document complexity
347
+ node packages/cli/scripts/document-repl.js --load="docs/10-research/[SELECTED_FILE]" --info --json
348
+ ```
349
+
350
+ **Decision point based on assessment:**
351
+
352
+ | Chars | Complexity | Approach |
353
+ |-------|------------|----------|
354
+ | < 10k | Any | Direct read (standard approach) |
355
+ | 10-50k | LOW/MEDIUM | Direct read (standard approach) |
356
+ | 50k+ | Any | **Use RLM approach** |
357
+ | Any | HIGH | **Use RLM approach** |
308
358
 
309
- Read the selected research file:
359
+ **If RLM approach needed** (large or high-complexity file):
360
+ - Use document-repl.js for targeted extraction
361
+ - Get TOC first: `--toc`
362
+ - Search for key concepts: `--search="implementation"`, `--search="benefits"`
363
+ - Extract relevant sections: `--section="Key Findings"`
364
+ - Avoid loading full document to preserve context
310
365
 
366
+ **If standard approach** (small, simple file):
311
367
  ```bash
312
- # Read the research note
368
+ # Read the research note directly
313
369
  cat docs/10-research/[SELECTED_FILE]
314
370
  ```
315
371
 
@@ -567,3 +623,4 @@ The implementation plan is now tracked and ready to execute.
567
623
  - `/agileflow:research:view` - Read-only view of research
568
624
  - `/agileflow:research:list` - Show all research notes
569
625
  - `/agileflow:research:ask` - Generate research prompt for web AI
626
+ - `/agileflow:rlm` - RLM document analysis (used automatically for large research files)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  description: Generate detailed research prompt for web AI tools (ChatGPT, Perplexity, etc.)
3
- argument-hint: TOPIC=<text> [DETAILS=<constraints>] [ERROR=<error message>]
3
+ argument-hint: TOPIC=<text> [DETAILS=<text>] [ERROR=<text>]
4
4
  type: output-only # This command generates output for user to copy - not an ongoing task
5
5
  compact_context:
6
6
  priority: critical
@@ -40,6 +40,14 @@ When you need external research (from ChatGPT, Perplexity, Claude web, Gemini),
40
40
 
41
41
  ---
42
42
 
43
+ ## STEP 0: Gather Context
44
+
45
+ ```bash
46
+ node .agileflow/scripts/obtain-context.js research:ask
47
+ ```
48
+
49
+ ---
50
+
43
51
  <!-- COMPACT_SUMMARY_START -->
44
52
 
45
53
  ## ⚠️ COMPACT SUMMARY - /agileflow:research:ask IS ACTIVE
@@ -45,6 +45,14 @@ Also works for importing:
45
45
 
46
46
  ---
47
47
 
48
+ ## STEP 0: Gather Context
49
+
50
+ ```bash
51
+ node .agileflow/scripts/obtain-context.js research:import
52
+ ```
53
+
54
+ ---
55
+
48
56
  <!-- COMPACT_SUMMARY_START -->
49
57
 
50
58
  ## ⚠️ COMPACT SUMMARY - /agileflow:research:import IS ACTIVE
@@ -34,6 +34,14 @@ Shows all research notes stored in `docs/10-research/` with:
34
34
 
35
35
  ---
36
36
 
37
+ ## STEP 0: Gather Context
38
+
39
+ ```bash
40
+ node .agileflow/scripts/obtain-context.js research:list
41
+ ```
42
+
43
+ ---
44
+
37
45
  <!-- COMPACT_SUMMARY_START -->
38
46
 
39
47
  ## ⚠️ COMPACT SUMMARY - /agileflow:research:list IS ACTIVE
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  description: Synthesize insights across multiple research files
3
- argument-hint: [TOPIC=<text> | FILES=<comma-separated>]
3
+ argument-hint: [TOPIC=<text>] [FILES=<list>]
4
4
  compact_context:
5
5
  priority: high
6
6
  preserve_rules:
@@ -36,6 +36,14 @@ Query across your research notes to discover:
36
36
 
37
37
  ---
38
38
 
39
+ ## STEP 0: Gather Context
40
+
41
+ ```bash
42
+ node .agileflow/scripts/obtain-context.js research:synthesize
43
+ ```
44
+
45
+ ---
46
+
39
47
  <!-- COMPACT_SUMMARY_START -->
40
48
 
41
49
  ## ⚠️ COMPACT SUMMARY - /agileflow:research:synthesize IS ACTIVE
@@ -33,6 +33,14 @@ Displays the content of a research note from `docs/10-research/`. Useful for:
33
33
 
34
34
  ---
35
35
 
36
+ ## STEP 0: Gather Context
37
+
38
+ ```bash
39
+ node .agileflow/scripts/obtain-context.js research:view
40
+ ```
41
+
42
+ ---
43
+
36
44
  <!-- COMPACT_SUMMARY_START -->
37
45
 
38
46
  ## ⚠️ COMPACT SUMMARY - /agileflow:research:view IS ACTIVE
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  description: Generate retrospective with Start/Stop/Continue format
3
- argument-hint: "[TIMEFRAME=sprint|2weeks|30d|90d] [EPIC=<id>] [FORMAT=ascii|markdown|html] [SAVE=true|false]"
3
+ argument-hint: [TIMEFRAME=sprint|2weeks|30d|90d] [EPIC=<EP-ID>] [FORMAT=ascii|markdown|html] [SAVE=true|false]
4
4
  model: haiku
5
5
  compact_context:
6
6
  priority: medium
7
7
  preserve_rules:
8
8
  - "ACTIVE COMMAND: /agileflow:retro - Retrospective facilitator (read-only analysis)"
9
- - "MUST create TodoWrite task list (9 steps: load data, analyze well, analyze improvements, detect patterns, generate actions, celebrate, report, save, update index)"
9
+ - "{{RULES:todo_tracking}}"
10
10
  - "MUST focus on TEAM-LEVEL patterns (never individual blame)"
11
11
  - "MUST balance positive (Continue) with improvements (Start/Stop)"
12
12
  - "MUST use DATA to drive insights (no opinions without evidence)"
@@ -707,3 +707,13 @@ OUTPUT
707
707
  - Saved to docs/08-project/retrospectives/retro-YYYYMMDD.md
708
708
  - Updated retrospectives/README.md index
709
709
  - Action items formatted as checkboxes for easy tracking
710
+
711
+ ---
712
+
713
+ ## Related Commands
714
+
715
+ - `/agileflow:sprint` - Sprint planning
716
+ - `/agileflow:metrics` - Analytics dashboard
717
+ - `/agileflow:velocity` - Track velocity
718
+ - `/agileflow:feedback` - Collect agent feedback
719
+ - `/agileflow:board` - Kanban board view
@@ -5,7 +5,7 @@ compact_context:
5
5
  priority: critical
6
6
  preserve_rules:
7
7
  - "ACTIVE COMMAND: /agileflow:ai-code-review - Code reviewer analyzing git diffs"
8
- - "NEVER auto-commit fixes without explicit user approval - ALWAYS ask first"
8
+ - "{{RULES:commit_approval}}"
9
9
  - "Be constructive and helpful, never blame or criticize developers"
10
10
  - "Show both BAD and GOOD code examples - use ❌ BAD and ✅ GOOD markers"
11
11
  - "Prioritize by severity: CRITICAL must be fixed before merge, HIGH should be addressed"
@@ -585,3 +585,13 @@ OUTPUT
585
585
  - Code quality score
586
586
  - Recommendations
587
587
  - Optional: Auto-fixes (if approved)
588
+
589
+ ---
590
+
591
+ ## Related Commands
592
+
593
+ - `/agileflow:pr` - Generate pull request description
594
+ - `/agileflow:impact` - Analyze change impact
595
+ - `/agileflow:tests` - Set up testing infrastructure
596
+ - `/agileflow:diagnose` - System health diagnostics
597
+ - `/agileflow:multi-expert` - Deploy multiple experts for analysis