plutonium 0.45.2 → 0.46.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 (50) hide show
  1. checksums.yaml +4 -4
  2. data/.claude/skills/plutonium/SKILL.md +146 -0
  3. data/.claude/skills/plutonium-assets/SKILL.md +248 -157
  4. data/.claude/skills/{plutonium-rodauth → plutonium-auth}/SKILL.md +195 -229
  5. data/.claude/skills/plutonium-controller/SKILL.md +9 -2
  6. data/.claude/skills/plutonium-create-resource/SKILL.md +22 -1
  7. data/.claude/skills/plutonium-definition/SKILL.md +521 -7
  8. data/.claude/skills/plutonium-entity-scoping/SKILL.md +317 -0
  9. data/.claude/skills/plutonium-forms/SKILL.md +8 -1
  10. data/.claude/skills/plutonium-installation/SKILL.md +25 -2
  11. data/.claude/skills/plutonium-interaction/SKILL.md +9 -2
  12. data/.claude/skills/plutonium-invites/SKILL.md +11 -7
  13. data/.claude/skills/plutonium-model/SKILL.md +50 -50
  14. data/.claude/skills/plutonium-nested-resources/SKILL.md +8 -1
  15. data/.claude/skills/plutonium-package/SKILL.md +8 -1
  16. data/.claude/skills/plutonium-policy/SKILL.md +69 -78
  17. data/.claude/skills/plutonium-portal/SKILL.md +26 -70
  18. data/.claude/skills/plutonium-views/SKILL.md +9 -2
  19. data/CHANGELOG.md +33 -0
  20. data/app/assets/plutonium.css +1 -1
  21. data/app/views/rodauth/_login_form.html.erb +0 -3
  22. data/app/views/rodauth/confirm_password.html.erb +0 -4
  23. data/app/views/rodauth/create_account.html.erb +0 -3
  24. data/app/views/rodauth/logout.html.erb +0 -3
  25. data/config/initializers/pagy.rb +1 -1
  26. data/docs/superpowers/plans/2026-04-08-plutonium-skills-overhaul.md +481 -0
  27. data/docs/superpowers/specs/2026-04-08-plutonium-skills-overhaul-design.md +236 -0
  28. data/gemfiles/rails_7.gemfile.lock +1 -1
  29. data/gemfiles/rails_8.0.gemfile.lock +1 -1
  30. data/gemfiles/rails_8.1.gemfile.lock +1 -1
  31. data/lib/generators/pu/core/update/update_generator.rb +8 -0
  32. data/lib/generators/pu/gem/active_shrine/active_shrine_generator.rb +56 -0
  33. data/lib/generators/pu/invites/install_generator.rb +8 -1
  34. data/lib/generators/pu/lib/plutonium_generators/concerns/actions.rb +43 -0
  35. data/lib/generators/pu/profile/concerns/profile_arguments.rb +10 -4
  36. data/lib/generators/pu/profile/conn_generator.rb +9 -12
  37. data/lib/generators/pu/profile/install_generator.rb +5 -2
  38. data/lib/generators/pu/rodauth/templates/app/rodauth/account_rodauth_plugin.rb.tt +3 -0
  39. data/lib/generators/pu/saas/portal_generator.rb +4 -9
  40. data/lib/generators/pu/saas/welcome/templates/app/views/welcome/onboarding.html.erb.tt +2 -2
  41. data/lib/plutonium/engine.rb +18 -5
  42. data/lib/plutonium/ui/layout/rodauth_layout.rb +6 -1
  43. data/lib/plutonium/version.rb +1 -1
  44. data/package.json +1 -1
  45. metadata +7 -8
  46. data/.claude/skills/plutonium/skill.md +0 -130
  47. data/.claude/skills/plutonium-definition-actions/SKILL.md +0 -424
  48. data/.claude/skills/plutonium-definition-query/SKILL.md +0 -364
  49. data/.claude/skills/plutonium-profile/SKILL.md +0 -276
  50. data/.claude/skills/plutonium-theming/SKILL.md +0 -424
@@ -0,0 +1,481 @@
1
+ # Plutonium Skills Overhaul Implementation Plan
2
+
3
+ > **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers-extended-cc:subagent-driven-development (recommended) or superpowers-extended-cc:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
4
+
5
+ **Goal:** Restructure all Plutonium skills so they trigger at the right moments, surface critical anti-patterns first, consolidate cross-cutting concerns (especially entity scoping), and enable greenfield bootstrap loading.
6
+
7
+ **Architecture:** Apply a uniform skill template (description rewrite + 🚨 Critical block + checklist + cross-refs) across all 17 final skills. Merge 3 sets of overlapping skills, create one new `plutonium-entity-scoping` skill, and rewrite the `plutonium` index skill as a router + greenfield bootstrapper.
8
+
9
+ **Tech Stack:** Markdown skill files in `.claude/skills/<name>/SKILL.md`, plus `CLAUDE.md` updates for any references to renamed skills.
10
+
11
+ **User Verification:** NO — this is a documentation/skill refactor. The user requested the overhaul and approved the design; no human-in-the-loop validation is required by the spec. Final review happens via normal git diff.
12
+
13
+ **Spec:** `docs/superpowers/specs/2026-04-08-plutonium-skills-overhaul-design.md`
14
+
15
+ ---
16
+
17
+ ## File map
18
+
19
+ **Skills to delete (after merge):**
20
+ - `.claude/skills/plutonium-definition-actions/`
21
+ - `.claude/skills/plutonium-definition-query/`
22
+ - `.claude/skills/plutonium-profile/`
23
+ - `.claude/skills/plutonium-theming/`
24
+
25
+ **Skills to rename:**
26
+ - `.claude/skills/plutonium-rodauth/` → `.claude/skills/plutonium-auth/`
27
+
28
+ **Skills to create:**
29
+ - `.claude/skills/plutonium-entity-scoping/SKILL.md`
30
+
31
+ **Skills to modify (every remaining skill):**
32
+ - All 17 final skills get description rewrite + 🚨 Critical block + cross-refs.
33
+
34
+ **Other files to check:**
35
+ - `CLAUDE.md` (project root) for references to renamed/deleted skills.
36
+ - `.claude/skills/*/SKILL.md` for cross-references to renamed/deleted skills.
37
+
38
+ ---
39
+
40
+ ## Conventions used by every task
41
+
42
+ **Description format (Phase C):**
43
+ ```
44
+ description: Use BEFORE <verb/construct>. Also when <secondary trigger>. <one-line scope>.
45
+ ```
46
+
47
+ **🚨 Critical block format (Phase D), inserted directly after the H1:**
48
+ ```markdown
49
+ ## 🚨 Critical (read first)
50
+ - **Use the generator.** `pu:<gen>` — never hand-write <X>. <one-line why>.
51
+ - **<Top anti-pattern #1>** — one-line + why.
52
+ - **<Top anti-pattern #2>** — one-line + why.
53
+ - **Related skills:** `plutonium-X` (when Y), `plutonium-Z` (when W).
54
+ ```
55
+
56
+ Cap at ~5 bullets. Pull anti-patterns from existing Gotchas section.
57
+
58
+ **Commit cadence:** one commit per task. Commit message format:
59
+ `docs(skills): <task summary>`
60
+
61
+ ---
62
+
63
+ ## Task 0: Baseline audit
64
+
65
+ **Goal:** Capture the current state so later tasks can verify nothing was lost.
66
+
67
+ **Files:**
68
+ - Read: every `.claude/skills/plutonium-*/SKILL.md`
69
+ - Create: `/tmp/skills-baseline.txt` (line counts + headers index)
70
+
71
+ **Acceptance Criteria:**
72
+ - [ ] Line count for every current skill recorded
73
+ - [ ] List of all H2 headings per skill recorded
74
+ - [ ] List of all `## Gotchas` / anti-pattern bullets per skill recorded
75
+ - [ ] Identified which skills currently mention entity scoping / `associated_with` / `default_relation_scope` / `relation_scope`
76
+
77
+ **Verify:** `wc -l /tmp/skills-baseline.txt` → non-zero
78
+
79
+ **Steps:**
80
+
81
+ - [ ] **Step 1:** Run `wc -l .claude/skills/plutonium-*/SKILL.md` and save.
82
+ - [ ] **Step 2:** For each skill, extract `^## ` headings via Grep.
83
+ - [ ] **Step 3:** Grep `.claude/skills/` for `associated_with|default_relation_scope|relation_scope|entity scoping|entity_scope` to find every mention. This list seeds Task 5 (entity-scoping extraction).
84
+ - [ ] **Step 4:** Grep `.claude/skills/` and `CLAUDE.md` for `plutonium-rodauth|plutonium-profile|plutonium-theming|plutonium-definition-actions|plutonium-definition-query` to find every cross-reference that will need updating.
85
+ - [ ] **Step 5:** Save all findings to `/tmp/skills-baseline.txt`.
86
+ - [ ] **Step 6:** No commit (audit only).
87
+
88
+ ---
89
+
90
+ ## Task 1: Merge plutonium-definition trio
91
+
92
+ **Goal:** Fold `plutonium-definition-actions` and `plutonium-definition-query` into `plutonium-definition` as sections, then delete the source skills.
93
+
94
+ **Files:**
95
+ - Modify: `.claude/skills/plutonium-definition/SKILL.md`
96
+ - Delete: `.claude/skills/plutonium-definition-actions/` (whole directory)
97
+ - Delete: `.claude/skills/plutonium-definition-query/` (whole directory)
98
+
99
+ **Acceptance Criteria:**
100
+ - [ ] `plutonium-definition/SKILL.md` contains all original content from the three skills, organized into sections: §Fields/Inputs/Displays, §Query (search/filters/scopes), §Actions (custom + bulk).
101
+ - [ ] A TOC at the top with anchor links to each section.
102
+ - [ ] No content from the deleted skills is lost (verify by H2-heading diff against baseline).
103
+ - [ ] `plutonium-definition-actions/` and `plutonium-definition-query/` directories no longer exist.
104
+
105
+ **Verify:** `ls .claude/skills/ | grep definition` → only `plutonium-definition`
106
+
107
+ **Steps:**
108
+
109
+ - [ ] **Step 1:** Read all three current skill files in full.
110
+ - [ ] **Step 2:** Plan the new section order. Use this structure:
111
+ ```
112
+ ---
113
+ name: plutonium-definition
114
+ description: <will be rewritten in Phase C — leave existing for now>
115
+ ---
116
+
117
+ # Plutonium Definitions
118
+
119
+ ## Contents
120
+ - [Fields, Inputs, Displays](#fields-inputs-displays)
121
+ - [Query: Search, Filters, Scopes](#query)
122
+ - [Actions: Custom and Bulk](#actions)
123
+ - [Gotchas](#gotchas)
124
+
125
+ <existing plutonium-definition body, retitled as ## Fields, Inputs, Displays>
126
+
127
+ ## Query
128
+ <full body of plutonium-definition-query, with H2s demoted to H3>
129
+
130
+ ## Actions
131
+ <full body of plutonium-definition-actions, with H2s demoted to H3>
132
+
133
+ ## Gotchas
134
+ <merged gotchas from all three>
135
+ ```
136
+ - [ ] **Step 3:** Write the merged file via Write.
137
+ - [ ] **Step 4:** Delete the two source directories: `rm -rf .claude/skills/plutonium-definition-actions .claude/skills/plutonium-definition-query`
138
+ - [ ] **Step 5:** Verify with `ls .claude/skills/ | grep definition`.
139
+ - [ ] **Step 6:** Commit: `docs(skills): merge definition-actions and definition-query into plutonium-definition`
140
+
141
+ ---
142
+
143
+ ## Task 2: Merge plutonium-profile into plutonium-rodauth, rename to plutonium-auth
144
+
145
+ **Goal:** Combine rodauth and profile content into a single `plutonium-auth` skill.
146
+
147
+ **Files:**
148
+ - Modify: `.claude/skills/plutonium-rodauth/SKILL.md` (will be moved)
149
+ - Delete: `.claude/skills/plutonium-profile/` (whole directory)
150
+ - Rename: `.claude/skills/plutonium-rodauth/` → `.claude/skills/plutonium-auth/`
151
+
152
+ **Acceptance Criteria:**
153
+ - [ ] All content from `plutonium-rodauth` and `plutonium-profile` lives in `.claude/skills/plutonium-auth/SKILL.md`.
154
+ - [ ] Sectioned: §Rodauth setup · §Account types · §Profile page.
155
+ - [ ] `name:` frontmatter updated to `plutonium-auth`.
156
+ - [ ] TOC at top.
157
+ - [ ] Old directories no longer exist.
158
+
159
+ **Verify:** `ls .claude/skills/ | grep -E 'auth|rodauth|profile'` → only `plutonium-auth`
160
+
161
+ **Steps:**
162
+
163
+ - [ ] **Step 1:** Read both current skill files.
164
+ - [ ] **Step 2:** Construct merged file body with TOC + 3 sections + merged gotchas.
165
+ - [ ] **Step 3:** `mv .claude/skills/plutonium-rodauth .claude/skills/plutonium-auth`
166
+ - [ ] **Step 4:** Write merged content to `.claude/skills/plutonium-auth/SKILL.md`, updating `name: plutonium-auth` in frontmatter.
167
+ - [ ] **Step 5:** `rm -rf .claude/skills/plutonium-profile`
168
+ - [ ] **Step 6:** Verify with `ls .claude/skills/`.
169
+ - [ ] **Step 7:** Commit: `docs(skills): merge plutonium-profile into plutonium-rodauth, rename to plutonium-auth`
170
+
171
+ ---
172
+
173
+ ## Task 3: Merge plutonium-theming into plutonium-assets
174
+
175
+ **Goal:** Fold theming content into assets as a section.
176
+
177
+ **Files:**
178
+ - Modify: `.claude/skills/plutonium-assets/SKILL.md`
179
+ - Delete: `.claude/skills/plutonium-theming/`
180
+
181
+ **Acceptance Criteria:**
182
+ - [ ] `plutonium-assets/SKILL.md` contains all theming content as §Design tokens / theming.
183
+ - [ ] Sectioned: §Tailwind/CSS · §Stimulus registration · §Design tokens & theming.
184
+ - [ ] TOC at top.
185
+ - [ ] `plutonium-theming/` no longer exists.
186
+
187
+ **Verify:** `ls .claude/skills/ | grep -E 'assets|theming'` → only `plutonium-assets`
188
+
189
+ **Steps:**
190
+
191
+ - [ ] **Step 1:** Read both source files.
192
+ - [ ] **Step 2:** Build merged structure with TOC.
193
+ - [ ] **Step 3:** Write merged file.
194
+ - [ ] **Step 4:** `rm -rf .claude/skills/plutonium-theming`
195
+ - [ ] **Step 5:** Verify.
196
+ - [ ] **Step 6:** Commit: `docs(skills): merge plutonium-theming into plutonium-assets`
197
+
198
+ ---
199
+
200
+ ## Task 4: Update cross-references to merged/renamed skills
201
+
202
+ **Goal:** Find and update every reference to the deleted/renamed skills throughout the repo.
203
+
204
+ **Files:**
205
+ - Modify: any file matching the grep results from Task 0 step 4.
206
+ - Likely candidates: `CLAUDE.md`, other `.claude/skills/*/SKILL.md`, `docs/`.
207
+
208
+ **Acceptance Criteria:**
209
+ - [ ] No references remain to `plutonium-rodauth`, `plutonium-profile`, `plutonium-theming`, `plutonium-definition-actions`, `plutonium-definition-query`.
210
+ - [ ] References point to the new names (`plutonium-auth`, `plutonium-definition`, `plutonium-assets`).
211
+
212
+ **Verify:**
213
+ ```bash
214
+ grep -r 'plutonium-rodauth\|plutonium-profile\|plutonium-theming\|plutonium-definition-actions\|plutonium-definition-query' .claude/ CLAUDE.md docs/ 2>/dev/null
215
+ ```
216
+ Expected: no output.
217
+
218
+ **Steps:**
219
+
220
+ - [ ] **Step 1:** Run the verify grep above.
221
+ - [ ] **Step 2:** For each match, Edit the file to update the reference.
222
+ - [ ] **Step 3:** Re-run grep until empty.
223
+ - [ ] **Step 4:** Commit: `docs(skills): update cross-references after skill merges/renames`
224
+
225
+ ---
226
+
227
+ ## Task 5: Create plutonium-entity-scoping skill
228
+
229
+ **Goal:** Single source of truth for entity scoping. Extract scoping content from `plutonium-model`, `plutonium-policy`, `plutonium-portal`, `plutonium-invites` and consolidate here. Add worked examples for the three model shapes.
230
+
231
+ **Files:**
232
+ - Create: `.claude/skills/plutonium-entity-scoping/SKILL.md`
233
+ - Modify (in Task 8 cross-ref pass, not here): the four source skills get a teaser + link.
234
+
235
+ **Acceptance Criteria:**
236
+ - [ ] Skill exists with the standard template structure.
237
+ - [ ] Description: `Use BEFORE writing relation_scope, associated_with, scoping a model to a tenant, or any multi-tenancy work. Also when configuring entity strategies on a portal. The single source of truth for Plutonium entity scoping.`
238
+ - [ ] 🚨 Critical block lists: never bypass `default_relation_scope`, always declare `associated_with`, use a generator to scaffold scoped resources.
239
+ - [ ] Quick checklist for "scope a new model to a tenant".
240
+ - [ ] Sections: §How entity scoping works · §`associated_with` resolution · §`default_relation_scope` and safe `relation_scope` overrides · §Entity strategies (path, custom) · §Three model shapes (worked examples).
241
+ - [ ] Three model-shape worked examples: (a) direct child `Comment belongs_to :post belongs_to :tenant`, (b) join table `Membership` linking user/tenant, (c) grandchild `Comment` → `Post` → `Tenant`.
242
+ - [ ] Cross-refs to `plutonium-model`, `plutonium-policy`, `plutonium-portal`, `plutonium-invites`.
243
+
244
+ **Verify:** `cat .claude/skills/plutonium-entity-scoping/SKILL.md | wc -l` → > 100
245
+
246
+ **Steps:**
247
+
248
+ - [ ] **Step 1:** Re-read the entity-scoping bits from `plutonium-model`, `plutonium-policy`, `plutonium-portal`, `plutonium-invites` (use the seed list from Task 0 step 3).
249
+ - [ ] **Step 2:** Draft the file using the standard skill template.
250
+ - [ ] **Step 3:** Write the three model-shape examples. Direct child is the existing `Comment/Post` example; for join-table show a `Membership` model with `belongs_to :user, belongs_to :tenant` and `has_one :tenant, through: :membership` on `User`; for grandchild show `Comment.has_one :tenant, through: :post` and how `associated_with` resolves it.
251
+ - [ ] **Step 4:** Write the file.
252
+ - [ ] **Step 5:** Verify line count.
253
+ - [ ] **Step 6:** Commit: `docs(skills): add plutonium-entity-scoping skill`
254
+
255
+ ---
256
+
257
+ ## Task 6: Rewrite descriptions for all 17 skills
258
+
259
+ **Goal:** Every skill's `description:` frontmatter follows `Use BEFORE <verb/construct>. Also when <secondary>. <scope>.`
260
+
261
+ **Files:**
262
+ - Modify: frontmatter in all 17 `.claude/skills/plutonium-*/SKILL.md` files.
263
+
264
+ **Acceptance Criteria:**
265
+ - [ ] Every description starts with "Use BEFORE".
266
+ - [ ] Each description names at least one specific code construct, generator, or file the agent might be about to touch.
267
+ - [ ] No description is a topic-noun list.
268
+
269
+ **Verify:**
270
+ ```bash
271
+ grep -h '^description:' .claude/skills/plutonium-*/SKILL.md | grep -v 'Use BEFORE\|Use when starting\|Use when'
272
+ ```
273
+ Expected: empty (or only the index skill, which has its own format).
274
+
275
+ **Steps:**
276
+
277
+ - [ ] **Step 1:** For each skill, draft new description using this table as a starting point. **The drafts below are starting points — adjust if reading the skill reveals a more specific trigger.**
278
+
279
+ | Skill | Draft description |
280
+ |---|---|
281
+ | `plutonium` | `Use BEFORE starting any Plutonium work — new app, new feature, or first edit in an unfamiliar area. Routes you to the right skills and bootstraps greenfield work.` |
282
+ | `plutonium-installation` | `Use BEFORE installing Plutonium in a Rails app or running pu:install. Also when configuring initial Plutonium setup. Covers generators, gemfile, and initial config.` |
283
+ | `plutonium-create-resource` | `Use BEFORE running pu:res:scaffold or creating any new resource. Also when picking field types for a generator. Covers field syntax and scaffold options.` |
284
+ | `plutonium-model` | `Use BEFORE editing a Plutonium resource model, adding associations, has_cents, SGID, or routing helpers. For tenancy, see plutonium-entity-scoping.` |
285
+ | `plutonium-policy` | `Use BEFORE writing relation_scope, permitted_attributes, permitted_associations, or any policy override. For tenant-scoped relation_scope, also load plutonium-entity-scoping.` |
286
+ | `plutonium-entity-scoping` | (already set in Task 5) |
287
+ | `plutonium-controller` | `Use BEFORE overriding a controller action, adding a hook, or changing redirect logic in a Plutonium controller.` |
288
+ | `plutonium-interaction` | `Use BEFORE writing an interaction class, encapsulating business logic, or building multi-step operations beyond basic CRUD.` |
289
+ | `plutonium-definition` | `Use BEFORE editing a resource definition — adding fields, inputs, displays, search, filters, scopes, custom actions, or bulk actions.` |
290
+ | `plutonium-views` | `Use BEFORE building a custom page, panel, table, layout, or Phlex component in Plutonium.` |
291
+ | `plutonium-forms` | `Use BEFORE customizing a form template, field builder, or input component in Plutonium.` |
292
+ | `plutonium-assets` | `Use BEFORE configuring Tailwind, registering a Stimulus controller, or editing design tokens / theming in a Plutonium app.` |
293
+ | `plutonium-auth` | `Use BEFORE configuring Rodauth, account types, login flows, or building a profile / account settings page.` |
294
+ | `plutonium-invites` | `Use BEFORE setting up user invitations or entity membership in a multi-tenant Plutonium app. Also load plutonium-entity-scoping.` |
295
+ | `plutonium-portal` | `Use BEFORE creating a portal, mounting a portal engine, configuring entity strategies, or routing portal-specific resources.` |
296
+ | `plutonium-package` | `Use BEFORE creating a feature package or portal package, or organizing a Plutonium app into modular engines.` |
297
+ | `plutonium-nested-resources` | `Use BEFORE configuring parent/child resource relationships, nested routes, or scoped URL generation.` |
298
+
299
+ - [ ] **Step 2:** For each skill, Edit the `description:` line in the frontmatter.
300
+ - [ ] **Step 3:** Run the verify grep.
301
+ - [ ] **Step 4:** Commit: `docs(skills): rewrite descriptions to trigger on verbs and constructs`
302
+
303
+ ---
304
+
305
+ ## Task 7: Add 🚨 Critical block to all 17 skills
306
+
307
+ **Goal:** Every skill gets a fixed-position 🚨 Critical block right after the H1.
308
+
309
+ **Files:**
310
+ - Modify: all 17 `.claude/skills/plutonium-*/SKILL.md` files.
311
+
312
+ **Acceptance Criteria:**
313
+ - [ ] Every skill has `## 🚨 Critical (read first)` as the first H2 after the H1.
314
+ - [ ] Each block contains: generator-first bullet (where applicable), 1-2 top anti-patterns pulled from gotchas, and a "Related skills" bullet with 1-3 cross-refs.
315
+ - [ ] Cap: ~5 bullets per block.
316
+ - [ ] Existing Gotchas sections are kept (not deleted) — top items are duplicated to the 🚨 block.
317
+
318
+ **Verify:**
319
+ ```bash
320
+ for f in .claude/skills/plutonium-*/SKILL.md; do
321
+ head -30 "$f" | grep -q '🚨 Critical' || echo "MISSING: $f"
322
+ done
323
+ ```
324
+ Expected: no output.
325
+
326
+ **Steps:**
327
+
328
+ - [ ] **Step 1:** For each skill, read the file and identify (a) does it have a generator? (b) what are the top 1-2 anti-patterns from existing gotchas? (c) which other skills does it relate to?
329
+ - [ ] **Step 2:** Write a 🚨 block following the convention. Example for `plutonium-policy`:
330
+ ```markdown
331
+ ## 🚨 Critical (read first)
332
+ - **Use generators.** `pu:res:scaffold` and `pu:res:conn` create policies — never hand-write policy files.
333
+ - **Never bypass `default_relation_scope`.** Overriding `relation_scope` with a raw `where(...)` skips entity scoping and leaks tenant data. Always compose with `super` or use `associated_with`.
334
+ - **Derived actions inherit.** `update?` falls back to `create?` unless overridden — don't duplicate.
335
+ - **Related skills:** `plutonium-entity-scoping` (for tenant-scoped overrides), `plutonium-model` (for `associated_with`), `plutonium-definition` (for `permitted_attributes` location).
336
+ ```
337
+ - [ ] **Step 3:** Edit each skill to insert the block after the H1 (before the first existing H2).
338
+ - [ ] **Step 4:** Run the verify loop.
339
+ - [ ] **Step 5:** Commit: `docs(skills): add 🚨 Critical block to every skill`
340
+
341
+ ---
342
+
343
+ ## Task 8: Add cross-references back to source skills (entity-scoping teasers)
344
+
345
+ **Goal:** Every skill that previously held entity-scoping content now has a one-paragraph teaser + link to `plutonium-entity-scoping`. Prevents drift and content duplication.
346
+
347
+ **Files:**
348
+ - Modify: `.claude/skills/plutonium-model/SKILL.md`
349
+ - Modify: `.claude/skills/plutonium-policy/SKILL.md`
350
+ - Modify: `.claude/skills/plutonium-portal/SKILL.md`
351
+ - Modify: `.claude/skills/plutonium-invites/SKILL.md`
352
+
353
+ **Acceptance Criteria:**
354
+ - [ ] Each of the four skills has a "## Entity scoping" section (or similar) that contains: a one-paragraph summary of how that skill relates to entity scoping, and an explicit link to `plutonium-entity-scoping` as the authoritative source.
355
+ - [ ] The 🚨 block of each of these four skills mentions `plutonium-entity-scoping` in the Related bullet.
356
+ - [ ] Long-form scoping content in the source skills is replaced by the teaser + link, OR retained but explicitly marked "see plutonium-entity-scoping for the canonical version".
357
+
358
+ **Verify:**
359
+ ```bash
360
+ for f in plutonium-model plutonium-policy plutonium-portal plutonium-invites; do
361
+ grep -q 'plutonium-entity-scoping' .claude/skills/$f/SKILL.md || echo "MISSING: $f"
362
+ done
363
+ ```
364
+ Expected: no output.
365
+
366
+ **Steps:**
367
+
368
+ - [ ] **Step 1:** For each of the four files, find the existing entity-scoping section (using the seed list from Task 0).
369
+ - [ ] **Step 2:** Replace it with a teaser paragraph ending in: `> **For entity scoping details, see the [plutonium-entity-scoping](../plutonium-entity-scoping/SKILL.md) skill — it is the single source of truth.**`
370
+ - [ ] **Step 3:** Verify the 🚨 block (added in Task 7) already lists `plutonium-entity-scoping` as related; if not, add it.
371
+ - [ ] **Step 4:** Run the verify loop.
372
+ - [ ] **Step 5:** Commit: `docs(skills): defer entity-scoping content to plutonium-entity-scoping`
373
+
374
+ ---
375
+
376
+ ## Task 9: Add Quick checklist sections to bootstrap + high-traffic skills
377
+
378
+ **Goal:** The 7 highest-traffic skills get a "## Quick checklist" section so agents can convert them to tasks via TaskCreate.
379
+
380
+ **Files (7 skills):**
381
+ - Modify: `.claude/skills/plutonium-installation/SKILL.md`
382
+ - Modify: `.claude/skills/plutonium-create-resource/SKILL.md`
383
+ - Modify: `.claude/skills/plutonium-model/SKILL.md`
384
+ - Modify: `.claude/skills/plutonium-policy/SKILL.md`
385
+ - Modify: `.claude/skills/plutonium-portal/SKILL.md`
386
+ - Modify: `.claude/skills/plutonium-definition/SKILL.md`
387
+ - Modify: `.claude/skills/plutonium-entity-scoping/SKILL.md`
388
+
389
+ **Acceptance Criteria:**
390
+ - [ ] Each of the 7 skills has a `## Quick checklist` section with a numbered list (5-10 items) describing the most common workflow for that skill.
391
+ - [ ] Checklist items are imperative and concrete (e.g., "Run `pu:res:scaffold` with the appropriate field types"), not vague ("Set up the model").
392
+ - [ ] Section is placed after 🚨 Critical and before the long-form sections.
393
+
394
+ **Verify:**
395
+ ```bash
396
+ for f in plutonium-installation plutonium-create-resource plutonium-model plutonium-policy plutonium-portal plutonium-definition plutonium-entity-scoping; do
397
+ grep -q '## Quick checklist' .claude/skills/$f/SKILL.md || echo "MISSING: $f"
398
+ done
399
+ ```
400
+ Expected: no output.
401
+
402
+ **Steps:**
403
+
404
+ - [ ] **Step 1:** For each of the 7 skills, draft a 5-10 item checklist for "the most common workflow." For example, `plutonium-create-resource`'s checklist would be: 1) Pick a portal/dest, 2) Identify field types, 3) Run `pu:res:scaffold ResourceName field:type ...`, 4) Run migrations, 5) Connect to a portal via `pu:res:conn`, 6) Verify with `bin/rails routes | grep <resource>`, 7) Open the portal route in the browser.
405
+ - [ ] **Step 2:** Edit each file to insert the section.
406
+ - [ ] **Step 3:** Run the verify loop.
407
+ - [ ] **Step 4:** Commit: `docs(skills): add Quick checklist sections to bootstrap and high-traffic skills`
408
+
409
+ ---
410
+
411
+ ## Task 10: Rewrite the `plutonium` index skill as router + bootstrapper
412
+
413
+ **Goal:** The index skill becomes a router table, a greenfield bootstrap bundle, and a generator catalog.
414
+
415
+ **Files:**
416
+ - Modify: `.claude/skills/plutonium/SKILL.md` (full rewrite)
417
+
418
+ **Acceptance Criteria:**
419
+ - [ ] Description set per Task 6 table.
420
+ - [ ] 🚨 block at top with generator-first message and bootstrap pointer.
421
+ - [ ] Greenfield bootstrap bundle section listing the 7 foundational skills (installation, create-resource, model, policy, entity-scoping, portal, definition) with explicit triggers.
422
+ - [ ] Router table mapping "About to..." actions to the right skill(s).
423
+ - [ ] Generator catalog: table of `pu:*` generators with one-line purpose + which skill covers it.
424
+ - [ ] Multi-tenancy entries in the router table cross-reference `plutonium-entity-scoping`.
425
+
426
+ **Verify:**
427
+ ```bash
428
+ grep -c 'plutonium-' .claude/skills/plutonium/SKILL.md
429
+ ```
430
+ Expected: at least 17 (one mention per other skill).
431
+
432
+ **Steps:**
433
+
434
+ - [ ] **Step 1:** Read the spec's full `plutonium` index template (Section 4 in the design doc).
435
+ - [ ] **Step 2:** Run `bin/rails generate --help 2>&1 | grep '^ pu:'` from `test/dummy/` to enumerate generators. If that fails, list them by reading `lib/generators/pu/`.
436
+ - [ ] **Step 3:** Build the generator catalog table.
437
+ - [ ] **Step 4:** Write the full new file body following the template in the spec.
438
+ - [ ] **Step 5:** Verify with the grep.
439
+ - [ ] **Step 6:** Commit: `docs(skills): rewrite plutonium index as router and greenfield bootstrapper`
440
+
441
+ ---
442
+
443
+ ## Task 11: Final verification sweep
444
+
445
+ **Goal:** Catch any drift, missing pieces, or broken cross-references introduced during the overhaul.
446
+
447
+ **Files:**
448
+ - Read-only checks across `.claude/skills/`.
449
+
450
+ **Acceptance Criteria:**
451
+ - [ ] All 17 expected skills exist; no extras.
452
+ - [ ] All 17 skills have a 🚨 block.
453
+ - [ ] All 17 skills have a description starting with "Use BEFORE" (or the index's variant).
454
+ - [ ] No references to deleted/renamed skills anywhere in `.claude/`, `CLAUDE.md`, or `docs/`.
455
+ - [ ] `plutonium-entity-scoping` exists and has the three model-shape examples.
456
+ - [ ] `plutonium` index lists all 17 skills somewhere (router table + bootstrap bundle).
457
+
458
+ **Verify:**
459
+ ```bash
460
+ ls .claude/skills/ | grep -c '^plutonium' # → 17
461
+ grep -L '🚨 Critical' .claude/skills/plutonium-*/SKILL.md # → empty
462
+ grep -L '^description: Use BEFORE\|^description: Use when starting' .claude/skills/plutonium-*/SKILL.md # → empty
463
+ grep -r 'plutonium-rodauth\|plutonium-profile\|plutonium-theming\|plutonium-definition-actions\|plutonium-definition-query' .claude/ CLAUDE.md docs/ 2>/dev/null # → empty
464
+ ```
465
+
466
+ **Steps:**
467
+
468
+ - [ ] **Step 1:** Run all four verify commands.
469
+ - [ ] **Step 2:** Fix any failures inline.
470
+ - [ ] **Step 3:** Re-run until all pass.
471
+ - [ ] **Step 4:** Commit (only if fixes were made): `docs(skills): final verification fixes for skills overhaul`
472
+
473
+ ---
474
+
475
+ ## Self-review
476
+
477
+ - Spec coverage: ✓ all 7 phases (A-G) of the spec map to tasks 1-10; Task 0 is the audit; Task 11 is the final sweep.
478
+ - Placeholder scan: ✓ no TBDs; descriptions table provides starting points but instructs the implementer to adjust based on reading.
479
+ - Type consistency: N/A (no code).
480
+ - Verification requirement scan: NO — no user verification required.
481
+