I stopped writing the code. I did not stop being the engineer.
Production AI systems · Operating model
What you will leave with
Create a bounded task brief, an isolated implementation lane, and a verifier that checks the deployed artifact.
What you will build
One small control loop with evidence at every boundary.
- 01BriefScope and acceptance contract.
- 02Worker laneA bounded implementation surface.
- 03CI wallType, test, build, drift, and permission checks.
- 04Staging deployThe real artifact, not a local assumption.
- 05CanaryScreenshots, links, and data freshness fail loudly.
Build it in sequence
Write the contract before dispatch
Make scope, exclusions, evidence, and stop conditions explicit. The worker may choose implementation details; it may not choose the product direction.
# Outcome
Remove the fabricated engagement count from every article.
## May change
- Article UI and tests
## Must not change
- Published article copy
- Analytics configuration
## Evidence required
- Search returns zero matches for the old label
- Production build passes
- Staging HTML does not contain the fabricated count
## Stop and ask
- Any real count source is discovered
- Work requires a database or tracking changeTeaching template. The production repository stores the resulting implementation and evidence, not a reusable orchestration framework.
Give independent work an isolated lane
A worktree makes the ownership boundary physical. Parallel agents can run without sharing uncommitted files or silently overwriting one another.
git worktree add ../lane-remove-metric -b task/remove-metric
cd ../lane-remove-metric
npm ci
npm testRun the same wall every change must pass
The production workflow does not stop at unit tests. It runs typechecking, tests, the framework build, duplication, database type drift, permission snapshots, and path-scoped end-to-end checks.
jobs:
verify: # lint changed files, typecheck, tests, production build
duplication: # token-based copy-paste ratchet
type-drift: # rebuild schema and diff generated database types
permission-snapshot: # prove protected grants remain denied
e2e-filter: # decide whether the full browser suite must run
e2e: # path-scoped end-to-end verificationVerify the deployed artifact with the real canary pattern
After a successful staging deploy, a separate workflow runs Playwright against staging. It checks screenshot baselines, link destinations, HTTP failures, gate misroutes, and freshness of live data.
name: Post-deploy Canary
on:
workflow_run:
workflows: ["Deploy Staging"]
types: [completed]
jobs:
canary:
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npx playwright install --with-deps chromium
- run: npx playwright test --config playwright.canary.config.tsMake the canary fail loudly on the wrong surface
The helper treats a 4xx response or a bounce to the staging share gate as a failed release. It never screenshots the password page and reports green.
export async function gotoGated(page: Page, path: string) {
const response = await page.goto(path, { waitUntil: 'networkidle' })
const status = response?.status() ?? 0
if (status >= 400) {
throw new Error(`Canary: ${path} returned HTTP ${status}`)
}
if (new URL(page.url()).pathname === '/staging-gate') {
throw new Error('Canary: share-gate cookie was not honoured')
}
}Definition of done
- The task says what is out of scope.
- The worker runs in an isolated lane.
- CI checks the implementation.
- A separate script checks staging.
- The evidence step fails when the old behaviour is reintroduced.
What breaks and what it means
The verifier passes locally but fails in CI.
Log the resolved URL and status. Deployment hooks often provide a preview URL, not the canonical domain.
The page is cached.
Assert a build-specific marker or add a cache-busting query; do not weaken the check to “eventually maybe.”
Questions, corrections, and useful disagreement
Sign in with GitHub to join the conversation. Comments are public. Article views are anonymous and counted once per browser, per article, each day.