143 — Split authoring into write, edit, and revise with connect marks
Type: reference/types/adr.md · Status: accepted
Status: accepted; implemented across commits 4bfe9fa9d, 5ee4e5803, cc4ef8bce, and 2b3af0624.
Date: 2026-12-02
Amends: ADR 022 (shared first-mention vocabulary mechanics now sit inline in both cp-skill-write and cp-skill-edit, kept identical by test) and ADR 078 (the source-dependency grounding guard is factored into one conditional instruction read by both skills).
Context
Five recurring pressures shape how Commonplace agents create, connect, and modify KB artifacts:
- Post-write linking cannot repair an uninformed draft.
cp-skill-connectasks "what should this point to?", not "what should this say?". When a writer searches only in the source text's vocabulary for duplicates, existing KB notes phrased in other concepts remain unread and the draft overclaims (observed in Case 5 on 2026-11-24, where a theory draft assigned harness-offloadable loop functions to the frozen LLM despite two standing architecture notes; replays at785ffc64ashowed supplying those notes raised full separation from 0/5 to 4/5). - Write-time discovery competes with write-time context.
cp-skill-writeonce searched the target collection and read the closest matches before drafting. To reduce write overhead,d89e71dd0(2026-04-22) limited that search to dir-index titles and descriptions. Thenf90b92efe(2026-06-06) left only anrgtitle-term duplicate check plus links already in hand. Its measured write overhead fell from about 324 KB to about 188 KB. All other discovery moved tocp-skill-connect, after drafting. Case 5 shows the cost:selection-based-learning-requires-five-base-llm-competences.md, extracted ind7b028047, was drafted without the two architecture notes that constrain it, and the operator narrowed it in872cf794e. That agent did not loadcp-skill-write, but its searches matched what the skill then required: a title-term check in the source's vocabulary. The operator has also seen other new notes miss information that existing notes held, but no other instance is recorded, so the evidence is one documented episode. Pre-write orientation brings discovery back for qualifying claims; removing it again would restore both the context saving and the gap. - Creation, direct editing, and Workjig revision have different execution needs. Creating a new artifact has no graph neighborhood yet and benefits from an isolated drafting window (
context: fork) plus KB-wide pre-write orientation (Task). Directly editing an existing artifact (of any type, including proposals, ADRs, briefs, and instructions) happens in-session withEdit, needs backlinks and brief-amendment authority, and handles interactive connect-report incorporation. Runningcommonplace-reviseWorkjig pipelines applies only to reviewable notes and forbids mutating write briefs without explicit operator direction. Bundling creation and direct edits insidecp-skill-writebloated the forked skill and interleaved incompatible modes; bundling direct edits intocp-skill-revisewould mix domains and add router indirection to every Workjig run. - Connect discovery is not connect incorporation. Connect reports under
kb/workflow-state/data/current/connect/are gitignored and machine-local. Report presence shows only that discovery ran, never whether someone reviewed the report and decided what to incorporate (including a zero-link decision), nor whether the note's text still matches what discovery examined after later edits or rewrites. - Unconnected notes behave differently in interactive vs. automated workflows. Forcing
cp-skill-connectmid-iteration disrupts multi-turn interactive drafting and generates reports that subsequent edits immediately stale. Conversely, mutating body links right beforecommonplace-revise --quickstales all 36 body-watching review gates (review architecture) and blinds--quick, while stampingconnected:beforerewritecontradictsrewriterebuilding unsettled claims. - Shared authoring rules have opposite loading frequencies.
Guard Named Source Dependencies(~54 lines) fires only when adding or changing a named external source, whereasUniversal Mechanics(~31 lines) applies unconditionally to every write and edit and is easily skipped if hidden behind an outbound link.
Decision
1. Split authoring into three explicit skills: write, edit, and revise
cp-skill-writecreates new documents only. Its frontmatterdescriptionandargument-hintname creation only. It keepscontext: fork,Task, contract loading, commission resolution, pre-write orientation, the conditional source-dependency guard, validation, and the requiredcp-skill-connectsuggestion. It leavesconnected:unset. If duplicate checking or orientation finds an existing artifact that alreadycoversthe claim, it stops and hands back tocp-skill-editrather than editing internally.cp-skill-editowns direct interactive edits to any existing KB artifact (notes, proposals, ADRs, instructions, write briefs, andtext). It runs in-session (nocontext: fork) withRead, Write, Edit, Grep, Glob, Bash, Skill, Taskand an edit-routeddescription. It loads the incumbent, contracts, siblingbrief:, and one backlinks query; authorizes paired<stem>.brief.mdcreation/updates on operator direction; stripsuser-verified: trueon substantive edits while preserving it on an authorized mechanical trivial change or a frontmatter-only edit that only setsconnected:; removesconnected:on major scope shifts; owns the 5-step interactive connect-report application; validates; and redirects automated review passes, triage, or source-first rewrites on notes tocp-skill-revise. (cp-skill-write-multistagePart A remains deliberately separate for unsettled source-first rewrites requiring staged grounding and commission setup.)cp-skill-reviseremains dedicated to the Workjig CLI (commonplace-revisepasses, triage, apply, publish, andrewrite) for reviewable notes. Its frontmatterdescriptiondrops the leading"Edit,"verb; its body adds a redirect tocp-skill-editfor direct edits and non-note artifacts plus three connect-report rules: never mutate body links before--quick, never stampconnected:beforerewrite, and before--fulltreat a matchingsource_sha256and newer date strictly as an offer—never implicit authorization (if the operator explicitly authorizes that report and target, the session agent runscp-skill-edit, validates, and then runscommonplace-revise --fullon the resulting note).
2. Pre-write orientation with structured handoff, in-context reuse, and preserved edit stop
- KB-wide pre-write orientation (
orient-before-writing.md) runs for qualifying new claims incp-skill-writeand for new substantive claims or material scope/attribution changes incp-skill-edit. A fresh read-only reporter receives a writer-assembled 4-part handoff (governing question/claim, scope/exclusions, key premises/attributions, kind of move—no raw source prose or keyword lists), scans claim titles plus concept queries, and returns paths, authority cues, verbatim decisive quotes, and typed bearings (constrains,contradicts,narrows,covers). - Reuse and authority boundaries. Writers reuse an orientation report already in context (including one supplied by a calling parent before invoking forked
cp-skill-write) and rerun only when claim, scope, or key attributions shift. Raw reports stay transient—never stored in<stem>.brief.md(ADR 092); only operator-agreed lasting boundary rulings enter## Must keep/## Must exclude. Authoritative constraints narrowing a claim within the settled commission are incorporated and cited where authorized; direct contradictions or existing coverage stop for the operator. - Orientation in
cp-skill-edit(retaining Path B's trigger and stop;connected:is advisory, not an execution gate): (a) local/claim-preserving edits always skip KB-wide orientation and bulk outbound-link reads (reading only touched targets,brief:, and backlinks, regardless ofconnected:or type eligibility); (b) bounded refinements within existing linked claims read only implicated linked neighbors (no"recent"date threshold); (c) new substantive claims or material scope/attribution shifts require orientation—reusing only a matching in-context orientation report covering the new claim/attributions, otherwise runningorient-before-writing.md(with existing links and any connect report on disk passed as background context only, never as a substitute for orientation since a pre-edit connect report could not have searched the new claim). If delegation is unavailable or fails, the editor performs the searches itself; if required orientation still cannot complete, it reports the gap and stops before saving—a later connect pass cannot substitute for it. Absence ofconnected:on an eligible type is an advisory reminder to connect once edits settle, never a search gate.
3. Committed connected: "YYYY-MM-DD" incorporation mark and shared commonplace-note-hash digest
connected: "YYYY-MM-DD"is defined once as an optional quoted ISO date string inkb/types/note-base.schema.yaml, documented on six named eligible types (note,definition,ingest-report,source-review,adr,design-proposal), and explicitly rejected viaconnected: falseon the eight othernote-baseschemas (write-brief,connect-report,review-gate,edit-operation,generated-index,tag-readme,vocabulary-ledger,instruction). Presence attests an incorporation decision (including a zero-link decision); absence means only no attested incorporation date, not "never connected". Adding a reverse link to a neighbor never sets that neighbor'sconnected:. Local edits and ordinary simplification passes preserveconnected:; major scope shifts andcommonplace-revise rewriteremove it (enforced on therewritepath specifically, not ordinary passes sharingedits.bounds()).commonplace-note-hash <path>andsource_sha256onconnect-reportexposeresults.note_sha256's canonical{title, description, body}encoding (falling back to normalized-LF text when frontmatter does not parse).cp-skill-connectrecordssource_sha256; every applying workflow runscommonplace-note-hashbefore applying any report, whether or notconnected:is present. A digest match means source text unchanged (not connections current); a missing or mismatched digest blocks automatic application and requires rediscovery or explicit re-review. Neither date identifies a report or proves it was applied.
4. Hybrid sharing of common authoring logic by loading frequency
- Conditional source-dependency guard (
guard-named-source-dependencies.md, ~58 lines) is extracted into one library instruction referenced by a short conditional trigger in bothcp-skill-writeandcp-skill-edit, saving context on every non-source write or edit while maintaining one authoritative grounding guard. - Unconditional
Universal Mechanics(~31 lines) remains inline in bothcp-skill-write/SKILL.mdandcp-skill-edit/SKILL.mdfor zero extra reads and reliable execution, backed by a pytest byte-parity test intests/commonplace/installation/test_library_build.pycomparing## Universal Mechanicsto EOF so edits to one copy cannot drift silently from the other.
Considered alternatives
Keep the duplicate guard only in cp-skill-write. Rejected. Cheapest per write, but leaves post-write cp-skill-connect trying to repair claims already framed without constraining KB notes (Case 5).
Keep a single two-path cp-skill-write (Path A + Path B) with Workjig-only cp-skill-revise. Rejected. Adding pre-write orientation and the 5-step interactive connect-report application pushed cp-skill-write to 6,103 tokens of interleaved creation and edit branches inside a context: fork skill meant for clean new-drafting windows.
Unified 3-tier cp-skill-revise (Tier 0 direct edits + Tiers 1–2 Workjig behind a slim router). Close rival; rejected for now. While it kept only two verbs (write and revise) and avoided adding a new promoted skill, it added a router Read to every Workjig and direct-edit invocation, required granting Skill/Task to Workjig's wrapper, mixed all-artifact direct edits (with paired write-brief updates) into a reviewable-note CLI skill that forbids brief edits, and blurred explicit operator control over whether headless Workjig workers run. The operator chose explicit verb separation (write / edit / revise) backed by updated skill descriptions and a redirect inside cp-skill-revise.
One-pass write → connect [with narrowing/contradiction flags] → revise (drop pre-write orientation). Rejected. Cuts discovery from two passes to one per new note, but risks draft anchoring: once a full draft exists, link incorporation favors adding a footer link over rethinking the thesis.
Store orientation findings in <stem>.brief.md. Rejected. Under ADR 092, write briefs hold optional binding operator intent, not transient advisory KB state. Storing orientation quotes there mixes authority, forces briefs onto ordinary notes, and duplicates validated note links with stale copies.
Record a git revision in frontmatter, or hash raw file bytes for source_sha256. Rejected. Git SHAs in authored frontmatter violate ADR 039 git-independence, break on rebases, and cannot name the commit that writes them. Hashing raw file bytes makes connect reports falsely stale on frontmatter-only edits (tags, user-verified, stamping connected:); normalized {title, description, body} hashing matches results.note_parts and stays stable across frontmatter edits.
Systematic historical backfill and unattended recurring commonplace-task connect sweeps. Deferred/declined for the initial release. Existing notes start unmarked (no attested incorporation date) and are backfilled opportunistically rather than via a bulk git-history migration over ~150 legacy reports. Unattended kb/tasks/ connect sweeps (weighed in Connected incorporation mark and connect-report freshness) are deferred until periodic refresh is needed, because they require explicit kb/workflow-state/data/current/connect/ write-scope authorization, a pending-queue progress rule, and strict ADR 044 user-verified protection.
Share all ~85 lines of authoring logic in one file, or inline all ~85 lines in both skills. Rejected. Putting unconditional Universal Mechanics behind a Read link adds a tool call to every write/edit and risks agents skipping it; inlining the conditional source-dependency guard bloats every non-source edit and risks drift on an integrity-critical procedure. Extracting only the ~12 lines of shared rg prospecting between orient-before-writing.md and cp-skill-connect into a third prose file was also rejected on the same COLLECTION.md self-containment grounds.
Free choices left open: whether a 3–5 bullet pre-draft thesis sketch becomes mandatory in cp-skill-write Step 5, whether orientation reports ever persist under kb/workflow-state/data/current/orient/, what connected: age triggers a staleness hint in cp-skill-edit, whether commonplace-note-hash is ever joined by a claim-title listing helper, whether a read-only recurring kb/tasks/ connect sweep is added later, and whether notes created between 2026-04-22 and 2026-12-01, when writing ran little or no discovery, should be re-oriented. Re-orientation is a different question from backfilling connected:, because a connect pass cannot correct a claim framed without the notes that constrain it. This ADR adopts and archives the Mode-separated writing skill with reusable orientation, Connected incorporation mark and connect-report freshness, and Lifecycle split for write and revise proposals.
Consequences
Measured context impact (o200k_base at df807b665 vs. 91c7127bc): skill text fell 32% for creation (6,103 → 4,167 tokens) and 56% for direct editing (6,103 → 2,687 tokens), and direct edits avoid launching a separate writer fork. On a concrete cold theory edit with a note, brief, and backlinks, context dropped 22% (15,607 → 12,236 tokens), leaving kb/theory/COLLECTION.md (4,347) and AGENTS.md (3,267) as the largest fixed reads rather than the editing skill. On a one-collection orientation scenario, delegated orientation kept the author window near 13.8k versus 23.4k for self-orientation while raising aggregate cross-worker context from 26.7k to 31.1k.
Easier: new-document creation (cp-skill-write) is linear and clean-context; operators control directly by verb whether an in-session edit (cp-skill-edit) or Workjig pipeline (cp-skill-revise) runs; connect-report incorporation travels in git without staling the 44 watches:-scoped review criteria; and stale or partially consumed connect reports are caught mechanically by commonplace-note-hash.
Harder / new costs: operators and agents must distinguish write, edit, and revise (mitigated by updated frontmatter descriptions and redirects); installed projects gain a new promoted skill (cp-skill-edit) requiring commonplace-init to refresh stubs (existing projects' AGENTS.md files do not auto-update); adding connected: to the six owning type specs stales type-conformance review results once per cohort; and connected: itself remains an unverified agent/operator attestation with no write-time mechanical check tying it to a report.
Operativity path:
- Skills and instructions (instruction force): cp-skill-write, cp-skill-edit (projected via src/commonplace/scaffold_manifest.py and .claude/skills/ / .agents/skills/ symlinks), cp-skill-revise, cp-skill-connect, orient-before-writing.md, guard-named-source-dependencies.md, cp-skill-write-multistage, cp-skill-review, example-onboard-second-brain.md, write-brief.md, AGENTS.md, and AGENTS.md.template.
- Schemas and validator (enforced by commonplace-validate): note-base.schema.yaml, explicit connected: false in the eight excluded schemas, the six owning type specs, and connect-report.schema.yaml (64-hex format on source_sha256).
- Python CLI and review workflows (enforced in code and tests): commonplace-note-hash (src/commonplace/cli/note_hash.py over results.note_sha256), rewrite-only connected: clearing in rewrite.py/edits.py/write-a-rewrite-candidate.md, and the pytest byte-parity test in tests/commonplace/installation/test_library_build.py.
Where this decision stops applying (limits):
- Delegated pre-write orientation (orient-before-writing.md) and depth-2 Task launch inside context: fork on Claude Code remain unverified trial dependencies (the retrospective Case 5 probe was not run because current writers no longer reliably reproduce the baseline miss); if live use shows delegation misses or depth-2 fails, cp-skill-write falls back to self-orientation or caller-first execution without disturbing the write/edit/revise split or connected: contract.
- Judging in cp-skill-edit whether an edit stayed inside its existing linked neighborhood is unverified agent judgment; it does not guarantee catching constraining notes authored after connected: when an edit subtly changes an attribution.
- This decision does not authorize unattended library mutation by commonplace-task or systematic historical backfill of connected:; those remain separate undecided questions.
Relevant Notes:
- ADR 022: Active vocabulary and write-path first mentions — amends: shares unconditional first-mention vocabulary mechanics inline across
cp-skill-writeandcp-skill-editbehind a parity test - ADR 039: Tool visibility is package-owned and git is never invoked — rests-on: keeps git SHAs out of authored frontmatter and shipped commands
- ADR 044: User verification replaces global note status — compares-with: precedent for committed frontmatter attestation (
user-verified: true) cleared on substantive changes - ADR 078: Writers invoke grounding and evidence stays in the ingest — amends: factors the shared conditional source-dependency guard into
guard-named-source-dependencies.md - ADR 092: Write briefs are optional sidecars named by a validated pointer — rests-on: keeps raw orientation reports out of
<stem>.brief.md - ADR 127: Review runs as workflows over result files — rests-on: supplies
watches:-scoped freshness andresults.note_partsreused bycommonplace-note-hash - Skills are instructions plus routing and execution policy — rests-on: grounds separating
write,edit, andreviseby execution policy and explicit operator verb control - An insufficient summary precedes the source rather than replacing it — rests-on: grounds carrying paths and verbatim decisive quotes in orientation reports
- Checking retained results trades cost against reliance risk — rests-on: grounds in-context orientation reuse and avoiding unverified historical backfill
- An author should fix what the executor can't determine, not what it will — rests-on: grounds intent-framed interactive handling of unconnected notes in
cp-skill-edit