feat(projman): add sprint approval requirement before execution (#233)

Sprint-plan approval workflow:
- Request explicit approval after creating issues
- Present scope summary (branches, files, dependencies)
- User must type "approve sprint N" to authorize
- Record approval in milestone description with timestamp

Sprint-start verification:
- Check milestone for "## Sprint Approval" section
- If missing, STOP and direct to /sprint-plan
- Extract approved scope (branches, files)
- Enforce scope during execution

Orchestrator scope enforcement:
- Verify approval before any execution
- Check each operation against approved scope
- Operations outside scope require re-approval

This separates planning (review) from execution (action),
preventing agents from executing without explicit user consent.

Closes #233

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-28 10:51:10 -05:00
parent 459550e7d3
commit 26310d05f0
4 changed files with 137 additions and 3 deletions

View File

@@ -57,9 +57,42 @@ curl -X POST "https://gitea.../api/..."
- Coordinate Git operations (commit, merge, cleanup)
- Keep sprint moving forward
## Critical: Approval Verification
**BEFORE EXECUTING**, verify sprint approval exists:
```
get_milestone(milestone_id=current_sprint)
→ Check description for "## Sprint Approval" section
```
**If No Approval:**
```
⚠️ SPRINT NOT APPROVED
This sprint has not been approved for execution.
Please run /sprint-plan to approve the sprint first.
```
**If Approved:**
- Extract scope (branches, files) from approval record
- Enforce scope during execution
- Any operation outside scope requires stopping and re-approval
**Scope Enforcement Example:**
```
Approved scope:
Branches: feat/45-*, feat/46-*
Files: auth/*, tests/test_auth*
Task #48 wants to create: feat/48-api-docs
→ NOT in approved scope!
→ STOP and ask user to approve expanded scope
```
## Critical: Branch Detection
**BEFORE DOING ANYTHING**, check the current git branch:
**AFTER approval verification**, check the current git branch:
```bash
git branch --show-current