agents-templated 2.2.0 → 2.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +9 -9
  2. package/bin/cli.js +9 -9
  3. package/index.js +12 -1
  4. package/lib/instructions.js +20 -6
  5. package/lib/layout.js +3 -2
  6. package/package.json +1 -1
  7. package/templates/{agents/subagents → .claude/agents}/README.md +2 -2
  8. package/templates/.claude/rules/ai-integration.mdc +60 -0
  9. package/templates/.claude/rules/core.mdc +180 -0
  10. package/templates/.claude/rules/database.mdc +291 -0
  11. package/templates/.claude/rules/frontend.mdc +224 -0
  12. package/templates/.claude/rules/guardrails.mdc +105 -0
  13. package/templates/.claude/rules/hardening.mdc +58 -0
  14. package/templates/.claude/rules/intent-routing.mdc +59 -0
  15. package/templates/.claude/rules/planning.mdc +75 -0
  16. package/templates/.claude/rules/security.mdc +286 -0
  17. package/templates/.claude/rules/style.mdc +306 -0
  18. package/templates/.claude/rules/system-workflow.mdc +69 -0
  19. package/templates/.claude/rules/testing.mdc +308 -0
  20. package/templates/.claude/rules/workflows.mdc +61 -0
  21. package/templates/.cursorrules +2 -5
  22. package/templates/CLAUDE.md +37 -37
  23. package/templates/README.md +3 -3
  24. package/templates/agent-docs/ARCHITECTURE.md +3 -3
  25. package/templates/agent-docs/README.md +12 -13
  26. package/templates/agents/rules/ai-integration.mdc +10 -2
  27. package/templates/agents/rules/core.mdc +8 -1
  28. package/templates/agents/rules/database.mdc +10 -2
  29. package/templates/agents/rules/frontend.mdc +10 -2
  30. package/templates/agents/rules/guardrails.mdc +10 -2
  31. package/templates/agents/rules/hardening.mdc +10 -2
  32. package/templates/agents/rules/intent-routing.mdc +10 -2
  33. package/templates/agents/rules/planning.mdc +10 -2
  34. package/templates/agents/rules/security.mdc +11 -2
  35. package/templates/agents/rules/style.mdc +10 -2
  36. package/templates/agents/rules/system-workflow.mdc +10 -2
  37. package/templates/agents/rules/testing.mdc +9 -1
  38. package/templates/agents/rules/workflows.mdc +10 -2
  39. package/templates/agents/skills/README.md +6 -6
  40. package/templates/instructions/source/core.md +0 -219
  41. /package/templates/{agents/subagents → .claude/agents}/architect.md +0 -0
  42. /package/templates/{agents/subagents → .claude/agents}/build-error-resolver.md +0 -0
  43. /package/templates/{agents/subagents → .claude/agents}/code-reviewer.md +0 -0
  44. /package/templates/{agents/subagents → .claude/agents}/doc-updater.md +0 -0
  45. /package/templates/{agents/subagents → .claude/agents}/e2e-runner.md +0 -0
  46. /package/templates/{agents/subagents → .claude/agents}/planner.md +0 -0
  47. /package/templates/{agents/subagents → .claude/agents}/refactor-cleaner.md +0 -0
  48. /package/templates/{agents/subagents → .claude/agents}/security-reviewer.md +0 -0
  49. /package/templates/{agents/subagents → .claude/agents}/tdd-guide.md +0 -0
@@ -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
- agents/skills/my-custom-skill/
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
- agents/skills/
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 agents/skills/[skill-name]/SKILL.md
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 `agents/skills/[skill-name]/SKILL.md` for patterns and guidance.
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 `agents/skills/[skill-name]/SKILL.md`
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 `agents/skills/[skill-name]/SKILL.md`
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.