Documentation
How to use pm7Code
pm7Code is a macOS workspace around the coding agent of your choice. This guide covers the agents it drives, how it talks to them, the layered prompt system, interactive questions, the background Git Service, and the rest of the workspace — so you can treat it as the reference when you need one.
Agents
Bring your own agent, hand parleys over
pm7Code does not ship its own model. You pick a coding agent per topic, and pm7Code is the workspace around it. Six native agents are supported, and you can switch between them or hand a running parley over to a different one at any time.
| Agent | Runtime |
|---|---|
| Claude Code | Anthropic, via the Claude Agent SDK |
| Claude CLI | Anthropic's Claude Code CLI, driven over an interactive terminal |
| OpenAI Codex | OpenAI's Codex |
| Pi | Multi-provider coding agent, defaults to Google Gemini |
| Cursor | Cursor's agent over ACP (Agent Client Protocol) |
| Grok | xAI's Grok over ACP |
One agent per topic
Each topic runs a single agent at a time. The topic, its transcript, prompts, and history live inside the project, not inside the agent.
Handover keeps identity
Switching agents mid-parley keeps the same topic and the same conversation. Only the agent flips; the prior transcript is replayed to the new agent as a primer.
Orchestrator mode
Optionally let one agent act as an orchestrator that delegates sub-tasks to the other agents, so a single parley can combine their strengths.
Protocol
How pm7Code talks to any agent
pm7Code needs every agent to behave consistently — to ask questions the same way, hand off Git the same way, and respect the same conventions. It does this by injecting its own protocol into each agent through that agent's native system-prompt channel, built once when the agent starts.
One source of truth
The protocol is assembled in a single place and shared by every agent. Change it once and all agents pick it up.
Each agent's own channel
Claude Code gets an appended system prompt, Claude CLI gets an appended-system-prompt flag, and Codex gets developer instructions. Same protocol, agent-native delivery.
Independent by design
pm7Code does not rely on a global CLAUDE.md or AGENTS.md to make its own features work. Remove those files and pm7Code still behaves the same.
Vocabulary
Topic, parley, session
Three words come back everywhere in pm7Code, and the difference between them decides when a prompt is sent. Read this section once and the rest of the prompt documentation falls into place.
| Word | What it is | How long it lives |
|---|---|---|
| Topic | A subject you work on, with its own settings, prompts, notes, and history. Every row in the sidebar is a topic. | Stays. A topic survives closing the app, and it survives starting a new parley about it. |
| Parley | One conversation about a topic. It starts with your first message and runs until you start a new one. | Ends when you pick Start a new Parley. The topic stays exactly where it is; only the conversation starts over with a clean context window. |
| Session | The technical connection to the agent behind a parley: the agent process, its resumable session id, and its transcript file on disk. | Comes and goes on its own. A session can sleep and resume without you noticing, and switching agents replaces it while the parley continues. |
A topic is a place
Rename it, give it a note, set its prompts, pin it, archive it. All of that belongs to the topic and outlives any single conversation.
A parley is a conversation
Start a new Parley when the context window is full or the conversation drifted. You keep the topic and its settings, and you get a fresh conversation with the topic context restated.
A session is plumbing
You only meet the word session where it is genuinely technical: a pm7Code Session ID, a session file, or resuming an agent. It is never a unit of work you manage by hand.
Prompt context
The pm7Code prompt flow
pm7Code does not treat every prompt field as the same thing. Some prompts describe stable behavior, some describe the current project, some describe the topic you are working on, and some are temporary instructions for one turn.
User prompt
What you type now
Every message prompt
Added to every message in this topic
Interview prompt
Only when Interview-me is active
The practical result is simple: the first message of a parley carries the inherited context down to and including the Topic prompt, and every message after that stays lean — what you typed plus the Every message prompt.
Inheritance
Lower layers can override higher layers
Each layer inherits from the layer above it. When a lower layer enables an override, that value becomes the effective prompt for everything below it. If the override is enabled but left empty, that prompt is intentionally disabled for that branch.
| Prompt | Edited in | When it is sent | What it controls | Override rule |
|---|---|---|---|---|
| System | App / global settings | Once, with the first message of a parley | Stable behavior for the agent: how it should work, communicate, and respect pm7Code conventions. | Can be overridden by Group, Project, and Topic. An enabled empty override disables the System prompt for that lower layer. |
| Group | Group settings | Once, with the first message of a parley | Shared context for a customer, team, business area, or collection of related projects. | Can be overridden by Project and Topic. A Project override becomes the Group prompt inherited by the topics in that Project. |
| Project | Project settings | Once, with the first message of a parley | Project-specific operating manual: goals, architecture, conventions, constraints, and important decisions. | Can be overridden by Topic. This lets a single topic suppress or replace project context. |
| Topic | Topic settings, Prompts tab, Topic field | Once, with the first message of a parley | What this topic is about: the assignment, the relevant files, the goal you keep working toward. It travels with the startup context of every new parley about the topic. | The lowest inherited layer. A topic can also override the System, Group, and Project prompts it inherits. |
| Every message | Topic settings, Prompts tab, Every message field | With every message you send in this topic | A standing instruction you want repeated on every turn, such as a house style or a language rule. Keep it short — it costs tokens on every single message. | Not inherited by anything. It only applies to this one topic. |
| Interview | Interview-me toggle | Only on the turn where Interview-me is active | A temporary follow-up mode that makes the agent ask questions before it acts. | Not inherited. It is a one-turn suffix that switches off again after sending. |
Injection
When prompts are sent with your message
A parley opens with startup context and then stays lean. The first message carries System, Group, Project, and Topic; every message after that is just what you typed plus the Every message prompt.
First message of a parley
Startup context- 1Effective System prompt
- 2Effective Group prompt
- 3Effective Project prompt
- 4Topic prompt
- 5User prompt
- 6Every message prompt
- 7Interview prompt, only when Interview-me is active
Every message after that
Normal turn- 1User prompt
- 2Every message prompt
- 3Interview prompt, only when Interview-me is active
Startup context is one-shot
System, Group, Project, and Topic go out together with the first message of a parley, and then not again. Start a new parley and they are sent once more.
Every message is per turn
The Every message prompt is appended to every single message you send in this topic, in every parley. Use it only for instructions that must genuinely be repeated.
Interview is optional
The Interview prompt is added only when Interview-me is active. It is meant for guided follow-up questions and switches off again after one turn.
Overriding it for one message
The prompt-mode button next to the input field decides what rides along with the next message. Grey sends your text without any prompt context, black is the normal turn, and blue forces the full startup context — handy right after you changed a Project or Topic prompt and want it applied immediately. Grey and blue spring back to normal after one message; the struck-out state stays silent until you change it back.
Settings
Where to edit and inspect prompts
Group, Project, and Topic settings all have a Prompts tab. Each tab shows the prompt layers that make sense at that level.
Group settings
Use this for context shared across projects in the group. Group can override System.
Project settings
Use this for project-specific context. Project can override System and Group.
Topic settings
Use this for the subject you are working on. A topic can override the inherited startup context and adds its own Topic and Every message prompts.
Suggest prompt
The Suggest prompt button uses a hidden background request to propose a prompt for the exact field you are editing. It can use the current folder, inherited prompts, project files, git context, and recent topic history. The result appears in a preview with Original prompt, User prompt, and Suggested prompt tabs before you replace or append anything.
CView makes prompt injection visible
When pm7Code injects prompt context, CView shows a Prompt Context card. Each row is labeled with its kind and source: Inherited, Group override, Project override, Topic override, Disabled, Topic, Every message, or Active. Open the card and you see the exact text that went out with that message.
Interaction
Agents ask you structured questions
When an agent needs a decision from you, it does not bury the question in a wall of text. pm7Code renders a structured question card with numbered options and an always-present free-text field, right inside the transcript. You answer in the workspace and the agent continues from your choice.
Numbered options
Each question offers a short set of options, numbered by the UI. Pick one, or several when the question allows multiple answers.
Always room for nuance
Every question has an optional text field underneath, so you can add detail, combine it with a choice, or answer in free text alone.
The agent waits for you
Your selection and any free text are returned to the agent as your answer. Nothing is assumed on your behalf while it waits.
Second opinion
Neighbor-agent review
Neighbor-agent review is an optional per-topic setting. When it is on, the active agent consults a designated buddy agent before asking you a question, and presents both recommendations so you can decide with a second opinion in front of you.
Off by default
Review is a per-topic toggle and starts off. Nothing consults a second agent unless you turn it on for that topic.
Both views, clearly labeled
The question card shows the active agent's preference and the buddy agent's recommendation as separate, clearly attributed advice.
Applies from the next parley
The setting is baked in when the agent starts, so toggling it takes effect from the next parley — like the model and permission settings.
Keyboard
Stopping a turn from the Command Center
When the agent is in the middle of a turn, pressing the Escape key while the Command Center input has focus stops the active turn. This is the same action as the Stop current turn button in the CView title bar.
Only stops a running turn
Escape only sends the stop signal when the agent is actively thinking, running a tool, or compacting. If no turn is in flight, the keypress is forwarded to the terminal as a normal Escape, so terminal apps and TUIs keep working as expected.
Works for every agent
The shortcut calls the matching interrupt API for the active agent: Claude Code, Claude CLI, OpenAI Codex, Pi, Cursor, and Grok. The topic, its CView history, and the underlying session id are preserved.
Nothing gets closed by accident
Escape only interrupts the current turn. It never ends the parley and never archives the topic. Use the CView title menu when you want Start a new Parley or Archive.
Status resets immediately
After the interrupt is acknowledged, the CView status returns to idle and the stalled indicators are cleared, so you can send a new prompt without waiting for the agent to wind down.
Projects sidebar
Filter by project, group, or topic
The Projects search field supports qualifiers when you want to narrow the sidebar before applying normal text search. Use this when a word appears in many projects but you only want results from one exact project, group, or topic.
Exact qualifier names
The value after project:, group:, or topic: must match the full name exactly. Matching is not case-sensitive.
Quotes for spaces
Wrap names with spaces in quotes, such as project:"this is a test".
Text still narrows results
Any remaining words are used as the normal search text inside the qualified scope.
| Search | Result |
|---|---|
| project:pm7-code | Shows only the project named pm7-code. |
| project:pm7-code test | Shows only matching topics inside pm7-code, and searches for test inside that project. |
| project:"this is a test" | Shows only the project whose exact name is this is a test. |
| group:clients waiting | Shows matching projects and topics inside the group named clients. |
| topic:"Release notes" deploy | Shows only the topic named Release notes when it also matches deploy. |
| p:pm7-code g:internal t:debug css | Combines the short forms and then searches for css inside the narrowed result set. |
Short forms
project: can be written as p:, group: as g:, and topic: as t:. Long and short forms behave the same way.
Detail search uses the same scope
When you open the topic-detail search from the Projects search field, the same qualifiers restrict which topics are searched.
Git Service
How the Git Service works
At the end of a coding turn, an agent can emit a fenced GitServiceRequest block. pm7Code detects that block in the conversation, creates a visible Git Service card, and enqueues a background Git job in the main process.
The important detail is that the request is asynchronous from the user's point of view. Once pm7Code has accepted the request, the agent is free to continue with testing, inspection, or the next task while commit and push run separately.
The agent finishes files
The agent records the exact files it changed in this turn.
pm7Code enqueues Git
The app validates the request and creates a background job.
Work continues
The Git Service commits and pushes while the parley can move on.
User interface
What you see in pm7Code
A GitServiceRequest appears as a dedicated card in CView. The card shows the job state, the repository path, the files included in the request, and any error returned by the Git Service.
| Status | Meaning |
|---|---|
| Queued | pm7Code accepted the request and placed it in the Git Service queue. |
| Validating | pm7Code checks the exact files, working tree state, and request shape before touching Git. |
| Staging | Only the files listed in the request are staged. Directories and broad pathspecs are rejected. |
| Committing | The Git Service creates the commit with the message supplied by the agent. |
| Pushing | The commit is pushed while the agent can already continue with other work. |
| Succeeded | The requested files were committed and pushed. |
| Failed | The request was stopped before completion. The card shows the reason and no hidden retry is performed. |
Safety
What pm7Code protects
The Git Service is intentionally strict. It is designed to commit exactly the files from the finished turn and to stop when the repository state no longer matches the request.
Exact file list
The request must list concrete files. Directories and broad patterns are rejected so an agent cannot accidentally commit unrelated work.
Snapshot validation
pm7Code records the file state when the request is enqueued and checks that the same content is staged before committing.
No mixed staged work
Existing staged changes that do not belong to the request are a reason to fail, not a reason to create a mixed commit.
Visible failures
Conflicts, drift, hook failures, and push errors are surfaced on the Git Service card for the user to inspect.
Advanced
GitServiceRequest format
Most users do not need to write this block by hand. pm7Code's agent protocol emits it automatically at the end of a turn when files changed. Advanced users and agent authors can use this shape:
```GitServiceRequest
{
"cwd": "/Users/patrickmast/Dev/pm7-code",
"files": [
"site/app/docs/page.tsx",
"site/app/page.tsx"
],
"scope": "docs",
"commitMessage": "docs: document Git Service"
}
```Memory
pm7Code remembers, independent of the agent
pm7Code keeps its own memory of durable facts, preferences, and conventions. Because the memory belongs to pm7Code and not to any one agent, it works the same whether you are running Claude Code, Codex, Pi, Cursor, or Grok — it is not tied to a single agent's own memory store.
It mirrors the Git Service model: the agent only proposes a memory write, and pm7Code is the authority that decides what is actually stored. A proposal shows up as a Memory card in CView with its own status, just like a Git Service card.
Agents propose, pm7Code decides
During a turn an agent can emit a memory proposal. pm7Code validates and stores it; the agent never writes memory directly and never needs to know where it lives on disk.
Scoped and typed
Items are scoped globally or to a project, and typed as a user fact, feedback, project note, or reference. The most important items can be pinned so they are always in context.
Recalled automatically
At the start of a parley pm7Code injects a small primer of pinned essentials, and each turn it weaves in a few concise, relevant memories with source links — for whichever agent is active.
Private and local
Memory is stored locally on your Mac. Suspected secrets are screened out and rejected, and project facts are never automatically promoted to your global memory.
Skills
Write a skill once, every agent uses it
A skill is a small, reusable instruction pack that teaches an agent how to do a recurring job the way you want it done — how you deploy, how you sign a macOS build, how you write a release note. It follows the open Agent Skills standard: a plain SKILL.md file with a name and a description, optionally alongside supporting scripts and assets.
The problem skills usually create is duplication. Every agent keeps its own copy, so the same skill has to be written and maintained several times. Copies drift apart, and you end up tied to whichever agent happens to hold the good version. pm7Code removes that entirely: it keeps one canonical store and shares it with every agent automatically, so a skill written once works the same across all of them.
The same mechanism covers three kinds of instruction pack: skills (used by every agent), plus guides and commands for the agents that understand those concepts. And it no longer stops at one machine: your set lives in your account and follows you to every machine and server you run agents on — see Available everywhere below.
One canonical store
Your skills live in a single place that pm7Code owns. There is one copy to edit, one source of truth, and nothing to keep in sync by hand.
Automatic fan-out
pm7Code shares each skill into every agent it detects, just before an agent starts and once when the app launches. You never have to push or copy anything.
Open standard, any agent
Because skills use the open Agent Skills format, every agent that follows it picks them up unchanged. Today that means Claude Code, Codex, and Pi — new compatible agents work on day one.
Create or edit a skill
Add a skill in Settings, or edit its SKILL.md. One copy, in one place.
pm7Code shares it
The skill is linked into every detected agent automatically — no manual copying.
Every agent uses it
Claude Code, Codex, and Pi all see the same skill the next time they run.
Manage skills in Settings
Settings has a Skills tab where you create, edit, and delete skills. Each skill shows a short description, how many files and how much content it holds, and a set of badges for the agents it is currently live in. Editing opens the SKILL.md in place; a Resync button re-shares everything on demand if you ever want to trigger it yourself. The same tab has an Account sync section to push your local set up to your account and pull it back down.
Available on every machine you use
pm7Code can run your agents on more than one machine — your Mac, a home server, a remote box over Tailscale. A skill only helps if it is physically present wherever the agent runs. So your set lives centrally in your account, and every machine materializes the current version automatically, right before an agent starts. You write it once and it is simply there, everywhere.
Push to your account
In Settings → Skills → Account sync, push your local skills, guides and commands up to your account. That is the single source of truth.
Connect to any machine
Open a topic on any machine you use. Just before the agent starts, pm7Code makes that machine's set match your account.
The agent has it
The skill is in place before the first prompt runs — no copying, no per-server setup, no drift between machines.
Does nothing when nothing changed
Each machine compares what it already has against your account and only writes what actually differs. Connect ten times with an unchanged set and nine of them do no work at all.
Delete travels, safely
Remove a skill from your account and it disappears from every machine on the next connect. pm7Code only ever removes what it put there itself — a skill you made by hand on a machine is never touched.
An agent's own skills win
If a machine already has a real skill of the same name that you installed directly, pm7Code leaves it alone. It never overwrites an agent's existing work to force its own copy in.
Never overwrites your work
Sharing only ever adds links into an agent. If a real skill folder already exists there, pm7Code leaves it untouched rather than replacing it.
Edits are lossless
Editing a skill only changes what you changed. Supporting files — scripts, templates, assets — are preserved exactly, so nothing is lost on save.
Never blocks an agent
Sharing is best-effort and runs in the background of a start. If anything goes wrong, the agent still launches normally; skills can never get in the way of work.
Yours, on your Mac
The canonical store is a normal folder on your machine. You can browse it, back it up, or keep it in version control like any other project asset.
Workspace
Panels around the transcript
Beyond the terminal, the prompt, and the agent transcript, pm7Code adds a few panels that keep the rest of the dev loop in the same window.
Browser View
An optional in-app browser to the right of the transcript, with its own tabs. Open the deploy you just shipped or your local dev server without leaving the workspace.
Live Summary
Independent summary slots distill a long run into its gist as it happens. Each slot has its own provider and model, so you can scan progress without reading every line.
Remote engines
Route a topic through a remote websocket motor so the agent runs on another machine, while the workspace, transcript, and live status stay local.
pm7code command and the WebSocket API.Troubleshooting
When a Git Service job fails
A failed job means pm7Code deliberately stopped before completing the commit or push. Use the card message as the source of truth and send a fresh request after fixing the cause.
| Problem | What to do |
|---|---|
| A file changed after the request was made | Ask the agent to inspect the latest file state and send a new GitServiceRequest. |
| Another topic touched the same file | Resolve which topic owns the file, then let one of them create a fresh request. |
| There are unrelated staged changes | Unstage or commit those changes separately. The Git Service will not mix them into this job. |
| The push failed | Check the visible error in the card. Typical causes are auth, network, or a remote branch update. |
| Nothing changed | No commit is needed. A well-behaved agent should silently skip the request. |