cherry-works 0.4.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
@@ -235,7 +237,7 @@ there, test it, and push. Only its `.cw/charter/` folder is installed, under
235
237
  `.cw/vendor/<name>/`, pinned to the ref you chose and committed. A repository
236
238
  without that folder is refused, and so is one that has vendors of its own:
237
239
  vendoring is one level deep. Vendored primitives are read-only. To differ from
238
- one, write your own primitive under a new identity.
240
+ one, write your own primitive under a new id.
239
241
 
240
242
  Run `cw vendor add` again with a new `--ref` to update a source, and
241
243
  `cw vendor remove <name>` to take it away. Run `cw build` after either.
@@ -244,6 +246,7 @@ Run `cw vendor add` again with a new `--ref` to update a source, and
244
246
 
245
247
  | Charter | What it gives your agent | Install |
246
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` |
247
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` |
248
251
 
249
252
  ## Places outside the repository
@@ -269,7 +272,7 @@ The billing service. Look here before changing anything that charges a customer.
269
272
  A place is either an `endpoint` reached over HTTP, or a `command` with its
270
273
  `args` that `cw` starts as a local process; a local one takes a token only, in
271
274
  the environment variable its `tokenEnv` names. Any primitive points the agent
272
- 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]]`.
273
276
 
274
277
  ```bash
275
278
  cw build # adds one entry, cw mcp serve, to your agent's .mcp.json
@@ -285,8 +288,8 @@ given: it serves the tools each place declares and forwards every call under
285
288
  your own credential. A place that is down or not signed in to loses only its own
286
289
  tools.
287
290
 
288
- A subagent reaches only the places it lists under `tools`: `mcp:<id>` for every
289
- 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.
290
293
 
291
294
  ## Your agent can write rules too
292
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.4.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
  },