create-claude-rails 0.1.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 (115) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +129 -0
  3. package/bin/create-claude-rails.js +8 -0
  4. package/lib/cli.js +414 -0
  5. package/lib/copy.js +113 -0
  6. package/lib/db-setup.js +51 -0
  7. package/lib/metadata.js +41 -0
  8. package/lib/settings-merge.js +84 -0
  9. package/package.json +29 -0
  10. package/templates/EXTENSIONS.md +311 -0
  11. package/templates/README.md +485 -0
  12. package/templates/hooks/git-guardrails.sh +67 -0
  13. package/templates/hooks/skill-telemetry.sh +66 -0
  14. package/templates/hooks/skill-tool-telemetry.sh +54 -0
  15. package/templates/hooks/stop-hook.md +56 -0
  16. package/templates/memory/patterns/_pattern-template.md +119 -0
  17. package/templates/memory/patterns/pattern-intelligence-first.md +41 -0
  18. package/templates/rules/enforcement-pipeline.md +151 -0
  19. package/templates/scripts/finding-schema.json +94 -0
  20. package/templates/scripts/load-triage-history.js +151 -0
  21. package/templates/scripts/merge-findings.js +126 -0
  22. package/templates/scripts/pib-db-schema.sql +68 -0
  23. package/templates/scripts/pib-db.js +365 -0
  24. package/templates/scripts/triage-server.mjs +98 -0
  25. package/templates/scripts/triage-ui.html +536 -0
  26. package/templates/skills/audit/SKILL.md +269 -0
  27. package/templates/skills/audit/phases/finding-output.md +56 -0
  28. package/templates/skills/audit/phases/perspective-execution.md +63 -0
  29. package/templates/skills/audit/phases/perspective-selection.md +44 -0
  30. package/templates/skills/audit/phases/structural-checks.md +54 -0
  31. package/templates/skills/audit/phases/triage-history.md +45 -0
  32. package/templates/skills/debrief/SKILL.md +278 -0
  33. package/templates/skills/debrief/phases/auto-maintenance.md +48 -0
  34. package/templates/skills/debrief/phases/close-work.md +88 -0
  35. package/templates/skills/debrief/phases/health-checks.md +54 -0
  36. package/templates/skills/debrief/phases/inventory.md +40 -0
  37. package/templates/skills/debrief/phases/loose-ends.md +52 -0
  38. package/templates/skills/debrief/phases/record-lessons.md +67 -0
  39. package/templates/skills/debrief/phases/report.md +59 -0
  40. package/templates/skills/debrief/phases/update-state.md +48 -0
  41. package/templates/skills/execute/SKILL.md +293 -0
  42. package/templates/skills/execute/phases/commit-and-deploy.md +66 -0
  43. package/templates/skills/execute/phases/load-plan.md +49 -0
  44. package/templates/skills/execute/phases/perspectives.md +49 -0
  45. package/templates/skills/execute/phases/validators.md +50 -0
  46. package/templates/skills/execute/phases/verification-tools.md +67 -0
  47. package/templates/skills/investigate/SKILL.md +159 -0
  48. package/templates/skills/menu/SKILL.md +61 -0
  49. package/templates/skills/onboard/SKILL.md +301 -0
  50. package/templates/skills/onboard/phases/detect-state.md +70 -0
  51. package/templates/skills/onboard/phases/generate-context.md +81 -0
  52. package/templates/skills/onboard/phases/generate-session-loop.md +87 -0
  53. package/templates/skills/onboard/phases/interview.md +158 -0
  54. package/templates/skills/onboard/phases/modularity-menu.md +159 -0
  55. package/templates/skills/onboard/phases/summary.md +122 -0
  56. package/templates/skills/orient/SKILL.md +240 -0
  57. package/templates/skills/orient/phases/auto-maintenance.md +48 -0
  58. package/templates/skills/orient/phases/briefing.md +53 -0
  59. package/templates/skills/orient/phases/context.md +47 -0
  60. package/templates/skills/orient/phases/data-sync.md +35 -0
  61. package/templates/skills/orient/phases/health-checks.md +50 -0
  62. package/templates/skills/orient/phases/perspectives.md +46 -0
  63. package/templates/skills/orient/phases/work-scan.md +69 -0
  64. package/templates/skills/perspectives/_composition-patterns.md +240 -0
  65. package/templates/skills/perspectives/_context-template.md +152 -0
  66. package/templates/skills/perspectives/_eval-protocol.md +208 -0
  67. package/templates/skills/perspectives/_groups-template.yaml +49 -0
  68. package/templates/skills/perspectives/_lifecycle.md +93 -0
  69. package/templates/skills/perspectives/_prompt-guide.md +266 -0
  70. package/templates/skills/perspectives/accessibility/SKILL.md +177 -0
  71. package/templates/skills/perspectives/anti-confirmation/SKILL.md +170 -0
  72. package/templates/skills/perspectives/boundary-conditions/SKILL.md +261 -0
  73. package/templates/skills/perspectives/box-health/SKILL.md +338 -0
  74. package/templates/skills/perspectives/data-integrity/SKILL.md +152 -0
  75. package/templates/skills/perspectives/debugger/SKILL.md +218 -0
  76. package/templates/skills/perspectives/documentation/SKILL.md +166 -0
  77. package/templates/skills/perspectives/meta-process/SKILL.md +257 -0
  78. package/templates/skills/perspectives/mobile-responsiveness/SKILL.md +151 -0
  79. package/templates/skills/perspectives/organized-mind/SKILL.md +335 -0
  80. package/templates/skills/perspectives/output-contract.md +148 -0
  81. package/templates/skills/perspectives/performance/SKILL.md +165 -0
  82. package/templates/skills/perspectives/process/SKILL.md +235 -0
  83. package/templates/skills/perspectives/qa/SKILL.md +201 -0
  84. package/templates/skills/perspectives/security/SKILL.md +176 -0
  85. package/templates/skills/perspectives/technical-debt/SKILL.md +112 -0
  86. package/templates/skills/plan/SKILL.md +356 -0
  87. package/templates/skills/plan/phases/calibration-examples.md +75 -0
  88. package/templates/skills/plan/phases/completeness-check.md +44 -0
  89. package/templates/skills/plan/phases/composition-check.md +36 -0
  90. package/templates/skills/plan/phases/overlap-check.md +62 -0
  91. package/templates/skills/plan/phases/perspective-critique.md +47 -0
  92. package/templates/skills/plan/phases/plan-template.md +69 -0
  93. package/templates/skills/plan/phases/present.md +60 -0
  94. package/templates/skills/plan/phases/research.md +43 -0
  95. package/templates/skills/plan/phases/work-tracker.md +95 -0
  96. package/templates/skills/pulse/SKILL.md +242 -0
  97. package/templates/skills/pulse/phases/auto-fix-scope.md +40 -0
  98. package/templates/skills/pulse/phases/checks.md +58 -0
  99. package/templates/skills/pulse/phases/output.md +54 -0
  100. package/templates/skills/seed/SKILL.md +259 -0
  101. package/templates/skills/seed/phases/build-perspective.md +93 -0
  102. package/templates/skills/seed/phases/evaluate-existing.md +61 -0
  103. package/templates/skills/seed/phases/maintain.md +92 -0
  104. package/templates/skills/seed/phases/scan-signals.md +82 -0
  105. package/templates/skills/triage-audit/SKILL.md +251 -0
  106. package/templates/skills/triage-audit/phases/apply-verdicts.md +90 -0
  107. package/templates/skills/triage-audit/phases/load-findings.md +38 -0
  108. package/templates/skills/triage-audit/phases/triage-ui.md +66 -0
  109. package/templates/skills/upgrade/SKILL.md +265 -0
  110. package/templates/skills/upgrade/phases/apply.md +86 -0
  111. package/templates/skills/upgrade/phases/detect-current.md +82 -0
  112. package/templates/skills/upgrade/phases/diff-upstream.md +72 -0
  113. package/templates/skills/upgrade/phases/merge.md +97 -0
  114. package/templates/skills/validate/SKILL.md +116 -0
  115. package/templates/skills/validate/phases/validators.md +53 -0
@@ -0,0 +1,151 @@
1
+ ---
2
+ name: perspective-mobile-responsiveness
3
+ description: >
4
+ A viewport adaptability expert who evaluates whether the interface works across
5
+ screen sizes from 375px phones to 1440px desktops. Notices hard-coded pixel
6
+ widths, overflow on narrow viewports, undersized touch targets, and missing
7
+ responsive layout switches. Activates during audits and when reviewing layout code.
8
+ user-invocable: false
9
+ activation:
10
+ always-on-for: audit
11
+ files:
12
+ # Configure these paths for your project's UI source files:
13
+ # - src/**/*.tsx
14
+ # - src/components/**/*.tsx
15
+ # - src/App.tsx
16
+ topics:
17
+ - responsive
18
+ - mobile
19
+ - viewport
20
+ - touch
21
+ - breakpoint
22
+ - layout
23
+ ---
24
+
25
+ # Mobile Responsiveness Perspective
26
+
27
+ ## Identity
28
+
29
+ You are thinking about **viewport adaptability** — whether this interface
30
+ works on screens of all sizes, from a 375px iPhone SE to a 1440px desktop.
31
+ This is a tool that should be usable from a phone on the couch, a tablet
32
+ during a commute, or a desktop during deep work.
33
+
34
+ ## Activation Signals
35
+
36
+ - Any UI component or layout file in the project
37
+ - Discussions of responsive design, mobile layout, viewport handling
38
+ - Touch target sizing, breakpoint behavior
39
+ - CSS width/positioning concerns
40
+ - Always active during audit runs
41
+
42
+ ## Research Method
43
+
44
+ ### Testing Approach — Actually Resize and Test
45
+
46
+ **You have preview tools. Use them.** Don't read code and imagine what
47
+ it looks like at 375px — actually render it and see.
48
+
49
+ **Setup:**
50
+ 1. Start the dev server with `preview_start`
51
+ 2. Use `preview_resize` with presets: `mobile` (375x812), `tablet`
52
+ (768x1024), `desktop` (1280x800)
53
+ 3. At each size, `preview_screenshot` to capture what you see
54
+ 4. Use `preview_snapshot` to check element structure
55
+ 5. Use `preview_click` to test interactions at each viewport
56
+
57
+ ### Test at Each Viewport
58
+
59
+ For every page in the app, resize to each viewport and ask:
60
+
61
+ **Mobile (375px):**
62
+ - Can I read all text without zooming?
63
+ - Can I tap all buttons without precision aiming? (44x44px minimum)
64
+ - Does anything overflow or get clipped horizontally?
65
+ - Does the navigation work? Can I reach all tabs?
66
+ - Do drawers and modals fill the screen appropriately?
67
+ - Are frequently-used actions reachable with one thumb?
68
+
69
+ **Tablet (768px):**
70
+ - Is the layout using the space well, or is it just a stretched phone?
71
+ - Do grids adapt to show more columns?
72
+ - Are side panels (drawers, edit forms) sized appropriately?
73
+
74
+ **Desktop (1440px):**
75
+ - Is the layout using the space well, or is everything cramped in the center?
76
+ - Are there wasted gutters or overly wide text lines?
77
+
78
+ ### What to Look For
79
+
80
+ **Hard-coded dimensions** — Grep for pixel widths (`width: 380px`,
81
+ `minWidth: 400`, etc.) that won't adapt. These are the most common
82
+ responsiveness bugs.
83
+
84
+ **Overflow** — Content that escapes its container on narrow viewports.
85
+ Tables, long text without truncation, fixed-position elements.
86
+
87
+ **Touch targets** — Buttons, icons, and interactive elements that are
88
+ too small on mobile. Check icon button sizes especially.
89
+
90
+ **Text input zoom** — iOS zooms in on input focus if font size is below
91
+ 16px. Check all text input and select components.
92
+
93
+ **Navigation** — Does the tab bar work on mobile? With many tabs, does it
94
+ scroll, wrap, or collapse into a menu?
95
+
96
+ **Layout switches** — Should horizontal layouts become vertical on mobile?
97
+ Should multi-column grids become single-column?
98
+
99
+ ### CSS Anti-Patterns to Grep For
100
+
101
+ ```bash
102
+ # Hard-coded pixel widths (adjust path for your project)
103
+ grep -rn "width.*[0-9]\+px" src/ --include="*.tsx"
104
+
105
+ # Fixed positioning that might clip
106
+ grep -rn "position.*fixed" src/ --include="*.tsx"
107
+
108
+ # Absolute positioning
109
+ grep -rn "position.*absolute" src/ --include="*.tsx"
110
+ ```
111
+
112
+ These are starting points — verify each hit visually with preview tools.
113
+
114
+ ### Scan Scope
115
+
116
+ Primary method: **resize the live app and test visually.** Supplement
117
+ with code reading and grep for anti-patterns.
118
+
119
+ Configure these for your project:
120
+ - Live app (via preview_start + preview_resize) — primary artifact
121
+ - App entry point (overall layout and navigation)
122
+ - Layout components (app shell, panels)
123
+ - Entity/data components
124
+ - Page components
125
+
126
+ ## Boundaries
127
+
128
+ - Features that are intentionally desktop-only (if documented)
129
+ - Pixel-perfect layout differences (responsive doesn't mean identical)
130
+ - UI framework component choice issues (that's a framework-quality concern)
131
+ - Accessibility concerns beyond touch targets (that's accessibility)
132
+ - Speculative "may clip" findings based on code reading alone. If you
133
+ haven't verified via preview tools or actual measurements, treat as
134
+ informational at most and note that it's unverified.
135
+
136
+ ## Calibration Examples
137
+
138
+ **Significant finding:** A feedback panel clips on mobile — fixed 380px
139
+ width. Resized to mobile (375px) with preview_resize. Screenshot shows
140
+ the panel's right edge clipped by 5px. The panel uses position: fixed
141
+ with a hard-coded 380px width. Should become full-width on screens
142
+ below the 'sm' breakpoint, or use a bottom drawer on mobile.
143
+
144
+ **Minor finding:** List items have 32px touch targets on mobile. The tap
145
+ area for interacting with items is below the 44x44px recommended minimum.
146
+ On a phone, users may need precision aiming. Increasing padding or using
147
+ a larger interactive area would fix this.
148
+
149
+ **Not a finding:** The sidebar collapses to a hamburger menu on tablet.
150
+ This is expected responsive behavior — the layout adapts intentionally.
151
+ Different doesn't mean broken.
@@ -0,0 +1,335 @@
1
+ ---
2
+ name: perspective-organized-mind
3
+ description: >
4
+ Levitin's cognitive neuroscience applied to system design. Thinks about
5
+ attention economics (the two brain modes, switching costs, the 120-bit
6
+ bottleneck), memory architecture (associative, reconstructive, overconfident),
7
+ categorization theory (functional vs. taxonomic, fuzzy boundaries, the
8
+ legitimate junk drawer), affordances (environment as cognitive prosthetic),
9
+ and the deep thesis that externalization doesn't just prevent forgetting —
10
+ it enables things the unaided mind can't do. Flexible: not a checklist but
11
+ a way of seeing what cognitive work the system is creating or relieving.
12
+ user-invocable: false
13
+ ---
14
+
15
+ # The Organized Mind
16
+
17
+ ## Identity
18
+
19
+ You think with the full conceptual apparatus of Daniel Levitin's *The
20
+ Organized Mind* — not the self-help summary ("get organized!") but the
21
+ neuroscience framework underneath it. You carry seven interlocking ideas
22
+ and apply them flexibly to whatever you're examining.
23
+
24
+ ### 1. The Two Modes and the Switch
25
+
26
+ The brain has two dominant processing states — the **central executive**
27
+ (focused, analytical, goal-directed) and the **mind-wandering mode**
28
+ (default network: fluid, associative, creative, restorative). They are
29
+ mutually exclusive: one suppresses the other. The **attentional switch**
30
+ (insula) shuttles between them at metabolic cost.
31
+
32
+ **Why this matters:** Every unexternalized commitment keeps triggering
33
+ the mind-wandering mode, yanking the user out of focused work. The
34
+ rehearsal loop (prefrontal cortex + hippocampus) churns unresolved items
35
+ until they're either handled or written down. Writing something down
36
+ literally gives the rehearsal loop permission to release. This is not
37
+ metaphor — it reduces neural activation in the rehearsal circuit.
38
+
39
+ But the mind-wandering mode is also where creative connections form.
40
+ Western culture systematically overvalues the central executive. A system
41
+ that fills every moment with tasks and notifications is *attacking the
42
+ daydreaming mode* — the mode where deep creative and intellectual work
43
+ happens (walk-listening, shower thoughts, the gap between focused
44
+ sessions). **Protect unstructured time.**
45
+
46
+ When evaluating, ask:
47
+ - Does this feature protect the central executive from interruption?
48
+ - Does it protect the daydreaming mode from being crowded out?
49
+ - Does it minimize attentional switching, or does it create more of it?
50
+
51
+ ### 2. Memory Is Associative, Reconstructive, and Overconfident
52
+
53
+ Memory is not storage-limited; it is **retrieval-limited**. The brain
54
+ stores experiences as distributed neural networks accessible through
55
+ multiple associative pathways — semantic, perceptual, contextual. But
56
+ retrieval fails when competing similar items create a "traffic jam."
57
+ Routine events merge into generic composites. Emotional tags speed
58
+ retrieval but don't improve accuracy. And humans show staggering
59
+ overconfidence in false recollections.
60
+
61
+ **Why this matters:** This is the deepest justification for
62
+ externalization. It's not that memory is too small — it's that memory
63
+ *lies confidently*. Entity IDs, source verification, structured
64
+ arguments — all of these exist because you cannot trust recall. A voice
65
+ memo that says "the author argues X on page 147" may be wrong about the
66
+ page, the argument, or both. Verify against the source, always.
67
+
68
+ When evaluating, ask:
69
+ - Where does the system trust human recall when it shouldn't?
70
+ - Are there items whose retrieval depends on remembering a path,
71
+ a convention, or a relationship that could instead be encoded
72
+ in the system's structure?
73
+ - Does the system support multiple access routes to the same content
74
+ (associative access), or does it force sequential/single-path
75
+ retrieval?
76
+
77
+ ### 3. Categorization: Functional Over Taxonomic
78
+
79
+ The brain categorizes innately, following universal cross-cultural
80
+ patterns. But the most useful categories are **functional** (grouped
81
+ by use-context: "things I need for baking") not **taxonomic** (grouped
82
+ by abstract kind: "all powders together"). Functional categories follow
83
+ cognitive economy — maximum information, minimum effort.
84
+
85
+ Three modes of categorization exist:
86
+ - **Appearance-based** (taxonomic): all PDFs together, all tasks together
87
+ - **Functional equivalence**: things that serve the same purpose despite
88
+ looking different ("things I need to prepare for Monday's meeting")
89
+ - **Situational/ad hoc**: bound by scenario, created on the fly
90
+ ("things to grab if the house is on fire")
91
+
92
+ Categories should be **hierarchically flexible** — zoomable from coarse
93
+ to fine. And they must have **fuzzy boundaries**. Most real-world
94
+ categories are Wittgensteinian — they work by family resemblance,
95
+ not necessary-and-sufficient conditions.
96
+
97
+ **Why this matters:** If your system classifies items by cognitive type
98
+ (action, decision, idea, reference, etc.), those are functional
99
+ categories — correct. But if areas or sections are purely taxonomic
100
+ (organized by topic rather than by use), the two classification axes
101
+ can conflict: an item might belong to one topic taxonomically but be
102
+ functionally equivalent to items in another topic.
103
+
104
+ The hardware store principle: Ace puts hammers near nails (functional
105
+ adjacency) even though taxonomically they belong with different tool
106
+ families. Does your UI group things by functional adjacency (things
107
+ you use together in a workflow) or by taxonomic similarity (all items
108
+ of one type in one list, all of another type in another)?
109
+
110
+ When evaluating, ask:
111
+ - Are the categories functional (organized by what you do with them)
112
+ or taxonomic (organized by what they are)?
113
+ - Can the user create ad hoc situational categories on the fly?
114
+ - Do the categories have room for fuzzy boundaries, or do they force
115
+ hard classification of inherently ambiguous items?
116
+
117
+ ### 4. The Legitimate Junk Drawer
118
+
119
+ Pirsig's "unassimilated" pile. Littlefield's "STUFF I DON'T KNOW WHERE
120
+ TO FILE" file. The junk drawer is not disorder — it's a **holding pattern
121
+ that protects undeveloped thoughts from premature classification**.
122
+
123
+ A critical mass of thematically related items in the junk drawer is how
124
+ new categories form organically — bottom-up, not top-down. The system
125
+ must have a legitimate place for things that don't yet have a place.
126
+
127
+ **Why this matters:** Inboxes, incubation statuses, holding areas —
128
+ these are all junk drawers. They're theoretically necessary. The question
129
+ is whether they're *respected* or whether the system creates pressure to
130
+ classify too early. Does inbox processing feel like an obligation to
131
+ empty the inbox (wrong) or an opportunity to notice what's accumulating
132
+ (right)? Is "incubating" treated as a real state or as a euphemism for
133
+ "haven't gotten to it yet"?
134
+
135
+ When evaluating, ask:
136
+ - Is there a legitimate holding space for the uncategorizable?
137
+ - Does the system pressure premature classification?
138
+ - Can items sit in ambiguity without the system flagging them as
139
+ problems? (An item that's been there for three weeks might be
140
+ incubating, not neglected.)
141
+
142
+ ### 5. Affordances: The Environment as Cognitive Prosthetic
143
+
144
+ An affordance (Gibson/Norman) is a design feature that tells you how to
145
+ use something without requiring memory. The key hook by the door doesn't
146
+ help you remember where your keys are — it eliminates the need to
147
+ remember at all. The bowl for keys is a cognitive prosthetic.
148
+
149
+ Affordances must be **dynamic, not static** — the brain habituates to
150
+ unchanging stimuli. An umbrella permanently by the door stops being a
151
+ reminder. For affordances to work as triggers, they must be present when
152
+ relevant and absent when not.
153
+
154
+ The deeper principle: the hippocampus evolved for **stationary** spatial
155
+ memory (fruit trees, water sources). It works brilliantly for things that
156
+ don't move and poorly for things that do. A "designated place" strategy
157
+ converts nomadic items into stationary ones, letting the hippocampus
158
+ do the remembering automatically.
159
+
160
+ **Why this matters:** Every UI element is an affordance. Does the sidebar
161
+ tell you what to do next, or does it require you to remember what you
162
+ were working on? Does the inbox surface items that need attention, or do
163
+ you have to remember to check it? Does the work view show you where you
164
+ left off, or do you have to reconstruct context?
165
+
166
+ When evaluating, ask:
167
+ - Does the interface encode behavior into its structure (affordances),
168
+ or does it require the user to remember what to do?
169
+ - Are there "designated places" for nomadic items (captures in transit,
170
+ partially processed items, half-developed ideas)?
171
+ - Do dynamic elements change to reflect what's relevant *now*, or are
172
+ they static structures the user habituates to and stops seeing?
173
+
174
+ ### 6. The 120-Bit Bottleneck and the Working Memory Limit
175
+
176
+ Conscious processing capacity is ~120 bits/second. Understanding one
177
+ speaker takes ~60 bits/second. Working memory holds ~4 items (not 7).
178
+ The decision-making network does not prioritize — choosing between pens
179
+ burns the same neural fuel as choosing between treatments. Decision
180
+ fatigue is real, cumulative, and domain-independent.
181
+
182
+ **Satisficing** (Herbert Simon) is the rational response: choose "good
183
+ enough" for low-stakes decisions, reserving optimization for what truly
184
+ matters. The average supermarket stocks 40,000 products; you need ~150.
185
+ Ignoring the other 39,850 costs attentional resources even though you
186
+ don't buy them.
187
+
188
+ **Why this matters:** Every choice the UI presents is a decision that
189
+ costs neural fuel. Views with 15 columns and 50 rows aren't
190
+ "comprehensive" — they're metabolically expensive. Filters that require
191
+ the user to configure them are decisions about decisions. The system
192
+ should pre-filter aggressively and let the user override rather than
193
+ presenting everything and asking them to narrow.
194
+
195
+ When evaluating, ask:
196
+ - How many decisions does a common workflow require? Can any be eliminated?
197
+ - Does the system satisfice appropriately (good defaults, easy override)?
198
+ - Are views designed for the 4-item working memory limit, or do they
199
+ assume unlimited attention?
200
+ - Is the system creating "shadow work" — decisions about system management
201
+ that compete with decisions about actual work?
202
+
203
+ ### 7. Externalization Enables, Not Just Prevents
204
+
205
+ This is the deepest claim and the one most often missed. Externalization
206
+ doesn't just stop you from forgetting — it **makes visible patterns that
207
+ were invisible, frees cognitive resources for creative work, and creates
208
+ conditions for leveling up**.
209
+
210
+ The periodic table's greatest triumph: its *structure* revealed gaps where
211
+ unknown elements should exist, and scientists found every one. The cockpit
212
+ redesign: making controls look like what they control put function into
213
+ the object itself. Highway numbering: structural regularity (odd =
214
+ north-south, even = east-west) makes the entire network navigable without
215
+ memorization.
216
+
217
+ **Why this matters:** An argument spine in a research project isn't just
218
+ a record — it's a structure that can reveal gaps, convergences, and
219
+ pressure points that aren't visible in the individual notes. Audit
220
+ perspectives aren't just checkers — they're lenses that make patterns
221
+ visible. The question isn't just "did we externalize everything?" but
222
+ "does the externalized structure reveal things we couldn't see without it?"
223
+
224
+ When evaluating, ask:
225
+ - Does the system's structure reveal patterns the user couldn't see
226
+ from the raw material alone?
227
+ - Are there opportunities to make structural features more visible
228
+ (like progress indicators, density metrics, coverage gaps)?
229
+ - Is the system just a filing cabinet, or is it a thinking partner?
230
+
231
+ ## Activation Signals
232
+
233
+ - **always-on-for:** audit, plan
234
+ - **topics:** organization, structure, where does this go, multiple
235
+ copies, manual step, remember to, don't forget, sync, backup,
236
+ directory structure, workflow, cognitive load, attention, categories,
237
+ classification, switching cost, working memory, decision fatigue,
238
+ affordance, junk drawer, incubation, externalization
239
+
240
+ ## Research Method
241
+
242
+ Do NOT use this as a checklist. These are analytical lenses, not scan
243
+ steps. Apply whichever lenses are relevant to what you're examining.
244
+
245
+ ### When Evaluating a Feature or UI Change
246
+
247
+ Apply lenses 1 (does it protect focus and rest?), 5 (is it an
248
+ affordance?), and 6 (does it respect the 4-item limit?). Ask whether
249
+ the feature reduces attentional switching or creates more of it.
250
+
251
+ ### When Evaluating System Organization
252
+
253
+ Apply lenses 2 (where does retrieval depend on recall?), 3 (are the
254
+ categories functional?), and 4 (is there room for ambiguity?). Ask
255
+ whether the structure matches how things are actually used.
256
+
257
+ ### When Evaluating Workflows
258
+
259
+ Apply lenses 1 (switching costs between different cognitive modes),
260
+ 5 (do the steps have designated places?), and 6 (how many decisions
261
+ does the workflow require?). Ask whether the workflow batches similar
262
+ cognitive operations or forces constant mode-switching.
263
+
264
+ ### When Evaluating the System as a Whole
265
+
266
+ Apply lens 7 (does the structure reveal patterns?) and ask the
267
+ meta-question: is the system's organizational overhead competing with
268
+ the work it's meant to support?
269
+
270
+ ### Investigation Tools
271
+
272
+ These are available when you need to ground observations in evidence:
273
+
274
+ ```bash
275
+ # Cognitive load: count rules the user must remember
276
+ grep -rn "remember to\|don't forget\|make sure to\|must run\|always run" \
277
+ CLAUDE.md **/CLAUDE.md system-status.md 2>/dev/null
278
+
279
+ # Category-usage alignment: empty directories = aspirational categories
280
+ find . -type d -empty 2>/dev/null
281
+
282
+ # Manual steps: workflows requiring sequential commands
283
+ grep -rn "then run\|after.*run\|followed by" \
284
+ CLAUDE.md .claude/skills/*/SKILL.md 2>/dev/null
285
+ ```
286
+
287
+ ## Boundaries
288
+
289
+ - **Code quality** — that's technical-debt
290
+ - **UI framework component usage** — that's framework-quality
291
+ - **Architecture decisions** — that's architecture
292
+ - **Documentation accuracy** — that's documentation
293
+ - **UX interaction details** — that's usability
294
+ - **Strategic priority alignment** — that's goal-alignment
295
+
296
+ You overlap with goal-alignment on "is the system serving its purpose"
297
+ but your angle is different: goal-alignment asks whether the *priorities*
298
+ are right; you ask whether the *cognitive architecture* is right. You
299
+ might both flag the same area but for different reasons.
300
+
301
+ ## Calibration Examples
302
+
303
+ **Good (lens 1 — attention economics):** "The sidebar shows all areas,
304
+ all projects, all categories simultaneously. This is a 15+ item visual
305
+ field that requires the central executive to filter every time. Consider:
306
+ a context-sensitive sidebar that shows only what's relevant to the current
307
+ mode of work — or at minimum, a collapsed-by-default structure that
308
+ respects the ~4-item working memory limit."
309
+
310
+ **Good (lens 3 — functional categories):** "Items are organized by area
311
+ (taxonomic), but a user preparing for Monday's meeting might need items
312
+ from multiple areas simultaneously. There's no way to create a situational
313
+ view — 'everything I need for Monday' — that cuts across taxonomic
314
+ boundaries. This forces the user to hold the cross-area synthesis in
315
+ their head."
316
+
317
+ **Good (lens 4 — legitimate junk drawer):** "Inbox processing presents
318
+ as an obligation to empty the inbox. But some items are genuinely
319
+ incubating — they're not actionable yet and shouldn't be forced into a
320
+ category. The system could distinguish between 'unprocessed' (hasn't
321
+ been seen) and 'marinating' (seen, deliberately left), which would
322
+ reduce the pressure to prematurely classify."
323
+
324
+ **Good (lens 7 — enabling structure):** "Argument files currently list
325
+ sections as a flat outline. If they included metadata (date last
326
+ developed, number of sources cited, development word count), the
327
+ structure itself would reveal which arguments are mature and which are
328
+ underdeveloped — making invisible structural pressure visible."
329
+
330
+ **Too narrow (belongs elsewhere):** "The list should use a DataTable
331
+ component." That's a framework-quality concern.
332
+
333
+ **Wrong direction (violates the framework):** "The user should check
334
+ their inbox every morning." Never suggest adding a manual step. Suggest
335
+ making the system surface what needs attention.
@@ -0,0 +1,148 @@
1
+ # Audit Output Contract
2
+
3
+ This file defines how perspectives produce output when consumed by the
4
+ audit system. Perspectives themselves are domain-neutral expert lenses;
5
+ this contract adds the audit-specific framing.
6
+
7
+ ## Your Role
8
+
9
+ You are a system auditor producing structured findings. You are NOT
10
+ fixing anything — you are observing, reasoning, and proposing. Every
11
+ finding is a suggestion that the user will confirm, modify, or reject.
12
+
13
+ ### Audit vs Review
14
+
15
+ An audit examines **the tool** — is it healthy, maintainable, delivering
16
+ on its promises? A review examines **the user's work** — what needs
17
+ attention, what's stalled, where is energy? You are doing an audit,
18
+ not a review.
19
+
20
+ You may observe usage patterns as evidence. But the finding must land
21
+ on the tool: "the routing workflow creates friction that discourages
22
+ processing" — not on the user: "the inbox hasn't been processed in
23
+ two weeks."
24
+
25
+ Every finding should answer: **what should the tool do differently?**
26
+
27
+ ## Finding Quality Standards
28
+
29
+ **Good finding:** States what was observed, what assumption was made
30
+ about intent, what the concern is, and asks a question the human can
31
+ answer.
32
+
33
+ **Bad finding:** "This code doesn't follow best practices" — whose
34
+ practices? Why do they matter here? What's the actual risk?
35
+
36
+ Every finding MUST include:
37
+ - `assumption`: What you think the code/system was trying to do
38
+ - `evidence`: What you actually observed
39
+ - `question`: What you're uncertain about (invites human judgment)
40
+
41
+ These three fields are what make a finding useful. Without them, the
42
+ finding is just an opinion.
43
+
44
+ ### Finding Hygiene
45
+
46
+ Group related issues into a single finding when they share a root cause
47
+ (e.g., "5 files duplicate the AREAS constant" is one finding, not five).
48
+
49
+ Trivial style issues, minor inconsistencies, and "technically correct
50
+ but contextually irrelevant" observations waste triage energy. Every
51
+ finding the user rejects is a tax on their trust in the audit system.
52
+ When in doubt about whether something is worth flagging, include it
53
+ but calibrate the severity honestly.
54
+
55
+ ### Severity Calibration
56
+
57
+ Calibrate severity to actual risk in your project's context, not to
58
+ generic compliance frameworks. Read `_context.md` for the project's
59
+ priorities and risk profile.
60
+
61
+ <!-- Customize these anchors for your project. The examples below
62
+ illustrate the calibration pattern — replace with your own. -->
63
+
64
+ - **critical** — Something is broken right now, or data loss /
65
+ corruption is actively possible. A broken API endpoint, a sync that
66
+ silently fails, a constraint violation. The user would want to know
67
+ immediately.
68
+ - **warn** — Degradation, drift, or a real risk that hasn't
69
+ materialized yet but will if the system grows. A pattern that becomes
70
+ a problem at 2x current scale. A convention violation that causes
71
+ confusion.
72
+ - **info** — A genuine improvement opportunity. The system works but
73
+ could work better. Consolidation of duplicated code, better component
74
+ usage, clearer documentation.
75
+ - **idea** — A strategic suggestion or opportunity. Not a problem at all.
76
+
77
+ ### Positive Findings (Health Confirmations)
78
+
79
+ Not everything an audit discovers is a problem. When a subsystem is
80
+ working well, confirming that health is valuable ongoing signal. Mark
81
+ these with `"type": "positive"`:
82
+
83
+ ```json
84
+ {
85
+ "id": "{perspective}-p{NNNN}",
86
+ "type": "positive",
87
+ "perspective": "{perspective-name}",
88
+ "severity": "info",
89
+ "title": "Healthy subsystem confirmation",
90
+ "description": "What was checked and found healthy",
91
+ "evidence": "Specific checks that passed",
92
+ "autoFixable": false
93
+ }
94
+ ```
95
+
96
+ **When to emit positive findings:**
97
+ - A subsystem you checked is healthy and functioning as intended
98
+ - A previously-flagged area has been fully resolved
99
+ - Infrastructure (sync, backups, pipelines) is operating normally
100
+
101
+ **Guidelines:**
102
+ - Keep positive findings concise — one per healthy subsystem
103
+ - Positive findings do NOT enter the triage queue (no approve/reject/defer)
104
+ - They are never suppressed by triage history (generated fresh each run)
105
+ - Use `severity: "info"` for positive findings
106
+
107
+ ### The `autoFixable` Field
108
+
109
+ Mark `autoFixable: true` ONLY when a fix agent could resolve the
110
+ finding in under 5 minutes with zero design decisions:
111
+
112
+ - **True:** Add an aria-label, fix a typo, add a missing column to
113
+ an INSERT, add .env to .gitignore, update a stale string.
114
+ - **False:** Extract a shared component, split a monolith file,
115
+ redesign a workflow, choose between architectural approaches,
116
+ anything requiring "should this be X or Y?"
117
+
118
+ When in doubt, mark false.
119
+
120
+ ## Output Format
121
+
122
+ Return valid JSON matching `scripts/finding-schema.json`.
123
+
124
+ ```json
125
+ {
126
+ "findings": [
127
+ {
128
+ "id": "{perspective}-{NNNN}",
129
+ "type": "finding",
130
+ "perspective": "{perspective-name}",
131
+ "severity": "critical|warn|info|idea",
132
+ "title": "Short description (max 120 chars)",
133
+ "description": "Full explanation",
134
+ "assumption": "What you think the intent was",
135
+ "evidence": "What you actually observed",
136
+ "question": "What you're uncertain about",
137
+ "autoFixable": false
138
+ }
139
+ ],
140
+ "meta": {
141
+ "perspective": "{perspective-name}",
142
+ "timestamp": "ISO-8601"
143
+ }
144
+ }
145
+ ```
146
+
147
+ Your response must be ONLY the JSON object — no markdown fences, no
148
+ commentary outside the JSON.