本文へ移動
cccskills
無料GitHub で公開

intelligent-rebase

Check semantic interference when concurrent changes or stacked PRs meet. Use after a merge or rebase, at a stack checkpoint, or when comparing changed source with a live run. Measure overlap and exercise the affected combined path; stack-hop owns publication and failed-checkpoint isolation.

インストール方法を見る

含まれるファイル(4)

  • SKILL.md9.9 KB
  • scripts/coupling.mts44.0 KB
  • scripts/dangling-refs.mts6.2 KB
  • scripts/literal-contact.mts4.7 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Intelligent rebase

A clean rebase says only that the same lines did not conflict. It does not prove the composed system still agrees about prompts, tools, traces, evidence, thresholds, or identities. Check one composed pass:

input assembly → model/tool calls → recorded output → scoring → decision

Two cases need this check:

  • Two agents changed source: look for semantic interference.
  • A change is being compared with a live run: read the opening's frozen source. A newer head in another worktree leaves that run's evidence intact and supplies no proof of the new change. Never rebase the live tree. If its executed bytes actually drifted, report the recorded refusal and affected scope; preserve already-recorded case denominators rather than calling the run lost.

1. Measure contact

Use the coupling script for the changed sides. Reuse an earlier result only for the same immutable sides and script version. A metadata-only change needs ancestry/PR checks, not another simulation. Run repository commands through scripts/worktree.sh run <prepared-dir>; the commands below show the arguments after that wrapper.

# what is in flight right now, across every worktree git knows about
bun .claude/skills/intelligent-rebase/scripts/coupling.mts --worktrees --base <base>

# one pair: use this for an actual rebase decision
bun .claude/skills/intelligent-rebase/scripts/coupling.mts --a <base>...<A> --b <base>...<B>

# every pair in a range or chosen set: use this for a busy history
bun .claude/skills/intelligent-rebase/scripts/coupling.mts --review <base>..<head>
bun .claude/skills/intelligent-rebase/scripts/coupling.mts --commits <sha>,<sha>,<sha>

Start with --worktrees when the other work is unknown. It reports branch, head, ahead/behind, and dirty files, including dirty source files. Use --scan only for separate clones that Git does not know: it checks ~/.codex/worktrees, ~/.cursor/worktrees, ~/.claude/worktrees, <repo>/.claude/worktrees, or --scan-dir a,b. A clone matches by origin URL or shared root commit. A clone outside the object store must be fetched before comparison.

SeverityMeaningRequired response
6one side removed a name the other still usesrepair before composing
5same file and exported symbol changedfull simulation
4same file, different exportssimulate shared invariants
3one side imports an export the other changedsimulate that edge
2one side imports the other's namespacesimulate that edge
1same file, no export crossesusually step 4 only
0file contact through a hubweak signal

Severity 6 is a break rather than a contact: nothing conflicts, so the composition merges clean and fails later. --a/--b also print the literals both sides changed — env variable names, record field keys, policy keys, fixture paths — which is contact no import carries. Both come from text and both over-report; each row is a lead to confirm in source.

A hub is at or above the run's 90th fan-out percentile. Its edges sort below narrow module edges. --review and --commits compare all pairs, not only neighbours. Read grouped contended symbols and entangled commits before pair rows. No contact still needs the relevant shared-invariant check. Zero changed exports is a weak signal: internal behaviour can change behind an unchanged export.

2. Name owner and stage

For both sides record owner, stage, files, and every downstream-read value changed: record field, prompt text, schema, threshold, or identity literal. Use the four-owner map: Harness Builder, Built Harness, measurement controller, review stage.

3. Simulate the composed pass

At each stage ask: what does it read, did either side change it, and does the other side still mean the same thing?

StageCheck
input assemblymodel-visible text and prompt digest
context and retrievalselection, truncation, ordering
tool interfaceschema, name, availability, prompt description
model and config identityrecorded fields that shape results
state and handoff schemafield existence and meaning
output capturetrace and evidence shape beneath consumers
scoring and verificationdenominator, exclusions, null handling
aggregationproxy reads still have a producer
decision gateevery clause has its recorded input
versioningmodel-visible change has an identity/version bump

The usual issue is an edge: one side writes a value the other side reads.

4. Check shared invariants

  • Prompt digest stability: protected verifier detail must not change model-visible prompt digests.
  • Identity bump: prompt, tool schema, or rendering changes update the identity literal.
  • Bijection: executable registries and their source owners still match the tree.
  • Threshold monotonicity: merged changes do not relax and tighten the same rule inconsistently.
  • Denominator and attribution: do not attribute a measurement that mixes task, correctnessModel, policy, or denominator changes.
  • Ownership: every changed decision still has one source owner.

5. Adjudicate and verify

Verify every finding in source or records before patching. Keep this synthesis:

rebase_synthesis:
  sides: [<A>, <B>]
  shared_owners:
  interference:            # stage, changed value, invariant
  no_interference:         # checked and clear
  verification:            # full gate and targeted case
  unproven:

Exercise the smallest real combined path that could expose the contact; add only its missing regression. The normal source push gates every commit it publishes under AGENTS.md. Route a proved interference to its owning PR and continue authorised work; ask only when the remaining decision needs unavailable intent or would change a frozen run. Preserve unrelated work and stage named files.

For stack delivery, follow stack-hop and its publication procedure. Fold each owner correction into the commit it corrects, on its PR, and replay the affected suffix once, so the stack stays linear. The default checkpoint is up to five new owner changes, published by one multi-ref push from the clean top, which gates every commit alone and every moved head in full. A failing checkpoint uses suspect-guided checks and saved-head bisection there; neither a predicted culprit nor a green descendant proves an intermediate PR. Retarget/reorder safety belongs to that same procedure. Root adoption remains separate from publication, and live run trees retain their source and runtime.

Scope of the script

The graph covers src, tools, test, vendor, packages, starters and .claude/skills, over .ts, .mts, .cts, .tsx and their JavaScript spellings; --root a,b narrows it. A specifier resolves relatively, through the root manifest's workspaces (so @ana/agent-bundle reaches vendor/agent-bundle/index.ts), and from a .js or .mjs spelling to the .ts or .mts file beside it. It still misses an alias the tsconfig defines, a bare module name, a re-export chain, a computed specifier, uncommitted sides, N-way interactions and merge commits in a review. Dirty worktrees appear in --worktrees but cannot be diff sides. Three agents need three pairwise runs; pairwise clean results do not prove the three-way merge.

The rename gap is the one that has bitten. When one branch renames an identifier and the other adds code using the old name, every three-way merge is clean and the break appears only in typecheck or tests (2026-08-17, PR #267: repairOwner: "oracle" and a grader/oracle.ts#solve fixture path, one push cycle each). dangling-refs.mts answers it. For every export one side dropped it finds the files on the other side that still write the name, and ranks the row by the evidence behind it: 6 when that file imports the name from that exact file or reaches it through a * as alias of it, 3 when the remover re-added the name elsewhere and the other side only names it, 2 for a text-only mention. Within a band, a use the other side introduced outranks one it carried. A local variable of the same name therefore lands at 2, not at 6.

--review and --commits run the same scan in the one direction a range has: a later commit that still imports a name an earlier one removed. On a linear branch that is a commit git bisect cannot build; on a cherry-picked set it is the rename gap again. Only the import-backed band is printed there, and the extra endpoint reads are skipped entirely when no commit in the range removed an export. A name reached through a re-export chain or a computed key is still missed in both modes, so after a rebase across a rename the manual check remains worth its minute:

git show <lower-commit> --name-only --format=""
rg -n '<old-name>' <changed-paths>

literal-contact.mts asks the other question the graph cannot: which literals both sides changed. It reads text, so it covers JSON, YAML, Markdown and Python beside source. A token counts only when it is shaped like an identity — a separator, an internal capital, or all caps — is not a module specifier, is carried by at most eight files in total, and is not confined to a file both sides changed. Narrowest contact prints first: one file on each side is a coupling, twenty files is the repository's vocabulary. Measured on origin/main against b7d9be2a9, the unfiltered intersection returned 240 rows and these rules leave 6.

Each side is one endpoint diff, not a commit-by-commit replay. --a and --b decide a live rebase; --review is history analysis. The method assumes concurrent authors. On sequential commits it over-reports because the later author may already have resolved the contact.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Use when deciding which Anabasis stage owns a change, when carrying one bounded build/measure slice from the user's prompt to evidence, or when deciding what may enter a run: the exact one-line prompt, context files, public catalogues, research and solve-side public data. Maps the product loop, the input contract, the authoring sessions, the adoption gates, the four owners, and validate-or-reopen behaviour. Not a long-running campaign controller.

日本語の概要は準備中です。原文の説明を表示しています。

s-smits/anabasis622026年10月13日 更新

Use after an Anabasis run, comparison, or system change and before claiming improvement. Attributes movement to one owner, reports identities and censored denominators, separates deterministic proof from model judgement, keeps measurement validity apart from observed exploitation, and states what remains unrun or provisional.

日本語の概要は準備中です。原文の説明を表示しています。

s-smits/anabasis622026年10月13日 更新

Use for 1-7 independent read-only sessions investigating one bounded Anabasis failure, diff, or design question before a fix. Defines non-leading prompts, evidence packets, symmetric fault hypotheses, self-falsification, source adjudication, and concise synthesis. Do not use for whole-run coverage at any session count; use whole-run-investigation instead.

日本語の概要は準備中です。原文の説明を表示しています。

s-smits/anabasis622026年10月13日 更新

Get told the moment a live Builder session is blocked (five refused submits in a row, a repeated findings set, twelve checks without acceptance, two environment previews in a row, two hours since a submit or rehearsal last returned) and fix the owner iteratively: read, fix on the owning PR, then keep the run or kill it and relaunch on the upgraded system, and rearm. Use while a paid run is live and the operator wants blocking caught and repaired, not only reported.

日本語の概要は準備中です。原文の説明を表示しています。

s-smits/anabasis622026年10月13日 更新

Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

日本語の概要は準備中です。原文の説明を表示しています。

s-smits/anabasis622026年10月13日 更新

Launch, start, monitor, and collect independent Codex subagents (gpt-6-luna at high, xhigh or max; gpt-6.1-sol for small review batches) for bounded parallel work, from Codex or from Claude Code, including requests supplied as a Markdown file of session prompts. This skill owns Codex subagent transport even when another investigation or review skill defines the questions. Use whenever the user asks for Luna or Sol agents, a swarm, many sessions, a concurrency test, a particular reasoning effort, a Codex subagent from Claude Code, or later collection of reports. Distinguish launch-only requests from requests to wait, collect, or synthesise. Route high and xhigh through the direct launcher; for 16 or more sessions, also invoke the direct launcher instead of native spawn_agent.

日本語の概要は準備中です。原文の説明を表示しています。

s-smits/anabasis622026年10月13日 更新

s-smits のスキルをすべて見る

このスキルの問題を報告する