From 12659c76d12b4546222fa9e4414750dcd529f1e3 Mon Sep 17 00:00:00 2001 From: Lukasz Boryn Date: Thu, 30 Jul 2026 13:45:25 +0200 Subject: [PATCH] refactor(skills): pull call-charon and commit-atomic-jj under the line cap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both sat at 117 against CLAUDE.md §5's ≤110 cap, and the commit git/jj twins had drifted out of skeleton parity. The two are coupled: shortening the jj variant's Principles alone would have created the asymmetry. The overage was restatement of each skill's own siblings, so this is a dedup, not a split — no new sibling file. - refactor(call-charon): point DISPATCH and REVIEW FLOTILLA at crossing-format.md §isolation, §builder-brief and §reviewer-brief rather than restating them; 117 -> 106 - refactor(commit-atomic-jj): move `jj split`'s parent-side trap into anti-patterns.md as its own named section, and collapse the workflow tail that restated three anti-patterns already written there; 117 -> 108 - docs(commit-atomic-git): add `## When to use`, levelling the twins' `^## ` skeletons by addition, never by subtraction from jj; 97 -> 104 - docs(commit-atomic-jj): point anti-patterns.md's two back-references at sections that exist (§5 -> §6, and "Workflow step 5" -> the `jj new` step) - docs(okf): record that a line-based grep is an unsound reference gate implements blueprint 016 --- OKF/LEARNINGS.md | 9 +++++++ ...skills-under-cap-and-level-commit-twins.md | 2 +- OKF/index.md | 2 +- skills/loop/call-charon/SKILL.md | 27 ++++++------------- .../productivity/commit-atomic-git/SKILL.md | 7 +++++ skills/productivity/commit-atomic-jj/SKILL.md | 23 +++++----------- .../commit-atomic-jj/anti-patterns.md | 13 ++++++--- 7 files changed, 43 insertions(+), 40 deletions(-) diff --git a/OKF/LEARNINGS.md b/OKF/LEARNINGS.md index 4a6978a..fe1b662 100644 --- a/OKF/LEARNINGS.md +++ b/OKF/LEARNINGS.md @@ -94,3 +94,12 @@ status: live positively, naming no offender. A bare-filename grep cannot separate a *reference* from a *prohibition*; scope it to link syntax, or exempt the files that carry the rule. Source: weave of blueprint 014. +- Believed: grepping a file for the stale form is a sound gate for "every + cross-reference resolves". True: grep is line-based and a gate only sees + the files it names, so 016's locked Verify reported one stale back-ref + where two existed — the second had wrapped between `*"Workflow"*` and + `step 5` — and was blind to the identical off-by-one in `examples.md`, + a sibling its Seams list did not name. A reference gate must assert the + **target** exists (does `### 6` resolve?), not pattern-match the citing + text, and must range over every file that cites, not only the ones being + edited. Source: weave of blueprint 016. diff --git a/OKF/blueprints/016-pull-two-skills-under-cap-and-level-commit-twins.md b/OKF/blueprints/016-pull-two-skills-under-cap-and-level-commit-twins.md index 27fb22d..7231d0a 100644 --- a/OKF/blueprints/016-pull-two-skills-under-cap-and-level-commit-twins.md +++ b/OKF/blueprints/016-pull-two-skills-under-cap-and-level-commit-twins.md @@ -1,6 +1,6 @@ --- type: Blueprint -status: locked +status: implemented traces-to: user request 2026-07-30 sounded: 2026-07-30 cites: diff --git a/OKF/index.md b/OKF/index.md index 6bb48cc..91da7a6 100644 --- a/OKF/index.md +++ b/OKF/index.md @@ -37,7 +37,7 @@ your task needs. Humans welcome too. - [013](blueprints/013-split-moor-into-skill-and-reference.md) — split moor into SKILL.md + REFERENCE.md to hold the line cap — implemented - [014](blueprints/014-unify-skill-sibling-file-naming.md) — unify skill sibling-file naming on lowercase-kebab topic names — implemented - [015](blueprints/015-record-session-check-discharges-on-the-blueprint.md) — record session-check discharges on the blueprint — implemented -- [016](blueprints/016-pull-two-skills-under-cap-and-level-commit-twins.md) — pull two skills under the line cap and level the commit twins — locked +- [016](blueprints/016-pull-two-skills-under-cap-and-level-commit-twins.md) — pull two skills under the line cap and level the commit twins — implemented ## Ferries diff --git a/skills/loop/call-charon/SKILL.md b/skills/loop/call-charon/SKILL.md index f26d159..0d930b2 100644 --- a/skills/loop/call-charon/SKILL.md +++ b/skills/loop/call-charon/SKILL.md @@ -39,28 +39,17 @@ holds no state in his head. 2. **PICK** — the next `locked` blueprint whose blocked-by set is all implemented. None unblocked → record why in Passage, report blocked, stop. -3. **DISPATCH** — isolate per mode (crossing-format.md §isolation): - jj → `jj workspace add ../charon-NNN`, spawn a general-purpose - builder *without* the isolation flag, brief points at the - workspace dir (jj can't run inside git worktrees, so the Agent - tool's `isolation: worktree` is git-mode only). Git → spawn with - `isolation: worktree`; the brief must end with a commit, or the - work can't be merged. Brief per weave's handoff gate: blueprint - path, OKF refs by path, constraints, Verify command - (crossing-format.md §builder-brief). `cavecrew-builder` refuses this - scope — wrong tool. Serial by default; parallel builders only when - blocked-by frontiers are clear AND Seams-touched are disjoint. +3. **DISPATCH** — isolation and builder brief per crossing-format.md + §isolation and §builder-brief; both branch on the mode recorded at + ORIENT. `cavecrew-builder` refuses this scope — wrong tool. Serial + by default; parallel builders only when blocked-by frontiers are + clear AND Seams-touched are disjoint. 4. **REVIEW FLOTILLA** — builder done → spawn read-only general-purpose reviewers in parallel, one per axis: review-blueprint + review-angles **always**; nuke-review + winnow - when the diff is non-trivial (Charon's call — record it). The - orchestrator reads each axis's SKILL.md *itself* (once per - sitting) and **inlines the criteria verbatim** into the brief - (crossing-format.md §reviewer-brief) — subagents can't be trusted - to resolve skill paths (worktrees, remote runners, several axes - `disable-model-invocation`), and a self-contained brief always - travels. The builder never self-reviews; the orchestrator never - reviews inline. + when the diff is non-trivial (Charon's call — record it). Briefs + per crossing-format.md §reviewer-brief. The builder never + self-reviews; the orchestrator never reviews inline. 5. **MERGE + FIX** — Charon dedupes findings, arbitrates conflicts (sieve's always-pass exceptions win: validation, data-loss handling, security), and sends **one** consolidated brief via diff --git a/skills/productivity/commit-atomic-git/SKILL.md b/skills/productivity/commit-atomic-git/SKILL.md index 5e9cdd5..1815912 100644 --- a/skills/productivity/commit-atomic-git/SKILL.md +++ b/skills/productivity/commit-atomic-git/SKILL.md @@ -9,6 +9,13 @@ git-native counterpart of [commit-atomic-jj](../commit-atomic-jj/SKILL.md). Same principles; the staging area replaces `jj split`, and there is no `jj new` step — but git has its own traps (blind `-a`, `add .`). +## When to use +- User says "commit", "atomic commit", "stage this", "what should the + commit message be" — in a repo where `[ -d .jj ]` fails. +- A working tree contains changes that touch more than one concern. +- A public function signature, CLI flag, env var, or config key changed + and the docs haven't. + ## Principles ### 1. Inspect first — all three states diff --git a/skills/productivity/commit-atomic-jj/SKILL.md b/skills/productivity/commit-atomic-jj/SKILL.md index 400cdbf..499c56d 100644 --- a/skills/productivity/commit-atomic-jj/SKILL.md +++ b/skills/productivity/commit-atomic-jj/SKILL.md @@ -76,33 +76,24 @@ jj diff --revision @- # 3. verify the message matches what shippe jj new -m 'WIP' # 4. open a fresh empty @ for the next unit ``` -Mixed diff (more than one concern) → split **before** describing. `jj split` -extracts the **selected paths into the FIRST (parent) commit** and leaves the -rest in `@` (the child) — the selected paths are *not* the second change: +Mixed diff (more than one concern) → split **before** describing, minding +which side the selected paths land on ([anti-patterns.md](anti-patterns.md)): ``` # -m sets the FIRST/parent (selected) commit; @ keeps the original message. -# JJ_EDITOR=true guards against any editor step hanging a headless shell. JJ_EDITOR=true jj split -m 'type(scope): parent msg' jj describe -m 'type(scope): msg for @' # message the remaining @ explicitly jj new -m 'WIP' ``` -**The `jj new` step is not optional.** Without it, edits accumulate into the -sealed change and its message rots into a lie — open a fresh empty `@` -immediately. - -**Run every `jj` mutation in the foreground** (split/describe/new rewrite the -working copy; backgrounding races the snapshot and aborts, exit 144). And -never let one spawn an editor headlessly — always pass `-m`, guard with -`JJ_EDITOR=true`. See [anti-patterns.md](anti-patterns.md) *"Backgrounding a -`jj` mutation"* and *"Letting a `jj` op spawn an editor headlessly"*. +**Three traps ride this workflow** — skipping `jj new`, backgrounding a +mutation, letting one spawn an editor headlessly. All three below. ## Anti-patterns -See [anti-patterns.md](anti-patterns.md) — `jj describe` before -`jj diff`, mixed-bag commits, past-tense messages, missing scope, docs -deferred to the next commit, skipping `jj new` after describe. +See [anti-patterns.md](anti-patterns.md) — describe-before-diff, mixed-bag +commits, past-tense messages, missing scope, deferred docs, skipped +`jj new`, backgrounded mutations, headless editors, `split`'s parent side. ## See also - [examples.md](examples.md) — a real before/after where a working copy is diff --git a/skills/productivity/commit-atomic-jj/anti-patterns.md b/skills/productivity/commit-atomic-jj/anti-patterns.md index 2e31b53..2b5346a 100644 --- a/skills/productivity/commit-atomic-jj/anti-patterns.md +++ b/skills/productivity/commit-atomic-jj/anti-patterns.md @@ -27,13 +27,20 @@ greppable and the change's footprint visible at a glance. "I'll update the README after." You won't. Docstrings, README sections, CLAUDE.md updates for a new flag or env var — same change or it doesn't -ship. See SKILL.md §5 *"Docs travel with the code"*. +ship. See SKILL.md §6 *"Docs travel with the code"*. ## Skipping `jj new` after describe Edits land in the just-described change; its message rots into a lie. Always -open a fresh `@` immediately after `jj describe`. See SKILL.md *"Workflow"* -step 5. +open a fresh `@` immediately after `jj describe` — SKILL.md §Workflow, the +`jj new -m 'WIP'` step. + +## Assuming `jj split` puts the selected paths in the child + +It puts them in the **first (parent)** commit and leaves the rest in `@`. +Select the paths for the change you want *underneath*, not the one you want +to keep working on — `-m` names that parent, and `@` inherits the original +message until you describe it explicitly. ## Backgrounding a `jj` mutation