Chapter 07 ยท Setup Guide
Set up the AI-first SDLC
Follow this guide in order, top to bottom. Every step is required unless marked optional. By the end, all seven agents are running.
๐Ÿ‘ค Who: Engineering Lead (admin) + each engineer (per-engineer section)
๐Ÿ“‹ Need: Devin Teams/Enterprise, GitHub / Jira / Teams admin
01
Prerequisites
Confirm you have everything before starting. Don't skip this โ€” you'll hit blockers mid-setup otherwise.
โ„น๏ธ
Check each item off as you confirm it. Do not proceed until all are checked.
02
Connect Integrations
Wire Devin to GitHub, Jira, and Teams. Do all three before moving on.

2A โ€” GitHub

2
Click Connect
You'll be redirected to GitHub to install the Devin GitHub App.
3
Select your organization (not "Only select repositories")
Grant access to all repositories. Devin needs read/write access to open PRs, push branches, and read repo contents.
4
Confirm the green Connected status in Devin settings

2B โ€” Jira

2
Click Connect and authorize with your Jira admin account
3
Create a Devin service account in Jira
In Jira admin: User Management โ†’ Create user. Suggested email: devin@yourcompany.com. This account is what Devin uses to post comments and update tickets โ€” so they appear as "Devin" not as you.
4
In Jira admin: create an OAuth 2.0 app for the service account
Atlassian admin โ†’ Security โ†’ OAuth 2.0 integration โ†’ Create. Scopes needed: read:me, read:jira-user, read:jira-work, write:jira-work
5
Back in Devin: click Connect service account and enter the client ID + secret
6
Create these labels in your Jira project
Go to your Jira project โ†’ Project settings โ†’ Labels โ†’ Create: devin, JAI_Agent, !write-tests, !design-review, !security-review

2C โ€” Microsoft Teams

2
Click Connect โ†’ Add to Teams and authorize for your Microsoft 365 tenant (admin consent)
3
Add the @Devin app to your dedicated Team space and channels
In your dedicated "Devin Agents" Team: click ยทยทยท โ†’ Manage team โ†’ Apps โ†’ More apps, find Devin, and add it. Then, ensure Devin is added to all seven channels: dev-runs, code-review, qa-alerts, releases, engineering, security, and incidents.
4
Test the integration
In the engineering channel, type: @Devin hello โ€” you should get a response within 30 seconds.
00
Configure Environment & Secrets
Give every session a working dev environment and the credentials it needs. Skip this and agents fail to install dependencies, run tests, or reach internal services.
โ„น๏ธ
Every Devin session boots from a snapshot โ€” a pre-built machine image. Configure it once and every Builder / Tester run starts with your repos cloned, tools installed, and dependencies ready.

A โ€” Environment (Blueprints)

1
Open Settings โ†’ Repositories โ†’ pick a repo โ†’ Configure environment
2
Choose Declarative configuration (a YAML blueprint) โ€” recommended โ€” or the classic interactive wizard
Blueprints version-control your environment and rebuild automatically. Blueprints docs ยท classic wizard
3
Define how the machine is built
blueprint.yaml (example)
install: # runs once when the snapshot is built - npm ci maintain: - npm run build test: - npm test env: NODE_ENV: test
4
Trigger a build and wait for green
The build produces the snapshot every session boots from. Re-run it whenever your toolchain changes.
โœ…
Verify: start a session and run your test command. If npm test passes with no manual setup, agents are good to go.

B โ€” Secrets

1
Open Settings โ†’ Secrets โ†’ add what agents need at runtime
Test database URL, sandbox API keys, package-registry tokens, internal service credentials. Pin each to the relevant repos. Secrets docs
๐Ÿ”’
Never put secrets in AGENTS.md, playbooks, or Knowledge โ€” those are readable context. Real credentials belong only in Secrets, scoped to least privilege (read-only / sandbox where possible).
๐ŸŒ
Internal network? If agents must reach services behind your VPN, configure it at VPN setup.
03
Enable Devin Review
Turns on automated PR review across all repos. This is what powers Reviewer.
2
Under Repositories, click the dropdown and add all your repos
Add every repo the team works in. Devin will auto-review all PRs on these repos.
3
Toggle Auto-review all PRs to ON
This triggers a review every time a PR is opened, new commits are pushed, or a draft is marked ready. If you want to start conservative, use "Auto-review Devin-authored PRs only" first and expand later.
4
Enable Insert link in PR description (default is ON, leave it)
This adds a Devin Review link to every PR description so reviewers can jump straight to the diff view.
๐Ÿ’ก
Fast review shortcut: For any GitHub PR URL, replace github.com with devinreview.com to open the full Devin Review view instantly. Share this with your team.
04
Index Repositories
Indexing enables Ask Devin, DeepWiki, and codebase-aware context in every agent session.
2
Click Index next to each repo
Indexing runs in the background and takes 1โ€“10 minutes per repo depending on size. You'll see a green status when complete.
3
Verify: open deepwiki.com and search for your repo
If indexed, you'll see auto-generated architecture docs for your repo. If not yet visible, wait a few minutes and refresh.
โ„น๏ธ
You can also trigger indexing via API: PUT /api/v3/organizations/{orgId}/repositories/bulk-index if you have many repos to index at once.
05
Create Playbooks
Playbooks are each agent's brain โ€” the instructions they follow on every run. Create all seven. Copy the prompts exactly.
โ„น๏ธ
For each playbook: go to app.devin.ai โ†’ Settings โ†’ Library โ†’ Playbooks โ†’ Create. Enter the Name, Macro, and paste the Instructions exactly.
Builder โ€” Development Agent
Implements Jira tickets autonomously
!implement
NameImplement
Macro!implement
WhereSettings โ†’ Library โ†’ Playbooks โ†’ Create
Instructions โ€” copy and paste into Devin
You are implementing a Jira ticket. Follow these steps exactly. 1. GATHER CONTEXT โ€” traverse the full chain before writing any code Read the ticket's context chain in this order, following the link from each artifact to the next. Do NOT start implementing until you have all of it: a. STORY (Jira) โ€” the ticket itself: description, acceptance criteria, comments, attachments. This is your spec. b. EPIC (Jira) โ€” the Story's parent epic: the broader goal, scope, and the definition of done the Story rolls up into. c. PRD (Confluence โ€” Product Management space, PSF) โ€” the product requirements doc linked from the Epic: user-facing behaviour, flows, edge cases, non-goals. d. ARCHITECTURE (Confluence โ€” Infrastructure and Architecture space, IAA) โ€” the design doc / ADRs linked from the PRD or repo: system boundaries, data models, constraints, decisions to respect. Engineering patterns live in Development Knowledgebase (DEVKB). e. MARKET (Confluence โ€” Product Management / PMO) โ€” the strategy / market context the PRD references: who this is for and why it matters, so trade-offs match intent. Where to read from (via MCP, follow links โ€” do not search blind): - Jira MCP for STORY and EPIC โ€” follow the "parent" / "epic link" fields. - Confluence MCP for PRD, ARCHITECTURE, and MARKET โ€” follow the document links from the Epic and PRD (spaces: PSF, IAA, DEVKB). If any link in the chain is missing, or the acceptance criteria is unclear, post a comment on the Jira ticket naming exactly what is missing and STOP โ€” do not proceed until clarified. 2. UNDERSTAND THE CODEBASE Check AGENTS.md in the repository root for architecture conventions, naming patterns, and constraints. Search the codebase for similar existing implementations before writing new code โ€” follow established patterns. 3. CHECK SKILLS List available skills with @skills. You will use @skills:test-before-pr before opening the PR. Do not skip this. 4. IMPLEMENT Cut a feature branch: feature/[TICKET-ID]-short-kebab-description Implement the feature end-to-end: - Follow existing patterns โ€” do not invent new conventions - Write unit tests and integration tests as you implement, not after - Never leave console.log, commented-out code, or TODO comments in the PR - If you discover the ticket is underspecified mid-implementation, post a Jira comment asking for clarification before proceeding 5. TEST Run @skills:test-before-pr. Fix ALL failures before continuing. Do not open a PR with failing tests. 6. OPEN PR - Title: [TICKET-ID] Short description of what changed - Description: what changed, why, and how to test it manually - Link the Jira ticket URL in the PR description - Assign 2 reviewers 7. UPDATE JIRA Post the PR link as a comment on the Jira ticket. Move the ticket status to "In Review". 8. NOTIFY Post the PR link to the dev-runs Teams channel with one sentence summarising what was implemented.
Reviewer โ€” Code Review Agent
Reviews all open PRs and triages CI failures
!review
NameReview
Macro!review
WhereSettings โ†’ Library โ†’ Playbooks โ†’ Create
Instructions โ€” copy and paste into Devin
You are performing code review on all open pull requests in the organisation. FOR EACH OPEN PR: 1. Read the linked Jira ticket and its acceptance criteria. Understand what the PR is supposed to do before looking at the diff. 2. Read REVIEW.md in the repository root. Apply every rule defined there. 3. Review the diff for: ๐Ÿšจ SEVERE bugs โ€” high-confidence issues that will cause failures in production โš ๏ธ NON-SEVERE bugs โ€” potential issues worth fixing before merge ๐Ÿ”’ SECURITY โ€” injection, hardcoded secrets, insecure token handling, missing input validation, error disclosure ๐Ÿ“Š COVERAGE โ€” flag if test coverage has dropped ๐Ÿ’ฅ BREAKING CHANGES โ€” API changes that affect downstream consumers 4. Post findings as inline GitHub review comments using this format: ๐Ÿšจ Severe: [what the issue is and why it will fail] โš ๏ธ Non-severe: [what should be fixed] ๐Ÿ’ก Suggestion: [optional improvement] 5. If CI is failing: investigate the root cause. Post a review comment explaining what is failing and why. 6. Auto-approve if: the PR only changes documentation, config files, or dependency patch versions with no API changes. Post a note explaining why it was auto-approved. AFTER REVIEWING ALL PRS: Post a summary to the code-review channel: - List each PR: author, title, status (needs attention / approved / blocked) - Flag any PRs open more than 48 hours - Flag any PRs with Severe findings that must be fixed before merge
Tester โ€” QA & Testing Agent
Nightly regression, files Defects, validates fixes after merge
!test
NameTest
Macro!test
WhereSettings โ†’ Library โ†’ Playbooks โ†’ Create
Instructions โ€” copy and paste into Devin
You are running the QA and regression suite. Follow these steps. 1. PULL LATEST Check out the latest main branch. Confirm the branch is up to date. 2. RUN TESTS Run the full test suite with coverage: npm install && npm test -- --coverage (Adapt the command to the actual package manager and test runner in use.) 3. ANALYSE RESULTS For each FAILED test, determine: - Real regression: test was passing before a recent commit that broke it - Flaky test: passes sometimes, fails sometimes, not caused by a code change 4. FILE COMPLETE DEFECTS FOR REAL REGRESSIONS For each real regression, create a Jira Defect with the FULL quality bar so Fixer can fix it autonomously. Every field is required: - Title: [Regression] [test name] failing since [commit hash] - Steps to reproduce the failure - Expected vs actual behaviour - The failing test + the full stack trace - The commit that introduced the regression (git bisect / blame) - Acceptance criteria from the original story (link the story) - Priority: 1 - URGENT if it affects a critical user-facing path, 2 - HIGH or 3 - MEDIUM otherwise - Labels: regression and JAI_Agent (so Fixer picks it up), then move it to Ready for Work For flaky tests: post a note to the qa-alerts channel only โ€” do NOT file a Jira ticket. 5. CHECK COVERAGE If any module's coverage drops below 80% (90% for auth/payments), flag it in the report. If any module is below 60%, file a 2 - HIGH Jira ticket: - Title: [Coverage] [module name] below threshold - Priority: 2 - HIGH 6. POST SUMMARY TO QA-ALERTS CHANNEL โœ… X tests passed โŒ Y failed (Z real regressions, W flaky) ๐Ÿ“Š Overall coverage: X% ๐Ÿ”ด Modules below 80%: [list or "none"] ๐Ÿ“Ž New Jira tickets: [links or "none"] 7. VALIDATOR MODE (runs after a fix PR merges to main โ€” see Automation 7F) When a fix PR merges to main and closes a Jira Defect: - For 1 - URGENT Defects: only run AFTER a human has approved and merged the fix PR - Re-run the tests covering that Defect + the failing test recorded on the ticket - If GREEN: confirm the regression is gone, close the Jira ticket, post to qa-alerts - If STILL FAILING: reopen the ticket, comment with the failure, re-assign to Fixer
Fixer โ€” Bug Fixer Agent
Fixes Ready for Work JAI_Agent Defects and opens PRs
!fix
NameFix
Macro!fix
WhereSettings โ†’ Library โ†’ Playbooks โ†’ Create
Instructions โ€” copy and paste into Devin
You are fixing a Defect to close the autonomous defect loop. Follow these steps exactly. 1. PULL THE QUEUE Find Defects labelled JAI_Agent in status Ready for Work. - 1 - URGENT Defects: you were triggered in real time โ€” fix this one now - 2 - HIGH and 3 - MEDIUM Defects: process the 7am batch in priority order 2. VALIDATE THE TICKET โ€” do not guess The ticket MUST contain all of: steps to reproduce, expected vs actual behaviour, a failing test + stack trace, the commit that introduced the regression, and the original story's acceptance criteria. If ANY field is missing: post a comment listing what's missing, move the ticket to On Hold, and skip it. Never fix from an incomplete ticket. 3. REPRODUCE Reproduce the failure locally from the steps and the failing test. Confirm you see the actual (broken) behaviour before changing anything. 4. FIX THE ROOT CAUSE Fix the underlying cause, not just the symptom. Use the regression commit to understand what changed. Keep the failing test โ€” make it pass. Do not weaken or delete tests. Respect the original story's acceptance criteria. 5. VERIFY BEFORE PR Run @skills:test-before-pr (install, lint, test, build). Do NOT open a PR if any step fails. 6. OPEN THE PR - Title: [BUG-ID] [short description] โ€” fix - Body: root cause, the fix, and how it was verified; link to the Jira Defect - Link the PR to the ticket and move the ticket to In Review - Post the PR link to the qa-alerts channel 7. HANDOFF Reviewer auto-reviews. 2 - HIGH and 3 - MEDIUM merge autonomously; 1 - URGENT waits for human approval. After merge, Tester (Validator mode) confirms the regression is gone and closes the ticket.
Shipper โ€” Release Agent
Weekly changelog, GitHub tag, Confluence, Jira close
!release
NameRelease
Macro!release
WhereSettings โ†’ Library โ†’ Playbooks โ†’ Create
Instructions โ€” copy and paste into Devin
You are performing the weekly release process. Follow every step in order. Do NOT skip any step. Do NOT proceed if a step fails โ€” post to the releases channel and stop. STEP 1 โ€” CHECK BLOCKERS Search Jira for open tickets with priority 1 - URGENT or 2 - HIGH that are unresolved. If any exist: post to the releases channel: "โš ๏ธ Release blocked: [ticket list]" and STOP. STEP 2 โ€” VERIFY CI Confirm CI is green on the main branch. If failing: post to the releases channel: "โš ๏ธ Release blocked: CI failing on main" and STOP. STEP 3 โ€” COMPILE CHANGELOG Find all pull requests merged to main since the last release tag. For each PR, retrieve the linked Jira ticket description if available. Categorise into: โœจ Features โ€” new functionality ๐Ÿ› Bug Fixes โ€” issues resolved โšก Performance โ€” speed or efficiency improvements ๐Ÿ”ง Maintenance โ€” dependencies, refactors, infrastructure STEP 4 โ€” CREATE GITHUB RELEASE Tag the release: vYYYY.MM.DD (today's date, e.g. v2026.06.13) Create a GitHub Release with the categorised changelog as the body. STEP 5 โ€” UPDATE CONFLUENCE Find the "Release Notes" page in Confluence. Add a new section at the top for this release with the full changelog. STEP 6 โ€” CLOSE JIRA VERSION Find the current sprint release version in Jira. Mark all resolved tickets as belonging to this version. Close the version. STEP 7 โ€” NOTIFY Post to the releases channel with the full changelog, the GitHub release link, and a one-sentence summary of the most significant change this release.
Maintainer โ€” Maintenance Agent
Dependencies, dead code, security audit, lint
!maintenance
NameMaintenance
Macro!maintenance
WhereSettings โ†’ Library โ†’ Playbooks โ†’ Create
Instructions โ€” copy and paste into Devin
You are performing the weekly maintenance sweep across all repos. 1. DEPENDENCY UPDATES Run: npm outdated (adapt for the package manager in use) Patch updates (1.2.3 โ†’ 1.2.4): open a PR immediately. Title: chore: update [packages] patch versions Group multiple patches into one PR per repo. Minor updates (1.2.3 โ†’ 1.3.0): open a PR with a review note. Title: chore: update [package] to [version] (minor) Add note: "Minor update โ€” review changelog for any behaviour changes." Major updates (1.2.3 โ†’ 2.0.0): open a PR, assign to a senior engineer. Title: chore: update [package] to [version] (MAJOR โ€” needs review) Include a summary of breaking changes from the changelog. โš ๏ธ Do NOT auto-merge major updates. NEVER auto-merge updates to packages touching auth, payments, or database connections โ€” always flag these for human review. 2. SECURITY AUDIT Run: npm audit (or equivalent) For each HIGH or CRITICAL vulnerability, file a Jira ticket: - Title: [Security] CVE-XXXX in [package] โ€” [severity] - Priority: 1 - URGENT for CRITICAL, 2 - HIGH for HIGH - Include: CVE ID, affected version, fix version, one-line impact assessment 3. DEAD CODE Look for: exported functions with no imports, files with no references, feature flags that are always-true or always-false. Open a PR to remove clearly unused code โ€” one PR per module. 4. LINT Run: npm run lint --fix Commit auto-fixed issues: chore: auto-fix lint issues 5. REPORT TO ENGINEERING CHANNEL ๐Ÿ“ฆ Dependencies: X patch PRs, Y minor PRs, Z major PRs (need review) ๐Ÿ”’ Security: X CVEs filed (links) ๐Ÿงน Dead code: X removal PRs opened โœจ Lint: X issues auto-fixed
InfoSec โ€” Security & Compliance Agent
Security reviews on sensitive PRs + weekly sweep
!security-review
NameSecurity Review
Macro!security-review
WhereSettings โ†’ Library โ†’ Playbooks โ†’ Create
Instructions โ€” copy and paste into Devin
You are performing a security review. This applies to PRs touching sensitive paths AND as a weekly codebase sweep. FOR PR SECURITY REVIEW: 1. Read REVIEW.md for this repository's specific security rules. 2. Check for each of the following. Flag every finding with severity: CRITICAL โ€” exploitable now, must fix before merge HIGH โ€” significant risk, must fix before merge MEDIUM โ€” should be fixed, can merge with a tracked ticket LOW โ€” informational, suggest fix Checks: - Injection: SQL, command, LDAP injection via string concatenation - Hardcoded secrets: API keys, passwords, tokens in source code - Insecure direct object references: user-controlled IDs accessing records without authorisation checks - Missing input validation: public endpoints accepting raw user input - Insecure token handling: tokens in URLs, logged to console, stored in localStorage, or short expiry not enforced - Error disclosure: stack traces or internal details in API responses - Broken authentication: JWT validation bypasses, session fixation, missing logout invalidation 3. Post findings as GitHub review comments. Format: ๐Ÿ”ด CRITICAL: [file:line] [what it is] [how it can be exploited] [fix] ๐ŸŸ  HIGH: [same format] ๐ŸŸก MEDIUM: [same format] 4. File a Jira security ticket for MEDIUM and above: Title: [Security] [vulnerability type] in [file/component] Priority: 1 - URGENT for CRITICAL/HIGH, 2 - HIGH for MEDIUM FOR WEEKLY SWEEP (no PR): 1. Scan all repos for hardcoded secrets (API key patterns, token strings) 2. Check for packages with known CVEs: npm audit 3. Review recent commits (last 7 days) touching auth or authorisation code 4. Post summary to the security channel with all findings and Jira ticket links
06
Create Scheduled Sessions
One scheduled session per agent. Go to Settings โ†’ Schedules โ†’ Create Schedule for each row.
AgentSchedule nameCronPlaybookPrompt to enterNotify
Maintainer
Maintainer โ€” Monday Maintenance 0 7 * * 1 !maintenance "Run the weekly maintenance sweep across all repos. Follow the !maintenance playbook." engineering
Reviewer
Reviewer โ€” Morning PR Review 0 8 * * 1-5 !review "Review all open PRs in the organisation that have been open for more than 4 hours. Follow the !review playbook." code-review
Builder
Builder โ€” Daily Dev Pickup 0 9 * * 1-5 !implement "Check Jira for all tickets with status 'Ready for Work' in project J1. Pick the top 3 in pickup order โ€” Priority (1 - URGENT โ†’ 2 - HIGH โ†’ 3 - MEDIUM โ†’ 4 - LOW), then ticket number, then epic number. Implement each one, opening a separate PR per ticket. Follow the !implement playbook." dev-runs
InfoSec
InfoSec โ€” Wednesday Security Sweep 0 10 * * 3 !security-review "Run the weekly security sweep across all repos. Scan for hardcoded secrets, CVEs, and recent auth-related commits. Follow the !security-review playbook." security
Tester
Tester โ€” Nightly QA 0 2 * * * !test "Run the full regression suite across all repos. File Jira tickets for real failures. Post the pass/fail summary. Follow the !test playbook." qa-alerts
Fixer
Fixer โ€” Daily Defect Fixes 0 7 * * * !fix "Pull Defects labelled JAI_Agent in Ready for Work status. Reproduce, fix the root cause, open a PR with root cause + fix details, and move each ticket to In Review. Follow the !fix playbook." qa-alerts
Shipper
Shipper โ€” Friday Release 0 9 * * 5 !release "Run the weekly release process. Follow the !release playbook exactly, stopping if any blockers are found." releases
โœ…
After creating each schedule, verify it appears under Settings โ†’ Schedules with status Active. If status is Error, re-check the cron expression and playbook name.
โš ๏ธ
J1 is the JAGGAER One project key โ€” swap it if your work lives in a different project (e.g. JADEV, AD). If you span multiple projects, list them: "in projects J1, JADEV, or AD".
07
Create Automations
Event-driven triggers that give agents real-time reflexes. Go to app.devin.ai โ†’ Automations.

7A โ€” CI Failure Auto-Fix (Reviewer reflex)

โ„น๏ธ
Use the pre-built template: Automations โ†’ Templates โ†’ "CI failure fixer"
1
Click Templates โ†’ select CI failure fixer
2
Set trigger: GitHub โ†’ Check run โ€” Conclusion: failure
Select all repos (or start with your most critical repo).
3
Set action prompt:
A CI check has failed on a pull request. Investigate the failure: 1. Read the full CI logs to identify the root cause 2. Determine: is this a real code failure or a flaky test? 3. If it's a real failure: fix the code, commit to the same branch 4. If it's a flaky test: post a comment on the PR explaining it's flaky 5. Do NOT push if you are not confident in the fix โ€” post a comment instead
4
Set Invocation limit: 10 per hour
Prevents a noisy repo from spawning dozens of sessions during a bad deploy.

7B โ€” incidents Auto-Triage (Shipper reflex)

โ„น๏ธ
Use the pre-built template: Automations โ†’ Templates โ†’ "Triage bug reports on Teams"
1
Click Templates โ†’ select Triage bug reports on Teams
2
Set channel: incidents
3
Action type: Triage Devin (persistent monitor)
This creates a persistent Devin session that watches the channel and spawns sub-agents for each incident report.

7C โ€” InfoSec PR Security Trigger

1
Automations โ†’ New automation
2
Trigger: GitHub โ†’ Pull request โ†’ opened or synchronized
3
Add condition: PR files changed contains auth/ OR payments/ OR database/
4
Action: Start session with this prompt:
A pull request has been opened that touches security-sensitive paths. Run a full security review following the !security-review playbook. Post findings as GitHub review comments with severity levels (CRITICAL/HIGH/MEDIUM/LOW). File Jira security tickets for MEDIUM and above.
5
Save and enable the automation

7D โ€” Post-Deploy Runbook Update (Shipper webhook)

1
Automations โ†’ New automation โ†’ Trigger: Webhook
2
Copy the webhook URL that appears after saving
3
Action prompt:
A production deployment has just completed. The deploy manifest is in the payload. 1. Read the payload to identify which services and files changed in this deploy 2. For each changed service, find its runbook in Confluence 3. Update the runbook to reflect any configuration, environment variable, or infrastructure changes in this deploy 4. Post a summary of what was updated to the releases channel
4
Wire your CI/CD pipeline to POST to the webhook URL on every production deploy
In GitHub Actions, add a step after your deploy step that runs:
curl -X POST [WEBHOOK_URL] -H "Content-Type: application/json" -d "{\"service\":\"$SERVICE_NAME\",\"commit\":\"$GITHUB_SHA\"}"

7E โ€” URGENT Defect Real-Time Fix (Fixer reflex)

โ„น๏ธ
Fixer's 7am schedule handles 2 - HIGH and 3 - MEDIUM Defects. This automation makes Fixer jump on 1 - URGENT Defects the moment they reach Ready for Work โ€” no waiting for the morning run.
1
Automations โ†’ New automation โ†’ Trigger: Jira โ†’ Issue updated
2
Add conditions: label is JAI_Agent ยท status is Ready ยท priority is 1 - URGENT
3
Action: Start session with this prompt:
A 1 - URGENT Defect labelled JAI_Agent has reached Ready for Work. Fix it now โ€” do not wait for the 7am run. Follow the !fix playbook: validate the ticket has steps to reproduce, expected vs actual, a failing test + stack trace, the regression commit, and the original story's acceptance criteria. If any field is missing, comment and move the ticket to On Hold. Otherwise reproduce, fix the root cause, open a PR with fix details, and move the ticket to In Review.
4
Save and enable the automation

7F โ€” Validator: resolve Defects after a fix merges (Tester reflex)

โ„น๏ธ
This is Tester's Validator mode โ€” the back half of the autonomous defect loop. It runs after a fix PR merges and resolves the ticket only if the regression is truly gone.
1
Automations โ†’ New automation โ†’ Trigger: GitHub โ†’ Pull request โ†’ merged to main
2
Add condition: PR closes a Jira Defect (linked ticket)
3
Action: Start session with this prompt:
A fix PR just merged to main and closes a Jira Defect. Run Tester in Validator mode: 1. If the Defect is 1 - URGENT, only proceed if a human approved the merged PR. 2. Re-run the tests covering this Defect plus the failing test recorded on the ticket. 3. If green and the regression is gone: close the Jira ticket and post to the qa-alerts channel. 4. If still failing: reopen the ticket, comment with the failure, and re-assign to Fixer.
4
Save and enable the automation
08
Per-Repo Files
Add these four files to every repo. Devin reads them automatically at the start of every session. Commit and push โ€” no Devin config needed.
๐Ÿš€
Quick start: Run npx --yes aayushus-skills in each repo root. The setup wizard scaffolds agent configs (CLAUDE.md, .cursorrules, AGENTS.md, and more), injects your stack choices, and optionally installs a design system, engineering guidelines, and a PM skill โ€” all in one command. The templates below are what the wizard produces; use them as a reference or skip straight to the CLI.
โš ๏ธ
The content below is a template. Customise it to match your actual tech stack, architecture, and conventions before committing. Devin takes these files literally โ€” generic instructions produce generic output.
๐Ÿ“
PR templates: if a repo has .github/pull_request_template.md, Builder fills it out automatically. To give Devin its own, add .github/PULL_REQUEST_TEMPLATE/devin.md โ€” keep it short (what changed, why, how to test). PR templates docs

AGENTS.md

Place in repo root. Devin reads this at the start of every session in this repo. Document your architecture, naming conventions, and constraints.

AGENTS.md
# Team AGENTS.md โ€” Read this before starting any task in this repo ## Architecture Conventions - Services communicate via REST externally, gRPC internally - No direct database access from the API layer โ€” use the repository pattern - All new services require an OpenAPI spec committed to /docs before coding starts - Database migrations must be backward-compatible (never drop columns, use defaults) ## Tech Stack - Backend: Node.js 20 + TypeScript 5 - Database: PostgreSQL 15 via Prisma ORM - Frontend: React 18 + Vite - Testing: Jest (unit), Playwright (e2e) - CI: GitHub Actions ## Naming Conventions - Files: kebab-case (user-service.ts) - Classes: PascalCase - Functions and variables: camelCase - Database tables: snake_case - Environment variables: SCREAMING_SNAKE_CASE ## Things You Must Never Do - Never commit secrets, API keys, or credentials to the repo - Never use `any` type in TypeScript โ€” use proper types or `unknown` - Never write raw SQL โ€” always use the Prisma ORM - Never merge to main directly โ€” always use a PR - Never skip tests to make CI pass faster โ€” fix the test ## Branch Naming feature/[JIRA-KEY]-short-description bugfix/[JIRA-KEY]-short-description chore/short-description ## Team Playbook Full SDLC operating procedure: https://aayushus.github.io/

REVIEW.md

Place in repo root. Reviewer reads this on every PR review. Define what to always look for, what to always flag, and what to ignore.

REVIEW.md
# Code Review Guidelines ## Critical Paths โ€” Always Review These Carefully - `src/auth/` โ€” any change must be reviewed for auth bypass, token handling, session issues - `src/payments/` โ€” review for injection, PCI compliance, idempotency - `src/database/migrations/` โ€” must be backward-compatible; check for destructive changes - `src/api/routes/` โ€” check input validation on every public endpoint ## Security Checks โ€” Flag Every Instance - Raw SQL string concatenation anywhere in the codebase - Any secret, token, or password-like string hardcoded in source files - User-controlled IDs used in DB queries without authorisation check - Error responses that include stack traces or internal system details - `console.log` statements containing user data or tokens ## Code Quality Checks - TypeScript `any` type usage โ€” flag every instance, suggest proper type - Functions longer than 50 lines โ€” suggest refactoring - Deeply nested callbacks (>3 levels) โ€” suggest async/await or extraction - Missing error handling on async operations - Test coverage on changed files: flag below 80% (below 90% for auth/payments) ## Anti-Patterns โ€” Flag These - Direct database access from API route handlers (bypass repository layer) - Business logic inside React components (should be in hooks or services) - Synchronous file I/O in request path - N+1 database queries in loops ## What to Ignore - `src/generated/` โ€” auto-generated files, do not review - `*.lock` files โ€” only flag if the diff looks unusual - `.github/workflows/` โ€” only flag security issues (secret exposure, etc.) - Whitespace-only changes

.agents/skills/test-before-pr/SKILL.md

Create the directory path and file. Devin invokes this automatically before opening any PR. Adapt the commands to your actual test runner.

.agents/skills/test-before-pr/SKILL.md
--- name: test-before-pr description: Run all quality checks before opening a pull request. Always invoke this before creating a PR. --- ## Pre-PR Checklist Run these steps in order. Stop and fix any failures before continuing. Do NOT open a PR if any step fails. ### 1. Install dependencies ``` npm install ``` ### 2. Lint โ€” fix all issues ``` npm run lint ``` If lint fails, run `npm run lint --fix` to auto-fix, then commit the fixes. If issues remain after auto-fix, resolve them manually before continuing. ### 3. Type check ``` npx tsc --noEmit ``` Fix all TypeScript errors. Do not use `@ts-ignore` to bypass them. ### 4. Run tests ``` npm test ``` All tests must pass. If a test was already failing before your changes, note it in the PR description but do not leave your changes untested. ### 5. Build ``` npm run build ``` The build must succeed with no errors. ### Done All steps passed. You may open the PR.

.agents/skills/implement/SKILL.md

Builder auto-discovers this and follows it when implementing tickets in this repo.

.agents/skills/implement/SKILL.md
--- name: implement description: How to implement a feature in this repo. Follow this whenever implementing a Jira ticket. --- ## Implementation Procedure ### 1. Understand before coding - Read AGENTS.md for architecture conventions - Search the codebase for the most similar existing feature to understand the patterns to follow - If anything in the acceptance criteria is ambiguous, post a Jira comment asking for clarification ### 2. Cut a branch ``` git checkout -b feature/[TICKET-ID]-short-description ``` Example: `feature/J1-123-add-user-export` ### 3. Implement - Follow existing code patterns โ€” do not invent new conventions - Write tests alongside the implementation, not after - Keep commits small and focused: one logical change per commit - Commit message format: `[TICKET-ID] short description` ### 4. Before opening PR Run @skills:test-before-pr. Fix ALL failures. ### 5. PR format Title: `[TICKET-ID] Short description of what changed` Description template: ``` ## What changed [1-2 sentences] ## Why [Link to Jira ticket] ## How to test 1. Step one 2. Step two 3. Expected result ## Screenshots (if UI change) ```
โœ…
After adding these files, commit them with git add . && git commit -m "chore: add Devin config files" && git push. Devin picks them up automatically โ€” no config in the Devin UI needed.
09
Knowledge Base
Knowledge items are org-wide context that Devin recalls automatically. Go to Settings โ†’ Knowledge โ†’ Add Knowledge for each entry.

For each entry: enter the Trigger Description (what Devin is working on when it should recall this) and the Content. Pin each one to "all repos".

1
Trigger: when designing or implementing anything involving the database
Database conventions: - Always use Prisma ORM. Never write raw SQL. - All migrations must be backward-compatible. Never drop a column directly โ€” deprecate it first, remove it in a later release. - Use database transactions for any operation that touches more than one table. - Index foreign keys and any column used in a WHERE clause on large tables. - Never run migrations in the application startup path.
2
Trigger: when working on authentication, authorisation, or security
Security conventions: - Never hardcode secrets in source code. Use environment variables only. - JWTs expire in 15 minutes. Refresh tokens expire in 7 days. - All user inputs must be validated before reaching the database or file system. - Use parameterised queries everywhere. Never concatenate user input into a query string. - Passwords are hashed with bcrypt, cost factor 12. - Failed login attempts are rate-limited at 5 per 5 minutes per IP. - Auth changes require InfoSec security review before merge.
3
Trigger: when writing tests or checking test coverage
Testing conventions: - Coverage policy (the standard the agents enforce): 80% on changed files, 90% for auth and payments modules. Below 80% is flagged on the PR; below 60% in any module is a 2 - HIGH Jira ticket. - Unit tests go in __tests__/ directories alongside the source file. - Integration tests go in tests/integration/. - E2E tests go in tests/e2e/ and use Playwright. - Test file naming: [filename].test.ts for unit, [feature].spec.ts for e2e. - Never mock the database in integration tests โ€” use a test database instance. - Use factories (from tests/factories/) to create test data, not raw DB inserts.
4
Trigger: when implementing a new API endpoint or modifying an existing one
API conventions: - All public endpoints must be documented in the OpenAPI spec at /docs/openapi.yaml before or alongside implementation. Not after. - API versioning: all endpoints are prefixed /api/v1/. Breaking changes require a new version prefix. - All endpoints must validate input using Zod schemas. - Error responses follow this format: { "error": { "code": "ERROR_CODE", "message": "Human readable message" } } - Never expose internal IDs in public APIs โ€” use UUIDs. - Rate limit all public endpoints: 100 req/min per user by default.
00
Observability
Know what the agents are doing and whether it's working โ€” tune playbooks from real session data.
1
Turn on Session Insights
Devin analyses each session and gives actionable feedback on what worked and where prompts / playbooks need work โ€” your feedback loop for improving the agents. Session Insights docs
2
Bookmark the Usage dashboard
Settings โ†’ Usage shows session volume, searches, and PR metrics. Review weekly to spot trends and tune agent behavior. How usage is metered
๐Ÿ“Š
Programmatic: the v3 metrics API (sessions, searches, PRs, active users) can feed a custom dashboard for trends over time. API overview
00
Access & Security
Decide who can do what, lock down access, and keep an audit trail. Several items below are Enterprise-plan features.
1
Scope the Devin service account to least privilege
The Jira / GitHub service user Builder acts as should have only the access it needs. Use custom roles & RBAC to limit who can change playbooks, schedules, and org settings.
2
Enforce SSO for the team
SAML / OIDC / Okta / Azure AD. SSO onboarding guide
3
Restrict access with an IP access list
Limit web app + API access to your office / VPN ranges. IP access lists
4
Know where the audit log and kill switch are
Audit logs record every agent and admin action โ€” review them when something looks off. Any running session can be stopped from Teams (EXIT) or terminated in the web app / via API. Security at Cognition
โš ๏ธ
Org-wide write access to repos, Jira, and Teams is powerful. Pair it with branch protections (agents can't merge), scoped secrets, and a habit of reviewing the audit log. Revisit permissions quarterly.
00
Traceability & Audit
Wire it once and every agent inherits it: a permanent record of what each agent did and why. The full model is in SOP ยง8 ยท Traceability & Audit.
๐Ÿงต
Durable by default. A Devin session is the richest record but the most perishable โ€” so the decision evidence is written into the artifacts that live forever (the commit, the PR, the Jira ticket), and the session is the deep-dive layer, not the system of record.
1
Adopt the commit-trailer convention
Document it in each repo's AGENTS.md so every agent ends its commits with a greppable, permanent provenance block. From a broken line: git blame โ†’ commit โ†’ session. AGENTS.md docs
Devin-Agent: Builder Devin-Session: https://app.devin.ai/sessions/abc123 Devin-Playbook: !implement@v4 Jira: J1-1234 Co-Authored-By: Devin <devin@yourorg.com>
2
Add a PR Decision Record to each repo's PR template
Create / edit .github/pull_request_template.md so every agent PR records, where humans already review: context read (Story โ†’ Epic โ†’ PRD โ†’ Architecture), approach & alternatives rejected, risk / security notes, test evidence (coverage delta + video link), and open questions for the reviewer. This is the durable home of the "why".
3
Add Jira custom fields Devin Session and Agent
So the work timeline is queryable by agent, and each status transition links back to the session that made it. Pair with the GitHub commit trailer for end-to-end correlation.
4
Set retention & redaction for logs and recordings
Session logs and video recordings can capture secrets or customer data โ€” set an explicit retention window and redaction policy, especially for InfoSec. The audit log is the forensic backstop. Security at Cognition
โš ๏ธ
Mirror human gates to a permanent surface. GitHub records PR approvals, but Teams overrides and EXIT commands are ephemeral โ€” any approval, pause, or override given in Teams must be written back to the PR or Jira ticket. "Prove a human approved this 1 - URGENT fix" has to be answerable without opening a session. Scale trace depth to risk: a lint PR needs only the trailer; an auth / payments / 1 - URGENT change needs the full Decision Record, InfoSec review, retained video, and the approval record.
10
Per-Engineer Setup
Every engineer on the team does this once. Takes 5 minutes.
โ„น๏ธ
Share this section URL with your team: each engineer completes these steps themselves. The admin setup (earlier sections) does not need to be repeated.
1
Create a Devin account at app.devin.ai
Use your work email. Your admin needs to invite you to the team org โ€” ask them to do this before you start.
2
Connect your GitHub account
Settings โ†’ Integrations โ†’ GitHub โ†’ Connect your personal GitHub account. This allows Devin to create PRs and branches as you.
3
Connect your Microsoft Teams account
Settings โ†’ Integrations โ†’ Microsoft Teams โ†’ Link your account. Your Teams email must match your Devin email. This is required to receive Devin notifications and to use @Devin in Teams.
4
Self-enroll for auto PR review
Settings โ†’ Review โ†’ Click "Add myself (@yourusername)". Reviewer will now automatically review any PR you open or are assigned to.
5
Install Devin Desktop
Download from windsurf.com. Sign in with your work account. In the Agent Command Center, connect to Devin Cloud to enable the local โ†’ cloud handoff.
6
(Optional) Install the Devin CLI for local work
A local command-line agent for quick fixes and code exploration, with /handoff to send longer tasks to cloud Devin.
curl -fsSL https://cli.devin.ai/install.sh | bash ยท Devin CLI docs
7
Bookmark these two URLs
SDLC Playbook: https://aayushus.github.io/ Devin app: https://app.devin.ai Fast PR review: replace github.com โ†’ devinreview.com in any PR URL
11
Verify Everything Works
Run these checks to confirm the full setup is working before you go live.
Test Builder: In Teams, send @Devin !implement [any small ticket key]. Within 2 minutes, Devin should respond with a session link and start working. Within ~20 min (for a small ticket), a PR should appear in GitHub.
Test Reviewer: Open a test PR in any repo. Within 5 minutes, a Devin Review comment should appear on the PR. If not, check Settings โ†’ Review โ†’ verify the repo is listed and auto-review is ON.
Test Tester: Send @Devin !test in the qa-alerts channel. Tester should respond with a session link and post a pass/fail summary within 10โ€“30 minutes.
Test Fixer: Take a complete Defect (repro, expected vs actual, failing test + stack trace, regression commit, original story AC), label it JAI_Agent, move it to Ready for Work, then send @Devin !fix [J1-KEY]. Fixer should open a fix PR and move the ticket to In Review.
Check schedules: Go to Settings โ†’ Schedules. All 7 schedules should show status Active. If any show Error, click to see the error and fix the prompt or cron expression.
Check automations: Go to Automations. All 6 automations should be enabled. Break a CI check on a test branch โ€” within 2 minutes Devin should post a fix attempt to the PR.
Test AGENTS.md: Start a session in Devin and ask: "What are the architecture conventions for this repo?". Devin should accurately describe what's in your AGENTS.md.
Test REVIEW.md: Open the Devin Review for any PR. In the chat sidebar, ask: "What are the critical review areas for this repo?". Devin should cite your REVIEW.md.
Confirm Jira โ†” GitHub link: Add the devin label to a real Jira ticket. Within 2 minutes, Devin should post a comment on the ticket with a session link and start implementing.
๐ŸŽ‰
You're set up. All seven agents are live. Share aayushus.github.io/ with the team and pin it in the engineering channel. The SOP tab in that page is your day-to-day operating reference.