agileflow 2.91.0 → 2.92.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/README.md +3 -3
- package/lib/README.md +178 -0
- package/lib/codebase-indexer.js +31 -23
- package/lib/colors.js +190 -12
- package/lib/consent.js +232 -0
- package/lib/correlation.js +277 -0
- package/lib/error-codes.js +46 -0
- package/lib/errors.js +48 -6
- package/lib/file-cache.js +182 -0
- package/lib/format-error.js +156 -0
- package/lib/path-resolver.js +155 -7
- package/lib/paths.js +212 -20
- package/lib/placeholder-registry.js +205 -0
- package/lib/registry-di.js +358 -0
- package/lib/result-schema.js +363 -0
- package/lib/result.js +210 -0
- package/lib/session-registry.js +13 -0
- package/lib/session-state-machine.js +465 -0
- package/lib/validate-commands.js +308 -0
- package/lib/validate.js +116 -52
- package/package.json +1 -1
- package/scripts/af +34 -0
- package/scripts/agent-loop.js +63 -9
- package/scripts/agileflow-configure.js +2 -2
- package/scripts/agileflow-welcome.js +435 -23
- package/scripts/archive-completed-stories.sh +57 -11
- package/scripts/claude-tmux.sh +102 -0
- package/scripts/damage-control-bash.js +3 -70
- package/scripts/damage-control-edit.js +3 -20
- package/scripts/damage-control-write.js +3 -20
- package/scripts/dependency-check.js +310 -0
- package/scripts/get-env.js +11 -4
- package/scripts/lib/configure-detect.js +23 -1
- package/scripts/lib/configure-features.js +43 -2
- package/scripts/lib/context-formatter.js +771 -0
- package/scripts/lib/context-loader.js +699 -0
- package/scripts/lib/damage-control-utils.js +107 -0
- package/scripts/lib/json-utils.sh +162 -0
- package/scripts/lib/state-migrator.js +353 -0
- package/scripts/lib/story-state-machine.js +437 -0
- package/scripts/obtain-context.js +80 -1248
- package/scripts/pre-push-check.sh +46 -0
- package/scripts/precompact-context.sh +23 -10
- package/scripts/query-codebase.js +122 -14
- package/scripts/ralph-loop.js +5 -5
- package/scripts/session-manager.js +220 -42
- package/scripts/spawn-parallel.js +651 -0
- package/scripts/tui/blessed/data/watcher.js +20 -15
- package/scripts/tui/blessed/index.js +2 -2
- package/scripts/tui/blessed/panels/output.js +14 -8
- package/scripts/tui/blessed/panels/sessions.js +22 -15
- package/scripts/tui/blessed/panels/trace.js +14 -8
- package/scripts/tui/blessed/ui/help.js +3 -3
- package/scripts/tui/blessed/ui/screen.js +4 -4
- package/scripts/tui/blessed/ui/statusbar.js +5 -9
- package/scripts/tui/blessed/ui/tabbar.js +11 -11
- package/scripts/validators/component-validator.js +41 -14
- package/scripts/validators/json-schema-validator.js +11 -4
- package/scripts/validators/markdown-validator.js +1 -2
- package/scripts/validators/migration-validator.js +17 -5
- package/scripts/validators/security-validator.js +137 -33
- package/scripts/validators/story-format-validator.js +31 -10
- package/scripts/validators/test-result-validator.js +19 -4
- package/scripts/validators/workflow-validator.js +12 -5
- package/src/core/agents/codebase-query.md +24 -0
- package/src/core/commands/adr.md +114 -0
- package/src/core/commands/agent.md +120 -0
- package/src/core/commands/assign.md +145 -0
- package/src/core/commands/babysit.md +32 -5
- package/src/core/commands/changelog.md +118 -0
- package/src/core/commands/configure.md +42 -6
- package/src/core/commands/diagnose.md +114 -0
- package/src/core/commands/epic.md +113 -0
- package/src/core/commands/handoff.md +128 -0
- package/src/core/commands/help.md +75 -0
- package/src/core/commands/pr.md +96 -0
- package/src/core/commands/roadmap/analyze.md +400 -0
- package/src/core/commands/session/new.md +113 -6
- package/src/core/commands/session/spawn.md +197 -0
- package/src/core/commands/sprint.md +22 -0
- package/src/core/commands/status.md +74 -0
- package/src/core/commands/story.md +143 -4
- package/src/core/templates/agileflow-metadata.json +55 -2
- package/src/core/templates/plan-template.md +125 -0
- package/src/core/templates/story-lifecycle.md +213 -0
- package/src/core/templates/story-template.md +4 -0
- package/src/core/templates/tdd-test-template.js +241 -0
- package/tools/cli/commands/setup.js +86 -0
- package/tools/cli/installers/core/installer.js +94 -0
- package/tools/cli/installers/ide/_base-ide.js +20 -11
- package/tools/cli/installers/ide/codex.js +29 -47
- package/tools/cli/lib/config-manager.js +17 -2
- package/tools/cli/lib/content-transformer.js +271 -0
- package/tools/cli/lib/error-handler.js +14 -22
- package/tools/cli/lib/ide-error-factory.js +421 -0
- package/tools/cli/lib/ide-health-monitor.js +364 -0
- package/tools/cli/lib/ide-registry.js +114 -1
- package/tools/cli/lib/ui.js +14 -25
package/lib/file-cache.js
CHANGED
|
@@ -336,6 +336,180 @@ function readProjectFiles(rootDir, options = {}) {
|
|
|
336
336
|
};
|
|
337
337
|
}
|
|
338
338
|
|
|
339
|
+
// =============================================================================
|
|
340
|
+
// Command Caching (for git and other shell commands)
|
|
341
|
+
// =============================================================================
|
|
342
|
+
|
|
343
|
+
const { execSync } = require('child_process');
|
|
344
|
+
|
|
345
|
+
// Separate cache for command output with shorter TTL
|
|
346
|
+
const commandCache = new LRUCache({
|
|
347
|
+
maxSize: 50,
|
|
348
|
+
ttlMs: 30000, // 30 seconds default
|
|
349
|
+
});
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Execute and cache a shell command
|
|
353
|
+
* @param {string} command - Shell command to execute
|
|
354
|
+
* @param {Object} [options]
|
|
355
|
+
* @param {string} [options.cwd] - Working directory
|
|
356
|
+
* @param {boolean} [options.force=false] - Skip cache and force execution
|
|
357
|
+
* @param {number} [options.ttlMs] - Custom TTL for this command
|
|
358
|
+
* @param {string} [options.cacheKey] - Custom cache key (default: auto-generated)
|
|
359
|
+
* @returns {{ ok: boolean, data?: string, error?: string, cached?: boolean }}
|
|
360
|
+
*/
|
|
361
|
+
function execCached(command, options = {}) {
|
|
362
|
+
const { cwd = process.cwd(), force = false, ttlMs, cacheKey } = options;
|
|
363
|
+
const key = cacheKey || `cmd:${command}:${cwd}`;
|
|
364
|
+
|
|
365
|
+
// Check cache first (unless force)
|
|
366
|
+
if (!force) {
|
|
367
|
+
const cached = commandCache.get(key);
|
|
368
|
+
if (cached !== undefined) {
|
|
369
|
+
return { ok: true, data: cached, cached: true };
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
// Execute command
|
|
374
|
+
try {
|
|
375
|
+
const output = execSync(command, {
|
|
376
|
+
cwd,
|
|
377
|
+
encoding: 'utf8',
|
|
378
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
379
|
+
timeout: 10000, // 10 second timeout
|
|
380
|
+
}).trim();
|
|
381
|
+
|
|
382
|
+
// Cache the result
|
|
383
|
+
commandCache.set(key, output, ttlMs);
|
|
384
|
+
|
|
385
|
+
return { ok: true, data: output, cached: false };
|
|
386
|
+
} catch (error) {
|
|
387
|
+
// Cache errors briefly to avoid repeated failures
|
|
388
|
+
const errMsg = error.message || 'Command failed';
|
|
389
|
+
return { ok: false, error: errMsg, cached: false };
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Execute and cache a git command
|
|
395
|
+
* Helper with git-specific cache key format
|
|
396
|
+
* @param {string} gitCommand - Git subcommand (e.g., 'status --short')
|
|
397
|
+
* @param {Object} [options]
|
|
398
|
+
* @param {string} [options.cwd] - Working directory
|
|
399
|
+
* @param {boolean} [options.force=false] - Skip cache
|
|
400
|
+
* @param {number} [options.ttlMs=30000] - TTL (default 30s)
|
|
401
|
+
* @returns {{ ok: boolean, data?: string, error?: string, cached?: boolean }}
|
|
402
|
+
*/
|
|
403
|
+
function gitCached(gitCommand, options = {}) {
|
|
404
|
+
const { cwd = process.cwd(), ttlMs = 30000, force = false } = options;
|
|
405
|
+
const command = `git ${gitCommand}`;
|
|
406
|
+
const cacheKey = `git:${gitCommand}:${cwd}`;
|
|
407
|
+
|
|
408
|
+
return execCached(command, {
|
|
409
|
+
cwd,
|
|
410
|
+
force,
|
|
411
|
+
ttlMs,
|
|
412
|
+
cacheKey,
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* Common git commands with caching
|
|
418
|
+
*/
|
|
419
|
+
const gitCommands = {
|
|
420
|
+
/**
|
|
421
|
+
* Get current branch name (cached)
|
|
422
|
+
* @param {string} [cwd] - Working directory
|
|
423
|
+
* @param {Object} [options]
|
|
424
|
+
* @returns {{ ok: boolean, data?: string, cached?: boolean }}
|
|
425
|
+
*/
|
|
426
|
+
branch(cwd, options = {}) {
|
|
427
|
+
return gitCached('branch --show-current', { cwd, ...options });
|
|
428
|
+
},
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Get short status (cached)
|
|
432
|
+
* @param {string} [cwd] - Working directory
|
|
433
|
+
* @param {Object} [options]
|
|
434
|
+
* @returns {{ ok: boolean, data?: string, cached?: boolean }}
|
|
435
|
+
*/
|
|
436
|
+
status(cwd, options = {}) {
|
|
437
|
+
return gitCached('status --short', { cwd, ...options });
|
|
438
|
+
},
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Get recent commits (cached)
|
|
442
|
+
* @param {string} [cwd] - Working directory
|
|
443
|
+
* @param {Object} [options]
|
|
444
|
+
* @param {number} [options.count=5] - Number of commits
|
|
445
|
+
* @returns {{ ok: boolean, data?: string, cached?: boolean }}
|
|
446
|
+
*/
|
|
447
|
+
log(cwd, options = {}) {
|
|
448
|
+
const { count = 5, ...rest } = options;
|
|
449
|
+
return gitCached(`log -${count} --oneline`, { cwd, ...rest });
|
|
450
|
+
},
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Get diff summary (cached with shorter TTL)
|
|
454
|
+
* @param {string} [cwd] - Working directory
|
|
455
|
+
* @param {Object} [options]
|
|
456
|
+
* @returns {{ ok: boolean, data?: string, cached?: boolean }}
|
|
457
|
+
*/
|
|
458
|
+
diff(cwd, options = {}) {
|
|
459
|
+
return gitCached('diff --stat', { cwd, ttlMs: 15000, ...options });
|
|
460
|
+
},
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Get last commit short hash (cached)
|
|
464
|
+
* @param {string} [cwd] - Working directory
|
|
465
|
+
* @param {Object} [options]
|
|
466
|
+
* @returns {{ ok: boolean, data?: string, cached?: boolean }}
|
|
467
|
+
*/
|
|
468
|
+
commitHash(cwd, options = {}) {
|
|
469
|
+
return gitCached('log -1 --format="%h"', { cwd, ...options });
|
|
470
|
+
},
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Get last commit message (cached)
|
|
474
|
+
* @param {string} [cwd] - Working directory
|
|
475
|
+
* @param {Object} [options]
|
|
476
|
+
* @returns {{ ok: boolean, data?: string, cached?: boolean }}
|
|
477
|
+
*/
|
|
478
|
+
commitMessage(cwd, options = {}) {
|
|
479
|
+
return gitCached('log -1 --format="%s"', { cwd, ...options });
|
|
480
|
+
},
|
|
481
|
+
};
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Invalidate all git caches for a directory
|
|
485
|
+
* Call this after git operations that modify state
|
|
486
|
+
* @param {string} [cwd] - Working directory
|
|
487
|
+
*/
|
|
488
|
+
function invalidateGitCache(cwd = process.cwd()) {
|
|
489
|
+
const prefix = `git:`;
|
|
490
|
+
const suffix = `:${cwd}`;
|
|
491
|
+
for (const key of commandCache.cache.keys()) {
|
|
492
|
+
if (key.startsWith(prefix) && key.endsWith(suffix)) {
|
|
493
|
+
commandCache.delete(key);
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* Get command cache statistics
|
|
500
|
+
* @returns {Object} Cache stats
|
|
501
|
+
*/
|
|
502
|
+
function getCommandCacheStats() {
|
|
503
|
+
return commandCache.getStats();
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* Clear command cache
|
|
508
|
+
*/
|
|
509
|
+
function clearCommandCache() {
|
|
510
|
+
commandCache.clear();
|
|
511
|
+
}
|
|
512
|
+
|
|
339
513
|
module.exports = {
|
|
340
514
|
// Core LRU Cache class (for custom usage)
|
|
341
515
|
LRUCache,
|
|
@@ -356,4 +530,12 @@ module.exports = {
|
|
|
356
530
|
readMetadata,
|
|
357
531
|
readRegistry,
|
|
358
532
|
readProjectFiles,
|
|
533
|
+
|
|
534
|
+
// Command caching
|
|
535
|
+
execCached,
|
|
536
|
+
gitCached,
|
|
537
|
+
gitCommands,
|
|
538
|
+
invalidateGitCache,
|
|
539
|
+
getCommandCacheStats,
|
|
540
|
+
clearCommandCache,
|
|
359
541
|
};
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* format-error.js - Standalone error formatting helpers
|
|
3
|
+
*
|
|
4
|
+
* Extracted from ErrorHandler for use without class instantiation.
|
|
5
|
+
* Provides consistent error/warning formatting with actionable guidance.
|
|
6
|
+
*
|
|
7
|
+
* Format: "X <problem> | Action: <what to do> | Run: <command>"
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* const { formatError, formatWarning, formatSuccess, formatInfo } = require('./format-error');
|
|
11
|
+
* console.error(formatError('File not found', 'Check the path', 'ls -la'));
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const { c } = require('./colors');
|
|
15
|
+
|
|
16
|
+
// Unicode symbols
|
|
17
|
+
const SYMBOLS = {
|
|
18
|
+
error: '\u2716', // ✖
|
|
19
|
+
warning: '\u26A0', // ⚠
|
|
20
|
+
success: '\u2714', // ✔
|
|
21
|
+
info: '\u2139', // ℹ
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Format a message with optional action and command hints
|
|
26
|
+
*
|
|
27
|
+
* @param {string} symbol - Unicode symbol to use
|
|
28
|
+
* @param {string} symbolColor - Color for the symbol
|
|
29
|
+
* @param {string} message - The message to display
|
|
30
|
+
* @param {Object} [options={}] - Formatting options
|
|
31
|
+
* @param {string} [options.action] - Action text (what user should do)
|
|
32
|
+
* @param {string} [options.command] - Command to run
|
|
33
|
+
* @param {string} [options.detail] - Additional detail line
|
|
34
|
+
* @returns {string} Formatted message string
|
|
35
|
+
*/
|
|
36
|
+
function formatMessage(symbol, symbolColor, message, options = {}) {
|
|
37
|
+
const { action, command, detail } = options;
|
|
38
|
+
|
|
39
|
+
let output = `${symbolColor}${symbol}${c.reset} ${message}`;
|
|
40
|
+
|
|
41
|
+
if (action) {
|
|
42
|
+
output += ` ${c.dim}|${c.reset} ${c.cyan}Action:${c.reset} ${action}`;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (command) {
|
|
46
|
+
output += ` ${c.dim}|${c.reset} ${c.green}Run:${c.reset} ${c.bold}${command}${c.reset}`;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (detail) {
|
|
50
|
+
output += `\n ${c.dim}${detail}${c.reset}`;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return output;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Format an error message (red X)
|
|
58
|
+
*
|
|
59
|
+
* @param {string} message - Error message
|
|
60
|
+
* @param {string} [action] - What user should do
|
|
61
|
+
* @param {string} [command] - Command to run
|
|
62
|
+
* @returns {string} Formatted error string
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* formatError('Config not found', 'Create config file', 'npx agileflow setup')
|
|
66
|
+
* // Output: ✖ Config not found | Action: Create config file | Run: npx agileflow setup
|
|
67
|
+
*/
|
|
68
|
+
function formatError(message, action, command) {
|
|
69
|
+
return formatMessage(SYMBOLS.error, c.red, message, { action, command });
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Format a warning message (yellow warning sign)
|
|
74
|
+
*
|
|
75
|
+
* @param {string} message - Warning message
|
|
76
|
+
* @param {string} [action] - What user should do
|
|
77
|
+
* @param {string} [command] - Command to run
|
|
78
|
+
* @returns {string} Formatted warning string
|
|
79
|
+
*/
|
|
80
|
+
function formatWarning(message, action, command) {
|
|
81
|
+
return formatMessage(SYMBOLS.warning, c.yellow, message, { action, command });
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Format a success message (green checkmark)
|
|
86
|
+
*
|
|
87
|
+
* @param {string} message - Success message
|
|
88
|
+
* @param {string} [detail] - Additional detail
|
|
89
|
+
* @returns {string} Formatted success string
|
|
90
|
+
*/
|
|
91
|
+
function formatSuccess(message, detail) {
|
|
92
|
+
return formatMessage(SYMBOLS.success, c.green, message, { detail });
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Format an info message (blue info symbol)
|
|
97
|
+
*
|
|
98
|
+
* @param {string} message - Info message
|
|
99
|
+
* @param {string} [detail] - Additional detail
|
|
100
|
+
* @returns {string} Formatted info string
|
|
101
|
+
*/
|
|
102
|
+
function formatInfo(message, detail) {
|
|
103
|
+
return formatMessage(SYMBOLS.info, c.blue, message, { detail });
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Format multiple issues for display
|
|
108
|
+
*
|
|
109
|
+
* @param {Array<{type: 'error'|'warning'|'success'|'info', message: string, action?: string, command?: string}>} issues
|
|
110
|
+
* @returns {string[]} Array of formatted strings
|
|
111
|
+
*/
|
|
112
|
+
function formatIssues(issues) {
|
|
113
|
+
return issues.map(issue => {
|
|
114
|
+
switch (issue.type) {
|
|
115
|
+
case 'error':
|
|
116
|
+
return formatError(issue.message, issue.action, issue.command);
|
|
117
|
+
case 'warning':
|
|
118
|
+
return formatWarning(issue.message, issue.action, issue.command);
|
|
119
|
+
case 'success':
|
|
120
|
+
return formatSuccess(issue.message, issue.detail);
|
|
121
|
+
case 'info':
|
|
122
|
+
return formatInfo(issue.message, issue.detail);
|
|
123
|
+
default:
|
|
124
|
+
return formatInfo(issue.message);
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Format error with stack trace (for DEBUG mode)
|
|
131
|
+
*
|
|
132
|
+
* @param {string} message - Error message
|
|
133
|
+
* @param {Error} error - Error object with stack
|
|
134
|
+
* @param {Object} [options={}] - Formatting options
|
|
135
|
+
* @returns {string} Formatted error with optional stack trace
|
|
136
|
+
*/
|
|
137
|
+
function formatErrorWithStack(message, error, options = {}) {
|
|
138
|
+
const base = formatError(message, options.action, options.command);
|
|
139
|
+
|
|
140
|
+
if (process.env.DEBUG === '1' && error?.stack) {
|
|
141
|
+
return `${base}\n\n${c.dim}Stack trace:${c.reset}\n${c.dim}${error.stack}${c.reset}`;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return base;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
module.exports = {
|
|
148
|
+
formatError,
|
|
149
|
+
formatWarning,
|
|
150
|
+
formatSuccess,
|
|
151
|
+
formatInfo,
|
|
152
|
+
formatIssues,
|
|
153
|
+
formatErrorWithStack,
|
|
154
|
+
formatMessage,
|
|
155
|
+
SYMBOLS,
|
|
156
|
+
};
|
package/lib/path-resolver.js
CHANGED
|
@@ -48,11 +48,17 @@ class PathResolver {
|
|
|
48
48
|
this._defaultDocsFolder = docsFolder;
|
|
49
49
|
|
|
50
50
|
// Find project root
|
|
51
|
-
if (projectRoot) {
|
|
51
|
+
if (projectRoot && autoDetect) {
|
|
52
|
+
// Auto-detect from provided starting directory
|
|
53
|
+
this._projectRoot = this._findProjectRoot(projectRoot);
|
|
54
|
+
} else if (projectRoot) {
|
|
55
|
+
// Use provided directory directly (no auto-detection)
|
|
52
56
|
this._projectRoot = projectRoot;
|
|
53
57
|
} else if (autoDetect) {
|
|
58
|
+
// Auto-detect from current working directory
|
|
54
59
|
this._projectRoot = this._findProjectRoot(process.cwd());
|
|
55
60
|
} else {
|
|
61
|
+
// Use current working directory directly
|
|
56
62
|
this._projectRoot = process.cwd();
|
|
57
63
|
}
|
|
58
64
|
|
|
@@ -256,31 +262,173 @@ class PathResolver {
|
|
|
256
262
|
}
|
|
257
263
|
|
|
258
264
|
/**
|
|
259
|
-
* Get the agents directory path
|
|
265
|
+
* Get the agents directory path (.agileflow/agents)
|
|
260
266
|
* @returns {string}
|
|
261
267
|
*/
|
|
262
268
|
getAgentsDir() {
|
|
263
269
|
return path.join(this.getAgileflowDir(), 'agents');
|
|
264
270
|
}
|
|
265
271
|
|
|
272
|
+
/**
|
|
273
|
+
* Get the skills directory path
|
|
274
|
+
* @returns {string}
|
|
275
|
+
*/
|
|
276
|
+
getSkillsDir() {
|
|
277
|
+
return path.join(this.getAgileflowDir(), 'skills');
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Get the _cfg directory path
|
|
282
|
+
* @returns {string}
|
|
283
|
+
*/
|
|
284
|
+
getCfgDir() {
|
|
285
|
+
return path.join(this.getAgileflowDir(), '_cfg');
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// ============================================================================
|
|
289
|
+
// Claude Settings Paths (new in ConfigResolver pattern)
|
|
290
|
+
// ============================================================================
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Get the .claude/settings.json path
|
|
294
|
+
* @returns {string}
|
|
295
|
+
*/
|
|
296
|
+
getSettingsPath() {
|
|
297
|
+
return path.join(this.getClaudeDir(), 'settings.json');
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Get the .claude/settings.local.json path
|
|
302
|
+
* @returns {string}
|
|
303
|
+
*/
|
|
304
|
+
getSettingsLocalPath() {
|
|
305
|
+
return path.join(this.getClaudeDir(), 'settings.local.json');
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Get the .claude/settings.local.example.json path
|
|
310
|
+
* @returns {string}
|
|
311
|
+
*/
|
|
312
|
+
getSettingsLocalExamplePath() {
|
|
313
|
+
return path.join(this.getClaudeDir(), 'settings.local.example.json');
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
// ============================================================================
|
|
317
|
+
// Docs Subdirectory Paths (new in ConfigResolver pattern)
|
|
318
|
+
// ============================================================================
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Get the docs/09-agents directory path
|
|
322
|
+
* @returns {string}
|
|
323
|
+
*/
|
|
324
|
+
getDocsAgentsDir() {
|
|
325
|
+
return path.join(this.getDocsDir(), '09-agents');
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Get the bus log path (docs/09-agents/bus/log.jsonl)
|
|
330
|
+
* @returns {string}
|
|
331
|
+
*/
|
|
332
|
+
getBusLogPath() {
|
|
333
|
+
return path.join(this.getDocsAgentsDir(), 'bus', 'log.jsonl');
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Get the archive directory path (docs/09-agents/archive)
|
|
338
|
+
* @returns {string}
|
|
339
|
+
*/
|
|
340
|
+
getArchiveDir() {
|
|
341
|
+
return path.join(this.getDocsAgentsDir(), 'archive');
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Get the epics directory path (docs/05-epics)
|
|
346
|
+
* @returns {string}
|
|
347
|
+
*/
|
|
348
|
+
getEpicsDir() {
|
|
349
|
+
return path.join(this.getDocsDir(), '05-epics');
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Get the stories directory path (docs/06-stories)
|
|
354
|
+
* @returns {string}
|
|
355
|
+
*/
|
|
356
|
+
getStoriesDir() {
|
|
357
|
+
return path.join(this.getDocsDir(), '06-stories');
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Get the decisions (ADR) directory path (docs/03-decisions)
|
|
362
|
+
* @returns {string}
|
|
363
|
+
*/
|
|
364
|
+
getDecisionsDir() {
|
|
365
|
+
return path.join(this.getDocsDir(), '03-decisions');
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Get the research directory path (docs/10-research)
|
|
370
|
+
* @returns {string}
|
|
371
|
+
*/
|
|
372
|
+
getResearchDir() {
|
|
373
|
+
return path.join(this.getDocsDir(), '10-research');
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Get the testing directory path (docs/07-testing)
|
|
378
|
+
* @returns {string}
|
|
379
|
+
*/
|
|
380
|
+
getTestingDir() {
|
|
381
|
+
return path.join(this.getDocsDir(), '07-testing');
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Get the architecture directory path (docs/04-architecture)
|
|
386
|
+
* @returns {string}
|
|
387
|
+
*/
|
|
388
|
+
getArchitectureDir() {
|
|
389
|
+
return path.join(this.getDocsDir(), '04-architecture');
|
|
390
|
+
}
|
|
391
|
+
|
|
266
392
|
/**
|
|
267
393
|
* Get all paths at once
|
|
268
394
|
* @returns {Object} Object with all path values
|
|
269
395
|
*/
|
|
270
396
|
getAllPaths() {
|
|
271
397
|
return {
|
|
398
|
+
// Project root and main directories
|
|
272
399
|
projectRoot: this.getProjectRoot(),
|
|
273
400
|
agileflowDir: this.getAgileflowDir(),
|
|
274
401
|
docsDir: this.getDocsDir(),
|
|
275
402
|
claudeDir: this.getClaudeDir(),
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
metadataPath: this.getMetadataPath(),
|
|
279
|
-
configPath: this.getConfigPath(),
|
|
280
|
-
manifestPath: this.getManifestPath(),
|
|
403
|
+
|
|
404
|
+
// AgileFlow subdirectories
|
|
281
405
|
scriptsDir: this.getScriptsDir(),
|
|
282
406
|
commandsDir: this.getCommandsDir(),
|
|
283
407
|
agentsDir: this.getAgentsDir(),
|
|
408
|
+
skillsDir: this.getSkillsDir(),
|
|
409
|
+
cfgDir: this.getCfgDir(),
|
|
410
|
+
|
|
411
|
+
// Configuration files
|
|
412
|
+
configPath: this.getConfigPath(),
|
|
413
|
+
manifestPath: this.getManifestPath(),
|
|
414
|
+
settingsPath: this.getSettingsPath(),
|
|
415
|
+
settingsLocalPath: this.getSettingsLocalPath(),
|
|
416
|
+
|
|
417
|
+
// Status and state files
|
|
418
|
+
statusPath: this.getStatusPath(),
|
|
419
|
+
sessionStatePath: this.getSessionStatePath(),
|
|
420
|
+
metadataPath: this.getMetadataPath(),
|
|
421
|
+
busLogPath: this.getBusLogPath(),
|
|
422
|
+
|
|
423
|
+
// Docs subdirectories
|
|
424
|
+
docsAgentsDir: this.getDocsAgentsDir(),
|
|
425
|
+
archiveDir: this.getArchiveDir(),
|
|
426
|
+
epicsDir: this.getEpicsDir(),
|
|
427
|
+
storiesDir: this.getStoriesDir(),
|
|
428
|
+
decisionsDir: this.getDecisionsDir(),
|
|
429
|
+
researchDir: this.getResearchDir(),
|
|
430
|
+
testingDir: this.getTestingDir(),
|
|
431
|
+
architectureDir: this.getArchitectureDir(),
|
|
284
432
|
};
|
|
285
433
|
}
|
|
286
434
|
|