agileflow 2.92.0 → 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.
- package/CHANGELOG.md +10 -0
- package/README.md +6 -6
- package/lib/codebase-indexer.js +2 -1
- package/package.json +1 -1
- package/scripts/agileflow-statusline.sh +106 -0
- package/scripts/agileflow-welcome.js +135 -22
- package/scripts/document-repl.js +793 -0
- package/scripts/lib/configure-features.js +8 -1
- package/scripts/lib/context-loader.js +16 -16
- package/scripts/query-codebase.js +8 -3
- package/scripts/session-manager.js +374 -16
- package/scripts/spawn-parallel.js +72 -30
- package/src/core/agents/accessibility.md +19 -125
- package/src/core/agents/adr-writer.md +18 -1
- package/src/core/agents/analytics.md +19 -125
- package/src/core/agents/api.md +5 -130
- package/src/core/agents/ci.md +26 -131
- package/src/core/agents/compliance.md +21 -125
- package/src/core/agents/database.md +20 -125
- package/src/core/agents/datamigration.md +20 -125
- package/src/core/agents/design.md +19 -125
- package/src/core/agents/devops.md +12 -129
- package/src/core/agents/documentation.md +18 -1
- package/src/core/agents/epic-planner.md +31 -10
- package/src/core/agents/integrations.md +19 -125
- package/src/core/agents/mobile.md +19 -125
- package/src/core/agents/monitoring.md +19 -125
- package/src/core/agents/performance.md +19 -125
- package/src/core/agents/product.md +18 -1
- package/src/core/agents/qa.md +21 -125
- package/src/core/agents/readme-updater.md +18 -1
- package/src/core/agents/refactor.md +19 -125
- package/src/core/agents/research.md +3 -1
- package/src/core/agents/rlm-subcore.md +202 -0
- package/src/core/agents/security.md +7 -125
- package/src/core/agents/testing.md +20 -125
- package/src/core/agents/ui.md +14 -135
- package/src/core/commands/adr/list.md +20 -0
- package/src/core/commands/adr/update.md +24 -1
- package/src/core/commands/adr/view.md +23 -1
- package/src/core/commands/adr.md +2 -2
- package/src/core/commands/agent.md +11 -1
- package/src/core/commands/assign.md +15 -6
- package/src/core/commands/auto.md +11 -1
- package/src/core/commands/babysit.md +15 -4
- package/src/core/commands/baseline.md +11 -1
- package/src/core/commands/batch.md +11 -1
- package/src/core/commands/blockers.md +11 -1
- package/src/core/commands/board.md +11 -1
- package/src/core/commands/changelog.md +11 -0
- package/src/core/commands/choose.md +16 -1
- package/src/core/commands/ci.md +11 -1
- package/src/core/commands/configure.md +73 -2
- package/src/core/commands/context/export.md +8 -0
- package/src/core/commands/context/full.md +8 -0
- package/src/core/commands/context/note.md +8 -0
- package/src/core/commands/debt.md +11 -0
- package/src/core/commands/deploy.md +10 -0
- package/src/core/commands/deps.md +11 -1
- package/src/core/commands/diagnose.md +10 -0
- package/src/core/commands/docs.md +12 -2
- package/src/core/commands/epic/list.md +20 -0
- package/src/core/commands/epic/view.md +25 -0
- package/src/core/commands/epic.md +5 -6
- package/src/core/commands/feedback.md +11 -0
- package/src/core/commands/handoff.md +12 -2
- package/src/core/commands/help.md +10 -0
- package/src/core/commands/ideate.md +10 -0
- package/src/core/commands/impact.md +11 -1
- package/src/core/commands/metrics.md +11 -1
- package/src/core/commands/multi-expert.md +11 -1
- package/src/core/commands/packages.md +11 -0
- package/src/core/commands/pr.md +10 -0
- package/src/core/commands/readme-sync.md +10 -5
- package/src/core/commands/research/analyze.md +60 -3
- package/src/core/commands/research/ask.md +9 -1
- package/src/core/commands/research/import.md +8 -0
- package/src/core/commands/research/list.md +8 -0
- package/src/core/commands/research/synthesize.md +9 -1
- package/src/core/commands/research/view.md +8 -0
- package/src/core/commands/retro.md +12 -2
- package/src/core/commands/review.md +11 -1
- package/src/core/commands/rlm.md +363 -0
- package/src/core/commands/roadmap/analyze.md +1 -1
- package/src/core/commands/rpi.md +9 -1
- package/src/core/commands/session/cleanup.md +250 -0
- package/src/core/commands/session/end.md +10 -0
- package/src/core/commands/session/history.md +11 -1
- package/src/core/commands/session/init.md +10 -0
- package/src/core/commands/session/new.md +132 -13
- package/src/core/commands/session/resume.md +10 -0
- package/src/core/commands/session/spawn.md +8 -0
- package/src/core/commands/session/status.md +10 -0
- package/src/core/commands/skill/create.md +1 -1
- package/src/core/commands/skill/delete.md +11 -1
- package/src/core/commands/skill/edit.md +11 -1
- package/src/core/commands/skill/test.md +11 -1
- package/src/core/commands/skill/upgrade.md +11 -1
- package/src/core/commands/sprint.md +14 -3
- package/src/core/commands/status.md +15 -6
- package/src/core/commands/story/list.md +23 -0
- package/src/core/commands/story/view.md +24 -0
- package/src/core/commands/story.md +4 -5
- package/src/core/commands/template.md +10 -0
- package/src/core/commands/tests.md +10 -0
- package/src/core/commands/update.md +10 -0
- package/src/core/commands/validate-expertise.md +10 -1
- package/src/core/commands/velocity.md +11 -1
- package/src/core/commands/verify.md +13 -1
- package/src/core/commands/whats-new.md +8 -0
- package/src/core/commands/workflow.md +16 -1
- package/src/core/templates/agent-coordination-pattern.md +38 -0
- package/src/core/templates/agileflow-metadata.json +25 -0
- package/src/core/templates/preserve-rules-common.md +107 -0
- package/src/core/templates/preserve-rules.json +42 -0
- package/src/core/templates/proactive-action-spec.md +29 -0
- package/src/core/templates/quality-gate-priorities.md +34 -0
- package/src/core/templates/session-harness-protocol.md +128 -0
- package/tools/cli/commands/setup.js +12 -3
- package/tools/cli/installers/ide/windsurf.js +1 -1
- package/tools/cli/lib/content-injector.js +336 -0
- package/tools/cli/lib/ide-registry.js +2 -4
- package/tools/cli/lib/ui.js +2 -1
|
@@ -120,7 +120,12 @@ grep -r "BEGIN PRIVATE KEY\|-----BEGIN" --include="*.txt" --include="*.env"
|
|
|
120
120
|
|
|
121
121
|
### 🚨 RULE #5: COORDINATION WITH ALL AGENTS
|
|
122
122
|
|
|
123
|
-
**Security affects everything** - coordinate
|
|
123
|
+
**Security affects everything** - coordinate with agents when their work touches security:
|
|
124
|
+
|
|
125
|
+
**Coordination Triggers**:
|
|
126
|
+
- **On story assignment**: Check if story involves auth, data handling, or external input
|
|
127
|
+
- **After finding vulnerability**: Send bus message to affected agent(s)
|
|
128
|
+
- **After completing security fix**: Send unblock message if other agents were waiting
|
|
124
129
|
|
|
125
130
|
| Agent | Coordination |
|
|
126
131
|
|-------|--------------|
|
|
@@ -237,131 +242,8 @@ BOUNDARIES
|
|
|
237
242
|
- Always err on side of caution with security decisions
|
|
238
243
|
|
|
239
244
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
**CRITICAL**: Session Harness System prevents agents from breaking functionality, claiming work is done when tests fail, or losing context between sessions.
|
|
243
|
-
|
|
244
|
-
**PRE-IMPLEMENTATION VERIFICATION**
|
|
245
|
-
|
|
246
|
-
Before starting work on ANY story:
|
|
247
|
-
|
|
248
|
-
1. **Check Session Harness**:
|
|
249
|
-
- Look for `docs/00-meta/environment.json`
|
|
250
|
-
- If exists → Session harness is active ✅
|
|
251
|
-
- If missing → Suggest `/agileflow:session:init` to user
|
|
252
|
-
|
|
253
|
-
2. **Test Baseline Check**:
|
|
254
|
-
- Read `test_status` from story in `docs/09-agents/status.json`
|
|
255
|
-
- If `"passing"` → Proceed with implementation ✅
|
|
256
|
-
- If `"failing"` → STOP. Cannot start new work with failing baseline ⚠️
|
|
257
|
-
- If `"not_run"` → Run `/agileflow:verify` first to establish baseline
|
|
258
|
-
- If `"skipped"` → Check why tests are skipped, document override decision
|
|
259
|
-
|
|
260
|
-
3. **Environment Verification** (if session harness active):
|
|
261
|
-
- Run `/agileflow:session:resume` to verify environment and load context
|
|
262
|
-
- Check for regressions (tests were passing, now failing)
|
|
263
|
-
- If regression detected → Fix before proceeding with new story
|
|
264
|
-
|
|
265
|
-
**DURING IMPLEMENTATION**
|
|
266
|
-
|
|
267
|
-
1. **Incremental Testing**:
|
|
268
|
-
- Run tests frequently during development (not just at end)
|
|
269
|
-
- Fix test failures immediately (don't accumulate debt)
|
|
270
|
-
- Use `/agileflow:verify US-XXXX` to check specific story tests
|
|
271
|
-
|
|
272
|
-
2. **Real-time Status Updates**:
|
|
273
|
-
- Update `test_status` in status.json as tests are written/fixed
|
|
274
|
-
- Append bus messages when tests pass milestone checkpoints
|
|
275
|
-
|
|
276
|
-
**POST-IMPLEMENTATION VERIFICATION**
|
|
277
|
-
|
|
278
|
-
After completing ANY changes:
|
|
279
|
-
|
|
280
|
-
1. **Run Full Test Suite**:
|
|
281
|
-
- Execute `/agileflow:verify US-XXXX` to run tests for the story
|
|
282
|
-
- Check exit code (0 = success required for completion)
|
|
283
|
-
- Review test output for warnings or flaky tests
|
|
284
|
-
|
|
285
|
-
2. **Update Test Status**:
|
|
286
|
-
- `/agileflow:verify` automatically updates `test_status` in status.json
|
|
287
|
-
- Verify the update was successful
|
|
288
|
-
- Expected: `test_status: "passing"` with test results metadata
|
|
289
|
-
|
|
290
|
-
3. **Regression Check**:
|
|
291
|
-
- Compare test results to baseline (initial test status)
|
|
292
|
-
- If new failures introduced → Fix before marking complete
|
|
293
|
-
- If test count decreased → Investigate deleted tests
|
|
294
|
-
|
|
295
|
-
4. **Story Completion Requirements**:
|
|
296
|
-
- Story can ONLY be marked `"in-review"` if `test_status: "passing"` ✅
|
|
297
|
-
- If tests failing → Story remains `"in-progress"` until fixed ⚠️
|
|
298
|
-
- No exceptions unless documented override (see below)
|
|
299
|
-
|
|
300
|
-
**OVERRIDE PROTOCOL** (Use with extreme caution)
|
|
301
|
-
|
|
302
|
-
If tests are failing but you need to proceed:
|
|
303
|
-
|
|
304
|
-
1. **Document Override Decision**:
|
|
305
|
-
- Append bus message with full explanation (include agent ID, story ID, reason, tracking issue)
|
|
306
|
-
|
|
307
|
-
2. **Update Story Dev Agent Record**:
|
|
308
|
-
- Add note to "Issues Encountered" section explaining override
|
|
309
|
-
- Link to tracking issue for the failing test
|
|
310
|
-
- Document risk and mitigation plan
|
|
311
|
-
|
|
312
|
-
3. **Create Follow-up Story**:
|
|
313
|
-
- If test failure is real but out of scope → Create new story
|
|
314
|
-
- Link dependency in status.json
|
|
315
|
-
- Notify user of the override and follow-up story
|
|
316
|
-
|
|
317
|
-
**BASELINE MANAGEMENT**
|
|
318
|
-
|
|
319
|
-
After completing major milestones (epic complete, sprint end):
|
|
320
|
-
|
|
321
|
-
1. **Establish Baseline**:
|
|
322
|
-
- Suggest `/agileflow:baseline "Epic EP-XXXX complete"` to user
|
|
323
|
-
- Requires: All tests passing, git working tree clean
|
|
324
|
-
- Creates git tag + metadata for reset point
|
|
325
|
-
|
|
326
|
-
2. **Baseline Benefits**:
|
|
327
|
-
- Known-good state to reset to if needed
|
|
328
|
-
- Regression detection reference point
|
|
329
|
-
- Deployment readiness checkpoint
|
|
330
|
-
- Sprint/epic completion marker
|
|
331
|
-
|
|
332
|
-
**INTEGRATION WITH WORKFLOW**
|
|
333
|
-
|
|
334
|
-
The verification protocol integrates into the standard workflow:
|
|
335
|
-
|
|
336
|
-
1. **Before creating feature branch**: Run pre-implementation verification
|
|
337
|
-
2. **Before marking in-review**: Run post-implementation verification
|
|
338
|
-
3. **After merge**: Verify baseline is still passing
|
|
339
|
-
|
|
340
|
-
**ERROR HANDLING**
|
|
341
|
-
|
|
342
|
-
If `/agileflow:verify` fails:
|
|
343
|
-
- Read error output carefully
|
|
344
|
-
- Check if test command is configured in `docs/00-meta/environment.json`
|
|
345
|
-
- Verify test dependencies are installed
|
|
346
|
-
- If project has no tests → Suggest `/agileflow:session:init` to set up testing
|
|
347
|
-
- If tests are misconfigured → Coordinate with AG-CI
|
|
348
|
-
|
|
349
|
-
**SESSION RESUME PROTOCOL**
|
|
350
|
-
|
|
351
|
-
When resuming work after context loss:
|
|
352
|
-
|
|
353
|
-
1. **Run Resume Command**: `/agileflow:session:resume` loads context automatically
|
|
354
|
-
2. **Check Session State**: Review `docs/09-agents/session-state.json`
|
|
355
|
-
3. **Verify Test Status**: Ensure no regressions occurred
|
|
356
|
-
4. **Load Previous Insights**: Check Dev Agent Record from previous stories
|
|
357
|
-
|
|
358
|
-
**KEY PRINCIPLES**
|
|
245
|
+
<!-- {{SESSION_HARNESS}} -->
|
|
359
246
|
|
|
360
|
-
- **Tests are the contract**: Passing tests = feature works as specified
|
|
361
|
-
- **Fail fast**: Catch regressions immediately, not at PR review
|
|
362
|
-
- **Context preservation**: Session harness maintains progress across context windows
|
|
363
|
-
- **Transparency**: Document all override decisions fully
|
|
364
|
-
- **Accountability**: test_status field creates audit trail
|
|
365
247
|
|
|
366
248
|
SECURITY CHECKLIST (Pre-Release MANDATORY)
|
|
367
249
|
|
|
@@ -249,131 +249,8 @@ BOUNDARIES
|
|
|
249
249
|
- Always focus on behavior, not implementation
|
|
250
250
|
|
|
251
251
|
|
|
252
|
-
|
|
252
|
+
<!-- {{SESSION_HARNESS}} -->
|
|
253
253
|
|
|
254
|
-
**CRITICAL**: Session Harness System prevents agents from breaking functionality, claiming work is done when tests fail, or losing context between sessions.
|
|
255
|
-
|
|
256
|
-
**PRE-IMPLEMENTATION VERIFICATION**
|
|
257
|
-
|
|
258
|
-
Before starting work on ANY story:
|
|
259
|
-
|
|
260
|
-
1. **Check Session Harness**:
|
|
261
|
-
- Look for `docs/00-meta/environment.json`
|
|
262
|
-
- If exists → Session harness is active ✅
|
|
263
|
-
- If missing → Suggest `/agileflow:session:init` to user
|
|
264
|
-
|
|
265
|
-
2. **Test Baseline Check**:
|
|
266
|
-
- Read `test_status` from story in `docs/09-agents/status.json`
|
|
267
|
-
- If `"passing"` → Proceed with implementation ✅
|
|
268
|
-
- If `"failing"` → STOP. Cannot start new work with failing baseline ⚠️
|
|
269
|
-
- If `"not_run"` → Run `/agileflow:verify` first to establish baseline
|
|
270
|
-
- If `"skipped"` → Check why tests are skipped, document override decision
|
|
271
|
-
|
|
272
|
-
3. **Environment Verification** (if session harness active):
|
|
273
|
-
- Run `/agileflow:session:resume` to verify environment and load context
|
|
274
|
-
- Check for regressions (tests were passing, now failing)
|
|
275
|
-
- If regression detected → Fix before proceeding with new story
|
|
276
|
-
|
|
277
|
-
**DURING IMPLEMENTATION**
|
|
278
|
-
|
|
279
|
-
1. **Incremental Testing**:
|
|
280
|
-
- Run tests frequently during development (not just at end)
|
|
281
|
-
- Fix test failures immediately (don't accumulate debt)
|
|
282
|
-
- Use `/agileflow:verify US-XXXX` to check specific story tests
|
|
283
|
-
|
|
284
|
-
2. **Real-time Status Updates**:
|
|
285
|
-
- Update `test_status` in status.json as tests are written/fixed
|
|
286
|
-
- Append bus messages when tests pass milestone checkpoints
|
|
287
|
-
|
|
288
|
-
**POST-IMPLEMENTATION VERIFICATION**
|
|
289
|
-
|
|
290
|
-
After completing ANY changes:
|
|
291
|
-
|
|
292
|
-
1. **Run Full Test Suite**:
|
|
293
|
-
- Execute `/agileflow:verify US-XXXX` to run tests for the story
|
|
294
|
-
- Check exit code (0 = success required for completion)
|
|
295
|
-
- Review test output for warnings or flaky tests
|
|
296
|
-
|
|
297
|
-
2. **Update Test Status**:
|
|
298
|
-
- `/agileflow:verify` automatically updates `test_status` in status.json
|
|
299
|
-
- Verify the update was successful
|
|
300
|
-
- Expected: `test_status: "passing"` with test results metadata
|
|
301
|
-
|
|
302
|
-
3. **Regression Check**:
|
|
303
|
-
- Compare test results to baseline (initial test status)
|
|
304
|
-
- If new failures introduced → Fix before marking complete
|
|
305
|
-
- If test count decreased → Investigate deleted tests
|
|
306
|
-
|
|
307
|
-
4. **Story Completion Requirements**:
|
|
308
|
-
- Story can ONLY be marked `"in-review"` if `test_status: "passing"` ✅
|
|
309
|
-
- If tests failing → Story remains `"in-progress"` until fixed ⚠️
|
|
310
|
-
- No exceptions unless documented override (see below)
|
|
311
|
-
|
|
312
|
-
**OVERRIDE PROTOCOL** (Use with extreme caution)
|
|
313
|
-
|
|
314
|
-
If tests are failing but you need to proceed:
|
|
315
|
-
|
|
316
|
-
1. **Document Override Decision**:
|
|
317
|
-
- Append bus message with full explanation (include agent ID, story ID, reason, tracking issue)
|
|
318
|
-
|
|
319
|
-
2. **Update Story Dev Agent Record**:
|
|
320
|
-
- Add note to "Issues Encountered" section explaining override
|
|
321
|
-
- Link to tracking issue for the failing test
|
|
322
|
-
- Document risk and mitigation plan
|
|
323
|
-
|
|
324
|
-
3. **Create Follow-up Story**:
|
|
325
|
-
- If test failure is real but out of scope → Create new story
|
|
326
|
-
- Link dependency in status.json
|
|
327
|
-
- Notify user of the override and follow-up story
|
|
328
|
-
|
|
329
|
-
**BASELINE MANAGEMENT**
|
|
330
|
-
|
|
331
|
-
After completing major milestones (epic complete, sprint end):
|
|
332
|
-
|
|
333
|
-
1. **Establish Baseline**:
|
|
334
|
-
- Suggest `/agileflow:baseline "Epic EP-XXXX complete"` to user
|
|
335
|
-
- Requires: All tests passing, git working tree clean
|
|
336
|
-
- Creates git tag + metadata for reset point
|
|
337
|
-
|
|
338
|
-
2. **Baseline Benefits**:
|
|
339
|
-
- Known-good state to reset to if needed
|
|
340
|
-
- Regression detection reference point
|
|
341
|
-
- Deployment readiness checkpoint
|
|
342
|
-
- Sprint/epic completion marker
|
|
343
|
-
|
|
344
|
-
**INTEGRATION WITH WORKFLOW**
|
|
345
|
-
|
|
346
|
-
The verification protocol integrates into the standard workflow:
|
|
347
|
-
|
|
348
|
-
1. **Before creating feature branch**: Run pre-implementation verification
|
|
349
|
-
2. **Before marking in-review**: Run post-implementation verification
|
|
350
|
-
3. **After merge**: Verify baseline is still passing
|
|
351
|
-
|
|
352
|
-
**ERROR HANDLING**
|
|
353
|
-
|
|
354
|
-
If `/agileflow:verify` fails:
|
|
355
|
-
- Read error output carefully
|
|
356
|
-
- Check if test command is configured in `docs/00-meta/environment.json`
|
|
357
|
-
- Verify test dependencies are installed
|
|
358
|
-
- If project has no tests → Suggest `/agileflow:session:init` to set up testing
|
|
359
|
-
- If tests are misconfigured → Coordinate with AG-CI
|
|
360
|
-
|
|
361
|
-
**SESSION RESUME PROTOCOL**
|
|
362
|
-
|
|
363
|
-
When resuming work after context loss:
|
|
364
|
-
|
|
365
|
-
1. **Run Resume Command**: `/agileflow:session:resume` loads context automatically
|
|
366
|
-
2. **Check Session State**: Review `docs/09-agents/session-state.json`
|
|
367
|
-
3. **Verify Test Status**: Ensure no regressions occurred
|
|
368
|
-
4. **Load Previous Insights**: Check Dev Agent Record from previous stories
|
|
369
|
-
|
|
370
|
-
**KEY PRINCIPLES**
|
|
371
|
-
|
|
372
|
-
- **Tests are the contract**: Passing tests = feature works as specified
|
|
373
|
-
- **Fail fast**: Catch regressions immediately, not at PR review
|
|
374
|
-
- **Context preservation**: Session harness maintains progress across context windows
|
|
375
|
-
- **Transparency**: Document all override decisions fully
|
|
376
|
-
- **Accountability**: test_status field creates audit trail
|
|
377
254
|
|
|
378
255
|
TEST CATEGORIES
|
|
379
256
|
|
|
@@ -564,7 +441,9 @@ WORKFLOW
|
|
|
564
441
|
|
|
565
442
|
11. Sync externally if enabled
|
|
566
443
|
|
|
567
|
-
|
|
444
|
+
<!-- {{QUALITY_GATE_PRIORITIES}} -->
|
|
445
|
+
|
|
446
|
+
QUALITY CHECKLIST (AG-TESTING Specific)
|
|
568
447
|
|
|
569
448
|
Before approval:
|
|
570
449
|
- [ ] Test coverage ≥70% (critical paths 100%)
|
|
@@ -578,6 +457,22 @@ Before approval:
|
|
|
578
457
|
- [ ] Test fixtures reusable and well-documented
|
|
579
458
|
- [ ] Coverage report generated and reviewed
|
|
580
459
|
|
|
460
|
+
AGENT COORDINATION
|
|
461
|
+
|
|
462
|
+
**Coordinates with**:
|
|
463
|
+
- **AG-CI**: Test infrastructure (send test requirements, receive CI pipeline status)
|
|
464
|
+
- **AG-QA**: Test strategy (send coverage metrics, receive test plan requirements)
|
|
465
|
+
- **AG-API/AG-UI**: Implementation testing (receive feature completions, send test results)
|
|
466
|
+
|
|
467
|
+
**Bus Messages** (append to `docs/09-agents/bus/log.jsonl`):
|
|
468
|
+
```jsonl
|
|
469
|
+
{"ts":"<ISO>","from":"AG-TESTING","type":"status","story":"<US-ID>","text":"Tests complete: [X] passed, [Y] failed, [Z]% coverage"}
|
|
470
|
+
{"ts":"<ISO>","from":"AG-TESTING","type":"finding","story":"<US-ID>","text":"Finding: Coverage gap in [module] - [critical path] not tested"}
|
|
471
|
+
{"ts":"<ISO>","from":"AG-TESTING","type":"blocked","story":"<US-ID>","text":"Blocked: Test database not configured"}
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
**On invocation**: Check bus for feature completions that need test coverage.
|
|
475
|
+
|
|
581
476
|
FIRST ACTION
|
|
582
477
|
|
|
583
478
|
**CRITICAL: Load Expertise First (Agent Expert Protocol)**
|
package/src/core/agents/ui.md
CHANGED
|
@@ -278,134 +278,8 @@ BOUNDARIES
|
|
|
278
278
|
- Do NOT commit credentials, tokens, or secrets
|
|
279
279
|
- Do NOT reassign stories without explicit request
|
|
280
280
|
|
|
281
|
-
|
|
281
|
+
<!-- {{SESSION_HARNESS}} -->
|
|
282
282
|
|
|
283
|
-
**CRITICAL**: Session Harness System prevents agents from breaking functionality, claiming work is done when tests fail, or losing context between sessions.
|
|
284
|
-
|
|
285
|
-
**PRE-IMPLEMENTATION VERIFICATION**
|
|
286
|
-
|
|
287
|
-
Before starting work on ANY story:
|
|
288
|
-
|
|
289
|
-
1. **Check Session Harness**:
|
|
290
|
-
- Look for `docs/00-meta/environment.json`
|
|
291
|
-
- If exists → Session harness is active ✅
|
|
292
|
-
- If missing → Suggest `/agileflow:session:init` to user
|
|
293
|
-
|
|
294
|
-
2. **Test Baseline Check**:
|
|
295
|
-
- Read `test_status` from story in `docs/09-agents/status.json`
|
|
296
|
-
- If `"passing"` → Proceed with implementation ✅
|
|
297
|
-
- If `"failing"` → STOP. Cannot start new work with failing baseline ⚠️
|
|
298
|
-
- If `"not_run"` → Run `/agileflow:verify` first to establish baseline
|
|
299
|
-
- If `"skipped"` → Check why tests are skipped, document override decision
|
|
300
|
-
|
|
301
|
-
3. **Environment Verification** (if session harness active):
|
|
302
|
-
- Run `/agileflow:session:resume` to verify environment and load context
|
|
303
|
-
- Check for regressions (tests were passing, now failing)
|
|
304
|
-
- If regression detected → Fix before proceeding with new story
|
|
305
|
-
|
|
306
|
-
**DURING IMPLEMENTATION**
|
|
307
|
-
|
|
308
|
-
1. **Incremental Testing**:
|
|
309
|
-
- Run tests frequently during development (not just at end)
|
|
310
|
-
- Fix test failures immediately (don't accumulate debt)
|
|
311
|
-
- Use `/agileflow:verify US-XXXX` to check specific story tests
|
|
312
|
-
|
|
313
|
-
2. **Real-time Status Updates**:
|
|
314
|
-
- Update `test_status` in status.json as tests are written/fixed
|
|
315
|
-
- Append bus messages when tests pass milestone checkpoints
|
|
316
|
-
|
|
317
|
-
**POST-IMPLEMENTATION VERIFICATION**
|
|
318
|
-
|
|
319
|
-
After completing ANY changes:
|
|
320
|
-
|
|
321
|
-
1. **Run Full Test Suite**:
|
|
322
|
-
- Execute `/agileflow:verify US-XXXX` to run tests for the story
|
|
323
|
-
- Check exit code (0 = success required for completion)
|
|
324
|
-
- Review test output for warnings or flaky tests
|
|
325
|
-
|
|
326
|
-
2. **Update Test Status**:
|
|
327
|
-
- `/agileflow:verify` automatically updates `test_status` in status.json
|
|
328
|
-
- Verify the update was successful
|
|
329
|
-
- Expected: `test_status: "passing"` with test results metadata
|
|
330
|
-
|
|
331
|
-
3. **Regression Check**:
|
|
332
|
-
- Compare test results to baseline (initial test status)
|
|
333
|
-
- If new failures introduced → Fix before marking complete
|
|
334
|
-
- If test count decreased → Investigate deleted tests
|
|
335
|
-
|
|
336
|
-
4. **Story Completion Requirements**:
|
|
337
|
-
- Story can ONLY be marked `"in-review"` if `test_status: "passing"` ✅
|
|
338
|
-
- If tests failing → Story remains `"in-progress"` until fixed ⚠️
|
|
339
|
-
- No exceptions unless documented override (see below)
|
|
340
|
-
|
|
341
|
-
**OVERRIDE PROTOCOL** (Use with extreme caution)
|
|
342
|
-
|
|
343
|
-
If tests are failing but you need to proceed:
|
|
344
|
-
|
|
345
|
-
1. **Document Override Decision**:
|
|
346
|
-
- Append bus message with full explanation:
|
|
347
|
-
```jsonl
|
|
348
|
-
{"ts":"2025-12-06T14:00:00Z","from":"AG-UI","type":"warning","story":"US-0043","text":"Override: Marking in-review with 1 failing test. Reason: Test is flaky and unrelated to this story. Tracked in US-0099."}
|
|
349
|
-
```
|
|
350
|
-
|
|
351
|
-
2. **Update Story Dev Agent Record**:
|
|
352
|
-
- Add note to "Issues Encountered" section explaining override
|
|
353
|
-
- Link to tracking issue for the failing test
|
|
354
|
-
- Document risk and mitigation plan
|
|
355
|
-
|
|
356
|
-
3. **Create Follow-up Story**:
|
|
357
|
-
- If test failure is real but out of scope → Create new story
|
|
358
|
-
- Link dependency in status.json
|
|
359
|
-
- Notify user of the override and follow-up story
|
|
360
|
-
|
|
361
|
-
**BASELINE MANAGEMENT**
|
|
362
|
-
|
|
363
|
-
After completing major milestones (epic complete, sprint end):
|
|
364
|
-
|
|
365
|
-
1. **Establish Baseline**:
|
|
366
|
-
- Suggest `/agileflow:baseline "Epic EP-XXXX complete"` to user
|
|
367
|
-
- Requires: All tests passing, git working tree clean
|
|
368
|
-
- Creates git tag + metadata for reset point
|
|
369
|
-
|
|
370
|
-
2. **Baseline Benefits**:
|
|
371
|
-
- Known-good state to reset to if needed
|
|
372
|
-
- Regression detection reference point
|
|
373
|
-
- Deployment readiness checkpoint
|
|
374
|
-
- Sprint/epic completion marker
|
|
375
|
-
|
|
376
|
-
**INTEGRATION WITH WORKFLOW**
|
|
377
|
-
|
|
378
|
-
The verification protocol integrates into the standard workflow:
|
|
379
|
-
|
|
380
|
-
1. **Before Step 7** (Create feature branch): Run pre-implementation verification
|
|
381
|
-
2. **Before Step 13** (Update to in-review): Run post-implementation verification
|
|
382
|
-
3. **After Step 17** (After merge): Verify baseline is still passing
|
|
383
|
-
|
|
384
|
-
**ERROR HANDLING**
|
|
385
|
-
|
|
386
|
-
If `/agileflow:verify` fails:
|
|
387
|
-
- Read error output carefully
|
|
388
|
-
- Check if test command is configured in `docs/00-meta/environment.json`
|
|
389
|
-
- Verify test dependencies are installed
|
|
390
|
-
- If project has no tests → Suggest `/agileflow:session:init` to set up testing
|
|
391
|
-
- If tests are misconfigured → Coordinate with AG-CI
|
|
392
|
-
|
|
393
|
-
**SESSION RESUME PROTOCOL**
|
|
394
|
-
|
|
395
|
-
When resuming work after context loss:
|
|
396
|
-
|
|
397
|
-
1. **Run Resume Command**: `/agileflow:session:resume` loads context automatically
|
|
398
|
-
2. **Check Session State**: Review `docs/09-agents/session-state.json`
|
|
399
|
-
3. **Verify Test Status**: Ensure no regressions occurred
|
|
400
|
-
4. **Load Previous Insights**: Check Dev Agent Record from previous stories
|
|
401
|
-
|
|
402
|
-
**KEY PRINCIPLES**
|
|
403
|
-
|
|
404
|
-
- **Tests are the contract**: Passing tests = feature works as specified
|
|
405
|
-
- **Fail fast**: Catch regressions immediately, not at PR review
|
|
406
|
-
- **Context preservation**: Session harness maintains progress across context windows
|
|
407
|
-
- **Transparency**: Document all override decisions fully
|
|
408
|
-
- **Accountability**: test_status field creates audit trail
|
|
409
283
|
|
|
410
284
|
DESIGN SYSTEM INITIALIZATION (Proactive - run before first UI story)
|
|
411
285
|
|
|
@@ -605,11 +479,11 @@ module.exports = {
|
|
|
605
479
|
- Replace hardcoded values with design tokens
|
|
606
480
|
- Test each component still renders correctly
|
|
607
481
|
|
|
608
|
-
**
|
|
609
|
-
- ✅ First
|
|
610
|
-
- ✅
|
|
611
|
-
- ✅
|
|
612
|
-
- ✅
|
|
482
|
+
**Trigger Conditions** (specific events that trigger design system check):
|
|
483
|
+
- ✅ **First UI story of session**: Check expertise.yaml `last_design_system_check` - if missing or >7 days, run check
|
|
484
|
+
- ✅ **User explicitly requests**: "design system", "design tokens", "styling setup"
|
|
485
|
+
- ✅ **Inconsistent styling detected**: While implementing, find hardcoded colors/spacing not in tokens
|
|
486
|
+
- ✅ **Theming story assigned**: Story title/AC mentions "dark mode", "theme", "branding"
|
|
613
487
|
|
|
614
488
|
**Benefits to Communicate**:
|
|
615
489
|
- ✅ Consistency: All components use same colors, spacing, fonts
|
|
@@ -619,7 +493,7 @@ module.exports = {
|
|
|
619
493
|
- ✅ Developer Experience: Autocomplete for design tokens
|
|
620
494
|
- ✅ Scalability: New components automatically match existing design
|
|
621
495
|
|
|
622
|
-
CLAUDE.MD MAINTENANCE (
|
|
496
|
+
CLAUDE.MD MAINTENANCE (Triggered After UI Pattern Changes)
|
|
623
497
|
|
|
624
498
|
**CRITICAL**: CLAUDE.md is the AI assistant's system prompt - it should reflect current styling practices and design patterns.
|
|
625
499
|
|
|
@@ -718,7 +592,10 @@ README.MD MAINTENANCE (Proactive - CRITICAL PRIORITY for UI work)
|
|
|
718
592
|
- Created icon library → Document icon component usage and available icons
|
|
719
593
|
- Added responsive navigation → Update component catalog and mobile-specific notes
|
|
720
594
|
|
|
721
|
-
**
|
|
595
|
+
**README Update Trigger**:
|
|
596
|
+
- **Condition**: After completing work that adds/changes design system, components, or UI patterns
|
|
597
|
+
- **Detection**: Files modified in `components/`, `styles/`, or design token files
|
|
598
|
+
- **Action**: Suggest README update with specific changes: "I noticed I modified [files]. Should I update the README to document [specific changes]?"
|
|
722
599
|
|
|
723
600
|
SLASH COMMANDS (Proactive Use)
|
|
724
601
|
|
|
@@ -1074,7 +951,9 @@ UX LAWS & DESIGN FUNDAMENTALS
|
|
|
1074
951
|
- ✅ Case-insensitive email validation
|
|
1075
952
|
- Pattern: Auto-format as user types
|
|
1076
953
|
|
|
1077
|
-
|
|
954
|
+
<!-- {{QUALITY_GATE_PRIORITIES}} -->
|
|
955
|
+
|
|
956
|
+
QUALITY CHECKLIST (AG-UI Specific)
|
|
1078
957
|
Before marking in-review, verify:
|
|
1079
958
|
|
|
1080
959
|
**Functionality**:
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: List all Architecture Decision Records
|
|
3
3
|
argument-hint: [STATUS=<status>]
|
|
4
|
+
compact_context:
|
|
5
|
+
priority: medium
|
|
6
|
+
preserve_rules:
|
|
7
|
+
- "ACTIVE COMMAND: /agileflow:adr:list - Lists all ADRs with status and quick actions"
|
|
8
|
+
- "MUST read docs/03-decisions/ directory for ADR files"
|
|
9
|
+
- "MUST parse frontmatter for status, date, tags"
|
|
10
|
+
- "MUST display table sorted by number with status indicators"
|
|
11
|
+
- "MUST offer actions: view details, create new, update status"
|
|
12
|
+
- "This is READ-ONLY - no file writes"
|
|
13
|
+
state_fields:
|
|
14
|
+
- status_filter
|
|
15
|
+
- adr_count
|
|
4
16
|
---
|
|
5
17
|
|
|
6
18
|
# /agileflow:adr:list
|
|
@@ -21,6 +33,14 @@ Shows all ADRs from `docs/03-decisions/` with:
|
|
|
21
33
|
|
|
22
34
|
---
|
|
23
35
|
|
|
36
|
+
## STEP 0: Gather Context
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
node .agileflow/scripts/obtain-context.js adr:list
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
24
44
|
<!-- COMPACT_SUMMARY_START -->
|
|
25
45
|
## Compact Summary
|
|
26
46
|
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Update ADR status or content
|
|
3
|
-
argument-hint: NUMBER=<
|
|
3
|
+
argument-hint: NUMBER=<number> [STATUS=<status>] [REASON=<text>]
|
|
4
|
+
compact_context:
|
|
5
|
+
priority: high
|
|
6
|
+
preserve_rules:
|
|
7
|
+
- "NUMBER is REQUIRED - always ask if missing"
|
|
8
|
+
- "Every status change MUST have documented reason"
|
|
9
|
+
- "Show preview of changes before writing (diff-first pattern)"
|
|
10
|
+
- "If superseded, MUST link to replacement ADR"
|
|
11
|
+
- "Never delete content - always append amendments"
|
|
12
|
+
- "Update timestamps in frontmatter when modifying"
|
|
13
|
+
state_fields:
|
|
14
|
+
- adr_number
|
|
15
|
+
- current_status
|
|
16
|
+
- new_status
|
|
17
|
+
- reason
|
|
18
|
+
- superseded_by
|
|
4
19
|
---
|
|
5
20
|
|
|
6
21
|
# /agileflow:adr:update
|
|
@@ -19,6 +34,14 @@ Allows you to:
|
|
|
19
34
|
|
|
20
35
|
---
|
|
21
36
|
|
|
37
|
+
## STEP 0: Gather Context
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
node .agileflow/scripts/obtain-context.js adr:update
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
22
45
|
<!-- COMPACT_SUMMARY_START -->
|
|
23
46
|
## Compact Summary
|
|
24
47
|
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: View ADR details with contextual actions
|
|
3
|
-
argument-hint: NUMBER=<
|
|
3
|
+
argument-hint: NUMBER=<number>
|
|
4
|
+
compact_context:
|
|
5
|
+
priority: medium
|
|
6
|
+
preserve_rules:
|
|
7
|
+
- "ACTIVE COMMAND: /agileflow:adr:view - Views ADR with context-aware actions"
|
|
8
|
+
- "MUST read ADR file from docs/03-decisions/adr-NUMBER-*.md"
|
|
9
|
+
- "MUST display full ADR content: context, decision, consequences, links"
|
|
10
|
+
- "MUST offer CONTEXT-AWARE actions based on ADR status"
|
|
11
|
+
- "STATUS=proposed → Accept, reject, request changes"
|
|
12
|
+
- "STATUS=accepted → Create stories, supersede, deprecate"
|
|
13
|
+
- "STATUS=deprecated/superseded → View history, replacement"
|
|
14
|
+
- "ALWAYS offer next steps via AskUserQuestion"
|
|
15
|
+
state_fields:
|
|
16
|
+
- selected_adr_number
|
|
17
|
+
- adr_status
|
|
4
18
|
---
|
|
5
19
|
|
|
6
20
|
# /agileflow:adr:view
|
|
@@ -19,6 +33,14 @@ Displays complete ADR information and offers **context-aware actions** based on
|
|
|
19
33
|
|
|
20
34
|
---
|
|
21
35
|
|
|
36
|
+
## STEP 0: Gather Context
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
node .agileflow/scripts/obtain-context.js adr:view
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
22
44
|
<!-- COMPACT_SUMMARY_START -->
|
|
23
45
|
## Compact Summary
|
|
24
46
|
|
package/src/core/commands/adr.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Create an Architecture Decision Record
|
|
3
|
-
argument-hint: NUMBER=<
|
|
3
|
+
argument-hint: NUMBER=<number> TITLE=<text> CONTEXT=<text> DECISION=<text> CONSEQUENCES=<text> [LINKS=<text>]
|
|
4
4
|
compact_context:
|
|
5
5
|
priority: medium
|
|
6
6
|
preserve_rules:
|
|
7
7
|
- "NUMBER is REQUIRED - must be 4-digit sequentially (0001, 0002, etc.)"
|
|
8
8
|
- "TITLE, CONTEXT, DECISION, CONSEQUENCES all REQUIRED"
|
|
9
9
|
- "Create ADR file in docs/03-decisions/adr-<NUMBER>-<slug>.md"
|
|
10
|
-
- "
|
|
10
|
+
- "{{RULES:file_preview}}"
|
|
11
11
|
- "Document BOTH positive and negative consequences"
|
|
12
12
|
- "Keep ADRs concise: 1-2 pages max"
|
|
13
13
|
- "Link related ADRs and stories in Related section"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Onboard a new agent with profile and contract
|
|
3
|
-
argument-hint: AGENT_ID=<id> ROLE=<
|
|
3
|
+
argument-hint: AGENT_ID=<id> ROLE=<text> [TOOLS=<list>] [SCOPE=<list>]
|
|
4
4
|
compact_context:
|
|
5
5
|
priority: high
|
|
6
6
|
preserve_rules:
|
|
@@ -225,6 +225,16 @@ Options:
|
|
|
225
225
|
[AskUserQuestion: "How to proceed?"]
|
|
226
226
|
```
|
|
227
227
|
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Related Commands
|
|
231
|
+
|
|
232
|
+
- `/agileflow:configure` - Manage AgileFlow features and hooks
|
|
233
|
+
- `/agileflow:story` - Create user stories for agents
|
|
234
|
+
- `/agileflow:status` - Update story status and progress
|
|
235
|
+
- `/agileflow:babysit` - Interactive mentor workflow
|
|
236
|
+
- `/agileflow:help` - Display AgileFlow overview
|
|
237
|
+
|
|
228
238
|
### Roster File Created
|
|
229
239
|
|
|
230
240
|
```
|
|
@@ -6,12 +6,11 @@ compact_context:
|
|
|
6
6
|
preserve_rules:
|
|
7
7
|
- "ACTIVE COMMAND: /agileflow:assign - Story assigner and owner changer"
|
|
8
8
|
- "MUST update story frontmatter (owner, status, updated timestamp)"
|
|
9
|
-
- "
|
|
10
|
-
- "
|
|
11
|
-
- "
|
|
12
|
-
- "
|
|
13
|
-
- "
|
|
14
|
-
- "Status values: ready|in-progress|blocked|in-review|done"
|
|
9
|
+
- "{{RULES:json_operations}}"
|
|
10
|
+
- "{{RULES:bus_messaging}}"
|
|
11
|
+
- "{{RULES:user_confirmation}}"
|
|
12
|
+
- "{{RULES:file_preview}}"
|
|
13
|
+
- "{{RULES:status_updates}}"
|
|
15
14
|
state_fields:
|
|
16
15
|
- story_id
|
|
17
16
|
- current_owner
|
|
@@ -357,3 +356,13 @@ Files to update:
|
|
|
357
356
|
New owner: AG-UI
|
|
358
357
|
Notification sent to both agents
|
|
359
358
|
```
|
|
359
|
+
|
|
360
|
+
---
|
|
361
|
+
|
|
362
|
+
## Related Commands
|
|
363
|
+
|
|
364
|
+
- `/agileflow:status` - Update story status
|
|
365
|
+
- `/agileflow:handoff` - Document work handoff
|
|
366
|
+
- `/agileflow:sprint` - Sprint planning
|
|
367
|
+
- `/agileflow:board` - Kanban board view
|
|
368
|
+
- `/agileflow:story:view` - View story details
|