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-connect asks "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 at 785ffc64a showed supplying those notes raised full separation from 0/5 to 4/5).
  • Write-time discovery competes with write-time context. cp-skill-write once 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. Then f90b92efe (2026-06-06) left only an rg title-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 to cp-skill-connect, after drafting. Case 5 shows the cost: selection-based-learning-requires-five-base-llm-competences.md, extracted in d7b028047, was drafted without the two architecture notes that constrain it, and the operator narrowed it in 872cf794e. That agent did not load cp-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 with Edit, needs backlinks and brief-amendment authority, and handles interactive connect-report incorporation. Running commonplace-revise Workjig pipelines applies only to reviewable notes and forbids mutating write briefs without explicit operator direction. Bundling creation and direct edits inside cp-skill-write bloated the forked skill and interleaved incompatible modes; bundling direct edits into cp-skill-revise would 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-connect mid-iteration disrupts multi-turn interactive drafting and generates reports that subsequent edits immediately stale. Conversely, mutating body links right before commonplace-revise --quick stales all 36 body-watching review gates (review architecture) and blinds --quick, while stamping connected: before rewrite contradicts rewrite rebuilding 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, whereas Universal 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-write creates new documents only. Its frontmatter description and argument-hint name creation only. It keeps context: fork, Task, contract loading, commission resolution, pre-write orientation, the conditional source-dependency guard, validation, and the required cp-skill-connect suggestion. It leaves connected: unset. If duplicate checking or orientation finds an existing artifact that already covers the claim, it stops and hands back to cp-skill-edit rather than editing internally.
  • cp-skill-edit owns direct interactive edits to any existing KB artifact (notes, proposals, ADRs, instructions, write briefs, and text). It runs in-session (no context: fork) with Read, Write, Edit, Grep, Glob, Bash, Skill, Task and an edit-routed description. It loads the incumbent, contracts, sibling brief:, and one backlinks query; authorizes paired <stem>.brief.md creation/updates on operator direction; strips user-verified: true on substantive edits while preserving it on an authorized mechanical trivial change or a frontmatter-only edit that only sets connected:; removes connected: 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 to cp-skill-revise. (cp-skill-write-multistage Part A remains deliberately separate for unsettled source-first rewrites requiring staged grounding and commission setup.)
  • cp-skill-revise remains dedicated to the Workjig CLI (commonplace-revise passes, triage, apply, publish, and rewrite) for reviewable notes. Its frontmatter description drops the leading "Edit," verb; its body adds a redirect to cp-skill-edit for direct edits and non-note artifacts plus three connect-report rules: never mutate body links before --quick, never stamp connected: before rewrite, and before --full treat a matching source_sha256 and newer date strictly as an offer—never implicit authorization (if the operator explicitly authorizes that report and target, the session agent runs cp-skill-edit, validates, and then runs commonplace-revise --full on 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 in cp-skill-write and for new substantive claims or material scope/attribution changes in cp-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 of connected: 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 running orient-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 of connected: 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 in kb/types/note-base.schema.yaml, documented on six named eligible types (note, definition, ingest-report, source-review, adr, design-proposal), and explicitly rejected via connected: false on the eight other note-base schemas (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's connected:. Local edits and ordinary simplification passes preserve connected:; major scope shifts and commonplace-revise rewrite remove it (enforced on the rewrite path specifically, not ordinary passes sharing edits.bounds()).
  • commonplace-note-hash <path> and source_sha256 on connect-report expose results.note_sha256's canonical {title, description, body} encoding (falling back to normalized-LF text when frontmatter does not parse). cp-skill-connect records source_sha256; every applying workflow runs commonplace-note-hash before applying any report, whether or not connected: 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 both cp-skill-write and cp-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 both cp-skill-write/SKILL.md and cp-skill-edit/SKILL.md for zero extra reads and reliable execution, backed by a pytest byte-parity test in tests/commonplace/installation/test_library_build.py comparing ## Universal Mechanics to 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: