codex/skills/seq/SKILL.md
Mine Codex session JSONL and memory artifacts with the Zig `seq` CLI. Use for explicit `$seq`, artifact/session/tool/memory/plan forensics, skill activation and outcome audits, decision provenance, `$tune` evidence, `$retrace` source capsules, review-compiler provenance, watched-session deltas, worker attribution, or reproducible historical reports. Prefer the narrowest lifted command and preserve denominators, provenance, contamination, and uncertainty.
npx skillsauth add tkersey/dotfiles seqInstall 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.
Use deterministic local session and memory evidence to answer:
what happened
where it happened
what evidence supports it
what remains unknown
For skill/workflow analysis distinguish:
presence
decision influence
downstream outcome
workflow governance
These are not interchangeable.
Primary local sources:
~/.codex/sessions
~/.codex/memories
seq is local-corpus forensics, not product-wide telemetry.
State the denominator and exclusion policy before counts.
For current or post-change audits, run:
seq --version
seq capabilities --format json
<target-command> --help
Use the installed lifted surface as source of truth. Do not recreate a newer native classifier with broad transcript searches when the installed binary is old.
For session JSONL forensics, require:
streaming_session_scanner_v1
This capability means aggregate session or corpus size is not a scanner limit;
the shared scanner retains one protocol record at a time and each command owns
its semantic fold. The per-record fail-closed guard remains separate. If the
capability is absent, upgrade Seq rather than substituting broad jq, rg, or
ad hoc whole-file scans. A genuinely bounded native query is acceptable only
when that narrower denominator fully answers the question.
skill-decision-audit
skill-evidence
skill-success-rank
skill-audit
skill-cohort
workflow-audit
workflow-overlap
decision-capsule
historical_decisions dataset
turns
session-detail
artifact-search
review-compiler-audit
adjudication-audit
goal-audit
routing-gap
artifact-search
plan-search
find-session
session-prompts
sessions
turns
session-detail
tail
tool-lifecycle
tool-audit
tool-search
session-tooling
session-graph
orchestration-concurrency
memory-inventory
memory-provenance
memory-map
memory-history
memory-extension-audit
message-search
message-audit
token-usage
token-window
token-cost
query-diagnose
query
Use generic query when no lifted surface owns the relation.
See command-routing.md.
Use when asking:
How did a skill affect decisions?
Was its decision contract followed?
Was activation missed?
What should $tune change?
seq skill-decision-audit \
--root ~/.codex/sessions \
--skill <skill> \
--skill-root codex/skills \
--repo <repo> \
--last 30d \
--exclude-current \
--mode tune-packet \
--format json
Modes:
summary
episodes
misses
clauses
outcomes
matched-cohort
tune-packet
delta
Evidence levels:
structured SDR-v1 receipt
explicit assistant attribution
contract-aligned action
associated outcome
co-occurrence only
Do not collapse these into one “used” count.
A receipt proves attribution structure, not a good outcome.
skill-decision-audit uses the shared streaming scanner and retains only
activation, decision, and outcome evidence needed by its output contract.
Use skill-evidence for one watched session and skill-audit --mode activation for cohorts.
Preserve:
explicit user call
implicit assistant declaration
injected skill block
manual skill-file read
target-skill lens use
outcome evidence
raw mention
Presence does not prove influence.
skill-evidence uses the same scanner in a single pass for normalized messages,
skill mentions, tool reads, outcomes, and session identity.
Decision-oriented skills may carry:
references/decision-contract.yaml
skill_decision_contract / SKDC-v1
Authority order:
--contract;--skill-root;skill_decision_receipt:
receipt_version: SDR-v1
decision_id:
skill:
skill_contract_fingerprint:
trigger_refs: []
clause_refs: []
question:
alternatives_considered: []
selected_route:
rejected_routes: []
expected_outcome:
artifact_state:
Use decision-capsule to freeze one visible decision for $retrace.
seq decision-capsule \
--root ~/.codex/sessions \
--session-id <id> \
--turn-index <n> \
--anchor all \
--outcome-policy conservative \
--format json
Prefer --decision-id when candidate normalization produced one.
When candidates are empty:
inspect turns/session-detail
locate the visible route boundary
use exact one-based turn index
DCP owns visible historical context and structural temporal anchors. It does not infer hidden rationale.
Aggregate counts are discovery only. Before a session-level claim:
denominator.included_sessions row;$retrace source.
For controller-backed review-closure workflows, evidence roles are:controller_invocation
controller_event
controller_state
controller_receipt
explicit_workflow_declaration
artifact_under_repair
filename_or_path_mention
historical_reference
generic_prose
Only controller-grade evidence proves authoritative governance. A path containing only a workflow name is not activation. Generic completion, merge, or land evidence is not controller closure. When evidence is incidental, exclude the row from the true workflow denominator rather than deriving required/entered/closed state. Use ordered lifecycle evidence when available:
begin
basis
candidate
ablation
proof
permit
realization
apply
commit
push
close/abort
See review-compiler-provenance.md.
$retrace source selectionWhen $retrace investigates a workflow:
aggregate audit
-> included session row
-> provenance classification
-> SGG-v1
-> DCP-v2
Do not select a replay source from aggregate counts or fallback transcript similarity. Allowed source-governance states:
authoritative
declared_uncontrolled
incidental
ambiguous
absent
Only the first two permit workflow-specific replay, with limitations preserved. See retrace-decision-capsules.md.
Do not evaluate one protocol with another protocol’s vocabulary. For review-closure workflow audits, distinguish:
legacy-cleanroom
controller-backed
kernel-compression
mixed
none
Report:
expected protocol
detected protocol
mismatch
Keep controller lifecycle evidence separate from kernel/compression/recomposition evidence.
Never collapse:
mutation churn
final Git delta
semantic surface
Mutation churn:
patch operations
gross insertions/deletions
rewrites
Final Git delta:
base/head
path classes
production/test/docs/generated/config
Semantic surface:
metric name/version/unit
dimensions
baseline/head
value
Unknown units must be labeled UNIT_UNRESOLVED.
For comparative audits preserve:
sessions root
seq version
scanner/index version
candidate files
files opened
session-id/path digest
time window
worker inclusion
current-session exclusion
A fixed time window is not an immutable corpus snapshot.
Use linked workers only when requested or when the relevant decision occurred there. Preserve:
root session
worker session
parent edge
lane/receipt ID
declared skills
decision receipt
outcome
Do not merge unlinked worker sessions into the root denominator.
Report:
explicit decision delta
contract-consistent but causality unproven
associated outcome only
co-occurrence only
Matched cohorts are observational. Fork/retrace evidence is experimental but remains separate from historical source fact.
Default to sanitized refs and bounded excerpts. Detect:
injected skill blocks
current audit prompts
generated reports
quoted transcripts
memory summaries
examples
A schema example inside a skill body is not a historical decision. Private reasoning must not be exposed as report evidence.
seq artifact-search --contains "<term>" --surface messages --format jsonl
seq plan-search --repo <repo> --include-body --format jsonl
seq skill-audit --skill <skill> --mode activation --last 30d --exclude-current
seq tool-lifecycle --session-id <id> --format json
seq session-detail --session-id <id> --format markdown
seq review-compiler-audit --protocol auto --repo <repo> --format json
seq decision-capsule --session-id <id> --mode candidates --format table
streaming_session_scanner_v1 for session JSONL forensics; do not fall back to broad whole-file scans when it is absent.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.