@vocdoni/skills 0.5.2 → 0.6.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 (30) hide show
  1. package/.claude-plugin/marketplace.json +5 -15
  2. package/CHANGELOG.md +26 -0
  3. package/README.md +32 -21
  4. package/bin/install.js +22 -5
  5. package/package.json +2 -1
  6. package/plugins/agentic-dev/.claude-plugin/plugin.json +2 -2
  7. package/plugins/agentic-dev/agents/model-router.md +105 -0
  8. package/plugins/agentic-dev/skills/subagent-driven-development/SKILL.md +22 -12
  9. package/plugins/agentic-dev/skills/subagent-driven-development/references/audits.md +20 -13
  10. package/plugins/agentic-dev/skills/subagent-driven-development/references/dispatch.md +37 -1
  11. package/plugins/agentic-dev/skills/subagent-driven-development/references/ledger.md +5 -3
  12. package/plugins/agentic-dev/skills/subagent-driven-development/references/model-catalog.md +118 -0
  13. package/plugins/agentic-dev/skills/subagent-driven-development/references/models.md +93 -70
  14. package/plugins/agentic-dev/skills/subagent-driven-development/scripts/init-workspace.sh +1 -1
  15. package/plugins/agentic-dev/skills/subagent-driven-development/scripts/model-inventory.sh +140 -0
  16. package/plugins/claude-pi-subagent/plugins/pi-subagent/package-lock.json +6 -6
  17. package/plugins/vocdoni-comments/.claude-plugin/plugin.json +2 -2
  18. package/plugins/vocdoni-comments/hooks/hooks.json +28 -0
  19. package/plugins/vocdoni-comments/hooks/session-start.sh +45 -0
  20. package/plugins/vocdoni-contributing/.claude-plugin/plugin.json +3 -2
  21. package/plugins/vocdoni-contributing/hooks/hooks.json +14 -2
  22. package/plugins/vocdoni-contributing/hooks/session-start.sh +18 -6
  23. package/plugins/vocdoni-contributing/skills/contributing/SKILL.md +26 -2
  24. package/plugins/vocdoni-stripe/.claude-plugin/plugin.json +0 -22
  25. package/plugins/vocdoni-stripe/skills/stripe-subscription/SKILL.md +0 -276
  26. package/plugins/vocdoni-stripe/skills/stripe-subscription/references/backend-contract.md +0 -142
  27. package/plugins/vocdoni-stripe/skills/stripe-subscription/references/product-templates.md +0 -132
  28. package/plugins/vocdoni-stripe/skills/stripe-subscription/references/stripe-cli.md +0 -212
  29. package/plugins/vocdoni-stripe/skills/stripe-subscription/scripts/clone-product.sh +0 -247
  30. package/plugins/vocdoni-stripe/skills/stripe-subscription/scripts/stripe-json.sh +0 -223
@@ -16,16 +16,6 @@
16
16
  "license": "AGPL-3.0-or-later",
17
17
  "homepage": "https://github.com/vocdoni/skills"
18
18
  },
19
- {
20
- "name": "vocdoni-stripe",
21
- "source": "./plugins/vocdoni-stripe",
22
- "description": "Stripe operations for the Vocdoni SaaS: create subscriptions for existing customers with the org-address metadata the backend needs, clone per-customer Custom / Integrator Starter plan products, handle discounts and payment collection, always confirming before writing. Includes an environment-guarding Stripe CLI wrapper and a verified backend contract reference.",
23
- "version": "0.1.1",
24
- "category": "engineering",
25
- "tags": ["vocdoni", "stripe", "billing", "subscriptions", "saas", "stripe-cli"],
26
- "license": "AGPL-3.0-or-later",
27
- "homepage": "https://github.com/vocdoni/skills"
28
- },
29
19
  {
30
20
  "name": "vocdoni-internal-oauth",
31
21
  "source": "./plugins/vocdoni-internal-oauth",
@@ -50,7 +40,7 @@
50
40
  "name": "agentic-dev",
51
41
  "source": "./plugins/agentic-dev",
52
42
  "description": "Run non-trivial engineering work as a controlled delivery: sized work, audited spec and plan, subagents implementing task by task, every diff reviewed, a strict gate audit before merge, and releases only on the owner's OK. A SessionStart hook makes the model load it without being asked.",
53
- "version": "0.3.1",
43
+ "version": "0.5.0",
54
44
  "category": "engineering",
55
45
  "tags": ["subagents", "orchestration", "planning", "code-review", "audit", "workflow"],
56
46
  "license": "AGPL-3.0-or-later",
@@ -59,8 +49,8 @@
59
49
  {
60
50
  "name": "vocdoni-comments",
61
51
  "source": "./plugins/vocdoni-comments",
62
- "description": "Code comment rules: 1-3 lines that carry the why, plus a trim procedure for a branch or a whole project that keeps every constraint only a comment states.",
63
- "version": "0.1.0",
52
+ "description": "Code comment rules: 1-3 lines that carry the why, plus a trim procedure for a branch or a whole project that keeps every constraint only a comment states. Hooks apply the writing rules in every session and subagent.",
53
+ "version": "0.2.0",
64
54
  "category": "engineering",
65
55
  "tags": ["comments", "code-comments", "code-quality", "code-review", "documentation"],
66
56
  "license": "AGPL-3.0-or-later",
@@ -69,8 +59,8 @@
69
59
  {
70
60
  "name": "vocdoni-contributing",
71
61
  "source": "./plugins/vocdoni-contributing",
72
- "description": "Rules for what the agent posts on the git host: self-introduction, issue tracking, stacked PRs for epics, length and structure for PR/MR descriptions, issues and reviews, and posting reviews as reviews. A SessionStart hook applies them in every session, even as one step of a larger task.",
73
- "version": "0.3.0",
62
+ "description": "Rules for what the agent posts on the git host: self-introduction, issue tracking, stacked PRs for epics, length and structure for PR/MR descriptions, issues and reviews, posting reviews as reviews, and resolving the review threads it addresses. Hooks apply them in every session and subagent, even as one step of a larger task.",
63
+ "version": "0.6.0",
74
64
  "category": "engineering",
75
65
  "tags": ["vocdoni", "pull-request", "merge-request", "code-review", "issues", "commits", "git-host"],
76
66
  "license": "AGPL-3.0-or-later",
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @vocdoni/skills
2
2
 
3
+ ## 0.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#86](https://github.com/vocdoni/skills/pull/86) [`3597b04`](https://github.com/vocdoni/skills/commit/3597b041b5b5c3b90a44b0de2e54c9d744c0b748) Thanks [@p4u](https://github.com/p4u)! - agentic-dev 0.4.0 adds a `model-router` agent that resolves the four model roles (auditor, strong, standard, fast) from the models and agents available when a delivery starts, with a reason and a fallback for each, and re-routes a role when its model fails, times out or returns empty reports. `scripts/model-inventory.sh` lists gateway models, what each alias resolves to and the installed agent files, and `references/model-catalog.md` records which model families may fill which role. An npx install gets the skill, the script and the catalog; the agent is Claude Code plugin-only.
8
+
9
+ - [#81](https://github.com/vocdoni/skills/pull/81) [`a9115f9`](https://github.com/vocdoni/skills/commit/a9115f9819ed80ef2b84055ce5170fd69ebe6e2f) Thanks [@altergui](https://github.com/altergui)! - The agentic-dev subagent-driven-development skill now compares a design, and the code it builds on, against well-known implementations before proposing it.
10
+
11
+ - [#60](https://github.com/vocdoni/skills/pull/60) [`751b1cb`](https://github.com/vocdoni/skills/commit/751b1cb08d637566a7d6c184277cf1ba151781ef) Thanks [@elboletaire](https://github.com/elboletaire)! - Removes the `vocdoni-stripe` plugin and its `stripe-subscription` skill. saas-backend has retired subscription plans in favour of pay-per-process wallet billing, and with only a couple of developers touching Stripe, a shared skill is not worth maintaining. If you installed skills with `npx @vocdoni/skills`, remove the old copy with `npx @vocdoni/skills uninstall stripe-subscription`; installing never removes a skill. Claude Code users can run `claude plugin uninstall vocdoni-stripe@vocdoni`.
12
+
13
+ ### Patch Changes
14
+
15
+ - [#76](https://github.com/vocdoni/skills/pull/76) [`3c95065`](https://github.com/vocdoni/skills/commit/3c95065ad5f2cb7b4fe8baa6e7e3de6e8708286d) Thanks [@elboletaire](https://github.com/elboletaire)! - vocdoni-comments 0.2.0 adds a SessionStart hook that injects the comment-writing rules into every Claude Code session, so they apply when comments are written as one step of a coding task. The README now says that plugins enabled through a repo's `.claude/settings.json` still have to be installed by each contributor. vocdoni-contributing 0.5.0 declares vocdoni-comments as a dependency, so Claude Code installs both together. Both plugins also register the hook for SubagentStart, so the rules reach subagents, which never receive a session's SessionStart context.
16
+
17
+ - [#83](https://github.com/vocdoni/skills/pull/83) [`b3e0221`](https://github.com/vocdoni/skills/commit/b3e022183c74ae1fad4b36a088591017768578a8) Thanks [@elboletaire](https://github.com/elboletaire)! - vocdoni-contributing 0.6.0 makes the agent's opening line say whether the user asked for or reviewed the post. Posts the agent makes on its own (the tracking issue it opens before a PR, review-thread replies, anything from an unattended run) now state that the user has not asked for or reviewed them.
18
+
19
+ ## 0.5.3
20
+
21
+ ### Patch Changes
22
+
23
+ - [#69](https://github.com/vocdoni/skills/pull/69) [`fb3c5a7`](https://github.com/vocdoni/skills/commit/fb3c5a7a8bac06eda893b8d87c75d8d57210ec04) Thanks [@elboletaire](https://github.com/elboletaire)! - `vocdoni-contributing` 0.4.0: when the agent answers review comments on its own PR, it replies in each thread and resolves it through the API (GitHub GraphQL `resolveReviewThread`, GitLab discussions), whether it made the fix or explained why it won't.
24
+
25
+ - [#72](https://github.com/vocdoni/skills/pull/72) [`62f928e`](https://github.com/vocdoni/skills/commit/62f928ee5a67d43dd1e065bca6aff7ec50f01054) Thanks [@elboletaire](https://github.com/elboletaire)! - `bin/install.js` now exports its helpers for tests and only runs the CLI when executed directly, reads CRLF SKILL.md frontmatter, and no longer scans a plugin's subdirectories for skills when its root has no SKILL.md. New `node:test` suite (`npm test`) and PR CI cover the installer and the pi-subagent server.
26
+
27
+ - [#72](https://github.com/vocdoni/skills/pull/72) [`62f928e`](https://github.com/vocdoni/skills/commit/62f928ee5a67d43dd1e065bca6aff7ec50f01054) Thanks [@elboletaire](https://github.com/elboletaire)! - Bump transitive `hono` and `@hono/node-server` in pi-subagent's lockfile to patched versions.
28
+
3
29
  ## 0.5.2
4
30
 
5
31
  ### Patch Changes
package/README.md CHANGED
@@ -13,7 +13,6 @@ claude plugin install vocdoni-integrator-sdk@vocdoni
13
13
 
14
14
  # Internal tooling we use at Vocdoni:
15
15
  claude plugin install vocdoni-go@vocdoni
16
- claude plugin install vocdoni-stripe@vocdoni
17
16
  claude plugin install vocdoni-internal-oauth@vocdoni
18
17
  claude plugin install vocdoni-ui-style@vocdoni
19
18
  claude plugin install agentic-dev@vocdoni
@@ -72,14 +71,6 @@ Tooling we use internally for our own development workflow. Nothing stops you fr
72
71
  | `go-code-quality` | Production checklist: domain types, error contracts, context, goroutines. |
73
72
  | `go-modern` | Version-aware modern Go syntax. Reads `go.mod` to pick the right target. |
74
73
 
75
- ### 💳 `vocdoni-stripe` — Stripe operations for the SaaS
76
-
77
- | Skill | What it covers |
78
- | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
79
- | `stripe-subscription` | Create a subscription for an existing customer through the Stripe CLI (or MCP): prompts for the minimum inputs, clones per-customer *Custom* / *Integrator Starter* plan products, handles discounts and collection, confirms before writing. |
80
-
81
- Requires `jq` and either the [Stripe CLI](https://docs.stripe.com/stripe-cli) with a started session (`stripe login`, then `stripe agent setup` for its own skill) or a Stripe MCP server.
82
-
83
74
  ### 🔑 `vocdoni-internal-oauth` — staff sign-in for internal tools
84
75
 
85
76
  | Skill | What it covers |
@@ -96,23 +87,29 @@ Requires `jq` and either the [Stripe CLI](https://docs.stripe.com/stripe-cli) wi
96
87
 
97
88
  | Skill | What it covers |
98
89
  | ---------------------- | -------------- |
99
- | `subagent-driven-development` | How the main session runs any multi-step change that will be merged: size the work (spike / bounded / architectural), write and audit a spec, have a plan drafted and pre-flight audited, dispatch one subagent per task with a strict prompt contract, review every diff, run a whole-branch gate audit, then merge and release only on the owner's OK. An auditor model, the strongest one available, is the independent auditor and consultant; a ledger in `.delivery/` survives context compaction. The skill names model roles rather than models: `references/models.md` maps them to today's defaults (see that file for today's defaults), moves to newer versions as they ship, and picks a model with similar strengths when a default is unavailable. Ships audit and dispatch prompts, spec and plan templates, and `init-workspace.sh` / `task-brief.sh`. |
90
+ | `subagent-driven-development` | How the main session runs any multi-step change that will be merged: size the work (spike / bounded / architectural), write and audit a spec, have a plan drafted and pre-flight audited, dispatch one subagent per task with a strict prompt contract, review every diff, run a whole-branch gate audit, then merge and release only on the owner's OK. An auditor model, the strongest one available, is the independent auditor and consultant; a ledger in `.delivery/` survives context compaction. The skill names model roles rather than models: `references/models.md` maps them to today's defaults, moves to newer versions as they ship, and picks a model with similar strengths when a default is unavailable. Ships audit and dispatch prompts, spec and plan templates, and `init-workspace.sh` / `task-brief.sh`. |
100
91
 
101
92
  The plugin also installs a **SessionStart hook** so the model loads the skill on its own for feature, refactor, protocol, migration, multi-repo, deploy and benchmark work, and resumes any unfinished `.delivery/` ledger in the current repo. The hook is Claude Code-only; an npx install gets the skill, which still triggers from its description.
102
93
 
94
+ A **`model-router` agent** resolves the skill's four model roles from what can be dispatched right now (gateway models, alias targets and agent files, listed by `scripts/model-inventory.sh`), classifies each model with `references/model-catalog.md`, and gives every role a fallback. The router is a Claude Code plugin agent; an npx install gets the skill, the scripts and the catalog but not the agent, and resolves the roles by hand.
95
+
103
96
  ### 💬 `vocdoni-comments` — code comments
104
97
 
105
98
  | Skill | What it covers |
106
99
  | ---------- | -------------- |
107
100
  | `comments` | How to write code comments (doc, inline, JSDoc): 1-3 lines per block that say the why or a constraint the code can't show, without restating code, narrating history or repeating documented flows, and with claims that match the code. `trim.md` shortens existing comments, either the blocks a branch added (`/comments trim`) or every long block in a project or folder (`/comments trim project [path]`; a plugin install namespaces them as `/vocdoni-comments:comments trim`), keeping anything only the comment said and reporting where each dropped piece lives. |
108
101
 
102
+ The plugin also installs **SessionStart and SubagentStart hooks** that inject the `comments` body into every Claude Code session and into each subagent it starts, except read-only ones (`Explore`, `Plan`, `claude-code-guide`, `statusline-setup`) and forks, which already carry the session's copy. Subagents do not receive a session's SessionStart context, so without the second hook a delegated worker never sees the rules. The rules hold when comments are written as one step of a coding task and the skill's description never matches. The hook reads `skills/comments/SKILL.md` directly, so the skill is the only place to edit. `trim.md` still loads with the skill. The hook is Claude Code-only; an npx install gets the skill, which still triggers from its description.
103
+
109
104
  ### 📝 `vocdoni-contributing` — what the agent posts on the git host
110
105
 
111
106
  | Skill | What it covers |
112
107
  | -------------- | -------------- |
113
- | `contributing` | The rules for everything the agent writes on GitHub or GitLab: an opening line naming the model and the user it acts for, no `Co-authored-by` trailer, every PR linked to an issue (found, or opened before the PR), an epic's PRs stacked on each other with `gh stack` and merged in one go, length limits and structure for PR/MR descriptions and issues, findings of about three sentences in reviews (nits marked "Nit:"), and reviews posted as reviews marked "Approve" or "Request changes". |
108
+ | `contributing` | The rules for everything the agent writes on GitHub or GitLab: an opening line naming the model and the user it acts for, no `Co-authored-by` trailer, every PR linked to an issue (found, or opened before the PR), an epic's PRs stacked on each other with `gh stack` and merged in one go, length limits and structure for PR/MR descriptions and issues, findings of about three sentences in reviews (nits marked "Nit:"), review threads it addresses answered and resolved, and reviews posted as reviews marked "Approve" or "Request changes". |
109
+
110
+ The plugin also installs **SessionStart and SubagentStart hooks** that inject the same `contributing` body into every Claude Code session and into each subagent it starts, except read-only ones (`Explore`, `Plan`, `claude-code-guide`, `statusline-setup`) and forks, which already carry the session's copy. A subagent is told to leave the tracking issue and the PR to the session that delegated to it. Subagents do not receive a session's SessionStart context, so without the second hook a delegated worker never sees the rules. The rules hold even when a PR is one step of a larger task and the skill's description never matches. The hook reads `skills/contributing/SKILL.md` directly, so the skill is the only place to edit. The hook is Claude Code-only; an npx install gets the skill, which still triggers from its description.
114
111
 
115
- The plugin also installs a **SessionStart hook** that injects the same `contributing` body into every Claude Code session, so the rules hold even when a PR is one step of a larger task and the skill's description never matches. The hook reads `skills/contributing/SKILL.md` directly, so the skill is the only place to edit. The hook is Claude Code-only; an npx install gets the skill, which still triggers from its description.
112
+ The plugin declares `vocdoni-comments` as a dependency: installing `vocdoni-contributing` in Claude Code also installs and enables `vocdoni-comments` at the same scope, and `vocdoni-comments` cannot be disabled while `vocdoni-contributing` is enabled. Updating from a version before 0.5.0 installs it too (Claude Code 2.1.319 or later), but does not re-enable a `vocdoni-comments` you had disabled: `vocdoni-contributing` then fails to load until you run `claude plugin enable vocdoni-comments@vocdoni`, or `claude plugin install vocdoni-comments@vocdoni` if the update could not fetch it. An npx install does not follow dependencies.
116
113
 
117
114
  ### 🤖 `pi-subagent` — delegate to Pi subagents
118
115
 
@@ -144,7 +141,6 @@ claude plugin install vocdoni-sdk@vocdoni
144
141
  claude plugin install davinci-sdk@vocdoni
145
142
  claude plugin install vocdoni-integrator-sdk@vocdoni
146
143
  claude plugin install vocdoni-go@vocdoni
147
- claude plugin install vocdoni-stripe@vocdoni
148
144
  claude plugin install vocdoni-internal-oauth@vocdoni
149
145
  claude plugin install vocdoni-ui-style@vocdoni
150
146
  claude plugin install agentic-dev@vocdoni
@@ -159,7 +155,7 @@ Iterating locally? Point the marketplace at a checkout instead:
159
155
  claude plugin marketplace add /path/to/skills
160
156
  ```
161
157
 
162
- To have a repo's contributors install the plugins, commit this as the repo's `.claude/settings.json`. Once a contributor trusts the folder, Claude Code registers the marketplace and enables these plugins:
158
+ To have a repo's contributors use the plugins, commit this as the repo's `.claude/settings.json`. Once a contributor trusts the folder, Claude Code registers the marketplace and marks these plugins as enabled, but it does not download them:
163
159
 
164
160
  ```json
165
161
  {
@@ -173,6 +169,15 @@ To have a repo's contributors install the plugins, commit this as the repo's `.c
173
169
  }
174
170
  ```
175
171
 
172
+ Each contributor still installs them once per clone:
173
+
174
+ ```sh
175
+ claude plugin install vocdoni-comments@vocdoni --scope project
176
+ claude plugin install vocdoni-contributing@vocdoni --scope project
177
+ ```
178
+
179
+ Use `--scope user` instead to cover every project on the machine. Until a plugin is installed it does not load at session start, so neither its skill nor its hook is there: `/reload-plugins` loads it for the current session only, and the `/plugin` **Errors** tab can list it as enabled but not installed.
180
+
176
181
  ### npx (any client that reads a skills directory)
177
182
 
178
183
  Installs into `~/.claude/skills/` by default (where Claude Code looks at user scope).
@@ -188,8 +193,8 @@ npx @vocdoni/skills install --plugin integrator-sdk # remote plugin, cloned on
188
193
  npx @vocdoni/skills install --plugin davinci-sdk # full name (no vocdoni- prefix)
189
194
  npx @vocdoni/skills install --plugin agentic-dev # skill only; the SessionStart hook is Claude Code plugin-only
190
195
  npx @vocdoni/skills install --plugin ui-style # 'ui-style' → 'vocdoni-ui-style'
191
- npx @vocdoni/skills install --plugin comments # 'comments' → 'vocdoni-comments'
192
- npx @vocdoni/skills install --plugin contributing # 'contributing' → 'vocdoni-contributing'; skill only, the SessionStart hook is Claude Code plugin-only
196
+ npx @vocdoni/skills install --plugin comments # 'comments' → 'vocdoni-comments'; skill only, the hooks are Claude Code plugin-only
197
+ npx @vocdoni/skills install --plugin contributing # 'contributing' → 'vocdoni-contributing'; skill only, the hooks are Claude Code plugin-only
193
198
 
194
199
  # A single skill, looked up across plugins
195
200
  npx @vocdoni/skills install go-modern
@@ -228,7 +233,8 @@ claude plugin update vocdoni-sdk@vocdoni
228
233
  claude plugin update davinci-sdk@vocdoni
229
234
  claude plugin update vocdoni-integrator-sdk@vocdoni
230
235
  claude plugin update vocdoni-go@vocdoni
231
- claude plugin update vocdoni-stripe@vocdoni
236
+ claude plugin update vocdoni-internal-oauth@vocdoni
237
+ claude plugin update vocdoni-ui-style@vocdoni
232
238
  claude plugin update agentic-dev@vocdoni
233
239
  claude plugin update vocdoni-comments@vocdoni
234
240
  claude plugin update vocdoni-contributing@vocdoni
@@ -241,6 +247,12 @@ From inside a session you can do the same with `/plugin`: on the **Marketplaces*
241
247
 
242
248
  A plugin only updates when its `version` changes, so an unreleased change on `main` does not reach installed users until the plugin is released (see [Releasing](./CONTRIBUTING.md#releasing)).
243
249
 
250
+ #### A skill or hook is not loading
251
+
252
+ - `claude plugin list` must show the plugin, enabled, at the version in this repo: adding the marketplace installs nothing, and each plugin is installed on its own.
253
+ - A plugin enabled only by a repo's `.claude/settings.json` is not downloaded; install it as shown under [Install](#claude-code).
254
+ - Type `/` in a session and look for `/vocdoni-comments:comments` and `/vocdoni-contributing:contributing`. The `/plugin` **Errors** tab says why a plugin failed to load.
255
+
244
256
  ### npx
245
257
 
246
258
  Re-run the install against the latest package. `--force` overwrites the skill directories that are already there:
@@ -273,21 +285,20 @@ Copy the skill directories again over the old ones, or `git pull` if you symlink
273
285
  │ │ └── …
274
286
  │ ├── davinci-sdk/
275
287
  │ │ └── …
276
- │ ├── vocdoni-stripe/
277
- │ │ └── …
278
288
  │ ├── vocdoni-internal-oauth/
279
289
  │ │ └── …
280
290
  │ ├── vocdoni-ui-style/ # skill + tokens, components, logos, examples
281
291
  │ │ └── …
282
292
  │ ├── agentic-dev/ # skill + SessionStart hook (hooks/)
283
293
  │ │ └── …
284
- │ ├── vocdoni-comments/
294
+ │ ├── vocdoni-comments/ # skill + session/subagent hooks (hooks/)
285
295
  │ │ └── …
286
- │ ├── vocdoni-contributing/ # skill + SessionStart hook (hooks/)
296
+ │ ├── vocdoni-contributing/ # skill + session/subagent hooks (hooks/)
287
297
  │ │ └── …
288
298
  │ └── claude-pi-subagent/ # nested marketplace (pi-agent-tools)
289
299
  │ └── plugins/pi-subagent/ # MCP server plugin + agents — see its README
290
300
  ├── bin/install.js # npx CLI (zero deps, Node ≥ 18)
301
+ ├── test/ # node:test suites for the CLI and the plugin hooks
291
302
  ├── package.json # Published as @vocdoni/skills
292
303
  ├── README.md
293
304
  ├── CONTRIBUTING.md # Authoring guide
package/bin/install.js CHANGED
@@ -110,9 +110,9 @@ function readSkillMeta(skillDir) {
110
110
  const meta = { name: '', description: '' };
111
111
  try {
112
112
  const src = fs.readFileSync(path.join(skillDir, 'SKILL.md'), 'utf8');
113
- const m = src.match(/^---\s*\n([\s\S]*?)\n---/);
113
+ const m = src.match(/^---\s*\r?\n([\s\S]*?)\r?\n---/);
114
114
  if (!m) return meta;
115
- for (const line of m[1].split('\n')) {
115
+ for (const line of m[1].split(/\r?\n/)) {
116
116
  const kv = line.match(/^(name|description):\s*(.*)$/);
117
117
  if (kv) meta[kv[1]] = kv[2].replace(/^['"]|['"]$/g, '');
118
118
  }
@@ -185,8 +185,11 @@ function skillsFromManifest(manifest, rootDir) {
185
185
  }
186
186
  } else {
187
187
  add(collectSkillsAtPath(path.join(rootDir, 'skills')));
188
- // Plugin with a single SKILL.md at its root and no skills/ directory.
189
- if (skills.length === 0) add(collectSkillsAtPath(rootDir, manifest.name));
188
+ // Plugin with a single SKILL.md at its root and no skills/ directory. Only
189
+ // the root file counts: scanning the root would also pick up subdirectories.
190
+ if (skills.length === 0 && fs.existsSync(path.join(rootDir, 'SKILL.md'))) {
191
+ add(collectSkillsAtPath(rootDir, manifest.name));
192
+ }
190
193
  }
191
194
 
192
195
  skills.sort((a, b) => a.name.localeCompare(b.name));
@@ -503,4 +506,18 @@ function main(argv) {
503
506
  }
504
507
  }
505
508
 
506
- process.exit(main(process.argv.slice(2)));
509
+ if (require.main === module) {
510
+ process.exit(main(process.argv.slice(2)));
511
+ }
512
+
513
+ module.exports = {
514
+ parseArgs,
515
+ readSkillMeta,
516
+ collectSkillsAtPath,
517
+ skillsFromManifest,
518
+ resolveRemoteSource,
519
+ isRemoteSource,
520
+ resolvePluginName,
521
+ discoverPlugins,
522
+ main,
523
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vocdoni/skills",
3
- "version": "0.5.2",
3
+ "version": "0.6.0",
4
4
  "description": "Vocdoni's curated skills for AI coding assistants (Claude Code, Cursor, Cline, and other Anthropic-skill-compatible clients).",
5
5
  "bin": {
6
6
  "vocdoni-skills": "bin/install.js"
@@ -15,6 +15,7 @@
15
15
  ],
16
16
  "scripts": {
17
17
  "lint": "node bin/install.js list",
18
+ "test": "node --test test/*.test.js",
18
19
  "changeset": "changeset",
19
20
  "version-packages": "changeset version && npm install --package-lock-only",
20
21
  "release": "node .github/scripts/check-release.mjs && changeset publish"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "agentic-dev",
3
- "version": "0.3.1",
4
- "description": "A controlled way to run non-trivial engineering work with Claude Code. The subagent-driven-development skill sizes the work, writes and audits a spec and plan, delegates implementation to subagents task by task, reviews every diff, runs a strict whole-branch gate audit, then merges and releases only with the owner's explicit OK. Ships audit and dispatch prompt templates, spec and plan templates, a ledger that survives context compaction, and scripts that generate per-task briefs. A SessionStart hook tells the model when to load the skill without being asked, and flags unfinished deliveries in the current repo.",
3
+ "version": "0.5.0",
4
+ "description": "A controlled way to run non-trivial engineering work with Claude Code. The subagent-driven-development skill sizes the work, writes and audits a spec and plan, delegates implementation to subagents task by task, reviews every diff, runs a strict whole-branch gate audit, then merges and releases only with the owner's explicit OK. Ships audit and dispatch prompt templates, spec and plan templates, a ledger that survives context compaction, and scripts that generate per-task briefs. A SessionStart hook tells the model when to load the skill without being asked, and flags unfinished deliveries in the current repo. A model-router agent resolves the auditor, strong, standard and fast model roles from the models and agents available at the time, with a fallback for each.",
5
5
  "author": {
6
6
  "name": "Vocdoni",
7
7
  "url": "https://vocdoni.io"
@@ -0,0 +1,105 @@
1
+ ---
2
+ name: model-router
3
+ description: Resolves the four model roles of a subagent-driven delivery (auditor, strong, standard, fast) to dispatch targets from the models and agents available right now, using the model-inventory.sh output and the model catalog. Use in phase 1 of a delivery, when a dispatched model fails, times out or returns garbage and a role must be re-routed, when a newer model appears on the gateway, or when the owner asks which models a delivery should use. Returns one ledger Models line with a reason and a fallback per role. Read-only; dispatches nothing.
4
+ model: sonnet
5
+ tools: Read, Grep, Glob, Bash
6
+ ---
7
+
8
+ You resolve model roles. You read, decide and reply. You do not dispatch subagents, edit or
9
+ write any file, or change any setting. Bash is only for running `model-inventory.sh`.
10
+
11
+ ## Inputs the prompt gives you
12
+
13
+ - **Roles needed**: usually all four; on a re-route, the failed role and why it failed.
14
+ - **Class** of the delivery (bounded or architectural) and the **critical-code flag**: whether
15
+ the work implements cryptography or a core algorithm, and which.
16
+ - **Controller model**: the model ID the main session runs on.
17
+ - **Owner and repo rules** about models, quoted, or `none`.
18
+ - **Dispatchable agent types**: the names the session's Agent tool lists. Agent files added
19
+ after the session started are not loaded, so an agent missing from this list is not a target.
20
+ - **Catalog**: the path to `model-catalog.md`. Read it in full.
21
+ - **Inventory**: the path to `model-inventory.sh` (run it with `bash <path>`, add `--offline`
22
+ if the prompt says so) or its output pasted in.
23
+ - **Current `Models:` line**, on a re-route only.
24
+
25
+ If the catalog or the inventory is missing, say so in one line and stop.
26
+
27
+ ## Candidates
28
+
29
+ A role's candidates are the targets you could dispatch now:
30
+
31
+ - `general-purpose@<alias>` for `fable`, `opus`, `sonnet` and `haiku`. Its model is what the
32
+ inventory's Aliases section says the alias resolves to. `(gateway default)` means the exact ID
33
+ is not known: classify it by the alias's family and write the alias's family name, not an ID.
34
+ - an agent name from the inventory's Agents section that is also in the dispatchable list, whose
35
+ `model` is a gateway ID or an alias, and whose tools cover the role. The implementation roles
36
+ (strong, standard, fast) need Read, Grep, Glob, Bash, Write and Edit; the auditor needs only
37
+ Read, Grep and Glob, because it changes nothing and an auditor without Write returns its
38
+ report in its reply for the controller to save. `(all)` covers everything. `(inherit)` means
39
+ the controller's model.
40
+ - On a re-route, the target the prompt reports as failed is not a candidate, and neither is any
41
+ other target whose model is the same ID, even though the inventory still lists it. Name the ID
42
+ under `Unknown:` as `failed today: <id> (<reason>)` so the owner can fix the agent file or the
43
+ gateway; the controller records the observation in the catalog's Traits.
44
+
45
+ Classify each candidate's model by family with the catalog. A model whose family is not in the
46
+ catalog, or whose tier is `unknown, ask the owner`, is never a candidate.
47
+
48
+ ## Procedure
49
+
50
+ Apply these in order.
51
+
52
+ 1. **An owner or repo rule wins.** If it names a model or agent for a role, use it, even when the
53
+ catalog disagrees, and say so in the Why column.
54
+ 2. **Tier floor.** A candidate fills a role only if its family lists that tier. A family whose
55
+ tier note limits implementation (auditor-tier families implement only cryptography or core
56
+ algorithms) may fill the strong role only when the critical-code flag names such work, and
57
+ never with the same target as the auditor.
58
+ 3. **Newest version.** Within a family, take the newest version by the catalog's version order.
59
+ Never take an older version to save cost.
60
+ 4. **Capability order: auditor >= strong > standard > fast.** If a role has no candidate, take
61
+ the next role up, even past step 2's limit, and say so in the Why column. If a role ends on a
62
+ stronger model than the role above it, move the upper role to that model.
63
+ 5. **Auditor independence.** Among tier-equal auditor candidates, prefer one from a provider
64
+ other than the controller's. If the only auditor candidate is the controller's own model,
65
+ take it and say in the Why column that the audits are less independent.
66
+ 6. **Context.** For the auditor, prefer a target whose model is the `[1m]` variant, because gate
67
+ audits read the whole branch. An alias resolves to whatever the inventory says; note it when
68
+ that is not `[1m]`.
69
+ 7. **Latency for the fast role.** Weigh the latency the catalog records. A candidate observed
70
+ many times slower than another fast candidate loses to it.
71
+ 8. **Spread across providers, only as a tie-breaker.** Between candidates still equal, prefer a
72
+ provider no other role uses yet. Never drop a tier for it.
73
+ 9. **Fallback per role.** Pick one more target that qualifies for the role, from a different
74
+ provider or as an alias. If none qualifies, use the next role up, even past step 2's limit
75
+ (the auditor uses the strong role's target), and say so: a fallback only runs until the next
76
+ router run. At least one of target and fallback is a `general-purpose@<alias>`, because an
77
+ alias dispatch never depends on an agent being loaded.
78
+ 10. **Unknown IDs are never used.** List each gateway ID that matches no catalog family.
79
+
80
+ ## Output
81
+
82
+ Reply with exactly this, nothing before it:
83
+
84
+ ```
85
+ Models: auditor=<target> (<model id>; fallback <target>) strong=... standard=... fast=...
86
+
87
+ | Role | Target | Why | Fallback |
88
+ |---|---|---|---|
89
+ | auditor | <target> | <one line: tier, version, provider or rule that decided> | <target> (<model id>) |
90
+ | strong | ... | ... | ... |
91
+ | standard | ... | ... | ... |
92
+ | fast | ... | ... | ... |
93
+
94
+ Stale: <alias> resolves to <id>; <newer id> is on the gateway. <one line on the fix>
95
+ Unknown: <id>, <id>. Proposed catalog line: | <family> | <pattern> | unknown, ask the owner | ... |
96
+ Inventory: <live | cache dated ... | none>
97
+ ```
98
+
99
+ - The `Models:` line follows the grammar in `references/models.md`, next to the catalog: two
100
+ spaces between roles, the concrete model ID when known, then `; fallback <target>`.
101
+ - On a re-route, return the full line with only the affected roles changed.
102
+ - Omit `Stale:` and `Unknown:` when there is nothing to report. A stale alias is fixed by the
103
+ owner through `ANTHROPIC_DEFAULT_<X>_MODEL`, or by an agent file pinned to the newer ID, which
104
+ takes effect in the next session. Recommend one; change neither.
105
+ - Keep the Why column to one line per role. No other prose.
@@ -46,12 +46,13 @@ continue.
46
46
 
47
47
  ## 2. Roles and models
48
48
 
49
- This skill names **model roles**, not models, so it keeps working as new models ship.
50
- [references/models.md](references/models.md) maps each model role to today's default, says how
51
- to prefer a newer version, and how to pick a model with similar strengths when the default is
52
- not available. Resolve the four model roles in phase 1 and write them on the ledger's `Models:`
53
- line. Every dispatch then sets the Agent tool's `model` from that line, explicitly. If you leave
54
- `model` out, the subagent inherits the session's model, usually the most expensive one.
49
+ This skill names **model roles**, not models, so it keeps working as new models ship. In phase 1
50
+ the `model-router` agent that ships with this plugin resolves the four model roles from the
51
+ models and agents available right now. Write its answer on the ledger's `Models:` line and take
52
+ every dispatch's target from that line. [references/models.md](references/models.md) defines
53
+ the line and the defaults, and how to resolve by hand when the router is not installed.
54
+ [references/dispatch.md](references/dispatch.md) says how to dispatch each kind of target and
55
+ when to re-route a role to its fallback.
55
56
 
56
57
  | Role | Model role | Agent type | Use for |
57
58
  |---|---|---|---|
@@ -63,9 +64,10 @@ line. Every dispatch then sets the Agent tool's `model` from that line, explicit
63
64
  | Mechanical implementer | fast model | general-purpose | fully specified code to transcribe, vendoring, single-file edits, renames |
64
65
  | Code mapper | standard model | Explore | read-only maps of the code with `file:line`, before designing or planning |
65
66
 
66
- Use a more specialised agent type when one is installed and fits the job, such as a
67
- language-specific reviewer or a cheaper worker for mechanical edits. Keep the same role
68
- boundaries.
67
+ When the `Models:` line names an agent for a model role, that agent replaces the Agent type
68
+ column for the role. Otherwise use a more specialised agent type when one is installed and fits
69
+ the job, such as a language-specific reviewer or a cheaper worker for mechanical edits. Keep the
70
+ same role boundaries.
69
71
 
70
72
  **Subagents never dispatch subagents.** Say so in every prompt, because nested delegation hides
71
73
  work from your review.
@@ -89,7 +91,13 @@ go. Phases marked † are skipped for Bounded work.
89
91
 
90
92
  **1. Explore and brainstorm.** Map the code read-only first, using Explore agents that return
91
93
  `file:line` maps. An Explore map tells you *where* code is, not *what* it does; read the code
92
- that matters yourself. Then work out the design with the owner. Ask one question at a time with
94
+ that matters yourself. Then work out the design with the owner. Before you propose it, compare
95
+ the design and the existing code it builds on against well-known implementations of the same
96
+ problem (mature open-source projects, standards, published designs), and bring what they handle
97
+ that yours doesn't. Survey widely and report the sources that disagree with your draft, not
98
+ only the ones that confirm it. Where the current code falls short of them, be bold: offer to
99
+ widen the scope and align it now, or to track it in a separate issue, and let the owner choose;
100
+ re-size the work if the scope grows. Ask one question at a time with
93
101
  AskUserQuestion, as multiple choice with your recommended option first. Show numbers (sizes,
94
102
  latencies, costs, line counts) before asking the owner to choose. Resolve the model roles with
95
103
  [references/models.md](references/models.md); once the workspace exists, write them on the
@@ -274,7 +282,7 @@ formats and the recovery procedure are in [references/ledger.md](references/ledg
274
282
 
275
283
  | File | Read it when |
276
284
  |---|---|
277
- | [references/models.md](references/models.md) | resolving the model roles in phase 1, or when a model is unavailable or a newer one has shipped |
285
+ | [references/models.md](references/models.md), [references/model-catalog.md](references/model-catalog.md) | resolving the model roles in phase 1 or re-routing one, checking a model family's tier, or classifying an unknown model ID |
278
286
  | [references/audits.md](references/audits.md) | dispatching any audit or consult, or triaging its findings |
279
287
  | [references/dispatch.md](references/dispatch.md) | writing an implementer, fixer or task-reviewer prompt, or handling a report |
280
288
  | [references/ledger.md](references/ledger.md) | starting the workspace, writing rulings, or recovering after compaction |
@@ -283,4 +291,6 @@ formats and the recovery procedure are in [references/ledger.md](references/ledg
283
291
 
284
292
  Related skills: for Go repos, give reviewers and auditors [[go-code-quality]] and
285
293
  [[go-best-practices]] as their checklist. The `pi-subagent` plugin can run mechanical tasks on
286
- other models; treat its diffs like any implementer's diff.
294
+ other models; treat its diffs like any implementer's diff. The `model-router` agent is a Claude
295
+ Code plugin agent, so an npx install resolves the model roles by hand as
296
+ [references/models.md](references/models.md) describes.
@@ -11,19 +11,22 @@
11
11
 
12
12
  ## Ground rules for every audit dispatch
13
13
 
14
- - `model`: the auditor model from the ledger's `Models:` line ([models.md](models.md)), agent type
15
- `general-purpose`. The result arrives as a notification. While it runs, touch nothing under
16
- audit.
17
- - If the auditor model is unavailable, pick a substitute as [models.md](models.md) describes, send
18
- it the same prompt and record `Audit <kind>: run on <model> (auditor model unavailable)` in the
19
- ledger. Update the `Models:` line as [models.md](models.md) says.
14
+ - Target: the auditor on the ledger's `Models:` line, dispatched as
15
+ [dispatch.md](dispatch.md#dispatching-to-a-target) says (an alias runs as `general-purpose`).
16
+ The result arrives as a notification. While it runs, touch nothing under audit.
17
+ - If the auditor target has no Write tool, it returns the full report in its reply, and you
18
+ write it unchanged to the report file the prompt names.
19
+ - If the auditor target fails, re-route it as [dispatch.md](dispatch.md#re-routing-a-role) says,
20
+ send the fallback the same prompt and record `Audit <kind>: run on <target> (auditor model
21
+ unavailable)` in the ledger.
20
22
  - Give the auditor **paths, not pastes**. It reads the spec, plan, code and diffs itself, so it audits
21
23
  what is really there and not your summary of it.
22
24
  - Say what is already decided and must not be relitigated, such as owner rulings and approved
23
25
  spec sections. Otherwise the audit spends its effort on settled questions.
24
- - Audits are **read-only**. The auditor writes its report to the workspace path you give it and changes
25
- no other file, makes no commits and runs nothing that alters state. Read-only commands
26
- (`git log`, `grep`, running existing tests) are fine.
26
+ - Audits are **read-only**. The auditor writes its report to the workspace path you give it, or
27
+ returns it for the controller to write, and changes no other file, makes no commits and runs
28
+ nothing that alters state. Read-only commands (`git log`, `grep`, running existing tests)
29
+ are fine.
27
30
  - The auditor does not dispatch subagents.
28
31
  - An owner decision is not re-argued. But if following it produces a Critical defect, the
29
32
  auditor reports that as a finding titled `Escalation:` with the evidence. You carry it to the owner
@@ -71,10 +74,12 @@ Check:
71
74
  and writers, rollout order, rollback.
72
75
  4. Failure modes: untrusted input, partial failure, concurrency, restarts, resource limits.
73
76
  5. Security: secrets, auth, trust boundaries, replay, injection.
74
- 6. Anything simpler that meets the same goals.
77
+ 6. Anything simpler that meets the same goals, and anything well-known implementations of the
78
+ same problem handle that this design misses.
75
79
  7. Missing decisions an implementer would have to guess.
76
80
 
77
- Write the report to <workspace>/audit-spec.md:
81
+ Write the report to <workspace>/audit-spec.md, or return it in your reply
82
+ if you have no Write tool:
78
83
  - Verdict: APPROVE | APPROVE WITH CHANGES | REWORK
79
84
  - Findings using the F<n> block format, most severe first
80
85
  - "Verified" list: claims you checked and found correct (brief)
@@ -104,7 +109,8 @@ Produce:
104
109
  4. Global Constraints: each one is either respected by every task or the plan says why not.
105
110
  5. Merge and release section: complete, in the right order, and with owner OK points marked.
106
111
 
107
- Write the report to <workspace>/preflight.md:
112
+ Write the report to <workspace>/preflight.md, or return it in your reply
113
+ if you have no Write tool:
108
114
  - Verdict: EXECUTE | EXECUTE AFTER FIXES | REPLAN
109
115
  - The conflict table
110
116
  - Findings using the F<n> block format. Put the owning task in "Where" and give verbatim
@@ -138,7 +144,8 @@ Check:
138
144
  commits.
139
145
  6. Leftovers: TODOs, debug code, dead code, untracked generated files.
140
146
 
141
- Write the report to <workspace>/gate.md:
147
+ Write the report to <workspace>/gate.md, or return it in your reply
148
+ if you have no Write tool:
142
149
  - Verdict: MERGE | MERGE AFTER FIXES | DO NOT MERGE
143
150
  - Findings using the F<n> block format
144
151
  - A "Residual risk" paragraph: what could still go wrong after the fixes, and how we would notice
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## Contents
4
4
  - Choosing the model role for a task
5
+ - Dispatching to a target
6
+ - Re-routing a role
5
7
  - Implementer prompt contract
6
8
  - Project constraints block
7
9
  - Report contract
@@ -12,7 +14,8 @@
12
14
  ## Choosing the model role for a task
13
15
 
14
16
  This applies the roles table in SKILL.md section 2 to a single task. The ledger's `Models:` line
15
- turns the model role into the Agent tool's `model` value ([models.md](models.md)).
17
+ turns the model role into a dispatch target ([models.md](models.md#the-models-line)), dispatched
18
+ as the next section says.
16
19
 
17
20
  | The task is… | Model role |
18
21
  |---|---|
@@ -31,6 +34,39 @@ it, not the task's original complexity:
31
34
  When in doubt, pick the cheaper model role and let the escalation ladder catch failures. The
32
35
  exception is security-sensitive code, which starts at the strong model.
33
36
 
37
+ ## Dispatching to a target
38
+
39
+ Read the role's target from the `Models:` line and dispatch it one of two ways:
40
+
41
+ | Target | `subagent_type` | `model` |
42
+ |---|---|---|
43
+ | `general-purpose@<alias>` | the agent type SKILL.md's roles table names for the job | `<alias>`, always: left out, the subagent inherits the session's model |
44
+ | an agent name, such as `glm-worker` | `<name>` | omitted: a passed alias overrides the model in the agent's file |
45
+
46
+ The code mapper stays read-only, so it always runs as `Explore` on an alias: the standard role's
47
+ target when that is an alias, otherwise its fallback. The prompt contract below applies to both
48
+ kinds of target; an agent's own instructions do not replace it.
49
+
50
+ ## Re-routing a role
51
+
52
+ Switch a role to its fallback, without stopping the delivery, when its target:
53
+
54
+ - fails with a model error (unknown model, no access, overloaded after one retry);
55
+ - has not reported within this bound when you next look: 20 minutes for a fast-role task, 45 for
56
+ a standard or strong one, 90 for an audit. Do not set timers for it. Stop the agent (TaskStop)
57
+ and check `git status` for partial edits before you re-dispatch;
58
+ - returns an empty or garbled report twice in a row.
59
+
60
+ Then:
61
+
62
+ 1. Log `Model: <role> -> <fallback> (<reason>)` and make the fallback the role's target on the
63
+ `Models:` line.
64
+ 2. Send the same brief to the fallback. A re-route is not a fix round and does not climb the
65
+ escalation ladder.
66
+ 3. Run the router for that role again ([models.md](models.md#resolving-the-roles-with-the-router))
67
+ so it has a new fallback, and dispatch from its answer from then on. If the fallback fails too
68
+ and the router has nothing left, tell the owner.
69
+
34
70
  ## Implementer prompt contract
35
71
 
36
72
  Every implementer prompt has these parts, in this order. Implementers start with no context, so