diff --git a/harness/pstack/claude-code/agents/poteto-agent.md b/harness/pstack/claude-code/agents/poteto-agent.md index e1d2df2e8..9b6ebf3b6 100644 --- a/harness/pstack/claude-code/agents/poteto-agent.md +++ b/harness/pstack/claude-code/agents/poteto-agent.md @@ -7,3 +7,7 @@ is_background: true # Poteto subagent You are operating as poteto-mode's full agent style. The chat that receives `/poteto-mode` owns the playbook, the todo list, and every Task spawn. You are one of its delegates. Read the `poteto-mode` skill's `SKILL.md` in full before doing any work, including its inline Principles index. Use the absolute path your parent gave you. With no path, before any other work, search `~/.cursor/plugins/` for a file whose path ends in `skills/poteto-mode/SKILL.md`. If more than one file matches, use the copy whose `.cursor-plugin/plugin.json` has the highest `version`. Your skill catalog hides this skill, so a missing catalog entry does not mean pstack is absent. If no such file exists, stop and tell your parent. Navigate to a leaf `principle-*` skill whenever you apply that principle. + +When your brief hands you playbook steps, open a todolist of them before your first edit. Do the implementation assigned in your brief directly, even when the playbook says to delegate it; your parent owns the independent review. Other steps that require a Task spawn you cannot make, or were told not to make, go back to your parent. Immediately leave them pending in the todolist with `returned to parent: ` and list them under "Returned to parent" in your reply. Do not mark them done or skipped. + +Use prerequisite results already supplied in your brief. If a missing prerequisite blocks your assigned work, finish any independent work and end your turn. Keep both the prerequisite and its dependent unfinished work pending in the todolist with `returned to parent: ` and list both under "Returned to parent", naming the result needed to continue. Do not wait for a mid-run reply. End your reply with the skill, playbook, and principle files you read. diff --git a/harness/pstack/claude-code/docs/harness/claude-code.md b/harness/pstack/claude-code/docs/harness/claude-code.md index bf154e646..3af361717 100644 --- a/harness/pstack/claude-code/docs/harness/claude-code.md +++ b/harness/pstack/claude-code/docs/harness/claude-code.md @@ -8,7 +8,7 @@ pstack skills use Cursor names. In Claude Code, read this file once per session, | --- | --- | | `Task` | `Agent` | | `AskQuestion` | `AskUserQuestion`. In `-p` mode it is absent, so ask in plain text. | -| Open a todolist | Use `TodoWrite` if the session offers it. Otherwise keep the list in your reply and update it at each phase. | +| Open a todolist | Use `TodoWrite` if the session offers it. Otherwise write the list to a Markdown file before your first edit, mark completed items done and chosen skips `skip: ` as you go, and name the file in your reply. Leave returned work unchecked with `returned to parent: ` as soon as you identify it. A background subagent's reply reaches its parent only when it finishes, so a list kept in the reply is no checkpoint. | | Run another pstack skill (`/name` or "the **name** skill") | `Read` `/skills//SKILL.md` and follow it. The `Skill` tool refuses most pstack skills. When you tell the user to type it, write `/pstack:`. | | `Grep`, `Glob` | `Bash` with `rg` when the session has no `Grep` or `Glob`. | diff --git a/harness/pstack/claude-code/skills/poteto-mode/SKILL.md b/harness/pstack/claude-code/skills/poteto-mode/SKILL.md index 1bb3884a5..f92d3b5ab 100644 --- a/harness/pstack/claude-code/skills/poteto-mode/SKILL.md +++ b/harness/pstack/claude-code/skills/poteto-mode/SKILL.md @@ -94,6 +94,8 @@ Read the leaf skill in full for any principle you apply. Each entry names when i **Use `subagent_type: "poteto-agent"` for any subagent you spawn inside a playbook step** (code-writing delegates, ad-hoc helpers). The chat that receives `/poteto-mode` runs the playbook. Never spawn a `poteto-agent` to run the playbook itself. 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`. +Before delegating implementation, complete the blocking steps that require parent-owned spawns and include their results in the brief. Add steps listed under "Returned to parent" to your todolist as pending work. Run returned prerequisites and reviews with their prescribed skills. Spawn a fresh implementation delegate only if implementation remains unfinished or those results require code changes. Give it the remaining scope, prerequisite results, prior report, and branch per the fresh-subagent rule below. + **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.7-xhigh-fast` for code, `claude-opus-5-5-xhigh` 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-opus-5-5-xhigh`), 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`). Each code playbook's configured model comes from its line (`feature, refactoring`, `bug-fix`, `perf-issue`, or `hillclimb`), and the hardest changes read `hardest tasks`. Prose and judgment read `judgment and prose`. **Match the model to the job.** Before each spawn, start from the role's line or default and pick the reasoning level and speed the job needs. The `/setup-pstack` budget sets each role's starting level, xhigh by default. Raise it one step, up to max, for the hardest or subtlest work. Lower it one step for judgment and two or more steps for routine work. Use fast mode only when the job is urgent, meaning CI or trunk is red or a person is blocked on the result right now. Otherwise use standard speed, the same slug without `-fast`. Verification is the exception and stays on the `swarm workers` model and speed (`grok-4.7-xhigh-fast` by default). Change only the effort level and whether the slug is fast, and keep the family the role names, so a diverse panel stays diverse. If the family has no slug at that level and speed, use its nearest slug. A role on `auto` or `inherit-parent` stays on the parent model. If the Task tool rejects the adjusted slug, do not try another adjusted slug. Use the role's line or default and say so. diff --git a/pstack/agents/poteto-agent.md b/pstack/agents/poteto-agent.md index e1d2df2e8..9b6ebf3b6 100644 --- a/pstack/agents/poteto-agent.md +++ b/pstack/agents/poteto-agent.md @@ -7,3 +7,7 @@ is_background: true # Poteto subagent You are operating as poteto-mode's full agent style. The chat that receives `/poteto-mode` owns the playbook, the todo list, and every Task spawn. You are one of its delegates. Read the `poteto-mode` skill's `SKILL.md` in full before doing any work, including its inline Principles index. Use the absolute path your parent gave you. With no path, before any other work, search `~/.cursor/plugins/` for a file whose path ends in `skills/poteto-mode/SKILL.md`. If more than one file matches, use the copy whose `.cursor-plugin/plugin.json` has the highest `version`. Your skill catalog hides this skill, so a missing catalog entry does not mean pstack is absent. If no such file exists, stop and tell your parent. Navigate to a leaf `principle-*` skill whenever you apply that principle. + +When your brief hands you playbook steps, open a todolist of them before your first edit. Do the implementation assigned in your brief directly, even when the playbook says to delegate it; your parent owns the independent review. Other steps that require a Task spawn you cannot make, or were told not to make, go back to your parent. Immediately leave them pending in the todolist with `returned to parent: ` and list them under "Returned to parent" in your reply. Do not mark them done or skipped. + +Use prerequisite results already supplied in your brief. If a missing prerequisite blocks your assigned work, finish any independent work and end your turn. Keep both the prerequisite and its dependent unfinished work pending in the todolist with `returned to parent: ` and list both under "Returned to parent", naming the result needed to continue. Do not wait for a mid-run reply. End your reply with the skill, playbook, and principle files you read. diff --git a/pstack/docs/harness/claude-code.md b/pstack/docs/harness/claude-code.md index bf154e646..3af361717 100644 --- a/pstack/docs/harness/claude-code.md +++ b/pstack/docs/harness/claude-code.md @@ -8,7 +8,7 @@ pstack skills use Cursor names. In Claude Code, read this file once per session, | --- | --- | | `Task` | `Agent` | | `AskQuestion` | `AskUserQuestion`. In `-p` mode it is absent, so ask in plain text. | -| Open a todolist | Use `TodoWrite` if the session offers it. Otherwise keep the list in your reply and update it at each phase. | +| Open a todolist | Use `TodoWrite` if the session offers it. Otherwise write the list to a Markdown file before your first edit, mark completed items done and chosen skips `skip: ` as you go, and name the file in your reply. Leave returned work unchecked with `returned to parent: ` as soon as you identify it. A background subagent's reply reaches its parent only when it finishes, so a list kept in the reply is no checkpoint. | | Run another pstack skill (`/name` or "the **name** skill") | `Read` `/skills//SKILL.md` and follow it. The `Skill` tool refuses most pstack skills. When you tell the user to type it, write `/pstack:`. | | `Grep`, `Glob` | `Bash` with `rg` when the session has no `Grep` or `Glob`. | diff --git a/pstack/skills/poteto-mode/SKILL.md b/pstack/skills/poteto-mode/SKILL.md index 21993f546..0bc7b7282 100644 --- a/pstack/skills/poteto-mode/SKILL.md +++ b/pstack/skills/poteto-mode/SKILL.md @@ -92,6 +92,8 @@ Read the leaf skill in full for any principle you apply. Each entry names when i **Use `subagent_type: "poteto-agent"` for any subagent you spawn inside a playbook step** (code-writing delegates, ad-hoc helpers). The chat that receives `/poteto-mode` runs the playbook. Never spawn a `poteto-agent` to run the playbook itself. 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`. +Before delegating implementation, complete the blocking steps that require parent-owned spawns and include their results in the brief. Add steps listed under "Returned to parent" to your todolist as pending work. Run returned prerequisites and reviews with their prescribed skills. Spawn a fresh implementation delegate only if implementation remains unfinished or those results require code changes. Give it the remaining scope, prerequisite results, prior report, and branch per the fresh-subagent rule below. + **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.7-xhigh-fast` for code, `claude-opus-5-5-xhigh` 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-opus-5-5-xhigh`), 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`). Each code playbook's configured model comes from its line (`feature, refactoring`, `bug-fix`, `perf-issue`, or `hillclimb`), and the hardest changes read `hardest tasks`. Prose and judgment read `judgment and prose`. **Match the model to the job.** Before each spawn, start from the role's line or default and pick the reasoning level and speed the job needs. The `/setup-pstack` budget sets each role's starting level, xhigh by default. Raise it one step, up to max, for the hardest or subtlest work. Lower it one step for judgment and two or more steps for routine work. Use fast mode only when the job is urgent, meaning CI or trunk is red or a person is blocked on the result right now. Otherwise use standard speed, the same slug without `-fast`. Verification is the exception and stays on the `swarm workers` model and speed (`grok-4.7-xhigh-fast` by default). Change only the effort level and whether the slug is fast, and keep the family the role names, so a diverse panel stays diverse. If the family has no slug at that level and speed, use its nearest slug. A role on `auto` or `inherit-parent` stays on the parent model. If the Task tool rejects the adjusted slug, do not try another adjusted slug. Use the role's line or default and say so.