agents-templated 2.2.5 → 2.2.6
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/bin/cli.js +10 -10
- package/lib/instructions.js +3 -3
- package/package.json +1 -1
- package/templates/.claude/rules/{ai-integration.mdc → ai-integration.md} +0 -6
- package/templates/.claude/rules/{core.mdc → core.md} +0 -7
- package/templates/.claude/rules/{database.mdc → database.md} +0 -7
- package/templates/.claude/rules/{frontend.mdc → frontend.md} +0 -7
- package/templates/.claude/rules/{guardrails.mdc → guardrails.md} +0 -8
- package/templates/.claude/rules/{hardening.mdc → hardening.md} +0 -6
- package/templates/.claude/rules/{intent-routing.mdc → intent-routing.md} +0 -5
- package/templates/.claude/rules/{planning.mdc → planning.md} +0 -6
- package/templates/.claude/rules/{security.mdc → security.md} +0 -8
- package/templates/.claude/rules/{style.mdc → style.md} +0 -6
- package/templates/.claude/rules/{system-workflow.mdc → system-workflow.md} +0 -6
- package/templates/.claude/rules/{testing.mdc → testing.md} +0 -8
- package/templates/.claude/rules/{workflows.mdc → workflows.md} +0 -5
- package/templates/CLAUDE.md +24 -24
- package/templates/agents/rules/{ai-integration.mdc → ai-integration.md} +0 -8
- package/templates/agents/rules/{core.mdc → core.md} +0 -7
- package/templates/agents/rules/{database.mdc → database.md} +1 -9
- package/templates/agents/rules/{frontend.mdc → frontend.md} +1 -9
- package/templates/agents/rules/{guardrails.mdc → guardrails.md} +0 -8
- package/templates/agents/rules/{hardening.mdc → hardening.md} +0 -8
- package/templates/agents/rules/{intent-routing.mdc → intent-routing.md} +0 -8
- package/templates/agents/rules/{planning.mdc → planning.md} +0 -8
- package/templates/agents/rules/{security.mdc → security.md} +1 -9
- package/templates/agents/rules/{style.mdc → style.md} +1 -9
- package/templates/agents/rules/{system-workflow.mdc → system-workflow.md} +0 -8
- package/templates/agents/rules/{testing.mdc → testing.md} +1 -9
- package/templates/agents/rules/{workflows.mdc → workflows.md} +0 -8
package/bin/cli.js
CHANGED
|
@@ -122,7 +122,7 @@ program
|
|
|
122
122
|
choices: [
|
|
123
123
|
{ name: 'All components', value: 'all' },
|
|
124
124
|
{ name: 'Documentation files (agent-docs/)', value: 'docs' },
|
|
125
|
-
{ name: 'Agent rules (.claude/rules/*.
|
|
125
|
+
{ name: 'Agent rules (.claude/rules/*.md)', value: 'rules' },
|
|
126
126
|
{ name: 'Skills (.github/skills/*)', value: 'skills' },
|
|
127
127
|
{ name: 'AI Agent instructions (Cursor, Copilot, Claude, Generic AGENTS)', value: 'github' },
|
|
128
128
|
{ name: 'Agent subagents (.claude/agents/*.md)', value: 'subagents' }
|
|
@@ -383,10 +383,10 @@ program
|
|
|
383
383
|
console.log(chalk.white(' 1. Review CLAUDE.md (canonical AI policy — edit this directly)'));
|
|
384
384
|
console.log(chalk.white(' 2. Review agent-docs/ARCHITECTURE.md for project guidelines'));
|
|
385
385
|
console.log(chalk.white(' 3. AGENTS.MD and .github/copilot-instructions.md are thin pointers to CLAUDE.md'));
|
|
386
|
-
console.log(chalk.white(' 4. Customize agents/rules/*.
|
|
386
|
+
console.log(chalk.white(' 4. Customize agents/rules/*.md for your tech stack'));
|
|
387
387
|
|
|
388
388
|
console.log(chalk.cyan('\n🔒 Security Reminder:\n'));
|
|
389
|
-
console.log(chalk.white(' • Review agents/rules/security.
|
|
389
|
+
console.log(chalk.white(' • Review agents/rules/security.md'));
|
|
390
390
|
console.log(chalk.white(' • Validate all inputs with schema validation'));
|
|
391
391
|
console.log(chalk.white(' • Implement rate limiting on public endpoints'));
|
|
392
392
|
console.log(chalk.white(' • Never expose sensitive data in errors\n'));
|
|
@@ -403,7 +403,7 @@ program
|
|
|
403
403
|
.action(() => {
|
|
404
404
|
console.log(chalk.blue.bold('\nAvailable Components:\n'));
|
|
405
405
|
console.log(chalk.yellow('docs') + ' - Documentation files (agent-docs/ directory)');
|
|
406
|
-
console.log(chalk.yellow('rules') + ' - Agent rules (.claude/rules/*.
|
|
406
|
+
console.log(chalk.yellow('rules') + ' - Agent rules (.claude/rules/*.md)');
|
|
407
407
|
console.log(chalk.yellow('skills') + ' - Agent skills (.github/skills/*)');
|
|
408
408
|
console.log(chalk.yellow('github') + ' - AI Agent instructions (Cursor, Copilot, Claude, Generic AGENTS)');
|
|
409
409
|
console.log(chalk.yellow('subagents') + ' - Agent subagents (.claude/agents/*.md)');
|
|
@@ -455,7 +455,7 @@ program
|
|
|
455
455
|
}
|
|
456
456
|
|
|
457
457
|
// Check agent rules
|
|
458
|
-
const ruleFiles = ['core.
|
|
458
|
+
const ruleFiles = ['core.md', 'security.md', 'testing.md', 'frontend.md', 'database.md', 'style.md'];
|
|
459
459
|
const canonicalRulesDir = path.join(targetDir, LAYOUT.canonical.rulesDir);
|
|
460
460
|
const legacyRulesDir = path.join(targetDir, LAYOUT.legacy.rulesDirs[0]);
|
|
461
461
|
const rulesDir = path.join(targetDir, resolveRulesDir(targetDir));
|
|
@@ -829,9 +829,9 @@ program
|
|
|
829
829
|
const checkFiles = [
|
|
830
830
|
{ targetFile: CANONICAL_INSTRUCTION_FILE, templateFile: CANONICAL_INSTRUCTION_FILE, component: 'root' },
|
|
831
831
|
{ targetFile: 'agent-docs/ARCHITECTURE.md', templateFile: 'agent-docs/ARCHITECTURE.md', component: 'docs' },
|
|
832
|
-
{ targetFile: `${LAYOUT.canonical.rulesDir}/security.
|
|
833
|
-
{ targetFile: `${LAYOUT.canonical.rulesDir}/testing.
|
|
834
|
-
{ targetFile: `${LAYOUT.canonical.rulesDir}/core.
|
|
832
|
+
{ targetFile: `${LAYOUT.canonical.rulesDir}/security.md`, templateFile: 'agents/rules/security.md', component: 'rules' },
|
|
833
|
+
{ targetFile: `${LAYOUT.canonical.rulesDir}/testing.md`, templateFile: 'agents/rules/testing.md', component: 'rules' },
|
|
834
|
+
{ targetFile: `${LAYOUT.canonical.rulesDir}/core.md`, templateFile: 'agents/rules/core.md', component: 'rules' },
|
|
835
835
|
{ targetFile: `${LAYOUT.canonical.skillsDir}/README.md`, templateFile: 'agents/skills/README.md', component: 'skills' },
|
|
836
836
|
{ targetFile: `${LAYOUT.canonical.skillsDir}/find-skills/SKILL.md`, templateFile: 'agents/skills/find-skills/SKILL.md', component: 'skills' },
|
|
837
837
|
{ targetFile: `${LAYOUT.canonical.skillsDir}/ui-ux-pro-max/SKILL.md`, templateFile: 'agents/skills/ui-ux-pro-max/SKILL.md', component: 'skills' }
|
|
@@ -989,7 +989,7 @@ program
|
|
|
989
989
|
console.log(chalk.blue('\n📚 Quick Tips:\n'));
|
|
990
990
|
console.log(chalk.white(' • Run "agents-templated validate" to check setup'));
|
|
991
991
|
console.log(chalk.white(' • Run "agents-templated wizard" for guided setup'));
|
|
992
|
-
console.log(chalk.white(' • Review agents/rules/security.
|
|
992
|
+
console.log(chalk.white(' • Review agents/rules/security.md for security patterns\n'));
|
|
993
993
|
|
|
994
994
|
} catch (error) {
|
|
995
995
|
console.error(chalk.red('Error:'), error.message);
|
|
@@ -1015,7 +1015,7 @@ program
|
|
|
1015
1015
|
|
|
1016
1016
|
program
|
|
1017
1017
|
.command('new-rule <name>')
|
|
1018
|
-
.description('Scaffold a new rule in agents/rules/<name>.
|
|
1018
|
+
.description('Scaffold a new rule in agents/rules/<name>.md')
|
|
1019
1019
|
.action(async (name) => {
|
|
1020
1020
|
try {
|
|
1021
1021
|
const targetDir = process.cwd();
|
package/lib/instructions.js
CHANGED
|
@@ -137,10 +137,10 @@ async function scaffoldSkill(targetDir, skillName) {
|
|
|
137
137
|
|
|
138
138
|
async function scaffoldRule(targetDir, ruleName) {
|
|
139
139
|
const rulesDir = path.join(targetDir, 'agents', 'rules');
|
|
140
|
-
const ruleFile = path.join(rulesDir, `${ruleName}.
|
|
140
|
+
const ruleFile = path.join(rulesDir, `${ruleName}.md`);
|
|
141
141
|
|
|
142
142
|
if (await fs.pathExists(ruleFile)) {
|
|
143
|
-
throw new Error(`Rule already exists: agents/rules/${ruleName}.
|
|
143
|
+
throw new Error(`Rule already exists: agents/rules/${ruleName}.md`);
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
const content = [
|
|
@@ -168,7 +168,7 @@ async function scaffoldRule(targetDir, ruleName) {
|
|
|
168
168
|
|
|
169
169
|
await fs.ensureDir(rulesDir);
|
|
170
170
|
await fs.writeFile(ruleFile, content, 'utf8');
|
|
171
|
-
return `agents/rules/${ruleName}.
|
|
171
|
+
return `agents/rules/${ruleName}.md`;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
async function scaffoldSubagent(targetDir, name) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agents-templated",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.6",
|
|
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": {
|
|
@@ -5,12 +5,6 @@ version: "1.0.0"
|
|
|
5
5
|
tags: ["ai", "llm", "openai", "anthropic", "rag", "prompt-engineering", "safety"]
|
|
6
6
|
alwaysApply: false
|
|
7
7
|
globs: ["**/*llm*", "**/*openai*", "**/*anthropic*", "**/*langchain*", "**/*rag*", "**/ai/**"]
|
|
8
|
-
triggers:
|
|
9
|
-
- "Integrating OpenAI, Claude, or other LLM APIs"
|
|
10
|
-
- "Building RAG (Retrieval-Augmented Generation) pipeline"
|
|
11
|
-
- "Engineering prompts or prompt chains"
|
|
12
|
-
- "Implementing LLM-powered features"
|
|
13
|
-
- "Evaluating LLM outputs or quality"
|
|
14
8
|
---
|
|
15
9
|
|
|
16
10
|
## Purpose
|
|
@@ -6,13 +6,6 @@ version: "3.0.0"
|
|
|
6
6
|
tags: ["architecture", "core", "enterprise", "technology-agnostic"]
|
|
7
7
|
globs:
|
|
8
8
|
- "*"
|
|
9
|
-
triggers:
|
|
10
|
-
- "Designing application architecture"
|
|
11
|
-
- "Setting up new project or module"
|
|
12
|
-
- "Defining type systems and validation"
|
|
13
|
-
- "Organizing code structure"
|
|
14
|
-
- "Improving code quality standards"
|
|
15
|
-
- "Making testing or performance decisions"
|
|
16
9
|
---
|
|
17
10
|
|
|
18
11
|
## Developer Identity
|
|
@@ -7,13 +7,6 @@ tags: ["database", "backend", "data", "orm", "schema"]
|
|
|
7
7
|
globs:
|
|
8
8
|
- "src/models/**/*"
|
|
9
9
|
- "src/data/**/*"
|
|
10
|
-
triggers:
|
|
11
|
-
- "Designing database schema or tables"
|
|
12
|
-
- "Creating/updating ORM models or queries"
|
|
13
|
-
- "Running database migrations"
|
|
14
|
-
- "Optimizing slow queries"
|
|
15
|
-
- "Selecting database technology"
|
|
16
|
-
- "Implementing access control for data"
|
|
17
10
|
---
|
|
18
11
|
|
|
19
12
|
# Database and Data Layer Guidelines
|
|
@@ -8,13 +8,6 @@ globs:
|
|
|
8
8
|
- "src/**/*"
|
|
9
9
|
- "components/**/*"
|
|
10
10
|
- "public/**/*"
|
|
11
|
-
triggers:
|
|
12
|
-
- "Building user interfaces or components"
|
|
13
|
-
- "Designing responsive layouts"
|
|
14
|
-
- "Creating forms and validations"
|
|
15
|
-
- "Implementing accessibility features"
|
|
16
|
-
- "Working on user-facing features"
|
|
17
|
-
- "Optimizing performance for frontend"
|
|
18
11
|
---
|
|
19
12
|
|
|
20
13
|
# Frontend Development Guidelines
|
|
@@ -4,14 +4,6 @@ title: "AI Agent Guardrails"
|
|
|
4
4
|
description: "Enforce hard behavioral limits on all agents. Apply when any destructive, irreversible, or dangerous action is requested"
|
|
5
5
|
version: "1.0.0"
|
|
6
6
|
tags: ["guardrails", "safety", "scope", "reversibility", "agent-behavior"]
|
|
7
|
-
triggers:
|
|
8
|
-
- "User requests file/folder/branch deletion"
|
|
9
|
-
- "Force pushing or hard-resetting git history"
|
|
10
|
-
- "Deploying to production"
|
|
11
|
-
- "Dropping database tables"
|
|
12
|
-
- "Disabling tests to make build pass"
|
|
13
|
-
- "Bypassing security controls"
|
|
14
|
-
- "Any action that cannot be easily undone"
|
|
15
7
|
---
|
|
16
8
|
|
|
17
9
|
## Purpose
|
|
@@ -3,12 +3,6 @@ title: "Application Hardening & Obfuscation"
|
|
|
3
3
|
description: "Apply when building client-distributed apps, protecting IP logic, or preparing releases with anti-tamper requirements"
|
|
4
4
|
version: "1.0.0"
|
|
5
5
|
tags: ["hardening", "obfuscation", "anti-tamper", "security"]
|
|
6
|
-
triggers:
|
|
7
|
-
- "Building mobile or desktop app for distribution"
|
|
8
|
-
- "Protecting high-value or proprietary logic"
|
|
9
|
-
- "Increasing tamper detection or anti-hooking"
|
|
10
|
-
- "Preparing production release with security concerns"
|
|
11
|
-
- "Performance and integrity validation needed"
|
|
12
6
|
---
|
|
13
7
|
|
|
14
8
|
## Purpose
|
|
@@ -3,11 +3,6 @@ title: "Intent Routing & Command Selection"
|
|
|
3
3
|
description: "Apply when determining which rule or workflow applies to the user's request. Ensures correct execution pathway"
|
|
4
4
|
version: "1.0.0"
|
|
5
5
|
tags: ["routing", "deterministic", "workflow", "commands"]
|
|
6
|
-
triggers:
|
|
7
|
-
- "Ambiguous or multi-intent user request"
|
|
8
|
-
- "Need to route to correct rule or workflow"
|
|
9
|
-
- "Destructive action requested"
|
|
10
|
-
- "Scope expansion detected"
|
|
11
6
|
---
|
|
12
7
|
|
|
13
8
|
## Purpose
|
|
@@ -4,12 +4,6 @@ description: "Apply when implementing features, designing systems, or making arc
|
|
|
4
4
|
version: "1.0.0"
|
|
5
5
|
tags: ["planning", "workflow", "documentation", "prompts"]
|
|
6
6
|
alwaysApply: true
|
|
7
|
-
triggers:
|
|
8
|
-
- "User asks to implement a new feature"
|
|
9
|
-
- "Making design or architecture decisions"
|
|
10
|
-
- "Planning a significant refactor"
|
|
11
|
-
- "Fixing bugs that require investigation"
|
|
12
|
-
- "Discussion produces decisions affecting architecture"
|
|
13
7
|
---
|
|
14
8
|
|
|
15
9
|
## Purpose
|
|
@@ -4,14 +4,6 @@ description: "Apply when implementing authentication, authorization, API validat
|
|
|
4
4
|
alwaysApply: true
|
|
5
5
|
version: "3.0.0"
|
|
6
6
|
tags: ["security", "auth", "validation", "secrets", "owasp"]
|
|
7
|
-
triggers:
|
|
8
|
-
- "User adds login/authentication to project"
|
|
9
|
-
- "Building API endpoints or handling user input"
|
|
10
|
-
- "Storing passwords, tokens, or sensitive data"
|
|
11
|
-
- "Validating form inputs or API requests"
|
|
12
|
-
- "Protecting against injection, XSS, CSRF"
|
|
13
|
-
- "Adding authorization/permissions to endpoints"
|
|
14
|
-
- "Integrating third-party APIs or external services"
|
|
15
7
|
---
|
|
16
8
|
|
|
17
9
|
# Security Rules & Best Practices
|
|
@@ -6,12 +6,6 @@ version: "3.0.0"
|
|
|
6
6
|
tags: ["style", "formatting", "naming", "quality"]
|
|
7
7
|
globs:
|
|
8
8
|
- "**/*"
|
|
9
|
-
triggers:
|
|
10
|
-
- "Writing or reviewing code"
|
|
11
|
-
- "Setting up code formatting rules"
|
|
12
|
-
- "Naming variables, functions, or files"
|
|
13
|
-
- "Organizing module structure"
|
|
14
|
-
- "Refactoring or improving readability"
|
|
15
9
|
---
|
|
16
10
|
|
|
17
11
|
# Code Style and Standards
|
|
@@ -3,12 +3,6 @@ title: "System Workflow Orchestration"
|
|
|
3
3
|
description: "Apply when planning work phases, defining acceptance criteria, or establishing delivery gates and rollback strategies"
|
|
4
4
|
version: "1.0.0"
|
|
5
5
|
tags: ["workflow", "gates", "delivery", "governance"]
|
|
6
|
-
triggers:
|
|
7
|
-
- "Starting a new feature or major change"
|
|
8
|
-
- "Planning implementation phases"
|
|
9
|
-
- "Defining acceptance criteria"
|
|
10
|
-
- "Establishing rollback procedures"
|
|
11
|
-
- "Preparing for release or deployment"
|
|
12
6
|
---
|
|
13
7
|
|
|
14
8
|
## Purpose
|
|
@@ -3,14 +3,6 @@ title: "Testing Guidelines & Best Practices"
|
|
|
3
3
|
description: "Apply when adding tests, verifying coverage, or validating quality before deployment. Always required for business logic and critical flows"
|
|
4
4
|
version: "3.0.0"
|
|
5
5
|
tags: ["testing", "quality", "coverage", "e2e", "a11y"]
|
|
6
|
-
triggers:
|
|
7
|
-
- "User requests tests for business logic"
|
|
8
|
-
- "Implementing a new feature"
|
|
9
|
-
- "Fixing a bug"
|
|
10
|
-
- "Need to verify API endpoints work"
|
|
11
|
-
- "Checking application behavior"
|
|
12
|
-
- "Hardening release artifacts"
|
|
13
|
-
- "CI/CD validation needed before deployment"
|
|
14
6
|
---
|
|
15
7
|
|
|
16
8
|
# Testing Guidelines & Best Practices
|
|
@@ -6,11 +6,6 @@ version: "1.0.0"
|
|
|
6
6
|
tags: ["workflow", "quality", "validation", "commit"]
|
|
7
7
|
globs:
|
|
8
8
|
- "**/*"
|
|
9
|
-
triggers:
|
|
10
|
-
- "User asks about workflow or pre-commit steps"
|
|
11
|
-
- "Need to keep project validated"
|
|
12
|
-
- "Running quality gates before merge"
|
|
13
|
-
- "Post-hardening verification needed"
|
|
14
9
|
---
|
|
15
10
|
|
|
16
11
|
# Development Workflow Guidelines
|
package/templates/CLAUDE.md
CHANGED
|
@@ -11,19 +11,19 @@ All policy, routing, and skill governance lives here — edit this file directly
|
|
|
11
11
|
|
|
12
12
|
| Module | File | Apply when... |
|
|
13
13
|
|--------|------|---------------|
|
|
14
|
-
| Security | `.claude/rules/security.
|
|
15
|
-
| Testing | `.claude/rules/testing.
|
|
16
|
-
| Core | `.claude/rules/core.
|
|
17
|
-
| Database | `.claude/rules/database.
|
|
18
|
-
| Frontend | `.claude/rules/frontend.
|
|
19
|
-
| Style | `.claude/rules/style.
|
|
20
|
-
| System Workflow | `.claude/rules/system-workflow.
|
|
21
|
-
| Workflows | `.claude/rules/workflows.
|
|
22
|
-
| Hardening | `.claude/rules/hardening.
|
|
23
|
-
| Intent Routing | `.claude/rules/intent-routing.
|
|
24
|
-
| Planning | `.claude/rules/planning.
|
|
25
|
-
| AI Integration | `.claude/rules/ai-integration.
|
|
26
|
-
| Guardrails | `.claude/rules/guardrails.
|
|
14
|
+
| Security | `.claude/rules/security.md` | Implementing authentication, validating inputs, protecting against injection attacks |
|
|
15
|
+
| Testing | `.claude/rules/testing.md` | Adding tests, verifying coverage, validating quality before deployment |
|
|
16
|
+
| Core | `.claude/rules/core.md` | Designing architecture, setting up projects, defining type systems |
|
|
17
|
+
| Database | `.claude/rules/database.md` | Designing schema, building data access layers, optimizing queries |
|
|
18
|
+
| Frontend | `.claude/rules/frontend.md` | Building UI components, designing pages, creating forms, implementing accessibility |
|
|
19
|
+
| Style | `.claude/rules/style.md` | Organizing code, naming variables, improving clarity and maintainability |
|
|
20
|
+
| System Workflow | `.claude/rules/system-workflow.md` | Planning delivery phases, defining acceptance criteria, establishing rollback |
|
|
21
|
+
| Workflows | `.claude/rules/workflows.md` | Optimizing development process, running pre-commit checks, keeping project healthy |
|
|
22
|
+
| Hardening | `.claude/rules/hardening.md` | Building distributed apps, protecting IP logic, preparing production releases |
|
|
23
|
+
| Intent Routing | `.claude/rules/intent-routing.md` | Determining which rule applies, routing to correct execution pathway |
|
|
24
|
+
| Planning | `.claude/rules/planning.md` | Implementing features, designing systems, making architectural decisions |
|
|
25
|
+
| AI Integration | `.claude/rules/ai-integration.md` | Integrating LLMs, RAG pipelines, prompt engineering, AI-powered features |
|
|
26
|
+
| Guardrails | `.claude/rules/guardrails.md` | Any destructive/irreversible action, scope expansion, dangerous requests |
|
|
27
27
|
|
|
28
28
|
### Skill modules (`.github/skills/`)
|
|
29
29
|
|
|
@@ -59,40 +59,40 @@ Subagents are bounded agents with limited tool access. They inherit all policy f
|
|
|
59
59
|
|
|
60
60
|
## Always Enforce
|
|
61
61
|
|
|
62
|
-
1. **Security-first (non-overrideable)** — `.claude/rules/security.
|
|
62
|
+
1. **Security-first (non-overrideable)** — `.claude/rules/security.md`
|
|
63
63
|
- Validate all external inputs at boundaries.
|
|
64
64
|
- Require authentication and role-based authorization for protected operations.
|
|
65
65
|
- Rate-limit public APIs.
|
|
66
66
|
- Never expose secrets, credentials, or PII in logs/errors/responses.
|
|
67
67
|
|
|
68
|
-
2. **Testing discipline (non-overrideable)** — `.claude/rules/testing.
|
|
68
|
+
2. **Testing discipline (non-overrideable)** — `.claude/rules/testing.md`
|
|
69
69
|
- Coverage mix target: Unit 80% / Integration 15% / E2E 5%.
|
|
70
70
|
- Business logic must have tests; critical flows need integration coverage.
|
|
71
71
|
- Never disable/remove tests to pass builds.
|
|
72
72
|
|
|
73
|
-
3. **Type safety and runtime boundaries** — `.claude/rules/core.
|
|
73
|
+
3. **Type safety and runtime boundaries** — `.claude/rules/core.md`
|
|
74
74
|
- Strong internal typing, runtime validation at boundaries, explicit error models.
|
|
75
75
|
|
|
76
|
-
4. **Database integrity** — `.claude/rules/database.
|
|
76
|
+
4. **Database integrity** — `.claude/rules/database.md`
|
|
77
77
|
- Prefer ORM/ODM, justify raw queries, enforce DB constraints, prevent N+1, reversible migrations.
|
|
78
78
|
|
|
79
|
-
5. **Frontend standards** — `.claude/rules/frontend.
|
|
79
|
+
5. **Frontend standards** — `.claude/rules/frontend.md`
|
|
80
80
|
- WCAG 2.1 AA, responsive defaults, clear loading/error states, no unsafe client trust.
|
|
81
81
|
|
|
82
|
-
6. **Style and consistency** — `.claude/rules/style.
|
|
82
|
+
6. **Style and consistency** — `.claude/rules/style.md`
|
|
83
83
|
- Consistent naming, small composable modules, explicit contracts, no magic values.
|
|
84
84
|
|
|
85
|
-
7. **Workflow discipline** — `.claude/rules/system-workflow.
|
|
85
|
+
7. **Workflow discipline** — `.claude/rules/system-workflow.md`, `.claude/rules/workflows.md`
|
|
86
86
|
- Feature branches only, no direct main edits, deterministic PR structure, review gates.
|
|
87
87
|
|
|
88
|
-
8. **Hardening mode** — `.claude/rules/hardening.
|
|
88
|
+
8. **Hardening mode** — `.claude/rules/hardening.md`
|
|
89
89
|
- In hardening/audit contexts: assume hostile input, threat-model, validate config safety, strict rate limits, dependency audit.
|
|
90
90
|
|
|
91
|
-
9. **Planning discipline** — `.claude/rules/planning.
|
|
91
|
+
9. **Planning discipline** — `.claude/rules/planning.md`
|
|
92
92
|
- Every feature discussion or implementation produces a `.github/prompts/` plan file.
|
|
93
93
|
- Plans are updated as work progresses, not discarded.
|
|
94
94
|
|
|
95
|
-
10. **Guardrails (non-overrideable)** — `.claude/rules/guardrails.
|
|
95
|
+
10. **Guardrails (non-overrideable)** — `.claude/rules/guardrails.md`
|
|
96
96
|
- Require `CONFIRM-DESTRUCTIVE:<target>` token before any destructive/irreversible action.
|
|
97
97
|
- Work only within the defined task scope; no silent expansion.
|
|
98
98
|
- Classify every action by reversibility before executing.
|
|
@@ -106,7 +106,7 @@ All items above are policy-level requirements; skills and command modes cannot w
|
|
|
106
106
|
|
|
107
107
|
## Intent Routing
|
|
108
108
|
|
|
109
|
-
Use `.
|
|
109
|
+
Use `.claude/rules/intent-routing.md` and route each task to one primary module:
|
|
110
110
|
|
|
111
111
|
- UI/Design → Frontend
|
|
112
112
|
- API/Logic → Security + Core
|
|
@@ -5,14 +5,6 @@ version: "3.0.0"
|
|
|
5
5
|
tags: ["ai", "llm", "openai", "anthropic", "rag", "prompt-engineering", "safety"]
|
|
6
6
|
alwaysApply: false
|
|
7
7
|
globs: ["**/*llm*", "**/*openai*", "**/*anthropic*", "**/*langchain*", "**/*rag*", "**/ai/**"]
|
|
8
|
-
triggers:
|
|
9
|
-
- "Integrating OpenAI or other LLM API"
|
|
10
|
-
- "Building RAG pipeline or semantic search"
|
|
11
|
-
- "Implementing prompt template or engineering"
|
|
12
|
-
- "Adding AI-powered feature to application"
|
|
13
|
-
- "Evaluating LLM responses or quality"
|
|
14
|
-
- "Optimizing LLM API costs"
|
|
15
|
-
- "Implementing AI moderation or safety controls"
|
|
16
8
|
---
|
|
17
9
|
|
|
18
10
|
## Purpose
|
|
@@ -6,13 +6,6 @@ version: "3.0.0"
|
|
|
6
6
|
tags: ["architecture", "core", "enterprise", "technology-agnostic"]
|
|
7
7
|
globs:
|
|
8
8
|
- "*"
|
|
9
|
-
triggers:
|
|
10
|
-
- "Designing application architecture"
|
|
11
|
-
- "Setting up new project or module"
|
|
12
|
-
- "Defining type systems and validation"
|
|
13
|
-
- "Organizing code structure"
|
|
14
|
-
- "Improving code quality standards"
|
|
15
|
-
- "Making testing or performance decisions"
|
|
16
9
|
---
|
|
17
10
|
|
|
18
11
|
## Developer Identity
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
2
|
title: "Database and Data Layer Guidelines"
|
|
3
3
|
description: "Apply when designing schema, building data access layers, optimizing queries, or managing database operations"
|
|
4
4
|
alwaysApply: true
|
|
@@ -7,14 +7,6 @@ tags: ["database", "backend", "data", "orm", "schema"]
|
|
|
7
7
|
globs:
|
|
8
8
|
- "src/models/**/*"
|
|
9
9
|
- "src/data/**/*"
|
|
10
|
-
triggers:
|
|
11
|
-
- "Designing database schema"
|
|
12
|
-
- "Adding database migrations"
|
|
13
|
-
- "Building data access layer"
|
|
14
|
-
- "Querying or filtering data"
|
|
15
|
-
- "Optimizing slow queries"
|
|
16
|
-
- "Managing relationships between entities"
|
|
17
|
-
- "Handling data validation in models"
|
|
18
10
|
---
|
|
19
11
|
|
|
20
12
|
# Database and Data Layer Guidelines
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
2
|
title: "Frontend Development Guidelines"
|
|
3
3
|
description: "Apply when building UI components, designing pages, creating forms, or implementing accessibility and responsive interfaces"
|
|
4
4
|
alwaysApply: true
|
|
@@ -8,14 +8,6 @@ globs:
|
|
|
8
8
|
- "src/**/*"
|
|
9
9
|
- "components/**/*"
|
|
10
10
|
- "public/**/*"
|
|
11
|
-
triggers:
|
|
12
|
-
- "Building UI components or pages"
|
|
13
|
-
- "Creating forms and handling user input"
|
|
14
|
-
- "Designing responsive layouts"
|
|
15
|
-
- "Implementing accessibility features"
|
|
16
|
-
- "Styling and theming interfaces"
|
|
17
|
-
- "Building navigation and routing"
|
|
18
|
-
- "Implementing client-side state management"
|
|
19
11
|
---
|
|
20
12
|
|
|
21
13
|
# Frontend Development Guidelines
|
|
@@ -4,14 +4,6 @@ title: "AI Agent Guardrails"
|
|
|
4
4
|
description: "Apply before any irreversible action, scope expansion, dangerous request, or system change. Safety constraints that cannot be weakened"
|
|
5
5
|
version: "3.0.0"
|
|
6
6
|
tags: ["guardrails", "safety", "scope", "reversibility", "agent-behavior"]
|
|
7
|
-
triggers:
|
|
8
|
-
- "Planning destructive or irreversible action"
|
|
9
|
-
- "Deleting files, databases, or deployment"
|
|
10
|
-
- "Modifying security or authentication"
|
|
11
|
-
- "Making scope expansion decisions"
|
|
12
|
-
- "Evaluating request safety and reversibility"
|
|
13
|
-
- "Handling secrets or sensitive data"
|
|
14
|
-
- "Making agent behavioral decisions"
|
|
15
7
|
---
|
|
16
8
|
|
|
17
9
|
## Purpose
|
|
@@ -3,14 +3,6 @@ title: "Application Hardening & Obfuscation"
|
|
|
3
3
|
description: "Apply when building distributed apps, protecting IP logic, preparing production releases, or hardening against reverse engineering"
|
|
4
4
|
version: "3.0.0"
|
|
5
5
|
tags: ["hardening", "obfuscation", "anti-tamper", "security"]
|
|
6
|
-
triggers:
|
|
7
|
-
- "Preparing mobile or desktop app for release"
|
|
8
|
-
- "Protecting proprietary business logic"
|
|
9
|
-
- "Hardening against reverse engineering"
|
|
10
|
-
- "Building distributed client applications"
|
|
11
|
-
- "Preparing production release with hardening"
|
|
12
|
-
- "Implementing tamper detection"
|
|
13
|
-
- "Adding integrity checks to release"
|
|
14
6
|
---
|
|
15
7
|
|
|
16
8
|
## Purpose
|
|
@@ -3,14 +3,6 @@ title: "Intent Routing & Command Selection"
|
|
|
3
3
|
description: "Apply when determining which rule applies, routing to correct execution pathway, or making command selection decisions"
|
|
4
4
|
version: "3.0.0"
|
|
5
5
|
tags: ["routing", "deterministic", "workflow", "commands"]
|
|
6
|
-
triggers:
|
|
7
|
-
- "User makes natural language request"
|
|
8
|
-
- "Determining which rule applies"
|
|
9
|
-
- "Routing to correct execution pathway"
|
|
10
|
-
- "Selecting command or agent to invoke"
|
|
11
|
-
- "Handling ambiguous user intent"
|
|
12
|
-
- "Making safety behavior decisions"
|
|
13
|
-
- "Validating action scope and appropriateness"
|
|
14
6
|
---
|
|
15
7
|
|
|
16
8
|
## Purpose
|
|
@@ -4,14 +4,6 @@ description: "Apply when implementing features, designing systems, discussing ar
|
|
|
4
4
|
version: "3.0.0"
|
|
5
5
|
tags: ["planning", "workflow", "documentation", "prompts"]
|
|
6
6
|
alwaysApply: true
|
|
7
|
-
triggers:
|
|
8
|
-
- "User requests a new feature"
|
|
9
|
-
- "Planning implementation approach"
|
|
10
|
-
- "Discussing architectural changes"
|
|
11
|
-
- "Breaking down user stories"
|
|
12
|
-
- "Creating acceptance criteria"
|
|
13
|
-
- "Designing database schema"
|
|
14
|
-
- "Planning deployment phases"
|
|
15
7
|
---
|
|
16
8
|
|
|
17
9
|
## Purpose
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
2
|
title: "Security Rules & Best Practices"
|
|
3
3
|
description: "Apply when implementing authentication, authorization, API validation, secrets management, or protecting against OWASP Top 10 vulnerabilities"
|
|
4
4
|
alwaysApply: true
|
|
5
5
|
version: "3.0.0"
|
|
6
6
|
tags: ["security", "auth", "validation", "secrets", "owasp"]
|
|
7
|
-
triggers:
|
|
8
|
-
- "User adds login/authentication to project"
|
|
9
|
-
- "Building API endpoints or handling user input"
|
|
10
|
-
- "Storing passwords, tokens, or sensitive data"
|
|
11
|
-
- "Validating form inputs or API requests"
|
|
12
|
-
- "Protecting against injection, XSS, CSRF"
|
|
13
|
-
- "Adding authorization/permissions to endpoints"
|
|
14
|
-
- "Integrating third-party APIs or external services"
|
|
15
7
|
---
|
|
16
8
|
|
|
17
9
|
# Security Rules & Best Practices
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
2
|
title: "Code Style and Standards"
|
|
3
3
|
description: "Apply when organizing code, naming variables/functions, improving clarity, formatting with consistency, and maintaining code quality"
|
|
4
4
|
alwaysApply: true
|
|
@@ -6,14 +6,6 @@ version: "3.0.0"
|
|
|
6
6
|
tags: ["style", "formatting", "naming", "quality"]
|
|
7
7
|
globs:
|
|
8
8
|
- "**/*"
|
|
9
|
-
triggers:
|
|
10
|
-
- "Writing new code or functions"
|
|
11
|
-
- "Organizing code structure"
|
|
12
|
-
- "Naming variables, functions, or classes"
|
|
13
|
-
- "Formatting code for readability"
|
|
14
|
-
- "Improving code documentation"
|
|
15
|
-
- "Refactoring for clarity"
|
|
16
|
-
- "Following project conventions"
|
|
17
9
|
---
|
|
18
10
|
|
|
19
11
|
# Code Style and Standards
|
|
@@ -3,14 +3,6 @@ title: "System Workflow Orchestration"
|
|
|
3
3
|
description: "Apply when planning delivery phases, defining acceptance criteria, establishing rollback procedures, or orchestrating multi-step workflows"
|
|
4
4
|
version: "3.0.0"
|
|
5
5
|
tags: ["workflow", "gates", "delivery", "governance"]
|
|
6
|
-
triggers:
|
|
7
|
-
- "Implementing feature with multiple phases"
|
|
8
|
-
- "Defining deployment gates and approval"
|
|
9
|
-
- "Planning rollback strategy"
|
|
10
|
-
- "Creating acceptance criteria"
|
|
11
|
-
- "Coordinating deployment across services"
|
|
12
|
-
- "Planning database migration"
|
|
13
|
-
- "Managing breaking API changes"
|
|
14
6
|
---
|
|
15
7
|
|
|
16
8
|
## Purpose
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
2
|
title: "Testing Guidelines & Best Practices"
|
|
3
3
|
description: "Apply when adding tests, verifying coverage, or validating quality before deployment. Always required for business logic and critical flows"
|
|
4
4
|
version: "3.0.0"
|
|
5
5
|
tags: ["testing", "quality", "coverage", "e2e", "a11y"]
|
|
6
|
-
triggers:
|
|
7
|
-
- "User requests tests for business logic"
|
|
8
|
-
- "Implementing a new feature"
|
|
9
|
-
- "Fixing a bug"
|
|
10
|
-
- "Need to verify API endpoints work"
|
|
11
|
-
- "Checking application behavior"
|
|
12
|
-
- "Hardening release artifacts"
|
|
13
|
-
- "CI/CD validation needed before deployment"
|
|
14
6
|
---
|
|
15
7
|
|
|
16
8
|
# Testing Guidelines & Best Practices
|
|
@@ -6,14 +6,6 @@ version: "3.0.0"
|
|
|
6
6
|
tags: ["workflow", "quality", "validation", "commit"]
|
|
7
7
|
globs:
|
|
8
8
|
- "**/*"
|
|
9
|
-
triggers:
|
|
10
|
-
- "Running pre-commit hooks"
|
|
11
|
-
- "Validating code quality gates"
|
|
12
|
-
- "Setting up CI/CD pipeline"
|
|
13
|
-
- "Checking code before commit"
|
|
14
|
-
- "Running linting or formatting"
|
|
15
|
-
- "Executing test suites automatically"
|
|
16
|
-
- "Maintaining project health and standards"
|
|
17
9
|
---
|
|
18
10
|
|
|
19
11
|
# Development Workflow Guidelines
|