Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
c536b16
fix(hook): Close fail-open gaps in stop-guard and change tracking
sd0xdev Jun 12, 2026
eaf0594
docs(workflow-orchestration): Add feasibility study and requirements
sd0xdev Jun 12, 2026
3be3372
docs(plan-review-loop): Add lifecycle specs for pre-ExitPlanMode gate
sd0xdev Jun 12, 2026
95846ae
feat(plan-review): Add pre-ExitPlanMode adversarial plan review loop
sd0xdev Jul 3, 2026
01db6ac
docs(plan-review-loop): Sync tech spec with implementation and add v1…
sd0xdev Jul 3, 2026
55c14db
feat(orchestrate): Add agent-driven workflow orchestration (report-on…
sd0xdev Jul 3, 2026
e890782
docs(workflow-orchestration): Add tech spec and v1 request ticket
sd0xdev Jul 3, 2026
2a3eacb
fix(catalog): Register /plan-review and /orchestrate, count untracked…
sd0xdev Jul 3, 2026
a644717
fix(test): expand npm test glob so nested suites run under /bin/sh
sd0xdev Jul 6, 2026
0ce8986
fix(hooks): harden review-state gates — fail-closed parsing, locked w…
sd0xdev Jul 6, 2026
d2c321e
fix(scripts): word-bound AI attribution patterns, precommit skip reco…
sd0xdev Jul 6, 2026
83f7bdc
docs: sync forbidden-pattern tables, dep-audit allowed-tools, test-co…
sd0xdev Jul 6, 2026
031547e
fix(hooks): harden review-state and session gates against fail-open a…
sd0xdev Jul 10, 2026
e3d8542
fix(scripts): word-bound AI patterns, fail-closed precommit all-skip,…
sd0xdev Jul 10, 2026
98df154
docs: sync resource counts and AI-pattern wording across READMEs, tec…
sd0xdev Jul 10, 2026
fe6a06f
fix(orchestrate): detect .git/-internals bypass in run-verify SC-2 ba…
sd0xdev Jul 10, 2026
f4187c5
fix(orchestrate): enforce DAG and expand forbidden sentinels in valid…
sd0xdev Jul 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ node_modules/
settings.local.json
.claude_review_state.json
.claude_nit_history.json
.claude_workflows/
.claude/

# Local-only skills (not published)
Expand Down
4 changes: 3 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ Coverage: happy path + error handling + edge cases (null, empty, extremes)
| `/feasibility-study` | Feasibility analysis | Requirements |
| `/tech-spec` | Generate tech spec | Design |
| `/review-spec` | Review tech spec | Design |
| `/plan-review` | Pre-ExitPlanMode adversarial plan review loop | Planning |
| `/orchestrate` | Agent-driven workflow planning + read-only fanout (report-only v1) | Planning |
| `/deep-analyze` | Deep analysis + roadmap | Design |
| `/architecture` | Architecture design + 3-architecture.md | Design |
| `/project-brief` | PM/CTO executive summary | Design |
Expand Down Expand Up @@ -139,7 +141,7 @@ Coverage: happy path + error handling + edge cases (null, empty, extremes)
## Development Rules

1. **Reference existing code** -- find similar files first, keep style consistent
2. **Test command** -- `node --test test/**/*.test.js`
2. **Test command** -- `npm test`(`node --test $(find test -name '*.test.js')` — npm scripts 走 `/bin/sh`,`**` glob 不展開巢狀目錄,勿用 `test/**/*.test.js`
3. **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: install `commit-msg-guard.sh` via `/install-scripts`. PRs: `/create-pr` Step 4b enforces sanitization automatically.
4. **No auto-commit** -- Claude must not run `git add`, `git commit`, `git push` (exception: `/push-ci` may execute `git push` after user approval; `/smart-commit --execute` may execute `git add` + `git commit` after user approval)

Expand Down
2 changes: 2 additions & 0 deletions CLAUDE.template.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ Coverage: happy path + error handling + edge cases (null, empty, extremes)
| `/feasibility-study` | Feasibility analysis | Requirements |
| `/tech-spec` | Generate tech spec | Design |
| `/review-spec` | Review tech spec | Design |
| `/plan-review` | Pre-ExitPlanMode adversarial plan review loop | Planning |
| `/orchestrate` | Agent-driven workflow planning + read-only fanout (report-only v1) | Planning |
| `/deep-analyze` | Deep analysis + roadmap | Design |
| `/architecture` | Architecture design + 3-architecture.md | Design |
| `/project-brief` | PM/CTO executive summary | Design |
Expand Down
8 changes: 4 additions & 4 deletions README.es.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ La mayoría de proyectos de harness cubren 2–4 de estos subproblemas. sd0x-dev
/project-setup
```

Un solo comando autodetecta framework, package manager, base de datos, entry points y scripts. Instala un subconjunto de rules y hooks; el plugin completo incluye 14 rules + 9 hooks.
Un solo comando autodetecta framework, package manager, base de datos, entry points y scripts. Instala un subconjunto de rules y hooks; el plugin completo incluye 14 rules + 8 hooks.

Usa `--lite` para solo configurar CLAUDE.md (sin rules/hooks).

Expand Down Expand Up @@ -249,9 +249,9 @@ Escenarios reales que muestran qué habilidades combinar y en qué orden.
|-----------|----------|----------|
| Skills | 96 public (96 bundled) | `/project-setup`, `/codex-review-fast`, `/verify`, `/smart-commit`, `/deep-research` |
| Agents | 15 | strict-reviewer, verify-app, coverage-analyst, architecture-designer |
| Hooks | 9 | pre-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 |
| Hooks | 8 | pre-edit-guard, auto-format, review state tracking, stop guard, post-compact-auto-loop, post-skill-auto-loop, user-prompt-review-guard, session-init |
| Rules | 14 | auto-loop, auto-loop-project, codex-invocation, security, testing, git-workflow, self-improvement, context-management |
| Scripts | 13 | precommit 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 |
| Scripts | 17 | precommit runner, verify runner, dep audit, namespace hint, skill runner, commit-msg guard, pre-push gate, emit-review-gate, emit-plan-gate, build-codex-artifacts, resolve-feature (CLI + shell), classify-docs, detect-scope, migration-audit, security-redact, readme-catalog |
<!-- END:WHATS-INCLUDED-COUNT -->

### Mínimo consumo de context
Expand Down Expand Up @@ -419,7 +419,7 @@ Los skills se cargan bajo demanda. Los skills inactivos no consumen tokens.

## Reglas & Hooks

14 reglas (convenciones siempre cargadas) + 9 hooks (guardrails automatizados).
14 reglas (convenciones siempre cargadas) + 8 hooks (guardrails automatizados).

> **Personalización**: Edita `auto-loop-project.md` para sobrescribir el comportamiento de auto-loop por proyecto. Las actualizaciones del plugin no conflictuarán — ver [Rule Override Pattern](docs/features/rule-override-pattern/2-tech-spec.md).

Expand Down
8 changes: 4 additions & 4 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ sd0x-dev-flow は reference implementation です。以下の各行は、harness
/project-setup
```

1つのコマンドでフレームワーク、パッケージマネージャー、データベース、エントリポイント、スクリプトを自動検出します。ルールとフックのサブセットをインストールします。完全なプラグインには14ルール + 9フックが含まれます
1つのコマンドでフレームワーク、パッケージマネージャー、データベース、エントリポイント、スクリプトを自動検出します。ルールとフックのサブセットをインストールします。完全なプラグインには14ルール + 8フックが含まれます

`--lite` で CLAUDE.md のみ設定(ルール/フックをスキップ)。

Expand Down Expand Up @@ -249,9 +249,9 @@ flowchart TD
|----------|-----|-----|
| スキル | 96 public (96 bundled) | `/project-setup`, `/codex-review-fast`, `/verify`, `/smart-commit`, `/deep-research` |
| エージェント | 15 | strict-reviewer, verify-app, coverage-analyst, architecture-designer |
| フック | 9 | pre-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 |
| フック | 8 | pre-edit-guard, auto-format, review state tracking, stop guard, post-compact-auto-loop, post-skill-auto-loop, user-prompt-review-guard, session-init |
| ルール | 14 | auto-loop, auto-loop-project, codex-invocation, security, testing, git-workflow, self-improvement, context-management |
| スクリプト | 13 | precommit 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 |
| スクリプト | 17 | precommit runner, verify runner, dep audit, namespace hint, skill runner, commit-msg guard, pre-push gate, emit-review-gate, emit-plan-gate, build-codex-artifacts, resolve-feature (CLI + shell), classify-docs, detect-scope, migration-audit, security-redact, readme-catalog |
<!-- END:WHATS-INCLUDED-COUNT -->

### 極小の Context 使用量
Expand Down Expand Up @@ -419,7 +419,7 @@ Claude の 200k context window のわずか ~4% — 96% はコードに使えま

## ルール & フック

14 ルール(常時読み込みの規約)+ 9 フック(自動ガードレール)。
14 ルール(常時読み込みの規約)+ 8 フック(自動ガードレール)。

> **カスタマイズ**:`auto-loop-project.md` を編集してプロジェクトの auto-loop 動作をオーバーライドできます。プラグイン更新と競合しません — [Rule Override Pattern](docs/features/rule-override-pattern/2-tech-spec.md) 参照。

Expand Down
8 changes: 4 additions & 4 deletions README.ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ sd0x-dev-flow는 그 reference implementation입니다. 아래 각 행은 harnes
/project-setup
```

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

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

Expand Down Expand Up @@ -249,9 +249,9 @@ flowchart TD
|----------|------|------|
| Skills | 96 public (96 bundled) | `/project-setup`, `/codex-review-fast`, `/verify`, `/smart-commit`, `/deep-research` |
| Agents | 15 | strict-reviewer, verify-app, coverage-analyst, architecture-designer |
| Hooks | 9 | pre-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 |
| Hooks | 8 | pre-edit-guard, auto-format, review state tracking, stop guard, post-compact-auto-loop, post-skill-auto-loop, user-prompt-review-guard, session-init |
| Rules | 14 | auto-loop, auto-loop-project, codex-invocation, security, testing, git-workflow, self-improvement, context-management |
| Scripts | 13 | precommit 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 |
| Scripts | 17 | precommit runner, verify runner, dep audit, namespace hint, skill runner, commit-msg guard, pre-push gate, emit-review-gate, emit-plan-gate, build-codex-artifacts, resolve-feature (CLI + shell), classify-docs, detect-scope, migration-audit, security-redact, readme-catalog |
<!-- END:WHATS-INCLUDED-COUNT -->

### 최소한의 Context 사용량
Expand Down Expand Up @@ -419,7 +419,7 @@ Skills는 온디맨드로 로드됩니다. 미사용 Skills는 토큰을 소비

## 규칙 & Hook

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

> **커스터마이징**: `auto-loop-project.md`를 편집하여 프로젝트별 auto-loop 동작을 오버라이드할 수 있습니다. 플러그인 업데이트와 충돌하지 않습니다 — [Rule Override Pattern](docs/features/rule-override-pattern/2-tech-spec.md) 참조.

Expand Down
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
**Quality gates that AI can't skip.** A reference implementation of AI Agent Harness Engineering for [Claude Code](https://claude.com/claude-code) — hook-enforced dual review, state-machine gates that survive context compaction, and fail-closed safety where it counts.

<!-- BEGIN:HERO-COUNT -->
96 bundled · 96 public skills · 15 agents — ~4% of Claude's context window
98 bundled · 98 public skills · 15 agents — ~4% of Claude's context window
<!-- END:HERO-COUNT -->

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) [![npm](https://img.shields.io/badge/npx-skills%20add-blue)](https://www.npmjs.com/package/skills)
Expand All @@ -26,7 +26,7 @@ sd0x-dev-flow is a reference implementation. Each row below maps a canonical har
| 2 | **Sentinel-driven state machine** | `✅ Ready` / `⛔ Blocked` / `✅ All Pass` gate markers parsed into durable state | [`scripts/emit-review-gate.sh`](scripts/emit-review-gate.sh) (producer) + [`hooks/post-tool-review-state.sh`](hooks/post-tool-review-state.sh) (parser) |
| 3 | **Context recovery across compaction** | `[AUTO_LOOP_RESUME]` stdout injection after SessionStart(compact) | [`hooks/post-compact-auto-loop.sh`](hooks/post-compact-auto-loop.sh) |
| 4 | **Lifecycle interceptors** | 5 hook event types dispatched to 8 scripts: PreToolUse / PostToolUse / Stop / SessionStart / UserPromptSubmit | [`hooks/`](hooks/) (8 scripts) + [`.claude/settings.json`](.claude/settings.json) |
| 5 | **Capability-based tool gating** | Skill frontmatter `allowed-tools` — e.g., `/ask` has no Edit/Write | 86 of 95 public skills declare `allowed-tools` |
| 5 | **Capability-based tool gating** | Skill frontmatter `allowed-tools` — e.g., `/ask` has no Edit/Write | 89 of 98 public skills declare `allowed-tools` |
| 6 | **Defense-in-depth safety** | 5 layers: pre-edit-guard → commit-msg-guard → pre-push-gate → stop-guard → sidecar fail-closed marker | [`scripts/pre-push-gate.sh`](scripts/pre-push-gate.sh) + [`scripts/commit-msg-guard.sh`](scripts/commit-msg-guard.sh) + [`hooks/stop-guard.sh`](hooks/stop-guard.sh) |
| 7 | **Generator-evaluator split** | Dual review: Codex (primary) + Claude (secondary) dispatched in parallel on every review cycle | [`rules/codex-invocation.md`](rules/codex-invocation.md) + [`rules/auto-loop.md`](rules/auto-loop.md) (Dual Review Mode) |
| 8 | **Incremental progress tracking** | `iteration_history.current_round` + `max_rounds` + convergence plateau detection | [`rules/auto-loop.md`](rules/auto-loop.md) (exit conditions + strategic reset) |
Expand Down Expand Up @@ -55,7 +55,7 @@ Most harness projects cover 2–4 of these. sd0x-dev-flow covers all 10 — whic
/project-setup
```

One command auto-detects framework, package manager, database, entrypoints, and scripts. Installs a subset of rules and hooks; the full plugin bundles 14 rules + 9 hooks.
One command auto-detects framework, package manager, database, entrypoints, and scripts. Installs a subset of rules and hooks; the full plugin bundles 14 rules + 8 hooks.

Use `--lite` to only configure CLAUDE.md (skip rules/hooks).

Expand Down Expand Up @@ -162,8 +162,8 @@ npx skills add sd0xdev/sd0x-dev-flow
<!-- BEGIN:INSTALL-COVERAGE -->
| Method | Tools | Coverage |
|--------|-------|----------|
| Plugin install | Claude Code | Full (96 bundled skills, hooks, rules, auto-loop) |
| `npx skills add` | Codex CLI, Cursor, Windsurf, Aider | Skills only (96 public skills) |
| Plugin install | Claude Code | Full (98 bundled skills, hooks, rules, auto-loop) |
| `npx skills add` | Codex CLI, Cursor, Windsurf, Aider | Skills only (98 public skills) |
| `/codex-setup init` | Codex CLI | AGENTS.md kernel + git hooks |
<!-- END:INSTALL-COVERAGE -->

Expand Down Expand Up @@ -247,11 +247,11 @@ Real-world scenarios showing which skills to combine and in what order.
<!-- BEGIN:WHATS-INCLUDED-COUNT -->
| Category | Count | Examples |
|----------|-------|---------|
| Skills | 96 public (96 bundled) | `/project-setup`, `/codex-review-fast`, `/verify`, `/smart-commit`, `/deep-research` |
| Skills | 98 public (98 bundled) | `/project-setup`, `/codex-review-fast`, `/verify`, `/smart-commit`, `/deep-research` |
| Agents | 15 | strict-reviewer, verify-app, coverage-analyst, architecture-designer |
| Hooks | 9 | pre-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 |
| Hooks | 8 | pre-edit-guard, auto-format, review state tracking, stop guard, post-compact-auto-loop, post-skill-auto-loop, user-prompt-review-guard, session-init |
| Rules | 14 | auto-loop, auto-loop-project, codex-invocation, security, testing, git-workflow, self-improvement, context-management |
| Scripts | 13 | precommit 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 |
| Scripts | 17 | precommit runner, verify runner, dep audit, namespace hint, skill runner, commit-msg guard, pre-push gate, emit-review-gate, emit-plan-gate, build-codex-artifacts, resolve-feature (CLI + shell), classify-docs, detect-scope, migration-audit, security-redact, readme-catalog |
<!-- END:WHATS-INCLUDED-COUNT -->

### Minimal Context Footprint
Expand Down Expand Up @@ -291,7 +291,7 @@ Skills load on-demand. Idle skills cost zero tokens.

<!-- BEGIN:FULL-CATALOG -->
<details>
<summary>All 96 public skills</summary>
<summary>All 98 public skills</summary>

### Development (33)

Expand Down Expand Up @@ -331,7 +331,7 @@ Skills load on-demand. Idle skills cost zero tokens.
| `/smart-rebase` | Smart partial rebase for squash-merge repositories. |
| `/watch-ci` | Monitor GitHub Actions CI runs until completion. |

### Review (Codex MCP) (14)
### Review (Codex MCP) (15)

| Skill | Description | Loop Support |
|-------|-------------|--------------|
Expand All @@ -346,6 +346,7 @@ Skills load on-demand. Idle skills cost zero tokens.
| `/codex-test-gen` | Generate unit tests for specified functions using Codex MCP | - |
| `/codex-test-review` | Review test case sufficiency using Codex MCP, suggest additional edge cases. | `--continue <threadId>` |
| `/doc-review` | Document review via Codex MCP. | - |
| `/plan-review` | Pre-ExitPlanMode adversarial plan review loop via Codex MCP. | - |
| `/security-review` | Security review via Codex MCP. | - |
| `/seek-verdict` | Independent second-opinion verification for any finding. | - |
| `/test-review` | Test coverage review via Codex MCP. | - |
Expand All @@ -368,7 +369,7 @@ Skills load on-demand. Idle skills cost zero tokens.
| `/test-health` | Holistic test coverage measurement. |
| `/verify` | Verification loop — lint -> typecheck -> unit -> integration -> e2e |

### Planning (16)
### Planning (17)

| Skill | Description |
|-------|-------------|
Expand All @@ -378,6 +379,7 @@ Skills load on-demand. Idle skills cost zero tokens.
| `/deep-research` | Universal multi-source research orchestration. |
| `/feasibility-study` | Feasibility analysis from first principles. |
| `/fp-brief` | First-principles briefing from technical documents. |
| `/orchestrate` | Agent-driven workflow orchestration (v1 report-only). |
| `/post-dev-recap` | Post-development recap wrapper. |
| `/project-brief` | Convert a technical spec into a PM/CTO-readable executive summary. |
| `/recap-ask` | Interactive Q&A over an existing recap document. |
Expand Down Expand Up @@ -419,7 +421,7 @@ Skills load on-demand. Idle skills cost zero tokens.

## Rules & Hooks

14 rules (always-loaded conventions) + 9 hooks (automated guardrails).
14 rules (always-loaded conventions) + 8 hooks (automated guardrails).

> **Customization**: Edit `auto-loop-project.md` to override auto-loop behavior per project. Plugin updates won't conflict — see [Rule Override Pattern](docs/features/rule-override-pattern/2-tech-spec.md).

Expand Down
Loading