agent-directives 0.2.1 → 0.3.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 +36 -14
- package/directives/adaptive-routing.md +28 -2
- package/dist/cli.js +53 -48
- package/dist/cli.js.map +1 -1
- package/dist/manifest.d.ts +3 -2
- package/dist/manifest.d.ts.map +1 -1
- package/dist/manifest.js.map +1 -1
- package/dist/renderEntryList.d.ts +3 -0
- package/dist/renderEntryList.d.ts.map +1 -0
- package/dist/renderEntryList.js +28 -0
- package/dist/renderEntryList.js.map +1 -0
- package/dist/rules.d.ts +3 -0
- package/dist/rules.d.ts.map +1 -0
- package/dist/rules.js +31 -0
- package/dist/rules.js.map +1 -0
- package/manifest.json +46 -1
- package/package.json +2 -1
- package/rules/angular/components-and-templates.md +52 -0
- package/rules/angular/project-structure.md +52 -0
- package/rules/angular/testing.md +43 -0
- package/templates/AGENTS.md +2 -2
- package/templates/CLAUDE.md +2 -2
- package/templates/copilot-instructions.md +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Agent Directives
|
|
2
2
|
|
|
3
|
-
A collection of reusable directives, skills, and templates for AI coding agents.
|
|
3
|
+
A collection of reusable directives, skills, rules, and templates for AI coding agents.
|
|
4
4
|
Extract the parts you need, drop them into your project, and customize the
|
|
5
5
|
placeholders. Everything works standalone — no framework lock-in, no hidden
|
|
6
6
|
dependencies between files.
|
|
@@ -13,6 +13,7 @@ dependencies between files.
|
|
|
13
13
|
| **Navigation** | 1 directive | SAFE pattern for exploring codebases before implementation |
|
|
14
14
|
| **Memory** | 2 directives | Error memory and session decisions for persistent learning |
|
|
15
15
|
| **Skills** | 13 skills | Code reviewer, test reviewer, spec reviewer, product requirements writer, implementation task planner, subagent-driven development, self-audit, systematic debugging, architecture boundary reviewer, codebase health reviewer, production readiness reviewer, harness hooks reviewer, and MCP integration reviewer |
|
|
16
|
+
| **Rules** | 3 Angular rules | Lazy-loaded Angular project, component/template, and testing standards selected by stack or explicit category |
|
|
16
17
|
| **Templates** | 4 templates | Drop-in instruction files for AGENTS.md, CLAUDE.md, Copilot, and decision logs |
|
|
17
18
|
| **Tooling** | TypeScript scripts | Validate directive wiring, assemble eval scenarios, record loaded-file manifests, and generate eval health reports |
|
|
18
19
|
|
|
@@ -20,7 +21,7 @@ dependencies between files.
|
|
|
20
21
|
|
|
21
22
|
The repository contains two things you install into your own project:
|
|
22
23
|
|
|
23
|
-
1. **Directive and
|
|
24
|
+
1. **Directive, skill, and rule files** — copied from `directives/`, `skills/`, and `rules/`.
|
|
24
25
|
2. **A root instruction file** — copied from `templates/` and renamed for your agent
|
|
25
26
|
(`AGENTS.md`, `CLAUDE.md`, or `.github/copilot-instructions.md`).
|
|
26
27
|
|
|
@@ -33,6 +34,9 @@ cd /path/to/your-project
|
|
|
33
34
|
# Install the required Codex/OpenAI agent directives and skills.
|
|
34
35
|
npx agent-directives sync --tool codex --yes
|
|
35
36
|
|
|
37
|
+
# Optionally install detected stack rules, such as Angular rules for angular.json/@angular/core projects.
|
|
38
|
+
npx agent-directives sync --tool codex --yes --rules auto
|
|
39
|
+
|
|
36
40
|
# Add the root instruction file, then edit every <!-- FILL IN: ... --> placeholder.
|
|
37
41
|
curl -fsSL \
|
|
38
42
|
https://raw.githubusercontent.com/pertrai1/agent-directives/main/templates/AGENTS.md \
|
|
@@ -47,7 +51,7 @@ After installation, open the root instruction file and:
|
|
|
47
51
|
|
|
48
52
|
1. Fill in the project-specific placeholders.
|
|
49
53
|
2. Keep `directives/adaptive-routing.md` as the first directive the agent loads.
|
|
50
|
-
3. Delete directives or
|
|
54
|
+
3. Delete directives, skills, or rules your team does not want, then remove matching rows
|
|
51
55
|
from the root instruction file.
|
|
52
56
|
4. Run the check command for your target tool:
|
|
53
57
|
|
|
@@ -81,14 +85,17 @@ npx agent-directives list --required # Only required e
|
|
|
81
85
|
npx agent-directives list --category review
|
|
82
86
|
npx agent-directives list --tool cursor
|
|
83
87
|
npx agent-directives list --type skill
|
|
88
|
+
npx agent-directives list --type rule
|
|
84
89
|
|
|
85
90
|
npx agent-directives add code-reviewer --tool claude
|
|
91
|
+
npx agent-directives add angular-components-and-templates --tool claude
|
|
86
92
|
npx agent-directives add code-reviewer --tool claude --force
|
|
87
93
|
|
|
88
94
|
npx agent-directives check --tool codex
|
|
89
95
|
npx agent-directives context-audit --tool codex --required
|
|
90
96
|
npx agent-directives context-audit --tool codex --required --max-tokens 12000
|
|
91
97
|
npx agent-directives sync --tool claude --yes
|
|
98
|
+
npx agent-directives sync --tool claude --yes --rules auto
|
|
92
99
|
npx agent-directives sync --tool claude --force
|
|
93
100
|
```
|
|
94
101
|
|
|
@@ -101,7 +108,7 @@ npx agent-directives context-audit --tool codex --required
|
|
|
101
108
|
npx agent-directives context-audit --tool claude --max-tokens 20000
|
|
102
109
|
```
|
|
103
110
|
|
|
104
|
-
The estimate uses a simple `characters / 4` heuristic and reports total tokens, required vs optional counts, and the largest directive/skill files. With `--max-tokens`, the command exits non-zero when the selected entries exceed the budget, making it usable in CI.
|
|
111
|
+
The estimate uses a simple `characters / 4` heuristic and reports total tokens, required vs optional counts, and the largest directive/skill/rule files. With `--max-tokens`, the command exits non-zero when the selected entries exceed the budget, making it usable in CI.
|
|
105
112
|
|
|
106
113
|
### Tool auto-detection
|
|
107
114
|
|
|
@@ -119,8 +126,8 @@ Pass `--tool` explicitly when auto-detection is ambiguous or wrong.
|
|
|
119
126
|
### Install layout
|
|
120
127
|
|
|
121
128
|
For `claude`, `copilot`, and `codex`, the CLI preserves the source layout — each
|
|
122
|
-
entry is written to its declared path (`directives/<name>.md
|
|
123
|
-
`skills/<name>/SKILL.md`) relative to the current working directory. The root
|
|
129
|
+
entry is written to its declared path (`directives/<name>.md`,
|
|
130
|
+
`skills/<name>/SKILL.md`, or `rules/<category>/<name>.md`) relative to the current working directory. The root
|
|
124
131
|
instruction file is left to you so existing project instructions are not
|
|
125
132
|
accidentally overwritten.
|
|
126
133
|
|
|
@@ -153,15 +160,15 @@ Releases use Changesets and GitHub Actions, matching the release flow used by
|
|
|
153
160
|
|
|
154
161
|
The package is published to npm. Future releases require npm trusted publishing for this repository/package (or equivalent npm automation credentials) so the workflow can publish with provenance. The workflow uses `id-token: write` and `npm publish --provenance`.
|
|
155
162
|
|
|
156
|
-
## Directives vs Skills
|
|
163
|
+
## Directives vs Skills vs Rules
|
|
157
164
|
|
|
158
|
-
| | Directive | Skill |
|
|
159
|
-
|
|
160
|
-
| **Nature** |
|
|
161
|
-
| **When** | At a workflow phase | For a task type |
|
|
162
|
-
| **Output** | Constrained behavior | Structured findings |
|
|
163
|
-
| **Tone** | "Never do X" / "Always do Y" | "You are a specialist in..." |
|
|
164
|
-
| **Format** | Rules + forbidden patterns table | Frontmatter + review process + output format |
|
|
165
|
+
| | Directive | Skill | Rule |
|
|
166
|
+
|---|---|---|---|
|
|
167
|
+
| **Nature** | Workflow protocol you follow | Persona/process you adopt | Stack or project standard you obey |
|
|
168
|
+
| **When** | At a workflow phase | For a task type | When touched files or detected stack match |
|
|
169
|
+
| **Output** | Constrained behavior | Structured findings | Implementation/review constraints |
|
|
170
|
+
| **Tone** | "Never do X" / "Always do Y" | "You are a specialist in..." | "For this stack, prefer/avoid X" |
|
|
171
|
+
| **Format** | Rules + forbidden patterns table | Frontmatter + review process + output format | Frontmatter + load triggers + compact standards/evidence |
|
|
165
172
|
|
|
166
173
|
## Directives
|
|
167
174
|
|
|
@@ -252,6 +259,21 @@ Durable decision capture at task completion. Four-condition write criteria, YAML
|
|
|
252
259
|
frontmatter schema for retrieval, progressive-disclosure workflow, and five
|
|
253
260
|
required sections (Title, Context, Decision, Rejected Alternatives, Consequences).
|
|
254
261
|
|
|
262
|
+
|
|
263
|
+
## Rules
|
|
264
|
+
|
|
265
|
+
Rules are lazy-loaded stack or project standards. They constrain implementation and review without changing the workflow path. Install them explicitly with `agent-directives add`, by category with interactive `sync`, or by detected stack with `sync --rules auto`.
|
|
266
|
+
|
|
267
|
+
### Angular Rules (`rules/angular/*.md`)
|
|
268
|
+
|
|
269
|
+
The first rule pack covers Angular projects detected by `angular.json` or `@angular/core` in `package.json`:
|
|
270
|
+
|
|
271
|
+
- `rules/angular/project-structure.md` — Angular workspace, source-root, and project-structure standards
|
|
272
|
+
- `rules/angular/components-and-templates.md` — component, template, accessibility, and typed UI-change standards
|
|
273
|
+
- `rules/angular/testing.md` — Angular component/service testing standards
|
|
274
|
+
|
|
275
|
+
Do not load every rule by default. The root instructions and adaptive router should list selected rule files separately from directives and skills.
|
|
276
|
+
|
|
255
277
|
## Skills
|
|
256
278
|
|
|
257
279
|
### Code Reviewer (`skills/code-reviewer/SKILL.md`)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: adaptive-routing
|
|
3
3
|
description: Selects the lightest safe workflow path, relevant directives/skills, and handoff requirements based on task intent, risk, and touched surfaces.
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.4.0
|
|
5
5
|
required: true
|
|
6
6
|
category: workflow
|
|
7
7
|
tools:
|
|
@@ -59,6 +59,7 @@ Before major edits, output a short route decision:
|
|
|
59
59
|
- Risk: <low | medium | high> with reason
|
|
60
60
|
- Required directives: <paths>
|
|
61
61
|
- Required skills: <paths, if any>
|
|
62
|
+
- Selected rules: <rule paths, if any>
|
|
62
63
|
- Evidence required: <tests/checks/proofs>
|
|
63
64
|
- Handoff required: <yes/no and why>
|
|
64
65
|
- Confirmation needed: <yes/no and why>
|
|
@@ -122,6 +123,31 @@ If no row matches, state that no specialist skill is required.
|
|
|
122
123
|
|
|
123
124
|
---
|
|
124
125
|
|
|
126
|
+
|
|
127
|
+
## Rule Selection
|
|
128
|
+
|
|
129
|
+
After selecting the workflow path and skills, select stack or project rules only
|
|
130
|
+
when they match detected project evidence or touched files. Rules constrain the
|
|
131
|
+
work but do not replace directives or skills.
|
|
132
|
+
|
|
133
|
+
- Treat `rules/` entries as lazy-loaded standards, not always-loaded context.
|
|
134
|
+
- Load framework rules when project evidence matches, such as `angular.json` or
|
|
135
|
+
`@angular/core` for Angular, and the task touches relevant framework files.
|
|
136
|
+
- Load file-scoped rules when touched paths match their `applies_to` frontmatter.
|
|
137
|
+
- List selected rule files separately from directives and skills in route output.
|
|
138
|
+
- Do not load unrelated framework rule packs. Project-local instructions override
|
|
139
|
+
rule-pack guidance when they conflict.
|
|
140
|
+
|
|
141
|
+
Initial rule pack:
|
|
142
|
+
|
|
143
|
+
| Situation / evidence | Selected rules |
|
|
144
|
+
| --- | --- |
|
|
145
|
+
| Angular project structure, routing, source layout, or workspace config (`angular.json`, `@angular/core`, or Angular app files) | `rules/angular/project-structure.md` |
|
|
146
|
+
| Angular component, template, component style, inputs/outputs, lifecycle, accessibility, or UI behavior | `rules/angular/components-and-templates.md` |
|
|
147
|
+
| Angular tests, specs, services under test, or Angular behavior changes needing test evidence | `rules/angular/testing.md` |
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
125
151
|
## Workflow Paths
|
|
126
152
|
|
|
127
153
|
### Light Path
|
|
@@ -331,7 +357,7 @@ classification and avoid making the current change worse.
|
|
|
331
357
|
|
|
332
358
|
| Pattern | Why Forbidden |
|
|
333
359
|
| --- | --- |
|
|
334
|
-
| Loading every directive by default | Wastes context and creates compliance theater |
|
|
360
|
+
| Loading every directive or rule by default | Wastes context and creates compliance theater |
|
|
335
361
|
| Using Light Path for behavior or bug fixes | Skips necessary proof |
|
|
336
362
|
| Treating "quick" as permission to skip safety | Risk depends on impact, not wording |
|
|
337
363
|
| Producing boilerplate verification with no evidence | Ritual is not proof |
|
package/dist/cli.js
CHANGED
|
@@ -5,13 +5,12 @@ import { Command } from 'commander';
|
|
|
5
5
|
import { buildContextAudit, renderContextAudit } from './context-audit.js';
|
|
6
6
|
import { filterEntries, findEntry, loadManifest, packageRoot } from './manifest.js';
|
|
7
7
|
import { installEntry, isEntryInstalled } from './install.js';
|
|
8
|
+
import { renderEntryList } from './renderEntryList.js';
|
|
8
9
|
import { selectMultiple } from './prompt.js';
|
|
10
|
+
import { parseRuleCategories } from './rules.js';
|
|
9
11
|
import { KNOWN_TOOLS, detectTool, isTool } from './targets.js';
|
|
10
12
|
const pkg = JSON.parse(readFileSync(join(packageRoot, 'package.json'), 'utf8'));
|
|
11
13
|
const DECIMAL_RADIX = 10;
|
|
12
|
-
const MIN_UNDERLINE_WIDTH = 4;
|
|
13
|
-
const ID_COLUMN_WIDTH = 34;
|
|
14
|
-
const TYPE_COLUMN_WIDTH = 10;
|
|
15
14
|
function resolveTool(provided) {
|
|
16
15
|
if (provided) {
|
|
17
16
|
if (!isTool(provided)) {
|
|
@@ -57,11 +56,14 @@ function parseIntegerOption(value, opts) {
|
|
|
57
56
|
const program = new Command();
|
|
58
57
|
program
|
|
59
58
|
.name('agent-directives')
|
|
60
|
-
.description('Install agent directives and
|
|
59
|
+
.description('Install agent directives, skills, and rules into your project')
|
|
61
60
|
.version(pkg.version);
|
|
61
|
+
function isManifestEntryType(value) {
|
|
62
|
+
return value === 'directive' || value === 'skill' || value === 'rule';
|
|
63
|
+
}
|
|
62
64
|
function validateListOptions(opts) {
|
|
63
|
-
if (opts.type && opts.type
|
|
64
|
-
console.error(`Invalid --type '${opts.type}'. Expected 'directive' or '
|
|
65
|
+
if (opts.type && !isManifestEntryType(opts.type)) {
|
|
66
|
+
console.error(`Invalid --type '${opts.type}'. Expected 'directive', 'skill', or 'rule'.`);
|
|
65
67
|
process.exit(1);
|
|
66
68
|
}
|
|
67
69
|
if (opts.tool && !isTool(opts.tool)) {
|
|
@@ -69,52 +71,67 @@ function validateListOptions(opts) {
|
|
|
69
71
|
process.exit(1);
|
|
70
72
|
}
|
|
71
73
|
}
|
|
72
|
-
function
|
|
73
|
-
const byCategory = new Map();
|
|
74
|
+
function applyEntries(entries, opts) {
|
|
74
75
|
for (const entry of entries) {
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
const result = installEntry(entry, { cwd: opts.cwd, tool: opts.tool, force: opts.force });
|
|
77
|
+
reportInstall(entry, result);
|
|
78
|
+
if (result.status === 'installed')
|
|
79
|
+
opts.summary.installed += 1;
|
|
80
|
+
else if (result.status === 'skipped-identical')
|
|
81
|
+
opts.summary.identical += 1;
|
|
82
|
+
else
|
|
83
|
+
opts.summary.conflict += 1;
|
|
78
84
|
}
|
|
79
|
-
return byCategory;
|
|
80
85
|
}
|
|
81
|
-
function
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
console.log(
|
|
86
|
+
function applySelectedRules(opts) {
|
|
87
|
+
const { entries, categories, apply, mode } = opts;
|
|
88
|
+
if (!mode || mode === 'none')
|
|
89
|
+
return;
|
|
90
|
+
if (entries.length === 0) {
|
|
91
|
+
console.log(`\nNo matching rule entries selected${mode === 'auto' ? ' by auto-detection' : ''}.`);
|
|
92
|
+
return;
|
|
87
93
|
}
|
|
94
|
+
console.log(`\nInstalling ${entries.length} selected rule entr${entries.length === 1 ? 'y' : 'ies'} (${categories.join(', ')})...`);
|
|
95
|
+
apply(entries);
|
|
96
|
+
}
|
|
97
|
+
async function promptForOptionalEntries(entries, apply) {
|
|
98
|
+
if (entries.length === 0)
|
|
99
|
+
return;
|
|
100
|
+
const categories = Array.from(new Set(entries.map((entry) => entry.category))).sort();
|
|
101
|
+
const chosen = await selectMultiple('\nOptional categories:', categories);
|
|
102
|
+
const toInstall = entries.filter((entry) => chosen.includes(entry.category));
|
|
103
|
+
if (toInstall.length === 0)
|
|
104
|
+
return;
|
|
105
|
+
console.log(`\nInstalling ${toInstall.length} optional entr${toInstall.length === 1 ? 'y' : 'ies'}...`);
|
|
106
|
+
void apply(toInstall);
|
|
88
107
|
}
|
|
89
108
|
program
|
|
90
109
|
.command('list')
|
|
91
|
-
.description('List available directives and
|
|
110
|
+
.description('List available directives, skills, and rules')
|
|
92
111
|
.option('-c, --category <category>', 'Filter by category')
|
|
93
112
|
.option('-r, --required', 'Only show required entries')
|
|
94
113
|
.option('-t, --tool <tool>', `Filter by tool (${KNOWN_TOOLS.join(', ')})`)
|
|
95
|
-
.option('--type <type>', 'Filter by type (directive or
|
|
114
|
+
.option('--type <type>', 'Filter by type (directive, skill, or rule)')
|
|
96
115
|
.action((opts) => {
|
|
97
116
|
validateListOptions(opts);
|
|
98
117
|
const manifest = loadManifest();
|
|
118
|
+
const typeFilter = opts.type && isManifestEntryType(opts.type) ? opts.type : undefined;
|
|
99
119
|
const filtered = filterEntries(manifest.entries, {
|
|
100
120
|
category: opts.category,
|
|
101
121
|
required: opts.required,
|
|
102
122
|
tool: opts.tool,
|
|
103
|
-
type:
|
|
123
|
+
type: typeFilter,
|
|
104
124
|
});
|
|
105
125
|
if (filtered.length === 0) {
|
|
106
126
|
console.log('No entries match the filters.');
|
|
107
127
|
return;
|
|
108
128
|
}
|
|
109
|
-
|
|
110
|
-
for (const [category, entries] of [...byCategory.entries()].sort(([a], [b]) => a.localeCompare(b))) {
|
|
111
|
-
printCategory(category, entries);
|
|
112
|
-
}
|
|
129
|
+
console.log(renderEntryList(filtered));
|
|
113
130
|
console.log(`\n${filtered.length} entr${filtered.length === 1 ? 'y' : 'ies'} (★ = required)`);
|
|
114
131
|
});
|
|
115
132
|
program
|
|
116
133
|
.command('context-audit')
|
|
117
|
-
.description('Estimate prompt weight for directives and
|
|
134
|
+
.description('Estimate prompt weight for directives, skills, and rules')
|
|
118
135
|
.option('-t, --tool <tool>', `Filter by target tool (${KNOWN_TOOLS.join(', ')})`)
|
|
119
136
|
.option('-r, --required', 'Only include always-loaded required entries')
|
|
120
137
|
.option('--max-tokens <tokens>', 'Fail when the estimated token count exceeds this budget')
|
|
@@ -143,7 +160,7 @@ program
|
|
|
143
160
|
});
|
|
144
161
|
program
|
|
145
162
|
.command('add <id>')
|
|
146
|
-
.description('Install a single directive or
|
|
163
|
+
.description('Install a single directive, skill, or rule into the current project')
|
|
147
164
|
.option('-t, --tool <tool>', `Target tool (${KNOWN_TOOLS.join(', ')})`)
|
|
148
165
|
.option('-f, --force', 'Overwrite an existing file with different content')
|
|
149
166
|
.action((id, opts) => {
|
|
@@ -168,7 +185,7 @@ program
|
|
|
168
185
|
});
|
|
169
186
|
program
|
|
170
187
|
.command('check')
|
|
171
|
-
.description('Report missing required directives and
|
|
188
|
+
.description('Report missing required directives, skills, and rules for the target tool')
|
|
172
189
|
.option('-t, --tool <tool>', `Target tool (${KNOWN_TOOLS.join(', ')})`)
|
|
173
190
|
.action((opts) => {
|
|
174
191
|
const manifest = loadManifest();
|
|
@@ -192,35 +209,23 @@ program
|
|
|
192
209
|
.option('-t, --tool <tool>', `Target tool (${KNOWN_TOOLS.join(', ')})`)
|
|
193
210
|
.option('-y, --yes', 'Skip prompts; install required entries only')
|
|
194
211
|
.option('-f, --force', 'Overwrite files with different content')
|
|
212
|
+
.option('--rules <mode>', "Install rule categories: 'auto', 'none', or comma-separated categories such as 'angular'", 'none')
|
|
195
213
|
.action(async (opts) => {
|
|
196
214
|
const manifest = loadManifest();
|
|
197
215
|
const tool = resolveTool(opts.tool);
|
|
198
216
|
const required = filterEntries(manifest.entries, { required: true, tool });
|
|
199
217
|
const optional = filterEntries(manifest.entries, { required: false, tool });
|
|
218
|
+
const requestedRuleCategories = parseRuleCategories(opts.rules, process.cwd());
|
|
219
|
+
const selectedRules = optional.filter((entry) => entry.type === 'rule' && requestedRuleCategories.includes(entry.category));
|
|
220
|
+
const promptableOptional = optional.filter((entry) => entry.type !== 'rule' || !requestedRuleCategories.includes(entry.category));
|
|
200
221
|
console.log(`Tool: ${tool}`);
|
|
201
222
|
console.log(`Installing ${required.length} required entr${required.length === 1 ? 'y' : 'ies'}...`);
|
|
202
223
|
const summary = { installed: 0, identical: 0, conflict: 0 };
|
|
203
|
-
const apply = (entries) => {
|
|
204
|
-
for (const entry of entries) {
|
|
205
|
-
const result = installEntry(entry, { cwd: process.cwd(), tool, force: opts.force });
|
|
206
|
-
reportInstall(entry, result);
|
|
207
|
-
if (result.status === 'installed')
|
|
208
|
-
summary.installed += 1;
|
|
209
|
-
else if (result.status === 'skipped-identical')
|
|
210
|
-
summary.identical += 1;
|
|
211
|
-
else
|
|
212
|
-
summary.conflict += 1;
|
|
213
|
-
}
|
|
214
|
-
};
|
|
224
|
+
const apply = (entries) => applyEntries(entries, { cwd: process.cwd(), tool, force: opts.force, summary });
|
|
215
225
|
apply(required);
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
const toInstall = optional.filter((entry) => chosen.includes(entry.category));
|
|
220
|
-
if (toInstall.length > 0) {
|
|
221
|
-
console.log(`\nInstalling ${toInstall.length} optional entr${toInstall.length === 1 ? 'y' : 'ies'}...`);
|
|
222
|
-
apply(toInstall);
|
|
223
|
-
}
|
|
226
|
+
applySelectedRules({ entries: selectedRules, categories: requestedRuleCategories, apply, mode: opts.rules });
|
|
227
|
+
if (!opts.yes) {
|
|
228
|
+
await promptForOptionalEntries(promptableOptional, apply);
|
|
224
229
|
}
|
|
225
230
|
console.log(`\nSummary: ${summary.installed} installed, ${summary.identical} already up-to-date, ${summary.conflict} conflicts`);
|
|
226
231
|
if (summary.conflict > 0 && !opts.force) {
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAsB,MAAM,eAAe,CAAC;AACxG,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAsB,MAAM,cAAc,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,WAAW,EA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C,OAAwB,EAAQ,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;IAElI,KAAK,CAAC,QAAQ,CAAC,CAAC;IAEhB,kBAAkB,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,uBAAuB,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;IAE7G,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;QACd,MAAM,wBAAwB,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;IAC5D,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,cAAc,OAAO,CAAC,SAAS,eAAe,OAAO,CAAC,SAAS,wBAAwB,OAAO,CAAC,QAAQ,YAAY,CAAC,CAAC;IACjI,IAAI,OAAO,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;QACxC,OAAO,CAAC,KAAK,CAAC,qDAAqD,CAAC,CAAC;QACrE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,MAAM,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
package/dist/manifest.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
export type ManifestEntryType = 'directive' | 'skill' | 'rule';
|
|
1
2
|
export interface ManifestEntry {
|
|
2
3
|
id: string;
|
|
3
|
-
type:
|
|
4
|
+
type: ManifestEntryType;
|
|
4
5
|
path: string;
|
|
5
6
|
description: string;
|
|
6
7
|
version: string;
|
|
@@ -16,7 +17,7 @@ export interface FilterOptions {
|
|
|
16
17
|
category?: string;
|
|
17
18
|
required?: boolean;
|
|
18
19
|
tool?: string;
|
|
19
|
-
type?:
|
|
20
|
+
type?: ManifestEntryType;
|
|
20
21
|
}
|
|
21
22
|
export declare const packageRoot: string;
|
|
22
23
|
export declare function loadManifest(): Manifest;
|
package/dist/manifest.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC;AAE/D,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,iBAAiB,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,aAAa,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,iBAAiB,CAAC;CAC1B;AAGD,eAAO,MAAM,WAAW,QAAwB,CAAC;AAEjD,wBAAgB,YAAY,IAAI,QAAQ,CAMvC;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,aAAa,EAAE,EAAE,IAAI,EAAE,aAAa,GAAG,aAAa,EAAE,CAQ5F;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAEzF"}
|
package/dist/manifest.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AA2BzC,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1D,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAEjD,MAAM,UAAU,YAAY;IAC1B,MAAM,YAAY,GAAG,IAAI,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;IACxD,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,YAAY,0CAA0C,CAAC,CAAC;IACxG,CAAC;IACD,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,CAAa,CAAC;AACpE,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,OAAwB,EAAE,IAAmB;IACzE,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE;QAC9B,IAAI,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ;YAAE,OAAO,KAAK,CAAC;QACpE,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ;YAAE,OAAO,KAAK,CAAC;QAClF,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;YAAE,OAAO,KAAK,CAAC;QAChE,IAAI,IAAI,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI;YAAE,OAAO,KAAK,CAAC;QACxD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,OAAwB,EAAE,EAAU;IAC5D,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderEntryList.d.ts","sourceRoot":"","sources":["../src/renderEntryList.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAMnD,wBAAgB,eAAe,CAAC,OAAO,EAAE,aAAa,EAAE,GAAG,MAAM,CAMhE"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const MIN_UNDERLINE_WIDTH = 4;
|
|
2
|
+
const ID_COLUMN_WIDTH = 34;
|
|
3
|
+
const TYPE_COLUMN_WIDTH = 10;
|
|
4
|
+
export function renderEntryList(entries) {
|
|
5
|
+
const byCategory = groupByCategory(entries);
|
|
6
|
+
return Array.from(byCategory.entries())
|
|
7
|
+
.sort(([a], [b]) => a.localeCompare(b))
|
|
8
|
+
.map(([category, categoryEntries]) => renderCategory(category, categoryEntries))
|
|
9
|
+
.join('\n');
|
|
10
|
+
}
|
|
11
|
+
function groupByCategory(entries) {
|
|
12
|
+
const byCategory = new Map();
|
|
13
|
+
for (const entry of entries) {
|
|
14
|
+
const bucket = byCategory.get(entry.category) ?? [];
|
|
15
|
+
bucket.push(entry);
|
|
16
|
+
byCategory.set(entry.category, bucket);
|
|
17
|
+
}
|
|
18
|
+
return byCategory;
|
|
19
|
+
}
|
|
20
|
+
function renderCategory(category, entries) {
|
|
21
|
+
const lines = [`\n${category}`, '─'.repeat(Math.max(category.length, MIN_UNDERLINE_WIDTH))];
|
|
22
|
+
for (const entry of entries.sort((a, b) => a.id.localeCompare(b.id))) {
|
|
23
|
+
const marker = entry.required ? '★' : ' ';
|
|
24
|
+
lines.push(` ${marker} ${entry.id.padEnd(ID_COLUMN_WIDTH)} ${entry.type.padEnd(TYPE_COLUMN_WIDTH)} ${entry.description}`);
|
|
25
|
+
}
|
|
26
|
+
return lines.join('\n');
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=renderEntryList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderEntryList.js","sourceRoot":"","sources":["../src/renderEntryList.ts"],"names":[],"mappings":"AAEA,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAC9B,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAE7B,MAAM,UAAU,eAAe,CAAC,OAAwB;IACtD,MAAM,UAAU,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IAC5C,OAAO,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;SACpC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;SACtC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,eAAe,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,e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DED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../src/rules.ts"],"names":[],"mappings":"AAGA,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAa1D;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAIpF"}
|
package/dist/rules.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
export function detectRuleCategories(cwd) {
|
|
4
|
+
const categories = new Set();
|
|
5
|
+
if (existsSync(join(cwd, 'angular.json')))
|
|
6
|
+
categories.add('angular');
|
|
7
|
+
const packageJsonPath = join(cwd, 'package.json');
|
|
8
|
+
if (existsSync(packageJsonPath)) {
|
|
9
|
+
const pkg = readPackageJson(packageJsonPath);
|
|
10
|
+
if (pkg?.dependencies?.['@angular/core'] || pkg?.devDependencies?.['@angular/core']) {
|
|
11
|
+
categories.add('angular');
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return Array.from(categories).sort();
|
|
15
|
+
}
|
|
16
|
+
export function parseRuleCategories(value, cwd) {
|
|
17
|
+
if (!value || value === 'none')
|
|
18
|
+
return [];
|
|
19
|
+
if (value === 'auto')
|
|
20
|
+
return detectRuleCategories(cwd);
|
|
21
|
+
return Array.from(new Set(value.split(',').map((category) => category.trim()).filter(Boolean))).sort();
|
|
22
|
+
}
|
|
23
|
+
function readPackageJson(path) {
|
|
24
|
+
try {
|
|
25
|
+
return JSON.parse(readFileSync(path, 'utf8'));
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=rules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules.js","s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CAAC;AAED,SAAS,eAAe,CAAC,IAAY;IACnC,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAG3C,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
package/manifest.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"type": "directive",
|
|
7
7
|
"path": "directives/adaptive-routing.md",
|
|
8
8
|
"description": "Selects the lightest safe workflow path, relevant directives/skills, and handoff requirements based on task intent, risk, and touched surfaces.",
|
|
9
|
-
"version": "1.
|
|
9
|
+
"version": "1.4.0",
|
|
10
10
|
"required": true,
|
|
11
11
|
"category": "workflow",
|
|
12
12
|
"tools": [
|
|
@@ -382,6 +382,51 @@
|
|
|
382
382
|
"codex",
|
|
383
383
|
"cursor"
|
|
384
384
|
]
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"id": "angular-components-and-templates",
|
|
388
|
+
"type": "rule",
|
|
389
|
+
"path": "rules/angular/components-and-templates.md",
|
|
390
|
+
"description": "Angular component and template rules for typed, maintainable Angular UI changes.",
|
|
391
|
+
"version": "1.0.0",
|
|
392
|
+
"required": false,
|
|
393
|
+
"category": "angular",
|
|
394
|
+
"tools": [
|
|
395
|
+
"claude",
|
|
396
|
+
"copilot",
|
|
397
|
+
"codex",
|
|
398
|
+
"cursor"
|
|
399
|
+
]
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"id": "angular-project-structure",
|
|
403
|
+
"type": "rule",
|
|
404
|
+
"path": "rules/angular/project-structure.md",
|
|
405
|
+
"description": "Angular workspace and project-structure standards for agents working in Angular applications.",
|
|
406
|
+
"version": "1.0.0",
|
|
407
|
+
"required": false,
|
|
408
|
+
"category": "angular",
|
|
409
|
+
"tools": [
|
|
410
|
+
"claude",
|
|
411
|
+
"copilot",
|
|
412
|
+
"codex",
|
|
413
|
+
"cursor"
|
|
414
|
+
]
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"id": "angular-testing",
|
|
418
|
+
"type": "rule",
|
|
419
|
+
"path": "rules/angular/testing.md",
|
|
420
|
+
"description": "Angular testing rules for component, service, and integration-style Angular changes.",
|
|
421
|
+
"version": "1.0.0",
|
|
422
|
+
"required": false,
|
|
423
|
+
"category": "angular",
|
|
424
|
+
"tools": [
|
|
425
|
+
"claude",
|
|
426
|
+
"copilot",
|
|
427
|
+
"codex",
|
|
428
|
+
"cursor"
|
|
429
|
+
]
|
|
385
430
|
}
|
|
386
431
|
]
|
|
387
432
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-directives",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Reusable agent directives, skills, and CLI tooling for AI coding workflows",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Rob Simpson <rsimpson2@me.com>",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"dist/",
|
|
16
16
|
"directives/",
|
|
17
17
|
"skills/",
|
|
18
|
+
"rules/",
|
|
18
19
|
"templates/",
|
|
19
20
|
"manifest.json",
|
|
20
21
|
"README.md"
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: angular-components-and-templates
|
|
3
|
+
description: Angular component and template rules for typed, maintainable Angular UI changes.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
required: false
|
|
6
|
+
category: angular
|
|
7
|
+
tools:
|
|
8
|
+
- claude
|
|
9
|
+
- copilot
|
|
10
|
+
- codex
|
|
11
|
+
- cursor
|
|
12
|
+
source_urls:
|
|
13
|
+
- https://angular.dev/style-guide
|
|
14
|
+
- https://angular.dev/guide/components
|
|
15
|
+
- https://angular.dev/guide/templates
|
|
16
|
+
applies_to:
|
|
17
|
+
- src/app/**/*.component.ts
|
|
18
|
+
- src/app/**/*.component.html
|
|
19
|
+
- src/app/**/*.component.css
|
|
20
|
+
- src/app/**/*.component.scss
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# Angular Components and Templates Rules
|
|
24
|
+
|
|
25
|
+
**Load when:** Creating, changing, or reviewing Angular components, templates, component styles, inputs, outputs, lifecycle behavior, or view logic.
|
|
26
|
+
|
|
27
|
+
## Sources
|
|
28
|
+
|
|
29
|
+
Track source material explicitly so future updates can verify whether the rule is stale:
|
|
30
|
+
|
|
31
|
+
- Angular Style Guide — https://angular.dev/style-guide
|
|
32
|
+
- Angular Components Guide — https://angular.dev/guide/components
|
|
33
|
+
- Angular Templates Guide — https://angular.dev/guide/templates
|
|
34
|
+
|
|
35
|
+
## Rules
|
|
36
|
+
|
|
37
|
+
- Match the project's existing Angular style first, then Angular's current guidance.
|
|
38
|
+
- Prefer standalone components for new components unless the project is clearly NgModule-centered.
|
|
39
|
+
- Keep components focused on presentation and UI coordination. Move reusable business logic to services, utilities, or state primitives already used by the project.
|
|
40
|
+
- Keep templates declarative. Avoid hiding complex branching, transformations, or side effects inside template expressions.
|
|
41
|
+
- Type component inputs, outputs, and public component methods explicitly when they form a contract with templates, parents, or tests.
|
|
42
|
+
- Do not introduce `any` for template or component data. Narrow external data at the boundary before binding it.
|
|
43
|
+
- Preserve existing accessibility patterns. New interactive elements need keyboard, label, and semantic HTML coverage appropriate to the component.
|
|
44
|
+
- Avoid drive-by component rewrites, style-system changes, or broad file moves while making localized UI changes.
|
|
45
|
+
|
|
46
|
+
## Evidence
|
|
47
|
+
|
|
48
|
+
For component behavior changes, include one of:
|
|
49
|
+
|
|
50
|
+
- updated component/unit tests,
|
|
51
|
+
- existing tests that cover the changed behavior,
|
|
52
|
+
- or a stated reason tests are unavailable plus a lower-confidence fallback such as build/typecheck evidence.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: angular-project-structure
|
|
3
|
+
description: Angular workspace and project-structure standards for agents working in Angular applications.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
required: false
|
|
6
|
+
category: angular
|
|
7
|
+
tools:
|
|
8
|
+
- claude
|
|
9
|
+
- copilot
|
|
10
|
+
- codex
|
|
11
|
+
- cursor
|
|
12
|
+
source_urls:
|
|
13
|
+
- https://angular.dev/style-guide
|
|
14
|
+
- https://angular.dev/tools/cli
|
|
15
|
+
- https://angular.dev/reference/configs/workspace-config
|
|
16
|
+
applies_to:
|
|
17
|
+
- angular.json
|
|
18
|
+
- package.json
|
|
19
|
+
- src/app/**/*.ts
|
|
20
|
+
- src/app/**/*.html
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# Angular Project Structure Rules
|
|
24
|
+
|
|
25
|
+
**Load when:** The project contains `angular.json` or `@angular/core`, or the task touches Angular app structure, routes, components, services, templates, or tests.
|
|
26
|
+
|
|
27
|
+
## Sources
|
|
28
|
+
|
|
29
|
+
Track source material explicitly so future updates can verify whether the rule is stale:
|
|
30
|
+
|
|
31
|
+
- Angular Style Guide — https://angular.dev/style-guide
|
|
32
|
+
- Angular CLI Overview — https://angular.dev/tools/cli
|
|
33
|
+
- Angular Workspace Configuration — https://angular.dev/reference/configs/workspace-config
|
|
34
|
+
|
|
35
|
+
## Rules
|
|
36
|
+
|
|
37
|
+
- Prefer Angular CLI-generated structure and names unless the project already has a stronger local convention.
|
|
38
|
+
- Keep related files together by feature or component. Do not create broad catch-all folders for unrelated utilities.
|
|
39
|
+
- Keep Angular-specific code under the existing app/source root; do not introduce a parallel structure unless project evidence requires it.
|
|
40
|
+
- Follow existing project routing, state-management, and shared-library boundaries before adding new locations.
|
|
41
|
+
- Treat `angular.json`, builder targets, and TypeScript config edits as project-wide changes. Keep them narrow and verify with the relevant configured Angular command.
|
|
42
|
+
- Do not add framework rules from another ecosystem, such as React or Vue, to Angular-only work.
|
|
43
|
+
|
|
44
|
+
## Evidence
|
|
45
|
+
|
|
46
|
+
For behavior-changing Angular work, prefer the project's configured commands. Common examples are:
|
|
47
|
+
|
|
48
|
+
- `ng test` or the project test script
|
|
49
|
+
- `ng build` or the project build script
|
|
50
|
+
- `ng lint` or the project lint script when configured
|
|
51
|
+
|
|
52
|
+
If the project does not expose Angular CLI commands, state the fallback command and lower confidence.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: angular-testing
|
|
3
|
+
description: Angular testing rules for component, service, and integration-style Angular changes.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
required: false
|
|
6
|
+
category: angular
|
|
7
|
+
tools:
|
|
8
|
+
- claude
|
|
9
|
+
- copilot
|
|
10
|
+
- codex
|
|
11
|
+
- cursor
|
|
12
|
+
source_urls:
|
|
13
|
+
- https://angular.dev/guide/testing
|
|
14
|
+
- https://angular.dev/style-guide
|
|
15
|
+
applies_to:
|
|
16
|
+
- src/app/**/*.spec.ts
|
|
17
|
+
- src/app/**/*.component.ts
|
|
18
|
+
- src/app/**/*.service.ts
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
# Angular Testing Rules
|
|
22
|
+
|
|
23
|
+
**Load when:** Adding, changing, or reviewing Angular tests, or making Angular behavior changes that should be covered by tests.
|
|
24
|
+
|
|
25
|
+
## Sources
|
|
26
|
+
|
|
27
|
+
Track source material explicitly so future updates can verify whether the rule is stale:
|
|
28
|
+
|
|
29
|
+
- Angular Testing Guide — https://angular.dev/guide/testing
|
|
30
|
+
- Angular Style Guide — https://angular.dev/style-guide
|
|
31
|
+
|
|
32
|
+
## Rules
|
|
33
|
+
|
|
34
|
+
- Prefer behavior-focused tests over implementation-detail tests. Assert visible output, emitted events, service effects, and observable state rather than private methods.
|
|
35
|
+
- For component changes, update or add component tests unless existing coverage already proves the changed behavior.
|
|
36
|
+
- For service changes, test the service contract and failure paths without over-mocking project-owned logic.
|
|
37
|
+
- Keep test setup local and readable. Do not add shared testing helpers unless at least two call sites need the same project-specific setup.
|
|
38
|
+
- Preserve the project's current Angular test runner and utilities. Do not migrate Karma/Jasmine/Jest/Vitest/Testing Library choices as part of a feature fix.
|
|
39
|
+
- Avoid brittle snapshots for Angular templates unless the project already uses them and the assertion is intentionally structural.
|
|
40
|
+
|
|
41
|
+
## Evidence
|
|
42
|
+
|
|
43
|
+
Use the narrowest configured test command that covers the touched behavior, then broaden only when needed. If no narrow command exists, use the project test script or Angular CLI test target and state the scope.
|
package/templates/AGENTS.md
CHANGED
|
@@ -40,10 +40,10 @@ Delete this comment block when done.
|
|
|
40
40
|
|
|
41
41
|
The root file provides project-specific context plus compact routing pointers: commands, repo layout, local constraints, and any client-specific workflow reminders.
|
|
42
42
|
|
|
43
|
-
Workflow path selection, directive loading, skill loading, and evidence requirements live in `directives/adaptive-routing.md`.
|
|
43
|
+
Workflow path selection, directive loading, skill loading, rule selection, and evidence requirements live in `directives/adaptive-routing.md`.
|
|
44
44
|
|
|
45
45
|
After routing, report:
|
|
46
|
-
`Route: <path>; using <directive/skill files>; evidence: <checks>.`
|
|
46
|
+
`Route: <path>; using <directive/skill files>; rules: <rule files or none>; evidence: <checks>.`
|
|
47
47
|
|
|
48
48
|
When adaptive routing selects Full Path or another route that invokes the full
|
|
49
49
|
phase sequence, no skipping steps:
|
package/templates/CLAUDE.md
CHANGED
|
@@ -40,10 +40,10 @@ Delete this comment block when done.
|
|
|
40
40
|
|
|
41
41
|
The root file provides project-specific context plus compact routing pointers: commands, repo layout, local constraints, and any client-specific workflow reminders.
|
|
42
42
|
|
|
43
|
-
Workflow path selection, directive loading, skill loading, and evidence requirements live in `directives/adaptive-routing.md`.
|
|
43
|
+
Workflow path selection, directive loading, skill loading, rule selection, and evidence requirements live in `directives/adaptive-routing.md`.
|
|
44
44
|
|
|
45
45
|
After routing, report:
|
|
46
|
-
`Route: <path>; using <directive/skill files>; evidence: <checks>.`
|
|
46
|
+
`Route: <path>; using <directive/skill files>; rules: <rule files or none>; evidence: <checks>.`
|
|
47
47
|
|
|
48
48
|
When adaptive routing selects Full Path or another route that invokes the full
|
|
49
49
|
phase sequence, no skipping steps:
|
|
@@ -59,10 +59,10 @@ one commit. Each behavior gets its own test-commit + implementation-commit pair.
|
|
|
59
59
|
|
|
60
60
|
The root file provides project-specific context plus compact routing pointers: commands, repo layout, local constraints, and any client-specific workflow reminders.
|
|
61
61
|
|
|
62
|
-
Workflow path selection, directive loading, skill loading, and evidence requirements live in `directives/adaptive-routing.md`.
|
|
62
|
+
Workflow path selection, directive loading, skill loading, rule selection, and evidence requirements live in `directives/adaptive-routing.md`.
|
|
63
63
|
|
|
64
64
|
After routing, report:
|
|
65
|
-
`Route: <path>; using <directive/skill files>; evidence: <checks>.`
|
|
65
|
+
`Route: <path>; using <directive/skill files>; rules: <rule files or none>; evidence: <checks>.`
|
|
66
66
|
|
|
67
67
|
## Forbidden
|
|
68
68
|
|