Materials / Adoption

Pilot templates: git baseline script, baseline table, AI policy, task spec, edit log, launch letter

Everything a first pilot needs on paper, ready to copy: a script that reads your baseline delivery figures from git, a table to track them, and Markdown templates for the policy, the task spec, the weekly review of manual edits and the letter that tells the team what is about to happen.

10 min read2 Dec 2026Ilia Poliakov

Which template, when

The templates follow the stages of the 13-week adoption plan. Each is meant to be edited: replace the bracketed parts, delete what does not apply, keep it short.

StageTemplateWho uses it
The decision to run a pilotLaunch letter, AI-use policySponsor, security, legal
Weeks 1–2, diagnosisGit baseline script, baseline table (Start column)Harness owners, team lead
Weeks 3–4, first harnessTask spec, AGENTS.md templatesSpec author, harness owners
Weeks 6–12, run and adjustManual-edit review log, baseline table (Week 6 column)Team lead, harness owners
Week 13, reviewBaseline table (Final against Start)Sponsor, team

The git baseline script

A pilot without a "before" cannot show an "after". Most of the before is already in git. git-baseline.py reads a repository's history and prints the delivery figures for a period. It needs Python 3.8 or later and nothing else: standard library only, read-only (it runs git log and reads diffs; it writes nothing), and no network unless you ask for review times with --github. It also fills the pilot's table for you, and puts the before and the after side by side.

# the last 90 days of the current branch, releases detected automatically
python3 git-baseline.py --repo ~/src/billing

# releases are tags named v*, over a fixed window, as CSV for the table
python3 git-baseline.py --repo ~/src/billing --days 90 --end 2026-11-30 \
    --releases tags --tag-pattern 'v*' --format csv > baseline.csv

# skip generated files in change sizes
python3 git-baseline.py --exclude 'dist/*' --exclude '*.min.js'

# the pilot's table with its Start column filled; at week 6, the same table
# with Week 6 added and everything already in it kept
python3 git-baseline.py --repo ~/src/billing --format sheet > pilot.csv
python3 git-baseline.py --repo ~/src/billing --format sheet \
    --column week6 --into pilot.csv > pilot-week6.csv

# before and after the pilot started on 1 September
python3 git-baseline.py --repo ~/src/billing --compare 2026-09-01

Options

OptionDefaultMeaning
--repo PATH.The repository to read.
--branch NAMEHEADThe branch whose history counts as delivered.
--days N90Length of the period.
--end YYYY-MM-DDtodayLast day of the period; fix it so a later run measures the same window.
--releasesautotags, merges or commits. auto takes tags if there are any in the period, else merge commits, else every first-parent commit. With commits there is no lead time to measure.
--tag-pattern GLOB*Which tags are releases.
--hotfix-hours H24A release followed by another within this many hours counts as a likely fix release.
--exclude GLOBlock filesFiles left out of change sizes; repeatable.
--compare YYYY-MM-DDoffThe day the pilot started: the --days before it against the days from it to --end, with the change for each figure. Releases are counted the same way in both.
--githuboffAdds time to first review and pull request open to merge, from GitHub through the gh command line. The only option that uses the network.
--formattexttext, json, csv, or sheet: the pilot's table below, with these numbers in it.
--columnstartWith sheet: start, week6 or final. With --compare, Start takes the before and this column the after (final unless set).
--into FILEnoneWith sheet: a table you already started; its other cells are kept. The result goes to the screen, so redirect it to a new file.

What it prints

What it cannot see

Git knows when code was committed and tagged, not when it reached users. So the script cannot give deploy time, the real change failure rate or recovery time: those need incident or rollback records. Review time comes from GitHub with --github; on GitLab, from its API by hand. Fill those rows of the table yourself, or leave them empty and say so: an honest gap is better than a guessed number.

The baseline table

The table comes three ways, with the same rows: in the browser, where the change and its direction are worked out as you type and nothing leaves the page; as a workbook for Excel or Google Sheets, with the changes as formulas, coloured green or red by which way is better; and as pilot-baseline.csv, which opens in any spreadsheet. Its columns are Group, Metric, Source, How to get it, Start, Week 6, Final (week 13) and Comment. Fill Start in weeks 1–2 and do not change it afterwards. Every number goes in as a number — hours, a count, a percentage — so the spreadsheet can compare the columns. git-baseline.py --format sheet writes this table with the rows it can measure already filled.

GroupMetricSource
SpeedLead time, mediangit script
SpeedLead time, 85th percentilegit script
SpeedReleases per weekgit script, or the CI deploy log
SpeedTime to first review, mediangit script with --github, or the GitLab API
SpeedPull request open to merge, mediangit script with --github, or the GitLab API
StabilityChange failure rateIncident records, rollbacks
StabilityTime to restore, medianIncident records
StabilityUnplanned fix releases, shareRelease notes, or the script's hotfix figure
ProcessChange size, mediangit script
ProcessRevert sharegit script
AIAgent changes merged without manual reworkThe weekly edit review
AIDefects traced to agent changesBug tracker, linked to the change
AIModel spend per taskGateway logs or provider bills
TeamShort survey: where time goes, what gets in the waySurvey at start and end

What a finished sheet looks like

MetricStartWeek 6FinalFinal vs start
Lead time commit → release, median (hours)926141-55%
Releases per week1.52.43.2+113%
Time to first review, median (hours)2096-70%
Change failure rate (%)12149-3.0 pp
Change size in lines, median240150118-51%
Agent changes merged without a manual fix (%)—3861—
Model spend per task—1.91.4—

Two things to read in it. Change failure rate went up at week 6 before it came down: the sheet keeps that, because a pilot that only shows the good weeks is not believed. And the AI rows have no Start, since there were no agents before the pilot; their story runs from week 6 to the final column. The whole example is on the workbook's second sheet and behind Show an example on the page.

Pull request counts and lines of code are left out on purpose: they rise whether or not anything gets better. Measuring the effect of AI explains why.

AI-use policy

One page. Have security and legal read the data section: what may leave your network depends on your contracts and on data-protection law in your jurisdiction (for example GDPR).

# Using AI agents in development

Owner: [name, role] · Last reviewed: [date]

## Why this document
We are piloting AI agents in [team]. This page says which tools may be used,
what must never be sent to them, and who answers for the result.

## Permitted tools
- [Tool 1]: available to every developer; request access from [who].
- [Tool 2]: through [the company gateway / a self-hosted model] only.
- No other AI tools are used with company code or data.

## Never send to an external model
- Personal data of customers or employees.
- Code or documents covered by an NDA or a client contract that forbids it.
- Secrets: keys, tokens, passwords, certificates.
- Other confidential business information: [examples].
Work that touches these goes to [the self-hosted model] or is done without AI.

## Responsibility for code
- The author of a pull request owns its code, whoever or whatever wrote it.
- Agent code gets the same review and the same CI checks as any other.
- Tests are not weakened or deleted to make a change pass.

## What we expect
- Try agents on your own tasks; time for this is planned in the sprint.
- Share what works and what fails in [channel].
- When an agent gets something wrong, look for the cause and propose
  a change to the rules, the checks or the spec template.

## How metrics are used
Metrics describe the process and the team. They are not used to compare
or evaluate individual people.

## Questions
[Name], [channel]. This page is reviewed every quarter and whenever
a tool changes.

Task spec

A spec is a ticket an agent can work from without guessing. The two sections tickets usually lack, Boundaries and Out of scope, are the ones that stop an agent from widening the change. See spec-driven development for how to write the criteria.

# [Short title]

Ticket: [link] · Author: [name] · Status: draft | agreed | in progress | done

## Goal
What changes for the user, in one or two sentences.
Example: customers are billed for a renewal on their own local renewal date.

## Context
- Where the code lives: [module, files]
- How it works today: [two or three lines]
- Related documents: [links]
- A similar implementation to follow: [file or pull request]

## Acceptance criteria
Each criterion is checked by a test, or says why it is checked by hand.
1. Given a customer in UTC+10 whose renewal date is the 1st,
   when the renewal job runs, then the charge is dated the 1st.
2. Given a customer in UTC-8, ... then ...
3. Errors and edge cases: [a missing time zone, a renewal on the 29th
   of February, a retry after a failed charge]

## Boundaries
Scope: one module | changes a public API | affects other teams
Do not touch: [database migrations, shared packages, configuration]
If the change needs any of these, stop and describe the plan
in the pull request before going on.

## Out of scope
- [What a reader might expect but this task does not do]

## Plan
Filled in before the work starts: the steps and the files.

## Verification
- Commands: [as in AGENTS.md: tests, lint, type check]
- Manual check: [the scenario a person walks through]

## Open questions
- [Question] (owner: [name])

Manual-edit review log

Once a week, for thirty minutes, the team lead and a harness owner go through every pull request where a person changed what an agent wrote. Each edit gets a cause and a change to the harness, so the same edit is not needed next week.

# Manual edits, week of [date]

| Pull request | What the person changed | Why the agent got it wrong | Harness change | Owner |
|---|---|---|---|---|
| [link] | Renewal date computed in UTC | No rule on time zones for billing | Rule added to AGENTS.md; test helper for local dates | [name] |
| [link] | | | | |

Causes, one per row:
- missing rule
- missing knowledge of the system
- missing CI check
- missing requirement in the spec
- other (describe)

## Totals
- Pull requests with agent changes: [n]
- Accepted without manual rework: [n]
- Harness changes made: [n] ([links])
- Causes repeated from last week: [list]

A cause that repeats usually means one of three things: the rule is too general to act on, the instructions file is too long for the rule to be noticed, or the rule should be an automated check instead.

Launch letter to the team

The sponsor sends this before the diagnosis starts. It answers the questions people will otherwise ask each other in private.

Subject: A three-month pilot of AI agents in [team]

Hi all,

Over the past months many of us started using AI tools, and individual
tasks get written faster. Our releases have not got faster. We want to
find out whether changing how we specify, check and accept work lets
the whole team deliver sooner, without losing quality.

What will happen
- Weeks 1-2: we measure how work flows today, from git and CI history,
  and look at where it waits. Nothing changes in how you work yet.
- Weeks 3-4: we write short rules for agents, a template for task specs
  and the checks that run on every change.
- [Date]: a working session where we take two or three real tasks
  through the new process together.
- After that: a short weekly review of where agents got things wrong,
  and what we change so it does not happen again.
- In about three months: we compare the figures with today's and decide,
  together, what comes next.

What matters
- During the pilot, defect-based targets for the team are suspended.
  Trying things and getting them wrong is part of the work.
- The figures describe the process and the team, never individual people.
- The goal is to deliver the same backlog sooner. Any decision about
  how the team works next is made with you, on the figures.
- The AI-use policy is attached; [name] answers questions about it.

Questions to me or to [team lead] at any time.

[Name]
[Role]

Questions

Can we measure DORA metrics without access to CI?

Partly. The git script gives release frequency, lead time from commit to release and change size from history alone. Change failure rate and recovery time need incident or rollback records, and review time needs your Git host's API.

Is the script safe to run on a working repository?

Yes. It only reads: it runs git log and reads diffs, writes nothing to the repository and makes no network calls. It is a single readable file, so you can check that before running it.

How is a spec different from a ticket?

A spec has criteria a test can check, explicit boundaries on what the change may touch, and a list of what is out of scope. Without those, an agent fills the gaps with its own guesses.

What must an AI-use policy include?

The permitted tools, the data that must never go to an external model, who answers for the code, what is expected of people, how metrics are used and whom to ask. The template above covers all six on one page.