Use Polygraph to make past sessions the starting point for new work.
Run the same prompt three times and you get three different implementation styles. You need an anchor that provides the solution to the same or similar problems that already exists in your organization.
Each Polygraph session is searchable, so prior work is something you can find and build on.
Start from prior art
Section titled “Start from prior art”Ask your agent to find relevant sessions:
Can you search for sessions that dealt with Stripe webhook retries?The agent searches your organization's sessions and reports the matches, each with its PRs and a one-line summary. You can also search interactively from the terminal:
polygraph session searchOnce you've found the session that did it right, anchor the new work to it:
Reference Polygraph session <session-id>. It added webhook retries to thebilling service. Apply the same approach here: same backoff strategy, sameerror taxonomy, same test structure. Flag anywhere our service can't followthat pattern and why.The agent replicates the settled approach instead of improvising a new one. The two sessions are also linked, so the next person who searches finds a pattern with two uses.
Trace a change back to its session
Section titled “Trace a change back to its session”A bug shows up in code that changed recently. Before you patch around it, find the session that made the change and understand what it was trying to do. Find the commit with git blame, then ask:
Can you search for the session that made this change? 4f9c21aIf you don't have a sha handy, describe the area instead:
Can you search for sessions that touched the signup flow recently?The result is the session that produced the change. You get the prompts, the reasoning, and the constraints behind it. Reference it from your current session and ask:
Reference Polygraph session <session-id>. Duplicate welcome emails startedgoing out this week. Summarize what this session changed and why, andwhether it could explain the duplicates.The more you record, the better it works
Section titled “The more you record, the better it works”Each session adds to the searchable record, so over time "how do we do X here" is answered by a session instead of by whoever happens to remember. New engineers, and new agents, inherit that record.