opencode-skills-collection 4.0.19 → 4.0.21

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 (37) hide show
  1. package/bundled-skills/.antigravity-install-manifest.json +5 -1
  2. package/bundled-skills/agents-generator/SKILL.md +163 -0
  3. package/bundled-skills/agents-generator/assets/agents-full.md +452 -0
  4. package/bundled-skills/agents-generator/assets/agents-minimal.md +60 -0
  5. package/bundled-skills/agents-generator/assets/agents-nested.md +73 -0
  6. package/bundled-skills/agents-generator/assets/architecture.md +43 -0
  7. package/bundled-skills/agents-generator/assets/backend.md +35 -0
  8. package/bundled-skills/agents-generator/assets/claude.md +39 -0
  9. package/bundled-skills/agents-generator/assets/database.md +40 -0
  10. package/bundled-skills/agents-generator/assets/forms.md +56 -0
  11. package/bundled-skills/agents-generator/assets/frontend-patterns.md +44 -0
  12. package/bundled-skills/agents-generator/assets/git-workflow.md +61 -0
  13. package/bundled-skills/agents-generator/assets/i18n.md +50 -0
  14. package/bundled-skills/agents-generator/assets/platform.md +54 -0
  15. package/bundled-skills/agents-generator/assets/sdd-workflow.md +46 -0
  16. package/bundled-skills/agents-generator/assets/server-actions.md +36 -0
  17. package/bundled-skills/agents-generator/assets/styling.md +48 -0
  18. package/bundled-skills/agents-generator/assets/testing.md +67 -0
  19. package/bundled-skills/agents-generator/references/decision-matrix.md +311 -0
  20. package/bundled-skills/agents-generator/references/example-output/README.md +78 -0
  21. package/bundled-skills/agents-generator/references/template-filling-guide.md +67 -0
  22. package/bundled-skills/docs/integrations/jetski-cortex.md +3 -3
  23. package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +1 -1
  24. package/bundled-skills/docs/maintainers/repo-growth-seo.md +1 -1
  25. package/bundled-skills/docs/maintainers/skills-update-guide.md +1 -1
  26. package/bundled-skills/docs/users/aas-core.md +1 -1
  27. package/bundled-skills/docs/users/bundles.md +1 -1
  28. package/bundled-skills/docs/users/claude-code-skills.md +1 -1
  29. package/bundled-skills/docs/users/gemini-cli-skills.md +1 -1
  30. package/bundled-skills/docs/users/kiro-integration.md +1 -1
  31. package/bundled-skills/docs/users/usage.md +3 -3
  32. package/bundled-skills/docs/users/visual-guide.md +4 -4
  33. package/bundled-skills/gh-attach/SKILL.md +151 -0
  34. package/bundled-skills/talivia-agent-kit/SKILL.md +139 -0
  35. package/bundled-skills/unified-ai-gateway/SKILL.md +214 -0
  36. package/package.json +1 -1
  37. package/skills_index.json +100 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "updatedAt": "2026-08-02T01:28:40.906Z",
3
+ "updatedAt": "2026-08-04T01:18:45.477Z",
4
4
  "entries": [
5
5
  "00-andruia-consultant",
6
6
  "007",
@@ -55,6 +55,7 @@
55
55
  "agentic-actions-auditor",
56
56
  "agentmail",
57
57
  "agentphone",
58
+ "agents-generator",
58
59
  "agents-md",
59
60
  "agents-v2-py",
60
61
  "agenttrace-session-audit",
@@ -878,6 +879,7 @@
878
879
  "geminiignore-finops",
879
880
  "geo-fundamentals",
880
881
  "geoffrey-hinton",
882
+ "gh-attach",
881
883
  "gh-image",
882
884
  "gh-review-requests",
883
885
  "gha-security-review",
@@ -1756,6 +1758,7 @@
1756
1758
  "tailwind-design-system",
1757
1759
  "tailwind-patterns",
1758
1760
  "taisly-social-media-posting",
1761
+ "talivia-agent-kit",
1759
1762
  "tanstack-query-expert",
1760
1763
  "task-intelligence",
1761
1764
  "tavily-web",
@@ -1859,6 +1862,7 @@
1859
1862
  "ui-visual-validator",
1860
1863
  "uizze-ui-research",
1861
1864
  "uncle-bob-craft",
1865
+ "unified-ai-gateway",
1862
1866
  "uniprot-database",
1863
1867
  "unit-testing-test-generate",
1864
1868
  "unity-ai-game-creator",
@@ -0,0 +1,163 @@
1
+ ---
2
+ name: agents-generator
3
+ description: "Generate project-specific AGENTS.md and companion rules by analyzing a codebase. Supports full, minimal, update, and dry-run modes with package-manager detection, monorepos, backups, managed blocks, confidence scoring, and command validation."
4
+ category: developer-tools
5
+ risk: critical
6
+ source: https://github.com/OJPalenzuela/agents-generator/tree/7a3201208a01bd25e69ad11e665efc1392f5356a
7
+ source_repo: OJPalenzuela/agents-generator
8
+ source_type: community
9
+ date_added: "2026-08-02"
10
+ author: OJPalenzuela
11
+ tags: [agents-md, project-conventions, developer-tools, codebase-analysis, ai-agents]
12
+ tools: [claude, cursor, copilot, opencode, codex, gemini]
13
+ license: MIT
14
+ license_source: https://github.com/OJPalenzuela/agents-generator/blob/7a3201208a01bd25e69ad11e665efc1392f5356a/LICENSE
15
+ allowed-tools: Read Write Edit Bash(ls:*) Bash(git:*) Bash(tree:*) Bash(find:*) Grep Glob WebFetch
16
+ metadata:
17
+ author: OJPalenzuela
18
+ version: "1.2.3"
19
+ ---
20
+
21
+ # Skill: agents-generator
22
+
23
+ > [!WARNING]
24
+ > **[Authorized Use Only]** This skill writes or updates `AGENTS.md`, `.agents/rules/`, optional platform instruction files, and timestamped backups in the target project. Read the detected inputs and proposed outputs first, obtain approval before changing target files, and use it only inside the user's intended project scope.
25
+
26
+ ## When to Use
27
+
28
+ Use this skill when the user wants to:
29
+
30
+ - create a complete, project-specific `AGENTS.md` instead of generic agent rules;
31
+ - generate companion rules for detected frameworks, tests, databases, styling, or monorepo packages;
32
+ - create a minimal `AGENTS.md`, preview changes without writing, or update existing instructions after the stack changes.
33
+
34
+ Do not use it to invent conventions without inspecting the target project, to overwrite instructions outside the user's scope, or to treat generated guidance as a substitute for human review.
35
+
36
+ Generates a tailored AGENTS.md + `.agents/rules/*.md` for the target project — not a template with placeholders, but a living document that matches the project's real toolchain.
37
+
38
+ ## What you get
39
+
40
+ From a project that uses **Bun + Next.js 16 + Tailwind + Vitest + Server Actions**, the skill produces:
41
+
42
+ ```
43
+ AGENTS.md
44
+ ├── Setup commands: bun install, bun dev, bun run test:run, bun doctor
45
+ ├── Verification Cycle: bunx tsc --noEmit → bun run lint → bun run test:run → bun doctor
46
+ ├── Conventions: "Bun always. Plain TypeScript types + guards."
47
+ └── Architecture → .agents/rules/architecture.md
48
+
49
+ .agents/rules/
50
+ ├── architecture.md ← ASCII diagram with real directories, exact versions
51
+ ├── frontend-patterns.md ← Component rules, state locations, trust boundaries
52
+ ├── server-actions.md ← downloadVideo() flow, DownloadResult type, rate limiter
53
+ ├── testing.md ← "74 tests in 5 files", vitest commands, mock patterns
54
+ ├── git-workflow.md ← Conventional commits, pre-commit checks
55
+ └── sdd-workflow.md ← Preflight defaults, post-apply verification
56
+ ```
57
+
58
+ Rules NOT generated: `backend.md` (no NestJS), `database.md` (no ORM), `i18n.md` (hardcoded Spanish), `forms.md` (manual inputs), `styling.md` (Tailwind in frontend rules).
59
+
60
+ ## Activation Contract
61
+
62
+ Generate AGENTS.md + `.agents/rules/*.md` for the target project. Never guess — read the project's actual files first.
63
+
64
+ ### Mode selection
65
+
66
+ | User says | Mode | Output |
67
+ |-----------|------|--------|
68
+ | "simple AGENTS.md", "just the basics", "minimal" | **Minimal** | Single `AGENTS.md` (~30 lines, no rule files) |
69
+ | "full AGENTS.md", "with rules", "complete", or default | **Full** | `AGENTS.md` + `.agents/rules/*.md` |
70
+ | "update AGENTS.md", "refresh", "my stack changed" | **Update** | Diff existing, regenerate only what changed |
71
+
72
+ ### Dry-run mode
73
+
74
+ If the user asks to "preview", "show what would change", "dry-run": run all detection but do NOT write files. Show detection summary, files that would be created, skipped rules, and sample output.
75
+
76
+ ## Hard Rules
77
+
78
+ - **Read before writing.** Read `package.json`, all config files, and directory structure before generating anything.
79
+ - **Detect package manager FIRST.** Check lockfiles: `bun.lock`→bun, `pnpm-lock.yaml`→pnpm, `package-lock.json`→npm, `yarn.lock`→yarn. NEVER default to npm. Every command uses the detected PM.
80
+ - **Generate only what applies.** No backend rules for frontend-only. No database rules without ORM.
81
+ - **Auto-format and lint generated files.** Run `[format cmd]` and `[lint cmd]` on generated files only — never the whole project. These are fast, safe operations.
82
+ - **Validate commands.** Every command in output must exist as a script key in `package.json`.
83
+ - **No placeholders.** Scan output for `{{`, `TODO`, `add here`, `...`. Reject if any remain.
84
+ - **Backup first.** If files exist, copy to `.agents/backups/` with timestamp.
85
+
86
+ ## Execution Steps
87
+
88
+ ### Common
89
+
90
+ 1. `git rev-parse --show-toplevel` → project root.
91
+ 2. **Detect package manager FIRST**: check lockfiles. `bun.lock`→bun, `pnpm-lock.yaml`→pnpm, `package-lock.json`→npm, `yarn.lock`→yarn. Never default to npm.
92
+ 3. Read `package.json` (scripts, deps, workspaces). Save scripts for validation.
93
+ 4. Read config files and explore directory structure.
94
+ 5. Select mode (ask if ambiguous).
95
+
96
+ ### Full mode
97
+
98
+ 1. Read `assets/agents-full.md` — this is the AGENTS.md structure with all sections and filling rules.
99
+ 2. Read project files and fill every placeholder with real data. Never use generic text.
100
+ 3. Generate `AGENTS.md` at project root. Wrap content in `<!-- AGENTS-GENERATED-START -->` / `<!-- AGENTS-GENERATED-END -->`.
101
+ 4. For each applicable rule category, read the corresponding template from `assets/` and generate the rule file in `.agents/rules/`.
102
+ 5. If Claude detected (`.claude/` or `CLAUDE.md`): generate thin `CLAUDE.md` from `assets/claude.md`.
103
+ 6. If platform files detected: generate from `assets/platform.md`.
104
+
105
+ ### Minimal mode
106
+
107
+ 1. Read `assets/agents-minimal.md` — 30-line agents.md standard format.
108
+ 2. Generate single `AGENTS.md`.
109
+
110
+ ### Update mode
111
+
112
+ 1. Backup existing files.
113
+ 2. Re-detect project state.
114
+ 3. Diff old vs new. Regenerate only changed categories.
115
+
116
+ ### Post-generation
117
+
118
+ - Run `[format cmd]` on the generated files only.
119
+ - Run `[lint cmd]` on the generated files only.
120
+ - Scan for `{{`, `TODO`, `...`. Fix any found.
121
+ - Verify all commands exist in package.json scripts.
122
+ - If AGENTS.md > 300 lines, warn. If > 500, move content to rule files.
123
+ - Summarize all changes using conventional commit format before declaring done.
124
+ - Report: what was detected, generated, skipped, and confidence score.
125
+
126
+ ## Output Contract
127
+
128
+ Return:
129
+ - Mode used and why
130
+ - Files created/modified
131
+ - Detection summary (all categories)
132
+ - Rules generated and skipped (with reason)
133
+ - Confidence score
134
+
135
+ ## Limitations
136
+
137
+ - Generated instructions are proposals and require human review before they are adopted or committed.
138
+ - Command validation is limited to scripts and files visible in the target project; it cannot prove that tools, services, or platform-specific commands will work in every environment.
139
+ - The skill does not authorize writes outside the intended project scope or replace project-specific security, build, or deployment review.
140
+
141
+ ## References
142
+
143
+ | Priority | File | Purpose |
144
+ |----------|------|---------|
145
+ | **Required** | `assets/agents-full.md` | Full AGENTS.md template with all 25+ sections and filling rules |
146
+ | **Required** | `assets/agents-minimal.md` | 30-line agents.md standard template |
147
+ | Full mode | `assets/architecture.md` | Architecture rules template |
148
+ | Full mode | `assets/frontend-patterns.md` | Frontend patterns template |
149
+ | Full mode | `assets/server-actions.md` | Server actions / backend template |
150
+ | Full mode | `assets/testing.md` | Testing strategy template |
151
+ | Full mode | `assets/git-workflow.md` | Git workflow template |
152
+ | Full mode | `assets/sdd-workflow.md` | SDD workflow template |
153
+ | Full mode | `assets/styling.md` | Styling rules template |
154
+ | Full mode | `assets/forms.md` | Form patterns template |
155
+ | Full mode | `assets/database.md` | Database rules template |
156
+ | Full mode | `assets/i18n.md` | i18n rules template |
157
+ | Full mode | `assets/backend.md` | Backend/NestJS template |
158
+ | Conditional | `assets/claude.md` | CLAUDE.md — only if Claude detected |
159
+ | Conditional | `assets/platform.md` | Multi-platform files |
160
+ | Conditional | `assets/agents-nested.md` | Monorepo nested AGENTS.md |
161
+ | Reference | `references/decision-matrix.md` | Full detection logic and edge cases |
162
+ | Reference | `references/example-output/README.md` | Quality benchmark |
163
+ | Reference | `references/template-filling-guide.md` | Placeholder filling rules |
@@ -0,0 +1,452 @@
1
+ # AGENTS.md — Template (Full Mode)
2
+
3
+ Replace `{{PLACEHOLDER}}` markers with detected project values. Remove sections whose condition is not met.
4
+
5
+ This template produces the **rich** AGENTS.md. For minimal (agents.md standard), use `agents-minimal.md`. For monorepo nested files, use `agents-nested.md`.
6
+
7
+ ```markdown
8
+ # AGENTS.md
9
+
10
+ > Compatible with the [agents.md](https://agents.md) standard (60k+ projects). Specific rules in `.agents/rules/` — {{RULE_CATEGORIES_LIST}}.
11
+
12
+ ## Project Overview
13
+
14
+ {{PROJECT_OVERVIEW}}
15
+
16
+ {{DOC_IMPORTS}}
17
+
18
+ {{WHO_USES_THIS}}
19
+
20
+ ## Setup commands
21
+
22
+ {{SETUP_COMMANDS_BULLETS}}
23
+
24
+ {{READ_THIS_FIRST}}
25
+
26
+ ## Source Files
27
+
28
+ {{SOURCE_FILE_LIST}}
29
+
30
+ ## Where to edit
31
+
32
+ {{WHERE_TO_EDIT}}
33
+
34
+ ## Essential Commands
35
+
36
+ | Command | Purpose | When |
37
+ | ------- | ------- | ---- |
38
+
39
+ {{ESSENTIAL_COMMANDS}}
40
+
41
+ {{ENVIRONMENT_VARIABLES}}
42
+
43
+ ## Verification Cycle
44
+
45
+ {{VERIFICATION_CYCLE_INTRO}}
46
+ ```
47
+
48
+ {{VERIFICATION_CYCLE}}
49
+
50
+ ```
51
+
52
+ {{E2E_MATRIX}}
53
+ {{MONOREPO_REBUILD_NOTE}}
54
+
55
+ ## Before committing
56
+
57
+ {{BEFORE_COMMIT_CHECKLIST}}
58
+
59
+ ## Pre-validate
60
+
61
+ {{PRE_VALIDATE}}
62
+
63
+ ## Code Style
64
+
65
+ {{CODE_STYLE}}
66
+
67
+ {{IO_CONTRACT}}
68
+
69
+ ## Hard Rules
70
+
71
+ {{HARD_RULES}}
72
+
73
+ ## Prohibitions
74
+
75
+ {{PROHIBITIONS}}
76
+
77
+ ## Boundaries
78
+
79
+ {{BOUNDARIES}}
80
+
81
+ {{GENERATED_ARTIFACTS_POLICY}}
82
+
83
+ {{SUBSYSTEM_RULES}}
84
+
85
+ ## Global Conventions
86
+
87
+ {{GLOBAL_CONVENTIONS}}
88
+
89
+ {{ARCHITECTURE_DECISIONS}}
90
+
91
+ {{DOC_UPDATE_CHECKLIST}}
92
+
93
+ {{INTENT_ROUTING_TABLE}}
94
+
95
+ {{ERROR_TAXONOMY}}
96
+
97
+ {{WRITING_STYLE_GUIDE}}
98
+
99
+ {{GOTCHAS}}
100
+
101
+ {{SSH_TROUBLESHOOTING}}
102
+
103
+ ## Definition of Done
104
+
105
+ {{DEFINITION_OF_DONE}}
106
+
107
+ {{TASK_GUIDES}}
108
+
109
+ {{CONTRIBUTION_GUARDRAILS}}
110
+
111
+ {{VERSIONING_POLICY}}
112
+
113
+ {{RELEASING_SECTION}}
114
+
115
+ ## PR instructions
116
+
117
+ {{PR_INSTRUCTIONS}}
118
+
119
+ {{AGENT_DISCLOSURE}}
120
+
121
+ {{RULE_FILE_LINKS}}
122
+
123
+ {{CODEGRAPH_SECTION}}
124
+ ```
125
+
126
+ ## Always-included sections
127
+
128
+ ### `{{PROJECT_OVERVIEW}}`
129
+
130
+ One sentence. Package.json `description` or inferred.
131
+
132
+ ### `{{SETUP_COMMANDS_BULLETS}}`
133
+
134
+ 3-5 bullets: install, dev, build, test, lint. Format: `- <description>: \`<command>\``.
135
+
136
+ ### `{{SOURCE_FILE_LIST}}`
137
+
138
+ Flat tree with one-line purpose per file. Then a **feature-to-file table**:
139
+
140
+ ```
141
+ ## Feature map
142
+ | Feature | Files |
143
+ |---------|-------|
144
+ | CLI entry | `src/cli.ts` |
145
+ | Core logic | `src/add.ts` |
146
+ ```
147
+
148
+ 5-8 rows mapping common operations to exact files. This is more useful to agents than the tree alone.
149
+
150
+ ### `{{WHERE_TO_EDIT}}`
151
+
152
+ Same as feature map but framed as "What to edit for X": task → files. If Source Files already has both, this can be lighter.
153
+
154
+ ### `{{ESSENTIAL_COMMANDS}}`
155
+
156
+ Table with 3 columns: Command | Purpose | **When**. Add a "when to run" decision column:
157
+
158
+ ```
159
+ | `pnpm test` | Run all tests | Fast iteration |
160
+ | `pnpm test:run` | Single-run tests | Before committing |
161
+ | `pnpm typecheck` | TypeScript check | Before committing |
162
+ ```
163
+
164
+ ### `{{VERIFICATION_CYCLE_INTRO}}`
165
+
166
+ "After every code change. Do not mark a task complete without passing:" or, if E2E matrix exists: "Run the smallest relevant verification first."
167
+
168
+ ### `{{BEFORE_COMMIT_CHECKLIST}}`
169
+
170
+ 3-4 items: verification cycle, format check, lockfile verification.
171
+
172
+ ### `{{CODE_STYLE}}`
173
+
174
+ 2-4 project-specific rules. No generic advice.
175
+
176
+ ### `{{PRE_VALIDATE}}`
177
+ Commands to run EXACTLY what the pre-commit hook runs, to avoid slow CI lint-staged failures. Format:
178
+ ```
179
+ - Run `{{PRE_COMMIT_CMD}}` on changed files before committing — this is what CI runs.
180
+ ```
181
+ Detect from: `.githooks/pre-commit`, `lint-staged` config, `.husky/pre-commit`. Read the actual hook to get exact commands.
182
+
183
+ ### `{{HARD_RULES}}`
184
+
185
+ 2-3 numbered, non-negotiable rules. Violating = rejected. Detect from: .env.example → secrets rule; tests/ → test rule; monorepo → contract sync rule.
186
+
187
+ ### `{{PROHIBITIONS}}`
188
+
189
+ 2-3 "**Never** do X" bullets. Bold the word Never. Detect from project context:
190
+
191
+ - Universal: "**Never** create README or markdown docs unless explicitly asked."
192
+ - If TypeScript strict: "**Never** use `any` types or `as any` assertions."
193
+ - If release scripts exist: "**Never** bump version numbers in feature PRs."
194
+ - If generated build output exists: "**Never** edit generated files by hand."
195
+ - If monorepo: "**Never** push directly to main on upstream."
196
+
197
+ ### `{{BOUNDARIES}}`
198
+
199
+ Two subsections: "Ask first" and "Never". Detect from project: if monorepo → cross-package refactor rule. If ORM → destructive data rule. If build output → generated files rule. Secrets and destructive git are universal.
200
+
201
+ ### `{{AGENT_DISCLOSURE}}`
202
+
203
+ If CONTRIBUTING.md or PR template exists, add agent attribution rules. Format:
204
+
205
+ ```
206
+ - All agent-drafted GitHub content (PR comments, reviews, issues) must include attribution footer.
207
+ - Never @mention or tag individuals unless explicitly authorized.
208
+ - Drafted-by: footer required on all agent-generated GitHub messages.
209
+ ```
210
+
211
+ ### `{{GLOBAL_CONVENTIONS}}`
212
+
213
+ 5-8 bullets: package manager, import conventions, naming, language, validation approach.
214
+
215
+ ### `{{DEFINITION_OF_DONE}}`
216
+
217
+ 4-6 numbered checklist items. Include: typecheck/lint/tests, new tests, docs updated, no warnings.
218
+
219
+ ### `{{PR_INSTRUCTIONS}}`
220
+
221
+ 2-3 bullets. Include the **"Goal (pick one per PR)"** scoping pattern if the project has a PR template:
222
+
223
+ ```
224
+ - Pick ONE goal per PR. Frame the title to reflect it.
225
+ - Conventional commits: `feat:`, `fix:`, `refactor:`, `test:`, `chore:`.
226
+ - No AI attribution in commits.
227
+ ```
228
+
229
+ ## Conditional sections (detect and include)
230
+
231
+ ### `{{WHO_USES_THIS}}`
232
+
233
+ CLI tool, API, or SDK consumed by AI agents:
234
+
235
+ ```
236
+ ## Who uses this
237
+
238
+ This CLI's primary consumers include AI agents (Claude Code, Cursor).
239
+ Error messages, output format, and flag design directly affect agent success rates.
240
+ Every error message will be parsed by an AI to decide its next action.
241
+ ```
242
+
243
+ ### `{{READ_THIS_FIRST}}`
244
+
245
+ If `docs/` or `doc/` has 3+ markdown files. Ordered list of files to read before making changes.
246
+
247
+ ### `{{ENVIRONMENT_VARIABLES}}`
248
+
249
+ If `.env.example`, `.env`, or `process.env.` calls found. Table: Variable | Required | Purpose. 3-8 vars.
250
+
251
+ ### `{{E2E_MATRIX}}`
252
+
253
+ If the project has both unit tests and E2E tests:
254
+
255
+ ```
256
+ | Change | Unit tests | E2E tests |
257
+ |--------|:----------:|:---------:|
258
+ | New feature | Required | Required |
259
+ | Modify behavior | Required | If behavior changes |
260
+ | Bug fix | Required | If regression risk |
261
+ | Refactor | Required | Not needed |
262
+ ```
263
+
264
+ ### `{{IO_CONTRACT}}`
265
+
266
+ For CLI tools or APIs:
267
+
268
+ ```
269
+ ## I/O contract
270
+ - **stdout** is data — JSON, structured output, machine-readable.
271
+ - **stderr** is everything else — progress, warnings, hints.
272
+ - Never mix them. Mixing corrupts pipe chains.
273
+ ```
274
+
275
+ ### `{{GENERATED_ARTIFACTS_POLICY}}`
276
+
277
+ If the project has build output directories (dist/, build/, .next/):
278
+
279
+ ```
280
+ ## Generated artifacts
281
+
282
+ Source-first: edit files in `src/`, `lib/`, `app/`. Generated output in `dist/`
283
+ and `build/` is rebuilt — never edit it directly. Stage generated files only
284
+ for release PRs or when the build output itself is the change.
285
+ ```
286
+
287
+ ### `{{SUBSYSTEM_RULES}}`
288
+
289
+ If monorepo or projects with distinct subdirectories (packages/, apps/, cli/):
290
+
291
+ ```
292
+ ## Subsystem rules
293
+
294
+ ### `packages/dashboard/`
295
+ - Never use native browser dialogs. Use shadcn/ui instead.
296
+ - Use kebab-case for file and folder names.
297
+ ```
298
+
299
+ One subsection per subdirectory with non-obvious rules. Read existing AGENTS.md in subdirs for clues.
300
+
301
+ ### `{{ARCHITECTURE_DECISIONS}}`
302
+
303
+ 1-3 non-obvious choices with their "why":
304
+
305
+ ```
306
+ - **Why structured errors**: AI agents parse stderr fields to decide next actions.
307
+ Never use bare error strings for user-facing failures.
308
+ - **Why pnpm**: workspace protocol requires pnpm. npm/yarn won't resolve it.
309
+ ```
310
+
311
+ ### `{{DOC_UPDATE_CHECKLIST}}`
312
+
313
+ If the project has multiple documentation surfaces:
314
+
315
+ ```
316
+ ## Documentation checklist
317
+
318
+ When adding or changing user-facing features, update ALL:
319
+ 1. `cli/src/output.rs` — help output
320
+ 2. `README.md` — options table, examples
321
+ 3. `docs/` — MDX pages
322
+ 4. Inline doc comments in source
323
+ ```
324
+
325
+ ### `{{INTENT_ROUTING_TABLE}}`
326
+
327
+ If the project has multiple entrypoints, tools, or skills:
328
+
329
+ ```
330
+ ## Entrypoints by intent
331
+
332
+ | Intent | Entrypoint |
333
+ |--------|-----------|
334
+ | Reproduce from README | `ai-research-reproduction` |
335
+ | Environment setup | `env-and-assets-bootstrap` |
336
+ ```
337
+
338
+ Maps user goals to the correct entrypoint.
339
+
340
+ ### `{{ERROR_TAXONOMY}}`
341
+
342
+ For CLI/API projects with structured errors:
343
+
344
+ ```
345
+ ## Error types
346
+
347
+ | Failure | Constructor |
348
+ |---------|------------|
349
+ | Invalid flag/arg | `errs.NewValidationError(...).WithParam("--flag")` |
350
+ | Network failure | `errs.NewNetworkError(...)` |
351
+ | API error | Return as-is — never re-wrap |
352
+ ```
353
+
354
+ ### `{{WRITING_STYLE_GUIDE}}`
355
+
356
+ For projects that produce documentation or AI-facing content:
357
+
358
+ ```
359
+ ## Writing style
360
+
361
+ - Structure: H2/H3 hierarchy, short paragraphs (2-4 sentences)
362
+ - Tone: direct, instructional, second person
363
+ - Clarity: active voice, specific over vague, one idea per section
364
+ - Budget: challenge each paragraph — does it justify its token cost?
365
+ ```
366
+
367
+ ### `{{GOTCHAS}}`
368
+
369
+ If platform-specific issues exist (Windows, NTFS, Docker, sandbox):
370
+
371
+ ```
372
+ ## Gotchas
373
+ - `npx vite build` hangs on NTFS — use `node node_modules/vite/bin/vite.js build`
374
+ - Server startup takes 30-60s — don't assume failure immediately
375
+ ```
376
+
377
+ ### `{{SSH_TROUBLESHOOTING}}`
378
+ Only if git remote uses SSH (`git@github.com`):
379
+ ```
380
+ ## Git SSH troubleshooting
381
+ If Git fails with `sign_and_send_pubkey` or `Permission denied`:
382
+ - **Do NOT** switch remotes to HTTPS or retry repeatedly.
383
+ - Ask the user to ensure their SSH agent is available and unlocked.
384
+ ```
385
+
386
+ ### `{{TASK_GUIDES}}`
387
+
388
+ 1-3 step-by-step guides for repeatable operations. 3-4 steps each.
389
+
390
+ ### `{{CONTRIBUTION_GUARDRAILS}}`
391
+
392
+ If `.github/CONTRIBUTING.md` or PR template exists:
393
+
394
+ ```
395
+ ## Contribution guardrails
396
+
397
+ - Issue-first: open an issue before a PR unless you're a maintainer.
398
+ - AI agents must disclose AI assistance in PR descriptions.
399
+ - Unsolicited PRs from non-maintainers may be closed without review.
400
+ ```
401
+
402
+ ### `{{VERSIONING_POLICY}}`
403
+
404
+ If the project has multiple independently-versioned components:
405
+
406
+ ```
407
+ ## Versioning
408
+
409
+ | Component | Version file | Bump on |
410
+ |-----------|-------------|---------|
411
+ | Root | `package.json` | Breaking changes |
412
+ | Skills | `skills/*/SKILL.md` | Any change (unbumped = invisible) |
413
+ Do not bump versions in feature PRs — versioning is a release step.
414
+ ```
415
+
416
+ ### `{{RELEASING_SECTION}}`
417
+
418
+ Numbered steps. Only if publish/release/deploy scripts exist.
419
+
420
+ ### `{{DOC_IMPORTS}}`
421
+
422
+ If the project has existing documentation (CONTRIBUTING.md, docs/\*.md, style guides): reference them with `@import` instead of duplicating content. Format:
423
+
424
+ ```
425
+ > Detailed docs: @CONTRIBUTING.md, @docs/best_practices.md
426
+ ```
427
+
428
+ - **@import** for docs the agent should ALWAYS have in context (conventions, patterns, style rules).
429
+ - **Plain markdown link** `[Topic](path)` for docs only needed occasionally.
430
+ - **Warn about large imports**: if a doc is over ~300 lines (~1500 tokens), flag it: "⚠️ Large file — consider importing only key sections."
431
+ - Never duplicate content that already exists in project docs.
432
+
433
+ ### `{{RELEASING_SECTION}}`
434
+
435
+ Numbered steps. Only if publish/release/deploy scripts exist.
436
+
437
+ ### `{{RULE_FILE_LINKS}}`
438
+
439
+ One link per generated rule file. Only in full mode.
440
+
441
+ ### `{{CODEGRAPH_SECTION}}`
442
+
443
+ Only if `.codegraph/` exists.
444
+
445
+ ### `{{CLAUDE_MD_NOTE}}`
446
+
447
+ If Claude Code is detected (`.claude/` directory or `CLAUDE.md` exists), also generate a thin `CLAUDE.md` at project root using `assets/claude.md`. AGENTS.md is the universal standard — CLAUDE.md only points to it and adds Claude-specific config if any exists.
448
+
449
+ ## Post-generation limits
450
+
451
+ - **300 line soft cap**: if the generated AGENTS.md exceeds 300 lines, warn and suggest moving content to `.agents/rules/` or existing project docs with `@import`.
452
+ - **500 line hard cap**: never exceed. Move content to rule files or reference existing docs.