cherry-works 0.8.0 → 0.9.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 CHANGED
@@ -1,475 +1,110 @@
1
1
  # Cherry Works
2
2
 
3
- A charter engine for coding agents. You write your team's standards as small
4
- markdown files, and `cw` checks them, tests them and compiles them into the
5
- files your coding agent actually reads.
3
+ Current version: **0.9.0**
6
4
 
7
- ```text
8
- .cw/charter/guide/no-any/index.md ──cw build──▶ CLAUDE.md
9
- .cw/charter/sensor/lint/index.md .claude/rules/…
10
- .cw/charter/posture/secrets/index.md .claude/settings.json (hooks, permissions)
11
- … .claude/skills/…, .claude/agents/…
12
- .mcp.json (cw mcp serve)
13
- ```
5
+ **Your team's way of working, written once for coding agents.**
14
6
 
15
- ## Why
7
+ Keep coding standards, workflows, tools and permissions in a **charter**:
8
+ small Markdown files you can review, test and share. Cherry Works compiles
9
+ them into the files **Claude Code** and **Codex** read.
16
10
 
17
- A coding agent follows whatever instructions it can see. Those instructions
18
- usually end up as one long prompt file that nobody reviews and that falls out of
19
- date. Cherry Works handles them the way you handle code:
11
+ ![Charter at the center, surrounded by its eleven primitive kinds](docs/images/charter-primitives.svg)
20
12
 
21
- - **Small, typed files.** Each rule is a separate primitive of one kind, such as
22
- a guide, a sensor or a posture. Each kind says which fields it requires and
23
- when it comes up.
24
- - **One build.** `cw build` regenerates every file the agent reads from the
25
- charter in one pass. Nothing is edited by hand, and a rule you delete
26
- disappears from the output.
27
- - **Checked and tested.** `cw doctor` names each broken file and says how to fix
28
- it. `cw test` runs cases that pin down which rule must come up for which file
29
- or event. It runs no command and needs no agent, so the result is the same on
30
- every machine.
31
- - **Shared without copying.** You can install another team's charter as a vendor
32
- source. It is pinned to a version and committed with your code, and it never
33
- silently overrides your own rules.
13
+ ## Why use it?
34
14
 
35
- ## Requirements
15
+ - **Keep instructions maintainable.** One rule or workflow per file, with an
16
+ explicit purpose and scope.
17
+ - **Build for your agent.** Generate instructions, skills and supported host
18
+ settings from the same source.
19
+ - **Check what you ship.** Validate the charter, test which rules apply, and
20
+ evaluate whether a real agent follows them.
21
+ - **Share your team's practices.** Publish a vendor charter and install a
22
+ versioned copy in other repositories.
36
23
 
37
- - Node.js 22 or later
38
- - git
39
- - A supported agent. Today that is [Claude Code](https://claude.com/claude-code).
40
- `cw` always writes a neutral output under `.cw/out/` as well.
24
+ ## Get started
41
25
 
42
- ## Install
26
+ You need **Node.js 22+**, **Git**, and Claude Code or Codex.
43
27
 
44
28
  ```bash
45
29
  npm install -g cherry-works
46
- cw --help
47
- ```
48
-
49
- To run it once without installing anything, use `npx cherry-works <command>`.
50
- To pin one version to a repository, so that its scripts and its CI run that
51
- version whatever is installed globally, add it as a development dependency:
52
-
53
- ```bash
54
- npm install -D cherry-works
55
- npx cw --version
56
- ```
57
-
58
- `cw --version` prints the version you are running. Upgrade with
59
- `npm install -g cherry-works@latest`.
60
-
61
- ## Install from source
62
-
63
- To run `cw` from a checkout of this repository, you also need pnpm 10 or later.
64
- Build it and link it globally:
65
-
66
- ```bash
67
- git clone https://github.com/tamnguyenvt/cherry-works.git
68
- cd cherry-works
69
- pnpm install
70
- pnpm build
71
- pnpm link --global
72
- cw --help
73
30
  ```
74
31
 
75
- The link points at your checkout. After you change the sources, run
76
- `pnpm build` again. To remove the link, run `pnpm uninstall --global cherry-works`.
32
+ Using a local checkout? [Build and link it globally with pnpm](docs/reference.md#install-from-a-local-checkout).
77
33
 
78
- ## Quick start
79
-
80
- Inside the git repository you want to govern:
34
+ Inside the repository you want to govern:
81
35
 
82
36
  ```bash
83
- cw init # asks which agent to compile for (claude, selected), scaffolds .cw/charter/ and builds
84
- cw kinds guide # what a guide requires
37
+ cw init # choose your agent and initialize the charter
85
38
  cw add guide no-any --header description="No any in TypeScript." --header globs="src/**/*.ts"
86
- cw edit guide:no-any # write the body in $VISUAL or $EDITOR
87
- cw build # compile the charter for your agent
88
- cw doctor # check that everything holds
89
- ```
90
-
91
- Commit `.cw/` together with what `cw build` wrote. Your agent now reads the rule
92
- in every session in this repository.
93
-
94
- ## The charter
95
-
96
- A primitive is a markdown file with YAML front matter. The folder it sits in
97
- names its kind:
98
-
99
- ```markdown
100
- ---
101
- kind: guide
102
- id: no-single-word-naming
103
- description: How to name a function or a variable.
104
- globs: ["src/**/*.ts"]
105
- ---
106
-
107
- Never name a function or variable with a single vague word such as `it`, `data`
108
- or `merged`. Name it after what it holds or does.
109
- ```
110
-
111
- Each kind comes up at a different time:
112
-
113
- | Kind | Comes up when |
114
- |---|---|
115
- | `guide` | a touched file matches one of its `globs`, or on every turn when it has no globs |
116
- | `sensor` | the `signal` it names is raised, and the harness runs its `run` command |
117
- | `skill` | one of its `triggers` matches the request, or it is called by name as `/<id>` |
118
- | `playbook` | one of its `triggers` matches, or it is called as `/<id>`; its body is a sequence of skills |
119
- | `agent` | it is spawned by its id, with only the `tools` it lists |
120
- | `posture` | always, wherever the host can be told what to `allow` and `deny` |
121
- | `corpus` | a primitive's `rationale` cites it, to give the reasoning behind a rule |
122
- | `mixin` | never on its own; its body is lent to the primitives that pull it in |
123
- | `mcp` | a primitive's body names it as `[[<id>]]`: an mcp origin outside the repository, reached through `cw mcp serve` |
124
-
125
- A skill or a playbook that is only a step of another can say
126
- `disable-user-invocation: true`: it is then not offered as a `/` command, and
127
- the agent still opens it when its triggers match or a playbook sends it there.
128
- One that only you should start can say `disable-model-invocation: true`: it is
129
- still a `/` command, and the agent never opens it on its own. A primitive
130
- cannot say both, since then nobody could open it.
131
-
132
- `cw kinds <kind>` gives the exact fields each kind takes. An id names exactly
133
- one primitive across the whole charter, whatever its kind. If two files claim
134
- the same id, the build is refused and both files are named. A primitive is
135
- named by its id alone: bare in a header (`rationale: type-safety`), a test or a
136
- command, and as `[[<id>]]` in a body, which the build turns into a link.
137
- Every primitive is a folder holding its `index.md`, and any other file in that
138
- folder is one of its assets, reached from the body as `./<file>`. An id is at
139
- most 40 characters, and may be grouped with `/`: the mcp `mfbs/billing` is kept at
140
- `.cw/charter/mcp/mfbs/billing/index.md`.
141
-
142
- `cw build` compiles every primitive to `.cw/out/<kind>/<id>/index.md`, with its
143
- assets copied beside it: its headers,
144
- then the bodies of the mixins it pulls in, then its own. What your agent's host
145
- is given points to that document, so you can open any primitive exactly as the
146
- agent reads it.
147
-
148
- ## Commands
149
-
150
- | Command | What it does |
151
- |---|---|
152
- | `cw init [--agent]` | Set the repository up under a charter, and build it |
153
- | `cw build [--preview]` | Compile the charter, or show what a build would write |
154
- | `cw list [--kind] [--min]` | List what the charter holds |
155
- | `cw kinds [kind]` | List the kinds, or the fields one of them requires |
156
- | `cw add <kind> <id> [--header k=v …]` | Write a new primitive |
157
- | `cw edit <id>` | Open a primitive's file in your editor |
158
- | `cw remove <id> [--yes]` | Delete a primitive this repository authored |
159
- | `cw explain <id>` | Show which file declares an id, what it pulls in and which tests name it |
160
- | `cw doctor` | Check the agents, the charter, the vendor sources and the compiled output |
161
- | `cw context [--exact]` | Say how many tokens the charter puts into the agent's context when a session opens |
162
- | `cw sessions [--since] [--until] [--json]` | Sum up the tokens of the sessions kept on this machine, by day and by session |
163
- | `cw test` | Run every case in `.cw/test/` against the charter |
164
- | `cw eval` | Put every case in `.cw/eval/` to the real agent under promptfoo |
165
- | `cw suite add \| edit \| remove` | Manage test files |
166
- | `cw vendor add <source> [--ref] [--skill] \| remove \| list` | Install, update, remove or list vendor sources: a charter, or skills from a repository listed on [skills.sh](https://skills.sh) |
167
- | `cw portal [--port]` | Open the charter in a browser on this machine |
168
- | `cw mcp auth [id] [--status]` | Sign in, as yourself, to every mcp origin the charter reaches, or to one again |
169
- | `cw mcp serve` | Serve every mcp origin the charter reaches to your agent, over stdio |
170
-
171
- `cw doctor` exits with a failure status when the charter has an error, when a
172
- vendored file was edited in this repository, or when the compiled output no
173
- longer matches the charter. That makes it a gate you can run in CI.
174
-
175
- ## The portal
176
-
177
- If you would rather not remember commands and field names, run the portal from
178
- inside a governed repository:
179
-
180
- ```bash
181
- cw portal # serves on port 9927, or the next free port
182
- cw portal --port 8080
183
- ```
184
-
185
- It prints an address such as `http://127.0.0.1:9927/?t=…`. Open that address in
186
- your browser. The page has three tabs:
187
-
188
- ![The Repo Charter tab: kind chips, and the guides of a repository with their globs, rationale and mixins](docs/images/portal-charter.png)
189
-
190
- - **Repo Charter** lists every primitive of this repository by kind, with the
191
- engine's own line on when that kind comes up. From here you can create a
192
- primitive, then open it to edit its fields and its markdown body, or delete
193
- it. The form is built from what the kind requires, so it asks only for the
194
- fields that kind takes. The **?** on a row explains the primitive: when it
195
- comes up, what it pulls in, what cites it and which tests name it.
196
-
197
- | Editing a primitive | Explaining it |
198
- |---|---|
199
- | ![The form for guide:no-any, with its globs, rationale, mixins and markdown body](docs/images/portal-edit.png) | ![The explanation of guide:no-any: when it comes up, what it pulls in and the test that names it](docs/images/portal-explain.png) |
200
- - **Vendor** lists the vendor sources you installed and their primitives, which
201
- are read-only. You can add a source by its git address and a version, or
202
- remove one.
203
- - **Test** lists the test files in `.cw/test/`. You can create, edit and delete
204
- them, and run every case to see which pass and why a failing one failed.
205
-
206
- ![The Test tab after a run: 4 of 5 cases pass, and the failing case says why](docs/images/portal-tests.png)
207
-
208
- The header has a search that finds any primitive in any layer, and two buttons:
209
- **Build**, which shows what a build would write before it writes anything, and
210
- **Doctor**, which runs the health check and offers a build when the output is
211
- behind.
212
-
213
- The portal drives the same engine as the command line and adds no behaviour of
214
- its own. What it shows is what the engine answered, and everything it does has
215
- a command-line equivalent. When the engine refuses a change, the portal shows
216
- the refusal in the engine's words and writes nothing. It listens only on
217
- `127.0.0.1`, and every request needs the token in the printed address. Stop it
218
- with Ctrl+C.
219
-
220
- ## Testing a charter
221
-
222
- A test file in `.cw/test/` describes situations and what must come up in each
223
- one:
224
-
225
- ```json
226
- {
227
- "description": "The TypeScript guide comes up on source files.",
228
- "cases": [
229
- { "do": { "touchFile": "src/one.ts" }, "expect": { "activate": "no-any" } },
230
- { "when": "Stop", "expect": { "run": "lint" } },
231
- { "do": { "touchFile": ".env" }, "expect": { "allow": false } }
232
- ]
233
- }
39
+ cw edit no-any # write the rule in your editor
40
+ cw build # generate the agent's files
41
+ cw doctor # check the result
234
42
  ```
235
43
 
236
- `cw test` resolves each case against the charter and reports the ones that no
237
- longer hold. It runs no agent and costs nothing, so it fits in CI.
238
-
239
- ## Evaluating against the real agent
44
+ Your rule lives at `.cw/charter/guide/no-any/index.md`. Edit that source and
45
+ rebuild when it changes. Review and commit `.cw/` together with the generated
46
+ agent files.
240
47
 
241
- `cw test` proves what the charter says; `cw eval` proves what the agent does
242
- with it. A file in `.cw/eval/` holds prompts and what is expected of each:
48
+ → [Write your first charter](docs/writing-a-charter.md)
243
49
 
244
- ```json
245
- {
246
- "description": "Planning goes through the planning skill.",
247
- "cases": [
248
- { "prompt": "plan this feature: export a report as PDF", "expect": { "invoke": "sdd-plan", "maxTokens": 200000 } },
249
- { "prompt": "add a function that totals an invoice", "expect": { "follow": "no-single-word-naming" } }
250
- ]
251
- }
252
- ```
50
+ ## What's in a charter?
253
51
 
254
- Each case expects at least one of:
52
+ Each building block is a **primitive**: an `index.md` with YAML headers and
53
+ instructions, plus any supporting files.
255
54
 
256
- | Expectation | Passes when |
55
+ | Purpose | Primitives |
257
56
  |---|---|
258
- | `invoke: <id>` | the agent invoked that skill or playbook |
259
- | `follow: <id>` | a model judge finds the agent followed that guide |
260
- | `maxTokens: <n>` | the case used no more than that many tokens |
261
-
262
- ```bash
263
- cw eval
264
- ```
265
-
266
- Every case is handed to [promptfoo](https://www.promptfoo.dev), which puts its
267
- prompt to Claude Code run headless, in a worktree of your last commit with the
268
- charter built, so your working tree is never touched. You never write a
269
- promptfoo configuration. The first run installs promptfoo and the Claude Agent
270
- SDK under `~/.cherry-works/promptfoo/`, and later runs reuse them.
271
-
272
- The report gives each case's outcome and tokens, and the run's total. A case
273
- that misses what it expects fails the run, with what the agent did instead.
274
- It runs on whatever Claude Code is signed in with, or on `ANTHROPIC_API_KEY`
275
- when set, and spends real tokens: commit before you run it, and keep the cases
276
- few.
277
-
278
- ## What the charter costs
279
-
280
- Everything the charter loads when a session opens — always-on guides, every
281
- skill's description, every subagent's — is paid for on every turn.
282
-
283
- ```bash
284
- cw context # each primitive's tokens, the largest first, estimated
285
- cw context --exact # counted through the agent's own command line
286
- ```
287
-
288
- A guide with `globs` is listed apart: it is loaded only when a file it names is
289
- touched. `cw build` prints the total in one line, the portal shows the same
290
- list, and `cw doctor` warns once the total passes `mainContextCeiling` in
291
- `.cw/settings.json` (20,000 tokens unless you set it).
292
-
293
- Once a session runs, the engine's own Stop hook counts what it has used, its
294
- subagents included, each time the agent stops. It keeps one line per stop
295
- under `~/.cherry-works/` (or the folder `sessionAnalysisFolder` names), never in
296
- the repository, and tells you in one line each time a session crosses another
297
- `sessionContextMark` tokens (100,000 unless you set it). The model is never
298
- sent that line.
299
-
300
- ```bash
301
- cw sessions # the last 31 days, by day and by session
302
- cw sessions --since 2026-10-01 # 31 days from that day at most
303
- cw sessions --since 2026-10-01 --until 2026-10-05 --json
304
- ```
305
-
306
- To put a price on it, ask your agent what last week cost: the built-in
307
- `cw-session-cost` skill reads the same summary, asks whether to use prices you
308
- type or the provider's published ones, and answers per session and per day,
309
- naming the prices it used.
310
-
311
- Both limits are set in `.cw/settings.json`; leave one out to keep its default:
312
-
313
- ```json
314
- {
315
- "agents": ["claude"],
316
- "mainContextCeiling": 20000,
317
- "sessionContextMark": 100000
318
- }
319
- ```
57
+ | Set standards and permissions | `guide`, `posture` |
58
+ | Describe tasks, workflows and delegated roles | `skill`, `playbook`, `agent` |
59
+ | Run checks and connect tools | `sensor`, `script`, `mcp` |
60
+ | Reuse instructions, documents and reasoning | `mixin`, `template`, `corpus` |
320
61
 
321
- - `mainContextCeiling` — the tokens a session may open with before `cw doctor`
322
- warns. Raise it when your charter is meant to be large.
323
- - `sessionContextMark` — every how many tokens a running session tells you what
324
- it has used so far.
62
+ Run `cw kinds` to explore them, or `cw kinds guide` for one kind's fields.
63
+ Each id is unique across your charter, installed vendors and built-ins.
325
64
 
326
- Each is a whole number above 0. Run `cw build` after changing either, then
327
- `cw doctor` to check.
65
+ ## Reuse a team's charter
328
66
 
329
- ## Vendor sources
67
+ Install a published charter, then build it for your agent:
330
68
 
331
69
  ```bash
332
- cw vendor add git@github.com:your-org/charter-baseline.git --ref v1.2.0
70
+ cw vendor add your-org/charter-baseline --ref v1.0.0
71
+ cw build
333
72
  ```
334
73
 
335
- A vendor source is a git repository set up with `cw init`: author its charter
336
- there, test it, and push. Only its `.cw/charter/` folder is installed, under
337
- `.cw/vendor/<owner>/<repository>/`, pinned to the ref you chose, with the source's
338
- `README.md` beside it, and left unstaged for you to read and commit, whatever
339
- else you have in hand. A repository
340
- without that folder is refused, and so is one that has vendors of its own:
341
- vendoring is one level deep. Vendored primitives are read-only. To differ from
342
- one, write your own primitive under a new id.
74
+ A vendor copy is read-only and updated from its source. To copy the content
75
+ into your own editable charter instead, use `cw vendor inject`.
343
76
 
344
- Run `cw vendor add` again with a new `--ref` to update a source, and
345
- `cw vendor remove <owner>/<repository>` to take it away, the folder as
346
- `cw vendor list` shows it. Run `cw build` after either. A source installed
347
- before 0.8.0 sits in `.cw/vendor/<repository>/` and keeps working; remove it and
348
- add it again to move it.
349
-
350
- ### Skills from `npx skills` repositories
351
-
352
- `cw vendor add` also installs skills from a repository made for
353
- [`npx skills`](https://github.com/vercel-labs/skills), one that holds no
354
- charter but a `skills/` folder with a folder and its `SKILL.md` for each skill,
355
- `skills/<name>/` or grouped up to three folders deep, as in
356
- `skills/<group>/<name>/`:
357
-
358
- ```bash
359
- cw vendor add https://github.com/mattpocock/skills --skill grill-me --skill grilling
360
- cw vendor add https://github.com/mattpocock/skills # every skill it holds
361
- ```
362
-
363
- `--skill` names a skill by the `name` its `SKILL.md` declares, and can be
364
- given more than once; with none, every skill is installed. Each lands in
365
- `.cw/vendor/<owner>/<repository>/skill/<name>/` as a skill of your charter,
366
- read-only like any vendored primitive, with every file beside its `SKILL.md`,
367
- and left unstaged for you to read and commit:
368
-
369
- | `SKILL.md` | Becomes |
370
- | --- | --- |
371
- | `name` | the skill's id, and its one trigger |
372
- | `description` | its description |
373
- | `disable-model-invocation: true` | `disable-model-invocation: true` |
374
- | `user-invocable: false` | `disable-user-invocation: true` |
375
- | any other header (`license`, `allowed-tools`, `argument-hint`…) | left out; `cw vendor add` names each one it left out |
376
-
377
- Only `skills/` is looked in: a `SKILL.md` elsewhere, such as the copies a
378
- repository keeps for its own agent under `.claude/skills/`, is not a skill to
379
- install, nor is one below another skill's folder, which comes along as one of
380
- its files. A `SKILL.md` without a
381
- `name` or a `description`, with a name that is not an id, or with a name another
382
- one shares, stops the install. A source holding a `.cw/charter/` folder is a
383
- charter, installed whole: `--skill` is refused for it. A skill named by
384
- another skill in prose, as `grill-me` names `grilling`, is not installed with
385
- it: add it with a second `--skill`. Run `cw vendor add` again to update the
386
- skills you name; the others in the folder stay as they were.
77
+ → [Create and publish a vendor source](docs/creating-a-vendor.md)
387
78
 
388
79
  ### Recommended charter vendors
389
80
 
390
81
  | Charter | What it gives your agent | Install |
391
82
  | --- | --- | --- |
392
83
  | [sdd-charter](https://github.com/tamnguyenvt/sdd-charter) | Spec-driven development: a spec set with a status per story and a roadmap of their dependencies, and six commands (`/sdd-init`, `/sdd-plan`, `/sdd-implement`, `/sdd-bug-fix`, `/sdd-status`, `/sdd-report`) that take each story from request to merge, stopping for your yes at each step. | `cw vendor add git@github.com:tamnguyenvt/sdd-charter.git --ref v0.1.7` |
393
- | [hexagonal-architecture-charter](https://github.com/tamnguyenvt/hexagonal-architecture-charter) | Sets up a hexagonal (ports and adapters) architecture in a folder you choose, then keeps the agent following it. | `cw vendor add git@github.com:tamnguyenvt/hexagonal-architecture-charter.git --ref v0.1.0` |
394
-
395
- ## MCP origins outside the repository
396
84
 
397
- Much of what an agent needs to know is kept elsewhere: another service's code,
398
- an issue tracker, a wiki. An `mcp` primitive declares one such mcp origin, an MCP
399
- server, and the tools of it your agent may use:
400
-
401
- ```markdown
402
- ---
403
- kind: mcp
404
- id: mfbs/billing
405
- description: Billing service code and pull requests.
406
- endpoint: https://api.githubcopilot.com/mcp/
407
- path: moneyforward/billing-service
408
- auth: ["oauth", "token"]
409
- tools: ["get_file_contents", "search_code", "list_pull_requests"]
410
- ---
411
-
412
- The billing service. Look here before changing anything that charges a customer.
413
- ```
414
-
415
- An mcp origin is either an `endpoint` reached over HTTP, or a `command` with its
416
- `args` that `cw` starts as a local process; a local one takes a token only, in
417
- the environment variable its `tokenEnv` names. Any primitive points the agent
418
- at an mcp origin by naming it in its body as `[[mfbs/billing]]`.
85
+ ## Work from the terminal or browser
419
86
 
420
87
  ```bash
421
- cw mcp auth # sign in to every mcp origin the charter declares that you are not signed in to yet
422
- cw build # asks each mcp origin for its tools; adds one entry, cw mcp serve, to your agent's .mcp.json
423
- cw mcp auth --status
88
+ cw portal # browse and edit the charter locally
89
+ cw test # test activation and permission rules, without an agent
90
+ cw context # estimate the charter's context size
91
+ cw eval --agent codex # evaluate with the real agent; spends tokens
424
92
  ```
425
93
 
426
- Sign in before you build: the build reaches each mcp origin under your
427
- credential, and stops on one you are not signed in to. Every developer signs in
428
- as themselves, by browser where the mcp origin offers OAuth or with a token
429
- typed at a hidden prompt. GitHub's MCP server does not let `cw` register for
430
- OAuth, so sign in there with a personal access token. Credentials are kept in the operating
431
- system's credential store, never in the repository, and renewed without asking
432
- where the mcp origin allows it. `cw mcp serve` is the one MCP server your agent is
433
- given: it serves the tools each mcp origin declares and forwards every call under
434
- your own credential. An mcp origin that is down or not signed in to loses only its own
435
- tools.
436
-
437
- The build asks each mcp origin for its tools once and keeps them beside the
438
- charter, and turns your agent's own tool search on: a session opens with each
439
- tool's name and no schema, and the agent looks up the one it needs. `cw mcp
440
- serve` lists the kept tools without reaching any mcp origin, and reaches one
441
- only for a call. A tool an `mcp` declares that its mcp origin does not list
442
- stops the build.
443
-
444
- A subagent reaches only the mcp origins it lists under `tools`: `[[<id>]]` for every
445
- tool of an mcp origin, or `[[<id>]]:<tool>` for one of them.
446
-
447
- ## Your agent can write rules too
448
-
449
- Every governed repository gets a built-in skill, `cw-author`, in the
450
- agent's hands from the moment `cw init` finishes. It teaches
451
- the agent to ask `cw kinds` what a kind requires and to write primitives with
452
- `cw add`, instead of copying fields from memory.
453
-
454
- ## Development
455
-
456
- ```bash
457
- pnpm install
458
- pnpm exec playwright install chromium # once per machine, for the portal's browser tests
459
- pnpm test # dependency rules, build, then every test
460
- pnpm typecheck
461
- pnpm cw <command> # run the CLI from source, without building
462
- ```
94
+ ![The Cherry Works portal showing a repository's charter](docs/images/portal-charter.png)
463
95
 
464
- A release is `pnpm release <version>`, run from a clean `develop` level with
465
- `origin/develop`. It runs the tests, installs the exact package it would publish
466
- into a fresh repository and builds it there, and only then commits, tags
467
- `v<version>`, publishes and pushes. `pnpm release <version> --dry-run` runs
468
- every check and changes nothing. A plain `npm publish` is refused.
96
+ ## Documentation
469
97
 
470
- The engine follows a hexagonal layout. `src/hexagon/` holds the domain, the
471
- application use cases and their ports. `src/driver/` holds the CLI and the
472
- portal that drive it. `src/zdriven/` holds the adapters for files, git and YAML.
473
- What it must do is written in [specs/spec.md](specs/spec.md).
98
+ - [Writing a charter](docs/writing-a-charter.md) — rules, workflows, references
99
+ and tests.
100
+ - [Creating a vendor source](docs/creating-a-vendor.md) — publish, install and
101
+ update a shared charter.
102
+ - [Using the portal](docs/use-portal.md) — edit, test and build in your browser.
103
+ - [Reference](docs/reference.md) — commands, host mappings, evaluations,
104
+ context costs, vendor sources and MCP configuration.
105
+ - [Development](docs/reference.md#development) — build from source, run checks
106
+ and release.
107
+ - [Changelog](CHANGELOG.md) — releases and changes.
474
108
 
475
- This repository is governed by its own charter under [.cw/charter/](.cw/charter/).
109
+ This repository uses [its own charter](.cw/charter/) and keeps its product
110
+ specifications in [specs/](specs/spec.md).
package/dist/cw.js CHANGED
@@ -3,7 +3,7 @@
3
3
  // package.json
4
4
  var package_default = {
5
5
  name: "cherry-works",
6
- version: "0.8.0",
6
+ version: "0.9.0",
7
7
  description: "The charter engine: resolves a charter and compiles it into what a coding agent reads.",
8
8
  keywords: [
9
9
  "claude-code",
@@ -80,6 +80,7 @@ var package_default = {
80
80
  "radix-ui": "^1.6.7",
81
81
  react: "^19.3.0",
82
82
  "react-dom": "^19.3.0",
83
+ "smol-toml": "^1.9.1",
83
84
  sonner: "^2.0.8",
84
85
  "tailwind-merge": "^3.7.0",
85
86
  tailwindcss: "^4.3.3",