@mccune1224/pi-pstack 0.1.0 → 0.2.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.
- package/README.md +52 -100
- package/agents/comment-sicko.md +1 -1
- package/agents/poteto-agent.md +2 -2
- package/docs/compare.md +122 -0
- package/docs/guide/01-setup.md +37 -12
- package/docs/guide/02-poteto-mode.md +1 -1
- package/docs/guide/03-understand.md +0 -8
- package/docs/guide/05-build-and-clean.md +1 -1
- package/docs/guide/06-verify-and-ship.md +1 -1
- package/docs/guide/07-overnight.md +2 -2
- package/docs/guide/08-principles.md +4 -2
- package/docs/guide/10-recipes-and-pitfalls.md +2 -2
- package/docs/guide/README.md +2 -2
- package/extensions/compaction.test.ts +132 -0
- package/extensions/compaction.ts +183 -0
- package/extensions/context-guard.test.ts +53 -0
- package/extensions/context-guard.ts +65 -0
- package/extensions/doctor.test.ts +85 -0
- package/extensions/doctor.ts +100 -0
- package/extensions/index.ts +289 -26
- package/extensions/settings.test.ts +71 -16
- package/extensions/settings.ts +57 -9
- package/extensions/skill-budget.test.ts +110 -0
- package/extensions/skill-budget.ts +101 -0
- package/package.json +9 -4
- package/scripts/check-pi-isms.mjs +106 -0
- package/scripts/lib/pi-delta-rules.mjs +110 -0
- package/scripts/lib/pi-delta-rules.test.mjs +100 -0
- package/scripts/lib/upstream-vendor.mjs +32 -0
- package/scripts/pi-deltas.json +754 -0
- package/scripts/sync-upstream.mjs +117 -0
- package/scripts/verify-guards.mjs +132 -0
- package/scripts/verify-sync.mjs +206 -0
- package/skills/architect/SKILL.md +10 -10
- package/skills/architect/references/rationale-template.md +2 -2
- package/skills/architect/references/runner-prompt.md +7 -7
- package/skills/arena/SKILL.md +11 -11
- package/skills/automate-me/SKILL.md +21 -26
- package/skills/blast-radius/SKILL.md +5 -5
- package/skills/create-verification-skill/SKILL.md +5 -5
- package/skills/figure-it-out/SKILL.md +11 -13
- package/skills/how/SKILL.md +30 -104
- package/skills/how/references/explainer-prompt.md +6 -6
- package/skills/how/references/explorer-prompt.md +1 -1
- package/skills/interrogate/SKILL.md +13 -14
- package/skills/interrogate/references/code-quality-review.md +1 -1
- package/skills/interrogate/references/lead-judgment.md +1 -1
- package/skills/interrogate/references/rubric.md +2 -2
- package/skills/maintain-verification-skill/SKILL.md +5 -5
- package/skills/no-comments/SKILL.md +3 -3
- package/skills/poteto-mode/SKILL.md +9 -8
- package/skills/poteto-mode/playbooks/authoring-a-skill.md +4 -4
- package/skills/poteto-mode/playbooks/autonomous-run.md +4 -4
- package/skills/poteto-mode/playbooks/autopilot-full.md +9 -9
- package/skills/poteto-mode/playbooks/autopilot-stack.md +8 -8
- package/skills/poteto-mode/playbooks/babysit.md +17 -17
- package/skills/poteto-mode/playbooks/bug-fix.md +6 -6
- package/skills/poteto-mode/playbooks/eval.md +6 -8
- package/skills/poteto-mode/playbooks/feature.md +7 -7
- package/skills/poteto-mode/playbooks/hillclimb.md +10 -10
- package/skills/poteto-mode/playbooks/investigation.md +3 -3
- package/skills/poteto-mode/playbooks/multi-phase-plan.md +26 -25
- package/skills/poteto-mode/playbooks/opening-a-pr.md +17 -13
- package/skills/poteto-mode/playbooks/orchestrate.md +37 -39
- package/skills/poteto-mode/playbooks/pause-safely.md +4 -4
- package/skills/poteto-mode/playbooks/perf-issue.md +9 -9
- package/skills/poteto-mode/playbooks/prototype.md +5 -5
- package/skills/poteto-mode/playbooks/refactoring.md +9 -9
- package/skills/poteto-mode/playbooks/runtime-forensics.md +3 -3
- package/skills/poteto-mode/playbooks/session-pickup.md +4 -6
- package/skills/poteto-mode/playbooks/shipping.md +11 -14
- package/skills/poteto-mode/playbooks/trace-forensics.md +4 -4
- package/skills/poteto-mode/playbooks/visual-parity.md +3 -3
- package/skills/poteto-mode/playbooks/worktree-cleanup.md +4 -4
- package/skills/poteto-mode/references/bugbot-triage.md +3 -3
- package/skills/poteto-mode/scripts/worktree-audit.mjs +0 -7
- package/skills/principle-attack-the-premise/SKILL.md +23 -0
- package/skills/principle-boundary-discipline/SKILL.md +2 -2
- package/skills/principle-build-the-lever/SKILL.md +5 -5
- package/skills/principle-encode-lessons-in-structure/SKILL.md +3 -3
- package/skills/principle-experience-first/SKILL.md +5 -5
- package/skills/principle-fix-root-causes/SKILL.md +4 -4
- package/skills/principle-foundational-thinking/SKILL.md +3 -3
- package/skills/principle-guard-the-context-window/SKILL.md +2 -2
- package/skills/principle-laziness-protocol/SKILL.md +2 -2
- package/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +1 -1
- package/skills/principle-minimize-reader-load/SKILL.md +2 -2
- package/skills/principle-model-the-domain/SKILL.md +3 -3
- package/skills/principle-never-block-on-the-human/SKILL.md +4 -5
- package/skills/principle-prove-it-works/SKILL.md +3 -3
- package/skills/principle-redesign-from-first-principles/SKILL.md +3 -3
- package/skills/principle-separate-before-serializing-shared-state/SKILL.md +3 -3
- package/skills/principle-sequence-verifiable-units/SKILL.md +3 -3
- package/skills/principle-subtract-before-you-add/SKILL.md +3 -4
- package/skills/principle-test-behavior-not-implementation/SKILL.md +25 -0
- package/skills/principle-type-system-discipline/SKILL.md +5 -5
- package/skills/recall/SKILL.md +7 -7
- package/skills/reflect/SKILL.md +14 -20
- package/skills/reflect/references/divergent-reviewer.md +3 -3
- package/skills/reflect/references/judgment-reviewer.md +3 -3
- package/skills/reflect/references/synthesizer.md +2 -2
- package/skills/reflect/references/tooling-reviewer.md +4 -6
- package/skills/setup-pstack/SKILL.md +61 -49
- package/skills/show-me-your-work/SKILL.md +17 -17
- package/skills/show-me-your-work/scripts/log.mjs +2 -8
- package/skills/swarm/SKILL.md +6 -6
- package/skills/tdd/SKILL.md +2 -2
- package/skills/teach/SKILL.md +7 -7
- package/skills/technical-writing/SKILL.md +5 -8
- package/skills/typescript-best-practices/SKILL.md +6 -3
- package/skills/typescript-best-practices/references/patterns.md +35 -14
- package/skills/unslop/SKILL.md +8 -20
- package/skills/why/SKILL.md +27 -100
- package/skills/why/references/epistemics.md +6 -6
- package/skills/why/references/investigator-prompt.md +5 -5
- package/skills/why/references/source-playbook.md +1 -1
- package/skills/why/references/sources/databricks.md +7 -7
- package/skills/why/references/sources/datadog.md +5 -5
- package/skills/why/references/sources/incident-postmortem.md +2 -2
- package/skills/why/references/sources/linear.md +2 -2
- package/skills/why/references/sources/notion.md +3 -3
- package/skills/why/references/sources/sentry.md +4 -4
- package/skills/why/references/sources/slack.md +2 -2
- package/skills/why/references/synthesizer-prompt.md +3 -3
- package/skills/how/references/critic-prompt.md +0 -59
- package/skills/how/references/critique-rubric.md +0 -58
|
@@ -8,51 +8,51 @@ disable-model-invocation: true
|
|
|
8
8
|
|
|
9
9
|
A guided flow for turning the user's working conventions into a skill agents will follow. The output is one `-mode` skill tailored to them (e.g. `jay-mode`, `priya-mode`).
|
|
10
10
|
|
|
11
|
-
This skill orchestrates three others: an inline mining pass (see step 1), the `create-skill` skill (authoring
|
|
11
|
+
This skill orchestrates three others: an inline mining pass (see step 1), the bundled `create-skill` skill (authoring), and the **unslop** skill (prose discipline). It sequences them. It doesn't replace them.
|
|
12
12
|
|
|
13
13
|
## Flow
|
|
14
14
|
|
|
15
15
|
### 0. Check for an existing skill
|
|
16
16
|
|
|
17
|
-
Look recursively for
|
|
17
|
+
Look recursively for `.pi/skills/**/*-mode/SKILL.md` and `~/.pi/skills/*-mode/SKILL.md` matching the user's handle. Mode skills can live in a personal category directory (`.pi/skills/<handle>/`), not only at the top level. If one exists, confirm intent with `ask_user_question` (unless they already said "update my skill" or similar):
|
|
18
18
|
|
|
19
19
|
- Update the existing skill (default for repeat runs)
|
|
20
|
-
- Start fresh (rare
|
|
20
|
+
- Start fresh (rare, ask why before doing it)
|
|
21
21
|
|
|
22
22
|
Update mode changes the rest of the flow:
|
|
23
23
|
- Step 1 mines only history since the skill was last edited (`git log -1 --format=%cI <path>`).
|
|
24
24
|
- Step 2 asks what's changed or missing, not what to capture from zero.
|
|
25
|
-
- Step 4 edits the existing file in place. Preserve sections the user hasn't contradicted
|
|
25
|
+
- Step 4 edits the existing file in place. Preserve sections the user hasn't contradicted. Revise ones with new evidence. Add new sections only for genuinely new rules.
|
|
26
26
|
|
|
27
27
|
### 1. Mine their history
|
|
28
28
|
|
|
29
|
-
Locate the active
|
|
29
|
+
Locate the active working directory's transcripts before fanning out. Pi stores them under `~/.pi/agent/sessions/--<cwd-with-slashes-as-dashes>--/`. Use only that subdir. Don't glob across other working-directory session subdirs, that reads private sessions from unrelated projects.
|
|
30
30
|
|
|
31
31
|
Survey recent agent conversations within that scope for recurring patterns. Run multiple parallel subagents across slices of history (e.g. last 2-4 weeks, split into 3 slices so each has enough material). Each slice mining subagent reads transcripts from the workspace-scoped path the parent provides, looks for the signals below, and returns a short structured list of patterns it saw with evidence pointers. Default signals worth hunting:
|
|
32
32
|
|
|
33
33
|
- Response preferences (length, tone, format, "dumb it down" corrections)
|
|
34
34
|
- Delegation habits (subagents, models, specialized workflows, parallelism)
|
|
35
|
-
- Verification posture (what "done" means
|
|
35
|
+
- Verification posture (what "done" means, unit tests vs live repro, reviewers)
|
|
36
36
|
- Code and prose discipline (style, principles cited, lint/format tools)
|
|
37
37
|
- Process conventions (worktrees, commits, PRs, review/merge tooling)
|
|
38
38
|
- Meta preferences (fixing skills mid-task, proposing new ones)
|
|
39
39
|
|
|
40
|
-
Cross-check across slices before elevating a signal. Patterns seen in 2+ slices are high-confidence
|
|
40
|
+
Cross-check across slices before elevating a signal. Patterns seen in 2+ slices are high-confidence. Lone signals are weak and usually get dropped.
|
|
41
41
|
|
|
42
42
|
### 2. Ask the user directly
|
|
43
43
|
|
|
44
|
-
Mining misses intent that hasn't come up yet. Use the `ask_user_question` tool (structured multi-choice) rather than asking the user to type from scratch.
|
|
44
|
+
Mining misses intent that hasn't come up yet. Use the `ask_user_question` tool (structured multi-choice) rather than asking the user to type from scratch.
|
|
45
45
|
|
|
46
46
|
Shape: one or two questions with 4-6 options each, `allow_multiple: true` for category questions. Start broad ("Which areas matter most?"), then follow up on selected areas with specific options. After the structured rounds, one free-form chat question catches anything the options missed.
|
|
47
47
|
|
|
48
|
-
Don't dump 20 questions.
|
|
48
|
+
Don't dump 20 questions.
|
|
49
49
|
|
|
50
50
|
### 3. Cluster findings
|
|
51
51
|
|
|
52
52
|
Group the combined signals into sections. Common ones (use only what applies):
|
|
53
53
|
|
|
54
54
|
- **Response style**: length, tone, format.
|
|
55
|
-
- **Autonomy**: how much to do without asking
|
|
55
|
+
- **Autonomy**: how much to do without asking, MCP tool use.
|
|
56
56
|
- **Understand first**: which skills to reach for when scoping or investigating a change.
|
|
57
57
|
- **Subagents**: default, parallelism, model-to-task, specialized workflows.
|
|
58
58
|
- **Prose / code discipline**: principles, lint tools, style guides.
|
|
@@ -60,27 +60,27 @@ Group the combined signals into sections. Common ones (use only what applies):
|
|
|
60
60
|
- **Process**: git worktrees, commits, PRs, review/merge tooling.
|
|
61
61
|
- **Skills**: skill-authoring habits, fix-the-skill-first, proposing new skills.
|
|
62
62
|
|
|
63
|
-
The **poteto-mode** skill shows the shape. Read it for granularity. Don't copy its content
|
|
63
|
+
The **poteto-mode** skill shows the shape. Read it for granularity. Don't copy its content. The user's rules are not the same as poteto-mode's.
|
|
64
64
|
|
|
65
65
|
### 4. Draft the skill
|
|
66
66
|
|
|
67
|
-
Use the `create-skill` skill
|
|
67
|
+
Use the bundled `create-skill` skill to author the skill. Placement:
|
|
68
68
|
|
|
69
|
-
- Path: preserve an existing mode skill's category. For a new mode, use
|
|
69
|
+
- Path: preserve an existing mode skill's category. For a new mode, use `.pi/skills/<handle>/<handle>-mode/SKILL.md` when the repo has an established personal category for that handle. Otherwise default to `.pi/skills/<handle>-mode/SKILL.md` in the project (or `~/.pi/skills/<handle>-mode/` if the user prefers a personal skill).
|
|
70
70
|
- Handle: the user's first name or chosen identifier.
|
|
71
71
|
- Frontmatter `description`: trigger on their name + `/<handle>-mode` + "work in their style", not on generic keywords like "write code" or "review PR".
|
|
72
|
-
- Frontmatter formatting: follow `create-skill`'s YAML rules. Keep `description` as one YAML scalar
|
|
73
|
-
- Frontmatter `disable-model-invocation: true` by default.
|
|
72
|
+
- Frontmatter formatting: follow `create-skill`'s YAML rules. Keep `description` as one YAML scalar. Quote it or use `description: >-` with indented continuation lines when punctuation or wrapping requires it.
|
|
73
|
+
- Frontmatter `disable-model-invocation: true` by default. Opt out only if the user explicitly wants their mode to apply on every turn.
|
|
74
74
|
|
|
75
75
|
### 5. Iterate on prose
|
|
76
76
|
|
|
77
|
-
Apply the **unslop** skill and `create-skill`'s writing guidelines to every line.
|
|
77
|
+
Apply the **unslop** skill and `create-skill`'s writing guidelines to every line.
|
|
78
78
|
|
|
79
|
-
Show the draft to the user and take feedback. Expect multiple iterations. Cut ruthlessly
|
|
79
|
+
Show the draft to the user and take feedback. Expect multiple iterations. Cut ruthlessly. A mode skill is not a manual.
|
|
80
80
|
|
|
81
81
|
### 6. Land it
|
|
82
82
|
|
|
83
|
-
Work in a worktree off main. Commit and open a PR
|
|
83
|
+
Work in a worktree off main. Commit and open a PR. Don't push to main directly.
|
|
84
84
|
|
|
85
85
|
## Guardrails
|
|
86
86
|
|
|
@@ -88,8 +88,8 @@ Work in a worktree off main. Commit and open a PR so the user can review it. Don
|
|
|
88
88
|
- **Don't be clever.** Restating other skills' contents, inventing metaphors, or writing "poetic" prose for an agent reader is cost without benefit. Keep it operational.
|
|
89
89
|
- **Reference, don't inline.** Other skills the user relies on should appear as path references, not pasted excerpts. Same for any principle docs they maintain elsewhere.
|
|
90
90
|
- **Keep sections minimal.** Only add a section if the user has a specific, non-default rule there. "Communicate clearly" is not a section. "Short paragraphs. Tables when comparing options. Bullets only when items are genuinely parallel." is.
|
|
91
|
-
- **Name conventions generic.** Use "the user" or "the human" in imperatives, not the author's first name.
|
|
92
|
-
- **Don't force symmetry.** If a user has no process rules worth writing down, skip the Process section entirely.
|
|
91
|
+
- **Name conventions generic.** Use "the user" or "the human" in imperatives, not the author's first name.
|
|
92
|
+
- **Don't force symmetry.** If a user has no process rules worth writing down, skip the Process section entirely.
|
|
93
93
|
|
|
94
94
|
## Evaluation
|
|
95
95
|
|
|
@@ -100,10 +100,5 @@ Run a description-optimization loop only if the skill's trigger accuracy turns o
|
|
|
100
100
|
## When not to use
|
|
101
101
|
|
|
102
102
|
- User wants a task-specific skill (not working conventions): `create-skill` alone, no mining required.
|
|
103
|
-
- User wants to capture one narrow workflow (e.g. "how I write commit messages")
|
|
103
|
+
- User wants to capture one narrow workflow (e.g. "how I write commit messages"). That's a regular skill, not a mode skill.
|
|
104
104
|
|
|
105
|
-
## Reference files
|
|
106
|
-
|
|
107
|
-
- The **poteto-mode** skill: example of the output shape.
|
|
108
|
-
- The **unslop** skill: prose discipline for every line.
|
|
109
|
-
- The `create-skill` skill (ships with this plugin): skill authoring process and writing guidelines.
|
|
@@ -14,7 +14,7 @@ Listing the callers is not the job. The agent can grep those in a second. The jo
|
|
|
14
14
|
|
|
15
15
|
## Don't trust your own writeup
|
|
16
16
|
|
|
17
|
-
A blast-radius writeup that sounds right is worthless. It reads as convincing whether or not it's true
|
|
17
|
+
A blast-radius writeup that sounds right is worthless. It reads as convincing whether or not it's true. So don't hand back the writeup. Find the one or two facts the whole thing depends on and prove them by running code.
|
|
18
18
|
|
|
19
19
|
### How sure are you
|
|
20
20
|
|
|
@@ -26,15 +26,15 @@ For each fact the change's safety depends on, get it as far down this list as is
|
|
|
26
26
|
4. You ran it. A script or test that calls the real code and fails loud if you're wrong.
|
|
27
27
|
5. You reproduced it in the running app.
|
|
28
28
|
|
|
29
|
-
Any safety fact you can't get to step 4, say so
|
|
29
|
+
Any safety fact you can't get to step 4, say so. Don't write it up as settled. Step 4 is usually one small script that imports the same library the app ships and calls the exact function you're worried about.
|
|
30
30
|
|
|
31
31
|
## Steps
|
|
32
32
|
|
|
33
33
|
1. Read the change. The diff, the symbols it adds, changes, and deletes, and what it now does differently, including the part the diff doesn't spell out. Use `why` step 2 to pull the PR and commits.
|
|
34
|
-
2. Find the one fact it's safe because of. Most changes that look
|
|
34
|
+
2. Find the one fact it's safe because of. Most changes that look risky are safe because of a single fact, like "this call only drops already-dead cache entries and does nothing else". Find that fact. If it holds, most risky cases are cleared at once. Spend your time here, not on a long list of maybes.
|
|
35
35
|
3. Look where grep stops. Read the source of the library you call, and check its pinned version and any local patch. Work out when things run: microtasks, unmount and teardown, Solid versus React. Follow what a symbol search misses: the JSON an API returns, a DB column, a wire format, another language reading the same bytes, a feature flag, code three hops downstream.
|
|
36
|
-
4. Be honest about each risk. Give it a real chance of happening and a real cost if it does. Keep the risks you confirmed
|
|
37
|
-
5. Prove the one fact. Write a script or test that runs the real code, run it, and paste what happened. If you can't prove it cheaply, mark it unproven. Don't
|
|
36
|
+
4. Be honest about each risk. Give it a real chance of happening and a real cost if it does. Keep the risks you confirmed. List the ones you checked and cleared separately. Same rules as `why`. Cite a real `file:line`, a search that finds nothing is still an answer, and never make up a caller or an API.
|
|
37
|
+
5. Prove the one fact. Write a script or test that runs the real code, run it, and paste what happened. If you can't prove it cheaply, mark it unproven. Don't overstate.
|
|
38
38
|
6. For a big or wide change, run it as an `arena`. Ask several models the same question and merge the answers. Different models catch different real bugs.
|
|
39
39
|
|
|
40
40
|
## What to hand back
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: create-verification-skill
|
|
3
|
-
description: "Generate a project-local verification skill that drives your app the way a user does
|
|
3
|
+
description: "Generate a project-local verification skill that drives your app the way a user does, across any language, framework, or platform. Use for /create-verification-skill, \"make a control skill for this repo\", or when a project has no scripted way to prove UI/CLI/service behavior."
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -14,7 +14,7 @@ Answer these from the codebase and only ask the user what you cannot observe:
|
|
|
14
14
|
|
|
15
15
|
- **Surface:** what does a user actually touch? A web UI, a CLI/TUI, a desktop app, an API, a mobile app, a library? A repo can have several; pick the primary one and note the rest.
|
|
16
16
|
- **Run:** how does the app start locally? Prefer the repo's own documented dev command (package scripts, Makefile, README quickstart). Note ports, env vars, seed data, auth.
|
|
17
|
-
- **Drive:** how can an agent interact with it programmatically? Existing harnesses first
|
|
17
|
+
- **Drive:** how can an agent interact with it programmatically? Existing harnesses first. Playwright/Cypress specs, expect scripts, PTY helpers, curl-able endpoints, a debug port. Only then pick a generic recipe: browser/CDP for web and Electron, a tmux/PTY harness for CLI/TUI, plain HTTP for services.
|
|
18
18
|
- **Observe:** what evidence can be captured? Screenshots, terminal transcripts, response bodies, logs, exit codes, DB state.
|
|
19
19
|
- **Isolate:** can two instances run side by side (ports, data dirs, profiles)? If not, say so in the generated skill: refusing to double-drive a shared instance beats corrupting the user's session.
|
|
20
20
|
|
|
@@ -22,10 +22,10 @@ If the checkout doesn't build or start as-is, fix that first (or report it preci
|
|
|
22
22
|
|
|
23
23
|
## 2. Generate the skill
|
|
24
24
|
|
|
25
|
-
Write `.pi/skills/verify-<app>/SKILL.md` with YAML frontmatter (`name: verify-<app>` and a `description` that names the app, the surface, and when to reach for it
|
|
25
|
+
Write `.pi/skills/verify-<app>/SKILL.md` with YAML frontmatter (`name: verify-<app>` and a `description` that names the app, the surface, and when to reach for it. Without frontmatter the skill never registers) and these sections, each grounded in what the interview actually found (no placeholders left):
|
|
26
26
|
|
|
27
27
|
- **Launch:** the exact command that starts the app for verification, and how to tell it's ready (a log line, a port answering, a prompt). Include teardown. For a short-lived CLI or TUI there is no server to keep alive: launch means build the binary (or install deps) once, then start each drive in its own isolated PTY or tmux session.
|
|
28
|
-
- **Doctor:** one read-only check that answers "is this instance worth driving?"
|
|
28
|
+
- **Doctor:** one read-only check that answers "is this instance worth driving?" Process up, right version/build, port owned by us, auth valid. An agent runs this first whenever anything looks off.
|
|
29
29
|
- **Drive:** the harness recipe with real selectors/commands from this repo, not examples. Prefer stable handles (ARIA labels, data attributes, prompt strings, route paths) over coordinates and tab order.
|
|
30
30
|
- **Evidence:** what to capture for a proof and where it goes. State the proof standards: exercise the real user path, not internal setters or test-only endpoints; capture the action and the resulting state, not just the final screen; verify side effects (files written, rows inserted, messages sent) alongside what's visible; mocks only where a production boundary already isolates the external system. When the safe path is a dry-run or test mode, verify what it actually skips by observing (files, network, git refs) rather than trusting its name: some dry-runs still touch the network or open a browser.
|
|
31
31
|
- **Cleanup:** how to tear down instances the run created. Never kill by process name; kill what you started. Cleanup removes instances and scratch state, never the evidence: proof artifacts survive the teardown, in a location the skill names.
|
|
@@ -37,7 +37,7 @@ Create `.pi/skills/verify-<app>/features/README.md` plus one file per user-facin
|
|
|
37
37
|
|
|
38
38
|
## 4. Prove the generated skill before handing it over
|
|
39
39
|
|
|
40
|
-
Run its own instructions end to end once: launch, doctor, drive ONE mapped feature (one is enough; the map exists so later runs can cover the rest), capture evidence, clean up. After cleanup, confirm the evidence still exists at the named location
|
|
40
|
+
Run its own instructions end to end once: launch, doctor, drive ONE mapped feature (one is enough; the map exists so later runs can cover the rest), capture evidence, clean up. After cleanup, confirm the evidence still exists at the named location. A cleanup that eats the proof fails this step. Fix what fails, and run the generated cleanup after every failed iteration too, so broken attempts don't strand processes and ports. A generated skill that was never executed is a draft, not a deliverable.
|
|
41
41
|
|
|
42
42
|
## 5. Offer the maintenance loop
|
|
43
43
|
|
|
@@ -8,8 +8,6 @@ disable-model-invocation: true
|
|
|
8
8
|
|
|
9
9
|
When the task matches no playbook, design one. The deliverable before any code is the workflow itself: a sequence of phases that scales rigor to the task, runs the scientific method, and leaves a decision trail a human can audit after stepping away. Bias toward more rigor. The cost of building the wrong thing dwarfs the cost of being careful.
|
|
10
10
|
|
|
11
|
-
Don't reinvent a playbook you already have. A focused single-unit task that matches Bug fix, Perf, Feature, Visual parity, Eval, or Multi-phase plan routes there. But a large or cross-cutting version of one (a migration across many call sites, an ambitious multi-part change), or work the user reviews after stepping away, belongs here even though a single-unit version would be a Feature. The rigor and the audit trail are the point.
|
|
12
|
-
|
|
13
11
|
## Start
|
|
14
12
|
|
|
15
13
|
Open a todolist whose first item is to read the Principles section of the **poteto-mode** skill. Then add the phases below as todos.
|
|
@@ -18,38 +16,38 @@ Open a todolist whose first item is to read the Principles section of the **pote
|
|
|
18
16
|
|
|
19
17
|
Ground first, then commit. Don't start the run until you can state:
|
|
20
18
|
|
|
21
|
-
- The definition of done as a falsifiable predicate (the **prove-it-works** principle skill).
|
|
22
|
-
- Scope, quantified: rough units and effort, plus the blockers grounding surfaced.
|
|
23
|
-
- The rigor level, biased high. One-way doors and high blast radius get more
|
|
19
|
+
- The definition of done as a falsifiable predicate (the **prove-it-works** principle skill).
|
|
20
|
+
- Scope, quantified: rough units and effort, plus the blockers grounding surfaced.
|
|
21
|
+
- The rigor level, biased high. One-way doors and high blast radius get more. Reversible low-stakes steps get less. Rigor is gates and artifacts, not "try harder".
|
|
24
22
|
|
|
25
23
|
Present the framing and tradeoffs before committing to a long run. Reversible work proceeds (the **never-block-on-the-human** principle skill), but a multi-hour run earns one checkpoint.
|
|
26
24
|
|
|
27
25
|
## Phase B: Design the workflow
|
|
28
26
|
|
|
29
|
-
Decompose into atomic, independently-landable units. Sequence riskiest-unknown-first
|
|
27
|
+
Decompose into atomic, independently-landable units. Sequence riskiest-unknown-first. Scaffold and verification come before features (the **foundational-thinking** principle skill).
|
|
30
28
|
|
|
31
29
|
- Build the verification harness before the work, with the baseline captured from the pre-change state, so the check reads as "old value vs new value".
|
|
32
|
-
- For one-way-door design decisions, run the **architect** skill (it runs **arena**)
|
|
33
|
-
- Decide what fans out. Parallelize only across
|
|
30
|
+
- For one-way-door design decisions, run the **architect** skill (it runs **arena**). Skip it for mechanical work whose shape is already concrete. A second arena over a settled design is over-engineering (the **laziness-protocol** principle skill).
|
|
31
|
+
- Decide what fans out. Parallelize only across seams, and give each worker its own worktree or branch (the **separate-before-serializing-shared-state** principle skill). Don't over-fan.
|
|
34
32
|
- Write the designed phase list down. That list is what the human reviews.
|
|
35
33
|
|
|
36
|
-
Then
|
|
34
|
+
Then execute the design. Add its steps to the todolist as concrete items, after the Phase C entry and before Phase D. Run each under the Phase C loop discipline, and weave the Phase D log through them, a row as each step lands, rather than saving the whole trail for the end.
|
|
37
35
|
|
|
38
36
|
## Phase C: Run the loop
|
|
39
37
|
|
|
40
|
-
Each unit is an experiment
|
|
38
|
+
Each unit is an experiment. State the hypothesis, make the smallest change, measure against the predicate on the real artifact, keep it if it advanced, revert it if it didn't.
|
|
41
39
|
Apply the **sequence-verifiable-units** principle skill, verifying each unit before starting the next instead of batching checks at the end.
|
|
42
40
|
|
|
43
|
-
- Verify by inspecting the artifact, never a self-report. When something passes too easily, suspect the observation method before the system.
|
|
41
|
+
- Verify by inspecting the artifact, never a self-report. When something passes too easily, suspect the observation method before the system.
|
|
44
42
|
- Pair delegated work with a judge and audit the delegates' artifacts yourself before trusting them. If a worker games the gate, reset and harden the contract. If the gate itself is wrong, fix the gate in its own change rather than routing around it.
|
|
45
43
|
- A verdict is VERIFIED, NOT VERIFIED, or INCONCLUSIVE. Inconclusive is not a pass. Don't hide a negative.
|
|
46
44
|
|
|
47
45
|
## Phase D: Keep the audit trail
|
|
48
46
|
|
|
49
|
-
Log the run via the **show-me-your-work** skill, one canonical TSV with a row per decision and per unit, evidence as links. figure-it-out's work is usually ambitious enough to commit the trail so the reviewer can read it in the PR
|
|
47
|
+
Log the run via the **show-me-your-work** skill, one canonical TSV with a row per decision and per unit, evidence as links. figure-it-out's work is usually ambitious enough to commit the trail so the reviewer can read it in the PR. Commit it when confidence has to be shown. Prefer evidence produced by committed scripts. The trail plus the diff is what lets the human come back and trust the work.
|
|
50
48
|
|
|
51
49
|
## Phase E: Verify and hand back
|
|
52
50
|
|
|
53
|
-
Check the whole against the Phase A predicate on the real product, not just the harness. Encode any recurring correction as a gate, a lint rule, a check, or a script
|
|
51
|
+
Check the whole against the Phase A predicate on the real product, not just the harness. Encode any recurring correction as a gate, a lint rule, a check, or a script (the **encode-lessons-in-structure** principle skill).
|
|
54
52
|
|
|
55
53
|
**Reply:** the playbook you designed, the rigor level and why, the decision-trail path, what's verified against the predicate, and what's still open.
|
package/skills/how/SKILL.md
CHANGED
|
@@ -1,130 +1,56 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: how
|
|
3
|
-
description: "Use for \"how does X work\", code walkthroughs before changing something, and placement / ownership / layering questions (\"where should this live\", \"which package owns this\", \"is this the right layer\"). Explains subsystem architecture, runtime flow, onboarding mental models.
|
|
3
|
+
description: "Use for \"how does X work\", code walkthroughs before changing something, and placement / ownership / layering questions (\"where should this live\", \"which package owns this\", \"is this the right layer\"). Explains subsystem architecture, runtime flow, onboarding mental models. Use why for motivation."
|
|
4
|
+
disable-model-invocation: true
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# How
|
|
7
8
|
|
|
8
|
-
Explore the codebase to answer "how does X work?" questions. Produce
|
|
9
|
+
Explore the codebase to answer "how does X work?" questions. Produce architectural explanations at the level of a senior engineer onboarding onto a subsystem, enough to build a working mental model, not so much that it reads like annotated source code.
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
## Step 1. Assess Complexity
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
2. **Critique.** Explain first, then spawn multiple models to independently identify architectural issues
|
|
13
|
+
If the scope is ambiguous, state your interpretation and explore. The user can redirect.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
- **Simple** (a single module, a small utility, a narrow question such as "how does function X work"): no explorers. One explainer explores and explains in a single pass. Go to Step 2b.
|
|
16
|
+
- **Complex** (a subsystem spanning multiple files or services, a cross-cutting feature, a full architectural overview): spawn parallel explorers first, then hand off to the explainer. Go to Step 2a.
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
When in doubt, take the simple path.
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
## Step 2a. Explore (complex questions only)
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
- "How do we handle billing for on-demand usage?", a feature flow
|
|
23
|
-
- "How is the auth service structured?", an architectural overview
|
|
24
|
-
- "Walk me through what happens when a user submits a form", a runtime trace
|
|
22
|
+
Decompose the question into 2 to 4 exploration angles, each a distinct slice of the subsystem. Spawn all explorers in a single message:
|
|
25
23
|
|
|
26
|
-
|
|
24
|
+
- `agent`: the one `/pstack-setup` assigned this role
|
|
25
|
+
- `model`: your configured how-explorer model (default: inherit, the parent session model)
|
|
26
|
+
- `readonly`: `true`
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
Each explorer gets the prompt in `references/explorer-prompt.md` with its angle filled in. Then go to Step 3.
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
- **Complex** (a subsystem spanning multiple files/services, a cross-cutting feature, a full architectural overview): spawn parallel explorer agents first, then hand off to the explainer. Go to Step 2a.
|
|
30
|
+
## Step 2b. Direct Explain (simple questions)
|
|
32
31
|
|
|
33
|
-
|
|
32
|
+
Spawn one Task subagent that explores and explains in one pass:
|
|
34
33
|
|
|
35
|
-
|
|
34
|
+
- `agent`: the one `/pstack-setup` assigned this role
|
|
35
|
+
- `model`: your configured how-explainer model (default: inherit, the parent session model)
|
|
36
|
+
- `readonly`: `true`
|
|
36
37
|
|
|
37
|
-
|
|
38
|
+
Build its prompt from `references/explainer-prompt.md` without the explorer-findings section. Go to Step 4.
|
|
38
39
|
|
|
39
|
-
|
|
40
|
-
- Explorer 2: request path and enforcement
|
|
41
|
-
- Explorer 3: configuration and metrics infrastructure
|
|
40
|
+
## Step 3. Synthesize (complex questions only)
|
|
42
41
|
|
|
43
|
-
|
|
42
|
+
Once all explorers have returned, spawn one Task subagent to synthesize their findings into one explanation:
|
|
44
43
|
|
|
45
|
-
|
|
44
|
+
- `agent`: the one `/pstack-setup` assigned this role
|
|
45
|
+
- `model`: your configured how-explainer model (default: inherit, the parent session model)
|
|
46
|
+
- `readonly`: `true`
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
- `model`: your configured how-explorer model (default `inherit`)
|
|
48
|
+
Build its prompt from `references/explainer-prompt.md` with every explorer's findings filled in.
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
- Start broad: Glob for relevant directories, Grep for key types/interfaces/class names
|
|
52
|
-
- Follow the thread: from an entry point, trace the call chain (callers, callees, data flow, type definitions)
|
|
53
|
-
- Read the actual code, don't guess from file names
|
|
54
|
-
- Stop when it can describe the full path from input to output (or trigger to effect) without hand-waving any step
|
|
55
|
-
- Note things that are surprising, non-obvious, or that a newcomer would get wrong
|
|
50
|
+
## Step 4. Present
|
|
56
51
|
|
|
57
|
-
|
|
52
|
+
Present the explainer's output to the user. Light edits for clarity or context from the conversation are fine. Do not substantially rewrite it.
|
|
58
53
|
|
|
59
|
-
|
|
54
|
+
## Output Format
|
|
60
55
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
Spawn a single background subagent that explores and explains in one pass:
|
|
64
|
-
|
|
65
|
-
- `agent`: `oracle`
|
|
66
|
-
- `model`: your configured how-explainer model (default `inherit`)
|
|
67
|
-
|
|
68
|
-
The agent does its own exploration (Glob, Grep, Read) and writes the explanation directly. Read `references/explainer-prompt.md` for the communication style and output format. Same structure, just no explorer findings as input.
|
|
69
|
-
|
|
70
|
-
Proceed to Step 4.
|
|
71
|
-
|
|
72
|
-
### Step 3. Synthesize (complex questions only)
|
|
73
|
-
|
|
74
|
-
Once all explorers return, spawn a single background subagent to synthesize their findings into one coherent explanation:
|
|
75
|
-
|
|
76
|
-
- `agent`: `oracle`
|
|
77
|
-
- `model`: your configured how-explainer model (default `inherit`)
|
|
78
|
-
|
|
79
|
-
The explainer gets all explorers' findings and writes the human-facing explanation (output format below). Read `references/explainer-prompt.md` for the full prompt template. The explainer reconciles overlapping findings, resolves contradictions, and weaves the slices into a unified picture.
|
|
80
|
-
|
|
81
|
-
### Step 4. Present
|
|
82
|
-
|
|
83
|
-
Present the explainer's output to the user. You may lightly edit for clarity or add context from the conversation, but don't substantially rewrite. The explainer's communication is the product.
|
|
84
|
-
|
|
85
|
-
### Output Format
|
|
86
|
-
|
|
87
|
-
Follow this structure, adapted to the question. Not every section is needed for every question.
|
|
88
|
-
|
|
89
|
-
**Overview.** 1-2 paragraphs. What it is, what it does, why it exists. Enough to decide whether to keep reading.
|
|
90
|
-
|
|
91
|
-
**Key Concepts.** The important types, services, or abstractions. Brief definition of each. Not exhaustive, just the ones needed to understand the rest.
|
|
92
|
-
|
|
93
|
-
**How It Works.** The core of the explanation. Walk through the flow: what triggers it, what happens step by step, where data goes, the decision points. Prose, not pseudocode. Reference specific files and functions so the reader can go look, but don't dump code blocks unless a snippet is genuinely necessary.
|
|
94
|
-
|
|
95
|
-
**Where Things Live.** A brief map of the relevant files/directories. Not every file, just the ones needed to start working in this area.
|
|
96
|
-
|
|
97
|
-
**Gotchas.** Non-obvious or surprising things that would trip someone up. Historical context that explains why something looks weird. Known sharp edges.
|
|
98
|
-
|
|
99
|
-
## Critique Mode
|
|
100
|
-
|
|
101
|
-
Triggered when the user asks for architectural issues, problems, or improvements, not just understanding.
|
|
102
|
-
|
|
103
|
-
### Step 1. Explain First
|
|
104
|
-
|
|
105
|
-
Run the full explain flow above (Steps 1-4). You must understand the architecture before critiquing it.
|
|
106
|
-
|
|
107
|
-
### Step 2. Spawn Critics
|
|
108
|
-
|
|
109
|
-
After the explanation is complete, spawn one architectural critic per model in your configured how-critics list (defaults `inherit`, `inherit`, `inherit`, `inherit`), all in a single message.
|
|
110
|
-
|
|
111
|
-
For each critic:
|
|
112
|
-
- `agent`: `reviewer`
|
|
113
|
-
- `model`: one model from the configured how-critics list. These are minimum reasoning levels. The lead should escalate any model when the architecture warrants deeper analysis.
|
|
114
|
-
|
|
115
|
-
Read `references/critic-prompt.md` for the prompt template. Each critic gets:
|
|
116
|
-
1. The explanation from Step 1 (so they don't re-explore)
|
|
117
|
-
2. The relevant file paths (so they can read the actual code)
|
|
118
|
-
3. The architectural critique rubric from `references/critique-rubric.md`
|
|
119
|
-
|
|
120
|
-
### Step 3. Lead Judgment
|
|
121
|
-
|
|
122
|
-
Same framework as the interrogate skill. You're a pragmatic lead, not an aggregator.
|
|
123
|
-
|
|
124
|
-
Categorize findings:
|
|
125
|
-
- **Act on.** Architectural problems worth fixing now
|
|
126
|
-
- **Consider.** Real concerns, but the cost/benefit is unclear
|
|
127
|
-
- **Noted.** Valid observations, low priority
|
|
128
|
-
- **Dismissed.** Wrong, missing context, or style preference
|
|
129
|
-
|
|
130
|
-
Present the explanation first (from Step 1), then the critique verdict below it. The explanation should stand on its own; someone who just wants to understand the system shouldn't wade through critique.
|
|
56
|
+
The explanation uses the sections defined in `references/explainer-prompt.md`, dropping any that do not apply: Overview, Key Concepts, How It Works, Where Things Live, Gotchas.
|
|
@@ -16,11 +16,11 @@ You are writing an architectural explanation for a senior engineer. Multiple exp
|
|
|
16
16
|
|
|
17
17
|
## Instructions
|
|
18
18
|
|
|
19
|
-
The explorers each investigated a different angle of the same subsystem. Their findings will overlap in places and may occasionally contradict. Reconcile them. Merge overlapping descriptions, resolve contradictions by checking the code yourself, and
|
|
19
|
+
The explorers each investigated a different angle of the same subsystem. Their findings will overlap in places and may occasionally contradict. Reconcile them. Merge overlapping descriptions, resolve contradictions by checking the code yourself, and combine the separate slices into a unified picture.
|
|
20
20
|
|
|
21
21
|
Write an explanation a senior engineer unfamiliar with this area could read and walk away with a solid mental model, understanding the architecture well enough to start working in it confidently.
|
|
22
22
|
|
|
23
|
-
You have read-only access to the codebase to check anything, clarify a detail, or fill a gap. Use Read, Grep, and Glob as needed. The explorers did the
|
|
23
|
+
You have read-only access to the codebase to check anything, clarify a detail, or fill a gap. Use Read, Grep, and Glob as needed. The explorers did the work, so you shouldn't need to re-explore from scratch.
|
|
24
24
|
|
|
25
25
|
## Output Format
|
|
26
26
|
|
|
@@ -35,7 +35,7 @@ The important types, services, or abstractions needed to follow the rest. Brief
|
|
|
35
35
|
### How It Works
|
|
36
36
|
The core of the explanation, and the longest section. Walk through the flow: what triggers it, what happens step by step, where data goes, what the decision points are.
|
|
37
37
|
|
|
38
|
-
Use prose, not pseudocode. Reference specific files and functions so the reader knows where to look, but don't dump large code blocks unless a snippet is
|
|
38
|
+
Use prose, not pseudocode. Reference specific files and functions so the reader knows where to look, but don't dump large code blocks unless a snippet is essential to a point.
|
|
39
39
|
|
|
40
40
|
When the flow involves multiple components talking to each other, or data transforming through stages, include a diagram. Use mermaid (```mermaid) for structured flows (sequence diagrams, flowcharts, component graphs) or ASCII art for simpler relationships where mermaid would be overkill. Use your judgment. A diagram should clarify, not decorate. If prose covers the flow, skip the diagram.
|
|
41
41
|
|
|
@@ -43,7 +43,7 @@ When the flow involves multiple components talking to each other, or data transf
|
|
|
43
43
|
A brief file/directory map. Just the ones someone would need to start working here.
|
|
44
44
|
|
|
45
45
|
### Gotchas
|
|
46
|
-
Non-obvious things, surprising behavior, historical context,
|
|
46
|
+
Non-obvious things, surprising behavior, historical context, pitfalls. Skip this section if there's nothing worth calling out.
|
|
47
47
|
|
|
48
48
|
## Communication Style
|
|
49
49
|
|
|
@@ -51,5 +51,5 @@ Non-obvious things, surprising behavior, historical context, sharp edges. Skip t
|
|
|
51
51
|
- Say "the `UserService` calls `AuthClient.refresh()`" not "the service delegates to the client"
|
|
52
52
|
- When something is complex, explain why it's complex. Don't just describe the complexity
|
|
53
53
|
- When something is simple, don't pad it out
|
|
54
|
-
- If there's a helpful analogy, use it
|
|
55
|
-
- If the explorers flagged open questions or gaps, acknowledge them
|
|
54
|
+
- If there's a helpful analogy, use it. If there isn't, don't force one
|
|
55
|
+
- If the explorers flagged open questions or gaps, acknowledge them rather than hiding them
|
|
@@ -46,7 +46,7 @@ Every file you read during exploration, so the explainer can reference them.
|
|
|
46
46
|
Where this subsystem connects to other parts of the codebase. The inputs and outputs.
|
|
47
47
|
|
|
48
48
|
### Non-Obvious Things
|
|
49
|
-
Anything surprising, historically motivated, or easy to get wrong. Things that look like they should work one way but
|
|
49
|
+
Anything surprising, historically motivated, or easy to get wrong. Things that look like they should work one way but work another.
|
|
50
50
|
|
|
51
51
|
### Open Questions
|
|
52
52
|
Anything you couldn't fully trace or understand. Be honest about gaps.
|
|
@@ -6,7 +6,7 @@ disable-model-invocation: true
|
|
|
6
6
|
|
|
7
7
|
# Interrogate
|
|
8
8
|
|
|
9
|
-
Spawn one reviewer per configured model to adversarially review code changes. Each model gets the same prompt and rubric. The adversarial signal comes from model diversity, not assigned personas.
|
|
9
|
+
Spawn one reviewer per configured model to adversarially review code changes. Each model gets the same prompt and rubric. The adversarial signal comes from model diversity, not assigned personas.
|
|
10
10
|
|
|
11
11
|
The deliverable is a synthesized verdict. Do NOT auto-apply changes.
|
|
12
12
|
|
|
@@ -22,31 +22,32 @@ Package the diff (or file contents) plus any surrounding context files the revie
|
|
|
22
22
|
|
|
23
23
|
## Step 2, State the Intent
|
|
24
24
|
|
|
25
|
-
Before spawning reviewers, state the intent explicitly.
|
|
25
|
+
Before spawning reviewers, state the intent explicitly. Derive this from:
|
|
26
26
|
|
|
27
27
|
- The user's message
|
|
28
28
|
- Commit messages
|
|
29
29
|
- PR description if one exists
|
|
30
30
|
- The code itself
|
|
31
31
|
|
|
32
|
-
Write one clear paragraph.
|
|
32
|
+
Write one clear paragraph. If you're unsure about the intent, ask the user before proceeding.
|
|
33
33
|
|
|
34
34
|
## Step 3, Spawn Reviewers
|
|
35
35
|
|
|
36
|
-
Launch all reviewers in a single message
|
|
36
|
+
Launch all reviewers in a single message with parallel `subagent` calls. Use the `interrogate reviewers` list from the `subagents.*` keys in Pi settings when present, one reviewer per entry, extending or shrinking the Reviewer A/B/C/D labels below to the configured entry count. Otherwise use the table defaults.
|
|
37
37
|
|
|
38
38
|
| Subagent | Default model |
|
|
39
39
|
|----------|---------------|
|
|
40
|
-
| Reviewer A |
|
|
41
|
-
| Reviewer B |
|
|
42
|
-
| Reviewer C |
|
|
43
|
-
| Reviewer D |
|
|
40
|
+
| Reviewer A | inherit the parent model |
|
|
41
|
+
| Reviewer B | inherit, or a model family that differs from the parent's |
|
|
42
|
+
| Reviewer C | inherit, or a model family that differs from the parent's |
|
|
43
|
+
| Reviewer D | inherit, or a model family that differs from the parent's |
|
|
44
44
|
|
|
45
45
|
For each reviewer:
|
|
46
|
-
- `agent`: `
|
|
46
|
+
- `agent`: the one `/pstack-setup` assigned this role
|
|
47
47
|
- `model`: the configured `interrogate reviewers` entry, or the table default with no configured line
|
|
48
|
+
- `readonly`: `true`
|
|
48
49
|
|
|
49
|
-
If a model is rejected as unresolvable when you spawn the subagent,
|
|
50
|
+
If a model slug is rejected as unresolvable when you try to spawn the subagent, check the valid slugs in the Task tool's error message, pick the closest equivalent (prefer the highest-reasoning tier of the same family), spawn with the valid slug, and open a separate PR to update the configured value or default table. Do not block the review on the slug issue. If the configured value is `inherit-parent` or `auto`, omit `model` instead. Never treat those aliases as broken slugs or enter this fallback for them.
|
|
50
51
|
|
|
51
52
|
Read `references/reviewer-prompt.md` and fill in the template with:
|
|
52
53
|
1. The stated intent
|
|
@@ -56,8 +57,6 @@ Read `references/reviewer-prompt.md` and fill in the template with:
|
|
|
56
57
|
|
|
57
58
|
The same filled template goes to all reviewers, so every model applies the code-quality lens.
|
|
58
59
|
|
|
59
|
-
Each reviewer produces structured findings as described in the prompt template.
|
|
60
|
-
|
|
61
60
|
## Step 4, Synthesize
|
|
62
61
|
|
|
63
62
|
As results come back, build a unified picture:
|
|
@@ -72,7 +71,7 @@ As results come back, build a unified picture:
|
|
|
72
71
|
|
|
73
72
|
You are the lead reviewer, a pragmatic senior engineer, not a neutral aggregator.
|
|
74
73
|
|
|
75
|
-
Read `references/lead-judgment.md` for the full framework.
|
|
74
|
+
Read `references/lead-judgment.md` for the full framework.
|
|
76
75
|
|
|
77
76
|
Categorize every finding using these buckets:
|
|
78
77
|
|
|
@@ -106,7 +105,7 @@ Present the verdict in this structure:
|
|
|
106
105
|
[Valid but low-priority. Brief list.]
|
|
107
106
|
|
|
108
107
|
### Dismissed
|
|
109
|
-
[Rejected findings with brief rationale.
|
|
108
|
+
[Rejected findings with brief rationale.]
|
|
110
109
|
|
|
111
110
|
### Agreement Map
|
|
112
111
|
[Where did models agree, where did they diverge, and what does the pattern of agreement/disagreement tell us?]
|
|
@@ -40,7 +40,7 @@ Prioritize structural code-quality regressions and missed simplifications first,
|
|
|
40
40
|
|
|
41
41
|
## Approval Bar
|
|
42
42
|
|
|
43
|
-
Do not approve merely because behavior seems correct. Treat these as presumptive blockers unless the author can justify them: the PR keeps a lot of incidental complexity when a code-judo move would delete it
|
|
43
|
+
Do not approve merely because behavior seems correct. Treat these as presumptive blockers unless the author can justify them: the PR keeps a lot of incidental complexity when a code-judo move would delete it. Pushes a file from below 1000 lines to above 1000 lines. Adds ad-hoc branching that tangles an existing flow. Scatters feature checks across shared code. Adds an unnecessary abstraction, wrapper, or cast-heavy contract, or duplicates an existing helper or puts logic in the wrong layer when there is a clear canonical home. If those conditions are not met, leave explicit, actionable feedback and push for a cleaner decomposition.
|
|
44
44
|
|
|
45
45
|
## Review Tone
|
|
46
46
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Lead Judgment Framework
|
|
2
2
|
|
|
3
|
-
You are the lead reviewer. The configured reviewers have produced their findings. Apply pragmatic engineering judgment. Don't aggregate
|
|
3
|
+
You are the lead reviewer. The configured reviewers have produced their findings. Apply pragmatic engineering judgment. Don't aggregate. Filter, contextualize, and decide.
|
|
4
4
|
|
|
5
5
|
## Why This Step Matters
|
|
6
6
|
|
|
@@ -36,7 +36,7 @@ Does the code fit well into the system it's part of?
|
|
|
36
36
|
- Boundary discipline: is validation at system boundaries, or scattered through business logic? Validate data once where it enters the system, then trust it internally.
|
|
37
37
|
- Abstraction level: is the code mixing high-level orchestration with low-level detail?
|
|
38
38
|
- Coupling: does this change introduce dependencies that will make future changes harder?
|
|
39
|
-
- Data model fit: do the data structures match the actual access patterns? The right structure makes downstream code obvious
|
|
39
|
+
- Data model fit: do the data structures match the actual access patterns? The right structure makes downstream code obvious. The wrong one fights you at every turn.
|
|
40
40
|
- Bolted-on vs. integrated: was the change patched onto the existing design, or does it read as if the design always accounted for it? If the new requirement had been known from the start, would the code look like this?
|
|
41
41
|
- Legacy dual-paths: does the change introduce a new API while keeping the old one alive? If there are no external consumers, migrate callers and delete the old path in the same wave. Don't leave compatibility layers that will become permanent.
|
|
42
42
|
|
|
@@ -50,7 +50,7 @@ Can you tell that this code works from reading it?
|
|
|
50
50
|
- Are there assertions/invariants that would catch regressions?
|
|
51
51
|
- If this is a bug fix: is there a test for the bug?
|
|
52
52
|
- If this touches an integration boundary: is the full path tested?
|
|
53
|
-
- Check the real thing, not a proxy
|
|
53
|
+
- Check the real thing, not a proxy. If the code checks liveness via file mtime or cached state instead of reading the actual value, that's a verification gap.
|
|
54
54
|
- For delegated or async work: does the code verify actual output artifacts, or does it trust self-reports and summaries?
|
|
55
55
|
|
|
56
56
|
## Complexity Budget
|