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
|
@@ -264,131 +264,8 @@ BOUNDARIES
|
|
|
264
264
|
- Always implement graceful degradation (fallback if external service unavailable)
|
|
265
265
|
|
|
266
266
|
|
|
267
|
-
|
|
267
|
+
<!-- {{SESSION_HARNESS}} -->
|
|
268
268
|
|
|
269
|
-
**CRITICAL**: Session Harness System prevents agents from breaking functionality, claiming work is done when tests fail, or losing context between sessions.
|
|
270
|
-
|
|
271
|
-
**PRE-IMPLEMENTATION VERIFICATION**
|
|
272
|
-
|
|
273
|
-
Before starting work on ANY story:
|
|
274
|
-
|
|
275
|
-
1. **Check Session Harness**:
|
|
276
|
-
- Look for `docs/00-meta/environment.json`
|
|
277
|
-
- If exists → Session harness is active ✅
|
|
278
|
-
- If missing → Suggest `/agileflow:session:init` to user
|
|
279
|
-
|
|
280
|
-
2. **Test Baseline Check**:
|
|
281
|
-
- Read `test_status` from story in `docs/09-agents/status.json`
|
|
282
|
-
- If `"passing"` → Proceed with implementation ✅
|
|
283
|
-
- If `"failing"` → STOP. Cannot start new work with failing baseline ⚠️
|
|
284
|
-
- If `"not_run"` → Run `/agileflow:verify` first to establish baseline
|
|
285
|
-
- If `"skipped"` → Check why tests are skipped, document override decision
|
|
286
|
-
|
|
287
|
-
3. **Environment Verification** (if session harness active):
|
|
288
|
-
- Run `/agileflow:session:resume` to verify environment and load context
|
|
289
|
-
- Check for regressions (tests were passing, now failing)
|
|
290
|
-
- If regression detected → Fix before proceeding with new story
|
|
291
|
-
|
|
292
|
-
**DURING IMPLEMENTATION**
|
|
293
|
-
|
|
294
|
-
1. **Incremental Testing**:
|
|
295
|
-
- Run tests frequently during development (not just at end)
|
|
296
|
-
- Fix test failures immediately (don't accumulate debt)
|
|
297
|
-
- Use `/agileflow:verify US-XXXX` to check specific story tests
|
|
298
|
-
|
|
299
|
-
2. **Real-time Status Updates**:
|
|
300
|
-
- Update `test_status` in status.json as tests are written/fixed
|
|
301
|
-
- Append bus messages when tests pass milestone checkpoints
|
|
302
|
-
|
|
303
|
-
**POST-IMPLEMENTATION VERIFICATION**
|
|
304
|
-
|
|
305
|
-
After completing ANY changes:
|
|
306
|
-
|
|
307
|
-
1. **Run Full Test Suite**:
|
|
308
|
-
- Execute `/agileflow:verify US-XXXX` to run tests for the story
|
|
309
|
-
- Check exit code (0 = success required for completion)
|
|
310
|
-
- Review test output for warnings or flaky tests
|
|
311
|
-
|
|
312
|
-
2. **Update Test Status**:
|
|
313
|
-
- `/agileflow:verify` automatically updates `test_status` in status.json
|
|
314
|
-
- Verify the update was successful
|
|
315
|
-
- Expected: `test_status: "passing"` with test results metadata
|
|
316
|
-
|
|
317
|
-
3. **Regression Check**:
|
|
318
|
-
- Compare test results to baseline (initial test status)
|
|
319
|
-
- If new failures introduced → Fix before marking complete
|
|
320
|
-
- If test count decreased → Investigate deleted tests
|
|
321
|
-
|
|
322
|
-
4. **Story Completion Requirements**:
|
|
323
|
-
- Story can ONLY be marked `"in-review"` if `test_status: "passing"` ✅
|
|
324
|
-
- If tests failing → Story remains `"in-progress"` until fixed ⚠️
|
|
325
|
-
- No exceptions unless documented override (see below)
|
|
326
|
-
|
|
327
|
-
**OVERRIDE PROTOCOL** (Use with extreme caution)
|
|
328
|
-
|
|
329
|
-
If tests are failing but you need to proceed:
|
|
330
|
-
|
|
331
|
-
1. **Document Override Decision**:
|
|
332
|
-
- Append bus message with full explanation (include agent ID, story ID, reason, tracking issue)
|
|
333
|
-
|
|
334
|
-
2. **Update Story Dev Agent Record**:
|
|
335
|
-
- Add note to "Issues Encountered" section explaining override
|
|
336
|
-
- Link to tracking issue for the failing test
|
|
337
|
-
- Document risk and mitigation plan
|
|
338
|
-
|
|
339
|
-
3. **Create Follow-up Story**:
|
|
340
|
-
- If test failure is real but out of scope → Create new story
|
|
341
|
-
- Link dependency in status.json
|
|
342
|
-
- Notify user of the override and follow-up story
|
|
343
|
-
|
|
344
|
-
**BASELINE MANAGEMENT**
|
|
345
|
-
|
|
346
|
-
After completing major milestones (epic complete, sprint end):
|
|
347
|
-
|
|
348
|
-
1. **Establish Baseline**:
|
|
349
|
-
- Suggest `/agileflow:baseline "Epic EP-XXXX complete"` to user
|
|
350
|
-
- Requires: All tests passing, git working tree clean
|
|
351
|
-
- Creates git tag + metadata for reset point
|
|
352
|
-
|
|
353
|
-
2. **Baseline Benefits**:
|
|
354
|
-
- Known-good state to reset to if needed
|
|
355
|
-
- Regression detection reference point
|
|
356
|
-
- Deployment readiness checkpoint
|
|
357
|
-
- Sprint/epic completion marker
|
|
358
|
-
|
|
359
|
-
**INTEGRATION WITH WORKFLOW**
|
|
360
|
-
|
|
361
|
-
The verification protocol integrates into the standard workflow:
|
|
362
|
-
|
|
363
|
-
1. **Before creating feature branch**: Run pre-implementation verification
|
|
364
|
-
2. **Before marking in-review**: Run post-implementation verification
|
|
365
|
-
3. **After merge**: Verify baseline is still passing
|
|
366
|
-
|
|
367
|
-
**ERROR HANDLING**
|
|
368
|
-
|
|
369
|
-
If `/agileflow:verify` fails:
|
|
370
|
-
- Read error output carefully
|
|
371
|
-
- Check if test command is configured in `docs/00-meta/environment.json`
|
|
372
|
-
- Verify test dependencies are installed
|
|
373
|
-
- If project has no tests → Suggest `/agileflow:session:init` to set up testing
|
|
374
|
-
- If tests are misconfigured → Coordinate with AG-CI
|
|
375
|
-
|
|
376
|
-
**SESSION RESUME PROTOCOL**
|
|
377
|
-
|
|
378
|
-
When resuming work after context loss:
|
|
379
|
-
|
|
380
|
-
1. **Run Resume Command**: `/agileflow:session:resume` loads context automatically
|
|
381
|
-
2. **Check Session State**: Review `docs/09-agents/session-state.json`
|
|
382
|
-
3. **Verify Test Status**: Ensure no regressions occurred
|
|
383
|
-
4. **Load Previous Insights**: Check Dev Agent Record from previous stories
|
|
384
|
-
|
|
385
|
-
**KEY PRINCIPLES**
|
|
386
|
-
|
|
387
|
-
- **Tests are the contract**: Passing tests = feature works as specified
|
|
388
|
-
- **Fail fast**: Catch regressions immediately, not at PR review
|
|
389
|
-
- **Context preservation**: Session harness maintains progress across context windows
|
|
390
|
-
- **Transparency**: Document all override decisions fully
|
|
391
|
-
- **Accountability**: test_status field creates audit trail
|
|
392
269
|
|
|
393
270
|
COMMON INTEGRATIONS
|
|
394
271
|
|
|
@@ -639,7 +516,9 @@ WORKFLOW
|
|
|
639
516
|
|
|
640
517
|
11. Sync externally if enabled
|
|
641
518
|
|
|
642
|
-
|
|
519
|
+
<!-- {{QUALITY_GATE_PRIORITIES}} -->
|
|
520
|
+
|
|
521
|
+
QUALITY CHECKLIST (AG-INTEGRATIONS Specific)
|
|
643
522
|
|
|
644
523
|
Before approval:
|
|
645
524
|
- [ ] Service authentication working
|
|
@@ -655,6 +534,21 @@ Before approval:
|
|
|
655
534
|
- [ ] Documentation complete (setup, authentication, configuration)
|
|
656
535
|
- [ ] Health check or monitoring in place
|
|
657
536
|
|
|
537
|
+
AGENT COORDINATION
|
|
538
|
+
|
|
539
|
+
**Coordinates with**:
|
|
540
|
+
- **AG-API**: Integration endpoints (send integration requirements, receive API availability)
|
|
541
|
+
- **AG-SECURITY**: Integration security (send auth patterns, receive security review)
|
|
542
|
+
- **AG-MONITORING**: Integration health (send monitoring requirements, receive alert setup)
|
|
543
|
+
|
|
544
|
+
**Bus Messages** (append to `docs/09-agents/bus/log.jsonl`):
|
|
545
|
+
```jsonl
|
|
546
|
+
{"ts":"<ISO>","from":"AG-INTEGRATIONS","type":"status","story":"<US-ID>","text":"Integration complete: [service] connected, webhooks configured"}
|
|
547
|
+
{"ts":"<ISO>","from":"AG-INTEGRATIONS","type":"finding","story":"<US-ID>","text":"Finding: [service] API rate limit approaching threshold"}
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
**On invocation**: Check bus for integration requests from other agents.
|
|
551
|
+
|
|
658
552
|
FIRST ACTION
|
|
659
553
|
|
|
660
554
|
**CRITICAL: Load Expertise First (Agent Expert Protocol)**
|
|
@@ -226,131 +226,8 @@ BOUNDARIES
|
|
|
226
226
|
- Always consider mobile UX patterns and constraints
|
|
227
227
|
|
|
228
228
|
|
|
229
|
-
|
|
229
|
+
<!-- {{SESSION_HARNESS}} -->
|
|
230
230
|
|
|
231
|
-
**CRITICAL**: Session Harness System prevents agents from breaking functionality, claiming work is done when tests fail, or losing context between sessions.
|
|
232
|
-
|
|
233
|
-
**PRE-IMPLEMENTATION VERIFICATION**
|
|
234
|
-
|
|
235
|
-
Before starting work on ANY story:
|
|
236
|
-
|
|
237
|
-
1. **Check Session Harness**:
|
|
238
|
-
- Look for `docs/00-meta/environment.json`
|
|
239
|
-
- If exists → Session harness is active ✅
|
|
240
|
-
- If missing → Suggest `/agileflow:session:init` to user
|
|
241
|
-
|
|
242
|
-
2. **Test Baseline Check**:
|
|
243
|
-
- Read `test_status` from story in `docs/09-agents/status.json`
|
|
244
|
-
- If `"passing"` → Proceed with implementation ✅
|
|
245
|
-
- If `"failing"` → STOP. Cannot start new work with failing baseline ⚠️
|
|
246
|
-
- If `"not_run"` → Run `/agileflow:verify` first to establish baseline
|
|
247
|
-
- If `"skipped"` → Check why tests are skipped, document override decision
|
|
248
|
-
|
|
249
|
-
3. **Environment Verification** (if session harness active):
|
|
250
|
-
- Run `/agileflow:session:resume` to verify environment and load context
|
|
251
|
-
- Check for regressions (tests were passing, now failing)
|
|
252
|
-
- If regression detected → Fix before proceeding with new story
|
|
253
|
-
|
|
254
|
-
**DURING IMPLEMENTATION**
|
|
255
|
-
|
|
256
|
-
1. **Incremental Testing**:
|
|
257
|
-
- Run tests frequently during development (not just at end)
|
|
258
|
-
- Fix test failures immediately (don't accumulate debt)
|
|
259
|
-
- Use `/agileflow:verify US-XXXX` to check specific story tests
|
|
260
|
-
|
|
261
|
-
2. **Real-time Status Updates**:
|
|
262
|
-
- Update `test_status` in status.json as tests are written/fixed
|
|
263
|
-
- Append bus messages when tests pass milestone checkpoints
|
|
264
|
-
|
|
265
|
-
**POST-IMPLEMENTATION VERIFICATION**
|
|
266
|
-
|
|
267
|
-
After completing ANY changes:
|
|
268
|
-
|
|
269
|
-
1. **Run Full Test Suite**:
|
|
270
|
-
- Execute `/agileflow:verify US-XXXX` to run tests for the story
|
|
271
|
-
- Check exit code (0 = success required for completion)
|
|
272
|
-
- Review test output for warnings or flaky tests
|
|
273
|
-
|
|
274
|
-
2. **Update Test Status**:
|
|
275
|
-
- `/agileflow:verify` automatically updates `test_status` in status.json
|
|
276
|
-
- Verify the update was successful
|
|
277
|
-
- Expected: `test_status: "passing"` with test results metadata
|
|
278
|
-
|
|
279
|
-
3. **Regression Check**:
|
|
280
|
-
- Compare test results to baseline (initial test status)
|
|
281
|
-
- If new failures introduced → Fix before marking complete
|
|
282
|
-
- If test count decreased → Investigate deleted tests
|
|
283
|
-
|
|
284
|
-
4. **Story Completion Requirements**:
|
|
285
|
-
- Story can ONLY be marked `"in-review"` if `test_status: "passing"` ✅
|
|
286
|
-
- If tests failing → Story remains `"in-progress"` until fixed ⚠️
|
|
287
|
-
- No exceptions unless documented override (see below)
|
|
288
|
-
|
|
289
|
-
**OVERRIDE PROTOCOL** (Use with extreme caution)
|
|
290
|
-
|
|
291
|
-
If tests are failing but you need to proceed:
|
|
292
|
-
|
|
293
|
-
1. **Document Override Decision**:
|
|
294
|
-
- Append bus message with full explanation (include agent ID, story ID, reason, tracking issue)
|
|
295
|
-
|
|
296
|
-
2. **Update Story Dev Agent Record**:
|
|
297
|
-
- Add note to "Issues Encountered" section explaining override
|
|
298
|
-
- Link to tracking issue for the failing test
|
|
299
|
-
- Document risk and mitigation plan
|
|
300
|
-
|
|
301
|
-
3. **Create Follow-up Story**:
|
|
302
|
-
- If test failure is real but out of scope → Create new story
|
|
303
|
-
- Link dependency in status.json
|
|
304
|
-
- Notify user of the override and follow-up story
|
|
305
|
-
|
|
306
|
-
**BASELINE MANAGEMENT**
|
|
307
|
-
|
|
308
|
-
After completing major milestones (epic complete, sprint end):
|
|
309
|
-
|
|
310
|
-
1. **Establish Baseline**:
|
|
311
|
-
- Suggest `/agileflow:baseline "Epic EP-XXXX complete"` to user
|
|
312
|
-
- Requires: All tests passing, git working tree clean
|
|
313
|
-
- Creates git tag + metadata for reset point
|
|
314
|
-
|
|
315
|
-
2. **Baseline Benefits**:
|
|
316
|
-
- Known-good state to reset to if needed
|
|
317
|
-
- Regression detection reference point
|
|
318
|
-
- Deployment readiness checkpoint
|
|
319
|
-
- Sprint/epic completion marker
|
|
320
|
-
|
|
321
|
-
**INTEGRATION WITH WORKFLOW**
|
|
322
|
-
|
|
323
|
-
The verification protocol integrates into the standard workflow:
|
|
324
|
-
|
|
325
|
-
1. **Before creating feature branch**: Run pre-implementation verification
|
|
326
|
-
2. **Before marking in-review**: Run post-implementation verification
|
|
327
|
-
3. **After merge**: Verify baseline is still passing
|
|
328
|
-
|
|
329
|
-
**ERROR HANDLING**
|
|
330
|
-
|
|
331
|
-
If `/agileflow:verify` fails:
|
|
332
|
-
- Read error output carefully
|
|
333
|
-
- Check if test command is configured in `docs/00-meta/environment.json`
|
|
334
|
-
- Verify test dependencies are installed
|
|
335
|
-
- If project has no tests → Suggest `/agileflow:session:init` to set up testing
|
|
336
|
-
- If tests are misconfigured → Coordinate with AG-CI
|
|
337
|
-
|
|
338
|
-
**SESSION RESUME PROTOCOL**
|
|
339
|
-
|
|
340
|
-
When resuming work after context loss:
|
|
341
|
-
|
|
342
|
-
1. **Run Resume Command**: `/agileflow:session:resume` loads context automatically
|
|
343
|
-
2. **Check Session State**: Review `docs/09-agents/session-state.json`
|
|
344
|
-
3. **Verify Test Status**: Ensure no regressions occurred
|
|
345
|
-
4. **Load Previous Insights**: Check Dev Agent Record from previous stories
|
|
346
|
-
|
|
347
|
-
**KEY PRINCIPLES**
|
|
348
|
-
|
|
349
|
-
- **Tests are the contract**: Passing tests = feature works as specified
|
|
350
|
-
- **Fail fast**: Catch regressions immediately, not at PR review
|
|
351
|
-
- **Context preservation**: Session harness maintains progress across context windows
|
|
352
|
-
- **Transparency**: Document all override decisions fully
|
|
353
|
-
- **Accountability**: test_status field creates audit trail
|
|
354
231
|
|
|
355
232
|
MOBILE PLATFORMS
|
|
356
233
|
|
|
@@ -539,7 +416,9 @@ WORKFLOW
|
|
|
539
416
|
|
|
540
417
|
12. Sync externally if enabled
|
|
541
418
|
|
|
542
|
-
|
|
419
|
+
<!-- {{QUALITY_GATE_PRIORITIES}} -->
|
|
420
|
+
|
|
421
|
+
QUALITY CHECKLIST (AG-MOBILE Specific)
|
|
543
422
|
|
|
544
423
|
Before approval:
|
|
545
424
|
- [ ] Implemented on both iOS and Android
|
|
@@ -553,6 +432,21 @@ Before approval:
|
|
|
553
432
|
- [ ] Tested on slow network
|
|
554
433
|
- [ ] App store requirements met (icons, splash screens)
|
|
555
434
|
|
|
435
|
+
AGENT COORDINATION
|
|
436
|
+
|
|
437
|
+
**Coordinates with**:
|
|
438
|
+
- **AG-API**: Backend endpoints for mobile (send API requirements, receive endpoint status)
|
|
439
|
+
- **AG-UI**: Shared components (coordinate on cross-platform design patterns)
|
|
440
|
+
- **AG-CI**: Mobile build pipeline (send build requirements, receive CI status)
|
|
441
|
+
|
|
442
|
+
**Bus Messages** (append to `docs/09-agents/bus/log.jsonl`):
|
|
443
|
+
```jsonl
|
|
444
|
+
{"ts":"<ISO>","from":"AG-MOBILE","type":"status","story":"<US-ID>","text":"Mobile implementation complete: iOS and Android verified"}
|
|
445
|
+
{"ts":"<ISO>","from":"AG-MOBILE","type":"blocked","story":"<US-ID>","text":"Blocked: Waiting for API endpoint from AG-API"}
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
**On invocation**: Check bus for AG-API endpoints that mobile needs.
|
|
449
|
+
|
|
556
450
|
FIRST ACTION
|
|
557
451
|
|
|
558
452
|
**CRITICAL: Load Expertise First (Agent Expert Protocol)**
|
|
@@ -225,131 +225,8 @@ BOUNDARIES
|
|
|
225
225
|
- Always prepare for worst-case scenarios
|
|
226
226
|
|
|
227
227
|
|
|
228
|
-
|
|
228
|
+
<!-- {{SESSION_HARNESS}} -->
|
|
229
229
|
|
|
230
|
-
**CRITICAL**: Session Harness System prevents agents from breaking functionality, claiming work is done when tests fail, or losing context between sessions.
|
|
231
|
-
|
|
232
|
-
**PRE-IMPLEMENTATION VERIFICATION**
|
|
233
|
-
|
|
234
|
-
Before starting work on ANY story:
|
|
235
|
-
|
|
236
|
-
1. **Check Session Harness**:
|
|
237
|
-
- Look for `docs/00-meta/environment.json`
|
|
238
|
-
- If exists → Session harness is active ✅
|
|
239
|
-
- If missing → Suggest `/agileflow:session:init` to user
|
|
240
|
-
|
|
241
|
-
2. **Test Baseline Check**:
|
|
242
|
-
- Read `test_status` from story in `docs/09-agents/status.json`
|
|
243
|
-
- If `"passing"` → Proceed with implementation ✅
|
|
244
|
-
- If `"failing"` → STOP. Cannot start new work with failing baseline ⚠️
|
|
245
|
-
- If `"not_run"` → Run `/agileflow:verify` first to establish baseline
|
|
246
|
-
- If `"skipped"` → Check why tests are skipped, document override decision
|
|
247
|
-
|
|
248
|
-
3. **Environment Verification** (if session harness active):
|
|
249
|
-
- Run `/agileflow:session:resume` to verify environment and load context
|
|
250
|
-
- Check for regressions (tests were passing, now failing)
|
|
251
|
-
- If regression detected → Fix before proceeding with new story
|
|
252
|
-
|
|
253
|
-
**DURING IMPLEMENTATION**
|
|
254
|
-
|
|
255
|
-
1. **Incremental Testing**:
|
|
256
|
-
- Run tests frequently during development (not just at end)
|
|
257
|
-
- Fix test failures immediately (don't accumulate debt)
|
|
258
|
-
- Use `/agileflow:verify US-XXXX` to check specific story tests
|
|
259
|
-
|
|
260
|
-
2. **Real-time Status Updates**:
|
|
261
|
-
- Update `test_status` in status.json as tests are written/fixed
|
|
262
|
-
- Append bus messages when tests pass milestone checkpoints
|
|
263
|
-
|
|
264
|
-
**POST-IMPLEMENTATION VERIFICATION**
|
|
265
|
-
|
|
266
|
-
After completing ANY changes:
|
|
267
|
-
|
|
268
|
-
1. **Run Full Test Suite**:
|
|
269
|
-
- Execute `/agileflow:verify US-XXXX` to run tests for the story
|
|
270
|
-
- Check exit code (0 = success required for completion)
|
|
271
|
-
- Review test output for warnings or flaky tests
|
|
272
|
-
|
|
273
|
-
2. **Update Test Status**:
|
|
274
|
-
- `/agileflow:verify` automatically updates `test_status` in status.json
|
|
275
|
-
- Verify the update was successful
|
|
276
|
-
- Expected: `test_status: "passing"` with test results metadata
|
|
277
|
-
|
|
278
|
-
3. **Regression Check**:
|
|
279
|
-
- Compare test results to baseline (initial test status)
|
|
280
|
-
- If new failures introduced → Fix before marking complete
|
|
281
|
-
- If test count decreased → Investigate deleted tests
|
|
282
|
-
|
|
283
|
-
4. **Story Completion Requirements**:
|
|
284
|
-
- Story can ONLY be marked `"in-review"` if `test_status: "passing"` ✅
|
|
285
|
-
- If tests failing → Story remains `"in-progress"` until fixed ⚠️
|
|
286
|
-
- No exceptions unless documented override (see below)
|
|
287
|
-
|
|
288
|
-
**OVERRIDE PROTOCOL** (Use with extreme caution)
|
|
289
|
-
|
|
290
|
-
If tests are failing but you need to proceed:
|
|
291
|
-
|
|
292
|
-
1. **Document Override Decision**:
|
|
293
|
-
- Append bus message with full explanation (include agent ID, story ID, reason, tracking issue)
|
|
294
|
-
|
|
295
|
-
2. **Update Story Dev Agent Record**:
|
|
296
|
-
- Add note to "Issues Encountered" section explaining override
|
|
297
|
-
- Link to tracking issue for the failing test
|
|
298
|
-
- Document risk and mitigation plan
|
|
299
|
-
|
|
300
|
-
3. **Create Follow-up Story**:
|
|
301
|
-
- If test failure is real but out of scope → Create new story
|
|
302
|
-
- Link dependency in status.json
|
|
303
|
-
- Notify user of the override and follow-up story
|
|
304
|
-
|
|
305
|
-
**BASELINE MANAGEMENT**
|
|
306
|
-
|
|
307
|
-
After completing major milestones (epic complete, sprint end):
|
|
308
|
-
|
|
309
|
-
1. **Establish Baseline**:
|
|
310
|
-
- Suggest `/agileflow:baseline "Epic EP-XXXX complete"` to user
|
|
311
|
-
- Requires: All tests passing, git working tree clean
|
|
312
|
-
- Creates git tag + metadata for reset point
|
|
313
|
-
|
|
314
|
-
2. **Baseline Benefits**:
|
|
315
|
-
- Known-good state to reset to if needed
|
|
316
|
-
- Regression detection reference point
|
|
317
|
-
- Deployment readiness checkpoint
|
|
318
|
-
- Sprint/epic completion marker
|
|
319
|
-
|
|
320
|
-
**INTEGRATION WITH WORKFLOW**
|
|
321
|
-
|
|
322
|
-
The verification protocol integrates into the standard workflow:
|
|
323
|
-
|
|
324
|
-
1. **Before creating feature branch**: Run pre-implementation verification
|
|
325
|
-
2. **Before marking in-review**: Run post-implementation verification
|
|
326
|
-
3. **After merge**: Verify baseline is still passing
|
|
327
|
-
|
|
328
|
-
**ERROR HANDLING**
|
|
329
|
-
|
|
330
|
-
If `/agileflow:verify` fails:
|
|
331
|
-
- Read error output carefully
|
|
332
|
-
- Check if test command is configured in `docs/00-meta/environment.json`
|
|
333
|
-
- Verify test dependencies are installed
|
|
334
|
-
- If project has no tests → Suggest `/agileflow:session:init` to set up testing
|
|
335
|
-
- If tests are misconfigured → Coordinate with AG-CI
|
|
336
|
-
|
|
337
|
-
**SESSION RESUME PROTOCOL**
|
|
338
|
-
|
|
339
|
-
When resuming work after context loss:
|
|
340
|
-
|
|
341
|
-
1. **Run Resume Command**: `/agileflow:session:resume` loads context automatically
|
|
342
|
-
2. **Check Session State**: Review `docs/09-agents/session-state.json`
|
|
343
|
-
3. **Verify Test Status**: Ensure no regressions occurred
|
|
344
|
-
4. **Load Previous Insights**: Check Dev Agent Record from previous stories
|
|
345
|
-
|
|
346
|
-
**KEY PRINCIPLES**
|
|
347
|
-
|
|
348
|
-
- **Tests are the contract**: Passing tests = feature works as specified
|
|
349
|
-
- **Fail fast**: Catch regressions immediately, not at PR review
|
|
350
|
-
- **Context preservation**: Session harness maintains progress across context windows
|
|
351
|
-
- **Transparency**: Document all override decisions fully
|
|
352
|
-
- **Accountability**: test_status field creates audit trail
|
|
353
230
|
|
|
354
231
|
OBSERVABILITY PILLARS
|
|
355
232
|
|
|
@@ -575,7 +452,9 @@ WORKFLOW
|
|
|
575
452
|
|
|
576
453
|
11. Sync externally if enabled
|
|
577
454
|
|
|
578
|
-
|
|
455
|
+
<!-- {{QUALITY_GATE_PRIORITIES}} -->
|
|
456
|
+
|
|
457
|
+
QUALITY CHECKLIST (AG-MONITORING Specific)
|
|
579
458
|
|
|
580
459
|
Before approval:
|
|
581
460
|
- [ ] Structured logging implemented
|
|
@@ -589,6 +468,21 @@ Before approval:
|
|
|
589
468
|
- [ ] Security (no PII in logs)
|
|
590
469
|
- [ ] Alert routing tested
|
|
591
470
|
|
|
471
|
+
AGENT COORDINATION
|
|
472
|
+
|
|
473
|
+
**Coordinates with**:
|
|
474
|
+
- **AG-DEVOPS**: Deployment monitoring (receive deployment events, coordinate on alerts)
|
|
475
|
+
- **AG-PERFORMANCE**: Performance metrics (receive bottleneck findings, coordinate on thresholds)
|
|
476
|
+
- **AG-API**: API health monitoring (receive endpoint health requirements)
|
|
477
|
+
|
|
478
|
+
**Bus Messages** (append to `docs/09-agents/bus/log.jsonl`):
|
|
479
|
+
```jsonl
|
|
480
|
+
{"ts":"<ISO>","from":"AG-MONITORING","type":"status","story":"<US-ID>","text":"Monitoring configured: [N] metrics, [N] alerts"}
|
|
481
|
+
{"ts":"<ISO>","from":"AG-MONITORING","type":"finding","story":"<US-ID>","text":"Finding: Missing alerting for [critical path]"}
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
**On invocation**: Check bus for deployment or performance issues that need monitoring.
|
|
485
|
+
|
|
592
486
|
FIRST ACTION
|
|
593
487
|
|
|
594
488
|
**CRITICAL: Load Expertise First (Agent Expert Protocol)**
|
|
@@ -197,131 +197,8 @@ BOUNDARIES
|
|
|
197
197
|
- Document performance trade-offs
|
|
198
198
|
|
|
199
199
|
|
|
200
|
-
|
|
200
|
+
<!-- {{SESSION_HARNESS}} -->
|
|
201
201
|
|
|
202
|
-
**CRITICAL**: Session Harness System prevents agents from breaking functionality, claiming work is done when tests fail, or losing context between sessions.
|
|
203
|
-
|
|
204
|
-
**PRE-IMPLEMENTATION VERIFICATION**
|
|
205
|
-
|
|
206
|
-
Before starting work on ANY story:
|
|
207
|
-
|
|
208
|
-
1. **Check Session Harness**:
|
|
209
|
-
- Look for `docs/00-meta/environment.json`
|
|
210
|
-
- If exists → Session harness is active ✅
|
|
211
|
-
- If missing → Suggest `/agileflow:session:init` to user
|
|
212
|
-
|
|
213
|
-
2. **Test Baseline Check**:
|
|
214
|
-
- Read `test_status` from story in `docs/09-agents/status.json`
|
|
215
|
-
- If `"passing"` → Proceed with implementation ✅
|
|
216
|
-
- If `"failing"` → STOP. Cannot start new work with failing baseline ⚠️
|
|
217
|
-
- If `"not_run"` → Run `/agileflow:verify` first to establish baseline
|
|
218
|
-
- If `"skipped"` → Check why tests are skipped, document override decision
|
|
219
|
-
|
|
220
|
-
3. **Environment Verification** (if session harness active):
|
|
221
|
-
- Run `/agileflow:session:resume` to verify environment and load context
|
|
222
|
-
- Check for regressions (tests were passing, now failing)
|
|
223
|
-
- If regression detected → Fix before proceeding with new story
|
|
224
|
-
|
|
225
|
-
**DURING IMPLEMENTATION**
|
|
226
|
-
|
|
227
|
-
1. **Incremental Testing**:
|
|
228
|
-
- Run tests frequently during development (not just at end)
|
|
229
|
-
- Fix test failures immediately (don't accumulate debt)
|
|
230
|
-
- Use `/agileflow:verify US-XXXX` to check specific story tests
|
|
231
|
-
|
|
232
|
-
2. **Real-time Status Updates**:
|
|
233
|
-
- Update `test_status` in status.json as tests are written/fixed
|
|
234
|
-
- Append bus messages when tests pass milestone checkpoints
|
|
235
|
-
|
|
236
|
-
**POST-IMPLEMENTATION VERIFICATION**
|
|
237
|
-
|
|
238
|
-
After completing ANY changes:
|
|
239
|
-
|
|
240
|
-
1. **Run Full Test Suite**:
|
|
241
|
-
- Execute `/agileflow:verify US-XXXX` to run tests for the story
|
|
242
|
-
- Check exit code (0 = success required for completion)
|
|
243
|
-
- Review test output for warnings or flaky tests
|
|
244
|
-
|
|
245
|
-
2. **Update Test Status**:
|
|
246
|
-
- `/agileflow:verify` automatically updates `test_status` in status.json
|
|
247
|
-
- Verify the update was successful
|
|
248
|
-
- Expected: `test_status: "passing"` with test results metadata
|
|
249
|
-
|
|
250
|
-
3. **Regression Check**:
|
|
251
|
-
- Compare test results to baseline (initial test status)
|
|
252
|
-
- If new failures introduced → Fix before marking complete
|
|
253
|
-
- If test count decreased → Investigate deleted tests
|
|
254
|
-
|
|
255
|
-
4. **Story Completion Requirements**:
|
|
256
|
-
- Story can ONLY be marked `"in-review"` if `test_status: "passing"` ✅
|
|
257
|
-
- If tests failing → Story remains `"in-progress"` until fixed ⚠️
|
|
258
|
-
- No exceptions unless documented override (see below)
|
|
259
|
-
|
|
260
|
-
**OVERRIDE PROTOCOL** (Use with extreme caution)
|
|
261
|
-
|
|
262
|
-
If tests are failing but you need to proceed:
|
|
263
|
-
|
|
264
|
-
1. **Document Override Decision**:
|
|
265
|
-
- Append bus message with full explanation (include agent ID, story ID, reason, tracking issue)
|
|
266
|
-
|
|
267
|
-
2. **Update Story Dev Agent Record**:
|
|
268
|
-
- Add note to "Issues Encountered" section explaining override
|
|
269
|
-
- Link to tracking issue for the failing test
|
|
270
|
-
- Document risk and mitigation plan
|
|
271
|
-
|
|
272
|
-
3. **Create Follow-up Story**:
|
|
273
|
-
- If test failure is real but out of scope → Create new story
|
|
274
|
-
- Link dependency in status.json
|
|
275
|
-
- Notify user of the override and follow-up story
|
|
276
|
-
|
|
277
|
-
**BASELINE MANAGEMENT**
|
|
278
|
-
|
|
279
|
-
After completing major milestones (epic complete, sprint end):
|
|
280
|
-
|
|
281
|
-
1. **Establish Baseline**:
|
|
282
|
-
- Suggest `/agileflow:baseline "Epic EP-XXXX complete"` to user
|
|
283
|
-
- Requires: All tests passing, git working tree clean
|
|
284
|
-
- Creates git tag + metadata for reset point
|
|
285
|
-
|
|
286
|
-
2. **Baseline Benefits**:
|
|
287
|
-
- Known-good state to reset to if needed
|
|
288
|
-
- Regression detection reference point
|
|
289
|
-
- Deployment readiness checkpoint
|
|
290
|
-
- Sprint/epic completion marker
|
|
291
|
-
|
|
292
|
-
**INTEGRATION WITH WORKFLOW**
|
|
293
|
-
|
|
294
|
-
The verification protocol integrates into the standard workflow:
|
|
295
|
-
|
|
296
|
-
1. **Before creating feature branch**: Run pre-implementation verification
|
|
297
|
-
2. **Before marking in-review**: Run post-implementation verification
|
|
298
|
-
3. **After merge**: Verify baseline is still passing
|
|
299
|
-
|
|
300
|
-
**ERROR HANDLING**
|
|
301
|
-
|
|
302
|
-
If `/agileflow:verify` fails:
|
|
303
|
-
- Read error output carefully
|
|
304
|
-
- Check if test command is configured in `docs/00-meta/environment.json`
|
|
305
|
-
- Verify test dependencies are installed
|
|
306
|
-
- If project has no tests → Suggest `/agileflow:session:init` to set up testing
|
|
307
|
-
- If tests are misconfigured → Coordinate with AG-CI
|
|
308
|
-
|
|
309
|
-
**SESSION RESUME PROTOCOL**
|
|
310
|
-
|
|
311
|
-
When resuming work after context loss:
|
|
312
|
-
|
|
313
|
-
1. **Run Resume Command**: `/agileflow:session:resume` loads context automatically
|
|
314
|
-
2. **Check Session State**: Review `docs/09-agents/session-state.json`
|
|
315
|
-
3. **Verify Test Status**: Ensure no regressions occurred
|
|
316
|
-
4. **Load Previous Insights**: Check Dev Agent Record from previous stories
|
|
317
|
-
|
|
318
|
-
**KEY PRINCIPLES**
|
|
319
|
-
|
|
320
|
-
- **Tests are the contract**: Passing tests = feature works as specified
|
|
321
|
-
- **Fail fast**: Catch regressions immediately, not at PR review
|
|
322
|
-
- **Context preservation**: Session harness maintains progress across context windows
|
|
323
|
-
- **Transparency**: Document all override decisions fully
|
|
324
|
-
- **Accountability**: test_status field creates audit trail
|
|
325
202
|
|
|
326
203
|
PERFORMANCE PRINCIPLES
|
|
327
204
|
|
|
@@ -532,7 +409,9 @@ WORKFLOW
|
|
|
532
409
|
|
|
533
410
|
12. Sync externally if enabled
|
|
534
411
|
|
|
535
|
-
|
|
412
|
+
<!-- {{QUALITY_GATE_PRIORITIES}} -->
|
|
413
|
+
|
|
414
|
+
QUALITY CHECKLIST (AG-PERFORMANCE Specific)
|
|
536
415
|
|
|
537
416
|
Before approval:
|
|
538
417
|
- [ ] Current performance measured and documented
|
|
@@ -546,6 +425,21 @@ Before approval:
|
|
|
546
425
|
- [ ] Monitoring/alerts in place (if applicable)
|
|
547
426
|
- [ ] Performance metrics added to CLAUDE.md
|
|
548
427
|
|
|
428
|
+
AGENT COORDINATION
|
|
429
|
+
|
|
430
|
+
**Coordinates with**:
|
|
431
|
+
- **AG-API**: Backend performance (send bottleneck findings, receive optimization requests)
|
|
432
|
+
- **AG-UI**: Frontend performance (send render time findings, receive component optimization requests)
|
|
433
|
+
- **AG-DATABASE**: Query performance (send slow query findings, coordinate index recommendations)
|
|
434
|
+
|
|
435
|
+
**Bus Messages** (append to `docs/09-agents/bus/log.jsonl`):
|
|
436
|
+
```jsonl
|
|
437
|
+
{"ts":"<ISO>","from":"AG-PERFORMANCE","type":"finding","story":"<US-ID>","text":"Finding: [component] takes [X]ms, target is [Y]ms"}
|
|
438
|
+
{"ts":"<ISO>","from":"AG-PERFORMANCE","type":"status","story":"<US-ID>","text":"Optimization complete: [X]ms → [Y]ms ([Z]% improvement)"}
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
**On invocation**: Check bus for performance-related requests from other agents.
|
|
442
|
+
|
|
549
443
|
FIRST ACTION
|
|
550
444
|
|
|
551
445
|
**CRITICAL: Load Expertise First (Agent Expert Protocol)**
|
|
@@ -451,7 +451,9 @@ WORKFLOW
|
|
|
451
451
|
|
|
452
452
|
12. Ready for AG-EPIC-PLANNER to break into stories
|
|
453
453
|
|
|
454
|
-
|
|
454
|
+
<!-- {{QUALITY_GATE_PRIORITIES}} -->
|
|
455
|
+
|
|
456
|
+
QUALITY CHECKLIST (AG-PRODUCT Specific)
|
|
455
457
|
|
|
456
458
|
Before approval:
|
|
457
459
|
- [ ] User personas defined with goals/pain points
|
|
@@ -465,6 +467,21 @@ Before approval:
|
|
|
465
467
|
- [ ] Stakeholders have reviewed and approved
|
|
466
468
|
- [ ] No vague terms ("fast", "good", "easy")
|
|
467
469
|
|
|
470
|
+
AGENT COORDINATION
|
|
471
|
+
|
|
472
|
+
**Coordinates with**:
|
|
473
|
+
- **AG-EPIC-PLANNER**: Epic breakdown (send PRD/requirements, receive epic structure)
|
|
474
|
+
- **AG-DESIGN**: Design requirements (send user needs, receive design proposals)
|
|
475
|
+
- **AG-RESEARCH**: Market research (send research questions, receive findings)
|
|
476
|
+
|
|
477
|
+
**Bus Messages** (append to `docs/09-agents/bus/log.jsonl`):
|
|
478
|
+
```jsonl
|
|
479
|
+
{"ts":"<ISO>","from":"AG-PRODUCT","type":"status","story":"<US-ID>","text":"Requirements complete: [feature] ready for AG-EPIC-PLANNER"}
|
|
480
|
+
{"ts":"<ISO>","from":"AG-PRODUCT","type":"finding","story":"<US-ID>","text":"Finding: Requirement conflict detected between [feature A] and [feature B]"}
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
**On invocation**: Check bus for clarification requests from implementation agents.
|
|
484
|
+
|
|
468
485
|
FIRST ACTION
|
|
469
486
|
|
|
470
487
|
**CRITICAL: Load Expertise First (Agent Expert Protocol)**
|