hotmilk 0.1.13 → 0.1.14

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 (38) hide show
  1. package/AGENTS.md +3 -2
  2. package/README.md +167 -22
  3. package/agents/README.md +3 -3
  4. package/agents/coach.md +2 -1
  5. package/agents/planner.md +2 -2
  6. package/hotmilk.json +6 -0
  7. package/package.json +25 -22
  8. package/prompts/prompt-eval.md +241 -0
  9. package/prompts/tidy.md +3 -1
  10. package/prompts/translate.md +3 -1
  11. package/skills/make-docs/SKILL.md +43 -0
  12. package/skills/pioneer/SKILL.md +120 -130
  13. package/skills/pioneer/references/autoresearch-routing.md +112 -0
  14. package/skills/pioneer/references/chat-plan.md +50 -0
  15. package/skills/pioneer/references/goal-gate.md +54 -0
  16. package/skills/pioneer/references/graph-recon-gate.md +50 -0
  17. package/skills/pioneer/references/openspec-routing.md +50 -0
  18. package/skills/pioneer/references/plannotator-routing.md +81 -0
  19. package/skills/pioneer/references/prompt-eval-gate.md +38 -0
  20. package/skills/recommend-research/SKILL.md +94 -6
  21. package/skills/recommend-research/references/example-narrow.md +53 -0
  22. package/skills/recommend-research/references/scope-gate.md +46 -0
  23. package/skills/recommend-research/references/shortlist-gate.md +69 -0
  24. package/skills/recommend-research/references/verify-gate.md +73 -0
  25. package/skills/update-docs/SKILL.md +86 -0
  26. package/skills/update-docs/references/doc-inventory.md +69 -0
  27. package/skills/update-docs/references/drift-verification.md +59 -0
  28. package/src/bootstrap/extensions.ts +7 -1
  29. package/src/bootstrap/global-extension-sources.ts +10 -1
  30. package/src/bootstrap/project-trust.ts +41 -0
  31. package/src/bootstrap/session.ts +28 -1
  32. package/src/config/bundled-extensions.ts +12 -0
  33. package/src/config/hotmilk.ts +22 -0
  34. package/src/config/resolve.ts +16 -0
  35. package/src/config/runtime.ts +4 -0
  36. package/src/index.ts +4 -0
  37. package/themes/monokai.json +1 -1
  38. package/skills/empirical-prompt-tuning/SKILL.md +0 -232
@@ -0,0 +1,50 @@
1
+ # OpenSpec / SDD routing
2
+
3
+ **Load when:** Plan routing chose **OpenSpec SDD** (Phase 3b) or Phase 4 OpenSpec execute.
4
+
5
+ **Do NOT load when:** Chat Plan path is chosen — use [`chat-plan.md`](chat-plan.md) instead.
6
+
7
+ **Primary skill — MANDATORY:** load **`/skill:gentle-ai`** for phase chain, `/sdd-status`, `/sdd-continue`, preflight, delegation, and verify/sync/archive rules. This file is a pioneer gate only — not a second copy of gentle-ai.
8
+
9
+ ## Pre-SDD checklist (pioneer gate)
10
+
11
+ Before proposal/spec work, confirm via **`/skill:gentle-ai`**:
12
+
13
+ | Gate | Check |
14
+ | ----------------- | -------------------------------------------------------------------------------------------------------- |
15
+ | Session preflight | SDD preflight choices captured this session (execution mode, artifact store, PR strategy, review budget) |
16
+ | Init guard | `openspec/config.yaml` exists or `/sdd-init` runs first |
17
+ | Toggle | `extensions.gentle-ai: true` — if off, **stop**; Chat Plan only |
18
+
19
+ ## Gate
20
+
21
+ If `openspec/config.yaml` is missing, run **`/sdd-init`** (or enable `sdd-init` in `/mode`) before proposal/spec work.
22
+
23
+ ## Artifacts
24
+
25
+ Artifacts live under `openspec/changes/<change>/`. See **`/skill:gentle-ai`** for phase chain and file roles.
26
+
27
+ ## Grill → OpenSpec
28
+
29
+ Grill output (`## Proposed CONTEXT.md`, `## Proposed ADR`) feeds proposal/design — sync into OpenSpec artifacts, not only chat.
30
+
31
+ ## Pioneer NEVER
32
+
33
+ - Do not skip **verify** or **sync** because chat plan "looks done".
34
+ - Do not mix chat `Plan:` and OpenSpec artifacts for the same change unless the user explicitly wants a sketch first.
35
+ - Do not downgrade an **active** OpenSpec change to Chat Plan when gentle-ai becomes unavailable mid-flow.
36
+
37
+ ## Mid-flow recovery (gentle-ai lost during SDD)
38
+
39
+ Triggers: `/mode` disables `extensions.gentle-ai`, gentle-ai skill missing after SDD artifacts exist, or `/sdd-continue` fails because SDD runtime is gone.
40
+
41
+ | Step | Action |
42
+ | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
43
+ | 1 | **Stop** apply/verify/sync/archive — do not emit chat `Plan:` for the same change |
44
+ | 2 | Tell user: _"OpenSpec change `<change>` is in progress. SDD requires gentle-ai. Enable `extensions.gentle-ai`, `/reload`, then `/sdd-status` and `/sdd-continue` — do not switch to Chat Plan or you will lose artifact gates."_ |
45
+ | 3 | Preserve artifacts under `openspec/changes/<change>/`; note last completed phase in chat |
46
+ | 4 | Resume only via **`/skill:gentle-ai`** (`/sdd-status` → `/sdd-continue`) after gentle-ai is back |
47
+
48
+ **Forbidden:** abandoning SDD artifacts, re-planning the same scope in chat, or implementing without verify/sync because gentle-ai dropped.
49
+
50
+ After large code changes, mention `graphify update .` if the project uses graphify.
@@ -0,0 +1,81 @@
1
+ # Plannotator (Phase 3b)
2
+
3
+ **Load when:** Plan routing chose **Plannotator** (human approval gate before execution).
4
+
5
+ **Do NOT load when:** Chat Plan, OpenSpec SDD, or planning-with-files is the chosen plan authority — use the matching reference instead.
6
+
7
+ ## When to use
8
+
9
+ | Signal | Route here |
10
+ | ---------------------------------------------------------------------- | --------------------------- |
11
+ | Medium scope, bounded checklist, human must approve plan before writes | Plannotator |
12
+ | User asks for plan review in browser, `/plannotator`, or `--plan` | Plannotator |
13
+ | Gray zone where approval matters more than spec artifacts | Plannotator over Chat Plan |
14
+ | Cross-cutting, >400 changed lines, proposal/spec needed | OpenSpec instead |
15
+ | Heavy research, `/clear` recovery, findings/progress split | planning-with-files instead |
16
+
17
+ **Tie-breaker vs OpenSpec:** approval is the primary goal → Plannotator; spec/design/tasks contract is the primary goal → OpenSpec.
18
+
19
+ ## Prerequisites
20
+
21
+ | Requirement | Check |
22
+ | ------------------- | ----------------------------------------------------------------------------------------------- |
23
+ | Toggle | `extensions.plannotator: true` — if off, fall back to Chat Plan or OpenSpec per pioneer routing |
24
+ | Extension | `@plannotator/pi-extension` loaded via `/reload` after `/mode` |
25
+ | Graph (recommended) | Phase 0 graph recon before planning — read `graphify-out/GRAPH_REPORT.md` when present |
26
+
27
+ ## Workflow
28
+
29
+ ```text
30
+ 1. Phase 0 graph recon (when non-trivial)
31
+ 2. Optional /goal alignment
32
+ 3. /plannotator plans/<name>.md OR --plan plans/<name>.md
33
+ 4. Agent writes plan + checklist in planning phase (plan file only)
34
+ 5. plannotator_submit_plan → browser Approve / Deny / Approve with notes
35
+ 6. executing phase → gentle-ai Work Routing Ladder; mark [DONE:n] per item
36
+ 7. Optional plannotator-review on diff before ship
37
+ ```
38
+
39
+ ## Artifact rules
40
+
41
+ | Artifact | Owner |
42
+ | -------------------------------------------- | -------------------------------------------------------------------------- |
43
+ | `plans/*.md` | Plannotator (single plan authority) |
44
+ | `task_plan.md`, `findings.md`, `progress.md` | planning-with-files — **do not share** with Plannotator plan path |
45
+ | `openspec/changes/<change>/` | OpenSpec — Plannotator may gate **after tasks**, not replace SDD artifacts |
46
+
47
+ Link across layers in prose only (`See findings.md §3`) — do not make two files the same plan authority.
48
+
49
+ ## Execute (Phase 4)
50
+
51
+ After browser approval, load **`/skill:gentle-ai`** and follow its Work Routing Ladder.
52
+
53
+ - `extensions.subagents: false` → inline execute; say delegation skipped
54
+ - `extensions.gentle-ai: false` → inline execute after approval; no SDD mid-flow
55
+
56
+ **Verify:** per-step checks in plan + **`AGENTS.md`** (`bun test`, `bun run check`).
57
+
58
+ ## SDD combination (optional)
59
+
60
+ When OpenSpec tasks are complete and human approval is still required:
61
+
62
+ ```text
63
+ sdd-tasks done → emit plan-review (tasks summary) → Plannotator approve → sdd-apply
64
+ ```
65
+
66
+ SDD artifacts remain authoritative; Plannotator is the execution gate only.
67
+
68
+ ## Fallback when Plannotator is off
69
+
70
+ - Say **"Plannotator skipped: extension off"**
71
+ - Re-route: approval needed → Chat Plan with explicit user OK in chat; spec needed → OpenSpec
72
+ - Do not invoke `/plannotator`, `plannotator_submit_plan`, or `--plan` mode
73
+
74
+ ## Anti-patterns
75
+
76
+ | Do not | Do instead |
77
+ | --------------------------------------------------------- | -------------------------------------------------- |
78
+ | Start Plannotator mid-active SDD as second plan authority | Finish or pause SDD; use plan-review on tasks only |
79
+ | Share `task_plan.md` with Plannotator | Separate paths: `.planning/` vs `plans/` |
80
+ | Chat Plan then switch to Plannotator same task | Pick one plan path at Phase 3 |
81
+ | Skip browser approval and write source in planning phase | Stay in planning until Approve |
@@ -0,0 +1,38 @@
1
+ # Prompt-eval gate
2
+
3
+ **Load when:** A skill or prompt file was edited and the asset will ship (commit, PR, or user asks to harden).
4
+
5
+ **Do NOT load when:** Read-only tasks; no edits to prompts or skills.
6
+
7
+ ## Enter (mandatory)
8
+
9
+ Run when **any** of:
10
+
11
+ - This session edited a file under `skills/` or `prompts/`
12
+ - User invokes `/prompt-eval <path>`
13
+ - Scenario router: "Skill or prompt edit just completed"
14
+
15
+ ## Skip
16
+
17
+ Say **"prompt-eval skipped: …"** when:
18
+
19
+ - No prompt/skill edits this session
20
+ - User explicitly ships without hardening
21
+
22
+ ## Run (mandatory)
23
+
24
+ Invoke **`/prompt-eval <path>`** where `<path>` is the edited skill or prompt file.
25
+
26
+ Pi resolves `/prompt-eval` to the shipped prompt. Do not read `prompts/*.md` by file path.
27
+
28
+ If `/prompt-eval` is unavailable, report `prompt-eval skipped: prompt not available`.
29
+
30
+ ## Phase placement
31
+
32
+ - **Edits-only task:** run after Phase 3 plan (if any) or immediately before ship
33
+ - **Mixed task:** run after Phase 4 execute when skill/prompt files changed
34
+
35
+ ## Pioneer NEVER
36
+
37
+ - Self re-read the target as "evaluation" — fresh executor required
38
+ - Ship hardened assets without static coherence check (prompt-eval Step 0)
@@ -1,13 +1,101 @@
1
1
  ---
2
2
  name: recommend-research
3
- description: "Single entry for technology recommendations: judge scope, shortlist, then verify with docs and source. [Triggers: recommend research, technology choice, library comparison, stack evaluation, OSS research, repo]"
3
+ description: Single entry for technology recommendations judge scope, shortlist 3–5 candidates, verify with docs and source. Use when the user asks to compare libraries, evaluate stack choices, research OSS alternatives, pick dependencies, or needs evidence-backed technology advice. Triggers include recommend research, technology choice, library comparison, stack evaluation, OSS research, repo research, deepwiki, librarian, opensrc, brave-search.
4
4
  ---
5
5
 
6
6
  # Recommend research
7
7
 
8
- 1. **Scope** Multiple moving parts (stack, practice, integration across layers) → holistic evaluation. One category or one library family → narrow track.
9
- 2. **Shortlist** — Use curated surveys and comparisons when you need options fast; then cut to a few candidates.
10
- 3. **Verify** — Official docs for contracts and usage; repository / local checkout when internals, edge cases, or performance matter.
11
- 4. **Mechanics** — Web search and doc pages for reading; `ghq` or `git clone` when the tree must be local.
8
+ Single orchestration skill for **evidence-backed technology recommendations**.
12
9
 
13
- If the repo ships extra skills under `./skills/`, load those `SKILL.md` files only when this flow is not enough.
10
+ ## Scenario router (read first)
11
+
12
+ | User signal | Route |
13
+ | ------------------------------------------ | --------------------------------------------------------------------------- |
14
+ | Stack / practice / cross-layer integration | **Holistic** — [`scope-gate.md`](references/scope-gate.md) |
15
+ | One library family or one category | **Narrow** — [`scope-gate.md`](references/scope-gate.md) |
16
+ | User already named 1–2 candidates | Skip shortlist survey; go to verify |
17
+ | User wants internals / why / source proof | Verify path → librarian or opensrc (see ladder) |
18
+ | Public GitHub repo docs / architecture | deepwiki when available |
19
+ | First use / "show example" | [`example-narrow.md`](references/example-narrow.md) — read-only walkthrough |
20
+
21
+ **References:** Do **not** read `references/` unless a phase below applies. Each reference states its load trigger at the top.
22
+
23
+ ## Phase map
24
+
25
+ ```text
26
+ 1. Scope → scope-gate.md (MANDATORY - READ ENTIRE FILE)
27
+ 2. Shortlist → shortlist-gate.md (MANDATORY - READ ENTIRE FILE)
28
+ 3. Verify → verify-gate.md (MANDATORY - READ ENTIRE FILE)
29
+ 4. Recommend → chat verdict (see below)
30
+ ```
31
+
32
+ Skip phases that do not apply. Say which phase was skipped and why.
33
+
34
+ ## Evidence tools (by job)
35
+
36
+ | Job | Tools | Phase |
37
+ | ---------------------------- | ------------------------------------------------ | ----------------------------------------- |
38
+ | **Discovery search** | brave-search, web-search | Shortlist seed, verify pass 1–2 |
39
+ | **Repo / docs intelligence** | deepwiki, librarian | Verify pass 3–5 |
40
+ | **Source access + search** | opensrc + `rg`/`find` on `$(opensrc path <pkg>)` | Verify pass 4 only — not shortlist survey |
41
+
42
+ opensrc fetches cached source; it does **not** discover candidates. Use discovery search first; opensrc when finalists exist and internals matter.
43
+
44
+ ## Skill resolution ladder
45
+
46
+ When a research skill is needed, resolve in order — stop at first hit. Announce which step forced a behavior change.
47
+
48
+ **Portable resolution:** If `/skill:` slash commands are unavailable, load the same capability from `<available_skills>` or `.atl/skill-registry.md` by path — keep this ladder order; do not swap opensrc before official docs for contract questions.
49
+
50
+ | Step | Skill | When |
51
+ | ---- | ---------------------------------- | ------------------------------------------------------------------------------- |
52
+ | 1 | **deepwiki** (`/skill:deepwiki`) | Public GitHub repo; architecture / how-it-works questions |
53
+ | 2 | **librarian** (`/skill:librarian`) | Implementation proof, permalinks, git history, issue/PR context |
54
+ | 3 | **opensrc** (`/skill:opensrc`) | Finalist known; read or **search within** local source (`rg` on `opensrc path`) |
55
+ | 4 | **brave-search** or **web-search** | Current docs, surveys, release notes, fact-check |
56
+ | 5 | Project fallback | `./skills/` — load matching `SKILL.md` only when this flow is not enough |
57
+
58
+ Path-specific notes:
59
+
60
+ - **Conceptual / API contract** → official docs first (verify-gate); deepwiki/librarian only when docs are thin or disputed
61
+ - **Internals / performance / edge cases** → librarian or opensrc before blog posts
62
+ - **Hotmilk planning after pick** → pioneer or tcz-agent-converge when integration is large or ambiguous (resolve via ladder step 5 if slash unavailable)
63
+
64
+ ## Recommend output (Phase 4)
65
+
66
+ Emit a concise verdict only when verify-gate **done** criteria pass.
67
+
68
+ ```markdown
69
+ ## Recommendation
70
+
71
+ **Pick:** …
72
+ **Why:** … (cite docs or permalinks)
73
+ **Tradeoffs:** …
74
+ **Alternatives considered:** …
75
+ **Reversibility:** swap cost / migration note
76
+ **Evidence gaps:** … (if any — do not hide)
77
+ ```
78
+
79
+ If evidence is insufficient, say what is missing and which verify step would close it — do not fake certainty.
80
+
81
+ ## Anti-patterns
82
+
83
+ | Do not | Why | Do instead |
84
+ | ------------------------------------------- | ---------------------------------- | -------------------------------------------------------- |
85
+ | Read `references/` without a matching phase | Wastes tokens; wrong workflow | Load only when scope, shortlist, or verify phase applies |
86
+ | Pick from GitHub stars alone | Stars ≠ maintenance, security, fit | shortlist-gate criteria + verify-gate maintenance checks |
87
+ | Skip license check for production deps | Legal / compliance risk | verify-gate license row for every finalist |
88
+ | Treat one blog post as API contract | Drift from official docs | Official docs first; blog as secondary signal only |
89
+ | Clone every repo before reading docs | Wastes time | Docs pass first; opensrc/librarian when internals matter |
90
+ | Recommend before verify **done** | Plausible-but-wrong picks ship | Finish verify-gate; list evidence gaps explicitly |
91
+ | Shortlist >5 without user ask | Review paralysis | Cap at 3–5; ask user to widen scope if needed |
92
+ | Ignore archived / unmaintained repos | Future breakage | verify-gate maintenance gate — drop or flag |
93
+ | Use training-data memory for "latest" | Stale version / API claims | web-search or brave-search for current facts |
94
+ | Holistic stack pick from one library doc | Misses integration constraints | scope-gate holistic path + verify-gate holistic table |
95
+ | AGPL/SSPL in proprietary SaaS | Compliance blockers | verify-gate license row + deployment model |
96
+ | Vendor SDK as only integration path | Lock-in without exit | Require exit path row; thin wrapper or second finalist |
97
+ | Pre-1.0 semver for production | Breaking API without pin strategy | Flag risk; require changelog pass or user waiver |
98
+
99
+ ---
100
+
101
+ Read the **entire** reference for the active phase before shortlisting or recommending.
@@ -0,0 +1,53 @@
1
+ # Example: narrow track (reference walkthrough)
2
+
3
+ **Load when:** First use of this skill, or user asks for an example / how the flow works.
4
+
5
+ **Do NOT load when:** Active phase work is underway — follow scope → shortlist → verify instead.
6
+
7
+ ## Scenario
8
+
9
+ User: "Rust HTTP client for this service — reqwest vs ureq vs hyper?"
10
+
11
+ ## Phase 1 — Scope (scope-gate)
12
+
13
+ - Track: **Narrow** — one library family (HTTP client).
14
+ - Must-haves: async, TLS, JSON body helpers, MIT/Apache OK.
15
+ - Incumbent baseline: stdlib only (manual `TcpStream` + hand-rolled HTTP).
16
+ - One-line pin: "Pick async Rust HTTP client for outbound JSON APIs; TLS required."
17
+
18
+ ## Phase 2 — Shortlist (shortlist-gate)
19
+
20
+ | Finalist | One-line rationale |
21
+ | -------- | ----------------------------------------------------------- |
22
+ | reqwest | Ecosystem default; async + TLS + JSON ergonomics |
23
+ | ureq | Sync-only; drop if async is hard must-have |
24
+ | hyper | Low-level; keep if user needs control over middleware stack |
25
+
26
+ Dropped: ureq — violates async must-have.
27
+
28
+ If all candidates fail cut criteria → relax one must-have with user, widen category, or stop with "no evidence-backed pick."
29
+
30
+ ## Phase 3 — Verify (verify-gate)
31
+
32
+ Per finalist (reqwest, hyper):
33
+
34
+ 1. **Pass 1** — Official docs: async API, TLS feature flags, MSRV, license.
35
+ 2. **Pass 2** — Changelog: recent release cadence, breaking changes in last 12mo.
36
+ 3. **Pass 4** (if performance questioned) — opensrc on hot path or librarian for issue history.
37
+
38
+ Evidence gaps: none if pass 1–2 satisfy must-haves.
39
+
40
+ ## Phase 4 — Recommend (SKILL.md template)
41
+
42
+ ```markdown
43
+ ## Recommendation
44
+
45
+ **Pick:** reqwest
46
+ **Why:** Official async + TLS docs match must-haves; active releases (cite doc URL)
47
+ **Tradeoffs:** Heavier deps than hyper; less control than raw hyper stack
48
+ **Alternatives considered:** hyper — more control, more boilerplate; ureq dropped (sync-only)
49
+ **Reversibility:** Medium — HTTP client swap touches call sites and middleware
50
+ **Evidence gaps:** (none)
51
+ ```
52
+
53
+ Skill resolution during verify: web-search/brave-search for docs (step 4); opensrc only if user asks about connection pooling internals.
@@ -0,0 +1,46 @@
1
+ # Scope gate (Phase 1)
2
+
3
+ **Load when:** Phase 1 runs — before shortlist or verify. User intent for technology choice is present but track is not yet pinned.
4
+
5
+ **Do NOT load when:** User already committed to holistic vs narrow in chat; skip to shortlist-gate or verify-gate. User only wants internals of a named library — load verify-gate directly.
6
+
7
+ ## Decision tree
8
+
9
+ | Signal | Track | Examples |
10
+ | --------------------------------------------------------------- | ------------------------ | ----------------------------------------------------------------------------- |
11
+ | Multiple moving parts, stack, practice, cross-layer integration | **Holistic** | "Auth for Workers + D1 + frontend", "observability stack", "monorepo tooling" |
12
+ | One category or one library family | **Narrow** | "Rust HTTP client", "Zod vs Valibot", "test runner for this repo" |
13
+ | User named exactly one candidate | **Narrow (verify-only)** | Skip shortlist-gate; verify that candidate + one obvious alternative |
14
+
15
+ Say which track you chose and why in one sentence.
16
+
17
+ ## Holistic checklist
18
+
19
+ Before shortlisting, pin:
20
+
21
+ | Topic | Question |
22
+ | -------------------- | ------------------------------------------------------- |
23
+ | Decision owner | Who lives with this choice in 6 months? |
24
+ | Reversibility | Swap cost — migration, API surface, team skill? |
25
+ | Evidence bar | What would falsify the leading option? |
26
+ | Constraints | Runtime, license, hosting, team language, existing deps |
27
+ | Integration surfaces | Which layers/modules must agree? |
28
+
29
+ Holistic scope → shortlist **per layer or concern**, not one flat list of unrelated libraries.
30
+
31
+ ## Narrow checklist
32
+
33
+ | Topic | Question |
34
+ | ------------------- | ------------------------------------------------------- |
35
+ | Category boundary | What is in / out of scope for this pick? |
36
+ | Must-haves | Hard requirements (license, protocol, size, sync/async) |
37
+ | Nice-to-haves | Tie-breakers only — not gate zero |
38
+ | Default alternative | Name the incumbent or "do nothing" baseline |
39
+
40
+ ## Stop / escalate
41
+
42
+ | Condition | Action |
43
+ | ---------------------------------------------- | ---------------------------------------------------------------------------------------------- |
44
+ | Requirements contradictory | One clarifying question; do not shortlist yet |
45
+ | Pick is product/business not technical | Say so; ask for product constraints before research |
46
+ | Scope spans hotmilk bundled extension manifest | Note `pioneer` bundled-extension pins; hand off after recommendation if implementation follows |
@@ -0,0 +1,69 @@
1
+ # Shortlist gate (Phase 2)
2
+
3
+ **Load when:** Phase 2 runs — scope track is pinned and finalists are not yet chosen.
4
+
5
+ **Do NOT load when:** User supplied a final candidate list (≤5) and asked for verify only. Holistic scope not yet pinned — load scope-gate first.
6
+
7
+ ## Target size
8
+
9
+ | Rule | Detail |
10
+ | ----------- | --------------------------------- |
11
+ | Default cap | **3–5** finalists |
12
+ | Minimum | 2 when a comparison was requested |
13
+ | Widen | Ask user before exceeding 5 |
14
+
15
+ Cut aggressively. Surveys seed options; they do not replace verify.
16
+
17
+ ## Seed sources (fast pass)
18
+
19
+ Use curated surveys and comparisons to seed — then drop weak fits before verify spends tokens.
20
+
21
+ | Source type | Use for |
22
+ | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
23
+ | Official "comparison" / "alternatives" docs | Category leaders |
24
+ | Trusted survey posts (dated) | Breadth — always date-check |
25
+ | Repo README "similar projects" | Maintainer view |
26
+ | Existing project deps / lockfiles | Incumbent and neighbors — names only; use opensrc in verify pass 4 to read/search those deps, not to seed new categories |
27
+
28
+ **Do not** treat seed sources as evidence. They only populate the shortlist.
29
+
30
+ ## Cut criteria (apply before verify)
31
+
32
+ Drop a candidate when **any** hard fail:
33
+
34
+ | Gate | Fail signal |
35
+ | ----------- | ------------------------------------------------------------------- |
36
+ | Maintenance | Archived, no release >18mo, bus factor 1 with no activity |
37
+ | License | Incompatible with stated deployment (GPL in proprietary SaaS, etc.) |
38
+ | Constraint | Violates must-have from scope-gate (runtime, protocol, size) |
39
+ | Fit | Solves adjacent problem, not the asked category |
40
+ | Risk | Unresolved security advisory without fix path |
41
+
42
+ Keep a **dropped** note (one line each) for transparency when user may ask "why not X?".
43
+
44
+ ## Empty shortlist recovery
45
+
46
+ When **every** candidate fails cut criteria:
47
+
48
+ | Step | Action |
49
+ | ---- | ------------------------------------------------------------------------------ |
50
+ | 1 | List hard fails per dropped option (one line each) |
51
+ | 2 | Ask user to relax one must-have, widen category, or accept higher risk tier |
52
+ | 3 | Re-seed with broader survey pass — do not verify until ≥2 finalists remain |
53
+ | 4 | If still empty → stop; no Phase 4 verdict. State constraints vs market reality |
54
+
55
+ ## Thinking before cut
56
+
57
+ Ask internally (or one user question if blocking):
58
+
59
+ - **Reversibility:** Is this a experiment-friendly pick or a multi-year bet?
60
+ - **Evidence bar:** What single fact would eliminate each finalist?
61
+ - **Incumbent:** Is "keep current dep / stdlib / no new dep" on the list?
62
+
63
+ ## Done → Phase 3
64
+
65
+ Shortlist gate is **done** when:
66
+
67
+ 1. 3–5 finalists (or 2 for strict either-or) listed with one-line rationale each
68
+ 2. Dropped notable options summarized if user named them
69
+ 3. Next step declared: verify-gate per finalist
@@ -0,0 +1,73 @@
1
+ # Verify gate (Phase 3)
2
+
3
+ **Load when:** Phase 3 runs — finalists exist and evidence-backed recommendation is next.
4
+
5
+ **Do NOT load when:** Scope not pinned (scope-gate). No finalists yet (shortlist-gate). User only asked for a link or doc lookup with no recommendation — use skill resolution ladder inline.
6
+
7
+ ## Verify ladder (per finalist)
8
+
9
+ Run passes in order. Stop early when **done** criteria pass for the asked question depth.
10
+
11
+ | Pass | Source | Skill / tool | Proves |
12
+ | ---- | -------------------- | --------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
13
+ | 1 | Official docs | fetch / web-search / brave-search | API contract, supported versions, install, license statement |
14
+ | 2 | Changelog / releases | same | Breaking changes, release cadence |
15
+ | 3 | Repository | **`/skill:deepwiki`** or README | Architecture, scope, documented limits |
16
+ | 4 | Source / history | **`/skill:librarian`** or **`/skill:opensrc`** + `rg`/`find` on `$(opensrc path <pkg>)` | Internals, edge cases, performance, "why" — source **search**, not candidate discovery |
17
+ | 5 | Issues / security | librarian / gh / advisory DB | Open blockers, CVE status |
18
+
19
+ **Contract questions** → pass 1–2 often enough. **Internals / performance** → pass 4 required. Do not skip pass 1 because pass 4 is tempting.
20
+
21
+ ## Holistic verify (cross-layer picks)
22
+
23
+ When scope-gate chose **Holistic**, run per-finalist passes **and** this integration table before Phase 4:
24
+
25
+ | Row | Check |
26
+ | ----------------------- | ----------------------------------------------------------- |
27
+ | API compatibility | Shared types, auth tokens, error shapes across layers |
28
+ | Shared auth / identity | One login story; no duplicate secret stores |
29
+ | Deployment coupling | Can layers deploy independently? Single rollback path? |
30
+ | Data / schema alignment | Migrations, IDs, event contracts between components |
31
+ | Ops surface | One observability story; avoid N unrelated agents |
32
+ | Rollback | Partial failure — which layer reverts without orphan state? |
33
+
34
+ Holistic **done** requires at least one integrated stack story (not independent per-layer winners) with citations per layer.
35
+
36
+ ## Per-finalist checklist
37
+
38
+ | Row | Required for production pick |
39
+ | ----------- | ------------------------------------------------------------- |
40
+ | License | SPDX or README license — compatible with stated use |
41
+ | Maintenance | Last release or commit within acceptable window for risk tier |
42
+ | API fit | Maps to must-haves from scope-gate with doc citation |
43
+ | Ops fit | Install size, runtime deps, platform support |
44
+ | Exit path | Migration or wrap cost if pick fails |
45
+
46
+ ## Unavailable source fallbacks
47
+
48
+ | Situation | Fallback |
49
+ | ------------------------------- | --------------------------------------------------------------------- |
50
+ | Docs site down | Cached README, deepwiki, tagged release tree; say source is secondary |
51
+ | Private repo | Only public evidence; flag "cannot verify internals" |
52
+ | Archived project | Recommend against unless user explicitly accepts unmaintained risk |
53
+ | opensrc / librarian unavailable | Official docs + changelog only; widen **Evidence gaps** in verdict |
54
+ | Conflicting blog vs docs | **Docs win** unless source inspection proves blog correct |
55
+
56
+ ## Done criteria (Phase 3 complete)
57
+
58
+ Verify gate is **done** when:
59
+
60
+ 1. Every **finalist** has pass 1 complete; passes 2–5 match question depth
61
+ 2. At least one finalist has clear **pick** support with citations (doc URL or permalink)
62
+ 3. Alternatives have explicit **why not** or tie-breaker
63
+ 4. **Evidence gaps** listed — empty only when passes required for scope are satisfied
64
+
65
+ If done criteria fail, do **not** emit Phase 4 recommendation. State missing evidence and offer next verify step or user waiver.
66
+
67
+ ## Handoff after verify
68
+
69
+ | Next user intent | Skill |
70
+ | --------------------------------- | ------------------------------------- |
71
+ | Implement integration in hotmilk | **`/skill:pioneer`** |
72
+ | Large multi-agent integration bet | **`/skill:tcz-agent-converge`** |
73
+ | Prompt/skill edit from research | **`/prompt-eval <path>`** before ship |
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: update-docs
3
+ description: Sync documentation to code and config — README, CONTRIBUTING, AGENTS.md, CLAUDE.md, docs/, manifests, CI, config templates (e.g. hotmilk.json), and post-merge doc drift. Use for /update-docs, update docs, sync docs, docs drift, stale README, or after changes to commands, defaults, toggles, dependencies, or module layout.
4
+ ---
5
+
6
+ # Update docs
7
+
8
+ Reconcile docs with **code and config as source of truth**. Fix drift; do not rewrite for voice or expand scope.
9
+
10
+ ## Scenario router (read first)
11
+
12
+ | User signal | Route |
13
+ | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
14
+ | "Sync all docs" / post-release / manifest work | **Full** — Phase 0 → 4; read entire [`doc-inventory.md`](references/doc-inventory.md) |
15
+ | Named file only (`README`, one doc file) | **Targeted** — Phase 1–3 on that file + its truth sources from inventory |
16
+ | User just shipped code; docs maybe stale | **Post-ship** — read ONLY **Post-ship triggers** in `doc-inventory.md`; do NOT load `drift-verification.md` until Phase 4 |
17
+ | User wants new docs / rewrite tone | **Stop** — sync fixes truth; ask whether to write new content separately |
18
+
19
+ **References:** Do **not** read `references/` until a phase below requires it. Each reference states load conditions at the top.
20
+
21
+ ## Phase map
22
+
23
+ Skip phases that do not apply. State which phase was skipped and why.
24
+
25
+ ```text
26
+ 0. Scope → doc-inventory.md (Full sync — MANDATORY READ ENTIRE FILE)
27
+ 1. Recon → truth files + target docs (read-only)
28
+ 2. Diff → drift list only (no edits yet)
29
+ 3. Patch → minimal surgical edits (one theme per pass unless user asked batch)
30
+ 4. Verify → drift-verification.md (MANDATORY READ ENTIRE FILE before reporting done)
31
+ ```
32
+
33
+ ## Recon rules (Phase 1)
34
+
35
+ | Rule | Detail |
36
+ | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
37
+ | Truth first | Read listed source-of-truth files before editing any doc |
38
+ | No invention | If truth is silent, report the gap — do not guess commands, paths, or defaults |
39
+ | Truth conflicts | When doc, manifest, and CI disagree: **CI > manifest scripts/targets > source comments**; report the conflict instead of picking silently |
40
+ | Scope | Touch only doc files implicated by the diff; no drive-by style edits |
41
+ | Language | Match each file's existing language and heading style |
42
+
43
+ ## Patch rules (Phase 3)
44
+
45
+ | Do | Do not |
46
+ | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
47
+ | Fix factual drift (commands, paths, defaults, version pins, module layout) | Rewrite unrelated sections for "clarity" |
48
+ | Keep tables and lists aligned when two docs cover the same fact | Duplicate long prose — prefer one canonical section + link |
49
+ | Update config samples when **code** defaults changed | Change runtime defaults in code while "fixing" docs unless user asked |
50
+ | Preserve technical terms and command literals | Translate or rephrase during drift sync unless user asked for localization |
51
+
52
+ ## Output (Phase 4)
53
+
54
+ Emit after the verify checklist passes (or list blockers):
55
+
56
+ ```markdown
57
+ ## Doc sync report
58
+
59
+ **Scope:** full | targeted | post-ship
60
+ **Truth sources read:** …
61
+ **Files patched:** … (or none)
62
+
63
+ ### Drifts fixed
64
+
65
+ - …
66
+
67
+ ### Gaps (no truth — not patched)
68
+
69
+ - …
70
+
71
+ ### Verify
72
+
73
+ - [ ] …
74
+ ```
75
+
76
+ ## Anti-patterns
77
+
78
+ | Do not | Why | Do instead |
79
+ | ------------------------------------------------------------------- | --------------------------------------- | ------------------------------------------------ |
80
+ | Read `references/` without a matching route | Token waste | Router row first |
81
+ | Edit docs before reading truth files | Propagates stale claims | Phase 1 recon |
82
+ | Full README rewrite on a targeted request | Review noise | Named file only |
83
+ | Add a `docs/` tree when the repo has none | Scope creep | Skip; mention only if user wants new docs |
84
+ | "Improve" prose without drift | Style ≠ sync | Diff list must cite a truth mismatch |
85
+ | Skip verify after patch | Drift returns unnoticed | Phase 4 checklist |
86
+ | Copy root manifest commands into every package README in a monorepo | Wrong scope; breaks package-local truth | Root ↔ root manifest; package ↔ package manifest |