@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
@@ -43,7 +43,7 @@ Plan: docs/plans/2026-10-13-session-resume-plan.md
43
43
  Class: architectural Branch: feat/session-resume
44
44
  Repos: ~/src/server @ 1a2b3c4, ~/src/client @ 5d6e7f8
45
45
  Budget: 25 dispatches / 3 audits Used: 9 / 3
46
- Models: auditor=<value> strong=<value> standard=<value> fast=<value>
46
+ Models: auditor=general-purpose@fable (claude-fable-5-2[1m]; fallback astra-auditor) strong=general-purpose@opus (claude-opus-5-5[1m]; fallback general-purpose@fable) standard=glm-worker (claude-glm-5.3; fallback general-purpose@sonnet) fast=general-purpose@haiku (claude-haiku-5-5[1m]; fallback qwen-worker)
47
47
 
48
48
  ## Lifecycle
49
49
  - [x] 1. Explore and brainstorm; class stated to the owner; model roles resolved
@@ -62,6 +62,8 @@ Task 1: dispatched (mechanical implementer, fast model, BASE 1a2b3c4)
62
62
  Task 1: reviewed by controller (clean)
63
63
  Task 1: complete (9f8e7d6, review clean)
64
64
  Task 2: dispatched (implementer, standard model, BASE 9f8e7d6)
65
+ Model: standard -> glm-worker (model error: sonnet overloaded after one retry)
66
+ Task 2: dispatched (implementer, standard model, BASE 9f8e7d6)
65
67
  Task 2: reviewed by controller (2 Important -> fix round 1)
66
68
  Task 2: fix round 1 sent (same implementer)
67
69
  Task 2: complete (4c5d6e7, review clean after 1 fix round)
@@ -96,8 +98,8 @@ the rest during recovery. Add a `Plan:` header line once the plan exists, fill i
96
98
 
97
99
  1. Find the workspace: `ls .delivery/` in the repo, or search for `progress.md` files.
98
100
  2. Read `progress.md` in full. The header names the spec, the plan and the resolved models, and
99
- the lifecycle shows the phase. Keep dispatching with the models on the `Models:` line. If
100
- it still shows `<value>` placeholders, resolve the roles again with [models.md](models.md)
101
+ the lifecycle shows the phase. Keep dispatching to the targets on the `Models:` line. If
102
+ it still shows `<target>` placeholders, resolve the roles again with [models.md](models.md)
101
103
  before any dispatch.
102
104
  3. Check each repo's `git log --oneline <base>..HEAD` against the ledger:
103
105
  - a commit with no `complete` line means the task finished but was never reviewed, so
@@ -0,0 +1,118 @@
1
+ # Model catalog
2
+
3
+ ## Contents
4
+ - How to read this file
5
+ - Anthropic
6
+ - OpenAI
7
+ - Z.AI GLM
8
+ - Google Gemini
9
+ - Local and other
10
+ - Unknown IDs
11
+ - Keeping this file current
12
+
13
+ Classify every model ID by its family in this file before it fills a role. A family's **tiers** are
14
+ the only roles it may fill. An ID whose family is not listed is never used. The gateway's model
15
+ list carries names and dates but no capability data, so the tiers here come from the owner and
16
+ from what deliveries observed, never from a model's name or release date alone.
17
+
18
+ ## How to read this file
19
+
20
+ - **Tiers** name the model roles a family may fill: `auditor`, `strong`, `standard`, `fast`. What
21
+ each role does and the capability order between them are in [models.md](models.md).
22
+ - **Version order**: the newest version in a family wins. Compare the numbers after the family
23
+ name component by component (`5-2` > `5-1` > `5`, `6.2` > `6.1` > `6`). An 8-digit date suffix
24
+ (`-20251001`) is not part of the version. Older versions are fallbacks only.
25
+ - **Variants of one version are not newer versions.** `[1m]` is the same model with a 1M-token
26
+ context. `-gw` is a second gateway route to the same model (same display name); use the plain
27
+ ID and keep `-gw` as a fallback. A named variant (`-flash`, `-turbo`, `-lite`) is its own row.
28
+ - **Prefer the `[1m]` variant for whole-branch gate audits**, where the spec, the plan and the
29
+ full diff must fit in one context. Elsewhere use the plain ID unless a brief needs the room.
30
+ - **Evidence** says where each claim comes from: `owner 2026-11-30` (the owner's judgement),
31
+ `observed <date>` (measured in a delivery), or `unknown`. Traits marked `unknown` are not
32
+ guessed; weigh them only once a delivery has observed them.
33
+
34
+ ## Anthropic
35
+
36
+ | Family | ID pattern | Tiers | Traits | Version order | Evidence |
37
+ |---|---|---|---|---|---|
38
+ | Fable | `claude-fable-<n>[-<n>]`, `[1m]` | auditor; implements only cryptography or core algorithms | 1M with `[1m]`; highest cost; latency unknown; tool use reliable | 5-2 > 5-1 > 5 | tiers owner 2026-11-30; tool use observed 2026-11-30 |
39
+ | Opus | `claude-opus-<n>[-<n>]`, `[1m]`, `-gw` | strong (plans, complex implementation) | 1M with `[1m]`; high cost; latency unknown; tool use reliable | 5-5 > 5 > 4-8 > 4-7 > 4-6 > 4-5 | tiers owner 2026-11-30; tool use observed 2026-11-30 |
40
+ | Sonnet | `claude-sonnet-<n>[-<n>]`, `[1m]`, `-gw` | standard, fast | 1M with `[1m]`; medium cost; latency unknown; tool use reliable | 5-5 > 5 > 4-6 > 4-5 | tiers owner 2026-11-30; tool use observed 2026-11-30 |
41
+ | Haiku | `claude-haiku-<n>[-<n>]`, `[1m]` | standard, fast | 1M with `[1m]`; low cost; about 6 s for a one-line reply; tool use reliable | 5-5 > 4-5 | tiers owner 2026-11-30; latency observed 2026-11-30 |
42
+
43
+ Known IDs on 2026-11-30: `claude-fable-5-2`, `claude-fable-5-1`, `claude-fable-5`,
44
+ `claude-opus-5-5`, `claude-opus-5`, `claude-sonnet-5-5`, `claude-sonnet-5`, `claude-haiku-5-5`, each
45
+ with a `[1m]` variant, plus `-gw` routes for Opus and Sonnet and older 4.x versions.
46
+
47
+ ## OpenAI
48
+
49
+ Served through the gateway as "OpenAI Codex". Only Astra has a tier from the owner.
50
+
51
+ | Family | ID pattern | Tiers | Traits | Version order | Evidence |
52
+ |---|---|---|---|---|---|
53
+ | GPT Astra | `claude-gpt-<n>[.<n>]-astra` | auditor; implements only cryptography or core algorithms | context, latency, cost and tool use unknown; `claude-gpt-6-astra` listed by the gateway but returned 404 model_not_found on dispatch | 6.2 > 6 | tiers owner 2026-11-30; 404 observed 2026-11-30 |
54
+ | GPT Sol | `claude-gpt-<n>[.<n>]-sol` | unknown, ask the owner | unknown | 6.2 > 6.1 > 6 > 5.6 | unknown |
55
+ | GPT Terra | `claude-gpt-<n>[.<n>]-terra` | unknown, ask the owner | unknown | 6.1 > 5.6 | unknown |
56
+ | GPT Luna | `claude-gpt-<n>[.<n>]-luna` | unknown, ask the owner | unknown | 6 > 5.6 | unknown |
57
+ | GPT Chat Thinking | `claude-gpt-<n>-chat-thinking` | unknown, ask the owner | unknown | 6 | unknown |
58
+ | GPT Image | `claude-gpt-image-<n>[.<n>]` | none: image generation, not a coding model | not applicable | 2 > 1.5 | display name |
59
+
60
+ Known IDs on 2026-11-30: `claude-gpt-6.2-astra`, `claude-gpt-6-astra`, `claude-gpt-6.2-sol`,
61
+ `claude-gpt-6.1-sol`, `claude-gpt-6-sol`, `claude-gpt-6.1-terra`, `claude-gpt-6-luna`,
62
+ `claude-gpt-5.6-sol`, `claude-gpt-5.6-terra`, `claude-gpt-5.6-luna`, `claude-gpt-6-chat-thinking`.
63
+
64
+ ## Z.AI GLM
65
+
66
+ | Family | ID pattern | Tiers | Traits | Version order | Evidence |
67
+ |---|---|---|---|---|---|
68
+ | GLM | `claude-glm-<n>[.<n>]` | standard, fast | about 170 s for a one-line reply on 5.3, too slow for most fast-tier work; context, cost and tool use unknown | 5.4 > 5.3 > 5.2 > 5.1 > 5 > 4.7 > 4.6 > 4.5 | tiers owner 2026-11-30; latency observed 2026-11-30 |
69
+ | GLM Flash | `claude-glm-<n>[.<n>]-flash` | standard, fast | unknown | 5.3 | tiers owner 2026-11-30 |
70
+ | GLM FlashX | `claude-glm-<n>[.<n>]-flashx` | standard, fast | unknown | 5.3 | tiers owner 2026-11-30 |
71
+ | GLM Turbo | `claude-glm-<n>[.<n>]-turbo` | standard, fast | unknown | 5 | tiers owner 2026-11-30 |
72
+ | GLM Air | `claude-glm-<n>[.<n>]-air` | standard, fast | unknown | 4.5 | tiers owner 2026-11-30 |
73
+ | GLM FlashX Legal | `claude-glm-<n>[.<n>]-flashx-legal` | unknown, ask the owner | unknown | 5.3 | unknown |
74
+
75
+ The owner's tier covers the GLM family as a whole. The variants inherit it, but none has been
76
+ observed yet, so weigh the base GLM's latency against them until one has.
77
+
78
+ ## Google Gemini
79
+
80
+ | Family | ID pattern | Tiers | Traits | Version order | Evidence |
81
+ |---|---|---|---|---|---|
82
+ | Gemini Flash | `claude-gemini-<n>[.<n>]-flash[-high\|-tiered]`, `[1m]` | unknown, ask the owner | 1M with `[1m]`; rest unknown | 3.8 > 3 | unknown |
83
+ | Gemini Flash Lite | `claude-gemini-<n>[.<n>]-flash-lite`, `[1m]` | unknown, ask the owner | 1M with `[1m]`; rest unknown | 3.5 > 3.1 | unknown |
84
+
85
+ Known IDs on 2026-11-30: `claude-gemini-3.8-flash-high`, `claude-gemini-3.8-flash-tiered`,
86
+ `claude-gemini-3-flash`, `claude-gemini-3.5-flash-lite`, `claude-gemini-3.1-flash-lite`, each with a
87
+ `[1m]` variant.
88
+
89
+ ## Local and other
90
+
91
+ | Family | ID pattern | Tiers | Traits | Version order | Evidence |
92
+ |---|---|---|---|---|---|
93
+ | Qwen | `claude-openai-qwen<n>-<size>b` | standard, fast | self-hosted behind a custom OpenAI-compatible host; context, latency and tool use unknown | 38 (only version known) | tiers owner 2026-11-30 |
94
+
95
+ Known IDs on 2026-11-30: `claude-openai-qwen38-27b`.
96
+
97
+ ## Unknown IDs
98
+
99
+ An ID is unknown when no ID pattern above matches it. A new version of a listed family is not
100
+ unknown: it matches the pattern and the version order ranks it.
101
+
102
+ 1. Try to classify it by family name: `claude-<family>-...` against the patterns above.
103
+ 2. If no family matches, do not use it for any role, not even as a fallback.
104
+ 3. Name it to the owner in the next status, with a proposed catalog line whose tier is
105
+ `unknown, ask the owner`, and record the owner's answer here.
106
+
107
+ A family whose tier is `unknown, ask the owner` is treated the same way: it is never chosen until
108
+ the owner gives it a tier.
109
+
110
+ ## Keeping this file current
111
+
112
+ - **A new version of a listed family** needs no edit. The version order picks it up.
113
+ - **A new family or provider** gets a row with the tier the owner gives it, `unknown, ask the
114
+ owner` until then.
115
+ - **An observation from a delivery** (a latency, a timeout, a garbled report, a reliable run)
116
+ goes into Traits with `observed <date>` in Evidence. One data point is enough to record, not
117
+ to change a tier.
118
+ - **A tier changes only on the owner's word.** Write the date in Evidence.
@@ -2,93 +2,116 @@
2
2
 
3
3
  ## Contents
4
4
  - The four model roles
5
- - Resolving a role to a model
6
- - Recording the mapping
5
+ - Resolving the roles with the router
6
+ - The Models line
7
+ - Resolving by hand
7
8
  - Keeping this file current
8
9
 
9
10
  The rest of the skill names **model roles**, never models, so it outlives any one model release.
10
- This file is the only place that maps a role to a concrete model. Resolve every role once, at the
11
- start of a delivery (phase 1), write the result to the ledger's `Models:` line as soon as the
12
- ledger exists, and dispatch from that line until the delivery ends. A fixed mapping keeps audits and reviews comparable, and it
13
- survives context compaction.
11
+ The `model-router` agent maps each role to a concrete dispatch target once, at the start of a
12
+ delivery (phase 1), and again when a role has to be re-routed. Write the result on the ledger's
13
+ `Models:` line and dispatch from that line until the delivery ends. A fixed mapping keeps audits
14
+ and reviews comparable, and it survives context compaction.
14
15
 
15
16
  ## The four model roles
16
17
 
17
- | Model role | What the model must be good at | Skill roles that use it | Default | Agent tool `model` |
18
+ | Model role | What the model must be good at | Skill roles that use it | Default | Default target |
18
19
  |---|---|---|---|---|
19
- | **auditor model** | The strongest reasoning available: holding a spec, a plan and a whole-branch diff in mind at once, finding what the author missed, arguing soundness, concurrency and security. Speed and cost matter least. | Auditor and consultant | Fable 5.2 | `fable` |
20
- | **strong model** | Deep coding and reasoning at a moderate cost: long plans written against real code, subtle fixes, concurrency, cryptography, security paths. | Plan drafter, Hard fixer, implementers of security-sensitive tasks | Opus 5.5 | `opus` |
21
- | **standard model** | Reliable multi-file implementation and code reading at a low cost, following a precise brief. | Implementer, Code mapper | Sonnet 5.5 | `sonnet` |
22
- | **fast model** | Quick, cheap execution of fully specified edits: transcribing given code, renames, vendoring, single-file changes. | Mechanical implementer | Haiku 5.5 | `haiku` |
20
+ | **auditor model** | The strongest reasoning available: holding a spec, a plan and a whole-branch diff in mind at once, finding what the author missed, arguing soundness, concurrency and security. Speed and cost matter least. | Auditor and consultant | Fable 5.2 | `general-purpose@fable` |
21
+ | **strong model** | Deep coding and reasoning at a moderate cost: long plans written against real code, subtle fixes, concurrency, cryptography, security paths. | Plan drafter, Hard fixer, implementers of security-sensitive tasks | Opus 5.5 | `general-purpose@opus` |
22
+ | **standard model** | Reliable multi-file implementation and code reading at a low cost, following a precise brief. | Implementer, Code mapper | Sonnet 5.5 | `general-purpose@sonnet` |
23
+ | **fast model** | Quick, cheap execution of fully specified edits: transcribing given code, renames, vendoring, single-file changes. | Mechanical implementer | Haiku 5.5 | `general-purpose@haiku` |
23
24
 
24
25
  Capability order: auditor ≥ strong > standard > fast. The escalation ladder in
25
- [dispatch.md](dispatch.md) climbs this order, and every step below must keep it. After resolving
26
- all four roles, check the order: if a role ends up on a stronger model than the role above it,
27
- move the upper role to that model. The auditor always ends on the most capable model you have.
28
-
29
- The controller is the session's own model and is not resolved here.
30
-
31
- ## Resolving a role to a model
32
-
33
- Work through these steps for each role and stop at the first one that gives an answer. If none
34
- applies, the Default column is the answer: steps 2 and 3 only move a role to something newer or
35
- stronger, and steps 4 and 5 only apply when the default cannot be used.
36
-
37
- 1. **The owner or the repo names a model.** An instruction from the owner, or a rule in the
38
- repo's CLAUDE.md or CONTRIBUTING, wins over everything below.
39
- 2. **A newer version of the default exists.** Use the newest version in the default's family
40
- (Fable 5.5 once it ships replaces Fable 5.2, Opus 6 replaces Opus 5.5). Family aliases such as
41
- `fable` or `opus` in Claude Code's Agent tool normally resolve to the newest version the
42
- harness offers, so prefer the alias to a pinned model ID. Where the harness only takes full
43
- IDs, pick the highest version in the family. Check the model list in your environment or
44
- system prompt: if it names a newer version than the defaults above, that version is the
45
- default now.
46
- 3. **A newer family supersedes the default.** If the provider documents a new model as the
47
- successor to the default, or as stronger in the same price band, use it for that role.
48
- 4. **The default is not available.** The family is missing from the Agent tool's `model` values,
49
- the dispatch fails with a model error, or the account has no access. Pick the available model
50
- whose strengths best match the role's column above, judged by capability, not by name or
51
- release date. Then:
52
- - **auditor model:** use the most capable model available. If that is the controller's own
53
- model, the audits still run, but they are less independent because the same model wrote
54
- and audits the work. Tell the owner once, and say so in the ledger.
55
- - **any other role:** never use a model weaker than the role below it. If no model fits, take
56
- the next role up (auditor for strong, strong for standard, standard for fast). That costs
57
- more but stays safe.
58
- - Two roles may resolve to the same model. Keep the role boundaries anyway: the auditor stays
59
- read-only and implementers keep their prompt contract.
60
- - **no per-subagent choice:** if the harness cannot set a model for each subagent, every
61
- subagent runs on the session's model. Write `Models: all=<session model> (no per-agent model
62
- selection)` and apply the auditor note above.
63
- 5. **Other providers and local models.** If the harness offers models from other providers or
64
- local runtimes, map them by the same characteristics. The `pi-subagent` plugin can run tasks
65
- on such models; treat them as candidates for the fast or standard role unless the owner says
66
- they are stronger.
26
+ [dispatch.md](dispatch.md) climbs this order, and every resolution must keep it. The auditor
27
+ always ends on the most capable model available.
67
28
 
68
- Never pick an older version than the default to save money. If cost is the concern, use a
69
- cheaper role for the task instead.
29
+ The controller is the session's own model and is not resolved here. Which model family may fill
30
+ which role is in [model-catalog.md](model-catalog.md).
31
+
32
+ ## Resolving the roles with the router
33
+
34
+ Dispatch the `model-router` agent that ships with the agentic-dev plugin, as `subagent_type:
35
+ agentic-dev:model-router` with no `model` ([dispatch.md](dispatch.md#dispatching-to-a-target)).
36
+ It runs `scripts/model-inventory.sh` to see which gateway models, aliases and agent files exist
37
+ right now, reads [model-catalog.md](model-catalog.md), and returns a `Models:` line with a reason
38
+ and a fallback for every role.
39
+
40
+ ```
41
+ Resolve the model roles for <delivery topic>. You do not dispatch subagents and edit no file.
42
+ Roles needed: auditor, strong, standard, fast (on a re-route: <role>, failed because <reason>)
43
+ Class: <bounded | architectural> Critical code: <no | yes: cryptography or core algorithm, which>
44
+ Controller model: <the session's model ID>
45
+ Owner and repo rules: <quoted from the owner, CLAUDE.md or CONTRIBUTING, or "none">
46
+ Dispatchable agent types: <every name in the Agent tool's list of agent types>
47
+ Catalog: <skill-dir>/references/model-catalog.md
48
+ Inventory: bash <skill-dir>/scripts/model-inventory.sh
49
+ Current Models line: <on a re-route only>
50
+ ```
51
+
52
+ Run it in phase 1, again whenever [dispatch.md](dispatch.md#re-routing-a-role) re-routes a role,
53
+ and when the owner asks or a newer model shows up. Then:
70
54
 
71
- ## Recording the mapping
55
+ - Copy its `Models:` line into the ledger header, replacing the whole line. Until the ledger
56
+ exists, keep it in the status you send the owner.
57
+ - Send the owner its table in the next status, with any `Stale:` or `Unknown:` note. A stale alias
58
+ and an unknown model are the owner's to fix. Agent files and environment changes take effect
59
+ in the next session.
60
+ - If the only auditor is the controller's own model, the audits still run but are less
61
+ independent. Tell the owner once and note it in the ledger.
72
62
 
73
- Write the resolved mapping in the ledger header as soon as `init-workspace.sh` has created the
74
- ledger (phase 2); until then, keep it in the status you send the owner. Use the value you will
75
- pass as the Agent tool's `model`, plus the concrete version when you know it. Replace the whole
76
- placeholder line the script writes, including its hint:
63
+ ## The Models line
64
+
65
+ The ledger's `Models:` line is the single source for every dispatch. Its grammar, stated once
66
+ here:
77
67
 
78
68
  ```
79
- Models: auditor=fable (Fable 5.2) strong=opus standard=sonnet fast=haiku
69
+ Models: <role>=<target>[ (<note>)] <role>=<target>[ (<note>)] ...
80
70
  ```
81
71
 
82
- Always set the Agent tool's `model` from this line. If you leave it out, the subagent inherits
83
- the session's model, which is usually the most expensive one.
72
+ - `<role>` is `auditor`, `strong`, `standard` or `fast`. Roles are separated by two spaces, and
73
+ the whole line stays on one physical line.
74
+ - `<target>` is either `general-purpose@<alias>`, where `<alias>` is `fable`, `opus`, `sonnet` or
75
+ `haiku`, or the name of an agent the session can dispatch, such as `glm-worker` or
76
+ `agentic-dev:model-router`.
77
+ - `<note>` holds the concrete model ID when known, then `; fallback <target>`. The router always
78
+ writes a fallback.
84
79
 
85
- If a role has to change mid-delivery (a model becomes unavailable, or the owner asks), log
86
- `Model: <role> -> <value> (<reason>)` and update the `Models:` line. An audit that ran on a
87
- substitute is logged as `Audit <kind>: run on <value> (auditor model unavailable)`.
80
+ ```
81
+ Models: auditor=astra-auditor (claude-gpt-6.2-astra; fallback general-purpose@fable) strong=general-purpose@opus (claude-opus-5-5[1m]; fallback general-purpose@fable) standard=general-purpose@sonnet (claude-sonnet-5-5[1m]; fallback glm-worker) fast=general-purpose@haiku (claude-haiku-5-5[1m]; fallback qwen-worker)
82
+ ```
83
+
84
+ How each kind of target is dispatched is in [dispatch.md](dispatch.md#dispatching-to-a-target).
85
+ A change mid-delivery, a re-route or the owner's request, gets a `Model:` log line as
86
+ [dispatch.md](dispatch.md#re-routing-a-role) shows, and the line is updated.
87
+
88
+ If the harness cannot choose a model per subagent, every subagent runs on the session's model.
89
+ Write `Models: all=<session model> (no per-agent model selection)` and apply the auditor note
90
+ above.
91
+
92
+ ## Resolving by hand
93
+
94
+ Use this only when the router agent is not available: an npx install (which copies the skill but
95
+ not the plugin's agents), a harness without plugin agents, or a router dispatch that failed. Tell
96
+ the owner the roles were resolved without the router.
97
+
98
+ 1. **The owner or the repo names a model.** That wins over everything below.
99
+ 2. **Start from the Default target** in the table above.
100
+ 3. **Check the aliases.** Run `scripts/model-inventory.sh`. If its Aliases section flags an alias
101
+ as stale, tell the owner. The Agent tool's `model` accepts only the four aliases, so you
102
+ cannot pin a newer ID yourself.
103
+ 4. **The default is not available** (a model error, or the account has no access). Pick a
104
+ substitute the catalog places in the role's tier, newest version first. If none fits, take
105
+ the next role up (auditor for strong, strong for standard, standard for fast). Never use a
106
+ model weaker than the role below it, and never an ID the catalog does not classify.
107
+ 5. **Give every role a fallback** by the same rules, and write the line in the grammar above.
108
+
109
+ Never pick an older version than the default to save money. If cost is the concern, use a
110
+ cheaper role for the task instead.
88
111
 
89
112
  ## Keeping this file current
90
113
 
91
- The Default column is a snapshot of the best models when this file was last edited. Step 2 means
92
- a newer release is picked up without editing anything. When a new family replaces a default, or
93
- the capability order of the defaults changes, update the table so the next reader starts from the
94
- right place.
114
+ The Default column is a snapshot of the best models when this file was last edited. The router
115
+ and the alias check pick up newer versions without an edit. When a new family replaces a
116
+ default, or the capability order of the defaults changes, update the table. Model families,
117
+ tiers and observations belong in [model-catalog.md](model-catalog.md), not here.
@@ -49,7 +49,7 @@ else
49
49
  Class: ${class:-<spike|bounded|architectural>} Branch: ${branch:-<detached>}
50
50
  Repos: $root @ $base
51
51
  Budget: <dispatches> dispatches / <audits> audits Used: 0 / 0
52
- Models: auditor=<value> strong=<value> standard=<value> fast=<value> (resolve with references/models.md)
52
+ Models: auditor=<target> strong=<target> standard=<target> fast=<target> (resolve with the model-router agent, see references/models.md)
53
53
  Created: $(date +%F)
54
54
 
55
55
  ## Lifecycle
@@ -0,0 +1,140 @@
1
+ #!/usr/bin/env bash
2
+ # Print what a delivery can dispatch right now, for the model-router agent and the controller.
3
+ # Usage: model-inventory.sh [--offline]
4
+ #
5
+ # Three plain-text sections:
6
+ # Gateway models id<TAB>display_name<TAB>created_at, from GET $ANTHROPIC_BASE_URL/v1/models
7
+ # (5 s limit), else ~/.claude/cache/gateway-models.json, else none.
8
+ # Aliases fable, opus, sonnet, haiku and the ANTHROPIC_DEFAULT_<X>_MODEL each resolves to,
9
+ # flagged when a newer version of the family is on the gateway list.
10
+ # Agents name<TAB>model<TAB>tools<TAB>description (first 100 chars) for every agent file.
11
+ #
12
+ # --offline skips the network. Never prints the token. Writes nothing, never blocks, always exits 0.
13
+ # Plain bash 3.2 with sed, grep, awk and curl, so it runs on stock macOS.
14
+
15
+ offline=0
16
+ for arg in "$@"; do
17
+ [ "$arg" = "--offline" ] && offline=1
18
+ done
19
+
20
+ cache="$HOME/.claude/cache/gateway-models.json"
21
+
22
+ # One JSON model object per line, then id, display_name and created_at from each.
23
+ # shortcut: splits on "},{", so a model object holding an array of objects would be cut in two; use jq if that appears.
24
+ parse_models() {
25
+ awk '{ gsub(/\},\{/, "}\n{"); print }' | awk '
26
+ function f(k, m) {
27
+ if (!match($0, "\"" k "\":\"[^\"]*\"")) return ""
28
+ return substr($0, RSTART + length(k) + 4, RLENGTH - length(k) - 5)
29
+ }
30
+ { id = f("id"); if (id == "") next
31
+ d = substr(f("created_at"), 1, 10)
32
+ print id "\t" f("display_name") (d == "" ? "" : "\t" d) }'
33
+ }
34
+
35
+ models=""
36
+ source=""
37
+ if [ -z "${ANTHROPIC_BASE_URL:-}" ]; then
38
+ source="none: ANTHROPIC_BASE_URL is not set"
39
+ else
40
+ if [ $offline -eq 0 ] && command -v curl >/dev/null 2>&1; then
41
+ token=${ANTHROPIC_AUTH_TOKEN:-${ANTHROPIC_API_KEY:-}}
42
+ # Headers come from stdin so the token never shows in the process list.
43
+ body=$(printf 'Authorization: Bearer %s\nx-api-key: %s\nanthropic-version: 2023-06-01\n' "$token" "$token" |
44
+ curl -sf --max-time 5 -H @- "${ANTHROPIC_BASE_URL%/}/v1/models?limit=1000" 2>/dev/null || true)
45
+ models=$(printf '%s' "$body" | parse_models)
46
+ [ -n "$models" ] && source="live"
47
+ fi
48
+ if [ -z "$models" ] && [ -f "$cache" ]; then
49
+ models=$(parse_models < "$cache")
50
+ if [ -n "$models" ]; then
51
+ ms=$(sed -n 's/.*"fetchedAt":\([0-9]*\).*/\1/p' "$cache")
52
+ s=${ms%???}
53
+ when=$(date -u -d "@$s" +%Y-%m-%dT%H:%MZ 2>/dev/null || date -u -r "$s" +%Y-%m-%dT%H:%MZ 2>/dev/null || echo unknown)
54
+ source="cache dated $when"
55
+ fi
56
+ fi
57
+ [ -n "$source" ] || source="none: gateway unreachable and no usable cache at ~/.claude/cache/gateway-models.json"
58
+ fi
59
+
60
+ echo "Gateway models ($source)"
61
+ [ -n "$models" ] && printf '%s\n' "$models"
62
+
63
+ echo
64
+ echo "Aliases"
65
+ for alias in fable opus sonnet haiku; do
66
+ upper=$(printf '%s' "$alias" | tr '[:lower:]' '[:upper:]')
67
+ eval "resolved=\${ANTHROPIC_DEFAULT_${upper}_MODEL:-}"
68
+ if [ -z "$resolved" ]; then
69
+ printf '%s\t(gateway default)\n' "$alias"
70
+ continue
71
+ fi
72
+ # Versions are the dash-separated digits after claude-<family>-; 8-digit date suffixes are ignored.
73
+ note=$(printf '%s\n' "$models" | awk -F '\t' -v fam="$alias" -v want="$resolved" '
74
+ function ver(id, pre, v, n, i, p, out) {
75
+ pre = "claude-" fam "-"
76
+ if (index(id, pre) != 1) return ""
77
+ v = substr(id, length(pre) + 1); sub(/[^0-9-].*$/, "", v)
78
+ n = split(v, p, "-"); out = ""
79
+ for (i = 1; i <= n; i++) if (p[i] != "" && length(p[i]) < 8) out = out sprintf("%05d.", p[i])
80
+ return out
81
+ }
82
+ $1 == "" { next }
83
+ { seen++; if ($1 == want) found = 1
84
+ v = ver($1); if (v != "" && v > best) { best = v; newest = $1 } }
85
+ END {
86
+ if (!seen) exit
87
+ if (!found) out = "MISSING: not on the gateway list"
88
+ w = ver(want)
89
+ if (w != "" && best > w) out = (out == "" ? "" : out "; ") "STALE: lags " newest " on the gateway"
90
+ if (out != "") print out
91
+ }')
92
+ if [ -n "$note" ]; then
93
+ printf '%s\t%s\t%s\n' "$alias" "$resolved" "$note"
94
+ else
95
+ printf '%s\t%s\n' "$alias" "$resolved"
96
+ fi
97
+ done
98
+
99
+ # name<TAB>model<TAB>tools<TAB>description for one agent file; $2 prefixes plugin agents.
100
+ agent_line() {
101
+ awk -v prefix="$2" -v base="$(basename "$1" .md)" '
102
+ { sub(/\r$/, "") }
103
+ NR == 1 { if ($0 != "---") exit; fm = 1; next }
104
+ $0 == "---" { exit }
105
+ block && /^[ \t]/ { l = $0; sub(/^[ \t]+/, "", l); desc = desc (desc == "" ? "" : " ") l; next }
106
+ { block = 0 }
107
+ /^[A-Za-z_-]+:/ {
108
+ key = $0; sub(/:.*/, "", key); val = $0; sub(/^[^:]*:[ \t]*/, "", val)
109
+ q = substr(val, 1, 1)
110
+ if ((q == "\"" || q == sprintf("%c", 39)) && length(val) > 1 && substr(val, length(val)) == q)
111
+ val = substr(val, 2, length(val) - 2)
112
+ if (key == "name") name = val
113
+ else if (key == "model") model = val
114
+ else if (key == "tools") tools = val
115
+ else if (key == "description") { if (val ~ /^[|>][-+]?$/) block = 1; else desc = val }
116
+ }
117
+ END {
118
+ if (!fm) exit
119
+ gsub(/\t/, " ", desc)
120
+ printf "%s%s\t%s\t%s\t%s\n", prefix, (name == "" ? base : name), (model == "" ? "(inherit)" : model),
121
+ (tools == "" ? "(all)" : tools), substr(desc, 1, 100)
122
+ }' "$1" 2>/dev/null
123
+ }
124
+
125
+ echo
126
+ echo "Agents (plugin agents may belong to disabled plugins or old cached versions)"
127
+ root=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
128
+ for dir in "$HOME/.claude/agents" "$root/.claude/agents"; do
129
+ for f in "$dir"/*.md; do
130
+ [ -f "$f" ] && agent_line "$f" ""
131
+ done
132
+ done
133
+ for dir in "$HOME"/.claude/plugins/cache/*/*/*/agents; do
134
+ [ -d "$dir" ] || continue
135
+ plugin=$(basename "$(dirname "$(dirname "$dir")")")
136
+ for f in "$dir"/*.md; do
137
+ [ -f "$f" ] && agent_line "$f" "$plugin:"
138
+ done
139
+ done
140
+ exit 0
@@ -465,9 +465,9 @@
465
465
  }
466
466
  },
467
467
  "node_modules/@hono/node-server": {
468
- "version": "2.1.5",
469
- "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.1.5.tgz",
470
- "integrity": "sha512-MgP/I06GdvsilDspMk/qmRzpk8LOUStP6jFAbSRi40W09DhoyUn+Mj7eyKICPqeYKybOjVFLVIAQzvu1bfIa7Q==",
468
+ "version": "2.1.11",
469
+ "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.1.11.tgz",
470
+ "integrity": "sha512-KzKz9vl4vvr1vgLHamj+g5uonbrj5NwAdO3yzOS6cd2HjALVeOgTgeZOyAzNxejbkfOOPIcvuf/Tg8l1pEFLog==",
471
471
  "license": "MIT",
472
472
  "engines": {
473
473
  "node": ">=20"
@@ -1982,9 +1982,9 @@
1982
1982
  }
1983
1983
  },
1984
1984
  "node_modules/hono": {
1985
- "version": "4.13.13",
1986
- "resolved": "https://registry.npmjs.org/hono/-/hono-4.13.13.tgz",
1987
- "integrity": "sha512-CQ46U0ZkAGmbT/4UxdzzGJpacP2IeKgY4a5/tOI9AABbpOMfK739wfDXmv1usCk+3RkKj1hQy4/fjhiwa2xlrA==",
1985
+ "version": "4.13.21",
1986
+ "resolved": "https://registry.npmjs.org/hono/-/hono-4.13.21.tgz",
1987
+ "integrity": "sha512-h9UsguqfVk4kjUwLvQpHOmOaJpW10jz9lp8bvKUUa04wJG/fabKFBqXZ06D6LFaeKQZtUZRVeg0gfkTTEsX7Mw==",
1988
1988
  "license": "MIT",
1989
1989
  "engines": {
1990
1990
  "node": ">=16.9.0"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vocdoni-comments",
3
- "version": "0.1.0",
4
- "description": "Vocdoni's code comment rules: comments of 1-3 lines that carry the why or a constraint the code can't show, never restated code, history or measurements. Includes a trim procedure, for a branch's added comments or a whole project or folder, that shortens long blocks without losing anything only the comment said, and reports where each dropped piece still lives.",
3
+ "version": "0.2.0",
4
+ "description": "Vocdoni's code comment rules: comments of 1-3 lines that carry the why or a constraint the code can't show, never restated code, history or measurements. Includes a trim procedure, for a branch's added comments or a whole project or folder, that shortens long blocks without losing anything only the comment said, and reports where each dropped piece still lives. SessionStart and SubagentStart hooks inject the same rules into every Claude Code session and subagent, so they apply when comments are written as one step of a coding task.",
5
5
  "author": {
6
6
  "name": "Vocdoni",
7
7
  "url": "https://vocdoni.io"
@@ -0,0 +1,28 @@
1
+ {
2
+ "description": "Injects the vocdoni-comments rules for writing code comments into every session and into every subagent except read-only and forked ones, by reading the skill body from SKILL.md",
3
+ "hooks": {
4
+ "SessionStart": [
5
+ {
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/session-start.sh\" SessionStart",
10
+ "timeout": 10
11
+ }
12
+ ]
13
+ }
14
+ ],
15
+ "SubagentStart": [
16
+ {
17
+ "matcher": "^(?!(Explore|Plan|claude-code-guide|statusline-setup|fork)$)",
18
+ "hooks": [
19
+ {
20
+ "type": "command",
21
+ "command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/session-start.sh\" SubagentStart",
22
+ "timeout": 10
23
+ }
24
+ ]
25
+ }
26
+ ]
27
+ }
28
+ }
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env bash
2
+ # SessionStart and SubagentStart hook for vocdoni-comments.
3
+ #
4
+ # Injects the comments skill body (SKILL.md, frontmatter dropped) into every session and subagent, so the
5
+ # rules apply when comments are one step of a task and the skill's description never matches.
6
+ # Reads the body from SKILL.md so there is one source of truth.
7
+ #
8
+ # Prints hookSpecificOutput JSON on stdout. Reads no input, writes nothing on error, never blocks, always exits 0.
9
+ # Plain bash 3.2 so it runs on stock macOS.
10
+
11
+ # Claude Code runs this for SessionStart and SubagentStart; the output must name the event it answers.
12
+ case "${1:-}" in
13
+ SubagentStart) event=SubagentStart ;;
14
+ *) event=SessionStart ;;
15
+ esac
16
+
17
+ script_dir=$(cd "$(dirname "$0")" 2>/dev/null && pwd)
18
+
19
+ skill=""
20
+ for root in "${CLAUDE_PLUGIN_ROOT:-}" "$script_dir/.."; do
21
+ if [ -n "$root" ] && [ -r "$root/skills/comments/SKILL.md" ]; then
22
+ skill="$root/skills/comments/SKILL.md"
23
+ break
24
+ fi
25
+ done
26
+ [ -n "$skill" ] || exit 0
27
+ trim="$(dirname "$skill")/trim.md"
28
+
29
+ # Drop control characters other than tab and newline, which json_escape would leave raw, then the
30
+ # frontmatter block (first line "---" up to the next "---"), then leading blank lines.
31
+ body=$(tr -d '\000-\010\013-\037' < "$skill" 2>/dev/null | awk 'NR == 1 && /^---$/ { fm = 1; next } fm && /^---$/ { fm = 0; next } !fm' | sed '/./,$!d')
32
+ [ -n "$body" ] || exit 0
33
+
34
+ tab=$(printf '\t')
35
+
36
+ json_escape() {
37
+ printf '%s' "$1" | sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e "s/$tab/\\\\t/g" | awk '{ printf "%s%s", (NR > 1 ? "\\n" : ""), $0 }'
38
+ }
39
+
40
+ msg="The vocdoni-comments plugin is installed. Follow these rules whenever you write or change a code comment, even as one step of a larger task. trim.md is not included here: before trimming or reviewing comments, load the comments skill (Skill tool, vocdoni-comments:comments), or read $trim if you have no Skill tool.
41
+
42
+ $body"
43
+
44
+ printf '{"hookSpecificOutput":{"hookEventName":"%s","additionalContext":"%s"}}\n' "$event" "$(json_escape "$msg")"
45
+ exit 0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vocdoni-contributing",
3
- "version": "0.3.0",
4
- "description": "Vocdoni's rules for what the agent writes on the git host: tying each change to an issue (found, or opened before the PR), stacking an epic's PRs with gh stack, who it introduces itself as, length and structure for PR/MR descriptions, issues, reviews and commits, and how to post a review as a review. A SessionStart hook injects the same rules into every Claude Code session, so they apply even when a PR is one step of a larger task.",
3
+ "version": "0.6.0",
4
+ "description": "Vocdoni's rules for what the agent writes on the git host: tying each change to an issue (found, or opened before the PR), stacking an epic's PRs with gh stack, who it introduces itself as, length and structure for PR/MR descriptions, issues, reviews and commits, how to post a review as a review, and how to reply to and resolve the review threads it addresses. SessionStart and SubagentStart hooks inject the same rules into every Claude Code session and subagent, so they apply even when a PR is one step of a larger task.",
5
5
  "author": {
6
6
  "name": "Vocdoni",
7
7
  "url": "https://vocdoni.io"
@@ -9,6 +9,7 @@
9
9
  "homepage": "https://github.com/vocdoni/skills",
10
10
  "repository": "https://github.com/vocdoni/skills",
11
11
  "license": "AGPL-3.0-or-later",
12
+ "dependencies": ["vocdoni-comments"],
12
13
  "keywords": [
13
14
  "claude-code",
14
15
  "skills",