agileflow 2.90.7 → 2.92.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 (144) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +6 -6
  3. package/lib/README.md +178 -0
  4. package/lib/codebase-indexer.js +818 -0
  5. package/lib/colors.js +190 -12
  6. package/lib/consent.js +232 -0
  7. package/lib/correlation.js +277 -0
  8. package/lib/error-codes.js +46 -0
  9. package/lib/errors.js +48 -6
  10. package/lib/file-cache.js +182 -0
  11. package/lib/format-error.js +156 -0
  12. package/lib/path-resolver.js +155 -7
  13. package/lib/paths.js +212 -20
  14. package/lib/placeholder-registry.js +205 -0
  15. package/lib/registry-di.js +358 -0
  16. package/lib/result-schema.js +363 -0
  17. package/lib/result.js +210 -0
  18. package/lib/session-registry.js +13 -0
  19. package/lib/session-state-machine.js +465 -0
  20. package/lib/validate-commands.js +308 -0
  21. package/lib/validate-names.js +3 -3
  22. package/lib/validate.js +116 -52
  23. package/package.json +4 -1
  24. package/scripts/af +34 -0
  25. package/scripts/agent-loop.js +63 -9
  26. package/scripts/agileflow-configure.js +2 -2
  27. package/scripts/agileflow-welcome.js +435 -23
  28. package/scripts/archive-completed-stories.sh +57 -11
  29. package/scripts/claude-tmux.sh +102 -0
  30. package/scripts/damage-control-bash.js +3 -70
  31. package/scripts/damage-control-edit.js +3 -20
  32. package/scripts/damage-control-write.js +3 -20
  33. package/scripts/dependency-check.js +310 -0
  34. package/scripts/get-env.js +11 -4
  35. package/scripts/lib/configure-detect.js +23 -1
  36. package/scripts/lib/configure-features.js +43 -2
  37. package/scripts/lib/context-formatter.js +771 -0
  38. package/scripts/lib/context-loader.js +699 -0
  39. package/scripts/lib/damage-control-utils.js +107 -0
  40. package/scripts/lib/json-utils.sh +162 -0
  41. package/scripts/lib/state-migrator.js +353 -0
  42. package/scripts/lib/story-state-machine.js +437 -0
  43. package/scripts/obtain-context.js +118 -1048
  44. package/scripts/pre-push-check.sh +46 -0
  45. package/scripts/precompact-context.sh +36 -11
  46. package/scripts/query-codebase.js +538 -0
  47. package/scripts/ralph-loop.js +5 -5
  48. package/scripts/session-manager.js +220 -42
  49. package/scripts/spawn-parallel.js +651 -0
  50. package/scripts/tui/blessed/data/watcher.js +180 -0
  51. package/scripts/tui/blessed/index.js +244 -0
  52. package/scripts/tui/blessed/panels/output.js +101 -0
  53. package/scripts/tui/blessed/panels/sessions.js +150 -0
  54. package/scripts/tui/blessed/panels/trace.js +97 -0
  55. package/scripts/tui/blessed/ui/help.js +77 -0
  56. package/scripts/tui/blessed/ui/screen.js +52 -0
  57. package/scripts/tui/blessed/ui/statusbar.js +47 -0
  58. package/scripts/tui/blessed/ui/tabbar.js +99 -0
  59. package/scripts/tui/index.js +38 -30
  60. package/scripts/validators/README.md +143 -0
  61. package/scripts/validators/component-validator.js +239 -0
  62. package/scripts/validators/json-schema-validator.js +186 -0
  63. package/scripts/validators/markdown-validator.js +152 -0
  64. package/scripts/validators/migration-validator.js +129 -0
  65. package/scripts/validators/security-validator.js +380 -0
  66. package/scripts/validators/story-format-validator.js +197 -0
  67. package/scripts/validators/test-result-validator.js +114 -0
  68. package/scripts/validators/workflow-validator.js +247 -0
  69. package/src/core/agents/accessibility.md +6 -0
  70. package/src/core/agents/adr-writer.md +6 -0
  71. package/src/core/agents/analytics.md +6 -0
  72. package/src/core/agents/api.md +6 -0
  73. package/src/core/agents/ci.md +6 -0
  74. package/src/core/agents/codebase-query.md +261 -0
  75. package/src/core/agents/compliance.md +6 -0
  76. package/src/core/agents/configuration-damage-control.md +6 -0
  77. package/src/core/agents/configuration-visual-e2e.md +6 -0
  78. package/src/core/agents/database.md +10 -0
  79. package/src/core/agents/datamigration.md +6 -0
  80. package/src/core/agents/design.md +6 -0
  81. package/src/core/agents/devops.md +6 -0
  82. package/src/core/agents/documentation.md +6 -0
  83. package/src/core/agents/epic-planner.md +6 -0
  84. package/src/core/agents/integrations.md +6 -0
  85. package/src/core/agents/mentor.md +6 -0
  86. package/src/core/agents/mobile.md +6 -0
  87. package/src/core/agents/monitoring.md +6 -0
  88. package/src/core/agents/multi-expert.md +6 -0
  89. package/src/core/agents/performance.md +6 -0
  90. package/src/core/agents/product.md +6 -0
  91. package/src/core/agents/qa.md +6 -0
  92. package/src/core/agents/readme-updater.md +6 -0
  93. package/src/core/agents/refactor.md +6 -0
  94. package/src/core/agents/research.md +6 -0
  95. package/src/core/agents/security.md +6 -0
  96. package/src/core/agents/testing.md +10 -0
  97. package/src/core/agents/ui.md +6 -0
  98. package/src/core/commands/adr.md +114 -0
  99. package/src/core/commands/agent.md +120 -0
  100. package/src/core/commands/assign.md +145 -0
  101. package/src/core/commands/audit.md +401 -0
  102. package/src/core/commands/babysit.md +32 -5
  103. package/src/core/commands/board.md +1 -0
  104. package/src/core/commands/changelog.md +118 -0
  105. package/src/core/commands/configure.md +42 -6
  106. package/src/core/commands/diagnose.md +114 -0
  107. package/src/core/commands/epic.md +205 -1
  108. package/src/core/commands/handoff.md +128 -0
  109. package/src/core/commands/help.md +76 -0
  110. package/src/core/commands/metrics.md +1 -0
  111. package/src/core/commands/pr.md +96 -0
  112. package/src/core/commands/research/analyze.md +1 -0
  113. package/src/core/commands/research/ask.md +2 -0
  114. package/src/core/commands/research/import.md +1 -0
  115. package/src/core/commands/research/list.md +2 -0
  116. package/src/core/commands/research/synthesize.md +584 -0
  117. package/src/core/commands/research/view.md +2 -0
  118. package/src/core/commands/roadmap/analyze.md +400 -0
  119. package/src/core/commands/session/new.md +113 -6
  120. package/src/core/commands/session/spawn.md +197 -0
  121. package/src/core/commands/sprint.md +22 -0
  122. package/src/core/commands/status.md +200 -1
  123. package/src/core/commands/story/list.md +9 -9
  124. package/src/core/commands/story/view.md +1 -0
  125. package/src/core/commands/story.md +143 -4
  126. package/src/core/experts/codebase-query/expertise.yaml +190 -0
  127. package/src/core/experts/codebase-query/question.md +73 -0
  128. package/src/core/experts/codebase-query/self-improve.md +105 -0
  129. package/src/core/templates/agileflow-metadata.json +55 -2
  130. package/src/core/templates/plan-template.md +125 -0
  131. package/src/core/templates/story-lifecycle.md +213 -0
  132. package/src/core/templates/story-template.md +4 -0
  133. package/src/core/templates/tdd-test-template.js +241 -0
  134. package/tools/cli/commands/setup.js +86 -0
  135. package/tools/cli/installers/core/installer.js +94 -0
  136. package/tools/cli/installers/ide/_base-ide.js +20 -11
  137. package/tools/cli/installers/ide/codex.js +29 -47
  138. package/tools/cli/lib/config-manager.js +17 -2
  139. package/tools/cli/lib/content-transformer.js +271 -0
  140. package/tools/cli/lib/error-handler.js +14 -22
  141. package/tools/cli/lib/ide-error-factory.js +421 -0
  142. package/tools/cli/lib/ide-health-monitor.js +364 -0
  143. package/tools/cli/lib/ide-registry.js +114 -1
  144. package/tools/cli/lib/ui.js +14 -25
@@ -3,6 +3,12 @@ name: agileflow-epic-planner
3
3
  description: Epic and story planning specialist. Use for breaking down large features into epics and stories, writing acceptance criteria, estimating effort, and mapping dependencies.
4
4
  tools: Read, Write, Edit, Glob, Grep
5
5
  model: sonnet
6
+ hooks:
7
+ PostToolUse:
8
+ - matcher: "Write"
9
+ hooks:
10
+ - type: command
11
+ command: "node .agileflow/hooks/validators/story-format-validator.js"
6
12
  compact_context:
7
13
  priority: "high"
8
14
  preserve_rules:
@@ -3,6 +3,12 @@ name: agileflow-integrations
3
3
  description: Integration specialist for third-party APIs, webhooks, payment processors, external services, and API connectivity.
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep
5
5
  model: haiku
6
+ hooks:
7
+ PostToolUse:
8
+ - matcher: "Write"
9
+ hooks:
10
+ - type: command
11
+ command: "node .agileflow/hooks/validators/security-validator.js"
6
12
  compact_context:
7
13
  priority: "high"
8
14
  preserve_rules:
@@ -3,6 +3,12 @@ name: agileflow-mentor
3
3
  description: End-to-end implementation mentor. Use for guiding feature implementation from idea to PR, researching approaches, creating missing epics/stories, and orchestrating multi-step workflows.
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep
5
5
  model: sonnet
6
+ hooks:
7
+ PostToolUse:
8
+ - matcher: "Write"
9
+ hooks:
10
+ - type: command
11
+ command: "node .agileflow/hooks/validators/json-schema-validator.js"
6
12
  compact_context:
7
13
  priority: "critical"
8
14
  preserve_rules:
@@ -3,6 +3,12 @@ name: agileflow-mobile
3
3
  description: Mobile specialist for React Native, Flutter, cross-platform mobile development, and mobile-specific features.
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep
5
5
  model: haiku
6
+ hooks:
7
+ PostToolUse:
8
+ - matcher: "Write"
9
+ hooks:
10
+ - type: command
11
+ command: "node .agileflow/hooks/validators/component-validator.js"
6
12
  compact_context:
7
13
  priority: high
8
14
  preserve_rules:
@@ -3,6 +3,12 @@ name: agileflow-monitoring
3
3
  description: Monitoring specialist for observability, logging strategies, alerting rules, metrics dashboards, and production visibility.
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep
5
5
  model: haiku
6
+ hooks:
7
+ PostToolUse:
8
+ - matcher: "Write"
9
+ hooks:
10
+ - type: command
11
+ command: "node .agileflow/hooks/validators/json-schema-validator.js"
6
12
  compact_context:
7
13
  priority: high
8
14
  preserve_rules:
@@ -3,6 +3,12 @@ name: agileflow-multi-expert
3
3
  description: Multi-expert orchestrator that deploys 3-5 domain experts on the same problem and synthesizes results for high-confidence answers.
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep, Task, TaskOutput
5
5
  model: sonnet
6
+ hooks:
7
+ PostToolUse:
8
+ - matcher: "Write"
9
+ hooks:
10
+ - type: command
11
+ command: "node .agileflow/hooks/validators/json-schema-validator.js"
6
12
  compact_context:
7
13
  priority: "high"
8
14
  preserve_rules:
@@ -3,6 +3,12 @@ name: agileflow-performance
3
3
  description: Performance specialist for optimization, profiling, benchmarking, scalability, and performance-critical features.
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep
5
5
  model: haiku
6
+ hooks:
7
+ PostToolUse:
8
+ - matcher: "Bash"
9
+ hooks:
10
+ - type: command
11
+ command: "node .agileflow/hooks/validators/test-result-validator.js"
6
12
  ---
7
13
 
8
14
  ## STEP 0: Gather Context
@@ -3,6 +3,12 @@ name: agileflow-product
3
3
  description: Product specialist for requirements analysis, user stories, acceptance criteria clarity, and feature validation before epic planning.
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep
5
5
  model: haiku
6
+ hooks:
7
+ PostToolUse:
8
+ - matcher: "Write"
9
+ hooks:
10
+ - type: command
11
+ command: "node .agileflow/hooks/validators/story-format-validator.js"
6
12
  compact_context:
7
13
  priority: high
8
14
  preserve_rules:
@@ -3,6 +3,12 @@ name: agileflow-qa
3
3
  description: QA specialist for test strategy, test planning, quality metrics, regression testing, and release readiness validation.
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep
5
5
  model: haiku
6
+ hooks:
7
+ PostToolUse:
8
+ - matcher: "Bash"
9
+ hooks:
10
+ - type: command
11
+ command: "node .agileflow/hooks/validators/test-result-validator.js"
6
12
  compact_context:
7
13
  priority: high
8
14
  preserve_rules:
@@ -3,6 +3,12 @@ name: agileflow-readme-updater
3
3
  description: README specialist for auditing and updating all documentation files across project folders.
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep
5
5
  model: haiku
6
+ hooks:
7
+ PostToolUse:
8
+ - matcher: "Write"
9
+ hooks:
10
+ - type: command
11
+ command: "node .agileflow/hooks/validators/markdown-validator.js"
6
12
  compact_context:
7
13
  priority: medium
8
14
  preserve_rules:
@@ -3,6 +3,12 @@ name: agileflow-refactor
3
3
  description: Refactoring specialist for technical debt cleanup, legacy code modernization, codebase health, and code quality improvements.
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep
5
5
  model: haiku
6
+ hooks:
7
+ PostToolUse:
8
+ - matcher: "Bash"
9
+ hooks:
10
+ - type: command
11
+ command: "node .agileflow/hooks/validators/test-result-validator.js"
6
12
  compact_context:
7
13
  priority: "high"
8
14
  preserve_rules:
@@ -3,6 +3,12 @@ name: agileflow-research
3
3
  description: Research specialist. Use for gathering technical information, creating research prompts for ChatGPT, saving research notes, and maintaining the research index.
4
4
  tools: Read, Write, Edit, Glob, Grep, WebFetch, WebSearch
5
5
  model: haiku
6
+ hooks:
7
+ PostToolUse:
8
+ - matcher: "Write"
9
+ hooks:
10
+ - type: command
11
+ command: "node .agileflow/hooks/validators/markdown-validator.js"
6
12
  compact_context:
7
13
  priority: "high"
8
14
  preserve_rules:
@@ -3,6 +3,12 @@ name: agileflow-security
3
3
  description: Security specialist for vulnerability analysis, authentication patterns, authorization, compliance, and security reviews before release.
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep
5
5
  model: haiku
6
+ hooks:
7
+ PostToolUse:
8
+ - matcher: "Write"
9
+ hooks:
10
+ - type: command
11
+ command: "node .agileflow/hooks/validators/security-validator.js"
6
12
  compact_context:
7
13
  priority: critical
8
14
  preserve_rules:
@@ -3,6 +3,16 @@ name: agileflow-testing
3
3
  description: Testing specialist for test strategy, test patterns, coverage optimization, and comprehensive test suite design (different from CI infrastructure).
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep
5
5
  model: haiku
6
+ hooks:
7
+ PostToolUse:
8
+ - matcher: "Bash"
9
+ hooks:
10
+ - type: command
11
+ command: "node .agileflow/hooks/validators/test-result-validator.js"
12
+ Stop:
13
+ - hooks:
14
+ - type: command
15
+ command: "echo 'Testing agent complete - verify test_status in status.json'"
6
16
  compact_context:
7
17
  priority: high
8
18
  preserve_rules:
@@ -3,6 +3,12 @@ name: agileflow-ui
3
3
  description: UI/presentation layer specialist. Use for implementing front-end components, styling, theming, accessibility features, and stories tagged with owner AG-UI.
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep
5
5
  model: haiku
6
+ hooks:
7
+ PostToolUse:
8
+ - matcher: "Write"
9
+ hooks:
10
+ - type: command
11
+ command: "node .agileflow/hooks/validators/component-validator.js"
6
12
  compact_context:
7
13
  priority: high
8
14
  preserve_rules:
@@ -269,6 +269,120 @@ After successfully creating the ADR, offer next steps:
269
269
 
270
270
  ---
271
271
 
272
+ ## Expected Output
273
+
274
+ ### Successful ADR Creation
275
+
276
+ ```
277
+ 📋 Creating ADR: ADR-0042
278
+
279
+ Checking existing ADRs...
280
+ ✅ Next sequential number: 0042
281
+
282
+ Title: Use PostgreSQL for persistence
283
+ Status: accepted
284
+
285
+ Files to create:
286
+ ───────────────────────────────────
287
+ 1. docs/03-decisions/adr-0042-postgresql.md
288
+
289
+ Preview:
290
+ ─────────────────────────────────────────────
291
+ ---
292
+ number: 0042
293
+ title: Use PostgreSQL for persistence
294
+ date: 2026-01-21
295
+ status: accepted
296
+ tags: [database, architecture]
297
+ ---
298
+
299
+ # ADR-0042: Use PostgreSQL for persistence
300
+
301
+ ## Context
302
+ Need reliable ACID-compliant database for financial transactions.
303
+ Evaluated MongoDB (eventual consistency), Redis (memory limits),
304
+ and PostgreSQL (full ACID with JSON support).
305
+
306
+ ## Decision
307
+ Use PostgreSQL 16 with native JSON support for document storage
308
+ while maintaining ACID guarantees.
309
+
310
+ ## Consequences
311
+ ### Positive
312
+ - Full ACID compliance for financial data
313
+ - Native JSON/JSONB for flexible schemas
314
+ - Mature ecosystem and tooling
315
+
316
+ ### Negative
317
+ - Team needs PostgreSQL training
318
+ - Slightly more complex operational setup
319
+ - Vertical scaling limitations
320
+
321
+ ## Related
322
+ - [ADR-0041](adr-0041-db-evaluation.md)
323
+ - [US-0055](../06-stories/US-0055.md)
324
+ ─────────────────────────────────────────────
325
+
326
+ [AskUserQuestion: "Create this ADR? (YES/NO)"]
327
+
328
+ ✅ ADR-0042 created successfully!
329
+ docs/03-decisions/adr-0042-postgresql.md
330
+
331
+ [AskUserQuestion: "What would you like to do next?"]
332
+ ```
333
+
334
+ ### Missing Required Inputs
335
+
336
+ ```
337
+ ❌ Missing required inputs
338
+
339
+ The following inputs are required:
340
+ • NUMBER - 4-digit sequential ID (e.g., 0042)
341
+ • TITLE - Decision title
342
+ • CONTEXT - Why this decision is needed
343
+ • DECISION - What was chosen
344
+ • CONSEQUENCES - Trade-offs (positive and negative)
345
+
346
+ Usage:
347
+ /agileflow:adr NUMBER=0042 TITLE="Use PostgreSQL" CONTEXT="Need ACID..." DECISION="PostgreSQL chosen" CONSEQUENCES="Better integrity, learning curve"
348
+ ```
349
+
350
+ ### Non-Sequential Number Warning
351
+
352
+ ```
353
+ ⚠️ Non-sequential ADR number
354
+
355
+ Requested: ADR-0100
356
+ Last ADR: ADR-0042
357
+ Next expected: ADR-0043
358
+
359
+ Do you want to:
360
+ 1. Use sequential number (0043) - Recommended
361
+ 2. Keep requested number (0100)
362
+ 3. Cancel
363
+
364
+ [AskUserQuestion: Select option]
365
+ ```
366
+
367
+ ### ADR Already Exists
368
+
369
+ ```
370
+ ❌ ADR-0042 already exists
371
+
372
+ Existing ADR:
373
+ Title: Use PostgreSQL for persistence
374
+ Date: 2026-01-15
375
+ Status: accepted
376
+
377
+ To update this ADR:
378
+ /agileflow:adr:update NUMBER=0042 STATUS=superseded
379
+
380
+ To create a new ADR:
381
+ /agileflow:adr NUMBER=0043 TITLE="..."
382
+ ```
383
+
384
+ ---
385
+
272
386
  ## Related Commands
273
387
 
274
388
  - `/agileflow:adr:list` - View all ADRs with status
@@ -124,3 +124,123 @@ ACTIONS
124
124
  3) Print a persona snippet to paste as that terminal's system prompt.
125
125
 
126
126
  Diff-first; YES/NO.
127
+
128
+ ---
129
+
130
+ ## Expected Output
131
+
132
+ ### Successful Agent Onboarding
133
+
134
+ ```
135
+ 📋 Onboarding New Agent: AG-UI
136
+
137
+ AGENT_ID: AG-UI
138
+ ROLE: Frontend Developer
139
+ TOOLS: Read, Write, Edit, Bash, Glob
140
+ SCOPE:
141
+ - Directories: src/components/, src/pages/
142
+ - Story Tags: frontend, ui, ux
143
+
144
+ Files to create:
145
+ ───────────────────────────────────────────────
146
+ 1. docs/02-practices/prompts/agents/agent-AG-UI.md
147
+
148
+ Preview:
149
+ ─────────────────────────────────────────────
150
+ ---
151
+ agent_id: AG-UI
152
+ role: Frontend Developer
153
+ tools: [Read, Write, Edit, Bash, Glob]
154
+ scope:
155
+ directories: [src/components/, src/pages/]
156
+ story_tags: [frontend, ui, ux]
157
+ ---
158
+
159
+ # AG-UI: Frontend Developer Agent
160
+
161
+ ## Responsibilities
162
+ Build and maintain user interface components, pages, and styling.
163
+
164
+ ## System Prompt (Contract)
165
+ **Scope**: Only modify files in src/components/ and src/pages/
166
+ **Testing**: Run `npm test` before committing
167
+ **Commits**: Prefix with "feat(ui):" or "fix(ui):"
168
+ **Status**: Update status.json after completing stories
169
+ ─────────────────────────────────────────────
170
+
171
+ 2. docs/09-agents/roster.yaml (update)
172
+
173
+ + agents:
174
+ + - id: AG-UI
175
+ + role: Frontend Developer
176
+ + tools: [Read, Write, Edit, Bash, Glob]
177
+ + scope:
178
+ + directories: [src/components/, src/pages/]
179
+ + story_tags: [frontend, ui, ux]
180
+
181
+ [AskUserQuestion: "Create this agent profile?"]
182
+
183
+ ✅ Agent onboarded successfully!
184
+ Profile: docs/02-practices/prompts/agents/agent-AG-UI.md
185
+ Roster: docs/09-agents/roster.yaml updated
186
+
187
+ 📝 System Prompt Snippet (paste into terminal):
188
+
189
+ You are AG-UI, a Frontend Developer agent.
190
+ Your scope is limited to: src/components/, src/pages/
191
+ You work on stories tagged: frontend, ui, ux
192
+ Always run tests before committing.
193
+ Always update status.json after completing work.
194
+ ```
195
+
196
+ ### Missing Required Inputs
197
+
198
+ ```
199
+ ❌ Missing required inputs
200
+
201
+ Please provide:
202
+ • AGENT_ID - Agent identifier (e.g., AG-UI, AG-API)
203
+ • ROLE - Agent role description (e.g., "Frontend Developer")
204
+
205
+ Optional:
206
+ • TOOLS - Available tools (default: Read, Write, Edit, Bash, Glob)
207
+ • SCOPE - Directories and story tags
208
+
209
+ Usage:
210
+ /agileflow:agent AGENT_ID=AG-UI ROLE="Frontend Developer" TOOLS="Read,Write,Edit,Bash,Glob" SCOPE="src/components/,frontend"
211
+ ```
212
+
213
+ ### Agent Already Exists
214
+
215
+ ```
216
+ ⚠️ Agent already exists: AG-UI
217
+
218
+ Existing agent profile: docs/02-practices/prompts/agents/agent-AG-UI.md
219
+
220
+ Options:
221
+ 1. Update existing agent profile
222
+ 2. Create new agent with different ID
223
+ 3. Cancel
224
+
225
+ [AskUserQuestion: "How to proceed?"]
226
+ ```
227
+
228
+ ### Roster File Created
229
+
230
+ ```
231
+ 📋 Onboarding New Agent: AG-API
232
+
233
+ Note: docs/09-agents/roster.yaml does not exist.
234
+ Creating new roster file.
235
+
236
+ Files to create:
237
+ ───────────────────────────────────────────────
238
+ 1. docs/02-practices/prompts/agents/agent-AG-API.md
239
+ 2. docs/09-agents/roster.yaml (NEW)
240
+
241
+ [AskUserQuestion: "Create agent profile and roster?"]
242
+
243
+ ✅ Agent onboarded successfully!
244
+ Profile: docs/02-practices/prompts/agents/agent-AG-API.md
245
+ Roster: docs/09-agents/roster.yaml created
246
+ ```
@@ -212,3 +212,148 @@ ACTIONS
212
212
  **JSON Safety**: Always use jq or Edit tool (never echo/cat > status.json). Validate after modifications.
213
213
 
214
214
  Preview changes; YES/NO.
215
+
216
+ ---
217
+
218
+ ## Expected Output
219
+
220
+ ### Successful Assignment
221
+
222
+ ```
223
+ 📋 Assigning Story: US-0042
224
+
225
+ Current state:
226
+ Owner: unassigned
227
+ Status: ready
228
+
229
+ New assignment:
230
+ Owner: AG-UI
231
+ Status: in-progress
232
+
233
+ Files to update:
234
+ ───────────────────────────────────────────────
235
+ 1. docs/06-stories/EP-0010/US-0042-login-form.md
236
+
237
+ Frontmatter changes:
238
+ -owner: unassigned
239
+ +owner: AG-UI
240
+ -status: ready
241
+ +status: in-progress
242
+ +updated: 2026-01-21T14:30:00Z
243
+
244
+ 2. docs/09-agents/status.json
245
+
246
+ "US-0042": {
247
+ -"owner": "unassigned",
248
+ +"owner": "AG-UI",
249
+ -"status": "ready",
250
+ +"status": "in-progress",
251
+ +"last_update": "2026-01-21T14:30:00Z"
252
+ }
253
+
254
+ 3. docs/09-agents/bus/log.jsonl (append)
255
+
256
+ + {"ts":"2026-01-21T14:30:00Z","type":"assign","from":"SYSTEM","to":"AG-UI","story":"US-0042","status":"in-progress"}
257
+
258
+ [AskUserQuestion: "Assign US-0042 to AG-UI as in-progress?"]
259
+
260
+ ✅ Assignment complete!
261
+ Story: US-0042
262
+ New owner: AG-UI
263
+ Status: in-progress
264
+ Bus message sent: assign → AG-UI
265
+ ```
266
+
267
+ ### Story Not Found
268
+
269
+ ```
270
+ ❌ Story not found: US-9999
271
+
272
+ Searched:
273
+ - docs/06-stories/**/US-9999*.md
274
+ - docs/09-agents/status.json
275
+
276
+ Available stories:
277
+ - US-0042: Login form (ready)
278
+ - US-0043: Profile page (ready)
279
+ - US-0044: Dashboard (in-progress)
280
+
281
+ Usage:
282
+ /agileflow:assign STORY=US-0042 NEW_OWNER=AG-UI
283
+ ```
284
+
285
+ ### WIP Limit Warning
286
+
287
+ ```
288
+ ⚠️ WIP Limit Warning
289
+
290
+ AG-UI currently has 2 stories in-progress:
291
+ - US-0038: OAuth flow (in-progress, 3 days)
292
+ - US-0041: Session management (in-progress, 1 day)
293
+
294
+ Assigning US-0042 would exceed WIP limit (max 2 per agent).
295
+
296
+ Options:
297
+ 1. Complete US-0038 or US-0041 first
298
+ 2. Reassign one story to another agent
299
+ 3. Proceed anyway (override WIP limit)
300
+
301
+ [AskUserQuestion: "How to proceed?"]
302
+ - Complete existing story first (Recommended)
303
+ - Assign to different agent
304
+ - Proceed (override WIP limit)
305
+ ```
306
+
307
+ ### Invalid Status Transition
308
+
309
+ ```
310
+ ❌ Invalid status transition
311
+
312
+ Story: US-0042
313
+ Current status: done
314
+ Requested status: in-progress
315
+
316
+ Cannot transition from 'done' to 'in-progress'.
317
+
318
+ Valid transitions from 'done':
319
+ - No valid transitions (story is complete)
320
+
321
+ To reopen this story:
322
+ 1. Create a new story for follow-up work
323
+ 2. Or use /agileflow:status STORY=US-0042 STATUS=ready FORCE=yes
324
+ ```
325
+
326
+ ### Reassignment (Owner Change)
327
+
328
+ ```
329
+ 📋 Reassigning Story: US-0042
330
+
331
+ Current owner: AG-API
332
+ New owner: AG-UI
333
+ Status: in-progress (unchanged)
334
+
335
+ Reason: "Frontend specialist needed for UI work"
336
+
337
+ Files to update:
338
+ ───────────────────────────────────────────────
339
+ 1. docs/06-stories/EP-0010/US-0042-login-form.md
340
+ -owner: AG-API
341
+ +owner: AG-UI
342
+
343
+ 2. docs/09-agents/status.json
344
+ "US-0042": {
345
+ -"owner": "AG-API",
346
+ +"owner": "AG-UI",
347
+ }
348
+
349
+ 3. docs/09-agents/bus/log.jsonl (append)
350
+ + {"type":"reassign","from":"AG-API","to":"AG-UI","story":"US-0042","text":"Frontend specialist needed"}
351
+
352
+ [AskUserQuestion: "Reassign US-0042 from AG-API to AG-UI?"]
353
+
354
+ ✅ Reassignment complete!
355
+ Story: US-0042
356
+ Previous owner: AG-API
357
+ New owner: AG-UI
358
+ Notification sent to both agents
359
+ ```