agentleFS
swyxioswyxio/skills/deep-trajectory-analysis/SKILL.md

deep-trajectory-analysis

Skill171 starsChanged 8 months agoMITView on GitHub

Reconstruct and visually analyze paired agent, game, or policy trajectories to determine whether changed actions produced their intended effects. Use for move-history audits, replay/trace analysis, policy regressions, behavior calibration, causal first-divergence studies, reply-survival analysis, agent personality validation, promotion decisions, and reports that must connect aggregate outcomes to exact state-action sequences.

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 12 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read references/evidence-contract.md before defining metrics or building the report.

    line 12
  2. Distinctive:

    Write one sentence for each intended effect before inspecting favorable examples:

    line 18
  3. Distinctive:

    Do not let one metric stand in for all three.

    line 32
  4. Distinctive:

    Stop promotion analysis until these checks pass:

    line 36
  5. Distinctive:

    Check symmetry, label invariance, hidden-information access, legal actions, and compute parity.

    line 43
  6. Distinctive:

    If compact results omit actions or states, rerun the exact manifests with decision evidence enabled.

    line 46
  7. Distinctive:

    Do not infer a causal move story from final aggregates.

    line 47
  8. Distinctive:

    Treat later branch differences as consequences.

    line 70
  9. Distinctive:

    Use response-cycle value for promotion.

    line 96
  10. Distinctive:

    Population layer: all paired trajectories, clustered uncertainty, map/environment and opponent/task slices, distribution tails, compute, …

    line 103
  11. Distinctive:

    Always produce work-in-progress charts once real data exists.

    line 114
  12. Distinctive:

    Keep local proxies and final success visually separate.

    line 123
  13. Distinctive:

    Do not promote or modify a live policy unless the user asked for implementation and the predeclared held-out strength, identity, safety, …

    line 154

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Deep Trajectory Analysis

Determine not merely whether a candidate scored better, but what it changed, whether the named mechanism fired, how the environment replied, and whether the benefit survived to the final outcome.

Read references/evidence-contract.md before defining metrics or building the report. Run scripts/validate-report.mjs on a machine-readable result that follows that contract.

Establish the causal question

Write one sentence for each intended effect before inspecting favorable examples:

When opportunity O is publicly observable, policy P should change action A, immediately alter mechanism M, survive response R, and improve horizon outcome H without violating safety S.

Operationalize every noun. Prefer board-, state-, or trace-derived quantities over labels such as “aggressive,” “safe,” “precise,” or “wild.”

Separate:

  • strength: final win, reward, score margin, rank, or task success;
  • identity: the behavior the policy is meant to exhibit;
  • safety: compute, fairness, legality, information access, termination, and worst-case floors.

Do not let one metric stand in for all three.

Preflight integrity

Stop promotion analysis until these checks pass:

  1. Freeze engine/model, rules, maps/environments, search budget, opponent/control policies, seeds, seats/roles, starter/order, horizon, and terminal scoring.
  2. Pair baseline and candidate on the exact physical/random inputs. Exclude unmatched cells.
  3. Reproduce sampled trajectories and verify replay, state, or trace fingerprints.
  4. Separate natural finishes, adjudications, horizon caps, failures, and unexplained outcomes.
  5. Check symmetry, label invariance, hidden-information access, legal actions, and compute parity.
  6. Archive incompatible epochs rather than merging them into one trend.

If compact results omit actions or states, rerun the exact manifests with decision evidence enabled. Do not infer a causal move story from final aggregates.

Audit telemetry semantics

Trace each metric to the code path that emits it.

  • Distinguish policy exposure, selector activation, and action divergence.
  • A replacement evaluator may be active on every decision while reporting zero selector changes.
  • A selector may activate without producing the named mechanism.
  • A signal may double-count overlapping concepts, especially in two-player or single-opponent cases.
  • A physically retained object or cell may have negative strategic value after opportunity cost.

Rename misleading report labels immediately. Preserve the original field for compatibility if needed, but never use an inapplicable field as the research conclusion.

Reconstruct paired trajectories

For every exact pair:

  1. Align baseline and candidate until the first focal decision with identical public pre-state.
  2. Find the first different action. This is the strongest causal comparison.
  3. Record the shared state, hand/input, legal choices, chosen action, predicted receipt, actual transition, opponent/environment reply, next focal action, and final outcome.
  4. Treat later branch differences as consequences. Do not describe them as independent causal policy choices unless their pre-states are again identical.
  5. Measure both the action’s targeted region and the opponent’s best alternative payoff elsewhere.

Store exact pair keys, turn/step numbers, fingerprints, placements/actions, changed entities, score/reward checkpoints, and terminal evidence.

Build the effect funnel

Count distinct stages rather than compressing them into “activation”:

  1. opportunities;
  2. policy exposures;
  3. selector activations, when applicable;
  4. actual action divergences;
  5. intended immediate effect;
  6. physical survival after the reply;
  7. positive full response-cycle exchange;
  8. medium-horizon conversion;
  9. final outcome conversion.

Report the denominator at every stage. Measure both:

  • physical survival: targeted cells, objects, resources, or state remain;
  • value survival: backed-up score/reward after the best observed or searched reply.

Use response-cycle value for promotion. Treat physical survival and immediate gain as diagnostic mechanism metrics only.

Combine population and case evidence

Use both layers:

  • Population layer: all paired trajectories, clustered uncertainty, map/environment and opponent/task slices, distribution tails, compute, termination, and funnel rates.
  • Case layer: at least one intended-effect success, one counterexample, and one held-out regression. Select cases by predeclared rules such as largest paired outcome changes—not by visual appeal.

Case studies explain mechanisms; they do not estimate prevalence. Aggregate statistics estimate prevalence; they do not explain the move.

Make the report visual

Always produce work-in-progress charts once real data exists. Prefer:

  1. a population effect chart with experimental-unit dots and uncertainty;
  2. a stage funnel from exposure through final conversion;
  3. paired baseline/candidate score or reward trajectories with the first divergence annotated;
  4. a four-frame state filmstrip: shared state, baseline action, candidate action, reply;
  5. small multiples for map/environment, opponent/task, role/seat, and held-out splits.

Render real state and actions where possible. Use schematic illustrations only when clearly marked. Keep local proxies and final success visually separate; a locally successful move that loses must look like a failed final conversion.

Draw conclusions

Classify each intended effect:

  • fires and converts;
  • fires but is erased by reply;
  • fires but carries excessive opportunity cost;
  • proxy fires, intended mechanism does not;
  • policy is exposed but does not change actions;
  • improves discovery but fails held-out transfer;
  • unmeasurable because instrumentation is semantically wrong.

Recommend the smallest next mechanism that directly represents the failed stage. Examples include reply backup, route-hinge detection, multi-purpose payoff, plan-level variety, calibrated horizon value, or corrected telemetry. Do not solve a missing strategic model by merely increasing a generic weight.

Deliverables

Produce:

  • a concise verdict with quantified findings;
  • a machine-readable report satisfying the evidence contract;
  • a reproducible reconstruction/analyzer command;
  • visual population and trajectory analysis;
  • links to exact replay/trace artifacts;
  • verification results and explicit remaining limitations.

Do not promote or modify a live policy unless the user asked for implementation and the predeclared held-out strength, identity, safety, and compute gates all pass.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.