phase-enforcement
БесплатноБез исполняемых скриптовНе проверенEvidence-based phase completion enforcement for /dev:feature. Use when orchestrating 8-phase feature development to ensure artifacts exist before phase…
от MadAppGang★ 290 звёзд на GitHubОб этом скилле
Phase Completion Enforcement
Version: 1.0.0 Purpose: Mechanical enforcement of phase completion requirements for /dev:feature Status: Production Ready
Overview
This skill provides mechanical enforcement (not just prompt-based instructions) for the 8-phase feature development workflow. It prevents:
- Claiming completion without proof - Artifacts must exist
- Skipping documentation - Required files per phase
- Ignoring validation criteria - Phase 1 criteria must map to Phase 7 results
- Bypassing retry logic - Outer loop enforced with state tracking
- Shipping without tests - Phase 6 requires test files
- Faking completion when blocked - Graceful degradation with honest status
- Hiding actual results - Show-your-work requirement
- Missing automated checks - Checkpoint verification at boundaries
Enforcement Components
1. Phase Completion Validator
Script: scripts/phase-completion-validator.js
How it works:
- Runs as PreToolUse hook on TaskUpdate
- Detects phase from task subject (e.g., "Phase 3: Planning")
- Checks required artifacts exist for that phase
- Blocks completion if artifacts missing or empty
Required Artifacts per Phase:
| Phase | Required Artifacts | Custom Checks |
|---|---|---|
| 1 | requirements.md, validation-criteria.md, iteration-config.json | Config has required fields |
| 3 | architecture.md | Plan reviews exist |
| 4 | implementation-log.md | Git changes detected |
| 5 | reviews/code-review/consolidated.md | Has PASS/FAIL verdict |
| 6 | tests/test-plan.md | Test files created |
| 7 | validation/result.md | Has PASS/FAIL status + evidence |
| 8 | report.md | Phase 7 PASSED |
Usage in orchestrator:
Before marking any phase complete:
1. Run checkpoint verification:
```bash
${PLUGIN_PATH}/scripts/checkpoint-verifier.sh phase{N} ${SESSION_PATH}
If check passes, mark task complete:
TaskUpdate(taskId: X, status: "completed")If check fails, DO NOT mark complete. Fix missing artifacts first.
---
### 2. Outer Loop Enforcer
**Script:** `scripts/outer-loop-enforcer.js`
**How it works:**
- Tracks iteration state in session-meta.json
- Blocks Phase 8 unless Phase 7 PASSED
- Detects regression (score getting worse)
- Handles escalation when max iterations reached
**Commands:**
```bash
# Start new iteration (call before Phase 3)
node outer-loop-enforcer.js start-iteration ${SESSION_PATH}
# Record Phase 7 result
node outer-loop-enforcer.js record-result ${SESSION_PATH} PASS "All checks passed" 95
# Check if Phase 8 can proceed
node outer-loop-enforcer.js check-can-complete ${SESSION_PATH}
# Get current status
node outer-loop-enforcer.js get-status ${SESSION_PATH}
Session state tracking:
{
"outerLoop": {
"currentIteration": 2,
"maxIterations": 3,
"mode": "limited",
"phase7Results": [
{"iteration": 1, "status": "FAIL", "reason": "Button color mismatch", "score": 78},
{"iteration": 2, "status": "PASS", "reason": "All checks passed", "score": 94}
]
}
}
Usage in orchestrator:
OUTER LOOP: Before starting Phase 3
1. Start iteration:
```bash
node ${PLUGIN_PATH}/scripts/outer-loop-enforcer.js start-iteration ${SESSION_PATH}
- Check exit code:
- 0: Proceed with iteration
- 2: Max iterations reached, escalate to user
OUTER LOOP: After Phase 7 completes
Record result:
node ${PLUGIN_PATH}/scripts/outer-loop-enforcer.js record-result ${SESSION_PATH} <PASS|FAIL> "reason" [score]If PASS: Proceed to Phase 8
If FAIL: Loop back to Phase 3 (start-iteration will be called again)
OUTER LOOP: Before Phase 8
Verify Phase 7 passed:
node ${PLUGIN_PATH}/scripts/outer-loop-enforcer.js check-can-complete ${SESSION_PATH}If exit code 1: BLOCKED - cannot proceed to Phase 8
---
### 3. Validation Criteria Enforcer
**Script:** `scripts/validation-criteria-enforcer.js`
**How it works:**
- Parses validation-criteria.md from Phase 1
- Parses validation/result.md from Phase 7
- Matches criteria to results using fuzzy matching
- Blocks if >20% criteria unaddressed
**Usage in orchestrator:**
```markdown
PHASE 7: After creating result.md
1. Run criteria enforcer:
```bash
node ${PLUGIN_PATH}/scripts/validation-criteria-enforcer.js ${SESSION_PATH}
Review generated report: ${SESSION_PATH}/validation/criteria-mapping.md
If unaddressed criteria found:
- Update result.md to address them
- Or document why they couldn't be tested
**Output format:**
```markdown
# Validation Criteria Mapping Report
## Summary
- Total Criteria: 5
- Matched: 4
- Unmatched: 1
- Coverage: 80%
## Criteria Mapping
| Line | Criterion | Result | Evidence |
|------|-----------|--------|----------|
| 12 | "Navigate to test URL" | PASS | screenshot-before.png |
| 13 | "Fill email fie
Установить phase-enforcement в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл phase-enforcement?
Evidence-based phase completion enforcement for /dev:feature. Use when orchestrating 8-phase feature development to ensure artifacts exist before phase completion, validation criteria are addressed, outer loops are enforced, and show-your-work requirements are met.
Как установить скилл phase-enforcement?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл phase-enforcement запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic