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 sessions over
pm7Code does not ship its own model. You pick a coding agent per session, and pm7Code is the workspace around it. Six native agents are supported, and you can switch between them or hand a running session 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 session
Each session runs a single agent. The session, its transcript, prompts, and history live inside the project, not inside the agent.
Handover keeps identity
Switching agents on a live session keeps the same pm7Code session. 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 session 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 per session.
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.
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, and some are temporary instructions for one session or one interview turn.
User prompt
What you type now
Session prompt
Added after every user prompt
Interview prompt
Only when Interview-me is active
The practical result is simple: the agent starts with the most relevant inherited context, then receives what you typed, and then receives the Session prompt as a per-turn suffix.
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 | What it controls | Override rule |
|---|---|---|---|
| System | App / global settings | Stable behavior for the agent: how it should work, communicate, and respect pm7Code conventions. | Can be overridden by Group, Project, and Session. An enabled empty override disables the System prompt for that lower layer. |
| Group | Group settings | Shared context for a customer, team, business area, or collection of related projects. | Can be overridden by Project and Session. A Project override becomes the Group prompt inherited by sessions in that Project. |
| Project | Project settings | Project-specific operating manual: goals, architecture, conventions, constraints, and important decisions. | Can be overridden by Session. This lets a single session suppress or replace project context temporarily. |
| Session | Session settings | Temporary instructions for the current topic. This prompt is added after every user prompt in that session. | Session can also override System, Group, and Project startup prompts for that one session. |
| Interview | Interview-me toggle | A temporary follow-up mode. It is only added when the Interview-me button is active. | Not inherited. It is a one-turn active suffix that turns off again after sending. |
Injection
When prompts are sent with your message
pm7Code sends startup context only when a session still needs it. After that, normal turns stay lean: your user prompt plus the Session prompt, and optionally the Interview prompt.
First user prompt in a session
Startup context- 1Effective System prompt
- 2Effective Group prompt
- 3Effective Project prompt
- 4User prompt
- 5Session prompt
- 6Interview prompt, only when Interview-me is active
Next user prompts
Normal turn- 1User prompt
- 2Session prompt
- 3Interview prompt, only when Interview-me is active
Startup context is one-shot
System, Group, and Project are sent at the start of a new session or after settings changes mark startup context pending again.
Session prompt is per turn
The Session prompt is appended after every user prompt in that session. Use it for temporary but repeated instructions.
Interview is optional
Interview prompt is added only when Interview-me is active. It is meant for guided follow-up questions.
Settings
Where to edit and inspect prompts
Group, Project, and Session 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.
Session settings
Use this for one active topic. Session can override startup context and adds its own per-turn prompt.
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 session 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, Session override, Disabled, Session, or Active.
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-session 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-session toggle and starts off. Nothing consults a second agent unless you turn it on for that session.
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 session start
The setting is baked into the session when it starts, so toggling it takes effect from the next session start — 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 pm7Code session, CView history, and session id are preserved.
No accidental session close
Escape only interrupts the current turn. It never closes the session or archives it. Use the CView title menu when you want Close current session or Archive session.
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 session
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 session.
Exact qualifier names
The value after project:, group:, or session: 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. |
| session:"Release notes" deploy | Shows only the session named Release notes when it also matches deploy. |
| p:pm7-code g:internal s: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 session: as s:. Long and short forms behave the same way.
Detail search uses the same scope
When you open the session-detail search from the Projects search field, the same qualifiers restrict which sessions are searched.
Git Service
How the Git Service works
At the end of a coding turn, an agent session 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 session is free to continue with testing, inspection, or the next task while commit and push run separately.
Session finishes files
The agent records the exact files it changed in this session.
pm7Code enqueues Git
The app validates the request and creates a background job.
Work continues
The Git Service commits and pushes while the session 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 session. |
| Pushing | The commit is pushed while the agent session 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 session 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 a session 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 session start 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 skill store and shares it with every agent automatically, so a skill written once works the same across all of them.
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.
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 sessions
Route a session 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 session touched the same file | Resolve which session owns the file, then let one session 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 session should silently skip the request. |