cherry-works 0.2.0 → 0.3.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 +15 -11
- package/dist/cw.js +1 -1
- package/dist/main.js +2480 -2303
- package/dist/portal/main.js +14 -14
- package/package.json +1 -1
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
|
-
…
|
|
12
|
-
|
|
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
|
|
@@ -80,7 +80,7 @@ The link points at your checkout. After you change the sources, run
|
|
|
80
80
|
Inside the git repository you want to govern:
|
|
81
81
|
|
|
82
82
|
```bash
|
|
83
|
-
cw init # asks which agent to compile for,
|
|
83
|
+
cw init # asks which agent to compile for (claude, selected), scaffolds .cw/charter/ and builds
|
|
84
84
|
cw kinds guide # what a guide requires
|
|
85
85
|
cw add guide no-any --header description="No any in TypeScript." --header globs="src/**/*.ts"
|
|
86
86
|
cw edit guide:no-any # write the body in $VISUAL or $EDITOR
|
|
@@ -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
|
-
|
|
129
|
-
is
|
|
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
|
|
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.
|
|
@@ -137,7 +140,7 @@ agent reads it.
|
|
|
137
140
|
|
|
138
141
|
| Command | What it does |
|
|
139
142
|
|---|---|
|
|
140
|
-
| `cw init [--agent]` | Set the repository up under a charter |
|
|
143
|
+
| `cw init [--agent]` | Set the repository up under a charter, and build it |
|
|
141
144
|
| `cw build [--preview]` | Compile the charter, or show what a build would write |
|
|
142
145
|
| `cw list [--kind] [--min]` | List what the charter holds |
|
|
143
146
|
| `cw kinds [kind]` | List the kinds, or the fields one of them requires |
|
|
@@ -276,7 +279,8 @@ tool of a place, or `mcp:<id>:<tool>` for one of them.
|
|
|
276
279
|
|
|
277
280
|
## Your agent can write rules too
|
|
278
281
|
|
|
279
|
-
Every governed repository gets a built-in skill, `skill:cw-author
|
|
282
|
+
Every governed repository gets a built-in skill, `skill:cw-author`, in the
|
|
283
|
+
agent's hands from the moment `cw init` finishes. It teaches
|
|
280
284
|
the agent to ask `cw kinds` what a kind requires and to write primitives with
|
|
281
285
|
`cw add`, instead of copying fields from memory.
|
|
282
286
|
|
package/dist/cw.js
CHANGED