Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ba41880
docs(plan): compound packs for compound-writing
cursoragent Sep 10, 2026
ae1c9be
feat(packs): add the Compound Packs resolver for writing homes
cursoragent Sep 10, 2026
9d4f416
feat(packs): add the cw-packs skill to declare, scaffold, and check p…
cursoragent Sep 10, 2026
d077bc5
docs(packs): make matching pack rules a context layer and add the pac…
cursoragent Sep 10, 2026
786bb24
feat(packs): read matching pack rules in scribe, draft, revise, check…
cursoragent Sep 10, 2026
9a3cb03
feat(packs): hook pack recognition and routing into cw-save; add cw-c…
cursoragent Sep 10, 2026
fee979e
docs(packs): document Compound Packs, cw-packs, and cw-compound acros…
cursoragent Sep 10, 2026
ae19f18
test(packaging): guard cw- naming, shared frontmatter, and the four-s…
cursoragent Sep 10, 2026
6728ba1
fix(review): apply review findings
cursoragent Sep 10, 2026
4287c53
docs(review): record residual review findings
cursoragent Sep 10, 2026
75050c7
fix(packs): close the two-hop symlink escape and harden the resolver
cursoragent Sep 10, 2026
0825cfe
feat(packs): the nearest .compound-writing/ governs; a nested checkou…
cursoragent Sep 10, 2026
06a90a4
test(packs): port compound-engineering's resolver cases
cursoragent Sep 10, 2026
04dec2e
fix(save): preview every pack write, ask between writable packs, defi…
cursoragent Sep 10, 2026
da6502f
fix(packs): cw-packs verifies by the pack line, keeps packs: [] valid…
cursoragent Sep 10, 2026
667baf8
docs(packs): tighten the contract and guide from the writing-flow and…
cursoragent Sep 10, 2026
9d722a5
docs: cw-compound is a Claude Code command; Codex packages skills only
cursoragent Sep 10, 2026
d6b82da
test: pin the pack prose contracts from the tester findings
cursoragent Sep 10, 2026
f303f46
docs(packs): a git ref needs a full commit sha
cursoragent Sep 10, 2026
45b11ae
docs(review): record what the tester matrices fixed and deferred
cursoragent Sep 10, 2026
b0cdba0
build: make the public release allowlist explicit and test-enforced
cursoragent Sep 10, 2026
7765095
feat(packs): ship the example config and create it on request
cursoragent Sep 10, 2026
2490123
ci: run the test suite and claude plugin validate on pull requests an…
cursoragent Sep 10, 2026
1952666
docs: what the pack layer can and cannot do for a line edit, measured…
kieranklaassen Sep 11, 2026
ba42360
docs: cite the arms-branch commits as pushed
kieranklaassen Sep 11, 2026
5f93a3e
Merge pull request #4 from EveryInc/cursor/kate-bench-pack-integratio…
kieranklaassen Sep 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .compound-writing/config.example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Compound Writing configuration for this writing home.
#
# Shared settings live in this file and travel with the home. Personal or
# machine-local additions go in `config.local.yaml` beside it; that file adds
# to this one and never replaces it, so keep it out of version control.
#
# Compound Packs: declared folders of writing rules that every Compound
# Writing step reads and cites. Nothing happens until an entry is uncommented
# under a live `packs:` key. Guide: references/packs.md in the plugin.
#
# packs:
# - source: compound-packs/house-style # home-relative, read live
# - source: ~/compound-packs/every-voice # machine-local, read live
# - source: https://github.com/org/writing-packs # git, cached at ref
# ref: v1.2.0 # tag, full sha, or branch (required for git)
# pack: [voice, style] # one id, a list, or omit for everything
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest

env:
# Pinned so a new upstream validation rule cannot break CI without a repo
# change; bump deliberately. Same pin compound-engineering-plugin uses.
CLAUDE_CODE_VERSION: 2.1.220

steps:
- uses: actions/checkout@v6

- name: Run tests
run: python3 -m unittest discover -s tests -v

# The npm package is a small wrapper whose postinstall fetches a large
# platform binary; caching on the pinned version makes every run between
# bumps a cache hit.
- name: Cache claude-code validator
id: cache-claude-code
uses: actions/cache@v6
with:
path: ~/.npm-global
key: claude-code-${{ runner.os }}-${{ env.CLAUDE_CODE_VERSION }}

- name: Install claude-code validator
if: steps.cache-claude-code.outputs.cache-hit != 'true'
run: npm install -g --prefix ~/.npm-global @anthropic-ai/claude-code@${{ env.CLAUDE_CODE_VERSION }}

# `validate .` checks the marketplace catalog; the plugin manifest must be
# named explicitly to be checked too.
- name: Validate plugin manifests
run: |
export PATH="$HOME/.npm-global/bin:$PATH"
claude --version
claude plugin validate --strict .
claude plugin validate --strict .claude-plugin/plugin.json
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ __pycache__/
*.pyc
.claude/worktrees/
.claude/settings.local.json
.compound-writing/*.local.yaml
16 changes: 11 additions & 5 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ The boundary is operational: rules that change wording, sentence construction, o

The context contract lives in `references/context-contract.md`. It defines the authority order, project routing, source handling, and write-safety rules that orchestration and voice-sensitive skills inherit.

Compound Packs extend this layer with declared knowledge. A writing home's optional `.compound-writing/config.yaml` (and personal `config.local.yaml`) names pack sources; `skills/cw-packs/scripts/packs-resolve.py` resolves them into pack roots; each step matches the rules' `applies_when` against its own work, applies matches directly below the home's own `VOICE.md` and `STYLE.md`, and cites every influence `(pack: <id>, <file>)`. Pack text is evidence, never instructions. Packs are declared, never scanned; with no `packs:` key nothing changes. The pack format is compound-engineering-plugin's, so one pack repository can serve both plugins. `references/packs.md` is the guide.

### 2. Orchestration layer

`cw-scribe` is the front door. It inspects the request and available artifacts, then chooses the smallest useful route:
Expand Down Expand Up @@ -85,18 +87,21 @@ Compound learning means updating a maintained context surface, not claiming priv
- Project syntax, diction, and tone preferences belong in `VOICE.md`; project argument, evidence, article-structure, and publication-readiness standards belong in `STYLE.md`.
- Recurring editorial failures belong in the relevant review checklist or skill reference.
- Workflow improvements belong in the workflow or architecture docs.
- Standing rules bigger than one writing home (a publication, team, or house standard) belong in a writable declared Compound Pack, as a top-level rule file.
- A lesson a declared pack rule already prescribes is cited, not duplicated.
- One-off observations stay with the current piece unless the user confirms they should generalize.
- Never edit an installed plugin/cache copy to "remember" a lesson.
- Never edit an installed plugin/cache copy to "remember" a lesson. Git-sourced packs are read-only caches.

`cw-save` proposes the right destination and follows its write-safety rules. It does not silently append lessons to plugin files.
`cw-save` proposes the right destination and follows its write-safety rules. It does not silently append lessons to plugin files. `cw-compound` is a compatibility command that routes to `cw-save`.

## Packaging Contract

- `skills/` is canonical across Claude and Codex.
- `.codex-plugin/plugin.json` packages the shared skills for Codex.
- `.claude-plugin/` and `agents/` provide Claude compatibility and optional subagent execution.
- `commands/` is a compatibility/help surface, not a second implementation of the skills.
- Public releases are assembled from an explicit allowlist containing the full generic toolbox. Publication-, company-, writer-, column-, and platform-specific extensions are excluded from the published package.
- `commands/` is a compatibility/help surface, not a second implementation of the skills. An alias such as `cw-compound` routes to its skill and adds no behavior; commands reach Claude Code only, since the Codex manifest packages `skills/`.
- The packs resolver has one canonical copy, `skills/cw-packs/scripts/packs-resolve.py`; other skills reference it by plugin-relative path rather than carrying copies.
- Public releases are assembled from an explicit allowlist containing the full generic toolbox: `release/allowlist.json` names every skill and command allowed here, and the packaging tests hold the tree to it. Publication-, company-, writer-, column-, and platform-specific extensions are excluded from the published package.
- Runtime cache or installed plugin folders are derived copies, never source of truth.
- Cross-platform `SKILL.md` frontmatter uses only the shared Agent Skills fields: `name` and `description`.
- Every user-invokable skill and compatibility command uses the `cw-<name>` convention; skill folder names and command filenames match their declared names.
Expand All @@ -116,4 +121,5 @@ An architecture change is ready when:
8. New workflows do not create or depend on `TASTE.md`, `context.md`, `published/`, `.status.yaml`, or hidden plugin-owned onboarding state.
9. Documentation does not advertise hand-maintained component counts as product behavior.
10. Existing user changes and project-local conventions remain authoritative.
11. The public build contains only allowlisted generic skills and no references to excluded editorial or personal overlays.
11. The public build contains only the skills and commands in `release/allowlist.json` and no references to excluded editorial or personal overlays (`python3 -m unittest discover -s tests`).
12. With no `packs:` declared, no skill mentions packs and output is unchanged; the resolver publishes only top-level rules with `title` and `applies_when`, refuses a pack that links outside its source, and never stops a run on a bad entry (`python3 -m unittest discover -s tests`).
36 changes: 27 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The system:
- keeps syntax, diction, and tone in `VOICE.md` while routing argument, evidence, article structure, substantive standards, and publication readiness to `STYLE.md`;
- preserves existing workspaces and active drafts rather than imposing the scaffold retroactively;
- follows repository, global, project, assignment, and voice context in authority order;
- loads shared publication, team, or house rules from declared Compound Packs and cites every rule it applies;
- routes from the user's outcome instead of forcing a seven-stage pipeline;
- treats source provenance as part of writing rather than cleanup at the end;
- saves durable learning into maintained context, style guides, checklists, or workflows;
Expand Down Expand Up @@ -48,11 +49,24 @@ A rule that changes wording, sentence construction, or tone goes in `VOICE.md`.

The setup workflow never creates the writing home inside the plugin or overwrites an existing file. It resolves the target first. Existing workspaces keep their own conventions unless the user explicitly asks to add or migrate the scaffold.

### Compound Packs

Rules that belong to a publication, a team, or several writing homes travel as **Compound Packs**: folders of Markdown rules, each with `title` and `applies_when` frontmatter, declared in the home's optional `.compound-writing/config.yaml`. Every step that loads context reads the rules that match its work and cites them `(pack: <id>, <file>)`; `cw-save` recognizes a lesson a pack already prescribes instead of duplicating it. The default scaffold does not create the config and nothing happens until a `packs:` entry exists; `cw-packs` writes the file when you declare or scaffold a pack, `cw-setup-project --with-packs` writes it with a new home, and `.compound-writing/config.example.yaml` in this repository is the same template. The format is shared with [compound-engineering-plugin](https://github.com/EveryInc/compound-engineering-plugin), so one pack repository can serve both. See [references/packs.md](references/packs.md).

```yaml
# writing-home/.compound-writing/config.yaml
packs:
- source: compound-packs/house-style
- source: https://github.com/org/writing-packs
ref: v1.2.0
```

### Outcome map

| Outcome | Skills |
|---|---|
| Establish a writing home on first use | `cw-scribe` -> `cw-setup-project` -> `cw-onboarding` |
| Share house, publication, or team rules across homes | `cw-packs` |
| Find or develop the idea | `cw-brainstorm`, `cw-interview` |
| Sharpen the point and reader promise | `cw-thesis`, `cw-promise`, `cw-outline` |
| Produce prose | `cw-draft` |
Expand Down Expand Up @@ -81,7 +95,8 @@ It is a map, not a gate.
| `cw-setup-project` | Manually create a portable writing home with `VOICE.md`, `STYLE.md`, `examples/`, and `drafts/`. |
| `cw-onboarding` | Begin or refresh the writing home's voice and style rules. |
| `cw-scribe` | Choose and compose the smallest useful workflow for an open-ended request. |
| `cw-save` | Turn a confirmed preference or lesson into durable project context. |
| `cw-save` | Turn a confirmed preference or lesson into durable project context or a declared pack. `cw-compound` is a Claude Code compatibility alias; Codex packages skills only. |
| `cw-packs` | Declare, scaffold, and check the Compound Packs a writing home loads. |

### Develop The Idea

Expand Down Expand Up @@ -127,7 +142,7 @@ It is a map, not a gate.
| `cw-sorkin` | Review pacing, momentum, and forward motion. |
| `cw-vonnegut` | Apply story fundamentals: wants, stakes, character, and purposeful sentences. |

Publication, project, and format standards belong in the active project's `STYLE.md`, brief, or maintained workflow rather than in hard-coded publication-specific skills.
Publication, project, and format standards belong in the active project's `STYLE.md`, brief, or maintained workflow, or in a declared Compound Pack when they are shared beyond one home, rather than in hard-coded publication-specific skills.

## Context And Learning

Expand All @@ -137,12 +152,13 @@ Compound Writing loads context in this order:
2. Repository or workspace instructions.
3. Global identity, preference, rule, and voice files named by those instructions.
4. Active writing-home or project `VOICE.md`, `STYLE.md`, brief, template, workflow, or checklist.
5. Relevant curated examples from its `examples/` folder.
6. Assignment notes, sources, research, outline, draft, and destination requirements.
7. A legacy `TASTE.md`, only when the project still maintains it.
8. Plugin defaults for unresolved gaps only.
5. Rules from the home's declared Compound Packs whose `applies_when` matches the current work.
6. Relevant curated examples from its `examples/` folder.
7. Assignment notes, sources, research, outline, draft, and destination requirements.
8. A legacy `TASTE.md`, only when the project still maintains it.
9. Plugin defaults for unresolved gaps only.

`cw-save` routes confirmed syntax, diction, and tone learning to `VOICE.md`; it routes argument, evidence, article-structure, and publication-readiness learning to `STYLE.md`. It does not silently edit an installed plugin, create hidden onboarding state, or claim private memory.
`cw-save` routes confirmed syntax, diction, and tone learning to `VOICE.md`; it routes argument, evidence, article-structure, and publication-readiness learning to `STYLE.md`. It checks the declared packs first, cites a rule that already prescribes the lesson instead of duplicating it, and offers a writable pack for a standing rule bigger than one home. It does not silently edit an installed plugin, create hidden onboarding state, or claim private memory.

## Repository Layout

Expand All @@ -153,15 +169,17 @@ compound-writing/
├── agents/ # Claude subagent adapters for panels and specialist work
├── commands/ # Claude compatibility/help surfaces
├── defaults/ # Optional fallback templates
├── references/ # Shared architecture and context contracts
├── references/ # Shared architecture, context, and packs contracts
├── release/ # allowlist.json: the skills and commands the public package ships
├── skills/ # Canonical cross-runtime workflows
├── tests/ # Resolver and packaging tests (python3 -m unittest discover -s tests)
├── ARCHITECTURE.md
└── README.md
```

`skills/` is the source of truth for writing behavior. Installed plugin directories and caches are derived runtime copies.

Public releases are built from an explicit generic-skill allowlist. Internal or publication-specific extensions are not included in the published package.
Public releases are built from an explicit generic-skill allowlist, `release/allowlist.json`: the skills and commands allowed to ship here. `tests/test_packaging.py` fails when `skills/` or `commands/` and that list disagree, so adding to the public package is a deliberate edit. Internal or publication-specific extensions are not included in the published package.

## Installation

Expand Down
4 changes: 3 additions & 1 deletion commands/cw-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ description: List Compound Writing workflows by the outcome they support.

- `cw-setup-project` — Manually create a portable writing home with `VOICE.md`, `STYLE.md`, `examples/`, and `drafts/`.
- `cw-onboarding` — Begin or refresh the writing home's voice and style rules.
- `cw-save` — Capture a confirmed preference, lesson, or workflow improvement.
- `cw-packs` — Declare, scaffold, and check the Compound Packs a writing home loads.
- `cw-save` — Capture a confirmed preference, lesson, or workflow improvement in the right context file or declared pack.
- `cw-compound` — Compatibility alias for `cw-save` (Claude Code command).

## Develop The Idea

Expand Down
10 changes: 10 additions & 0 deletions commands/cw-compound.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: cw-compound
description: Compatibility alias for cw-save. Capture a confirmed writing lesson into durable context or a declared Compound Pack, the way Compound Engineering's compound command captures a learning.
---

# Compound (alias for `cw-save`)

Run the `cw-save` skill with the arguments given to this command, unchanged. This command exists so writers who use Compound Engineering's `ce-compound` find the same verb here; it adds no behavior of its own. See `cw-save` for what it captures and where.

This is a Claude Code command: Codex packages `skills/` only, so Codex users invoke `cw-save` directly. The name follows this plugin's `cw-<name>` convention for every command and skill; a colon-separated name such as `cr:compound` is not a valid command or skill name.
5 changes: 3 additions & 2 deletions commands/cw-help.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ You do not need to know the setup or onboarding tools by name. Use `cw-setup-pro
| You have | Start with |
|---|---|
| No writing home or useful starting context yet | `cw-scribe` |
| House, publication, or team rules to share across homes | `cw-packs` |
| No idea | `cw-brainstorm` |
| A live idea | `cw-interview` |
| Notes or source material | `cw-outline` |
Expand All @@ -36,8 +37,8 @@ The classic flow is available but optional:
cw-brainstorm -> cw-interview -> cw-outline -> cw-draft -> cw-dev-edit -> cw-line-edit -> cw-final-pass
```

Publication, workspace, and format standards come from the active `STYLE.md`, brief, template, or maintained workflow.
Publication, workspace, and format standards come from the active `STYLE.md`, brief, template, or maintained workflow, or from a declared Compound Pack when they are shared beyond one home.

Use `cw-save` to turn a confirmed preference or recurring lesson into maintained context.
Use `cw-save` to turn a confirmed preference or recurring lesson into maintained context; on Claude Code, `cw-compound` is the same command under Compound Engineering's name. Use `cw-packs` to declare, scaffold, or check the Compound Packs a writing home loads; every step cites the pack rules it applies as `(pack: <id>, <file>)`.

Ask "Show me the Compound Writing toolbox" for the complete tool catalog and one-line descriptions.
Loading