agileflow 3.4.0 → 3.4.2
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 +4 -4
- package/package.json +1 -1
- package/scripts/agileflow-welcome.js +79 -0
- package/scripts/claude-tmux.sh +12 -36
- package/scripts/lib/ac-test-matcher.js +452 -0
- package/scripts/lib/audit-registry.js +94 -2
- package/scripts/lib/configure-features.js +35 -0
- package/scripts/lib/model-profiles.js +25 -5
- package/scripts/lib/quality-gates.js +163 -0
- package/scripts/lib/signal-detectors.js +43 -0
- package/scripts/lib/status-writer.js +255 -0
- package/scripts/lib/story-claiming.js +128 -45
- package/scripts/lib/task-sync.js +32 -38
- package/scripts/lib/tmux-audit-monitor.js +611 -0
- package/scripts/lib/tmux-group-colors.js +2 -2
- package/scripts/lib/tool-registry.yaml +241 -0
- package/scripts/lib/tool-shed.js +441 -0
- package/scripts/native-team-observer.js +219 -0
- package/scripts/obtain-context.js +14 -0
- package/scripts/ralph-loop.js +30 -5
- package/scripts/smart-detect.js +21 -0
- package/scripts/spawn-audit-sessions.js +373 -45
- package/scripts/team-manager.js +19 -0
- package/src/core/agents/a11y-analyzer-aria.md +155 -0
- package/src/core/agents/a11y-analyzer-forms.md +162 -0
- package/src/core/agents/a11y-analyzer-keyboard.md +175 -0
- package/src/core/agents/a11y-analyzer-semantic.md +153 -0
- package/src/core/agents/a11y-analyzer-visual.md +158 -0
- package/src/core/agents/a11y-consensus.md +248 -0
- package/src/core/agents/ads-consensus.md +74 -0
- package/src/core/agents/ads-generate.md +145 -0
- package/src/core/agents/ads-performance-tracker.md +197 -0
- package/src/core/agents/api-quality-analyzer-conventions.md +148 -0
- package/src/core/agents/api-quality-analyzer-docs.md +176 -0
- package/src/core/agents/api-quality-analyzer-errors.md +183 -0
- package/src/core/agents/api-quality-analyzer-pagination.md +171 -0
- package/src/core/agents/api-quality-analyzer-versioning.md +143 -0
- package/src/core/agents/api-quality-consensus.md +214 -0
- package/src/core/agents/arch-analyzer-circular.md +148 -0
- package/src/core/agents/arch-analyzer-complexity.md +171 -0
- package/src/core/agents/arch-analyzer-coupling.md +146 -0
- package/src/core/agents/arch-analyzer-layering.md +151 -0
- package/src/core/agents/arch-analyzer-patterns.md +162 -0
- package/src/core/agents/arch-consensus.md +227 -0
- package/src/core/commands/adr.md +1 -0
- package/src/core/commands/ads/audit.md +67 -5
- package/src/core/commands/ads/generate.md +238 -0
- package/src/core/commands/ads/health.md +327 -0
- package/src/core/commands/ads/test-plan.md +317 -0
- package/src/core/commands/ads/track.md +288 -0
- package/src/core/commands/ads.md +28 -16
- package/src/core/commands/assign.md +1 -0
- package/src/core/commands/audit.md +43 -6
- package/src/core/commands/babysit.md +90 -6
- package/src/core/commands/baseline.md +1 -0
- package/src/core/commands/blockers.md +1 -0
- package/src/core/commands/board.md +1 -0
- package/src/core/commands/changelog.md +1 -0
- package/src/core/commands/choose.md +1 -0
- package/src/core/commands/ci.md +1 -0
- package/src/core/commands/code/accessibility.md +347 -0
- package/src/core/commands/code/api.md +297 -0
- package/src/core/commands/code/architecture.md +297 -0
- package/src/core/commands/code/completeness.md +43 -6
- package/src/core/commands/code/legal.md +43 -6
- package/src/core/commands/code/logic.md +43 -6
- package/src/core/commands/code/performance.md +43 -6
- package/src/core/commands/code/security.md +43 -6
- package/src/core/commands/code/test.md +43 -6
- package/src/core/commands/configure.md +1 -0
- package/src/core/commands/council.md +1 -0
- package/src/core/commands/deploy.md +1 -0
- package/src/core/commands/diagnose.md +1 -0
- package/src/core/commands/docs.md +1 -0
- package/src/core/commands/epic/edit.md +213 -0
- package/src/core/commands/epic.md +1 -0
- package/src/core/commands/export.md +238 -0
- package/src/core/commands/help.md +16 -1
- package/src/core/commands/ideate/discover.md +7 -3
- package/src/core/commands/ideate/features.md +65 -4
- package/src/core/commands/ideate/new.md +158 -124
- package/src/core/commands/impact.md +1 -0
- package/src/core/commands/learn/explain.md +118 -0
- package/src/core/commands/learn/glossary.md +135 -0
- package/src/core/commands/learn/patterns.md +138 -0
- package/src/core/commands/learn/tour.md +126 -0
- package/src/core/commands/migrate/codemods.md +151 -0
- package/src/core/commands/migrate/plan.md +131 -0
- package/src/core/commands/migrate/scan.md +114 -0
- package/src/core/commands/migrate/validate.md +119 -0
- package/src/core/commands/multi-expert.md +1 -0
- package/src/core/commands/pr.md +1 -0
- package/src/core/commands/review.md +1 -0
- package/src/core/commands/seo/audit.md +61 -6
- package/src/core/commands/sprint.md +1 -0
- package/src/core/commands/status/undo.md +191 -0
- package/src/core/commands/status.md +1 -0
- package/src/core/commands/story/edit.md +204 -0
- package/src/core/commands/story/view.md +29 -7
- package/src/core/commands/story-validate.md +1 -0
- package/src/core/commands/story.md +1 -0
- package/src/core/commands/tdd.md +1 -0
- package/src/core/commands/team/start.md +10 -6
- package/src/core/commands/tests.md +1 -0
- package/src/core/commands/verify.md +27 -1
- package/src/core/commands/workflow.md +2 -0
- package/src/core/teams/backend.json +41 -0
- package/src/core/teams/frontend.json +41 -0
- package/src/core/teams/qa.json +41 -0
- package/src/core/teams/solo.json +35 -0
- package/src/core/templates/agileflow-metadata.json +5 -0
- package/tools/cli/commands/setup.js +85 -3
- package/tools/cli/commands/update.js +42 -0
- package/tools/cli/installers/ide/claude-code.js +68 -0
|
@@ -89,7 +89,14 @@ module.exports = {
|
|
|
89
89
|
config = await promptInstall();
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
const totalSteps = 5;
|
|
93
|
+
let currentStep = 0;
|
|
94
|
+
const step = label => {
|
|
95
|
+
currentStep++;
|
|
96
|
+
return `[${currentStep}/${totalSteps}] ${label}`;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
displaySection(step('Installing Core Content'), `Target: ${config.directory}`);
|
|
93
100
|
|
|
94
101
|
// Run core installation
|
|
95
102
|
const coreResult = await installer.install(config);
|
|
@@ -104,17 +111,81 @@ module.exports = {
|
|
|
104
111
|
success(`Installed ${coreResult.counts.skills} skills`);
|
|
105
112
|
|
|
106
113
|
// Setup IDE configurations
|
|
107
|
-
displaySection('Configuring IDEs');
|
|
114
|
+
displaySection(step('Configuring IDEs'));
|
|
108
115
|
|
|
109
116
|
ideManager.setAgileflowFolder(config.agileflowFolder);
|
|
110
117
|
ideManager.setDocsFolder(config.docsFolder);
|
|
111
118
|
|
|
119
|
+
// Check for existing IDE configs before overwriting
|
|
120
|
+
if (!options.yes) {
|
|
121
|
+
const existingConfigs = [];
|
|
122
|
+
const ideConfigDirs = {
|
|
123
|
+
'claude-code': '.claude',
|
|
124
|
+
cursor: '.cursor',
|
|
125
|
+
windsurf: '.windsurf',
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
for (const ide of config.ides) {
|
|
129
|
+
const configDir = ideConfigDirs[ide];
|
|
130
|
+
if (configDir) {
|
|
131
|
+
const fullPath = path.join(config.directory, configDir);
|
|
132
|
+
if (fs.existsSync(fullPath)) {
|
|
133
|
+
existingConfigs.push({ ide, dir: configDir });
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if (existingConfigs.length > 0) {
|
|
139
|
+
const { confirmOverwrite } = require('inquirer');
|
|
140
|
+
const configList = existingConfigs.map(c => ` ${c.dir}/`).join('\n');
|
|
141
|
+
console.log(chalk.yellow(`\n Existing IDE configs detected:\n${configList}\n`));
|
|
142
|
+
console.log(
|
|
143
|
+
chalk.dim(
|
|
144
|
+
' AgileFlow will add commands and hooks to these directories.\n' +
|
|
145
|
+
' Existing settings will be merged (not replaced).\n'
|
|
146
|
+
)
|
|
147
|
+
);
|
|
148
|
+
|
|
149
|
+
let proceed = true;
|
|
150
|
+
try {
|
|
151
|
+
const inquirer = require('inquirer');
|
|
152
|
+
const answer = await inquirer.prompt([
|
|
153
|
+
{
|
|
154
|
+
type: 'confirm',
|
|
155
|
+
name: 'proceed',
|
|
156
|
+
message: 'Continue with IDE configuration?',
|
|
157
|
+
default: true,
|
|
158
|
+
},
|
|
159
|
+
]);
|
|
160
|
+
proceed = answer.proceed;
|
|
161
|
+
} catch {
|
|
162
|
+
// If inquirer not available or stdin not interactive, proceed
|
|
163
|
+
proceed = true;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
if (!proceed) {
|
|
167
|
+
info('Skipping IDE configuration. Core installation is complete.');
|
|
168
|
+
console.log(chalk.dim(' Run setup again to configure IDEs later.\n'));
|
|
169
|
+
// Skip to docs structure
|
|
170
|
+
displaySection('Creating Documentation Structure', `Folder: ${config.docsFolder}/`);
|
|
171
|
+
const docsResult = await createDocsStructure(config.directory, config.docsFolder, {
|
|
172
|
+
updateGitignore: config.updateGitignore,
|
|
173
|
+
});
|
|
174
|
+
if (!docsResult.success) {
|
|
175
|
+
error('Failed to create docs structure');
|
|
176
|
+
}
|
|
177
|
+
console.log(chalk.green('\n✨ Setup complete (without IDE configs)!\n'));
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
112
183
|
for (const ide of config.ides) {
|
|
113
184
|
await ideManager.setup(ide, config.directory, coreResult.path);
|
|
114
185
|
}
|
|
115
186
|
|
|
116
187
|
// Create docs structure
|
|
117
|
-
displaySection('Creating Documentation Structure', `Folder: ${config.docsFolder}/`);
|
|
188
|
+
displaySection(step('Creating Documentation Structure'), `Folder: ${config.docsFolder}/`);
|
|
118
189
|
const docsResult = await createDocsStructure(config.directory, config.docsFolder, {
|
|
119
190
|
updateGitignore: config.updateGitignore,
|
|
120
191
|
});
|
|
@@ -127,6 +198,7 @@ module.exports = {
|
|
|
127
198
|
}
|
|
128
199
|
|
|
129
200
|
// Update metadata with config tracking
|
|
201
|
+
displaySection(step('Updating Configuration'));
|
|
130
202
|
try {
|
|
131
203
|
const metadataPath = path.join(
|
|
132
204
|
config.directory,
|
|
@@ -149,6 +221,16 @@ module.exports = {
|
|
|
149
221
|
}
|
|
150
222
|
|
|
151
223
|
// Final summary
|
|
224
|
+
displaySection(step('Verifying Installation'));
|
|
225
|
+
const { counts } = coreResult;
|
|
226
|
+
const totalItems = (counts.commands || 0) + (counts.agents || 0) + (counts.skills || 0);
|
|
227
|
+
console.log(
|
|
228
|
+
chalk.green(
|
|
229
|
+
` Setup complete: ${counts.commands} commands, ${counts.agents} agents, ${counts.skills} skills installed`
|
|
230
|
+
)
|
|
231
|
+
);
|
|
232
|
+
console.log(chalk.dim(` IDEs configured: ${config.ides.join(', ')}`));
|
|
233
|
+
|
|
152
234
|
console.log(chalk.green('\n✨ Setup complete!\n'));
|
|
153
235
|
|
|
154
236
|
console.log(chalk.bold('Get started:'));
|
|
@@ -230,6 +230,48 @@ module.exports = {
|
|
|
230
230
|
|
|
231
231
|
console.log(chalk.green(`\n✨ Update complete! (${status.version} → ${latestVersion})\n`));
|
|
232
232
|
|
|
233
|
+
// Show changelog diff between old and new version
|
|
234
|
+
try {
|
|
235
|
+
const fs = require('node:fs');
|
|
236
|
+
const changelogPath = path.join(status.path, 'CHANGELOG.md');
|
|
237
|
+
if (fs.existsSync(changelogPath)) {
|
|
238
|
+
const changelog = fs.readFileSync(changelogPath, 'utf8');
|
|
239
|
+
const oldVer = status.version.replace(/^v/, '');
|
|
240
|
+
const newVer = latestVersion.replace(/^v/, '');
|
|
241
|
+
|
|
242
|
+
// Extract sections between old and new version headers
|
|
243
|
+
const versionPattern = /^##\s+\[?\d+\.\d+\.\d+\]?/m;
|
|
244
|
+
const lines = changelog.split('\n');
|
|
245
|
+
const relevantLines = [];
|
|
246
|
+
let capturing = false;
|
|
247
|
+
|
|
248
|
+
for (const line of lines) {
|
|
249
|
+
if (versionPattern.test(line)) {
|
|
250
|
+
if (line.includes(oldVer)) {
|
|
251
|
+
break; // Stop at old version
|
|
252
|
+
}
|
|
253
|
+
capturing = true;
|
|
254
|
+
}
|
|
255
|
+
if (capturing) {
|
|
256
|
+
relevantLines.push(line);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
if (relevantLines.length > 0) {
|
|
261
|
+
const maxLines = 20;
|
|
262
|
+
const display = relevantLines.slice(0, maxLines);
|
|
263
|
+
console.log(chalk.hex('#e8683a').bold(` What's New in v${newVer}:\n`));
|
|
264
|
+
display.forEach(l => console.log(chalk.dim(` ${l}`)));
|
|
265
|
+
if (relevantLines.length > maxLines) {
|
|
266
|
+
console.log(chalk.dim(` ... and ${relevantLines.length - maxLines} more lines`));
|
|
267
|
+
}
|
|
268
|
+
console.log(chalk.dim(`\n Run /agileflow:whats-new for full changelog\n`));
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
} catch {
|
|
272
|
+
// Changelog display is non-critical
|
|
273
|
+
}
|
|
274
|
+
|
|
233
275
|
// If running from outdated global installation, remind user to update it
|
|
234
276
|
if (
|
|
235
277
|
npmLatestVersion &&
|
|
@@ -64,6 +64,9 @@ class ClaudeCodeSetup extends BaseIdeSetup {
|
|
|
64
64
|
// Claude Code specific: Setup SessionStart hooks (welcome, archive, context-loader)
|
|
65
65
|
await this.setupSessionStartHooks(projectDir, agileflowDir, ideDir, options);
|
|
66
66
|
|
|
67
|
+
// Claude Code specific: Setup PostToolUse hooks (native team observer)
|
|
68
|
+
await this.setupPostToolUseHooks(projectDir, agileflowDir, ideDir, options);
|
|
69
|
+
|
|
67
70
|
return result;
|
|
68
71
|
}
|
|
69
72
|
|
|
@@ -297,6 +300,71 @@ class ClaudeCodeSetup extends BaseIdeSetup {
|
|
|
297
300
|
);
|
|
298
301
|
}
|
|
299
302
|
|
|
303
|
+
/**
|
|
304
|
+
* Setup PostToolUse hooks for native Agent Teams observability.
|
|
305
|
+
* Registers native-team-observer.js for TeamCreate, SendMessage, ListTeams.
|
|
306
|
+
* @param {string} projectDir - Project directory
|
|
307
|
+
* @param {string} agileflowDir - AgileFlow installation directory
|
|
308
|
+
* @param {string} claudeDir - .claude directory path
|
|
309
|
+
* @param {Object} options - Setup options
|
|
310
|
+
*/
|
|
311
|
+
async setupPostToolUseHooks(projectDir, agileflowDir, claudeDir, options = {}) {
|
|
312
|
+
const settingsPath = path.join(claudeDir, 'settings.json');
|
|
313
|
+
let settings = {};
|
|
314
|
+
|
|
315
|
+
if (fs.existsSync(settingsPath)) {
|
|
316
|
+
try {
|
|
317
|
+
settings = JSON.parse(fs.readFileSync(settingsPath, 'utf8'));
|
|
318
|
+
} catch (e) {
|
|
319
|
+
settings = {};
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
if (!settings.hooks) settings.hooks = {};
|
|
324
|
+
if (!settings.hooks.PostToolUse) settings.hooks.PostToolUse = [];
|
|
325
|
+
|
|
326
|
+
const observerCommand = 'node $CLAUDE_PROJECT_DIR/.agileflow/scripts/native-team-observer.js';
|
|
327
|
+
|
|
328
|
+
const postToolUseHooks = [
|
|
329
|
+
{
|
|
330
|
+
matcher: 'TeamCreate',
|
|
331
|
+
hooks: [{ type: 'command', command: observerCommand, timeout: 5000 }],
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
matcher: 'SendMessage',
|
|
335
|
+
hooks: [{ type: 'command', command: observerCommand, timeout: 5000 }],
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
matcher: 'ListTeams',
|
|
339
|
+
hooks: [{ type: 'command', command: observerCommand, timeout: 5000 }],
|
|
340
|
+
},
|
|
341
|
+
];
|
|
342
|
+
|
|
343
|
+
// Merge with existing hooks (don't duplicate)
|
|
344
|
+
for (const newHook of postToolUseHooks) {
|
|
345
|
+
const existingIdx = settings.hooks.PostToolUse.findIndex(h => h.matcher === newHook.matcher);
|
|
346
|
+
if (existingIdx === -1) {
|
|
347
|
+
settings.hooks.PostToolUse.push(newHook);
|
|
348
|
+
} else {
|
|
349
|
+
const existing = settings.hooks.PostToolUse[existingIdx];
|
|
350
|
+
if (!existing.hooks) existing.hooks = [];
|
|
351
|
+
const hasObserver = existing.hooks.some(
|
|
352
|
+
h => h.type === 'command' && h.command && h.command.includes('native-team-observer')
|
|
353
|
+
);
|
|
354
|
+
if (!hasObserver) {
|
|
355
|
+
existing.hooks.push(newHook.hooks[0]);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
await fs.writeFile(settingsPath, JSON.stringify(settings, null, 2));
|
|
361
|
+
console.log(
|
|
362
|
+
chalk.dim(
|
|
363
|
+
` - PostToolUse hooks: native team observer (TeamCreate, SendMessage, ListTeams)`
|
|
364
|
+
)
|
|
365
|
+
);
|
|
366
|
+
}
|
|
367
|
+
|
|
300
368
|
/**
|
|
301
369
|
* Remove AgileFlow command duplicates from user-level ~/.claude/commands/
|
|
302
370
|
* When the same command exists in both ~/.claude/commands/ and
|