codex/skills/resolve/SKILL.md
Intent-closed counterexample-guided review synthesis with fail-closed authority gates. Use for `$resolve`, material branch review/fix/prove/push/closure, repeated CAS/PR findings, review-driven growth, semantic-surface conservation, MBK/RC realization, or deciding exactly which review observations may change code. Raw review text is never executable: mutation requires RAC-v1 from claim to AC/CEX/RB/CEB/MBK/RC/proof/realization, and closure requires terminal closure-gate proof. Not for one-shot review, PR creation, merge/land, or isolated implementation.
npx skillsauth add tkersey/dotfiles resolveInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
$resolve is the Intent-Closed Counterexample Synthesis Compiler.
source intent
-> sealed observation language
-> bounded falsification batches
-> minimal distinguishing counterexamples
-> counterexample quotient
-> minimum behavioral kernel
-> one realization
-> conformance falsification
-> terminal holdout
-> delivery closure
The unit of review is a minimal distinguishing experiment. The unit of resolution is a counterexample equivalence class. The unit of implementation is a kernel transition.
Raw review text is not mutation authority.
A review-originated edit is legal only when the active finding has a current
resolve_authority_chain / RAC-v1 from review claim to AC law, CEX disposition,
sealed batch, CEB class, MBK/RC transition, proof obligation, and realization
target.
If the chain is incomplete, the only legal actions are:
adjudicate the claim
seal or repair the batch
compile or repair CEB/MBK/RC
rebase AC
create a follow-up
reject the finding
block
Patch, commit, push, and closure language are forbidden until the relevant gate passes.
Repeated whole-diff review creates a positive feedback loop:
larger diff -> broader review search -> more valid adjacent findings
-> more local patches -> larger review search
A finding may be real, branch-liable, and diff-local while still being outside the intended change. Therefore:
diff relevance is not mutation authority
validity is not intent entailment
additional witness is not a new code distinction
useful review prose is not executable input
intent-closed-cegis-v2
Primary artifacts:
AC-v2 sealed acceptance contract and observation language
RB-v1 bounded review batch
RAP-v1 targeted review aperture
CEX-v1 minimal distinguishing counterexample
CEB-v2 sealed, quotiented counterexample basis
MBK-v1 minimum behavioral kernel, intent-bound
RC-v1 reduction certificate
RAC-v1 review authority chain from claim to realization authority
PHI-v1 controller-derived review potential
MBKC-v1 campaign certificate and delivery gate
Canonical controller:
resolve-c3
Before material work:
python3 codex/skills/resolve/tools/controller_preflight.py
Required capability profile:
acceptance_contract_v2
sealed_review_horizon_v1
review_batch_v1
review_aperture_v1
counterexample_v1
counterexample_basis_v2
minimum_behavioral_kernel_v1
reduction_certificate_v1
resolve_authority_chain_v1
mutation_gate_v1
closure_gate_v1
review_potential_v1
intent_closed_conformance_v1
terminal_holdout_v1
physical_apply
physical_commit
physical_push
closure_horizon_v1
If unavailable:
analysis, adjudication, AC/CEX/CEB/MBK/RC/RAC drafting allowed
delivery mutation, commit, push, and closure forbidden
Reference compatibility tools:
python3 codex/skills/resolve/tools/resolve_authority_chain_gate.py rac.yaml
python3 codex/skills/resolve/tools/resolve_mutation_gate.py --chain rac.yaml
python3 codex/skills/resolve/tools/resolve_closure_gate.py --summary summary.json --runs runs.jsonl
RAC-v1 is the smallest authority object that proves a review finding has been
compiled into legal mutation or legal non-mutation.
A mutation-authorizing RAC requires:
chain_version = RAC-v1
current artifact state
review claim ID
AC contract, horizon, and law refs
in-horizon acceptance relation
confirmed CEX with minimal trace
sealed RB-v1
CEB class
MBK/RC transition
proof obligation
realization.allowed = true
gate.current_artifact_state = yes
gate.complete_chain = yes
gate.mutation_allowed = yes
A legal non-mutation RAC may authorize follow-up, proof-only update, AC rebase,
rejection, or block; it cannot authorize code mutation.
Full schema and native CLI spec: references/cli-specs/01-rac-v1-and-authority-chain.md.
Before any review-originated mutation, require:
python3 codex/skills/resolve/tools/resolve_mutation_gate.py --chain rac.yaml
Native target:
resolve-c3 mutation-gate --chain rac.yaml --format json
Fail closed on:
uncompiled_review_text
missing_acceptance_contract
missing_or_stale_horizon
missing_or_invalid_cex
unsealed_review_batch
missing_ceb_class
missing_mbk_or_rc
missing_proof_obligation
artifact_state_stale
outside_horizon
rejected_or_refuted_claim
blocked_or_unknown_intent
When blocked, do not patch around the gate. Legal next actions are adjudication,
sealing, compression, AC rebase, follow-up creation, rejection, or block.
Full spec: references/cli-specs/02-mutation-gate.md.
Before completion language, delivery closure, commit/push closure, or PR-thread closure, require:
python3 codex/skills/resolve/tools/resolve_closure_gate.py \
--summary /tmp/seq-resolve-summary.json \
--runs /tmp/seq-resolve-runs.jsonl
Native target:
resolve-c3 closure-gate --summary SUMMARY --runs RUNS --format json
A material run is not closed when any are true:
c3_required=true and c3_closed=false
compression_state=NONE
batches_total=0 for a finding-bearing workflow
delivery_closed=true while terminal_closed=false
potential.strict_progress=0 for a material campaign
orphan_code_constructs > 0
unmapped_proof_actions > 0
wound_specific_tests > 0 unless class-mapped
semantic_surface_delta > 0 without explicit AC rebase
A healthy material closure row has:
c3_required=true
c3_entered=true
c3_closed=true
compression_state != NONE
batches_total > 0
kernel.accepted=true
potential.strict_progress > 0
delivery_closed=true
terminal_closed=true
orphan_code_constructs=0
unmapped_proof_actions=0
semantic_surface_delta <= 0 unless AC rebased
Full spec: references/cli-specs/03-closure-gate.md.
review claim
-> CEX-v1 adjudication
-> sealed batch
-> CEB/MBK/RC
-> RAC-v1
-> selected design
-> realization
Never:
review claim -> patch
AC-v2 defines:
MUST required behavior and compatibility obligations
MUST NOT forbidden states/transitions
MAY permitted but not mutation-justifying behavior
OUTSIDE behavior not authorized in this campaign
After sealing, the observation language cannot expand without an explicit AC
rebase. RAC-v1 must cite the active AC/horizon before mutation.
While any discovery, conformance, or holdout batch is open:
delivery mutation = forbidden
Batch all planned apertures, classify every result, quotient duplicates, build or update RAC-v1, then mutate once.
Every actionable CEX identifies accepted law/obligation, minimal trace or witness, expected observation, actual observation, and current artifact state. Generic suspicion is not a counterexample.
new class -> kernel may refine
new witness, existing class -> proof may strengthen
duplicate -> no semantic action
outside horizon -> follow-up or AC rebase
An additional witness cannot create another branch/helper/state/test family.
After kernel acceptance, allowed review outputs are:
existing-law nonconformance
missing law proof
orphan realization construct
stale artifact state
novel in-horizon CEX
outside-horizon proposal
clean
Generic feature discovery cannot directly authorize mutation.
same accepted class recurs after realization
-> candidate failed
-> invalidate realization
-> no local append patch
A novel in-horizon class returns to kernel synthesis. An outside-horizon class returns to AC authority or follow-up.
Each realized cycle emits PHI-v1:
U = unclassified in-horizon counterexamples
L = unsatisfied accepted laws
C = open counterexample classes
O = orphan realization constructs
S = hard semantic-surface vector
P = unmapped/missing proof debt
Require:
(U,L,C,O)_after <lex (U,L,C,O)_before
S_after componentwise <= S_before unless AC is explicitly rebased
P_after <= P_before
strict_progress = yes
Local comment silence is not progress.
All batches refine one kernel rooted at campaign_base_sha. A prior tuple-local
closure head is not a new compiler base.
Every surviving construct maps to accepted law, counterexample class, canonical owner, and proof obligation. Targets:
orphan_code_constructs = 0
wound_specific_test_families = 0 unless class-mapped witness fixtures
unmapped_proof_actions = 0
Every accepted operation, transition, and observation respects the quotient. Unknown congruence blocks realization.
Every accepted law and required observation recomposes from retained factors after quotienting and ablation.
$fixed-point-driver.Require current AC/horizon, no open review batch, no unclassified in-horizon CEX, current CEB/MBK/RC, current RAC-v1 chains for every review-originated mutation, no novel conformance/holdout CEX, terminal strict PHI, all laws proved, all constructs/proof mapped, conserved or explicitly rebased semantic surface, current-head proof, PR thread sweep, commit/push currency, and passing closure gate.
If no finding-bearing campaign exists:
current proof
thread sweep
tuple-bound closure
Do not manufacture AC/MBK/RAC machinery.
Allowed only when exactly one confirmed branch-liable existing-law violation has current AC/kernel, a passing RAC-v1 mutation gate, no new semantic distinction, nonincreasing semantic surface, proof extending an existing law family, and one sealed conformance batch. Still emit compact CEX/MBKC/PHI/RAC evidence.
Use full lifecycle when any apply:
two or more branch-liable findings
same-family recurrence
new semantic distinction
positive hard-surface pressure
public/compatibility/fallback pressure
thread reopening
finding proposes new behavior
whole-diff review discovers adjacent scope
$review-adjudication to produce CEX-v1 or rejection.$review-compression-compiler to produce CEB-v2 + MBK-v1 + RC-v1.$fixed-point-driver for one bounded realization.Implement specs in this order:
references/cli-specs/01-rac-v1-and-authority-chain.mdreferences/cli-specs/02-mutation-gate.mdreferences/cli-specs/03-closure-gate.mdreferences/cli-specs/04-seq-projection.md
The mutation gate consumes RAC-v1. The closure gate consumes controller and seq
projection fields, including RAC/mutation-gate outcomes. The seq projection spec
comes last because it reports the first three surfaces.python3 codex/skills/resolve/tools/acceptance_contract_gate.py acceptance.json
python3 codex/skills/review-adjudication/tools/counterexample_gate.py cex.json
python3 codex/skills/resolve/tools/review_batch_gate.py batch.json
python3 codex/skills/review-compression-compiler/tools/counterexample_basis_gate.py basis.json
python3 codex/skills/resolve/tools/kernel_lint.py kernel.json
python3 codex/skills/resolve/tools/resolve_authority_chain_gate.py rac.yaml
python3 codex/skills/resolve/tools/resolve_mutation_gate.py --chain rac.yaml
python3 codex/skills/resolve/tools/review_potential_gate.py potential.json
python3 codex/skills/resolve/tools/resolve_closure_gate.py --summary summary.json --runs runs.jsonl
python3 codex/skills/resolve/tools/mbkc_gate.py mbkc.json --terminal
Resolve:
- Campaign / tuple:
- AC / horizon:
- Review batches:
- CEX classes:
- CEB / MBK / RC:
- RAC-v1 chains:
- Mutation gate:
- Realization:
- Conformance:
- Holdout:
- PHI:
- Semantic surface:
- Closure gate:
- Commit / push / PR sweep:
- Remaining uncertainty:
Do not use completion, closed, resolved, landed, or ready language when the closure gate blocks.
tools
Invokes Apple's macOS 27 fm command-line tool from a local Mac to use the on-device system model or Private Cloud Compute, including instructions, image prompts, schema-constrained JSON, and noninteractive automation. Use when the user asks to run Apple Foundation Models through fm, compare system versus pcc, generate structured output, or automate fm without Swift or an app.
development
Compile historical Codex sessions into governed counterfactual evidence, evaluate an existing owner-applied candidate through blinded paired HCTP trials, and fold observable evidence into RUN, OBSERVE, or STOP. Use for `$hylo`, CRF extraction, counterfactual replay, source-governed direct or historical trials, sealed evidence, paired baseline/candidate evaluation, causal frontiers, or evidence-governed improvement.
testing
Ensure a `ledger` command is available on PATH; materialize, validate, record, replay, and project requested Actuating artifacts without taking semantic or execution authority; coordinate the shared Learnings/Synesthesia/Negative Ledger lifecycle checkpoint and repo-local source-memory reconciliation; address Universalist plans and receipts; and perform pure artifact validation.
testing
Classify and quotient review findings, failing tests, incidents, bug reports, migration failures, and other witnessed falsifiers against accepted intent and the current Construction. Author counterexample-set/v1 without selecting repairs, counting review credit, or granting mutation.