@activatus/code-standards 3.0.5 → 3.0.8

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.
@@ -9,7 +9,7 @@ sidebar_label: "Setup"
9
9
 
10
10
  The person creates the app themselves — with `create-next-app`, Expo or anything else — and tells you to follow the standards. **Do not ask which framework the project uses.** Look at the project: its `package.json` and files tell you. The person only answers the questions below and checks your work. They never run a command.
11
11
 
12
- **These standards are the base, for code only.** A project builds on top of them: it can add its own folders and conventions, and it makes its own project-management decisions (tickets, statuses, releases, who commits). Those go in the project's own docs, not here.
12
+ **These standards are the base for code, plus how agents link and report the project's work.** A project builds on top of them: it can add its own folders and conventions, and it makes its own project-management decisions (tickets, releases, branches, commit messages, who commits). Those go in the project's own docs, not here. Step 3 records the project's GitHub repo and Linear project, and offers the optional [status circles](/docs/Standards/working-with-agents#status-circles).
13
13
 
14
14
  ## 1. Install the standards
15
15
 
@@ -24,6 +24,14 @@ minimumReleaseAgeExclude:
24
24
  - "@activatus/code-standards"
25
25
  ```
26
26
 
27
+ Newer pnpm versions may add this exclusion for you when you run `pnpm add`. Check the file either way, and add it if it is not there: `pnpm update` hits the same check when a new version of the standards has only just been published.
28
+
29
+ **pnpm owns `pnpm-workspace.yaml`** and rewrites it on every install, with single quotes, so `pnpm format:check` would fail after every update. Add the file to `.prettierignore`:
30
+
31
+ ```text title=".prettierignore"
32
+ pnpm-workspace.yaml
33
+ ```
34
+
27
35
  The standards are now in `node_modules/@activatus/code-standards/`:
28
36
 
29
37
  | Folder | What it holds |
@@ -96,7 +104,29 @@ Then wait for the answer.
96
104
 
97
105
  **Record the answer** in `docs/development/coding-standards.md`, under "Details". For each skipped or changed standard, write its number, its name, what is different, and the reason the person gave. If nothing is different, write "No differences". Copy the file from `static/templates/docs/development/coding-standards.md` if it does not exist.
98
106
 
99
- The list has nothing about branches, commit messages or whether agents may commit. Those are the project's own workflow. Ask the person how they work, and write it in the "Project workflow" section of `AGENTS.md`. See [Project workflow](/docs/Standards/agent-specs#project-workflow).
107
+ The list has nothing about branches or commit messages. Those are the project's own workflow. Ask the person how they work, and write it in the "Project workflow" section of `AGENTS.md`. See [Project workflow](/docs/Standards/agent-specs#project-workflow).
108
+
109
+ ### Working with the agent
110
+
111
+ Once the standards are agreed, get the **project links**:
112
+
113
+ - **GitHub repo:** read it with `git remote get-url origin` and ask the person to confirm it. If there is no remote, ask for it.
114
+ - **Linear project:** if the project's own docs already name it, read it from there and ask the person to confirm it. Otherwise ask. Never copy it from another project. Write the workspace, the project and the ticket prefix, or "None" if the project does not use Linear.
115
+
116
+ Then **print this to the person exactly as it is written**:
117
+
118
+ ```text
119
+ Status circles (optional). Want the agent to report each
120
+ ticket as one line, with a circle that says if you need to act?
121
+
122
+ ✅ done 🟢 Pull Request to review 🟣 working on it
123
+ 🟡 ready to commit 🟠 waiting 🔴 blocked or you act
124
+ ⚪ not started
125
+
126
+ Yes or no?
127
+ ```
128
+
129
+ **Record the answers** in the "Project workflow" section of `AGENTS.md`, from the template: the project links, and the status circles if they said yes. Delete the status circles section if they said no. Write the answer in `docs/development/coding-standards.md`, under "Details", so a later update knows not to ask again. See [Working with Agents](/docs/Standards/working-with-agents).
100
130
 
101
131
  ## 4. Apply the standards
102
132
 
@@ -141,7 +171,7 @@ The project already follows the standards, and a newer version is out.
141
171
  pnpm update @activatus/code-standards --latest
142
172
  ```
143
173
 
144
- Its major version is now the newest version.
174
+ Its major version is now the newest version. If pnpm refuses because the version is too new, or `pnpm format:check` now fails on `pnpm-workspace.yaml`, see [1. Install the standards](#1-install-the-standards).
145
175
 
146
176
  3. **Read `node_modules/@activatus/code-standards/docs/version-history.md`**, but only the versions newer than the project's. Do not re-read the rest of the standards.
147
177
  4. **Skip any change to a standard the project opted out of.** The opt-outs are listed in `docs/development/coding-standards.md`.
@@ -13,6 +13,8 @@ Every Activatus repository must have an `AGENTS.md` in its root. This file gives
13
13
 
14
14
  Each project writes them up in its own docs, usually in `docs/development/`, and its `AGENTS.md` has a **Project workflow** section that points to them and states the rules an agent must follow. The most important one goes first: whether an agent may commit.
15
15
 
16
+ Project workflow also records the project's **GitHub repo** and **Linear project**, and the [status circles](/docs/Standards/working-with-agents#status-circles) if the project chose them during setup.
17
+
16
18
  ## Template
17
19
 
18
20
  Start from the [AGENTS.md template](/docs/templates#agents) and replace every `[placeholder]`.
@@ -0,0 +1,45 @@
1
+ ---
2
+ sidebar_position: 7.5
3
+ sidebar_label: "Working with Agents"
4
+ ---
5
+
6
+ # Working with Agents
7
+
8
+ > How an AI agent links a project's work and reports on it. The project links are part of every setup; the status circles are optional, chosen during [Setup](/docs/Guides/setup#working-with-the-agent). Both work the same with Claude Code, ChatGPT, Codex or any agent that reads `AGENTS.md`.
9
+
10
+ Whatever the project chooses is written into the **Project workflow** section of its `AGENTS.md`, from the [template](/docs/templates#agents), so every agent in the project follows it.
11
+
12
+ ## Project links
13
+
14
+ Every project records these two links in **Project workflow**. An agent uses them to link tickets and Pull Requests, and to know where work belongs.
15
+
16
+ | Link | Where it comes from |
17
+ | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
18
+ | GitHub repo | Read it from `git remote get-url origin` and confirm it with the person. If there is no remote, ask |
19
+ | Linear project | If the project's own docs already name it, read it from there and confirm it with the person. Otherwise ask. Write the workspace, the project and the ticket prefix, such as `activatus-life`, Launchpad, `ACT`, or "None" |
20
+
21
+ **Never copy a Linear workspace or ticket prefix from another project.** Projects under the same organisation often live in different Linear workspaces or projects, and a guessed prefix files tickets in the wrong place. If `AGENTS.md` does not name the Linear project, ask before creating, linking or citing any ticket.
22
+
23
+ ## Status circles
24
+
25
+ Optional. An agent reports the state of every ticket or piece of work as one line: a status circle, the ticket ID as a link, a short title and, where there is one, its Pull Request as a link. The colour alone tells the person whether they need to act.
26
+
27
+ | Circle | Means |
28
+ | ------ | ------------------------------------------------------------------------------------------------------------------------------ |
29
+ | ✅ | Merged, In UAT or Done. Nothing to do |
30
+ | 🟢 | Pull Request ready for the person to review and merge. The link is the Pull Request |
31
+ | 🟣 | Working on it |
32
+ | 🟡 | Ready to commit: done, checked, left uncommitted. Say the branch and where it is. The person commits it, or tells the agent to |
33
+ | 🟠 | Waiting on another ticket or Pull Request first. Say which |
34
+ | 🔴 | Blocked, or the person has to do something. Say what, in a few words |
35
+ | ⚪ | Not started (Backlog or Todo) |
36
+
37
+ ```md title="One line per piece of work"
38
+ 🟢 [ABC-12](https://linear.app/<workspace>/issue/ABC-12) Short title: [#19](https://github.com/<organisation>/<repo>/pull/19)
39
+ ```
40
+
41
+ - **Every ticket ID is a link to its ticket, and every Pull Request number is a link to the Pull Request.** Build them from the project links above.
42
+ - **No ticket is fine.** Work without one is just the circle and a short title.
43
+ - **Only what the person needs.** Leave out anything they already know.
44
+
45
+ Whether and when agents commit is not part of this. It is the project's own workflow, under **Who commits** in Project workflow.
package/docs/intro.md CHANGED
@@ -22,6 +22,7 @@ This site documents the shared code standards used across all Activatus projects
22
22
  | EditorConfig | [`.editorconfig`](/docs/Standards/editorconfig) | Editor-level whitespace rules |
23
23
  | direnv + nvm | [`.envrc` / `.nvmrc`](/docs/Standards/direnv) | Automatic Node version switching on `cd` |
24
24
  | AGENTS.md | [`AGENTS.md`](/docs/Standards/agent-specs) | AI agent context and agent skills |
25
+ | Working with Agents | [Optional](/docs/Standards/working-with-agents) | The project's GitHub repo and Linear project, and optional status circles |
25
26
  | CSS Styling | [Styling guide](/docs/Standards/styling) | Tailwind CSS, flexbox-first layout and global colour variables |
26
27
  | Tech Stack | [Tech stack](/docs/Standards/tech-stack) | The frameworks, libraries and versions we build on |
27
28
 
@@ -18,11 +18,12 @@ sidebar_label: "Version History"
18
18
  **Read only the versions newer than the project's.** A project on version 1 that is updating to version 3 reads version 2 and version 3 on this page, and nothing else. Do not re-read every standard or check the whole codebase: each version lists every change that matters, and how to find the code it affects.
19
19
 
20
20
  1. **Find the project's version** in its `AGENTS.md`. If there is none, the project has never followed the standards: follow [Setup](/docs/Guides/setup) instead.
21
- 2. **Update the package:** `pnpm update @activatus/code-standards --latest`. Then read this page from `node_modules/@activatus/code-standards/docs/version-history.md`.
21
+ 2. **Update the package:** `pnpm update @activatus/code-standards --latest`. If pnpm refuses because the version is too new, add the package to `minimumReleaseAgeExclude` in `pnpm-workspace.yaml`, as in [Setup](/docs/Guides/setup#1-install-the-standards). Then read this page from `node_modules/@activatus/code-standards/docs/version-history.md`.
22
22
  3. **Read each version newer than the project's**, oldest first. Skip any change to a standard the project opted out of: they are listed in `docs/development/coding-standards.md`.
23
- 4. **For each change, do the "What to do" steps**, then run the "How to check" searches. A search that still finds something means the change is not finished.
24
- 5. **Run `pnpm lint`, `pnpm test` and the build** after each change.
25
- 6. **Update the version number** in `AGENTS.md` once every change is done.
23
+ 4. **For each change, do the "What to do" steps**, then run the "How to check" searches. A search that still finds something means the change is not finished. When a change says to copy a line from the `AGENTS.md` template, and the project's `AGENTS.md` records the standards in its own words instead, write the updated rule there in the project's own shape.
24
+ 5. **Strike out what the standard now covers.** After the changes, re-read the project's list of opted-out and changed standards in `docs/development/coding-standards.md`. Take off the list any exception the new version has made part of the standard, and update any rule it records for an old shape of the standard. A differences list that still describes the old standard sends the next agent wrong.
25
+ 6. **Run `pnpm lint`, `pnpm test` and the build** after each change.
26
+ 7. **Update the version number** in `AGENTS.md` once every change is done.
26
27
 
27
28
  **A patch keeps the same version number.** When only the last number changes, such as 3.0.0 → 3.0.1, the project's version in `AGENTS.md` stays the same, but there may still be work to do. Update the package, then read that version's **Fixes** list and do anything it asks for the project's version. Check it every time the package is updated, even when the version number has not changed.
28
29
 
@@ -37,23 +38,45 @@ Anyone changing the standards adds a version, alongside the change:
37
38
  - **For every change, write:** what changed, why, what to do in a project, and how to check it is done. Write it for an agent that has not read the rest of the standards.
38
39
  - **If a project has nothing to do, say so.**
39
40
  - **Newest version at the top.**
40
- - **Work in progress goes under `## Version N — not released yet`**, with a line saying projects should not apply it yet. Changes can be added to it over time. To release it: drop "not released yet", add the **Released** date and **Updates from** line, set `package.json` to `N.0.0`, then publish.
41
+ - **Work in progress goes under `## Version N — not released yet`**, with a line saying projects should not apply it yet. Changes can be added to it over time. To release it: pilot it (below), drop "not released yet", add the **Released** date and **Updates from** line, set `package.json` to `N.0.0`, then publish.
42
+ - **Pilot a version in a real project before releasing it.** Once the work-in-progress version is written, have one real project apply it exactly as written, reading only what the page says. Every judgement call the agent has to make, and every instruction that does not fit the project, is a missing sentence: fold it back into the version before publishing. Release only when the pilot runs without the agent asking a question the page does not answer.
41
43
  - **Fixing a released version** bumps only the last number: `3.0.0` → `3.0.1`. Update the version's changes in place, and list what was fixed under its **Fixes**. Projects keep the same version number in `AGENTS.md`. Write each fix so a project already on that version knows what to do.
44
+ - **Every patch number is published.** Publish each patch to npm as soon as its Fixes are written. A Fixes entry for a version that was never published sends a project to install something that does not exist.
45
+ - **Judgement calls after release are fixes, not workarounds.** When a project's update needed a call the steps did not cover, add it under the version's Fixes so every other project gets it too. A project should never keep a private workaround for an unclear step.
42
46
 
43
47
  ---
44
48
 
45
49
  ## Version 3
46
50
 
47
- **Released:** 2026-10-17 · **Updates from:** version 2 · **Latest fix:** 3.0.5
51
+ **Released:** 2026-10-17 · **Updates from:** version 2 · **Latest fix:** 3.0.8
48
52
 
49
- Install it with `pnpm add -D @activatus/code-standards@3.0.5`. Do change 1 first: it says which parts of the project's `AGENTS.md` are now the project's own to write.
53
+ Install it with `pnpm add -D @activatus/code-standards@3.0.8`. Do change 1 first: it says which parts of the project's `AGENTS.md` are now the project's own to write.
50
54
 
51
- **Fixes in 3.0.5.** The ESLint configs now pass their own rules. Copied in as they were, they gave three problems on the config file itself: `No magic number: 3` (`no-magic-numbers`), and in Next.js projects two warnings, `import/no-anonymous-default-export` and `import-x/no-named-as-default-member`. Copy the new [ESLint config](/docs/Standards/eslint) for the project's framework over `eslint.config.mjs`, keeping any project-specific block. Then run `pnpm lint`: the config file itself has no problems. If the project already fixed these three by hand, there is nothing to do.
55
+ **Fixes in 3.0.8.** If the project already applied 3.0.7, check these:
56
+
57
+ - **Ask before every commit and push (option B) is gone.** Whether agents commit is the project's own workflow, as in change 1. If the project took B in 3.0.7, the rule stays only if the person wants it: it belongs under **Who commits** in Project workflow, in the project's own words. Remove the "Ask before every commit and push" section copied from the template, and take B off `docs/development/coding-standards.md`.
58
+ - **The Linear project can come from the project's own docs.** If they already name it, read it from there and confirm it with the person. Never copy it from another project.
59
+ - **`pnpm-workspace.yaml` is Prettier-ignored.** pnpm rewrites it with single quotes on every install, so `pnpm format:check` failed after every update. Add `pnpm-workspace.yaml` to `.prettierignore`.
60
+ - **The update steps cover pnpm's release-age check**: if pnpm refuses a version that has only just been published, add the package to `minimumReleaseAgeExclude`. See [Setup](/docs/Guides/setup#1-install-the-standards).
61
+ - 3.0.3 and 3.0.6 were never published to npm. Their fixes are in 3.0.4 and 3.0.7. Every patch is now published.
62
+
63
+ **How to check:** `.prettierignore` lists `pnpm-workspace.yaml`, `pnpm format:check` passes, and `AGENTS.md` has no "Ask before every commit and push" section unless the person chose to keep that rule.
64
+
65
+ **Fixes in 3.0.7.** New, optional: [Working with Agents](/docs/Standards/working-with-agents). Setup now asks for the project's GitHub repo and Linear project, and offers status circles. (3.0.7 also offered asking before every commit and push. 3.0.8 removed it.) If the project already applied 3.0.5:
66
+
67
+ - Add **GitHub repo** and **Linear project** to the Project workflow section of `AGENTS.md`, from the [template](/docs/templates#agents). Read the repo from `git remote get-url origin` and confirm it with the person. Read the Linear project from the project's own docs if they name it, and confirm it; otherwise ask. Never copy it from another project.
68
+ - Print the [status circles](/docs/Guides/setup#working-with-the-agent) question to the person. If they say yes, copy the Status circles section from the template into Project workflow. Write their answer in `docs/development/coding-standards.md`, under "Details". If `AGENTS.md` already has status circles in the project's own words, keep that.
69
+
70
+ **How to check:** Project workflow in `AGENTS.md` names the GitHub repo and the Linear project, and `docs/development/coding-standards.md` records whether the project took the status circles.
71
+
72
+ **Fixes in 3.0.6.** Never published to npm: these fixes are in 3.0.7. Nothing to do in a project. The update steps gained two rules: when the project's `AGENTS.md` records the standards in its own words, an update writes the changed line in that shape; and after an update the project's list of opted-out and changed standards is re-read, taking off it anything the new version now covers. The 3.0.5 numbers change has its check spelled out: `pnpm lint` reporting a `no-magic-numbers` finding means it is not finished. A project-specific block in an ESLint config is now defined: it is recorded in the project's `docs/development/coding-standards.md`, or `pnpm lint` fails without it.
73
+
74
+ **Fixes in 3.0.5.** The ESLint configs now pass their own rules. Copied in as they were, they gave three problems on the config file itself: `No magic number: 3` (`no-magic-numbers`), and in Next.js projects two warnings, `import/no-anonymous-default-export` and `import-x/no-named-as-default-member`. Copy the new [ESLint config](/docs/Standards/eslint) for the project's framework over `eslint.config.mjs`, keeping any project-specific block: one that is recorded in the project's `docs/development/coding-standards.md`, or without which `pnpm lint` fails. A block that is neither, and the lint passes without it, is a leftover: ask before removing it. Then run `pnpm lint`: the config file itself has no problems. If the project already fixed these three by hand, there is nothing to do.
52
75
 
53
76
  - `max-depth` uses a named constant, `MAXIMUM_NESTING_DEPTH`.
54
77
  - The array is assigned to `config` before `export default config`.
55
78
  - The eslint-comments preset is imported by name: `import { recommended as eslintCommentsRecommended } from "@eslint-community/eslint-plugin-eslint-comments/configs";`.
56
- - Numbers have a home: [Numbers](/docs/Structure/folder-structure#numbers-named-and-kept-by-topic). A number used in one file is named at the top of that file, and one shared across the app goes in `lib/constants/`, in a file named after its topic, such as `durations.ts`. There is no `n` object and no `numbers.ts`. If the project has a file of unrelated numbers, split it by topic. Copy the updated **No magic numbers** line from the [`AGENTS.md` template](/docs/templates#agents).
79
+ - Numbers have a home: [Numbers](/docs/Structure/folder-structure#numbers-named-and-kept-by-topic). A number used in one file is named at the top of that file, and one shared across the app goes in `lib/constants/`, in a file named after its topic, such as `durations.ts`. There is no `n` object and no `numbers.ts`. If the project has a file of unrelated numbers, split it by topic. Copy the updated **No magic numbers** line from the [`AGENTS.md` template](/docs/templates#agents). Run `pnpm lint`: a `no-magic-numbers` finding means the change is not finished.
57
80
  - `docsSite/` is ignored. It is the standard docs viewer, with its own packages and build, and without the ignore ESLint lints its built files. If the project already ignores it, nothing changes.
58
81
  - The one-parameter selectors moved into their own `SINGLE_OBJECT_PARAMETER` list. **Next.js:** route handlers in `app/**/route.ts` may now take `(request, context)`. If the project switched the rule off for them some other way, such as an override block or `eslint-disable` comments, remove it.
59
82
 
@@ -62,7 +85,7 @@ Install it with `pnpm add -D @activatus/code-standards@3.0.5`. Do change 1 first
62
85
  - New standard 12.1: links, text and stand-in data live in `lib/constants/`, as `r`, `s` and noData. `r` and `s` are the only single-letter names allowed. Do change 11.
63
86
  - The standards site has a home page, and the docs moved to `/docs/...`. Old links redirect, so nothing breaks. Update any link to the standards site in the project's `AGENTS.md` or docs to the `/docs/` address, such as `https://activatus-code-standards.vercel.app/docs/ontology`.
64
87
 
65
- **Fixes in 3.0.3.** Change 8 now says how to type a function inside an object that is built somewhere else: give the function its own `Props` type, such as `LaunchSessionProps`, and use it. If the project wrote those parameter types out inline, such as `({ worktreePath }: { worktreePath: string })`, replace each with the function's `Props` type. Also new: type first, never `satisfies`. It is an ESLint error now, so copy the new ESLint config and replace each `satisfies` with a type on the declaration, except in Storybook story files.
88
+ **Fixes in 3.0.3.** Never published to npm: these fixes are in 3.0.4. Change 8 now says how to type a function inside an object that is built somewhere else: give the function its own `Props` type, such as `LaunchSessionProps`, and use it. If the project wrote those parameter types out inline, such as `({ worktreePath }: { worktreePath: string })`, replace each with the function's `Props` type. Also new: type first, never `satisfies`. It is an ESLint error now, so copy the new ESLint config and replace each `satisfies` with a type on the declaration, except in Storybook story files.
66
89
 
67
90
  **Fixes in 3.0.2.** Nothing to do in a project:
68
91
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@activatus/code-standards",
3
- "version": "3.0.5",
3
+ "version": "3.0.8",
4
4
  "description": "The Activatus code standards: the rules as Markdown, and the config files to copy. Install it so an AI agent can read the standards from node_modules.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -46,6 +46,32 @@
46
46
  - **Commit messages**: [the commit message format]
47
47
  - **Pull requests**: [review and CI requirements, and where Pull Requests merge to]
48
48
  - **Merging and releases**: [merge strategy, and how work reaches production]
49
+ - **GitHub repo**: [https://github.com/organisation/repo, read from the git remote and confirmed with the person]
50
+ - **Linear project**: [workspace, project and ticket prefix, such as `activatus-life`, Launchpad, `ACT`, read from the project's docs or asked for, and confirmed with the person. Or "None"]
51
+
52
+ **Never copy a Linear workspace or ticket prefix from another project.** If the Linear project above is missing, ask before creating, linking or citing any ticket.
53
+
54
+ ### Status circles
55
+
56
+ [Only if the person chose status circles during setup. Otherwise delete this section.]
57
+
58
+ Report every ticket or piece of work as one line: a status circle, the ticket ID as a link, a short title and, where there is one, its Pull Request as a link. The colour alone says whether the person needs to act.
59
+
60
+ | Circle | Means |
61
+ | --- | --- |
62
+ | ✅ | Merged, In UAT or Done. Nothing to do |
63
+ | 🟢 | Pull Request ready for the person to review and merge. The link is the Pull Request |
64
+ | 🟣 | Working on it |
65
+ | 🟡 | Ready to commit: done, checked, left uncommitted. Say the branch and where it is. The person commits it, or tells the agent to |
66
+ | 🟠 | Waiting on another ticket or Pull Request first. Say which |
67
+ | 🔴 | Blocked, or the person has to do something. Say what, in a few words |
68
+ | ⚪ | Not started (Backlog or Todo) |
69
+
70
+ Example: `🟢 [ABC-12](https://linear.app/[workspace]/issue/ABC-12) Short title: [#19](https://github.com/[organisation]/[repo]/pull/19)`
71
+
72
+ - Every ticket ID links to its ticket, and every Pull Request number links to the Pull Request.
73
+ - Work with no ticket is just the circle and a short title.
74
+ - Only what the person needs to act on. Leave out what they already know.
49
75
 
50
76
  ## Environment variables
51
77