hotmilk 0.1.13 → 0.1.15
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.
- package/AGENTS.md +12 -10
- package/README.md +237 -53
- package/agents/README.md +3 -3
- package/agents/assistant.md +1 -1
- package/agents/coach.md +26 -4
- package/agents/designer.md +1 -1
- package/agents/planner.md +2 -2
- package/hotmilk.json +11 -0
- package/package.json +43 -24
- package/prompts/prompt-eval.md +241 -0
- package/prompts/tidy.md +3 -1
- package/prompts/translate.md +3 -1
- package/skills/make-docs/SKILL.md +43 -0
- package/skills/pioneer/SKILL.md +135 -131
- package/skills/pioneer/references/autoresearch-routing.md +114 -0
- package/skills/pioneer/references/chat-plan.md +50 -0
- package/skills/pioneer/references/goal-gate.md +54 -0
- package/skills/pioneer/references/graph-recon-gate.md +50 -0
- package/skills/pioneer/references/observational-memory-routing.md +90 -0
- package/skills/pioneer/references/openspec-routing.md +50 -0
- package/skills/pioneer/references/plannotator-routing.md +83 -0
- package/skills/pioneer/references/prompt-eval-gate.md +38 -0
- package/skills/pioneer/references/shazam-routing.md +58 -0
- package/skills/recommend-research/SKILL.md +94 -6
- package/skills/recommend-research/references/example-narrow.md +53 -0
- package/skills/recommend-research/references/scope-gate.md +46 -0
- package/skills/recommend-research/references/shortlist-gate.md +69 -0
- package/skills/recommend-research/references/verify-gate.md +73 -0
- package/skills/update-docs/SKILL.md +86 -0
- package/skills/update-docs/references/doc-inventory.md +69 -0
- package/skills/update-docs/references/drift-verification.md +59 -0
- package/src/bootstrap/btw.ts +49 -0
- package/src/bootstrap/context-stack.ts +71 -14
- package/src/bootstrap/dashboard-settings.ts +16 -2
- package/src/bootstrap/dashboard.ts +85 -10
- package/src/bootstrap/defaults.ts +26 -0
- package/src/bootstrap/extensions.ts +10 -1
- package/src/bootstrap/global-extension-sources.ts +43 -4
- package/src/bootstrap/graph.ts +12 -0
- package/src/bootstrap/project-trust.ts +55 -0
- package/src/bootstrap/resolve-bundled.ts +28 -4
- package/src/bootstrap/session.ts +61 -1
- package/src/bootstrap/subagents-doctor.ts +12 -0
- package/src/config/bundled-extensions.ts +42 -0
- package/src/config/bundled-package-registry.ts +3 -0
- package/src/config/hotmilk.ts +76 -1
- package/src/config/mcp.ts +45 -12
- package/src/config/resolve.ts +21 -0
- package/src/config/runtime.ts +6 -0
- package/src/controller/input.ts +15 -0
- package/src/controller/mode.ts +32 -0
- package/src/index.ts +5 -0
- package/src/ui/footer.ts +63 -1
- package/src/ui/github-user.ts +52 -4
- package/src/ui/session-logo.ts +31 -3
- package/themes/monokai.json +1 -1
- package/skills/empirical-prompt-tuning/SKILL.md +0 -232
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Observational memory (compaction continuity)
|
|
2
|
+
|
|
3
|
+
**Load when:** the session is **long**, compactions are frequent, and you need **why** decisions were made to survive summarization — not when you need a user-visible plan file or spec artifact.
|
|
4
|
+
|
|
5
|
+
**Do NOT load when:** planning-with-files, Plannotator, or OpenSpec SDD is the chosen plan authority — OM is **background session memory**, not plan truth.
|
|
6
|
+
|
|
7
|
+
**Canonical matrix:** [README § Workflow routing](../../../README.md#workflow-routing) (user-facing); this file is agent routing detail.
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
| Signal | Route here |
|
|
12
|
+
| ----------------------------------------------------------------------- | ----------------------------------------------------------------- |
|
|
13
|
+
| Multi-day refactor, deep debug, architecture exploration, migration arc | `extensions.observational-memory: true` after `/mode` + `/reload` |
|
|
14
|
+
| User asks why context was lost after compaction / “session feels reset” | Enable OM; start a **clean session** after V3 upgrade |
|
|
15
|
+
| Large tool output already handled by context-mode | Keep **context-mode on**; add OM only for **decision rationale** |
|
|
16
|
+
| User wants explicit on-disk plan + `/clear` recovery | **planning-with-files** — OM does not replace `task_plan.md` |
|
|
17
|
+
| Human plan approval before writes | **Plannotator** — OM is not an approval gate |
|
|
18
|
+
| Cross-cutting feature with proposal/spec/design | **OpenSpec SDD** — artifacts are contract; OM is supplementary |
|
|
19
|
+
|
|
20
|
+
**Tie-breaker vs other memory layers:** corpus search / huge outputs → **context-mode** (`ctx_*`); readable plan files → **planning-with-files**; compaction-injected session rationale → **observational-memory**.
|
|
21
|
+
|
|
22
|
+
## 向く / 向かない (suited vs not suited)
|
|
23
|
+
|
|
24
|
+
Inspired by [Armin Ronacher — _The Coming Loop_](https://lucumr.pocoo.org/2026/6/23/the-coming-loop/) (2026-06-23): loops and compactions help when progress is measurable; they hurt when judgment and durable contracts are outsourced.
|
|
25
|
+
|
|
26
|
+
| 向く (use observational-memory) | Why | 向かない (use another path) | Why |
|
|
27
|
+
| ----------------------------------------------------------- | ------------------------------------------------- | ------------------------------------------- | ----------------------------------------------------- |
|
|
28
|
+
| Long session with repeated compactions | Observations + reflections inject before summary | One-shot small fix | Overhead; Chat Plan + `verify:` is enough |
|
|
29
|
+
| Preserve **why** a design choice was made across days | Durable reflections distill rationale | User-visible plan checklist | Use **Plannotator** or **planning-with-files** |
|
|
30
|
+
| Deep debugging with rejected hypotheses to avoid reopening | Observation timeline grounds the agent | Feature spec / acceptance criteria | Use **OpenSpec SDD** |
|
|
31
|
+
| Pair with **pi-goal** for multi-turn arcs | OM captures tactical “why”; goal holds north-star | Same task also needs SDD proposal/spec | SDD artifacts are authority; OM is supplementary only |
|
|
32
|
+
| Faster compaction (memory work incremental) | Upstream design goal for V3 | `/clear` full session recovery | Use **planning-with-files** on-disk files |
|
|
33
|
+
| Engineer wants `recall` to trace observation/reflection IDs | Auditable session memory | Replace **context-mode** FTS5 for logs/docs | Different layer — use **ctx_search** / **ctx_index** |
|
|
34
|
+
|
|
35
|
+
**Harness takeaway:** OM is **implicit session memory**. Return human judgment via plan paths (Plannotator / SDD) and PR review — do not treat reflections as spec or hidden plan authority.
|
|
36
|
+
|
|
37
|
+
## Prerequisites
|
|
38
|
+
|
|
39
|
+
| Requirement | Check |
|
|
40
|
+
| ----------- | ------------------------------------------------------------------------------------------------------------- |
|
|
41
|
+
| Toggle | `extensions.observational-memory: true` — if off, say compaction memory unavailable; do not fake `recall` |
|
|
42
|
+
| Extension | `pi-observational-memory` loaded via `/reload` after `/mode` |
|
|
43
|
+
| Pi version | Targets Pi **0.74+** peers; hotmilk ships **0.80** |
|
|
44
|
+
| V3 upgrade | V3 does **not** read V2 settings or memory — new clean session after upgrade |
|
|
45
|
+
| Model cost | Observer/reflector agents may call a separate model — configure in extension settings; default off in hotmilk |
|
|
46
|
+
|
|
47
|
+
## Coexistence matrix
|
|
48
|
+
|
|
49
|
+
| Layer | Tool / path | Relationship to OM |
|
|
50
|
+
| -------------------------- | -------------------------------------- | ------------------------------------------------------------- |
|
|
51
|
+
| Large output / corpus | **context-mode** (`ctx_*`) | Complementary — OM ≠ indexed corpus |
|
|
52
|
+
| Shell output compaction | **rtk-optimizer** + context-mode | Complementary — orthogonal to session observations |
|
|
53
|
+
| Codebase map | **graphify** | Run Phase 0 recon; OM does not replace `graphify-out/` |
|
|
54
|
+
| Session objective | **pi-goal** | Goal = north-star; OM = tactical rationale |
|
|
55
|
+
| Plan authority | PWF / Plannotator / SDD | **One plan truth** — OM must not contradict chosen plan files |
|
|
56
|
+
| Persistent external memory | Engram / other packages (if installed) | Separate product — hotmilk does not bundle Engram by default |
|
|
57
|
+
|
|
58
|
+
**Recommended stack (long coding session):** `context-mode: true` + `graphify` Phase 0 + optional `observational-memory: true` + one plan path when scope grows past chat.
|
|
59
|
+
|
|
60
|
+
## Workflow
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
1. Confirm session will span compactions (not a one-file typo)
|
|
64
|
+
2. /mode → observational-memory ON → /reload
|
|
65
|
+
3. Work normally — observer/reflector run in background
|
|
66
|
+
4. On compaction, injected memory preserves decisions and rejected paths
|
|
67
|
+
5. Use recall tool when you need observation/reflection provenance
|
|
68
|
+
6. When scope needs spec or approval → pick plan path; do not let OM replace it
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Anti-patterns
|
|
72
|
+
|
|
73
|
+
| Do not | Why | Do instead |
|
|
74
|
+
| --------------------------------------------------- | --------------------------------------- | ------------------------------------------------- |
|
|
75
|
+
| Treat reflections as OpenSpec / SDD substitute | Hidden memory ≠ reviewable contract | SDD artifacts + optional OM |
|
|
76
|
+
| OM + planning-with-files on same markdown plan file | Two writers on one “truth” | PWF files vs OM session store — separate concerns |
|
|
77
|
+
| Default ON for all users | Extra model cost; V3 migration friction | hotmilk default **off**; enable for long sessions |
|
|
78
|
+
| Skip clean session after V2 → V3 | Format mismatch; stale memory | New session per upstream README |
|
|
79
|
+
| Disable context-mode and expect OM to index logs | Wrong layer | `ctx_index` / `ctx_search` for corpus |
|
|
80
|
+
|
|
81
|
+
## Fallback when toggle off
|
|
82
|
+
|
|
83
|
+
Say observational memory is unavailable. For compaction loss:
|
|
84
|
+
|
|
85
|
+
- Enable toggle and `/reload`, **or**
|
|
86
|
+
- Use **planning-with-files** for durable files, **or**
|
|
87
|
+
- Use **context-mode** to index key docs/logs, **or**
|
|
88
|
+
- Narrow scope to Chat Plan with explicit `verify:` checkpoints.
|
|
89
|
+
|
|
90
|
+
Upstream: [elpapi42/pi-observational-memory](https://github.com/elpapi42/pi-observational-memory) · npm `pi-observational-memory@3.x`
|
|
@@ -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,83 @@
|
|
|
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
|
+
**Canonical matrix:** [README § Workflow routing](../../../README.md#workflow-routing).
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
| Signal | Route here |
|
|
12
|
+
| ---------------------------------------------------------------------- | --------------------------- |
|
|
13
|
+
| Medium scope, bounded checklist, human must approve plan before writes | Plannotator |
|
|
14
|
+
| User asks for plan review in browser, `/plannotator`, or `--plan` | Plannotator |
|
|
15
|
+
| Gray zone where approval matters more than spec artifacts | Plannotator over Chat Plan |
|
|
16
|
+
| Cross-cutting, >400 changed lines, proposal/spec needed | OpenSpec instead |
|
|
17
|
+
| Heavy research, `/clear` recovery, findings/progress split | planning-with-files instead |
|
|
18
|
+
|
|
19
|
+
**Tie-breaker vs OpenSpec:** approval is the primary goal → Plannotator; spec/design/tasks contract is the primary goal → OpenSpec.
|
|
20
|
+
|
|
21
|
+
## Prerequisites
|
|
22
|
+
|
|
23
|
+
| Requirement | Check |
|
|
24
|
+
| ------------------- | ----------------------------------------------------------------------------------------------- |
|
|
25
|
+
| Toggle | `extensions.plannotator: true` — if off, fall back to Chat Plan or OpenSpec per pioneer routing |
|
|
26
|
+
| Extension | `@plannotator/pi-extension` loaded via `/reload` after `/mode` |
|
|
27
|
+
| Graph (recommended) | Phase 0 graph recon before planning — read `graphify-out/GRAPH_REPORT.md` when present |
|
|
28
|
+
|
|
29
|
+
## Workflow
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
1. Phase 0 graph recon (when non-trivial)
|
|
33
|
+
2. Optional /goal alignment
|
|
34
|
+
3. /plannotator plans/<name>.md OR --plan plans/<name>.md
|
|
35
|
+
4. Agent writes plan + checklist in planning phase (plan file only)
|
|
36
|
+
5. plannotator_submit_plan → browser Approve / Deny / Approve with notes
|
|
37
|
+
6. executing phase → gentle-ai Work Routing Ladder; mark [DONE:n] per item
|
|
38
|
+
7. Optional plannotator-review on diff before ship
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Artifact rules
|
|
42
|
+
|
|
43
|
+
| Artifact | Owner |
|
|
44
|
+
| -------------------------------------------- | -------------------------------------------------------------------------- |
|
|
45
|
+
| `plans/*.md` | Plannotator (single plan authority) |
|
|
46
|
+
| `task_plan.md`, `findings.md`, `progress.md` | planning-with-files — **do not share** with Plannotator plan path |
|
|
47
|
+
| `openspec/changes/<change>/` | OpenSpec — Plannotator may gate **after tasks**, not replace SDD artifacts |
|
|
48
|
+
|
|
49
|
+
Link across layers in prose only (`See findings.md §3`) — do not make two files the same plan authority.
|
|
50
|
+
|
|
51
|
+
## Execute (Phase 4)
|
|
52
|
+
|
|
53
|
+
After browser approval, load **`/skill:gentle-ai`** and follow its Work Routing Ladder.
|
|
54
|
+
|
|
55
|
+
- `extensions.subagents: false` → inline execute; say delegation skipped
|
|
56
|
+
- `extensions.gentle-ai: false` → inline execute after approval; no SDD mid-flow
|
|
57
|
+
|
|
58
|
+
**Verify:** per-step checks in plan + **`AGENTS.md`** (`bun test`, `bun run check`).
|
|
59
|
+
|
|
60
|
+
## SDD combination (optional)
|
|
61
|
+
|
|
62
|
+
When OpenSpec tasks are complete and human approval is still required:
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
sdd-tasks done → emit plan-review (tasks summary) → Plannotator approve → sdd-apply
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
SDD artifacts remain authoritative; Plannotator is the execution gate only.
|
|
69
|
+
|
|
70
|
+
## Fallback when Plannotator is off
|
|
71
|
+
|
|
72
|
+
- Say **"Plannotator skipped: extension off"**
|
|
73
|
+
- Re-route: approval needed → Chat Plan with explicit user OK in chat; spec needed → OpenSpec
|
|
74
|
+
- Do not invoke `/plannotator`, `plannotator_submit_plan`, or `--plan` mode
|
|
75
|
+
|
|
76
|
+
## Anti-patterns
|
|
77
|
+
|
|
78
|
+
| Do not | Do instead |
|
|
79
|
+
| --------------------------------------------------------- | -------------------------------------------------- |
|
|
80
|
+
| Start Plannotator mid-active SDD as second plan authority | Finish or pause SDD; use plan-review on tasks only |
|
|
81
|
+
| Share `task_plan.md` with Plannotator | Separate paths: `.planning/` vs `plans/` |
|
|
82
|
+
| Chat Plan then switch to Plannotator same task | Pick one plan path at Phase 3 |
|
|
83
|
+
| 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)
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Shazam routing (execute-time structure)
|
|
2
|
+
|
|
3
|
+
**Load when:** `extensions.shazam: true`, editing shared modules, or user asks for impact analysis / post-edit LSP verify.
|
|
4
|
+
**Do not load when:** Phase 0 graph recon only, plan routing, or `extensions.shazam: false`.
|
|
5
|
+
|
|
6
|
+
Canonical user doc: [README § Workflow routing](../../../README.md#workflow-routing).
|
|
7
|
+
|
|
8
|
+
## Role (not graph-wiki)
|
|
9
|
+
|
|
10
|
+
| Layer | Tool | When |
|
|
11
|
+
| ----------------- | -------------------------- | -------------------------------------------------------------- |
|
|
12
|
+
| **Recon map** | graphify (`graphify-out/`) | Phase 0 — persistent architecture, cross-module queries |
|
|
13
|
+
| **Execute guard** | pi-shazam (`shazam_*`) | Phase 4 — impact before edit, verify after edit, symbol lookup |
|
|
14
|
+
| **Corpus / logs** | context-mode (`ctx_*`) | Large outputs — not code structure |
|
|
15
|
+
| **TDD loop** | pi-red-green (`/tdd`) | Test-first workflow — pairs with `shazam_verify` after edits |
|
|
16
|
+
|
|
17
|
+
**Do not treat shazam as graphify replacement.** graphify answers "how does the system relate?"; shazam answers "what breaks if I change this symbol?" and "did LSP pass after the edit?".
|
|
18
|
+
|
|
19
|
+
## Coexistence matrix
|
|
20
|
+
|
|
21
|
+
| Pair | Relationship |
|
|
22
|
+
| ------------------------------- | ----------------------------------------------------------------------------------------- |
|
|
23
|
+
| graphify + shazam | **Recommended** — graphify recon first; shazam during execute |
|
|
24
|
+
| shazam + red-green | **Complementary** — TDD drives tests; `shazam_verify` catches type/lint/format |
|
|
25
|
+
| shazam + context-mode | **Non-conflicting** — different tool channels |
|
|
26
|
+
| shazam + pi-lens (if installed) | **Overlap** on LSP/lint — pick one primary verify path per task |
|
|
27
|
+
| shazam MCP + Pi extension | **Pick one** — bundled path is Pi extension; do not duplicate MCP server for same session |
|
|
28
|
+
|
|
29
|
+
## Pioneer phase map
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
Phase 0 → graphify (GRAPH_REPORT.md / graph query)
|
|
33
|
+
Phase 4 → before shared-module edit: shazam_impact
|
|
34
|
+
after edit: shazam_verify (+ bun test per AGENTS.md)
|
|
35
|
+
optional: shazam_changes when reviewing git diff risk
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Skip shazam when the task is docs-only, config-only with no LSP, or a one-line typo with no blast radius.
|
|
39
|
+
|
|
40
|
+
## Prerequisites
|
|
41
|
+
|
|
42
|
+
- **LSP servers** for the language (e.g. `typescript-language-server`, `pyright`, `gopls`) — verify quality depends on them.
|
|
43
|
+
- **Windows:** upstream notes tree-sitter native limits — document in README; default off on Windows if unsupported.
|
|
44
|
+
- **Session start hook:** shazam may inject overview into system prompt — large repos can add latency; keep toggle off when not needed.
|
|
45
|
+
|
|
46
|
+
## Anti-patterns
|
|
47
|
+
|
|
48
|
+
| Do not | Why | Do instead |
|
|
49
|
+
| ---------------------------------------------------------------- | ---------------------------------------------- | ------------------------------------ |
|
|
50
|
+
| `shazam_overview` instead of graphify for architecture questions | No persistent graph; misses cross-session wiki | Phase 0 graphify |
|
|
51
|
+
| Skip `shazam_impact` before wide refactor | Hidden blast radius | impact → edit → verify |
|
|
52
|
+
| Trust `shazam_verify` PASS without tests | LSP green ≠ behavior correct | tests + verify |
|
|
53
|
+
| graphify query + shazam lookup for same question in one turn | Token waste | Pick the layer that fits |
|
|
54
|
+
| Enable shazam MCP and bundled extension together | Duplicate tools | Pi extension via hotmilk toggle only |
|
|
55
|
+
|
|
56
|
+
## Fallback when toggle off
|
|
57
|
+
|
|
58
|
+
Say shazam unavailable. Use graphify for structure, `read`/`grep` for local symbols, and project test/lint commands in `verify:`.
|
|
@@ -1,13 +1,101 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: recommend-research
|
|
3
|
-
description:
|
|
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
|
-
|
|
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
|
-
|
|
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
|