ariadna 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a59ce08ab4d7f1165dd59dac034ac04e5725263a3022bebbd2c3c39fdb0a3c23
4
- data.tar.gz: 2eb175ba24a25c5114e3b76f83bbfef0275a21dc114f00d7376390508cb54a87
3
+ metadata.gz: d45bf8e96c2f2d1d07d2c3236cfaa5e3f6c6fa43cf5f4b785be66fc5160c9ee6
4
+ data.tar.gz: 69364ceaebbf8755a887e9a994dee5e6490d5144a9f681447d9a0946c3c1f095
5
5
  SHA512:
6
- metadata.gz: 11f2127685615ea902f97bfc9fc813e20e74f354b055672568d39552d3d551d31896ba73b5ad3434d1ac84dc6d593f8d385818e78fc7cae24844f45720558f80
7
- data.tar.gz: cec523e574d6182711229ddf5fa7519929f3c9fb9a144a0eb4928cf46a24d4761e9f718cf3678cf2dde812f9cd655647ca2c12776fcf29aa526831ad9df017a9
6
+ metadata.gz: 175abad4e06b132ae2f3489fbf7e7db92a0aaa2758d42fc8bb374b2b6151d891cf963a9e592757fd7e872443da3a46c871f8f66ad83ca48c6299a42a4782cb93
7
+ data.tar.gz: 0c011641fa6e541200d0e0bcbb1c83066ede0c65296c285a0e7d51970b4e626fb916c4798f7e59618bab07b867bcfc997efdd898677c917ce1e56e40b05a9f4c
@@ -236,7 +236,10 @@ When spawned as part of a team (via `TeamCreate`/`Task` with `team_name`), follo
236
236
  1. **Check for assigned tasks:** `TaskList` → find tasks owned by you with status `pending`
237
237
  2. **Claim a task:** `TaskUpdate(taskId=..., status="in_progress")` — prefer lowest ID first
238
238
  3. **Read the plan:** Extract the plan file path from the task description, read it with the Read tool
239
- 4. **Execute the plan:** Follow the standard execution flow (load_plan → execute_tasks → summary → state_updates)
239
+ 4. **Execute the plan:** Follow the standard execution flow (load_plan → execute_tasks → summary → self_check)
240
+ 4b. **Skip STATE.md updates in team mode.** The orchestrator aggregates state.
241
+ Only create SUMMARY.md and commit plan files.
242
+ Do NOT call `ariadna-tools state advance-plan` or `ariadna-tools state record-metric`.
240
243
  5. **Mark task complete:** `TaskUpdate(taskId=..., status="completed")`
241
244
  6. **Check for more work:** `TaskList` → find next unblocked, unowned task matching your domain. If available, claim and execute it.
242
245
  7. **When no tasks remain:** `SendMessage(type="message", recipient="team-lead", content="All backend tasks complete. No remaining tasks.")` then go idle.
@@ -397,7 +397,10 @@ When spawned as part of a team (via `TeamCreate`/`Task` with `team_name`), follo
397
397
  1. **Check for assigned tasks:** `TaskList` → find tasks owned by you with status `pending`
398
398
  2. **Claim a task:** `TaskUpdate(taskId=..., status="in_progress")` — prefer lowest ID first
399
399
  3. **Read the plan:** Extract the plan file path from the task description, read it with the Read tool
400
- 4. **Execute the plan:** Follow the standard execution flow (load_plan → execute_tasks → summary → state_updates)
400
+ 4. **Execute the plan:** Follow the standard execution flow (load_plan → execute_tasks → summary → self_check)
401
+ 4b. **Skip STATE.md updates in team mode.** The orchestrator aggregates state.
402
+ Only create SUMMARY.md and commit plan files.
403
+ Do NOT call `ariadna-tools state advance-plan` or `ariadna-tools state record-metric`.
401
404
  5. **Mark task complete:** `TaskUpdate(taskId=..., status="completed")`
402
405
  6. **Check for more work:** `TaskList` → find next unblocked, unowned task. If available, claim and execute it.
403
406
  7. **When no tasks remain:** `SendMessage(type="message", recipient="team-lead", content="All assigned tasks complete. No remaining tasks.")` then go idle.
@@ -234,7 +234,10 @@ When spawned as part of a team (via `TeamCreate`/`Task` with `team_name`), follo
234
234
  1. **Check for assigned tasks:** `TaskList` → find tasks owned by you with status `pending`
235
235
  2. **Claim a task:** `TaskUpdate(taskId=..., status="in_progress")` — prefer lowest ID first
236
236
  3. **Read the plan:** Extract the plan file path from the task description, read it with the Read tool
237
- 4. **Execute the plan:** Follow the standard execution flow (load_plan → execute_tasks → summary → state_updates)
237
+ 4. **Execute the plan:** Follow the standard execution flow (load_plan → execute_tasks → summary → self_check)
238
+ 4b. **Skip STATE.md updates in team mode.** The orchestrator aggregates state.
239
+ Only create SUMMARY.md and commit plan files.
240
+ Do NOT call `ariadna-tools state advance-plan` or `ariadna-tools state record-metric`.
238
241
  5. **Mark task complete:** `TaskUpdate(taskId=..., status="completed")`
239
242
  6. **Check for more work:** `TaskList` → find next unblocked, unowned task matching your domain. If available, claim and execute it.
240
243
  7. **When no tasks remain:** `SendMessage(type="message", recipient="team-lead", content="All frontend tasks complete. No remaining tasks.")` then go idle.
@@ -240,7 +240,10 @@ When spawned as part of a team (via `TeamCreate`/`Task` with `team_name`), follo
240
240
  1. **Check for assigned tasks:** `TaskList` → find tasks owned by you with status `pending`
241
241
  2. **Claim a task:** `TaskUpdate(taskId=..., status="in_progress")` — prefer lowest ID first
242
242
  3. **Read the plan:** Extract the plan file path from the task description, read it with the Read tool
243
- 4. **Execute the plan:** Follow the standard execution flow (load_plan → execute_tasks → summary → state_updates)
243
+ 4. **Execute the plan:** Follow the standard execution flow (load_plan → execute_tasks → summary → self_check)
244
+ 4b. **Skip STATE.md updates in team mode.** The orchestrator aggregates state.
245
+ Only create SUMMARY.md and commit plan files.
246
+ Do NOT call `ariadna-tools state advance-plan` or `ariadna-tools state record-metric`.
244
247
  5. **Mark task complete:** `TaskUpdate(taskId=..., status="completed")`
245
248
  6. **Check for more work:** `TaskList` → find next unblocked, unowned task matching your domain. If available, claim and execute it.
246
249
  7. **When no tasks remain:** `SendMessage(type="message", recipient="team-lead", content="All testing tasks complete. No remaining tasks.")` then go idle.
@@ -216,6 +216,7 @@ class UserTest < ActiveSupport::TestCase
216
216
 
217
217
  test "validates email presence" do
218
218
  user = User.new(name: "Test")
219
+
219
220
  assert_not user.valid?
220
221
  assert_includes user.errors[:email], "can't be blank"
221
222
  end
@@ -238,6 +239,7 @@ class PostsControllerTest < ActionDispatch::IntegrationTest
238
239
 
239
240
  test "index returns posts" do
240
241
  get posts_url
242
+
241
243
  assert_response :success
242
244
  assert_select "h2", posts(:first).title
243
245
  end
@@ -341,11 +343,16 @@ Tasks:
341
343
  ### Add Turbo/Hotwire Feature
342
344
  ```
343
345
  Tasks:
344
- 1. Add Turbo Frame wrapping + controller turbo_stream response
346
+ 1. Add Turbo Frame wrapping to target views + controller turbo_stream responses
345
347
  Files: app/views/[model]/*.html.erb, app/controllers/[model]_controller.rb
348
+ Conventions: 422 for validation errors, 303 for redirects, dom_id for frame IDs
346
349
  2. Add Stimulus controller (if interactive behavior needed)
347
350
  Files: app/javascript/controllers/[name]_controller.js
348
- 3. Add system test for real-time behavior
351
+ Conventions: static values/targets/outlets first, connect/disconnect symmetry
352
+ 3. Add Turbo Stream broadcasts (if real-time updates needed)
353
+ Files: app/models/[model].rb (after_create_commit callbacks)
354
+ Conventions: prefer default stream actions, broadcast_append_to/replace_to
355
+ 4. Add system test for Turbo/Stimulus behavior
349
356
  Files: test/system/[feature]_test.rb
350
357
  ```
351
358
 
@@ -38,6 +38,11 @@ patterns-established:
38
38
  - "Pattern 1: description"
39
39
  - "Pattern 2: description"
40
40
 
41
+ requirements_covered:
42
+ - id: "REQ-ID"
43
+ description: "Requirement description"
44
+ evidence: "File/class implementing it"
45
+
41
46
  # Metrics
42
47
  duration: Xmin
43
48
  completed: YYYY-MM-DD
@@ -60,6 +65,12 @@ completed: YYYY-MM-DD
60
65
  - [Second key accomplishment]
61
66
  - [Third if applicable]
62
67
 
68
+ ## Requirements Covered
69
+ | REQ-ID | Requirement | Evidence |
70
+ |--------|-------------|----------|
71
+
72
+ [Omit this section if no REQUIREMENTS.md exists or no requirements map to this phase/plan]
73
+
63
74
  ## Task Commits
64
75
 
65
76
  Each task was committed atomically:
@@ -19,7 +19,7 @@ Load all context in one call:
19
19
  INIT=$(ariadna-tools init execute-phase "${PHASE_ARG}")
20
20
  ```
21
21
 
22
- Parse JSON for: `executor_model`, `verifier_model`, `commit_docs`, `parallelization`, `branching_strategy`, `branch_name`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `plans`, `incomplete_plans`, `plan_count`, `incomplete_count`, `state_exists`, `roadmap_exists`.
22
+ Parse JSON for: `executor_model`, `verifier_model`, `commit_docs`, `parallelization`, `branching_strategy`, `branch_name`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `plans`, `incomplete_plans`, `plan_count`, `incomplete_count`, `team_execution`, `execution_mode`, `backend_executor_model`, `frontend_executor_model`, `test_executor_model`, `state_exists`, `roadmap_exists`.
23
23
 
24
24
  **If `phase_found` is false:** Error — phase directory not found.
25
25
  **If `plan_count` is 0:** Error — no plans found in phase.
@@ -54,7 +54,7 @@ Load plan inventory with wave grouping in one call:
54
54
  PLAN_INDEX=$(ariadna-tools phase-plan-index "${PHASE_NUMBER}")
55
55
  ```
56
56
 
57
- Parse JSON for: `phase`, `plans[]` (each with `id`, `wave`, `autonomous`, `objective`, `files_modified`, `task_count`, `has_summary`), `waves` (map of wave number → plan IDs), `incomplete`, `has_checkpoints`.
57
+ Parse JSON for: `plans[]` (each with `file`, `phase`, `plan`, `wave`, `type`, `completed`, `domain`, `depends_on`, `files_modified`, `autonomous`, `objective`, `task_count`), `count`, `domains`, `domain_count`, `multi_domain`, `recommend_team`.
58
58
 
59
59
  **Filtering:** Skip plans where `has_summary: true`. If `--gaps-only`: also skip non-gap_closure plans. If all filtered: "No matching incomplete plans" → exit.
60
60
 
@@ -71,6 +71,28 @@ Report:
71
71
  ```
72
72
  </step>
73
73
 
74
+ <step name="decide_execution_mode">
75
+ **Determine execution mode:**
76
+
77
+ 1. If `--team` flag → team execution
78
+ 2. If `--no-team` flag → wave execution
79
+ 3. If `team_execution` from init is `true` → team execution
80
+ 4. If `team_execution` from init is `false` → wave execution
81
+ 5. If `team_execution` is `"auto"` → check plan index:
82
+ - Parse `multi_domain` and `recommend_team` from PLAN_INDEX
83
+ - If `recommend_team` is true (3+ plans, 2+ non-general domains) → team execution
84
+ - Otherwise → wave execution
85
+
86
+ Report:
87
+ ```
88
+ **Execution mode:** {Team | Wave}
89
+ {If auto: "Auto-detected: {plan_count} plans across {domains}"}
90
+ ```
91
+
92
+ If team mode: proceed to `team_execution` step.
93
+ If wave mode: proceed to `execute_waves` step.
94
+ </step>
95
+
74
96
  <step name="execute_waves">
75
97
  Execute each wave in sequence. Within a wave: parallel if `PARALLELIZATION=true`, sequential if `false`.
76
98
 
@@ -249,6 +271,17 @@ If `TEAM_MODE` is `true` OR `--team` flag present → use team execution. Otherw
249
271
  - Assign unblocked tasks to idle agents of the matching domain
250
272
  - Cross-domain handoffs: if a frontend task depends on a backend task, the frontend executor can read the backend SUMMARY.md for context
251
273
 
274
+ **Progress reporting (on each task completion message from an agent):**
275
+ Check `TaskList` and display:
276
+ ```
277
+ ## Team Progress
278
+ | Agent | Status | Current Task | Completed |
279
+ |-------------------|---------|-------------|-----------|
280
+ | backend-executor | working | Plan 03-01 | 1/3 |
281
+ | frontend-executor | idle | waiting | 0/2 |
282
+ | test-executor | working | Plan 03-03 | 0/1 |
283
+ ```
284
+
252
285
  6. **Handle checkpoints:** Same as wave-based — agent sends message to orchestrator, orchestrator presents checkpoint to user, spawns continuation agent.
253
286
 
254
287
  7. **Shutdown team:** When all tasks are complete:
@@ -261,6 +294,10 @@ If `TEAM_MODE` is `true` OR `--team` flag present → use team execution. Otherw
261
294
  ```
262
295
 
263
296
  **Conflict prevention:** File ownership is enforced by `files_modified` frontmatter — the planner ensures no overlap between concurrent plans assigned to different agents.
297
+
298
+ **STATE.md serialization:** Agents do NOT update STATE.md in team mode.
299
+ The orchestrator reads each SUMMARY.md after all tasks complete and
300
+ updates STATE.md sequentially. This prevents concurrent write corruption.
264
301
  </step>
265
302
 
266
303
  <step name="checkpoint_handling">
@@ -296,12 +333,28 @@ Plans with `autonomous: false` require user interaction.
296
333
  </step>
297
334
 
298
335
  <step name="aggregate_results">
299
- After all waves:
336
+ After all waves (or after all team tasks complete):
337
+
338
+ **Team mode state aggregation (if team execution was used):**
339
+
340
+ For each completed task's SUMMARY.md, in plan order:
341
+ ```bash
342
+ ariadna-tools state advance-plan
343
+ ariadna-tools state record-metric \
344
+ --phase "${PHASE}" --plan "${PLAN}" --duration "${DURATION}" \
345
+ --tasks "${TASK_COUNT}" --files "${FILE_COUNT}"
346
+ ```
347
+ This runs sequentially from the orchestrator to prevent concurrent writes.
348
+
349
+ **Aggregate requirements coverage:** Parse `requirements_covered` from all SUMMARY.md frontmatter in this phase. Cross-check against `requirements_content` (from INIT or re-read REQUIREMENTS.md) for requirements mapped to this phase. Flag uncovered requirements. Show coverage count.
350
+
351
+ If covered requirements exist, update REQUIREMENTS.md traceability table: set status to "Complete" for each covered REQ-ID, with evidence from the SUMMARY frontmatter.
300
352
 
301
353
  ```markdown
302
354
  ## Phase {X}: {Name} Execution Complete
303
355
 
304
356
  **Waves:** {N} | **Plans:** {M}/{total} complete
357
+ **Requirements:** {covered}/{total_for_phase} covered
305
358
 
306
359
  | Wave | Plans | Status |
307
360
  |------|-------|--------|
@@ -313,6 +366,14 @@ After all waves:
313
366
  1. **03-01**: [one-liner from SUMMARY.md]
314
367
  2. **03-02**: [one-liner from SUMMARY.md]
315
368
 
369
+ ### Requirements Coverage
370
+ | REQ-ID | Requirement | Evidence |
371
+ |--------|-------------|----------|
372
+ | {id} | {description} | {evidence from SUMMARY} |
373
+ | {id} | {description} | ⚠ Not covered |
374
+
375
+ [Omit section if no REQUIREMENTS.md or no requirements for this phase]
376
+
316
377
  ### Issues Encountered
317
378
  [Aggregate from SUMMARYs, or "None"]
318
379
  ```
@@ -339,8 +400,8 @@ grep "^status:" "$PHASE_DIR"/*-VERIFICATION.md | cut -d: -f2 | tr -d ' '
339
400
 
340
401
  | Status | Action |
341
402
  |--------|--------|
342
- | `passed` | → update_roadmap |
343
- | `human_needed` | Present items for human testing, get approval or feedback |
403
+ | `passed` | → user_acceptance |
404
+ | `human_needed` | Present items for human testing, get approval or feedback → user_acceptance |
344
405
  | `gaps_found` | Present gap summary, offer `/ariadna:plan-phase {phase} --gaps` |
345
406
 
346
407
  **If human_needed:**
@@ -378,6 +439,33 @@ Also: `/ariadna:verify-work {X}` — manual testing first
378
439
  Gap closure cycle: `/ariadna:plan-phase {X} --gaps` reads VERIFICATION.md → creates gap plans with `gap_closure: true` → user runs `/ariadna:execute-phase {X} --gaps-only` → verifier re-runs.
379
440
  </step>
380
441
 
442
+ <step name="user_acceptance">
443
+ **Trigger:** After verifier returns `passed` (or `human_needed` items are approved by user).
444
+
445
+ **Skip if:** `--no-review` flag, or ALL plans in this phase have `domain: backend` or `domain: testing` only (no user-facing deliverables).
446
+
447
+ **Otherwise:** Show a lightweight acceptance gate. Gather one-liners from each SUMMARY.md + key decisions Claude made during execution:
448
+
449
+ ```
450
+ questions: [
451
+ {
452
+ header: "Acceptance",
453
+ question: "Phase {X}: {Name} — verified and passing.\n\nWhat was built:\n- {one-liner from SUMMARY 1}\n- {one-liner from SUMMARY 2}\n\nKey decisions made:\n- {decision 1 from SUMMARY}\n- {decision 2 from SUMMARY}\n\nDoes the direction look right?",
454
+ multiSelect: false,
455
+ options: [
456
+ { label: "Looks good", description: "Mark phase complete and continue" },
457
+ { label: "Test first", description: "Run /ariadna:verify-work before marking complete" },
458
+ { label: "Issues", description: "Record blocker and suggest gap closure" }
459
+ ]
460
+ }
461
+ ]
462
+ ```
463
+
464
+ - **"Looks good":** Proceed to `update_roadmap`.
465
+ - **"Test first":** Display: `Run /ariadna:verify-work {X} to test, then re-run /ariadna:execute-phase {X} to continue.` Exit without marking phase complete.
466
+ - **"Issues":** Ask user to describe the issue. Record as blocker in STATE.md via `ariadna-tools state add-blocker "{issue}"`. Display: `Blocker recorded. Run /ariadna:plan-phase {X} --gaps to create fix plans.` Exit without marking phase complete.
467
+ </step>
468
+
381
469
  <step name="update_roadmap">
382
470
  Mark phase complete in ROADMAP.md (date, status).
383
471
 
@@ -321,7 +321,18 @@ If user_setup exists: create `{phase}-USER-SETUP.md` using template `~/.claude/a
321
321
  <step name="create_summary">
322
322
  Create `{phase}-{plan}-SUMMARY.md` at `.planning/phases/XX-name/`. Use `~/.claude/ariadna/templates/summary.md`.
323
323
 
324
- **Frontmatter:** phase, plan, subsystem, tags | requires/provides/affects | tech-stack.added/patterns | key-files.created/modified | key-decisions | duration ($DURATION), completed ($PLAN_END_TIME date).
324
+ **Frontmatter:** phase, plan, subsystem, tags | requires/provides/affects | tech-stack.added/patterns | key-files.created/modified | key-decisions | requirements_covered | duration ($DURATION), completed ($PLAN_END_TIME date).
325
+
326
+ **Requirements traceability:** Cross-reference plan tasks against `requirements_content` (from INIT, or read `.planning/REQUIREMENTS.md`). For each requirement mapped to this phase that was implemented by tasks in this plan, populate the `requirements_covered` frontmatter:
327
+ ```yaml
328
+ requirements_covered:
329
+ - id: "AUTH-01"
330
+ description: "User can sign up with email and password"
331
+ evidence: "SessionsController#create + User model with has_secure_password"
332
+ ```
333
+ Use the actual REQ-ID and description from REQUIREMENTS.md. Evidence should reference the specific file/class/method that implements the requirement. Omit the `requirements_covered` field entirely if no REQUIREMENTS.md exists or no requirements map to this plan.
334
+
335
+ Also populate the `## Requirements Covered` markdown section (after Accomplishments) with the same data in table format.
325
336
 
326
337
  Title: `# Phase [X] Plan [Y]: [Name] Summary`
327
338
 
@@ -27,7 +27,7 @@ Parse JSON for: `researcher_model`, `planner_model`, `checker_model`, `research_
27
27
 
28
28
  ## 2. Parse and Normalize Arguments
29
29
 
30
- Extract from $ARGUMENTS: phase number (integer or decimal like `2.1`), flags (`--research`, `--skip-research`, `--gaps`, `--skip-verify`, `--skip-context`).
30
+ Extract from $ARGUMENTS: phase number (integer or decimal like `2.1`), flags (`--research`, `--skip-research`, `--gaps`, `--skip-verify`, `--skip-context`, `--skip-approval`).
31
31
 
32
32
  **If no phase number:** Detect next unplanned phase from roadmap.
33
33
 
@@ -56,32 +56,30 @@ Use `context_content` from init JSON (already loaded via `--include context`).
56
56
 
57
57
  Analyze the phase goal from `roadmap_content` and determine if there are implementation decisions the user should weigh in on.
58
58
 
59
- **Quick assessmentdoes this phase need context?**
59
+ **Categorize the phase determines context behavior:**
60
60
 
61
- - Pure infrastructure / setup / configurationNo context needed, skip
62
- - Standard CRUD (models, controllers, views) → No context needed, skip
63
- - User-facing features with UI/UX decisions → Context helpful
64
- - Features with multiple valid approaches → Context helpful
61
+ - **Category A** (infrastructure, setup, config, standard CRUD, testing, migrations, background jobs) Skip context entirely. Display: `Context: Skipped (infrastructure/standard phase)`. Continue to step 5.
62
+ - **Category B** (user-facing features, UI/UX decisions, user workflows, multiple valid approaches) → Show context question below.
65
63
 
66
- **If context would be helpful:** Offer inline clarification with a single AskUserQuestion:
64
+ **Category B only offer inline clarification.** Identify 2-3 specific gray areas from the phase goal (e.g., "unclear: how should password reset flow work?" or "multiple options: modal vs. inline form for editing"). Include them in the question text:
67
65
 
68
66
  ```
69
67
  questions: [
70
68
  {
71
69
  header: "Context",
72
- question: "Phase {X}: {Name} has some implementation choices. Want to discuss them before planning?",
70
+ question: "Phase {X}: {Name} has gray areas:\n- {gray_area_1}\n- {gray_area_2}\n- {gray_area_3}\nWant to clarify before planning?",
73
71
  multiSelect: false,
74
72
  options: [
75
- { label: "Plan directly (Recommended)", description: "Planner will make reasonable choices, you review the plan" },
76
- { label: "Quick discussion", description: "Clarify 2-3 key decisions inline" },
73
+ { label: "Quick discussion (Recommended)", description: "Clarify these decisions inline prevents plan mismatches" },
74
+ { label: "Plan directly", description: "Planner will make reasonable choices, you review the plan" },
77
75
  { label: "Full discussion", description: "Run /ariadna:discuss-phase for detailed context gathering" }
78
76
  ]
79
77
  }
80
78
  ]
81
79
  ```
82
80
 
83
- - **"Plan directly":** Continue to step 5. Planner will use its judgment for ambiguous areas.
84
81
  - **"Quick discussion":** Identify 2-3 key gray areas and ask focused AskUserQuestion for each. Write a lightweight CONTEXT.md to the phase directory. Then continue to step 5.
82
+ - **"Plan directly":** Continue to step 5. Planner will use its judgment for ambiguous areas.
85
83
  - **"Full discussion":** Exit and tell user to run `/ariadna:discuss-phase {X}` first, then return.
86
84
 
87
85
  **CRITICAL:** Use `context_content` from INIT — pass to planner and checker agents.
@@ -251,7 +249,7 @@ Task(
251
249
 
252
250
  ## 9. Handle Planner Return
253
251
 
254
- - **`## PLANNING COMPLETE`:** Display plan count. If `--skip-verify` or `plan_checker_enabled` is false (from init): skip to step 13. Otherwise: step 10.
252
+ - **`## PLANNING COMPLETE`:** Display plan count. If `--skip-verify` or `plan_checker_enabled` is false (from init): skip to step 13 (approval gate). Otherwise: step 10.
255
253
  - **`## CHECKPOINT REACHED`:** Present to user, get response, spawn continuation (step 12)
256
254
  - **`## PLANNING INCONCLUSIVE`:** Show attempts, offer: Add context / Retry / Manual
257
255
 
@@ -306,7 +304,7 @@ Task(
306
304
 
307
305
  ## 11. Handle Checker Return
308
306
 
309
- - **`## VERIFICATION PASSED`:** Display confirmation, proceed to step 13.
307
+ - **`## VERIFICATION PASSED`:** Display confirmation, proceed to step 13 (approval gate).
310
308
  - **`## ISSUES FOUND`:** Classify issues and proceed to step 12.
311
309
 
312
310
  ## 12. Handle Checker Issues (Inline Fix, No Revision Loop)
@@ -351,7 +349,7 @@ questions: [
351
349
  ]
352
350
  ```
353
351
 
354
- - **"Accept as-is":** Proceed to step 13.
352
+ - **"Accept as-is":** Proceed to step 13 (approval gate).
355
353
  - **"Re-plan":** Spawn planner in revision mode (single attempt, not a loop):
356
354
 
357
355
  ```
@@ -363,11 +361,36 @@ Task(
363
361
  )
364
362
  ```
365
363
 
366
- After planner returns, proceed to step 13 (no re-check loop).
364
+ After planner returns, proceed to step 13 (approval gate, no re-check loop).
367
365
 
368
366
  - **"Fix manually":** Display file paths and exit.
369
367
 
370
- ## 13. Present Final Status
368
+ ## 13. User Plan Approval Gate
369
+
370
+ **Skip if:** `--skip-approval` flag, `--gaps` mode (gap closures already user-directed), or `requirements_content` is null (no REQUIREMENTS.md).
371
+
372
+ **Otherwise:** Cross-reference each requirement mapped to this phase (from `requirements_content`) against the plans' `must_haves.truths` (from plan frontmatter). Present a single `AskUserQuestion`:
373
+
374
+ ```
375
+ questions: [
376
+ {
377
+ header: "Plan Review",
378
+ question: "Phase {X}: {Name} — {N} plan(s) covering these requirements:\n\n| REQ-ID | Requirement | Covered By |\n|--------|-------------|------------|\n| {id} | {description} | Plan {plan_number}: {what_it_builds} |\n| {id} | {description} | ⚠ Not covered |\n\nApprove plans for execution?",
379
+ multiSelect: false,
380
+ options: [
381
+ { label: "Approve", description: "Plans look good, proceed to execution" },
382
+ { label: "Review details", description: "Show full plan files before deciding" },
383
+ { label: "Adjust", description: "Give feedback for a single re-plan attempt" }
384
+ ]
385
+ }
386
+ ]
387
+ ```
388
+
389
+ - **"Approve":** Proceed to step 14.
390
+ - **"Review details":** Display full content of each PLAN.md file in the phase directory. Then re-ask the same question (Approve / Adjust only).
391
+ - **"Adjust":** Ask user for feedback with a follow-up AskUserQuestion (freeform). Spawn planner in revision mode with user feedback (single attempt, no loop). Then proceed to step 14.
392
+
393
+ ## 14. Present Final Status
371
394
 
372
395
  Route to `<offer_next>`.
373
396
 
@@ -422,6 +445,7 @@ Verification: {Passed | Passed with fixes | Skipped}
422
445
  - [ ] ariadna-plan-checker spawned (unless --skip-verify)
423
446
  - [ ] Minor checker issues fixed inline by orchestrator (no revision loop)
424
447
  - [ ] Major checker issues presented to user for decision
448
+ - [ ] User approved plans (or --skip-approval / --gaps flag used / no REQUIREMENTS.md)
425
449
  - [ ] User sees status between agent spawns
426
450
  - [ ] User knows next steps
427
451
  </success_criteria>
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: ariadna:execute-phase
3
3
  description: Execute all plans in a phase with wave-based parallelization
4
- argument-hint: "<phase-number> [--gaps-only] [--team]"
4
+ argument-hint: "<phase-number> [--gaps-only] [--team] [--no-team]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -26,7 +26,7 @@ Orchestrator stays lean: discover plans, analyze dependencies, group into waves,
26
26
 
27
27
  **Execution modes:**
28
28
  - **Wave mode (default):** Sequential waves of parallel `Task()` spawns. Standard for most phases.
29
- - **Team mode (`--team` flag or `team_execution: true` in config):** Creates a team with domain-specialized executor agents that coordinate via shared task list. Better for large phases with domain-split plans.
29
+ - **Team mode (`--team` flag, `team_execution: true` or `"auto"` in config):** Creates a team with domain-specialized executor agents that coordinate via shared task list. Better for large phases with domain-split plans. When `team_execution: "auto"`, team mode activates for phases with 3+ plans across 2+ non-general domains.
30
30
 
31
31
  Context budget: ~15% orchestrator, 100% fresh per subagent.
32
32
  </objective>
@@ -42,6 +42,7 @@ Phase: $ARGUMENTS
42
42
  **Flags:**
43
43
  - `--gaps-only` — Execute only gap closure plans (plans with `gap_closure: true` in frontmatter). Use after verify-work creates fix plans.
44
44
  - `--team` — Use team-based execution with domain-specialized agents instead of wave-based execution.
45
+ - `--no-team` — Force wave-based execution even when auto-detection would choose team mode.
45
46
 
46
47
  @.planning/ROADMAP.md
47
48
  @.planning/STATE.md
@@ -51,5 +52,5 @@ Phase: $ARGUMENTS
51
52
  Execute the execute-phase workflow from @~/.claude/ariadna/workflows/execute-phase.md end-to-end.
52
53
  Preserve all workflow gates (wave/team execution, checkpoint handling, verification, state updates, routing).
53
54
 
54
- **Mode selection:** If `--team` flag is present or `team_execution: true` in config, use the `team_execution` step. Otherwise use the standard `execute_waves` step.
55
+ **Mode selection:** Follow the `decide_execution_mode` step in the workflow to determine team vs wave execution based on flags, config, and plan analysis.
55
56
  </process>