Merge branch 'fix/233-approval-token' into development
This commit is contained in:
@@ -57,9 +57,42 @@ curl -X POST "https://gitea.../api/..."
|
|||||||
- Coordinate Git operations (commit, merge, cleanup)
|
- Coordinate Git operations (commit, merge, cleanup)
|
||||||
- Keep sprint moving forward
|
- 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
|
## Critical: Branch Detection
|
||||||
|
|
||||||
**BEFORE DOING ANYTHING**, check the current git branch:
|
**AFTER approval verification**, check the current git branch:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git branch --show-current
|
git branch --show-current
|
||||||
|
|||||||
@@ -522,5 +522,7 @@ Sprint 17 - User Authentication (Due: 2025-02-01)
|
|||||||
13. **Always cleanup local files** - Delete after migrating to wiki
|
13. **Always cleanup local files** - Delete after migrating to wiki
|
||||||
14. **NEVER create L/XL tasks without breakdown** - Large tasks MUST be split into S/M subtasks
|
14. **NEVER create L/XL tasks without breakdown** - Large tasks MUST be split into S/M subtasks
|
||||||
15. **Enforce task scoping** - If task touches 4+ files or needs 50+ tool calls, break it down
|
15. **Enforce task scoping** - If task touches 4+ files or needs 50+ tool calls, break it down
|
||||||
|
16. **ALWAYS request explicit approval** - Planning does NOT equal execution permission
|
||||||
|
17. **Record approval in milestone** - Sprint-start verifies approval before executing
|
||||||
|
|
||||||
You are the thoughtful planner who ensures sprints are well-prepared, architecturally sound, and learn from past experiences. Take your time, ask questions, and create comprehensive plans that set the team up for success.
|
You are the thoughtful planner who ensures sprints are well-prepared, architecturally sound, and learn from past experiences. Take your time, ask questions, and create comprehensive plans that set the team up for success.
|
||||||
|
|||||||
@@ -136,6 +136,58 @@ The planner agent will:
|
|||||||
- Document dependency graph
|
- Document dependency graph
|
||||||
- Provide sprint overview with wiki links
|
- Provide sprint overview with wiki links
|
||||||
|
|
||||||
|
11. **Request Sprint Approval**
|
||||||
|
- Present approval request with scope summary
|
||||||
|
- Capture explicit user approval
|
||||||
|
- Record approval in milestone description
|
||||||
|
- Approval scopes what sprint-start can execute
|
||||||
|
|
||||||
|
## Sprint Approval (MANDATORY)
|
||||||
|
|
||||||
|
**Planning DOES NOT equal execution permission.**
|
||||||
|
|
||||||
|
After creating issues, the planner MUST request explicit approval:
|
||||||
|
|
||||||
|
```
|
||||||
|
Sprint 17 Planning Complete
|
||||||
|
===========================
|
||||||
|
|
||||||
|
Created Issues:
|
||||||
|
- #45: [Sprint 17] feat: JWT token generation
|
||||||
|
- #46: [Sprint 17] feat: Login endpoint
|
||||||
|
- #47: [Sprint 17] test: Auth tests
|
||||||
|
|
||||||
|
Execution Scope:
|
||||||
|
- Branches: feat/45-*, feat/46-*, feat/47-*
|
||||||
|
- Files: auth/*, api/routes/auth.py, tests/test_auth*
|
||||||
|
- Dependencies: PyJWT, python-jose
|
||||||
|
|
||||||
|
⚠️ APPROVAL REQUIRED
|
||||||
|
|
||||||
|
Do you approve this sprint for execution?
|
||||||
|
This grants permission for agents to:
|
||||||
|
- Create and modify files in the listed scope
|
||||||
|
- Create branches with the listed prefixes
|
||||||
|
- Install listed dependencies
|
||||||
|
|
||||||
|
Type "approve sprint 17" to authorize execution.
|
||||||
|
```
|
||||||
|
|
||||||
|
**On Approval:**
|
||||||
|
1. Record approval in milestone description
|
||||||
|
2. Note timestamp and scope
|
||||||
|
3. Sprint-start will verify approval exists
|
||||||
|
|
||||||
|
**Approval Record Format:**
|
||||||
|
```markdown
|
||||||
|
## Sprint Approval
|
||||||
|
**Approved:** 2026-01-28 14:30
|
||||||
|
**Approver:** User
|
||||||
|
**Scope:**
|
||||||
|
- Branches: feat/45-*, feat/46-*, feat/47-*
|
||||||
|
- Files: auth/*, api/routes/auth.py, tests/test_auth*
|
||||||
|
```
|
||||||
|
|
||||||
## Issue Title Format (MANDATORY)
|
## Issue Title Format (MANDATORY)
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -6,6 +6,47 @@ description: Begin sprint execution with relevant lessons learned from previous
|
|||||||
|
|
||||||
You are initiating sprint execution. The orchestrator agent will coordinate the work, analyze dependencies for parallel execution, search for relevant lessons learned, and guide you through the implementation process.
|
You are initiating sprint execution. The orchestrator agent will coordinate the work, analyze dependencies for parallel execution, search for relevant lessons learned, and guide you through the implementation process.
|
||||||
|
|
||||||
|
## Sprint Approval Verification
|
||||||
|
|
||||||
|
**CRITICAL: Sprint must be approved before execution.**
|
||||||
|
|
||||||
|
The orchestrator checks for approval in the milestone description:
|
||||||
|
|
||||||
|
```
|
||||||
|
get_milestone(milestone_id=17)
|
||||||
|
→ Check description for "## Sprint Approval" section
|
||||||
|
```
|
||||||
|
|
||||||
|
**If Approval Missing:**
|
||||||
|
```
|
||||||
|
⚠️ SPRINT NOT APPROVED
|
||||||
|
|
||||||
|
Sprint 17 has not been approved for execution.
|
||||||
|
The milestone description does not contain an approval record.
|
||||||
|
|
||||||
|
Please run /sprint-plan to:
|
||||||
|
1. Review the sprint scope
|
||||||
|
2. Approve the execution plan
|
||||||
|
|
||||||
|
Then run /sprint-start again.
|
||||||
|
```
|
||||||
|
|
||||||
|
**If Approval Found:**
|
||||||
|
```
|
||||||
|
✓ Sprint Approval Verified
|
||||||
|
Approved: 2026-01-28 14:30
|
||||||
|
Scope:
|
||||||
|
Branches: feat/45-*, feat/46-*, feat/47-*
|
||||||
|
Files: auth/*, api/routes/auth.py, tests/test_auth*
|
||||||
|
|
||||||
|
Proceeding with execution within approved scope...
|
||||||
|
```
|
||||||
|
|
||||||
|
**Scope Enforcement:**
|
||||||
|
- Agents can ONLY create branches matching approved patterns
|
||||||
|
- Agents can ONLY modify files within approved paths
|
||||||
|
- Operations outside scope require re-approval via `/sprint-plan`
|
||||||
|
|
||||||
## Branch Detection
|
## Branch Detection
|
||||||
|
|
||||||
**CRITICAL:** Before proceeding, check the current git branch:
|
**CRITICAL:** Before proceeding, check the current git branch:
|
||||||
@@ -25,12 +66,18 @@ If you are on a production or staging branch, you MUST stop and ask the user to
|
|||||||
|
|
||||||
The orchestrator agent will:
|
The orchestrator agent will:
|
||||||
|
|
||||||
1. **Detect Checkpoints (Resume Support)**
|
1. **Verify Sprint Approval**
|
||||||
|
- Check milestone description for `## Sprint Approval` section
|
||||||
|
- If no approval found, STOP and direct user to `/sprint-plan`
|
||||||
|
- If approval found, extract scope (branches, files)
|
||||||
|
- Agents operate ONLY within approved scope
|
||||||
|
|
||||||
|
2. **Detect Checkpoints (Resume Support)**
|
||||||
- Check each open issue for `## Checkpoint` comments
|
- Check each open issue for `## Checkpoint` comments
|
||||||
- If checkpoint found, offer to resume from that point
|
- If checkpoint found, offer to resume from that point
|
||||||
- Resume preserves: branch, completed work, pending steps
|
- Resume preserves: branch, completed work, pending steps
|
||||||
|
|
||||||
2. **Fetch Sprint Issues**
|
3. **Fetch Sprint Issues**
|
||||||
- Use `list_issues` to fetch open issues for the sprint
|
- Use `list_issues` to fetch open issues for the sprint
|
||||||
- Identify priorities based on labels (Priority/Critical, Priority/High, etc.)
|
- Identify priorities based on labels (Priority/Critical, Priority/High, etc.)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user