agents-templated 2.2.0 → 2.2.1
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 +9 -9
- package/bin/cli.js +9 -9
- package/index.js +12 -1
- package/lib/instructions.js +20 -6
- package/lib/layout.js +3 -2
- package/package.json +1 -1
- package/templates/{agents/subagents → .claude/agents}/README.md +2 -2
- package/templates/.cursorrules +2 -5
- package/templates/CLAUDE.md +10 -10
- package/templates/README.md +3 -3
- package/templates/agent-docs/ARCHITECTURE.md +3 -3
- package/templates/agent-docs/README.md +12 -13
- package/templates/agents/skills/README.md +6 -6
- package/templates/instructions/source/core.md +0 -219
- /package/templates/{agents/subagents → .claude/agents}/architect.md +0 -0
- /package/templates/{agents/subagents → .claude/agents}/build-error-resolver.md +0 -0
- /package/templates/{agents/subagents → .claude/agents}/code-reviewer.md +0 -0
- /package/templates/{agents/subagents → .claude/agents}/doc-updater.md +0 -0
- /package/templates/{agents/subagents → .claude/agents}/e2e-runner.md +0 -0
- /package/templates/{agents/subagents → .claude/agents}/planner.md +0 -0
- /package/templates/{agents/subagents → .claude/agents}/refactor-cleaner.md +0 -0
- /package/templates/{agents/subagents → .claude/agents}/security-reviewer.md +0 -0
- /package/templates/{agents/subagents → .claude/agents}/tdd-guide.md +0 -0
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/agents-templated)
|
|
4
4
|
[](https://www.npmjs.com/package/agents-templated)
|
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
|
-
[](https://github.com/rickandrew2/agents-templated)
|
|
7
7
|
|
|
8
8
|
> **Agents Templated** is a CLI tool and npm package that instantly scaffolds production-ready project structures with enterprise-grade development patterns, security guidelines, and AI assistant configurations. Designed for developers who want to start projects the right way—with proven OWASP security practices, comprehensive testing strategies (80/15/5 coverage targets), and agent-based architecture patterns—without being locked into specific frameworks. It generates unified configuration files that work seamlessly with Cursor, GitHub Copilot, Claude, and Google Gemini, allowing AI assistants to automatically follow best practices from day one. Whether you're building a Next.js app, Django API, Go microservice, or any custom stack, Agents Templated provides the guardrails and patterns you need while giving you complete freedom to choose your technology.
|
|
9
9
|
|
|
@@ -28,13 +28,13 @@ Agents Templated scaffolds your project with:
|
|
|
28
28
|
- Deterministic slash-command standard in `AGENTS.MD` and modular contracts in `agents/commands/`
|
|
29
29
|
- Implicit natural-language routing support (`slash-command-auto`) for non-technical prompts
|
|
30
30
|
- New workflow/routing/hardening rule set:
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
31
|
+
- `.github/instructions/rules/intent-routing.mdc`
|
|
32
|
+
- `.github/instructions/rules/system-workflow.mdc`
|
|
33
|
+
- `.github/instructions/rules/hardening.mdc`
|
|
34
34
|
- New baseline skills:
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
35
|
+
- `.github/skills/feature-delivery/`
|
|
36
|
+
- `.github/skills/bug-triage/`
|
|
37
|
+
- `.github/skills/app-hardening/`
|
|
38
38
|
- Release and audit contracts now require hardening evidence when risk profile requires it
|
|
39
39
|
|
|
40
40
|
---
|
|
@@ -124,7 +124,7 @@ Agents Templated automatically configures compatible wrappers for major AI codin
|
|
|
124
124
|
| **Claude** | `CLAUDE.md` | ✅ Compatible |
|
|
125
125
|
| **Generic agents** | `AGENTS.MD` | ✅ Compatible |
|
|
126
126
|
|
|
127
|
-
**Single source of truth:** `
|
|
127
|
+
**Single source of truth:** `CLAUDE.md` drives generated tool-compatible instruction files.
|
|
128
128
|
|
|
129
129
|
---
|
|
130
130
|
|
|
@@ -421,7 +421,7 @@ await agentsTemplated.install('./my-project', {
|
|
|
421
421
|
|
|
422
422
|
When contributing to this template:
|
|
423
423
|
1. Maintain technology-agnostic patterns
|
|
424
|
-
2. Update relevant rule files in
|
|
424
|
+
2. Update relevant rule files in `.github/instructions/rules/`
|
|
425
425
|
3. Keep documentation synchronized with code changes
|
|
426
426
|
4. Follow security and testing patterns
|
|
427
427
|
5. Ensure AI assistant configurations remain compatible
|
package/bin/cli.js
CHANGED
|
@@ -125,7 +125,7 @@ program
|
|
|
125
125
|
{ name: 'Agent rules (.github/instructions/rules/*.mdc)', value: 'rules' },
|
|
126
126
|
{ name: 'Skills (.github/skills/*)', value: 'skills' },
|
|
127
127
|
{ name: 'AI Agent instructions (Cursor, Copilot, Claude, Generic AGENTS)', value: 'github' },
|
|
128
|
-
{ name: 'Agent subagents (agents
|
|
128
|
+
{ name: 'Agent subagents (.claude/agents/*.md)', value: 'subagents' }
|
|
129
129
|
],
|
|
130
130
|
default: ['all']
|
|
131
131
|
},
|
|
@@ -190,6 +190,7 @@ program
|
|
|
190
190
|
await writeGeneratedInstructions(targetDir, templateDir, options.force);
|
|
191
191
|
console.log(chalk.gray(' ✓ Claude (CLAUDE.md — canonical source)'));
|
|
192
192
|
console.log(chalk.gray(' ✓ GitHub Copilot (.github/copilot-instructions.md pointer)'));
|
|
193
|
+
console.log(chalk.gray(' ✓ Cursor (.cursorrules pointer)'));
|
|
193
194
|
console.log(chalk.gray(' ✓ Generic AGENTS (AGENTS.MD pointer)'));
|
|
194
195
|
}
|
|
195
196
|
|
|
@@ -198,7 +199,7 @@ program
|
|
|
198
199
|
console.log(chalk.yellow('Installing agent subagents...'));
|
|
199
200
|
await fs.ensureDir(path.join(targetDir, LAYOUT.canonical.subagentsDir));
|
|
200
201
|
await copyDirectory(
|
|
201
|
-
path.join(templateDir, '
|
|
202
|
+
path.join(templateDir, '.claude', 'agents'),
|
|
202
203
|
path.join(targetDir, LAYOUT.canonical.subagentsDir),
|
|
203
204
|
options.force
|
|
204
205
|
);
|
|
@@ -257,7 +258,7 @@ program
|
|
|
257
258
|
{ name: 'Agent Rules (security, testing, database, etc.)', value: 'rules' },
|
|
258
259
|
{ name: 'Skills (reusable agent capabilities)', value: 'skills' },
|
|
259
260
|
{ name: 'AI Agent instructions (Cursor, Copilot, Claude, Generic AGENTS)', value: 'github' },
|
|
260
|
-
{ name: 'Agent subagents (agents
|
|
261
|
+
{ name: 'Agent subagents (.claude/agents/*.md)', value: 'subagents' }
|
|
261
262
|
],
|
|
262
263
|
validate: (answer) => {
|
|
263
264
|
if (answer.length === 0) {
|
|
@@ -294,7 +295,7 @@ program
|
|
|
294
295
|
{ name: 'Agent Rules (security, testing, database, etc.)', value: 'rules', checked: true },
|
|
295
296
|
{ name: 'Skills (reusable agent capabilities)', value: 'skills', checked: true },
|
|
296
297
|
{ name: 'AI Agent instructions (Cursor, Copilot, Claude, Generic AGENTS)', value: 'github', checked: true },
|
|
297
|
-
{ name: 'Agent subagents (agents
|
|
298
|
+
{ name: 'Agent subagents (.claude/agents/*.md)', value: 'subagents', checked: true }
|
|
298
299
|
],
|
|
299
300
|
validate: (answer) => {
|
|
300
301
|
if (answer.length === 0) {
|
|
@@ -369,7 +370,7 @@ program
|
|
|
369
370
|
console.log(chalk.yellow('Installing agent subagents...'));
|
|
370
371
|
await fs.ensureDir(path.join(targetDir, LAYOUT.canonical.subagentsDir));
|
|
371
372
|
await copyDirectory(
|
|
372
|
-
path.join(templateDir, '
|
|
373
|
+
path.join(templateDir, '.claude', 'agents'),
|
|
373
374
|
path.join(targetDir, LAYOUT.canonical.subagentsDir),
|
|
374
375
|
options.force
|
|
375
376
|
);
|
|
@@ -405,7 +406,7 @@ program
|
|
|
405
406
|
console.log(chalk.yellow('rules') + ' - Agent rules (.github/instructions/rules/*.mdc)');
|
|
406
407
|
console.log(chalk.yellow('skills') + ' - Agent skills (.github/skills/*)');
|
|
407
408
|
console.log(chalk.yellow('github') + ' - AI Agent instructions (Cursor, Copilot, Claude, Generic AGENTS)');
|
|
408
|
-
console.log(chalk.yellow('subagents') + ' - Agent subagents (agents
|
|
409
|
+
console.log(chalk.yellow('subagents') + ' - Agent subagents (.claude/agents/*.md)');
|
|
409
410
|
console.log(chalk.yellow('all') + ' - All components');
|
|
410
411
|
|
|
411
412
|
console.log(chalk.blue.bold('\n\nAvailable Presets:\n'));
|
|
@@ -653,7 +654,6 @@ async function cleanupLegacyInstructionFiles(targetDir) {
|
|
|
653
654
|
// Files removed in v2.0.0: orphaned wrappers that contained duplicated policy
|
|
654
655
|
// content and were not managed/validated by the generator.
|
|
655
656
|
const legacyFiles = [
|
|
656
|
-
'.cursorrules',
|
|
657
657
|
'.github/instructions/AGENTS.md',
|
|
658
658
|
// Pre-v1.2.13 paths
|
|
659
659
|
'.claude/CLAUDE.md'
|
|
@@ -714,7 +714,7 @@ async function updateSelectedComponents(targetDir, templateDir, selectedComponen
|
|
|
714
714
|
console.log(chalk.yellow('Updating agent subagents...'));
|
|
715
715
|
await fs.ensureDir(path.join(targetDir, LAYOUT.canonical.subagentsDir));
|
|
716
716
|
await copyDirectory(
|
|
717
|
-
path.join(templateDir, '
|
|
717
|
+
path.join(templateDir, '.claude', 'agents'),
|
|
718
718
|
path.join(targetDir, LAYOUT.canonical.subagentsDir),
|
|
719
719
|
overwrite
|
|
720
720
|
);
|
|
@@ -1031,7 +1031,7 @@ program
|
|
|
1031
1031
|
|
|
1032
1032
|
program
|
|
1033
1033
|
.command('new-subagent <name>')
|
|
1034
|
-
.description('Scaffold a new subagent in agents
|
|
1034
|
+
.description('Scaffold a new subagent in .claude/agents/<name>.md')
|
|
1035
1035
|
.action(async (name) => {
|
|
1036
1036
|
try {
|
|
1037
1037
|
const targetDir = process.cwd();
|
package/index.js
CHANGED
|
@@ -16,12 +16,13 @@ const { CANONICAL_INSTRUCTION_FILE, writeGeneratedInstructions } = require('./li
|
|
|
16
16
|
* @param {boolean} options.rules - Install agent rules
|
|
17
17
|
* @param {boolean} options.skills - Install skills
|
|
18
18
|
* @param {boolean} options.github - Install GitHub Copilot instructions
|
|
19
|
+
* @param {boolean} options.subagents - Install agent subagents
|
|
19
20
|
* @param {boolean} options.force - Overwrite existing files
|
|
20
21
|
* @returns {Promise<void>}
|
|
21
22
|
*/
|
|
22
23
|
async function install(targetDir, options = {}) {
|
|
23
24
|
const templateDir = path.join(__dirname, 'templates');
|
|
24
|
-
const installAll = !options.docs && !options.rules && !options.skills && !options.github;
|
|
25
|
+
const installAll = !options.docs && !options.rules && !options.skills && !options.github && !options.subagents;
|
|
25
26
|
|
|
26
27
|
const files = [];
|
|
27
28
|
|
|
@@ -73,6 +74,16 @@ async function install(targetDir, options = {}) {
|
|
|
73
74
|
await fs.ensureDir(path.join(targetDir, '.github', 'instructions'));
|
|
74
75
|
await writeGeneratedInstructions(targetDir, templateDir, options.force);
|
|
75
76
|
}
|
|
77
|
+
|
|
78
|
+
// Agent subagents (.claude/agents/)
|
|
79
|
+
if (installAll || options.subagents) {
|
|
80
|
+
await fs.ensureDir(path.join(targetDir, '.claude', 'agents'));
|
|
81
|
+
await copyDirectory(
|
|
82
|
+
path.join(templateDir, '.claude', 'agents'),
|
|
83
|
+
path.join(targetDir, '.claude', 'agents'),
|
|
84
|
+
options.force
|
|
85
|
+
);
|
|
86
|
+
}
|
|
76
87
|
}
|
|
77
88
|
|
|
78
89
|
async function copyDirectory(sourceDir, targetDir, force = false) {
|
package/lib/instructions.js
CHANGED
|
@@ -7,7 +7,8 @@ const CANONICAL_INSTRUCTION_FILE = 'CLAUDE.md';
|
|
|
7
7
|
// Thin compatibility pointer files — policy lives in CLAUDE.md, not here.
|
|
8
8
|
const POINTER_FILES = {
|
|
9
9
|
agents: 'AGENTS.MD',
|
|
10
|
-
copilot: '.github/copilot-instructions.md'
|
|
10
|
+
copilot: '.github/copilot-instructions.md',
|
|
11
|
+
cursor: '.cursorrules'
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
function buildAgentsPointer() {
|
|
@@ -31,6 +32,17 @@ function buildCopilotPointer() {
|
|
|
31
32
|
].join('\n');
|
|
32
33
|
}
|
|
33
34
|
|
|
35
|
+
function buildCursorPointer() {
|
|
36
|
+
return [
|
|
37
|
+
'<!-- Tool profile: cursor-compat -->',
|
|
38
|
+
'# Cursor Rules',
|
|
39
|
+
'',
|
|
40
|
+
'Primary policy source: `CLAUDE.md`.',
|
|
41
|
+
'Load policy only from the canonical source file above.',
|
|
42
|
+
'If this file and CLAUDE.md conflict, CLAUDE.md wins.'
|
|
43
|
+
].join('\n');
|
|
44
|
+
}
|
|
45
|
+
|
|
34
46
|
async function writeGeneratedInstructions(targetDir, templateDir, force = false) {
|
|
35
47
|
// Copy CLAUDE.md from template if not present (or forced)
|
|
36
48
|
const targetClaude = path.join(targetDir, CANONICAL_INSTRUCTION_FILE);
|
|
@@ -42,7 +54,8 @@ async function writeGeneratedInstructions(targetDir, templateDir, force = false)
|
|
|
42
54
|
// Write thin pointer files
|
|
43
55
|
const pointers = {
|
|
44
56
|
[POINTER_FILES.agents]: buildAgentsPointer(),
|
|
45
|
-
[POINTER_FILES.copilot]: buildCopilotPointer()
|
|
57
|
+
[POINTER_FILES.copilot]: buildCopilotPointer(),
|
|
58
|
+
[POINTER_FILES.cursor]: buildCursorPointer()
|
|
46
59
|
};
|
|
47
60
|
|
|
48
61
|
for (const [relPath, content] of Object.entries(pointers)) {
|
|
@@ -63,7 +76,8 @@ async function validateInstructionDrift(targetDir) {
|
|
|
63
76
|
const driftFiles = [];
|
|
64
77
|
const expectedPointers = {
|
|
65
78
|
[POINTER_FILES.agents]: buildAgentsPointer(),
|
|
66
|
-
[POINTER_FILES.copilot]: buildCopilotPointer()
|
|
79
|
+
[POINTER_FILES.copilot]: buildCopilotPointer(),
|
|
80
|
+
[POINTER_FILES.cursor]: buildCursorPointer()
|
|
67
81
|
};
|
|
68
82
|
|
|
69
83
|
for (const [relPath, expectedContent] of Object.entries(expectedPointers)) {
|
|
@@ -158,10 +172,10 @@ async function scaffoldRule(targetDir, ruleName) {
|
|
|
158
172
|
}
|
|
159
173
|
|
|
160
174
|
async function scaffoldSubagent(targetDir, name) {
|
|
161
|
-
const subagentFile = path.join(targetDir, '
|
|
175
|
+
const subagentFile = path.join(targetDir, '.claude', 'agents', `${name}.md`);
|
|
162
176
|
|
|
163
177
|
if (await fs.pathExists(subagentFile)) {
|
|
164
|
-
throw new Error(`Subagent already exists: agents
|
|
178
|
+
throw new Error(`Subagent already exists: .claude/agents/${name}.md`);
|
|
165
179
|
}
|
|
166
180
|
|
|
167
181
|
const title = name.split('-').map(w => w[0].toUpperCase() + w.slice(1)).join(' ');
|
|
@@ -195,7 +209,7 @@ async function scaffoldSubagent(targetDir, name) {
|
|
|
195
209
|
|
|
196
210
|
await fs.ensureDir(path.dirname(subagentFile));
|
|
197
211
|
await fs.writeFile(subagentFile, content, 'utf8');
|
|
198
|
-
return
|
|
212
|
+
return `.claude/agents/${name}.md`;
|
|
199
213
|
}
|
|
200
214
|
|
|
201
215
|
module.exports = {
|
package/lib/layout.js
CHANGED
|
@@ -6,7 +6,7 @@ const LAYOUT = {
|
|
|
6
6
|
docsDir: 'agent-docs',
|
|
7
7
|
rulesDir: '.github/instructions/rules',
|
|
8
8
|
skillsDir: '.github/skills',
|
|
9
|
-
subagentsDir: 'agents
|
|
9
|
+
subagentsDir: '.claude/agents'
|
|
10
10
|
},
|
|
11
11
|
legacy: {
|
|
12
12
|
rulesDirs: ['agents/rules'],
|
|
@@ -41,7 +41,7 @@ function resolveSkillsDir(baseDir) {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
function resolveSubagentsDir(baseDir) {
|
|
44
|
-
const candidates = [LAYOUT.canonical.subagentsDir];
|
|
44
|
+
const candidates = [LAYOUT.canonical.subagentsDir, 'agents/subagents'];
|
|
45
45
|
return firstExistingPath(baseDir, candidates) || LAYOUT.canonical.subagentsDir;
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -50,6 +50,7 @@ async function hasAnyLayout(baseDir) {
|
|
|
50
50
|
path.join(baseDir, LAYOUT.canonical.rulesDir),
|
|
51
51
|
path.join(baseDir, LAYOUT.canonical.skillsDir),
|
|
52
52
|
path.join(baseDir, LAYOUT.canonical.subagentsDir),
|
|
53
|
+
path.join(baseDir, 'agents', 'subagents'),
|
|
53
54
|
...LAYOUT.compatible.rulesDirs.map((relPath) => path.join(baseDir, relPath)),
|
|
54
55
|
...LAYOUT.compatible.skillsDirs.map((relPath) => path.join(baseDir, relPath)),
|
|
55
56
|
...LAYOUT.legacy.rulesDirs.map((relPath) => path.join(baseDir, relPath)),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agents-templated",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
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": {
|
|
@@ -41,12 +41,12 @@ Subagents are invoked automatically based on `description` matching, or explicit
|
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
### Other tools (Copilot, Cursor, Windsurf)
|
|
44
|
-
Reference the subagent file directly in your prompt or instruct your AI to follow the workflow defined in
|
|
44
|
+
Reference the subagent file directly in your prompt or instruct your AI to follow the workflow defined in `.claude/agents/<name>.md`.
|
|
45
45
|
|
|
46
46
|
## File Structure
|
|
47
47
|
|
|
48
48
|
```
|
|
49
|
-
agents/
|
|
49
|
+
.claude/agents/
|
|
50
50
|
├── README.md ← This file
|
|
51
51
|
├── planner.md
|
|
52
52
|
├── architect.md
|
package/templates/.cursorrules
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
<!-- GENERATED FILE - DO NOT EDIT DIRECTLY -->
|
|
2
|
-
<!-- Source of truth: instructions/source/core.md -->
|
|
3
1
|
<!-- Tool profile: cursor-compat -->
|
|
4
2
|
# Cursor Rules
|
|
5
3
|
|
|
6
|
-
Primary policy source: `
|
|
4
|
+
Primary policy source: `CLAUDE.md`.
|
|
7
5
|
Load policy only from the canonical source file above.
|
|
8
|
-
|
|
9
|
-
If this file and the canonical source conflict, the canonical source wins.
|
|
6
|
+
If this file and CLAUDE.md conflict, CLAUDE.md wins.
|
package/templates/CLAUDE.md
CHANGED
|
@@ -39,19 +39,19 @@ All policy, routing, and skill governance lives here — edit this file directly
|
|
|
39
39
|
|
|
40
40
|
Skills add capability only. They must not override security, testing, or core constraints.
|
|
41
41
|
|
|
42
|
-
### Subagent modules (
|
|
42
|
+
### Subagent modules (`.claude/agents/`)
|
|
43
43
|
|
|
44
44
|
| Subagent | Path | Invoke when... |
|
|
45
45
|
|----------|------|----------------|
|
|
46
|
-
| planner |
|
|
47
|
-
| architect |
|
|
48
|
-
| tdd-guide |
|
|
49
|
-
| code-reviewer |
|
|
50
|
-
| security-reviewer |
|
|
51
|
-
| build-error-resolver |
|
|
52
|
-
| e2e-runner |
|
|
53
|
-
| refactor-cleaner |
|
|
54
|
-
| doc-updater |
|
|
46
|
+
| planner | `.claude/agents/planner.md` | Breaking down features into phased plans |
|
|
47
|
+
| architect | `.claude/agents/architect.md` | System design decisions, ADRs, trade-off analysis |
|
|
48
|
+
| tdd-guide | `.claude/agents/tdd-guide.md` | Writing tests before implementation |
|
|
49
|
+
| code-reviewer | `.claude/agents/code-reviewer.md` | Reviewing code for quality and correctness |
|
|
50
|
+
| security-reviewer | `.claude/agents/security-reviewer.md` | Scanning for security vulnerabilities |
|
|
51
|
+
| build-error-resolver | `.claude/agents/build-error-resolver.md` | Fixing build and type errors |
|
|
52
|
+
| e2e-runner | `.claude/agents/e2e-runner.md` | Running Playwright E2E test suites |
|
|
53
|
+
| refactor-cleaner | `.claude/agents/refactor-cleaner.md` | Removing dead code and unused dependencies |
|
|
54
|
+
| doc-updater | `.claude/agents/doc-updater.md` | Syncing docs and READMEs after code changes |
|
|
55
55
|
|
|
56
56
|
Subagents are bounded agents with limited tool access. They inherit all policy from this file and may not override security, testing, or core constraints.
|
|
57
57
|
|
package/templates/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/agents-templated)
|
|
4
4
|
[](https://www.npmjs.com/package/agents-templated)
|
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
|
-
[](https://github.com/rickandrew2/agents-templated)
|
|
7
7
|
|
|
8
8
|
> **Agents Templated** is a CLI tool and npm package that instantly scaffolds production-ready project structures with enterprise-grade development patterns, security guidelines, and AI assistant configurations. Designed for developers who want to start projects the right way—with proven OWASP security practices, comprehensive testing strategies (80/15/5 coverage targets), and agent-based architecture patterns—without being locked into specific frameworks. It generates unified configuration files that work seamlessly with Cursor, GitHub Copilot, Claude, and Google Gemini, allowing AI assistants to automatically follow best practices from day one. Whether you're building a Next.js app, Django API, Go microservice, or any custom stack, Agents Templated provides the guardrails and patterns you need while giving you complete freedom to choose your technology.
|
|
9
9
|
|
|
@@ -105,7 +105,7 @@ Agents Templated automatically configures compatible wrappers for major AI codin
|
|
|
105
105
|
| **Claude** | `CLAUDE.md` | ✅ Compatible |
|
|
106
106
|
| **Generic agents** | `AGENTS.MD` | ✅ Compatible |
|
|
107
107
|
|
|
108
|
-
**Single source of truth:** `
|
|
108
|
+
**Single source of truth:** `CLAUDE.md` drives generated tool-compatible instruction files.
|
|
109
109
|
|
|
110
110
|
---
|
|
111
111
|
|
|
@@ -395,7 +395,7 @@ await agentsTemplated.install('./my-project', {
|
|
|
395
395
|
|
|
396
396
|
When contributing to this template:
|
|
397
397
|
1. Maintain technology-agnostic patterns
|
|
398
|
-
2. Update relevant rule files in
|
|
398
|
+
2. Update relevant rule files in `.github/instructions/rules/`
|
|
399
399
|
3. Keep documentation synchronized with code changes
|
|
400
400
|
4. Follow security and testing patterns
|
|
401
401
|
5. Ensure AI assistant configurations remain compatible
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
This is a **technology-agnostic development template** with enterprise-grade patterns for security, testing, and developer experience.
|
|
4
4
|
These guidelines are for both humans and AI assistants working with any technology stack.
|
|
5
5
|
|
|
6
|
-
- Canonical AI policy source lives in `
|
|
6
|
+
- Canonical AI policy source lives in `CLAUDE.md`.
|
|
7
7
|
- **Agent responsibilities** and MCP integration are documented in `AGENTS.MD`.
|
|
8
8
|
- **Detailed implementation rules** live in `.github/instructions/rules/*.mdc` files.
|
|
9
9
|
- **Custom skills** for domain-specific tasks are organized in `.github/skills/` (see [Skills Guide](../.github/skills/README.md)).
|
|
@@ -224,8 +224,8 @@ Review the options above and select technologies that fit your:
|
|
|
224
224
|
|
|
225
225
|
### 2. Adapt the Template
|
|
226
226
|
- Update `.github/instructions/rules/*.mdc` files with technology-specific patterns
|
|
227
|
-
- Keep `.cursorrules`, `.github/copilot-instructions.md`, `AGENTS.MD`, and `CLAUDE.md` as minimal wrappers that point to `
|
|
228
|
-
- Update `
|
|
227
|
+
- Keep `.cursorrules`, `.github/copilot-instructions.md`, `AGENTS.MD`, and `CLAUDE.md` as minimal wrappers that point to `CLAUDE.md`
|
|
228
|
+
- Update `CLAUDE.md` with stack-specific guidelines
|
|
229
229
|
- Create appropriate configuration files for your chosen tools
|
|
230
230
|
|
|
231
231
|
### 3. Implement Core Patterns
|
|
@@ -6,12 +6,11 @@ This template has been installed by the agents-templated npm package.
|
|
|
6
6
|
|
|
7
7
|
Depending on what you installed, you may have:
|
|
8
8
|
|
|
9
|
-
- **AGENTS.MD**:
|
|
9
|
+
- **AGENTS.MD**: Generic compatibility wrapper for AI assistants
|
|
10
10
|
- **ARCHITECTURE.md**: Project guidelines and architecture
|
|
11
|
-
- **
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
- **instructions/source/core.md**: Canonical policy source (single source of truth)
|
|
11
|
+
- **CLAUDE.md**: Canonical policy source (single source of truth)
|
|
12
|
+
- **.github/instructions/rules/**: Rule modules (`*.mdc`)
|
|
13
|
+
- **.github/skills/**: Skill modules (`*/SKILL.md`)
|
|
15
14
|
- **CLAUDE.md**: Claude compatibility wrapper
|
|
16
15
|
- **.github/copilot-instructions.md**: GitHub Copilot compatibility wrapper
|
|
17
16
|
- **.cursorrules**: Cursor compatibility wrapper
|
|
@@ -36,8 +35,8 @@ agents-templated list
|
|
|
36
35
|
|
|
37
36
|
## Rules and Skills
|
|
38
37
|
|
|
39
|
-
- **Rules** (
|
|
40
|
-
- **Skills** (
|
|
38
|
+
- **Rules** (`.github/instructions/rules/*.mdc`): Define *how to behave* - patterns, principles, and standards for your team
|
|
39
|
+
- **Skills** (`.github/skills/*/SKILL.md`): Define *how to execute specific tasks* - domain-specific workflows and specialized knowledge
|
|
41
40
|
|
|
42
41
|
### Using Skills in Your AI Assistants
|
|
43
42
|
|
|
@@ -45,31 +44,31 @@ Skills can be referenced in all AI configuration files:
|
|
|
45
44
|
|
|
46
45
|
**In `.cursorrules` (Cursor IDE):**
|
|
47
46
|
```
|
|
48
|
-
When the user asks about [domain], use the [skill-name] skill from
|
|
47
|
+
When the user asks about [domain], use the [skill-name] skill from .github/skills/[skill-name]/SKILL.md
|
|
49
48
|
```
|
|
50
49
|
|
|
51
50
|
**In `CLAUDE.md` (Claude):**
|
|
52
51
|
```
|
|
53
52
|
|
|
54
|
-
When working on [domain-specific task], reference the [skill-name] skill in
|
|
53
|
+
When working on [domain-specific task], reference the [skill-name] skill in .github/skills/[skill-name]/SKILL.md
|
|
55
54
|
```
|
|
56
55
|
|
|
57
56
|
**In `.github/copilot-instructions.md` (GitHub Copilot):**
|
|
58
57
|
```
|
|
59
|
-
When helping with [domain-specific task], reference the [skill-name] skill from
|
|
58
|
+
When helping with [domain-specific task], reference the [skill-name] skill from .github/skills/[skill-name]/SKILL.md
|
|
60
59
|
```
|
|
61
60
|
|
|
62
|
-
All wrappers point to `
|
|
61
|
+
All wrappers point to `CLAUDE.md`, and skills can be referenced from any assistant through that canonical policy. Create custom skills in `.github/skills/` to extend capabilities across your entire team.
|
|
63
62
|
|
|
64
63
|
## Getting Started
|
|
65
64
|
|
|
66
65
|
1. Review AGENTS.MD for AI assistance guidance
|
|
67
66
|
2. Review ARCHITECTURE.md for overall project guidelines
|
|
68
67
|
3. Adapt the rules to your specific technology stack
|
|
69
|
-
4. Create custom skills in
|
|
68
|
+
4. Create custom skills in `.github/skills/` for your domain
|
|
70
69
|
5. Configure your AI assistants (Cursor, Copilot, Claude, generic agents) to reference your skills
|
|
71
70
|
|
|
72
71
|
## Documentation
|
|
73
72
|
|
|
74
|
-
For full documentation, visit: https://github.com/rickandrew2/agents-
|
|
73
|
+
For full documentation, visit: https://github.com/rickandrew2/agents-templated
|
|
75
74
|
|
|
@@ -34,7 +34,7 @@ To create a new skill for your specific domain:
|
|
|
34
34
|
|
|
35
35
|
1. **Create a new folder** in this directory:
|
|
36
36
|
```
|
|
37
|
-
|
|
37
|
+
.github/skills/my-custom-skill/
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
2. **Create a SKILL.md file** with metadata and instructions:
|
|
@@ -54,7 +54,7 @@ To create a new skill for your specific domain:
|
|
|
54
54
|
### Skill Structure
|
|
55
55
|
|
|
56
56
|
```
|
|
57
|
-
|
|
57
|
+
.github/skills/
|
|
58
58
|
├── find-skills/
|
|
59
59
|
│ └── SKILL.md # Meta-skill for discovering skills
|
|
60
60
|
├── feature-delivery/
|
|
@@ -104,24 +104,24 @@ Skills can be referenced in all your AI assistant configuration files:
|
|
|
104
104
|
|
|
105
105
|
### Cursor IDE (`.cursorrules`)
|
|
106
106
|
```
|
|
107
|
-
When the user asks about [domain], use the [skill-name] skill from
|
|
107
|
+
When the user asks about [domain], use the [skill-name] skill from .github/skills/[skill-name]/SKILL.md
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
### Claude (`CLAUDE.md`)
|
|
111
111
|
```markdown
|
|
112
112
|
## When Working on [Domain]
|
|
113
113
|
|
|
114
|
-
Reference the [skill-name] skill in
|
|
114
|
+
Reference the [skill-name] skill in `.github/skills/[skill-name]/SKILL.md` for patterns and guidance.
|
|
115
115
|
```
|
|
116
116
|
|
|
117
117
|
### GitHub Copilot (`.github/copilot-instructions.md`)
|
|
118
118
|
```markdown
|
|
119
|
-
When helping with [domain-specific task], reference the [skill-name] skill from
|
|
119
|
+
When helping with [domain-specific task], reference the [skill-name] skill from `.github/skills/[skill-name]/SKILL.md`
|
|
120
120
|
```
|
|
121
121
|
|
|
122
122
|
### Documentation (`AGENTS.MD`)
|
|
123
123
|
```markdown
|
|
124
|
-
- When working with [domain], see the [skill-name] skill in
|
|
124
|
+
- When working with [domain], see the [skill-name] skill in `.github/skills/[skill-name]/SKILL.md`
|
|
125
125
|
```
|
|
126
126
|
|
|
127
127
|
**All AI assistants support skill references.** Keep your team aligned by linking to skill files across your configuration files.
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
# Core AI Development Contract (Canonical Source)
|
|
2
|
-
|
|
3
|
-
This file is the single canonical instruction source for all AI agents in this repository.
|
|
4
|
-
|
|
5
|
-
All other instruction files (CLAUDE.md, AGENTS.MD, .github/copilot-instructions.md, .cursorrules, etc.)
|
|
6
|
-
must act only as thin wrappers that reference this file.
|
|
7
|
-
|
|
8
|
-
Do NOT duplicate policy content outside this file.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Reference Index
|
|
13
|
-
|
|
14
|
-
### Rule Modules — `.github/instructions/rules/`
|
|
15
|
-
|
|
16
|
-
| Module | File | Governs |
|
|
17
|
-
|--------|------|---------|
|
|
18
|
-
| Security | `.github/instructions/rules/security.mdc` | Input validation, authz/authn, secrets, rate limiting |
|
|
19
|
-
| Testing | `.github/instructions/rules/testing.mdc` | Test strategy, coverage targets, test discipline |
|
|
20
|
-
| Core | `.github/instructions/rules/core.mdc` | Type safety, runtime boundaries, error modeling |
|
|
21
|
-
| Database | `.github/instructions/rules/database.mdc` | ORM patterns, migrations, query safety |
|
|
22
|
-
| Frontend | `.github/instructions/rules/frontend.mdc` | Accessibility, responsiveness, client-side trust |
|
|
23
|
-
| Style | `.github/instructions/rules/style.mdc` | Naming, modularity, separation of concerns |
|
|
24
|
-
| System Workflow | `.github/instructions/rules/system-workflow.mdc` | Branch strategy, PR structure, review gates |
|
|
25
|
-
| Workflows | `.github/instructions/rules/workflows.mdc` | Automation, CI/CD, deployment gates |
|
|
26
|
-
| Hardening | `.github/instructions/rules/hardening.mdc` | Threat modeling, audit mode, dependency review |
|
|
27
|
-
| Intent Routing | `.github/instructions/rules/intent-routing.mdc` | Deterministic task-to-rule mapping |
|
|
28
|
-
|
|
29
|
-
### Skill Modules — `.github/skills/`
|
|
30
|
-
|
|
31
|
-
| Skill | Path | Activate when... |
|
|
32
|
-
|-------|------|------------------|
|
|
33
|
-
| app-hardening | `.github/skills/app-hardening/SKILL.md` | User requests hardening, anti-tamper, or integrity controls |
|
|
34
|
-
| bug-triage | `.github/skills/bug-triage/SKILL.md` | User reports something broken, failing, or crashing |
|
|
35
|
-
| feature-delivery | `.github/skills/feature-delivery/SKILL.md` | User says "build", "add", or "implement" a feature |
|
|
36
|
-
| find-skills | `.github/skills/find-skills/SKILL.md` | User asks "find a skill for X" or "is there a skill that..." |
|
|
37
|
-
| ui-ux-pro-max | `.github/skills/ui-ux-pro-max/SKILL.md` | User requests UI, design, layout, or visual work |
|
|
38
|
-
|
|
39
|
-
> Skills augment capability only. They MUST NOT override security, testing, or core constraints.
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
## System Overview
|
|
44
|
-
|
|
45
|
-
This project follows enterprise-grade, technology-agnostic development standards with:
|
|
46
|
-
|
|
47
|
-
- Security-first architecture
|
|
48
|
-
- Strong typing and runtime validation
|
|
49
|
-
- Deterministic agent delegation
|
|
50
|
-
- Structured testing strategy
|
|
51
|
-
- Accessibility and quality enforcement
|
|
52
|
-
- Modular skill-based capability extensions
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
## Always Enforce
|
|
57
|
-
|
|
58
|
-
### 1. Security-First (NON-OVERRIDABLE)
|
|
59
|
-
Reference: `.github/instructions/rules/security.mdc`
|
|
60
|
-
|
|
61
|
-
- Validate ALL external inputs at system boundaries
|
|
62
|
-
- Authenticate protected endpoints — no exceptions
|
|
63
|
-
- Authorize role-based access on every protected operation
|
|
64
|
-
- Rate limit all public APIs
|
|
65
|
-
- Never expose secrets, credentials, or PII in logs, errors, or responses
|
|
66
|
-
- Apply secure-by-default patterns throughout
|
|
67
|
-
|
|
68
|
-
No skill, command, or wrapper may downgrade or bypass these requirements.
|
|
69
|
-
|
|
70
|
-
---
|
|
71
|
-
|
|
72
|
-
### 2. Testing Discipline (NON-OVERRIDABLE)
|
|
73
|
-
Reference: `.github/instructions/rules/testing.mdc`
|
|
74
|
-
|
|
75
|
-
Target distribution:
|
|
76
|
-
- Unit: 80%
|
|
77
|
-
- Integration: 15%
|
|
78
|
-
- E2E: 5%
|
|
79
|
-
|
|
80
|
-
- Business logic MUST have tests — no exceptions
|
|
81
|
-
- Critical flows require integration coverage
|
|
82
|
-
- Never disable or remove tests to make a build pass
|
|
83
|
-
- Avoid untested edge cases
|
|
84
|
-
|
|
85
|
-
No skill, command, or wrapper may downgrade or bypass these requirements.
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
### 3. Type Safety & Boundaries
|
|
90
|
-
Reference: `.github/instructions/rules/core.mdc`
|
|
91
|
-
|
|
92
|
-
- Strong typing internally
|
|
93
|
-
- Runtime validation at all system boundaries
|
|
94
|
-
- Explicit error modeling
|
|
95
|
-
- Deterministic control flow
|
|
96
|
-
|
|
97
|
-
---
|
|
98
|
-
|
|
99
|
-
### 4. Database Integrity
|
|
100
|
-
Reference: `.github/instructions/rules/database.mdc`
|
|
101
|
-
|
|
102
|
-
- Use ORM/ODM patterns
|
|
103
|
-
- Avoid raw queries unless justified
|
|
104
|
-
- Enforce constraints at DB level
|
|
105
|
-
- Prevent N+1 queries
|
|
106
|
-
- Migrations must be reversible
|
|
107
|
-
|
|
108
|
-
---
|
|
109
|
-
|
|
110
|
-
### 5. Frontend Standards
|
|
111
|
-
Reference: `.github/instructions/rules/frontend.mdc`
|
|
112
|
-
|
|
113
|
-
- WCAG 2.1 AA compliance
|
|
114
|
-
- Responsive by default
|
|
115
|
-
- Clear loading and error states
|
|
116
|
-
- No unsafe client-side trust
|
|
117
|
-
- Progressive enhancement preferred
|
|
118
|
-
|
|
119
|
-
---
|
|
120
|
-
|
|
121
|
-
### 6. Code Style & Consistency
|
|
122
|
-
Reference: `.github/instructions/rules/style.mdc`
|
|
123
|
-
|
|
124
|
-
- Consistent naming
|
|
125
|
-
- Small composable modules
|
|
126
|
-
- Clear separation of concerns
|
|
127
|
-
- Avoid magic values
|
|
128
|
-
- Explicit contracts
|
|
129
|
-
|
|
130
|
-
---
|
|
131
|
-
|
|
132
|
-
### 7. System Workflow Discipline
|
|
133
|
-
Reference: `.github/instructions/rules/system-workflow.mdc`
|
|
134
|
-
Reference: `.github/instructions/rules/workflows.mdc`
|
|
135
|
-
|
|
136
|
-
- Feature branches only
|
|
137
|
-
- No direct main edits
|
|
138
|
-
- Deterministic PR structure
|
|
139
|
-
- Enforced review gates
|
|
140
|
-
|
|
141
|
-
---
|
|
142
|
-
|
|
143
|
-
### 8. Hardening Mode
|
|
144
|
-
Reference: `.github/instructions/rules/hardening.mdc`
|
|
145
|
-
|
|
146
|
-
When in hardening or audit mode:
|
|
147
|
-
- Assume hostile input
|
|
148
|
-
- Perform threat modeling
|
|
149
|
-
- Validate configuration safety
|
|
150
|
-
- Enforce strict rate limiting
|
|
151
|
-
- Audit dependencies
|
|
152
|
-
|
|
153
|
-
---
|
|
154
|
-
|
|
155
|
-
### 9. Intent Routing
|
|
156
|
-
Reference: `.github/instructions/rules/intent-routing.mdc`
|
|
157
|
-
|
|
158
|
-
Route tasks deterministically:
|
|
159
|
-
|
|
160
|
-
- UI / Design → Frontend rules
|
|
161
|
-
- API / Logic → Security + Core rules
|
|
162
|
-
- Database → Database rules
|
|
163
|
-
- Testing → Testing rules
|
|
164
|
-
- Refactor / Cleanup → Style rules
|
|
165
|
-
- Audit / Production Readiness → Hardening rules
|
|
166
|
-
|
|
167
|
-
No ambiguous routing. Every task maps to exactly one primary rule module.
|
|
168
|
-
|
|
169
|
-
---
|
|
170
|
-
|
|
171
|
-
# Skills System
|
|
172
|
-
|
|
173
|
-
Skills extend behavior modularly. They are loaded on demand — never pre-loaded globally.
|
|
174
|
-
|
|
175
|
-
Located at: `.github/skills/`
|
|
176
|
-
|
|
177
|
-
Rules:
|
|
178
|
-
- Skills MUST NOT override security, testing, or core constraints.
|
|
179
|
-
- Skills augment capability, not policy.
|
|
180
|
-
- This file (`instructions/source/core.md`) remains authoritative over all skills.
|
|
181
|
-
- Skill activation is triggered by user intent (see Reference Index above).
|
|
182
|
-
|
|
183
|
-
---
|
|
184
|
-
|
|
185
|
-
# Deterministic Command Mode
|
|
186
|
-
|
|
187
|
-
If slash-command mode is enabled:
|
|
188
|
-
|
|
189
|
-
- Unknown commands → return structured error
|
|
190
|
-
- No conversational fallback
|
|
191
|
-
- Destructive commands require explicit confirmation token:
|
|
192
|
-
`CONFIRM-DESTRUCTIVE:<target>`
|
|
193
|
-
|
|
194
|
-
Command contracts (if applicable) must be modular and strict.
|
|
195
|
-
|
|
196
|
-
---
|
|
197
|
-
|
|
198
|
-
# Critical Non-Negotiables
|
|
199
|
-
|
|
200
|
-
- Never expose secrets
|
|
201
|
-
- Never trust client input
|
|
202
|
-
- Never bypass validation
|
|
203
|
-
- Never skip testing on business logic
|
|
204
|
-
- Never reduce security for convenience
|
|
205
|
-
- Never duplicate canonical policy outside this file
|
|
206
|
-
- Never let a skill or wrapper override security or testing rules
|
|
207
|
-
|
|
208
|
-
---
|
|
209
|
-
|
|
210
|
-
# Canonical Contract
|
|
211
|
-
|
|
212
|
-
This file (`instructions/source/core.md`) is:
|
|
213
|
-
|
|
214
|
-
- The single source of truth for all global policy
|
|
215
|
-
- The only file allowed to define routing logic, rule governance, and skill governance
|
|
216
|
-
- The authority over all wrappers, rule modules, and skill modules
|
|
217
|
-
|
|
218
|
-
All other instruction entrypoints MUST reference this file and remain minimal pointer-only files.
|
|
219
|
-
No other file may claim authority over this file.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|