ariadna 1.3.1 → 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 (148) 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. metadata +20 -91
  61. data/data/agents/ariadna-backend-executor.md +0 -261
  62. data/data/agents/ariadna-frontend-executor.md +0 -259
  63. data/data/agents/ariadna-integration-checker.md +0 -418
  64. data/data/agents/ariadna-phase-researcher.md +0 -469
  65. data/data/agents/ariadna-plan-checker.md +0 -622
  66. data/data/agents/ariadna-project-researcher.md +0 -618
  67. data/data/agents/ariadna-research-synthesizer.md +0 -236
  68. data/data/agents/ariadna-test-executor.md +0 -266
  69. data/data/ariadna/references/checkpoints.md +0 -772
  70. data/data/ariadna/references/continuation-format.md +0 -249
  71. data/data/ariadna/references/decimal-phase-calculation.md +0 -65
  72. data/data/ariadna/references/git-integration.md +0 -248
  73. data/data/ariadna/references/git-planning-commit.md +0 -38
  74. data/data/ariadna/references/model-profile-resolution.md +0 -32
  75. data/data/ariadna/references/model-profiles.md +0 -73
  76. data/data/ariadna/references/phase-argument-parsing.md +0 -61
  77. data/data/ariadna/references/planning-config.md +0 -194
  78. data/data/ariadna/references/questioning.md +0 -153
  79. data/data/ariadna/references/rails-conventions.md +0 -416
  80. data/data/ariadna/references/tdd.md +0 -267
  81. data/data/ariadna/references/ui-brand.md +0 -160
  82. data/data/ariadna/references/verification-patterns.md +0 -853
  83. data/data/ariadna/templates/codebase/architecture.md +0 -481
  84. data/data/ariadna/templates/codebase/concerns.md +0 -380
  85. data/data/ariadna/templates/codebase/conventions.md +0 -434
  86. data/data/ariadna/templates/codebase/integrations.md +0 -328
  87. data/data/ariadna/templates/codebase/stack.md +0 -189
  88. data/data/ariadna/templates/codebase/structure.md +0 -418
  89. data/data/ariadna/templates/codebase/testing.md +0 -606
  90. data/data/ariadna/templates/context.md +0 -283
  91. data/data/ariadna/templates/continue-here.md +0 -78
  92. data/data/ariadna/templates/debug-subagent-prompt.md +0 -91
  93. data/data/ariadna/templates/phase-prompt.md +0 -609
  94. data/data/ariadna/templates/planner-subagent-prompt.md +0 -117
  95. data/data/ariadna/templates/research-project/ARCHITECTURE.md +0 -439
  96. data/data/ariadna/templates/research-project/FEATURES.md +0 -168
  97. data/data/ariadna/templates/research-project/PITFALLS.md +0 -406
  98. data/data/ariadna/templates/research-project/STACK.md +0 -251
  99. data/data/ariadna/templates/research-project/SUMMARY.md +0 -247
  100. data/data/ariadna/templates/state.md +0 -176
  101. data/data/ariadna/templates/summary-complex.md +0 -59
  102. data/data/ariadna/templates/summary-minimal.md +0 -41
  103. data/data/ariadna/templates/summary-standard.md +0 -48
  104. data/data/ariadna/templates/user-setup.md +0 -310
  105. data/data/ariadna/workflows/add-phase.md +0 -111
  106. data/data/ariadna/workflows/add-todo.md +0 -157
  107. data/data/ariadna/workflows/audit-milestone.md +0 -241
  108. data/data/ariadna/workflows/check-todos.md +0 -176
  109. data/data/ariadna/workflows/complete-milestone.md +0 -644
  110. data/data/ariadna/workflows/diagnose-issues.md +0 -219
  111. data/data/ariadna/workflows/discovery-phase.md +0 -289
  112. data/data/ariadna/workflows/discuss-phase.md +0 -408
  113. data/data/ariadna/workflows/execute-plan.md +0 -448
  114. data/data/ariadna/workflows/help.md +0 -470
  115. data/data/ariadna/workflows/insert-phase.md +0 -129
  116. data/data/ariadna/workflows/list-phase-assumptions.md +0 -178
  117. data/data/ariadna/workflows/pause-work.md +0 -122
  118. data/data/ariadna/workflows/plan-milestone-gaps.md +0 -256
  119. data/data/ariadna/workflows/remove-phase.md +0 -154
  120. data/data/ariadna/workflows/research-phase.md +0 -74
  121. data/data/ariadna/workflows/resume-project.md +0 -306
  122. data/data/ariadna/workflows/set-profile.md +0 -80
  123. data/data/ariadna/workflows/settings.md +0 -145
  124. data/data/ariadna/workflows/transition.md +0 -493
  125. data/data/ariadna/workflows/update.md +0 -212
  126. data/data/ariadna/workflows/verify-phase.md +0 -226
  127. data/data/commands/ariadna/add-todo.md +0 -42
  128. data/data/commands/ariadna/audit-milestone.md +0 -42
  129. data/data/commands/ariadna/check-todos.md +0 -41
  130. data/data/commands/ariadna/complete-milestone.md +0 -136
  131. data/data/commands/ariadna/discuss-phase.md +0 -86
  132. data/data/commands/ariadna/help.md +0 -22
  133. data/data/commands/ariadna/list-phase-assumptions.md +0 -50
  134. data/data/commands/ariadna/pause-work.md +0 -35
  135. data/data/commands/ariadna/plan-milestone-gaps.md +0 -40
  136. data/data/commands/ariadna/reapply-patches.md +0 -110
  137. data/data/commands/ariadna/research-phase.md +0 -187
  138. data/data/commands/ariadna/resume-work.md +0 -40
  139. data/data/commands/ariadna/set-profile.md +0 -34
  140. data/data/commands/ariadna/settings.md +0 -36
  141. data/data/commands/ariadna/update.md +0 -37
  142. data/data/guides/backend.md +0 -3069
  143. data/data/guides/frontend.md +0 -1479
  144. data/data/guides/performance.md +0 -1193
  145. data/data/guides/security.md +0 -1522
  146. data/data/guides/style-guide.md +0 -1091
  147. data/data/guides/testing.md +0 -504
  148. data/data/templates.md +0 -94
@@ -1,327 +1,28 @@
1
- <purpose>
2
- Orchestrate parallel codebase mapper agents to analyze codebase and produce structured documents in .ariadna_planning/codebase/
3
-
4
- Each agent has fresh context, explores a specific focus area, and **writes documents directly**. The orchestrator only receives confirmation + line counts, then writes a summary.
5
-
6
- Output: .ariadna_planning/codebase/ folder with 7 structured documents about the codebase state.
7
- </purpose>
8
-
9
- <philosophy>
10
- **Why dedicated mapper agents:**
11
- - Fresh context per domain (no token contamination)
12
- - Agents write documents directly (no context transfer back to orchestrator)
13
- - Orchestrator only summarizes what was created (minimal context usage)
14
- - Faster execution (agents run simultaneously)
15
-
16
- **Document quality over length:**
17
- Include enough detail to be useful as reference. Prioritize practical examples (especially code patterns) over arbitrary brevity.
18
-
19
- **Always include file paths:**
20
- Documents are reference material for Claude when planning/executing. Always include actual file paths formatted with backticks: `app/services/user_service.rb`.
21
- </philosophy>
22
-
23
- <process>
24
-
25
- <step name="init_context" priority="first">
26
- Load codebase mapping context:
27
-
28
- ```bash
29
- INIT=$(ariadna-tools init map-codebase)
30
- ```
31
-
32
- Extract from init JSON: `mapper_model`, `commit_docs`, `codebase_dir`, `existing_maps`, `has_maps`, `codebase_dir_exists`.
33
- </step>
34
-
35
- <step name="check_existing">
36
- Check if .ariadna_planning/codebase/ already exists using `has_maps` from init context.
37
-
38
- If `codebase_dir_exists` is true:
39
- ```bash
40
- ls -la .ariadna_planning/codebase/
41
- ```
42
-
43
- **If exists:**
44
-
45
- ```
46
- .ariadna_planning/codebase/ already exists with these documents:
47
- [List files found]
48
-
49
- What's next?
50
- 1. Refresh - Delete existing and remap codebase
51
- 2. Update - Keep existing, only update specific documents
52
- 3. Skip - Use existing codebase map as-is
53
- ```
54
-
55
- Wait for user response.
56
-
57
- If "Refresh": Delete .ariadna_planning/codebase/, continue to create_structure
58
- If "Update": Ask which documents to update, continue to spawn_agents (filtered)
59
- If "Skip": Exit workflow
60
-
61
- **If doesn't exist:**
62
- Continue to create_structure.
63
- </step>
64
-
65
- <step name="create_structure">
66
- Create .ariadna_planning/codebase/ directory:
67
-
68
- ```bash
69
- mkdir -p .ariadna_planning/codebase
70
- ```
71
-
72
- **Expected output files:**
73
- - STACK.md (from tech mapper)
74
- - INTEGRATIONS.md (from tech mapper)
75
- - ARCHITECTURE.md (from arch mapper)
76
- - STRUCTURE.md (from arch mapper)
77
- - CONVENTIONS.md (from quality mapper)
78
- - TESTING.md (from quality mapper)
79
- - CONCERNS.md (from concerns mapper)
80
-
81
- Continue to spawn_agents.
82
- </step>
83
-
84
- <step name="spawn_agents">
85
- Spawn 4 parallel ariadna-codebase-mapper agents.
86
-
87
- Use Task tool with `subagent_type="ariadna-codebase-mapper"`, `model="{mapper_model}"`, and `run_in_background=true` for parallel execution.
88
-
89
- **CRITICAL:** Use the dedicated `ariadna-codebase-mapper` agent, NOT `Explore`. The mapper agent writes documents directly.
90
-
91
- **Agent 1: Tech Focus**
92
-
93
- Task tool parameters:
94
- ```
95
- subagent_type: "ariadna-codebase-mapper"
96
- model: "{mapper_model}"
97
- run_in_background: true
98
- description: "Map codebase tech stack"
99
- ```
100
-
101
- Prompt:
102
- ```
103
- Focus: tech
104
-
105
- Analyze this codebase for technology stack and external integrations.
106
-
107
- Write these documents to .ariadna_planning/codebase/:
108
- - STACK.md - Languages, runtime, frameworks, dependencies, configuration
109
- - INTEGRATIONS.md - External APIs, databases, auth providers, webhooks
110
-
111
- Explore thoroughly. Write documents directly using templates. Return confirmation only.
112
- ```
113
-
114
- **Agent 2: Architecture Focus**
115
-
116
- Task tool parameters:
117
- ```
118
- subagent_type: "ariadna-codebase-mapper"
119
- model: "{mapper_model}"
120
- run_in_background: true
121
- description: "Map codebase architecture"
122
- ```
123
-
124
- Prompt:
125
- ```
126
- Focus: arch
127
-
128
- Analyze this codebase architecture and directory structure.
129
-
130
- Write these documents to .ariadna_planning/codebase/:
131
- - ARCHITECTURE.md - Pattern, layers, data flow, abstractions, entry points
132
- - STRUCTURE.md - Directory layout, key locations, naming conventions
133
-
134
- Explore thoroughly. Write documents directly using templates. Return confirmation only.
135
- ```
136
-
137
- **Agent 3: Quality Focus**
138
-
139
- Task tool parameters:
140
- ```
141
- subagent_type: "ariadna-codebase-mapper"
142
- model: "{mapper_model}"
143
- run_in_background: true
144
- description: "Map codebase conventions"
145
- ```
146
-
147
- Prompt:
148
- ```
149
- Focus: quality
150
-
151
- Analyze this codebase for coding conventions and testing patterns.
152
-
153
- Write these documents to .ariadna_planning/codebase/:
154
- - CONVENTIONS.md - Code style, naming, patterns, error handling
155
- - TESTING.md - Framework, structure, mocking, coverage
156
-
157
- Explore thoroughly. Write documents directly using templates. Return confirmation only.
158
- ```
159
-
160
- **Agent 4: Concerns Focus**
161
-
162
- Task tool parameters:
163
- ```
164
- subagent_type: "ariadna-codebase-mapper"
165
- model: "{mapper_model}"
166
- run_in_background: true
167
- description: "Map codebase concerns"
168
- ```
169
-
170
- Prompt:
171
- ```
172
- Focus: concerns
173
-
174
- Analyze this codebase for technical debt, known issues, and areas of concern.
175
-
176
- Write this document to .ariadna_planning/codebase/:
177
- - CONCERNS.md - Tech debt, bugs, security, performance, fragile areas
178
-
179
- Explore thoroughly. Write document directly using template. Return confirmation only.
180
- ```
181
-
182
- Continue to collect_confirmations.
183
- </step>
184
-
185
- <step name="collect_confirmations">
186
- Wait for all 4 agents to complete.
187
-
188
- Read each agent's output file to collect confirmations.
189
-
190
- **Expected confirmation format from each agent:**
191
- ```
192
- ## Mapping Complete
193
-
194
- **Focus:** {focus}
195
- **Documents written:**
196
- - `.ariadna_planning/codebase/{DOC1}.md` ({N} lines)
197
- - `.ariadna_planning/codebase/{DOC2}.md` ({N} lines)
198
-
199
- Ready for orchestrator summary.
200
- ```
201
-
202
- **What you receive:** Just file paths and line counts. NOT document contents.
203
-
204
- If any agent failed, note the failure and continue with successful documents.
205
-
206
- Continue to verify_output.
207
- </step>
208
-
209
- <step name="verify_output">
210
- Verify all documents created successfully:
211
-
212
- ```bash
213
- ls -la .ariadna_planning/codebase/
214
- wc -l .ariadna_planning/codebase/*.md
215
- ```
216
-
217
- **Verification checklist:**
218
- - All 7 documents exist
219
- - No empty documents (each should have >20 lines)
220
-
221
- If any documents missing or empty, note which agents may have failed.
222
-
223
- Continue to scan_for_secrets.
224
- </step>
225
-
226
- <step name="scan_for_secrets">
227
- **CRITICAL SECURITY CHECK:** Scan output files for accidentally leaked secrets before committing.
228
-
229
- Run secret pattern detection:
230
-
231
- ```bash
232
- # Check for common API key patterns in generated docs
233
- grep -E '(sk-[a-zA-Z0-9]{20,}|sk_live_[a-zA-Z0-9]+|sk_test_[a-zA-Z0-9]+|ghp_[a-zA-Z0-9]{36}|gho_[a-zA-Z0-9]{36}|glpat-[a-zA-Z0-9_-]+|AKIA[A-Z0-9]{16}|xox[baprs]-[a-zA-Z0-9-]+|-----BEGIN.*PRIVATE KEY|eyJ[a-zA-Z0-9_-]+\.eyJ[a-zA-Z0-9_-]+\.)' .ariadna_planning/codebase/*.md 2>/dev/null && SECRETS_FOUND=true || SECRETS_FOUND=false
234
- ```
235
-
236
- **If SECRETS_FOUND=true:**
237
-
238
- ```
239
- ⚠️ SECURITY ALERT: Potential secrets detected in codebase documents!
240
-
241
- Found patterns that look like API keys or tokens in:
242
- [show grep output]
243
-
244
- This would expose credentials if committed.
245
-
246
- **Action required:**
247
- 1. Review the flagged content above
248
- 2. If these are real secrets, they must be removed before committing
249
- 3. Consider adding sensitive files to Claude Code "Deny" permissions
250
-
251
- Pausing before commit. Reply "safe to proceed" if the flagged content is not actually sensitive, or edit the files first.
252
- ```
253
-
254
- Wait for user confirmation before continuing to commit_codebase_map.
255
-
256
- **If SECRETS_FOUND=false:**
257
-
258
- Continue to commit_codebase_map.
259
- </step>
260
-
261
- <step name="commit_codebase_map">
262
- Commit the codebase map:
263
-
264
- ```bash
265
- ariadna-tools commit "docs: map existing codebase" --files .ariadna_planning/codebase/*.md
266
- ```
267
-
268
- Continue to offer_next.
269
- </step>
270
-
271
- <step name="offer_next">
272
- Present completion summary and next steps.
273
-
274
- **Get line counts:**
275
- ```bash
276
- wc -l .ariadna_planning/codebase/*.md
277
- ```
278
-
279
- **Output format:**
280
-
281
- ```
282
- Codebase mapping complete.
283
-
284
- Created .ariadna_planning/codebase/:
285
- - STACK.md ([N] lines) - Technologies and dependencies
286
- - ARCHITECTURE.md ([N] lines) - System design and patterns
287
- - STRUCTURE.md ([N] lines) - Directory layout and organization
288
- - CONVENTIONS.md ([N] lines) - Code style and patterns
289
- - TESTING.md ([N] lines) - Test structure and practices
290
- - INTEGRATIONS.md ([N] lines) - External services and APIs
291
- - CONCERNS.md ([N] lines) - Technical debt and issues
292
-
293
-
294
1
  ---
295
-
296
- ## Next Up
297
-
298
- **Initialize project** — use codebase context for planning
299
-
300
- `/ariadna:new-project`
301
-
302
- <sub>`/clear` first → fresh context window</sub>
303
-
2
+ name: map-codebase
3
+ description: Analyze an existing codebase with 4 parallel mapper agents and produce 7 structured documents in .ariadna_planning/codebase/.
304
4
  ---
305
5
 
306
- **Also available:**
307
- - Re-run mapping: `/ariadna:map-codebase`
308
- - Review specific file: `cat .ariadna_planning/codebase/STACK.md`
309
- - Edit any document before proceeding
6
+ ## Goal
7
+ Produce a complete, reference-quality snapshot of the codebase — stack, architecture, conventions, and concerns — by running 4 specialized mapper agents in parallel. Each agent writes its documents directly; the orchestrator only collects confirmations and line counts.
310
8
 
311
- ---
9
+ ## Context Loading
10
+ ```bash
11
+ INIT=$(ariadna-tools init map-codebase)
312
12
  ```
13
+ Parse: `mapper_model`, `codebase_dir_exists`, `existing_maps`. If `codebase_dir_exists` is true, offer: Refresh (delete + remap), Update (remap specific documents), or Skip (use existing). Create `.ariadna_planning/codebase/` if it doesn't exist.
313
14
 
314
- End workflow.
315
- </step>
15
+ ## Constraints
16
+ - Spawn all 4 agents in a single message with `run_in_background=true` (true parallel execution)
17
+ - Agents are `ariadna-codebase-mapper` — NOT general-purpose; they write documents directly and return only confirmation + line counts
18
+ - Required outputs: STACK.md, INTEGRATIONS.md (agent 1 — tech), ARCHITECTURE.md, STRUCTURE.md (agent 2 — arch), CONVENTIONS.md, TESTING.md (agent 3 — quality), CONCERNS.md (agent 4 — concerns)
19
+ - Run secret scan (`grep -E` for API key patterns) on all output files before committing; pause for user confirmation if secrets detected
20
+ - Documents must include actual file paths formatted in backticks — they are reference material for planners
316
21
 
317
- </process>
22
+ ## Success Criteria
23
+ - All 7 documents exist in `.ariadna_planning/codebase/` with >20 lines each
24
+ - Secret scan passes (no credentials leaked)
25
+ - Committed with `docs: map existing codebase`
318
26
 
319
- <success_criteria>
320
- - .ariadna_planning/codebase/ directory created
321
- - 4 parallel ariadna-codebase-mapper agents spawned with run_in_background=true
322
- - Agents write documents directly (orchestrator doesn't receive document contents)
323
- - Read agent output files to collect confirmations
324
- - All 7 codebase documents exist
325
- - Clear completion summary with line counts
326
- - User offered clear next steps in Ariadna style
327
- </success_criteria>
27
+ ## On Completion
28
+ Display document list with line counts. Offer `/ariadna:new-project` as the natural next step with a `/clear` reminder.