Back to Discover

sd0x-harness

plugin

sd0xdev

The harness layer for Claude Code — a reference implementation of harness engineering with hook-enforced dual review, state-machine gates that survive context compaction, and fail-closed safety where it counts. Quality gates that AI can't skip.

View on GitHub
188 starsMITSynced Aug 17, 2026

Install to Claude Code

/plugin marketplace add sd0xdev/sd0x-harness

README

sd0x-dev-flow

sd0x-dev-flow banner

Language: English | 繁體中文 | 简体中文 | 日本語 | 한국어 | Español

The harness layer for Claude Code.

Let the model choose the path. Keep "done" verifiable.

v4 gives Claude discretion inside a closed, test-pinned anchor set; hooks are digest-bound reminders that survive compaction, and Codex reviews independently.

Full control plane on Claude Code. Skills-only distribution for Codex CLI and other compatible agents.

99 bundled · 99 public skills · 15 agents — ~4% of Claude's context window

License: MIT npm

Quick Start

# Claude Code — full control plane
/plugin marketplace add sd0xdev/sd0x-dev-flow
/plugin install sd0x-dev-flow@sd0xdev-marketplace

# Configure your project
/project-setup

One command auto-detects framework, package manager, database, entrypoints, and scripts. Installs a subset of rules and hooks; the full plugin bundles 16 rules + 6 hooks. Use --lite to only configure CLAUDE.md (skip rules/hooks).

# Codex CLI / Cursor / Windsurf / Aider — skills only
npx skills add sd0xdev/sd0x-dev-flow

Then, inside Codex CLI, generate the AGENTS.md kernel and install the git hooks:

$codex-setup init
MethodToolsCoverage
Plugin installClaude CodeFull (99 bundled skills, hooks, rules, auto-loop)
npx skills addCodex CLI, Cursor, Windsurf, AiderSkills only (99 public skills)
$codex-setup initCodex CLIAGENTS.md kernel + git hooks

Requirements: Claude Code 2.1+ | Node.js 18+ | jq (pre-edit-guard and post-edit-format parse their hook payload with it — without jq both exit 0, so the sensitive-path guard and auto-formatting are silently off) | Codex MCP (optional to install the plugin, required for the /codex-* review gates — Codex is the single reviewer, so without it a review emits ⛔ Blocked + ⚠️ Need Human rather than degrading)

Codex MCP registration

claude mcp add codex -- codex mcp-server -c 'model_reasoning_effort="high"'

-c 'model_reasoning_effort="high"' is the default here because reviewing is the workload that pays for depth (rules/auto-loop.md § Review Dispatch applies the same principle to agents/ frontmatter). It is a default, not a requirement — adjust or drop the value for your own effort/latency tradeoff. -c itself works whether it precedes or follows the mcp-server subcommand (both are documented, identically, by codex --help and codex mcp-server --help); after the subcommand is shown above only because that is the form codex mcp-server --help lists.

--profile cannot be used with codex mcp-server at all — codex --profile <name> mcp-server fails outright (codex-cli 0.146.0, verbatim):

Error: --profile only applies to runtime commands and `codex mcp`: `codex`, `codex exec`, `codex
review`, `codex resume`, `codex archive`, `codex delete`, `codex unarchive`, `codex fork`, `codex
mcp`, `codex sandbox`, and `codex debug prompt-input`.

mcp-server is not in that list, so a config profile cannot reach the review MCP server this way — set -c overrides directly on the registration command instead.

Why v4

Frontier models can plan, batch, and recover from structured state — they no longer need the harness to dictate every next command. v4 moves from choreography to contracts: the harness stopped scripting the model's moves and started defining what must be true when the work is declared done, without relaxing a single safety or review anchor.

Dimensionv3 (choreography)v4 (contracts)
Hook roleEmit the next command to runPrint reminders + [AUTO_LOOP_STATE] facts — change class, per-plane verdict state
CompletionScripted step sequence ("fix → immediately re-review")Terminal completion invariant: every gate the change class requires has passed after the last edit
Rule forceUniform — every rule reads as mandatoryThree tiers: Anchor (never), Default (deviate with a stated signal), Guidance (advisory)
Review depthMaximum by defaultRisk-scaled tiers (fast / standard / thorough); security and data integrity always escalate
Stall detected / round cap hitHand off to the humanFirst hit: structured self-diagnosis + one bounded adjustment, then resume — unless a human exit applies (security/data-integrity, architecture-level change, requirement ambiguity); the same change hitting the cap again after its diagnosis: always human

The non-negotiable core lives in a closed Anchor Register (rules/discretion.md) that no project override can downgrade — resolution is Anchor-first, and a test suite fails by design if a Register entry is removed. Inside that boundary, ownership is explicit:

OwnerOwns
ModelBatching, timing, review depth escalation, Default-tier deviations (stated, then keep working)
HarnessDigest-bound reminder state, git-level guards (commit-msg, pre-push), the closed anchor set
HumanIrreversible approvals (push, commit, merge) and the enumerated exit points

The model owns the path. The harness owns the evidence and non-negotiable boundaries. The human retains irreversible authority.

What This Harness Does

Harness engineering is the discipline of engineering everything around the LLM — tool loops, context management, hooks, state machines, safety layers — as opposed to training the model itself. Mitchell Hashimoto coined the term in Feb 2026; Anthropic engineering and Martin Fowler have published on it; arXiv 2603.05344 formalizes it.

sd0x-dev-flow is a reference implementation. Each row below maps a canonical harness sub-problem to concrete code you can study:

#Harness sub-problemsd0x-dev-flow implementationCode evidence
1Tool loop controlTerminal completion invariant — every gate a change class requires must pass after the last edit; the model chooses when and how to run themrules/auto-loop.md + scripts/review-state.js
2Digest-bound reminder stateVerdicts are noted by the model (node scripts/review-state.js note <plane> <pass|fail>) and bound to the tree digest — an edit re-opens its plane's reminder because the digest changed; gate sentinels (✅ Ready / ## Overall: ✅ PASS) stay behaviour-layer signalsscripts/review-state.js + rules/auto-loop.md (§ Gate Sentinels, § Enforcement)
3Context recovery across compactionGit baseline (branch + uncommitted files) and owed-gate reminders re-injected after SessionStart(compact)hooks/post-compact-auto-loop.sh
4Lifecycle interceptors5 hook event types dispatched to 6 scripts — 4 advisory reminder hooks, an auto-formatter, and one blocking security guard (SessionStart additionally runs scripts/namespace-hint.sh): PreToolUse / PostToolUse / Stop / SessionStart / UserPromptSubmithooks/ (6 scripts) + .claude/settings.json
5Capability-based tool gatingSkill frontmatter allowed-tools — e.g., /ask has no Edit/Write90 of 99 public skills declare allowed-tools
6Defense-in-depth safetyGit-level guards stay hard (commit-msg-guard, pre-push-gate over /dev/tty); edit-time pre-edit-guard still blocks sensitive-path edits (a security guard, not workflow enforcement — it needs jq, and without it the guard does not fire); the Stop hook reminds — the layers that gate irreversible actions and secrets kept their teeth, the review layer became advisory by designscripts/pre-push-gate.sh + scripts/commit-msg-guard.sh + hooks/stop-guard.sh
7Generator-evaluator splitCodex reviews what Claude wrote, researching the repo independently — never handed a conclusion to confirmrules/codex-invocation.md + rules/auto-loop.md (Review Dispatch)
8Incremental progress trackingEvidence-based stall discipline: three review rounds that close no findings — counted by the model from the review reports — trigger a structured classification plus one bounded adjustment. The per-tier round budget (default 6 / 15 / 30, overridable 3–50) is the runaway backstop and runs the same diagnosis on its first hit, with enumerated human exitsrules/auto-loop.md (§ Stall Detection + § Cap Diagnostic Protocol)
9Human-in-the-loop safety gatesAskUserQuestion approval before every /push-ci push; /dev/tty pre-push confirmation is the terminal credential for protected-branch pushes (plus non-fast-forward detection)scripts/pre-push-gate.sh + skills/push-ci/SKILL.md
10Self-improvement loopCorrection → record lesson → promote to rule after 3+ recurrencesrules/self-improvement.md

Most harness projects cover 2–4 of these. sd0x-dev-flow covers all 10 — which makes the code useful as a study target, not just a tool.

How It Works

flowchart LR
    P["🎯 Plan"] --> B["🔨 Build"]
    B --> G["🛡️ Gate"]
    G --> S["🚀 Ship"]

    P -.- P1["/codex-brainstorm<br/>/feasibility-study<br/>/tech-spec"]
    B -.- B1["/feature-dev<br/>/bug-fix<br/>/codex-implement"]
    G -.- G1["/codex-review-fast<br/>/precommit<br/>/codex-test-review"]
    S -.- S1["/smart-commit<br/>/push-ci<br/>/create-pr<br/>/pr-review"]

Everything orbits one rule — the terminal completion invariant: work on a change may be declared complete only when every gate its change class requires has passed after the last edit in that class. Code edits require an independent Codex review then /precommit; .md docs require /codex-review-doc. When to run them, how to batch edits, and how deep to review are the model's calls — the invariant constrains the end state, not the choreography.

Hooks report facts, not orders: they print reminders and an [AUTO_LOOP_STATE] fact line (change class, per-plane verdict state) and the model owns the decision. What blocks comes from the tier (fast P0 · standard P0/P1 · thorough P0/P1/P2); findings below that line are logged and the loop proceeds rather than opening another round. A stall — three review rounds that close nothing, counted by the model — or, as a backstop, hitting the round cap triggers a structured self-diagnosis (architecture problem? doc too long? attention diffusion?) and one bounded adjustment before the loop resumes, rather than an automatic hand-off; the human exits stay in force whichever trigger fired (security and data-integrity changes skip the diagnosis entirely; a stall diagnosed as architecture-level or requirement ambiguity goes to the human).

There is no enforcement mode (hook-lightweighting, 2026-08-13): every review-layer hook is a reminder that exits 0. A verdict exists when the model notes it (node scripts/review-state.js note <plane> <pass|fail>, digest-bound — an edit re-opens its plane), and the honest way to silence a reminder is to run the gate and note the outcome. The guards outside the review layer keep their teeth: pre-edit-guard still blocks sensitive-path edits (when jq is available; without it the guard does not fire), and the git-level guards (commit-msg-guard, pre-push-gate) remain hard.

A second reviewer is available via /codex-review-branch --dual and is off by default. See docs/hooks.md for hook and dependency details.

Detailed: Review Loop Sequence Diagram
sequenceDiagram
    participant D as Developer
    participant C as Claude
    participant X as Codex MCP
    participant H as Hooks

    D->>C: Edit code
    H->>H: Reminder state re-opens (digest changed)
    C->>X: Codex review (sandbox, researches repo itself)
    X-->>C: Findings + gate sentinel
    C->>C: note the verdict (review-state.js)
    C->>C: Gate on the tier's blocking severity

    alt Blocking findings
        C->>C: Fix them (sub-threshold: log and move on)
        C->>X: --continue threadId
        X-->>C: Re-verify
    end

    C->>C: /precommit (auto)
    C-->>D: ✅ All gates passed

    Note over H: Stop: owed gates re-reminded — never blocked

Feature Spotlight: Tiered Review

One reviewer — Codex — runs everywhere by default. The tier decides how much rigour a change gets, and what a reviewer finding has to be before it re-opens the loop:

TierUse forBlocks onRound cap
fastDocs, config, small low-risk editsP06
standard (default)Ordinary features and bug fixesP0, P115
thoroughSecurity, data integrity, releases, public APIP0, P1, P230

The configured tier is a baseline, not a ceiling — the model escalates when the change warrants it, and security or data-integrity changes are always reviewed at thorough whatever is configured.

80 is a passing grade. Findings below the tier's blocking severity are logged ([NIT_DEFERRED] — a reporting convention in the review report; nothing persists it) and the loop proceeds to /precommit — no extra fix pass, no extra review round. /codex-review-branch picks them up when the change is next reviewed at depth.

The round caps above are deliberately loose, because a cap cannot tell a converging loop from a churning one — it stops both at the same number. What tells them apart is the evidence: three consecutive review rounds that close no findings — counted by the model from the review reports, normally many rounds before the cap — trigger the diagnosis below. The cap is left as the runaway backstop.

The round caps above are the tier defaults — a project ## Max Rounds override (3–50) takes precedence. Hitting the cap is a diagnosis point, not an automatic hand-off: the model classifies the stall (architecture, doc too long, attention diffusion, unverified claims, tier mismatch, requirement ambiguity), makes one bounded adjustment, and resumes. The human exits stay binding whichever trigger fired: security/data-integrity changes skip the diagnosis and go straight to the human, a stall classified as architecture-level or requirement ambiguity exits to the human, and the same change hitting the cap a second time after its diagnosis always does. (Architecture-level changes, feature removal, or a user request to stop exit to the human at any point — cap or no cap.)

A second reviewer is available via /codex-review-branch --dual and is off unless the flag is passed — worth its doubled token and wall-clock cost on a release or a security review, not on a typical fix. Under --dual, findings are severity-normalized, deduplicated (file + issue key, ±5 line tolerance) and source-attributed.

Gate: ✅ Ready or ⛔ Blocked — behaviour-layer signals the model acts on; the verdict is noted into the reminder state.

When to Use

Good FitNot Ideal
Solo or small-team projects with Claude CodeTeams not using Claude Code
Projects needing automated review gatesOne-off scripts with no CI
Codex CLI / Cursor / Windsurf users (skills subset)Projects requiring custom LLM providers
Repos where quality gates prevent regressionsRepos with no test infrastructure

Workflow Tracks

WorkflowCommandsGateState
Feature/feature-dev/verify/codex-review-fast/precommit✅/⛔Digest-bound reminder (noted verdicts)
Bug Fix/issue-analyze/bug-fix/verify/precommit✅/⛔Digest-bound reminder (noted verdicts)
Auto-LoopCode edit → /codex-review-fast/precommit✅/⛔Digest-bound reminder (noted verdicts)
Doc Review.md edit → /codex-review-doc✅/⛔Digest-bound reminder (noted verdicts)
Planning/codex-brainstorm/feasibility-study/tech-spec
Onboarding/project-setup/repo-intake
Visual: Workflow Flowcharts
flowchart TD
    subgraph feat ["🔨 Feature Development"]
        F1["/feature-dev"] --> F2["Code + Tests"]
        F2 --> F3["/verify"]
        F3 --> F4["/codex-review-fast"]
        F4 --> F5["/precommit"]
        F5 --> F6["/update-docs"]
    end

    subgraph fix ["🐛 Bug Fix"]
        B1["/issue-analyze"] --> B2["/bug-fix"]
        B2 --> B3["Fix + Regression test"]
        B3 --> B4["/verify"]
        B4 --> B5["/codex-review-fast"]
        B5 --> B6["/precommit"]
    end

    subgraph docs ["📝 Docs Only"]
        D1["Edit .md"] --> D2["/codex-review-doc"]
        D2 --> D3["Done"]
    end

    subgraph plan ["🎯 Planning"]
        P1["/codex-brainstorm"] --> P2["/feasibility-study"]
        P2 --> P3["/tech-spec"]
        P3 --> P4["/codex-architect"]
        P4 --> P5["Implementation ready"]
    end

    subgraph ops ["⚙️ Operations"]
        O1["/project-setup"] --> O2["/repo-intake"]
        O2 --> O3["Develop"]
        O3 --> O4["/project-audit"]
        O3 --> O7["/best-practices"]
        O3 --> O5["/risk-assess"]
        O4 --> O6["/next-step --go"]
        O5 --> O6
        O7 --> O6
    end

Cookbook

Real-world scenarios showing which skills to combine and in what order.

ScenarioFlowDocs
First day in a repo/project-setup/repo-intake/next-step
Implement a new feature/feature-dev/verify/codex-test-review/codex-review-fast/precommit
Resolve PR review comments/load-pr-review → fix → /codex-review-fast/push-ci
Security pre-merge pass/codex-security/dep-audit/risk-assess/pre-pr-audit
Showcase: Validate direction/deep-research/best-practices/feasibility-study/codex-brainstorm
Showcase: Adversarial design/codex-brainstorm (Nash equilibrium debate) → /codex-architect

All 10 scenarios →

What's Included

CategoryCountExamples
Skills99 public (99 bundled)/project-setup, /codex-review-fast, /verify, /smart-commit, /deep-research
Agents15strict-reviewer, verify-app, coverage-analyst, architecture-designer
Hooks6pre-edit-guard, auto-format, stop reminder, post-compact-auto-loop, post-skill-auto-loop, user-prompt-review-guard
Rules16auto-loop, auto-loop-project, codex-invocation, scope-discipline, security, testing, git-workflow, self-improvement, context-management
Scripts21precommit runner, verify runner, review-state CLI, dep audit, namespace hint, skill runner, commit-msg guard, pre-push gate, build-codex-artifacts, resolve-feature (node entrypoint + shell shim + CLI), classify-docs, detect-scope, migration-audit, migrate-hook-lightweighting, security-redact, readme-catalog, check-doc-links, resolve-review-profile

Minimal Context Footprint

~4% of Claude's 200k context window — 96% remains for your code.

ComponentTokens% of 200k
Rules (always loaded)5.1k2.6%
Skills (on-demand)1.9k1.0%
Agents7910.4%
Total~8k~4%

Skills load on-demand. Idle skills cost zero tokens.

Skill Reference

SkillUse when
/project-setupFirst-time project configuration
/bug-fixFixing bugs and resolving issues
/feature-devImplementing new features end-to-end
/smart-commitCommitting changes with smart grouping
/push-ciPushing code and monitoring CI
/create-prCreating GitHub pull requests, including stacked PR chains (--stack)
/codex-review-fastQuick code review (diff only)
/codex-review-docReviewing documentation changes
/codex-securityOWASP Top 10 security audit
/verifyRunning full test verification chain
/precommitPre-commit quality gate (lint + build + test)
/precommit-fastQuick pre-commit (lint + test, no build)
/codex-brainstormAdversarial brainstorming (Nash equilibrium)
/tech-specWriting technical specifications
/pr-reviewPR self-review before merge
All 99 public skills

Development (33)

SkillDescription
/askContext-aware Q&A with auto context gathering.
/bug-fixBug fix workflow.
/bump-versionBump package and plugin version in sync.
/code-explorePure Claude code investigation.
/code-investigateDual-perspective code investigation.
/codex-architectCodex architecture consulting.
/codex-implementImplement features via Codex MCP.
/codex-setupInitialize sd0x-dev-flow infrastructure for Codex CLI and other non-Claude agents.
/create-prCreate or update GitHub PR with gh CLI.
/debugInteractive debugging workflow with hypothesis-driven probe loop.
/deep-exploreMulti-wave parallel code exploration orchestrator.
/epic-mergeSequential squash-merge of stacked PR chains into an epic branch.
/feature-devFeature development workflow.
/feature-verifyFeature verification (READ-ONLY, P0-P5).
/git-investigateGit history investigation.
/git-profileGit identity and GPG signing profile manager.
/install-hooksInstall plugin hooks into project .claude/ for persistent use without plugin loaded
/install-rulesInstall plugin rules into project .claude/rules/ for persistent use without plugin loaded
/install-scriptsInstall plugin runner scripts into project .claude/scripts/ for persistent use without plugin loaded
/issue-analyzeGitHub Issue and PR review thread deep analysis with Codex blind verdict.
/jiraJira integration — view issues, generate branches, create tickets, transition status.
/load-pr-reviewLoad GitHub PR review comments into AI session — analyze, triage, plan.
/merge-prepPre-merge analysis and preparation.
/next-stepChange-aware next step advisor.
/post-dev-testPost-development test completion.
/pr-commentPost friendly review comments to a GitHub PR — prepare locally, preview, then submit as atomic review.
/project-setupProject configuration initialization.
/push-ciPush to remote and monitor CI.
/remindLightweight model correction with context-aware rule loading.
/repo-intakeProject initialization inventory (one-time).
/smart-commitSmart batch commit.
/smart-rebaseSmart partial rebase for squash-merge repositories.
/watch-ciMonitor GitHub Actions CI runs until completion.

Review (Codex MCP) (15)

SkillDescriptionLoop Support
/codex-cli-reviewCode review via Codex CLI with full disk access.-
/codex-code-reviewCode review using Codex MCP.-
/codex-explainExplain complex code via Codex MCP.-
/codex-reviewFull second-opinion using Codex MCP (with lint:fix + build).--continue <threadId>
/codex-review-branchFully automated review of an entire feature branch using Codex MCP-
/codex-review-docReview documents using Codex MCP.--continue <threadId>
/codex-review-fastQuick second-opinion using Codex MCP (diff only, no tests).--continue <threadId>
/codex-securityOWASP Top 10 security review using Codex MCP.--continue <threadId>
/codex-test-genGenerate unit tests for specified functions using Codex MCP-
/codex-test-reviewReview test case sufficiency using Codex MCP, suggest additional edge cases.--continue <threadId>
/doc-reviewDocument review via Codex MCP.-
/plan-reviewPre-ExitPlanMode adversarial plan review loop via Codex MCP.-
/security-reviewSecurity review via Codex MCP.-
/seek-verdictIndependent second-opinion verification for any finding.-
/test-reviewTest coverage review via Codex MCP.-

Verification (13)

SkillDescription
/best-practicesIndustry best practices conformance audit with mandatory adversarial debate.
/check-coverageComprehensive assessment of Unit / Integration / E2E three-layer test coverage, identify gaps and provide actionable ...
/dep-auditAudit dependency security risks
/dev-security-auditComprehensive developer workstation security audit — scans for exposed credentials, compromised application data, per...
/necessity-auditNecessity audit for over-designed spec elements.
/pre-pr-auditPre-PR confidence audit with 5-dimension scoring.
/precommitPre-commit checks — lint:fix -> build -> test
/precommit-fastQuick pre-commit checks — lint:fix -> test
/project-auditProject health audit with deterministic scoring.
/risk-assessUncommitted code risk assessment with breaking change detection, blast radius analysis, and scope metrics.
/test-deepContext-aware test orchestration.
/test-healthHolistic test coverage measurement.
/verifyVerification loop — lint -> typecheck -> unit -> integration -> e2e

Planning (17)

SkillDescription
/architectureArchitecture design and documentation.
/codex-brainstormAdversarial brainstorming via Claude+Codex debate.
/deep-analyzeDeep-dive analysis of an initial proposal — research code implementation, produce an actionable roadmap and alternatives
/deep-researchUniversal multi-source research orchestration.
/feasibility-studyFeasibility analysis from first principles.
/fp-briefFirst-principles briefing from technical documents.
/orchestrateAgent-driven workflow orchestration (v1 report-only).
/post-dev-recapPost-development recap wrapper.
/project-briefConvert a technical spec into a PM/CTO-readable executive summary.
/recap-askInteractive Q&A over an existing recap document.
/recap-docPost-development recap document generator.
/req-analyzeRequirements analysis — problem decomposition, stakeholder scan, requirement structuring.
/request-trackingRequest tracking knowledge base.
/review-specReview technical spec documents from completeness, feasibility, risk, and code consistency perspectives.
/tech-briefTechnical briefing for developer sharing.
/tech-specTech spec generation and review.
/ui-first-principlesFirst-principles UI/IA reasoning: turns a <scenario> + API field set into JTBD analysis, principle-anchored field-p...

Documentation & Tooling (21)

SkillDescription
/adrWrite an Architecture Decision Record (ADR) for a feature — Context / Decision / Status / Consequences / Alternatives...
/claude-healthClaude Code config health check + plugin sync.
/contract-decodeEVM contract error and calldata decoder.
/create-requestCreate, update, or scan per-task request tickets for progress tracking.
/de-ai-flavorRemove AI artifacts from documents.
/doc-refactorRefactor documents — simplify without losing information, visualize flows with sequenceDiagram.
/generate-runnerGenerate a customized precommit runner for any ecosystem.
/obsidian-cliObsidian vault integration via official CLI.
/op-sessionInitialize 1Password CLI session for Claude Code.
/portfolioPortfolio system knowledge base.
/pr-reviewPR self-review — review changes, produce checklist, update rules
/pr-summaryList open PRs, filter automation PRs, group by ticket ID, format as Markdown.
/refactorMulti-target refactoring orchestrator.
/runbookGenerate/update feature release runbook
/safe-removeSafely remove plugin assets (skill/agent/rule/script/hook) with dependency detection and reference cleanup.
/sharinganReplicate knowledge from any source as sd0x-dev-flow skill definition.
/simplifyWrap-up refactoring — simplify code, eliminate duplication, preserve behavior
/skill-health-checkValidate skill quality against routing, progressive loading, and verification criteria.
/statusline-configCustomize Claude Code statusline.
/update-docsResearch current code state then update corresponding docs, ensuring docs stay in sync with code.
/zh-twRewrite the previous reply in Traditional Chinese

Rules & Hooks

16 rules + 6 hooks. The rules are tiered contracts: discretion.md resolves every instruction in the 13 plugin-managed rule files to exactly one of Anchor / Default / Guidance, and the 2 user-owned override files resolve Anchor-first under their parent rules. The hook set is 4 advisory reminder hooks plus an auto-formatter and a blocking security guard. The reminder roles differ per hook: the Stop and post-compact hooks render owed-gate reminders from the digest-bound state (review-state.js), the prompt hook prints the [AUTO_LOOP_STATE] fact line, the post-skill hook prints a static gate-order line, and the post-compact hook also re-injects the git baseline; the review layer never blocks — pre-edit-guard still blocks sensitive-path edits (a security guard; it needs jq and does not fire without it), and the hard gates live at the git level (commit-msg-guard, pre-push-gate).

Customization: Edit auto-loop-project.md to override auto-loop behavior per project. Plugin updates won't conflict — see Rule Override Pattern.

For full rules, hooks, and environment variable reference, see docs/rules.md and docs/hooks.md.

Customization

Run /project-setup to auto-detect and configure all placeholders, or manually edit .claude/CLAUDE.md:

PlaceholderDescriptionExample
{PROJECT_NAME}Your project namemy-app
{FRAMEWORK}Your frameworkMidwayJS 3.x, NestJS, Express
{CONFIG_FILE}Main config filesrc/configuration.ts
{BOOTSTRAP_FILE}Bootstrap entrybootstrap.js, main.ts
{DATABASE}DatabaseMongoDB, PostgreSQL
{TEST_COMMAND}Test commandyarn test:unit
{LINT_FIX_COMMAND}Lint auto-fixyarn lint:fix
{BUILD_COMMAND}Build commandyarn build
{TYPECHECK_COMMAND}Type checkingyarn typecheck

Overrides resolve Anchor-first: user-owned override files (auto-loop-project.md, testing-project.md) customize Default- and Guidance-tier behavior only — no project override can downgrade an entry in the Anchor Register, and an attempt is reported as a conflict rather than honoured.

Showcase: Multi-Agent Research

Run /deep-research to orchestrate 2-3 parallel researcher agents across web sources, codebase, and community knowledge — with claim registry synthesis and conditional adversarial debate.

FeatureDetails
Agents2-3 parallel (web + code + community)
SynthesisClaim registry with consensus detection
ValidationConditional /codex-brainstorm debate
Scoring4-signal completeness model

Full documentation

Architecture

Six layers, each owning one concern:

LayerOwns
SkillsCapabilities loaded on demand — the verbs (/feature-dev, /codex-review-fast, …)
ModelThe route: batching, timing, review depth escalation, Default-tier deviations
RulesTiered contracts (Anchor / Default / Guidance) loaded every session
Hooks + stateReminders + [AUTO_LOOP_STATE] facts, digest-bound verdict notes, recovery across compaction
CodexIndependent review — researches the repo itself, never handed a conclusion
Scripts + agentsDeterministic checks (precommit, guards) and isolated subagents

For advanced architecture details (agentic control stack, control loop theory, sandbox rules), see docs/architecture.md — note that parts of it predate v4 and still describe the v3 choreography; rules/auto-loop.md and rules/discretion.md are the current source of truth.

Contributing

PRs welcome. Please:

  1. Follow existing naming conventions (kebab-case)
  2. Include When to Use / When NOT to Use in skills
  3. Add disable-model-invocation: true for dangerous operations
  4. Test with Claude Code before submitting

License

MIT

Star History

Star History Chart

Rendered live from sd0xdev/sd0x-harness's GitHub README — not stored, always reflects the source repo.

1 Plugin

NameDescriptionCategorySource
sd0x-dev-flowHarness engineering for Claude Code — reminder-layer review hooks, behaviour-layer gates, and fail-closed safety where it counts.sd0xdev/sd0x-dev-flow

0 Comments

Login required
Log in to post a comment or update on this repo.

No comments yet — be the first to share an update.