Command Palette

Search for a command to run...

Назад к скиллам
скилл № 40566

trajectory-audit

Audit recent Claude and Codex transcript JSONL with the first-class Go `fak trajectory audit` verb: exact token/cache buckets, source coverage, behavior…

БесплатноБез исполняемых скриптов
anthony-chaudharyот anthony-chaudhary★ 50 звёзд на GitHub

Установить trajectory-audit в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

/trajectory-audit — cross-harness efficiency audit

Use the Go data path for every operational audit:

fak trajectory audit --since 7d \
  --jsonl trajectory-audit-$(date +%Y%m%d).jsonl \
  --md trajectory-audit-$(date +%Y%m%d).md

For a topical cohort, select only user-authored prompts; tool output and injected repository instructions cannot admit an unrelated session:

fak trajectory audit --since 4d --user-contains qwen \
  --jsonl qwen-audit.jsonl --md qwen-audit.md

The report exposes discovered, matched, and scanned file counts so a topical claim retains its denominator. --user-contains is a case-insensitive literal, not a regular expression.

The verb discovers both supported transcript homes by default:

  • Claude: $CLAUDE_CONFIG_DIR/projects, else ~/.claude/projects.
  • Codex: $CODEX_HOME/sessions, else ~/.codex/sessions.

Pass --claude-root or --codex-root only for an explicit alternate corpus or a pinned fixture. The paths persisted in artifacts are relative to those roots; machine-private absolute roots are never emitted.

Pinned private replay

Capture the selected inputs when a later audit must use the identical corpus:

fak trajectory audit --since 7d --user-contains qwen \
  --snapshot-out /private/path/qwen-corpus \
  --jsonl qwen-audit.jsonl --md qwen-audit.md

--snapshot-out requires a new directory, copies only selected JSONL inputs, and reports a verified corpus digest. The snapshot contains raw transcript bytes: keep it private, never commit or sync it, and remove it explicitly when it is no longer needed. Replay verifies the manifest and every input before and after parsing:

fak trajectory audit --snapshot /private/path/qwen-corpus \
  --jsonl replay.jsonl --md replay.md

Replay rejects --since, --user-contains, live-root overrides, and --baseline; the snapshot already owns selection and captured output identity. A missing, extra, changed, malformed, path-escaping, or permission-open input fails closed with TRAJECTORY_SNAPSHOT_REFUSED.

Exact accounting contract

Every JSONL row uses schema fak-trajectory-audit/1. Claude usage is folded once per unique message.id, matching the provider-billed turn identity. Codex token_count records are cumulative: the parser uses the final monotonic total_token_usage record and does not sum repeated last_token_usage snapshots. Codex input_tokens includes its cached/cache-write subsets, so fresh input is the exact subtraction input - cached - cache_write. The resulting input, output, cache-create, and cache-read buckets are disjoint across both harnesses. Codex session rows also preserve the configured session_meta.model_provider and summarize last_token_usage.cached_input_tokens with an observed sample count and min/max. Those bounds are transcript-producer telemetry for the configured provider path; they do not prove physical provider cache residency, process-local ownership, or hits in fak-owned caches.

An unknown or malformed usage shape is never estimated. The verb writes a refusal row and the markdown diagnostic, prints TRAJECTORY_SCHEMA_REFUSED, and exits non-zero. Treat that as a parser-version gap, not as zero usage.

Meta-process blocker triage

For a topical cohort, rank these process signals before reading individual sessions:

  1. Scope contamination — compare matched with discovered files; use --user-contains, never raw transcript grep, because tool output can echo a topic.
  2. Token concentration — top_ten_token_fraction shows whether a few runaway sessions dominate the aggregate; inspect those bottleneck rows first.
  3. Tool failure burden — tool_errors/tool_calls measures execution friction.
  4. Zero-usage launches — empty_usage_files exposes starts that produced no billable model progress.
  5. Fragment duplication — duplicate_fragments exposes one session ID spread over multiple transcript files; do not count those as independent workers.
  6. Repeated identical failures — use repeated_failures; retry loops need a changed hypothesis, not another identical call.
  7. Mutation churn — use mutation_churn; repeated writes to one target indicate insufficient repro-first scoping.
  8. Hook latency — use hook_p95_ms; separate gate wait from model/kernel work.
  9. Input amplification — use input_output_ratio; large values warrant context paging or a narrower worker packet.
  10. Evidence refusal — any refused_records means the parser found an unsupported shape; fix coverage before making a broad efficiency claim.

The first five now have explicit JSON summary fields. The remaining five preserve existing exact audit fields. Treat each as a hypothesis until the corresponding session rows or refusal rows identify the concrete cause.

Baseline comparison

Use a prior versioned JSONL artifact as the baseline:

fak trajectory audit --since 7d --baseline prior.json
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

  1. 01Read
  2. 02Grep
  3. 03Glob
  4. 04Bash

FAQ

Что делает скилл trajectory-audit?

Audit recent Claude and Codex transcript JSONL with the first-class Go `fak trajectory audit` verb: exact token/cache buckets, source coverage, behavior, deterministic bottlenecks, semantic confusion checks, and baseline regressions. Use for cross-session cost, efficiency, repetition, reasoning-quality, and churn questions.

Как установить скилл trajectory-audit?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл trajectory-audit запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить trajectory-audit с