sd0x-dev-flow

May 14, 2026 · View on GitHub

sd0x-dev-flow banner

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

Claude Code를 위한 harness 레이어.

AI가 건너뛸 수 없는 품질 게이트. Claude Code를 위한 AI Agent Harness Engineering의 reference implementation — hook 강제 듀얼 리뷰, context 압축 이후에도 유지되는 state machine 게이트, 그리고 정말 중요한 지점의 fail-closed 안전장치.

96 bundled · 96 public skills · 15 agents — Claude context window의 ~4%만 사용

License: MIT npm

이 harness가 하는 일

Harness engineering은 LLM 모델 자체를 학습시키는 것이 아니라, LLM 주변의 모든 것 — tool loop, context 관리, hook, 상태 머신, 안전 레이어 — 을 엔지니어링하는 분야입니다. Mitchell Hashimoto가 2026년 2월에 이 용어를 만들었고, Anthropic engineeringMartin Fowler가 이를 주제로 글을 발표했으며, arXiv 2603.05344가 이를 형식화합니다.

sd0x-dev-flow는 그 reference implementation입니다. 아래 각 행은 harness의 표준 하위 문제를 실제로 연구할 수 있는 코드에 매핑합니다:

#Harness 하위 문제sd0x-dev-flow 구현코드 근거
1Tool loop 제어sentinel 기반 전이를 사용하는 /codex-review-fast/precommit auto-looprules/auto-loop.md + hooks/post-tool-review-state.sh
2Sentinel 기반 state machine✅ Ready / ⛔ Blocked / ✅ All Pass 게이트 마커를 지속 가능한 상태로 파싱scripts/emit-review-gate.sh (producer) + hooks/post-tool-review-state.sh (parser)
3Context 압축 후 복구SessionStart(compact) 이후 [AUTO_LOOP_RESUME] stdout 재주입hooks/post-compact-auto-loop.sh
4Lifecycle interceptor5가지 hook event type을 8개 스크립트로 디스패치: PreToolUse / PostToolUse / Stop / SessionStart / UserPromptSubmithooks/ (8개 스크립트) + .claude/settings.json
5Capability 기반 tool gatingSkill frontmatter의 allowed-tools — 예: /ask는 Edit/Write 없음공개된 95개 skill 중 86개가 allowed-tools를 선언
6Defense-in-depth 안전장치5개 레이어: pre-edit-guard → commit-msg-guard → pre-push-gate → stop-guard → sidecar fail-closed 마커scripts/pre-push-gate.sh + scripts/commit-msg-guard.sh + hooks/stop-guard.sh
7Generator-evaluator 분리듀얼 리뷰: 모든 리뷰 사이클에서 Codex(주)와 Claude(보조)를 병렬로 디스패치rules/codex-invocation.md + rules/auto-loop.md (Dual Review Mode)
8점진적 진행 추적iteration_history.current_round + max_rounds + 수렴 plateau 감지rules/auto-loop.md (exit conditions + strategic reset)
9Human-in-the-loop 안전 게이트파괴적 작업에 대한 /dev/tty 확인 + AskUserQuestionscripts/pre-push-gate.sh + skills/push-ci/SKILL.md
10자기 개선 루프지적 → lesson 기록 → 3회 이상 재발 시 rule로 승격rules/self-improvement.md

대부분의 harness 프로젝트는 이 중 2~4개만 다룹니다. sd0x-dev-flow는 10개 모두를 다루므로, 단순한 도구가 아니라 연구 대상으로서의 코드로 활용할 수 있습니다.

왜 sd0x-dev-flow인가?

가드레일 없을 때sd0x-dev-flow 사용 시
컨텍스트가 길면 AI가 리뷰를 건너뜀Hook 강제: stop-guard가 미완료 리뷰를 차단
단일 리뷰어가 문제를 놓침듀얼 디스패치: Codex + 보조 리뷰어 병렬 실행
"수정 완료"인데 재검증 없음Auto-loop: 수정 → 재리뷰 → 통과 → 계속
compact 후 리뷰 상태 소실상태 추적: SessionStart hook이 재주입

빠른 시작

# 플러그인 설치
/plugin marketplace add sd0xdev/sd0x-dev-flow
/plugin install sd0x-dev-flow@sd0xdev-marketplace

# 프로젝트 설정
/project-setup

하나의 명령어로 프레임워크, 패키지 매니저, 데이터베이스, 엔트리포인트, 스크립트를 자동 감지합니다. Rules와 Hooks의 서브셋을 설치합니다. 전체 플러그인에는 14개 Rules + 9개 Hooks가 포함됩니다.

--lite로 CLAUDE.md만 설정 (Rules/Hooks 스킵).

작동 원리

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"]

Auto-Loop 엔진이 품질 Gate를 자동으로 적용합니다. 코드 편집 후 리뷰 명령어가 듀얼 리뷰(Codex MCP + 보조 리뷰어 병렬 실행)를 디스패치합니다. Findings는 중복 제거, 심각도 정규화 후 단일 gate로 집계됩니다. strict 모드에서 Hooks는 fail-closed를 강제합니다: 집계 gate가 미완료이면 stop-guard가 차단합니다. 자세한 내용은 docs/hooks.md 참조.

상세: 듀얼 리뷰 시퀀스 다이어그램
sequenceDiagram
    participant D as Developer
    participant C as Claude
    participant X as Codex MCP
    participant T as Secondary Reviewer
    participant H as Hooks

    D->>C: Edit code
    H->>H: Track file change
    C->>H: emit-review-gate PENDING
    par Dual Review
        C->>X: Codex review (sandbox)
    and
        C->>T: Task(code-reviewer)
    end
    X-->>C: Findings (primary)
    T-->>C: Findings (secondary)
    C->>C: Aggregate + dedup + gate
    C->>H: emit-review-gate READY/BLOCKED

    alt Issues found
        C->>C: Fix all issues
        C->>X: --continue threadId
        X-->>C: Re-verify
    end

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

    Note over H: Strict mode: incomplete gate → blocked

기능 하이라이트: 듀얼 리뷰어 아키텍처

v2.0은 두 개의 독립적인 리뷰어를 병렬로 디스패치합니다 — 단일 장애점 제로:

리뷰어역할폴백
Codex MCP기본적으로 듀얼 리뷰, 저하 폴백 모드 지원사용 불가 시 싱글 리뷰어 모드로 폴백
보조 (pr-review-toolkit)신뢰도 스코어링 리뷰strict-reviewer → 싱글 모드

Findings는 심각도 정규화 (P0-Nit), 중복 제거 (파일 + 이슈 키, ±5줄 허용), 소스 귀속 (codex | toolkit | both)됩니다.

Gate: ✅ Ready 또는 ⛔ Blocked — strict 모드에서, 미완료 gate = blocked.

비교표

기능sd0x-dev-flowgstack일반 프롬프트
강제 리뷰 게이트Hook + 동작 레이어제안만없음
듀얼 리뷰어Codex + 보조 (병렬)단일 /review없음
자동 수정 루프수정 → 재리뷰 → 통과수동없음
멀티 에이전트 리서치/deep-research (3 에이전트)없음없음
적대적 검증내시 균형 디베이트없음없음
자기 개선교훈 로그 + 규칙 승격/retro 통계만없음
크로스 툴 지원Codex/Cursor/WindsurfClaude/Codex/Gemini/CursorN/A

사용 시나리오

적합부적합
Claude Code를 사용하는 개인/소규모 팀 프로젝트Claude Code를 전혀 사용하지 않는 팀
자동화된 리뷰 게이트가 필요한 프로젝트CI가 없는 일회성 스크립트
Codex CLI / Cursor / Windsurf 사용자 (skills 서브셋)커스텀 LLM 프로바이더가 필요한 프로젝트
품질 게이트로 리그레션을 방지하는 리포지토리테스트 인프라가 없는 리포지토리

설치

Codex CLI / 기타 AI 에이전트

# Agent Skills 표준으로 개별 스킬 설치
npx skills add sd0xdev/sd0x-dev-flow

# AGENTS.md 생성 + hooks 설치 (Claude Code 내에서 실행)
/codex-setup init
방법지원 도구커버리지
플러그인 설치Claude Code전체 (96 bundled skills, hooks, rules, auto-loop)
npx skills addCodex CLI, Cursor, Windsurf, AiderSkills만 (96 public skills)
/codex-setup initCodex CLIAGENTS.md 커널 + git hooks

요구 사항: Claude Code 2.1+ | Codex MCP(선택 — /codex-* skill에 필요; 미설치 시 싱글 리뷰어 모드로 폴백)

워크플로 트랙

워크플로명령어Gate적용 방식
기능 개발/feature-dev/verify/codex-review-fast/precommit✅/⛔Hook + Behavior
버그 수정/issue-analyze/bug-fix/verify/precommit✅/⛔Hook + Behavior
Auto-Loop코드 편집 → /codex-review-fast/precommit✅/⛔Hook
문서 리뷰.md 편집 → /codex-review-doc✅/⛔Hook
기획/codex-brainstorm/feasibility-study/tech-spec
온보딩/project-setup/repo-intake
시각화: 워크플로 플로차트
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

쿡북

어떤 스킬을 어떤 순서로 조합하면 좋은지 보여주는 실전 시나리오입니다.

시나리오흐름문서
레포지토리 온보딩 첫날/project-setup/repo-intake/next-step
새 기능 구현/feature-dev/verify/codex-test-review/codex-review-fast/precommit
PR 리뷰 코멘트 반영/load-pr-review → 수정 → /codex-review-fast/push-ci
머지 전 보안 점검/codex-security/dep-audit/risk-assess/pre-pr-audit
주요 콤보: 방향성 검증/deep-research/best-practices/feasibility-study/codex-brainstorm
주요 콤보: 적대적 설계/codex-brainstorm (내쉬 균형 토론) → /codex-architect

전체 10개 시나리오 →

포함 내용

카테고리수량예시
Skills96 public (96 bundled)/project-setup, /codex-review-fast, /verify, /smart-commit, /deep-research
Agents15strict-reviewer, verify-app, coverage-analyst, architecture-designer
Hooks9pre-edit-guard, auto-format, review state tracking, stop guard, namespace hint, post-compact-auto-loop, post-skill-auto-loop, user-prompt-review-guard, session-init
Rules14auto-loop, auto-loop-project, codex-invocation, security, testing, git-workflow, self-improvement, context-management
Scripts13precommit runner, verify runner, dep audit, namespace hint, skill runner, commit-msg guard, pre-push gate, utils (shared lib), emit-review-gate, build-codex-artifacts, resolve-feature (CLI + shell), feature-resolver, readme-catalog

최소한의 Context 사용량

Claude의 200k context window 중 ~4%만 사용합니다. 나머지 96%는 코드에 활용할 수 있습니다.

구성 요소토큰 수200k 대비 비율
Rules (상시 로드)5.1k2.6%
Skills (온디맨드)1.9k1.0%
Agents7910.4%
합계~8k~4%

Skills는 온디맨드로 로드됩니다. 미사용 Skills는 토큰을 소비하지 않습니다.

스킬 레퍼런스

Skill사용 시기
/project-setup프로젝트 최초 설정 시
/bug-fix버그 수정 및 이슈 해결 시
/feature-dev기능을 처음부터 끝까지 구현할 때
/smart-commit스마트 그룹핑으로 커밋할 때
/push-ci코드 푸시 및 CI 모니터링 시
/create-prGitHub Pull Request 생성 시
/codex-review-fast빠른 코드 리뷰 (diff만)
/codex-review-doc문서 변경 리뷰 시
/codex-securityOWASP Top 10 보안 감사 시
/verify전체 테스트 검증 체인 실행 시
/precommitPre-commit 품질 게이트 (lint + build + test)
/precommit-fast빠른 pre-commit (lint + test, 빌드 제외)
/codex-brainstorm대립형 브레인스토밍 (내시 균형)
/tech-spec기술 스펙 작성 시
/pr-review머지 전 PR 셀프 리뷰 시
전체 96개 public skills

개발 (33)

SkillDescription
/ask컨텍스트 인식 Q&A. 자동으로 컨텍스트 정보를 수집합니다.
/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-mergestacked PR chain을 epic branch로 순차 squash-merge합니다.
/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.

리뷰 (Codex MCP) (14)

SkillDescription루프 지원
/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.-
/security-reviewSecurity review via Codex MCP.-
/seek-verdictIndependent second-opinion verification for any finding.-
/test-reviewTest coverage review via Codex MCP.-

검증 (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

기획 (16)

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.
/post-dev-recapGuided post-dev recap wrapper — scope detection + doc generation + Q&A.
/project-briefConvert a technical spec into a PM/CTO-readable executive summary.
/recap-askRecap-bounded Q&A follow-up over an existing briefing-recap.
/recap-docPost-development recap document generator with blind-spot detection.
/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...

문서 및 도구 (20)

SkillDescription
/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

규칙 & Hook

14개 규칙 (상시 로드 컨벤션) + 9개 Hook (자동 가드레일).

커스터마이징: auto-loop-project.md를 편집하여 프로젝트별 auto-loop 동작을 오버라이드할 수 있습니다. 플러그인 업데이트와 충돌하지 않습니다 — Rule Override Pattern 참조.

전체 규칙, Hook, 환경 변수 레퍼런스는 docs/rules.mddocs/hooks.md를 참조하세요.

커스터마이즈

/project-setup으로 모든 placeholder를 자동 감지/설정하거나, .claude/CLAUDE.md를 직접 편집하세요:

Placeholder설명예시
{PROJECT_NAME}프로젝트 이름my-app
{FRAMEWORK}프레임워크MidwayJS 3.x, NestJS, Express
{CONFIG_FILE}메인 설정 파일src/configuration.ts
{BOOTSTRAP_FILE}부트스트랩 엔트리bootstrap.js, main.ts
{DATABASE}데이터베이스MongoDB, PostgreSQL
{TEST_COMMAND}테스트 명령어yarn test:unit
{LINT_FIX_COMMAND}Lint 자동 수정yarn lint:fix
{BUILD_COMMAND}빌드 명령어yarn build
{TYPECHECK_COMMAND}타입 체크yarn typecheck

쇼케이스: 멀티 에이전트 리서치

/deep-research를 실행하면 2-3개의 병렬 리서치 에이전트가 웹 소스, 코드베이스, 커뮤니티 지식을 횡단 조사합니다 — claim registry 통합과 조건부 적대적 디베이트를 지원합니다.

특징내용
에이전트2-3 병렬 (web + code + community)
통합Claim registry 합의 탐지
검증조건부 /codex-brainstorm 디베이트
스코어링4-시그널 완전성 모델

전체 문서

아키텍처

Command (진입점) → Skill (기능) → Agent (실행 환경)
  • Commands: 사용자가 /...로 실행
  • Skills: 요청 시 로드되는 지식 베이스
  • Agents: 전용 도구를 가진 격리된 서브에이전트
  • Hooks: 자동화 가드레일 (포맷팅, 리뷰 상태, 스톱 가드)
  • Rules: 항상 활성화된 컨벤션 (자동 로드)

고급 아키텍처에 대한 자세한 내용(agentic control stack, 제어 루프 이론, 샌드박스 규칙)은 docs/architecture.md를 참고하세요.

기여

PR 환영합니다. 다음 사항을 지켜주세요:

  1. 기존 네이밍 컨벤션 준수 (kebab-case)
  2. 스킬에 When to Use / When NOT to Use 포함
  3. 위험한 작업에는 disable-model-invocation: true 추가
  4. 제출 전 Claude Code로 테스트

라이선스

MIT

Star History

Star History Chart