connore 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (280) hide show
  1. package/README.md +58 -46
  2. package/package.json +36 -33
  3. package/packs/CONTRIBUTING.md +32 -0
  4. package/packs/base/catalog/README.md +24 -0
  5. package/packs/base/catalog/api.md +46 -0
  6. package/packs/base/catalog/auth.md +46 -0
  7. package/packs/base/catalog/backend.md +46 -0
  8. package/packs/base/catalog/blueprints.md +46 -0
  9. package/packs/base/catalog/components.md +46 -0
  10. package/packs/base/catalog/database.md +46 -0
  11. package/packs/base/catalog/docs.md +46 -0
  12. package/packs/base/catalog/github.md +46 -0
  13. package/packs/base/catalog/golden.md +46 -0
  14. package/packs/base/catalog/motion.md +46 -0
  15. package/packs/base/catalog/plan.md +46 -0
  16. package/packs/base/catalog/screenshots.md +46 -0
  17. package/packs/base/catalog/skills.md +46 -0
  18. package/packs/base/catalog/tokens.md +47 -0
  19. package/packs/base/planning/START.md +29 -0
  20. package/packs/base/planning/blueprint-template.md +46 -0
  21. package/packs/base/planning/plan-template.md +46 -0
  22. package/packs/base/rules/anti-patterns.md +46 -0
  23. package/packs/base/rules/code-style.md +46 -0
  24. package/packs/base/rules/definition-of-done.md +47 -0
  25. package/packs/base/rules/dependency-policy.md +46 -0
  26. package/packs/base/rules/error-handling.md +46 -0
  27. package/packs/base/rules/security-audit.md +47 -0
  28. package/packs/base/rules/security-baseline.md +46 -0
  29. package/packs/base/templates/bug-report.md +46 -0
  30. package/packs/base/templates/feature-spec.md +46 -0
  31. package/packs/base/templates/handoff.md +46 -0
  32. package/packs/base/templates/project-brief.md +46 -0
  33. package/packs/base/workflow/build-loop.md +48 -0
  34. package/packs/base/workflow/code-review.md +46 -0
  35. package/packs/base/workflow/debugging.md +47 -0
  36. package/packs/base/workflow/git-and-commits.md +46 -0
  37. package/packs/base/workflow/idea-to-spec.md +46 -0
  38. package/packs/base/workflow/session-handoff.md +46 -0
  39. package/packs/base/workflow/spec-to-plan.md +46 -0
  40. package/packs/knowledge/backend/api/conventions.md +21 -0
  41. package/packs/knowledge/backend/architecture/local-sqlite.md +20 -0
  42. package/packs/knowledge/backend/authentication/session-and-engine.md +24 -0
  43. package/packs/knowledge/backend/database/schema.md +21 -0
  44. package/packs/knowledge/components/custom/ambient-background.md +26 -0
  45. package/packs/knowledge/components/custom/ambient-background.tsx +12 -0
  46. package/packs/knowledge/components/custom/corner-frame.md +26 -0
  47. package/packs/knowledge/components/custom/corner-frame.tsx +48 -0
  48. package/packs/knowledge/components/custom/cta-button.md +26 -0
  49. package/packs/knowledge/components/custom/cta-button.tsx +10 -0
  50. package/packs/knowledge/components/custom/page-transition.md +26 -0
  51. package/packs/knowledge/components/custom/page-transition.tsx +10 -0
  52. package/packs/knowledge/components/custom/smooth-scroll.md +26 -0
  53. package/packs/knowledge/components/custom/smooth-scroll.tsx +32 -0
  54. package/packs/knowledge/components/motion-effects/README.md +30 -0
  55. package/packs/knowledge/components/ui-primitives/LICENSE +21 -0
  56. package/packs/knowledge/components/ui-primitives/README.md +22 -0
  57. package/packs/knowledge/components/ui-primitives/badge.md +26 -0
  58. package/packs/knowledge/components/ui-primitives/badge.tsx +48 -0
  59. package/packs/knowledge/components/ui-primitives/button.md +27 -0
  60. package/packs/knowledge/components/ui-primitives/button.tsx +66 -0
  61. package/packs/knowledge/components/ui-primitives/card.md +26 -0
  62. package/packs/knowledge/components/ui-primitives/card.tsx +102 -0
  63. package/packs/knowledge/components/ui-primitives/checkbox.md +26 -0
  64. package/packs/knowledge/components/ui-primitives/checkbox.tsx +32 -0
  65. package/packs/knowledge/components/ui-primitives/dialog.md +26 -0
  66. package/packs/knowledge/components/ui-primitives/dialog.tsx +168 -0
  67. package/packs/knowledge/components/ui-primitives/dropdown-menu.md +26 -0
  68. package/packs/knowledge/components/ui-primitives/dropdown-menu.tsx +268 -0
  69. package/packs/knowledge/components/ui-primitives/input.md +27 -0
  70. package/packs/knowledge/components/ui-primitives/input.tsx +18 -0
  71. package/packs/knowledge/components/ui-primitives/label.md +26 -0
  72. package/packs/knowledge/components/ui-primitives/label.tsx +23 -0
  73. package/packs/knowledge/components/ui-primitives/progress.md +26 -0
  74. package/packs/knowledge/components/ui-primitives/progress.tsx +30 -0
  75. package/packs/knowledge/components/ui-primitives/scroll-area.md +26 -0
  76. package/packs/knowledge/components/ui-primitives/scroll-area.tsx +54 -0
  77. package/packs/knowledge/components/ui-primitives/select.md +26 -0
  78. package/packs/knowledge/components/ui-primitives/select.tsx +191 -0
  79. package/packs/knowledge/components/ui-primitives/separator.md +26 -0
  80. package/packs/knowledge/components/ui-primitives/separator.tsx +27 -0
  81. package/packs/knowledge/components/ui-primitives/sonner.md +26 -0
  82. package/packs/knowledge/components/ui-primitives/sonner.tsx +49 -0
  83. package/packs/knowledge/components/ui-primitives/switch.md +26 -0
  84. package/packs/knowledge/components/ui-primitives/switch.tsx +32 -0
  85. package/packs/knowledge/components/ui-primitives/tabs.md +26 -0
  86. package/packs/knowledge/components/ui-primitives/tabs.tsx +89 -0
  87. package/packs/knowledge/components/ui-primitives/textarea.md +26 -0
  88. package/packs/knowledge/components/ui-primitives/textarea.tsx +17 -0
  89. package/packs/knowledge/components/ui-primitives/tooltip.md +26 -0
  90. package/packs/knowledge/components/ui-primitives/tooltip.tsx +56 -0
  91. package/packs/knowledge/design/aesthetics/app-shell.md +41 -0
  92. package/packs/knowledge/design/aesthetics/code-neutral.md +40 -0
  93. package/packs/knowledge/design/aesthetics/match.md +46 -0
  94. package/packs/knowledge/design/aesthetics/ruled-outline.md +40 -0
  95. package/packs/knowledge/design/aesthetics/solid-accent.md +43 -0
  96. package/packs/knowledge/design/animations/motion.md +40 -0
  97. package/packs/knowledge/design/project-style.md +50 -0
  98. package/packs/knowledge/design/references/benefit-card-grid.md +27 -0
  99. package/packs/knowledge/design/references/benefit-card-grid.png +0 -0
  100. package/packs/knowledge/design/references/cta-centered.md +27 -0
  101. package/packs/knowledge/design/references/cta-centered.png +0 -0
  102. package/packs/knowledge/design/references/cta-split-media.md +27 -0
  103. package/packs/knowledge/design/references/cta-split-media.png +0 -0
  104. package/packs/knowledge/design/references/dashboard-overview.md +31 -0
  105. package/packs/knowledge/design/references/dashboard-overview.png +0 -0
  106. package/packs/knowledge/design/references/faq-split-accordion.md +27 -0
  107. package/packs/knowledge/design/references/faq-split-accordion.png +0 -0
  108. package/packs/knowledge/design/references/feature-split-checklist.md +27 -0
  109. package/packs/knowledge/design/references/feature-split-checklist.png +0 -0
  110. package/packs/knowledge/design/references/footer-four-column.md +27 -0
  111. package/packs/knowledge/design/references/footer-four-column.png +0 -0
  112. package/packs/knowledge/design/references/footer-two-column.md +27 -0
  113. package/packs/knowledge/design/references/footer-two-column.png +0 -0
  114. package/packs/knowledge/design/references/hero-accent-curtain.md +27 -0
  115. package/packs/knowledge/design/references/hero-accent-curtain.png +0 -0
  116. package/packs/knowledge/design/references/hero-split-media.md +27 -0
  117. package/packs/knowledge/design/references/hero-split-media.png +0 -0
  118. package/packs/knowledge/design/references/logo-cloud-grid.md +27 -0
  119. package/packs/knowledge/design/references/logo-cloud-grid.png +0 -0
  120. package/packs/knowledge/design/references/logo-row-ruled.md +27 -0
  121. package/packs/knowledge/design/references/logo-row-ruled.png +0 -0
  122. package/packs/knowledge/design/references/pricing-three-card.md +27 -0
  123. package/packs/knowledge/design/references/pricing-three-card.png +0 -0
  124. package/packs/knowledge/design/references/steps-ruled-grid.md +27 -0
  125. package/packs/knowledge/design/references/steps-ruled-grid.png +0 -0
  126. package/packs/knowledge/design/rules.md +35 -0
  127. package/packs/knowledge/design/token-structure.md +46 -0
  128. package/packs/knowledge/design/tokens.md +55 -0
  129. package/packs/knowledge/frontend/README.md +50 -0
  130. package/packs/knowledge/frontend/SOURCES.md +40 -0
  131. package/packs/knowledge/frontend/accessibility/focus-and-dialogs.md +47 -0
  132. package/packs/knowledge/frontend/accessibility/semantics-and-keyboard.md +45 -0
  133. package/packs/knowledge/frontend/accessibility/wcag-targets.md +43 -0
  134. package/packs/knowledge/frontend/architecture/agent-context-files.md +43 -0
  135. package/packs/knowledge/frontend/architecture/app-foundations.md +43 -0
  136. package/packs/knowledge/frontend/architecture/error-handling.md +47 -0
  137. package/packs/knowledge/frontend/architecture/feature-modules.md +49 -0
  138. package/packs/knowledge/frontend/architecture/import-boundaries.md +44 -0
  139. package/packs/knowledge/frontend/architecture/naming.md +43 -0
  140. package/packs/knowledge/frontend/architecture/project-structure.md +48 -0
  141. package/packs/knowledge/frontend/architecture/routing.md +45 -0
  142. package/packs/knowledge/frontend/architecture/security.md +44 -0
  143. package/packs/knowledge/frontend/architecture/typescript.md +44 -0
  144. package/packs/knowledge/frontend/components/composition.md +45 -0
  145. package/packs/knowledge/frontend/components/data-display.md +47 -0
  146. package/packs/knowledge/frontend/components/library-choice.md +45 -0
  147. package/packs/knowledge/frontend/components/variants.md +44 -0
  148. package/packs/knowledge/frontend/forms/form-architecture.md +49 -0
  149. package/packs/knowledge/frontend/forms/multi-step.md +43 -0
  150. package/packs/knowledge/frontend/forms/validation.md +47 -0
  151. package/packs/knowledge/frontend/layout/responsive.md +41 -0
  152. package/packs/knowledge/frontend/page-blueprints/app-shell.md +16 -0
  153. package/packs/knowledge/frontend/page-blueprints/faq-footer.md +22 -0
  154. package/packs/knowledge/frontend/page-blueprints/feature-grid.md +22 -0
  155. package/packs/knowledge/frontend/page-blueprints/pricing.md +16 -0
  156. package/packs/knowledge/frontend/page-blueprints/saas-hero.md +24 -0
  157. package/packs/knowledge/frontend/patterns/dark-marketing.md +18 -0
  158. package/packs/knowledge/frontend/patterns/status-pill.md +19 -0
  159. package/packs/knowledge/frontend/performance/code-splitting.md +47 -0
  160. package/packs/knowledge/frontend/performance/images-and-vitals.md +44 -0
  161. package/packs/knowledge/frontend/performance/rendering.md +40 -0
  162. package/packs/knowledge/frontend/rendering/server-and-client.md +50 -0
  163. package/packs/knowledge/frontend/state/api-layer.md +49 -0
  164. package/packs/knowledge/frontend/state/async-ui-states.md +43 -0
  165. package/packs/knowledge/frontend/state/client-store.md +46 -0
  166. package/packs/knowledge/frontend/state/server-cache.md +42 -0
  167. package/packs/knowledge/frontend/state/state-categories.md +50 -0
  168. package/packs/knowledge/frontend/testing/component-tests.md +44 -0
  169. package/packs/knowledge/frontend/testing/strategy.md +46 -0
  170. package/packs/knowledge/inbox/README.md +14 -0
  171. package/packs/knowledge/workflows/authentication.md +18 -0
  172. package/packs/knowledge/workflows/crud.md +20 -0
  173. package/packs/knowledge/workflows/dashboard.md +22 -0
  174. package/packs/nextjs-fullstack/backend/api-conventions.md +48 -0
  175. package/packs/nextjs-fullstack/backend/auth-and-roles.md +46 -0
  176. package/packs/nextjs-fullstack/backend/background-jobs.md +46 -0
  177. package/packs/nextjs-fullstack/backend/caching.md +46 -0
  178. package/packs/nextjs-fullstack/backend/database.md +46 -0
  179. package/packs/nextjs-fullstack/backend/file-uploads.md +46 -0
  180. package/packs/nextjs-fullstack/backend/logging.md +46 -0
  181. package/packs/nextjs-fullstack/backend/migrations.md +46 -0
  182. package/packs/nextjs-fullstack/backend/rate-limiting.md +46 -0
  183. package/packs/nextjs-fullstack/backend/secrets-and-env.md +46 -0
  184. package/packs/nextjs-fullstack/backend/validation.md +46 -0
  185. package/packs/nextjs-fullstack/blueprints/ai-app.md +84 -0
  186. package/packs/nextjs-fullstack/blueprints/internal-tool.md +83 -0
  187. package/packs/nextjs-fullstack/blueprints/saas-app.md +83 -0
  188. package/packs/nextjs-fullstack/build-deploy/ci.md +45 -0
  189. package/packs/nextjs-fullstack/build-deploy/deploy.md +46 -0
  190. package/packs/nextjs-fullstack/build-deploy/monitoring.md +45 -0
  191. package/packs/nextjs-fullstack/build-deploy/performance.md +46 -0
  192. package/packs/nextjs-fullstack/build-deploy/project-structure.md +45 -0
  193. package/packs/nextjs-fullstack/build-deploy/release-checklist.md +47 -0
  194. package/packs/nextjs-fullstack/build-deploy/testing.md +46 -0
  195. package/packs/nextjs-fullstack/evals/README.md +46 -0
  196. package/packs/nextjs-fullstack/examples/golden-app/README.md +45 -0
  197. package/packs/nextjs-fullstack/frontend/accessibility.md +46 -0
  198. package/packs/nextjs-fullstack/frontend/components.md +46 -0
  199. package/packs/nextjs-fullstack/frontend/copy.md +46 -0
  200. package/packs/nextjs-fullstack/frontend/data-fetching.md +46 -0
  201. package/packs/nextjs-fullstack/frontend/forms.md +46 -0
  202. package/packs/nextjs-fullstack/frontend/layout.md +46 -0
  203. package/packs/nextjs-fullstack/frontend/loading-empty-error.md +46 -0
  204. package/packs/nextjs-fullstack/frontend/motion.md +46 -0
  205. package/packs/nextjs-fullstack/frontend/responsive.md +46 -0
  206. package/packs/nextjs-fullstack/frontend/seo.md +47 -0
  207. package/packs/nextjs-fullstack/frontend/tables.md +46 -0
  208. package/packs/nextjs-fullstack/frontend/tokens.md +45 -0
  209. package/packs/nextjs-fullstack/integrations/analytics.md +46 -0
  210. package/packs/nextjs-fullstack/integrations/email.md +46 -0
  211. package/packs/nextjs-fullstack/integrations/llm-apis.md +46 -0
  212. package/packs/nextjs-fullstack/integrations/oauth.md +46 -0
  213. package/packs/nextjs-fullstack/integrations/object-storage.md +46 -0
  214. package/packs/nextjs-fullstack/integrations/payments.md +46 -0
  215. package/packs/nextjs-fullstack/integrations/queues.md +46 -0
  216. package/packs/nextjs-fullstack/integrations/search.md +46 -0
  217. package/packs/nextjs-fullstack/integrations/webhooks.md +46 -0
  218. package/packs/nextjs-fullstack/playbooks/add-ai-feature.md +46 -0
  219. package/packs/nextjs-fullstack/playbooks/add-auth.md +46 -0
  220. package/packs/nextjs-fullstack/playbooks/add-billing.md +50 -0
  221. package/packs/nextjs-fullstack/playbooks/add-crud.md +46 -0
  222. package/packs/nextjs-fullstack/playbooks/add-email.md +46 -0
  223. package/packs/nextjs-fullstack/playbooks/add-file-upload.md +46 -0
  224. package/packs/nextjs-fullstack/playbooks/add-webhook.md +46 -0
  225. package/packs/nextjs-fullstack/playbooks/ship-to-prod.md +47 -0
  226. package/plugins/connore/.claude-plugin/plugin.json +10 -0
  227. package/plugins/connore/hooks/hooks.json +16 -0
  228. package/plugins/connore/skills/connore-backend/SKILL.md +32 -0
  229. package/plugins/connore/skills/connore-handoff/SKILL.md +15 -0
  230. package/plugins/connore/skills/connore-routes/SKILL.md +16 -0
  231. package/plugins/connore/skills/connore-validate/SKILL.md +15 -0
  232. package/src/cli.js +377 -90
  233. package/src/commands/add.js +61 -57
  234. package/src/commands/catalog.js +21 -0
  235. package/src/commands/doctor.js +44 -0
  236. package/src/commands/edit.js +88 -0
  237. package/src/commands/graph.js +20 -0
  238. package/src/commands/handoff.js +45 -0
  239. package/src/commands/hook.js +67 -50
  240. package/src/commands/init.js +74 -55
  241. package/src/commands/learn.js +39 -0
  242. package/src/commands/lint.js +13 -0
  243. package/src/commands/list.js +10 -10
  244. package/src/commands/log.js +49 -0
  245. package/src/commands/memory.js +14 -0
  246. package/src/commands/packs.js +21 -0
  247. package/src/commands/plan.js +41 -0
  248. package/src/commands/reindex.js +8 -8
  249. package/src/commands/review.js +31 -0
  250. package/src/commands/routes.js +13 -0
  251. package/src/commands/search.js +26 -0
  252. package/src/commands/stats.js +35 -0
  253. package/src/commands/undo.js +7 -0
  254. package/src/commands/update.js +20 -14
  255. package/src/lib/catalog.js +32 -0
  256. package/src/lib/config.js +67 -0
  257. package/src/lib/fs-safe.js +36 -11
  258. package/src/lib/gitlog.js +75 -0
  259. package/src/lib/graph.js +96 -0
  260. package/src/lib/ignore.js +47 -0
  261. package/src/lib/index.js +88 -57
  262. package/src/lib/lessons.js +173 -0
  263. package/src/lib/lint.js +185 -0
  264. package/src/lib/lock.js +47 -0
  265. package/src/lib/memory.js +49 -0
  266. package/src/lib/mutate.js +26 -0
  267. package/src/lib/packs.js +25 -0
  268. package/src/lib/paths.js +6 -2
  269. package/src/lib/plan.js +156 -0
  270. package/src/lib/pointers.js +3 -3
  271. package/src/lib/prompts.js +66 -0
  272. package/src/lib/provider.js +27 -0
  273. package/src/lib/report.js +41 -17
  274. package/src/lib/routes.js +59 -0
  275. package/src/lib/run.js +116 -0
  276. package/src/lib/search.js +64 -0
  277. package/src/lib/secrets.js +25 -0
  278. package/src/lib/signals.js +55 -0
  279. package/src/lib/sync.js +20 -12
  280. package/src/lib/tokens.js +8 -0
@@ -0,0 +1,83 @@
1
+ ---
2
+ title: Internal tool
3
+ type: blueprint
4
+ tags: [blueprint, admin]
5
+ stack: nextjs
6
+ status: reviewed
7
+ verified: 2026-11-22
8
+ description: An admin or ops tool for a known team, with roles and an audit log.
9
+ ---
10
+
11
+ # Internal tool
12
+
13
+ ## Summary
14
+ A tool for people who already work here. One admin workflow, a role check on every write, and an audit row. It is not a public product and it does not need billing.
15
+
16
+ ## Capabilities
17
+ Must: sign-in limited to the team, one workflow, role checks, an audit row for every write.
18
+ Should: CSV export, empty and error states, a read-only role.
19
+ Later: a public API, SSO if the team does not already have it, bulk edit.
20
+
21
+ ## Reference architecture
22
+ The app sits on the company network or behind the team identity provider. Route Handlers check the session and the role before a write. Every write inserts an audit row in the same transaction. The database is the system of record the tool is editing, or a replica with a single write path back.
23
+
24
+ ## Data model starter
25
+ staff (id, email, role). The table the tool edits, unchanged except for the columns you were asked to add. audit_log (id, staff_id, action, row_id, at). role is one of admin, editor, or reader.
26
+
27
+ ## Integrations
28
+ The team identity provider, the database you were told to use, and email only if a human must be notified. Do not add payments, analytics, or a second database.
29
+
30
+ ## Phases
31
+
32
+ ### Phase 0: Scope and decisions
33
+ - Confirm who can write, who can only read, and who must not sign in
34
+ - Confirm the one workflow and the table it changes
35
+ - Confirm where it is hosted
36
+ Acceptance: The role list and the table name are written in Current state.
37
+ Gate: The user approved the scope in writing.
38
+ Entries: .ctx/START.md, base/workflow/idea-to-spec.md
39
+
40
+ ### Phase 1: Foundation
41
+ - Create the repo, env sample, CI, and the staff table
42
+ - Add sign-in that rejects an email outside the allowed domain
43
+ Acceptance: An outside email receives 403.
44
+ Gate: CI is green.
45
+ Entries: nextjs-fullstack/backend/auth-and-roles.md, nextjs-fullstack/backend/database.md
46
+
47
+ ### Phase 2: One workflow
48
+ - Ship the one create or update path, with loading, empty, and error states
49
+ - Write the audit row in the same transaction as the change
50
+ Acceptance: One real row can be changed and the audit row names the staff id.
51
+ Gate: A reader role receives 403 on that write.
52
+ Entries: nextjs-fullstack/playbooks/add-crud.md, nextjs-fullstack/frontend/loading-empty-error.md
53
+
54
+ ### Phase 3: Permissions
55
+ - Enforce admin, editor, and reader on every write route
56
+ - Add the export the user asked for, as a server route
57
+ Acceptance: Each role is tested with one request.
58
+ Gate: No write route is missing a role check.
59
+ Entries: nextjs-fullstack/backend/auth-and-roles.md
60
+
61
+ ### Phase 4: Hardening
62
+ - Add request logs and a backup note for the table you edit
63
+ Acceptance: A bad write can be traced to a staff id and a time.
64
+ Gate: The test suite and doctor exit 0.
65
+ Entries: base/rules/security-baseline.md, base/rules/definition-of-done.md
66
+
67
+ ### Phase 5: Rollout
68
+ - Write the rollback and who to call when the tool is wrong
69
+ Acceptance: The team can use the workflow without a developer in the room.
70
+ Gate: The user approved the deploy.
71
+ Entries: nextjs-fullstack/build-deploy/deploy.md
72
+
73
+ ## Gate
74
+ Do not add a second workflow while the first write is missing an audit row.
75
+
76
+ ## Pitfalls
77
+ Building billing, marketing pages, or a public signup. Checking the role only in the React page. Editing production data before the audit row exists.
78
+
79
+ ## Confirm with user
80
+ Who can write, what data is sensitive, where it is hosted, and which table is in scope. Do not invent a roadmap or a second department's requirements.
81
+
82
+ ## Entries to load
83
+ Each phase lists its files. Open those rows only.
@@ -0,0 +1,83 @@
1
+ ---
2
+ title: SaaS web app
3
+ type: blueprint
4
+ tags: [blueprint, saas]
5
+ stack: nextjs
6
+ status: reviewed
7
+ verified: 2026-11-22
8
+ description: B2B or B2C web app with accounts, one core workflow, and billing.
9
+ ---
10
+
11
+ # SaaS web app
12
+
13
+ ## Summary
14
+ A signed-in web app. One workflow works end to end before you add a second feature. Money and roles come after that workflow is real.
15
+
16
+ ## Capabilities
17
+ Must: email and password or OAuth sign-in, one core workflow, billing, settings.
18
+ Should: roles, transactional email, an audit row for writes.
19
+ Later: SSO, a public API, product analytics.
20
+
21
+ ## Reference architecture
22
+ Browser calls Route Handlers. Handlers check the session, validate input, and read or write Postgres. Slow work goes to a job. Files go to object storage. The webhook is a separate route that verifies a signature before it writes.
23
+
24
+ ## Data model starter
25
+ users (id, email, role). organizations (id, name). memberships (user_id, organization_id, role). The core table for the workflow, with organization_id on every row. subscriptions (organization_id, status, price_id). Access reads subscriptions.status. Do not read plan status from the browser.
26
+
27
+ ## Integrations
28
+ Auth, hosted checkout, webhooks, transactional email, object storage. The vendor is a confirm-with-user choice. The job each one does is not.
29
+
30
+ ## Phases
31
+
32
+ ### Phase 0: Scope and decisions
33
+ - Confirm who pays and which plans exist
34
+ - Confirm the one workflow that must work on day one
35
+ - Confirm which data is sensitive
36
+ Acceptance: Those three answers are written in Current state.
37
+ Gate: The user approved the scope in writing. No application code yet.
38
+ Entries: .ctx/START.md, base/workflow/idea-to-spec.md
39
+
40
+ ### Phase 1: Foundation
41
+ - Create the repo, env sample, CI, and database
42
+ - Add sign-in and a session check on every private route
43
+ Acceptance: A signed-out request to a private route returns 401.
44
+ Gate: CI is green and the database migration runs from empty.
45
+ Entries: nextjs-fullstack/backend/api-conventions.md, nextjs-fullstack/backend/auth-and-roles.md, nextjs-fullstack/backend/database.md
46
+
47
+ ### Phase 2: Core workflow
48
+ - Ship one create, read, update, and delete path for the core table
49
+ - Show loading, empty, and error states on that screen
50
+ Acceptance: One real record can be created and read back while signed in.
51
+ Gate: The workflow test passes. Types and lint are clean.
52
+ Entries: nextjs-fullstack/playbooks/add-crud.md, nextjs-fullstack/frontend/forms.md, nextjs-fullstack/frontend/loading-empty-error.md
53
+
54
+ ### Phase 3: Accounts and money
55
+ - Add roles and enforce them on the server
56
+ - Add hosted checkout, a verified webhook, and transactional email
57
+ Acceptance: A retried webhook does not grant access twice.
58
+ Gate: Billing status is read from the database, not from the client.
59
+ Entries: nextjs-fullstack/playbooks/add-billing.md, nextjs-fullstack/integrations/payments.md, nextjs-fullstack/integrations/webhooks.md
60
+
61
+ ### Phase 4: Hardening
62
+ - Apply the security baseline, request logs, backups, and a slow-query check
63
+ Acceptance: A failed payment removes access. Secrets are not in the repo.
64
+ Gate: doctor and the test suite exit 0.
65
+ Entries: base/rules/security-baseline.md, base/rules/definition-of-done.md
66
+
67
+ ### Phase 5: Launch
68
+ - Add the legal pages the user named, the rollout checklist, and a rollback note
69
+ Acceptance: The user can deploy, watch errors, and roll back.
70
+ Gate: The user approved the production deploy.
71
+ Entries: nextjs-fullstack/build-deploy/deploy.md, nextjs-fullstack/playbooks/ship-to-prod.md
72
+
73
+ ## Gate
74
+ A phase gate stays `[ ]` until its Acceptance line is true. Do not open the next phase to get around a red gate.
75
+
76
+ ## Pitfalls
77
+ Building feature screens before sign-in and the organization_id column exist. Trusting the client for the plan. Parsing a webhook body before the signature check.
78
+
79
+ ## Confirm with user
80
+ Who pays, which plans, which data is sensitive, which auth vendor, and the deadline. Do not invent prices, demand, or competitors.
81
+
82
+ ## Entries to load
83
+ Each phase lists its files. Open those rows only.
@@ -0,0 +1,45 @@
1
+ ---
2
+ title: Continuous integration
3
+ type: doc
4
+ tags: [ci, tests]
5
+ stack: nextjs
6
+ status: reviewed
7
+ verified: 2026-12-07
8
+ description: Load before adding or changing the check that runs on every push.
9
+ ---
10
+
11
+ # Continuous integration
12
+
13
+ ## Use when
14
+ A change should be rejected when tests or types fail.
15
+
16
+ ## Default
17
+ One workflow runs install, typecheck, and the test suite on every push.
18
+
19
+ ## Use instead when
20
+ A local script the user runs by hand. Do not add a second remote that does the same job.
21
+
22
+ ## Never
23
+ Never skip the suite with a flag to get a green mark. Never store a token in the workflow file.
24
+
25
+ ## Why
26
+ The check is the only thing that stops a broken branch from looking finished.
27
+
28
+ ## Steps
29
+ 1. Run the same commands a developer can run locally.
30
+ 2. Fail the job when any command exits non-zero.
31
+ 3. Cache dependencies. Do not cache the test result.
32
+
33
+ ## Done when
34
+ A commit that breaks a test does not go green.
35
+
36
+ ## Example
37
+ A pull request with a failing test stays blocked.
38
+
39
+ ## Common mistakes
40
+ A badge that is always green because the job was disabled.
41
+
42
+ ## Sources
43
+ Connore pack. Original wording. No vendor text copied.
44
+
45
+ License: MIT
@@ -0,0 +1,46 @@
1
+ ---
2
+ title: Deployment
3
+ type: doc
4
+ tags: [deploy]
5
+ stack: nextjs
6
+ status: reviewed
7
+ verified: 2026-12-07
8
+ description: Load before the first production deploy or a change to how it ships.
9
+ ---
10
+
11
+ # Deployment
12
+
13
+ ## Use when
14
+ The app needs a public environment.
15
+
16
+ ## Default
17
+ The host runs the build from a clean install. Env vars are set on the host. The database migration runs as its own step before traffic moves.
18
+
19
+ ## Use instead when
20
+ A preview for one branch. Same rules, with a separate database.
21
+
22
+ ## Never
23
+ Never point a preview at the production database. Never commit the host token. Never skip the migration and fix it by hand in production.
24
+
25
+ ## Why
26
+ The machine that built it locally is not the machine that serves it.
27
+
28
+ ## Steps
29
+ 1. Pick the host with the user.
30
+ 2. Set the env vars from the example file's names, with real values only on the host.
31
+ 3. Run migrations before the new version takes traffic.
32
+ 4. Confirm one signed-in request against production, then watch errors.
33
+
34
+ ## Done when
35
+ A new environment can be created from the repo and the env names alone.
36
+
37
+ ## Example
38
+ The example file lists DATABASE_URL with a placeholder. Production has the real url only in the host.
39
+
40
+ ## Common mistakes
41
+ Building on a laptop and uploading the folder. Sharing one database between preview and production.
42
+
43
+ ## Sources
44
+ Connore pack.
45
+
46
+ License: MIT
@@ -0,0 +1,45 @@
1
+ ---
2
+ title: Monitoring
3
+ type: doc
4
+ tags: [logs, errors]
5
+ stack: nextjs
6
+ status: reviewed
7
+ verified: 2026-12-07
8
+ description: Load before a production deploy or when asked how failures will be seen.
9
+ ---
10
+
11
+ # Monitoring
12
+
13
+ ## Use when
14
+ The user needs to know when production breaks.
15
+
16
+ ## Default
17
+ Log a request id, the route, and the status. Alert on an error spike, not on a single 404.
18
+
19
+ ## Use instead when
20
+ A local project with no users. Say there is nothing to watch yet.
21
+
22
+ ## Never
23
+ Never log a password, a token, a card number, or a full request body.
24
+
25
+ ## Why
26
+ Without a signal, the first report is a user.
27
+
28
+ ## Steps
29
+ 1. Name the log line for a handled error and an unhandled one.
30
+ 2. Keep secrets out of the line.
31
+ 3. Tell the user where to look after deploy.
32
+
33
+ ## Done when
34
+ A forced 500 produces one log line and no secret.
35
+
36
+ ## Example
37
+ The refund failure logs the order id and the status, not the card.
38
+
39
+ ## Common mistakes
40
+ Logging the whole JSON body. An alert on every 404.
41
+
42
+ ## Sources
43
+ Connore pack. Original wording. No vendor text copied.
44
+
45
+ License: MIT
@@ -0,0 +1,46 @@
1
+ ---
2
+ title: Performance
3
+ type: doc
4
+ tags: [performance, bundle]
5
+ stack: nextjs
6
+ status: reviewed
7
+ verified: 2026-12-07
8
+ description: Load when a page is slow or a dependency is large.
9
+ ---
10
+
11
+ # Performance
12
+
13
+ ## Use when
14
+ A screen feels slow, or a heavy library is about to join the first load.
15
+
16
+ ## Default
17
+ Measure before changing. Split a route that most sessions never open. Do not lazy-load the thing the user sees first.
18
+
19
+ ## Use instead when
20
+ A state update that re-renders too often. Fix where the state lives before splitting code.
21
+
22
+ ## Never
23
+ Never add a memo wrapper as the first response. Never lazy-load the hero.
24
+
25
+ ## Why
26
+ Agents add libraries and then every page downloads them.
27
+
28
+ ## Steps
29
+ 1. Note what is slow: first paint, a click, or a list.
30
+ 2. Keep the heavy editor, chart, or map behind the interaction that opens it.
31
+ 3. Set width and height on images so the page does not jump.
32
+ 4. Compare the bundle before and after. A guess is not a result.
33
+
34
+ ## Done when
35
+ The change has a before and after, and the first screen did not get slower.
36
+
37
+ ## Example
38
+ A chart library loads when the user opens the report, not on the dashboard shell.
39
+
40
+ ## Common mistakes
41
+ Lazy-loading the header. Optimising a component that was not in the slow path.
42
+
43
+ ## Sources
44
+ Connore pack. No benchmark number is claimed.
45
+
46
+ License: MIT
@@ -0,0 +1,45 @@
1
+ ---
2
+ title: Project structure
3
+ type: doc
4
+ tags: [structure, folders]
5
+ stack: nextjs
6
+ status: reviewed
7
+ verified: 2026-12-07
8
+ description: Load before creating folders or a new route.
9
+ ---
10
+
11
+ # Project structure
12
+
13
+ ## Use when
14
+ A new app, or a file that does not have an obvious home.
15
+
16
+ ## Default
17
+ Routes live in app/. Shared UI in components/. One folder per feature under features/. Server-only code stays out of client components.
18
+
19
+ ## Use instead when
20
+ A one-file script. Keep it flat until a second feature needs the split.
21
+
22
+ ## Never
23
+ Never import a server secret into a file marked with use client. Never let one feature import another feature's internals.
24
+
25
+ ## Why
26
+ Agents invent a new folder per file. A stable split is what later tasks search.
27
+
28
+ ## Steps
29
+ 1. Put a route, layout, and loading file only in app/.
30
+ 2. Colocate a feature's components, actions, and schema in features/<name>/.
31
+ 3. Share a component only after a second feature uses it.
32
+
33
+ ## Done when
34
+ A newcomer can guess the folder from the kind of change.
35
+
36
+ ## Example
37
+ A billing form lives in features/billing/, and app/billing/page.js only renders it.
38
+
39
+ ## Common mistakes
40
+ A components/ folder of 80 unrelated files. A utils.js that every feature imports.
41
+
42
+ ## Sources
43
+ Connore pack. Folder roles summarised, no framework snippet copied.
44
+
45
+ License: MIT
@@ -0,0 +1,47 @@
1
+ ---
2
+ title: Release checklist
3
+ type: doc
4
+ tags: [release, deploy]
5
+ stack: nextjs
6
+ status: reviewed
7
+ verified: 2026-12-07
8
+ description: Load before telling the user a change can ship.
9
+ ---
10
+
11
+ # Release checklist
12
+
13
+ ## Use when
14
+ The branch is about to go to production.
15
+
16
+ ## Default
17
+ Tests pass, secrets are env-only, migrations run from empty, and there is a way back.
18
+
19
+ ## Use instead when
20
+ A docs-only change with no runtime effect. Say that and skip the migration check.
21
+
22
+ ## Never
23
+ Never deploy because the page looks right locally. Never ship a migration you cannot reverse or follow.
24
+
25
+ ## Why
26
+ The missed step is the one that locks users out after the happy path demo.
27
+
28
+ ## Steps
29
+ 1. Run the test suite and lint.
30
+ 2. Confirm the migration applies on an empty database.
31
+ 3. Confirm production secrets are set and are not in the diff.
32
+ 4. Name the rollback: previous release, or a forward fix.
33
+ 5. Watch the error log for the first requests after deploy.
34
+
35
+ ## Done when
36
+ The user has the deploy step, the rollback, and a clean suite.
37
+
38
+ ## Example
39
+ Billing ships only after a replayed webhook is shown not to double-grant.
40
+
41
+ ## Common mistakes
42
+ Shipping from a dirty working tree. Discovering a missing env var from the first user.
43
+
44
+ ## Sources
45
+ Connore pack.
46
+
47
+ License: MIT
@@ -0,0 +1,46 @@
1
+ ---
2
+ title: Testing approach
3
+ type: doc
4
+ tags: [testing]
5
+ stack: nextjs
6
+ status: reviewed
7
+ verified: 2026-12-07
8
+ description: Load before adding a test or calling a change finished.
9
+ ---
10
+
11
+ # Testing approach
12
+
13
+ ## Use when
14
+ A behavior can regress, or the definition of done asks for a check.
15
+
16
+ ## Default
17
+ Test the path the user walks: sign in, the write, the read-back. One assertion per behavior. Do not mock the thing you are trying to prove.
18
+
19
+ ## Use instead when
20
+ A pure function with a sharp edge, such as a price calculation. A unit test is enough.
21
+
22
+ ## Never
23
+ Never assert that a mock was called and call the feature tested. Never delete a failing test to go green.
24
+
25
+ ## Why
26
+ The suite stays green while the real request returns 500.
27
+
28
+ ## Steps
29
+ 1. Name the behavior in the test name.
30
+ 2. Hit the handler or the page with a real session fixture.
31
+ 3. Assert the status and the row that was written.
32
+ 4. Keep the test data inside the test, not in a shared account.
33
+
34
+ ## Done when
35
+ The test fails if the authorization check is removed.
36
+
37
+ ## Example
38
+ A member of another org requests the invoice and the test expects 404.
39
+
40
+ ## Common mistakes
41
+ Snapshotting the whole page. A test that only checks the component renders.
42
+
43
+ ## Sources
44
+ Connore pack.
45
+
46
+ License: MIT
@@ -0,0 +1,46 @@
1
+ ---
2
+ title: Evals
3
+ type: doc
4
+ tags: [ai, eval]
5
+ stack: nextjs
6
+ status: reviewed
7
+ verified: 2026-12-07
8
+ description: Load before changing a prompt that users depend on.
9
+ ---
10
+
11
+ # Evals
12
+
13
+ ## Use when
14
+ A model call is part of the product and a change could make it worse.
15
+
16
+ ## Default
17
+ Keep a small set of inputs with the output you accept. Run it before shipping a prompt change.
18
+
19
+ ## Use instead when
20
+ A one-off experiment the user will not keep. Say so and skip the set.
21
+
22
+ ## Never
23
+ Never claim the model is correct because one example looked good. Never put private customer text in the set.
24
+
25
+ ## Why
26
+ A prompt change with no check ships a quiet regression.
27
+
28
+ ## Steps
29
+ 1. Write inputs that represent the real job.
30
+ 2. Record the answer you would accept for each.
31
+ 3. Run the set when the prompt or the model name changes.
32
+ 4. Block the change when a case that used to pass now fails.
33
+
34
+ ## Done when
35
+ The set runs and the result is written down.
36
+
37
+ ## Example
38
+ Five support replies, each with the reply you would send.
39
+
40
+ ## Common mistakes
41
+ Judging from one happy prompt. Using a live customer's message as a fixture.
42
+
43
+ ## Sources
44
+ Connore pack. Original wording. No vendor text copied.
45
+
46
+ License: MIT
@@ -0,0 +1,45 @@
1
+ ---
2
+ title: Golden app
3
+ type: doc
4
+ tags: [example, reference]
5
+ stack: nextjs
6
+ status: reviewed
7
+ verified: 2026-12-07
8
+ description: Load when you need a shape for a small app and the blueprint is already chosen.
9
+ ---
10
+
11
+ # Golden app
12
+
13
+ ## Use when
14
+ The user wants a reference layout for the pieces a small app has.
15
+
16
+ ## Default
17
+ One signed-in workflow, one table with an owner column, and the four states on the screen that reads it.
18
+
19
+ ## Use instead when
20
+ The blueprint already names the files to open. Follow the blueprint, not this note.
21
+
22
+ ## Never
23
+ Never copy this into a product and call it done. Never add a second workflow to the example.
24
+
25
+ ## Why
26
+ An example that tries to be a product teaches the wrong size.
27
+
28
+ ## Steps
29
+ 1. Read the blueprint phase you are in.
30
+ 2. Match its data rule and its auth rule.
31
+ 3. Stop when that phase gate is true.
32
+
33
+ ## Done when
34
+ The example is used as a map, and the product code follows the blueprint.
35
+
36
+ ## Example
37
+ Phase 2 is one list and one form, not a settings maze.
38
+
39
+ ## Common mistakes
40
+ Building every integration into the example before the first workflow works.
41
+
42
+ ## Sources
43
+ Connore pack. Original wording. No vendor text copied.
44
+
45
+ License: MIT
@@ -0,0 +1,46 @@
1
+ ---
2
+ title: Accessibility
3
+ type: doc
4
+ tags: [a11y, keyboard]
5
+ stack: nextjs
6
+ status: reviewed
7
+ verified: 2026-12-07
8
+ description: Load when adding a control, a dialog, or text on a colored background.
9
+ ---
10
+
11
+ # Accessibility
12
+
13
+ ## Use when
14
+ Anything the user can click, or text that must be read.
15
+
16
+ ## Default
17
+ Use the real element: button, link, label. Keep focus visible. Meet contrast for the colors the owner chose.
18
+
19
+ ## Use instead when
20
+ A purely decorative image. Give it an empty alt and move on.
21
+
22
+ ## Never
23
+ Never remove the focus outline without a replacement. Never convey state by color alone.
24
+
25
+ ## Why
26
+ A mouse-only control ships, and the keyboard user cannot finish the task.
27
+
28
+ ## Steps
29
+ 1. Pair each input with a label.
30
+ 2. Tab through the new screen with the pointer unused.
31
+ 3. Put the dialog focus inside the dialog and return it on close.
32
+ 4. Check the text color against its background before calling the screen done.
33
+
34
+ ## Done when
35
+ Every new control is reachable by keyboard and has a visible focus.
36
+
37
+ ## Example
38
+ An icon button has an accessible name. The error text is tied to the field.
39
+
40
+ ## Common mistakes
41
+ A clickable div. A placeholder standing in for a label. A dialog that traps focus and never releases it.
42
+
43
+ ## Sources
44
+ Connore pack. Thresholds live in the product accessibility notes, not restated here as new measurements.
45
+
46
+ License: MIT
@@ -0,0 +1,46 @@
1
+ ---
2
+ title: Component usage
3
+ type: doc
4
+ tags: [components, ui]
5
+ stack: nextjs
6
+ status: reviewed
7
+ verified: 2026-12-07
8
+ description: Load before building a control or wrapping a library component.
9
+ ---
10
+
11
+ # Component usage
12
+
13
+ ## Use when
14
+ A button, input, dialog, or menu is needed.
15
+
16
+ ## Default
17
+ Use the project's existing component. If none exists, add one with a name, a size, and an explicit state for loading and disabled.
18
+
19
+ ## Use instead when
20
+ A one-off graphic that is not interactive. It does not need the component set.
21
+
22
+ ## Never
23
+ Never attach a click handler to a div and call it a button. Never restyle a library component with a one-off class at every call site.
24
+
25
+ ## Why
26
+ Agents restyle the same control five ways, then the dialog loses its focus trap.
27
+
28
+ ## Steps
29
+ 1. Search the project component folder first.
30
+ 2. Pass content as children instead of adding another boolean prop.
31
+ 3. Give icon-only controls a text name.
32
+ 4. Keep the library's keyboard behavior. Do not rewrite a dialog.
33
+
34
+ ## Done when
35
+ The same action looks the same in every screen, and a keyboard can reach it.
36
+
37
+ ## Example
38
+ A delete action uses the shared button with a danger tone, not a new red div.
39
+
40
+ ## Common mistakes
41
+ Twelve boolean props. A custom modal that does not return focus on close.
42
+
43
+ ## Sources
44
+ Connore pack.
45
+
46
+ License: MIT