From 29ba8adfdd18b357878156ad9ebd3714e3c02343 Mon Sep 17 00:00:00 2001 From: Alphalab Admin Date: Fri, 11 Sep 2026 09:14:02 +0000 Subject: [PATCH 1/3] fix(pstack): handle tiny known bug fixes inline --- pstack/skills/poteto-mode/SKILL.md | 2 ++ pstack/skills/poteto-mode/playbooks/bug-fix.md | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/pstack/skills/poteto-mode/SKILL.md b/pstack/skills/poteto-mode/SKILL.md index 22d8b0509..d0c3b3fae 100644 --- a/pstack/skills/poteto-mode/SKILL.md +++ b/pstack/skills/poteto-mode/SKILL.md @@ -14,6 +14,8 @@ reminder: New task? Playbook match or rigor needed -> apply /poteto-mode. Casual The Principles section below grounds every trigger. In your reply, name each principle that shaped a decision and the specific choice it changed. Cite only principles whose leaf SKILL.md you read this session. +For tiny known-mechanism bug fixes, use the [inline fast path](playbooks/bug-fix.md) instead of the fanout triggers below. Laziness and subtraction take precedence over routine delegation. Use subagents for real parallel investigation or large diffs, not as the default for tiny known fixes. + Remaining triggers: - Nontrivial change, architecture decision, or "are we sure?" → the **how** skill. diff --git a/pstack/skills/poteto-mode/playbooks/bug-fix.md b/pstack/skills/poteto-mode/playbooks/bug-fix.md index 88307807e..108996360 100644 --- a/pstack/skills/poteto-mode/playbooks/bug-fix.md +++ b/pstack/skills/poteto-mode/playbooks/bug-fix.md @@ -1,6 +1,16 @@ ### Bug fix -**You own this task. Plan, review, verify.** Delegate investigation and the fix to subagents, stay in the lead. +**You own this task. Plan, review, verify.** Choose the path by the surviving mechanism and the scope of the fix. + +#### Tiny known-mechanism fast path + +When evidence already establishes the surviving mechanism and the fix is about one predicate or a few-line local change, the parent edits and verifies inline. Do not fan out `how`, `why`, `architect`, `worker`, or `reviewer`, including a parallel worker+reviewer workflow. This path overrides the general delegation and function-boundary triggers. + +Use the existing evidence, make the smallest fix, and run the focused repro and relevant checks yourself. Commit the fix with its regression test when applicable. Do not require a failing-test-first commit, approval of test order, or confirmation that the diff is frozen for review. Run **Opening a PR** without adding a delegation gate. Report the mechanism, changed lines, and verification results. + +#### Full scientific path + +Use this path when the mechanism is unknown or the change is cross-cutting. Delegate investigation and the fix to subagents, stay in the lead. A larger local fix with a known mechanism can reuse the evidence and follow the applicable steps without reopening the investigation. Be scientific. Every shipped line traces to runtime evidence. Belt-and-suspenders that "might help" is a hypothesis, not a fix. It does not ship. When evidence refutes a hypothesis, revert what it motivated. The smallest change the evidence justifies ships, nothing more. From 67b8ddd0af5cf27d21886a7b92c08da72dc2ae63 Mon Sep 17 00:00:00 2001 From: Alphalab Admin Date: Fri, 11 Sep 2026 10:04:53 +0000 Subject: [PATCH 2/3] fix(pstack): route delegated tasks only to poteto-agent --- pstack/skills/poteto-mode/SKILL.md | 2 +- pstack/skills/poteto-mode/playbooks/bug-fix.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pstack/skills/poteto-mode/SKILL.md b/pstack/skills/poteto-mode/SKILL.md index d0c3b3fae..74cedbe6a 100644 --- a/pstack/skills/poteto-mode/SKILL.md +++ b/pstack/skills/poteto-mode/SKILL.md @@ -90,7 +90,7 @@ Read the leaf skill in full for any principle you apply. Each entry names when i ## Subagents -**Use `subagent_type: "poteto-agent"` for any subagent you spawn inside a playbook step** (code-writing delegates, ad-hoc helpers). `/poteto-mode` and `poteto-agent` route through the same wrapper. Routed workflow skills (`how`, `why`, `interrogate`, `reflect`, `swarm`) set their own `subagent_type` for diverse-model review. Respect what the skill prescribes, don't override to `poteto-agent`. +**When delegating at all, use only `poteto-agent`.** In Pi, call `{ agent: "poteto-agent", task }`. In Cursor, use `subagent_type: "poteto-agent"`. This rule overrides role selection in routed skills such as `how`, `why`, `interrogate`, `reflect`, and `swarm`. Give the child a bounded task instead of routing to scout, researcher, reviewer, oracle, worker, or delegate profiles. Tiny known-mechanism fixes stay parent-inline. **Defaults for every `Task` call.** `run_in_background: true`, agent mode (readonly strips MCP), file pointers not inlined context, explicit model per role (configurable via `/setup-pstack`. Defaults `grok-4.6-fast-xhigh` for code, `claude-fable-5-1-thinking-max` for prose and judgment). Code delegates tier by difficulty. The hardest changes (cross-cutting design, gnarly concurrency, subtle algorithms) go to your strongest judgment model (`claude-fable-5-1-thinking-max`), whether the task needs judgment on vague intent or is a precisely specified sequence of steps to execute to the letter. Trivial mechanical edits go to your fast code model. Per-role lines in the `/setup-pstack` rule override these defaults and the model choices in the routed skills (`how`, `why`, `arena`, `swarm`, `architect`, `interrogate`, `reflect`). A role with no line keeps its default, and a role line of `inherit-parent` or `auto` runs that role on the parent chat model (omit Task `model`). diff --git a/pstack/skills/poteto-mode/playbooks/bug-fix.md b/pstack/skills/poteto-mode/playbooks/bug-fix.md index 108996360..6e4671b50 100644 --- a/pstack/skills/poteto-mode/playbooks/bug-fix.md +++ b/pstack/skills/poteto-mode/playbooks/bug-fix.md @@ -10,18 +10,18 @@ Use the existing evidence, make the smallest fix, and run the focused repro and #### Full scientific path -Use this path when the mechanism is unknown or the change is cross-cutting. Delegate investigation and the fix to subagents, stay in the lead. A larger local fix with a known mechanism can reuse the evidence and follow the applicable steps without reopening the investigation. +Use this path when the mechanism is unknown or the change is cross-cutting. When delegation helps, use only `poteto-agent` for a bounded investigation or fix. Do not select scout, researcher, reviewer, oracle, worker, or delegate profiles. A larger local fix with a known mechanism can reuse the evidence and follow the applicable steps without reopening the investigation. Be scientific. Every shipped line traces to runtime evidence. Belt-and-suspenders that "might help" is a hypothesis, not a fix. It does not ship. When evidence refutes a hypothesis, revert what it motivated. The smallest change the evidence justifies ships, nothing more. 1. Reproduce it yourself on the matching surface via the control skill (Non-negotiables). Don't hand the repro to the user. A debug or instrumentation protocol that says to ask the user does not override this. You drive the instrumented runtime. Ask the user only with a stated, specific reason the control surface cannot reach the target, and only after driving it as far as it goes. Won't reproduce directly, force it: synthesize the trigger, tighten conditions, or instrument until it fires. 2. Binary-search the cause. Form the candidate hypotheses, then rule them out until one survives. Seed them with `how` over the affected subsystem and the **why** skill for regression history. Each pass, take the split that cuts the most remaining problem space, get runtime evidence, eliminate. When program state is unclear, add instrumentation or logging and read it as the code runs. Don't guess. Drive a long or stubborn hunt with Cursor's `/loop` command. Confirm the surviving *mechanism* with runtime evidence before the step-3 architect/interrogate fan-out. -3. Plan the fix. If it crosses a function boundary, `architect` first. Delegate implementation to a subagent using your configured bug-fix model (default `claude-fable-5-1-thinking-max`) with a specific scope. Review the diff. +3. Plan the fix. If it crosses a function boundary, `architect` first. Delegate implementation to `poteto-agent` using your configured bug-fix model (default `claude-fable-5-1-thinking-max`) with a specific scope. Review the diff. 4. Verify on the same surface. The original repro now passes. "Inconclusive" or wrong-surface is not a pass. Flag it. Unit tests show branch behavior, not bug absence. 5. Stage the commits so the failing repro lands before the fix in git history. See the **tdd** skill for the failing-test-first cadence when the bug has a cheap local test path. Skip it when the test would be expensive, integration-heavy, or unclear. This is the canonical **sequence-verifiable-units** principle skill, the failing test first and the fix on top. 6. Run **Opening a PR**. -Investigation fans out `how` + `why` as parallel subagents. +`how` and `why` describe investigation tasks, not separate agent profiles. Delegate only useful independent work to `poteto-agent`. Do not require parallel investigation or a worker+reviewer loop. **Reply:** what was broken, root cause, fix, how you verified. Paste failing-then-passing repro output verbatim. From 9eaeaf1f17f0f7e7f05c45ad712452af1ab0b17a Mon Sep 17 00:00:00 2001 From: Alphalab Admin Date: Fri, 11 Sep 2026 10:23:14 +0000 Subject: [PATCH 3/3] fix(pstack): restore Cursor-native subagent routing Revert 67b8ddd. Keep the tiny known-mechanism inline fast path from 29ba8ad. Pi profile policy belongs in pi-stack. --- pstack/skills/poteto-mode/SKILL.md | 2 +- pstack/skills/poteto-mode/playbooks/bug-fix.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pstack/skills/poteto-mode/SKILL.md b/pstack/skills/poteto-mode/SKILL.md index 74cedbe6a..d0c3b3fae 100644 --- a/pstack/skills/poteto-mode/SKILL.md +++ b/pstack/skills/poteto-mode/SKILL.md @@ -90,7 +90,7 @@ Read the leaf skill in full for any principle you apply. Each entry names when i ## Subagents -**When delegating at all, use only `poteto-agent`.** In Pi, call `{ agent: "poteto-agent", task }`. In Cursor, use `subagent_type: "poteto-agent"`. This rule overrides role selection in routed skills such as `how`, `why`, `interrogate`, `reflect`, and `swarm`. Give the child a bounded task instead of routing to scout, researcher, reviewer, oracle, worker, or delegate profiles. Tiny known-mechanism fixes stay parent-inline. +**Use `subagent_type: "poteto-agent"` for any subagent you spawn inside a playbook step** (code-writing delegates, ad-hoc helpers). `/poteto-mode` and `poteto-agent` route through the same wrapper. Routed workflow skills (`how`, `why`, `interrogate`, `reflect`, `swarm`) set their own `subagent_type` for diverse-model review. Respect what the skill prescribes, don't override to `poteto-agent`. **Defaults for every `Task` call.** `run_in_background: true`, agent mode (readonly strips MCP), file pointers not inlined context, explicit model per role (configurable via `/setup-pstack`. Defaults `grok-4.6-fast-xhigh` for code, `claude-fable-5-1-thinking-max` for prose and judgment). Code delegates tier by difficulty. The hardest changes (cross-cutting design, gnarly concurrency, subtle algorithms) go to your strongest judgment model (`claude-fable-5-1-thinking-max`), whether the task needs judgment on vague intent or is a precisely specified sequence of steps to execute to the letter. Trivial mechanical edits go to your fast code model. Per-role lines in the `/setup-pstack` rule override these defaults and the model choices in the routed skills (`how`, `why`, `arena`, `swarm`, `architect`, `interrogate`, `reflect`). A role with no line keeps its default, and a role line of `inherit-parent` or `auto` runs that role on the parent chat model (omit Task `model`). diff --git a/pstack/skills/poteto-mode/playbooks/bug-fix.md b/pstack/skills/poteto-mode/playbooks/bug-fix.md index 6e4671b50..108996360 100644 --- a/pstack/skills/poteto-mode/playbooks/bug-fix.md +++ b/pstack/skills/poteto-mode/playbooks/bug-fix.md @@ -10,18 +10,18 @@ Use the existing evidence, make the smallest fix, and run the focused repro and #### Full scientific path -Use this path when the mechanism is unknown or the change is cross-cutting. When delegation helps, use only `poteto-agent` for a bounded investigation or fix. Do not select scout, researcher, reviewer, oracle, worker, or delegate profiles. A larger local fix with a known mechanism can reuse the evidence and follow the applicable steps without reopening the investigation. +Use this path when the mechanism is unknown or the change is cross-cutting. Delegate investigation and the fix to subagents, stay in the lead. A larger local fix with a known mechanism can reuse the evidence and follow the applicable steps without reopening the investigation. Be scientific. Every shipped line traces to runtime evidence. Belt-and-suspenders that "might help" is a hypothesis, not a fix. It does not ship. When evidence refutes a hypothesis, revert what it motivated. The smallest change the evidence justifies ships, nothing more. 1. Reproduce it yourself on the matching surface via the control skill (Non-negotiables). Don't hand the repro to the user. A debug or instrumentation protocol that says to ask the user does not override this. You drive the instrumented runtime. Ask the user only with a stated, specific reason the control surface cannot reach the target, and only after driving it as far as it goes. Won't reproduce directly, force it: synthesize the trigger, tighten conditions, or instrument until it fires. 2. Binary-search the cause. Form the candidate hypotheses, then rule them out until one survives. Seed them with `how` over the affected subsystem and the **why** skill for regression history. Each pass, take the split that cuts the most remaining problem space, get runtime evidence, eliminate. When program state is unclear, add instrumentation or logging and read it as the code runs. Don't guess. Drive a long or stubborn hunt with Cursor's `/loop` command. Confirm the surviving *mechanism* with runtime evidence before the step-3 architect/interrogate fan-out. -3. Plan the fix. If it crosses a function boundary, `architect` first. Delegate implementation to `poteto-agent` using your configured bug-fix model (default `claude-fable-5-1-thinking-max`) with a specific scope. Review the diff. +3. Plan the fix. If it crosses a function boundary, `architect` first. Delegate implementation to a subagent using your configured bug-fix model (default `claude-fable-5-1-thinking-max`) with a specific scope. Review the diff. 4. Verify on the same surface. The original repro now passes. "Inconclusive" or wrong-surface is not a pass. Flag it. Unit tests show branch behavior, not bug absence. 5. Stage the commits so the failing repro lands before the fix in git history. See the **tdd** skill for the failing-test-first cadence when the bug has a cheap local test path. Skip it when the test would be expensive, integration-heavy, or unclear. This is the canonical **sequence-verifiable-units** principle skill, the failing test first and the fix on top. 6. Run **Opening a PR**. -`how` and `why` describe investigation tasks, not separate agent profiles. Delegate only useful independent work to `poteto-agent`. Do not require parallel investigation or a worker+reviewer loop. +Investigation fans out `how` + `why` as parallel subagents. **Reply:** what was broken, root cause, fix, how you verified. Paste failing-then-passing repro output verbatim.