Skip to content

feat(wiki-plan): Analyze/Design/Decompose phase gates (cycle-hardening) - #174

Merged
choiyounggi merged 10 commits into
mainfrom
cycle-hardening
Sep 2, 2026
Merged

feat(wiki-plan): Analyze/Design/Decompose phase gates (cycle-hardening)#174
choiyounggi merged 10 commits into
mainfrom
cycle-hardening

Conversation

@choiyounggi

Copy link
Copy Markdown
Owner

Summary

wiki-plan을 분석(A) → 설계(B) → 계획(C) 3단계 + 기계 판정 게이트로 재구조화 (spec: plans/cycle-hardening/design.md).

  • plan-gate.sh: Phase A/B 게이트 8종 기계 판정기 (check/emit, exit 0/2/3/4) + 템플릿 3종 (templates/{analysis,design-doc,plan-gates}.md). 파서는 검증만, 명령 실행은 레저 CHECK 단일화
  • plan-reviewer: 읽기 전용 fresh-context 설계 리뷰 서브에이전트 (VERDICT 고정 규격, 자기채점 가드)
  • wiki-plan SKILL.md: A/B/C 재구조화 — Example Mapping 요구사항(OPEN: 게이트), 그라운드 트루스 증거 의무, XP Spike, gate-A/B emit+run 결선, lite 모드(공개 ABANDON), 경로형 Wiki basis, ATDD covers: + 핀 예산
  • research 롤: loop-implement 도구 프로파일에 추가, 해석 순서 고정 (설정 도구 → brave-search MCP → WebSearch → 공개 ABANDON) + 7b PLAN-defect A/B/C 라우팅
  • orchestrate: step 2a에 게이트 증거 없는 계획 디스패치 금지

Test plan

  • 통합 스위트 910/910 green (신규 bats 5파일: plan-gate 42케이스 + 네거티브 컨트롤, plan-reviewer 12, resolve-tools research 4, loop-gate plan-ledger 2, dispatch-contracts 4)
  • integration-reviewer approve, 발견 0건 (크로스 태스크 계약 문자열·ABANDON 의미론 대조 검증)
  • loop-gate Stop 훅이 plan-A/B 레저를 무수정으로 파싱함을 테스트로 증명

🤖 Generated with Claude Code

https://claude.ai/code/session_01HMv82jz3FafjA6fzqQ3hHc

choiyounggi and others added 10 commits September 2, 2026 15:28
Fleshes out the agents/plan-reviewer.md stub into a read-only,
fresh-context reviewer for wiki-plan Phase B design docs (analysis.md +
design doc), matching the integration-reviewer/test-quality-auditor
pattern: 4 fixed review lenses, a self-grading guard, and a fixed
VERDICT/FINDINGS/SUMMARY output contract. Adds tests/plan-reviewer-agent.bats
verifying the artifact's structure with paired negative controls.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014rwgjeueXH8Mho12wEhAjC
…etation order

Adds a `research` role to resolve-tools.sh's capability-role pattern for
loop-implement's cycle-hardening work (design.md §3). Unlike other roles,
the fallback chain when unconfigured (configured tool -> brave-search MCP
-> built-in WebSearch -> ABANDON research-evidenced) is owned by the SKILL
text, not the shell script, since resolve-tools.sh can only detect
configured/default and not MCP tool availability. Also adds the 7b BLOCKED
routing line mapping plan-defect causes to wiki-plan Phase A/B/C repair.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017MgGBE8G8gfxzFbD5WePee
…coverage

Implements skills/wiki-plan/scripts/plan-gate.sh (POSIX sh, verified under
dash) as the mechanical judge for the 8 Phase A/B plan gates (cycle-hardening
design.md §3): `check <gate-id> <plan-dir> [<wiki-root>]` judges one gate
(stdout exactly "ok"|"fail", exit 0/2/3/4) and `emit <A|B> <plan-dir>
<out-file>` writes a gates ledger from templates/plan-gates.md. The ledger
syntax is unmodified CHECK:/EXPECT:/EVIDENCE: (same as templates/gates.md),
so gate-check.sh and hooks/loop-gate.sh's Stop hook consume plan-A/B ledgers
with zero changes to either script.

Fills in templates/analysis.md, templates/design-doc.md, templates/plan-gates.md
with real, parser-consumable section formats. Adds tests/plan-gate.bats (87
cases incl. per-gate pass/fail/target-missing fixtures under
tests/fixtures/plan-gate/**) and appends plan-ledger cases to
tests/loop-gate.bats (append-only, no existing case touched).

Rework round 1: check_baseline_tests_ran no longer executes the parsed
Baseline command (plan D4 — execution belongs solely to the emitted ledger's
own CHECK line, run by gate-check.sh under its timeout/evidence handling);
it now validates target presence + parseability only, with a dedicated test
proving a failing command still returns ok.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SftEH8hBwTmJS2WdfNJAR4
Phase 3 step 2a now requires .dev-loop/gates/plan-A-<task>.md and
plan-B-<task>.md to exist and gate-check.sh --run to exit 0 before a
task is dispatched to a worker (lite-mode ABANDON with a recorded
reason still counts as passing). A plan with no evidence — missing
ledger, or any gate left UNMET/CLAIMED — is sent back to wiki-plan's
corresponding Phase instead of launching.

Spec: plans/cycle-hardening/design.md §4 row 6. Consumes only
t1-plan-gate's ledger-filename convention and gate-check.sh --run
verdict (does not re-create either).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Rewrite skills/wiki-plan/SKILL.md into Phase A (Analyze) -> gate-A ->
Phase B (Design) -> gate-B -> Phase C (Decompose), wiring in
plan-gate.sh emit + gate-check.sh --run and a plan-reviewer subagent
call (bounded retry, escalate on 3rd FAIL). Converts Wiki basis
citations to repo-relative paths with a 6-column Decisions table, and
codifies lite mode via the existing ABANDON ledger mechanism instead
of a silent skip. Preserves frontmatter, Rule zero, and Execution
handoff verbatim; Phase C keeps its original step numbering so the
existing orchestrate-dispatch-contracts.bats pins needed no changes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cc71FDteF4xNLnhBRZFp9c
@choiyounggi
choiyounggi merged commit b73c134 into main Sep 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant