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
|
@@ -251,131 +251,8 @@ BOUNDARIES
|
|
|
251
251
|
- Always prioritize data safety and business continuity
|
|
252
252
|
|
|
253
253
|
|
|
254
|
-
|
|
254
|
+
<!-- {{SESSION_HARNESS}} -->
|
|
255
255
|
|
|
256
|
-
**CRITICAL**: Session Harness System prevents agents from breaking functionality, claiming work is done when tests fail, or losing context between sessions.
|
|
257
|
-
|
|
258
|
-
**PRE-IMPLEMENTATION VERIFICATION**
|
|
259
|
-
|
|
260
|
-
Before starting work on ANY story:
|
|
261
|
-
|
|
262
|
-
1. **Check Session Harness**:
|
|
263
|
-
- Look for `docs/00-meta/environment.json`
|
|
264
|
-
- If exists → Session harness is active ✅
|
|
265
|
-
- If missing → Suggest `/agileflow:session:init` to user
|
|
266
|
-
|
|
267
|
-
2. **Test Baseline Check**:
|
|
268
|
-
- Read `test_status` from story in `docs/09-agents/status.json`
|
|
269
|
-
- If `"passing"` → Proceed with implementation ✅
|
|
270
|
-
- If `"failing"` → STOP. Cannot start new work with failing baseline ⚠️
|
|
271
|
-
- If `"not_run"` → Run `/agileflow:verify` first to establish baseline
|
|
272
|
-
- If `"skipped"` → Check why tests are skipped, document override decision
|
|
273
|
-
|
|
274
|
-
3. **Environment Verification** (if session harness active):
|
|
275
|
-
- Run `/agileflow:session:resume` to verify environment and load context
|
|
276
|
-
- Check for regressions (tests were passing, now failing)
|
|
277
|
-
- If regression detected → Fix before proceeding with new story
|
|
278
|
-
|
|
279
|
-
**DURING IMPLEMENTATION**
|
|
280
|
-
|
|
281
|
-
1. **Incremental Testing**:
|
|
282
|
-
- Run tests frequently during development (not just at end)
|
|
283
|
-
- Fix test failures immediately (don't accumulate debt)
|
|
284
|
-
- Use `/agileflow:verify US-XXXX` to check specific story tests
|
|
285
|
-
|
|
286
|
-
2. **Real-time Status Updates**:
|
|
287
|
-
- Update `test_status` in status.json as tests are written/fixed
|
|
288
|
-
- Append bus messages when tests pass milestone checkpoints
|
|
289
|
-
|
|
290
|
-
**POST-IMPLEMENTATION VERIFICATION**
|
|
291
|
-
|
|
292
|
-
After completing ANY changes:
|
|
293
|
-
|
|
294
|
-
1. **Run Full Test Suite**:
|
|
295
|
-
- Execute `/agileflow:verify US-XXXX` to run tests for the story
|
|
296
|
-
- Check exit code (0 = success required for completion)
|
|
297
|
-
- Review test output for warnings or flaky tests
|
|
298
|
-
|
|
299
|
-
2. **Update Test Status**:
|
|
300
|
-
- `/agileflow:verify` automatically updates `test_status` in status.json
|
|
301
|
-
- Verify the update was successful
|
|
302
|
-
- Expected: `test_status: "passing"` with test results metadata
|
|
303
|
-
|
|
304
|
-
3. **Regression Check**:
|
|
305
|
-
- Compare test results to baseline (initial test status)
|
|
306
|
-
- If new failures introduced → Fix before marking complete
|
|
307
|
-
- If test count decreased → Investigate deleted tests
|
|
308
|
-
|
|
309
|
-
4. **Story Completion Requirements**:
|
|
310
|
-
- Story can ONLY be marked `"in-review"` if `test_status: "passing"` ✅
|
|
311
|
-
- If tests failing → Story remains `"in-progress"` until fixed ⚠️
|
|
312
|
-
- No exceptions unless documented override (see below)
|
|
313
|
-
|
|
314
|
-
**OVERRIDE PROTOCOL** (Use with extreme caution)
|
|
315
|
-
|
|
316
|
-
If tests are failing but you need to proceed:
|
|
317
|
-
|
|
318
|
-
1. **Document Override Decision**:
|
|
319
|
-
- Append bus message with full explanation (include agent ID, story ID, reason, tracking issue)
|
|
320
|
-
|
|
321
|
-
2. **Update Story Dev Agent Record**:
|
|
322
|
-
- Add note to "Issues Encountered" section explaining override
|
|
323
|
-
- Link to tracking issue for the failing test
|
|
324
|
-
- Document risk and mitigation plan
|
|
325
|
-
|
|
326
|
-
3. **Create Follow-up Story**:
|
|
327
|
-
- If test failure is real but out of scope → Create new story
|
|
328
|
-
- Link dependency in status.json
|
|
329
|
-
- Notify user of the override and follow-up story
|
|
330
|
-
|
|
331
|
-
**BASELINE MANAGEMENT**
|
|
332
|
-
|
|
333
|
-
After completing major milestones (epic complete, sprint end):
|
|
334
|
-
|
|
335
|
-
1. **Establish Baseline**:
|
|
336
|
-
- Suggest `/agileflow:baseline "Epic EP-XXXX complete"` to user
|
|
337
|
-
- Requires: All tests passing, git working tree clean
|
|
338
|
-
- Creates git tag + metadata for reset point
|
|
339
|
-
|
|
340
|
-
2. **Baseline Benefits**:
|
|
341
|
-
- Known-good state to reset to if needed
|
|
342
|
-
- Regression detection reference point
|
|
343
|
-
- Deployment readiness checkpoint
|
|
344
|
-
- Sprint/epic completion marker
|
|
345
|
-
|
|
346
|
-
**INTEGRATION WITH WORKFLOW**
|
|
347
|
-
|
|
348
|
-
The verification protocol integrates into the standard workflow:
|
|
349
|
-
|
|
350
|
-
1. **Before creating feature branch**: Run pre-implementation verification
|
|
351
|
-
2. **Before marking in-review**: Run post-implementation verification
|
|
352
|
-
3. **After merge**: Verify baseline is still passing
|
|
353
|
-
|
|
354
|
-
**ERROR HANDLING**
|
|
355
|
-
|
|
356
|
-
If `/agileflow:verify` fails:
|
|
357
|
-
- Read error output carefully
|
|
358
|
-
- Check if test command is configured in `docs/00-meta/environment.json`
|
|
359
|
-
- Verify test dependencies are installed
|
|
360
|
-
- If project has no tests → Suggest `/agileflow:session:init` to set up testing
|
|
361
|
-
- If tests are misconfigured → Coordinate with AG-CI
|
|
362
|
-
|
|
363
|
-
**SESSION RESUME PROTOCOL**
|
|
364
|
-
|
|
365
|
-
When resuming work after context loss:
|
|
366
|
-
|
|
367
|
-
1. **Run Resume Command**: `/agileflow:session:resume` loads context automatically
|
|
368
|
-
2. **Check Session State**: Review `docs/09-agents/session-state.json`
|
|
369
|
-
3. **Verify Test Status**: Ensure no regressions occurred
|
|
370
|
-
4. **Load Previous Insights**: Check Dev Agent Record from previous stories
|
|
371
|
-
|
|
372
|
-
**KEY PRINCIPLES**
|
|
373
|
-
|
|
374
|
-
- **Tests are the contract**: Passing tests = feature works as specified
|
|
375
|
-
- **Fail fast**: Catch regressions immediately, not at PR review
|
|
376
|
-
- **Context preservation**: Session harness maintains progress across context windows
|
|
377
|
-
- **Transparency**: Document all override decisions fully
|
|
378
|
-
- **Accountability**: test_status field creates audit trail
|
|
379
256
|
|
|
380
257
|
ZERO-DOWNTIME MIGRATION PATTERNS
|
|
381
258
|
|
|
@@ -737,7 +614,9 @@ WORKFLOW
|
|
|
737
614
|
|
|
738
615
|
11. Sync externally if enabled
|
|
739
616
|
|
|
740
|
-
|
|
617
|
+
<!-- {{QUALITY_GATE_PRIORITIES}} -->
|
|
618
|
+
|
|
619
|
+
QUALITY CHECKLIST (AG-DATAMIGRATION Specific)
|
|
741
620
|
|
|
742
621
|
Before approval:
|
|
743
622
|
- [ ] Migration plan documented (steps, timeline, downtime)
|
|
@@ -751,6 +630,22 @@ Before approval:
|
|
|
751
630
|
- [ ] Post-migration validation plan created
|
|
752
631
|
- [ ] Communication plan created (who to notify)
|
|
753
632
|
|
|
633
|
+
AGENT COORDINATION
|
|
634
|
+
|
|
635
|
+
**Coordinates with**:
|
|
636
|
+
- **AG-DATABASE**: Schema changes during migration (send migration plan, receive schema dependencies)
|
|
637
|
+
- **AG-DEVOPS**: Deployment and rollback (send deployment requirements, coordinate on zero-downtime)
|
|
638
|
+
- **AG-MONITORING**: Migration health tracking (send metrics requirements, receive alerting setup)
|
|
639
|
+
|
|
640
|
+
**Bus Messages** (append to `docs/09-agents/bus/log.jsonl`):
|
|
641
|
+
```jsonl
|
|
642
|
+
{"ts":"<ISO>","from":"AG-DATAMIGRATION","type":"status","story":"<US-ID>","text":"Migration dry-run complete: [X] rows validated, ready for production"}
|
|
643
|
+
{"ts":"<ISO>","from":"AG-DATAMIGRATION","type":"blocked","story":"<US-ID>","text":"Blocked: Waiting for AG-DATABASE schema changes"}
|
|
644
|
+
{"ts":"<ISO>","from":"AG-DATAMIGRATION","type":"finding","story":"<US-ID>","text":"Finding: Data integrity issue detected in [table]"}
|
|
645
|
+
```
|
|
646
|
+
|
|
647
|
+
**On invocation**: Check bus for database schema changes that require migration.
|
|
648
|
+
|
|
754
649
|
FIRST ACTION
|
|
755
650
|
|
|
756
651
|
**CRITICAL: Load Expertise First (Agent Expert Protocol)**
|
|
@@ -243,131 +243,8 @@ BOUNDARIES
|
|
|
243
243
|
- Always design with implementation in mind
|
|
244
244
|
|
|
245
245
|
|
|
246
|
-
|
|
246
|
+
<!-- {{SESSION_HARNESS}} -->
|
|
247
247
|
|
|
248
|
-
**CRITICAL**: Session Harness System prevents agents from breaking functionality, claiming work is done when tests fail, or losing context between sessions.
|
|
249
|
-
|
|
250
|
-
**PRE-IMPLEMENTATION VERIFICATION**
|
|
251
|
-
|
|
252
|
-
Before starting work on ANY story:
|
|
253
|
-
|
|
254
|
-
1. **Check Session Harness**:
|
|
255
|
-
- Look for `docs/00-meta/environment.json`
|
|
256
|
-
- If exists → Session harness is active ✅
|
|
257
|
-
- If missing → Suggest `/agileflow:session:init` to user
|
|
258
|
-
|
|
259
|
-
2. **Test Baseline Check**:
|
|
260
|
-
- Read `test_status` from story in `docs/09-agents/status.json`
|
|
261
|
-
- If `"passing"` → Proceed with implementation ✅
|
|
262
|
-
- If `"failing"` → STOP. Cannot start new work with failing baseline ⚠️
|
|
263
|
-
- If `"not_run"` → Run `/agileflow:verify` first to establish baseline
|
|
264
|
-
- If `"skipped"` → Check why tests are skipped, document override decision
|
|
265
|
-
|
|
266
|
-
3. **Environment Verification** (if session harness active):
|
|
267
|
-
- Run `/agileflow:session:resume` to verify environment and load context
|
|
268
|
-
- Check for regressions (tests were passing, now failing)
|
|
269
|
-
- If regression detected → Fix before proceeding with new story
|
|
270
|
-
|
|
271
|
-
**DURING IMPLEMENTATION**
|
|
272
|
-
|
|
273
|
-
1. **Incremental Testing**:
|
|
274
|
-
- Run tests frequently during development (not just at end)
|
|
275
|
-
- Fix test failures immediately (don't accumulate debt)
|
|
276
|
-
- Use `/agileflow:verify US-XXXX` to check specific story tests
|
|
277
|
-
|
|
278
|
-
2. **Real-time Status Updates**:
|
|
279
|
-
- Update `test_status` in status.json as tests are written/fixed
|
|
280
|
-
- Append bus messages when tests pass milestone checkpoints
|
|
281
|
-
|
|
282
|
-
**POST-IMPLEMENTATION VERIFICATION**
|
|
283
|
-
|
|
284
|
-
After completing ANY changes:
|
|
285
|
-
|
|
286
|
-
1. **Run Full Test Suite**:
|
|
287
|
-
- Execute `/agileflow:verify US-XXXX` to run tests for the story
|
|
288
|
-
- Check exit code (0 = success required for completion)
|
|
289
|
-
- Review test output for warnings or flaky tests
|
|
290
|
-
|
|
291
|
-
2. **Update Test Status**:
|
|
292
|
-
- `/agileflow:verify` automatically updates `test_status` in status.json
|
|
293
|
-
- Verify the update was successful
|
|
294
|
-
- Expected: `test_status: "passing"` with test results metadata
|
|
295
|
-
|
|
296
|
-
3. **Regression Check**:
|
|
297
|
-
- Compare test results to baseline (initial test status)
|
|
298
|
-
- If new failures introduced → Fix before marking complete
|
|
299
|
-
- If test count decreased → Investigate deleted tests
|
|
300
|
-
|
|
301
|
-
4. **Story Completion Requirements**:
|
|
302
|
-
- Story can ONLY be marked `"in-review"` if `test_status: "passing"` ✅
|
|
303
|
-
- If tests failing → Story remains `"in-progress"` until fixed ⚠️
|
|
304
|
-
- No exceptions unless documented override (see below)
|
|
305
|
-
|
|
306
|
-
**OVERRIDE PROTOCOL** (Use with extreme caution)
|
|
307
|
-
|
|
308
|
-
If tests are failing but you need to proceed:
|
|
309
|
-
|
|
310
|
-
1. **Document Override Decision**:
|
|
311
|
-
- Append bus message with full explanation (include agent ID, story ID, reason, tracking issue)
|
|
312
|
-
|
|
313
|
-
2. **Update Story Dev Agent Record**:
|
|
314
|
-
- Add note to "Issues Encountered" section explaining override
|
|
315
|
-
- Link to tracking issue for the failing test
|
|
316
|
-
- Document risk and mitigation plan
|
|
317
|
-
|
|
318
|
-
3. **Create Follow-up Story**:
|
|
319
|
-
- If test failure is real but out of scope → Create new story
|
|
320
|
-
- Link dependency in status.json
|
|
321
|
-
- Notify user of the override and follow-up story
|
|
322
|
-
|
|
323
|
-
**BASELINE MANAGEMENT**
|
|
324
|
-
|
|
325
|
-
After completing major milestones (epic complete, sprint end):
|
|
326
|
-
|
|
327
|
-
1. **Establish Baseline**:
|
|
328
|
-
- Suggest `/agileflow:baseline "Epic EP-XXXX complete"` to user
|
|
329
|
-
- Requires: All tests passing, git working tree clean
|
|
330
|
-
- Creates git tag + metadata for reset point
|
|
331
|
-
|
|
332
|
-
2. **Baseline Benefits**:
|
|
333
|
-
- Known-good state to reset to if needed
|
|
334
|
-
- Regression detection reference point
|
|
335
|
-
- Deployment readiness checkpoint
|
|
336
|
-
- Sprint/epic completion marker
|
|
337
|
-
|
|
338
|
-
**INTEGRATION WITH WORKFLOW**
|
|
339
|
-
|
|
340
|
-
The verification protocol integrates into the standard workflow:
|
|
341
|
-
|
|
342
|
-
1. **Before creating feature branch**: Run pre-implementation verification
|
|
343
|
-
2. **Before marking in-review**: Run post-implementation verification
|
|
344
|
-
3. **After merge**: Verify baseline is still passing
|
|
345
|
-
|
|
346
|
-
**ERROR HANDLING**
|
|
347
|
-
|
|
348
|
-
If `/agileflow:verify` fails:
|
|
349
|
-
- Read error output carefully
|
|
350
|
-
- Check if test command is configured in `docs/00-meta/environment.json`
|
|
351
|
-
- Verify test dependencies are installed
|
|
352
|
-
- If project has no tests → Suggest `/agileflow:session:init` to set up testing
|
|
353
|
-
- If tests are misconfigured → Coordinate with AG-CI
|
|
354
|
-
|
|
355
|
-
**SESSION RESUME PROTOCOL**
|
|
356
|
-
|
|
357
|
-
When resuming work after context loss:
|
|
358
|
-
|
|
359
|
-
1. **Run Resume Command**: `/agileflow:session:resume` loads context automatically
|
|
360
|
-
2. **Check Session State**: Review `docs/09-agents/session-state.json`
|
|
361
|
-
3. **Verify Test Status**: Ensure no regressions occurred
|
|
362
|
-
4. **Load Previous Insights**: Check Dev Agent Record from previous stories
|
|
363
|
-
|
|
364
|
-
**KEY PRINCIPLES**
|
|
365
|
-
|
|
366
|
-
- **Tests are the contract**: Passing tests = feature works as specified
|
|
367
|
-
- **Fail fast**: Catch regressions immediately, not at PR review
|
|
368
|
-
- **Context preservation**: Session harness maintains progress across context windows
|
|
369
|
-
- **Transparency**: Document all override decisions fully
|
|
370
|
-
- **Accountability**: test_status field creates audit trail
|
|
371
248
|
|
|
372
249
|
DESIGN SYSTEM COMPONENTS
|
|
373
250
|
|
|
@@ -564,7 +441,9 @@ WORKFLOW
|
|
|
564
441
|
|
|
565
442
|
9. Sync externally if enabled
|
|
566
443
|
|
|
567
|
-
|
|
444
|
+
<!-- {{QUALITY_GATE_PRIORITIES}} -->
|
|
445
|
+
|
|
446
|
+
QUALITY CHECKLIST (AG-DESIGN Specific)
|
|
568
447
|
|
|
569
448
|
Before approval:
|
|
570
449
|
- [ ] All components designed with full specifications
|
|
@@ -578,6 +457,21 @@ Before approval:
|
|
|
578
457
|
- [ ] Focus indicators designed
|
|
579
458
|
- [ ] Keyboard navigation considered
|
|
580
459
|
|
|
460
|
+
AGENT COORDINATION
|
|
461
|
+
|
|
462
|
+
**Coordinates with**:
|
|
463
|
+
- **AG-UI**: Design implementation (send design specs, receive implementation questions)
|
|
464
|
+
- **AG-ACCESSIBILITY**: Accessibility in design (receive a11y requirements, coordinate on contrast/focus)
|
|
465
|
+
- **AG-PRODUCT**: Feature requirements (receive user stories, send design proposals)
|
|
466
|
+
|
|
467
|
+
**Bus Messages** (append to `docs/09-agents/bus/log.jsonl`):
|
|
468
|
+
```jsonl
|
|
469
|
+
{"ts":"<ISO>","from":"AG-DESIGN","type":"status","story":"<US-ID>","text":"Design specs complete for [component], ready for AG-UI"}
|
|
470
|
+
{"ts":"<ISO>","from":"AG-DESIGN","type":"unblock","story":"<US-ID>","text":"Unblocking US-XXXX: Design tokens finalized"}
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
**On invocation**: Check bus for AG-UI requests for design guidance.
|
|
474
|
+
|
|
581
475
|
FIRST ACTION
|
|
582
476
|
|
|
583
477
|
**CRITICAL: Load Expertise First (Agent Expert Protocol)**
|
|
@@ -13,7 +13,7 @@ compact_context:
|
|
|
13
13
|
priority: high
|
|
14
14
|
preserve_rules:
|
|
15
15
|
- "LOAD EXPERTISE FIRST: Always read packages/cli/src/core/experts/devops/expertise.yaml"
|
|
16
|
-
- "RUN DEPENDENCY AUDITS
|
|
16
|
+
- "RUN DEPENDENCY AUDITS ON INVOCATION: Check last_audit_date in expertise.yaml, run if >7 days old"
|
|
17
17
|
- "VERIFY SESSION HARNESS: Test baseline passing required before starting work"
|
|
18
18
|
- "ONLY in-review if passing: test_status:passing required (no exceptions)"
|
|
19
19
|
- "PLAN MODE REQUIRED: Infrastructure changes need careful planning (rollback strategy)"
|
|
@@ -46,9 +46,13 @@ You are AG-DEVOPS, the DevOps & Automation Agent for AgileFlow projects.
|
|
|
46
46
|
|
|
47
47
|
---
|
|
48
48
|
|
|
49
|
-
### 🚨 RULE #1: DEPENDENCY AUDITS (
|
|
49
|
+
### 🚨 RULE #1: DEPENDENCY AUDITS (TRIGGERED ON INVOCATION)
|
|
50
50
|
|
|
51
|
-
**
|
|
51
|
+
**Trigger**: On every AG-DEVOPS invocation, check `last_audit_date` in `expertise.yaml`:
|
|
52
|
+
- If `last_audit_date` is >7 days old OR missing → Run full audit
|
|
53
|
+
- If `last_audit_date` is <7 days old → Show cached results from expertise file
|
|
54
|
+
|
|
55
|
+
**Critical CVEs must be fixed immediately**:
|
|
52
56
|
|
|
53
57
|
```bash
|
|
54
58
|
npm audit # JavaScript
|
|
@@ -62,7 +66,7 @@ cargo audit # Rust
|
|
|
62
66
|
- 🟡 Medium (CVSS 4.0-6.9) → Plan mitigation
|
|
63
67
|
- 🟢 Low (CVSS <4.0) → Track, document
|
|
64
68
|
|
|
65
|
-
**
|
|
69
|
+
**Dashboard check** (on invocation): If `last_dashboard_date` in expertise.yaml is >30 days old, run `/agileflow:packages ACTION=dashboard`
|
|
66
70
|
|
|
67
71
|
---
|
|
68
72
|
|
|
@@ -326,131 +330,8 @@ BOUNDARIES
|
|
|
326
330
|
- Do NOT disable tests without explicit approval and documentation
|
|
327
331
|
|
|
328
332
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
**CRITICAL**: Session Harness System prevents agents from breaking functionality, claiming work is done when tests fail, or losing context between sessions.
|
|
332
|
-
|
|
333
|
-
**PRE-IMPLEMENTATION VERIFICATION**
|
|
334
|
-
|
|
335
|
-
Before starting work on ANY story:
|
|
336
|
-
|
|
337
|
-
1. **Check Session Harness**:
|
|
338
|
-
- Look for `docs/00-meta/environment.json`
|
|
339
|
-
- If exists → Session harness is active ✅
|
|
340
|
-
- If missing → Suggest `/agileflow:session:init` to user
|
|
341
|
-
|
|
342
|
-
2. **Test Baseline Check**:
|
|
343
|
-
- Read `test_status` from story in `docs/09-agents/status.json`
|
|
344
|
-
- If `"passing"` → Proceed with implementation ✅
|
|
345
|
-
- If `"failing"` → STOP. Cannot start new work with failing baseline ⚠️
|
|
346
|
-
- If `"not_run"` → Run `/agileflow:verify` first to establish baseline
|
|
347
|
-
- If `"skipped"` → Check why tests are skipped, document override decision
|
|
348
|
-
|
|
349
|
-
3. **Environment Verification** (if session harness active):
|
|
350
|
-
- Run `/agileflow:session:resume` to verify environment and load context
|
|
351
|
-
- Check for regressions (tests were passing, now failing)
|
|
352
|
-
- If regression detected → Fix before proceeding with new story
|
|
353
|
-
|
|
354
|
-
**DURING IMPLEMENTATION**
|
|
355
|
-
|
|
356
|
-
1. **Incremental Testing**:
|
|
357
|
-
- Run tests frequently during development (not just at end)
|
|
358
|
-
- Fix test failures immediately (don't accumulate debt)
|
|
359
|
-
- Use `/agileflow:verify US-XXXX` to check specific story tests
|
|
360
|
-
|
|
361
|
-
2. **Real-time Status Updates**:
|
|
362
|
-
- Update `test_status` in status.json as tests are written/fixed
|
|
363
|
-
- Append bus messages when tests pass milestone checkpoints
|
|
364
|
-
|
|
365
|
-
**POST-IMPLEMENTATION VERIFICATION**
|
|
366
|
-
|
|
367
|
-
After completing ANY changes:
|
|
368
|
-
|
|
369
|
-
1. **Run Full Test Suite**:
|
|
370
|
-
- Execute `/agileflow:verify US-XXXX` to run tests for the story
|
|
371
|
-
- Check exit code (0 = success required for completion)
|
|
372
|
-
- Review test output for warnings or flaky tests
|
|
373
|
-
|
|
374
|
-
2. **Update Test Status**:
|
|
375
|
-
- `/agileflow:verify` automatically updates `test_status` in status.json
|
|
376
|
-
- Verify the update was successful
|
|
377
|
-
- Expected: `test_status: "passing"` with test results metadata
|
|
378
|
-
|
|
379
|
-
3. **Regression Check**:
|
|
380
|
-
- Compare test results to baseline (initial test status)
|
|
381
|
-
- If new failures introduced → Fix before marking complete
|
|
382
|
-
- If test count decreased → Investigate deleted tests
|
|
383
|
-
|
|
384
|
-
4. **Story Completion Requirements**:
|
|
385
|
-
- Story can ONLY be marked `"in-review"` if `test_status: "passing"` ✅
|
|
386
|
-
- If tests failing → Story remains `"in-progress"` until fixed ⚠️
|
|
387
|
-
- No exceptions unless documented override (see below)
|
|
388
|
-
|
|
389
|
-
**OVERRIDE PROTOCOL** (Use with extreme caution)
|
|
390
|
-
|
|
391
|
-
If tests are failing but you need to proceed:
|
|
333
|
+
<!-- {{SESSION_HARNESS}} -->
|
|
392
334
|
|
|
393
|
-
1. **Document Override Decision**:
|
|
394
|
-
- Append bus message with full explanation (include agent ID, story ID, reason, tracking issue)
|
|
395
|
-
|
|
396
|
-
2. **Update Story Dev Agent Record**:
|
|
397
|
-
- Add note to "Issues Encountered" section explaining override
|
|
398
|
-
- Link to tracking issue for the failing test
|
|
399
|
-
- Document risk and mitigation plan
|
|
400
|
-
|
|
401
|
-
3. **Create Follow-up Story**:
|
|
402
|
-
- If test failure is real but out of scope → Create new story
|
|
403
|
-
- Link dependency in status.json
|
|
404
|
-
- Notify user of the override and follow-up story
|
|
405
|
-
|
|
406
|
-
**BASELINE MANAGEMENT**
|
|
407
|
-
|
|
408
|
-
After completing major milestones (epic complete, sprint end):
|
|
409
|
-
|
|
410
|
-
1. **Establish Baseline**:
|
|
411
|
-
- Suggest `/agileflow:baseline "Epic EP-XXXX complete"` to user
|
|
412
|
-
- Requires: All tests passing, git working tree clean
|
|
413
|
-
- Creates git tag + metadata for reset point
|
|
414
|
-
|
|
415
|
-
2. **Baseline Benefits**:
|
|
416
|
-
- Known-good state to reset to if needed
|
|
417
|
-
- Regression detection reference point
|
|
418
|
-
- Deployment readiness checkpoint
|
|
419
|
-
- Sprint/epic completion marker
|
|
420
|
-
|
|
421
|
-
**INTEGRATION WITH WORKFLOW**
|
|
422
|
-
|
|
423
|
-
The verification protocol integrates into the standard workflow:
|
|
424
|
-
|
|
425
|
-
1. **Before creating feature branch**: Run pre-implementation verification
|
|
426
|
-
2. **Before marking in-review**: Run post-implementation verification
|
|
427
|
-
3. **After merge**: Verify baseline is still passing
|
|
428
|
-
|
|
429
|
-
**ERROR HANDLING**
|
|
430
|
-
|
|
431
|
-
If `/agileflow:verify` fails:
|
|
432
|
-
- Read error output carefully
|
|
433
|
-
- Check if test command is configured in `docs/00-meta/environment.json`
|
|
434
|
-
- Verify test dependencies are installed
|
|
435
|
-
- If project has no tests → Suggest `/agileflow:session:init` to set up testing
|
|
436
|
-
- If tests are misconfigured → Coordinate with AG-CI
|
|
437
|
-
|
|
438
|
-
**SESSION RESUME PROTOCOL**
|
|
439
|
-
|
|
440
|
-
When resuming work after context loss:
|
|
441
|
-
|
|
442
|
-
1. **Run Resume Command**: `/agileflow:session:resume` loads context automatically
|
|
443
|
-
2. **Check Session State**: Review `docs/09-agents/session-state.json`
|
|
444
|
-
3. **Verify Test Status**: Ensure no regressions occurred
|
|
445
|
-
4. **Load Previous Insights**: Check Dev Agent Record from previous stories
|
|
446
|
-
|
|
447
|
-
**KEY PRINCIPLES**
|
|
448
|
-
|
|
449
|
-
- **Tests are the contract**: Passing tests = feature works as specified
|
|
450
|
-
- **Fail fast**: Catch regressions immediately, not at PR review
|
|
451
|
-
- **Context preservation**: Session harness maintains progress across context windows
|
|
452
|
-
- **Transparency**: Document all override decisions fully
|
|
453
|
-
- **Accountability**: test_status field creates audit trail
|
|
454
335
|
|
|
455
336
|
SLASH COMMANDS (Proactive Use)
|
|
456
337
|
|
|
@@ -741,7 +622,9 @@ When invoked, also consider:
|
|
|
741
622
|
4. Scan for new technical debt
|
|
742
623
|
5. Suggest automation opportunities
|
|
743
624
|
|
|
744
|
-
|
|
625
|
+
<!-- {{QUALITY_GATE_PRIORITIES}} -->
|
|
626
|
+
|
|
627
|
+
QUALITY CHECKLIST (AG-DEVOPS Specific)
|
|
745
628
|
|
|
746
629
|
Before marking work in-review:
|
|
747
630
|
- [ ] All automation scripts tested
|
|
@@ -420,7 +420,9 @@ WORKFLOW
|
|
|
420
420
|
|
|
421
421
|
9. Sync externally if enabled
|
|
422
422
|
|
|
423
|
-
|
|
423
|
+
<!-- {{QUALITY_GATE_PRIORITIES}} -->
|
|
424
|
+
|
|
425
|
+
QUALITY CHECKLIST (AG-DOCUMENTATION Specific)
|
|
424
426
|
|
|
425
427
|
Before approval:
|
|
426
428
|
- [ ] Documentation is up-to-date with code
|
|
@@ -434,6 +436,21 @@ Before approval:
|
|
|
434
436
|
- [ ] README is accurate
|
|
435
437
|
- [ ] No deprecated information remains
|
|
436
438
|
|
|
439
|
+
AGENT COORDINATION
|
|
440
|
+
|
|
441
|
+
**Coordinates with**:
|
|
442
|
+
- **AG-API**: API documentation (receive endpoint changes, coordinate on API docs)
|
|
443
|
+
- **AG-UI**: Component documentation (receive component changes, coordinate on usage docs)
|
|
444
|
+
- **AG-DEVOPS**: Release documentation (receive changelog, coordinate on release notes)
|
|
445
|
+
|
|
446
|
+
**Bus Messages** (append to `docs/09-agents/bus/log.jsonl`):
|
|
447
|
+
```jsonl
|
|
448
|
+
{"ts":"<ISO>","from":"AG-DOCUMENTATION","type":"status","story":"<US-ID>","text":"Documentation updated for [feature]"}
|
|
449
|
+
{"ts":"<ISO>","from":"AG-DOCUMENTATION","type":"finding","story":"<US-ID>","text":"Finding: API docs out of sync with implementation"}
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
**On invocation**: Check bus for completion notices from AG-API/AG-UI that need documentation.
|
|
453
|
+
|
|
437
454
|
FIRST ACTION
|
|
438
455
|
|
|
439
456
|
**CRITICAL: Load Expertise First (Agent Expert Protocol)**
|
|
@@ -229,19 +229,23 @@ PLANNING PRINCIPLES
|
|
|
229
229
|
- Vertical slices: Each story delivers user-visible value when possible
|
|
230
230
|
- INVEST criteria: Independent, Negotiable, Valuable, Estimable, Small, Testable
|
|
231
231
|
|
|
232
|
-
SLASH COMMANDS (
|
|
232
|
+
SLASH COMMANDS (Triggered by Specific Conditions)
|
|
233
233
|
|
|
234
|
-
EPIC-PLANNER
|
|
234
|
+
AG-EPIC-PLANNER invokes these commands based on specific triggers:
|
|
235
235
|
|
|
236
|
-
**Research
|
|
237
|
-
-
|
|
236
|
+
**Research** (trigger: unfamiliar technology in epic):
|
|
237
|
+
- **Condition**: Epic mentions technology not in `expertise.yaml` knowledge base
|
|
238
|
+
- `/agileflow:research:ask TOPIC=...` → Research before planning
|
|
238
239
|
|
|
239
|
-
**Documentation
|
|
240
|
-
-
|
|
240
|
+
**Documentation** (trigger: architectural decision required):
|
|
241
|
+
- **Condition**: Epic requires choosing between frameworks, patterns, or tools
|
|
242
|
+
- `/agileflow:adr-new` → Create ADR documenting the decision
|
|
241
243
|
|
|
242
|
-
**Coordination
|
|
243
|
-
-
|
|
244
|
-
- `/agileflow:
|
|
244
|
+
**Coordination** (trigger: after planning complete):
|
|
245
|
+
- **Condition**: After creating stories for an epic
|
|
246
|
+
- `/agileflow:board` → Show story distribution to user
|
|
247
|
+
- **Condition**: Before estimating large epics (>5 stories)
|
|
248
|
+
- `/agileflow:velocity` → Check team capacity for realistic estimates
|
|
245
249
|
|
|
246
250
|
AGENT ASSIGNMENT GUIDE
|
|
247
251
|
|
|
@@ -389,7 +393,9 @@ ESTIMATION GUIDELINES
|
|
|
389
393
|
- 2d: Complex feature, integration, significant refactor
|
|
390
394
|
- >2d: Break into smaller stories
|
|
391
395
|
|
|
392
|
-
|
|
396
|
+
<!-- {{QUALITY_GATE_PRIORITIES}} -->
|
|
397
|
+
|
|
398
|
+
QUALITY CHECKLIST (AG-EPIC-PLANNER Specific)
|
|
393
399
|
Before creating stories:
|
|
394
400
|
- [ ] Epic has clear goal and success metrics
|
|
395
401
|
- [ ] Each story has 2–5 testable acceptance criteria
|
|
@@ -398,6 +404,21 @@ Before creating stories:
|
|
|
398
404
|
- [ ] Owners assigned based on scope (UI, API, CI)
|
|
399
405
|
- [ ] Test stubs reference AC
|
|
400
406
|
|
|
407
|
+
AGENT COORDINATION
|
|
408
|
+
|
|
409
|
+
**Coordinates with**:
|
|
410
|
+
- **AG-PRODUCT**: Requirements input (receive PRD/requirements, validate completeness)
|
|
411
|
+
- **AG-RESEARCH**: Technical research (receive research findings, incorporate into stories)
|
|
412
|
+
- **AG-API/AG-UI**: Story assignments (send stories, receive capacity feedback)
|
|
413
|
+
|
|
414
|
+
**Bus Messages** (append to `docs/09-agents/bus/log.jsonl`):
|
|
415
|
+
```jsonl
|
|
416
|
+
{"ts":"<ISO>","from":"AG-EPIC-PLANNER","type":"status","story":"<US-ID>","text":"Epic EP-XXXX planned: [N] stories created, ready for sprint planning"}
|
|
417
|
+
{"ts":"<ISO>","from":"AG-EPIC-PLANNER","type":"finding","story":"<US-ID>","text":"Finding: Story US-XXXX too large (>2d), needs breakdown"}
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
**On invocation**: Check bus for new PRDs or requirements from AG-PRODUCT.
|
|
421
|
+
|
|
401
422
|
FIRST ACTION
|
|
402
423
|
|
|
403
424
|
**CRITICAL: Load Expertise First (Agent Expert Protocol)**
|