cherry-works 0.3.0 → 0.5.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
@@ -114,20 +114,22 @@ Each kind comes up at a different time:
114
114
  |---|---|
115
115
  | `guide` | a touched file matches one of its `globs`, or on every turn when it has no globs |
116
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 `/skill-<id>` |
117
+ | `skill` | one of its `triggers` matches the request, or it is called by name as `/<id>` |
118
118
  | `playbook` | one of its `triggers` matches; its body is a sequence of skills |
119
- | `agent` | it is spawned by identity, with only the `tools` it lists |
119
+ | `agent` | it is spawned by its id, with only the `tools` it lists |
120
120
  | `posture` | always, wherever the host can be told what to `allow` and `deny` |
121
121
  | `corpus` | a primitive's `rationale` cites it, to give the reasoning behind a rule |
122
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 `mcp:<id>`: a place outside the repository, reached through `cw mcp serve` |
123
+ | `mcp` | a primitive's body names it as `[[<id>]]`: a place outside the repository, reached through `cw mcp serve` |
124
124
 
125
- `cw kinds <kind>` gives the exact fields each kind takes. An identity is
126
- `kind:id`, and it names exactly one primitive across the whole charter. If two
127
- files claim the same identity, the build is refused and both files are named.
125
+ `cw kinds <kind>` gives the exact fields each kind takes. An id names exactly
126
+ one primitive across the whole charter, whatever its kind. If two files claim
127
+ the same id, the build is refused and both files are named. A primitive is
128
+ named by its id alone: bare in a header (`rationale: type-safety`), a test or a
129
+ command, and as `[[<id>]]` in a body, which the build turns into a link.
128
130
  Every primitive is a folder holding its `index.md`, and any other file in that
129
131
  folder is one of its assets, reached from the body as `./<file>`. An id is at
130
- most 40 characters, and may be grouped with `/`: `mcp:mfbs/billing` is kept at
132
+ most 40 characters, and may be grouped with `/`: the mcp `mfbs/billing` is kept at
131
133
  `.cw/charter/mcp/mfbs/billing/index.md`.
132
134
 
133
135
  `cw build` compiles every primitive to `.cw/out/<kind>/<id>/index.md`, with its
@@ -145,15 +147,15 @@ agent reads it.
145
147
  | `cw list [--kind] [--min]` | List what the charter holds |
146
148
  | `cw kinds [kind]` | List the kinds, or the fields one of them requires |
147
149
  | `cw add <kind> <id> [--header k=v …]` | Write a new primitive |
148
- | `cw edit <identity>` | Open a primitive's file in your editor |
149
- | `cw remove <identity> [--yes]` | Delete a primitive this repository authored |
150
- | `cw explain <identity>` | Show which file declares an identity, what it pulls in and which tests name it |
150
+ | `cw edit <id>` | Open a primitive's file in your editor |
151
+ | `cw remove <id> [--yes]` | Delete a primitive this repository authored |
152
+ | `cw explain <id>` | Show which file declares an id, what it pulls in and which tests name it |
151
153
  | `cw doctor` | Check the agents, the charter, the vendor sources and the compiled output |
152
154
  | `cw test` | Run every case in `.cw/test/` against the charter |
153
155
  | `cw suite add \| edit \| remove` | Manage test files |
154
156
  | `cw vendor add <source> [--ref] \| remove \| list` | Install, update, remove or list vendor sources |
155
157
  | `cw portal [--port]` | Open the charter in a browser on this machine |
156
- | `cw mcp auth [identity] [--status]` | Sign in, as yourself, to every place the charter reaches, or to one again |
158
+ | `cw mcp auth [id] [--status]` | Sign in, as yourself, to every place the charter reaches, or to one again |
157
159
  | `cw mcp serve` | Serve every place the charter reaches to your agent, over stdio |
158
160
 
159
161
  `cw doctor` exits with a failure status when the charter has an error, when a
@@ -230,10 +232,22 @@ longer hold.
230
232
  cw vendor add git@github.com:your-org/charter-baseline.git --ref v1.2.0
231
233
  ```
232
234
 
233
- A vendor source is a git repository with primitives laid out in folders by kind.
234
- It is installed under `.cw/vendor/<name>/`, pinned to the ref you chose and
235
- committed. Vendored primitives are read-only. To differ from one, write your own
236
- primitive under a new identity.
235
+ A vendor source is a git repository set up with `cw init`: author its charter
236
+ there, test it, and push. Only its `.cw/charter/` folder is installed, under
237
+ `.cw/vendor/<name>/`, pinned to the ref you chose and committed. A repository
238
+ without that folder is refused, and so is one that has vendors of its own:
239
+ vendoring is one level deep. Vendored primitives are read-only. To differ from
240
+ one, write your own primitive under a new id.
241
+
242
+ Run `cw vendor add` again with a new `--ref` to update a source, and
243
+ `cw vendor remove <name>` to take it away. Run `cw build` after either.
244
+
245
+ ### Recommended charter vendors
246
+
247
+ | Charter | What it gives your agent | Install |
248
+ | --- | --- | --- |
249
+ | [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 skills (`/sdd-init`, `/sdd-plan`, `/sdd-implement`, `/sdd-finish`, `/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.0` |
250
+ | [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` |
237
251
 
238
252
  ## Places outside the repository
239
253
 
@@ -258,7 +272,7 @@ The billing service. Look here before changing anything that charges a customer.
258
272
  A place is either an `endpoint` reached over HTTP, or a `command` with its
259
273
  `args` that `cw` starts as a local process; a local one takes a token only, in
260
274
  the environment variable its `tokenEnv` names. Any primitive points the agent
261
- at a place by naming it in its body as `mcp:mfbs/billing`.
275
+ at a place by naming it in its body as `[[mfbs/billing]]`.
262
276
 
263
277
  ```bash
264
278
  cw build # adds one entry, cw mcp serve, to your agent's .mcp.json
@@ -274,8 +288,8 @@ given: it serves the tools each place declares and forwards every call under
274
288
  your own credential. A place that is down or not signed in to loses only its own
275
289
  tools.
276
290
 
277
- A subagent reaches only the places it lists under `tools`: `mcp:<id>` for every
278
- tool of a place, or `mcp:<id>:<tool>` for one of them.
291
+ A subagent reaches only the places it lists under `tools`: `[[<id>]]` for every
292
+ tool of a place, or `[[<id>]]:<tool>` for one of them.
279
293
 
280
294
  ## Your agent can write rules too
281
295
 
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.3.0",
6
+ version: "0.5.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",
@@ -45,8 +45,6 @@ var package_default = {
45
45
  test: 'pnpm run lint:deps && pnpm run build && node --import tsx --test "test/**/*.test.ts"',
46
46
  cw: "node --import tsx main.ts",
47
47
  "lint:deps": "depcruise src main.ts",
48
- "specs:link": "node --import tsx scripts/link-specs.ts",
49
- "specs:check": "node --import tsx scripts/link-specs.ts --check",
50
48
  release: "node --import tsx scripts/release.ts",
51
49
  prepublishOnly: `node -e "console.error('Publish with \\"pnpm release <version>\\", which checks the package first.'); process.exit(1)"`
52
50
  },