PACEflow

English | 简体中文
Deterministic workflow enforcement and persistent engineering memory for long-running coding agents.
PACEflow keeps coding agents on a verifiable engineering workflow during long, stateful tasks. It enforces workflow transitions at tool boundaries, persists task state outside the model context, and restores that state across sessions and context compaction.
PACEflow ships as a Claude Code plugin that also installs into OpenAI Codex CLI (same plugin directory, same hook scripts, artifact writes via a bundled MCP server on Codex — see Codex CLI (MVP)). Its underlying reliability model—deterministic gates, persistent artifacts, verification, and review—addresses problems common to long-running coding agents.
Why PACEflow?
Long-running coding-agent tasks introduce workflow continuity failures:
- implementation begins before the plan is approved;
- task state drifts during a long session;
- important context disappears after compaction or a new session;
- verification or review is skipped at closure;
- process instructions written only in prompts remain probabilistic.
PACEflow addresses these failures at the workflow layer. Instead of asking the model to remember every transition, it places deterministic hooks around tool use and session completion, persists the working state, and delegates record-keeping to a dedicated artifact-writer agent.
Deterministic gates, not deterministic intelligence
The model still plans, implements, verifies, and reviews the code. A PACEflow gate confirms that a required step occurred in the expected order and left an auditable record; it does not claim that the result of that step is correct.
VERIFIED means verification was performed and recorded. REVIEWED means review was performed and recorded. Correctness remains the responsibility of tests, CI, reviewers, model capability, and human judgment.
What PACEflow does
| Boundary | Enforcement |
|---|
| Before code changes | When PACEflow is enabled, an active CHG or HOTFIX must exist and carry explicit user approval. |
| During implementation | Managed workflow artifacts (except the user-maintained spec.md) and runtime control files are protected from direct main-session edits. |
| Before session completion | Open work must be completed, verified, reviewed, and archived. |
| Across sessions | Active change state and relevant project memory are restored on startup, resume, and compaction. |
| During record-keeping | A dedicated artifact-writer maintains structured artifacts, reducing record-keeping in the main coding context. |
The current implementation uses the host's lifecycle hooks (Claude Code hooks; Codex CLI hooks through a thin host adapter), so the gates run at tool boundaries rather than depending only on prompt compliance.
The PACE lifecycle
| Stage | Meaning | Recorded outcome |
|---|
| Plan | Define the change | Scope and task list |
| Artifact | Create a persistent change record | changes/<id>.md plus indexes |
| Check | Obtain user approval | <!-- APPROVED --> |
| Execute | Implement the approved change | Work record |
| Verify | Run and record relevant checks | Verification evidence and <!-- VERIFIED --> |
| Review | Review the change before closure | Review evidence and <!-- REVIEWED --> |
CHG and HOTFIX records are deliberately small: each one should be independently executable, verifiable, and closable. Large plans are split into multiple changes rather than treated as one permanent project container.
Plan → Artifact → Check → Execute → Verify → Review → Close
P A C E V R
Installation
On Claude Code, PACEflow requires Claude Code 2.1.218 or newer (Codex CLI: see below). Two hard dependencies: the hook manifest uses the hooks[].args execution form (introduced in 2.1.139), and it registers the SubagentStart hook event (earliest version verified to support it: 2.1.218). A host that does not recognize any event name in a plugin's hooks.json silently drops the plugin's entire hook set (verified empirically) — on older hosts every PACEflow gate would fail without any warning.
Run these commands inside Claude Code:
/plugin marketplace add paceaitian/paceflow
/plugin install paceflow@paceaitian-paceflow
Restart Claude Code after installation, then enable PACEflow in a project:
/paceflow:enable