Development System
Positioning
development-system is the reusable Codex development hub, also called Development System.
Use this skill as the first entry point when the task is bigger than direct execution and needs requirement anchoring, evidence review, PRD or plan generation, A2A handoff, feedback review, or multi-round adjustment. It routes to downstream skills; it does not replace them.
Non-negotiable Rules
- Codex is the sole control plane and completion authority. Only Codex may approve state transitions, Agent invocations, risk gates, rework routing and
completedwrites. - Execution Agents such as Claude Code or Midscene are downstream executors or observers. Independent Skills keep their own ownership and participate only through versioned interfaces.
- Use Claude-first for multi-file changes, Skill development, complex repairs and cross-module work. A Codex-local exception must be one of
documentation-only,single-file-non-behaviororsimple-local-task. - Codex may self-approve live Agent calls and bounded takeover only when workspace, actions, data, network, tools and timeout all match an active user preauthorization. Any mismatch fails closed.
- User-level Skill installation, production writes, publishing, external messages, credential export and unrelated global changes always require a new explicit user approval.
- Do not continue a loop when feedback has P0/P1 requirement drift, missing evidence, invalid schema, or unmapped actions.
- If a user confirmation conflicts with a grill decision record, confirmed requirement, or active requirement anchor, route to requirements review before execution.
- Use
workspace-copy-firstbefore implementation for any multi-file change, high-risk change, global Skill edit, or single-file behavior change. Direct edits are limited to pure wording, formatting, comments, or other non-behavioral documentation changes. - A stop signal, timeout, circuit state, resource limit or Agent claim is never a completion signal.
completedrequires the Codex CompletionEvaluator.
Router Workflow
- Frame the task. State the interpreted goal, target artifact, scope, non-goals, risk level, and whether the task requires detailed understanding.
- Create or update the requirement anchor. Capture original goal, approved scope, non-goals, FR/AC mapping, authority order, source baseline, manual confirmation actions, and current iteration objective.
- Run evidence gate when needed. Route to
researchwhen the task depends on current external facts, unfamiliar products, third-party tools, security, runtime adapters, standards, or unresolved P0/P1 evidence gaps. - Run grill gate when needed. Route to
grill-systemfor P0/P1 ambiguities, conflicting goals, high-risk choices, irreversible actions, or major phase transitions. - Create governed artifacts. Route to
write-prdfor PRD, architecture, development plan, test plan, RTM and DoR/DoD.write-prddelegates towrite-requirements-prd,architecture-design,development-plan, andtest-plan. Wrap every governed artifact in a stable envelope. - Decompose into Phase and Story. Every complex task needs Phase entry/exit criteria and small, testable Stories mapped to FR/AC, dependencies and evidence.
- Assign private profiles. Use Product/Requirement, Architect, Project Planner, Engineer and QA responsibilities as internal Profiles; Codex controls stage entry and exit.
- Apply workspace and approval gates. Use workspace-copy-first, then require a complete preauthorization match before self-approved live execution.
- Select execution route. Apply the Claude-first decision gate. Use Codex-local only for a recognized exception or an authorized takeover.
- Build the independent handoff. Route packet construction and execution to
handoff-system; dry-run before live and preserve the interface boundary. - Persist runtime state. Append hash-linked events and write Atomic Snapshots for every Story/Round. Publish only the safe status projection.
- Review execution and QA evidence. Validate feedback, drift, unmapped actions, changed files, validation results and independent QA evidence.
- Route rework and enforce limits. Return defects to the Artifact Owner; enforce no-progress, repeated-failure, invalid-feedback, timeout, round and resource limits.
- Coordinate optional concurrency. Parallelize only independent Stories with isolated workspaces and write sets; gate every merge.
- Decide one state. Use only the governed state set. Run
validate_transition; run the CompletionEvaluator beforecompleted.
Landed Review And Publish Lifecycle
After an in-scope Story or Phase has implementation evidence, route through the deterministic landed-review and manifest runtimes before any writeback or publication:
- Run
scripts/landed_review.pyagainst the immutable baseline and observed implementation manifest. - Treat
implementation-driftas blocking. Treat semantic requirement change asrequirements-reviewand create a new anchor; never edit the old anchor. - Candidate document revisions remain
need-review; the runtime never creates RC or approval state. - Run
scripts/document_manifest_runtime.pyor its library contract to recompute content SHA-256 and validate publish state transitions. - Keep GitHub publication and GitBook synchronization as independent states;
gitbook-verifiedrequires explicit content-check evidence.
The local RAG writeback remains owned by rag-intake, rag-schema, and
rag-governance. This Skill may orchestrate them and compare their manifests,
but must not duplicate their material admission or RC rules.
Generic research now enters the research router; legacy Claude-specific execution gates apply to research-guided when Claude is selected. See research execution gate.
Routing Map
| Need | Route |
|---|---|
| Current/high-trust evidence, source gaps, tool capability checks | research |
| Hardening requirement choices or finding hidden assumptions | grill-system |
| PRD, development plan, test plan, RTM, acceptance criteria | write-prd |
| Skill structure, trigger design, validation, packaging readiness | create-skill |
| Phase/Story, role, Artifact, state or long-task governance | relevant bundled contract plus development_runtime.py |
| A2A packet and execution loop orchestration | handoff-system |
| Requirement-anchored packet construction | handoff-packet-builder |
| Claude Code dry-run/live adapter execution | handoff-claude-executor |
| Feedback packet review and drift classification | handoff-feedback-reviewer |
| UI-test or Midscene profile work | ui-test or a dedicated adapter profile |
Phase Capability Map
| Phase | Capability |
|---|---|
| PH-01 | End-to-end governance contract, state, recovery, completion and hard gates |
| PH-02 | Claude-first single-Story live loop, preauthorization, visible state and takeover |
| PH-03 | Product, Architect, Planner, Engineer and QA profile pipeline |
| PH-04 | Ralph-style long-task runtime, checkpoint recovery and circuit governance |
| PH-05 | Isolated multi-Agent execution slots and merge gates |
| PH-06 | Safe observability, resource limits and audit reconstruction |
| PH-07 | MetaGPT module admission and additional Agent interface extension |
CLW Adaptive Loop Capability Map
The CLW-* namespace is a separate product line and must not be inferred from
the historical PH-* or DSCR-PH-* identifiers above.
| CLW Phase | Capability | Entry gate |
|---|---|---|
| CLW-PH-1 | Windows single-Claude, single-Story visible adaptive loop | approved CLW anchor |
| CLW-PH-2 | Serial Story DAG, aggregate recovery, budgets, circuit and Phase completion | CLW-PH-1 CompletionEvaluator passed |
| CLW-PH-3 | Windows isolated worktree slots, write-set and integration gates | CLW-PH-2 CompletionEvaluator passed |
| CLW-PH-4 | Independent Windows Agent profiles, capability/permission match and unified feedback review | CLW-PH-3 CompletionEvaluator passed |
Static contract preparation before an entry gate passes is not stage completion and does not authorize live execution.
Required Outputs
For a full loop, produce or update these artifacts:
- requirement anchor;
- reference coverage review and decision gate when research is used;
- PRD or requirements document;
- development plan;
- test plan or test handoff document;
- local direct implementation evidence when Codex executes without an external Agent;
- A2A handoff packet;
- execution feedback packet;
- Codex review with gap-to-requirement analysis;
- append-only Event History and Atomic Snapshot for long tasks;
- user-safe status and audit projections;
- CompletionEvaluator result;
- system-use retrospective when the user asks to evaluate
development-systemor after a substantial Skill development run; - next-state decision and stop/approval status.
Safety And Escalation
Stop and ask for approval before:
- any live Agent call that is not an exact match for active preauthorization;
- writing outside the approved workspace or data boundary;
- installing dependencies or plugins;
- changing global Codex, WorkBuddy, Claude, browser, or OS configuration;
- installing or overwriting a user-level Skill, even when the workspace candidate passed;
- publishing, deploying, deleting, migrating, or sending external messages;
- exposing sensitive data, credentials, repository contents, private screenshots, or production data.
Stop for requirements review when:
- a feedback packet is invalid or lacks evidence;
- execution actions are not mapped to FR/AC or confirmed decisions;
- P0/P1 drift is detected;
- the task needs a new requirement phase or profile;
- loop progress repeats without new evidence or a new root cause.
References
- Read
references/router-contract.mdbefore using this skill as the top-level router. - Read
references/control-plane-and-authority.mdbefore any control plane, authority order, internal profile or independent Skill boundary decision (PH1-ST-001). - Read
references/metagpt-role-sop-contract.mdbefore role assignment, SOP stage entry/exit or artifact ownership decisions (PH1-ST-003). - Read
references/artifact-lifecycle-contract.mdbefore creating, versioning or tracing any artifact to a requirement anchor (PH1-ST-002). - Read
references/plan-story-contract.mdbefore decomposing a goal into phases and stories (PH1-ST-004). - Read
references/handoff-interface-contract.mdbefore calling an independent Skill or reviewing its feedback (PH1-ST-005). - Read
references/rework-and-gate-reopen-contract.mdbefore defect routing or upstream Artifact changes (PH1-ST-006). - Read
references/event-history-and-recovery-contract.mdbefore checkpoint, resume or takeover decisions (PH1-ST-007). - Read
references/state-and-completion-contract.mdbefore state transitions or completion review (PH1-ST-008). - Read
references/long-task-runtime-contract.mdbefore multi-round Story execution (PH1-ST-009 and PH-04). - Read
references/workspace-and-approval-contract.mdbefore workspace, preauthorization or installation decisions (PH1-ST-010 and PH-02). - Read
references/claude-first-execution-contract.mdbefore choosing Claude, Codex-local or takeover (PH-02). - Read
references/research-execution-gate.mdbefore accepting any research-backed evidence or routing a public-research Story to completion. - Read
references/claude-governance-contract.mdbefore registry validation, preauthorization matching, auto-approval, dry-run-to-live transition, Chinese status projection, or bounded takeover (PH-2). - Read
references/phase4-install-operations-contract.mdbefore compatibility assessment, backup/rollback preparation, installation approval, post-install validation or operations governance (DSCR-PH-4). - Read
references/software-company-pipeline-contract.mdbefore activating Product, Architect, Planner, Engineer or QA Profiles (PH-03). - Read
references/multi-agent-concurrency-contract.mdbefore starting concurrent execution slots or merging results (PH-05). - Read
references/observability-and-resource-contract.mdbefore status display, budgets or governance reports (PH-06). - Read
references/metagpt-module-admission.mdbefore adopting MetaGPT code or adding an Agent interface (PH-07). - Read
references/phase4-controlled-loop.mdbefore planning live adapter loops. - Read
references/clw-phase2-serial-orchestration-contract.mdbefore selecting or resuming multiple serial Stories inCLW-PH-2. - Read
references/clw-phase3-isolated-concurrency-contract.mdbefore creating Windows execution slots, worktrees or merge candidates inCLW-PH-3. - Read
references/clw-phase4-agent-extension-contract.mdbefore registering Midscene or another independent Agent profile inCLW-PH-4. - Read
references/naming-and-boundaries.mdwhen deciding whether to route through this skill or directly throughhandoff-system. - Read
references/requirement-anchor-template.mdbefore creating a saved requirement anchor for complex, schema, Skill, or A2A tasks. - Read
references/phase1-boundary-contract.mdbefore Skill body development, workspace-copy decisions, live/dry-run/deploy approval design, or final-state classification. - Read
references/local-direct-implementation-loop.mdbefore Codex performs a local implementation without Claude, Midscene, or another execution Agent. - Read
references/local-global-skill-edit-loop.mdbefore changing any global Codex Skill. - Read
references/landed-review-contract.mdbefore post-implementation document reconciliation. - Read
references/document-manifest-contract.mdbefore manifest validation or publish-state transitions. - Read
references/system-use-retrospective.mdwhen reviewing how this system performed during a real development run. - Read
references/publish-package-contract.mdbefore staging, publishing, retrying, or independently verifying GitHub and GitBook delivery.
Validation
Run from this Skill directory:
python scripts/validate_development_system.py
python scripts/test_phase_story_contract.py
python scripts/test_development_runtime.py
python scripts/test_phase4_governance.py
python scripts/test_full_refactor_contract.py
python scripts/test_phase1_boundary_contract.py
python scripts/test_skill_governance_contract.py
python scripts/test_clw_phase2_phase4_runtime.py
python scripts/test_clw_phase2_serial_runtime.py
python scripts/development_runtime.py project-status-zh --state all
python scripts/development_runtime.py generate-ph2-fixtures --output-dir assets/fixtures
python scripts/development_runtime.py generate-ph2-change-record --output-dir .
Then run the generic create-skill validator with --require-change-records, a sensitive-data scan and a forward test. Workspace validation does not authorize user-level installation.
PH-2 Capability
| Story | Capability |
|---|---|
| DSCR-ST-2-001 | Claude Agent registry with stable identity, capabilities, version, adapter, and completion-authority isolation |
| DSCR-ST-2-002 | Active preauthorization policy lifecycle with hash, expiry, and all-dimension boundary |
| DSCR-ST-2-003 | Exact-match auto-approval with redacted audit record; mismatches fail closed |
| DSCR-ST-2-004 | Dry-run-to-live transition gate that cannot be bypassed by a missing or mismatched manifest |
| DSCR-ST-2-005 | Stable machine state codes with Chinese status labels for all 11 governed states |
| DSCR-ST-2-006 | Bounded same-Story Codex takeover for unavailable/timeout/invalid feedback |
DSCR-PH-4 Capability
| Story | Capability |
|---|---|
| DSCR-ST-4-001 | Compatibility matrix, source/target hashes, backup manifest and rollback readiness |
| DSCR-ST-4-002 | Exact, time-bounded user installation approval gate; workspace validation and dry-run never authorize installation |
| DSCR-ST-4-003 | Chinese status, resource/failure budgets, evidence retention and audit reconstruction |