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
|
@@ -64,16 +64,24 @@ function hasScreen() {
|
|
|
64
64
|
* Build the Claude command for a session
|
|
65
65
|
*/
|
|
66
66
|
function buildClaudeCommand(sessionPath, options = {}) {
|
|
67
|
-
const { init = false, dangerous = false, prompt = null } = options;
|
|
67
|
+
const { init = false, dangerous = false, prompt = null, claudeArgs = null, noClaude = false } = options;
|
|
68
68
|
const parts = [`cd "${sessionPath}"`];
|
|
69
69
|
|
|
70
70
|
if (init) {
|
|
71
71
|
parts.push('claude init --yes 2>/dev/null || true');
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
// If noClaude is true, just return cd command (no claude startup)
|
|
75
|
+
if (noClaude) {
|
|
76
|
+
return parts.join(' && ');
|
|
77
|
+
}
|
|
78
|
+
|
|
74
79
|
let claudeCmd = 'claude';
|
|
75
80
|
if (dangerous) {
|
|
76
|
-
claudeCmd = 'claude --
|
|
81
|
+
claudeCmd = 'claude --dangerously-skip-permissions';
|
|
82
|
+
} else if (claudeArgs) {
|
|
83
|
+
// Custom claude arguments (e.g., --permission-mode acceptEdits)
|
|
84
|
+
claudeCmd = `claude ${claudeArgs}`;
|
|
77
85
|
}
|
|
78
86
|
|
|
79
87
|
if (prompt) {
|
|
@@ -215,7 +223,7 @@ function getReadyStoriesFromEpic(epicId) {
|
|
|
215
223
|
/**
|
|
216
224
|
* Main spawn command
|
|
217
225
|
*/
|
|
218
|
-
function spawn(args) {
|
|
226
|
+
async function spawn(args) {
|
|
219
227
|
const count = args.count ? parseInt(args.count, 10) : null;
|
|
220
228
|
const branches = args.branches ? args.branches.split(',').map(b => b.trim()) : null;
|
|
221
229
|
const fromEpic = args['from-epic'] || args.fromEpic;
|
|
@@ -223,6 +231,8 @@ function spawn(args) {
|
|
|
223
231
|
const init = args.init || false;
|
|
224
232
|
const dangerous = args.dangerous || false;
|
|
225
233
|
const prompt = args.prompt || null;
|
|
234
|
+
const claudeArgs = args['claude-args'] || args.claudeArgs || null;
|
|
235
|
+
const noClaude = args['no-claude'] || args.noClaude || false;
|
|
226
236
|
|
|
227
237
|
// Determine what to create
|
|
228
238
|
let sessionsToCreate = [];
|
|
@@ -276,7 +286,7 @@ function spawn(args) {
|
|
|
276
286
|
|
|
277
287
|
const createdSessions = [];
|
|
278
288
|
for (const sessionSpec of sessionsToCreate) {
|
|
279
|
-
const result = sessionManager.createSession({
|
|
289
|
+
const result = await sessionManager.createSession({
|
|
280
290
|
nickname: sessionSpec.nickname,
|
|
281
291
|
branch: sessionSpec.branch,
|
|
282
292
|
});
|
|
@@ -296,10 +306,7 @@ function spawn(args) {
|
|
|
296
306
|
});
|
|
297
307
|
|
|
298
308
|
// Show what was copied
|
|
299
|
-
const copied = [
|
|
300
|
-
...(result.envFilesCopied || []),
|
|
301
|
-
...(result.foldersCopied || []),
|
|
302
|
-
];
|
|
309
|
+
const copied = [...(result.envFilesCopied || []), ...(result.foldersCopied || [])];
|
|
303
310
|
const copyInfo = copied.length ? dim(` (copied: ${copied.join(', ')})`) : '';
|
|
304
311
|
console.log(success(` ✓ Session ${result.sessionId}: ${sessionSpec.nickname}${copyInfo}`));
|
|
305
312
|
}
|
|
@@ -314,10 +321,10 @@ function spawn(args) {
|
|
|
314
321
|
// Spawn in tmux or output commands
|
|
315
322
|
if (noTmux) {
|
|
316
323
|
// User explicitly requested manual mode
|
|
317
|
-
outputCommands(createdSessions, { init, dangerous, prompt });
|
|
324
|
+
outputCommands(createdSessions, { init, dangerous, prompt, claudeArgs, noClaude });
|
|
318
325
|
} else if (hasTmux()) {
|
|
319
326
|
// Tmux available - use it
|
|
320
|
-
const tmuxResult = spawnInTmux(createdSessions, { init, dangerous, prompt });
|
|
327
|
+
const tmuxResult = spawnInTmux(createdSessions, { init, dangerous, prompt, claudeArgs, noClaude });
|
|
321
328
|
|
|
322
329
|
if (tmuxResult.success) {
|
|
323
330
|
console.log(success(`\n✅ Tmux session created: ${tmuxResult.sessionName}`));
|
|
@@ -329,7 +336,7 @@ function spawn(args) {
|
|
|
329
336
|
console.log('');
|
|
330
337
|
} else {
|
|
331
338
|
console.error(error(`Failed to create tmux session: ${tmuxResult.error}`));
|
|
332
|
-
outputCommands(createdSessions, { init, dangerous, prompt });
|
|
339
|
+
outputCommands(createdSessions, { init, dangerous, prompt, claudeArgs, noClaude });
|
|
333
340
|
}
|
|
334
341
|
} else {
|
|
335
342
|
// Tmux NOT available - require it or use --no-tmux
|
|
@@ -341,16 +348,22 @@ function spawn(args) {
|
|
|
341
348
|
console.log(` ${c.cyan}No sudo?${c.reset} conda install -c conda-forge tmux`);
|
|
342
349
|
console.log('');
|
|
343
350
|
console.log(dim('Or use --no-tmux to get manual commands instead:'));
|
|
344
|
-
console.log(
|
|
351
|
+
console.log(
|
|
352
|
+
` ${c.cyan}node spawn-parallel.js spawn --count ${createdSessions.length} --no-tmux${c.reset}`
|
|
353
|
+
);
|
|
345
354
|
console.log('');
|
|
346
|
-
console.log(
|
|
355
|
+
console.log(
|
|
356
|
+
warning('Worktrees created but Claude not spawned. Install tmux or use --no-tmux.')
|
|
357
|
+
);
|
|
347
358
|
}
|
|
348
359
|
|
|
349
360
|
// Summary
|
|
350
361
|
console.log(bold('\n📊 Session Summary:'));
|
|
351
362
|
console.log(dim('─'.repeat(50)));
|
|
352
363
|
for (const session of createdSessions) {
|
|
353
|
-
console.log(
|
|
364
|
+
console.log(
|
|
365
|
+
` ${c.cyan}${session.sessionId}${c.reset} │ ${session.nickname} │ ${dim(session.branch)}`
|
|
366
|
+
);
|
|
354
367
|
}
|
|
355
368
|
console.log(dim('─'.repeat(50)));
|
|
356
369
|
console.log(`${c.cyan}Use /agileflow:session:status to view all sessions.${c.reset}`);
|
|
@@ -389,15 +402,20 @@ function list() {
|
|
|
389
402
|
/**
|
|
390
403
|
* Add a new window to an existing tmux session
|
|
391
404
|
*/
|
|
392
|
-
function addWindow(args) {
|
|
405
|
+
async function addWindow(args) {
|
|
393
406
|
const nickname = args.nickname || args.name || null;
|
|
394
407
|
const branch = args.branch || null;
|
|
408
|
+
const dangerous = args.dangerous || false;
|
|
409
|
+
const claudeArgs = args['claude-args'] || args.claudeArgs || null;
|
|
410
|
+
const noClaude = args['no-claude'] || args.noClaude || false;
|
|
395
411
|
|
|
396
412
|
// Check if we're inside a tmux session
|
|
397
413
|
const tmuxEnv = process.env.TMUX;
|
|
398
414
|
if (!tmuxEnv) {
|
|
399
415
|
console.log(error('\n❌ Not in a tmux session.\n'));
|
|
400
|
-
console.log(
|
|
416
|
+
console.log(
|
|
417
|
+
`${c.cyan}Use /agileflow:session:spawn to create a new tmux session first.${c.reset}`
|
|
418
|
+
);
|
|
401
419
|
console.log(`${dim('Or run: node .agileflow/scripts/spawn-parallel.js spawn --count 1')}`);
|
|
402
420
|
return { success: false, error: 'Not in tmux' };
|
|
403
421
|
}
|
|
@@ -422,7 +440,7 @@ function addWindow(args) {
|
|
|
422
440
|
branch: branch || `parallel-${Date.now()}`,
|
|
423
441
|
};
|
|
424
442
|
|
|
425
|
-
const result = sessionManager.createSession({
|
|
443
|
+
const result = await sessionManager.createSession({
|
|
426
444
|
nickname: sessionSpec.nickname,
|
|
427
445
|
branch: sessionSpec.branch,
|
|
428
446
|
});
|
|
@@ -433,12 +451,16 @@ function addWindow(args) {
|
|
|
433
451
|
}
|
|
434
452
|
|
|
435
453
|
const windowName = sessionSpec.nickname;
|
|
436
|
-
const cmd = buildClaudeCommand(result.path, {});
|
|
454
|
+
const cmd = buildClaudeCommand(result.path, { dangerous, claudeArgs, noClaude });
|
|
437
455
|
|
|
438
456
|
// Create new window in current tmux session
|
|
439
|
-
const newWindowResult = spawnSync(
|
|
440
|
-
|
|
441
|
-
|
|
457
|
+
const newWindowResult = spawnSync(
|
|
458
|
+
'tmux',
|
|
459
|
+
['new-window', '-t', currentSession, '-n', windowName],
|
|
460
|
+
{
|
|
461
|
+
encoding: 'utf8',
|
|
462
|
+
}
|
|
463
|
+
);
|
|
442
464
|
|
|
443
465
|
if (newWindowResult.status !== 0) {
|
|
444
466
|
console.error(error(`Failed to create tmux window: ${newWindowResult.stderr}`));
|
|
@@ -453,10 +475,13 @@ function addWindow(args) {
|
|
|
453
475
|
// Get window number
|
|
454
476
|
let windowIndex;
|
|
455
477
|
try {
|
|
456
|
-
windowIndex = execSync(
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
478
|
+
windowIndex = execSync(
|
|
479
|
+
`tmux list-windows -t ${currentSession} -F "#I:#W" | grep ":${windowName}$" | cut -d: -f1`,
|
|
480
|
+
{
|
|
481
|
+
encoding: 'utf8',
|
|
482
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
483
|
+
}
|
|
484
|
+
).trim();
|
|
460
485
|
} catch {
|
|
461
486
|
windowIndex = '?';
|
|
462
487
|
}
|
|
@@ -493,7 +518,10 @@ function killAll() {
|
|
|
493
518
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
494
519
|
});
|
|
495
520
|
|
|
496
|
-
const sessions = result
|
|
521
|
+
const sessions = result
|
|
522
|
+
.trim()
|
|
523
|
+
.split('\n')
|
|
524
|
+
.filter(s => s.startsWith('claude-parallel-'));
|
|
497
525
|
|
|
498
526
|
if (sessions.length === 0) {
|
|
499
527
|
console.log(`${c.cyan}No claude-parallel tmux sessions found.${c.reset}`);
|
|
@@ -536,7 +564,9 @@ ${c.cyan}SPAWN OPTIONS:${c.reset}
|
|
|
536
564
|
--branches "a,b,c" Create worktrees for specific branch names
|
|
537
565
|
--from-epic EP-XXX Create worktrees for ready stories in epic
|
|
538
566
|
--init Run 'claude init' in each worktree
|
|
539
|
-
--dangerous Use --
|
|
567
|
+
--dangerous Use --dangerously-skip-permissions
|
|
568
|
+
--claude-args "..." Custom arguments for claude command
|
|
569
|
+
--no-claude Create worktree but don't start claude
|
|
540
570
|
--no-tmux Output commands without spawning in tmux
|
|
541
571
|
--prompt "TEXT" Initial prompt to send to each Claude instance
|
|
542
572
|
|
|
@@ -560,6 +590,9 @@ ${c.cyan}ADD-WINDOW OPTIONS:${c.reset}
|
|
|
560
590
|
--name NAME Name for the new session/window
|
|
561
591
|
--nickname NAME Alias for --name
|
|
562
592
|
--branch BRANCH Use specific branch name
|
|
593
|
+
--dangerous Use --dangerously-skip-permissions
|
|
594
|
+
--claude-args "..." Custom arguments for claude command
|
|
595
|
+
--no-claude Create worktree but don't start claude
|
|
563
596
|
|
|
564
597
|
${c.cyan}ADD-WINDOW EXAMPLES:${c.reset}
|
|
565
598
|
${dim('# Add window with auto-generated name (when in tmux)')}
|
|
@@ -567,6 +600,15 @@ ${c.cyan}ADD-WINDOW EXAMPLES:${c.reset}
|
|
|
567
600
|
|
|
568
601
|
${dim('# Add named window')}
|
|
569
602
|
node scripts/spawn-parallel.js add-window --name auth
|
|
603
|
+
|
|
604
|
+
${dim('# Add window without starting claude')}
|
|
605
|
+
node scripts/spawn-parallel.js add-window --name research --no-claude
|
|
606
|
+
|
|
607
|
+
${dim('# Add window with skip permissions')}
|
|
608
|
+
node scripts/spawn-parallel.js add-window --name trusted --dangerous
|
|
609
|
+
|
|
610
|
+
${dim('# Add window with custom claude args')}
|
|
611
|
+
node scripts/spawn-parallel.js add-window --name safe --claude-args "--permission-mode acceptEdits"
|
|
570
612
|
`);
|
|
571
613
|
}
|
|
572
614
|
|
|
@@ -601,16 +643,16 @@ function parseArgs(argv) {
|
|
|
601
643
|
/**
|
|
602
644
|
* Main entry point
|
|
603
645
|
*/
|
|
604
|
-
function main() {
|
|
646
|
+
async function main() {
|
|
605
647
|
const { command, args } = parseArgs(process.argv.slice(2));
|
|
606
648
|
|
|
607
649
|
switch (command) {
|
|
608
650
|
case 'spawn':
|
|
609
|
-
spawn(args);
|
|
651
|
+
await spawn(args);
|
|
610
652
|
break;
|
|
611
653
|
case 'add-window':
|
|
612
654
|
case 'add':
|
|
613
|
-
addWindow(args);
|
|
655
|
+
await addWindow(args);
|
|
614
656
|
break;
|
|
615
657
|
case 'list':
|
|
616
658
|
list();
|
|
@@ -189,131 +189,8 @@ BOUNDARIES
|
|
|
189
189
|
- Always prioritize real user needs over technical convenience
|
|
190
190
|
|
|
191
191
|
|
|
192
|
-
|
|
192
|
+
<!-- {{SESSION_HARNESS}} -->
|
|
193
193
|
|
|
194
|
-
**CRITICAL**: Session Harness System prevents agents from breaking functionality, claiming work is done when tests fail, or losing context between sessions.
|
|
195
|
-
|
|
196
|
-
**PRE-IMPLEMENTATION VERIFICATION**
|
|
197
|
-
|
|
198
|
-
Before starting work on ANY story:
|
|
199
|
-
|
|
200
|
-
1. **Check Session Harness**:
|
|
201
|
-
- Look for `docs/00-meta/environment.json`
|
|
202
|
-
- If exists → Session harness is active ✅
|
|
203
|
-
- If missing → Suggest `/agileflow:session:init` to user
|
|
204
|
-
|
|
205
|
-
2. **Test Baseline Check**:
|
|
206
|
-
- Read `test_status` from story in `docs/09-agents/status.json`
|
|
207
|
-
- If `"passing"` → Proceed with implementation ✅
|
|
208
|
-
- If `"failing"` → STOP. Cannot start new work with failing baseline ⚠️
|
|
209
|
-
- If `"not_run"` → Run `/agileflow:verify` first to establish baseline
|
|
210
|
-
- If `"skipped"` → Check why tests are skipped, document override decision
|
|
211
|
-
|
|
212
|
-
3. **Environment Verification** (if session harness active):
|
|
213
|
-
- Run `/agileflow:session:resume` to verify environment and load context
|
|
214
|
-
- Check for regressions (tests were passing, now failing)
|
|
215
|
-
- If regression detected → Fix before proceeding with new story
|
|
216
|
-
|
|
217
|
-
**DURING IMPLEMENTATION**
|
|
218
|
-
|
|
219
|
-
1. **Incremental Testing**:
|
|
220
|
-
- Run tests frequently during development (not just at end)
|
|
221
|
-
- Fix test failures immediately (don't accumulate debt)
|
|
222
|
-
- Use `/agileflow:verify US-XXXX` to check specific story tests
|
|
223
|
-
|
|
224
|
-
2. **Real-time Status Updates**:
|
|
225
|
-
- Update `test_status` in status.json as tests are written/fixed
|
|
226
|
-
- Append bus messages when tests pass milestone checkpoints
|
|
227
|
-
|
|
228
|
-
**POST-IMPLEMENTATION VERIFICATION**
|
|
229
|
-
|
|
230
|
-
After completing ANY changes:
|
|
231
|
-
|
|
232
|
-
1. **Run Full Test Suite**:
|
|
233
|
-
- Execute `/agileflow:verify US-XXXX` to run tests for the story
|
|
234
|
-
- Check exit code (0 = success required for completion)
|
|
235
|
-
- Review test output for warnings or flaky tests
|
|
236
|
-
|
|
237
|
-
2. **Update Test Status**:
|
|
238
|
-
- `/agileflow:verify` automatically updates `test_status` in status.json
|
|
239
|
-
- Verify the update was successful
|
|
240
|
-
- Expected: `test_status: "passing"` with test results metadata
|
|
241
|
-
|
|
242
|
-
3. **Regression Check**:
|
|
243
|
-
- Compare test results to baseline (initial test status)
|
|
244
|
-
- If new failures introduced → Fix before marking complete
|
|
245
|
-
- If test count decreased → Investigate deleted tests
|
|
246
|
-
|
|
247
|
-
4. **Story Completion Requirements**:
|
|
248
|
-
- Story can ONLY be marked `"in-review"` if `test_status: "passing"` ✅
|
|
249
|
-
- If tests failing → Story remains `"in-progress"` until fixed ⚠️
|
|
250
|
-
- No exceptions unless documented override (see below)
|
|
251
|
-
|
|
252
|
-
**OVERRIDE PROTOCOL** (Use with extreme caution)
|
|
253
|
-
|
|
254
|
-
If tests are failing but you need to proceed:
|
|
255
|
-
|
|
256
|
-
1. **Document Override Decision**:
|
|
257
|
-
- Append bus message with full explanation (include agent ID, story ID, reason, tracking issue)
|
|
258
|
-
|
|
259
|
-
2. **Update Story Dev Agent Record**:
|
|
260
|
-
- Add note to "Issues Encountered" section explaining override
|
|
261
|
-
- Link to tracking issue for the failing test
|
|
262
|
-
- Document risk and mitigation plan
|
|
263
|
-
|
|
264
|
-
3. **Create Follow-up Story**:
|
|
265
|
-
- If test failure is real but out of scope → Create new story
|
|
266
|
-
- Link dependency in status.json
|
|
267
|
-
- Notify user of the override and follow-up story
|
|
268
|
-
|
|
269
|
-
**BASELINE MANAGEMENT**
|
|
270
|
-
|
|
271
|
-
After completing major milestones (epic complete, sprint end):
|
|
272
|
-
|
|
273
|
-
1. **Establish Baseline**:
|
|
274
|
-
- Suggest `/agileflow:baseline "Epic EP-XXXX complete"` to user
|
|
275
|
-
- Requires: All tests passing, git working tree clean
|
|
276
|
-
- Creates git tag + metadata for reset point
|
|
277
|
-
|
|
278
|
-
2. **Baseline Benefits**:
|
|
279
|
-
- Known-good state to reset to if needed
|
|
280
|
-
- Regression detection reference point
|
|
281
|
-
- Deployment readiness checkpoint
|
|
282
|
-
- Sprint/epic completion marker
|
|
283
|
-
|
|
284
|
-
**INTEGRATION WITH WORKFLOW**
|
|
285
|
-
|
|
286
|
-
The verification protocol integrates into the standard workflow:
|
|
287
|
-
|
|
288
|
-
1. **Before creating feature branch**: Run pre-implementation verification
|
|
289
|
-
2. **Before marking in-review**: Run post-implementation verification
|
|
290
|
-
3. **After merge**: Verify baseline is still passing
|
|
291
|
-
|
|
292
|
-
**ERROR HANDLING**
|
|
293
|
-
|
|
294
|
-
If `/agileflow:verify` fails:
|
|
295
|
-
- Read error output carefully
|
|
296
|
-
- Check if test command is configured in `docs/00-meta/environment.json`
|
|
297
|
-
- Verify test dependencies are installed
|
|
298
|
-
- If project has no tests → Suggest `/agileflow:session:init` to set up testing
|
|
299
|
-
- If tests are misconfigured → Coordinate with AG-CI
|
|
300
|
-
|
|
301
|
-
**SESSION RESUME PROTOCOL**
|
|
302
|
-
|
|
303
|
-
When resuming work after context loss:
|
|
304
|
-
|
|
305
|
-
1. **Run Resume Command**: `/agileflow:session:resume` loads context automatically
|
|
306
|
-
2. **Check Session State**: Review `docs/09-agents/session-state.json`
|
|
307
|
-
3. **Verify Test Status**: Ensure no regressions occurred
|
|
308
|
-
4. **Load Previous Insights**: Check Dev Agent Record from previous stories
|
|
309
|
-
|
|
310
|
-
**KEY PRINCIPLES**
|
|
311
|
-
|
|
312
|
-
- **Tests are the contract**: Passing tests = feature works as specified
|
|
313
|
-
- **Fail fast**: Catch regressions immediately, not at PR review
|
|
314
|
-
- **Context preservation**: Session harness maintains progress across context windows
|
|
315
|
-
- **Transparency**: Document all override decisions fully
|
|
316
|
-
- **Accountability**: test_status field creates audit trail
|
|
317
194
|
|
|
318
195
|
WCAG 2.1 STANDARDS
|
|
319
196
|
|
|
@@ -554,7 +431,9 @@ WORKFLOW
|
|
|
554
431
|
|
|
555
432
|
10. Sync externally if enabled
|
|
556
433
|
|
|
557
|
-
|
|
434
|
+
<!-- {{QUALITY_GATE_PRIORITIES}} -->
|
|
435
|
+
|
|
436
|
+
QUALITY CHECKLIST (AG-ACCESSIBILITY Specific)
|
|
558
437
|
|
|
559
438
|
Before approval:
|
|
560
439
|
- [ ] WCAG 2.1 Level AA compliance verified
|
|
@@ -568,6 +447,21 @@ Before approval:
|
|
|
568
447
|
- [ ] Motion respects prefers-reduced-motion
|
|
569
448
|
- [ ] Accessibility documentation complete
|
|
570
449
|
|
|
450
|
+
AGENT COORDINATION
|
|
451
|
+
|
|
452
|
+
**Coordinates with**:
|
|
453
|
+
- **AG-UI**: Accessibility in UI components (send a11y findings, receive implementation questions)
|
|
454
|
+
- **AG-DESIGN**: Design system accessibility (send contrast/focus requirements, coordinate on design tokens)
|
|
455
|
+
- **AG-QA**: Accessibility testing (send test criteria, receive test results)
|
|
456
|
+
|
|
457
|
+
**Bus Messages** (append to `docs/09-agents/bus/log.jsonl`):
|
|
458
|
+
```jsonl
|
|
459
|
+
{"ts":"<ISO>","from":"AG-ACCESSIBILITY","type":"finding","story":"<US-ID>","text":"Finding: Component [X] missing keyboard navigation"}
|
|
460
|
+
{"ts":"<ISO>","from":"AG-ACCESSIBILITY","type":"status","story":"<US-ID>","text":"A11y audit complete: WCAG AA compliance verified"}
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
**On invocation**: Check bus for AG-UI requests for accessibility review.
|
|
464
|
+
|
|
571
465
|
FIRST ACTION
|
|
572
466
|
|
|
573
467
|
**CRITICAL: Load Expertise First (Agent Expert Protocol)**
|
|
@@ -362,7 +362,9 @@ ADR TEMPLATE STRUCTURE
|
|
|
362
362
|
- [Title](URL) - Description
|
|
363
363
|
```
|
|
364
364
|
|
|
365
|
-
|
|
365
|
+
<!-- {{QUALITY_GATE_PRIORITIES}} -->
|
|
366
|
+
|
|
367
|
+
QUALITY CHECKLIST (AG-ADR-WRITER Specific)
|
|
366
368
|
Before creating ADR:
|
|
367
369
|
- [ ] Context explains why decision is needed now
|
|
368
370
|
- [ ] At least 2 alternatives documented
|
|
@@ -388,6 +390,21 @@ TONE
|
|
|
388
390
|
- Avoid advocacy (document, don't persuade)
|
|
389
391
|
- Focus on context and reasoning, not implementation details
|
|
390
392
|
|
|
393
|
+
AGENT COORDINATION
|
|
394
|
+
|
|
395
|
+
**Coordinates with**:
|
|
396
|
+
- **AG-RESEARCH**: Technical research (receive research findings, document decisions)
|
|
397
|
+
- **AG-PRODUCT**: Product decisions (receive feature requirements, document trade-offs)
|
|
398
|
+
- **AG-EPIC-PLANNER**: Epic planning (send architectural constraints, receive epic context)
|
|
399
|
+
|
|
400
|
+
**Bus Messages** (append to `docs/09-agents/bus/log.jsonl`):
|
|
401
|
+
```jsonl
|
|
402
|
+
{"ts":"<ISO>","from":"AG-ADR-WRITER","type":"status","story":"<US-ID>","text":"ADR-XXXX created: [decision title]"}
|
|
403
|
+
{"ts":"<ISO>","from":"AG-ADR-WRITER","type":"finding","story":"<US-ID>","text":"Finding: Existing ADR-YYYY conflicts with proposed approach"}
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
**On invocation**: Check bus for architectural decisions that need documentation.
|
|
407
|
+
|
|
391
408
|
FIRST ACTION
|
|
392
409
|
|
|
393
410
|
**CRITICAL: Load Expertise First (Agent Expert Protocol)**
|
|
@@ -212,131 +212,8 @@ BOUNDARIES
|
|
|
212
212
|
- Always prioritize user privacy and data protection
|
|
213
213
|
|
|
214
214
|
|
|
215
|
-
|
|
215
|
+
<!-- {{SESSION_HARNESS}} -->
|
|
216
216
|
|
|
217
|
-
**CRITICAL**: Session Harness System prevents agents from breaking functionality, claiming work is done when tests fail, or losing context between sessions.
|
|
218
|
-
|
|
219
|
-
**PRE-IMPLEMENTATION VERIFICATION**
|
|
220
|
-
|
|
221
|
-
Before starting work on ANY story:
|
|
222
|
-
|
|
223
|
-
1. **Check Session Harness**:
|
|
224
|
-
- Look for `docs/00-meta/environment.json`
|
|
225
|
-
- If exists → Session harness is active ✅
|
|
226
|
-
- If missing → Suggest `/agileflow:session:init` to user
|
|
227
|
-
|
|
228
|
-
2. **Test Baseline Check**:
|
|
229
|
-
- Read `test_status` from story in `docs/09-agents/status.json`
|
|
230
|
-
- If `"passing"` → Proceed with implementation ✅
|
|
231
|
-
- If `"failing"` → STOP. Cannot start new work with failing baseline ⚠️
|
|
232
|
-
- If `"not_run"` → Run `/agileflow:verify` first to establish baseline
|
|
233
|
-
- If `"skipped"` → Check why tests are skipped, document override decision
|
|
234
|
-
|
|
235
|
-
3. **Environment Verification** (if session harness active):
|
|
236
|
-
- Run `/agileflow:session:resume` to verify environment and load context
|
|
237
|
-
- Check for regressions (tests were passing, now failing)
|
|
238
|
-
- If regression detected → Fix before proceeding with new story
|
|
239
|
-
|
|
240
|
-
**DURING IMPLEMENTATION**
|
|
241
|
-
|
|
242
|
-
1. **Incremental Testing**:
|
|
243
|
-
- Run tests frequently during development (not just at end)
|
|
244
|
-
- Fix test failures immediately (don't accumulate debt)
|
|
245
|
-
- Use `/agileflow:verify US-XXXX` to check specific story tests
|
|
246
|
-
|
|
247
|
-
2. **Real-time Status Updates**:
|
|
248
|
-
- Update `test_status` in status.json as tests are written/fixed
|
|
249
|
-
- Append bus messages when tests pass milestone checkpoints
|
|
250
|
-
|
|
251
|
-
**POST-IMPLEMENTATION VERIFICATION**
|
|
252
|
-
|
|
253
|
-
After completing ANY changes:
|
|
254
|
-
|
|
255
|
-
1. **Run Full Test Suite**:
|
|
256
|
-
- Execute `/agileflow:verify US-XXXX` to run tests for the story
|
|
257
|
-
- Check exit code (0 = success required for completion)
|
|
258
|
-
- Review test output for warnings or flaky tests
|
|
259
|
-
|
|
260
|
-
2. **Update Test Status**:
|
|
261
|
-
- `/agileflow:verify` automatically updates `test_status` in status.json
|
|
262
|
-
- Verify the update was successful
|
|
263
|
-
- Expected: `test_status: "passing"` with test results metadata
|
|
264
|
-
|
|
265
|
-
3. **Regression Check**:
|
|
266
|
-
- Compare test results to baseline (initial test status)
|
|
267
|
-
- If new failures introduced → Fix before marking complete
|
|
268
|
-
- If test count decreased → Investigate deleted tests
|
|
269
|
-
|
|
270
|
-
4. **Story Completion Requirements**:
|
|
271
|
-
- Story can ONLY be marked `"in-review"` if `test_status: "passing"` ✅
|
|
272
|
-
- If tests failing → Story remains `"in-progress"` until fixed ⚠️
|
|
273
|
-
- No exceptions unless documented override (see below)
|
|
274
|
-
|
|
275
|
-
**OVERRIDE PROTOCOL** (Use with extreme caution)
|
|
276
|
-
|
|
277
|
-
If tests are failing but you need to proceed:
|
|
278
|
-
|
|
279
|
-
1. **Document Override Decision**:
|
|
280
|
-
- Append bus message with full explanation (include agent ID, story ID, reason, tracking issue)
|
|
281
|
-
|
|
282
|
-
2. **Update Story Dev Agent Record**:
|
|
283
|
-
- Add note to "Issues Encountered" section explaining override
|
|
284
|
-
- Link to tracking issue for the failing test
|
|
285
|
-
- Document risk and mitigation plan
|
|
286
|
-
|
|
287
|
-
3. **Create Follow-up Story**:
|
|
288
|
-
- If test failure is real but out of scope → Create new story
|
|
289
|
-
- Link dependency in status.json
|
|
290
|
-
- Notify user of the override and follow-up story
|
|
291
|
-
|
|
292
|
-
**BASELINE MANAGEMENT**
|
|
293
|
-
|
|
294
|
-
After completing major milestones (epic complete, sprint end):
|
|
295
|
-
|
|
296
|
-
1. **Establish Baseline**:
|
|
297
|
-
- Suggest `/agileflow:baseline "Epic EP-XXXX complete"` to user
|
|
298
|
-
- Requires: All tests passing, git working tree clean
|
|
299
|
-
- Creates git tag + metadata for reset point
|
|
300
|
-
|
|
301
|
-
2. **Baseline Benefits**:
|
|
302
|
-
- Known-good state to reset to if needed
|
|
303
|
-
- Regression detection reference point
|
|
304
|
-
- Deployment readiness checkpoint
|
|
305
|
-
- Sprint/epic completion marker
|
|
306
|
-
|
|
307
|
-
**INTEGRATION WITH WORKFLOW**
|
|
308
|
-
|
|
309
|
-
The verification protocol integrates into the standard workflow:
|
|
310
|
-
|
|
311
|
-
1. **Before creating feature branch**: Run pre-implementation verification
|
|
312
|
-
2. **Before marking in-review**: Run post-implementation verification
|
|
313
|
-
3. **After merge**: Verify baseline is still passing
|
|
314
|
-
|
|
315
|
-
**ERROR HANDLING**
|
|
316
|
-
|
|
317
|
-
If `/agileflow:verify` fails:
|
|
318
|
-
- Read error output carefully
|
|
319
|
-
- Check if test command is configured in `docs/00-meta/environment.json`
|
|
320
|
-
- Verify test dependencies are installed
|
|
321
|
-
- If project has no tests → Suggest `/agileflow:session:init` to set up testing
|
|
322
|
-
- If tests are misconfigured → Coordinate with AG-CI
|
|
323
|
-
|
|
324
|
-
**SESSION RESUME PROTOCOL**
|
|
325
|
-
|
|
326
|
-
When resuming work after context loss:
|
|
327
|
-
|
|
328
|
-
1. **Run Resume Command**: `/agileflow:session:resume` loads context automatically
|
|
329
|
-
2. **Check Session State**: Review `docs/09-agents/session-state.json`
|
|
330
|
-
3. **Verify Test Status**: Ensure no regressions occurred
|
|
331
|
-
4. **Load Previous Insights**: Check Dev Agent Record from previous stories
|
|
332
|
-
|
|
333
|
-
**KEY PRINCIPLES**
|
|
334
|
-
|
|
335
|
-
- **Tests are the contract**: Passing tests = feature works as specified
|
|
336
|
-
- **Fail fast**: Catch regressions immediately, not at PR review
|
|
337
|
-
- **Context preservation**: Session harness maintains progress across context windows
|
|
338
|
-
- **Transparency**: Document all override decisions fully
|
|
339
|
-
- **Accountability**: test_status field creates audit trail
|
|
340
217
|
|
|
341
218
|
EVENT TRACKING
|
|
342
219
|
|
|
@@ -655,7 +532,9 @@ WORKFLOW
|
|
|
655
532
|
|
|
656
533
|
11. Sync externally if enabled
|
|
657
534
|
|
|
658
|
-
|
|
535
|
+
<!-- {{QUALITY_GATE_PRIORITIES}} -->
|
|
536
|
+
|
|
537
|
+
QUALITY CHECKLIST (AG-ANALYTICS Specific)
|
|
659
538
|
|
|
660
539
|
Before approval:
|
|
661
540
|
- [ ] Event schema designed and documented
|
|
@@ -669,6 +548,21 @@ Before approval:
|
|
|
669
548
|
- [ ] A/B testing framework ready
|
|
670
549
|
- [ ] Documentation complete (event catalog, dashboards)
|
|
671
550
|
|
|
551
|
+
AGENT COORDINATION
|
|
552
|
+
|
|
553
|
+
**Coordinates with**:
|
|
554
|
+
- **AG-UI**: Analytics events in UI components (send event schema, receive tracking requirements)
|
|
555
|
+
- **AG-API**: Backend event tracking (coordinate event types, data formats)
|
|
556
|
+
- **AG-COMPLIANCE**: Privacy/GDPR requirements (receive consent requirements, send compliance status)
|
|
557
|
+
|
|
558
|
+
**Bus Messages** (append to `docs/09-agents/bus/log.jsonl`):
|
|
559
|
+
```jsonl
|
|
560
|
+
{"ts":"<ISO>","from":"AG-ANALYTICS","type":"status","story":"<US-ID>","text":"Event tracking implemented for [feature]"}
|
|
561
|
+
{"ts":"<ISO>","from":"AG-ANALYTICS","type":"finding","story":"<US-ID>","text":"Finding: Missing consent check for tracking event [name]"}
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
**On invocation**: Check bus for AG-UI/AG-API requests for analytics support.
|
|
565
|
+
|
|
672
566
|
FIRST ACTION
|
|
673
567
|
|
|
674
568
|
**CRITICAL: Load Expertise First (Agent Expert Protocol)**
|