ariadna 1.3.0 → 2.0.0

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.
Files changed (149) hide show
  1. checksums.yaml +4 -4
  2. data/ariadna.gemspec +0 -1
  3. data/data/agents/ariadna-codebase-mapper.md +34 -722
  4. data/data/agents/ariadna-debugger.md +44 -1139
  5. data/data/agents/ariadna-executor.md +75 -396
  6. data/data/agents/ariadna-planner.md +78 -1215
  7. data/data/agents/ariadna-roadmapper.md +55 -582
  8. data/data/agents/ariadna-verifier.md +60 -702
  9. data/data/ariadna/templates/config.json +8 -33
  10. data/data/ariadna/workflows/debug.md +28 -0
  11. data/data/ariadna/workflows/execute-phase.md +31 -513
  12. data/data/ariadna/workflows/map-codebase.md +20 -319
  13. data/data/ariadna/workflows/new-milestone.md +20 -365
  14. data/data/ariadna/workflows/new-project.md +19 -880
  15. data/data/ariadna/workflows/plan-phase.md +24 -443
  16. data/data/ariadna/workflows/progress.md +20 -376
  17. data/data/ariadna/workflows/quick.md +19 -221
  18. data/data/ariadna/workflows/roadmap-ops.md +28 -0
  19. data/data/ariadna/workflows/verify-work.md +23 -560
  20. data/data/commands/ariadna/add-phase.md +11 -22
  21. data/data/commands/ariadna/debug.md +11 -143
  22. data/data/commands/ariadna/execute-phase.md +12 -30
  23. data/data/commands/ariadna/insert-phase.md +7 -14
  24. data/data/commands/ariadna/map-codebase.md +16 -49
  25. data/data/commands/ariadna/new-milestone.md +12 -25
  26. data/data/commands/ariadna/new-project.md +22 -26
  27. data/data/commands/ariadna/plan-phase.md +13 -22
  28. data/data/commands/ariadna/progress.md +16 -6
  29. data/data/commands/ariadna/quick.md +9 -11
  30. data/data/commands/ariadna/remove-phase.md +9 -12
  31. data/data/commands/ariadna/verify-work.md +14 -19
  32. data/data/skills/rails-backend/API.md +138 -0
  33. data/data/skills/rails-backend/CONTROLLERS.md +154 -0
  34. data/data/skills/rails-backend/JOBS.md +132 -0
  35. data/data/skills/rails-backend/MODELS.md +213 -0
  36. data/data/skills/rails-backend/SKILL.md +169 -0
  37. data/data/skills/rails-frontend/ASSETS.md +154 -0
  38. data/data/skills/rails-frontend/COMPONENTS.md +253 -0
  39. data/data/skills/rails-frontend/SKILL.md +187 -0
  40. data/data/skills/rails-frontend/VIEWS.md +168 -0
  41. data/data/skills/rails-performance/PROFILING.md +106 -0
  42. data/data/skills/rails-performance/SKILL.md +217 -0
  43. data/data/skills/rails-security/AUDIT.md +118 -0
  44. data/data/skills/rails-security/SKILL.md +422 -0
  45. data/data/skills/rails-testing/FIXTURES.md +78 -0
  46. data/data/skills/rails-testing/SKILL.md +160 -0
  47. data/data/skills/rails-testing/SYSTEM-TESTS.md +73 -0
  48. data/lib/ariadna/installer.rb +11 -15
  49. data/lib/ariadna/tools/cli.rb +0 -12
  50. data/lib/ariadna/tools/config_manager.rb +10 -72
  51. data/lib/ariadna/tools/frontmatter.rb +23 -1
  52. data/lib/ariadna/tools/init.rb +201 -401
  53. data/lib/ariadna/tools/model_profiles.rb +6 -14
  54. data/lib/ariadna/tools/phase_manager.rb +1 -10
  55. data/lib/ariadna/tools/state_manager.rb +170 -451
  56. data/lib/ariadna/tools/template_filler.rb +4 -12
  57. data/lib/ariadna/tools/verification.rb +21 -399
  58. data/lib/ariadna/uninstaller.rb +9 -0
  59. data/lib/ariadna/version.rb +1 -1
  60. data/lib/ariadna.rb +1 -0
  61. metadata +20 -91
  62. data/data/agents/ariadna-backend-executor.md +0 -261
  63. data/data/agents/ariadna-frontend-executor.md +0 -259
  64. data/data/agents/ariadna-integration-checker.md +0 -418
  65. data/data/agents/ariadna-phase-researcher.md +0 -469
  66. data/data/agents/ariadna-plan-checker.md +0 -622
  67. data/data/agents/ariadna-project-researcher.md +0 -618
  68. data/data/agents/ariadna-research-synthesizer.md +0 -236
  69. data/data/agents/ariadna-test-executor.md +0 -266
  70. data/data/ariadna/references/checkpoints.md +0 -772
  71. data/data/ariadna/references/continuation-format.md +0 -249
  72. data/data/ariadna/references/decimal-phase-calculation.md +0 -65
  73. data/data/ariadna/references/git-integration.md +0 -248
  74. data/data/ariadna/references/git-planning-commit.md +0 -38
  75. data/data/ariadna/references/model-profile-resolution.md +0 -32
  76. data/data/ariadna/references/model-profiles.md +0 -73
  77. data/data/ariadna/references/phase-argument-parsing.md +0 -61
  78. data/data/ariadna/references/planning-config.md +0 -194
  79. data/data/ariadna/references/questioning.md +0 -153
  80. data/data/ariadna/references/rails-conventions.md +0 -416
  81. data/data/ariadna/references/tdd.md +0 -267
  82. data/data/ariadna/references/ui-brand.md +0 -160
  83. data/data/ariadna/references/verification-patterns.md +0 -853
  84. data/data/ariadna/templates/codebase/architecture.md +0 -481
  85. data/data/ariadna/templates/codebase/concerns.md +0 -380
  86. data/data/ariadna/templates/codebase/conventions.md +0 -434
  87. data/data/ariadna/templates/codebase/integrations.md +0 -328
  88. data/data/ariadna/templates/codebase/stack.md +0 -189
  89. data/data/ariadna/templates/codebase/structure.md +0 -418
  90. data/data/ariadna/templates/codebase/testing.md +0 -606
  91. data/data/ariadna/templates/context.md +0 -283
  92. data/data/ariadna/templates/continue-here.md +0 -78
  93. data/data/ariadna/templates/debug-subagent-prompt.md +0 -91
  94. data/data/ariadna/templates/phase-prompt.md +0 -609
  95. data/data/ariadna/templates/planner-subagent-prompt.md +0 -117
  96. data/data/ariadna/templates/research-project/ARCHITECTURE.md +0 -439
  97. data/data/ariadna/templates/research-project/FEATURES.md +0 -168
  98. data/data/ariadna/templates/research-project/PITFALLS.md +0 -406
  99. data/data/ariadna/templates/research-project/STACK.md +0 -251
  100. data/data/ariadna/templates/research-project/SUMMARY.md +0 -247
  101. data/data/ariadna/templates/state.md +0 -176
  102. data/data/ariadna/templates/summary-complex.md +0 -59
  103. data/data/ariadna/templates/summary-minimal.md +0 -41
  104. data/data/ariadna/templates/summary-standard.md +0 -48
  105. data/data/ariadna/templates/user-setup.md +0 -310
  106. data/data/ariadna/workflows/add-phase.md +0 -111
  107. data/data/ariadna/workflows/add-todo.md +0 -157
  108. data/data/ariadna/workflows/audit-milestone.md +0 -241
  109. data/data/ariadna/workflows/check-todos.md +0 -176
  110. data/data/ariadna/workflows/complete-milestone.md +0 -644
  111. data/data/ariadna/workflows/diagnose-issues.md +0 -219
  112. data/data/ariadna/workflows/discovery-phase.md +0 -289
  113. data/data/ariadna/workflows/discuss-phase.md +0 -408
  114. data/data/ariadna/workflows/execute-plan.md +0 -448
  115. data/data/ariadna/workflows/help.md +0 -470
  116. data/data/ariadna/workflows/insert-phase.md +0 -129
  117. data/data/ariadna/workflows/list-phase-assumptions.md +0 -178
  118. data/data/ariadna/workflows/pause-work.md +0 -122
  119. data/data/ariadna/workflows/plan-milestone-gaps.md +0 -256
  120. data/data/ariadna/workflows/remove-phase.md +0 -154
  121. data/data/ariadna/workflows/research-phase.md +0 -74
  122. data/data/ariadna/workflows/resume-project.md +0 -306
  123. data/data/ariadna/workflows/set-profile.md +0 -80
  124. data/data/ariadna/workflows/settings.md +0 -145
  125. data/data/ariadna/workflows/transition.md +0 -493
  126. data/data/ariadna/workflows/update.md +0 -212
  127. data/data/ariadna/workflows/verify-phase.md +0 -226
  128. data/data/commands/ariadna/add-todo.md +0 -42
  129. data/data/commands/ariadna/audit-milestone.md +0 -42
  130. data/data/commands/ariadna/check-todos.md +0 -41
  131. data/data/commands/ariadna/complete-milestone.md +0 -136
  132. data/data/commands/ariadna/discuss-phase.md +0 -86
  133. data/data/commands/ariadna/help.md +0 -22
  134. data/data/commands/ariadna/list-phase-assumptions.md +0 -50
  135. data/data/commands/ariadna/pause-work.md +0 -35
  136. data/data/commands/ariadna/plan-milestone-gaps.md +0 -40
  137. data/data/commands/ariadna/reapply-patches.md +0 -110
  138. data/data/commands/ariadna/research-phase.md +0 -187
  139. data/data/commands/ariadna/resume-work.md +0 -40
  140. data/data/commands/ariadna/set-profile.md +0 -34
  141. data/data/commands/ariadna/settings.md +0 -36
  142. data/data/commands/ariadna/update.md +0 -37
  143. data/data/guides/backend.md +0 -3069
  144. data/data/guides/frontend.md +0 -1479
  145. data/data/guides/performance.md +0 -1193
  146. data/data/guides/security.md +0 -1522
  147. data/data/guides/style-guide.md +0 -1091
  148. data/data/guides/testing.md +0 -504
  149. data/data/templates.md +0 -94
@@ -1,570 +1,33 @@
1
- <purpose>
2
- Validate built features through conversational testing with persistent state. Creates UAT.md that tracks test progress, survives /clear, and feeds gaps into /ariadna:plan-phase --gaps.
3
-
4
- User tests, Claude records. One test at a time. Plain text responses.
5
- </purpose>
6
-
7
- <philosophy>
8
- **Show expected, ask if reality matches.**
9
-
10
- Claude presents what SHOULD happen. User confirms or describes what's different.
11
- - "yes" / "y" / "next" / empty → pass
12
- - Anything else → logged as issue, severity inferred
13
-
14
- No Pass/Fail buttons. No severity questions. Just: "Here's what should happen. Does it?"
15
- </philosophy>
16
-
17
- <template>
18
- @~/.claude/ariadna/templates/UAT.md
19
- </template>
20
-
21
- <process>
22
-
23
- <step name="initialize" priority="first">
24
- If $ARGUMENTS contains a phase number, load context:
25
-
26
- ```bash
27
- INIT=$(ariadna-tools init verify-work "${PHASE_ARG}")
28
- ```
29
-
30
- Parse JSON for: `planner_model`, `checker_model`, `commit_docs`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `has_verification`.
31
- </step>
32
-
33
- <step name="check_active_session">
34
- **First: Check for active UAT sessions**
35
-
36
- ```bash
37
- find .ariadna_planning/phases -name "*-UAT.md" -type f 2>/dev/null | head -5
38
- ```
39
-
40
- **If active sessions exist AND no $ARGUMENTS provided:**
41
-
42
- Read each file's frontmatter (status, phase) and Current Test section.
43
-
44
- Display inline:
45
-
46
- ```
47
- ## Active UAT Sessions
48
-
49
- | # | Phase | Status | Current Test | Progress |
50
- |---|-------|--------|--------------|----------|
51
- | 1 | 04-comments | testing | 3. Reply to Comment | 2/6 |
52
- | 2 | 05-auth | testing | 1. Login Form | 0/4 |
53
-
54
- Reply with a number to resume, or provide a phase number to start new.
55
- ```
56
-
57
- Wait for user response.
58
-
59
- - If user replies with number (1, 2) → Load that file, go to `resume_from_file`
60
- - If user replies with phase number → Treat as new session, go to `create_uat_file`
61
-
62
- **If active sessions exist AND $ARGUMENTS provided:**
63
-
64
- Check if session exists for that phase. If yes, offer to resume or restart.
65
- If no, continue to `create_uat_file`.
66
-
67
- **If no active sessions AND no $ARGUMENTS:**
68
-
69
- ```
70
- No active UAT sessions.
71
-
72
- Provide a phase number to start testing (e.g., /ariadna:verify-work 4)
73
- ```
74
-
75
- **If no active sessions AND $ARGUMENTS provided:**
76
-
77
- Continue to `create_uat_file`.
78
- </step>
79
-
80
- <step name="find_summaries">
81
- **Find what to test:**
82
-
83
- Use `phase_dir` from init (or run init if not already done).
84
-
85
- ```bash
86
- ls "$phase_dir"/*-SUMMARY.md 2>/dev/null
87
- ```
88
-
89
- Read each SUMMARY.md to extract testable deliverables.
90
- </step>
91
-
92
- <step name="extract_tests">
93
- **Extract testable deliverables from SUMMARY.md:**
94
-
95
- Parse for:
96
- 1. **Accomplishments** - Features/functionality added
97
- 2. **User-facing changes** - UI, workflows, interactions
98
-
99
- Focus on USER-OBSERVABLE outcomes, not implementation details.
100
-
101
- For each deliverable, create a test:
102
- - name: Brief test name
103
- - expected: What the user should see/experience (specific, observable)
104
-
105
- Examples:
106
- - Accomplishment: "Added comment threading with infinite nesting"
107
- → Test: "Reply to a Comment"
108
- → Expected: "Clicking Reply opens inline composer below comment. Submitting shows reply nested under parent with visual indentation."
109
-
110
- Skip internal/non-observable items (refactors, type changes, etc.).
111
- </step>
112
-
113
- <step name="create_uat_file">
114
- **Create UAT file with all tests:**
115
-
116
- ```bash
117
- mkdir -p "$PHASE_DIR"
118
- ```
119
-
120
- Build test list from extracted deliverables.
121
-
122
- Create file:
123
-
124
- ```markdown
125
1
  ---
126
- status: testing
127
- phase: XX-name
128
- source: [list of SUMMARY.md files]
129
- started: [ISO timestamp]
130
- updated: [ISO timestamp]
2
+ name: verify-work
3
+ description: Validate that a phase or milestone achieved its goals — goal-backward, not task-backward
131
4
  ---
132
5
 
133
- ## Current Test
134
- <!-- OVERWRITE each test - shows where we are -->
135
-
136
- number: 1
137
- name: [first test name]
138
- expected: |
139
- [what user should observe]
140
- awaiting: user response
141
-
142
- ## Tests
143
-
144
- ### 1. [Test Name]
145
- expected: [observable behavior]
146
- result: [pending]
147
-
148
- ### 2. [Test Name]
149
- expected: [observable behavior]
150
- result: [pending]
151
-
152
- ...
153
-
154
- ## Summary
155
-
156
- total: [N]
157
- passed: 0
158
- issues: 0
159
- pending: [N]
160
- skipped: 0
161
-
162
- ## Gaps
163
-
164
- [none yet]
165
- ```
166
-
167
- Write to `.ariadna_planning/phases/XX-name/{phase}-UAT.md`
168
-
169
- Proceed to `present_test`.
170
- </step>
171
-
172
- <step name="present_test">
173
- **Present current test to user:**
174
-
175
- Read Current Test section from UAT file.
176
-
177
- Display using checkpoint box format:
178
-
179
- ```
180
- ╔══════════════════════════════════════════════════════════════╗
181
- ║ CHECKPOINT: Verification Required ║
182
- ╚══════════════════════════════════════════════════════════════╝
183
-
184
- **Test {number}: {name}**
185
-
186
- {expected}
187
-
188
- ──────────────────────────────────────────────────────────────
189
- → Type "pass" or describe what's wrong
190
- ──────────────────────────────────────────────────────────────
191
- ```
192
-
193
- Wait for user response (plain text, no AskUserQuestion).
194
- </step>
195
-
196
- <step name="process_response">
197
- **Process user response and update file:**
198
-
199
- **If response indicates pass:**
200
- - Empty response, "yes", "y", "ok", "pass", "next", "approved", "✓"
201
-
202
- Update Tests section:
203
- ```
204
- ### {N}. {name}
205
- expected: {expected}
206
- result: pass
207
- ```
208
-
209
- **If response indicates skip:**
210
- - "skip", "can't test", "n/a"
211
-
212
- Update Tests section:
213
- ```
214
- ### {N}. {name}
215
- expected: {expected}
216
- result: skipped
217
- reason: [user's reason if provided]
218
- ```
219
-
220
- **If response is anything else:**
221
- - Treat as issue description
222
-
223
- Infer severity from description:
224
- - Contains: crash, error, exception, fails, broken, unusable → blocker
225
- - Contains: doesn't work, wrong, missing, can't → major
226
- - Contains: slow, weird, off, minor, small → minor
227
- - Contains: color, font, spacing, alignment, visual → cosmetic
228
- - Default if unclear: major
229
-
230
- Update Tests section:
231
- ```
232
- ### {N}. {name}
233
- expected: {expected}
234
- result: issue
235
- reported: "{verbatim user response}"
236
- severity: {inferred}
237
- ```
238
-
239
- Append to Gaps section (structured YAML for plan-phase --gaps):
240
- ```yaml
241
- - truth: "{expected behavior from test}"
242
- status: failed
243
- reason: "User reported: {verbatim user response}"
244
- severity: {inferred}
245
- test: {N}
246
- artifacts: [] # Filled by diagnosis
247
- missing: [] # Filled by diagnosis
248
- ```
249
-
250
- **After any response:**
251
-
252
- Update Summary counts.
253
- Update frontmatter.updated timestamp.
254
-
255
- If more tests remain → Update Current Test, go to `present_test`
256
- If no more tests → Go to `complete_session`
257
- </step>
258
-
259
- <step name="resume_from_file">
260
- **Resume testing from UAT file:**
261
-
262
- Read the full UAT file.
263
-
264
- Find first test with `result: [pending]`.
6
+ ## Goal
7
+ Confirm that what was built actually delivers the phase or milestone goal, not merely that tasks were completed. Produces a VERIFICATION.md with pass/fail/gap status and feeds gaps back into planning.
265
8
 
266
- Announce:
267
- ```
268
- Resuming: Phase {phase} UAT
269
- Progress: {passed + issues + skipped}/{total}
270
- Issues found so far: {issues count}
271
-
272
- Continuing from Test {N}...
273
- ```
274
-
275
- Update Current Test section with the pending test.
276
- Proceed to `present_test`.
277
- </step>
278
-
279
- <step name="complete_session">
280
- **Complete testing and commit:**
281
-
282
- Update frontmatter:
283
- - status: complete
284
- - updated: [now]
285
-
286
- Clear Current Test section:
287
- ```
288
- ## Current Test
289
-
290
- [testing complete]
291
- ```
292
-
293
- Commit the UAT file:
9
+ ## Context Loading
294
10
  ```bash
295
- ariadna-tools commit "test({phase}): complete UAT - {passed} passed, {issues} issues" --files ".ariadna_planning/phases/XX-name/{phase}-UAT.md"
296
- ```
297
-
298
- Present summary:
299
- ```
300
- ## UAT Complete: Phase {phase}
301
-
302
- | Result | Count |
303
- |--------|-------|
304
- | Passed | {N} |
305
- | Issues | {N} |
306
- | Skipped| {N} |
307
-
308
- [If issues > 0:]
309
- ### Issues Found
310
-
311
- [List from Issues section]
312
- ```
313
-
314
- **If issues > 0:** Proceed to `diagnose_issues`
315
-
316
- **If issues == 0:**
317
- ```
318
- All tests passed. Ready to continue.
319
-
320
- - `/ariadna:plan-phase {next}` — Plan next phase
321
- - `/ariadna:execute-phase {next}` — Execute next phase
322
- ```
323
- </step>
324
-
325
- <step name="diagnose_issues">
326
- **Diagnose root causes before planning fixes:**
327
-
11
+ INIT=$(ariadna-tools init verify-work "${PHASE_OR_MILESTONE_ARG}")
328
12
  ```
329
- ---
330
-
331
- {N} issues found. Diagnosing root causes...
332
-
333
- Spawning parallel debug agents to investigate each issue.
334
- ```
335
-
336
- - Load diagnose-issues workflow
337
- - Follow @~/.claude/ariadna/workflows/diagnose-issues.md
338
- - Spawn parallel debug agents for each issue
339
- - Collect root causes
340
- - Update UAT.md with root causes
341
- - Proceed to `plan_gap_closure`
342
-
343
- Diagnosis runs automatically - no user prompt. Parallel agents investigate simultaneously, so overhead is minimal and fixes are more accurate.
344
- </step>
345
-
346
- <step name="plan_gap_closure">
347
- **Auto-plan fixes from diagnosed gaps:**
348
-
349
- Display:
350
- ```
351
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
352
- Ariadna ► PLANNING FIXES
353
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
354
-
355
- ◆ Spawning planner for gap closure...
356
- ```
357
-
358
- Spawn ariadna-planner in --gaps mode:
359
-
360
- ```
361
- Task(
362
- prompt="""
363
- <planning_context>
364
-
365
- **Phase:** {phase_number}
366
- **Mode:** gap_closure
367
-
368
- **UAT with diagnoses:**
369
- @.ariadna_planning/phases/{phase_dir}/{phase}-UAT.md
370
-
371
- **Project State:**
372
- @.ariadna_planning/STATE.md
373
-
374
- **Roadmap:**
375
- @.ariadna_planning/ROADMAP.md
376
-
377
- </planning_context>
378
-
379
- <downstream_consumer>
380
- Output consumed by /ariadna:execute-phase
381
- Plans must be executable prompts.
382
- </downstream_consumer>
383
- """,
384
- subagent_type="ariadna-planner",
385
- model="{planner_model}",
386
- description="Plan gap fixes for Phase {phase}"
387
- )
388
- ```
389
-
390
- On return:
391
- - **PLANNING COMPLETE:** Proceed to `verify_gap_plans`
392
- - **PLANNING INCONCLUSIVE:** Report and offer manual intervention
393
- </step>
394
-
395
- <step name="verify_gap_plans">
396
- **Verify fix plans with checker:**
397
-
398
- Display:
399
- ```
400
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
401
- Ariadna ► VERIFYING FIX PLANS
402
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
403
-
404
- ◆ Spawning plan checker...
405
- ```
406
-
407
- Initialize: `iteration_count = 1`
408
-
409
- Spawn ariadna-plan-checker:
410
-
411
- ```
412
- Task(
413
- prompt="""
414
- <verification_context>
415
-
416
- **Phase:** {phase_number}
417
- **Phase Goal:** Close diagnosed gaps from UAT
418
-
419
- **Plans to verify:**
420
- @.ariadna_planning/phases/{phase_dir}/*-PLAN.md
421
-
422
- </verification_context>
423
-
424
- <expected_output>
425
- Return one of:
426
- - ## VERIFICATION PASSED — all checks pass
427
- - ## ISSUES FOUND — structured issue list
428
- </expected_output>
429
- """,
430
- subagent_type="ariadna-plan-checker",
431
- model="{checker_model}",
432
- description="Verify Phase {phase} fix plans"
433
- )
434
- ```
435
-
436
- On return:
437
- - **VERIFICATION PASSED:** Proceed to `present_ready`
438
- - **ISSUES FOUND:** Proceed to `revision_loop`
439
- </step>
440
-
441
- <step name="revision_loop">
442
- **Iterate planner ↔ checker until plans pass (max 3):**
443
-
444
- **If iteration_count < 3:**
445
-
446
- Display: `Sending back to planner for revision... (iteration {N}/3)`
447
-
448
- Spawn ariadna-planner with revision context:
449
-
450
- ```
451
- Task(
452
- prompt="""
453
- <revision_context>
454
-
455
- **Phase:** {phase_number}
456
- **Mode:** revision
457
-
458
- **Existing plans:**
459
- @.ariadna_planning/phases/{phase_dir}/*-PLAN.md
460
-
461
- **Checker issues:**
462
- {structured_issues_from_checker}
463
-
464
- </revision_context>
465
-
466
- <instructions>
467
- Read existing PLAN.md files. Make targeted updates to address checker issues.
468
- Do NOT replan from scratch unless issues are fundamental.
469
- </instructions>
470
- """,
471
- subagent_type="ariadna-planner",
472
- model="{planner_model}",
473
- description="Revise Phase {phase} plans"
474
- )
475
- ```
476
-
477
- After planner returns → spawn checker again (verify_gap_plans logic)
478
- Increment iteration_count
479
-
480
- **If iteration_count >= 3:**
481
-
482
- Display: `Max iterations reached. {N} issues remain.`
483
-
484
- Offer options:
485
- 1. Force proceed (execute despite issues)
486
- 2. Provide guidance (user gives direction, retry)
487
- 3. Abandon (exit, user runs /ariadna:plan-phase manually)
488
-
489
- Wait for user response.
490
- </step>
491
-
492
- <step name="present_ready">
493
- **Present completion and next steps:**
494
-
495
- ```
496
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
497
- Ariadna ► FIXES READY ✓
498
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
499
-
500
- **Phase {X}: {Name}** — {N} gap(s) diagnosed, {M} fix plan(s) created
501
-
502
- | Gap | Root Cause | Fix Plan |
503
- |-----|------------|----------|
504
- | {truth 1} | {root_cause} | {phase}-04 |
505
- | {truth 2} | {root_cause} | {phase}-04 |
506
-
507
- Plans verified and ready for execution.
508
-
509
- ───────────────────────────────────────────────────────────────
510
-
511
- ## ▶ Next Up
512
-
513
- **Execute fixes** — run fix plans
514
-
515
- `/clear` then `/ariadna:execute-phase {phase} --gaps-only`
516
-
517
- ───────────────────────────────────────────────────────────────
518
- ```
519
- </step>
520
-
521
- </process>
522
-
523
- <update_rules>
524
- **Batched writes for efficiency:**
525
-
526
- Keep results in memory. Write to file only when:
527
- 1. **Issue found** — Preserve the problem immediately
528
- 2. **Session complete** — Final write before commit
529
- 3. **Checkpoint** — Every 5 passed tests (safety net)
530
-
531
- | Section | Rule | When Written |
532
- |---------|------|--------------|
533
- | Frontmatter.status | OVERWRITE | Start, complete |
534
- | Frontmatter.updated | OVERWRITE | On any file write |
535
- | Current Test | OVERWRITE | On any file write |
536
- | Tests.{N}.result | OVERWRITE | On any file write |
537
- | Summary | OVERWRITE | On any file write |
538
- | Gaps | APPEND | When issue found |
539
-
540
- On context reset: File shows last checkpoint. Resume from there.
541
- </update_rules>
542
-
543
- <severity_inference>
544
- **Infer severity from user's natural language:**
13
+ Returns: `summary_paths[]` (SUMMARY.md files to verify against), `phase_dir`, `memory_dir`, `verifier_model`, `phase_number`, `phase_name`, `has_verification`.
545
14
 
546
- | User says | Infer |
547
- |-----------|-------|
548
- | "crashes", "error", "exception", "fails completely" | blocker |
549
- | "doesn't work", "nothing happens", "wrong behavior" | major |
550
- | "works but...", "slow", "weird", "minor issue" | minor |
551
- | "color", "spacing", "alignment", "looks off" | cosmetic |
15
+ Also read: `@~/.claude/skills/rails-backend/SKILL.md` for expected Rails patterns, and load security + performance Skills in the verifier prompt for non-functional checks.
552
16
 
553
- Default to **major** if unclear. User can correct if needed.
17
+ ## Constraints
18
+ - Spawn `ariadna-verifier` agent; verifier checks goal achievement against the codebase, not just SUMMARY.md claims
19
+ - Load security Skills (`@~/.claude/skills/rails-security/SKILL.md`) and performance Skills (`@~/.claude/skills/rails-performance/SKILL.md`) in the verifier prompt
20
+ - Phase scope: verify one phase goal; milestone scope: verify all phases in the milestone — same workflow, different `--scope` argument
21
+ - Verifier must check `must_haves` from plan frontmatter against actual files on disk — no credit for "plan says done"
22
+ - If `has_verification: true`, offer to re-verify or show existing report
554
23
 
555
- **Never ask "how severe is this?"** - just infer and move on.
556
- </severity_inference>
24
+ ## Success Criteria
25
+ - VERIFICATION.md exists in `phase_dir` with `status: passed | human_needed | gaps_found`
26
+ - No critical gaps left unaddressed (minor gaps acceptable with notes)
27
+ - Human-needed items listed explicitly so the user knows what to test manually
557
28
 
558
- <success_criteria>
559
- - [ ] UAT file created with all tests from SUMMARY.md
560
- - [ ] Tests presented one at a time with expected behavior
561
- - [ ] User responses processed as pass/issue/skip
562
- - [ ] Severity inferred from description (never asked)
563
- - [ ] Batched writes: on issue, every 5 passes, or completion
564
- - [ ] Committed on completion
565
- - [ ] If issues: parallel debug agents diagnose root causes
566
- - [ ] If issues: ariadna-planner creates fix plans (gap_closure mode)
567
- - [ ] If issues: ariadna-plan-checker verifies fix plans
568
- - [ ] If issues: revision loop until plans pass (max 3 iterations)
569
- - [ ] Ready for `/ariadna:execute-phase --gaps-only` when complete
570
- </success_criteria>
29
+ ## On Completion
30
+ - Update `memory/progress.md` with verification status and gap count
31
+ - If `gaps_found`: display gap summary and offer `/ariadna:plan-phase {N} --gaps` to create fix plans
32
+ - If `human_needed`: present items for manual testing; wait for user confirmation before marking verified
33
+ - If `passed`: mark phase/milestone verified in STATE.md and ROADMAP.md
@@ -7,33 +7,22 @@ allowed-tools:
7
7
  - Write
8
8
  - Bash
9
9
  ---
10
-
11
10
  <objective>
12
11
  Add a new integer phase to the end of the current milestone in the roadmap.
13
12
 
14
- Routes to the add-phase workflow which handles:
15
- - Phase number calculation (next sequential integer)
16
- - Directory creation with slug generation
17
- - Roadmap structure updates
18
- - STATE.md roadmap evolution tracking
13
+ Handles: next phase number calculation, directory creation, roadmap entry insertion, STATE.md roadmap evolution tracking.
19
14
  </objective>
20
15
 
21
- <execution_context>
22
- @.ariadna_planning/ROADMAP.md
23
- @.ariadna_planning/STATE.md
24
- @~/.claude/ariadna/workflows/add-phase.md
25
- </execution_context>
16
+ <context>
17
+ Description: $ARGUMENTS
26
18
 
27
- <process>
28
- **Follow the add-phase workflow** from `@~/.claude/ariadna/workflows/add-phase.md`.
19
+ Follow the workflow in `~/.claude/ariadna/workflows/add-phase.md` end-to-end.
20
+ </context>
29
21
 
30
- The workflow handles all logic including:
31
- 1. Argument parsing and validation
32
- 2. Roadmap existence checking
33
- 3. Current milestone identification
34
- 4. Next phase number calculation (ignoring decimals)
35
- 5. Slug generation from description
36
- 6. Phase directory creation
37
- 7. Roadmap entry insertion
38
- 8. STATE.md updates
22
+ <process>
23
+ 1. Validate $ARGUMENTS provided; error with usage if missing.
24
+ 2. Run `ariadna-tools init phase-op "0"` — check `roadmap_exists`.
25
+ 3. Run `ariadna-tools phase add "$ARGUMENTS"` — calculates next number, creates directory, updates ROADMAP.md.
26
+ 4. Update STATE.md "Roadmap Evolution" section with entry.
27
+ 5. Display new phase number, directory, and next step: `/ariadna:plan-phase {N}`.
39
28
  </process>