@vocdoni/skills 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/.claude-plugin/marketplace.json +22 -2
  2. package/CHANGELOG.md +22 -0
  3. package/README.md +25 -0
  4. package/package.json +1 -1
  5. package/plugins/agentic-dev/.claude-plugin/plugin.json +1 -1
  6. package/plugins/agentic-dev/skills/subagent-driven-development/SKILL.md +10 -5
  7. package/plugins/agentic-dev/skills/subagent-driven-development/references/dispatch.md +20 -0
  8. package/plugins/agentic-dev/skills/subagent-driven-development/references/ledger.md +1 -0
  9. package/plugins/agentic-dev/skills/subagent-driven-development/scripts/task-brief.sh +2 -0
  10. package/plugins/agentic-dev/skills/subagent-driven-development/templates/plan.md +4 -0
  11. package/plugins/claude-pi-subagent/.claude-plugin/marketplace.json +1 -1
  12. package/plugins/claude-pi-subagent/plugins/pi-subagent/.claude-plugin/plugin.json +1 -1
  13. package/plugins/claude-pi-subagent/plugins/pi-subagent/dist/server.mjs +18072 -3144
  14. package/plugins/claude-pi-subagent/plugins/pi-subagent/package-lock.json +171 -184
  15. package/plugins/claude-pi-subagent/plugins/pi-subagent/package.json +4 -4
  16. package/plugins/claude-pi-subagent/plugins/pi-subagent/src/schemas.ts +4 -0
  17. package/plugins/claude-pi-subagent/plugins/pi-subagent/src/server.ts +1 -1
  18. package/plugins/claude-pi-subagent/plugins/pi-subagent/test/schemas.test.ts +30 -0
  19. package/plugins/vocdoni-comments/.claude-plugin/plugin.json +21 -0
  20. package/plugins/vocdoni-comments/skills/comments/SKILL.md +59 -0
  21. package/plugins/vocdoni-comments/skills/comments/trim.md +78 -0
  22. package/plugins/vocdoni-ui-style/.claude-plugin/plugin.json +25 -0
  23. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/SKILL.md +99 -0
  24. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/components/chakra/product.tsx +263 -0
  25. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/components/shadcn/brand.tsx +195 -0
  26. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/components/shadcn/button.tsx +67 -0
  27. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/components/shadcn/status-badge.tsx +93 -0
  28. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/logo/vocdoni-logo-ink.svg +15 -0
  29. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/logo/vocdoni-logo-white.svg +15 -0
  30. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/logo/vocdoni-logo.svg +15 -0
  31. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/logo/vocdoni-mark-ink.svg +7 -0
  32. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/logo/vocdoni-mark-white.svg +7 -0
  33. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/logo/vocdoni-mark.svg +7 -0
  34. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/reference/editorial-footer.webp +0 -0
  35. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/reference/editorial-home-hero.webp +0 -0
  36. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/reference/editorial-mobile.webp +0 -0
  37. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/reference/editorial-stats-and-panels.webp +0 -0
  38. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/reference/editorial-vertical-hero.webp +0 -0
  39. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/reference/editorial-washes-and-comparison.webp +0 -0
  40. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/reference/product-process-results.webp +0 -0
  41. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/reference/product-signin.webp +0 -0
  42. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/tokens/editorial.chakra.ts +285 -0
  43. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/tokens/editorial.css +847 -0
  44. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/tokens/editorial.tailwind.css +352 -0
  45. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/tokens/product.chakra.ts +410 -0
  46. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/tokens/product.css +1116 -0
  47. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/tokens/product.tailwind.css +289 -0
  48. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/examples/editorial-landing.html +358 -0
  49. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/examples/email-vote-invitation.html +58 -0
  50. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/examples/product-auth.html +81 -0
  51. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/examples/product-builder.html +147 -0
  52. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/examples/product-dashboard.html +185 -0
  53. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/examples/product-voting.html +326 -0
  54. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/references/brand-core.md +166 -0
  55. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/references/editorial.md +198 -0
  56. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/references/product.md +173 -0
  57. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/references/recipes.md +264 -0
  58. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/references/stacks.md +196 -0
  59. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/references/ux-flows.md +110 -0
  60. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/scripts/check-style-fixtures/bad-editorial.tsx +15 -0
  61. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/scripts/check-style-fixtures/bad-product.tsx +9 -0
  62. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/scripts/check-style-fixtures/doc.md +10 -0
  63. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/scripts/check-style-fixtures/escaped.json +1 -0
  64. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/scripts/check-style-fixtures/good-editorial.tsx +16 -0
  65. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/scripts/check-style-fixtures/good-product.css +6 -0
  66. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/scripts/check-style-fixtures/locale.json +1 -0
  67. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/scripts/check-style-fixtures/multiline-attr.tsx +8 -0
  68. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/scripts/check-style-fixtures/multiline-copy.tsx +10 -0
  69. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/scripts/check-style-fixtures/regex-literal.tsx +5 -0
  70. package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/scripts/check-style.mjs +436 -0
@@ -36,16 +36,36 @@
36
36
  "license": "AGPL-3.0-or-later",
37
37
  "homepage": "https://github.com/vocdoni/skills"
38
38
  },
39
+ {
40
+ "name": "vocdoni-ui-style",
41
+ "source": "./plugins/vocdoni-ui-style",
42
+ "description": "Vocdoni look and feel for any UI: editorial (vocdoni.io) and product (vocdoni-app) modes, tokens for Tailwind/shadcn, Chakra v3 and plain CSS, components, logos, HTML examples, voting UX flows and a style checker.",
43
+ "version": "0.1.0",
44
+ "category": "design",
45
+ "tags": ["vocdoni", "design-system", "ui", "ux", "brand", "tailwind", "shadcn", "chakra-ui"],
46
+ "license": "AGPL-3.0-or-later",
47
+ "homepage": "https://github.com/vocdoni/skills"
48
+ },
39
49
  {
40
50
  "name": "agentic-dev",
41
51
  "source": "./plugins/agentic-dev",
42
52
  "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.",
43
- "version": "0.2.0",
53
+ "version": "0.3.0",
44
54
  "category": "engineering",
45
55
  "tags": ["subagents", "orchestration", "planning", "code-review", "audit", "workflow"],
46
56
  "license": "AGPL-3.0-or-later",
47
57
  "homepage": "https://github.com/vocdoni/skills"
48
58
  },
59
+ {
60
+ "name": "vocdoni-comments",
61
+ "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",
64
+ "category": "engineering",
65
+ "tags": ["comments", "code-comments", "code-quality", "code-review", "documentation"],
66
+ "license": "AGPL-3.0-or-later",
67
+ "homepage": "https://github.com/vocdoni/skills"
68
+ },
49
69
  {
50
70
  "name": "vocdoni-sdk",
51
71
  "source": "./plugins/vocdoni-sdk",
@@ -82,7 +102,7 @@
82
102
  "name": "pi-subagent",
83
103
  "source": "./plugins/claude-pi-subagent/plugins/pi-subagent",
84
104
  "description": "Delegate to named Pi subagents (.md persona + model + tools, incl. MCP) and bounded coding tasks from Claude Code. Bundles a local stdio MCP server that launches Pi (pi --mode rpc), isolates code edits in git worktrees, and returns compact summaries plus diff paths — never applying changes automatically.",
85
- "version": "0.2.0",
105
+ "version": "0.2.2",
86
106
  "category": "engineering",
87
107
  "tags": ["pi", "subagent", "mcp", "delegation", "worktree", "coding-agent", "agents"],
88
108
  "license": "MIT",
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @vocdoni/skills
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#46](https://github.com/vocdoni/skills/pull/46) [`bb4537e`](https://github.com/vocdoni/skills/commit/bb4537e070f4833baa5e00a4408737aa3fd5717e) Thanks [@elboletaire](https://github.com/elboletaire)! - New plugin `vocdoni-comments` (`npx @vocdoni/skills install --plugin comments`): its `comments` skill keeps code comments to 1-3 lines that carry the why, and trims existing ones, on a branch or across a whole project, without losing anything only the comment said.
8
+
9
+ ### Patch Changes
10
+
11
+ - [#48](https://github.com/vocdoni/skills/pull/48) [`15777ee`](https://github.com/vocdoni/skills/commit/15777ee0899ec1d2137be2a7d9fe02b3f1465a60) Thanks [@elboletaire](https://github.com/elboletaire)! - pi-subagent 0.2.2 bundles zod 4 (fixing a memory-exhaustion advisory that has no zod 3 patch) and fast-uri 3.1.9 in its server. Tool inputs now cap `tools` at the seven built-in tools and `files` at 1000 entries. Under zod 4, validation error messages are reworded, integer inputs above 2^53-1 are rejected, and the advertised tool schemas no longer claim `additionalProperties: false`, which was never enforced since unknown keys are still stripped. Dev and transitive dependencies vitest, body-parser, ip-address, qs and @hono/node-server (1.x to 2.x) are also updated; none of them is part of the bundled server.
12
+
13
+ ## 0.2.0
14
+
15
+ ### Minor Changes
16
+
17
+ - [#36](https://github.com/vocdoni/skills/pull/36) [`cc670d3`](https://github.com/vocdoni/skills/commit/cc670d3447a9d73e112c66b1ac20a88b81a3d8c3) Thanks [@altergui](https://github.com/altergui)! - The agentic-dev subagent-driven-development skill now keeps the plan drafter's validated code as per-task patches. The drafter commits once per task in a scratch git checkout of the base commit and exports each commit as `.delivery/<topic>/patches/task-<N>.patch`. Implementers apply patches with `git am -3` before adapting, so the drafter's validated code reaches production without re-transcription.
18
+
19
+ - [#40](https://github.com/vocdoni/skills/pull/40) [`f4c35d4`](https://github.com/vocdoni/skills/commit/f4c35d4ba763e7a11e847064edbcdc150448e9cb) Thanks [@p4u](https://github.com/p4u)! - New plugin `vocdoni-ui-style` (`npx @vocdoni/skills install --plugin ui-style`): builds UIs with Vocdoni's look and feel in its two visual modes, editorial (vocdoni.io) and product (vocdoni-app, with white-label support). It ships design tokens for Tailwind v4 + shadcn/ui, Chakra UI v3 and plain CSS, React components, logos, reference screenshots, runnable HTML examples, worked React recipes, step-by-step UX flows for voting and vote building, copy rules, and a brand style checker.
20
+
21
+ ### Patch Changes
22
+
23
+ - [#39](https://github.com/vocdoni/skills/pull/39) [`1443132`](https://github.com/vocdoni/skills/commit/1443132c7ac9dfb2209d3fc9e7183fda3edbfb1e) Thanks [@p4u](https://github.com/p4u)! - pi-subagent 0.2.1 bundles MCP SDK 1.32 in its server: task lookups and task message queues are scoped to the session that owns them, and tool inputs get an element-count limit. Dependencies hono (security fixes) and vite are also updated; neither is part of the bundled server.
24
+
3
25
  ## 0.1.1
4
26
 
5
27
  ### Patch Changes
package/README.md CHANGED
@@ -15,7 +15,9 @@ claude plugin install vocdoni-integrator-sdk@vocdoni
15
15
  claude plugin install vocdoni-go@vocdoni
16
16
  claude plugin install vocdoni-stripe@vocdoni
17
17
  claude plugin install vocdoni-internal-oauth@vocdoni
18
+ claude plugin install vocdoni-ui-style@vocdoni
18
19
  claude plugin install agentic-dev@vocdoni
20
+ claude plugin install vocdoni-comments@vocdoni
19
21
  claude plugin install pi-subagent@vocdoni # MCP server + agents — needs Pi (see its README)
20
22
 
21
23
  # Or grab everything in one shot (skill plugins only; pi-subagent is Claude Code-only)
@@ -53,6 +55,8 @@ SDK references for anyone building voting on Vocdoni — clients, partners, and
53
55
 
54
56
  This is a **remote plugin**: the skill lives in the [vocdoni-integrator-sdk repo][integrator-sdk] and is cloned (or pulled) on demand by the npx CLI — pass `--offline` to skip fetching and use the cached clone.
55
57
 
58
+ Building the voting UI itself? [`vocdoni-ui-style`](#-vocdoni-ui-style--vocdoni-look-and-feel) (listed under the team skills) carries the product look of the Vocdoni app, including the white-label accent for an organization's own color.
59
+
56
60
  ---
57
61
 
58
62
  ## Skills for the Vocdoni team
@@ -81,6 +85,12 @@ Requires `jq` and either the [Stripe CLI](https://docs.stripe.com/stripe-cli) wi
81
85
  | ------------------------ | -------------- |
82
86
  | `vocdoni-internal-oauth` | Add Google sign-in for `@vocdoni.org` accounts to an existing internal web tool through the central OpenID Connect provider at `oauth.vocdoni.org`: register the tool as a client in [vocdoni/oauth][oauth], wire the Go kit (`vocauth`) or the Node/TypeScript kit (`@vocdoni/oauth`, Express and Fetch-API frameworks), use any OIDC library or oauth2-proxy for other stacks, develop locally against the dev provider, migrate away from a shared password, rotate cookie keys and troubleshoot. |
83
87
 
88
+ ### 🎨 `vocdoni-ui-style` — Vocdoni look and feel
89
+
90
+ | Skill | What it covers |
91
+ | ------------------ | -------------- |
92
+ | `vocdoni-ui-style` | Build UIs that look and behave like Vocdoni's products, in its two visual modes: **editorial** (vocdoni.io: cream surfaces, warm ink, Fraunces serif headings, green accent, yellow eyebrow dot) for marketing, landing and docs pages, and **product** (vocdoni-app: white, Inter at light weights, monochrome or white-label accent) for dashboards, voting pages and admin tools. Ships tokens for Tailwind v4 + shadcn/ui, Chakra UI v3 and plain CSS, React components, logo files, reference screenshots, runnable HTML examples (landing, voting flow, dashboard, sign-in, vote builder, transactional email), worked React recipes, step-by-step UX flows for voting, vote building and onboarding, specs for docs sites and result PDFs, copy rules, and a brand style checker (`scripts/check-style.mjs`). |
93
+
84
94
  ### 🧭 `agentic-dev` — subagent-driven development with independent audits
85
95
 
86
96
  | Skill | What it covers |
@@ -89,6 +99,12 @@ Requires `jq` and either the [Stripe CLI](https://docs.stripe.com/stripe-cli) wi
89
99
 
90
100
  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.
91
101
 
102
+ ### 💬 `vocdoni-comments` — code comments
103
+
104
+ | Skill | What it covers |
105
+ | ---------- | -------------- |
106
+ | `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. |
107
+
92
108
  ### 🤖 `pi-subagent` — delegate to Pi subagents
93
109
 
94
110
  Delegate work to **named [Pi][pi] subagents** — reusable personas, each with its own model and tools (including MCP tools) — and to bounded one-off coding tasks. Unlike the skill plugins above, this one bundles a local **MCP server** that launches Pi (`pi --mode rpc`), isolates code edits in a detached **git worktree**, and hands back a summary plus a diff to review. Changes are never applied automatically.
@@ -121,7 +137,9 @@ claude plugin install vocdoni-integrator-sdk@vocdoni
121
137
  claude plugin install vocdoni-go@vocdoni
122
138
  claude plugin install vocdoni-stripe@vocdoni
123
139
  claude plugin install vocdoni-internal-oauth@vocdoni
140
+ claude plugin install vocdoni-ui-style@vocdoni
124
141
  claude plugin install agentic-dev@vocdoni
142
+ claude plugin install vocdoni-comments@vocdoni
125
143
  claude plugin install pi-subagent@vocdoni # see plugins/claude-pi-subagent/plugins/pi-subagent/README.md
126
144
  ```
127
145
 
@@ -145,6 +163,8 @@ npx @vocdoni/skills install --plugin sdk
145
163
  npx @vocdoni/skills install --plugin integrator-sdk # remote plugin, cloned on demand
146
164
  npx @vocdoni/skills install --plugin davinci-sdk # full name (no vocdoni- prefix)
147
165
  npx @vocdoni/skills install --plugin agentic-dev # skill only; the SessionStart hook is Claude Code plugin-only
166
+ npx @vocdoni/skills install --plugin ui-style # 'ui-style' → 'vocdoni-ui-style'
167
+ npx @vocdoni/skills install --plugin comments # 'comments' → 'vocdoni-comments'
148
168
 
149
169
  # A single skill, looked up across plugins
150
170
  npx @vocdoni/skills install go-modern
@@ -185,6 +205,7 @@ claude plugin update vocdoni-integrator-sdk@vocdoni
185
205
  claude plugin update vocdoni-go@vocdoni
186
206
  claude plugin update vocdoni-stripe@vocdoni
187
207
  claude plugin update agentic-dev@vocdoni
208
+ claude plugin update vocdoni-comments@vocdoni
188
209
  claude plugin update pi-subagent@vocdoni
189
210
  ```
190
211
 
@@ -230,8 +251,12 @@ Copy the skill directories again over the old ones, or `git pull` if you symlink
230
251
  │ │ └── …
231
252
  │ ├── vocdoni-internal-oauth/
232
253
  │ │ └── …
254
+ │ ├── vocdoni-ui-style/ # skill + tokens, components, logos, examples
255
+ │ │ └── …
233
256
  │ ├── agentic-dev/ # skill + SessionStart hook (hooks/)
234
257
  │ │ └── …
258
+ │ ├── vocdoni-comments/
259
+ │ │ └── …
235
260
  │ └── claude-pi-subagent/ # nested marketplace (pi-agent-tools)
236
261
  │ └── plugins/pi-subagent/ # MCP server plugin + agents — see its README
237
262
  ├── bin/install.js # npx CLI (zero deps, Node ≥ 18)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vocdoni/skills",
3
- "version": "0.1.1",
3
+ "version": "0.3.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"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-dev",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
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.",
5
5
  "author": {
6
6
  "name": "Vocdoni",
@@ -114,11 +114,16 @@ match, the spec and the plan share one workspace.
114
114
 
115
115
  The plan has full code for each step, exact commands with expected output, Global Constraints,
116
116
  Review Focus, branch names with base commits, and a closing *Merge and release* section. The
117
- drafter checks every code block in a scratch copy outside the repo, under
118
- `~/.cache/<project>/scratch/`, never in `/tmp` or the working tree. Read the header, the
119
- constraints and the riskiest tasks yourself, then commit the plan. Then create the feature
120
- branch in every repo from the base commit named in the plan header (`git switch -c <branch>
121
- <base>`), and record the base SHAs in the ledger header.
117
+ drafter's scratch is a git checkout of the plan's base commit: `git worktree add
118
+ ~/.cache/<project>/scratch/<topic> <base>` in the main repo, or a clone on the build host when
119
+ builds must run remotely. The drafter runs every code block there, commits once per task with
120
+ the task's commit message, and exports each commit with `git format-patch -1 --stdout >
121
+ <repo>/.delivery/<topic>/patches/task-<N>.patch` into the main checkout. Patches are untracked
122
+ and survive the job. The plan's code must match the patches exactly: the plan is what gets
123
+ reviewed and audited, the patch is what gets applied. Keep the scratch until the delivery
124
+ merges. Read the header, the constraints and the riskiest tasks yourself, then commit the plan.
125
+ Then create the feature branch in every repo from the base commit named in the plan header
126
+ (`git switch -c <branch> <base>`), and record the base SHAs in the ledger header.
122
127
 
123
128
  **5. Pre-flight audit †.** Dispatch the auditor with the pre-flight prompt. It returns a conflict table
124
129
  (task pairs that share files or interfaces, and whether each task is consistent with itself)
@@ -20,6 +20,14 @@ turns the model role into the Agent tool's `model` value ([models.md](models.md)
20
20
  | a normal plan task: multi-file, some integration judgement | standard model |
21
21
  | concurrency, soundness, cryptography, a security path, or a fix after a Critical finding | strong model |
22
22
 
23
+ When a patch file is present in the brief, the model role reflects what the implementer does with
24
+ it, not the task's original complexity:
25
+
26
+ | Patch situation | Model role |
27
+ |---|---|
28
+ | patch applies cleanly and tests pass | fast model |
29
+ | patch does not apply or tests fail; implementer adapts minimally | standard model |
30
+
23
31
  When in doubt, pick the cheaper model role and let the escalation ladder catch failures. The
24
32
  exception is security-sensitive code, which starts at the strong model.
25
33
 
@@ -57,10 +65,22 @@ Constraints:
57
65
  - Gated or ignored tests must actually run: check the output for skip lines.
58
66
  <project constraints block, see below>
59
67
 
68
+ If the brief names a `Patch:` file, apply it first: `git am -3 <patch>`. `git am` creates the
69
+ task's commit with the drafter's message, so there is no separate commit step. Run the task's
70
+ tests. If they pass, you are done. If the patch does not apply, resolve the conflict and finish
71
+ with `git am --continue`. If tests fail, adapt the code minimally and fold the fix into the same
72
+ commit with `git commit --amend -- <paths>`. Rulings in the "Rulings for this task" section
73
+ override the patch: amend the commit the same way to satisfy the ruling. Record every deviation
74
+ in your report. If the brief carries no patch, follow the task's code as written.
75
+
60
76
  If the brief's code doesn't compile against the real tree, adapt it minimally and record the
61
77
  deviation in your report. If an interface that other tasks rely on would have to change, stop
62
78
  and reply NEEDS_CONTEXT with the reason. Do not redesign.
63
79
 
80
+ When a patch from an earlier task was modified during fix rounds after that task closed, later
81
+ patches may not apply cleanly. `git am -3` resolves most such conflicts; when it cannot, adapt
82
+ as above and report the deviation so the controller can update the plan.
83
+
64
84
  You do not dispatch subagents.
65
85
 
66
86
  Write your full report to <workspace>/task-<N>-report.md (format below). Your reply to me is
@@ -19,6 +19,7 @@ workspace:
19
19
  ├── progress.md # the ledger, the only file you edit by hand
20
20
  ├── audit-spec.md # spec audit (Architectural only)
21
21
  ├── preflight.md # plan pre-flight audit (Architectural only)
22
+ ├── patches/ # per-task patches from the drafter's scratch (task-<N>.patch)
22
23
  ├── task-<N>-brief.md # generated by task-brief.sh; regenerate after new rulings
23
24
  ├── task-<N>-report.md # written by the implementer
24
25
  ├── task-<N>-review.md # written by a task-reviewer (large tasks only)
@@ -53,11 +53,13 @@ focus=$(section h2 "Review Focus")
53
53
  # Accept "(Task N)", "(global)", comma lists such as "(Task 1, Task 3)", and any case.
54
54
  rulings=$(grep -iE "^Ruling R[0-9]+ \(([^)]*[^0-9])?(Task $n|global)([^0-9][^)]*)?\)" "$ledger" || true)
55
55
  plan_sha=$(git -C "$root" log -1 --format=%h -- "$plan" 2>/dev/null || true)
56
+ patch_file="$ws/patches/task-$n.patch"
56
57
 
57
58
  out="$ws/task-$n-brief.md"
58
59
  {
59
60
  echo "# Brief: Task $n"
60
61
  echo "Plan: ${plan#"$root"/} @ ${plan_sha:-uncommitted}"
62
+ if [[ -f $patch_file ]]; then echo "Patch: $patch_file"; fi
61
63
  echo "Generated: $(date '+%F %H:%M') (do not edit; regenerate with task-brief.sh)"
62
64
  echo
63
65
  echo "This brief is your single source of requirements. Rulings override the task text"
@@ -29,6 +29,7 @@ Repos and branches: <repo path> → <branch> (base <sha>) (one line per repo)
29
29
  ### Task 1: <title>
30
30
  Model: fast | standard | strong Repo: <path> Files: <exact paths>
31
31
  Goal: <one sentence, which acceptance criterion it serves>
32
+ Patch: .delivery/<topic>/patches/task-1.patch
32
33
 
33
34
  Step 1: write the failing test
34
35
  ```<lang>
@@ -50,6 +51,9 @@ Step 3: commit
50
51
  Interfaces this task provides to later tasks: <names and signatures>
51
52
 
52
53
  ### Task 2: <title>
54
+ Model: fast | standard | strong Repo: <path> Files: <exact paths>
55
+ Goal: <one sentence, which acceptance criterion it serves>
56
+ Patch: .delivery/<topic>/patches/task-2.patch
53
57
  ...
54
58
 
55
59
  ## Merge and release
@@ -9,7 +9,7 @@
9
9
  "name": "pi-subagent",
10
10
  "source": "./plugins/pi-subagent",
11
11
  "description": "Delegate to named Pi subagents (.md persona + model + tools, incl. MCP) and bounded coding tasks from Claude Code. Bundles a local stdio MCP server that launches Pi (pi --mode rpc), isolates code edits in git worktrees, and returns compact summaries plus diff paths — never applying changes automatically.",
12
- "version": "0.2.0",
12
+ "version": "0.2.2",
13
13
  "category": "engineering",
14
14
  "tags": ["pi", "subagent", "mcp", "delegation", "worktree", "coding-agent", "rpc", "agents"],
15
15
  "license": "MIT"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://anthropic.com/claude-code/plugin.schema.json",
3
3
  "name": "pi-subagent",
4
- "version": "0.2.0",
4
+ "version": "0.2.2",
5
5
  "description": "Delegate to named Pi subagents (.md persona + model + tools, incl. MCP) and bounded coding tasks from Claude Code. Bundles a local stdio MCP server that launches Pi (pi --mode rpc), isolates code edits in git worktrees, and returns compact summaries plus diff paths — never applying changes automatically.",
6
6
  "author": {
7
7
  "name": "Pau Escrich"