ariadna 1.2.3 → 1.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3937059c39a236024b08eb67fea88f5ec4ac193e13c9a99a5a34b365a7f9d53e
4
- data.tar.gz: 7b4b5a4dbc80527bfbe6202336dbe85bee931ac323a976a0207f0e3ccb3cd3e8
3
+ metadata.gz: a3292cf913eaab6a58897e041b3d334f63b8d7ed95591a291595cb43e1c108e4
4
+ data.tar.gz: 78026d0448227242095141f4dbf8f9583ceecd0c334912912b5d229638f34617
5
5
  SHA512:
6
- metadata.gz: bf468ce4109266ccc1e8c42191a45977e3f5ef15aaeaca7d98e60490fc46fb7022511563bfd5a24cebb5ec20ab480142cdff6b9f8b5776e6b1a99b8bbad805b2
7
- data.tar.gz: d1bc65ed4561f7f842d60276fa1362447fcbf1fe5e152a96c038d38c7e4fa8bf1324285a9032c2be9cb3519205e20136e0de757a7e869adbe691e2c01e29c3ab
6
+ metadata.gz: f6a9a7e4b55b6fe338a4c7135e8ddbc9b15c918a2152f20bfda7efeb4f195a2e8d09412f1a3c66acbd895609938be5b197a571bd14dff7de34b47f45ac96d553
7
+ data.tar.gz: 2c725bd9aa6a133b5421c2f5a84ebe3c8d3122ac02b41591f78489b626d5f1e1a9d6181b1765728bf01b9a1bd77719a59c038817e6b5f7e8fd6faee4b6d5fe8e
@@ -460,7 +460,7 @@ Research is complete when:
460
460
 
461
461
  Quality indicators:
462
462
 
463
- - **Specific, not vague:** "Devise 4.9 with OmniAuth 2.1" not "use Devise"
463
+ - **Specific, not vague:** "Rails 8 auth generator with has_secure_password" not "add authentication"
464
464
  - **Verified, not assumed:** Findings cite Context7 or official docs
465
465
  - **Honest about gaps:** LOW confidence items flagged, unknowns admitted
466
466
  - **Actionable:** Planner could create tasks based on this research
@@ -124,30 +124,32 @@ Plans execute autonomously. Checkpoints formalize interaction points where human
124
124
  ```
125
125
 
126
126
  **Example: Auth Provider Selection**
127
+ Note: Only present this checkpoint if the user explicitly asks to evaluate auth gems. For new projects, default to `has_secure_password` (Rails 8 auth generator) without asking.
127
128
  ```xml
128
129
  <task type="checkpoint:decision" gate="blocking">
129
130
  <decision>Select authentication approach</decision>
130
131
  <context>
131
- Need user authentication for the app. Three solid options with different tradeoffs.
132
+ Need user authentication for the app. Rails built-in auth is the recommended default.
133
+ Only consider external gems if the user explicitly requests them.
132
134
  </context>
133
135
  <options>
136
+ <option id="has_secure_password">
137
+ <name>has_secure_password (built-in) — Recommended</name>
138
+ <pros>No dependencies, full control, simple and lightweight, easy to understand, Rails 8 auth generator scaffolds everything</pros>
139
+ <cons>More manual setup for advanced features (OAuth, 2FA)</cons>
140
+ </option>
134
141
  <option id="devise">
135
- <name>Devise</name>
136
- <pros>Most popular Rails auth gem, full-featured (registration, password reset, OAuth), well-maintained</pros>
142
+ <name>Devise (only if explicitly requested)</name>
143
+ <pros>Full-featured (registration, password reset, OAuth), well-maintained</pros>
137
144
  <cons>Heavy dependency, opinionated, can be hard to customize deeply</cons>
138
145
  </option>
139
- <option id="has_secure_password">
140
- <name>has_secure_password (built-in)</name>
141
- <pros>No dependencies, full control, simple and lightweight, easy to understand</pros>
142
- <cons>More manual setup, you build everything yourself (password reset, OAuth)</cons>
143
- </option>
144
146
  <option id="rodauth">
145
- <name>Rodauth</name>
147
+ <name>Rodauth (only if explicitly requested)</name>
146
148
  <pros>Security-focused, modular features, database-backed configuration, excellent 2FA</pros>
147
- <cons>Smaller community than Devise, different conventions, steeper learning curve</cons>
149
+ <cons>Smaller community, different conventions, steeper learning curve</cons>
148
150
  </option>
149
151
  </options>
150
- <resume-signal>Select: devise, has_secure_password, or rodauth</resume-signal>
152
+ <resume-signal>Select: has_secure_password (default), devise, or rodauth</resume-signal>
151
153
  </task>
152
154
  ```
153
155
 
@@ -314,20 +316,20 @@ Decision: Which auth approach should we use?
314
316
  Context: Need user authentication. Three options with different tradeoffs.
315
317
 
316
318
  Options:
317
- 1. devise - Full-featured auth gem, batteries included
319
+ 1. has_secure_password - Built-in Rails (Recommended)
320
+ Pros: No dependencies, full control, simple, Rails 8 auth generator scaffolds everything
321
+ Cons: More manual setup for advanced features (OAuth, 2FA)
322
+
323
+ 2. devise - Full-featured auth gem (only if explicitly requested)
318
324
  Pros: Registration, password reset, OAuth support, well-maintained
319
325
  Cons: Heavy dependency, opinionated, hard to customize deeply
320
326
 
321
- 2. has_secure_password - Built-in Rails, lightweight
322
- Pros: No dependencies, full control, simple and easy to understand
323
- Cons: More manual setup, build password reset and OAuth yourself
324
-
325
- 3. rodauth - Security-focused, modular
327
+ 3. rodauth - Security-focused, modular (only if explicitly requested)
326
328
  Pros: Excellent 2FA, database-backed config, modular features
327
329
  Cons: Smaller community, different conventions, steeper learning curve
328
330
 
329
331
  ────────────────────────────────────────────────────────
330
- → YOUR ACTION: Select devise, has_secure_password, or rodauth
332
+ → YOUR ACTION: Select has_secure_password (default), devise, or rodauth
331
333
  ────────────────────────────────────────────────────────
332
334
  ```
333
335
 
@@ -581,7 +583,7 @@ timeout 30 bash -c 'until curl -s localhost:3000 > /dev/null 2>&1; do sleep 1; d
581
583
  <task type="auto">
582
584
  <name>Create user model and migration</name>
583
585
  <files>app/models/user.rb, db/migrate/xxx_create_users.rb</files>
584
- <action>Generate User model with Devise or has_secure_password, run migration</action>
586
+ <action>Generate User model with has_secure_password (Rails 8 auth generator), run migration</action>
585
587
  <verify>bin/rails db:migrate succeeds, User.count returns 0</verify>
586
588
  </task>
587
589
 
@@ -16,7 +16,7 @@ Pre-baked Rails knowledge for Ariadna planning and execution agents. This docume
16
16
  | Real-time UI | Turbo (Hotwire) | Turbo Drive, Frames, Streams |
17
17
  | JS Sprinkles | Stimulus (Hotwire) | Controllers for interactive behavior |
18
18
  | CSS | Tailwind CSS or Propshaft | Rails 8 defaults to Propshaft asset pipeline |
19
- | Auth | Rails built-in `has_secure_password` or Devise | Rails 8 includes auth generator |
19
+ | Auth | Rails 8 built-in authentication (`has_secure_password` + auth generator) | No external gems needed |
20
20
  | Email | Action Mailer | Built-in |
21
21
  | File Upload | Active Storage | Built-in |
22
22
  | API | Rails API mode or Jbuilder | Built-in |
@@ -24,6 +24,9 @@ Pre-baked Rails knowledge for Ariadna planning and execution agents. This docume
24
24
  | Linting | RuboCop + rubocop-rails | Standard community linting |
25
25
 
26
26
  **What NOT to use (and why):**
27
+ - Devise unless explicitly requested by the user — Rails 8 auth generator + `has_secure_password` covers signup, login, password reset, session management out of the box
28
+ - Pundit/CanCanCan unless explicitly requested — `before_action` checks + `Current` context handle authorization for most apps without adding a gem
29
+ - acts_as_tenant — use `Current.account` scoping with explicit scopes (see backend guide); no gem needed for path-based multi-tenancy
27
30
  - Factories (FactoryBot) when fixtures suffice — fixtures are faster, declarative, and Rails-native
28
31
  - RSpec unless the project already uses it — Minitest is simpler and Rails-native
29
32
  - Webpacker/Shakapacker — replaced by importmap-rails or jsbundling-rails
@@ -32,6 +35,28 @@ Pre-baked Rails knowledge for Ariadna planning and execution agents. This docume
32
35
 
33
36
  </standard_stack>
34
37
 
38
+ <rails_defaults_first>
39
+
40
+ ## Rails Defaults First (Opinionated)
41
+
42
+ For new projects, ALWAYS start with Rails built-in solutions. Only introduce external gems when the user explicitly requests them or requirements demonstrably exceed what Rails provides.
43
+
44
+ | Need | Rails Default | External Gem (only if explicitly requested) |
45
+ |------|--------------|---------------------------------------------|
46
+ | Authentication | `has_secure_password` + Rails 8 auth generator | Devise |
47
+ | Authorization | `before_action` + `Current` context | Pundit, CanCanCan |
48
+ | Multi-tenancy | `Current.account` + explicit scoping | acts_as_tenant |
49
+ | Background Jobs | Solid Queue | Sidekiq |
50
+ | Caching | Solid Cache | Redis |
51
+ | WebSockets | Solid Cable | Redis + AnyCable |
52
+ | Testing | Minitest + fixtures | RSpec + FactoryBot |
53
+
54
+ **Why:** External gems add dependencies, upgrade burden, and conceptual overhead. Rails 8 ships with excellent defaults that cover 90% of use cases. Starting with built-ins keeps the app simple and maintainable.
55
+
56
+ **The rule:** Never recommend Devise, Pundit, acts_as_tenant, or similar gems as the default choice for new projects. If the user hasn't asked for them, use Rails built-ins. If the user asks for "authentication", build it with `has_secure_password`. If they ask for "authorization", use `before_action` checks. If they ask for "multi-tenancy", use `Current.account` scoping.
57
+
58
+ </rails_defaults_first>
59
+
35
60
  <architecture_patterns>
36
61
 
37
62
  ## Rails Architecture Patterns
@@ -369,8 +394,8 @@ These domains are well-understood in Rails and don't need web research:
369
394
  | Models & Migrations | ActiveRecord, validations, associations, concerns | No |
370
395
  | Controllers & Routes | RESTful resources, before_action, strong params | No |
371
396
  | Views & Templates | ERB, partials, layouts, content_for | No |
372
- | Authentication | has_secure_password, Devise, Rails 8 auth generator | No |
373
- | Authorization | Pundit, CanCanCan, or hand-rolled | No |
397
+ | Authentication | Rails 8 auth generator, has_secure_password | No |
398
+ | Authorization | before_action + Current context, hand-rolled | No |
374
399
  | Background Jobs | Solid Queue, ActiveJob | No |
375
400
  | Email | Action Mailer, letter_opener | No |
376
401
  | File Uploads | Active Storage | No |
@@ -214,7 +214,7 @@ Template for `.ariadna_planning/codebase/ARCHITECTURE.md` - captures conceptual
214
214
  - [Approach: e.g., "Rails authentication generator with `Authentication` concern", "has_secure_password with custom auth", "OmniAuth for OAuth"]
215
215
 
216
216
  **Authorization:**
217
- - [Approach: e.g., "Pundit policies", "CanCanCan abilities", "Custom `before_action` checks"]
217
+ - [Approach: e.g., "Custom `before_action` checks with `Current` context", "Pundit policies (if explicitly chosen)", "CanCanCan abilities (if explicitly chosen)"]
218
218
 
219
219
  **Caching:**
220
220
  - [Approach: e.g., "Fragment caching in views", "Russian doll caching", "Rails.cache with Solid Cache/Redis"]
@@ -123,7 +123,7 @@ Template for `.ariadna_planning/codebase/STACK.md` - captures the technology fou
123
123
 
124
124
  **Critical:**
125
125
  - authentication (built-in) — Session-based auth
126
- - authorization - custom implementation (no gem) — Role-based access control, pundit
126
+ - authorization - custom implementation (before_action + Current) — Role-based access control
127
127
  - solid_queue — Background jobs (Rails 8 default)
128
128
 
129
129
  **Infrastructure:**
@@ -164,7 +164,7 @@ test/ # [test framework: Minitest (default) or spec/ if RSp
164
164
  ### Authentication and Authorization
165
165
 
166
166
  **Authentication:** [Rails authentication generator / has_secure_password / custom / other]
167
- **Authorization:** [Custom / Pundit / CanCanCan / Action Policy / other]
167
+ **Authorization:** [Custom (before_action + Current context) / Pundit (if explicitly requested) / other]
168
168
 
169
169
  ### Internationalization (I18n)
170
170
 
@@ -59,7 +59,7 @@ Template for `.ariadna_planning/research/STACK.md` — discovered technology sta
59
59
  | Category | Discovered Value | Evidence |
60
60
  |----------|-----------------|----------|
61
61
  | Authentication | [Rails authentication generator/Rodauth/Clearance/custom/none] | [Gemfile, user model] |
62
- | Authorization | [Custom/Pundit/CanCanCan/Action Policy/none] | [Gemfile, policy files] |
62
+ | Authorization | [Custom (before_action + Current) / Pundit (if explicitly requested) / none] | [Gemfile, policy files] |
63
63
  | OAuth/social login | [OmniAuth/Doorkeeper/none] | [Gemfile, initializers] |
64
64
  | API authentication | [API tokens/JWT/OAuth2/none] | [Gemfile, controller concerns] |
65
65
 
@@ -223,7 +223,7 @@ bin/rails server
223
223
 
224
224
  **Authentication & Authorization:**
225
225
  - Look for `Authentication` concern generated by `rails generate authentication`.
226
- - Look for `app/policies/` (Pundit) or `app/models/ability.rb` (CanCanCan) or custom authorization logic.
226
+ - Look for custom authorization in `before_action` filters and `Current` context (preferred), or `app/policies/` (Pundit) or `app/models/ability.rb` (CanCanCan) if gems were chosen.
227
227
  - Check `app/models/user.rb` for authentication modules.
228
228
 
229
229
  **Testing:**
@@ -53,7 +53,7 @@ Template for `.ariadna_planning/research/SUMMARY.md` — executive summary of pr
53
53
 
54
54
  **Authentication & authorization:**
55
55
  - [Auth solution]: [purpose] — [why recommended — e.g., Rails authentication generator for session-based auth]
56
- - [Authorization]: [purpose] — [why recommended — e.g., before_action, Pundit for policies, Action Policy for scalable rules]
56
+ - [Authorization]: [purpose] — [why recommended — e.g., before_action + Current context (default), Pundit only if explicitly requested]
57
57
 
58
58
  **Additional gems:**
59
59
  - [Gem]: [purpose] — [why recommended]
@@ -1,3 +1,3 @@
1
1
  module Ariadna
2
- VERSION = "1.2.3"
2
+ VERSION = "1.3.0"
3
3
  end
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.2.3
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jorge Alvarez