88 lines
3.6 KiB
Markdown
88 lines
3.6 KiB
Markdown
---
|
|
description: Approve a workflow gate (design or implementation)
|
|
allowed-tools: Read, Write, Bash
|
|
---
|
|
|
|
# Approve Workflow Gate
|
|
|
|
Approve gate: "$ARGUMENTS"
|
|
|
|
## Valid Gates
|
|
- `design` - Approve the design phase (entities + tasks)
|
|
- `implementation` - Approve the implementation phase (all code)
|
|
|
|
## Steps
|
|
|
|
### 1. Validate Gate
|
|
- If "$ARGUMENTS" is not `design` or `implementation`: STOP and show usage
|
|
|
|
### 2. Check Workflow State
|
|
```bash
|
|
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py exists
|
|
```
|
|
|
|
If no active workflow:
|
|
```
|
|
❌ No active workflow found.
|
|
Start a new workflow with: /workflow:spawn "feature name"
|
|
```
|
|
|
|
### 3. Verify Current Phase
|
|
|
|
**For design approval**:
|
|
- Current phase must be `AWAITING_DESIGN_APPROVAL`
|
|
- If not: Report error with current phase
|
|
|
|
**For implementation approval**:
|
|
- Current phase must be `AWAITING_IMPL_APPROVAL`
|
|
- If not: Report error with current phase
|
|
|
|
### 4. Execute Approval
|
|
|
|
```bash
|
|
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py approve $ARGUMENTS
|
|
```
|
|
|
|
### 5. Transition to Next Phase
|
|
|
|
**If design approved**:
|
|
```bash
|
|
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py transition DESIGN_APPROVED
|
|
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py transition IMPLEMENTING
|
|
```
|
|
|
|
**If implementation approved**:
|
|
```bash
|
|
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py transition IMPL_APPROVED
|
|
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py transition COMPLETING
|
|
```
|
|
|
|
### 6. Report
|
|
|
|
**Design Approved**:
|
|
```
|
|
╔══════════════════════════════════════════════════════════════╗
|
|
║ ✅ DESIGN APPROVED ║
|
|
╠══════════════════════════════════════════════════════════════╣
|
|
║ The design has been approved. Implementation will begin. ║
|
|
║ ║
|
|
║ Next steps: ║
|
|
║ /workflow:frontend --next Start frontend tasks ║
|
|
║ /workflow:backend --next Start backend tasks ║
|
|
║ /workflow:resume Auto-continue workflow ║
|
|
╚══════════════════════════════════════════════════════════════╝
|
|
```
|
|
|
|
**Implementation Approved**:
|
|
```
|
|
╔══════════════════════════════════════════════════════════════╗
|
|
║ ✅ IMPLEMENTATION APPROVED ║
|
|
╠══════════════════════════════════════════════════════════════╣
|
|
║ All implementations have been approved. ║
|
|
║ ║
|
|
║ Next steps: ║
|
|
║ /workflow:complete --all Mark all tasks as done ║
|
|
║ /workflow:resume Auto-complete workflow ║
|
|
╚══════════════════════════════════════════════════════════════╝
|
|
```
|