Trajectory Editor

Load a .traj file to get started

Keyboard Shortcuts

Next stepj or ArrowDown
Previous stepk or ArrowUp
SaveCtrl+S
SearchCtrl+F
Close dialogEscape

Enhancement Guide

The Golden Rule

Explain WHY, not just WHAT. Every step should show expert-level reasoning about the decision being made.

Enhancing THOUGHT / REASONING

This is where most of your work goes. Turn generic statements into expert reasoning.

BAD (original)
Let me look at the main classes mentioned in the PR description:
GOOD (enhanced)
The prompt mentions two key classes: ChessGame (where I need to add the PGN constructor) and MoveValidator (where I need to add findPiece). Before writing any code, I should understand how the existing makeMove() method works, what coordinate system the board uses (the prompt mentions 0-7 indexing), and how MoveValidator.possibleMoves() resolves moves. Let me start with ChessGame since that's where the constructor will live.
BAD (original)
Now let me check the test files to understand what's expected:
GOOD (enhanced)
Before implementing anything, I should read the test files. They'll tell me the exact method signatures expected, what exceptions should be thrown, and what edge cases I need to handle. The tests are my contract — if I satisfy them, the implementation is correct.
BAD (original)
(empty — no reasoning at all)
GOOD (enhanced)
Now I have a complete picture of the MoveValidator class. It currently has possibleMoves() which returns valid destination squares. For findPiece(), I need to work backwards — given a destination and piece type from SAN, find which piece can make that move. I'll iterate through all pieces of the given color and type, check which can reach the destination, then apply disambiguation if multiple candidates exist.

Key Principles for THOUGHT


When to DELETE Steps

After deleting, make sure surrounding steps still flow logically. You may need to edit the next step's thought to bridge the gap.


When to ADD Steps


Handling the Agent's Fix

If the agent passed tests: Focus on enhancing reasoning. Small improvements to tool calls are fine if you spot them. Your Guided Patch = the agent's .patch file.

If the agent failed tests: Use the Ground Truth Patch to understand the correct fix and adjust the final steps to lead there. Delete wasted steps where the agent went in circles. Your Guided Patch = the Ground Truth Patch, or your own fix if you wrote one.

Writing your own fix: If you can write a better fix — especially when the agent went completely off track — you're free to do so. Use your best judgement as a software engineer. The ground truth is a reference, not a strict requirement. Your Guided Patch = your git diff output.


Ideal Trajectory Flow

  1. Understand the problem (read prompt, identify requirements)
  2. Explore the codebase (read relevant files)
  3. Plan the approach (reason about design decisions)
  4. Implement the solution (write/edit code)
  5. Verify (run tests, check output)

LLM Helper Buttons

The editor has two buttons that copy prompts to your clipboard. Paste into any LLM (ChatGPT, Claude, etc.) and copy the result back.


Pre-Save Checklist