ariadna 1.1.3 → 1.2.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.
- checksums.yaml +4 -4
- data/data/agents/ariadna-backend-executor.md +1 -1
- data/data/agents/ariadna-planner.md +29 -1
- data/data/agents/ariadna-test-executor.md +1 -1
- data/data/ariadna/references/rails-conventions.md +384 -0
- data/data/ariadna/templates/codebase/architecture.md +3 -9
- data/data/ariadna/templates/codebase/concerns.md +2 -2
- data/data/ariadna/templates/codebase/conventions.md +1 -1
- data/data/ariadna/templates/codebase/stack.md +1 -2
- data/data/ariadna/templates/research-project/ARCHITECTURE.md +60 -1
- data/data/ariadna/templates/research-project/PITFALLS.md +51 -2
- data/data/ariadna/templates/research-project/STACK.md +23 -22
- data/data/ariadna/templates/research-project/SUMMARY.md +2 -2
- data/data/ariadna/workflows/new-project.md +52 -129
- data/data/ariadna/workflows/plan-phase.md +100 -49
- data/data/commands/ariadna/new-project.md +8 -6
- data/data/commands/ariadna/plan-phase.md +9 -7
- data/data/guides/backend.md +5 -52
- data/data/templates.md +2 -2
- data/lib/ariadna/tools/config_manager.rb +3 -2
- data/lib/ariadna/tools/frontmatter.rb +2 -0
- data/lib/ariadna/tools/phase_manager.rb +1 -0
- data/lib/ariadna/version.rb +1 -1
- metadata +2 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
<purpose>
|
|
2
|
-
Create executable phase prompts (PLAN.md files) for a roadmap phase
|
|
2
|
+
Create executable phase prompts (PLAN.md files) for a roadmap phase. Default flow: Context (inline if needed) -> Plan -> Verify -> Done. Orchestrates ariadna-planner and ariadna-plan-checker agents. Research skipped by default (Rails conventions pre-loaded); use --research to force research for non-standard integrations.
|
|
3
3
|
</purpose>
|
|
4
4
|
|
|
5
5
|
<required_reading>
|
|
6
6
|
Read all files referenced by the invoking prompt's execution_context before starting.
|
|
7
7
|
|
|
8
8
|
@~/.claude/ariadna/references/ui-brand.md
|
|
9
|
+
@~/.claude/ariadna/references/rails-conventions.md
|
|
9
10
|
</required_reading>
|
|
10
11
|
|
|
11
12
|
<process>
|
|
@@ -26,7 +27,7 @@ Parse JSON for: `researcher_model`, `planner_model`, `checker_model`, `research_
|
|
|
26
27
|
|
|
27
28
|
## 2. Parse and Normalize Arguments
|
|
28
29
|
|
|
29
|
-
Extract from $ARGUMENTS: phase number (integer or decimal like `2.1`), flags (`--research`, `--skip-research`, `--gaps`, `--skip-verify`).
|
|
30
|
+
Extract from $ARGUMENTS: phase number (integer or decimal like `2.1`), flags (`--research`, `--skip-research`, `--gaps`, `--skip-verify`, `--skip-context`).
|
|
30
31
|
|
|
31
32
|
**If no phase number:** Detect next unplanned phase from roadmap.
|
|
32
33
|
|
|
@@ -45,21 +46,55 @@ PHASE_INFO=$(ariadna-tools roadmap get-phase "${PHASE}")
|
|
|
45
46
|
|
|
46
47
|
**If `found` is false:** Error with available phases. **If `found` is true:** Extract `phase_number`, `phase_name`, `goal` from JSON.
|
|
47
48
|
|
|
48
|
-
## 4.
|
|
49
|
+
## 4. Inline Context Gathering (Replaces discuss-phase)
|
|
49
50
|
|
|
50
51
|
Use `context_content` from init JSON (already loaded via `--include context`).
|
|
51
52
|
|
|
52
|
-
**
|
|
53
|
+
**If `context_content` is not null:** Display: `Using phase context from: ${PHASE_DIR}/*-CONTEXT.md` and skip to step 5.
|
|
53
54
|
|
|
54
|
-
If `context_content` is
|
|
55
|
+
**If `context_content` is null AND no `--skip-context` flag:**
|
|
56
|
+
|
|
57
|
+
Analyze the phase goal from `roadmap_content` and determine if there are implementation decisions the user should weigh in on.
|
|
58
|
+
|
|
59
|
+
**Quick assessment — does this phase need context?**
|
|
60
|
+
|
|
61
|
+
- Pure infrastructure / setup / configuration → No 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
|
|
65
|
+
|
|
66
|
+
**If context would be helpful:** Offer inline clarification with a single AskUserQuestion:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
questions: [
|
|
70
|
+
{
|
|
71
|
+
header: "Context",
|
|
72
|
+
question: "Phase {X}: {Name} has some implementation choices. Want to discuss them before planning?",
|
|
73
|
+
multiSelect: false,
|
|
74
|
+
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" },
|
|
77
|
+
{ label: "Full discussion", description: "Run /ariadna:discuss-phase for detailed context gathering" }
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
- **"Plan directly":** Continue to step 5. Planner will use its judgment for ambiguous areas.
|
|
84
|
+
- **"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.
|
|
85
|
+
- **"Full discussion":** Exit and tell user to run `/ariadna:discuss-phase {X}` first, then return.
|
|
86
|
+
|
|
87
|
+
**CRITICAL:** Use `context_content` from INIT — pass to planner and checker agents.
|
|
55
88
|
|
|
56
89
|
## 5. Handle Research
|
|
57
90
|
|
|
58
|
-
**Skip
|
|
91
|
+
**Default: Skip research.** Rails conventions are pre-loaded via `rails-conventions.md`.
|
|
92
|
+
|
|
93
|
+
**Skip if:** `--gaps` flag, or `research_enabled` is false (default) without `--research` override.
|
|
59
94
|
|
|
60
95
|
**If `has_research` is true (from init) AND no `--research` flag:** Use existing, skip to step 6.
|
|
61
96
|
|
|
62
|
-
**If
|
|
97
|
+
**If `--research` flag explicitly passed:**
|
|
63
98
|
|
|
64
99
|
Display banner:
|
|
65
100
|
```
|
|
@@ -179,6 +214,14 @@ IMPORTANT: If context exists below, it contains USER DECISIONS from /ariadna:dis
|
|
|
179
214
|
**Gap Closure (if --gaps):** {verification_content} {uat_content}
|
|
180
215
|
</planning_context>
|
|
181
216
|
|
|
217
|
+
<rails_context>
|
|
218
|
+
Use Rails conventions from your required reading (rails-conventions.md) for:
|
|
219
|
+
- Standard task decomposition patterns (model → migration+model+tests, controller → routes+controller+views+tests)
|
|
220
|
+
- Known domain detection (skip discovery for standard Rails work)
|
|
221
|
+
- Architecture patterns (MVC, concerns, service objects)
|
|
222
|
+
- Common pitfall prevention (N+1, mass assignment, fat controllers)
|
|
223
|
+
</rails_context>
|
|
224
|
+
|
|
182
225
|
<downstream_consumer>
|
|
183
226
|
Output consumed by /ariadna:execute-phase. Plans need:
|
|
184
227
|
- Frontmatter (wave, depends_on, files_modified, autonomous)
|
|
@@ -248,7 +291,7 @@ IMPORTANT: Plans MUST honor user decisions. Flag as issue if plans contradict.
|
|
|
248
291
|
|
|
249
292
|
<expected_output>
|
|
250
293
|
- ## VERIFICATION PASSED — all checks pass
|
|
251
|
-
- ## ISSUES FOUND — structured issue list
|
|
294
|
+
- ## ISSUES FOUND — structured issue list with severity (minor/major/blocker)
|
|
252
295
|
</expected_output>
|
|
253
296
|
```
|
|
254
297
|
|
|
@@ -264,58 +307,65 @@ Task(
|
|
|
264
307
|
## 11. Handle Checker Return
|
|
265
308
|
|
|
266
309
|
- **`## VERIFICATION PASSED`:** Display confirmation, proceed to step 13.
|
|
267
|
-
- **`## ISSUES FOUND`:**
|
|
268
|
-
|
|
269
|
-
## 12. Revision Loop (Max 3 Iterations)
|
|
310
|
+
- **`## ISSUES FOUND`:** Classify issues and proceed to step 12.
|
|
270
311
|
|
|
271
|
-
|
|
312
|
+
## 12. Handle Checker Issues (Inline Fix, No Revision Loop)
|
|
272
313
|
|
|
273
|
-
**
|
|
314
|
+
**Classify each issue by severity:**
|
|
274
315
|
|
|
275
|
-
|
|
316
|
+
### Minor Issues (orchestrator fixes inline)
|
|
317
|
+
Issues the orchestrator can fix directly with the Edit tool — no agent re-spawn needed:
|
|
318
|
+
- Missing requirement mapping in frontmatter
|
|
319
|
+
- Dependency ordering errors (wrong wave number)
|
|
320
|
+
- Missing `<verify>` or `<done>` elements in tasks
|
|
321
|
+
- Frontmatter field corrections
|
|
322
|
+
- must_haves adjustments
|
|
276
323
|
|
|
277
|
-
|
|
278
|
-
|
|
324
|
+
**For minor issues:** Fix the PLAN.md files directly using the Edit tool:
|
|
325
|
+
```
|
|
326
|
+
Read the PLAN.md file, apply the fix, write it back.
|
|
279
327
|
```
|
|
280
328
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
```markdown
|
|
284
|
-
<revision_context>
|
|
285
|
-
**Phase:** {phase_number}
|
|
286
|
-
**Mode:** revision
|
|
287
|
-
|
|
288
|
-
**Existing plans:** {plans_content}
|
|
289
|
-
**Checker issues:** {structured_issues_from_checker}
|
|
329
|
+
Display: `Fixed {N} minor issue(s) inline.`
|
|
290
330
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
331
|
+
### Major Issues (present to user)
|
|
332
|
+
Issues that require architectural decisions or significant plan restructuring:
|
|
333
|
+
- Missing requirements with no clear task mapping
|
|
334
|
+
- Incorrect decomposition (tasks too large or wrong scope)
|
|
335
|
+
- Contradictions with user decisions from CONTEXT.md
|
|
336
|
+
- Scope creep (tasks implementing deferred ideas)
|
|
295
337
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
338
|
+
**For major issues:** Present to user with AskUserQuestion:
|
|
339
|
+
```
|
|
340
|
+
questions: [
|
|
341
|
+
{
|
|
342
|
+
header: "Plan Issues",
|
|
343
|
+
question: "The plan checker found {N} issue(s) that need your input. How to proceed?",
|
|
344
|
+
multiSelect: false,
|
|
345
|
+
options: [
|
|
346
|
+
{ label: "Accept as-is", description: "Proceed despite issues" },
|
|
347
|
+
{ label: "Re-plan", description: "Spawn planner again with issue context" },
|
|
348
|
+
{ label: "Fix manually", description: "I'll edit the PLAN.md files myself" }
|
|
349
|
+
]
|
|
350
|
+
}
|
|
351
|
+
]
|
|
301
352
|
```
|
|
302
353
|
|
|
354
|
+
- **"Accept as-is":** Proceed to step 13.
|
|
355
|
+
- **"Re-plan":** Spawn planner in revision mode (single attempt, not a loop):
|
|
356
|
+
|
|
303
357
|
```
|
|
304
358
|
Task(
|
|
305
|
-
prompt="First, read ~/.claude/agents/ariadna-planner.md for your role and instructions.\n\n" +
|
|
359
|
+
prompt="First, read ~/.claude/agents/ariadna-planner.md for your role and instructions.\n\n" + revision_prompt_with_issues,
|
|
306
360
|
subagent_type="general-purpose",
|
|
307
361
|
model="{planner_model}",
|
|
308
362
|
description="Revise Phase {phase} plans"
|
|
309
363
|
)
|
|
310
364
|
```
|
|
311
365
|
|
|
312
|
-
After planner returns
|
|
313
|
-
|
|
314
|
-
**If iteration_count >= 3:**
|
|
315
|
-
|
|
316
|
-
Display: `Max iterations reached. {N} issues remain:` + issue list
|
|
366
|
+
After planner returns, proceed to step 13 (no re-check loop).
|
|
317
367
|
|
|
318
|
-
|
|
368
|
+
- **"Fix manually":** Display file paths and exit.
|
|
319
369
|
|
|
320
370
|
## 13. Present Final Status
|
|
321
371
|
|
|
@@ -337,8 +387,9 @@ Output this markdown directly (not as a code block):
|
|
|
337
387
|
| 1 | 01, 02 | [objectives] |
|
|
338
388
|
| 2 | 03 | [objective] |
|
|
339
389
|
|
|
340
|
-
|
|
341
|
-
|
|
390
|
+
Context: {Gathered inline | Used existing | Skipped}
|
|
391
|
+
Research: {Completed | Used existing | Skipped (Rails conventions loaded)}
|
|
392
|
+
Verification: {Passed | Passed with fixes | Skipped}
|
|
342
393
|
|
|
343
394
|
───────────────────────────────────────────────────────────────
|
|
344
395
|
|
|
@@ -363,14 +414,14 @@ Verification: {Passed | Passed with override | Skipped}
|
|
|
363
414
|
- [ ] .planning/ directory validated
|
|
364
415
|
- [ ] Phase validated against roadmap
|
|
365
416
|
- [ ] Phase directory created if needed
|
|
366
|
-
- [ ] CONTEXT.md
|
|
367
|
-
- [ ] Research
|
|
368
|
-
- [ ] ariadna-phase-researcher spawned with CONTEXT.md
|
|
417
|
+
- [ ] Context handled: existing CONTEXT.md used, inline gathering offered, or skipped
|
|
418
|
+
- [ ] Research skipped by default (Rails conventions in context), or completed if --research flag
|
|
369
419
|
- [ ] Existing plans checked
|
|
370
|
-
- [ ] ariadna-planner spawned with CONTEXT.md + RESEARCH.md
|
|
420
|
+
- [ ] ariadna-planner spawned with rails-conventions + any CONTEXT.md + RESEARCH.md
|
|
371
421
|
- [ ] Plans created (PLANNING COMPLETE or CHECKPOINT handled)
|
|
372
|
-
- [ ] ariadna-plan-checker spawned
|
|
373
|
-
- [ ]
|
|
422
|
+
- [ ] ariadna-plan-checker spawned (unless --skip-verify)
|
|
423
|
+
- [ ] Minor checker issues fixed inline by orchestrator (no revision loop)
|
|
424
|
+
- [ ] Major checker issues presented to user for decision
|
|
374
425
|
- [ ] User sees status between agent spawns
|
|
375
426
|
- [ ] User knows next steps
|
|
376
427
|
</success_criteria>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ariadna:new-project
|
|
3
3
|
description: Initialize a new project with deep context gathering and PROJECT.md
|
|
4
|
-
argument-hint: "[--auto]"
|
|
4
|
+
argument-hint: "[--auto] [--research]"
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- Read
|
|
7
7
|
- Bash
|
|
@@ -11,27 +11,29 @@ allowed-tools:
|
|
|
11
11
|
---
|
|
12
12
|
<context>
|
|
13
13
|
**Flags:**
|
|
14
|
-
- `--auto` — Automatic mode.
|
|
14
|
+
- `--auto` — Automatic mode. Skips config questions, runs requirements → roadmap without further interaction. Expects idea document via @ reference.
|
|
15
|
+
- `--research` — Force domain research (4 parallel researchers + synthesizer). By default, research is skipped and Rails conventions are pre-loaded.
|
|
15
16
|
</context>
|
|
16
17
|
|
|
17
18
|
<objective>
|
|
18
|
-
Initialize a new project through
|
|
19
|
+
Initialize a new project through streamlined flow: questioning → requirements → roadmap. Research skipped by default (Rails conventions pre-loaded); use --research for non-standard domains.
|
|
19
20
|
|
|
20
21
|
**Creates:**
|
|
21
22
|
- `.planning/PROJECT.md` — project context
|
|
22
|
-
- `.planning/config.json` — workflow preferences
|
|
23
|
-
- `.planning/research/` — domain research (
|
|
23
|
+
- `.planning/config.json` — workflow preferences (opinionated defaults)
|
|
24
|
+
- `.planning/research/` — domain research (only with --research flag)
|
|
24
25
|
- `.planning/REQUIREMENTS.md` — scoped requirements
|
|
25
26
|
- `.planning/ROADMAP.md` — phase structure
|
|
26
27
|
- `.planning/STATE.md` — project memory
|
|
27
28
|
|
|
28
|
-
**After this command:** Run `/ariadna:plan-phase 1` to start
|
|
29
|
+
**After this command:** Run `/ariadna:plan-phase 1` to start planning.
|
|
29
30
|
</objective>
|
|
30
31
|
|
|
31
32
|
<execution_context>
|
|
32
33
|
@~/.claude/ariadna/workflows/new-project.md
|
|
33
34
|
@~/.claude/ariadna/references/questioning.md
|
|
34
35
|
@~/.claude/ariadna/references/ui-brand.md
|
|
36
|
+
@~/.claude/ariadna/references/rails-conventions.md
|
|
35
37
|
@~/.claude/ariadna/templates/project.md
|
|
36
38
|
@~/.claude/ariadna/templates/requirements.md
|
|
37
39
|
</execution_context>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ariadna:plan-phase
|
|
3
3
|
description: Create detailed execution plan for a phase (PLAN.md) with verification loop
|
|
4
|
-
argument-hint: "[phase] [--research] [--skip-research] [--gaps] [--skip-verify]"
|
|
4
|
+
argument-hint: "[phase] [--research] [--skip-research] [--gaps] [--skip-verify] [--skip-context]"
|
|
5
5
|
agent: ariadna-planner
|
|
6
6
|
allowed-tools:
|
|
7
7
|
- Read
|
|
@@ -14,26 +14,28 @@ allowed-tools:
|
|
|
14
14
|
- mcp__context7__*
|
|
15
15
|
---
|
|
16
16
|
<objective>
|
|
17
|
-
Create executable phase prompts (PLAN.md files) for a roadmap phase
|
|
17
|
+
Create executable phase prompts (PLAN.md files) for a roadmap phase. Research skipped by default (Rails conventions pre-loaded). Includes optional inline context gathering (replaces separate discuss-phase step).
|
|
18
18
|
|
|
19
|
-
**Default flow:**
|
|
19
|
+
**Default flow:** Context (inline if needed) → Plan → Verify → Done
|
|
20
20
|
|
|
21
|
-
**Orchestrator role:** Parse arguments, validate phase,
|
|
21
|
+
**Orchestrator role:** Parse arguments, validate phase, offer inline context gathering, spawn ariadna-planner (with Rails conventions), verify with ariadna-plan-checker (single pass, inline fixes for minor issues), present results.
|
|
22
22
|
</objective>
|
|
23
23
|
|
|
24
24
|
<execution_context>
|
|
25
25
|
@~/.claude/ariadna/workflows/plan-phase.md
|
|
26
26
|
@~/.claude/ariadna/references/ui-brand.md
|
|
27
|
+
@~/.claude/ariadna/references/rails-conventions.md
|
|
27
28
|
</execution_context>
|
|
28
29
|
|
|
29
30
|
<context>
|
|
30
31
|
Phase number: $ARGUMENTS (optional — auto-detects next unplanned phase if omitted)
|
|
31
32
|
|
|
32
33
|
**Flags:**
|
|
33
|
-
- `--research` — Force
|
|
34
|
-
- `--skip-research` — Skip research, go straight to planning
|
|
34
|
+
- `--research` — Force research even if not enabled in config (for non-standard integrations)
|
|
35
|
+
- `--skip-research` — Skip research, go straight to planning (default behavior)
|
|
35
36
|
- `--gaps` — Gap closure mode (reads VERIFICATION.md, skips research)
|
|
36
|
-
- `--skip-verify` — Skip verification
|
|
37
|
+
- `--skip-verify` — Skip plan verification
|
|
38
|
+
- `--skip-context` — Skip inline context gathering, plan directly
|
|
37
39
|
|
|
38
40
|
Normalize phase input in step 2 before any directory lookups.
|
|
39
41
|
</context>
|
data/data/guides/backend.md
CHANGED
|
@@ -18,7 +18,6 @@ We stand on the shoulders of giants.
|
|
|
18
18
|
- [Part 1: Foundation & Architecture](#part-1-foundation--architecture)
|
|
19
19
|
- [1.0 The Vanilla Rails Philosophy](#10-the-vanilla-rails-philosophy)
|
|
20
20
|
- [1.1 Understanding Architecture](#11-understanding-fizzys-architecture)
|
|
21
|
-
- [1.2 UUID Primary Keys & Fixtures](#12-uuid-primary-keys--fixtures)
|
|
22
21
|
- [Part 2: Model Layer Patterns](#part-2-model-layer-patterns)
|
|
23
22
|
- [2.1 Concern Architecture](#21-concern-architecture)
|
|
24
23
|
- [2.2 Intention-Revealing APIs](#22-intention-revealing-apis)
|
|
@@ -204,52 +203,6 @@ setup do
|
|
|
204
203
|
end
|
|
205
204
|
```
|
|
206
205
|
|
|
207
|
-
### UUID Primary Keys
|
|
208
|
-
|
|
209
|
-
It uses UUIDs (UUIDv7, base36-encoded to 25 characters) instead of auto-incrementing integers:
|
|
210
|
-
|
|
211
|
-
**Why UUIDs:**
|
|
212
|
-
- **Security**: No ID enumeration across tenants
|
|
213
|
-
- **Distributed systems**: Can generate IDs client-side
|
|
214
|
-
- **Merging**: No ID conflicts when combining data
|
|
215
|
-
|
|
216
|
-
**The Card exception**: Cards use `number` (integer) for user-facing IDs:
|
|
217
|
-
```ruby
|
|
218
|
-
# Card ID: "abc123def456..." (UUID, internal)
|
|
219
|
-
# Card number: 1234 (integer, user-facing)
|
|
220
|
-
|
|
221
|
-
# In routes and URLs
|
|
222
|
-
card_path(@card) # => /cards/1234 (uses number, not ID)
|
|
223
|
-
|
|
224
|
-
# In controllers
|
|
225
|
-
@card = Current.user.accessible_cards.find_by!(number: params[:id])
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
**Fixture behavior:**
|
|
229
|
-
- Fixture UUIDs are deterministic and always "older" than test-created records
|
|
230
|
-
- `.first` and `.last` work predictably in tests
|
|
231
|
-
|
|
232
|
-
## 1.2 UUID Primary Keys & Fixtures
|
|
233
|
-
|
|
234
|
-
### Practical Implications
|
|
235
|
-
|
|
236
|
-
```ruby
|
|
237
|
-
# ✓ Good: Find cards by number
|
|
238
|
-
def set_card
|
|
239
|
-
@card = Current.user.accessible_cards.find_by!(number: params[:id])
|
|
240
|
-
end
|
|
241
|
-
|
|
242
|
-
# ✗ Bad: Don't use regular find for cards
|
|
243
|
-
def set_card
|
|
244
|
-
@card = Card.find(params[:id]) # Wrong! Cards use number for params
|
|
245
|
-
end
|
|
246
|
-
|
|
247
|
-
# ✓ Good: Everything else uses UUID find
|
|
248
|
-
def set_board
|
|
249
|
-
@board = Current.user.boards.find(params[:board_id])
|
|
250
|
-
end
|
|
251
|
-
```
|
|
252
|
-
|
|
253
206
|
---
|
|
254
207
|
|
|
255
208
|
# Part 2: Model Layer Patterns
|
|
@@ -2642,10 +2595,10 @@ end
|
|
|
2642
2595
|
```ruby
|
|
2643
2596
|
class CreateCardArchives < ActiveRecord::Migration[7.1]
|
|
2644
2597
|
def change
|
|
2645
|
-
create_table :card_archives
|
|
2646
|
-
t.references :card, null: false, foreign_key: true
|
|
2647
|
-
t.references :user, null: false, foreign_key: true
|
|
2648
|
-
t.references :account, null: false, foreign_key: true
|
|
2598
|
+
create_table :card_archives do |t|
|
|
2599
|
+
t.references :card, null: false, foreign_key: true
|
|
2600
|
+
t.references :user, null: false, foreign_key: true
|
|
2601
|
+
t.references :account, null: false, foreign_key: true
|
|
2649
2602
|
t.timestamps
|
|
2650
2603
|
end
|
|
2651
2604
|
end
|
|
@@ -3094,7 +3047,7 @@ Wrap related operations in transactions.
|
|
|
3094
3047
|
|
|
3095
3048
|
This documentation covers the core backend patterns and practices used throughout the Rails application:
|
|
3096
3049
|
|
|
3097
|
-
- **Foundation**: Multi-tenancy via Current context
|
|
3050
|
+
- **Foundation**: Multi-tenancy via Current context
|
|
3098
3051
|
- **Models**: Concern-driven architecture, intention-revealing APIs, smart defaults
|
|
3099
3052
|
- **Controllers**: Thin controllers that delegate to rich models
|
|
3100
3053
|
- **Jobs**: Ultra-thin jobs following _now/_later pattern
|
data/data/templates.md
CHANGED
|
@@ -57,7 +57,7 @@ Launch **6 parallel agents** (one per file), each tasked with rewriting a single
|
|
|
57
57
|
- **Languages**: Ruby (version from `.ruby-version`), JavaScript/CSS for assets
|
|
58
58
|
- **Runtime**: Ruby + Bundler, `.ruby-version`
|
|
59
59
|
- **Frameworks**: Rails (version), Minitest (recommended)/RSpec, Hotwire/Turbo/Stimulus
|
|
60
|
-
- **Key Dependencies**: Key gems (solid_queue, solid_cache,
|
|
60
|
+
- **Key Dependencies**: Key gems (solid_queue, solid_cache, etc.)
|
|
61
61
|
- **Configuration**: `database.yml`, `credentials.yml.enc`, `config/environments/`
|
|
62
62
|
- **Build**: Asset pipeline (Propshaft/Sprockets), importmap/esbuild/vite
|
|
63
63
|
- **Platform**: Kamal, Docker, Heroku, etc.
|
|
@@ -79,7 +79,7 @@ Launch **6 parallel agents** (one per file), each tasked with rewriting a single
|
|
|
79
79
|
- **Organization**: `test/` mirroring `app/`, fixtures in `test/fixtures/`
|
|
80
80
|
- **Structure**: `ActiveSupport::TestCase`, `setup` blocks, `test "description"` blocks
|
|
81
81
|
- **Mocking**: `Minitest::Mock`, `stub`, `travel_to` for time
|
|
82
|
-
- **Fixtures**: YAML fixtures (Rails default),
|
|
82
|
+
- **Fixtures**: YAML fixtures (Rails default), fixture accessor methods
|
|
83
83
|
- **Test Types**: Model tests, controller tests, integration tests, system tests (Capybara)
|
|
84
84
|
- **Patterns**: `assert_difference`, `assert_changes`, `assert_no_difference`, Current context setup
|
|
85
85
|
- **Coverage**: SimpleCov
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
require "fileutils"
|
|
1
2
|
require "json"
|
|
2
3
|
require_relative "output"
|
|
3
4
|
|
|
@@ -11,7 +12,7 @@ module Ariadna
|
|
|
11
12
|
"branching_strategy" => "none",
|
|
12
13
|
"phase_branch_template" => "ariadna/phase-{phase}-{slug}",
|
|
13
14
|
"milestone_branch_template" => "ariadna/{milestone}-{slug}",
|
|
14
|
-
"research" =>
|
|
15
|
+
"research" => false,
|
|
15
16
|
"plan_checker" => true,
|
|
16
17
|
"verifier" => true,
|
|
17
18
|
"parallelization" => true,
|
|
@@ -88,7 +89,7 @@ module Ariadna
|
|
|
88
89
|
phase_branch_template: "ariadna/phase-{phase}-{slug}",
|
|
89
90
|
milestone_branch_template: "ariadna/{milestone}-{slug}",
|
|
90
91
|
workflow: {
|
|
91
|
-
research:
|
|
92
|
+
research: false,
|
|
92
93
|
plan_check: true,
|
|
93
94
|
verifier: true
|
|
94
95
|
},
|
|
@@ -210,6 +210,8 @@ module Ariadna
|
|
|
210
210
|
key = key_match[2]
|
|
211
211
|
value = key_match[3].strip
|
|
212
212
|
|
|
213
|
+
next unless current[:obj].is_a?(Hash)
|
|
214
|
+
|
|
213
215
|
if value.empty? || value == "["
|
|
214
216
|
current[:obj][key] = value == "[" ? [] : {}
|
|
215
217
|
stack.push({ obj: current[:obj][key], key: nil, indent: indent })
|
data/lib/ariadna/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ariadna
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jorge Alvarez
|
|
@@ -45,6 +45,7 @@ files:
|
|
|
45
45
|
- data/ariadna/references/phase-argument-parsing.md
|
|
46
46
|
- data/ariadna/references/planning-config.md
|
|
47
47
|
- data/ariadna/references/questioning.md
|
|
48
|
+
- data/ariadna/references/rails-conventions.md
|
|
48
49
|
- data/ariadna/references/tdd.md
|
|
49
50
|
- data/ariadna/references/ui-brand.md
|
|
50
51
|
- data/ariadna/references/verification-patterns.md
|