@event4u/agent-config 9.2.0 → 9.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 (43) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +33 -0
  3. package/README.md +1 -1
  4. package/dist/agent-src/commands/fix/route.md +49 -0
  5. package/dist/agent-src/commands/fix.md +4 -2
  6. package/dist/agent-src/commands/tdd/green.md +32 -0
  7. package/dist/agent-src/commands/tdd/red.md +33 -0
  8. package/dist/agent-src/commands/tdd/refactor.md +31 -0
  9. package/dist/agent-src/commands/tdd.md +50 -0
  10. package/dist/agent-src/contexts/communication/rules-auto/guidelines-mechanics.md +1 -0
  11. package/dist/agent-src/contexts/execution/subagent-spawn-contract.md +81 -2
  12. package/dist/agent-src/rules/architecture.md +7 -0
  13. package/dist/agent-src/skills/fe-design/SKILL.md +1 -0
  14. package/dist/agent-src/skills/judge-code-quality/SKILL.md +1 -0
  15. package/dist/agent-src/skills/persona-improvement/SKILL.md +81 -0
  16. package/dist/agent-src/skills/react-shadcn-ui/SKILL.md +10 -0
  17. package/dist/agent-src/skills/subagent-orchestration/SKILL.md +12 -23
  18. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  19. package/dist/discovery/deprecation-report.md +1 -1
  20. package/dist/discovery/discovery-manifest.json +169 -16
  21. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  22. package/dist/discovery/discovery-manifest.summary.md +3 -3
  23. package/dist/discovery/orphan-report.md +1 -1
  24. package/dist/discovery/packs.json +11 -5
  25. package/dist/discovery/trust-report.md +2 -2
  26. package/dist/discovery/workspaces.json +10 -4
  27. package/dist/mcp/registry-manifest.json +3 -3
  28. package/docs/CLAIMS.md +2 -2
  29. package/docs/architecture.md +3 -3
  30. package/docs/command-flows.md +9 -3
  31. package/docs/contracts/command-clusters.md +2 -1
  32. package/docs/decisions/ADR-122-adversarial-verification-council.md +1 -1
  33. package/docs/development.md +10 -1
  34. package/docs/featured-skills.md +2 -2
  35. package/docs/getting-started-by-role.md +1 -1
  36. package/docs/governance-advantage.md +1 -1
  37. package/docs/guidelines/component-oriented-and-oop-development.md +181 -0
  38. package/docs/proof.md +5 -5
  39. package/package.json +3 -2
  40. package/src/scripts/ai_council/prompts.ts +7 -0
  41. package/src/scripts/hook_manifest.yaml +17 -6
  42. package/src/scripts/install-hooks.sh +32 -17
  43. package/src/scripts/pr_url_reminder_hook.ts +177 -0
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "metadata": {
8
8
  "description": "Bootstrap shim for the event4u agent-config suite. This plugin ships ONLY the dispatcher hooks plus one install-pointer skill — ALL content (skills, rules, commands) is installed via `npx -y @event4u/agent-config init`, which writes the file projection AND registers the same hooks in ~/.claude/settings.json. DEPRECATED as a content channel; kept so the marketplace listing stays discoverable and existing installs keep working hooks.",
9
- "version": "9.2.0",
9
+ "version": "9.3.0",
10
10
  "keywords": [
11
11
  "agent-config",
12
12
  "skills",
package/CHANGELOG.md CHANGED
@@ -1033,6 +1033,39 @@ our recommendation order, not its support status.
1033
1033
  > that forces a new era split (`# Era: 9.3.x`, etc.) — see
1034
1034
  > [`docs/contracts/CHANGELOG-conventions.md § Era splits`](docs/contracts/CHANGELOG-conventions.md).
1035
1035
 
1036
+ ## [9.3.0](https://github.com/event4u-app/agent-config/compare/9.2.0...9.3.0) (2026-07-16)
1037
+
1038
+ ### Features
1039
+
1040
+ * **ergonomics:** harvest ergonomics plate — tdd cluster, fix:route, persona-improvement, hand-off examples ([e8be16f](https://github.com/event4u-app/agent-config/commit/e8be16f2a0194a6b6cb3b2ed4a9899db31067d1d))
1041
+ * **review:** wire reuse + OOP-shape lens into the review/orchestration surfaces ([067175a](https://github.com/event4u-app/agent-config/commit/067175a04c1d49c356bf8e42c4cb0f23b3d91473))
1042
+ * **hooks:** PostToolUse PR-URL reminder — reply-shape backstop for direct-answers ([1bf82a1](https://github.com/event4u-app/agent-config/commit/1bf82a1f23fd2fac7ae86fe1fae3cc6b3e0da657))
1043
+
1044
+ ### Bug Fixes
1045
+
1046
+ * **counts:** regenerate command-flows.md (+5 commands) + map explain-run orphan into surface-map ([a6254e4](https://github.com/event4u-app/agent-config/commit/a6254e434e966eaca9e697093980dfc3cc04a8d8))
1047
+ * **hooks:** pre-push gate mirrors the full CI consistency check locally ([ebd706f](https://github.com/event4u-app/agent-config/commit/ebd706fb1e978189954ca838bc41bd3f536ee560))
1048
+
1049
+ ### Documentation
1050
+
1051
+ * refresh guideline counts (100 -> 101) after the new dev-standard guideline ([02ac1a5](https://github.com/event4u-app/agent-config/commit/02ac1a53214b5cd22eecee873e2b81286c01a6b2))
1052
+ * **standards:** apply council findings — paradigm-appropriate + minimal-diff precedence ([474b1c6](https://github.com/event4u-app/agent-config/commit/474b1c68b8a28dd1f5302b135fbe69876696ea6f))
1053
+ * **standards:** component-oriented + OOP-first development standard ([5bd62bd](https://github.com/event4u-app/agent-config/commit/5bd62bdf14208f65ae166b954a5c7b4e49211ffa))
1054
+ * **roadmaps:** council-review + apply findings to feedback-9.2.0 followups ([dc187d4](https://github.com/event4u-app/agent-config/commit/dc187d4b83debda1c4f8c551acfc6400149da520))
1055
+ * **roadmaps:** draft feedback-9.2.0 follow-ups roadmap ([69d363d](https://github.com/event4u-app/agent-config/commit/69d363df10f5e9dd6605ba6af370ac1d477a5a92))
1056
+ * **roadmaps:** spawn adversarial-council benchmark follow-up; mark deferred arm moved ([36a69d9](https://github.com/event4u-app/agent-config/commit/36a69d9f00b4a236535ea01bf8dd36a4d82f1293))
1057
+
1058
+ ### Refactoring
1059
+
1060
+ * **subagent-orchestration:** relocate worker-prompt contract to spawn-contract context ([de38ce1](https://github.com/event4u-app/agent-config/commit/de38ce12ff167eafe7a0631f1088ed244e2b85bf))
1061
+
1062
+ ### Chores
1063
+
1064
+ * **harvest:** close second-sweep coverage plate — all folds verified, proposals parked, archived ([7af8a75](https://github.com/event4u-app/agent-config/commit/7af8a75305289bd1f2d36498bea362b789b0f610))
1065
+ * **roadmaps:** archive completed adversarial-verification-council roadmap ([fc34874](https://github.com/event4u-app/agent-config/commit/fc34874a608644d89ab12aa0147d5f6237a4f9ca))
1066
+
1067
+ Tests: 7770 (+6 since 9.2.0)
1068
+
1036
1069
  ## [9.2.0](https://github.com/event4u-app/agent-config/compare/9.1.0...9.2.0) (2026-07-14)
1037
1070
 
1038
1071
  ### Features
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  [![Smoke](https://github.com/event4u-app/agent-config/actions/workflows/smoke.yml/badge.svg)](https://github.com/event4u-app/agent-config/actions/workflows/smoke.yml) [![Public install smoke (3 OS × 2 Node)](https://github.com/event4u-app/agent-config/actions/workflows/smoke-public-install.yml/badge.svg)](https://github.com/event4u-app/agent-config/actions/workflows/smoke-public-install.yml) [![npm](https://img.shields.io/npm/v/@event4u/agent-config?style=flat-square&label=npm&color=orange)](https://www.npmjs.com/package/@event4u/agent-config) [![agent-config MCP server](https://glama.ai/mcp/servers/event4u-app/agent-config/badges/score.svg)](https://glama.ai/mcp/servers/event4u-app/agent-config)
6
6
 
7
- [![Skills](https://img.shields.io/badge/Skills-275-orange?style=flat-square)](dist/agent-src/skills/) [![Rules](https://img.shields.io/badge/Rules-105-orange?style=flat-square)](dist/agent-src/rules/) [![Commands](https://img.shields.io/badge/Commands-184-orange?style=flat-square)](dist/agent-src/commands/) [![Guidelines](https://img.shields.io/badge/Guidelines-100-orange?style=flat-square)](docs/guidelines/) [![Personas](https://img.shields.io/badge/Personas-29-orange?style=flat-square)](dist/agent-src/personas/) [![Advisors](https://img.shields.io/badge/Advisors-5-orange?style=flat-square)](dist/agent-src/personas/advisors/)
7
+ [![Skills](https://img.shields.io/badge/Skills-276-orange?style=flat-square)](dist/agent-src/skills/) [![Rules](https://img.shields.io/badge/Rules-105-orange?style=flat-square)](dist/agent-src/rules/) [![Commands](https://img.shields.io/badge/Commands-184-orange?style=flat-square)](dist/agent-src/commands/) [![Guidelines](https://img.shields.io/badge/Guidelines-101-orange?style=flat-square)](docs/guidelines/) [![Personas](https://img.shields.io/badge/Personas-29-orange?style=flat-square)](dist/agent-src/personas/) [![Advisors](https://img.shields.io/badge/Advisors-5-orange?style=flat-square)](dist/agent-src/personas/advisors/)
8
8
 
9
9
  > **Choose your experience — developer · founder · content · agency · finance · ops. Add packs. Get a focused command set, not a 500-artefact dump.** Bring your own AI provider.
10
10
 
@@ -0,0 +1,49 @@
1
+ ---
2
+ model_tier: medium
3
+ name: fix-route
4
+ pack: engineering-base
5
+ tier: 2
6
+ visibility: internal
7
+ sub: route
8
+ cluster: fix
9
+ description: Classify a vaguely-described problem and dispatch to the right fix sub-command (or name the specialist skill when it is not a fix task)
10
+ argument-hint: "[free-text problem description]"
11
+ suggestion:
12
+ eligible: true
13
+ trigger_description: "something's broken but I'm not sure which fixer — throw me a problem and route it"
14
+ trigger_context: "user describes a problem without naming a specific fix sub-command"
15
+ workspaces:
16
+ - agent-config-maintainer
17
+ packs:
18
+ - meta
19
+ ---
20
+
21
+ # /fix route
22
+
23
+ The classify-and-dispatch front door for the `/fix` family. Adapted from the
24
+ ecosystem source's `/smart-fix` — folded into the `fix` verb (ADR-041
25
+ controlled-verb vocabulary) rather than a new top-level verb. It runs the
26
+ `/fix` auto-detection over a free-text problem and routes; when the problem is
27
+ not a fix task, it names the right specialist instead of forcing a fix sub.
28
+
29
+ ## Instructions
30
+
31
+ 1. Read the free-text problem.
32
+ 2. Run the `/fix` cluster's detection table (see the cluster head) over it:
33
+ CI failure → `fix ci`; broken cross-refs → `fix refs`; PR review threads →
34
+ `fix pr-comments`; code-comment noise → `fix comments`; seeder/FK →
35
+ `fix seeder`; type/lint/format errors → `fix quality`; project-leak in the
36
+ shared package → `fix portability`.
37
+ 3. **HIGH confidence** → route to that sub-command and follow its instructions.
38
+ 4. **Not a fix task** (a new feature, an analysis, a design question) → do NOT
39
+ force a fix sub; name the correct surface instead (`/feature`, a
40
+ `project-analysis-*` skill, `improve-before-implement`, etc.) and stop.
41
+ 5. **LOW confidence / ≥ 2 conflict** → print the fix menu and ask; in
42
+ non-interactive mode emit `ambiguous_routing` and stop (per the
43
+ non-interactive-contract). Never guess past LOW.
44
+
45
+ ## Rules
46
+
47
+ - **Dispatch only — no fixing here.** This sub classifies and hands off; the routed sub-command does the work under its own rules.
48
+ - **One route per turn.** Do NOT chain.
49
+ - **Do NOT commit or push** — the routed sub-command's rules govern that.
@@ -2,10 +2,10 @@
2
2
  model_tier: medium
3
3
  name: fix
4
4
  disable-model-invocation: true
5
- argument-hint: "[ci|refs|portability|seeder|pr-comments|comments|quality] [args]"
5
+ argument-hint: "[ci|refs|portability|seeder|pr-comments|comments|quality|route] [args]"
6
6
  pack: engineering-base
7
7
  intent: "Fix-workflow dispatcher — ci, pr-comments, refs, seeder, portability, comments, quality"
8
- routes_to: [fix-ci, fix-pr-comments, fix-refs, fix-seeder, fix-portability, fix-comments, fix-quality]
8
+ routes_to: [fix-ci, fix-pr-comments, fix-refs, fix-seeder, fix-portability, fix-comments, fix-quality, fix-route]
9
9
  replaces: []
10
10
  tier: 1
11
11
  visibility: advanced
@@ -39,6 +39,7 @@ with a single entry point + sub-command dispatch.
39
39
  | `/fix pr-comments` | `commands/fix/pr-comments.md` | Fix and reply to all open review comments — **bot + human, classified per comment**; dedupes by comment id + reply marker |
40
40
  | `/fix comments` | `commands/fix/comments.md` | Review the **code comments** in the current branch's diff and simplify, shorten, or remove each one (≠ `pr-comments`, which targets GitHub review threads) |
41
41
  | `/fix quality` | `commands/fix/quality.md` | Run the quality pipeline (type-checker / linter / formatter, PHP and/or JS/TS) and fix every error — auto-detects language from changed files |
42
+ | `/fix route` | `commands/fix/route.md` | Classify a vaguely-described problem and dispatch to the right fix sub (or name the specialist when it is not a fix task) — the `/smart-fix` front door, folded into the `fix` verb |
42
43
 
43
44
  Sub-command names match the locked contract in
44
45
  [`docs/contracts/command-clusters.md`](../docs/contracts/command-clusters.md).
@@ -84,6 +85,7 @@ into it and removed.
84
85
  > 5. pr-comments — address open review comments (bot / human / both)
85
86
  > 6. comments — simplify / shorten / remove code comments in the branch diff
86
87
  > 7. quality — run the quality pipeline and fix every error
88
+ > 8. route — describe the problem; I classify and dispatch
87
89
 
88
90
  ## Rules
89
91
 
@@ -0,0 +1,32 @@
1
+ ---
2
+ model_tier: medium
3
+ name: tdd-green
4
+ pack: engineering-base
5
+ tier: 2
6
+ visibility: internal
7
+ cluster: tdd
8
+ sub: green
9
+ skills: [test-driven-development]
10
+ description: TDD green phase — write the minimum production code to make the failing test pass; no test edits
11
+ argument-hint: "[failing test | context]"
12
+ suggestion:
13
+ eligible: true
14
+ trigger_description: "make the failing test pass"
15
+ trigger_context: "a failing test exists, ready to implement"
16
+ workspaces:
17
+ - agent-config-maintainer
18
+ packs:
19
+ - meta
20
+ ---
21
+
22
+ # /tdd green
23
+
24
+ Drives the **Implement** phase of
25
+ [`test-driven-development`](../../../skills/test-driven-development/SKILL.md).
26
+
27
+ ## Instructions
28
+
29
+ 1. Write the **minimum** production code to make the failing test pass — no scope beyond the one case.
30
+ 2. Honor the Implement Forbidden block: **no `tests/**` edits** — changing the assertion to fit the code is the canonical violation; a genuinely-wrong test → STOP and ask, never silently edit.
31
+ 3. Run the test; confirm green.
32
+ 4. Output: the green run. Hand to `/tdd refactor` (or `/tdd red` for the next case).
@@ -0,0 +1,33 @@
1
+ ---
2
+ model_tier: medium
3
+ name: tdd-red
4
+ pack: engineering-base
5
+ tier: 2
6
+ visibility: internal
7
+ cluster: tdd
8
+ sub: red
9
+ skills: [test-driven-development]
10
+ description: TDD red phase — enumerate cases, write ONE failing test, watch it fail at an assertion (not an import error)
11
+ argument-hint: "[behavior to test]"
12
+ suggestion:
13
+ eligible: true
14
+ trigger_description: "write the failing test first"
15
+ trigger_context: "starting a new behavior test-first"
16
+ workspaces:
17
+ - agent-config-maintainer
18
+ packs:
19
+ - meta
20
+ ---
21
+
22
+ # /tdd red
23
+
24
+ Drives the **Design → Test-Red** phases of
25
+ [`test-driven-development`](../../../skills/test-driven-development/SKILL.md).
26
+
27
+ ## Instructions
28
+
29
+ 1. State the behavior in one sentence; enumerate the cases (happy / boundary / error).
30
+ 2. Write ONE failing test for the first case.
31
+ 3. Run it; confirm it fails at an **assertion**, not an import/collection error.
32
+ 4. Honor the Test-Red Forbidden block: **no production edits** (diff = `tests/**` only).
33
+ 5. Output: the failing test + its observed failure reason. Hand to `/tdd green`.
@@ -0,0 +1,31 @@
1
+ ---
2
+ model_tier: medium
3
+ name: tdd-refactor
4
+ pack: engineering-base
5
+ tier: 2
6
+ visibility: internal
7
+ cluster: tdd
8
+ sub: refactor
9
+ skills: [test-driven-development]
10
+ description: TDD refactor phase — clean up (rename, deduplicate) while keeping the test green
11
+ argument-hint: "[target | context]"
12
+ suggestion:
13
+ eligible: true
14
+ trigger_description: "refactor while the test stays green"
15
+ trigger_context: "test is green, ready to clean up"
16
+ workspaces:
17
+ - agent-config-maintainer
18
+ packs:
19
+ - meta
20
+ ---
21
+
22
+ # /tdd refactor
23
+
24
+ Drives the **Refactor** step of
25
+ [`test-driven-development`](../../../skills/test-driven-development/SKILL.md).
26
+
27
+ ## Instructions
28
+
29
+ 1. Refactor (rename, deduplicate, extract) ONLY while the test stays green — re-run after each change.
30
+ 2. If a change reddens the test, revert it; refactoring never changes behavior.
31
+ 3. Output: the cleaned diff + a final green run. Loop back to `/tdd red` for the next behavior.
@@ -0,0 +1,50 @@
1
+ ---
2
+ model_tier: medium
3
+ name: tdd
4
+ disable-model-invocation: true
5
+ argument-hint: "[red|green|refactor] [behavior | args]"
6
+ pack: engineering-base
7
+ tier: 2
8
+ visibility: internal
9
+ description: TDD orchestrator — routes to red (failing test), green (minimum code), refactor (clean while green)
10
+ cluster: tdd
11
+ type: orchestrator
12
+ auto_detect: true
13
+ suggestion:
14
+ eligible: true
15
+ trigger_description: "write the failing test first, make the test pass, refactor while green"
16
+ trigger_context: "user is driving a change test-first and names a TDD phase"
17
+ workspaces:
18
+ - agent-config-maintainer
19
+ packs:
20
+ - meta
21
+ ---
22
+
23
+ # /tdd
24
+
25
+ Thin ergonomic split over the [`test-driven-development`](../../skills/test-driven-development/SKILL.md)
26
+ skill — one sub-command per phase of that skill's mode contract. **No logic
27
+ lives here**; each sub loads the skill and drives its named phase.
28
+
29
+ ## Sub-commands
30
+
31
+ | Sub-command | Routes to | Purpose |
32
+ |---|---|---|
33
+ | `/tdd red` | `commands/tdd/red.md` | Design → Test-Red: enumerate cases, write ONE failing test, watch it fail at an assertion |
34
+ | `/tdd green` | `commands/tdd/green.md` | Implement: write the minimum code to pass; no test edits |
35
+ | `/tdd refactor` | `commands/tdd/refactor.md` | Refactor: clean up while the test stays green |
36
+
37
+ ## Dispatch
38
+
39
+ 1. Parse `/tdd <sub> [args]`. Explicit sub → route. Otherwise infer the phase
40
+ from observable state via the skill's mode-inference table (no test yet →
41
+ red; test failing at an assertion → green; green + defect → red again).
42
+ 2. Load [`test-driven-development`](../../skills/test-driven-development/SKILL.md)
43
+ and drive ONLY the named phase, honoring that phase's Forbidden block.
44
+ 3. LOW confidence / bare `/tdd` → show the three-row menu and ask.
45
+
46
+ ## Rules
47
+
48
+ - **One phase per turn.** Do NOT chain red→green→refactor silently — each sub is one turn.
49
+ - **No logic duplication.** The behavior is the skill's; these commands only select the phase.
50
+ - **Do NOT commit or push.**
@@ -10,6 +10,7 @@ before writing or reviewing code); this file is the catalog.
10
10
  | File | Topic |
11
11
  |---|---|
12
12
  | `code-clarity.md` | Cross-language clarity rules — inline single-use values, carve-outs (side effects, loops, type narrowing, debugger) |
13
+ | `component-oriented-and-oop-development.md` | Reuse-first components (FE) + OOP-where-it-reduces-complexity (backend); carve-out index; bounded by the anti-over-engineering anchors |
13
14
 
14
15
  ## PHP (`docs/guidelines/php/`)
15
16
 
@@ -41,11 +41,90 @@ private-data leg stays narrow: the composer rejects inline bodies (multi-line /
41
41
  oversized entries), accepts only ref-like tokens, and caps the count. Anything
42
42
  dropped is recorded in `warnings` and surfaced — never silently widened.
43
43
 
44
+ ## Bundle resolver — bind to the existing surfaces
45
+
46
+ The brief is **resolved**, not hand-built. `resolveBundle(slice)` maps a task
47
+ slice to a concrete bundle by selecting from what the package already ships — no
48
+ parallel registry:
49
+
50
+ - **Role-profile via reused `judge-*` lenses** — a review slice → `judge-code-quality`,
51
+ security → `judge-security-auditor`, tests → `judge-test-coverage`, bug-hunt →
52
+ `judge-bug-hunter`. The lens rides as the leading persona so the subagent loads it.
53
+ - **Role-mode** per slice kind (review → `reviewer`, tests → `tester`, plan → `planner`, …).
54
+ - **Tier** per slice kind (`lite|medium|high`), consumed by `subagent-routing`.
55
+ - **Knowledge refs** filtered by the **ADR-100 guard** (`filterKnowledgeByPolicy`):
56
+ a cross-project bundle drops `proprietary` refs; the drop is recorded.
57
+
58
+ Every resolved bundle emits an auditable `(role_mode, judge_lens, tier,
59
+ knowledge_ref_count, dropped_proprietary)` signature (`bundleAuditLine`) into the
60
+ [`orchestration-telemetry`](orchestration-telemetry.md) object — counts + ids
61
+ only, never bodies.
62
+
44
63
  ## Reference implementation
45
64
 
46
65
  [`src/scripts/_lib/subagent_spawn.ts`](../../../../src/scripts/_lib/subagent_spawn.ts)
47
- (`composeSpawnBrief`), covered by
48
- [`tests/scripts/_lib_subagent_spawn.test.ts`](../../../../tests/scripts/_lib_subagent_spawn.test.ts).
66
+ (`composeSpawnBrief`) + [`src/scripts/_lib/subagent_bundle.ts`](../../../../src/scripts/_lib/subagent_bundle.ts)
67
+ (`resolveBundle`, `filterKnowledgeByPolicy`, `bundleAuditLine`), covered by
68
+ [`tests/scripts/_lib_subagent_spawn.test.ts`](../../../../tests/scripts/_lib_subagent_spawn.test.ts)
69
+ + [`tests/scripts/_lib_subagent_bundle.test.ts`](../../../../tests/scripts/_lib_subagent_bundle.test.ts).
70
+
71
+ ## Worker-prompt rules — verbatim at spawn
72
+
73
+ Relocated from the `subagent-orchestration` skill body (road-to-feedback-9.2.0
74
+ Phase 2, size-budget split). Every dispatched worker prompt obeys these rules —
75
+ they prevent the two classic handoff failures: lossy re-summarization dropping
76
+ the user's requirements, and over-scripted prompts that break on first
77
+ contingency.
78
+
79
+ - **(a) User constraints verbatim.** Pass the user's
80
+ constraints/exclusions/preferences into the worker prompt **verbatim** — never
81
+ a paraphrase (a paraphrase silently drops requirements).
82
+ - **(b) Describe the goal, don't script the approach.** State the outcome and
83
+ let the worker choose the path; over-scripting breaks on contingencies.
84
+ - **(c) Translate environment paths.** Orchestrator-local paths do not exist in
85
+ the worker's sandbox — resolve/translate them at spawn.
86
+ - **(d) Pre-declared check-in conditions.** The worker names, at spawn time, the
87
+ conditions under which it will halt and ask ("if login required", "if
88
+ multiple candidates found") — so interrupts are predictable, not surprises.
89
+ - **(e) Attach relevant knowledge — read-only (road-to-opt-subagent-harvest
90
+ P3).** Before dispatch, look up the slice's key identifiers via
91
+ `memory_lookup` / the knowledge cards and attach the top hits to the
92
+ worker prompt AS LEADS — labelled per the source-discovery discipline
93
+ (negative facts + pointers durable; positive structure = hypothesis to
94
+ re-confirm, never a build input). The WRITE half stays forbidden: a
95
+ subagent's output is never auto-persisted into memory — promotion is
96
+ always the human-gated flow (ADR-098 floor). Auto-surface, never
97
+ auto-write.
98
+
99
+ ## Hand-off worked examples — step N output feeds step N+1
100
+
101
+ Relocated from the `subagent-orchestration` skill (ecosystem-harvest ergonomics
102
+ U4, size-budget split). Ordered modes (`do-in-steps`) pass each step's return
103
+ as the next step's context; the failure this prevents is re-deriving state the
104
+ previous step established, or dropping a decision it made.
105
+
106
+ **Ordered chain (do-in-steps).** Step 1 returns a structured result; step 2's
107
+ worker prompt embeds it verbatim as "context from step 1", never a paraphrase:
108
+
109
+ ```
110
+ Step 1 (analyze) → returns: { entrypoints: [...], risk_notes: "..." }
111
+ Step 2 (implement) worker prompt:
112
+ "Context from step 1 (verbatim, do not re-derive):
113
+ entrypoints = [...]; risk_notes = '...'
114
+ Your task: <goal>. Use the entrypoints above; do not re-scan."
115
+ Step 3 (verify) worker prompt:
116
+ "Context: step 2 changed <files>. Assert <invariant>."
117
+ ```
118
+
119
+ **Fan-out → synthesis (do-in-parallel + a synthesis step).** Each parallel
120
+ worker returns one envelope; the synthesis step receives ALL of them as an
121
+ ordered list and is told what to reconcile ("merge the N findings; a finding
122
+ present in ≥2 returns is high-confidence"). The synthesis prompt names the
123
+ cross-item comparison — it does not just concatenate.
124
+
125
+ The rule both encode: **the receiving prompt embeds the prior return verbatim
126
+ and states what to do with it** — the same verbatim-first discipline as the
127
+ worker-prompt rules above, applied across a step boundary.
49
128
 
50
129
  ## Related
51
130
 
@@ -38,6 +38,13 @@ Fires on new files, classes, controllers, modules, or any structural decision ab
38
38
  → Symfony: see [`symfony-workflow`](../skills/symfony-workflow/SKILL.md).
39
39
  → Next.js / TypeScript backends: see [`nextjs-patterns`](../skills/nextjs-patterns/SKILL.md).
40
40
 
41
+ ## Reusable components + object-oriented design
42
+
43
+ - **Think in reusable units** — decompose UI into composable components; reuse the project's primitives / shared abstractions before building; extract a new unit only when the same shape repeats (audit existing first, per [`ui-audit-gate`](ui-audit-gate.md)).
44
+ - **Object-oriented where it reduces complexity** — in an object-oriented / class-based codebase, encapsulation, single responsibility, composition over inheritance, behavior-rich domain objects, and design patterns *where they earn their place* are the high-priority default — never speculative abstraction, and never imposed on a functional / pipeline codebase (detect + defer to its paradigm). Bounded by [`minimal-safe-diff`](minimal-safe-diff.md) + [`senior-engineering-discipline`](senior-engineering-discipline.md), which **win on conflict**: a reviewer should be able to name the concrete duplication or second axis of change the abstraction removes (rule of thumb: two real repetitions before you extract).
45
+
46
+ Full standard — split FE / backend, with the stack carve-out index and the anti-over-engineering deference: [`component-oriented-and-oop-development`](../docs/guidelines/component-oriented-and-oop-development.md).
47
+
41
48
  ## Architectural Decision Records (ADRs)
42
49
 
43
50
  When a structural decision is non-trivial (kernel membership, contract change, library swap,
@@ -98,6 +98,7 @@ React island vs. Vue SFC) is the apply-step's concern, not this skill's.
98
98
  - **Compose with reusable UI components** for shared shells, headers, fields.
99
99
  - **Use the project's library primitives first** — never rebuild what the design system already provides (audit findings tell you which).
100
100
  - **Extract when used 3+ times** — DRY applies to UI too.
101
+ - **Component workshop when the project is large enough** — for a real, growing shared-component library, isolate and document each reusable component in a component workshop so it stays discoverable and reused, not re-invented; skip it for a small surface of one-offs. Tool-specific setup is a carve-out (Storybook et al.) — see the implementation skill (e.g. [`react-shadcn-ui`](../react-shadcn-ui/SKILL.md) § Component workshop), never a generic mandate.
101
102
 
102
103
  ## Form Design
103
104
 
@@ -63,6 +63,7 @@ if the neighbors are unfashionable.
63
63
  | **Comments** | Explain *why*, not *what*. Remove comments that restate the code |
64
64
  | **Error-shape consistency** | Exceptions/results follow the same pattern as the rest of the module |
65
65
  | **Public surface** | New public API matches module's existing style and is minimal |
66
+ | **Reuse & OO shape** | A new unit reinvents a component/abstraction the codebase already has (should compose/reuse instead); OR encapsulation/composition would genuinely cut complexity here (anemic object mutated from outside; an `if`/`switch` on a type-discriminator that a polymorphic shape would absorb) — flag **only where the duplication/branch is already present** (never "could grow later"), **in the codebase's own paradigm** (don't push a class onto functional code), never speculative abstraction (`minimal-safe-diff` wins on conflict) |
66
67
 
67
68
  ### 3. Filter out linter-land
68
69
 
@@ -0,0 +1,81 @@
1
+ ---
2
+ model_tier: inherit
3
+ name: persona-improvement
4
+ description: "ONLY when the user explicitly asks to refine a persona from recent corrections — persona analog of skill-improvement-pipeline; tightens a persona's Unique Questions, governance-gated."
5
+ domain: process
6
+ execution:
7
+ type: assisted
8
+ handler: internal
9
+ allowed_tools: []
10
+ workspaces:
11
+ - agent-config-maintainer
12
+ packs:
13
+ - meta
14
+ requires_skills:
15
+ - persona-governance
16
+ ---
17
+
18
+ # persona-improvement
19
+
20
+ The persona analog of [`skill-improvement-pipeline`](../skill-improvement-pipeline/SKILL.md):
21
+ feed a persona a sample of recent corrections/failures where its review lens
22
+ **should** have caught something and didn't, and tighten its `Unique Questions`
23
+ so the lens fires next time. Access ergonomics, not new capability — it only
24
+ sharpens an existing persona, never creates one.
25
+
26
+ ## When to use
27
+
28
+ - The user explicitly says "improve / refine this persona" or "the <persona> lens keeps missing X".
29
+ - A correction sample exists (review misses, repeated feedback) that a persona's questions should have surfaced.
30
+
31
+ Do NOT use for:
32
+
33
+ - Creating a new persona (that is `persona-governance` + the authoring flow).
34
+ - Editing a persona's identity/scope (a breaking change → new id per `persona-governance`).
35
+ - A one-off miss with no pattern — one anecdote is not a refinement signal.
36
+
37
+ ## Procedure
38
+
39
+ 1. **Gather the correction sample.** Collect the recent misses/corrections tied
40
+ to this persona's domain (from the conversation, feedback notes, or a review
41
+ log). If fewer than ~3 distinct misses, STOP — no pattern yet; say so.
42
+ 2. **Locate the gap.** For each miss, name the question the persona *should* have
43
+ asked that would have surfaced it. Cluster the misses into ≤ 2 recurring gaps.
44
+ 3. **Propose tightened `Unique Questions`.** Rewrite or add questions that close
45
+ the gaps — concrete and answerable-from-the-diff, not vague ("does this add a
46
+ second branch on the same enum?" beats "is the design good?"). Keep the
47
+ section ≥ 3 questions (`persona-governance` schema floor).
48
+ 4. **Governance gate (mandatory).** Before writing, confirm with
49
+ [`persona-governance`](../../rules/persona-governance.md): the edit is a
50
+ same-id refinement (not a scope/identity change — those need a new id); the
51
+ persona keeps ≥ 1 skill citation; the file still passes the skill linter
52
+ (tier/wing/section/line budget). A scope change is out of scope for this loop.
53
+ 5. **Apply + verify.** Edit only the `Unique Questions` section; run
54
+ `./scripts-run src/scripts/skill_linter` on the persona file and confirm
55
+ 0 errors; show the before/after questions.
56
+
57
+ ## Output format
58
+
59
+ 1. **Correction sample** — the ≥ 3 misses, one line each.
60
+ 2. **Gaps** — the ≤ 2 recurring gaps the misses cluster into.
61
+ 3. **Before/after `Unique Questions`** — the diff, with which gap each new question closes.
62
+ 4. **Governance confirmation** — same-id refinement ✅, ≥ 1 citation intact ✅, linter 0-error ✅.
63
+
64
+ ## Gotcha
65
+
66
+ - The most common misuse is **scope creep disguised as refinement**: adding
67
+ questions that widen the persona into a second domain. That is a new persona
68
+ (per the per-domain cap), not a refinement — STOP and route to
69
+ `persona-governance`, do not grow the lens sideways.
70
+
71
+ ## Do NOT
72
+
73
+ - Do NOT refine on a single miss — a pattern needs ≥ 3.
74
+ - Do NOT touch identity, scope, tier, or wing — same-id `Unique Questions` only; anything else is a new-id change under `persona-governance`.
75
+ - Do NOT drop below 3 `Unique Questions` (schema floor).
76
+ - Do NOT commit or push — apply the edit locally, surface the diff.
77
+
78
+ ## Related Skills
79
+
80
+ - [`skill-improvement-pipeline`](../skill-improvement-pipeline/SKILL.md) — the skill-side analog this mirrors.
81
+ - [`persona-governance`](../../rules/persona-governance.md) — the four discipline checks this loop is gated by.
@@ -253,6 +253,16 @@ current state on the next polish round.
253
253
 
254
254
  `DESIGN.md` `## Taste Dials` → honour: Variance → layout-family spread + asymmetry; Motion → animation budget + reduced-motion posture; Density → spacing scale + info-per-viewport. Absent → follow brief's inferred dials.
255
255
 
256
+ ## Component workshop (Storybook) — when the library is large enough
257
+
258
+ Generic "isolate + document reusable components" principle → [`fe-design`](../fe-design/SKILL.md) § Component Architecture; this is the React carve-out for the tool-specific part.
259
+
260
+ - **When it pays off** — real, growing shared-component library (more than a handful of reused primitives, multiple consumers, ongoing UI work): Storybook makes each component discoverable, reviewable in isolation, reused not re-invented. **Skip** for a small surface of one-offs — setup + maintenance not worth it yet.
261
+ - **Story per reusable primitive, not per screen** — a story covers a component + its states (default / loading / empty / error / dark), mirroring the Step 3 state-coverage matrix. Screens composed, not story-fied.
262
+ - **Reuse the token layer** — stories render under the same semantic tokens + `.dark` class; never hardcode a preview theme (Step 2 token discipline).
263
+ - **A11y in-workshop** — run the a11y addon so isolation catches contrast / role / focus before the component reaches a screen.
264
+ - Do NOT let stories drift from the component API — a story props-drilling values the component no longer accepts is stale documentation; keep beside the component, update in the same change.
265
+
256
266
  ## Do NOT
257
267
 
258
268
  - Do NOT install `shadcn-ui` from npm — primitives are scaffolded.
@@ -68,33 +68,22 @@ line; any gate failing → in-session no-op. Never lifts a safety floor.
68
68
 
69
69
  ## Worker-prompt contract
70
70
 
71
- Every dispatched worker prompt obeys four rules — they prevent the two classic
72
- handoff failures: lossy re-summarization dropping the user's requirements, and
73
- over-scripted prompts that break on first contingency.
74
-
75
- - **(a) User constraints verbatim.** Pass the user's
76
- constraints/exclusions/preferences into the worker prompt **verbatim** — never
77
- a paraphrase (a paraphrase silently drops requirements).
78
- - **(b) Describe the goal, don't script the approach.** State the outcome and
79
- let the worker choose the path; over-scripting breaks on contingencies.
80
- - **(c) Translate environment paths.** Orchestrator-local paths do not exist in
81
- the worker's sandbox — resolve/translate them at spawn.
82
- - **(d) Pre-declared check-in conditions.** The worker names, at spawn time, the
83
- conditions under which it will halt and ask ("if login required", "if
84
- multiple candidates found") — so interrupts are predictable, not surprises.
85
- - **(e) Attach relevant knowledge — read-only (road-to-opt-subagent-harvest
86
- P3).** Before dispatch, look up the slice's key identifiers via
87
- `memory_lookup` / the knowledge cards and attach the top hits to the
88
- worker prompt AS LEADS — labelled per the source-discovery discipline
89
- (negative facts + pointers durable; positive structure = hypothesis to
90
- re-confirm, never a build input). The WRITE half stays forbidden: a
91
- subagent's output is never auto-persisted into memory — promotion is
92
- always the human-gated flow (ADR-098 floor). Auto-surface, never
93
- auto-write.
71
+ Every dispatched worker prompt obeys five rules that prevent the two classic
72
+ handoff failures (lossy re-summarization dropping the user's requirements;
73
+ over-scripted prompts that break on first contingency): (a) user
74
+ constraints **verbatim**, (b) describe the goal — don't script the approach,
75
+ (c) translate environment paths into the worker's sandbox, (d) pre-declare
76
+ check-in conditions, (e) attach relevant knowledge read-only (auto-surface,
77
+ never auto-write — ADR-098 floor). The five rules verbatim:
78
+ [`subagent-spawn-contract` § Worker-prompt rules](../../contexts/execution/subagent-spawn-contract.md).
94
79
 
95
80
  When to delegate at all is [`delegation-policy`](../../rules/delegation-policy.md);
96
81
  the spawn boundary is the [`subagent-spawn-contract`](../../contexts/execution/subagent-spawn-contract.md).
97
82
 
83
+ ## Hand-off worked examples
84
+
85
+ Ordered / fan-out hand-offs embed each step's return **verbatim** in the next prompt and state what to do with it (never "continue from before" — the lossy re-summarization failure). Two worked shapes: [`subagent-spawn-contract` § Hand-off worked examples](../../contexts/execution/subagent-spawn-contract.md).
86
+
98
87
  ## Form gate — deterministic, BEFORE mode selection
99
88
 
100
89
  With auto-dispatch on by default (ADR-117), mode selection happens without
@@ -39,7 +39,7 @@ schema_version: 1
39
39
  # CI guard: a release bump of `package.json` must update this value
40
40
  # in lockstep — see scripts/check_template_pin_drift.ts (road-to-
41
41
  # portable-runtime-and-update-check P3.3).
42
- agent_config_version: "9.2.0"
42
+ agent_config_version: "9.3.0"
43
43
 
44
44
  # --- Project identity ---
45
45
  project:
@@ -1,6 +1,6 @@
1
1
  # Discovery — Deprecation Report
2
2
 
3
- - Generated: `2026-07-14T13:40:54Z`
3
+ - Generated: `2026-07-16T03:13:57Z`
4
4
  - Deprecated artefacts: **0**
5
5
 
6
6
  _None. Tree is clean._