Skip to content

Playbook

Using raia Agents in the AI Development Lifecycle

A best-practice guide to connecting raia knowledge agents with your AI coding tools — so agents brief the code, and shipped code retrains the agents.

Who this is for: engineering leaders evaluating the approach, developers and product managers adopting it, and support and documentation owners who complete the loop.

PDF

Download the playbook (PDF)

The complete AI-DLC + Agents guide, formatted for sharing with your team.

Download PDF

Open source

AI-DLC Playbook repository

Templates, skills, workflows, and a credential-free golden path you can run today.

Open the repository
01

Why faster coding alone doesn't deliver

It's tempting to treat AI adoption as a coding-speed problem. Software delivery is a system, not a coding task. Requirements → design → build → test → release → operate: value depends on the whole chain, and end-to-end throughput is governed by the slowest constraint. Speeding up the "build" box alone just moves the queue — bigger review loads, more test pressure, less stable releases.

The hidden tax in most delivery systems is waiting caused by fragmented context:

HandoffWhat creates delay
Product → EngineeringAmbiguous stories, missing acceptance criteria, unresolved decisions
Engineering → QALarge changes, thin test evidence
QA → OperationsEnvironment differences, release coordination
Production → ProductLogs, incidents, and user signals trapped in separate tools

A developer implementing refund logic today has three options: read a possibly stale wiki, interrupt a human expert, or guess. All three are failure modes we've normalized. The fix isn't faster typing — it's connected knowledge.

02

The gap: two AI adoptions that don't talk

Look at where the knowledge actually lives. What the PM knows lives in vector stores. What the codebase knows lives in git. Neither learns from the other automatically, and the cost shows up every week: interrupt-driven experts, support that lags releases, documentation that's perpetually behind, and new hires taking months to absorb tribal knowledge.

Coding agents transformed the IDE

They know the repo — they can plan, implement, review, and ship. But they know nothing about your PRDs, your policies, or your customers.

Knowledge agents transformed the business

raia agents trained on thousands of documents answer support, sales, and ops questions on every channel. But they know nothing about what's in the codebase — or what shipped yesterday.

The thesis: one closed loop

Agents brief the code. Shipped code retrains the agents. raia is the brain — centralized agents trained in raia Command, reachable from Copilot, Live Chat, Teams, the browser extension, MCP, and the REST API. The coding agent is the hands — it plans, implements, tests, reviews, and ships inside the actual repository. One principle makes this work at scale: one brain per domain, not per person.
03

The dual-model approach: two models, two jobs

Don't ask one model to be both the engineer and the librarian. The coding agent is the execution model: its context is the repo, the diff, and the session. raia agents are the knowledge model: each searches a knowledge base built from thousands of your documents, and its fixed instructions make every answer grounded, cited, and repeatable.

  • More knowledge than a session can hold Retrieval runs over the entire knowledge base; only the relevant, already-summarized answer enters the coding session.
  • Predictable by design The agent's instructions don't vary by session or developer. The same question gets the same sourced answer, every time.
  • Each side does what it's best at Code truth stays in git with the coding agent. Business truth stays managed in raia. Neither crowds out the other.

Delegation fails at both extremes. Too big — "build an e-commerce platform" — produces thousands of unreviewed lines. Too small — "write this one function" — barely saves time. The right size is a clear goal with clear limits: a small, well-defined task with a written spec, the right knowledge on tap via raia, automated checks, and a human sign-off.

04

How the two sides connect

Four connections tie raia to your dev toolchain. MCP — the Model Context Protocol — is the open standard that lets AI tools call other systems securely.

  1. 01

    In every session (live today)

    The coding agent asks, raia answers, via MCP. raia exposes each agent as a callable tool, so a coding session can query the Product or Codebase Agent mid-plan or mid-build and get a sourced answer back.

  2. 02

    After every merge (live today)

    CI sends updated docs into raia's knowledge bases. When a pull request merges, a CI job routes the changed Markdown — specs, ADRs, user docs — to the right agent's knowledge base. This is the wire that closes the loop.

  3. 03

    For status questions (next)

    raia reads GitHub and Jira (read-only) so PMs can ask "what shipped this week?" in Copilot or Teams and get a live answer.

  4. 04

    On events (next)

    Escalations and merges trigger automations in both directions — for example, a bug-shaped Live Chat escalation becomes a structured GitHub issue.

05

A walkthrough: one feature, start to finish

Here is what the loop looks like for a single feature, and exactly when the coding agent references the raia agents.

  1. 01

    Pick up the task

    A developer opens a coding-agent session on the ticket. raia is already standing by, trained on your specs, ADRs, and help docs.

  2. 02

    Plan it

    Before writing code, the coding agent asks raia: "what should this do?" goes to the Product Agent; "how does it work today?" goes to the Codebase Agent. The plan the developer reviews cites both — including constraints the developer didn't personally know.

  3. 03

    Build it

    Mid-task questions get answered without leaving the session: "what's the refund window for annual plans?" → the Product Agent returns the policy, with the source document cited. No interrupted expert, no stale wiki, no guessing.

  4. 04

    Check it

    Before merge, an automated review step summarizes the diff's behavior changes and asks the Product Agent whether it matches the agreed spec. Confirmed mismatches land as PR comments — caught at review time, not in UAT.

  5. 05

    Merge it

    The flow reverses. CI sends the updated docs to raia, all three agents learn the change, and support can answer questions about the feature the day it ships.

06

The three core raia agents

Three agents cover the entire lifecycle. Build each in Launch Pad (including its fixed instructions), train it in raia Command, expose it with the MCP Skill, and supervise its quality in Copilot.

AgentTrained onAnswers
Codebase AgentArchitecture docs, ADRs, generated references, API contracts, migration guides"Why is the code like this?" — for coding sessions, IDE chats, and new-hire onboarding
Product AgentPRDs, strategy docs, acceptance-criteria history, release notes, pricing and policy rules"What should it do, and why?" — for PMs drafting specs, plan mode, and spec review
Support & Docs AgentHelp-center articles, docs site, release notes, resolved tickets, known issuesCustomers in Live Chat, support staff in Copilot, and the weekly triage

Train them on documents you already have — this is the one-time investment, and it's measured in days. Later, you can front all three with raia's Orchestrator Skill so callers need only one endpoint and one key; don't block the rollout on it.

07

Setting up: four foundation steps

The playbook repository is the setup process. Each step is backed by a drop-in template.

F1

Stand up the agent roster

Build the Codebase, Product, and Support & Docs Agents in Launch Pad. Train them in raia Command on documents you already have. Enable the MCP Skill on each so tools can reach them.

F2

Connect the coding agent (per repository)

Commit a .mcp.json at the repo root — every session in every clone opens already connected. Then tell the agent when to consult raia, with a short section in the repo's instruction file (CLAUDE.md, AGENTS.md, .cursorrules, or equivalent).

json
{
  "mcpServers": {
    "raia-product": {
      "type": "http",
      "url": "https://api.raia2.com/mcp",
      "headers": { "Authorization": "${RAIA_MCP_KEY}" }
    }
  }
}
  • Query raia-product before planning behavior changes; query raia-codebase when the code doesn't explain why a constraint exists.
  • Treat agent answers as evidence, not authority — ask for the supporting source and verify claims against the current code.
  • Never send secrets, tokens, or raw customer data to an agent.
  • If an agent is unavailable or its answer looks stale, stop and report the gap — don't invent an answer.

F3

Connect the IDE

For engineers who live in the IDE rather than the CLI, add the same server to .vscode/mcp.json (VS Code, Cursor, and Windsurf variants are in the templates). Verify until the logs show Connection state: Running.

F4

Give PM agents eyes on the toolchain

In raia Command, add MCP integrations (client mode) on the Product Agent pointing at GitHub and Jira, exposing read-only tools. "What shipped this week?" becomes answerable in Copilot, Teams, or the browser extension.

Key hygiene

The MCP Skill key is not the Agent-Secret-Key. The MCP key goes in the Authorization header without a Bearer prefix; the Agent-Secret-Key is only for the REST API. Both are scoped per agent and rotate from Launch Pad. Keys live in environment variables and CI secrets, never in committed files.

Prove it before connecting anything live

The repo includes a credential-free golden path that exercises the complete evidence chain with a local, dry-run output. Run it before any live system is connected. Read-before-write is the rule throughout.

bash
cd examples/golden-path
npm test
npm run dry-run
08

Designing agents that complement the coding tool

The raia agents work best when they behave like a reliable answer service, not a chat partner. The instructions control how the agent answers; the knowledge base controls what it knows. Both are versioned, reviewed, and owned.

Fixed instructions — how it answers

  • Answer only from retrieved sources — cite the document and section.
  • If it isn't in the knowledge base, say so. Never improvise an answer.
  • Stay in scope — one domain per agent; route other questions onward.
  • Return synthesized answers — never raw transcripts or customer data.

The knowledge base — what it knows

  • One corpus per audience. Route content by explicit policy, never by guesswork.
  • Author knowledge as Markdown near the code; reviewed pipelines route approved sources onward.
  • Delete-and-replace on every refresh, so retrieval never surfaces stale versions.
  • Verify freshness after every refresh. A successful upload without retrieval verification is not a pass.
09

Where to engage the agents, phase by phase

The minimum operating loop has seven steps. Here is exactly who engages which agent at each one.

PhaseWho / whereHow to engage
1 · GroundPM · CopilotAsk the Support & Docs Agent for top friction points related to X, with example conversations. The evidence note links from the spec.
2 · Specify — the PRDPM · Copilot / ChatDraft the PRD with the Product Agent — it flags overlap with existing features and reuses acceptance-criteria patterns. Commit the finished spec as Markdown in docs/specs/.
3 · PlanDeveloper · plan modeThe coding agent queries raia-product (spec and constraints) and raia-codebase (prior art and rationale) before proposing an approach.
4 · BuildDeveloper · in-sessionRoute mid-task questions: business rule → Product Agent · legacy intent → Codebase Agent · real-world usage → Support & Docs Agent.
5 · ReviewAutomated · PR gateThe spec-review skill sends the diff's behavior summary to the Product Agent; confirmed mismatches land as PR comments.
6 · Refresh — the docsCoding agent + CIDocs and changelog are drafted from the diff in the same PR; on merge, changed Markdown routes to the right agent's knowledge base.
7 · VerifySupport lead · CopilotSimulations ask about the newly shipped behavior; Admin Mode confirms the new sources were retrieved. Gaps become docs tickets, not chat threads.
The pilot is successful only when one real change completes all seven steps. Start with one repository, one product area, and one small group before widening.
10

The playbook: twelve plays across three tracks

Beyond the minimum loop, the playbook defines twelve repeatable plays. Start with four — A2, A4, C1, and B1 — in a single repository, and adopt the rest as the loop proves out.

Track A · Build

A1Evidence-backed specs

PMs draft PRDs in conversation with the Product Agent, grounded in customer evidence from the Support & Docs Agent. Every spec cites at least one piece of real usage evidence.

A2Agent-briefed planning (starting four)

Never plan from ticket text alone. Plan mode interrogates the Product and Codebase Agents before proposing an approach.

A3Domain questions stay in-session

Three routing rules cover nearly every mid-task question; interruptions to human experts drop, and bad agent answers become retraining items.

A4Spec-aware review gate (starting four)

Every PR gets checked against the spec, not just the code. Deviations surface at review time, not in UAT.

A5Weekly agent-assisted triage

A scheduled session cross-references new support patterns against recent releases and files pre-investigated issues.

Track B · Support

B1Day-one support readiness (starting four)

Because the merge refreshed the Support & Docs Agent, it can answer about a feature the day it ships. The support lead verifies with Copilot simulations instead of writing content.

B2Escalation-to-issue pipeline

Bug-shaped Live Chat escalations become structured GitHub issues with repro steps. A narrow, allowlisted class of trivial fixes can get a draft PR — humans review and merge.

B3Feedback as structured QA

Operators rate agent answers as part of normal work; every low-scored cluster routes to a docs ticket, an instruction fix, or a product backlog item.

B4Internal answer desk

Sales, CS, and leadership query the same agents through the browser extension, Teams, and Copilot. One truth, many doors — nobody DMs an engineer for a known answer.

Track C · Documentation

C1Merge triggers a knowledge refresh (the keystone play)

One CI job routes changed, approved Markdown to the right agent's knowledge base on every merge, with delete-and-replace and a verification step. If you adopt only one thing from this guide, adopt this.

C2Docs written by the diff

The coding agent drafts documentation and the changelog entry from the diff, in the same PR — reviewed as one unit with the code.

C3Gap-driven docs backlog

Weekly, pull the questions the agent failed to answer, have the coding agent draft the missing pages from the codebase, and merge. The same question never fails twice.

11

Governance and safety

Present this before anyone asks. Four rails keep the system safe.

  1. 01

    Scoped keys, rotated

    Per-agent keys live in environment variables and CI secrets, never in committed files. A leak affects one agent; rotation is one click in Launch Pad.

  2. 02

    Read-only by default

    Conversational agents get read tools only. Write access lives in audited automations — and every write path is proven in dry-run mode before it's enabled.

  3. 03

    Customer data stays governed

    PII remains in raia's stores, with retention controls and immutable logs. Coding sessions receive synthesized answers, never raw transcripts.

  4. 04

    Humans gate every merge

    Automation drafts pull requests; it never merges them. The allowlisted class of auto-drafted fixes grows only as its human-approved merge rate proves out.

Fail closed

Ambiguous routing, stale state, missing review, or failed verification stops the workflow. Nothing in this system gives an AI unattended write access to production code or customer data.
12

Measuring success

Measure outcomes, not generated output. Retire "lines of code generated" as a KPI and adopt the question: are we delivering better software faster, with less risk and less friction?

SignalWhat it measuresDesired direction
Time-to-contextMinutes from "assigned" to a credible, evidence-backed planFalls sharply
Knowledge lagTime from merge to agents answering correctly about itSame day
Escalation qualitySupport bugs arriving with usable repro steps≥ 80%
Retrieval failuresAgent queries with no relevant retrievalDeclines monthly
Interrupt loadAd-hoc pings landing on engineersMigrates to agents
Mismatch catch pointWhere spec deviations surfacePR review, not UAT

Capture a baseline before setting targets, and commit to a day-90 review: widen the plays that moved their metric, and kill the ones that didn't.

13

The 30 / 60 / 90 rollout

These are review horizons, not permission deadlines — a team advances only when the current stage's evidence is complete.

Days 1–30

Foundation

Name the owners. Build the three agents on existing documents. Commit the MCP config and instruction files to one repository. Capture a baseline, and run one real change through all seven steps. Knowledge writes stay in dry-run mode until approved.

Days 31–60

Habits

Agent-briefed planning and docs-in-the-PR become convention. Enable the approved knowledge-refresh path behind a protected environment. Start the weekly failure review and the docs-gap review.

Days 61–90

Evidence-based expansion

The spec-aware gate runs on every PR. The escalation pipeline goes live, and the draft-PR class is piloted at its narrowest. Then the day-90 metrics review: widen, change, narrow, or stop — play by play.

The first 30 days are configuration, not construction: three agents, two config files, and one CI job.
14

Resources

Everything referenced in this guide ships in the public playbook repository.

  • templates/ drop-in .mcp.json, CLAUDE.md / AGENTS.md snippets, IDE configs, pilot brief, and scorecard
  • skills/spec-review/ the spec-aware review gate for Claude Code
  • workflows/knowledge-refresh.yml the fail-closed, plan-first knowledge-refresh reference
  • examples/golden-path/ the credential-free, executable end-to-end reference
  • docs/quick-starts.md first-session actions and stop conditions for each role
  • docs/governance.md the full control, metric, and maturity frameworks

Every merge makes the whole company smarter.