Coding agents inside guardrails first, then AI features with bounded tools, traces and a kill switch.
The developer owns the code they ship, whoever or whatever typed it. AI (artificial intelligence) changes this role in two ways. First, a coding agent joins the work, and it must work inside guardrails that the developer did not have to think about before. Second, the developer starts to build products that contain a model, and those need controls that ordinary features never needed.
A coding agent can write a change; it cannot approve one. Numbers on this page are illustrative.
Guardrails first, agent second. Set up the instructions file, scoped context, secret blocking and protected paths before the first delegated task, then let the CI (continuous integration) pipeline and branch protection enforce what the agent might skip.
1. At a glance
Item
Developer
Mandate
Deliver correct, maintainable changes through the normal pull request path, with a coding agent inside guardrails, and build AI features that stay bounded, observable and switchable off
Primary decision
What goes into each change: reuse, extend or create, the domain invariants it must hold, and whether a draft from the agent is good enough to put up for review
First safe win
Stage 2 in one repository: a reviewed instructions file, secret blocking, protected paths and the reuse advisory, with the first reuse decision record merged
Biggest failure mode
Large agent-written diffs that nobody can review, merged on trust, with a secret or a duplicate date helper inside
Works mostly in one service or library; owns its tests, its catalog dependencies and its part of the reuse decision
Full-stack developer
Changes span user interface and service; the same guardrails apply on both sides, and display rules (such as formatting the cutoff) must use the shared library on the client too
Shared by both
The requester of an agent task counts as the author; a second developer approves; nobody merges their own change
2. Your journey: first steps to fully adopted
The developer moves from asking the assistant to explain code to delegated changes inside enforced guardrails; each stage adds controls and evidence, never the right for an agent to approve.
Start here: your first steps
Complete acceptable use and install the approved tool configuration for your repository.
Merge a reviewed instructions file, with secret blocking and protected paths turned on.
Turn on the reuse advisory, and merge your first reuse-decision.yaml.
Ask the agent for unit tests from the acceptance criteria and the temporal test matrix, then check each case.
Fully adopted: how the work runs
Moment in the work
Before AI
Fully adopted (Stage 4–5)
Decision that stays human
Story to code
The developer types every line; helpers are copied from other repositories
After the catalog query, the agent drafts the change from the accepted story in a sandbox with synthetic data
Reuse, extend or create; and whether the draft is good enough to put up for review
Review
One reviewer skims a large diff
Small diffs with a trace link and a reuse record; an agent comments first; a second developer reads every line
Approving the merge; the requester never approves their own change
CI
Checks catch builds and some tests
CI enforces banned patterns such as new Date(dueDate), secret scan, licence scan and the test matrix; the agent fixes failing checks in the sandbox within retry and spend limits
Changing or weakening a check: a code owner reviews
Production
Big-bang release
Per-channel flags roll out web, then mobile, then notifications; traces and a tested kill switch are in place
The release manager approves the change; a person decides to use the kill switch
Production fix
Debugging by hand, sometimes with copied production data
The agent reproduces the bug with synthetic data and drafts the fix through the same pull request path
Refusing production customer data, and responding to a leaked secret
What changes for the organization
Before
After
Each team keeps its own date helper, and they drift apart
One shared library is reused, and CI blocks new duplicates
Agent code is merged on trust, or banned outright
Agent code enters through the same reviewed pull request path as human code
Review is a hidden bottleneck
Review time is planned, and rework and change failure rates are measured
In any organization
Who covers it: in a small or unregulated organization, one or two developers and a lead do this work; a second person still approves every merge.
What scales: sandboxes, evaluation sets and code-owner rules can shrink to simple repository settings. What never drops: human approval of every merge, no secrets or customer data in unapproved tools, and a kill switch for any AI feature.
Domain invariants in code (date-only versus instant)
Own the implementation; the architect owns the contract
Temporal-domain contract, acceptance criteria
Architect
Yes
Put an agent draft up for review
Own
The diff, test results, trace, your own reading of every line
Tech lead
Yes
Approve a colleague's pull request
Own, when you are not the author or the requester
Diff, CI result, decision record
Tech lead; code owner
Yes
Scope of the agent's context
Own within the team's instructions file
Repository layout, data classification
Engineering manager
No (the team sets it; you apply it)
Tool scopes for an AI feature
Advise; the architect and AI engineer design, security challenges
Reference pattern, threat model
Security
Yes
Report a near miss (secret, restricted data, unsafe suggestion)
Own
What you saw
Security; enablement lead
Yes
4. Two kinds of adoption
Kind
What it means for the developer
Example on this site
How you work with AI
A coding agent explains code, drafts changes and tests, and reviews pull requests, inside guardrails set by the team and enforced by CI (continuous integration)
The agent drafts the notification-service change; CI fails it on new Date(dueDate); the developer fixes it with LocalDate
What you build that contains AI
Product features that call a model: bounded tools, authorization at execution time, structured outputs, idempotency, traces, a fallback and a kill switch
The integration of the internal policy assistant into the contact-center desktop
Coding agents inside guardrails
Set these up before the first delegated task. Some are advisory (they guide the agent and can be skipped). Some are enforced (they run whether or not anyone used an agent). See reuse first for the full layered design and tools for how each tool names these features.
Guardrail
What it does
Enforced or advisory
What it does not catch
Instructions file
Standing rules: domain types, the catalog query, protected paths, commands to run
Advisory (the model reads it, and can ignore it)
Anything the model misreads; rules that must hold go into CI too
Scoped context
The agent sees only the repository and folders the task needs; no production configuration, no customer data
Enforced by workspace and access settings
Sensitive data already committed to the repository
Secret blocking
Blocks reading .env and key files; a pre-commit scan and a CI secret scan stop secrets in diffs
Hook advisory; CI enforced
Secrets in unusual formats; a leak still needs rotation
Protected paths
Pipeline configuration, branch rules, database migrations and the instructions file itself need a code owner's review
Enforced by code-owner rules and branch protection
A harmful change outside the protected list
Reviewable diffs
One concern per pull request; a size limit (illustrative: 400 changed lines) unless the reviewer agrees
Team policy; CI can warn
A small diff can still be wrong
Reuse decision
reuse-decision.yaml in the pull request: reuse, extend or create, with the reason
CI checks it exists; the reviewer checks the reason
It cannot prove no duplicate exists elsewhere
Provenance and licence
SBOM (software bill of materials) entry and licence scan for every new dependency; the pull request notes AI involvement
CI enforced
Copied code without a dependency
Tests
The temporal test matrix and unit tests run on every change
CI enforced
Cases nobody wrote down
When the product contains AI
These controls belong in the code, not in the prompt. A prompt is a request to the model; the code decides what actually happens.
Control
What you build
Policy assistant example
Bounded tools
Each tool does one thing, with typed parameters and an allow-list; no general "run query" tool
search_policy(question, max_results), read-only
Authorization at execution time
The tool checks the end user's entitlements when it runs; the model's request is never the authorization
Retrieval filters documents by the staff member's role
Structured outputs
The response must match a schema; invalid output is rejected and the fallback is shown
answer, citations, abstained, reason
Idempotency
Any write tool takes an idempotency key, so a retry never acts twice
Not used: the assistant has no write tools. A future "add case note" tool would need it (hypothetical)
Evaluation hooks
Every response records prompt, model, index and tool versions, so evaluation and monitoring can join on them
Version ids written to the trace
Traces
One trace per request: input, retrieved sources, tool calls, output, versions
Kept under the records rule
Fallback
On timeout, invalid output or abstention, show the non-AI path
"Open the policy library" link with the search pre-filled
Kill switch
A feature flag turns the feature off per channel within minutes; tested
Assistant panel hidden; fallback link stays
A tool definition with its permission scope, as the developer would commit it (illustrative):
The x-permission block is read by the team's own tool router, not by the model. The router refuses the call if the signed-in staff member lacks the scope.
5. Your ladder
Stage
AI use
Guardrail
Artifact or evidence
Decision relationship
Step-down trigger
0 · Foundations
None. You complete acceptable use and get the approved tool configuration
Approved tool, cleared configuration, data rules known
Attested acceptable use
Engineering manager confirms access
Not applicable
1 · Personal productivity
Explains code to its author, suggests a unit test; you type or paste every change
Approved coding assistant; no secrets or customer data in prompts
Local change through the normal pull request
A second developer approves
Tool or data terms change
2 · Team context
The agent works from the team instructions file and gets the reuse advisory before writing a helper
Secret blocking, protected paths, reuse advisory; CI blocks new Date(dueDate)
Reuse decision record
The reviewer checks the record; the architect reviews "extend" and "create"
Secret or policy findings rise
3 · Delegated tasks
The agent drafts a whole change as a pull request from an accepted story; another agent comments on reviews
Evaluation set per task with a threshold on every risk slice; trace; sandbox; review time planned
Pull request with trace link and test results
Requester is the author; a second developer approves
Evaluation falls below threshold, or rework rises
4 · Agentic workflows
The workflow runs story → branch → pull request → CI and fixes failing checks in the sandbox
Least-privilege tools, no production credentials, spend limit, kill switch, recovery tested
Pull requests, CI runs, traces, a draft change record
Independent reviewer approves each merge; the release manager approves the change
Model or provider change: step down to Stage 2 for that task
5 · Scale and sustain
You contribute skills, prompts, hooks and catalog assets that other teams use
Material-change review for shared assets; owner named
Catalog entries you own
Catalog owner approves; consumers are notified of changes
A shared asset you own causes a regression elsewhere
Stays human-operated at Stage 5: approving a merge, deciding to create a new shared asset, and responding to a leaked secret (rotation, report, clean-up). An agent may draft the steps; a developer with the authority does them.
6. Priority scenarios
Scenario
Value
Risk tier
Stage
First step
Do not use AI when…
Explain legacy code
Faster onboarding
Medium (proprietary source)
1
Ask for an explanation with file and line references; check each
The code handles secrets and the tool is not cleared for them
Generate unit tests
More cases, fewer gaps
Medium
2 to 3
Give the agent the acceptance criteria and the temporal test matrix
The agent writes both the code and the only tests for it, with no human-written cases
Draft a change as a pull request
Cycle time falls
Medium
3
One accepted story, one repository, sandbox only
The change touches protected paths without a code owner's review
AI review comments
Earlier findings
Medium
3
Agent comments; the human reviewer decides
Its comments replace the human approval
Migrate callers to a shared library
Duplicates removed
Medium
3 to 4
One channel at a time, behind a flag
The migration would also change behavior nobody specified
Fix failing CI checks
Less waiting
Medium
4
Sandbox, retry limit, spend limit
The fix would weaken or disable the check
Reproduce a production bug
Faster diagnosis
Medium
2
Synthetic data that matches the failing shape
It needs production customer records; that is prohibited
7. The due-date ask from your seat
The developer carries the change from accepted stories to merged pull requests. The full story is in the worked example.
Step
What happens
Who decides
Evidence
1 · Read the inputs
Stories US-1 to US-5, the temporal-domain contract v1 and the shared-datetime catalog entry
You understand them before any agent task starts
Story links in the pull request
2 · Query the catalog
The instructions file sends the agent to the catalog; the advisory hook returns shared-datetime 4.2 with LocalDate and formatInstant, but no function to format the payment cutoff
You choose
Hook event in the trace
3 · Record the decision
Extend: add the display-only formatPaymentCutoff(cutoffInstant, customerZone); reuse LocalDate and formatInstant. The cutoff instant comes from payment-schedule-service, which alone computes it; the channel never calculates it
You record; the architect reviews; the library owner approves the extension
reuse-decision.yaml
4 · Delegate the draft
The agent drafts the notification-service change in the sandbox with synthetic data
You request; you are the author for review purposes
Pull request plus trace
5 · CI catches the trap
The banned-pattern rule fails on an old new Date(dueDate) call
The rule decides; you fix with LocalDate.parse
Failed then passing CI run
6 · Hold the source
payment-schedule-service stays read-only; the agent's credentials cannot write to it or to profile-service
Platform and architecture set the boundary
Access configuration
7 · Prove it
Test matrix T1 to T13 runs, including the DST (daylight saving time) weeks, the no-DST zone and the late-evening render
QA engineer signs the test evidence
CI and evaluation store
8 · Ship behind a flag
Per-channel flag: web, then mobile, then notifications; statements from the next cycle
A second developer approves each merge; the release manager approves the change
Approvals; change record
A negative path you will meet. The agent suggests pasting production customer records into an unapproved tool "to reproduce the bug." You refuse, use synthetic data and report a near miss. The egress policy would also block the tool; your report is what lets the team improve the instructions file.
8. Hand-offs and separation of duties
Direction
What
With whom
You give →
Pull requests with decision record, tests, trace link
Separation of duties. When a coding agent opened the pull request, the person who asked the agent is the author. That person cannot approve it. Branch protection enforces this, not the agent's own settings.
9. Evidence and records
Evidence
Produced or consumed
System of record
Retention owner
Pull request with AI involvement noted
Produced
Repository
Repository retention rule
Reuse decision record
Produced
Pull request
Team
Agent trace for each delegated task
Produced
Trace store
Platform
CI run (banned patterns, SBOM, licence, tests, secret scan)
Your AI feature passes the AI engineer's evaluation set and a tested kill switch
11. Measures and incentives
The developer is evaluated on changes that stay correct, not on lines or pull requests produced with AI.
Metric
Definition
Anti-gaming note
Rework rate
Merged changes that need a fix within 30 days ÷ merged changes
Splitting fixes into "new features" hides rework; link fixes to causes
Change failure rate
Changes that cause an incident or rollback ÷ changes released
Do not lower it by releasing less often
Reuse rate
Changes touching a catalogued capability that reuse or extend
A "reuse" record the reviewer rejected does not count
Secret and policy findings
Findings per 100 pull requests, by type
Should fall; never by disabling scanners
Review turnaround
Hours from ready-for-review to decision
Fast approvals of large agent diffs are a warning, not a win
Near misses reported
Count per quarter
Never penalize reporters; a fall to zero is suspicious
12. Cost, capacity and workforce
Item
What to plan
Review time
Agents draft faster than people review. Protect review time (illustrative: a fifth of team capacity at Stage 3)
Agent spend
Delegated tasks have a spend limit per task and per day, set with platform
Skills
Reading and judging generated code becomes the core skill; plan lab time, not only licences
13. Anti-patterns and stop conditions
Anti-pattern or trigger
What it looks like
What to do
Merge on trust
A large agent diff approved after a skim
Split it; review every line you approve
Prompt as a control
"The prompt tells the model not to write to production"
Remove the write path; enforce in code and access
Instructions file as policy
A rule exists only in the instructions file
Add the CI check or protected path too
Agent weakens the check
The agent "fixes" CI by skipping a test or a rule
Revert; protected paths cover CI configuration
Free-text model output parsed with string matching
The feature breaks on a new phrasing
Use a schema and reject invalid output
Stop: a secret reached a prompt or a diff
Scanner finding or near-miss report
Stop the task; rotate; report; review the instructions file
Stop: evaluation below threshold
The delegated task fails on a risk slice
Step down for that task; fix; re-run
Stop: model or provider change
Notice from the AI engineer or platform
Step down to Stage 2 for affected tasks until the evaluation set passes again
14. Action kit and 30/60/90
A starter instructions file section the team can adapt (illustrative). Lab L1 builds the full file.
## Rules for the coding agent · v1
- Before writing any helper or utility, query the asset catalog for the capability.
- Write reuse-decision.yaml for every new file under a utility path.
- Dates: the due date is date-only (LocalDate). Never parse it into a date-time.
- The cutoff is an Instant from payment-schedule-service. Never calculate it. Format it only with formatPaymentCutoff(cutoffInstant, customerZone).
- Never read .env, key files or anything under /secrets.
- Do not edit: CI configuration, branch rules, migrations, this file.
- Use synthetic data only. Never request or paste customer records.
- One concern per pull request. Note "AI-assisted" in the description.
- Run the test command before proposing a pull request.
Questions to ask your enablement lead
Which coding agent configuration is approved for this repository's data classification?
Where is the near-miss register, and who reads it?
Which evaluation set and threshold apply before we delegate a task at Stage 3?
Period
Goal
Done when
First 30 days
Stage 2 in one repository
Instructions file reviewed and merged; secret blocking and protected paths on; first reuse decision record merged
Days 31 to 60
First delegated task
One task type at Stage 3 with an evaluation set and threshold; delegated pull requests pass review without rework
Days 61 to 90
Build or harden one AI feature
Bounded tools, schema-validated outputs, traces, fallback and a tested kill switch in place; or one shared asset contributed to the catalog