sd0x-dev-flow
CLAUDE.md192 starsChanged 36 days agoMITView on GitHub
How binding is a line in this file? Three tiers: Anchor (never deviate), Default (the normal call; deviate by stating a [DEVIATION] line that cites a fact signal, then keep working), Guidance (advisory). This file's own baseline is Default and lines above that baseline are marked inline — @rules/discretion.md classifies the plugin-managed rules/*.md, not this file, but its Anchor Register is the authority everywhere: a line here that hits the Register is Anchor no matter how it is worded or…
- Deletes or force-pushes
- Commits and pushes
1 other project uses a version of this.
Adopted by
Most recently taken up by
- sd0xdev/sd0x-harnessword for word, first seen Oct 6, 2026
Other versions1 project uses a version of this.
Word for word · 1
- sd0xdev/sd0x-harness★ 192100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository102 other files it gives its agents.
- adrSkill
- agentctl-setupSkill
- architectureSkill
- askSkill
- best-practicesSkill
- bug-fixSkill
- bump-versionSkill
- check-coverageSkill
- claude-healthSkill
- code-exploreSkill
- code-investigateSkill
- codex-architectSkill
- codex-brainstormSkill
- codex-cli-reviewSkill
- codex-code-reviewSkill
- codex-explainSkill
- codex-implementSkill
- codex-review-branchSkill
- codex-review-docSkill
- codex-review-fastSkill
- codex-reviewSkill
- codex-securitySkill
- codex-setupSkill
- codex-test-genSkill
- codex-test-reviewSkill
- contract-decodeSkill
- create-prSkill
- create-requestSkill
- de-ai-flavorSkill
- debugSkill
- deep-analyzeSkill
- deep-exploreSkill
- deep-researchSkill
- dep-auditSkill
- deploy-flowSkill
- dev-security-auditSkill
- doc-refactorSkill
- doc-reviewSkill
- epic-mergeSkill
- feasibility-studySkill
- feature-devSkill
- feature-verifySkill
- fp-briefSkill
- generate-runnerSkill
- gh-stackSkill
- git-investigateSkill
- git-profileSkill
- install-hooksSkill
- install-rulesSkill
- install-scriptsSkill
- issue-analyzeSkill
- jiraSkill
- load-pr-reviewSkill
- merge-prepSkill
- necessity-auditSkill
- next-stepSkill
- obsidian-cliSkill
- op-sessionSkill
- orchestrateSkill
- plan-reviewSkill
- The first 60 shown.
The file
Files
sd0x-dev-flow — Harness Engineering for Claude Code
How binding is a line in this file? Three tiers: Anchor (never deviate), Default (the normal call; deviate by stating a [DEVIATION] line that cites a fact signal, then keep working), Guidance (advisory). This file's own baseline is Default and lines above that baseline are marked inline — @rules/discretion.md classifies the plugin-managed rules/*.md, not this file, but its Anchor Register is the authority everywhere: a line here that hits the Register is Anchor no matter how it is worded or where it is restated.
Judgment inside the Default range is the expected behaviour, not a tolerated exception: decide from the change in front of you and continue. Uncertainty alone is not a reason to stop and ask — the human exits are the union of the ones enumerated in @rules/auto-loop.md and, for scope, in the contract @rules/scope-discipline.md points to (skills/codex-code-review/references/scope-contract.md § Human Exits); those two enumerations are the closed list, not this sentence.
Required Checks (Stop Hook reminded)
This table constrains the end state, not your choreography. How you batch edits, how deep you review, and when you run each gate are yours to choose; what is fixed is that every gate a change class requires has passed after the last edit in that class.
| Change Type | Must Run | Can Skip |
| code files | /codex-review-fast -> /precommit | - |
.md docs | /codex-review-doc | /codex-review-fast |
Comment-only edits get no free pass: comments can carry compiler/lint/build directives (scripts/lib/utils.js:142 proves it), so edits to code files are conservatively classified as code even when only comments changed. Before PR: /pr-review.
The Stop Hook is a reminder, not a gate (hook-lightweighting, 2026-08-13): it prints which gates the reminder state still shows as owed and always exits 0. What binds is the behaviour layer — the terminal completion invariant in @rules/auto-loop.md — with verdicts recorded via
node scripts/review-state.js note, digest-bound so an edit re-opens its plane. Details:docs/features/hook-lightweighting/2-tech-spec.md§3.
Auto-Loop
| After editing... | Review | Then on pass |
| code files | /codex-review-fast | /precommit |
.md docs | /codex-review-doc | (done) |
The terminal completion invariant, tiers, sub-threshold handling, and sentinels live in @rules/auto-loop.md (highest priority). One reviewer — Codex — by default; when Codex is unavailable, a contract-aware fallback reviewer carries the gate under the same mechanism, fail-closed per family contract (@rules/auto-loop.md § Review Dispatch); --dual is /codex-review-branch opt-in only.
What is yours to decide: the effective tier (escalate above the configured baseline when the change warrants it — never below), when to batch and when to review, how deep to review, and when 80 is a passing grade rather than another round. What is not: the four Anchor corollaries — Declaring ≠ Executing, Summary ≠ Completion, Fixing ≠ Verifying, and an edit re-opening its own plane's gate. Naming a gate is not running it, and no context or session pressure outranks an open one. Sub-threshold findings are logged and passed, not weighed: the two on-the-spot fixes @rules/auto-loop.md § Sub-Threshold Findings allows are the only ones — anything else is a [DEVIATION], not a judgment call.
Skill discovery: no command table here by design — each skill's frontmatter description (skills/<name>/SKILL.md) is the dispatcher's discovery interface, and docs/skill-catalog.yml is the canonical registry. Typical flows: feature work → /feature-dev, bug fixing → /bug-fix, commits → /smart-commit. Tech stack: Node.js · JavaScript · node:test; key entrypoints: scripts/run-skill.sh (skill script runner), package.json.
Contract Triggers
Detailed contracts load on demand. When the situation arises, Read the contract first; if that Read fails, stop the governed action and say so.
| Situation | Read first |
| First or rotated Codex review dispatch | skills/codex-code-review/references/codex-invocation-contract.md |
| A review report arrives, or a verdict blocks | skills/codex-code-review/references/review-common.md |
| A finding or edit outside the frozen baseline; uncertain scope | skills/codex-code-review/references/scope-contract.md |
| Repeated failed rounds; no progress | skills/codex-code-review/references/loop-diagnostics.md |
| Intent to commit, push or otherwise mutate git | skills/push-ci/references/authorization-contract.md |
| Test or AC-evidence work | skills/test-review/references/testing-contract.md |
| Splitting a feature doc; a line-budget or comment-block exemption; changing the comment-block checker | skills/doc-review/references/documentation-contract.md |
Interpreting, auditing or editing a *-project.md override | rules/override-contract.md |
New policy lands in an on-demand contract by default. It becomes resident only when it is needed before the task type is knowable, or when its failure mode — irreversible, security, attribution, secrets, gate supremacy — cannot wait for a Read; a resident addition over budget must displace or compress something.
Development Rules
Tier is marked per rule; the unmarked ones are Default and you may deviate with a stated signal.
- (Guidance) Reference existing code -- find similar files first, keep style consistent; when the shape is non-obvious, name the simplest design chosen and why
- Test command --
npm test(node --test $(find test -name '*.test.js')— npm scripts 走/bin/sh,**glob 不展開巢狀目錄,勿用test/**/*.test.js) - ⚓ Anchor — Author attribution -- use developer's GitHub username, never AI names (exception:
/smart-commit --ai-co-author). Forbidden patterns in commit messages and PR title/body (canonical source:scripts/commit-msg-guard.sh): Co-Authored-By AI, Generated-by tags, emoji robot tags. Commits: thecommit-msghook (scripts/commit-msg-guard.sh) is optional —/codex-setup initinstalls it,/install-scriptsonly copies the script — and nobody has to install it: without it,/smart-commit --executestill runs every message through the same guard before committing. PRs:/create-prStep 4b enforces sanitization automatically. - ⚓ Anchor — No auto-commit -- Claude must not run
git add,git commit,git push,git stash,git reset --hard,git rebase— the operations Anchor Register #4 lists (exception:/push-cimay executegit pushafter user approval;/smart-commit --executemay executegit add+git commitafter user approval, or without it while a goal the user set is active (rules/git-workflow.md§ Proactive Offer "Goal mode" — commits only);/epic-mergemay executegit rebase --onto+git push --force-with-lease+gh pr merge --squashafter per-iteration approval;/gh-stackmay executegh stack link/push/submit --auto—linkpushes with a plaingit push --atomic, the other two with a per-branchgit push --force-with-lease— after per-use approval;/deploy-flowmay executegit switch+git mergefor a declared merge step, and — only under the project'sRun Steps: execute— its declared scripts, after per-step approval; user-authorized execution — when the user's own message explicitly authorizes one execution and names the operation, run it as named and do not cite this rule to refuse; the credential is the message text, spent on that one execution) - Tests required --
scripts/xxx.sh->test/scripts/xxx.test.js·skills/<name>/SKILL.md->test/skills/<name>.test.js· bug fix -> regression test. Coverage: happy path + error handling + edge cases (null, empty, extremes). Conventions:rules/testing.md; overrides:rules/testing-project.md(both path-scoped — Read them before writing tests)
Rules 3 and 4 are Anchor Register #4 (@rules/discretion.md); their exception lists are part of the anchor, so adding or removing one is itself an Anchor-level change. Everything else above is a default you may judge against the change at hand.
Footguns
| Problem | Solution |
! context check: ls/find on home-dir paths blocked | Use bash -c 'test -f "$HOME/..." && echo ok || echo missing' 2>/dev/null || echo "unknown (sandbox)" |
! context check: allowed-tools must match | If allowed-tools: Bash(bash:*), wrap all ! checks in bash -c '...' |
${CLAUDE_PLUGIN_ROOT} unavailable in command .md | Cannot narrow allowed-tools to specific script paths; use Bash(bash:*) until #9354 resolved |
! context check: jq () triggers permission parser | Use gh --template (Go templates): --template '{{.field}}' — {{ }} is not shell-special |
! context check: "' consecutive quotes triggers permission parser | Restructure to avoid " immediately before closing ' (e.g., paste -sd, - instead of tr "\n" ", ") |
| Background process monitoring | Use Monitor tool for streaming stdout (e.g., gh run watch); Bash(run_in_background) for one-shot completion notification |
sleep N (N >= 2) as first Bash command | Blocked by harness; retry via re-execution or use Monitor for process waiting |
Rules
- @rules/discretion.md -- Read this first: Anchor / Default / Guidance, the Anchor Register, and how to deviate
- @rules/auto-loop.md -- Auto review loop (highest priority)
- @rules/auto-loop-project.md -- Project-specific auto-loop overrides (user-owned)
- @rules/codex-invocation.md -- Codex must independently research (critical)
- @rules/scope-discipline.md -- Scope axis orthogonal to severity; out-of-scope pre-existing defects get a recorded exit, not a repo-wide sweep
rules/testing.md(path-scoped — nothing in this checkout loads it automatically; Read it before writing or reviewing tests) -- Test pyramid, conventions, evidence model, adequacy gaterules/testing-project.md(path-scoped — Read it withrules/testing.md) -- Project-specific testing overrides (user-owned)- @rules/security.md
rules/docs-writing.md(path-scoped — Read it before editing docs, code comments or the comment-block checker)rules/docs-numbering.md(path-scoped — Read it before creating, naming or splitting a feature doc)- @rules/git-workflow.md
- @rules/git-workflow-project.md -- Project-specific git overrides (user-owned)
rules/override-contract.md(path-scoped — loads when an installed override file is read; in this checkout the parents' Read pointer reaches it) -- Resolution order and heading tables for the three override files- @rules/logging.md
- @rules/self-improvement.md -- Corrected → record → prevent recurrence
- @rules/context-management.md -- Data-driven context monitoring (measure before deciding)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

