agileflow 3.1.0 → 3.2.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.
Files changed (101) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/README.md +57 -85
  3. package/lib/dashboard-automations.js +130 -0
  4. package/lib/dashboard-git.js +254 -0
  5. package/lib/dashboard-inbox.js +64 -0
  6. package/lib/dashboard-protocol.js +1 -0
  7. package/lib/dashboard-server.js +114 -924
  8. package/lib/dashboard-session.js +136 -0
  9. package/lib/dashboard-status.js +72 -0
  10. package/lib/dashboard-terminal.js +354 -0
  11. package/lib/dashboard-websocket.js +88 -0
  12. package/lib/drivers/codex-driver.ts +4 -4
  13. package/lib/logger.js +106 -0
  14. package/package.json +4 -2
  15. package/scripts/agileflow-configure.js +2 -2
  16. package/scripts/agileflow-welcome.js +409 -434
  17. package/scripts/claude-tmux.sh +80 -2
  18. package/scripts/context-loader.js +4 -9
  19. package/scripts/lib/command-prereqs.js +280 -0
  20. package/scripts/lib/configure-detect.js +92 -2
  21. package/scripts/lib/configure-features.js +295 -1
  22. package/scripts/lib/context-formatter.js +468 -233
  23. package/scripts/lib/context-loader.js +27 -15
  24. package/scripts/lib/damage-control-utils.js +8 -1
  25. package/scripts/lib/feature-catalog.js +321 -0
  26. package/scripts/lib/portable-tasks-cli.js +274 -0
  27. package/scripts/lib/portable-tasks.js +479 -0
  28. package/scripts/lib/signal-detectors.js +1 -1
  29. package/scripts/lib/team-events.js +86 -1
  30. package/scripts/obtain-context.js +28 -4
  31. package/scripts/smart-detect.js +17 -0
  32. package/scripts/strip-ai-attribution.js +63 -0
  33. package/scripts/team-manager.js +7 -2
  34. package/scripts/welcome-deferred.js +437 -0
  35. package/src/core/agents/perf-analyzer-assets.md +174 -0
  36. package/src/core/agents/perf-analyzer-bundle.md +165 -0
  37. package/src/core/agents/perf-analyzer-caching.md +160 -0
  38. package/src/core/agents/perf-analyzer-compute.md +165 -0
  39. package/src/core/agents/perf-analyzer-memory.md +182 -0
  40. package/src/core/agents/perf-analyzer-network.md +157 -0
  41. package/src/core/agents/perf-analyzer-queries.md +155 -0
  42. package/src/core/agents/perf-analyzer-rendering.md +156 -0
  43. package/src/core/agents/perf-consensus.md +280 -0
  44. package/src/core/agents/security-analyzer-api.md +199 -0
  45. package/src/core/agents/security-analyzer-auth.md +160 -0
  46. package/src/core/agents/security-analyzer-authz.md +168 -0
  47. package/src/core/agents/security-analyzer-deps.md +147 -0
  48. package/src/core/agents/security-analyzer-infra.md +176 -0
  49. package/src/core/agents/security-analyzer-injection.md +148 -0
  50. package/src/core/agents/security-analyzer-input.md +191 -0
  51. package/src/core/agents/security-analyzer-secrets.md +175 -0
  52. package/src/core/agents/security-consensus.md +276 -0
  53. package/src/core/agents/test-analyzer-assertions.md +181 -0
  54. package/src/core/agents/test-analyzer-coverage.md +183 -0
  55. package/src/core/agents/test-analyzer-fragility.md +185 -0
  56. package/src/core/agents/test-analyzer-integration.md +155 -0
  57. package/src/core/agents/test-analyzer-maintenance.md +173 -0
  58. package/src/core/agents/test-analyzer-mocking.md +178 -0
  59. package/src/core/agents/test-analyzer-patterns.md +189 -0
  60. package/src/core/agents/test-analyzer-structure.md +177 -0
  61. package/src/core/agents/test-consensus.md +294 -0
  62. package/src/core/commands/{legal/audit.md → audit/legal.md} +13 -13
  63. package/src/core/commands/{logic/audit.md → audit/logic.md} +12 -12
  64. package/src/core/commands/audit/performance.md +443 -0
  65. package/src/core/commands/audit/security.md +443 -0
  66. package/src/core/commands/audit/test.md +442 -0
  67. package/src/core/commands/babysit.md +505 -463
  68. package/src/core/commands/configure.md +8 -8
  69. package/src/core/commands/research/ask.md +42 -9
  70. package/src/core/commands/research/import.md +14 -8
  71. package/src/core/commands/research/list.md +17 -16
  72. package/src/core/commands/research/synthesize.md +8 -8
  73. package/src/core/commands/research/view.md +28 -4
  74. package/src/core/commands/whats-new.md +2 -2
  75. package/src/core/experts/devops/expertise.yaml +13 -2
  76. package/src/core/experts/documentation/expertise.yaml +26 -4
  77. package/src/core/profiles/COMPARISON.md +170 -0
  78. package/src/core/profiles/README.md +178 -0
  79. package/src/core/profiles/claude-code.yaml +111 -0
  80. package/src/core/profiles/codex.yaml +103 -0
  81. package/src/core/profiles/cursor.yaml +134 -0
  82. package/src/core/profiles/examples.js +250 -0
  83. package/src/core/profiles/loader.js +235 -0
  84. package/src/core/profiles/windsurf.yaml +159 -0
  85. package/src/core/teams/logic-audit.json +6 -0
  86. package/src/core/teams/perf-audit.json +71 -0
  87. package/src/core/teams/security-audit.json +71 -0
  88. package/src/core/teams/test-audit.json +71 -0
  89. package/src/core/templates/command-prerequisites.yaml +169 -0
  90. package/src/core/templates/damage-control-patterns.yaml +9 -0
  91. package/tools/cli/installers/ide/_base-ide.js +33 -3
  92. package/tools/cli/installers/ide/claude-code.js +2 -69
  93. package/tools/cli/installers/ide/codex.js +9 -9
  94. package/tools/cli/installers/ide/cursor.js +165 -4
  95. package/tools/cli/installers/ide/windsurf.js +237 -6
  96. package/tools/cli/lib/content-transformer.js +234 -9
  97. package/tools/cli/lib/docs-setup.js +1 -1
  98. package/tools/cli/lib/ide-generator.js +357 -0
  99. package/tools/cli/lib/ide-registry.js +2 -2
  100. package/scripts/tmux-task-name.sh +0 -105
  101. package/scripts/tmux-task-watcher.sh +0 -344
package/lib/logger.js ADDED
@@ -0,0 +1,106 @@
1
+ /**
2
+ * logger.js - Centralized logger with level control
3
+ *
4
+ * Provides structured logging with configurable levels, colored output,
5
+ * and automatic secret redaction on debug messages.
6
+ *
7
+ * Log Levels (ordered): debug < info < warn < error < silent
8
+ *
9
+ * Environment Variables:
10
+ * AGILEFLOW_LOG_LEVEL - Set minimum level (debug/info/warn/error/silent). Default: info
11
+ * AGILEFLOW_VERBOSE - When 1/true, sets level to debug (shorthand)
12
+ * AGILEFLOW_DEBUG - When 1, sets level to debug (backward compat with errors.js)
13
+ *
14
+ * Usage:
15
+ * const { createLogger } = require('../lib/logger');
16
+ * const log = createLogger('welcome');
17
+ *
18
+ * log.debug('Loading model...'); // [DEBUG] [welcome] Loading model...
19
+ * log.info('Server started'); // [INFO] [welcome] Server started
20
+ * log.warn('Deprecated API'); // [WARN] [welcome] Deprecated API
21
+ * log.error('Connection failed'); // [ERROR] [welcome] Connection failed
22
+ */
23
+
24
+ const { c } = require('./colors');
25
+ const { sanitizeDebugOutput } = require('./errors');
26
+
27
+ const LEVELS = {
28
+ debug: 0,
29
+ info: 1,
30
+ warn: 2,
31
+ error: 3,
32
+ silent: 4,
33
+ };
34
+
35
+ /**
36
+ * Resolve the effective log level from environment variables.
37
+ * Priority: AGILEFLOW_LOG_LEVEL > AGILEFLOW_VERBOSE > AGILEFLOW_DEBUG > default (info)
38
+ */
39
+ function resolveLevel() {
40
+ const explicit = process.env.AGILEFLOW_LOG_LEVEL;
41
+ if (explicit && LEVELS[explicit] !== undefined) {
42
+ return explicit;
43
+ }
44
+
45
+ const verbose = process.env.AGILEFLOW_VERBOSE;
46
+ if (verbose === '1' || verbose === 'true') {
47
+ return 'debug';
48
+ }
49
+
50
+ if (process.env.AGILEFLOW_DEBUG === '1') {
51
+ return 'debug';
52
+ }
53
+
54
+ return 'info';
55
+ }
56
+
57
+ /**
58
+ * Create a logger instance with an optional module name.
59
+ *
60
+ * @param {string} [moduleName] - Module name for log prefix (e.g. 'welcome', 'context-loader')
61
+ * @param {object} [options] - Logger options
62
+ * @param {string} [options.level] - Override log level (ignores env vars)
63
+ * @param {boolean} [options.timestamps] - Include ISO timestamps in output (default: false)
64
+ * @returns {{ debug: Function, info: Function, warn: Function, error: Function }}
65
+ */
66
+ function createLogger(moduleName, options = {}) {
67
+ const levelName = options.level || resolveLevel();
68
+ const minLevel = LEVELS[levelName] !== undefined ? LEVELS[levelName] : LEVELS.info;
69
+ const timestamps = options.timestamps || false;
70
+
71
+ function formatPrefix(label, color) {
72
+ const ts = timestamps ? `${new Date().toISOString()} ` : '';
73
+ const mod = moduleName ? ` ${c.dim}[${moduleName}]${c.reset}` : '';
74
+ return `${ts}${color}[${label}]${c.reset}${mod}`;
75
+ }
76
+
77
+ return {
78
+ debug(...args) {
79
+ if (minLevel > LEVELS.debug) return;
80
+ const prefix = formatPrefix('DEBUG', c.dim);
81
+ // Sanitize all args to prevent secret leakage in debug output
82
+ const sanitized = args.map(arg => sanitizeDebugOutput(arg).sanitized);
83
+ process.stderr.write(`${prefix} ${sanitized.join(' ')}\n`);
84
+ },
85
+
86
+ info(...args) {
87
+ if (minLevel > LEVELS.info) return;
88
+ const prefix = formatPrefix('INFO', c.cyan);
89
+ process.stderr.write(`${prefix} ${args.join(' ')}\n`);
90
+ },
91
+
92
+ warn(...args) {
93
+ if (minLevel > LEVELS.warn) return;
94
+ const prefix = formatPrefix('WARN', c.yellow);
95
+ process.stderr.write(`${prefix} ${args.join(' ')}\n`);
96
+ },
97
+
98
+ error(...args) {
99
+ if (minLevel > LEVELS.error) return;
100
+ const prefix = formatPrefix('ERROR', c.red);
101
+ process.stderr.write(`${prefix} ${args.join(' ')}\n`);
102
+ },
103
+ };
104
+ }
105
+
106
+ module.exports = { createLogger, LEVELS };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agileflow",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "description": "AI-driven agile development system for Claude Code, Cursor, Windsurf, and more",
5
5
  "keywords": [
6
6
  "agile",
@@ -67,7 +67,9 @@
67
67
  "semver": "^7.6.3"
68
68
  },
69
69
  "optionalDependencies": {
70
- "node-pty": "^1.1.0"
70
+ "node-pty": "^1.1.0",
71
+ "@playwright/test": "^1.50.0",
72
+ "playwright": "^1.50.0"
71
73
  },
72
74
  "engines": {
73
75
  "node": ">=18.0.0"
@@ -24,7 +24,7 @@
24
24
  * --detect Show current status
25
25
  * --help Show help
26
26
  *
27
- * Features: sessionstart, precompact, ralphloop, selfimprove, archival, statusline, autoupdate, damagecontrol, askuserquestion, tmuxautospawn, shellaliases, claudemdreinforcement
27
+ * Features: sessionstart, precompact, ralphloop, selfimprove, archival, statusline, autoupdate, damagecontrol, noaiattribution, askuserquestion, tmuxautospawn, shellaliases, claudemdreinforcement
28
28
  */
29
29
 
30
30
  const fs = require('fs');
@@ -135,7 +135,7 @@ ${c.cyan}Feature Control:${c.reset}
135
135
  --enable=<list> Enable features (comma-separated)
136
136
  --disable=<list> Disable features (comma-separated)
137
137
 
138
- Features: sessionstart, precompact, ralphloop, selfimprove, archival, statusline, damagecontrol, askuserquestion, tmuxautospawn, shellaliases, claudemdreinforcement
138
+ Features: sessionstart, precompact, ralphloop, selfimprove, archival, statusline, damagecontrol, noaiattribution, askuserquestion, tmuxautospawn, shellaliases, claudemdreinforcement
139
139
 
140
140
  ${c.cyan}Statusline Components:${c.reset}
141
141
  --show=<list> Show statusline components (comma-separated)