cherry-works 0.2.1 → 0.4.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
@@ -5,11 +5,11 @@ markdown files, and `cw` checks them, tests them and compiles them into the
5
5
  files your coding agent actually reads.
6
6
 
7
7
  ```text
8
- .cw/charter/guide/no-any.md ──cw build──▶ CLAUDE.md
9
- .cw/charter/sensor/lint.md .claude/rules/…
10
- .cw/charter/posture/secrets.md .claude/settings.json (hooks, permissions)
11
- … .claude/skills/…, .claude/agents/…
12
- .mcp.json (cw mcp serve)
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
13
  ```
14
14
 
15
15
  ## Why
@@ -125,10 +125,13 @@ Each kind comes up at a different time:
125
125
  `cw kinds <kind>` gives the exact fields each kind takes. An identity is
126
126
  `kind:id`, and it names exactly one primitive across the whole charter. If two
127
127
  files claim the same identity, the build is refused and both files are named.
128
- An id is at most 40 characters, and may be grouped with `/`: `mcp:mfbs/billing`
129
- is kept at `.cw/charter/mcp/mfbs/billing.md`.
128
+ Every primitive is a folder holding its `index.md`, and any other file in that
129
+ 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
131
+ `.cw/charter/mcp/mfbs/billing/index.md`.
130
132
 
131
- `cw build` compiles every primitive to `.cw/out/<kind>/<id>.md`: its headers,
133
+ `cw build` compiles every primitive to `.cw/out/<kind>/<id>/index.md`, with its
134
+ assets copied beside it: its headers,
132
135
  then the bodies of the mixins it pulls in, then its own. What your agent's host
133
136
  is given points to that document, so you can open any primitive exactly as the
134
137
  agent reads it.
@@ -227,10 +230,21 @@ longer hold.
227
230
  cw vendor add git@github.com:your-org/charter-baseline.git --ref v1.2.0
228
231
  ```
229
232
 
230
- A vendor source is a git repository with primitives laid out in folders by kind.
231
- It is installed under `.cw/vendor/<name>/`, pinned to the ref you chose and
232
- committed. Vendored primitives are read-only. To differ from one, write your own
233
- primitive under a new identity.
233
+ A vendor source is a git repository set up with `cw init`: author its charter
234
+ there, test it, and push. Only its `.cw/charter/` folder is installed, under
235
+ `.cw/vendor/<name>/`, pinned to the ref you chose and committed. A repository
236
+ without that folder is refused, and so is one that has vendors of its own:
237
+ vendoring is one level deep. Vendored primitives are read-only. To differ from
238
+ one, write your own primitive under a new identity.
239
+
240
+ Run `cw vendor add` again with a new `--ref` to update a source, and
241
+ `cw vendor remove <name>` to take it away. Run `cw build` after either.
242
+
243
+ ### Recommended charter vendors
244
+
245
+ | Charter | What it gives your agent | Install |
246
+ | --- | --- | --- |
247
+ | [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` |
234
248
 
235
249
  ## Places outside the repository
236
250
 
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.2.1",
6
+ version: "0.4.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",