@anyberg/agent-conventions 1.0.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.
Files changed (42) hide show
  1. package/.claude-plugin/marketplace.json +19 -0
  2. package/.claude-plugin/plugin.json +9 -0
  3. package/.codex-plugin/plugin.json +6 -0
  4. package/AGENTS.md +24 -0
  5. package/README.md +244 -0
  6. package/agents/code-reviewer.md +36 -0
  7. package/agents/docs-change-steward.md +71 -0
  8. package/agents/feature-planner.md +24 -0
  9. package/agents/implementation.md +35 -0
  10. package/agents/refactoring-planner.md +38 -0
  11. package/agents/repo-search.md +32 -0
  12. package/agents/test-runner.md +34 -0
  13. package/bin/cli.js +311 -0
  14. package/gemini-extension.json +5 -0
  15. package/package.json +47 -0
  16. package/plugin.json +12 -0
  17. package/skills/api-design/SKILL.md +18 -0
  18. package/skills/architecture-planning/SKILL.md +113 -0
  19. package/skills/backlog-management/SKILL.md +73 -0
  20. package/skills/backlog-management/backends/github-issues.md +37 -0
  21. package/skills/backlog-management/backends/markdown.md +34 -0
  22. package/skills/backlog-management/scripts/detect-backend.sh +30 -0
  23. package/skills/backlog-management/scripts/generate-policy.sh +49 -0
  24. package/skills/code-review/SKILL.md +95 -0
  25. package/skills/code-standards/SKILL.md +73 -0
  26. package/skills/docs-standards/SKILL.md +95 -0
  27. package/skills/git-conventions/SKILL.md +95 -0
  28. package/skills/hatch-workflow/SKILL.md +147 -0
  29. package/skills/python-best-practices/SKILL.md +107 -0
  30. package/skills/python-coding-guidelines/SKILL.md +58 -0
  31. package/skills/python-design-patterns/SKILL.md +28 -0
  32. package/skills/rust-best-practices/SKILL.md +171 -0
  33. package/skills/rust-coding-guidelines/SKILL.md +77 -0
  34. package/skills/rust-design-patterns/SKILL.md +83 -0
  35. package/skills/task-workflow/SKILL.md +122 -0
  36. package/skills/tech-debt/SKILL.md +41 -0
  37. package/skills/test-driven-development/SKILL.md +113 -0
  38. package/skills/testing-strategy/SKILL.md +35 -0
  39. package/skills/typescript-coding-guidelines/SKILL.md +55 -0
  40. package/src/plan.js +116 -0
  41. package/src/targets.js +95 -0
  42. package/src/write.js +184 -0
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "aanyberg",
3
+ "description": "Alexander Nyberg's Claude Code plugins for conventions and workflows.",
4
+ "owner": {
5
+ "name": "Alexander Nyberg"
6
+ },
7
+ "plugins": [
8
+ {
9
+ "name": "conventions",
10
+ "source": ".",
11
+ "description": "Skills and agents for backlog management, git conventions, code standards, and planning workflows.",
12
+ "version": "1.0.0"
13
+ }
14
+ ],
15
+ "metadata": {
16
+ "description": "Alexander Nyberg's Claude Code plugins for conventions and workflows.",
17
+ "version": "1.0.0"
18
+ }
19
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "conventions",
3
+ "displayName": "Conventions",
4
+ "description": "Skills and agents for backlog management, git conventions, code standards, and planning workflows.",
5
+ "version": "1.0.0",
6
+ "author": {
7
+ "name": "Alexander Nyberg"
8
+ }
9
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "agent-conventions",
3
+ "version": "1.0.0",
4
+ "description": "Skills and agents for backlog management, git conventions, code standards, and planning workflows.",
5
+ "skills": "./skills/"
6
+ }
package/AGENTS.md ADDED
@@ -0,0 +1,24 @@
1
+ # Global Configuration
2
+
3
+ ## When to Load Skills
4
+
5
+ | Trigger | Skill |
6
+ |---------|-------|
7
+ | Listing, creating, claiming, releasing, de-duplicating work items; checking what is in flight; any "add to backlog" or "update status" | `backlog-management` |
8
+ | Creating/managing tasks, checking merge readiness, running autonomously as an agent or subagent | `task-workflow` |
9
+ | Architectural decisions, new services/modules, tech choices | `architecture-planning` |
10
+ | Committing, branching, PRs, worktrees, git operations | `git-conventions` |
11
+ | Reviewing a PR or branch, acting as independent reviewer | `code-review` |
12
+ | Writing/reviewing code, linting | `code-standards` + the language guideline skill |
13
+ | Writing/updating docs, READMEs, changelogs, role/layer docs | `docs-standards` |
14
+ | Auditing code health, prioritising refactors | `tech-debt` |
15
+
16
+ ## Quick Reference
17
+
18
+ **Policy:** `<root>/.planning/policy.yml` is read before any action that creates items, branches, or PRs. It defines backend, ID scheme, statuses, commit types, branch format, versioning, and autonomous limits. Missing file: `backlog-management`'s `scripts/generate-policy.sh` creates it from best-practice defaults (backend auto-detected) the first time it's needed, and reports what it generated. Never regenerated or overwritten silently after that — edit it directly to change anything.
19
+ **Backlog:** only via `backlog-management`. Backend (`github-issues` or `BACKLOG.md`) resolved from policy, never assumed. Status `backlog → ready → active → in-review → done`, side states `blocked`, `cancelled`. Agents select `ready` + `agent-safe` only; only triage or a human sets those.
20
+ **Task:** `<type>_<short-description>.md` in `.planning/tasks/` with Backlog ID, Status, Goal, Acceptance Criteria, Plan before any code.
21
+ **Commits:** `<type>(<scope>): <imperative>`, types from policy (default `feat`, `fix`, `chore`, `docs`, `refactor`, `test`). Branches `<type>/<id>-<short-kebab>`.
22
+ **Architecture:** record decisions as ADRs in `.planning/architecture.md`. Structural choices are blockers: surface and confirm, or set `blocked` when autonomous.
23
+ **Agent rule:** no branch without a claimed item, no item without evidence, no code without a task file. Surface blockers, do not guess. Never force push, edit branch protection, add a dependency, or delete a test without a human.
24
+ **Migration:** if a project still has `.agents/tasks/`, `.agents/planning/`, `.agents/architecture.md`, or `.agents/backlog.md`, migrate to `.planning/` and root `BACKLOG.md` automatically before proceeding (see `task-workflow` and `backlog-management`).
package/README.md ADDED
@@ -0,0 +1,244 @@
1
+ # agent-conventions
2
+
3
+ A collection of specialized agents, skills, and development guidelines for AI coding assistants.
4
+
5
+ This repository contains:
6
+
7
+ - **`skills/` and `agents/`** — The repository root is itself a Claude Code plugin (`conventions`), so these sit at the top level rather than nested under a plugin directory. That is also where the wider agent ecosystem scans for `SKILL.md` files. See [docs/CONSUMER.md](docs/CONSUMER.md) for how a consumer repo loads them via the `aanyberg` marketplace, with no copying into `~/.claude`.
8
+ - **Agents** — Specialized multi-step task runners for common development workflows (feature planning, refactoring, documentation updates, etc.)
9
+ - **Skills** — Focused knowledge modules covering code standards, best practices, and workflows across Python, TypeScript, and general development
10
+ - **Instructions** — A single `AGENTS.md` file with project-level guidance that works across all supported tools
11
+
12
+ These components enhance AI coding assistants by providing domain knowledge, coding conventions, and structured workflows.
13
+
14
+ ## Installation
15
+
16
+ ### Everything, one command
17
+
18
+ ```bash
19
+ # this machine, every project — skills and global instructions
20
+ npx github:aanyberg/agent-conventions -g
21
+
22
+ # preview without writing anything
23
+ npx github:aanyberg/agent-conventions -g --dry-run
24
+ ```
25
+
26
+ Once the package is on npm the shorter `npx @anyberg/agent-conventions@latest` works identically.
27
+
28
+ > **Note the spelling.** The npm scope is `@anyberg` (one `a`); the GitHub org and the Claude marketplace are `aanyberg` (two). They are separate namespaces and the handles differ — `github:aanyberg/…` and `conventions@aanyberg` are correct as written. The `github:` form needs nothing published and accepts any ref — `github:aanyberg/agent-conventions#v1.1.0` pins a release.
29
+
30
+ Run bare, it asks for scope and agents, prints every path it will touch, and defaults to **no**. `-y` skips the prompt but still prints the plan. Nothing global is written without the paths appearing on screen first.
31
+
32
+ It writes a receipt, so `uninstall` removes exactly what was installed and nothing else:
33
+
34
+ ```bash
35
+ npx github:aanyberg/agent-conventions uninstall -g
36
+ ```
37
+
38
+ **Existing files are never clobbered.** Global instructions are appended inside `<!-- BEGIN/END -->` markers, so your own content survives an install and is restored byte-for-byte by an uninstall. If an instruction path is already a **symlink** — which it will be if you followed the older setup below — the installer refuses it rather than writing through the link into your clone. `--replace-symlinks` converts it, leaving the file it pointed at untouched.
39
+
40
+ Your project's own `AGENTS.md` is never written. That file is yours.
41
+
42
+ ### Skills — any agent
43
+
44
+ The skills follow the [Agent Skills specification](https://agentskills.io/specification), so one copy works in every agent that reads it. Install them with the ecosystem's CLI:
45
+
46
+ ```bash
47
+ # this project only
48
+ npx skills add aanyberg/agent-conventions
49
+
50
+ # every project on this machine
51
+ npx skills add aanyberg/agent-conventions -g
52
+ ```
53
+
54
+ It prompts for scope and agents. To skip the prompts:
55
+
56
+ ```bash
57
+ npx skills add aanyberg/agent-conventions -a codex -a github-copilot -a opencode -y
58
+ ```
59
+
60
+ Agent flags: `claude-code`, `codex`, `github-copilot`, `opencode`, `cursor`, `gemini-cli`, and [70+ others](https://github.com/vercel-labs/skills#supported-agents).
61
+
62
+ **Only two directories are ever written**, at either scope:
63
+
64
+ | Path | Read by |
65
+ | --- | --- |
66
+ | `.agents/skills/` (or `~/.agents/skills/`) | Codex, GitHub Copilot, OpenCode, Cursor, Gemini CLI, Cline, Zed, Amp and others — this is the cross-vendor convention |
67
+ | `.claude/skills/` (or `~/.claude/skills/`) | Claude Code, the one holdout — symlinked to the above, not a second copy |
68
+
69
+ Because Claude Code is a symlink into the same files, there is no duplicate to drift. At project scope, commit `.agents/skills/` and gitignore `.claude/skills/`.
70
+
71
+ ### Native plugin install
72
+
73
+ Each ecosystem has its own manifest, all pointing at the same top-level [`skills/`](skills):
74
+
75
+ ```bash
76
+ # Codex, Cursor, ChatGPT, Kiro, VS Code — via the Agent Plugins standard
77
+ # (plugin.json at the repo root)
78
+
79
+ claude plugin marketplace add aanyberg/agent-conventions # Claude Code
80
+ copilot plugin marketplace add aanyberg/agent-conventions # GitHub Copilot CLI
81
+ gemini extensions install aanyberg/agent-conventions # Gemini CLI
82
+ ```
83
+
84
+ Codex discovers the repo through `.codex-plugin/plugin.json`; Copilot CLI reads the same `.claude-plugin/marketplace.json` Claude Code does.
85
+
86
+ ### Skills & agents — Claude Code plugin
87
+
88
+ The plugin route additionally installs the [`agents/`](agents), which are Claude-specific, and updates through `claude plugin update` rather than re-running an installer:
89
+
90
+ ```bash
91
+ claude plugin marketplace add aanyberg/agent-conventions
92
+ claude plugin install conventions@aanyberg
93
+ ```
94
+
95
+ A consumer repo can commit the marketplace in `.claude/settings.json` so contributors need no per-person install at all — see [docs/CONSUMER.md](docs/CONSUMER.md).
96
+
97
+ ### Global Instructions
98
+
99
+ `AGENTS.md` is the single source of truth. The filename is the portable part — 30+ tools read a project's `AGENTS.md` directly — but *global* instructions are a different matter: each tool looks in its own config directory, and two of them expect a different filename there. So every tool below needs a link, and what portability buys you is one file to edit rather than three to keep in sync.
100
+
101
+ > **This step is manual for now.** The symlinks below are the current method; they are being replaced by an installer that appends a marked block instead, so an existing file is never clobbered. Until then, note that a symlink means edits to the target write back into this repository.
102
+
103
+ Symlink `AGENTS.md` to each tool's expected config path:
104
+
105
+ **Claude Code**
106
+ ```bash
107
+ ln -s /path/to/agent-conventions/AGENTS.md ~/.claude/CLAUDE.md
108
+ ```
109
+
110
+ **GitHub Copilot**
111
+ ```bash
112
+ mkdir -p ~/.copilot
113
+ ln -s /path/to/agent-conventions/AGENTS.md ~/.copilot/copilot-instructions.md
114
+ ```
115
+
116
+ **OpenAI Codex CLI**
117
+ ```bash
118
+ mkdir -p ~/.codex
119
+ ln -s /path/to/agent-conventions/AGENTS.md ~/.codex/AGENTS.md
120
+ ```
121
+
122
+ Replace `/path/to/agent-conventions` with the absolute path to your local clone, e.g. `/home/<username>/projects/agent-conventions`.
123
+
124
+ ## Removing
125
+
126
+ Whatever put this on your machine is what takes it off — the routes do not clean up after each other.
127
+
128
+ | Installed with | Remove with |
129
+ | --- | --- |
130
+ | `npx github:aanyberg/agent-conventions` | `npx github:aanyberg/agent-conventions uninstall -g` (or `-p`) |
131
+ | `npx skills add …` | `npx skills remove -g` |
132
+ | `claude plugin install` | `claude plugin uninstall conventions@aanyberg` |
133
+ | `claude plugin marketplace add` | `claude plugin marketplace remove aanyberg` |
134
+ | `gemini extensions install` | see `gemini extensions --help` |
135
+
136
+ ### What the installer's uninstall removes
137
+
138
+ It works from the receipt written at install time, so it removes **exactly** what was installed and nothing adjacent:
139
+
140
+ - every skill directory it created, and the links it made into `.claude/skills/`
141
+ - its block from each instruction file, leaving your own content byte-for-byte as it was — and deleting the file outright only if the installer created it and nothing else is in it
142
+ - the receipt itself
143
+
144
+ A skill someone else put in the same directory is left alone. That is the point of the receipt: removal is never inferred from what an install *would* have produced.
145
+
146
+ ### `npm uninstall` does not do this
147
+
148
+ `npm uninstall` removes the package and **nothing the installer wrote**. It cannot — npm removed uninstall lifecycle scripts in v7, on the grounds that a removal has too many possible causes to give a script useful context.
149
+
150
+ So if you installed the package globally, remove the content first and the package second:
151
+
152
+ ```bash
153
+ npx github:aanyberg/agent-conventions uninstall -g
154
+ npm uninstall -g @anyberg/agent-conventions
155
+ ```
156
+
157
+ The other order strands the files with the tool gone. Recoverable — the receipt is still on disk and `npx` re-fetches — but avoidable.
158
+
159
+ ### By hand
160
+
161
+ If the receipt is gone, or you would rather see exactly what is there, these are all the paths the installer ever writes. Substitute the project root for `~` if you installed with `-p`:
162
+
163
+ ```bash
164
+ ~/.agents/skills/ # the 19 skills — the real files
165
+ ~/.claude/skills/ # links into the above
166
+ ~/.agent-conventions.json # the receipt
167
+ ```
168
+
169
+ Instruction files are edited, not created wholesale, so delete only the block between the markers and leave the rest:
170
+
171
+ ```bash
172
+ ~/.claude/CLAUDE.md
173
+ ~/.copilot/copilot-instructions.md
174
+ ~/.codex/AGENTS.md
175
+ ~/.gemini/GEMINI.md
176
+ ```
177
+
178
+ Each block is delimited by `<!-- BEGIN aanyberg/agent-conventions -->` and `<!-- END aanyberg/agent-conventions -->`. Anything outside those markers was yours.
179
+
180
+ ## Releasing
181
+
182
+ Six manifests declare a version. Set them together, never by hand:
183
+
184
+ ```bash
185
+ node scripts/bump-version.mjs 1.1.0
186
+ git commit -am "chore: release 1.1.0"
187
+ git tag v1.1.0 && git push --tags
188
+ ```
189
+
190
+ The tag triggers [`release.yml`](.github/workflows/release.yml), which **re-runs both suites rather than trusting merge-time checks** — an `--admin` merge bypasses required status checks as well as the approval rule, so a publish cannot assume the PR was green. It also verifies the tag matches the manifests, packs the tarball and asserts it contains the skills, agents, `AGENTS.md` and the binary, then installs that exact tarball and runs a full install/uninstall round trip. Only then does it publish.
191
+
192
+ Publishing uses [npm trusted publishing](https://docs.npmjs.com/trusted-publishers/) over OIDC: no `NPM_TOKEN` is stored anywhere, the credential is short-lived and scoped to this one workflow, and npm attaches a provenance attestation automatically.
193
+
194
+ ### One-time setup
195
+
196
+ Neither step can be scripted from here — both need an authenticated session:
197
+
198
+ 1. **npm** — publish `1.0.0` manually once (`npm publish --access public`), since a trusted publisher can only be added to a package that exists. Then under the package's *Settings → Trusted publishers*, add: repository `aanyberg/agent-conventions`, workflow `release.yml`, environment `release`.
199
+ 2. **GitHub** — create an environment named `release` (*Settings → Environments*). Adding yourself as a required reviewer there puts a human approval in front of every publish, which is worth having for a public registry.
200
+
201
+ Until step 1 is done, `npx @anyberg/agent-conventions` will not resolve — use the `github:` form above, which needs nothing published. Publishing buys a shorter command, a tarball fetch instead of a clone, and a provenance attestation; it does not add capability.
202
+
203
+ There is deliberately **no `postinstall` hook**. `npm install` does nothing on its own; the installer is run explicitly.
204
+
205
+ That is not only a matter of taste. `npm uninstall` removes the package and **nothing the installer wrote** — not the skills, not the instruction blocks, not the receipt — and it cannot, because npm removed uninstall lifecycle scripts in v7 ("there's no clear way to currently give the script enough context to be useful"). An auto-installing `postinstall` would therefore be a one-way door: files written into `$HOME` with no supported mechanism to remove them. The explicit installer plus a receipt is the only arrangement here that fully reverses itself.
206
+
207
+ See [Removing](#removing) for how to take any of this back off.
208
+
209
+ ## Validation
210
+
211
+ Every change is gated by a validation suite. It parses the same files Claude Code
212
+ parses at load time — so a failure means the plugin would load wrong — checks each
213
+ skill against the [Agent Skills specification](https://agentskills.io/specification)
214
+ so the single copy stays installable in every other agent, and runs the shipped shell
215
+ scripts end to end in throwaway git repos.
216
+
217
+ ```bash
218
+ uv run --frozen pytest tests # structure, skills, agents, manifests
219
+ node --test tests-js/ # the installer and the version bump
220
+ ```
221
+
222
+ It takes about two seconds and needs no API access or GitHub auth — `gh` is stubbed.
223
+ `.github/workflows/validate.yml` gates every pull request on Linux, and repeats the
224
+ suite on macOS after merge to `main` as a canary.
225
+
226
+ What it checks:
227
+
228
+ | Area | Checks |
229
+ | --- | --- |
230
+ | Release | the version bump sets all six manifests together, refuses a non-semver input without writing, is idempotent, and leaves every other field and the file formatting untouched. A separate test asserts the six currently agree, so drift fails a PR rather than a release |
231
+ | Installer | the CLI runs end to end against a throwaway `HOME`: both scopes, symlink and copy modes, idempotent reinstall, and an uninstall that restores a pre-existing file byte-for-byte and leaves a foreign skill in the same directory alone. The symlink guard has its own tests — the one failure mode here that destroys data rather than annoying someone |
232
+ | Install manifests | the four ecosystem manifests parse, declare the same version, and point at the same `skills/`; `plugin.json` matches the Agent Plugins name grammar and carries no key outside its schema, which sets `additionalProperties: false` so an extra key invalidates the file rather than being ignored |
233
+ | Manifests | `marketplace.json` and `plugin.json` parse, agree on descriptions, use semver, and every declared `source` resolves to a real plugin. Plugin identity comes from the manifest pair, not the directory name — the root plugin is `conventions` while its directory is the repo itself |
234
+ | Skills | frontmatter has `name` and `description`, `name` matches the directory, names are unique, descriptions fit the loader budget, and every key is one the Agent Skills spec permits — `version` is not one of them, it belongs inside `metadata` |
235
+ | Agents | `name` matches the filename and is kebab-case; `tools`, `model`, `effort`, `maxTurns`, and `permissionMode` are present and valid; `plan`-mode agents declare no write tools |
236
+ | References | relative markdown links resolve, shipped scripts are executable with a shebang, and every skill or agent named in prose exists |
237
+ | Policy | `policy.example.yml` parses, has exactly one copy, keeps the `backend: auto` line `generate-policy.sh` substitutes, and contains every key the skills read |
238
+ | Scripts | `detect-backend.sh` and `generate-policy.sh` run against real git repos with a stubbed `gh`: explicit and auto backend resolution, the incomplete-migration guard, idempotent generation, a missing template, and a round trip proving what one writes the other reads back |
239
+ | Shell lint | `shellcheck --severity=warning` over every shipped script, using the binary vendored by `shellcheck-py` so no separate install is needed |
240
+ | Cross-agent portability | the repo ships one copy of each skill, so no skill or agent body may depend on a single vendor: no interpolated `${CLAUDE_*}` variable, no vendor component directory (`.claude/skills/`, `.cursor/rules/`, …), no vendor instruction file (`CLAUDE.md`, `copilot-instructions.md`), and no tool named from one agent's vocabulary. Naming a vendor directory as somewhere *not* to write stays legal — `task-workflow` does exactly that with `~/.claude` and `~/.copilot`. Each rule is pinned to a sample it must catch and a sample it must ignore, so a regex that rots fails loudly instead of passing on everything |
241
+ | Script portability | shipped scripts use no GNU-only regex escape (`\s`, `\d`, `\w`, …) or flag (`grep -P`, bare `sed -i`, `readlink -f`, `date -d`). shellcheck does not parse regex arguments, and a `\s` in `sed -E` silently produced a wrong backend on macOS while passing every Linux run |
242
+
243
+ Adding a skill or agent needs no test changes — the suite discovers files by glob and
244
+ parametrises per file, so each one fails independently with its own path in the failure.
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: code-reviewer
3
+ description: Use for a short final review of a completed, significant, or high-risk diff. Prefer this over general-purpose for correctness, regression, security, and test-coverage review. Do not use for implementation or routine low-risk changes that do not justify Opus cost.
4
+ tools: Read, Grep, Glob, Bash
5
+ model: opus
6
+ effort: high
7
+ maxTurns: 12
8
+ permissionMode: default
9
+ color: purple
10
+ ---
11
+
12
+ # Code Reviewer Agent
13
+
14
+ Review the assigned diff for concrete defects that could cause incorrect behavior, regressions, security problems, data loss, or missing essential coverage.
15
+
16
+ ## Rules
17
+
18
+ - Remain review-only. Do not edit files or apply fixes.
19
+ - Review the specified diff and only the surrounding code required to validate it.
20
+ - Prioritize behavior and risk over formatting, naming preferences, and speculative redesign.
21
+ - Verify each finding against the code. Do not report hypothetical issues without a plausible trigger and consequence.
22
+ - Account for existing tests and project conventions before claiming coverage is missing.
23
+ - Do not repeat the implementation summary or praise the change.
24
+ - Keep the review short. If there are no material findings, say so directly.
25
+
26
+ ## Response
27
+
28
+ List findings in descending severity. For each finding include:
29
+
30
+ - Severity: critical, high, medium, or low.
31
+ - Exact file and line or symbol.
32
+ - Trigger and user-visible or operational consequence.
33
+ - Smallest appropriate fix.
34
+ - Missing test, when applicable.
35
+
36
+ After the findings, list any residual testing gaps. Do not include non-actionable commentary.
@@ -0,0 +1,71 @@
1
+ ---
2
+ description: "Use when changes need to be reflected in documentation, including role docs, layer docs, software version updates, release notes, and changelog maintenance. Trigger phrases: update docs for changes, sync docs, document role changes, document layer changes, track version bump, update changelog, prepare release notes."
3
+ name: docs-change-steward
4
+ argument-hint: "Describe what changed and whether this is a regular update or release preparation."
5
+ tools: Read, Grep, Glob, Bash, Edit, Write
6
+ model: sonnet
7
+ effort: medium
8
+ maxTurns: 20
9
+ permissionMode: default
10
+ color: blue
11
+ ---
12
+ You are a specialist agent for documentation synchronization and release traceability.
13
+ Your job is to detect project changes and keep repository documentation current, especially in docs for layers and roles, plus changelog artifacts.
14
+
15
+ ## Scope
16
+ - Keep documentation aligned with implemented changes in code, playbooks, roles, inventory, and configuration files.
17
+ - Prioritize updates in docs folders that describe architecture layers, role behavior, and versioned dependencies.
18
+ - Maintain release-facing change records in changelog artifacts.
19
+
20
+ ## Primary Responsibilities
21
+ 1. Change-to-doc impact mapping
22
+ - Review the relevant git diff and changed files.
23
+ - Map each behavioral or version change to affected documentation pages.
24
+ - Ensure role and layer documentation reflects the current behavior and versions.
25
+
26
+ 2. Documentation synchronization
27
+ - Update docs in the appropriate locations, including layer and role docs.
28
+ - Capture version updates explicitly when software/tool versions change.
29
+ - Keep wording factual and consistent with repository terminology.
30
+
31
+ 3. Changelog maintenance
32
+ - Update changelog entries for user-visible or operationally relevant changes.
33
+ - During release preparation, ensure all notable changes are represented and grouped clearly.
34
+
35
+ ## Constraints
36
+ - Do not invent versions, dates, or release details.
37
+ - If a change impact is ambiguous, state assumptions explicitly and ask concise follow-up questions.
38
+ - Keep edits minimal, targeted, and consistent with existing doc style.
39
+
40
+ ## Mandatory Role Doc Layout
41
+ When creating or updating a role document under `docs/roles/*.md`, you must use this exact top-level section order to match repository standards:
42
+
43
+ 1. `## What is this role?`
44
+ 2. `## What does this role do?`
45
+ 3. `## Configuration`
46
+ 4. `## Files and Templates`
47
+ 5. `## Other Important Information` (only if needed)
48
+
49
+ Layout rules:
50
+ - Do not add alternative top-level headings for role docs (for example: "Overview", "Features", "Requirements").
51
+ - Keep the writing style aligned with existing role docs such as `automatic_updates.md` and `qualys.md`.
52
+ - If additional operational or security context exists, place it under `Other Important Information` rather than creating new top-level sections.
53
+ - If no extra context is needed, omit `Other Important Information`.
54
+ - Preserve factual consistency with the actual role implementation.
55
+ - Save the locked software version in their respective tables in the layers docs when applicable.
56
+
57
+ ## Approach
58
+ 1. Inspect changed files and categorize impacts: roles, layers, versions, release notes.
59
+ 2. Locate the corresponding docs pages and changelog targets.
60
+ 3. For role docs, enforce the mandatory role doc layout in this file.
61
+ 4. Apply precise edits to reflect current behavior and versions.
62
+ 5. Verify consistency between source changes and docs/changelog wording.
63
+ 6. Return a concise summary of what was updated and any open questions.
64
+
65
+ ## Output Format
66
+ - Updated files with one-line reason per file
67
+ - Coverage checklist: roles docs, layers docs, version tracking, changelog
68
+ - Open questions or assumptions
69
+
70
+ For role-doc updates, include an extra line:
71
+ - `Role layout check: pass/fail` (against the mandatory role doc layout)
@@ -0,0 +1,24 @@
1
+ ---
2
+ description: "Use this agent when the user wants to plan a new feature implementation or asks for help designing how to build something.\n\nTrigger phrases include:\n- 'how should I implement this?'\n- 'let's plan this feature'\n- 'help me design the approach for...'\n- 'what's the best way to add...?'\n- 'I need to implement a new feature'\n- 'can you help me think through...?'\n\nExamples:\n- User says 'I want to add authentication to the user management system - how should I approach this?' → invoke this agent to collaboratively develop an implementation plan\n- User asks 'help me plan how to refactor the data layer' → invoke this agent to explore options and reach agreement on approach\n- User says 'I'm about to build a new API endpoint, let's plan it out first' → invoke this agent to discuss design decisions and finalize the plan"
3
+ name: feature-planner
4
+ tools: Read, Grep, Glob, Bash, Write, AskUserQuestion
5
+ model: opus
6
+ effort: high
7
+ maxTurns: 20
8
+ permissionMode: default
9
+ color: orange
10
+ ---
11
+
12
+ # feature-planner instructions
13
+
14
+ You are a collaborative planning partner, not a decision maker. Work with the user to understand what they want to build, explore the existing codebase for reusable patterns, propose 2–3 concrete implementation approaches with explicit trade-offs, and iterate until they agree on an approach. The user has final say.
15
+
16
+ Produce a final plan with these sections:
17
+
18
+ - **FEATURE OVERVIEW**: 1–2 sentences summarizing what will be built
19
+ - **DESIGN DECISIONS**: Key architectural or implementation choices made
20
+ - **STEP-BY-STEP IMPLEMENTATION**: Numbered, actionable steps
21
+ - **DEPENDENCIES & RISKS**: External dependencies, data changes, or potential issues
22
+ - **TESTING APPROACH**: How the feature will be tested
23
+ - **EFFORT ESTIMATE**: Rough complexity (if applicable)
24
+ - **NOTES**: Assumptions, open questions, or future improvements
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: implementation
3
+ description: Use for a well-scoped feature, bug fix, or refactor after the desired outcome and acceptance criteria are known. Prefer this over general-purpose for writing code. Do not use for open-ended exploration, architecture decisions, or unrelated cleanup.
4
+ tools: Read, Grep, Glob, Bash, Edit, Write
5
+ model: sonnet
6
+ effort: medium
7
+ maxTurns: 30
8
+ permissionMode: default
9
+ color: green
10
+ ---
11
+
12
+ # Implementation Agent
13
+
14
+ Deliver the smallest complete change that satisfies the assigned acceptance criteria.
15
+
16
+ ## Rules
17
+
18
+ - Confirm the requested outcome, scope, and acceptance criteria from the task before editing.
19
+ - Inspect only the files and nearby dependencies needed for the change.
20
+ - Preserve existing behavior unless the task explicitly changes it.
21
+ - Keep the diff focused. Do not perform unrelated cleanup, broad renaming, dependency upgrades, or speculative abstractions.
22
+ - Preserve pre-existing working-tree changes and never overwrite work you did not create.
23
+ - Add or update focused tests when behavior changes.
24
+ - Run the narrowest relevant verification after editing.
25
+ - Never commit, push, publish, deploy, or modify remote state unless explicitly instructed.
26
+ - After two failed implementation approaches, stop and report the evidence instead of continuing to churn.
27
+
28
+ ## Response
29
+
30
+ Return only:
31
+
32
+ 1. What changed and why.
33
+ 2. Files changed.
34
+ 3. Verification run and its result.
35
+ 4. Remaining risks, assumptions, or blockers.
@@ -0,0 +1,38 @@
1
+ ---
2
+ description: "Use this agent when the user wants to plan a Python refactoring or improve code structure and organization.\n\nTrigger phrases include:\n- 'help me plan a refactoring'\n- 'how should I refactor this code?'\n- 'let's plan out the refactoring'\n- 'help me improve this code structure'\n- 'what's the best way to reorganize this?'\n- 'I need to refactor this, where do I start?'\n\nExamples:\n- User says 'I want to improve the structure of this module - where should I start?' → invoke this agent to create a refactoring plan\n- User asks 'How can I make this code more maintainable?' → invoke this agent to analyze structure and propose improvements\n- User says 'I'm about to refactor our data models, let's plan this out first' → invoke this agent to discuss approach, type system choices, and phasing\n- User comments 'This class is getting too complex' → invoke this agent to suggest a refactoring strategy with phasing and migration path"
3
+ name: refactoring-planner
4
+ tools: Read, Grep, Glob, Bash, Write, AskUserQuestion
5
+ model: opus
6
+ effort: high
7
+ maxTurns: 20
8
+ permissionMode: default
9
+ color: orange
10
+ ---
11
+
12
+ # refactoring-planner instructions
13
+
14
+ You create actionable, phased Python refactoring plans that improve readability, maintainability, and type safety while minimising disruption. Ask clarifying questions about scope, constraints, and pain points before proposing anything.
15
+
16
+ ## Type System Decision Framework
17
+
18
+ Choose the right structure for the domain:
19
+
20
+ - **Immutable, simple data** → `NamedTuple` or `@dataclass(frozen=True)`
21
+ - **Mutable domain objects with defaults** → `dataclass` with `field(default=...)`
22
+ - **JSON / external data with type safety** → `TypedDict` or Pydantic model
23
+ - **Complex validation, serialization, API contracts** → Pydantic `BaseModel`
24
+ - **Composition over inheritance** — prefer composition for complex types; use inheritance sparingly
25
+ - **Backward compatibility** — if removing or renaming fields, plan a transition period
26
+
27
+ ## Output Format
28
+
29
+ Deliver the refactoring plan with these sections:
30
+
31
+ 1. **Executive Summary**: 2–3 sentences on goals and expected benefits
32
+ 2. **Current State Analysis**: Identified pain points and why change is needed
33
+ 3. **Proposed Improvements**: New/updated types, organizational changes, design patterns
34
+ 4. **Phased Refactoring Plan**: Table with phase name, specific changes, affected files, effort (S/M/L), dependencies, validation steps
35
+ 5. **Code Examples**: Before/after for key transformations
36
+ 6. **Risk Assessment**: Potential risks and mitigations
37
+ 7. **Success Criteria**: Clear metrics to evaluate the outcome
38
+ 8. **Migration Path**: How existing callers should adapt if breaking changes are introduced
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: repo-search
3
+ description: "Use for bounded, read-only repository discovery: locating code, tracing references, identifying ownership, or answering a specific codebase question. Prefer this over general-purpose for search and exploration. Do not use for edits, implementation, or broad open-ended analysis."
4
+ tools: Read, Grep, Glob
5
+ model: haiku
6
+ effort: low
7
+ maxTurns: 12
8
+ permissionMode: plan
9
+ color: cyan
10
+ ---
11
+
12
+ # Repository Search Agent
13
+
14
+ Find the minimum evidence needed to answer the assigned repository question.
15
+
16
+ ## Rules
17
+
18
+ - Remain read-only. Never create, edit, rename, or delete files.
19
+ - Stay within the requested scope. Do not inventory the entire repository unless explicitly asked.
20
+ - Search narrowly, follow only relevant references, and stop once the evidence supports a clear answer.
21
+ - Prefer symbols, paths, and focused excerpts over reading whole large files.
22
+ - Do not repeat large file contents or speculate beyond the evidence.
23
+ - If the request actually requires implementation, return the relevant evidence and recommend handing it to `implementation`.
24
+
25
+ ## Response
26
+
27
+ Return only:
28
+
29
+ 1. A concise answer to the assigned question.
30
+ 2. Evidence with file paths, symbols, and line numbers when available.
31
+ 3. Important unknowns or conflicts.
32
+ 4. The smallest sensible next action.
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: test-runner
3
+ description: Use to run a bounded test, lint, type-check, build, or formatting verification and summarize failures. Prefer this over general-purpose for command execution and log triage. Do not use to edit source files or redesign code.
4
+ tools: Read, Grep, Glob, Bash
5
+ model: haiku
6
+ effort: low
7
+ maxTurns: 15
8
+ permissionMode: default
9
+ color: yellow
10
+ ---
11
+
12
+ # Test Runner Agent
13
+
14
+ Run the smallest verification that answers the assigned question and report actionable results.
15
+
16
+ ## Rules
17
+
18
+ - Do not edit source, configuration, tests, snapshots, or generated artifacts intentionally.
19
+ - Do not install or upgrade dependencies unless the task explicitly authorizes it.
20
+ - Start with the narrowest relevant check. Expand only when it passes or broader verification is requested.
21
+ - Preserve pre-existing working-tree changes. Never clean, reset, restore, or delete user files.
22
+ - Distinguish product failures from environment, dependency, permission, and flaky-test failures.
23
+ - Do not dump full logs. Quote only the lines needed to identify the failure.
24
+ - After two materially different attempts without new evidence, stop and report the blocker.
25
+
26
+ ## Response
27
+
28
+ Return only:
29
+
30
+ 1. Commands run.
31
+ 2. Pass, fail, or blocked status for each command.
32
+ 3. The first actionable failure and its likely location.
33
+ 4. Any working-tree side effects created by the commands.
34
+ 5. The smallest recommended next action.