원클릭으로
phase-workflow
Phase transition rules, post-phase verification steps, peer review validation, and commit-gate approval flow.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Phase transition rules, post-phase verification steps, peer review validation, and commit-gate approval flow.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Multi-agent delegation rules, three-phase workflow (Plan/Build/Review), model selection, collaboration gates, and Ralph Loop integration.
Autonomous build driver after SDD spec approval: phase-scoped headless build sessions, driver-owned commits, cross-provider review gates, milestone pauses, and fail-closed escalation — under explicit opt-in autonomy profiles.
When and how to ask clarifying questions before implementing. Data model review gate and ambiguity resolution rules.
Quality gates, prohibited patterns, verification discipline, and self-audit rules for all code generation and review sessions.
Cross-copilot portable conventions: read before write, minimal changes, git discipline, project structure, and priority rules.
Copyright header rules for generated source files. Applies the company name from providers.toml to new files.
| name | phase-workflow |
| description | Phase transition rules, post-phase verification steps, peer review validation, and commit-gate approval flow. |
Standardized steps to complete after each build phase, regardless of stack.
After Plan phase completes, verify:
specs/<feature-id>/plan.md exists with spec_mode in YAML frontmatterspec_mode is full or lightweight: spec.md exists in the same directory[NEEDS CLARIFICATION] markers remain in spec.mdBefore Build phase starts, verify based on spec_mode:
spec.md present, no unresolved [NEEDS CLARIFICATION], plan.md approvedspec.md present, no unresolved [NEEDS CLARIFICATION], plan.md approvedplan.md present and approved — no further spec artifacts requiredRules preventing false completion claims. Derived from a real incident where Claude marked a phase complete with major deliverables missing, then suggested experimental work.
Never mark a phase as complete when deliverables are missing. If a phase has two deliverable clusters (e.g., auth middleware + chat UI) and only one is built, the phase is partially complete. Report exactly what is done and what remains.
When presenting phase status, compare against the latest approved plan/spec (plan.md, spec.md, and tasks.md when present) — not your memory of what was built. If the approved plan says "Auth/RBAC + UI Split into Chat UI and Admin Console" and you only built auth, do not rewrite the summary as "Role-based auth middleware, CORS preflight." Report the gap.
Never suggest experimental, nice-to-have, or post-plan work when core deliverables from the current or earlier phases are incomplete. If the plan has sequencing prerequisites (e.g., "only pursue after Phase N gates are met"), enforce them.
When existing functionality is removed or replaced during a phase (e.g., replacing a Dash app with FastAPI), verify the replacement is functional before closing the phase. A regression from "working app" to "no app" is a hard blocker — not a separate bug to fix later.
Type/lint check. Run the project's type checker and linter. Zero errors required before proceeding.
tsc --noEmit, mypy src/, mvn compile, go vet ./...npm run lint, ruff check ., mvn checkstyle:checkDependency verification. After any dependency change, run the full install + build cycle. Static analysis doesn't catch missing runtime packages.
npm install && npm run build, pip install -r requirements.txt, mvn dependency:resolve2.5. Infrastructure verification. After any phase that creates or modifies Docker, Compose, or CI
workflow files — run the artifact to verify it works. This is NOT optional. If you introduced
a Dockerfile, run docker build. If you introduced a compose file, run docker compose up --build and verify health. If you introduced a CI workflow, validate the YAML syntax. See
infra-verification.md for the full command reference.
- Infrastructure verification failures block the commit, just like test failures.
- Environment issues are diagnosed and fixed, not worked around.
Build verification. Run the dev server or build command. This catches missing dependencies, import resolution issues, and config errors that static analysis misses.
npm run dev, python manage.py runserver, mvn spring-boot:run, go run .Integration smoke test. For phases that touch auth, API routes, or database access — verify the integration works with a real request, not just a type check. Auth issues caught late cost hours.
Present summary. List files created/modified, key decisions made, and any deviations from the plan.
Manual testing gate. User verifies UI, interactive features, and business logic. Automated tests don't replace human judgment on UX.
Dependency audit. Review console output for errors. Check for missing runtime dependencies, unresolved peer dependencies, or deprecation warnings.
Commit gate. Ask the user before committing. Suggest a conventional commit message with context. Keep commits granular — one phase per commit, not multiple phases bundled together.
Wait for approval. Do not start the next phase until the user confirms this one is complete.
Origin alignment gate. Before peer review, run scripts/check-origin-alignment.sh <feature-id>. Exit 0 or 1 proceeds. Exit ≥ 2 aborts the phase with the three-resolution escalation prompt (rescope / restart / document divergence). This gate is independent of peer review: peer review scores implementation quality; this gate scores origin alignment. See origin-confirmation.md for the full contract.
Peer review (if active). If CCT_PEER_REVIEW_ENABLED is true, the Build agent must complete the review loop via /review-submit before running /phase-complete. The stop hook validates that loop-summary.json exists with PASS or approved bypass — it does not initiate review. Plan-phase review is advisory and single-round. See review-loop.md for the full protocol.
When a feature runs under scripts/auto-build-loop.sh (see
auto-build-loop.md), the human gates above are not bypassed — they are
converted into explicit, configured state transitions under an opt-in
autonomy profile declared in specs/<feature-id>/automation.json:
| Gate (step) | advisory | pr | merge |
|---|---|---|---|
| Manual testing (6) | deferred to milestone checkpoint | deferred to milestone | deferred to milestone |
| Commit gate (8) | driver auto-commits, local only, isolated branch | auto-commit | auto-commit |
| Wait-for-approval (9) | auto-advance; hard pause every N phases | same | same |
| Origin gate exit >= 2 (10) | always escalate to human | always escalate | always escalate |
| Peer review (11) | driver-run and gating; driver independently verifies PASS | same | same + green CI |
| Push / PR / merge | never / never / never | auto / auto / never | auto / auto / gated auto |
The driver runs build sessions with CCT_PEER_REVIEW_ENABLED=false because
it owns the review gate itself (the stop hook validates completion, not
initiation). Milestone checkpoints batch steps 6 and 9: the human manually
tests, records retro notes, and signs off with an approved-by: line before
the loop resumes. Origin escalation semantics are unchanged — the driver
never resolves rescope/restart/divergence on the user's behalf.
.env, application.yml, etc.) from example/template[], null, {})Start a new session after each completed phase. Do not run Phases 1 through 4 in a single session — context exhaustion degrades quality in later phases. Commit, rename the session, and start fresh.
Rules for verifying that changes compile, build, and run after every significant modification.
When any agent adds, removes, or modifies a dependency:
# Generic pattern — adapt to your stack:
# 1. Install
# 2. Type check / compile
# 3. Run dev server
# 4. Verify no console errors
If any step fails, fix it before proceeding. Do not move forward with a broken build.
When a sub-agent returns from a delegated task:
When multiple agents finish concurrent work:
From real-world experience: missing runtime dependencies (packages imported in code but never installed) are the single most common build failure in multi-agent workflows. Static analysis (type checkers, linters) does NOT catch these. Only actually running the application reveals missing packages.
The cost of catching a missing dependency immediately: 30 seconds. The cost of discovering it 3 phases later: potentially hours of debugging cascading failures.