agents-templated 1.2.12 → 2.1.0
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 +17 -21
- package/bin/cli.js +76 -59
- package/index.js +2 -10
- package/lib/instructions.js +124 -102
- package/package.json +1 -1
- package/templates/.cursorrules +9 -70
- package/templates/.github/copilot-instructions.md +7 -62
- package/templates/AGENTS.md +5 -0
- package/templates/CLAUDE.md +116 -47
- package/templates/README.md +17 -21
- package/templates/agent-docs/ARCHITECTURE.md +6 -5
- package/templates/agent-docs/README.md +6 -11
- package/templates/agents/rules/ai-integration.mdc +54 -0
- package/templates/agents/rules/guardrails.mdc +97 -0
- package/templates/agents/rules/intent-routing.mdc +9 -0
- package/templates/agents/rules/planning.mdc +69 -0
- package/templates/agents/skills/README.md +0 -7
- package/templates/agents/skills/api-design/SKILL.md +59 -0
- package/templates/agents/skills/llm-integration/SKILL.md +64 -0
- package/templates/instructions/source/core.md +209 -26
- package/templates/AGENTS.MD +0 -665
|
@@ -1,36 +1,219 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Core AI Development Contract (Canonical Source)
|
|
2
2
|
|
|
3
|
-
This file is the single
|
|
3
|
+
This file is the single canonical instruction source for all AI agents in this repository.
|
|
4
4
|
|
|
5
|
-
|
|
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.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
- Validate all external inputs at boundaries.
|
|
9
|
-
- Enforce authentication and authorization on protected operations.
|
|
10
|
-
- Rate limit public endpoints.
|
|
11
|
-
- Never expose sensitive values in logs, errors, or responses.
|
|
8
|
+
Do NOT duplicate policy content outside this file.
|
|
12
9
|
|
|
13
|
-
|
|
14
|
-
- Add tests for changed business logic.
|
|
15
|
-
- Prefer focused unit tests first, then integration tests for boundaries.
|
|
16
|
-
- Keep critical workflows covered before release.
|
|
10
|
+
---
|
|
17
11
|
|
|
18
|
-
|
|
19
|
-
- Use strong typing where available.
|
|
20
|
-
- Add runtime validation at trust boundaries.
|
|
21
|
-
- Keep changes minimal, deterministic, and scoped to the requested task.
|
|
12
|
+
## Reference Index
|
|
22
13
|
|
|
23
|
-
|
|
14
|
+
### Rule Modules — `.github/instructions/rules/`
|
|
24
15
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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 |
|
|
29
28
|
|
|
30
|
-
|
|
29
|
+
### Skill Modules — `.github/skills/`
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
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 |
|
|
36
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.
|