feat: workflow intelligence, quality loop, completion promises, parallel teams

Sprint 1 — Workflow Intelligence (A1-A3):
- Conditional escalation: fast→standard on 2+ CRITICALs
- Guardian fast-path: skip remaining reviewers on clean pass
- Confidence-triggered escalation: pause/upgrade/probe on low scores

Sprint 2 — Quality Loop (B1-B2, B5-B6):
- Maker self-review checklist before submitting to Check phase
- Proposal diff ("What Changed") on cycle 2+ revisions
- Convergence detection: escalate to user if same finding persists 2 cycles
- Cross-archetype dedup: merge duplicate findings from different reviewers

Sprint 3 — Completion & Verification (B3-B4):
- Completion promise: user-defined done criteria checked in Act phase
- Post-merge verification: run tests on main, auto-revert on failure

Sprint 4 — Parallel & Scale (C1-C4):
- Parallel team orchestration: 2-3 independent teams with merge gate
- Task dependency graph in autonomous queue format
- Auto-resume on interruption via .archeflow/state.json
- Budget-aware scheduling with automatic workflow downgrade
This commit is contained in:
2026-04-03 06:17:53 +02:00
parent 5139f1ad89
commit 83e09b70f2
4 changed files with 162 additions and 7 deletions

View File

@@ -147,7 +147,57 @@ Create `.archeflow/queue.md`:
- [ ] Add user API endpoints (standard) | depends: user model
- [ ] Add user UI (standard) | depends: user API endpoints
```
Dependencies are processed in order. Parallel-safe tasks run concurrently.
Dependencies are processed in order: a task with `depends: X` waits until X completes successfully. Tasks without dependencies or with resolved dependencies can run in parallel (see Parallel Team Orchestration in the orchestration skill).
### With Completion Criteria
```markdown
- [ ] Fix login bug | fast | done: login_test.py passes
- [ ] Add rate limiting | standard | done: Guardian approves AND load_test.sh passes
```
Completion criteria are checked in the Act phase. If the test command fails even when reviewers approve, the task cycles back.
## Budget-Aware Scheduling
Set a token or cost budget for the session. The orchestrator tracks estimated cost per task and adapts:
```
Budget: $5.00 (or ~2M tokens)
```
| Budget Remaining | Action |
|-----------------|--------|
| > 50% | Run tasks at their selected workflow level |
| 25-50% | Downgrade `thorough``standard`, `standard``fast` |
| < 25% | Run remaining tasks as `fast` only |
| Exhausted | Stop. Log remaining tasks as "skipped — budget exhausted" |
Budget is tracked per-task in the session log. Estimated cost = agents spawned x model tier pricing.
## Auto-Resume on Interruption
If a session is interrupted (crash, timeout, user cancel), save state for resumption:
### On Interruption
Write `.archeflow/state.json`:
```json
{
"session_id": "...",
"current_task": 2,
"current_phase": "check",
"current_cycle": 1,
"completed_tasks": [1],
"queue": ["task3", "task4"],
"worktree_branch": "archeflow/maker-abc",
"timestamp": "2026-04-03T22:15:00Z"
}
```
### On Next Session Start
If `.archeflow/state.json` exists:
1. Report: "Found interrupted ArcheFlow session from [timestamp]. Task [N] was in [phase] phase."
2. Offer: "Resume from where we left off? Or start fresh?"
3. If resume: pick up from the saved phase. The worktree branch is still intact.
4. If fresh: clean up state file and worktrees, start over.
## Overnight Session Checklist