Constrain Coding Agents with Spec Docs

thegautam · x · 2026-07-14

The author shares their practice of maintaining both `product spec` and `implementation spec` in the repository, while assigning an agent via a custom skill to handle code reviews and remind the team to update the specs. Their workflow involves: - Keeping spec docs and code in the same repo - The agent checks for spec synchronization when PRs are submitted or code is modified - During human review, reading the spec first, then examining the agent's implementation intent - If discrepancies arise, updating the spec first before having the agent correct the implementation based on the latest spec However, replies to the post offer a different perspective: maintaining specs in-repo incurs high compute and maintenance costs, often turning them into mere "documentation" that can mislead the agent if it becomes outdated.

Related event: Experiment Shows Limited Value of Repo Specs for Agent Constraints(2 posts)→

Original post →

More from coding & agent

coding & agent channel →