When should you use it?
- Your front end has a shared component library
- Bug tickets wait hours before anyone looks
- Your tracker already integrates with an agent
Not for: Codebases with no conventions to check against; Teams without capacity to review agent tickets
What do you need, and what do you get?
You need
- Connected repositories
- Issue tracker and chat integration
- Log access for investigations
You get
- Daily tickets for each style violation
- Optional fix pull requests
- Root-cause notes on new bugs
How does it work, step by step?
- Index the reposConnect the codebases so the agent can search and answer questions about them.
- Schedule the sweepEvery morning, review the last day's merged changes against your design rules.
- File one ticket per issueOpen a tracker item per finding, plus a fix where it is trivial.
- Encode bug triage as a playbookMirror how engineers investigate: read the report, find code paths, check history, summarize.
- Feed it logsConnect your monitoring so investigations include runtime evidence.
The prompt
Our own prompt, inspired by The Cognition Team and written to work in Custom agent. Values in lime are placeholders.
Every weekday at 7am, review pull requests that landed in [repo] since yesterday morning. Flag hardcoded colors, spacing values outside our scale, and UI elements that should use components from [library]. For each finding, open a ticket with file, line and the suggested replacement. Do not change code unless I ask. Post a one-paragraph summary in [channel].
Inspired by The Cognition Team: How Cognition Uses Devin to Build Devin. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.
What can go wrong?
- A noisy audit trains people to ignore tickets; start with a few strict rules.
- Triage summaries are hypotheses; an engineer still confirms the fix.
Our take
The Cognition Team writes about its own product, so read with that in mind, but the two routines are easy to copy with any capable agent. A morning sweep of the previous day's merges for hardcoded colors, odd spacing and components that skip the shared library is a low-risk, high-signal start, because those violations are objective. Filing one ticket per issue keeps the backlog actionable instead of one giant dump. For bug triage, keep the playbook short and aligned with how your best engineer actually debugs: check git history, logs and recent deploys, then post a root-cause summary for a human to confirm. Measure how often the suggested root cause turns out right before trusting it more widely. Index the design tokens and component library so the agent has a concrete reference. Do not auto-open fix pull requests until the tickets have proven accurate for a couple of weeks. Review the sweep's false-positive rate monthly and tighten the rules.
Where the time goes back: Routine checking and first-pass investigation happen before the workday starts, so engineers begin with findings.
FAQ
Who can request changes?
What triggers triage?
Source and credit
Inspired by The Cognition Team. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.
- Inspired by
- How Cognition Uses Devin to Build Devin
- Creator
- The Cognition Team
- Published on
- cognition.com
- Original date
- Feb 27, 2026
- License
- Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
- Originally for
- Custom agent
- AI dry run
- Oct 23, 2026: passed. Dry-run tested by our AI test agent on sample input. PASS: Gates held on desk check; no live sends or purchases.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails. - Verified
- Oct 23, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.
Are you the creator? Claim or correct this page.