Skip to content

Agents and the library

draft

Every agent Pitwall runs comes from one shared library in the core. Nobody’s personal prompts or skills shape a run: everyone on an instance runs the same definitions, and each run records which version it used.

A definition is a short Markdown file: a role and its rules, with a header that says how it runs.

Field Says For example
Model A model alias deep
Effort How hard the model thinks high
Tools The Claude Code tools the agent may use Glob, Grep, Read for a reviewer
Skills The library skills it is given pitwall-adr
Version Grows with every change 5

A step of the pipeline names a definition and adds its gate and limits. A milestone’s phase uses the same definitions as a ticket: its input names the milestone, the phase’s file and the phases run before it, instead of a ticket’s description. Every agent run stores the version of the definition it used, so a run from last month can still be read against the prompt it actually had.

A definition names a model by alias, never by id:

Alias Used for
deep Planning and code review
balanced Most steps
fast Short, mechanical steps, such as writing the pull request

One instance-wide table maps each alias to a real model id, so a new model release is one edit.

An agent’s prompt is built in layers, in this order:

  1. Claude Code’s own base prompt.
  2. The checkout’s CLAUDE.md and the repository’s own skills in .claude/skills/, loaded by the CLI itself.
  3. The library skills its definition names. Only their descriptions sit in context until the agent uses one.
  4. The agent definition, appended to the system prompt.
  5. The step’s input as the message: the ticket, spec.md and what earlier steps left.

Tools, model and effort come from the definition, as flags of the CLI.

A library skill is a longer procedure or reference an agent loads when it needs it: how to write a decision record, how to write manual tests, what an agent may decide on its own. Skills are versioned like definitions.

For every job, the runner writes exactly the skills its definition names, at their latest version, into the job’s own Claude configuration directory. An agent sees its own skills and no others.

Agents run with a Claude configuration directory of the runner’s own, never the owner’s ~/.claude. The owner’s skills, global CLAUDE.md and memory never reach an agent, and neither does a CLAUDE.md above the checkout. Two runners of different people behave the same.

Pitwall ships its definitions and skills and seeds the library with them the first time the core starts: one definition per step of the pipeline, and two for chats with an agent. Today the library can be read through the API; the screens that show and edit it are not built yet.