@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.
- package/README.md +199 -2
- package/docs/Guides/_category_.json +4 -0
- package/docs/Guides/component-library-workflow.md +182 -0
- package/docs/Guides/migrating.md +161 -0
- package/docs/Guides/setup.md +158 -0
- package/docs/Standards/_category_.json +4 -0
- package/docs/Standards/agent-skills.md +125 -0
- package/docs/Standards/agent-specs.md +74 -0
- package/docs/Standards/direnv.mdx +249 -0
- package/docs/Standards/documentation.md +314 -0
- package/docs/Standards/editorconfig.md +74 -0
- package/docs/Standards/eslint.md +900 -0
- package/docs/Standards/human-readable-names.md +274 -0
- package/docs/Standards/lint-errors.md +171 -0
- package/docs/Standards/prettier.md +106 -0
- package/docs/Standards/readable-code.md +570 -0
- package/docs/Standards/stylelint.md +193 -0
- package/docs/Standards/styling.md +290 -0
- package/docs/Standards/tech-stack.md +158 -0
- package/docs/Structure/_category_.json +4 -0
- package/docs/Structure/api-routes.md +118 -0
- package/docs/Structure/component-organization.md +526 -0
- package/docs/Structure/folder-structure.md +366 -0
- package/docs/Structure/import-organization.md +158 -0
- package/docs/Structure/naming-conventions.md +334 -0
- package/docs/design-system-components.md +117 -0
- package/docs/intro.md +44 -0
- package/docs/ontology.md +127 -0
- package/docs/templates.mdx +396 -0
- package/docs/version-history.md +338 -0
- package/package.json +60 -3
- package/scripts/renameSymbol.mjs +188 -0
- package/static/templates/.editorconfig +25 -0
- package/static/templates/.envrc +25 -0
- package/static/templates/.nvmrc +1 -0
- package/static/templates/AGENTS.md +163 -0
- package/static/templates/decision-doc.md +19 -0
- package/static/templates/docs/ai/agent-harness.md +17 -0
- package/static/templates/docs/ai/agents.md +17 -0
- package/static/templates/docs/ai/architecture.md +17 -0
- package/static/templates/docs/ai/context.md +17 -0
- package/static/templates/docs/ai/model-routing.md +17 -0
- package/static/templates/docs/ai/models.md +17 -0
- package/static/templates/docs/ai/retrieval.md +17 -0
- package/static/templates/docs/ai/tools.md +17 -0
- package/static/templates/docs/architecture/authentication.md +17 -0
- package/static/templates/docs/architecture/backend.md +17 -0
- package/static/templates/docs/architecture/background-jobs.md +17 -0
- package/static/templates/docs/architecture/backups.md +17 -0
- package/static/templates/docs/architecture/caching.md +17 -0
- package/static/templates/docs/architecture/ci-cd.md +17 -0
- package/static/templates/docs/architecture/disaster-recovery.md +17 -0
- package/static/templates/docs/architecture/environments.md +17 -0
- package/static/templates/docs/architecture/frontend.md +17 -0
- package/static/templates/docs/architecture/hosting.md +17 -0
- package/static/templates/docs/architecture/observability.md +17 -0
- package/static/templates/docs/architecture/realtime.md +17 -0
- package/static/templates/docs/architecture/search.md +17 -0
- package/static/templates/docs/architecture/services.md +17 -0
- package/static/templates/docs/architecture/state-management.md +17 -0
- package/static/templates/docs/architecture/storage.md +17 -0
- package/static/templates/docs/architecture/system.md +17 -0
- package/static/templates/docs/business/buying-trigger.md +17 -0
- package/static/templates/docs/business/customer-value.md +17 -0
- package/static/templates/docs/business/customer.md +17 -0
- package/static/templates/docs/business/defensibility.md +17 -0
- package/static/templates/docs/business/growth.md +17 -0
- package/static/templates/docs/business/pricing.md +17 -0
- package/static/templates/docs/business/revenue-model.md +17 -0
- package/static/templates/docs/business/unit-economics.md +17 -0
- package/static/templates/docs/data/analytics.md +17 -0
- package/static/templates/docs/data/audit.md +17 -0
- package/static/templates/docs/data/database.md +17 -0
- package/static/templates/docs/data/indexing.md +17 -0
- package/static/templates/docs/data/migrations.md +17 -0
- package/static/templates/docs/data/model.md +17 -0
- package/static/templates/docs/data/retention.md +17 -0
- package/static/templates/docs/data/schema.md +17 -0
- package/static/templates/docs/deployment/approval.md +17 -0
- package/static/templates/docs/deployment/live-verification.md +17 -0
- package/static/templates/docs/deployment/process.md +17 -0
- package/static/templates/docs/deployment/rollback.md +17 -0
- package/static/templates/docs/design/design-system.md +17 -0
- package/static/templates/docs/design/errors.md +17 -0
- package/static/templates/docs/design/feedback.md +17 -0
- package/static/templates/docs/design/interactions.md +17 -0
- package/static/templates/docs/design/layout.md +17 -0
- package/static/templates/docs/design/navigation.md +17 -0
- package/static/templates/docs/design/principles.md +17 -0
- package/static/templates/docs/design/responsive.md +17 -0
- package/static/templates/docs/development/branching.md +17 -0
- package/static/templates/docs/development/code-quality.md +17 -0
- package/static/templates/docs/development/coding-standards.md +21 -0
- package/static/templates/docs/development/commits.md +17 -0
- package/static/templates/docs/development/merge-strategy.md +17 -0
- package/static/templates/docs/development/process.md +17 -0
- package/static/templates/docs/development/pull-requests.md +17 -0
- package/static/templates/docs/experience/accessibility.md +17 -0
- package/static/templates/docs/experience/aha-moment.md +17 -0
- package/static/templates/docs/experience/anti-experience.md +17 -0
- package/static/templates/docs/experience/friction.md +17 -0
- package/static/templates/docs/experience/outcomes.md +17 -0
- package/static/templates/docs/experience/principles.md +17 -0
- package/static/templates/docs/experience/retention.md +17 -0
- package/static/templates/docs/experience/sharing.md +17 -0
- package/static/templates/docs/overview/how-it-works.md +17 -0
- package/static/templates/docs/overview/what-is-it.md +17 -0
- package/static/templates/docs/overview/writing-docs.md +16 -0
- package/static/templates/docs/pitch/alternatives.md +17 -0
- package/static/templates/docs/pitch/assumptions.md +17 -0
- package/static/templates/docs/pitch/audience.md +17 -0
- package/static/templates/docs/pitch/concept.md +17 -0
- package/static/templates/docs/pitch/differentiators.md +17 -0
- package/static/templates/docs/pitch/outcomes.md +17 -0
- package/static/templates/docs/pitch/problem.md +17 -0
- package/static/templates/docs/pitch/product-market-fit.md +17 -0
- package/static/templates/docs/pitch/success-criteria.md +17 -0
- package/static/templates/docs/pitch/validation.md +17 -0
- package/static/templates/docs/pitch/value-proposition.md +17 -0
- package/static/templates/docs/pitch/vision.md +17 -0
- package/static/templates/docs/scope/core.md +17 -0
- package/static/templates/docs/scope/exclusions.md +17 -0
- package/static/templates/docs/scope/future.md +17 -0
- package/static/templates/docs/scope/launch.md +17 -0
- package/static/templates/docs/scope/post-launch.md +17 -0
- package/static/templates/docs/scope/priorities.md +17 -0
- package/static/templates/docs/scope/quality-bar.md +17 -0
- package/static/templates/docs/security/audit.md +17 -0
- package/static/templates/docs/security/data-access.md +17 -0
- package/static/templates/docs/security/logging.md +17 -0
- package/static/templates/docs/security/privacy.md +17 -0
- package/static/templates/docs/security/secrets.md +17 -0
- package/static/templates/docs/security/threat-model.md +17 -0
- package/static/templates/docs/testing/end-to-end.md +17 -0
- package/static/templates/docs/testing/integration.md +17 -0
- package/static/templates/docs/testing/regression.md +17 -0
- package/static/templates/docs/testing/security.md +17 -0
- package/static/templates/docs/testing/strategy.md +17 -0
- package/static/templates/docs/testing/test-data.md +17 -0
- package/static/templates/docs/testing/unit.md +17 -0
- package/static/templates/docs/uat/checks.md +17 -0
- package/static/templates/docs/uat/strategy.md +17 -0
- package/static/templates/docs/users/permissions.md +17 -0
- package/static/templates/docs/users/roles.md +17 -0
- package/static/templates/docs/users/user-types.md +17 -0
- package/static/templates/docs/workflows/assignment.md +17 -0
- package/static/templates/docs/workflows/bugfix.md +17 -0
- package/static/templates/docs/workflows/dependencies.md +17 -0
- package/static/templates/docs/workflows/deployment.md +17 -0
- package/static/templates/docs/workflows/development.md +17 -0
- package/static/templates/docs/workflows/planning.md +17 -0
- package/static/templates/docs/workflows/review.md +17 -0
- package/static/templates/docs/workflows/uat.md +17 -0
- package/static/templates/docsSite/docusaurus.config.mjs +144 -0
- package/static/templates/docsSite/gitignore.txt +3 -0
- package/static/templates/docsSite/package.json.txt +42 -0
- package/static/templates/docsSite/pnpm-workspace.yaml +2 -0
- package/static/templates/docsSite/sidebars.mjs +7 -0
- package/static/templates/docsSite/src/css/custom.css +7 -0
- package/static/templates/docsSite/src/pages/index.tsx +9 -0
- package/static/templates/docsSite/static/images/logo.svg +4 -0
- package/static/templates/docsSite/tsconfig.json +7 -0
- package/static/templates/eslint/base/eslint.config.mjs +104 -0
- package/static/templates/eslint/nextjs/eslint.config.mjs +181 -0
- package/static/templates/eslint/react/eslint.config.mjs +173 -0
- package/static/templates/eslint/typescript/eslint.config.mjs +154 -0
- package/static/templates/globals.css +16 -0
- package/static/templates/husky/pre-commit +1 -0
- package/static/templates/next.config.mjs +21 -0
- package/static/templates/prettier.config.mjs +26 -0
- package/static/templates/skills/codeReview.md +31 -0
- package/static/templates/skills/format.md +18 -0
- package/static/templates/skills/lint.md +21 -0
- package/static/templates/skills/lintFix.md +24 -0
- package/static/templates/skills/securityAudit.md +28 -0
- package/static/templates/skills/test.md +24 -0
- package/static/templates/skills/typescript.md +28 -0
- package/static/templates/skills/updateLayout.md +20 -0
- package/static/templates/stylelint/css/stylelint.config.mjs +40 -0
- package/static/templates/stylelint/scss/stylelint.config.mjs +13 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# [Project Name]
|
|
2
|
+
|
|
3
|
+
> [The project's most important workflow rule for agents, stated first so every agent sees it: whether an agent may commit, push or make branches. See "Project workflow" below.]
|
|
4
|
+
|
|
5
|
+
> **"go" means carry on.** When the person sends only "go", carry on with the current task. It is never permission to commit, push or open a Pull Request, and it needs no reply asking what they meant.
|
|
6
|
+
|
|
7
|
+
## Project overview
|
|
8
|
+
|
|
9
|
+
[One paragraph: what this project does, who uses it, and why it exists.]
|
|
10
|
+
|
|
11
|
+
## Repository layout
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
[Directory tree at depth 2. Regenerate it after structural changes.]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Tech stack
|
|
18
|
+
|
|
19
|
+
| Layer | Technology | Version |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| Framework | [e.g. Next.js (App Router)] | [version] |
|
|
22
|
+
| Language | [e.g. TypeScript] | [version] |
|
|
23
|
+
| Styling | [e.g. Tailwind CSS] | [version] |
|
|
24
|
+
| Database | [database] | [version] |
|
|
25
|
+
| Hosting | [hosting platform] | — |
|
|
26
|
+
|
|
27
|
+
## Essential commands
|
|
28
|
+
|
|
29
|
+
| Task | Command |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| Install | `pnpm install` |
|
|
32
|
+
| Develop | `pnpm dev` |
|
|
33
|
+
| Build | `pnpm build` |
|
|
34
|
+
| Test | `pnpm test` |
|
|
35
|
+
| Lint | `pnpm lint` |
|
|
36
|
+
| Format | `pnpm format` |
|
|
37
|
+
| Type-check | `pnpm typecheck` |
|
|
38
|
+
| Docs site | `pnpm docs:dev` (then open `/docs`) |
|
|
39
|
+
|
|
40
|
+
## Project workflow
|
|
41
|
+
|
|
42
|
+
[How this project runs its work. These are the project's own decisions, not part of the code standards. Say where they are written up (usually `docs/development/`), then list the rules an agent must follow:]
|
|
43
|
+
|
|
44
|
+
- **Who commits**: [whether AI agents may commit, push or make branches, and when]
|
|
45
|
+
- **Branches**: [how branches are named]
|
|
46
|
+
- **Commit messages**: [the commit message format]
|
|
47
|
+
- **Pull requests**: [review and CI requirements, and where Pull Requests merge to]
|
|
48
|
+
- **Merging and releases**: [merge strategy, and how work reaches production]
|
|
49
|
+
|
|
50
|
+
## Environment variables
|
|
51
|
+
|
|
52
|
+
| Variable | Required | Description |
|
|
53
|
+
| --- | --- | --- |
|
|
54
|
+
| `[VARIABLE_NAME]` | [Yes / No] | [What it is for] |
|
|
55
|
+
|
|
56
|
+
## Ontology
|
|
57
|
+
|
|
58
|
+
Activatus uses a fixed vocabulary, the ontology, in two parts:
|
|
59
|
+
|
|
60
|
+
- **Code words** — component, utils, Decision Doc and the rest — are defined in the code standards: https://activatus-code-standards.vercel.app/ontology
|
|
61
|
+
- **Product words** — what this project builds and how its work is planned — are defined in `docs/product/ontology.md`.
|
|
62
|
+
|
|
63
|
+
- **Read both before starting work.** If the project's ontology gives a code word a different meaning, the code standards win — point the difference out.
|
|
64
|
+
- **Use their terms** in code, docs, database names and messages — never a synonym. It is `utils`, not `helpers` or `utilities`.
|
|
65
|
+
- **Never use a term either ontology has removed.**
|
|
66
|
+
- If a person uses a word loosely, work out which ontology term they mean and use that term. **If you are not sure what a term means, ask.** Do not guess and do not invent a new term.
|
|
67
|
+
|
|
68
|
+
## Documentation
|
|
69
|
+
|
|
70
|
+
The project's docs are plain Markdown in `docs/`. **Every file is a Decision Doc**: it states one decision and why it was made.
|
|
71
|
+
|
|
72
|
+
- **Read them before starting work** — the three docs in `docs/overview/` first, then the docs for the area being changed. Read the files directly; do not start the docs site to read them.
|
|
73
|
+
- **Check each doc's Status.** `Decided` is settled. `Current plan` may change. `Under evaluation` and `Not started` are **not decisions** — do not treat them as one and do not invent one. Ask.
|
|
74
|
+
- **Never invent a product decision to unblock yourself.** If the docs do not answer it, stop and ask.
|
|
75
|
+
- **Update the docs in the same change.** If a change makes a doc wrong, fix the doc and change its Updated date.
|
|
76
|
+
- Do not edit `docsSite/` unless the task is about the docs viewer itself.
|
|
77
|
+
|
|
78
|
+
## Code standards
|
|
79
|
+
|
|
80
|
+
This project follows the Activatus Code Standards. They are installed as the `@activatus/code-standards` dev dependency: **read them in `node_modules/@activatus/code-standards/docs/`**, which is the exact version this project uses. The same pages are at https://activatus-code-standards.vercel.app for people.
|
|
81
|
+
|
|
82
|
+
**Code standards version:** [the major version of the installed `@activatus/code-standards` package when the standards were last applied]
|
|
83
|
+
|
|
84
|
+
This is the version the code follows. When the package is updated, read only the newer versions in `node_modules/@activatus/code-standards/docs/version-history.md`, make the changes they list, then update this number. See "Updating to a newer version" in `docs/Guides/setup.md`.
|
|
85
|
+
|
|
86
|
+
**Standards this project skips or changes** are listed, by number, in `docs/development/coding-standards.md`. Follow every other standard.
|
|
87
|
+
|
|
88
|
+
Follow these rules in every change:
|
|
89
|
+
|
|
90
|
+
- **Every function and component has a test file**, created in the same change. One test file tests one function or one component.
|
|
91
|
+
- **No file longer than 300 lines** (test files are exempt).
|
|
92
|
+
- **Every name is made of whole, human-readable words.** Variables, parameters, props, types, constants, form fields, files, folders, routes, database columns, scripts and environment variables — everything. No shortened words, no single letters, no numbered names, not even for a loop counter or an event handler. Full rule: Human-Readable Names in the code standards (https://activatus-code-standards.vercel.app/Standards/human-readable-names).
|
|
93
|
+
|
|
94
|
+
| Never | Always |
|
|
95
|
+
| --- | --- |
|
|
96
|
+
| `btn`, `msg`, `val`, `(e) =>`, `(item, i) =>` | `button`, `message`, `value`, `(event) =>`, `(item, index) =>` |
|
|
97
|
+
| `deps`, `env`, `timeoutMs`, `MAX_` | `dependencies`, `environment`, `timeoutMilliseconds`, `MAXIMUM_` |
|
|
98
|
+
| `<T>`, `"sm" \| "lg"` | `<ItemType>`, `"small" \| "large"` |
|
|
99
|
+
| `name="email1"` | `name="emailAddress"` |
|
|
100
|
+
| `helpers/`, `utilities/`, `helpers.ts` | `utils/`, a file named after what it does |
|
|
101
|
+
|
|
102
|
+
- **`id` is a word.** Write `id`, `userId`, `user_id` — never `identifier` and never `userID`. `identifier` is only for an outside system's separate field of that name (Linear's readable `ACT-73`).
|
|
103
|
+
- **Dictionary words stay short:** `id`, `docs`, `lib`, `props`, `ref`, `repo`, `utils`, `app`, `url`, `api`, `uat`, `pdf`, `html`, `css`, `json`, `readme`. Case them as words: `imageUrl`, not `imageURL`. Any other short name is written in full. A new dictionary word is added to the Dictionary in the Human-Readable Names standard first (https://activatus-code-standards.vercel.app/Standards/human-readable-names#dictionary), never just used.
|
|
104
|
+
- **Names owned by someone else stay exactly as they are** — Linear's `id` and `pageInfo`, Node's `cwd` option and `process.env`, React's `ref` and `children`, shadcn/ui's `cn` helper, Next.js's `params`, `searchParams` and `LayoutProps`, HTML attributes, Tailwind classes. The rule is for names we write, not names from someone else's code. Renaming them breaks the code. Give the value a full-word name as soon as it comes into our code: `const workingDirectory = process.cwd();`, then pass `{ cwd: workingDirectory }`.
|
|
105
|
+
- **When a name clashes with a third-party import, rename our own thing first**, to a more specific full-word name: our `createProjectDatabaseClient`, next to Supabase's `createClient`. Rename the import only when both names are third-party, or ours is fixed by a framework (a Next.js route's `GET`). Then use the owner plus the original name, `Link as LucideLinkIcon`. Never rename an import for taste, and never shorten it.
|
|
106
|
+
- **Form fields especially.** A field has one name everywhere it goes: the input's `name` and `id`, the form schema, the API request, the type and the database column (`emailAddress` / `email_address`). Every field has a visible `<label>` in plain English — never a placeholder instead. Option values are words (`"monthly"`), not numbers. Validation messages name the field and say what to do.
|
|
107
|
+
- **The linter only checks some names.** Folders, props, form fields, database columns, routes and environment variables are not linted — check every one of them yourself.
|
|
108
|
+
- **Always `const`.** Never `var`. Use `let` only when a value must be reassigned, with `// eslint-disable-next-line no-restricted-syntax -- <reason>` on the line above.
|
|
109
|
+
- **Arrow functions everywhere.** Never use the `function` keyword: `export const Button = () => {}`, not `export function Button() {}`.
|
|
110
|
+
- **No circular imports, ever.** A file never imports a file that imports it back. Inside a folder, import files directly — never through the folder's own `index.ts` — and never import a parent component from its sub-component.
|
|
111
|
+
- **Define before use.** A function or variable is written above the code that uses it.
|
|
112
|
+
- **A function does one thing.**
|
|
113
|
+
- **Functions, never classes.**
|
|
114
|
+
- **One parameter per function.** Use a single object when more than one value is needed.
|
|
115
|
+
- **Return early.** Never nest more than three levels deep.
|
|
116
|
+
- **No magic numbers or strings.** Use named constants.
|
|
117
|
+
- **No nested ternaries. No boolean flag parameters.**
|
|
118
|
+
- **No `any`, no non-null `!`, no `as` cast without a comment saying why.**
|
|
119
|
+
- **Named exports only**, except where a tool requires a default export.
|
|
120
|
+
- **Type names end in `Props` or `Type`**, and say what the thing is, not the job it does. A type that only describes one field of a function's props is written inside the `Props`: `StartAgentRunProps` holds its `dependencies`, with no separate `StartAgentRunDependenciesType`.
|
|
121
|
+
- **One component per file.** Server and client components live in separate files.
|
|
122
|
+
- **Component file order**: imports, component, variables, state, `useMemo` values, `useCallback` functions, effects, render. No inline functions in render.
|
|
123
|
+
- **Reusable functions live in a `utils/` folder** — global, section or component level — one folder per function, with an `index.ts`.
|
|
124
|
+
- **Components live where they are used:** Design System Components in `components/ui/`; components used on more than one page in `components/shared/`; components used by a few pages in one section in that section's route group (`app/(billing)/components/`); components used by one page in that page's `components/` folder. Start a new component beside its page, and move it up when a second page needs it. No `components/features/` folder.
|
|
125
|
+
- **Code file names are camelCase**; component files are PascalCase. **Anything that becomes a URL is kebab-case**: route folders and documentation folders and files (`docs/architecture/background-jobs.md`). CSS variables are kebab-case too.
|
|
126
|
+
- **Lay out with flexbox first**, and split layouts into child components. Only use CSS grid when specifically asked.
|
|
127
|
+
- **Style with Tailwind.** Colours come from the global colour palette in `app/globals.css` only — never a hard-coded or arbitrary colour. The design decisions are in `docs/design/design-system.md`.
|
|
128
|
+
- **Comments explain why, not what.** Never leave commented-out code.
|
|
129
|
+
- **Error messages say what happened and what to do.**
|
|
130
|
+
|
|
131
|
+
**Third-party code is exempt.** Code in `node_modules/` and `vendor/` belongs to someone else: do not lint it, do not reformat it, do not edit it to meet these rules.
|
|
132
|
+
|
|
133
|
+
**shadcn components are not third-party.** Code the shadcn CLI copies into the project is ours. Convert it to these standards in the same change that adds it — its own camelCase folder, one component per file, `types.ts`, `index.ts` and a test — keep only the parts that are used, and never put it in `vendor/`. **Do not change a component's props or behaviour** — only its styling. Components work identically in every Activatus project.
|
|
134
|
+
|
|
135
|
+
**Look before you build a component.** Check the project's `components/ui/`, then the Design System Components in the code standards, then other Activatus projects, then shadcn. Build to the props listed in the Design System Components; never invent new prop names for a component that is already listed. A component in `components/ui/` takes everything through props and never imports from features, services, stores or `app/`.
|
|
136
|
+
|
|
137
|
+
**Lint must pass before you finish.** Run `pnpm lint` and `pnpm test` before finishing any task, and fix every error by changing the code.
|
|
138
|
+
|
|
139
|
+
**Never switch a lint rule off to make an error go away.** Do not add `eslint-disable` comments, edit the ESLint config, or move files to hide them. The only exceptions are `let` and a type cast, each on a single line with a reason after ` -- `. If a rule seems impossible to satisfy, stop and ask.
|
|
140
|
+
|
|
141
|
+
When you report a lint error to the person, explain it in plain English: what is wrong, why it matters, and what you did to fix it.
|
|
142
|
+
|
|
143
|
+
## Available skills
|
|
144
|
+
|
|
145
|
+
Skill files live in `.agents/skills/`, mirrored to `.claude/commands/`.
|
|
146
|
+
|
|
147
|
+
| Skill | Invocation | What it does |
|
|
148
|
+
| --- | --- | --- |
|
|
149
|
+
| Lint | `/lint [path]` | Runs the linters in check-only mode and reports issues |
|
|
150
|
+
| Lint & fix | `/lintFix [path]` | Auto-fixes lint and formatting issues, then reports |
|
|
151
|
+
| Format | `/format [path]` | Formats files with Prettier |
|
|
152
|
+
| Code review | `/codeReview [branch, commit or path]` | Reviews changes for bugs and standards compliance |
|
|
153
|
+
| Update layout | `/updateLayout` | Regenerates the "Repository layout" section of this file |
|
|
154
|
+
| Security audit | `/securityAudit [path]` | Audits the code for common security problems |
|
|
155
|
+
| TypeScript | `/typescript [path]` | Tightens loose types and removes unsafe assertions |
|
|
156
|
+
| Test | `/test [path]` | Runs the tests and reports failures and missing tests |
|
|
157
|
+
|
|
158
|
+
## Out of scope for AI agents
|
|
159
|
+
|
|
160
|
+
- Do not write secrets, tokens or `.env` values into any file.
|
|
161
|
+
- Do not change dependencies or lockfiles unless the task requires it.
|
|
162
|
+
- Do not edit generated files, or third-party code in `node_modules/` or `vendor/`.
|
|
163
|
+
- [Add any other forbidden actions.]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# <Group> — <Menu item>
|
|
2
|
+
|
|
3
|
+
> One line: what this doc decides.
|
|
4
|
+
|
|
5
|
+
**Status:** Not started | Under evaluation | Current plan | Decided · **Updated:** YYYY-MM-DD
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
## Why
|
|
10
|
+
|
|
11
|
+
## Details
|
|
12
|
+
|
|
13
|
+
## Alternatives considered
|
|
14
|
+
|
|
15
|
+
## Current implementation
|
|
16
|
+
|
|
17
|
+
## Related
|
|
18
|
+
|
|
19
|
+
## Retro Feedback
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# AI — Agent Harness
|
|
2
|
+
|
|
3
|
+
> [One line: what this doc decides.]
|
|
4
|
+
|
|
5
|
+
**Status:** Not started · **Updated:** [YYYY-MM-DD]
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
[What was decided.]
|
|
10
|
+
|
|
11
|
+
## Why
|
|
12
|
+
|
|
13
|
+
[The reasons.]
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Link to related docs with a relative path, e.g. `[Future](../scope/future.md)`]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# AI — Agents
|
|
2
|
+
|
|
3
|
+
> [One line: what this doc decides.]
|
|
4
|
+
|
|
5
|
+
**Status:** Not started · **Updated:** [YYYY-MM-DD]
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
[What was decided.]
|
|
10
|
+
|
|
11
|
+
## Why
|
|
12
|
+
|
|
13
|
+
[The reasons.]
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Link to related docs with a relative path, e.g. `[Future](../scope/future.md)`]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# AI — Architecture
|
|
2
|
+
|
|
3
|
+
> [One line: what this doc decides.]
|
|
4
|
+
|
|
5
|
+
**Status:** Not started · **Updated:** [YYYY-MM-DD]
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
[What was decided.]
|
|
10
|
+
|
|
11
|
+
## Why
|
|
12
|
+
|
|
13
|
+
[The reasons.]
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Link to related docs with a relative path, e.g. `[Future](../scope/future.md)`]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# AI — Context
|
|
2
|
+
|
|
3
|
+
> [One line: what this doc decides.]
|
|
4
|
+
|
|
5
|
+
**Status:** Not started · **Updated:** [YYYY-MM-DD]
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
[What was decided.]
|
|
10
|
+
|
|
11
|
+
## Why
|
|
12
|
+
|
|
13
|
+
[The reasons.]
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Link to related docs with a relative path, e.g. `[Future](../scope/future.md)`]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# AI — Model Routing
|
|
2
|
+
|
|
3
|
+
> [One line: what this doc decides.]
|
|
4
|
+
|
|
5
|
+
**Status:** Not started · **Updated:** [YYYY-MM-DD]
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
[What was decided.]
|
|
10
|
+
|
|
11
|
+
## Why
|
|
12
|
+
|
|
13
|
+
[The reasons.]
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Link to related docs with a relative path, e.g. `[Future](../scope/future.md)`]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# AI — Models
|
|
2
|
+
|
|
3
|
+
> [One line: what this doc decides.]
|
|
4
|
+
|
|
5
|
+
**Status:** Not started · **Updated:** [YYYY-MM-DD]
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
[What was decided.]
|
|
10
|
+
|
|
11
|
+
## Why
|
|
12
|
+
|
|
13
|
+
[The reasons.]
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Link to related docs with a relative path, e.g. `[Future](../scope/future.md)`]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# AI — Retrieval
|
|
2
|
+
|
|
3
|
+
> [One line: what this doc decides.]
|
|
4
|
+
|
|
5
|
+
**Status:** Not started · **Updated:** [YYYY-MM-DD]
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
[What was decided.]
|
|
10
|
+
|
|
11
|
+
## Why
|
|
12
|
+
|
|
13
|
+
[The reasons.]
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Link to related docs with a relative path, e.g. `[Future](../scope/future.md)`]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# AI — Tools
|
|
2
|
+
|
|
3
|
+
> [One line: what this doc decides.]
|
|
4
|
+
|
|
5
|
+
**Status:** Not started · **Updated:** [YYYY-MM-DD]
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
[What was decided.]
|
|
10
|
+
|
|
11
|
+
## Why
|
|
12
|
+
|
|
13
|
+
[The reasons.]
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Link to related docs with a relative path, e.g. `[Future](../scope/future.md)`]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Architecture — Authentication
|
|
2
|
+
|
|
3
|
+
> [One line: what this doc decides.]
|
|
4
|
+
|
|
5
|
+
**Status:** Not started · **Updated:** [YYYY-MM-DD]
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
[What was decided.]
|
|
10
|
+
|
|
11
|
+
## Why
|
|
12
|
+
|
|
13
|
+
[The reasons.]
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Link to related docs with a relative path, e.g. `[Future](../scope/future.md)`]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Architecture — Backend
|
|
2
|
+
|
|
3
|
+
> [One line: what this doc decides.]
|
|
4
|
+
|
|
5
|
+
**Status:** Not started · **Updated:** [YYYY-MM-DD]
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
[What was decided.]
|
|
10
|
+
|
|
11
|
+
## Why
|
|
12
|
+
|
|
13
|
+
[The reasons.]
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Link to related docs with a relative path, e.g. `[Future](../scope/future.md)`]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Architecture — Background Jobs
|
|
2
|
+
|
|
3
|
+
> [One line: what this doc decides.]
|
|
4
|
+
|
|
5
|
+
**Status:** Not started · **Updated:** [YYYY-MM-DD]
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
[What was decided.]
|
|
10
|
+
|
|
11
|
+
## Why
|
|
12
|
+
|
|
13
|
+
[The reasons.]
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Link to related docs with a relative path, e.g. `[Future](../scope/future.md)`]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Architecture — Backups
|
|
2
|
+
|
|
3
|
+
> [One line: what this doc decides.]
|
|
4
|
+
|
|
5
|
+
**Status:** Not started · **Updated:** [YYYY-MM-DD]
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
[What was decided.]
|
|
10
|
+
|
|
11
|
+
## Why
|
|
12
|
+
|
|
13
|
+
[The reasons.]
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Link to related docs with a relative path, e.g. `[Future](../scope/future.md)`]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Architecture — Caching
|
|
2
|
+
|
|
3
|
+
> [One line: what this doc decides.]
|
|
4
|
+
|
|
5
|
+
**Status:** Not started · **Updated:** [YYYY-MM-DD]
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
[What was decided.]
|
|
10
|
+
|
|
11
|
+
## Why
|
|
12
|
+
|
|
13
|
+
[The reasons.]
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Link to related docs with a relative path, e.g. `[Future](../scope/future.md)`]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Architecture — CI/CD
|
|
2
|
+
|
|
3
|
+
> [One line: what this doc decides.]
|
|
4
|
+
|
|
5
|
+
**Status:** Not started · **Updated:** [YYYY-MM-DD]
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
[What was decided.]
|
|
10
|
+
|
|
11
|
+
## Why
|
|
12
|
+
|
|
13
|
+
[The reasons.]
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Link to related docs with a relative path, e.g. `[Future](../scope/future.md)`]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Architecture — Disaster Recovery
|
|
2
|
+
|
|
3
|
+
> [One line: what this doc decides.]
|
|
4
|
+
|
|
5
|
+
**Status:** Not started · **Updated:** [YYYY-MM-DD]
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
[What was decided.]
|
|
10
|
+
|
|
11
|
+
## Why
|
|
12
|
+
|
|
13
|
+
[The reasons.]
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Link to related docs with a relative path, e.g. `[Future](../scope/future.md)`]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Architecture — Environments
|
|
2
|
+
|
|
3
|
+
> [One line: what this doc decides.]
|
|
4
|
+
|
|
5
|
+
**Status:** Not started · **Updated:** [YYYY-MM-DD]
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
[What was decided.]
|
|
10
|
+
|
|
11
|
+
## Why
|
|
12
|
+
|
|
13
|
+
[The reasons.]
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Link to related docs with a relative path, e.g. `[Future](../scope/future.md)`]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Architecture — Frontend
|
|
2
|
+
|
|
3
|
+
> [One line: what this doc decides.]
|
|
4
|
+
|
|
5
|
+
**Status:** Not started · **Updated:** [YYYY-MM-DD]
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
[What was decided.]
|
|
10
|
+
|
|
11
|
+
## Why
|
|
12
|
+
|
|
13
|
+
[The reasons.]
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Link to related docs with a relative path, e.g. `[Future](../scope/future.md)`]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Architecture — Hosting
|
|
2
|
+
|
|
3
|
+
> [One line: what this doc decides.]
|
|
4
|
+
|
|
5
|
+
**Status:** Not started · **Updated:** [YYYY-MM-DD]
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
[What was decided.]
|
|
10
|
+
|
|
11
|
+
## Why
|
|
12
|
+
|
|
13
|
+
[The reasons.]
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Link to related docs with a relative path, e.g. `[Future](../scope/future.md)`]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Architecture — Observability
|
|
2
|
+
|
|
3
|
+
> [One line: what this doc decides.]
|
|
4
|
+
|
|
5
|
+
**Status:** Not started · **Updated:** [YYYY-MM-DD]
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
[What was decided.]
|
|
10
|
+
|
|
11
|
+
## Why
|
|
12
|
+
|
|
13
|
+
[The reasons.]
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Link to related docs with a relative path, e.g. `[Future](../scope/future.md)`]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Architecture — Realtime
|
|
2
|
+
|
|
3
|
+
> [One line: what this doc decides.]
|
|
4
|
+
|
|
5
|
+
**Status:** Not started · **Updated:** [YYYY-MM-DD]
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
[What was decided.]
|
|
10
|
+
|
|
11
|
+
## Why
|
|
12
|
+
|
|
13
|
+
[The reasons.]
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Link to related docs with a relative path, e.g. `[Future](../scope/future.md)`]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Architecture — Search
|
|
2
|
+
|
|
3
|
+
> [One line: what this doc decides.]
|
|
4
|
+
|
|
5
|
+
**Status:** Not started · **Updated:** [YYYY-MM-DD]
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
[What was decided.]
|
|
10
|
+
|
|
11
|
+
## Why
|
|
12
|
+
|
|
13
|
+
[The reasons.]
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Link to related docs with a relative path, e.g. `[Future](../scope/future.md)`]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Architecture — Services
|
|
2
|
+
|
|
3
|
+
> [One line: what this doc decides.]
|
|
4
|
+
|
|
5
|
+
**Status:** Not started · **Updated:** [YYYY-MM-DD]
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
[What was decided.]
|
|
10
|
+
|
|
11
|
+
## Why
|
|
12
|
+
|
|
13
|
+
[The reasons.]
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Link to related docs with a relative path, e.g. `[Future](../scope/future.md)`]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Architecture — State Management
|
|
2
|
+
|
|
3
|
+
> [One line: what this doc decides.]
|
|
4
|
+
|
|
5
|
+
**Status:** Not started · **Updated:** [YYYY-MM-DD]
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
[What was decided.]
|
|
10
|
+
|
|
11
|
+
## Why
|
|
12
|
+
|
|
13
|
+
[The reasons.]
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Link to related docs with a relative path, e.g. `[Future](../scope/future.md)`]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Architecture — Storage
|
|
2
|
+
|
|
3
|
+
> [One line: what this doc decides.]
|
|
4
|
+
|
|
5
|
+
**Status:** Not started · **Updated:** [YYYY-MM-DD]
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
[What was decided.]
|
|
10
|
+
|
|
11
|
+
## Why
|
|
12
|
+
|
|
13
|
+
[The reasons.]
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Link to related docs with a relative path, e.g. `[Future](../scope/future.md)`]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Architecture — System
|
|
2
|
+
|
|
3
|
+
> [One line: what this doc decides.]
|
|
4
|
+
|
|
5
|
+
**Status:** Not started · **Updated:** [YYYY-MM-DD]
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
[What was decided.]
|
|
10
|
+
|
|
11
|
+
## Why
|
|
12
|
+
|
|
13
|
+
[The reasons.]
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Link to related docs with a relative path, e.g. `[Future](../scope/future.md)`]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Business — Buying Trigger
|
|
2
|
+
|
|
3
|
+
> [One line: what this doc decides.]
|
|
4
|
+
|
|
5
|
+
**Status:** Not started · **Updated:** [YYYY-MM-DD]
|
|
6
|
+
|
|
7
|
+
## Decision
|
|
8
|
+
|
|
9
|
+
[What was decided.]
|
|
10
|
+
|
|
11
|
+
## Why
|
|
12
|
+
|
|
13
|
+
[The reasons.]
|
|
14
|
+
|
|
15
|
+
## Related
|
|
16
|
+
|
|
17
|
+
- [Link to related docs with a relative path, e.g. `[Future](../scope/future.md)`]
|