diff --git a/pstack/README.md b/pstack/README.md index c29f91cb6..cdc9bb04e 100644 --- a/pstack/README.md +++ b/pstack/README.md @@ -242,6 +242,8 @@ cursor already has a great plan mode which works great with pstack. but personal ## make it yours +Use [`/goal`](./skills/goal/SKILL.md) when setting a goal and delegating bounded tasks. Astra at medium effort owns integration and verification, Luna at max handles exploration and research, and Sol at high implements. An independent Astra review at xhigh runs only when needed. The skill checks model availability before dispatch and uses the current root session if it cannot change it. See [`/setup-pstack`](./skills/setup-pstack/SKILL.md) to override goal roles. + `poteto-mode` is my style. you may not want exactly that. type [`/automate-me`](./skills/automate-me/SKILL.md). it mines your recent transcripts, drafts a `-mode` skill from how you've actually worked, and routes through pstack underneath. you keep pstack as the base and end up with your own routing skill alongside `poteto-mode`. diff --git a/pstack/skills/goal/SKILL.md b/pstack/skills/goal/SKILL.md new file mode 100644 index 000000000..f9f97ec78 --- /dev/null +++ b/pstack/skills/goal/SKILL.md @@ -0,0 +1,34 @@ +--- +name: goal +description: Run an explicit goal with on-demand subagents. Use when the user sets a goal and asks to delegate tasks, or requests the cost-efficient GPT agent tree. Own integration and verification at the root. +--- + +# Goal + +Split useful work. Spawn only roles that advance the goal. + +## Model selection + +Use these defaults for this workflow. Explicit user choices and configured `goal` roles override this table. Other workflow model defaults do not override it. + +| Role | Model | Reasoning effort | Responsibility | +| --- | --- | --- | --- | +| goal root | gpt-6-astra | medium | Scope, delegate, integrate, verify | +| goal explorer | gpt-5.6-luna | max | Bounded repository investigation | +| goal worker | gpt-5.6-sol | high | Implementation and relevant tests | +| goal researcher | gpt-5.6-luna | max | Focused lookup with sources | +| goal reviewer | gpt-6-astra | xhigh | Independent review when justified | + +Check the session's available models and spawn schema before dispatch. In Codex `collaboration.spawn_agent`, pass `model` and `reasoning_effort` separately, with `fork_turns: "none"` and a self-contained brief. Full-history forks cannot accept overrides. In a `Task` harness, use its supported model selection fields and only confirmed model identifiers. Never invent a slug by appending the effort. If a requested model or effort is unavailable, report it and request a replacement before dispatching that role. Continue independent local work meanwhile. Never substitute Sonnet. + +The root row is a session preference. A skill cannot change the running root's model or effort. Report any known mismatch and continue on the current root unless the user requires an exact match. Do not spawn a second orchestrator to simulate switching the root. + +## Run the goal + +1. State the outcome, constraints, and smallest checks that will prove completion. When the user explicitly requests a persistent goal, use the harness goal tool if available. Reuse an existing active goal that already covers the work. Set a token budget only when the user supplies one. Without a goal tool, track the objective in the current plan and state that it is session-local. +2. Identify independent tasks with concrete outputs. Keep short or tightly coupled work at the root. Spawn an explorer for an unanswered repository question, a researcher for external facts, or a worker for an implementation unit. A task needing only implementation gets no automatic explorer or researcher. Respect the harness concurrency limit and reserve useful integration or investigation work for the root. +3. Give each child the objective, relevant paths, permitted writes, constraints, dependencies, completion check, and expected report. Require evidence, unresolved questions, and changed paths where applicable. Explorers and researchers are read-only. Workers own disjoint files or isolated worktrees. Children return to the root without spawning descendants unless the root explicitly assigns further delegation. +4. Collect completions as they arrive and unblock dependent work. Read the actual diff or cited evidence before accepting a report. Reuse a worker for a correction with a refreshed brief. After repeated failure, reassess the premise or narrow the task before spending another attempt. Stop obsolete children when the goal changes. +5. Integrate at the root and run the selected checks against the combined result. Root edits are allowed. Worker self-reports do not establish completion. For this workflow, this delegation policy replaces mandatory feature fan-out, automatic arena panels, and the long-running Orchestrate coordinator's prohibition on editing code. Explicitly requested specialist workflows still apply. +6. Request the reviewer only for a concrete unresolved risk, such as concurrent state changes, a security boundary, conflicting evidence, or a user-requested independent review. Name the risk first. Give the reviewer the objective, constraints, final diff, and raw evidence without the worker's verdict. Require findings with file references and a way to verify each claim. Resolve supported findings and rerun affected checks. +7. Complete the authorized delivery only after the outcome and checks pass. Mark a persistent goal complete only then, using the harness's goal lifecycle rules. Report the result, evidence, material limits, and remaining action. If blocked, preserve the outstanding work and name the missing input without claiming completion. diff --git a/pstack/skills/poteto-mode/SKILL.md b/pstack/skills/poteto-mode/SKILL.md index 2de0216e7..d53c0a8fe 100644 --- a/pstack/skills/poteto-mode/SKILL.md +++ b/pstack/skills/poteto-mode/SKILL.md @@ -88,6 +88,8 @@ Read the leaf skill in full for any principle you apply. Each entry names when i ## Subagents +For an explicit goal with on-demand delegation, use the [goal skill](../goal/SKILL.md). Its role table and delegation policy take precedence over the defaults below for that run. + **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`). @@ -133,6 +135,7 @@ A large or cross-cutting effort (a migration across many call sites, an ambitiou - **Babysit.** Driving a PR or a stack to merge-ready: conflicts, review threads, CI. `playbooks/babysit.md`. - **Shipping.** The half after Babysit. Independently verifying a green stack, then landing the contiguous verified run bottom-up through `gh` by default or Origin when its CLI is available. `playbooks/shipping.md`. - **Autonomous run.** A long task to drive to completion without stopping ("run until done", "/loop until X"). `playbooks/autonomous-run.md`. +- **Goal with subagents.** An explicit goal split into bounded tasks with on-demand delegation. Use the [goal skill](../goal/SKILL.md) for model selection, dispatch, and root verification. - **Orchestrate.** A standing project handed to one coordinator chat: multi-day, many stacked PRs, dozens to hundreds of subagents, minimal human turns ("run this whole project", "own this migration until it lands"). Distinct from Autonomous run, which drives one task to a predicate. Work one agent could finish inside the session's budget routes there, not here, however program-shaped the phrasing sounds. `playbooks/orchestrate.md`. - **Autopilot-full.** A queue of independent PRs run to merged with full autonomy. One owner per PR carries build through merge, and the root swarm-verifies each merge-ready head before its owner merges ("autopilot this queue", "full autopilot", one-owner-per-PR programs). `playbooks/autopilot-full.md`. - **Autopilot-stack.** A queue of changes built and verified with full autonomy, delivered as one linear reviewed base-branch stack the operator lands herself ("autopilot-stack", "stack them, don't ship", "build the stack, I'll land it"). `playbooks/autopilot-stack.md`. diff --git a/pstack/skills/setup-pstack/SKILL.md b/pstack/skills/setup-pstack/SKILL.md index a1f79c0cc..7743bc3cc 100644 --- a/pstack/skills/setup-pstack/SKILL.md +++ b/pstack/skills/setup-pstack/SKILL.md @@ -5,6 +5,10 @@ description: Configure which models pstack uses per role. Detects your available # Setup pstack +For the cost-efficient GPT goal workflow, use the [goal skill](../goal/SKILL.md). Its table owns the default goal roles and reasoning efforts. An explicit request for that tree already selects those defaults; ask only about unavailable choices. Keep goal overrides separate from the other roles below. Store model and effort separately, for example `goal worker: gpt-5.6-sol` and `goal worker effort: high`. In Cursor, include those lines in the rule below. In other harnesses, use their existing always-loaded instruction file and name the target before editing. Preserve unrelated instructions. If no override is needed, the goal skill's defaults suffice. Root settings describe the desired session and do not change a running model. + +For goal-only setup, validate the requested models and efforts, apply any requested overrides, report the result, and stop. The steps below configure the other roles. + Write `~/.cursor/rules/pstack-models.mdc`, an always-applied rule that sets pstack's model per role. ## Steps @@ -27,7 +31,7 @@ Every real slug written must be in the detected set. `inherit-parent` and `auto` ### 5. Write the rule -Write `~/.cursor/rules/pstack-models.mdc` with `alwaysApply: true` and one line per role, using the same labels poteto-mode uses. Overwrite the whole file so re-runs stay idempotent. Shape: +Write `~/.cursor/rules/pstack-models.mdc` with `alwaysApply: true` and one line per role, using the same labels poteto-mode uses. Preserve existing `goal` model and effort lines unless the user changes or removes them. Include selected goal overrides alongside the roles below when rewriting the file so re-runs stay idempotent. Shape: ``` ---