@activatus/code-standards 0.0.0-stage → 3.0.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 (180) hide show
  1. package/README.md +199 -2
  2. package/docs/Guides/_category_.json +4 -0
  3. package/docs/Guides/component-library-workflow.md +182 -0
  4. package/docs/Guides/migrating.md +161 -0
  5. package/docs/Guides/setup.md +158 -0
  6. package/docs/Standards/_category_.json +4 -0
  7. package/docs/Standards/agent-skills.md +125 -0
  8. package/docs/Standards/agent-specs.md +74 -0
  9. package/docs/Standards/direnv.mdx +249 -0
  10. package/docs/Standards/documentation.md +314 -0
  11. package/docs/Standards/editorconfig.md +74 -0
  12. package/docs/Standards/eslint.md +900 -0
  13. package/docs/Standards/human-readable-names.md +274 -0
  14. package/docs/Standards/lint-errors.md +171 -0
  15. package/docs/Standards/prettier.md +106 -0
  16. package/docs/Standards/readable-code.md +570 -0
  17. package/docs/Standards/stylelint.md +193 -0
  18. package/docs/Standards/styling.md +290 -0
  19. package/docs/Standards/tech-stack.md +158 -0
  20. package/docs/Structure/_category_.json +4 -0
  21. package/docs/Structure/api-routes.md +118 -0
  22. package/docs/Structure/component-organization.md +526 -0
  23. package/docs/Structure/folder-structure.md +366 -0
  24. package/docs/Structure/import-organization.md +158 -0
  25. package/docs/Structure/naming-conventions.md +334 -0
  26. package/docs/design-system-components.md +117 -0
  27. package/docs/intro.md +44 -0
  28. package/docs/ontology.md +127 -0
  29. package/docs/templates.mdx +396 -0
  30. package/docs/version-history.md +338 -0
  31. package/package.json +60 -3
  32. package/scripts/renameSymbol.mjs +188 -0
  33. package/static/templates/.editorconfig +25 -0
  34. package/static/templates/.envrc +25 -0
  35. package/static/templates/.nvmrc +1 -0
  36. package/static/templates/AGENTS.md +163 -0
  37. package/static/templates/decision-doc.md +19 -0
  38. package/static/templates/docs/ai/agent-harness.md +17 -0
  39. package/static/templates/docs/ai/agents.md +17 -0
  40. package/static/templates/docs/ai/architecture.md +17 -0
  41. package/static/templates/docs/ai/context.md +17 -0
  42. package/static/templates/docs/ai/model-routing.md +17 -0
  43. package/static/templates/docs/ai/models.md +17 -0
  44. package/static/templates/docs/ai/retrieval.md +17 -0
  45. package/static/templates/docs/ai/tools.md +17 -0
  46. package/static/templates/docs/architecture/authentication.md +17 -0
  47. package/static/templates/docs/architecture/backend.md +17 -0
  48. package/static/templates/docs/architecture/background-jobs.md +17 -0
  49. package/static/templates/docs/architecture/backups.md +17 -0
  50. package/static/templates/docs/architecture/caching.md +17 -0
  51. package/static/templates/docs/architecture/ci-cd.md +17 -0
  52. package/static/templates/docs/architecture/disaster-recovery.md +17 -0
  53. package/static/templates/docs/architecture/environments.md +17 -0
  54. package/static/templates/docs/architecture/frontend.md +17 -0
  55. package/static/templates/docs/architecture/hosting.md +17 -0
  56. package/static/templates/docs/architecture/observability.md +17 -0
  57. package/static/templates/docs/architecture/realtime.md +17 -0
  58. package/static/templates/docs/architecture/search.md +17 -0
  59. package/static/templates/docs/architecture/services.md +17 -0
  60. package/static/templates/docs/architecture/state-management.md +17 -0
  61. package/static/templates/docs/architecture/storage.md +17 -0
  62. package/static/templates/docs/architecture/system.md +17 -0
  63. package/static/templates/docs/business/buying-trigger.md +17 -0
  64. package/static/templates/docs/business/customer-value.md +17 -0
  65. package/static/templates/docs/business/customer.md +17 -0
  66. package/static/templates/docs/business/defensibility.md +17 -0
  67. package/static/templates/docs/business/growth.md +17 -0
  68. package/static/templates/docs/business/pricing.md +17 -0
  69. package/static/templates/docs/business/revenue-model.md +17 -0
  70. package/static/templates/docs/business/unit-economics.md +17 -0
  71. package/static/templates/docs/data/analytics.md +17 -0
  72. package/static/templates/docs/data/audit.md +17 -0
  73. package/static/templates/docs/data/database.md +17 -0
  74. package/static/templates/docs/data/indexing.md +17 -0
  75. package/static/templates/docs/data/migrations.md +17 -0
  76. package/static/templates/docs/data/model.md +17 -0
  77. package/static/templates/docs/data/retention.md +17 -0
  78. package/static/templates/docs/data/schema.md +17 -0
  79. package/static/templates/docs/deployment/approval.md +17 -0
  80. package/static/templates/docs/deployment/live-verification.md +17 -0
  81. package/static/templates/docs/deployment/process.md +17 -0
  82. package/static/templates/docs/deployment/rollback.md +17 -0
  83. package/static/templates/docs/design/design-system.md +17 -0
  84. package/static/templates/docs/design/errors.md +17 -0
  85. package/static/templates/docs/design/feedback.md +17 -0
  86. package/static/templates/docs/design/interactions.md +17 -0
  87. package/static/templates/docs/design/layout.md +17 -0
  88. package/static/templates/docs/design/navigation.md +17 -0
  89. package/static/templates/docs/design/principles.md +17 -0
  90. package/static/templates/docs/design/responsive.md +17 -0
  91. package/static/templates/docs/development/branching.md +17 -0
  92. package/static/templates/docs/development/code-quality.md +17 -0
  93. package/static/templates/docs/development/coding-standards.md +21 -0
  94. package/static/templates/docs/development/commits.md +17 -0
  95. package/static/templates/docs/development/merge-strategy.md +17 -0
  96. package/static/templates/docs/development/process.md +17 -0
  97. package/static/templates/docs/development/pull-requests.md +17 -0
  98. package/static/templates/docs/experience/accessibility.md +17 -0
  99. package/static/templates/docs/experience/aha-moment.md +17 -0
  100. package/static/templates/docs/experience/anti-experience.md +17 -0
  101. package/static/templates/docs/experience/friction.md +17 -0
  102. package/static/templates/docs/experience/outcomes.md +17 -0
  103. package/static/templates/docs/experience/principles.md +17 -0
  104. package/static/templates/docs/experience/retention.md +17 -0
  105. package/static/templates/docs/experience/sharing.md +17 -0
  106. package/static/templates/docs/overview/how-it-works.md +17 -0
  107. package/static/templates/docs/overview/what-is-it.md +17 -0
  108. package/static/templates/docs/overview/writing-docs.md +16 -0
  109. package/static/templates/docs/pitch/alternatives.md +17 -0
  110. package/static/templates/docs/pitch/assumptions.md +17 -0
  111. package/static/templates/docs/pitch/audience.md +17 -0
  112. package/static/templates/docs/pitch/concept.md +17 -0
  113. package/static/templates/docs/pitch/differentiators.md +17 -0
  114. package/static/templates/docs/pitch/outcomes.md +17 -0
  115. package/static/templates/docs/pitch/problem.md +17 -0
  116. package/static/templates/docs/pitch/product-market-fit.md +17 -0
  117. package/static/templates/docs/pitch/success-criteria.md +17 -0
  118. package/static/templates/docs/pitch/validation.md +17 -0
  119. package/static/templates/docs/pitch/value-proposition.md +17 -0
  120. package/static/templates/docs/pitch/vision.md +17 -0
  121. package/static/templates/docs/scope/core.md +17 -0
  122. package/static/templates/docs/scope/exclusions.md +17 -0
  123. package/static/templates/docs/scope/future.md +17 -0
  124. package/static/templates/docs/scope/launch.md +17 -0
  125. package/static/templates/docs/scope/post-launch.md +17 -0
  126. package/static/templates/docs/scope/priorities.md +17 -0
  127. package/static/templates/docs/scope/quality-bar.md +17 -0
  128. package/static/templates/docs/security/audit.md +17 -0
  129. package/static/templates/docs/security/data-access.md +17 -0
  130. package/static/templates/docs/security/logging.md +17 -0
  131. package/static/templates/docs/security/privacy.md +17 -0
  132. package/static/templates/docs/security/secrets.md +17 -0
  133. package/static/templates/docs/security/threat-model.md +17 -0
  134. package/static/templates/docs/testing/end-to-end.md +17 -0
  135. package/static/templates/docs/testing/integration.md +17 -0
  136. package/static/templates/docs/testing/regression.md +17 -0
  137. package/static/templates/docs/testing/security.md +17 -0
  138. package/static/templates/docs/testing/strategy.md +17 -0
  139. package/static/templates/docs/testing/test-data.md +17 -0
  140. package/static/templates/docs/testing/unit.md +17 -0
  141. package/static/templates/docs/uat/checks.md +17 -0
  142. package/static/templates/docs/uat/strategy.md +17 -0
  143. package/static/templates/docs/users/permissions.md +17 -0
  144. package/static/templates/docs/users/roles.md +17 -0
  145. package/static/templates/docs/users/user-types.md +17 -0
  146. package/static/templates/docs/workflows/assignment.md +17 -0
  147. package/static/templates/docs/workflows/bugfix.md +17 -0
  148. package/static/templates/docs/workflows/dependencies.md +17 -0
  149. package/static/templates/docs/workflows/deployment.md +17 -0
  150. package/static/templates/docs/workflows/development.md +17 -0
  151. package/static/templates/docs/workflows/planning.md +17 -0
  152. package/static/templates/docs/workflows/review.md +17 -0
  153. package/static/templates/docs/workflows/uat.md +17 -0
  154. package/static/templates/docsSite/docusaurus.config.mjs +144 -0
  155. package/static/templates/docsSite/gitignore.txt +3 -0
  156. package/static/templates/docsSite/package.json.txt +42 -0
  157. package/static/templates/docsSite/pnpm-workspace.yaml +2 -0
  158. package/static/templates/docsSite/sidebars.mjs +7 -0
  159. package/static/templates/docsSite/src/css/custom.css +7 -0
  160. package/static/templates/docsSite/src/pages/index.tsx +9 -0
  161. package/static/templates/docsSite/static/images/logo.svg +4 -0
  162. package/static/templates/docsSite/tsconfig.json +7 -0
  163. package/static/templates/eslint/base/eslint.config.mjs +104 -0
  164. package/static/templates/eslint/nextjs/eslint.config.mjs +181 -0
  165. package/static/templates/eslint/react/eslint.config.mjs +173 -0
  166. package/static/templates/eslint/typescript/eslint.config.mjs +154 -0
  167. package/static/templates/globals.css +16 -0
  168. package/static/templates/husky/pre-commit +1 -0
  169. package/static/templates/next.config.mjs +21 -0
  170. package/static/templates/prettier.config.mjs +26 -0
  171. package/static/templates/skills/codeReview.md +31 -0
  172. package/static/templates/skills/format.md +18 -0
  173. package/static/templates/skills/lint.md +21 -0
  174. package/static/templates/skills/lintFix.md +24 -0
  175. package/static/templates/skills/securityAudit.md +28 -0
  176. package/static/templates/skills/test.md +24 -0
  177. package/static/templates/skills/typescript.md +28 -0
  178. package/static/templates/skills/updateLayout.md +20 -0
  179. package/static/templates/stylelint/css/stylelint.config.mjs +40 -0
  180. package/static/templates/stylelint/scss/stylelint.config.mjs +13 -0
@@ -0,0 +1,334 @@
1
+ ---
2
+ sidebar_position: 5
3
+ ---
4
+
5
+ # Naming Conventions
6
+
7
+ Consistent naming conventions make codebases easier to navigate, understand, and maintain.
8
+
9
+ **Every name must be human-readable** — folders, files, props, form fields, types, database columns, everything. See [Human-Readable Names](/Standards/human-readable-names).
10
+
11
+ This page covers **how** a name is written. **Which words** to use comes from the [Ontology](/ontology): a Decision Doc is `decisionDoc` in code and `decision_doc` in the database, never `docDecision` or `decisionFile`.
12
+
13
+ ## File Naming
14
+
15
+ ### Components
16
+
17
+ **Use PascalCase** for React/Vue component files:
18
+
19
+ ```tsx
20
+ ✅ Good
21
+ UserProfile.tsx
22
+ DataTable.tsx
23
+ SidebarNavigation.tsx
24
+ SubmitButton.tsx
25
+
26
+ ❌ Bad
27
+ userProfile.tsx
28
+ data_table.tsx
29
+ sidebar-nav.tsx
30
+ ```
31
+
32
+ **Use PascalCase** for component declarations:
33
+
34
+ ```tsx
35
+ ✅ Good
36
+ const UserProfile = () => { };
37
+ const DataTable = () => { };
38
+ const SubmitButton = () => { };
39
+
40
+ ❌ Bad
41
+ const userProfile = () => { };
42
+ const dataTable = () => { }
43
+ const submit_button = () => { };
44
+ ```
45
+
46
+ ### Utils
47
+
48
+ **Use camelCase** for utils files:
49
+
50
+ ```ts
51
+ ✅ Good
52
+ apiUtils.ts
53
+ formatDate.ts
54
+ formatCurrency.ts
55
+
56
+ ❌ Bad
57
+ api-utils.ts
58
+ format-date.ts
59
+ string-manipulation.ts
60
+ format_currency.ts
61
+ ```
62
+
63
+ ### Hooks
64
+
65
+ **Use camelCase** with `use` prefix:
66
+
67
+ ```ts
68
+ ✅ Good
69
+ useUserData.ts
70
+ useDebounce.ts
71
+ useFormValidation.ts
72
+ useLocalStorage.ts
73
+
74
+ ❌ Bad
75
+ userData.ts
76
+ getDebounce.ts
77
+ formValidation.ts
78
+ use-local-storage.ts
79
+ ```
80
+
81
+ ### Stores
82
+
83
+ **Use camelCase** with `Store` suffix:
84
+
85
+ ```ts
86
+ ✅ Good
87
+ userStore.ts
88
+ cartStore.ts
89
+ authenticationStore.ts
90
+ preferencesStore.ts
91
+
92
+ ❌ Bad
93
+ user.ts
94
+ cart.ts
95
+ useAuthStore.ts
96
+ auth-store.ts
97
+ ```
98
+
99
+ ### Services
100
+
101
+ **Use camelCase** with `Service` suffix:
102
+
103
+ ```ts
104
+ ✅ Good
105
+ userService.ts
106
+ apiService.ts
107
+ paymentService.ts
108
+ notificationService.ts
109
+
110
+ ❌ Bad
111
+ UserService.ts
112
+ api.ts
113
+ payment.ts
114
+ service-user.ts
115
+ ```
116
+
117
+ ### Types
118
+
119
+ **Use camelCase** descriptive names:
120
+
121
+ ```ts
122
+ ✅ Good
123
+ userWithPermissions.ts
124
+ apiResponseData.ts
125
+ cartItemWithProduct.ts
126
+ recordingUsageData.ts
127
+
128
+ ❌ Bad
129
+ UserWithPermissions.ts
130
+ userTypes.ts
131
+ apiResponse.ts
132
+ data.ts
133
+ ```
134
+
135
+ ### Constants
136
+
137
+ **Use camelCase** for constant file names, **SCREAMING_SNAKE_CASE** for the constants themselves:
138
+
139
+ ```ts
140
+ ✅ Good
141
+ // File names
142
+ userRole.ts
143
+ httpStatus.ts
144
+ paymentStatus.ts
145
+
146
+ // Constant Variable Names
147
+ const MAXIMUM_RETRY_ATTEMPTS = 3;
148
+ const API_TIMEOUT_MILLISECONDS = 5000;
149
+ const COOKIE_DURATION_DAYS = 30;
150
+
151
+ ❌ Bad Constant Variable Names
152
+ const maxRetryAttempts = 3;
153
+ const apiTimeout = 5000;
154
+ const cookieDays = 30;
155
+ ```
156
+
157
+ ### CSS Modules
158
+
159
+ **Use camelCase** with `.module.css` suffix:
160
+
161
+ ```tsx
162
+ ✅ Good
163
+ userProfile.module.css
164
+ dataTableStyles.module.css
165
+ formComponents.module.css
166
+
167
+ ❌ Bad
168
+ UserProfile.module.css
169
+ data-table-styles.css
170
+ form-components.module.css
171
+ ```
172
+
173
+ ### CSS Variables
174
+
175
+ **Use kebab-case** for CSS variables (custom properties and design tokens): it is the CSS convention, it is what Tailwind requires, and Stylelint enforces it.
176
+
177
+ ```css
178
+ /* ✅ Good */
179
+ --color-brand-primary: #3b82f6;
180
+ --spacing-unit: 0.25rem;
181
+
182
+ /* ❌ Bad */
183
+ --colorBrandPrimary: #3b82f6;
184
+ --spacing_unit: 0.25rem;
185
+ ```
186
+
187
+ See [CSS Styling](/Standards/styling#css-variables).
188
+
189
+ ### Documentation
190
+
191
+ **Use kebab-case** for documentation files. The [docs site](/Standards/documentation) turns each file name into the page's URL, so a doc file is named the way a URL is written:
192
+
193
+ ```tsx
194
+ ✅ Good
195
+ background-jobs.md → /docs/architecture/background-jobs
196
+ design-system.md
197
+ product-market-fit.md
198
+
199
+ ❌ Bad
200
+ backgroundJobs.md → /docs/architecture/backgroundJobs
201
+ design_system.md
202
+ ProductMarketFit.md
203
+ ```
204
+
205
+ ---
206
+
207
+ ## Variables & Functions
208
+
209
+ ### Variables
210
+
211
+ **Use camelCase**, and [full English words](/Standards/readable-code#names-are-full-english-words) — no shorthand:
212
+
213
+ ```ts
214
+ ✅ Good
215
+ const userName = "John";
216
+ const isLoading = true;
217
+ const hasPermission = false;
218
+ const itemCount = 10;
219
+
220
+ ❌ Bad
221
+ const UserName = "John";
222
+ const IsLoading = true;
223
+ const has_permission = false;
224
+ const item_count = 10;
225
+ ```
226
+
227
+ ### Functions
228
+
229
+ Every function is an [arrow function](/Standards/readable-code#arrow-functions-everywhere).
230
+
231
+ **Use camelCase** with descriptive verbs:
232
+
233
+ ```ts
234
+ ✅ Good
235
+ const getUserData = () => { };
236
+ const validateEmail = () => { };
237
+ const calculateTotal = () => { };
238
+ const handleSubmit = () => { };
239
+
240
+ ❌ Bad
241
+ const GetUserData = () => { };
242
+ const validate_email = () => { };
243
+ const total = () => { };
244
+ const submit = () => { };
245
+ ```
246
+
247
+ ### Boolean Variables
248
+
249
+ **Prefix with `is`, `has`, `should`, `can`:**
250
+
251
+ ```ts
252
+ ✅ Good
253
+ const isActive = true;
254
+ const hasPermission = true;
255
+ const shouldUpdate = false;
256
+ const canDelete = true;
257
+
258
+ ❌ Bad
259
+ const active = true;
260
+ const permission = true;
261
+ const update = false;
262
+ const delete = true;
263
+ ```
264
+
265
+ ### Types & Interfaces
266
+
267
+ **Use PascalCase** for types/interfaces, ending in **`Props`** or **`Type`** so it is clear what the name is:
268
+
269
+ - **`Props`** — the single object parameter of a component or function (`ButtonProps`, `CreateUserProps`)
270
+ - **`Type`** — everything else (`UserType`, `OrderStatusType`)
271
+
272
+ ```ts
273
+ ✅ Good
274
+ type UserType = { };
275
+ interface ApiResponseType { }
276
+ interface UserCardProps { }
277
+
278
+ ❌ Bad
279
+ type User = { };
280
+ type userType = { };
281
+ interface api_response { }
282
+ interface UserCardData { }
283
+ ```
284
+
285
+ See [Readable Code](/Standards/readable-code#type-names-say-what-they-are).
286
+
287
+ ---
288
+
289
+ ## When to Use kebab-case
290
+
291
+ Code files are camelCase or PascalCase. A short list of things are kebab-case instead:
292
+
293
+ | Thing | Example | Why |
294
+ | ----------------------- | -------------------------------------- | ---------------------------------------- |
295
+ | **Route folders** | `app/account-settings/` | The folder name becomes the URL |
296
+ | **Documentation files** | `docs/architecture/background-jobs.md` | The file name becomes the URL |
297
+ | **CSS variables** | `--color-brand-primary` | The CSS convention; required by Tailwind |
298
+
299
+ **The rule of thumb: if the name becomes a URL, it is kebab-case.**
300
+
301
+ ---
302
+
303
+ ## Quick Reference
304
+
305
+ | Type | Convention | Example |
306
+ | ----------------------- | -------------------------------- | ---------------------------- |
307
+ | **Component files** | PascalCase | `UserProfile.tsx` |
308
+ | **Utils files** | camelCase | `formatDate.ts` |
309
+ | **Hook files** | camelCase + `use` | `useUserData.ts` |
310
+ | **Store files** | camelCase + `Store` | `userStore.ts` |
311
+ | **Service files** | camelCase + `Service` | `apiService.ts` |
312
+ | **Type files** | camelCase | `userWithRoles.ts` |
313
+ | **Constant files** | camelCase / SCREAMING_SNAKE_CASE | `userRole.ts` / `API_URL.ts` |
314
+ | **CSS modules** | camelCase + `.module.css` | `userProfile.module.css` |
315
+ | **CSS variables** | kebab-case | `--color-brand-primary` |
316
+ | **Documentation files** | kebab-case | `background-jobs.md` |
317
+ | **Variables** | camelCase | `userName` |
318
+ | **Functions** | camelCase | `getUserData` |
319
+ | **Components** | PascalCase | `UserProfile` |
320
+ | **Types** | PascalCase + `Props` or `Type` | `ButtonProps`, `UserType` |
321
+ | **Constants** | SCREAMING_SNAKE_CASE | `API_BASE_URL` |
322
+ | **Booleans** | camelCase + prefix | `isActive`, `hasPermission` |
323
+
324
+ ---
325
+
326
+ ## Enforcing Conventions
327
+
328
+ Use ESLint and Prettier to enforce these conventions automatically:
329
+
330
+ - **eslint-plugin-react** - React naming conventions
331
+ - **simple-import-sort** - Import ordering
332
+ - **@typescript-eslint** - TypeScript naming rules
333
+
334
+ See [ESLint](/Standards/eslint) and [Prettier](/Standards/prettier) configuration for setup.
@@ -0,0 +1,117 @@
1
+ ---
2
+ sidebar_position: 8
3
+ sidebar_label: "Design System Components"
4
+ ---
5
+
6
+ # Design System Components
7
+
8
+ **This page is the contract for how every Activatus component works.** It lists each standard component with its variants and key props.
9
+
10
+ We do not share component code between projects yet, so this page is what keeps them the same. Every project builds its components to the props listed here. See [Future-proofing](/Guides/component-library-workflow#future-proofing) for why.
11
+
12
+ ## How to use this page
13
+
14
+ - **Before building a component, look it up here.** If it is listed, build it with these variants and props — the same names, the same meaning. Do not invent your own.
15
+ - **Do not rename, remove or repurpose a listed prop.** Projects differ in how a component looks, never in [how it works](/Guides/component-library-workflow#same-component-different-paint).
16
+ - **Building a component that is not listed?** Add it to this page in the same piece of work, so the next project builds it the same way.
17
+ - **A project needs something a listed component does not do?** Add the prop or variant here first, then build it. The reference changes before the code does.
18
+ - **How to write each component** — its folder, files, the order inside the file, tests and stories — is in [Component Organization](/Structure/component-organization). This page says _what_ each component takes; that page says _how_ every component is written.
19
+
20
+ This applies to everyone building components, **including AI agents**.
21
+
22
+ ## Global / Navigation
23
+
24
+ | # | Component | Variants | Key props |
25
+ | --- | ------------------ | ----------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
26
+ | 1 | **NavigationBar** | default, large | logo (asset)<br />navigationItems (link[])<br />callToAction (Button)<br />sticky (boolean)<br />transparent (boolean) |
27
+ | 2 | **Expanded Menu** | — | columns (linkGroup[])<br />featured (blok[])<br />trigger (text) |
28
+ | 3 | **Hamburger Menu** | — | icon<br />menuItems (link[])<br />icon (asset)<br />position (left/right) |
29
+ | 4 | **Search Bar** | inline, overlay | placeholder<br />scope (text)<br />showSuggestions (boolean) |
30
+ | 5 | **Promo Bar** | — | text (richtext)<br />link<br />dismissible (boolean)<br />startDate<br />endDate |
31
+ | 6 | **Breadcrumbs** | — | items (link[])<br />separator (text)<br />showHome (boolean) |
32
+ | 7 | **Sidebar** | — | items (link[])<br />position (left/right)<br />collapsible (boolean)<br />width |
33
+ | 8 | **Pagination** | numbered, load-more, infinite | totalPages (number)<br />current (number)<br />showPrevNext (boolean) |
34
+ | 9 | **Footer** | slim, default, large | logo<br />columns (linkGroup[])<br />socialLinks (link[])<br />legalLinks (link[])<br />copyright (text) |
35
+
36
+ ## Auth / Account
37
+
38
+ | # | Component | Variants | Key props |
39
+ | --- | ------------------ | -------- | --------------------------------------------------------------------------------------- |
40
+ | 10 | **Login Form** | — | heading<br />forgotLink<br />signupLink<br />submitLabel |
41
+ | 11 | **Sign-up Form** | — | heading<br />fields (Input[])<br />termsText (richtext)<br />loginLink<br />submitLabel |
42
+ | 12 | **Password Reset** | — | heading<br />helpText<br />submitLabel |
43
+ | 13 | **Account Menu** | — | avatar (asset)<br />userName<br />menuItems (link[])<br />logoutLabel |
44
+
45
+ ## Hero / Headers
46
+
47
+ | # | Component | Variants | Key props |
48
+ | --- | --------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
49
+ | 14 | **Hero Banner** | Image, Video | heading<br />subheading<br />body (richtext)<br />media (asset/video)<br />buttons (Button[])<br />alignment<br />overlay (boolean) |
50
+ | 15 | **Banner** | — | eyebrow<br />heading<br />subheading (richtext)<br />alignment |
51
+
52
+ ## Layout primitives
53
+
54
+ | # | Component | Variants | Key props |
55
+ | --- | -------------------- | -------- | ------------------------------------------------------------------------------------------------------------- |
56
+ | 17 | **Duplex** | — | left (blok[])<br />right (blok[])<br />ratio (50/50, 60/40)<br />verticalAlign<br />reverseOnMobile (boolean) |
57
+ | 18 | **Triplex** | — | columns (blok[] ×3)<br />gap<br />verticalAlign |
58
+ | 19 | **Card Grid** | — | cards (blok[])<br />columns (number)<br />gap |
59
+ | 21 | **Section Wrapper** | — | content (blok[])<br />backgroundColor (token)<br />maximumWidth<br />anchorId |
60
+ | 22 | **Spacer / Divider** | — | size (small/medium/large)<br />showLine (boolean)<br />lineColor |
61
+ | 23 | **Tab Group** | — | tabs array (label, content)<br />defaultTab |
62
+ | 25 | **Carousel** | — | slides (blok[])<br />autoplay (boolean)<br />interval<br />showArrows<br />showDots<br />slidesPerView |
63
+ | 26 | **Social Icons** | — | items array (icon, alt-text, url) |
64
+
65
+ ## Content blocks
66
+
67
+ | # | Component | Variants | Key props |
68
+ | --- | ---------------------- | -------------------- | ------------------------------------------------------------------------------------------------------------ |
69
+ | 26 | **Rich Text** | — | content (richtext) |
70
+ | 28 | **Notification Toast** | — | message<br />type (information/success/warning/error)<br />dismissible (boolean)<br />duration<br />position |
71
+ | 29 | **Slider** | — | direction<br />items array (image, title, url, testimonials) |
72
+ | 46 | **Review** | — | author<br />rating (number)<br />date<br />body<br />avatar<br />verified (boolean) |
73
+ | 20 | **Card** | default, image, icon | image (asset)<br />title<br />body (richtext)<br />link<br />button (Button) |
74
+ | 24 | **Accordion** | — | items array (title, content)<br />allowMultiple (boolean) |
75
+
76
+ ## Media
77
+
78
+ | # | Component | Variants | Key props |
79
+ | --- | ------------------ | -------- | --------------------------------------------------------------------------------------------- |
80
+ | 39 | **Image** | — | image (asset)<br />alt<br />caption<br />aspectRatio<br />link |
81
+ | 40 | **Gallery** | — | images (asset[])<br />columns<br />enableLightbox (boolean) |
82
+ | 41 | **Video** | — | source (url/file)<br />poster (asset)<br />autoplay<br />loop<br />controls (boolean) |
83
+ | 42 | **Modal** | — | trigger (Button)<br />content (blok[])<br />size<br />closeOnOverlay (boolean) |
84
+ | 43 | **Map / Location** | — | latitude (number)<br />longitude (number)<br />zoom<br />markers (blok[])<br />address (text) |
85
+ | 44 | **Embed / iframe** | — | url<br />aspectRatio<br />title<br />allowFullscreen (boolean) |
86
+
87
+ ## CTA / Forms
88
+
89
+ | # | Component | Variants | Key props |
90
+ | --- | -------------------------- | --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
91
+ | 49 | **CTA Banner** | — | heading<br />body (richtext)<br />buttons (Button[])<br />backgroundColor (token)<br />alignment |
92
+ | 50 | **Newsletter Signup** | inline, stacked | heading<br />placeholder<br />submitLabel<br />consentText (richtext) |
93
+ | 51 | **Contact Form** | — | heading<br />fields (Input[])<br />submitLabel<br />successMessage<br />recipientEmail |
94
+ | 52 | **Input** | type: text, select, auto-select, dropdown, textarea | name<br />placeholder<br />required (boolean)<br />helpText<br />options (select/dropdown)<br />validation |
95
+ | 53 | **Checkbox / Radio Group** | checkbox, radio | name<br />options (text[])<br />required (boolean)<br />inline (boolean) |
96
+ | 54 | **Button** | primary, secondary, ghost | link<br />size (small/medium/large)<br />icon<br />iconPosition<br />fullWidth (boolean) |
97
+ | 55 | **Cookie Banner** | — | text (richtext)<br />acceptLabel<br />rejectLabel<br />policyLink |
98
+
99
+ ## Utility (low-level primitives)
100
+
101
+ | # | Component | Variants | Key props |
102
+ | --- | ---------------- | ------------------------------------ | ------------------------------------------------------------------------------- |
103
+ | 56 | **Icon** | — | name (text)<br />size<br />color (token) |
104
+ | 57 | **Avatar** | image, initials | image (asset)<br />name<br />size<br />shape (circle/square) |
105
+ | 59 | **Tooltip** | — | content (text)<br />position (top/right/bottom/left)<br />trigger (hover/click) |
106
+ | 60 | **Progress Bar** | linear, circular | value (number)<br />maximum (number)<br />showLabel (boolean) |
107
+ | 61 | **Alert** | information, success, warning, error | message (richtext)<br />type<br />dismissible (boolean)<br />icon (asset) |
108
+
109
+ ---
110
+
111
+ **Legend:**
112
+
113
+ - **blok[]** = Array of nested blocks/components (Storyblok terminology)
114
+ - **richtext** = Rich text content (HTML/Markdown)
115
+ - **asset** = Image or media file reference
116
+ - **token** = Design system token (color, spacing, etc.)
117
+ - **array (x, y)** = Array of objects with properties x, y
package/docs/intro.md ADDED
@@ -0,0 +1,44 @@
1
+ ---
2
+ slug: /
3
+ sidebar_position: 1
4
+ sidebar_label: "Introduction"
5
+ ---
6
+
7
+ # Activatus Code Standards
8
+
9
+ This site documents the shared code standards used across all Activatus projects. Every project applies the same linting, formatting, structure and naming rules, so moving between codebases never means relearning the basics.
10
+
11
+ ## What's included
12
+
13
+ | Standard | Config | Purpose |
14
+ | -------------------- | ---------------------------------------------- | ----------------------------------------------------------------------------------------------- |
15
+ | Human-Readable Names | [Naming rule](/Standards/human-readable-names) | Every name is whole, readable words — variables, props, form fields, files, folders, everything |
16
+ | Readable Code | [Readability rules](/Standards/readable-code) | File length, naming, single-purpose functions and tests |
17
+ | Documentation | [Docs standard](/Standards/documentation) | How project docs are written and shown at `/docs` |
18
+ | ESLint | [`eslint.config.mjs`](/Standards/eslint) | Linting rules for JS/TS/React/Next.js |
19
+ | Fixing Lint Errors | [Error guide](/Standards/lint-errors) | What each lint error means and how to fix it |
20
+ | Prettier | [`prettier.config.mjs`](/Standards/prettier) | Code formatting |
21
+ | Stylelint | [`stylelint.config.mjs`](/Standards/stylelint) | Linting rules for CSS/SCSS/CSS Modules |
22
+ | EditorConfig | [`.editorconfig`](/Standards/editorconfig) | Editor-level whitespace rules |
23
+ | direnv + nvm | [`.envrc` / `.nvmrc`](/Standards/direnv) | Automatic Node version switching on `cd` |
24
+ | AGENTS.md | [`AGENTS.md`](/Standards/agent-specs) | AI agent context and agent skills |
25
+ | CSS Styling | [Styling guide](/Standards/styling) | Tailwind CSS, flexbox-first layout and global colour variables |
26
+ | Tech Stack | [Tech stack](/Standards/tech-stack) | The frameworks, libraries and versions we build on |
27
+
28
+ Project layout is covered under **Structure**: [folder structure](/Structure/folder-structure), [component organization](/Structure/component-organization), [naming conventions](/Structure/naming-conventions), [import organization](/Structure/import-organization) and [API routes](/Structure/api-routes).
29
+
30
+ ## Ontology
31
+
32
+ The [Ontology](/ontology) is the shared vocabulary for code: what each code word means. Each project adds its own product words in `docs/product/ontology.md`. Read both first.
33
+
34
+ ## Version History
35
+
36
+ The [Version History](/version-history) lists what changed in each version, and what a project has to do about it. Updating a project? Read only the versions newer than the one in its `AGENTS.md`.
37
+
38
+ ## For AI agents: you were pointed here
39
+
40
+ A person has told you to follow the Activatus Code Standards. **Follow [Setup](/Guides/setup) first.** It installs the standards as the `@activatus/code-standards` package, checks which version the project is on, agrees with the person which standards apply, and sets them up. It covers new projects, projects on an older version, and projects that have never followed the standards.
41
+
42
+ After setup, follow every agreed standard in every change. Read a page when the work reaches its topic: [Styling](/Standards/styling) before writing styles, [Docs](/Standards/documentation) before writing docs, and so on. The ones to read first are the [Ontology](/ontology), [Human-Readable Names](/Standards/human-readable-names), [Readable Code](/Standards/readable-code), [Folder Structure](/Structure/folder-structure) and [Component Organization](/Structure/component-organization).
43
+
44
+ **If anything here is unclear, ask the person.** Do not guess, and do not invent a rule.
@@ -0,0 +1,127 @@
1
+ ---
2
+ sidebar_position: 1.5
3
+ sidebar_label: "Ontology"
4
+ ---
5
+
6
+ # Ontology
7
+
8
+ > The words these standards use about code, and exactly what each one means.
9
+
10
+ **Status:** Decided · **Updated:** 2026-10-15
11
+
12
+ **This page is the source of truth for every word about code.** Every Activatus project uses these terms, with these meanings, in docs, code, prompts and reviews.
13
+
14
+ An ontology is a shared vocabulary. When a person or an agent says "component", "utils" or "Decision Doc", this page is what they mean. Nobody has to guess, and nobody invents a second word for the same thing.
15
+
16
+ ## Code words and product words
17
+
18
+ This page only holds **code words**: how code is written, named, tested, documented and reviewed.
19
+
20
+ **Product words live in each project's own ontology**, in `docs/product/ontology.md`: the words for what that project builds and how its team plans the work. **Project-management words live there too**: project, feature, ticket, branch, commit, Pull Request, release. Every project defines those for itself. Launchpad's Draft Ticket, Pitch and UAT are product words, so they are in Launchpad's ontology, not here.
21
+
22
+ | | Code words | Product words |
23
+ | ------------ | -------------------------------------------------------- | --------------------------------------------------- |
24
+ | **Kept in** | This page | The project's `docs/product/ontology.md` |
25
+ | **Covers** | Writing, naming, testing, documenting and reviewing code | What the project builds and how its work is planned |
26
+ | **Examples** | component, utils, Decision Doc, dictionary word | Launchpad's Draft Ticket, Pitch, UAT |
27
+
28
+ **A project's ontology pulls in this page. It never redefines a code word.** If a project's ontology gives a word on this page a different meaning, this page wins. Point the difference out so the project's ontology can be fixed.
29
+
30
+ ## How to use this page
31
+
32
+ - **Read it before starting work on any Activatus project**, then read the project's own ontology.
33
+ - **Use the term on this page**, not a synonym: `utils`, never `helpers` or `utilities`.
34
+ - **If a term here has no definition, or you are not sure what is meant, ask.** Do not guess, and do not invent a new term.
35
+
36
+ ### Writing a term
37
+
38
+ The words stay the same everywhere. Only the casing changes, to match where the term is written:
39
+
40
+ | Where | Written as | Example |
41
+ | ---------------------------------------------- | ------------ | ----------------- |
42
+ | Database names, and the form used on this page | `snake_case` | `decision_doc` |
43
+ | Code — variables and functions | camelCase | `decisionDoc` |
44
+ | Code — types and components | PascalCase | `DecisionDocType` |
45
+ | Docs, prompts and UI | Title Case | Decision Doc |
46
+
47
+ ---
48
+
49
+ ## The terms
50
+
51
+ ### Docs
52
+
53
+ | Term | Means |
54
+ | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
55
+ | `decision` | A choice made on purpose and written down, never left implied |
56
+ | `decision_doc` | One Markdown file that records one decision and why it was made. Every file in a project's `docs/` folder is one. See [Docs](/Standards/documentation) |
57
+ | `docs` | A project's `docs/` folder: its Decision Docs, in the same standard folders in every project |
58
+ | `docs_site` | The Docusaurus viewer in `docsSite/` that shows a project's docs at `/docs`. It only runs when `DOCS_URL` is set, which is never in production |
59
+ | `ontology` | A shared vocabulary: this page for code words, and the project's own for product words |
60
+
61
+ ### People and agents
62
+
63
+ | Term | Means |
64
+ | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
65
+ | `human` | A person, as opposed to an agent |
66
+ | `developer` | A human who writes code |
67
+ | `agent` | An AI that writes or checks code, such as Claude Code. It follows every standard a developer does |
68
+ | `agent_spec` | A project's `AGENTS.md` file: the first thing an agent reads, setting out how to work on that project. See [Agent Specs](/Standards/agent-specs) |
69
+ | `agent_harness` | Everything around an agent that runs it: the program it runs in (such as Claude Code), its instructions, the tools and permissions it has, and the rules it follows. The ontology says what words mean; the harness says how an agent behaves |
70
+ | `context` | Everything an agent is given to read for its task: the agent spec, the docs and the code it is working on |
71
+ | `tool` | One action an agent is allowed to take, such as editing a file or running the tests. Tools come from the agent harness or an MCP server |
72
+ | `model` | The AI model an agent thinks with |
73
+ | `mcp` | Model Context Protocol: the standard way to connect an agent to outside tools and data, such as Linear or GitHub. An MCP server offers tools, and the agent calls them |
74
+
75
+ ### Code
76
+
77
+ | Term | Means |
78
+ | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
79
+ | `component` | One piece of the user interface that does one job. Its file is PascalCase (`InvoiceTable.tsx`) inside a camelCase folder (`invoiceTable/`). See [Component Organization](/Structure/component-organization) |
80
+ | `design_system_component` | A standard component that every project builds the same way, with the same name, variants and props, such as Button or Card. Each one is listed on the [Design System Components](/design-system-components) page and lives in `components/ui/`. It takes everything through props and imports nothing from the project, so it can be copied into another project unchanged |
81
+ | `shared_component` | A component this project uses on more than one page, built from Design System Components. It lives in `components/shared/` |
82
+ | `page_component` | A component used by one page, or by a few pages in one section. It lives in a `components/` folder beside that page, or in the section's route group. See [Where components live](/Structure/folder-structure#-where-components-live) |
83
+ | `props` | The values a component takes. `props` is a [dictionary word](/Standards/human-readable-names#dictionary). Their type is named after the component and ends in `Props`: `ButtonProps` |
84
+ | `type` | A TypeScript type or interface. Its name ends in `Props` or `Type` |
85
+ | `dependency` | Something the code relies on but does not define itself: a package it installs, or the functions handed into a function as its `dependencies`. How tickets wait on each other is not a dependency here: each project names that itself, such as Launchpad's `blocked_by` |
86
+ | `utils` | Reusable functions that are not components, such as `formatCurrency`. They live in a `utils/` folder: global, for one section, or for one component. Each function has its own folder with its test file and an `index.ts`. `utils` is a [dictionary word](/Standards/human-readable-names#dictionary). Never `helpers` or `utilities`. See [Utils](/Structure/folder-structure#-utils) |
87
+ | `services` | The business logic: what the app does, its rules and operations. Pages, API routes and server actions stay thin and call into `services/`. See [utils, services and lib](/Structure/folder-structure#utils-services-and-lib) |
88
+ | `lib` | Code that connects the app to something outside it, such as integration clients in `lib/integrations/stripe/`, and app-wide setup: permissions, middleware, validation, constants, errors and shared types |
89
+ | `route` | A web address in the app, such as `/account-settings` or `/api/calendar-events`, and the folder or file that creates it. Route folders are kebab-case, because their names become the URL. In Next.js, routes are the folders under `app/`. See [API Routes](/Structure/api-routes) |
90
+ | `server_component` / `client_component` | A component that runs on the server, and one that runs in the browser. They live in separate files, and the server one wraps the client one |
91
+ | `test_file` | The file that tests one function or component, named after it: `formatCurrency.test.ts`. Every function and component has one |
92
+ | `dictionary` | The list of short names that are words, not abbreviations: `id`, `docs`, `props`, `utils`, `url` and the rest. A short name not in the [Dictionary](/Standards/human-readable-names#dictionary) is written out in full. A new word is added to the Dictionary before it is used |
93
+ | `third_party_names` | Names that come from someone else's code — a package, a framework or an outside service — such as React's `ref`, Next.js's `params` or shadcn/ui's `cn`. They are used exactly as they are, because renaming them breaks the code. The naming rule is only for names we write. See [Third-party names](/Standards/human-readable-names#third-party-names) |
94
+ | `third_party_code` | Code we did not write: `node_modules/`, and anything copied into `vendor/`. It is never linted, reformatted or renamed |
95
+ | `global_palette` | The colours defined in `app/globals.css`. Every colour in a project comes from it. See [Styling](/Standards/styling) |
96
+
97
+ ### Checks
98
+
99
+ | Term | Means |
100
+ | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
101
+ | `lint_error` | A broken rule the linter reports. Fix the code; never switch the rule off without a comment saying why. See [Lint Errors](/Standards/lint-errors) |
102
+
103
+ ---
104
+
105
+ ## Key distinctions
106
+
107
+ These are the terms most easily confused. The **Not** column is the word we do not use.
108
+
109
+ | Term | Means | Not |
110
+ | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- |
111
+ | **Decision / Decision Doc** | The choice itself vs the file that records it | |
112
+ | **Docs / Docs Site** | The Markdown files vs the viewer that shows them | |
113
+ | **Props** | The values a component takes | `properties` |
114
+ | **Utils** | Reusable functions | `helpers`, `utilities` |
115
+ | **Dictionary Word / Third-Party Name** | A short name we chose to keep vs a name someone else chose for us | |
116
+ | **Design System / Shared / Page Component** | The same in every project (`components/ui/`) vs used on several pages of this project (`components/shared/`) vs used by one page or section (beside it) | |
117
+
118
+ ---
119
+
120
+ ## Changing the ontology
121
+
122
+ **This page is the one place code words are kept.** Change them here, never in a project's ontology.
123
+
124
+ - **Adding a term**: add it to the right group above. If it could be confused with another term, add a row to [Key distinctions](#key-distinctions).
125
+ - **Removing a term**: say what to use instead, in the same change.
126
+ - **A product word that every project uses** — not just one — can move here. Agree it first, then remove it from each project's ontology.
127
+ - **Either way**, update the date at the top of this page.