agent-personalizer 0.6.5 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,13 +2,11 @@
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/agent-personalizer.svg)](https://www.npmjs.com/package/agent-personalizer) [![harness](https://github.com/aunysillyme/agent-personalizer/actions/workflows/harness.yml/badge.svg)](https://github.com/aunysillyme/agent-personalizer/actions/workflows/harness.yml) [![release](https://img.shields.io/github/v/tag/aunysillyme/agent-personalizer?label=release)](https://github.com/aunysillyme/agent-personalizer/blob/main/CHANGELOG.md) [![license: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
4
4
 
5
- **Answer a few questions once, and every AI you use gets the same profile and rules:** Claude Code, Codex, Cursor, Gemini and ChatGPT, rendered from one source and kept in sync.
5
+ **Answer a few questions once, and every AI you use gets the same profile and the rules it can carry:** Claude Code, Codex, Cursor, Gemini CLI and ChatGPT, rendered from one source and kept in sync.
6
6
 
7
- **The problem:** custom instructions live in each app separately, drift apart, fade over a long chat, and an AI's guesses about you start to read like your rules.
7
+ **The problem:** Custom instructions live in each app separately, drift apart and fade over a long chat.
8
8
 
9
- **What you get:** one profile and one rule source, rendered into the exact file each AI reads, with a check that fails when a copy drifts and a status on every remembered fact.
10
-
11
- CI installs the packed tarball as a consumer at levels 1 and 2 and checks the ChatGPT paste path.
9
+ **What you get:** One profile and one rule source, rendered into the exact file each AI reads, with a check that fails when a generated copy drifts.
12
10
 
13
11
  ## Quick start
14
12
 
@@ -16,187 +14,182 @@ CI installs the packed tarball as a consumer at levels 1 and 2 and checks the Ch
16
14
  npx agent-personalizer
17
15
  ```
18
16
 
19
- The installer asks for the folder, which AIs you use, and the level. The short interview asks seven questions by default, plus any that apply to your notes tool. Enter accepts each default.
20
-
21
- ![Terminal recording of the short interview, its answers, and the profile, onboarding and AI instruction files it writes.](docs/demo.gif)
17
+ ![A 14-second tour: answer a few questions once, one profile and rule source becomes each AI's own file, the drift check keeps them in sync, and the closing card shows the install command.](https://raw.githubusercontent.com/aunysillyme/agent-personalizer/main/docs/trailer.gif)
22
18
 
23
- For a headless install with defaults:
24
-
25
- ```bash
26
- npx agent-personalizer --dir . --ai claude,agents --level 1 --yes --defaults
27
- ```
19
+ ## What it sets up
28
20
 
29
- For the full interview, asking up to 23 questions, only the ones that apply to your notes tool:
21
+ | Part | What it gives you |
22
+ |---|---|
23
+ | `USER.md` | Your profile, communication preferences and how firmly you mean things. It owns the profile in every profile export. |
24
+ | `AGENT_ONBOARDING.md` | Your AI's reading order, writing policy, off-limits topics and approval steps. |
25
+ | `CLAUDE.md` | Your profile and selected rules in Claude Code's project instruction file. |
26
+ | `AGENTS.md` | Your profile and selected rules in the project file used by Codex and Cursor. |
27
+ | `GEMINI.md` | Your profile and selected rules in Gemini CLI's instruction file. |
28
+ | ChatGPT paste files | `chatgpt-box1.txt` for your profile and `chatgpt-box2.txt` for response instructions, plus a preview with counts. |
29
+ | `system-prompt.md` | Shareable universal rules for another chat app, bot or API. |
30
+ | Notes folder, level 2 | A folder index, weekly session template, decisions log and inbox for local or fallback notes tools. |
31
+ | `rules/`, level 3 | Editable rule sources with universal, personal, AI-specific and origin sections. |
32
+ | Renderer, level 3 | Regenerate the selected AI files from your profile, rules and onboarding answers. |
33
+ | Drift check, level 3 | A failing check when a generated block or ChatGPT paste file differs from its source. |
34
+ | Session-start contract, level 3 | Put your onboarding restrictions and selected rules into context at session start. |
35
+ | Forbidden-string check, level 3 | Catch text and paths matching your private list before sharing files. |
36
+ | `.agent-personalizer.json` | Your targets, level, answers and installed-file history for later runs and removal. |
30
37
 
31
- ```bash
32
- npx agent-personalizer --full
33
- ```
38
+ ## After you install
34
39
 
35
- Requires Node 18 or later. Published on npm with provenance. See [installation](docs/install.md) for scripted answers, the npm cache fix, manual copying, and every flag.
40
+ Start your AI in the installed project folder. Ask it which instruction file loaded and what your writing policy is. Confirm those answers against AGENT_ONBOARDING.md before the first write.
36
41
 
37
- Privacy:
42
+ For ChatGPT, open Settings → Personalization and enable customization. Copy the exported profile (`chatgpt-box1.txt`) and response instructions (`chatgpt-box2.txt`) into the fields your current interface provides, checking its displayed limits. Re-paste after updates; the [paste guide](docs/paste-guide.md) covers each app.
38
43
 
39
- - **Runs locally:** after `npx` fetches the package from npm or GitHub, the tool runs on your machine. That fetch is the one network step.
40
- - **No telemetry:** the installer and renderer make no network calls and read no environment variables.
41
- - **Writes only into the folder you name:** existing user files are preserved, and generated blocks update from their sources.
44
+ File generation, re-runs and uninstall run in CI on Linux, macOS and Windows; your client's context view confirms loading on your setup.
42
45
 
43
- ## What it writes
46
+ ## Part of a set
44
47
 
45
- - **`USER.md`:** your profile, communication preferences, output shape, and the difference between your preferences and rules.
46
- - **`AGENT_ONBOARDING.md`:** the AI's manual, including what to read first, where it may write, and what needs your approval.
47
- - **AI instruction files:** your profile and rules in each selected AI's format.
48
- - **`.agent-personalizer.json`:** the selected targets, level, and onboarding answers used by later runs.
48
+ Three open-source tools that work on their own and fit together:
49
49
 
50
- Here is a real excerpt from the invented [freelance illustrator example](examples/freelance-illustrator/). The renderer copies the same profile into both home files.
50
+ | Repo | What it gives you |
51
+ |---|---|
52
+ | **agent-personalizer** | One interview writes the profile and rules every AI you use reads, kept in sync from one source. |
53
+ | [model-orchestrator](https://github.com/aunysillyme/model-orchestrator) | Model router for AI coding agents: installs routing rules, 8 subagents, hooks and a CLI runner so your AI picks model and effort per task and saves tokens. |
54
+ | [website-build-skill](https://github.com/aunysillyme/website-build-skill) | A skill pack that teaches your AI current website-building expertise: research, design, code, accessibility, performance, search and security. |
51
55
 
52
- [`USER.md`](examples/freelance-illustrator/USER.md):
56
+ ## Choose your setup
53
57
 
54
- ```markdown
55
- ## Who I am
58
+ The short interview asks seven base questions, plus any that apply to your notes tool. Enter accepts each default. For the full interview, which asks up to 23 applicable questions:
56
59
 
57
- - **Name and pronouns:** Mara, she/her
58
- - **What I do:** freelance illustrator. Book covers and editorial work, some client branding on the side.
60
+ ```bash
61
+ npx agent-personalizer --full
59
62
  ```
60
63
 
61
- Inside the generated block in [`CLAUDE.md`](examples/freelance-illustrator/CLAUDE.md):
64
+ | Level | What you get |
65
+ |---|---|
66
+ | **1. Profile and home files** | The profile, onboarding and target-specific instructions for the AIs you pick. |
67
+ | **2. Dynamic docs** | Everything above, plus local notes templates maintained under your writing policy. Cloud notes tools use connector pointers. |
68
+ | **3. Mechanisms** | Everything above, plus local rule sources, the renderer, drift check, hook and forbidden-string gate. |
62
69
 
63
- ```markdown
64
- ## Who I am
70
+ For a headless install with defaults:
65
71
 
66
- - **Name and pronouns:** Mara, she/her
67
- - **What I do:** freelance illustrator. Book covers and editorial work, some client branding on the side.
72
+ ```bash
73
+ npx agent-personalizer --dir . --ai claude,agents --level 1 --yes --defaults
68
74
  ```
69
75
 
70
- Inside the generated block in [`AGENTS.md`](examples/freelance-illustrator/AGENTS.md):
76
+ Node 22 or 24 (active LTS) is recommended; 18 or later runs. Published on npm with provenance. [Installation](docs/install.md) covers scripted answers, every flag, notes tools and manual copying.
71
77
 
72
- ```markdown
73
- ## Who I am
78
+ The tool runs locally after `npx` fetches the package. The installer and renderer make no network calls, send no telemetry and read no environment variables. Writes stay inside the folder you name, with edited files preserved and named.
74
79
 
75
- - **Name and pronouns:** Mara, she/her
76
- - **What I do:** freelance illustrator. Book covers and editorial work, some client branding on the side.
77
- ```
80
+ ## Keep it in sync
78
81
 
79
- ## Works with
82
+ Re-run the installer to change answers or upgrade an install. Use the interview or supply a JSON file:
80
83
 
81
- | AI | File | How it loads |
82
- |---|---|---|
83
- | Claude Code | `CLAUDE.md` | Reads it from the working folder automatically. |
84
- | Codex and Cursor | `AGENTS.md` | Read it from the project root automatically. |
85
- | Gemini CLI | `GEMINI.md` | Reads it from the folder automatically. |
86
- | claude.ai and Claude Projects | `USER.md` and `AGENT_ONBOARDING.md` | Paste their bodies into custom or project instructions. |
87
- | ChatGPT | `chatgpt-box1.txt` and `chatgpt-box2.txt` | Paste into the custom-instruction boxes; `chatgpt-custom-instructions.md` shows the same text with counts. |
88
- | Other chat apps, bots and APIs | `system-prompt.md` | Paste into the system-prompt field. It contains the shareable universal rules. |
84
+ ```bash
85
+ npx agent-personalizer --dir . --ai claude,agents --level 1 --yes --answers my-answers.json
86
+ ```
89
87
 
90
- The [paste guide](docs/paste-guide.md) covers each app, ChatGPT's box budget, and what to re-paste after an update.
88
+ Untouched installer files update to what a fresh install with those answers would create. Edited files stay yours. Home pointer lines that still match the previous template update or disappear when obsolete; edited lines stay byte for byte and are named for manual review. Changing the notes path keeps the old folder and names it next to the new one. Upgrading refreshes untouched tools and rule copies; edited copies are kept with a replacement step.
91
89
 
92
- ## Levels
90
+ `USER.md` updates while it remains an untouched installer profile. An edited or pre-existing profile stays the source for every profile export, including ChatGPT. Changed onboarding answers are named so you can carry them into your profile by hand.
93
91
 
94
- Choose the files and tools you want the installer to add:
92
+ At level 3, edit `USER.md` or a source in `rules/`, then render and check:
95
93
 
96
- | Level | What it gives you | What it writes |
97
- |---|---|---|
98
- | **1. Profile and home files** | The same profile and rules for the AIs you pick. | `USER.md`, `AGENT_ONBOARDING.md`, one home file per AI, and `.agent-personalizer.json`. ChatGPT also gets plain paste files for its boxes. |
99
- | **2. Dynamic docs** | A notes folder the AI keeps under your writing rules. | Everything in level 1, plus a folder index, weekly session-log template, decisions log and inbox for local notes tools. |
100
- | **3. Mechanisms** | Editable rules and tools that keep the generated files in sync. | Everything above, plus your own `rules/`, renderer, session-start hook, drift check and forbidden-string gate. |
94
+ ```bash
95
+ node render/render.cjs --dir .
96
+ node render/render.cjs --dir . --check
97
+ ```
101
98
 
102
- Level 2 creates a local notes folder for disk tools such as Obsidian, Logseq and plain markdown. OneNote, Evernote and other tools use a local fallback. Cloud tools such as Notion get connector pointers and keep their notes in the cloud. Existing local notes scaffolds are detected at any level.
99
+ `--check` exits 0 when current, 1 on drift and 2 on invalid input. Start a new client session to load changed files and re-paste exports into chat apps. Each rule's `origin` section explains the failure it prevents; keep that story when adding a rule. See [updating an install](docs/install.md#updating-an-install).
103
100
 
104
- The notes templates give the AI a place for session notes, decisions and inbox items. When you answer yes to signing edits, its instructions include `Last edited by: <ai> <model> <date> · <ten words>`, overwritten on each edit. The AI maintains these notes according to your instructions.
101
+ ## Put the contract in context
105
102
 
106
- Level 3 adds four pieces:
103
+ At level 3, [register the Claude Code hook](hooks/README.md) to inject the onboarding restrictions and `inject: true` rules at session start. For another AI, generate a prompt to paste into its first message:
107
104
 
108
- - **Rule source and renderer:** edit one file in `rules/`; render its universal, personal and AI-specific text into each target.
109
- - **Session-start contract:** put the onboarding restrictions and `inject: true` rules into context when a Claude Code session starts. [Register the hook](hooks/README.md), or generate a plain prompt for another AI.
110
- - **Drift check:** compare generated blocks with what their sources render now, and fail when they differ.
111
- - **Forbidden-string gate:** check file text and paths for strings in your private list before sharing. [Configure the gate](docs/guarantees.md#forbidden-string-gate).
105
+ ```bash
106
+ node render/render.cjs --dir . --contract > contract.txt
107
+ ```
112
108
 
113
- The [five instruction tiers](docs/tiers.md) explain where style, home files, session contracts, rule owners and memory belong. [Guarantees](docs/guarantees.md) explains what the code enforces and how the instructions reach the AI.
109
+ The [instruction tiers](docs/tiers.md) explain where style, home files, contracts, rule owners and memory belong. The contract puts your instructions in context; your host and model apply them.
114
110
 
115
- ## Keep it in sync
111
+ ## Check for private strings
116
112
 
117
- Re-run the installer to change your answers. Use the interview or supply a JSON file:
113
+ At level 3, copy the example list, fill it with your identifiers and keep it in your project's `.gitignore`:
118
114
 
119
115
  ```bash
120
- npx agent-personalizer --dir . --ai claude,agents --level 1 --yes --answers my-answers.json
116
+ cp check/forbidden.example.txt check/forbidden.local.txt
117
+ node check/gate.cjs --dir .
121
118
  ```
122
119
 
123
- `AGENT_ONBOARDING.md` and the selected rendered blocks update together. `USER.md` updates when it still matches the previous answers byte for byte. An edited profile stays yours; the installer names changed answers for you to carry over.
120
+ The gate checks file text and paths against that list. A missing or malformed list is refused. [Configure the gate](docs/guarantees.md#forbidden-string-gate) for your project before sharing it.
121
+
122
+ ## Companion tools
124
123
 
125
- At level 3, edit `USER.md` or `rules/`, then render and check:
124
+ Select your notes tool during the full interview:
126
125
 
127
126
  ```bash
128
- node render/render.cjs --dir .
129
- node render/render.cjs --dir . --check
127
+ npx agent-personalizer --full
130
128
  ```
131
129
 
132
- `--check` exits 0 when current, 1 on drift, and 2 on invalid input. Files your AI reads automatically are ready for the next session. Re-paste the updated text into chat apps. See [installation](docs/install.md#updating-an-install) for the full update flow.
130
+ [Companion setup](docs/companions.md) explains notes connectors and how to turn onboarding answers into tool permissions and approval steps.
133
131
 
134
- ## Part of a set
132
+ | Tool | What it gives you |
133
+ |---|---|
134
+ | [obsidian-tc](https://github.com/The-40-Thieves/obsidian-tc) | Governed Obsidian access: configure folder permissions from your off-limits answer and human approval from your always-ask answer. |
135
+ | [The Context Layer](https://sierracatalina.com/context-layer) | Purpose-bound context with receipts; its decide and vault stages apply your write policy and off-limits boundaries. |
135
136
 
136
- Three open-source tools that work on their own and fit together:
137
+ ## Common questions
137
138
 
138
- | Repo | What it gives you |
139
- |---|---|
140
- | **agent-personalizer** | One interview writes the profile and rules every AI you use reads, kept in sync from one source. |
141
- | [model-orchestrator](https://github.com/aunysillyme/model-orchestrator) | Model router for AI coding agents: installs routing rules, 8 subagents, hooks and a CLI runner so your AI picks model and effort per task and saves tokens. |
142
- | [website-build-skill](https://github.com/aunysillyme/website-build-skill) | A skill pack that teaches your AI current website-building expertise: research, design, code, accessibility, performance, search and security. |
139
+ ### How do I share custom instructions across Claude Code, Codex, Cursor and ChatGPT?
143
140
 
144
- ## Companion tools
141
+ Run `npx agent-personalizer` and select the AIs you use. One profile and rule source produce the instructions each target can carry; ChatGPT gets its profile and selected session rules as paste files.
145
142
 
146
- These optional tools turn onboarding answers into access controls and approval steps. [Companion setup](docs/companions.md) covers their configuration and how each notes tool is reached.
143
+ ### Which instruction files does each AI use?
147
144
 
148
- | Tool | What it gives you |
149
- |---|---|
150
- | [obsidian-tc](https://github.com/The-40-Thieves/obsidian-tc) | Governed Obsidian access: configure folder permissions from your off-limits answer and human approval from your always-ask answer. |
151
- | [The Context Layer](https://sierracatalina.com/context-layer) | Purpose-bound context with receipts; its decide and vault stages apply your write policy and off-limits boundaries. |
145
+ Choose targets with `npx agent-personalizer --dir . --ai claude,agents,gemini,chatgpt --level 1 --yes --defaults`. It creates `CLAUDE.md`, `AGENTS.md`, `GEMINI.md` and the ChatGPT exports shown in [What it sets up](#what-it-sets-up); the [paste guide](docs/paste-guide.md) explains loading and activation.
146
+
147
+ ### How do I update my AI profile or change an answer?
148
+
149
+ For answers, run `npx agent-personalizer --dir . --ai claude,agents --level 1 --yes --answers my-answers.json`. At level 3, edit `USER.md` or `rules/`, then run `node render/render.cjs --dir .`; re-paste changed chat exports.
150
+
151
+ ### How do I check generated instructions for drift?
152
+
153
+ At level 3, run `node render/render.cjs --dir . --check`. Exit 0 means the generated blocks and paste files match their sources; exit 1 identifies drift and exit 2 names invalid input.
154
+
155
+ ### How do I upgrade installed tools safely?
156
+
157
+ Re-run `npx agent-personalizer --dir . --ai claude,agents --level 3 --yes --defaults` with the newer package. Untouched tools refresh, edited copies stay and the log gives the replacement step.
158
+
159
+ ### How do I uninstall agent-personalizer and keep my notes?
160
+
161
+ Preview with `npx agent-personalizer --uninstall --dir . --dry`, then run `npx agent-personalizer --uninstall --dir .`. Edited files and user-written notes stay, and the log names retained installed files.
152
162
 
153
163
  ## Uninstall
154
164
 
155
- Preview removal, then run it:
165
+ Preview with --uninstall --dry. Removal compares recorded install hashes, keeps edited files and notes, and lists any hook registration you must remove.
156
166
 
157
167
  ```bash
158
168
  npx agent-personalizer --uninstall --dir . --dry
159
169
  npx agent-personalizer --uninstall --dir .
160
170
  ```
161
171
 
162
- The uninstaller compares files with the current render and templates. Unchanged generated files are removed. Edited files and your notes stay, and kept files are named. Existing home files keep their own text; only an unchanged generated block is removed. Remove any session-start hook registration from your AI's settings when prompted. See [removal details](docs/install.md#uninstall).
163
-
164
- ## For agents
172
+ The inventory covers every path recorded by any install run, including earlier notes folders and rules omitted by later answers. Existing home files keep their own text while an unchanged generated block is removed. Only install-created empty folders are removed; the configuration goes last and stays while tracked files are retained. See [removal details](docs/install.md#uninstall).
165
173
 
166
- Read [`llms.txt`](llms.txt) for documentation links and [`AGENTS.md`](AGENTS.md) for contributor instructions. Headless setup: `npx agent-personalizer --dir . --ai claude,agents --level 1 --yes --defaults`.
167
-
168
- ## Every rule carries its story
169
-
170
- Each file in [`rules/`](rules/) ends with an `origin` block: the failure that produced the rule and the failure it prevents. Fill it in when you add a rule so a reader can see why it exists and when it applies.
171
-
172
- ## Docs
174
+ ## Read next
173
175
 
174
176
  Start at the [documentation index](docs/README.md):
175
177
 
176
- - **[Install and uninstall](docs/install.md):** flags, scripted answers, updates and removal.
178
+ - **[Install and uninstall](docs/install.md):** flags, scripted answers, re-runs, upgrades and removal.
177
179
  - **[Instruction tiers](docs/tiers.md):** where each kind of instruction belongs.
178
- - **[Paste guide](docs/paste-guide.md):** how each AI loads its files.
180
+ - **[Paste guide](docs/paste-guide.md):** how each AI loads its files and how to activate exports.
179
181
  - **[Companions](docs/companions.md):** notes connectors and enforcement tools.
180
- - **[Guarantees](docs/guarantees.md):** rendering, checks, preflight and runtime safety.
182
+ - **[Guarantees](docs/guarantees.md):** source ownership, drift checks, preflight and runtime safety.
181
183
  - **[Changelog](CHANGELOG.md):** release history.
184
+ - **[Support](SUPPORT.md):** question, bug, feature and private security routes.
182
185
 
183
- ## Common questions
184
-
185
- **How do I keep the same custom instructions across Claude Code, Codex, Cursor and ChatGPT?** One interview writes `USER.md` and `rules/` once, and the renderer copies that same profile and rules into every AI's own file. Run `npx agent-personalizer` and pick every AI you use, for example `--ai claude,agents,gemini,chatgpt,prompt`.
186
-
187
- **Which files does it write for each AI?** Claude Code reads `CLAUDE.md`, Codex and Cursor read `AGENTS.md`, Gemini CLI reads `GEMINI.md`, and ChatGPT takes `chatgpt-box1.txt` and `chatgpt-box2.txt` pasted into its two custom-instruction boxes. See [Works with](#works-with) for the full table and the [paste guide](docs/paste-guide.md) for every app.
188
-
189
- **How do I change an answer later?** Re-run the installer with the interview, or supply a JSON answers file: `npx agent-personalizer --dir . --ai claude,agents --level 1 --yes --answers my-answers.json`. `AGENT_ONBOARDING.md` and the rendered blocks update together, and `USER.md` regenerates only when it still matches your previous answers byte for byte. See [updating an install](docs/install.md#updating-an-install).
190
-
191
- **How do I check that nothing drifted?** At level 3, run `node render/render.cjs --dir . --check`. It exits 0 when every generated file matches what its sources render now, and 1 when one has drifted.
192
-
193
- **How do I remove it?** Preview first with `npx agent-personalizer --uninstall --dir . --dry`, then run `npx agent-personalizer --uninstall --dir .`. Unchanged generated files are removed, while edited files, your notes and a pre-existing home file's own text stay. See [removal details](docs/install.md#uninstall).
186
+ **For agents:** read [`llms.txt`](llms.txt) for documentation links and [`AGENTS.md`](AGENTS.md) for contributor instructions. Headless setup: `npx agent-personalizer --dir . --ai claude,agents --level 1 --yes --defaults`.
194
187
 
195
188
  ## Contributing
196
189
 
197
- Contributions are welcome: a new AI target, a notes tool, an example user, or a failure you hit with steps to reproduce it. [CONTRIBUTING.md](CONTRIBUTING.md) covers the rule format and checks.
190
+ Contributions are welcome: a new AI target, a notes tool, an example user, or a failure you hit with steps to reproduce it. [CONTRIBUTING.md](CONTRIBUTING.md) covers the rule format and checks; [MAINTAINERS.md](MAINTAINERS.md) names the owner and release responsibilities.
198
191
 
199
- The harness (`test/run.sh: 91 checks`) tests exact exit codes and adversarial fixtures. Every push and pull request runs it on Ubuntu and macOS; Windows CI smoke-tests the Node entry points. The shell harness and hook run under WSL or Git Bash on Windows. The real forbidden-list check stays local and prints a skip when the private list is absent.
192
+ The harness (`test/run.sh: 98 checks`) tests exact exit codes and adversarial fixtures. The real forbidden-list check stays local and prints a skip when the private list is absent.
200
193
 
201
194
  ## License
202
195
 
package/RELEASING.md ADDED
@@ -0,0 +1,22 @@
1
+ # Releasing
2
+
3
+ Maintainer notes. Follow the steps below for version sites, rendering, checks and publication. The harness pins what it can; the rest is written here.
4
+
5
+ 1. Every change in the release has a `CHANGELOG.md` line under `[Unreleased]`, naming the audit round or issue that produced it where one did.
6
+ 2. Move `[Unreleased]` to `[X.Y.Z] - YYYY-MM-DD`, add the compare link at the bottom, and point the `[Unreleased]` link at `vX.Y.Z...HEAD`.
7
+ 3. Set the version in the three places the harness pins together: `package.json`, `const VERSION` in `render/onboarding.cjs` (it builds the docs URL every installed file links to), and the tiers link in `hooks/README.md`.
8
+ 4. Re-render the example, because its files carry that version-keyed docs URL: `node render/render.cjs --dir examples/freelance-illustrator`, then the same command with `--check` must print nothing. Skipping this step is the one thing that has turned a release commit red, twice.
9
+ 5. `sh test/run.sh` green locally (the count guard included). Push `main`; CI green on that commit.
10
+ 6. `git tag -a vX.Y.Z -m "X.Y.Z: <one line>"` and `git push origin main vX.Y.Z`.
11
+ 7. `gh release create vX.Y.Z --title X.Y.Z --notes "<the changelog section>"`.
12
+ 8. `gh workflow run publish.yml --ref main -f tag=vX.Y.Z`, then `gh run watch <run id> --exit-status`.
13
+
14
+ **Verify.** `npm view agent-personalizer@X.Y.Z version` prints `X.Y.Z` (query the exact version: the bare `npm view agent-personalizer version` can lag a minute behind the run), and `https://registry.npmjs.org/-/npm/v1/attestations/agent-personalizer@X.Y.Z` returns a Sigstore bundle. In a fresh temp dir, `npx --yes agent-personalizer@X.Y.Z --version` prints the new version.
15
+
16
+ **How `publish.yml` works.** Manual `workflow_dispatch` with the tag as its input, live since 0.4.1. 0.4.0 was published by hand from the tag checkout by a logged-in maintainer (`npm publish --access public`, no provenance is possible from a laptop), because npm only lets a trusted publisher be configured in the settings of a package that already exists. The job resolves the input through `refs/tags/` and checks out that commit by SHA, so a branch with a tag-like name cannot be published; the tag must equal the `package.json` version; it upgrades npm first (trusted publishing needs npm 11.5.1 or later and Node 22 bundles 10.x), runs the harness, then `npm publish --provenance --access public` with `id-token: write`. No npm token is stored anywhere. The trusted publisher on npm is GitHub Actions, this repository, workflow file `publish.yml`, direct publish allowed.
17
+
18
+ **Two things GitHub will not tell you.** A workflow file it cannot parse is dropped silently: `gh workflow run` says the workflow has no `workflow_dispatch` trigger, and the workflow list shows the file path where its name should be. It happened here once over an unquoted `: ` in a step name; the harness now parses both workflow files. This guide ships in the tarball so its offline links work. Workflow-only changes can land without a package release.
19
+
20
+ Optional hardening: put the publish job behind a protected GitHub environment with a required reviewer (a repository setting, not a file change).
21
+
22
+ `npx agent-personalizer` is the install path; `npx github:aunysillyme/agent-personalizer` still runs the tag directly.
package/SECURITY.md ADDED
@@ -0,0 +1,17 @@
1
+ # Security policy
2
+
3
+ This is a small local tool: it reads your files, writes files into a folder you name, and calls nothing over the network. The risks that matter are the ones its audit history is about: writing where it should not, following a symlink, or letting your private forbidden list ship.
4
+
5
+ ## Reporting a vulnerability
6
+
7
+ Use GitHub's private vulnerability reporting on this repository (Security tab → "Report a vulnerability"). That opens a private advisory only the maintainer can see. Please do not open a public issue for anything that could let an installer or renderer write outside the folder the user named, read a file it should not, or let `check/forbidden.local.txt` reach a commit.
8
+
9
+ You will get an acknowledgement within 7 days and a fix or a reasoned "won't fix" within 30. Credit is given in the changelog unless you ask otherwise.
10
+
11
+ ## Scope
12
+
13
+ In scope: `bin/agent-personalizer.js`, `render/`, `check/gate.cjs`, `hooks/`, the templates and the harness. Out of scope: the AI products this repo writes files for, and the companion tools it links to (report those to their own projects).
14
+
15
+ ## What is already done
16
+
17
+ Every release passes an adversarial read-only audit (see `CHANGELOG.md`, each entry names its round) and a 98-check harness with exact exit codes, on Linux and macOS in CI. The deferred residuals are stated in the code headers: TOCTOU between check and write, unicode look-alikes in the gate, the named `--dir` being followed once via realpath, and a hard process kill between two renames. On Windows, `O_NOFOLLOW` is unavailable to the flag the uninstaller opens tracked files with; nothing depends on it there, because the delete loop re-probes every path with `lstat` immediately before each unlink, so no destructive path exists without it.
package/SUPPORT.md ADDED
@@ -0,0 +1,6 @@
1
+ # Support
2
+
3
+ - **Questions:** use the [question form](https://github.com/aunysillyme/agent-personalizer/issues/new?template=question.yml).
4
+ - **Bugs:** use the [bug report form](https://github.com/aunysillyme/agent-personalizer/issues/new?template=bug_report.yml) with the command, output and exit code.
5
+ - **Features:** use the [feature request form](https://github.com/aunysillyme/agent-personalizer/issues/new?template=feature_request.yml) with an observable success check.
6
+ - **Security:** report privately through [SECURITY.md](SECURITY.md).