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/AGENTS.md +10 -0
- package/CHANGELOG.md +279 -0
- package/CODE_OF_CONDUCT.md +13 -0
- package/CONTRIBUTING.md +44 -0
- package/MAINTAINERS.md +6 -0
- package/README.md +110 -117
- package/RELEASING.md +22 -0
- package/SECURITY.md +17 -0
- package/SUPPORT.md +6 -0
- package/bin/agent-personalizer.js +265 -111
- package/bin/install-plan.cjs +89 -4
- package/bin/known-hashes.json +881 -0
- package/bin/uninstall.cjs +28 -17
- package/docs/README.md +1 -1
- package/docs/guarantees.md +16 -5
- package/docs/install.md +22 -11
- package/docs/paste-guide.md +15 -6
- package/examples/answers.json +44 -0
- package/examples/freelance-illustrator/.agent-personalizer.json +1 -1
- package/examples/freelance-illustrator/AGENT_ONBOARDING.md +1 -1
- package/hooks/README.md +1 -1
- package/llms.txt +7 -2
- package/package.json +12 -2
- package/render/onboarding.cjs +47 -4
- package/render/render.cjs +14 -12
- package/docs/demo.gif +0 -0
package/README.md
CHANGED
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/agent-personalizer) [](https://github.com/aunysillyme/agent-personalizer/actions/workflows/harness.yml) [](https://github.com/aunysillyme/agent-personalizer/blob/main/CHANGELOG.md) [](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:**
|
|
7
|
+
**The problem:** Custom instructions live in each app separately, drift apart and fade over a long chat.
|
|
8
8
|
|
|
9
|
-
**What you get:**
|
|
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
|
-
|
|
20
|
-
|
|
21
|
-

|
|
17
|
+

|
|
22
18
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
npx agent-personalizer --dir . --ai claude,agents --level 1 --yes --defaults
|
|
27
|
-
```
|
|
19
|
+
## What it sets up
|
|
28
20
|
|
|
29
|
-
|
|
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
|
-
|
|
32
|
-
npx agent-personalizer --full
|
|
33
|
-
```
|
|
38
|
+
## After you install
|
|
34
39
|
|
|
35
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
46
|
+
## Part of a set
|
|
44
47
|
|
|
45
|
-
-
|
|
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
|
-
|
|
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
|
-
|
|
56
|
+
## Choose your setup
|
|
53
57
|
|
|
54
|
-
|
|
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
|
-
|
|
58
|
-
-
|
|
60
|
+
```bash
|
|
61
|
+
npx agent-personalizer --full
|
|
59
62
|
```
|
|
60
63
|
|
|
61
|
-
|
|
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
|
-
|
|
64
|
-
## Who I am
|
|
70
|
+
For a headless install with defaults:
|
|
65
71
|
|
|
66
|
-
|
|
67
|
-
-
|
|
72
|
+
```bash
|
|
73
|
+
npx agent-personalizer --dir . --ai claude,agents --level 1 --yes --defaults
|
|
68
74
|
```
|
|
69
75
|
|
|
70
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
82
|
+
Re-run the installer to change answers or upgrade an install. Use the interview or supply a JSON file:
|
|
80
83
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
92
|
+
At level 3, edit `USER.md` or a source in `rules/`, then render and check:
|
|
95
93
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
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
|
-
|
|
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
|
-
|
|
101
|
+
## Put the contract in context
|
|
105
102
|
|
|
106
|
-
|
|
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
|
-
|
|
109
|
-
|
|
110
|
-
|
|
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 [
|
|
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
|
-
##
|
|
111
|
+
## Check for private strings
|
|
116
112
|
|
|
117
|
-
|
|
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
|
-
|
|
116
|
+
cp check/forbidden.example.txt check/forbidden.local.txt
|
|
117
|
+
node check/gate.cjs --dir .
|
|
121
118
|
```
|
|
122
119
|
|
|
123
|
-
|
|
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
|
-
|
|
124
|
+
Select your notes tool during the full interview:
|
|
126
125
|
|
|
127
126
|
```bash
|
|
128
|
-
|
|
129
|
-
node render/render.cjs --dir . --check
|
|
127
|
+
npx agent-personalizer --full
|
|
130
128
|
```
|
|
131
129
|
|
|
132
|
-
|
|
130
|
+
[Companion setup](docs/companions.md) explains notes connectors and how to turn onboarding answers into tool permissions and approval steps.
|
|
133
131
|
|
|
134
|
-
|
|
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
|
-
|
|
137
|
+
## Common questions
|
|
137
138
|
|
|
138
|
-
|
|
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
|
-
|
|
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
|
-
|
|
143
|
+
### Which instruction files does each AI use?
|
|
147
144
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
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
|
|
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
|
|
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
|
|
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,
|
|
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):**
|
|
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
|
-
|
|
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:
|
|
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).
|