← Back to library

Have Devin audit each day's merged UI code and file tickets

Cognition uses its own agent from chat, the tracker and the command line, merging 659 agent pull requests in a week. Each morning Devin scans the previous day's merges for hardcoded colors, odd spacing and components that skip the shared library; tickets follow. A triage playbook reads new bug reports, checks git history and logs, and posts a root-cause summary.

  • OutcomeCatch design-system drift every morning and get a pre-investigated root cause on new bug tickets before an engineer picks them up.
  • SetupAn afternoon+
  • LevelAdvanced
  • CreditThe Cognition Team
View original
Works with
Custom agent

Published Oct 23, 2026Updated Oct 23, 2026AI dry run on sample input: passed Oct 23, 2026Source verified Oct 23, 2026

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?

  1. Index the reposConnect the codebases so the agent can search and answer questions about them.
  2. Schedule the sweepEvery morning, review the last day's merged changes against your design rules.
  3. File one ticket per issueOpen a tracker item per finding, plus a fix where it is trivial.
  4. Encode bug triage as a playbookMirror how engineers investigate: read the report, find code paths, check history, summarize.
  5. 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.

Prompt0 variables
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?
Anyone in the company can tag the agent in chat and get a pull request to review, without setting up Git.
What triggers triage?
Tagging a ticket as a bug starts the playbook on its own.

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.

More in Operations & Admin

All 203 Operations & Admin playbooks →

Related playbooks

Operations & AdminWorkflow✓ AI dry run

Add a merge check for every way coding agents break code

Keep a running list of the specific ways coding agents have damaged your repository, from hollow tests and invented fake responses to deleted files and silenced type errors, and turn each one into an automated gate that blocks the merge, so the same mistake cannot slip through review twice.

Credit: u/alexmarquardt on r/ClaudeCode

An afternoon+
Operations & AdminPrompt✓ AI dry run

Give your agents one shared wiki that only one agent edits

Replace scattered agent memories with a single Markdown wiki in git: every agent reads a short daily brief from it, agents and scripts file sourced notes into an inbox instead of editing pages, one steward agent checks and merges those notes each morning, and private agent memory keeps only personal preferences.

Credit: Siim Tolk

An afternoon+