/engineering:setup-codex-development-harnessfrom engineering
Use when adopting an agent in a new or existing repo, when agents re-explore the codebase every session, when project state (done/doing/abandoned) is scattered or stale, when switching issue trackers (local ledger, GitHub, Linear, custom), when wiring an orchestrator to dispatch agent work autonomously (acceptance gates, failure states, dependency unblocking), when a long-horizon roadmap or milestone sequence needs a durable home agents pick up every session, when workflow skills (to-issues, to-prd, triage) need tracker/label/artifact/domain-doc/quality-gate config, or when an existing harness needs refresh or a drift check.
Ships in engineering. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Create or refresh a repo-local harness so agents start from a durable map
instead of re-exploring. Core artifacts: tracker contract
(docs/harness/tracker.md), quality gates
(docs/harness/quality-gates.md), index + routing
(docs/harness/index.md), and
the bootloader block. The harness owns project workflow routing and
handoffs; selected skills supply methodology; orchestrators and workflow skills integrate by reading
tracker.md + index.md + quality-gates.md — the skill never generates
orchestrator config or per-skill shadow config.
tracker.md's
state machine. Orchestrators read it; they never decide it.codex-harness markers + docs/harness/tracker.md → refresh mode.codex-harness markers without tracker.md → v2 migration.docs/harness/, docs/work-ledger/) without
markers → v1 migration.Record a compact project profile in the index: actors/goals, important state transitions, data invariants, external side effects and operational risks. Map only applicable risks to design examples and verification (for example, UI cancel/undo, retry/idempotency for integrations, dry-run/rollback for scripts). Use observed evidence; distinguish unknowns from confirmed requirements.
Explore detections (large repos: read-only subagents per area):
CONTEXT.md single-context vs CONTEXT-MAP.md
multi-context; docs/adr/ locations); existing roadmap/milestone docs
(ROADMAP.md, milestone sections) — roadmap-residence candidates; existing
spec/plan/artifact roots (docs/features/, docs/superpowers/plans/,
docs/specs/, similar) — artifact-residence candidates.git log for milestone-level events.tracker.md; live GitHub
issues; Linear/custom-tracker traces (configs, issue-ref formats, prior docs);
existing docs/work-ledger/. Also detect the access path
(MCP tools, gh CLI, none). A remote candidate needs structural evidence
(a configured remote, tracker config, or live issues) — CLI auth alone is
not a candidate; trace-only evidence (issue refs without live access) is a
candidate but flagged unverified.WORKFLOW.md, CI
dispatch jobs). Register in Coexisting Systems; never edit their config.Classify coexisting systems; never rewrite a foreign system's content:
| Class | Example | Disposition |
|---|---|---|
| Orthogonal | workflow/process skills, orchestrator config | compose into index.md; consistency-check against tracker.md |
| Overlapping | old state notes in CLAUDE.md, memory-bank files, prior tracker/label config, existing ROADMAP.md | truth moves to harness; foreign file gets the pointer per § 5 Bootloaders (inlining pointer where its agent requires one) — ask before editing any foreign file. An existing roadmap doc is either adopted in place (index routes to it) or migrated into roadmap.md — user decides |
| Conflicting | rival state system in active use | list differences; user decides which survives |
Present: detection summary, topology verdict (core unless observed navigation difficulty warrants extended), absorption dispositions, and tracker adjudication:
Roadmap residence: existing roadmap/milestone doc found → adopt in
place or migrate into docs/harness/roadmap.md (user decides; one
residence either way, index routes to it). If none exists, create one only
for a real multi-milestone sequence; otherwise keep the backlog in the tracker.
Artifact residence: existing per-project/per-slice artifact root found →
adopt it; none → default to docs/features/<project-or-roadmap-slug>/ for large
project packets, with slice packets under
docs/features/<project-or-roadmap-slug>/<slice-slug>/ only when a slice has real
artifacts. Workflow-skill default paths (for example
docs/superpowers/plans/) are adopted only when chosen as the artifact
residence; otherwise record the override in index.md. Do not create empty
packet directories during setup.
Domain layout: single-context vs multi-context from the Docs detection;
confirm the route in index.md before writing. Do not create empty domain
docs during setup: create CONTEXT.md / CONTEXT-MAP.md lazily when a
term is resolved, and create ADRs lazily when a decision is hard to
reverse, surprising without context, and a real trade-off.
Bootloader reach: name the block's residence and ask which agents the user runs in this repo. An existing bootloader file is not evidence that its agent is in use, nor its absence evidence that one is not. For each agent in use with a reach gap (§ 5), propose the residence plus the inlining pointer. Do not create bootloaders for agents the user does not run.
Route boundary discovery through the detected design skill when new work adds
or changes a subsystem, persisted state, external dependency, state owner, or
cross-component interface. The harness states when to invoke it and where
confirmed decisions live; the skill supplies the questioning method. With no
such skill, use the brief boundary trace in core-templates.md.
Workflow labels (when workflow skills are detected): propose the
category roles (bug, enhancement) and state roles (needs-triage,
needs-info, ready-for-agent, ready-for-human, wontfix) mapped to
any existing repo labels (see tracker-adapters substitution rule).
And acceptance authority for the generated state machine: agent-gated (default — a reviewer agent distinct from the author accepts, with verification evidence; humans handle escalations only) or human-gated (a human accepts the Done-equivalent state). Record the selected profile explicitly; an installed orchestrator does not change it. Existing human-gated projects retain their policy until the owner explicitly changes it. Child acceptance and parent/release acceptance may differ; record each boundary in the tracker. Both profiles keep two invariants: the author of a change never accepts its own item, and a human may set any state — profiles grant agent authority, they never revoke human authority.
For user-facing product slices, also choose whether human product acceptance
is required. If required, keep the slice item pending after independent
technical review; deliver a usable candidate and
observable scenarios, then record the human decision or return feedback to
implementation. Record this boundary in tracker.md without making every
technical item human-gated. Do not add a ceremonial gate to projects without
user-facing slices.
When agent delivery is authorized, record the merge target, required checks,
human-only exception paths/actions, and escalation conditions. An independent
reviewer and verification must cover the exact revision delivered. New product
scope, changed approved UX/contracts or missing decisions return to clarification;
AFK/readiness alone grants no extra authority. Merge and release/deployment are
separate permissions. With a runtime, reference its checked project acceptance
artifact from tracker.md as the single residence of executable values; without
one, keep the same policy in tracker.md. Never install a scheduler-specific
workflow engine into the generic harness. Refuse unsupported policy mappings.
Present the observed delivery path and consequential unknowns during Propose. Ask the user when repository evidence cannot establish normal practice, authority, target, required post-delivery checks, or recovery ownership. Include a recommended default with its evidence and trade-off; group related questions and do not turn an absent workflow into an assumed policy. Record confirmed answers in the generated harness and leave unresolved stages explicitly undetermined. Do not authorize an external side effect from an inference. Route executable commands to their existing README, operations/workflow docs, or native configuration. Create a new operations document only when real steps need a home; architecture docs explain system boundaries, not the runbook. Generate only stages the repo actually uses or explicitly chooses.
For interactive work, propose a minimal lifecycle rule in index.md: each
independently accepted item needs an identifiable candidate. In Git repos,
plan tasks within one item may share a branch; prefer a branch per item unless
the repo has an explicit integration policy. Before creating the next branch,
compare its item with unmerged work on the current branch. An independent item
starts from the repo's verified integration target (often main), not the
current feature tip. Stack on another item's exact candidate only for a real
recorded dependency; record that item, base revision and integration order.
If the target or dependency cannot be established, clarify it before choosing
a base. Reuse a free worktree after accounting for prior work; keep one while a
process, active review or PR
feedback needs it. Omit Git mechanics for projects without a Git repo.
Bind every candidate to one item's approved scope and acceptance criteria.
Discovering another item permits read-only investigation. Record a dependency
on the current item or notify the existing owner; create a follow-up only when
no item exists. Edits wait until that item is eligible, unowned and separately
claimed, with its base, candidate branch and checkout recorded. Only then may
the agent switch to it. A required dependency blocks only affected work; after
it is accepted, refresh the dependent candidate identity and verification.
Before reuse or cleanup, preserve commits and useful local files. Managed
worktrees use their platform owner for archival/removal. Cleanup follows
landing, explicit abandonment or a safe blocked-work handoff; it does not
itself authorize merge, discard or force removal. Existing repo policy wins
when it preserves these review and data boundaries.
Require the landed target to pass its applicable checks before cleanup.
For delivery in scope, distinguish accepted source changes from completed
integration, release/deployment and local installation. Record stage-specific
identities and observed outcomes in the work item, or link a separate delivery
item when delivery has its own acceptance or timing. Preserve successful stages
on later failure; block the affected delivery work with its recovery owner and
precise next action. Never repeat a potentially non-idempotent publish blindly.
State the execution relationship once in Work Production: the harness is the common development contract. Interactive Goal mode owns an item end to end; an orchestrator such as SMDA schedules role attempts against the same contract, refines shared phases and owns runtime state. It must not define a competing project phase contract or parallel tracker lifecycle.
Wait for approval before writing.
Generate from core-templates.md and the chosen preset
in tracker-adapters.md (plus
extended-templates.md if approved). Every file gets
the generated header. Local mode writes all four ledger files. Remote mode
uses tracker terminal history; preserve existing archives and create an export
only when offline history or migration requires one. Backfill local
completed.md from git milestones. Write roadmap.md only for an approved
roadmap residence. Always write
docs/harness/quality-gates.md. Record workflow-skill routing, artifact
adapters, Domain Docs routing, and Quality Gates routing in
docs/harness/index.md; do not generate docs/agents/*.
The harness block lives in exactly one file — default AGENTS.md; if only
others exist, ask which hosts it; if none, ask which to create (recommend
AGENTS.md). Every other bootloader gets a pointer to it, in the form
core-templates.md gives: the plain pointer, or the inlining
pointer where the rules there call for it. Mirror drift: warn in the report, do
not fix.
One residence is not the same as one reader. An agent in use whose auto-loaded bootloader is absent, or is neither the residence nor an inliner of it, has a reach gap. Close it by creating or patching that file with the inlining pointer; patching only the files that already exist is not enough. Refresh reports the same condition as bootloader reach.
Verify the agent's auto-loaded filenames and inlining syntax in the current environment, from the installed agent rather than memory; with unverified syntax, write the plain pointer and report the gap instead of guessing. If no bootloader in the repo is auto-loaded by an agent the user actually runs, say so in the report — the harness is then opt-in reading, not a live contract.
All hard gates must pass before reporting done. Exercise the scenarios in behavioral-checks.md against the generated instance; file presence alone does not verify agent behavior:
Hard rules: list
from core-templates.md § Bootloader block — appears in one file only
(grep -l 'Hard rules' over the bootloaders lists one); the others
contain pointers only. An inlining import line counts as a pointer; a
second copy of the body does not, whatever comment markers surround itindex.md, split
routing files), the concrete tracker is named only as the
tracker.md pointer; work-item IDs inside archive entries are data
— exempt; naming a platform for non-tracker purposes (e.g. CI,
hosting) in Coexisting Systems is exempttracker.md has all ten contract sections filled, no {...} braces leftindex.md and its
current node names a defined milestonedocs/harness/quality-gates.md exists and is routed from index.mdindex.md contains Work Production, Artifact Adapters, Domain Docs,
Quality Gates, and applicable Delivery & Recovery routingtracker.md § Labels carries the
category/state vocabulary those skills apply, mapped to real tracker
labels/statesdocs/agents/* files were generated by this skillcompleted.md and abandoned.md; remote mode retains
terminal history in its tracker and preserves any existing archivesReport: created, refreshed, left for later, warnings.
Triggered when the user asks to switch trackers. Steps:
tracker.md from its preset.active.md entries →
issues, each annotated with its new ID; reverse direction symmetric).
Never invent placeholder IDs; an unmigratable entry keeps the local
format with the blocker noted in next:.active.md stays a live ledger file —
demote only when the list empties; retained unmigrated entries count as
open items for any later reverse swap.tracker.md and the migrating ledger files changed. Flag any now-stale
index.md § Conventions entries (e.g. live-entry format listed when the
new mode is remote) in the report for cleanup at next refresh. Swap is
not done while the unmigrated list is non-empty — report it.
Re-running swap mode with the same target resumes the unmigrated list —
never regenerate a tracker.md already at the target. The report must
tell the user to run refresh after migration completes.Compare this setup skill and its current templates directly with the existing harness, actual code/tests, installed toolbox and recent work evidence. An architecture-improvement review is optional input, never a prerequisite. Refresh repairs documented drift; it does not refactor application code or promote the current implementation into intended product behavior.
tracker.md — mismatch: warn only);
contract gap (a tracker.md generated before the ten-section
contract lacks § Work Item Format / § Failure Handling — generate the
missing sections from the matching preset; also check existing readiness,
acceptance, dependency and skill handoff semantics for contradictions.
Preserve project decisions; do not overwrite them with template defaults);
roadmap drift (when a roadmap exists, current node's items all terminal but the node not
advanced — local mode checks entries with matching parent:; flag and
propose the advance to the user, never advance alone; no roadmap residence
in an existing harness — leave absent unless real milestones require one);
workflow-config drift (index.md missing workflow-skill
routing, artifact adapters, Domain Docs, or Quality Gates); tracker
label drift (workflow skills present but tracker.md lacks their
category/state roles); tracker-leak scan.
Check whether interactive work-item boundaries and checkout cleanup guidance
are missing or contradict the repo's tracker/skills. Check that a new
independent item cannot silently inherit the current feature branch as its
base; preserve a recorded stacked dependency when real. Re-detect Git, CI,
release/deployment, installation and recovery sources; compare the recorded
delivery route, authority and evidence with current practice. Ask with a
suggested default when consequential practice remains unknown. Preserve
explicit project decisions; propose only the missing or stale rule.If the tracker is unreachable (API down, no credentials): skip tracker-dependent checks, note the gap in the report — never block on remote availability.
v2 migration: markers exist but no tracker.md. Extract tracker facts
from index.md § Conventions into a generated tracker.md (matching
preset, else custom); run the Explore detections first; replace the
bootloader block with the v3 template; regenerate index.md in full — the
entire file is generated content; the file-level header is its marker
(tracker-agnostic wording); demote live ledger files if the mode is remote;
ensure both local archives exist in local mode; preserve existing remote
archives and entries; backfill authoritative local archives from git history.
Anything not clearly generated is user-authored — ask before
touching.
v1 migration: same flow as v2 migration, preceded by v1→v2 steps: move routing to its single residence per the approved topology, empty files become pointers per § 5 Bootloaders (preserving an existing inlining import rather than slimming it away) or are deleted, slim the bootloader to the core template, add markers, re-detect skill names, backfill history. v1 and v2 migration both re-run § 6 validation.
Two legal forms. Day-to-day agents append inside existing files; only this skill changes topology.
docs/harness/index.md
docs/harness/tracker.md + docs/harness/quality-gates.md + ledger
files per mode; add a roadmap only for real multi-milestone sequencing.| Case | Rule |
|---|---|
| Greenfield repo | core; local ledger structurally complete but empty with project-started entry; no backfill; add a roadmap only for real milestones |
| Design-workflow skills absent | Work Production pipeline uses generic fallbacks; still record artifact adapters, Domain Docs, and Quality Gates routing |
| Existing roadmap doc actively maintained | adopt in place — index routes to it; never create a duplicate roadmap.md |
| No git/shallow clone | skip backfill; mine existing docs for history; note gap in report |
| User content in generated files without markers | user-authored; ask before touching |
| Monorepo | one root harness; module-map sectioned by package; per-package harnesses out of scope |
| Dirty git state | commit harness paths only |
| Tracker unreachable | skip tracker-dependent checks; note gap; never block |
| No preset for chosen tracker | generate from the custom skeleton with the user; gates apply unchanged |
Orchestrator config conflicts with tracker.md | warn only; never edit foreign config |
| Acceptance authority change (human-gated ↔ agent-gated) | update the authoritative policy residence; tracker.md references checked runtime values when present. Refresh runtime validation and invalidate stale acceptance evidence; otherwise update the tracker authority rows directly |
| Swap with unmigrated entries | keep old format, list in report; swap incomplete until the list is empty |
| Tracker detail undetectable at generation (e.g. custom state names, GitHub owner/repo) | ask the user to supply it before writing tracker.md; never generate with braces unfilled |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub hsiang-linc/engineering-plugin --plugin engineeringOther plugins' skills for the same job
18 skills in this plugin
/cavemanUltra-compressed communication mode. Cuts token usage ~75% by dropping filler, articles, and pleasantries while keeping full technical accuracy. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman.
/diagnoseDisciplined diagnosis loop for hard bugs and performance regressions. Reproduce → minimise → hypothesise → instrument → fix → regression-test. Use when user says "diagnose this" / "debug this", reports a bug, says something is broken/throwing/failing, or describes a performance regression./grill-meInterview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".