agents-templated 2.2.9 → 2.2.11
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/README.md +101 -86
- package/agents/commands/README.md +70 -0
- package/agents/commands/SCHEMA.md +22 -0
- package/agents/commands/arch-check.md +33 -0
- package/agents/commands/audit.md +38 -0
- package/agents/commands/debug-track.md +33 -0
- package/agents/commands/docs-sync.md +33 -0
- package/agents/commands/docs.md +34 -0
- package/agents/commands/fix.md +34 -0
- package/agents/commands/learn-loop.md +33 -0
- package/agents/commands/perf-scan.md +33 -0
- package/agents/commands/perf.md +34 -0
- package/agents/commands/plan.md +34 -0
- package/agents/commands/pr.md +35 -0
- package/agents/commands/problem-map.md +33 -0
- package/agents/commands/quality-gate.md +33 -0
- package/agents/commands/refactor.md +34 -0
- package/agents/commands/release-ready.md +33 -0
- package/agents/commands/release.md +39 -0
- package/agents/commands/risk-review.md +33 -0
- package/agents/commands/scaffold.md +34 -0
- package/agents/commands/scope-shape.md +33 -0
- package/agents/commands/task.md +35 -0
- package/agents/commands/test.md +34 -0
- package/agents/commands/ux-bar.md +33 -0
- package/agents/rules/planning.mdc +69 -0
- package/bin/cli.js +116 -4
- package/index.js +12 -1
- package/lib/workflow.js +190 -0
- package/package.json +2 -1
- package/templates/.claude/agents/README.md +13 -1
- package/templates/.claude/agents/compatibility-checker.md +79 -0
- package/templates/.claude/agents/configuration-validator.md +85 -0
- package/templates/.claude/agents/database-migrator.md +83 -0
- package/templates/.claude/agents/dependency-auditor.md +92 -0
- package/templates/.claude/agents/load-tester.md +80 -0
- package/templates/.claude/agents/performance-profiler.md +103 -0
- package/templates/CLAUDE.md +8 -0
- package/templates/README.md +104 -61
- package/templates/agents/commands/README.md +47 -1
- package/templates/agents/commands/arch-check.md +33 -0
- package/templates/agents/commands/debug-track.md +33 -0
- package/templates/agents/commands/docs-sync.md +33 -0
- package/templates/agents/commands/learn-loop.md +33 -0
- package/templates/agents/commands/perf-scan.md +33 -0
- package/templates/agents/commands/problem-map.md +33 -0
- package/templates/agents/commands/quality-gate.md +33 -0
- package/templates/agents/commands/release-ready.md +33 -0
- package/templates/agents/commands/risk-review.md +33 -0
- package/templates/agents/commands/scope-shape.md +33 -0
- package/templates/agents/commands/ux-bar.md +33 -0
- package/templates/agents/skills/README.md +6 -0
- package/templates/agents/skills/emilkowalski-skill/SKILL.md +51 -0
- package/templates/agents/skills/raphaelsalaja-userinterface-wiki/SKILL.md +51 -0
package/bin/cli.js
CHANGED
|
@@ -23,6 +23,13 @@ const {
|
|
|
23
23
|
scaffoldRule,
|
|
24
24
|
scaffoldSubagent
|
|
25
25
|
} = require('../lib/instructions');
|
|
26
|
+
const {
|
|
27
|
+
WORKFLOW_COMMANDS,
|
|
28
|
+
CONTRACT_FILES,
|
|
29
|
+
SPECIALIST_CONTRACT_FILES,
|
|
30
|
+
formatWorkflowOutput,
|
|
31
|
+
validateWorkflowDefinitions
|
|
32
|
+
} = require('../lib/workflow');
|
|
26
33
|
|
|
27
34
|
// Resolve the templates directory - works in both dev and installed contexts
|
|
28
35
|
const getTemplatesDir = () => {
|
|
@@ -40,6 +47,15 @@ const getTemplatesDir = () => {
|
|
|
40
47
|
};
|
|
41
48
|
|
|
42
49
|
const program = new Command();
|
|
50
|
+
const workflowValidationIssues = validateWorkflowDefinitions();
|
|
51
|
+
|
|
52
|
+
if (workflowValidationIssues.length > 0) {
|
|
53
|
+
console.error(chalk.red('Invalid workflow command definitions detected:'));
|
|
54
|
+
workflowValidationIssues.forEach((issue) => {
|
|
55
|
+
console.error(chalk.red(` - ${issue}`));
|
|
56
|
+
});
|
|
57
|
+
process.exit(1);
|
|
58
|
+
}
|
|
43
59
|
|
|
44
60
|
program
|
|
45
61
|
.name('agents-templated')
|
|
@@ -53,6 +69,7 @@ program
|
|
|
53
69
|
.option('-d, --docs', 'Install documentation files only')
|
|
54
70
|
.option('-r, --rules', 'Install agent rules only')
|
|
55
71
|
.option('-s, --skills', 'Install skills only')
|
|
72
|
+
.option('-C, --commands', 'Install deterministic command contracts only')
|
|
56
73
|
.option('-g, --github', 'Install GitHub Copilot instructions')
|
|
57
74
|
.option('-S, --subagents', 'Install agent subagents only')
|
|
58
75
|
.option('-p, --preset <name>', 'Use a preset configuration (nextjs, django-react, express-api, fastapi, go-api)')
|
|
@@ -113,7 +130,7 @@ program
|
|
|
113
130
|
let choices = [];
|
|
114
131
|
|
|
115
132
|
// If no specific options provided, prompt user
|
|
116
|
-
if (!options.all && !options.docs && !options.rules && !options.skills && !options.github) {
|
|
133
|
+
if (!options.all && !options.docs && !options.rules && !options.skills && !options.commands && !options.github) {
|
|
117
134
|
const answers = await inquirer.prompt([
|
|
118
135
|
{
|
|
119
136
|
type: 'checkbox',
|
|
@@ -124,6 +141,7 @@ program
|
|
|
124
141
|
{ name: 'Documentation files (agent-docs/)', value: 'docs' },
|
|
125
142
|
{ name: 'Agent rules (.claude/rules/*.md)', value: 'rules' },
|
|
126
143
|
{ name: 'Skills (.github/skills/*)', value: 'skills' },
|
|
144
|
+
{ name: 'Command contracts (agents/commands/*.md)', value: 'commands' },
|
|
127
145
|
{ name: 'AI Agent instructions (Cursor, Copilot, Claude, Generic AGENTS)', value: 'github' },
|
|
128
146
|
{ name: 'Agent subagents (.claude/agents/*.md)', value: 'subagents' }
|
|
129
147
|
],
|
|
@@ -146,6 +164,7 @@ program
|
|
|
146
164
|
if (options.docs) choices.push('docs');
|
|
147
165
|
if (options.rules) choices.push('rules');
|
|
148
166
|
if (options.skills) choices.push('skills');
|
|
167
|
+
if (options.commands) choices.push('commands');
|
|
149
168
|
if (options.github) choices.push('github');
|
|
150
169
|
if (options.subagents) choices.push('subagents');
|
|
151
170
|
}
|
|
@@ -183,6 +202,17 @@ program
|
|
|
183
202
|
);
|
|
184
203
|
}
|
|
185
204
|
|
|
205
|
+
// Install deterministic command contracts
|
|
206
|
+
if (installAll || choices.includes('commands')) {
|
|
207
|
+
console.log(chalk.yellow('Installing command contracts...'));
|
|
208
|
+
await fs.ensureDir(path.join(targetDir, 'agents', 'commands'));
|
|
209
|
+
await copyDirectory(
|
|
210
|
+
path.join(templateDir, 'agents', 'commands'),
|
|
211
|
+
path.join(targetDir, 'agents', 'commands'),
|
|
212
|
+
options.force
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
|
|
186
216
|
// Install AI Agent instructions (Cursor, Copilot, Claude, Generic AGENTS)
|
|
187
217
|
if (installAll || choices.includes('github')) {
|
|
188
218
|
console.log(chalk.yellow('Installing AI agent instructions...'));
|
|
@@ -256,6 +286,7 @@ program
|
|
|
256
286
|
{ name: 'Documentation (agent-docs/)', value: 'docs' },
|
|
257
287
|
{ name: 'Agent Rules (security, testing, database, etc.)', value: 'rules' },
|
|
258
288
|
{ name: 'Skills (reusable agent capabilities)', value: 'skills' },
|
|
289
|
+
{ name: 'Command contracts (agents/commands/*.md)', value: 'commands' },
|
|
259
290
|
{ name: 'AI Agent instructions (Cursor, Copilot, Claude, Generic AGENTS)', value: 'github' },
|
|
260
291
|
{ name: 'Agent subagents (.claude/agents/*.md)', value: 'subagents' }
|
|
261
292
|
],
|
|
@@ -293,6 +324,7 @@ program
|
|
|
293
324
|
{ name: 'Documentation (agent-docs/)', value: 'docs', checked: true },
|
|
294
325
|
{ name: 'Agent Rules (security, testing, database, etc.)', value: 'rules', checked: true },
|
|
295
326
|
{ name: 'Skills (reusable agent capabilities)', value: 'skills', checked: true },
|
|
327
|
+
{ name: 'Command contracts (agents/commands/*.md)', value: 'commands', checked: true },
|
|
296
328
|
{ name: 'AI Agent instructions (Cursor, Copilot, Claude, Generic AGENTS)', value: 'github', checked: true },
|
|
297
329
|
{ name: 'Agent subagents (.claude/agents/*.md)', value: 'subagents', checked: true }
|
|
298
330
|
],
|
|
@@ -319,6 +351,7 @@ program
|
|
|
319
351
|
docs: componentAnswers.components.includes('docs'),
|
|
320
352
|
rules: componentAnswers.components.includes('rules'),
|
|
321
353
|
skills: componentAnswers.components.includes('skills'),
|
|
354
|
+
commands: componentAnswers.components.includes('commands'),
|
|
322
355
|
github: componentAnswers.components.includes('github'),
|
|
323
356
|
subagents: componentAnswers.components.includes('subagents')
|
|
324
357
|
};
|
|
@@ -354,6 +387,17 @@ program
|
|
|
354
387
|
);
|
|
355
388
|
}
|
|
356
389
|
|
|
390
|
+
// Install deterministic command contracts
|
|
391
|
+
if (options.commands) {
|
|
392
|
+
console.log(chalk.yellow('Installing command contracts...'));
|
|
393
|
+
await fs.ensureDir(path.join(targetDir, 'agents', 'commands'));
|
|
394
|
+
await copyDirectory(
|
|
395
|
+
path.join(templateDir, 'agents', 'commands'),
|
|
396
|
+
path.join(targetDir, 'agents', 'commands'),
|
|
397
|
+
options.force
|
|
398
|
+
);
|
|
399
|
+
}
|
|
400
|
+
|
|
357
401
|
// Install AI Agent instructions (Cursor, Copilot, Claude, Generic AGENTS)
|
|
358
402
|
if (options.github) {
|
|
359
403
|
console.log(chalk.yellow('Installing AI agent instructions...'));
|
|
@@ -403,9 +447,15 @@ program
|
|
|
403
447
|
console.log(chalk.yellow('docs') + ' - Documentation files (agent-docs/ directory)');
|
|
404
448
|
console.log(chalk.yellow('rules') + ' - Agent rules (.claude/rules/*.md)');
|
|
405
449
|
console.log(chalk.yellow('skills') + ' - Agent skills (.github/skills/*)');
|
|
450
|
+
console.log(chalk.yellow('commands') + ' - Deterministic command contracts (agents/commands/*.md)');
|
|
406
451
|
console.log(chalk.yellow('github') + ' - AI Agent instructions (Cursor, Copilot, Claude, Generic AGENTS)');
|
|
407
452
|
console.log(chalk.yellow('subagents') + ' - Agent subagents (.claude/agents/*.md)');
|
|
408
453
|
console.log(chalk.yellow('all') + ' - All components');
|
|
454
|
+
|
|
455
|
+
console.log(chalk.blue.bold('\n\nWorkflow Commands:\n'));
|
|
456
|
+
WORKFLOW_COMMANDS.forEach(({ cli, specialist, description }) => {
|
|
457
|
+
console.log(chalk.cyan(cli) + ` - ${specialist}: ${description}`);
|
|
458
|
+
});
|
|
409
459
|
|
|
410
460
|
console.log(chalk.blue.bold('\n\nAvailable Presets:\n'));
|
|
411
461
|
console.log(chalk.cyan('nextjs') + ' - Next.js with TypeScript, React, and Tailwind CSS');
|
|
@@ -492,6 +542,29 @@ program
|
|
|
492
542
|
warnings.push(`⚠ ${LAYOUT.canonical.skillsDir} directory missing - run 'agents-templated init --skills'`);
|
|
493
543
|
}
|
|
494
544
|
|
|
545
|
+
const commandsDir = path.join(targetDir, 'agents', 'commands');
|
|
546
|
+
if (await fs.pathExists(commandsDir)) {
|
|
547
|
+
for (const contractFile of CONTRACT_FILES) {
|
|
548
|
+
const contractPath = path.join(commandsDir, contractFile);
|
|
549
|
+
if (await fs.pathExists(contractPath)) {
|
|
550
|
+
passed.push(`✓ agents/commands/${contractFile} found`);
|
|
551
|
+
} else {
|
|
552
|
+
warnings.push(`⚠ agents/commands/${contractFile} missing`);
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
for (const contractFile of SPECIALIST_CONTRACT_FILES) {
|
|
557
|
+
const contractPath = path.join(commandsDir, contractFile);
|
|
558
|
+
if (await fs.pathExists(contractPath)) {
|
|
559
|
+
passed.push(`✓ agents/commands/${contractFile} found`);
|
|
560
|
+
} else {
|
|
561
|
+
warnings.push(`⚠ agents/commands/${contractFile} missing`);
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
} else {
|
|
565
|
+
warnings.push(`⚠ agents/commands directory missing - run 'agents-templated init --commands'`);
|
|
566
|
+
}
|
|
567
|
+
|
|
495
568
|
// Check subagents
|
|
496
569
|
const subagentsDir = path.join(targetDir, LAYOUT.canonical.subagentsDir);
|
|
497
570
|
if (await fs.pathExists(subagentsDir)) {
|
|
@@ -678,7 +751,7 @@ async function cleanupLegacyInstructionFiles(targetDir) {
|
|
|
678
751
|
|
|
679
752
|
async function updateSelectedComponents(targetDir, templateDir, selectedComponents, overwrite = true) {
|
|
680
753
|
const components = selectedComponents.includes('all')
|
|
681
|
-
? ['docs', 'rules', 'skills', 'github', 'subagents']
|
|
754
|
+
? ['docs', 'rules', 'skills', 'commands', 'github', 'subagents']
|
|
682
755
|
: selectedComponents;
|
|
683
756
|
|
|
684
757
|
if (components.includes('docs')) {
|
|
@@ -711,6 +784,16 @@ async function updateSelectedComponents(targetDir, templateDir, selectedComponen
|
|
|
711
784
|
);
|
|
712
785
|
}
|
|
713
786
|
|
|
787
|
+
if (components.includes('commands')) {
|
|
788
|
+
console.log(chalk.yellow('Updating command contracts...'));
|
|
789
|
+
await fs.ensureDir(path.join(targetDir, 'agents', 'commands'));
|
|
790
|
+
await copyDirectory(
|
|
791
|
+
path.join(templateDir, 'agents', 'commands'),
|
|
792
|
+
path.join(targetDir, 'agents', 'commands'),
|
|
793
|
+
overwrite
|
|
794
|
+
);
|
|
795
|
+
}
|
|
796
|
+
|
|
714
797
|
if (components.includes('github')) {
|
|
715
798
|
console.log(chalk.yellow('Updating AI agent instructions...'));
|
|
716
799
|
await writeGeneratedInstructions(targetDir, templateDir, overwrite);
|
|
@@ -760,6 +843,7 @@ program
|
|
|
760
843
|
.option('-d, --docs', 'Update documentation files only')
|
|
761
844
|
.option('-r, --rules', 'Update agent rules only')
|
|
762
845
|
.option('-s, --skills', 'Update skills only')
|
|
846
|
+
.option('-C, --commands', 'Update deterministic command contracts only')
|
|
763
847
|
.option('-g, --github', 'Update AI agent instruction files only')
|
|
764
848
|
.option('-S, --subagents', 'Update agent subagents only')
|
|
765
849
|
.option('-c, --check-only', 'Only check for updates, don\'t install')
|
|
@@ -812,7 +896,7 @@ program
|
|
|
812
896
|
console.log(chalk.green('✓ Legacy layout migration completed.\n'));
|
|
813
897
|
}
|
|
814
898
|
|
|
815
|
-
const hasComponentSelection = options.all || options.docs || options.rules || options.skills || options.github;
|
|
899
|
+
const hasComponentSelection = options.all || options.docs || options.rules || options.skills || options.commands || options.github || options.subagents;
|
|
816
900
|
|
|
817
901
|
// Component refresh mode: update selected parts directly without stack/wizard prompts
|
|
818
902
|
if (hasComponentSelection) {
|
|
@@ -820,6 +904,7 @@ program
|
|
|
820
904
|
if (options.all || options.docs) selectedComponents.push('docs');
|
|
821
905
|
if (options.all || options.rules) selectedComponents.push('rules');
|
|
822
906
|
if (options.all || options.skills) selectedComponents.push('skills');
|
|
907
|
+
if (options.all || options.commands) selectedComponents.push('commands');
|
|
823
908
|
if (options.all || options.github) selectedComponents.push('github');
|
|
824
909
|
if (options.all || options.subagents) selectedComponents.push('subagents');
|
|
825
910
|
|
|
@@ -844,7 +929,9 @@ program
|
|
|
844
929
|
{ targetFile: `${LAYOUT.canonical.skillsDir}/find-skills/SKILL.md`, templateFile: 'agents/skills/find-skills/SKILL.md', component: 'skills' },
|
|
845
930
|
{ targetFile: `${LAYOUT.canonical.skillsDir}/error-patterns/SKILL.md`, templateFile: 'agents/skills/error-patterns/SKILL.md', component: 'skills' },
|
|
846
931
|
{ targetFile: `${LAYOUT.canonical.skillsDir}/ui-ux-pro-max/SKILL.md`, templateFile: 'agents/skills/ui-ux-pro-max/SKILL.md', component: 'skills' },
|
|
847
|
-
{ targetFile: `${LAYOUT.canonical.skillsDir}/shadcn-ui/SKILL.md`, templateFile: 'agents/skills/shadcn-ui/SKILL.md', component: 'skills' }
|
|
932
|
+
{ targetFile: `${LAYOUT.canonical.skillsDir}/shadcn-ui/SKILL.md`, templateFile: 'agents/skills/shadcn-ui/SKILL.md', component: 'skills' },
|
|
933
|
+
{ targetFile: 'agents/commands/SCHEMA.md', templateFile: 'agents/commands/SCHEMA.md', component: 'commands' },
|
|
934
|
+
{ targetFile: 'agents/commands/README.md', templateFile: 'agents/commands/README.md', component: 'commands' }
|
|
848
935
|
];
|
|
849
936
|
|
|
850
937
|
for (const {targetFile, templateFile, component} of checkFiles) {
|
|
@@ -1007,6 +1094,31 @@ program
|
|
|
1007
1094
|
}
|
|
1008
1095
|
});
|
|
1009
1096
|
|
|
1097
|
+
program
|
|
1098
|
+
.command('workflow')
|
|
1099
|
+
.description('Show the lifecycle workflow and specialist commands')
|
|
1100
|
+
.alias('sprint')
|
|
1101
|
+
.action(() => {
|
|
1102
|
+
console.log(chalk.blue.bold('\nWorkflow Lifecycle\n'));
|
|
1103
|
+
console.log(chalk.white('Think -> Plan -> Build -> Review -> Test -> Ship -> Reflect\n'));
|
|
1104
|
+
WORKFLOW_COMMANDS.forEach(({ cli, specialist, slash, description }) => {
|
|
1105
|
+
console.log(chalk.cyan(cli) + ` (${slash})`);
|
|
1106
|
+
console.log(chalk.gray(` ${specialist} - ${description}`));
|
|
1107
|
+
});
|
|
1108
|
+
console.log(chalk.gray('\nRun any workflow command with an objective, for example:'));
|
|
1109
|
+
console.log(chalk.white(' agents-templated problem-map "daily briefing app for founders"\n'));
|
|
1110
|
+
});
|
|
1111
|
+
|
|
1112
|
+
for (const workflow of WORKFLOW_COMMANDS) {
|
|
1113
|
+
program
|
|
1114
|
+
.command(`${workflow.cli} [objective...]`)
|
|
1115
|
+
.description(`${workflow.specialist}: ${workflow.description}`)
|
|
1116
|
+
.action((objective) => {
|
|
1117
|
+
const objectiveText = Array.isArray(objective) ? objective.join(' ') : '';
|
|
1118
|
+
process.stdout.write(formatWorkflowOutput(workflow, objectiveText));
|
|
1119
|
+
});
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1010
1122
|
program
|
|
1011
1123
|
.command('new-skill <name>')
|
|
1012
1124
|
.description('Scaffold a new skill in .github/skills/<name>/SKILL.md')
|
package/index.js
CHANGED
|
@@ -15,6 +15,7 @@ const { CANONICAL_INSTRUCTION_FILE, writeGeneratedInstructions } = require('./li
|
|
|
15
15
|
* @param {boolean} options.docs - Install documentation files
|
|
16
16
|
* @param {boolean} options.rules - Install agent rules
|
|
17
17
|
* @param {boolean} options.skills - Install skills
|
|
18
|
+
* @param {boolean} options.commands - Install deterministic command contracts
|
|
18
19
|
* @param {boolean} options.github - Install GitHub Copilot instructions
|
|
19
20
|
* @param {boolean} options.subagents - Install agent subagents
|
|
20
21
|
* @param {boolean} options.force - Overwrite existing files
|
|
@@ -22,7 +23,7 @@ const { CANONICAL_INSTRUCTION_FILE, writeGeneratedInstructions } = require('./li
|
|
|
22
23
|
*/
|
|
23
24
|
async function install(targetDir, options = {}) {
|
|
24
25
|
const templateDir = path.join(__dirname, 'templates');
|
|
25
|
-
const installAll = !options.docs && !options.rules && !options.skills && !options.github && !options.subagents;
|
|
26
|
+
const installAll = !options.docs && !options.rules && !options.skills && !options.commands && !options.github && !options.subagents;
|
|
26
27
|
|
|
27
28
|
const files = [];
|
|
28
29
|
|
|
@@ -69,6 +70,16 @@ async function install(targetDir, options = {}) {
|
|
|
69
70
|
);
|
|
70
71
|
}
|
|
71
72
|
|
|
73
|
+
// Deterministic command contracts
|
|
74
|
+
if (installAll || options.commands) {
|
|
75
|
+
await fs.ensureDir(path.join(targetDir, 'agents', 'commands'));
|
|
76
|
+
await copyDirectory(
|
|
77
|
+
path.join(templateDir, 'agents', 'commands'),
|
|
78
|
+
path.join(targetDir, 'agents', 'commands'),
|
|
79
|
+
options.force
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
72
83
|
// AI Agent instructions (Cursor, Copilot, Claude)
|
|
73
84
|
if (installAll || options.github) {
|
|
74
85
|
await writeGeneratedInstructions(targetDir, templateDir, options.force);
|
package/lib/workflow.js
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
const WORKFLOW_COMMANDS = [
|
|
2
|
+
{
|
|
3
|
+
cli: 'problem-map',
|
|
4
|
+
slash: '/problem-map',
|
|
5
|
+
purpose: 'problem-framing',
|
|
6
|
+
specialist: 'Problem Strategist',
|
|
7
|
+
contract: 'plan.md',
|
|
8
|
+
description: 'Clarify user pain and define the real problem before implementation.'
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
cli: 'scope-shape',
|
|
12
|
+
slash: '/scope-shape',
|
|
13
|
+
purpose: 'scope-decision',
|
|
14
|
+
specialist: 'Scope Director',
|
|
15
|
+
contract: 'plan.md',
|
|
16
|
+
description: 'Challenge scope and lock the highest-leverage direction.'
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
cli: 'arch-check',
|
|
20
|
+
slash: '/arch-check',
|
|
21
|
+
purpose: 'architecture-readiness',
|
|
22
|
+
specialist: 'Architecture Reviewer',
|
|
23
|
+
contract: 'plan.md',
|
|
24
|
+
description: 'Lock architecture, edge cases, and test strategy before build.'
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
cli: 'ux-bar',
|
|
28
|
+
slash: '/ux-bar',
|
|
29
|
+
purpose: 'ux-quality-readiness',
|
|
30
|
+
specialist: 'Design Quality Lead',
|
|
31
|
+
contract: 'plan.md',
|
|
32
|
+
description: 'Assess UX quality and close design gaps before implementation.'
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
cli: 'debug-track',
|
|
36
|
+
slash: '/debug-track',
|
|
37
|
+
purpose: 'root-cause-investigation',
|
|
38
|
+
specialist: 'Root-Cause Investigator',
|
|
39
|
+
contract: 'fix.md',
|
|
40
|
+
description: 'Reproduce issues and isolate root cause before applying fixes.'
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
cli: 'risk-review',
|
|
44
|
+
slash: '/risk-review',
|
|
45
|
+
purpose: 'release-risk-assessment',
|
|
46
|
+
specialist: 'Release Risk Reviewer',
|
|
47
|
+
contract: 'audit.md',
|
|
48
|
+
description: 'Run a production-risk review on active changes.'
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
cli: 'quality-gate',
|
|
52
|
+
slash: '/quality-gate',
|
|
53
|
+
purpose: 'quality-gating',
|
|
54
|
+
specialist: 'Quality Gatekeeper',
|
|
55
|
+
contract: 'test.md',
|
|
56
|
+
description: 'Validate behavior, capture regressions, and enforce quality gates.'
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
cli: 'perf-scan',
|
|
60
|
+
slash: '/perf-scan',
|
|
61
|
+
purpose: 'performance-regression-check',
|
|
62
|
+
specialist: 'Performance Analyst',
|
|
63
|
+
contract: 'perf.md',
|
|
64
|
+
description: 'Record baseline performance and compare before/after changes.'
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
cli: 'release-ready',
|
|
68
|
+
slash: '/release-ready',
|
|
69
|
+
purpose: 'release-readiness',
|
|
70
|
+
specialist: 'Release Coordinator',
|
|
71
|
+
contract: 'release.md',
|
|
72
|
+
description: 'Prepare release branch, tests, and release checklist artifacts.'
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
cli: 'docs-sync',
|
|
76
|
+
slash: '/docs-sync',
|
|
77
|
+
purpose: 'documentation-synchronization',
|
|
78
|
+
specialist: 'Documentation Engineer',
|
|
79
|
+
contract: 'docs.md',
|
|
80
|
+
description: 'Update README and architecture docs to match shipped behavior.'
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
cli: 'learn-loop',
|
|
84
|
+
slash: '/learn-loop',
|
|
85
|
+
purpose: 'retrospective-action-loop',
|
|
86
|
+
specialist: 'Iteration Lead',
|
|
87
|
+
contract: 'task.md',
|
|
88
|
+
description: 'Capture wins, misses, and next-cycle improvements.'
|
|
89
|
+
}
|
|
90
|
+
];
|
|
91
|
+
|
|
92
|
+
const CONTRACT_FILES = [
|
|
93
|
+
'SCHEMA.md',
|
|
94
|
+
'README.md',
|
|
95
|
+
'plan.md',
|
|
96
|
+
'task.md',
|
|
97
|
+
'scaffold.md',
|
|
98
|
+
'fix.md',
|
|
99
|
+
'refactor.md',
|
|
100
|
+
'audit.md',
|
|
101
|
+
'perf.md',
|
|
102
|
+
'test.md',
|
|
103
|
+
'pr.md',
|
|
104
|
+
'release.md',
|
|
105
|
+
'docs.md'
|
|
106
|
+
];
|
|
107
|
+
|
|
108
|
+
const SPECIALIST_CONTRACT_FILES = [
|
|
109
|
+
'problem-map.md',
|
|
110
|
+
'scope-shape.md',
|
|
111
|
+
'arch-check.md',
|
|
112
|
+
'ux-bar.md',
|
|
113
|
+
'debug-track.md',
|
|
114
|
+
'risk-review.md',
|
|
115
|
+
'quality-gate.md',
|
|
116
|
+
'perf-scan.md',
|
|
117
|
+
'release-ready.md',
|
|
118
|
+
'docs-sync.md',
|
|
119
|
+
'learn-loop.md'
|
|
120
|
+
];
|
|
121
|
+
|
|
122
|
+
const DEPRECATED_COMMAND_ALIASES = [];
|
|
123
|
+
|
|
124
|
+
function formatWorkflowOutput(workflow, objective) {
|
|
125
|
+
const trimmedObjective = (objective || '').trim();
|
|
126
|
+
const goal = trimmedObjective.length > 0 ? trimmedObjective : 'No explicit objective provided';
|
|
127
|
+
|
|
128
|
+
return [
|
|
129
|
+
'',
|
|
130
|
+
'Workflow command',
|
|
131
|
+
` Command: ${workflow.cli}`,
|
|
132
|
+
` Slash contract: ${workflow.slash}`,
|
|
133
|
+
` Specialist: ${workflow.specialist}`,
|
|
134
|
+
` Objective: ${goal}`,
|
|
135
|
+
'',
|
|
136
|
+
'Execution contract',
|
|
137
|
+
` Template file: agents/commands/${workflow.contract}`,
|
|
138
|
+
' Mode: deterministic structured output only',
|
|
139
|
+
' Safety: destructive actions require CONFIRM-DESTRUCTIVE:<target>',
|
|
140
|
+
'',
|
|
141
|
+
'Recommended next actions',
|
|
142
|
+
' 1. Ensure command contracts are installed: agents-templated init --commands',
|
|
143
|
+
' 2. Open agents/commands/README.md and follow the contract sections',
|
|
144
|
+
' 3. Use agents-templated workflow to see the full sprint sequence',
|
|
145
|
+
''
|
|
146
|
+
].join('\n');
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function validateWorkflowDefinitions() {
|
|
150
|
+
const seenCli = new Set();
|
|
151
|
+
const seenSlash = new Set();
|
|
152
|
+
const seenPurpose = new Set();
|
|
153
|
+
const issues = [];
|
|
154
|
+
|
|
155
|
+
for (const workflow of WORKFLOW_COMMANDS) {
|
|
156
|
+
if (seenCli.has(workflow.cli)) {
|
|
157
|
+
issues.push(`Duplicate cli command: ${workflow.cli}`);
|
|
158
|
+
}
|
|
159
|
+
seenCli.add(workflow.cli);
|
|
160
|
+
|
|
161
|
+
if (seenSlash.has(workflow.slash)) {
|
|
162
|
+
issues.push(`Duplicate slash command: ${workflow.slash}`);
|
|
163
|
+
}
|
|
164
|
+
seenSlash.add(workflow.slash);
|
|
165
|
+
|
|
166
|
+
if (!workflow.purpose) {
|
|
167
|
+
issues.push(`Missing purpose for command: ${workflow.cli}`);
|
|
168
|
+
} else if (seenPurpose.has(workflow.purpose)) {
|
|
169
|
+
issues.push(`Duplicate command purpose: ${workflow.purpose}`);
|
|
170
|
+
}
|
|
171
|
+
seenPurpose.add(workflow.purpose);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
for (const alias of DEPRECATED_COMMAND_ALIASES) {
|
|
175
|
+
if (seenCli.has(alias.from)) {
|
|
176
|
+
issues.push(`Alias conflicts with active command name: ${alias.from}`);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
return issues;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
module.exports = {
|
|
184
|
+
WORKFLOW_COMMANDS,
|
|
185
|
+
CONTRACT_FILES,
|
|
186
|
+
SPECIALIST_CONTRACT_FILES,
|
|
187
|
+
DEPRECATED_COMMAND_ALIASES,
|
|
188
|
+
formatWorkflowOutput,
|
|
189
|
+
validateWorkflowDefinitions
|
|
190
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agents-templated",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.11",
|
|
4
4
|
"description": "Technology-agnostic development template with multi-AI agent support (Cursor, Copilot, VSCode, Gemini), security-first patterns, and comprehensive testing guidelines",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"files": [
|
|
38
38
|
"bin",
|
|
39
39
|
"lib",
|
|
40
|
+
"agents",
|
|
40
41
|
"templates",
|
|
41
42
|
"templates/presets",
|
|
42
43
|
"index.js",
|
|
@@ -22,6 +22,12 @@ Subagents are bounded agent processes that your orchestrator (main AI) can deleg
|
|
|
22
22
|
| `e2e-runner` | sonnet | Execute Playwright E2E test suites and report results |
|
|
23
23
|
| `refactor-cleaner` | sonnet | Remove dead code, unused deps, orphaned exports |
|
|
24
24
|
| `doc-updater` | haiku | Sync README, API docs, and codemaps after code changes |
|
|
25
|
+
| `performance-profiler` | sonnet | Diagnose latency and resource bottlenecks with measurable optimization plans |
|
|
26
|
+
| `dependency-auditor` | sonnet | Audit dependency risk, CVEs, and upgrade hygiene |
|
|
27
|
+
| `configuration-validator` | sonnet | Validate environment config, safety defaults, and deploy readiness |
|
|
28
|
+
| `database-migrator` | sonnet | Plan and review schema/data migrations with rollback and validation gates |
|
|
29
|
+
| `load-tester` | sonnet | Define load scenarios, thresholds, and release-quality performance gates |
|
|
30
|
+
| `compatibility-checker` | sonnet | Detect contract-breaking API changes and enforce versioning discipline |
|
|
25
31
|
|
|
26
32
|
## Model Selection Guide
|
|
27
33
|
|
|
@@ -56,7 +62,13 @@ Reference the subagent file directly in your prompt or instruct your AI to follo
|
|
|
56
62
|
├── build-error-resolver.md
|
|
57
63
|
├── e2e-runner.md
|
|
58
64
|
├── refactor-cleaner.md
|
|
59
|
-
|
|
65
|
+
├── doc-updater.md
|
|
66
|
+
├── performance-profiler.md
|
|
67
|
+
├── dependency-auditor.md
|
|
68
|
+
├── configuration-validator.md
|
|
69
|
+
├── database-migrator.md
|
|
70
|
+
├── load-tester.md
|
|
71
|
+
└── compatibility-checker.md
|
|
60
72
|
```
|
|
61
73
|
|
|
62
74
|
## Adding a New Subagent
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: compatibility-checker
|
|
3
|
+
description: Use when reviewing API or contract changes for backward compatibility, deprecation safety, and versioning discipline.
|
|
4
|
+
tools: ["Read", "Grep", "Glob", "Bash"]
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Compatibility Checker
|
|
9
|
+
|
|
10
|
+
You are a compatibility assurance agent. Your job is to detect breaking contract changes early and enforce safe versioning and deprecation practices.
|
|
11
|
+
|
|
12
|
+
## Activation Conditions
|
|
13
|
+
|
|
14
|
+
Invoke this subagent when:
|
|
15
|
+
- API request/response schemas change
|
|
16
|
+
- New API versions are introduced
|
|
17
|
+
- Existing fields, parameters, or endpoints are modified
|
|
18
|
+
- SDK/client generation artifacts are impacted
|
|
19
|
+
- Release notes include contract changes
|
|
20
|
+
|
|
21
|
+
## Workflow
|
|
22
|
+
|
|
23
|
+
### 1. Identify contract surface
|
|
24
|
+
- Locate OpenAPI/GraphQL/API schema sources
|
|
25
|
+
- Identify affected operations, parameters, and response models
|
|
26
|
+
- Compare current changes against previous released contract
|
|
27
|
+
|
|
28
|
+
### 2. Classify compatibility impact
|
|
29
|
+
- Additive, backward-compatible changes
|
|
30
|
+
- Potentially breaking changes (removed/renamed fields, stricter validation, requiredness changes)
|
|
31
|
+
- Behavior changes requiring version bump or migration notice
|
|
32
|
+
|
|
33
|
+
### 3. Evaluate versioning and deprecation
|
|
34
|
+
- Verify versioning policy compliance
|
|
35
|
+
- Ensure deprecations include timeline and migration path
|
|
36
|
+
- Ensure experimental elements are explicitly marked and documented when applicable
|
|
37
|
+
|
|
38
|
+
### 4. Define migration and client impact
|
|
39
|
+
- Identify clients likely affected
|
|
40
|
+
- Provide migration notes and fallback options
|
|
41
|
+
- Recommend compatibility test cases for critical clients
|
|
42
|
+
|
|
43
|
+
### 5. Emit release gate
|
|
44
|
+
- Approve additive and documented compatible changes
|
|
45
|
+
- Conditional for changes requiring explicit migration coordination
|
|
46
|
+
- Block undocumented or accidental breaking changes
|
|
47
|
+
|
|
48
|
+
## Output Format
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
## Compatibility Review: {scope}
|
|
52
|
+
|
|
53
|
+
### Changed Surface
|
|
54
|
+
- Operations: ...
|
|
55
|
+
- Schemas/fields: ...
|
|
56
|
+
- Parameters: ...
|
|
57
|
+
|
|
58
|
+
### Impact Classification
|
|
59
|
+
[BREAKING|POTENTIALLY BREAKING|COMPATIBLE] {change}
|
|
60
|
+
- Why: ...
|
|
61
|
+
- Affected clients: ...
|
|
62
|
+
- Required action: ...
|
|
63
|
+
|
|
64
|
+
### Versioning and Deprecation
|
|
65
|
+
- Version policy status: ...
|
|
66
|
+
- Deprecation policy status: ...
|
|
67
|
+
- Migration notes present: Yes | No
|
|
68
|
+
|
|
69
|
+
### Release Recommendation
|
|
70
|
+
Pass | Conditional | Block
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Guardrails
|
|
74
|
+
|
|
75
|
+
- Do not approve contract-breaking changes without explicit versioning/migration plan
|
|
76
|
+
- Treat silent required-field additions as breaking unless proven otherwise
|
|
77
|
+
- Do not rely on undocumented behavior as compatibility evidence
|
|
78
|
+
- Hand off auth/access-control risks to `security-reviewer`
|
|
79
|
+
- Hand off architecture-wide API redesign to `architect`
|