@nurix/etna 0.18.0 → 0.18.1

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 (100) hide show
  1. package/README.md +6 -5
  2. package/data/harness-index.json +1 -1
  3. package/data/harnesses/code/CLAUDE.md +7 -18
  4. package/data/harnesses/code/agents/brainstorm.md +3 -3
  5. package/data/harnesses/code/agents/change-review.md +13 -10
  6. package/data/harnesses/code/agents/harness-manager.md +15 -15
  7. package/data/harnesses/code/agents/maintenance.md +10 -3
  8. package/data/harnesses/code/agents/performance-review.md +5 -0
  9. package/data/harnesses/code/harness.json +1 -1
  10. package/data/harnesses/code/rules/general.md +40 -36
  11. package/data/harnesses/code/skills/boundary/SKILL.md +15 -42
  12. package/data/harnesses/code/skills/boundary/references/boundary-taxonomy.md +366 -304
  13. package/data/harnesses/code/skills/brainstorm/README.md +9 -9
  14. package/data/harnesses/code/skills/brainstorm/SKILL.md +15 -15
  15. package/data/harnesses/code/skills/brainstorm/harvest.md +2 -2
  16. package/data/harnesses/code/skills/brainstorm/templates/backlog.md +2 -2
  17. package/data/harnesses/code/skills/brainstorm/templates/build.md +6 -6
  18. package/data/harnesses/code/skills/brainstorm/templates/decisions.md +3 -3
  19. package/data/harnesses/code/skills/brainstorm/templates/doctrine.md +2 -2
  20. package/data/harnesses/code/skills/brainstorm/templates/domain-model.md +2 -2
  21. package/data/harnesses/code/skills/brainstorm/templates/glossary.md +2 -1
  22. package/data/harnesses/code/skills/brainstorm/templates/non-goals.md +3 -7
  23. package/data/harnesses/code/skills/brainstorm/templates/questions.md +6 -5
  24. package/data/harnesses/code/skills/brainstorm/templates/state.md +1 -8
  25. package/data/harnesses/code/skills/brainstorm/templates/tech.md +6 -6
  26. package/data/harnesses/code/skills/brainstorm/templates/thesis.md +2 -2
  27. package/data/harnesses/code/skills/distiller/SKILL.md +48 -177
  28. package/data/harnesses/code/skills/distiller/references/docs-mode.md +116 -343
  29. package/data/harnesses/code/skills/distiller/references/method.md +37 -109
  30. package/data/harnesses/code/skills/documentation/SKILL.md +9 -6
  31. package/data/harnesses/code/skills/documentation/references/examples.md +30 -61
  32. package/data/harnesses/code/skills/documentation/references/style-guide.md +59 -62
  33. package/data/harnesses/code/skills/documentation/references/templates.md +25 -33
  34. package/data/harnesses/code/skills/workflow-mapper/SKILL.md +32 -11
  35. package/data/harnesses/code/skills/workflow-mapper/references/patterns.md +1 -1
  36. package/data/harnesses/code-fable/CLAUDE.md +12 -23
  37. package/data/harnesses/code-fable/agents/brainstorm.md +3 -3
  38. package/data/harnesses/code-fable/agents/change-review.md +13 -10
  39. package/data/harnesses/code-fable/agents/harness-manager.md +15 -15
  40. package/data/harnesses/code-fable/agents/maintenance.md +10 -3
  41. package/data/harnesses/code-fable/agents/performance-review.md +5 -0
  42. package/data/harnesses/code-fable/harness.json +1 -1
  43. package/data/harnesses/code-fable/rules/general.md +40 -36
  44. package/data/harnesses/code-fable/skills/boundary/SKILL.md +15 -42
  45. package/data/harnesses/code-fable/skills/boundary/references/boundary-taxonomy.md +366 -304
  46. package/data/harnesses/code-fable/skills/brainstorm/README.md +9 -9
  47. package/data/harnesses/code-fable/skills/brainstorm/SKILL.md +15 -15
  48. package/data/harnesses/code-fable/skills/brainstorm/harvest.md +2 -2
  49. package/data/harnesses/code-fable/skills/brainstorm/templates/backlog.md +2 -2
  50. package/data/harnesses/code-fable/skills/brainstorm/templates/build.md +6 -6
  51. package/data/harnesses/code-fable/skills/brainstorm/templates/decisions.md +3 -3
  52. package/data/harnesses/code-fable/skills/brainstorm/templates/doctrine.md +2 -2
  53. package/data/harnesses/code-fable/skills/brainstorm/templates/domain-model.md +2 -2
  54. package/data/harnesses/code-fable/skills/brainstorm/templates/glossary.md +2 -1
  55. package/data/harnesses/code-fable/skills/brainstorm/templates/non-goals.md +3 -7
  56. package/data/harnesses/code-fable/skills/brainstorm/templates/questions.md +6 -5
  57. package/data/harnesses/code-fable/skills/brainstorm/templates/state.md +1 -8
  58. package/data/harnesses/code-fable/skills/brainstorm/templates/tech.md +6 -6
  59. package/data/harnesses/code-fable/skills/brainstorm/templates/thesis.md +2 -2
  60. package/data/harnesses/code-fable/skills/distiller/SKILL.md +48 -177
  61. package/data/harnesses/code-fable/skills/distiller/references/docs-mode.md +116 -343
  62. package/data/harnesses/code-fable/skills/distiller/references/method.md +37 -109
  63. package/data/harnesses/code-fable/skills/documentation/SKILL.md +9 -6
  64. package/data/harnesses/code-fable/skills/documentation/references/examples.md +30 -61
  65. package/data/harnesses/code-fable/skills/documentation/references/style-guide.md +59 -62
  66. package/data/harnesses/code-fable/skills/documentation/references/templates.md +25 -33
  67. package/data/harnesses/code-fable/skills/workflow-mapper/SKILL.md +32 -11
  68. package/data/harnesses/code-fable/skills/workflow-mapper/references/patterns.md +1 -1
  69. package/data/harnesses/discover/CLAUDE.md +41 -109
  70. package/data/harnesses/discover/agents/api.md +11 -28
  71. package/data/harnesses/discover/agents/codebase.md +12 -30
  72. package/data/harnesses/discover/agents/community.md +9 -21
  73. package/data/harnesses/discover/agents/deployed-client-bundle.md +16 -67
  74. package/data/harnesses/discover/agents/distribution-artifacts.md +21 -59
  75. package/data/harnesses/discover/agents/docs.md +11 -20
  76. package/data/harnesses/discover/agents/infra-backend-fingerprint.md +28 -68
  77. package/data/harnesses/discover/agents/packages.md +12 -28
  78. package/data/harnesses/discover/agents/session.md +18 -50
  79. package/data/harnesses/discover/agents/website.md +9 -19
  80. package/data/harnesses/discover/agents/wire-capture.md +22 -72
  81. package/data/harnesses/discover/harness.json +1 -1
  82. package/data/harnesses/discover/rules/discovery.md +73 -182
  83. package/data/harnesses/discover/rules/evaluation.md +90 -98
  84. package/data/harnesses/discover/rules/ingestion.md +123 -322
  85. package/data/harnesses/discover/rules/self-correction.md +67 -92
  86. package/data/harnesses/discover/rules/tradecraft.md +201 -172
  87. package/data/harnesses/hr/CLAUDE.md +21 -51
  88. package/data/harnesses/hr/harness.json +1 -1
  89. package/data/harnesses/hr/skills/interview-eval/SKILL.md +23 -11
  90. package/data/harnesses/hr/skills/interview-eval/TEMPLATE.md +49 -29
  91. package/data/harnesses/hr/skills/interview-eval/rubric.md +30 -30
  92. package/data/harnesses/kb-agi/CLAUDE.md +8 -8
  93. package/data/harnesses/kb-agi/agents/kb-agi-init.md +31 -22
  94. package/data/harnesses/kb-agi/agents/kb-catch-stale.md +1 -1
  95. package/data/harnesses/kb-agi/agents/kb-find-gaps.md +1 -1
  96. package/data/harnesses/kb-agi/agents/kb-fix-links.md +1 -1
  97. package/data/harnesses/kb-agi/agents/kb-refresh-summaries.md +2 -2
  98. package/data/harnesses/kb-agi/agents/kb-sync-metadata.md +2 -2
  99. package/data/harnesses/kb-agi/harness.json +1 -1
  100. package/package.json +1 -1
@@ -10,6 +10,7 @@ model: inherit
10
10
  You maintain codebase coherence by detecting drift between docs and code, and fixing it. Scope: stale feature docs, broken ownership, routing table drift, architecture drift, unowned source paths, backlog health.
11
11
 
12
12
  Out of scope (handled by the `boundary` skill, which derives contracts dynamically from source):
13
+
13
14
  - **Pre-implementation impact analysis** (checking a plan against cross-cutting contracts before coding) → `boundary` skill, `check` mode
14
15
  - **Diff-scoped contract analysis** (what could a change break across module edges) → `boundary` skill, `scan` mode
15
16
 
@@ -30,15 +31,18 @@ Out of scope (handled by the `boundary` skill, which derives contracts dynamical
30
31
  ## Step 2: Validate Ownership
31
32
 
32
33
  For each doc with `owns` frontmatter:
34
+
33
35
  - Verify the glob patterns match existing files
34
36
  - Report deleted paths, empty globs, orphaned ownership
35
37
 
36
38
  For each code symbol or path a doc explicitly **names** (function/export/route/type):
39
+
37
40
  - Verify it resolves in the code, independent of git-churn — Step 3's churn gate is blind to churn-free false claims
38
41
  - Flag unresolved named referents as drift, phrased as a question (e.g. `docs/x.md:NN names fn() — no static definition found; confirm it is not generated/re-exported before treating as stale`)
39
42
  - On codegen/reflection/DI/barrel stacks where static resolution is unreliable, skip — yielding nothing is correct
40
43
 
41
44
  Also check the **env contract** when the repo declares a canonical `.env.example` (or equivalent). The named-referent check above covers code symbols and paths but not env vars, which live in a separate canonical file:
45
+
42
46
  - Extract the `UPPER_SNAKE` env keys the code reads (`process.env.X` and the deploy scripts' generated env). Grep each against the canonical `.env.example`.
43
47
  - Raise any absence as a question (e.g. `server reads MASTER_KEK but no MASTER_KEK appears in .env.example — confirm the contract still holds`). Skip when no canonical file exists.
44
48
 
@@ -47,6 +51,7 @@ Also check the **env contract** when the repo declares a canonical `.env.example
47
51
  Run `git log --since="2 weeks ago" --name-only --pretty=format:"%h %s"` to find changed source files.
48
52
 
49
53
  For each changed file:
54
+
50
55
  - Match against `owns` patterns from every feature doc — flat and module-local alike (`docs/{features,modules/*/features}/**/*.md`) → identify the owning doc
51
56
  - If no owner exists → flag as unowned
52
57
  - If owner exists → compare last modified dates (`git log -1 --format="%ci" -- <path>`), flag docs where code changed more recently (14-day threshold)
@@ -61,7 +66,7 @@ If `./docs/routing.md` exists:
61
66
 
62
67
  Also flag **unowned paths** — top-level source directories with no owning feature doc (no `owns` glob covers them).
63
68
 
64
- Also catch a **stale greenfield self-label.** If `routing.md` (or `structure.md`) asserts the repo is greenfield — *"Greenfield. No source code or feature docs exist yet"* or similar — **but a real source tree exists** (the derived source roots from this step's item 2 above, or Step 5's Unowned-code derivation, are non-empty, e.g. a populated `packages/` of real workspaces), the self-label has gone stale: the scaffold filled in but the doc still announces an empty repo. Raise it as a question (e.g. `routing.md says "No source code exists yet" but packages/ holds 5 workspaces — confirm the greenfield label should be retired`).
69
+ Also catch a **stale greenfield self-label.** If `routing.md` (or `structure.md`) asserts the repo is greenfield — _"Greenfield. No source code or feature docs exist yet"_ or similar — **but a real source tree exists** (the derived source roots from this step's item 2 above, or Step 5's Unowned-code derivation, are non-empty, e.g. a populated `packages/` of real workspaces), the self-label has gone stale: the scaffold filled in but the doc still announces an empty repo. Raise it as a question (e.g. `routing.md says "No source code exists yet" but packages/ holds 5 workspaces — confirm the greenfield label should be retired`).
65
70
 
66
71
  ## Step 5: Check Architecture & Backlog
67
72
 
@@ -74,10 +79,12 @@ Also catch a **stale greenfield self-label.** If `routing.md` (or `structure.md`
74
79
  ## Step 6: Remediate
75
80
 
76
81
  For each stale doc:
82
+
77
83
  - If drift is clear (renamed function, new export, changed props) → update the doc directly
78
84
  - If drift is ambiguous (major refactor, unclear intent) → backlog it
79
85
 
80
86
  For unowned code paths:
87
+
81
88
  - Append: `- **[P2]** No feature doc owns \`{dir}/\` — discovered by maintenance` (`{dir}` = the actual unowned source directory)
82
89
 
83
90
  **Declined realignment:** When you propose a realignment and the user **declines or does not act**, never drop the finding and never block. Append it to `docs/history/backlog.md` as `- **[P0–P3]** <finding> — discovered by maintenance`, with priority = the finding's own severity **on the same P0–P3 scale as code items** — never a segregated "compliance" section, never auto-relegated to the lowest tier. Record once: dedupe against existing entries; if already present, leave it. (This is the decline branch — it pairs with dispatching a remediation sub-agent on a yes.)
@@ -87,8 +94,8 @@ For unowned code paths:
87
94
  1. Update `docs/structure.md` Health Log with today's date and summary
88
95
  2. Update `docs/memory/maintenance.md` with last review date, stale docs fixed, unowned paths, backlog items created
89
96
  3. Report findings: stale docs, broken ownership, unowned code, architecture drift, backlog health
90
- 4. **Inbox-distillation threshold.** Count undigested inbox entries — `## ` entry blocks across `docs/memory/inbox/*.md` (the inbox is consume-on-digest, so every block present is undigested). If the count is **≥5**, add one line to the report **proposing** a `distiller` `facts` run — propose only, never auto-run, no cron. If the user declines or ignores it, do nothing: the count keeps growing and the proposal reappears next pass — that recurrence *is* the dedupe, so never backlog it.
91
- 5. **Docs-distillation threshold.** Per target doc, count undigested fact-cards (`invalid_from: null`, the doc's path not in their `digested_into:`) that **touch** it by the structural intersection in `skills/distiller/references/docs-mode.md` Resolution 1 (provenance∩`owns` strong, entities∩declared-ownership supporting — qmd-independent). If **≥10** map to **one** doc, add one line to the report **proposing** a `distiller docs --doc <path>` run on that doc — propose only, never auto-run, no cron. Declined or ignored ⇒ the count keeps growing and the proposal reappears next pass; that recurrence *is* the dedupe, so never backlog the proposal.
97
+ 4. **Inbox-distillation threshold.** Count undigested inbox entries — `## ` entry blocks across `docs/memory/inbox/*.md` (the inbox is consume-on-digest, so every block present is undigested). If the count is **≥5**, add one line to the report **proposing** a `distiller` `facts` run — propose only, never auto-run, no cron. If the user declines or ignores it, do nothing: the count keeps growing and the proposal reappears next pass — that recurrence _is_ the dedupe, so never backlog it.
98
+ 5. **Docs-distillation threshold.** Per target doc, count undigested fact-cards (`invalid_from: null`, the doc's path not in their `digested_into:`) that **touch** it by the structural intersection in `skills/distiller/references/docs-mode.md` Resolution 1 (provenance∩`owns` strong, entities∩declared-ownership supporting — qmd-independent). If **≥10** map to **one** doc, add one line to the report **proposing** a `distiller docs --doc <path>` run on that doc — propose only, never auto-run, no cron. Declined or ignored ⇒ the count keeps growing and the proposal reappears next pass; that recurrence _is_ the dedupe, so never backlog the proposal.
92
99
 
93
100
  ## Step 8: Refresh Index (Optional)
94
101
 
@@ -143,17 +143,20 @@ grep -rn "Icons\[" src/ --include="*.jsx" --include="*.tsx"
143
143
  Scan for React performance issues:
144
144
 
145
145
  ### Missing memoization
146
+
146
147
  - Components rendering large lists without `React.memo`
147
148
  - Expensive computations without `useMemo`
148
149
  - Callback props without `useCallback` causing child re-renders
149
150
  - Focus on components in tables, lists, grids, repeated rows
150
151
 
151
152
  ### Request waterfalls
153
+
152
154
  - Sequential `await` calls that could be `Promise.all`
153
155
  - `useEffect` chains where one fetch triggers another
154
156
  - Component trees where parent fetches block child renders
155
157
 
156
158
  ### Missing virtualization
159
+
157
160
  - Lists rendering >50 items without react-window or similar
158
161
  - Tables with unbounded row counts
159
162
  - Grids without lazy loading
@@ -183,6 +186,7 @@ grep -rn "TODO\|FIXME\|HACK\|XXX" src/ --include="*.jsx" --include="*.tsx" --inc
183
186
  ### Report format
184
187
 
185
188
  **Dependencies**
189
+
186
190
  - **Vulnerabilities**: critical/high CVEs, new since last audit
187
191
  - **Outdated**: top outdated packages by semver distance
188
192
  - **Licenses**: non-permissive license flags
@@ -191,6 +195,7 @@ grep -rn "TODO\|FIXME\|HACK\|XXX" src/ --include="*.jsx" --include="*.tsx" --inc
191
195
  - **Dependency size**: largest installed packages
192
196
 
193
197
  **Code**
198
+
194
199
  - **Bundle size**: total vendor size, top offenders, growth since last review
195
200
  - **Tree-shaking issues**: namespace imports, barrel-file problems (cross-referenced with the heavy/bloat packages from Part A)
196
201
  - **Performance**: missing memoization, request waterfalls, missing virtualization
@@ -8,5 +8,5 @@
8
8
  ".prettierignore",
9
9
  ".vscode/settings.json"
10
10
  ],
11
- "digest": "7ce2d78b5ead"
11
+ "digest": "3a6fb5194539"
12
12
  }
@@ -10,40 +10,40 @@
10
10
 
11
11
  No alternatives. Just use these.
12
12
 
13
- | Package | Version | Use | Don't use |
14
- | ------------------------ | --------- | ---------------------- | ----------------------- |
15
- | react | ^19.2.3 | UI components | - |
16
- | vite | ^8.0.0 | Build tool, dev server | webpack, CRA |
17
- | tailwindcss | ^4.1.18 | Styling | styled-components |
18
- | @vitejs/plugin-react-swc | ^4.2.2 | JSX compilation | @vitejs/plugin-react |
19
- | react-router-dom | ^7.11.0 | Routing | - |
20
- | @reduxjs/toolkit | ^2.11.2 | State management | zustand, jotai |
21
- | react-redux | ^9.2.0 | Redux React bindings | - |
22
- | axios | ^1.13.2 | HTTP requests | fetch |
23
- | date-fns | ^4.1.0 | Date formatting | moment, dayjs |
24
- | @dnd-kit/core | ^6.3.1 | Drag and drop | react-beautiful-dnd |
25
- | motion | ^12.23.26 | Animations | react-spring |
26
- | sonner | ^2.0.7 | Toast notifications | react-toastify |
27
- | react-window | ^2.2.3 | List virtualization | react-virtualized |
28
- | nanoid | ^5.1.6 | ID generation | uuid |
29
- | express | ^5.2.1 | HTTP server | fastify, koa |
30
- | drizzle-orm | latest | Database ORM | prisma, sequelize, typeorm |
31
- | drizzle-kit | latest | Schema tooling | - |
32
- | zod | ^4.2.1 | Schema validation | yup, joi |
33
- | jose | ^6.1.3 | JWT handling | jsonwebtoken |
34
- | microdiff | ^1.5.0 | JSON object diffing | deep-diff, just-diff |
35
- | react18-json-view | ^0.2.9 | JSON tree view | react-json-view |
36
- | @tiptap/react | ^3.11.1 | Rich text editor | slate, quill, draft-js |
37
- | shiki | ^3.22.0 | Syntax highlighting | prism, highlight.js |
38
- | lucide-react | ^0.562.0 | Icons | react-icons, heroicons |
39
- | @pdfme/generator | ^5.5.8 | PDF generation | jspdf, pdfkit |
40
- | cmdk | ^1.1.1 | Command palette | kbar, ninja-keys |
41
- | @monaco-editor/react | ^4.7.0 | Code editor | codemirror, ace |
42
- | localforage | ^1.10.0 | Client-side storage | idb, dexie |
43
- | react-markdown | ^10.1.0 | Markdown rendering | marked, markdown-it |
44
- | fast-deep-equal | ^3.1.3 | Deep equality checks | lodash.isEqual |
45
- | @ngneat/falso | latest | Fake data generation | @faker-js/faker, chance |
46
- | pino | ^10.1.0 | Logging | winston |
13
+ | Package | Version | Use | Don't use |
14
+ | --- | --- | --- | --- |
15
+ | react | ^19.2.3 | UI components | - |
16
+ | vite | ^8.0.0 | Build tool, dev server | webpack, CRA |
17
+ | tailwindcss | ^4.1.18 | Styling | styled-components |
18
+ | @vitejs/plugin-react-swc | ^4.2.2 | JSX compilation | @vitejs/plugin-react |
19
+ | react-router-dom | ^7.11.0 | Routing | - |
20
+ | @reduxjs/toolkit | ^2.11.2 | State management | zustand, jotai |
21
+ | react-redux | ^9.2.0 | Redux React bindings | - |
22
+ | axios | ^1.13.2 | HTTP requests | fetch |
23
+ | date-fns | ^4.1.0 | Date formatting | moment, dayjs |
24
+ | @dnd-kit/core | ^6.3.1 | Drag and drop | react-beautiful-dnd |
25
+ | motion | ^12.23.26 | Animations | react-spring |
26
+ | sonner | ^2.0.7 | Toast notifications | react-toastify |
27
+ | react-window | ^2.2.3 | List virtualization | react-virtualized |
28
+ | nanoid | ^5.1.6 | ID generation | uuid |
29
+ | express | ^5.2.1 | HTTP server | fastify, koa |
30
+ | drizzle-orm | latest | Database ORM | prisma, sequelize, typeorm |
31
+ | drizzle-kit | latest | Schema tooling | - |
32
+ | zod | ^4.2.1 | Schema validation | yup, joi |
33
+ | jose | ^6.1.3 | JWT handling | jsonwebtoken |
34
+ | microdiff | ^1.5.0 | JSON object diffing | deep-diff, just-diff |
35
+ | react18-json-view | ^0.2.9 | JSON tree view | react-json-view |
36
+ | @tiptap/react | ^3.11.1 | Rich text editor | slate, quill, draft-js |
37
+ | shiki | ^3.22.0 | Syntax highlighting | prism, highlight.js |
38
+ | lucide-react | ^0.562.0 | Icons | react-icons, heroicons |
39
+ | @pdfme/generator | ^5.5.8 | PDF generation | jspdf, pdfkit |
40
+ | cmdk | ^1.1.1 | Command palette | kbar, ninja-keys |
41
+ | @monaco-editor/react | ^4.7.0 | Code editor | codemirror, ace |
42
+ | localforage | ^1.10.0 | Client-side storage | idb, dexie |
43
+ | react-markdown | ^10.1.0 | Markdown rendering | marked, markdown-it |
44
+ | fast-deep-equal | ^3.1.3 | Deep equality checks | lodash.isEqual |
45
+ | @ngneat/falso | latest | Fake data generation | @faker-js/faker, chance |
46
+ | pino | ^10.1.0 | Logging | winston |
47
47
 
48
48
  ## Frontend
49
49
 
@@ -51,7 +51,7 @@ Tailwind v4 + shadcn-based UI; conventions below.
51
51
 
52
52
  - **@nurix/components** — the UI component library (linked, pre-built); import by subpath, e.g. `@nurix/components/button`.
53
53
  - No components.json / shadcn CLI scaffold (.tsx, not .jsx) — consume the prebuilt library; never `npx shadcn add`.
54
- - Vite: `@tailwindcss/vite` + `@vitejs/plugin-react-swc`. Pin react / react-dom / react/jsx-runtime / react/jsx-dev-runtime to the app's single copy via `resolve.alias` (linked @nurix/* ship nested react — keep one hook dispatcher).
54
+ - Vite: `@tailwindcss/vite` + `@vitejs/plugin-react-swc`. Pin react / react-dom / react/jsx-runtime / react/jsx-dev-runtime to the app's single copy via `resolve.alias` (linked @nurix/\* ship nested react — keep one hook dispatcher).
55
55
  - Tailwind v4, CSS-only (no tailwind.config.js, no PostCSS): styling runs through the `@tailwindcss/vite` plugin.
56
56
  - CSS entry `globals.css`, imports in order — `@import "./personality.css"` (token source) → `@import "tailwindcss"` → the library's `styles.css` — then `@theme inline {…}` mapping vars to tokens.
57
57
  - Tokens: CSS vars in `:root, :root[data-theme="light"]` + the archetype selector `[data-style="…"]` (personality.css), consumed as semantic Tailwind tokens (bg-card, text-foreground). Honor the archetype's radius/theme decisions (e.g. re-assert `--radius-*` to 0 for a flat archetype; add `@custom-variant dark` only if the project supports dark mode). The library bundles class-variance-authority, clsx, tailwind-merge.
@@ -71,7 +71,11 @@ app.use(rateLimit({ windowMs: 15 * 60 * 1000, max: 100 }));
71
71
  ## API Response Format
72
72
 
73
73
  ```json
74
- { "status": 1, "message": "Message sent successfully", "data": { "delivered": [{ "user@example.com": 2 }] } }
74
+ {
75
+ "status": 1,
76
+ "message": "Message sent successfully",
77
+ "data": { "delivered": [{ "user@example.com": 2 }] }
78
+ }
75
79
  ```
76
80
 
77
81
  Error: `{ "status": 0, "message": "Error description", "data": null }`
@@ -7,45 +7,21 @@ description: Boundary diagnostic for implementation plans. Given a plan file, re
7
7
 
8
8
  You diagnose whether a plan's changes would break an application boundary.
9
9
 
10
- A boundary is a contract between two pieces of code (or code and infra) that
11
- share an assumption with **no compile-time link** between them: the column a raw
12
- SQL string names, the JSON envelope a client unwraps, the event string a
13
- dispatcher parses, the env var a deploy script writes. Changing one side ships
14
- green and breaks the other silently. Your job is to find those edges in the
15
- plan's path *before* execution.
16
-
17
- [`references/boundary-taxonomy.md`](references/boundary-taxonomy.md) is the
18
- catalog of boundary types (~170 across persistence, wire/API, frontend,
19
- auth/tenancy, async/messaging, config/build, runtime/infra), with per-type
20
- severities and safe-change checklists. Read it first — it tells you what to
21
- look for; the code tells you what exists.
10
+ A boundary is a contract between two pieces of code (or code and infra) that share an assumption with **no compile-time link** between them: the column a raw SQL string names, the JSON envelope a client unwraps, the event string a dispatcher parses, the env var a deploy script writes. Changing one side ships green and breaks the other silently. Your job is to find those edges in the plan's path _before_ execution.
11
+
12
+ [`references/boundary-taxonomy.md`](references/boundary-taxonomy.md) is the catalog of boundary types (~170 across persistence, wire/API, frontend, auth/tenancy, async/messaging, config/build, runtime/infra), with per-type severities and safe-change checklists. Read it first — it tells you what to look for; the code tells you what exists.
22
13
 
23
14
  ## Run
24
15
 
25
- **Input:** a plan path (given, or the newest in `docs/history/plans/`) — or a
26
- diff / named code area for non-plan work. Everything below is identical either
27
- way; a diff's hunks stand in for the plan's steps.
28
-
29
- 1. **Build the touch list.** Parse the plan's Proposed Changes: files to be
30
- created or modified, entities/state added or changed, API changes, anything
31
- the author flags as a cross-module contract. Note missing subsections.
32
-
33
- 2. **Identify the boundaries in the touched code.** Read each touched file (and
34
- its immediate imports). Against the taxonomy, list the contracts this code
35
- participates in — the schema it queries, the envelope it emits, the events
36
- it publishes or parses, the auth checks it sits behind, the env it reads.
37
-
38
- 3. **Trace the other side.** A boundary has two sides; the danger lives on the
39
- one the plan *doesn't* mention. For each contract, grep the shared name or
40
- shape across the repo — the column name in other SQL strings, the response
41
- field in client unwrappers, the event kind in subscribers, the route in
42
- fetch calls and scripts, the env key in deploy tooling. Record consumers as
43
- `file:line`.
44
-
45
- 4. **Judge each intersection.** Does the planned change alter a shape a traced
46
- consumer depends on, break an invariant the code establishes (append-only
47
- vocabularies, idempotency keys, fail-closed checks, ordering guarantees), or
48
- add a new cross-module edge? Severity:
16
+ **Input:** a plan path (given, or the newest in `docs/history/plans/`) — or a diff / named code area for non-plan work. Everything below is identical either way; a diff's hunks stand in for the plan's steps.
17
+
18
+ 1. **Build the touch list.** Parse the plan's Proposed Changes: files to be created or modified, entities/state added or changed, API changes, anything the author flags as a cross-module contract. Note missing subsections.
19
+
20
+ 2. **Identify the boundaries in the touched code.** Read each touched file (and its immediate imports). Against the taxonomy, list the contracts this code participates in — the schema it queries, the envelope it emits, the events it publishes or parses, the auth checks it sits behind, the env it reads.
21
+
22
+ 3. **Trace the other side.** A boundary has two sides; the danger lives on the one the plan _doesn't_ mention. For each contract, grep the shared name or shape across the repo — the column name in other SQL strings, the response field in client unwrappers, the event kind in subscribers, the route in fetch calls and scripts, the env key in deploy tooling. Record consumers as `file:line`.
23
+
24
+ 4. **Judge each intersection.** Does the planned change alter a shape a traced consumer depends on, break an invariant the code establishes (append-only vocabularies, idempotency keys, fail-closed checks, ordering guarantees), or add a new cross-module edge? Severity:
49
25
  - **CRITICAL** — can corrupt persisted data, or open an auth/money path.
50
26
  - **HIGH** — silent cross-module breakage that would ship green.
51
27
  - **MEDIUM** — drift-prone coupling (string-matched, duplicated constants).
@@ -67,10 +43,7 @@ way; a diff's hunks stand in for the plan's steps.
67
43
 
68
44
  ## Rules
69
45
 
70
- - **Read-only.** You never edit the plan, the code, or any doc. The user folds
71
- your amendments into the plan.
72
- - **Verify in source.** Never flag from plan text alone — read both sides of
73
- every boundary you report, and cite both as `file:line`.
74
- - **No consumer, no finding.** An intersection with no traced other side isn't
75
- a violation; at most note it as a new edge the plan introduces.
46
+ - **Read-only.** You never edit the plan, the code, or any doc. The user folds your amendments into the plan.
47
+ - **Verify in source.** Never flag from plan text alone — read both sides of every boundary you report, and cite both as `file:line`.
48
+ - **No consumer, no finding.** An intersection with no traced other side isn't a violation; at most note it as a new edge the plan introduces.
76
49
  - **A clean report is valid.** Zero violations means say so — don't pad.