Agent trajectory diagnostics

From mouadja02/skills · View interactive version

Agent trajectory diagnostics is an AI agent skill from the GitHub repository mouadja02/skills. Use when diagnosing agent benchmarks or runtime failures from trajectories instead of aggregate pass rates. Builds shared action-observation decision landscapes, identifies productive cores and trap regions, profiles Access/Trap/Repair behavior, and designs conservative trap-triggered recovery exper

How to use this skill

Skill file

Agent Trajectory Diagnostics

Pass rate hides how an agent navigates. Use shared decision landscapes to identify where agents reach

productive states, enter recurring failure regions, and recover.

When to Activate

Activate when:

Paper-Backed Vocabulary

| Event | Meaning |

| --- | --- |

| Access | Trajectory reaches a productive core |

| Trap exposure | Trajectory enters a low-outcome region |

| Repair | Trajectory enters a trap and later reaches a productive core |

Trap regions are descriptive, not universal proof of a bad action. Some traps contain legitimate exploration.

Workflow

Step 1: Collect Comparable Trajectories

Capture:

Pool rollouts across models or harness variants before adding model identity to the analysis.

Step 2: Canonicalize Observable States

Create sparse action-observation signatures:

action: edit|read|search|execute|delegate
tool: tool-name
observation: success|error|timeout|empty|conflict
resource: normalized-path-or-entity
phase: optional-workflow-phase

Strip volatile identifiers. Keep enough structure to recognize recurring contexts.

Step 3: Build the Shared Landscape

  1. Create a similarity graph over pooled observable states.
  2. Group densely related states.
  3. Identify articulation gates where trajectories branch between phases or strategies.
  4. Overlay outcome information only after graph construction.
  5. Mark productive cores and low-outcome trap regions.

Model identity should be traffic over the shared landscape, not an input to landscape construction.

Step 4: Profile Supply and Demand

For each model or harness:

For each benchmark:

Step 5: Validate the Landscape

Manually inspect samples:

Step 6: Test Conservative Recovery

When historical traps are repeatable:

  1. Run the live agent normally.
  2. Detect a canonical state matching a historical trap region.
  3. Fork from the same prefix.
  4. Compare small single-factor interventions such as a diagnosis note, increased sampling diversity, or a

provider-specific continuation policy.

  1. Promote only an intervention that improves paired outcomes on fired states.

Do not apply recovery globally without evidence.

Output Format

## Trajectory Corpus
[Tasks, rollouts, models, harnesses]

## Shared Landscape
[State signature, graph construction, cores, traps, gates]

## Process Profiles
[Access, Trap, Repair by model and benchmark]

## Failure Regions
[Recurring states and examples]

## Recovery Experiment
[Trigger, prefix fork, treatment arms, paired results]

## Limits
[Where signatures or interventions may not generalize]

Guidelines

  1. Build shared landscapes before overlaying model identity.
  2. Keep runtime triggers observable and conservative.
  3. Test recovery on the same fired prefixes.
  4. Report paired outcome changes, not anecdotes.
  5. Preserve trap false positives for review.
  6. Treat process profiles as diagnostics, not a replacement leaderboard.

Gotchas

  1. Scalar-score tunnel vision - Equal pass rates can hide different failure and recovery modes.
  2. Outcome leakage - Do not construct the state graph from model identity or labels.
  3. Trap absolutism - Low-outcome regions may include useful exploration.
  4. Global repair policies - Trigger recovery only where historical evidence supports it.
  5. Over-specific signatures - Volatile IDs prevent matching recurring states.
  6. Over-general signatures - Removing too much structure creates noisy triggers.

Reference


Skill Metadata

Created: 2026-06-02

Version: 1.0.0

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.