Repository navigation
Structured Coding 0.1.0
A workflow for agent coding: agree on the change, let the agent build it, bring the result back into the plan.
This release ships instructions, specifications, and recommended hooks. It reports; it does not enforce. Where a check is not enforced, the documentation says so rather than implying otherwise.
Install
git clone --depth 1 https://github.com/yuema137/structured-coding.git
./structured-coding/scripts/install codex --project /path/to/your-project
./structured-coding/scripts/install claude-code --project /path/to/your-projectThen invoke $structured-coding in Codex or /structured-coding in Claude Code. The default installation registers no hooks.
Read the README first — it opens with who this is not for.
What is in it
- The workflow: overall → step → PR planning, a frozen design and execution contract, autonomous implementation, and a backward update after merge.
- The preserved prompts: PR design requirements, implementation working rules, and TEST / CI / GATE rules, deliberately kept whole.
- Three optional hook presets, none registered by default:
continuity— compact freshness checks, rescue snapshots, recovery instructionscheckpoints— commit-preparation advice and a single non-continuing review noticestandards— runs a project's declared checks after a directgit commitand reports
- Project standards configuration: one tracked file declares codebase-wide review conventions and deterministic checks; a developer may add stricter ones locally but never relax the team's.
- Registrations contain no machine-specific path, so one committed to a shared settings file works for a teammate.
- English is authoritative; Chinese mirrors are synchronized.
What it deliberately does not do
- No merge guard. H3 of the hook contract is unimplemented. A merge boundary needs a trusted operator-approval source, and neither a writable field nor a CLI regex is one.
- No enforcement of design freeze, and no mutation guard.
trigger: "pr"has no hook. Neither host has a PR-completed event, andStop— the nearest moment — fires at the end of every agent turn, which is not whatprmeans. That granularity stays an explicit command.approverecords an operator decision; it does not enforce who made it. Nothing prevents an agent from running it, exactly as nothing prevents an agent from running the installer.
Known limitations
Corrected after release: it has since been observed on Claude Code, with a real agent-runPostToolUsedelivery has not been directly observed under an authenticated turn.git commitreaching the handler. The code in this release is unchanged; only what was known about it is.- The continuity compact validation debt from the first preset release is still open: model-backed manual and automatic compact, and native rescue evidence, have not been exercised end to end.
--check-hooksin this release reports a healthy registration even when Codex has not been told to trust the project, in which case it loads no hooks at all. A later release says so; here, check/hooksyourself.- Codex requires trust at two levels — project trust in
CODEX_HOME/config.toml, then per-hook trust by content hash. A-coverride does not satisfy the first, and hooks then never load, silently.
Requirements
Python 3.9+, Git, macOS/Linux/WSL. Codex 0.153.4+ or Claude Code 2.1.261+ for the optional hooks. No third-party dependencies.
Installed copies carry VERSION, and --check-hooks reports it.