English | 简体中文
pstack-herdr
This is a fork of the pstack plugin from cursor/plugins. Lauren Tan wrote pstack and released it under the MIT license. This fork keeps that plugin and sends roles through herdr. The upstream plugin README is pstack/README.md. The guide is pstack/docs/guide/README.md.
Contents
What this fork changes
Upstream pstack sends a role to a Cursor Task with a model slug such as grok-4.7-xhigh-fast or claude-opus-5-5-xhigh. This fork adds hc:<program> and hc:<program>:<model>. Those values open a herdr window with hc instead of a Task.
setup-pstack runs command -v for claude, codex, grok, and pi, and also for hc and herdr. It writes the role table from the commands it finds. herdr is not required. The # agents: line lists herdr only when command -v finds it. If hc is missing, every role stays on the upstream table with no hc: values.
When hc, Claude, Codex, Grok, and Pi are all installed, code roles use hc:codex, research roles use hc:grok, and swarm workers use hc:pi. Panels are Claude plus hc:codex and hc:grok. Pi is not on a panel.
When only hc and Codex are installed, the table uses hc:codex:gpt-6-astra, hc:codex:gpt-6.1-sol, and hc:codex:gpt-6-luna.
harness/pstack/claude-code/ is the generated Claude Code tree. harness/pstack/codex/ is the generated Codex tree. The Codex tree has .codex-plugin/plugin.json, and the repo marketplace is .agents/plugins/marketplace.json.
Architecture
pstack/skills is the source. scripts/generate-pstack-harness-trees.mjs copies it into the two harness trees. scripts/check-pstack-docs.mjs checks pstack/README.md and pstack/docs/guide against that source. setup-pstack writes the role table for the host it is running in.
flowchart TB
subgraph src ["pstack/skills"]
playbooks["poteto-mode and 23 playbooks"]
principles["24 principle skills"]
workflow["how, why, architect, arena, swarm, interrogate, reflect"]
verify["verify-this, control-cli, control-ui, tdd, statechart"]
prose["unslop, deslop, no-comments"]
setup["setup-pstack"]
end
agents["pstack/agents: poteto-agent, comment-sicko"]
docs["pstack/docs and pstack/README.md"]
gen["scripts/generate-pstack-harness-trees.mjs"]
check["scripts/check-pstack-docs.mjs"]
cc["harness/pstack/claude-code"]
cx["harness/pstack/codex"]
mClaude[".claude-plugin/marketplace.json"]
mCodex[".agents/plugins/marketplace.json"]
mCursor[".cursor-plugin/marketplace.json to pstack"]
cursorRule["~/.cursor/rules/pstack-models.mdc"]
claudeRule["~/.claude/rules/pstack-models.md"]
codexRule["AGENTS.md or AGENTS.override.md"]
src --> gen
agents --> gen
docs --> gen
gen --> cc
gen --> cx
check --> src
mClaude --> cc
mCodex --> cx
mCursor --> src
setup --> cursorRule
setup --> claudeRule
setup --> codexRule
The parent is Claude Code or Codex. poteto-mode reads the role table. An hc: role with hc on PATH opens a herdr window. Otherwise the role stays on the upstream table. The parent runs the verification.
flowchart TB
user["user"]
orch["orchestrator: Claude Code or Codex"]
mode["poteto-mode, playbooks, skills"]
table["role table from setup-pstack"]
gate{"hc value and hc on PATH"}
hc["hc run --bg"]
progs["codex, grok, pi DeepSeek, claude"]
back["hc wait and hc read"]
parent["parent runs the verification"]
upstream["upstream role table, no hc values"]
user --> orch --> mode --> table --> gate
gate -->|yes| hc --> progs --> back --> parent
gate -->|no| upstream --> parent
How dispatch works
The rules live in pstack/skills/setup-pstack/SKILL.md and in the Subagents section of pstack/skills/poteto-mode/SKILL.md.
A value hc:<program> does not spawn a Task. The parent reads hc --skill, then opens a named window.
hc run --bg --name <short-name> <program> "<brief>. When done run: hc send $HC_TERMINAL_ID <result>"