How a session loads the playbooks
Every engineering session on this repo runs on a set of playbooks that ship as the pstack plugin for Claude Code. A playbook is the list of steps for one kind of task. The plugin’s session skill picks the playbook, and AGENTS.md, under “How every session starts”, names it. This page explains why a session needs a particular first message to get the playbooks, and where the plugin lives.
Why an agent cannot load them by itself
Section titled “Why an agent cannot load them by itself”The plugin marks its skills for people to invoke. Claude Code’s Skill tool refuses an agent that asks for one of them. So a session gets the playbooks in one way. When its first message begins with the session skill’s slash command, /pstack:poteto-mode, Claude Code loads the skill as a person’s invocation. It makes no difference whether a person typed the message or a script did.
- A person who opens a session types the command first, then the task. A session opened without it should ask the person to type it.
agents-git sessionstarts a session nobody types into. It makes a copy off main, then runsclaude --permission-mode auto, on the machine’s default model, in a herdr pane in that copy, with the plugin loaded through--plugin-dir. The first message is the command, the job, andDone means: <check>. The command prints how to watch it, how to take it over, and how to wait for it to go idle.- Any other tool that starts a session puts the command first in its prompt.
Where the plugin lives
Section titled “Where the plugin lives”agents-git session finds the plugin in this order.
~/.agents/playbooks/current, the set that theagents-playbooksrepo’sinstallwrites.- The highest version of the plugin under
~/.claude/plugins/cache/cursor-plugins/pstack/, whichclaude plugin install pstack@cursor-pluginsinstalls.
agents-git session stops and prints the install command when it finds neither. The session adds the plugin folder with --add-dir, so reading its skills needs no approval.
A session the daemon starts loads only the set whose tree hash equals packs/playbooks.lock.json. It tries a box image’s copy, then ~/.agents/playbooks/current, and never the plugin cache.
How a session reaches the other skills
Section titled “How a session reaches the other skills”The session skill routes to other skills by name, such as how, architect and the principle-* leaves. The Skill tool refuses those too. The plugin’s adapter for Claude Code, docs/harness/claude-code.md inside the plugin folder, says to read skills/<name>/SKILL.md from the plugin folder and follow it. A delegate that a session spawns as the plugin’s agent type, pstack:poteto-agent, reads the session skill from an absolute path in its brief, so every brief carries that path.
A session opens a todo list whose first items are the matched playbook’s steps, copied as written. A step it skips stays in the list as skip: <reason>.
What the repo turns off
Section titled “What the repo turns off”.claude/settings.json turns off seven process skills that compete with the playbooks. They are spec-driven-development, planning-and-task-breakdown, incremental-implementation, test-driven-development, debugging-and-error-recovery, context-engineering and no-mistakes. Codex has no switch for skills in a repo’s config, so a Codex session leaves them unused.
Where the plugin is not installed, work from AGENTS.md alone and say so in the report.
Agents’ own coding sessions
Section titled “Agents’ own coding sessions”The app applies the same idea to the sessions it starts. A pipeline stage runs inside the playbooks only when its file sets playbooks: true. A session that is not a stage does when its workspace holds a cloned repo. The machine puts the command in front of the text only when Claude starts a new conversation, since a resumed one is already inside the playbooks. A machine with no set equal to the pin runs the task without the playbooks and says This machine has no playbook plugin, so this task runs without the playbooks.