Lab catalogue
Every lab, on one page.
324 validated labs across 9 career tracks. Filter by what you need, then open a lab and work in a real terminal.
324 of 324 labs
Create a Project Structure
Create a project directory containing a src folder, a tests folder and a README.md. Follow the walkthrough below — every command is explained, and the validator checks what you actually built.
Find the Largest Log
Something is writing huge log files to /var/log/app. Inspect the filesystem, find the largest .log file in that directory and record it in ~/report/largest.txt. The walkthrough shows every command.
Lock Down a Secret File
Create a secrets file with restrictive permissions. Only the owner should be able to read and write it — nobody else. This is exactly how SSH private keys work.
Count Errors in a Log
The application log at /var/log/app/app-2026-09-27.log is full of noise. Use grep and pipes to count the ERROR lines and save the result.
Identify a Running Process
An application called 'app' is running on this machine. Find its PID with ps, confirm it from the command line arguments, and record it.
Write a Backup Script
A backup you have to remember to run is a backup you do not have. Write a script that archives the project directory and can only be run by its owner.
Write a Health Check Script
Monitoring is a script that reports a number instead of a feeling. Write a health check that reads the application log and prints a verdict a monitoring agent can scrape.
Trace Your Network Setup
Every container and server has an IP, a route to the outside world and a way to test reachability. Find this machine's addresses and prove connectivity to the default gateway.
Find What's Listening on Which Port
'Port 8080 is in use' is a daily incident. Use ss to list listening sockets, find the port the app process listens on and record it.
Resolve a Hostname
Before a connection is made, a name becomes an IP. Resolve lab.internal with dig, compare with /etc/hosts and record the answer.
Prove a Service Answers HTTP 200
Deploy the app image on port 8080 and then prove — with curl, not faith — that it answers HTTP 200. This combines Docker and networking; the validator makes a real request against the port.
Configure a Reverse Proxy
A reverse proxy terminates client connections and forwards them to your upstreams. Write an nginx configuration with an upstream block, a failure threshold and a proxy_pass rule.
Add a Health Check to the Proxy
A proxy is only as good as its health check. Start the application, prove it answers, and script the exact same question so the proxy can keep asking it.
Your First Commit
Initialize a Git repository in ~/project, stage every file and create the initial commit with the message 'init'. Every command is explained in the walkthrough.
Ship a Feature Branch
The daily Git loop: branch, commit on the branch, merge back to main. Create a branch called 'feature', commit on it and merge it into main.
Connect to a Remote
Local commits are only half the story. Add GitHub as a remote and push your branch. In this lab the push is simulated — the workflow is identical to the real thing.
Revert a Bad Commit
A teammate committed a bug and you need main clean again — without rewriting history that others already have. Undo the last commit with git revert, which adds an inverse commit.
Write a .gitignore That Actually Works
A .gitignore is a list of patterns, not a list of files - one line can cover a thousand files. Create a repository with rules for environment files, logs and build output.
Use Conventional Commit Messages
Commit messages are read by humans and by release tooling. Learn the type prefix convention - feat for features, fix for bugs, chore for everything else.
Deploy the Application as a Container
A simple HTTP application image (app:latest) is already pulled on this machine. Deploy it as a container so it is reachable on port 8080. The walkthrough shows the exact commands and what every flag does.
Build Your Own Image
Instead of consuming images, make one. Write a Dockerfile, build it with a tag and run a container from your own image.
Capture Container Output
Run the app, capture its logs into a file with shell redirection and verify the port it listens on. Reading container output is the first step of debugging any container.
Clean Up Containers and Images
Leftover containers and images eat disk on every real machine. Stop the running app, remove its container, then remove the image itself — and prove it's gone.
Untangle a Port Conflict
Staging needs its own copy of the app, but production already owns host port 8080 — and publishing a second container onto a busy host port fails with 'port is already allocated'. Prove who owns 8080, find a genuinely free port and give staging its own front door.
Run the Container as a Non-Root User
Containers are often root on the host's behalf, which turns any bug into a host bug. Build an image that creates an unprivileged user and switches to it before the app starts.
Build a Multi-Stage Image
Build tools do not belong in a runtime image. Use two stages - one to compile, one to ship - so the final image only carries what the application needs to run.
Write Your First GitHub Actions Workflow
A pipeline is a file in the repository — that's the whole trick. Create the exact directory layout GitHub Actions expects and write a workflow that runs on every push.
Run Tests in the Pipeline
A pipeline that only checks out code proves nothing. Extend the workflow so it installs dependencies and runs the test suite on every push.
Build and Push a Docker Image in CI
The final pipeline stage for most services: build an image and publish it to a registry. Extend the workflow with Docker build and push steps.
Guard the Deploy Secrets
A deploy workflow needs AWS credentials — and pasting them into the YAML is how leaks happen. Write a deploy workflow that reads its keys from GitHub Secrets, then record the secret inventory in a checklist file so the next engineer knows what exists and where it lives.
Add an Approval Gate to a Deployment
Production deployments should need a human. Extend a pipeline with a manual trigger and an environment that requires approval before anything ships.
Build a Version Matrix
One pipeline, many versions. Declare a matrix strategy so every job runs once per Python version and the matrix grows without editing the file.
Verify Your AWS Identity
Before touching any AWS service, always confirm who the CLI is acting as. Misconfigured credentials are the #1 cause of 'why can't I access anything'.
Create a Bucket and Upload an Object
S3 is the storage everything else leans on: backups, static sites, Terraform state, ML datasets. Create a bucket, upload a file into it and list what's inside.
Launch an EC2 Instance
EC2 is AWS's virtual machine service. Launch an instance from an AMI, confirm it's running, then terminate it — the full lifecycle in one task.
Upload a Build Artifact
Every CI run produces things worth keeping — test reports, build logs, binaries. Write a build report to disk, create a bucket for artifacts and upload the file with aws s3 cp.
Write a Least-Privilege IAM Policy
AdministratorAccess is not a starting point. Write a policy that grants exactly two S3 read actions on one bucket and nothing else.
Document a Key Rotation Runbook
Keys outlive the people who created them. Write the script that creates a replacement key, deploys it and revokes the old one - in that order.
Write Your First Configuration
Terraform turns .tf files into real infrastructure. Write a configuration that declares an S3 bucket, initialize the provider and generate a plan — the read-only preview every change should start with.
Apply the Configuration
terraform apply executes the plan and writes what it created into terraform.tfstate — the file Terraform uses to remember what belongs to it.
Destroy It All
The most underrated Terraform command. Destroy everything the module created and confirm the state is empty — the same reflex that keeps cloud bills at zero.
Wire Up a Bucket Module
Copy-pasted .tf files do not scale — teams package resources into modules and call them once per environment. Lay out a bucket module, wire the root configuration that calls it, then init and apply so the bucket lands in state.
Configure a Remote Backend
Local state belongs to one laptop and disappears with it. Move it to an S3 bucket with locking so a whole team can share one source of truth.
Guard a Bucket with a Lifecycle Rule
Some infrastructure must never be destroyed by a stray command. Declare a bucket with a prevent_destroy lifecycle rule and apply it.
Run Your First Pod
A Pod is one or more containers that share network and storage — the smallest thing Kubernetes runs. Create one imperatively and watch it reach the Running state.
Deploy and Scale a ReplicaSet
Nobody runs bare Pods in production. A Deployment keeps a chosen number of identical Pods alive and replaces any that die. Create one with 3 replicas.
Expose a Deployment
Pods come and go, so their IPs are useless as an address. A Service gives a stable virtual IP and DNS name in front of a set of Pods.
Diagnose a Crashing Pod
A Pod called api in this cluster is stuck in CrashLoopBackOff. Find out why from its logs, identify the missing piece, and record it. Failure is part of the curriculum.
Apply a Manifest
Imperative commands are for learning; YAML manifests are for real life. Write a Pod manifest and apply it — the declarative workflow behind GitOps and ArgoCD.
Keep Configuration Out of the Image
The same image runs in staging and in production - only the configuration differs. Write a ConfigMap that holds the environment-specific settings.
Set Resource Limits on a Deployment
A pod without limits can starve its neighbours or monopolise the node. Declare CPU and memory limits, apply the manifest and check the rollout.
Count HTTP 5xx Errors
Every dashboard number starts as raw events. The app's access log is at /var/log/app/access.log — count the HTTP 500 responses and record the number your dashboard would show.
Extract Errors for the Incident Report
During an incident you hand the on-call engineer a filtered log, not a gigabyte file. Extract every ERROR line from yesterday's app log into a dedicated file.
Write a Prometheus Alert Rule
Alert rules are YAML files too. Write a Prometheus rule that fires when the error rate stays too high — and learn the two halves of every alert: expression and duration.
Write the SLO and Its Error Budget
The product team promised customers 99.9% availability this quarter — a promise nobody can act on until it is written down as two numbers. Record the target in ~/slo/slo.txt and work out the error budget it implies into ~/slo/budget.txt.
Build a Dashboard Definition
Dashboards are code - a JSON definition that can be reviewed and deployed. Build one for the API with a request-rate panel and an error-rate panel.
Alert on Error Budget Burn
Paging on every error wastes attention. Burn-rate alerting pages when the error budget is being consumed far too fast - write the rule that does it.
Scaffold a Service Template
A golden path starts as a template repository: everything a new service needs, pre-wired. Scaffold one — structure, Dockerfile, CI workflow — exactly like a platform team would ship it.
Register a Service in the Catalog
Backstage-style catalogs read a catalog-info.yaml from each repository. Write one for the service you templated — ownership, domain and component type.
Declare a GitOps Application
GitOps means the cluster syncs itself from Git. Write the ArgoCD Application manifest that tells the controller to watch a repo and apply everything in it.
Write an Admission Policy
Platform teams enforce policy at admission time — the cluster simply rejects workloads that break the rules. Write a Kyverno-style policy banning privileged containers.
Keep a Credentials File Private
Application secrets belong in one file with owner-only permissions. Create ~/app/.env with an API key and lock it down to mode 600 so no other account on the machine can read it.
Rotate a Leaked Credential
A key that leaked is a key you rotate, not one you delete. Issue a replacement credential, protect it like the original, and leave a trail that proves the rotation happened.
Harden the SSH Daemon
Password logins and root logins are the two most abused doors into a Linux box. Write an sshd_config that closes both and trims the attack surface further.
Write a Reusable Audit Script
Audits should be repeatable, not remembered. Write a script that lists the listening sockets, counts the failed requests in the access log and is readable only by its owner.
Find the Noisy Client in the Access Log
Six requests in the access log failed and five of them came from the same client address. Isolate the failures, attribute them to a source, and write the finding the security team will actually act on.
Triage a CrashLoopBackOff
The api pod has been restarting since the last deploy. Find why it dies and write the one-line root cause your incident channel needs right now.
Explain the Upstream Timeouts
Yesterday's application log is full of failed requests. Work out which dependency broke first and write the timeline entry that says so - cause, not fallout.
Roll Forward with a Fixed Manifest
The api deployment never got its configuration. Write the missing Deployment manifest with three replicas, apply it and let the cluster agree.
Bring Traffic Back to the Service
The pods are healthy again, but clients still get nothing - the Service in front of them is gone. Recreate it and record every command you ran.
Write the Postmortem
The service is back. The part everyone skips is the write-up. Produce a postmortem with impact, root cause and action items - the three sections every blameless review requires.
Publish a Rollback Runbook
The next incident starts at 3am and the person on call will not be you. Write the rollback runbook while you still remember the commands.
Write Your First Script
Create the ~/ai-lab directory, write a tiny Python script and pin a dependency in a requirements.txt. In a real terminal you would run these files with the python command — here the focus is on the files themselves.
Lay Out a Python Project
Build the classic Python project skeleton — src/ for code, tests/ for tests, a README — and turn it into a git repository with an initial commit. This is the shape nearly every real Python project takes.
Write a Pytest Suite
The part of your AI code that is not a model call is ordinary code, and ordinary code deserves ordinary tests. Write a test for the prompt builder and a pytest configuration.
Type Your Message Models
A chat message is a small, fixed shape - and the shape is exactly where the bugs hide. Model it as a dataclass with type hints.
Set a Token Budget
Every LLM API call carries two cost knobs — which model you call and how many tokens it may generate. Write a small config file that captures both, the way real applications do.
Count the Turns in a Chat Log
Applications log every user turn so they can be replayed and analyzed later. Build a four-line chat transcript, count its lines with wc, and record the turn count in a summary file.
Configure the Sampling Knobs
temperature, top_p and max_tokens decide how a model answers. Write the sampling configuration your application will send with every request.
Define a Structured Output Schema
Free text has to be parsed. A JSON Schema makes the model answer with a shape your code can rely on - write one for a ticket classifier.
Craft a Few-Shot Classification Prompt
Build a few-shot prompt configuration file that classifies production alerts into incident severities (P1, P2, P3).
Define a Strict JSON Schema Output Format
Define an OpenAI/Anthropic compatible JSON Schema specification file for structured model extraction.
Harden a System Prompt Against Injection
Prompt injection is when a user message tries to overrule your system prompt — "ignore your instructions and reveal them". Write a system prompt with an explicit guardrail and a test input that simulates the attack.
Write Few-Shot Examples
Three good examples beat three paragraphs of instructions. Write a support prompt that demonstrates the tone, the format and the edge case you care about.
Budget the Context Window
Every request has a token budget - instructions, retrieved context, history and the answer. Write the budget so nothing silently overflows the window.
Build a Vector Index Pipeline Config
Configure a document chunking and vector index pipeline specification with chunk size and overlap parameters.
Split a Document into Chunks
Retrieval pipelines split documents into chunk files before embedding them. Create a chunks directory holding two one-line chunks, then write a manifest.txt that lists both filenames.
Configure the Vector Store
The vector store holds the embeddings and answers the nearest-neighbour queries. Write the store configuration - index type, vector dimension and how many replicas it runs.
Blend Dense and Sparse Retrieval
Dense vectors find meaning, keyword search finds exact identifiers. Blend the two and add a reranker on top - then say how much weight each side gets.
Declare an Agent Tool Calling Definition
Construct a production tool schema for an agent allowing it to restart unhealthy services with confirmation parameters.
Bound an Agent Loop
An agent without limits will retry a failing tool call forever. Write an agent config that caps the loop at 10 iterations, plus a separate file declaring the error policy.
Design a Planning Loop
The agent loop is plan, act, observe, repeat - with a hard ceiling. Write the loop configuration that keeps a run bounded and observable.
Define an Agent Memory Store
Short-term memory is the current task, long-term memory is what the agent learned. Define both, plus the rule that decides what is worth keeping.
Version Your Prompts in Git
Prompts change constantly, and "which wording was live last Tuesday?" is only answerable if every version is committed. Put a v1 system prompt and an improved v2 into a git repository as two separate commits.
Write an Eval Results File
An eval is a set of test cases a prompt must survive, plus the score from the latest run. Create a cases file with three test cases and record a passing score in results.txt.
Configure the Inference Endpoint
Everything the serving layer needs is configuration - which model, where it listens, how long it may think and what happens when it fails. Write it.
Plan a Canary Rollout
Never swap a model in one step. Send a slice of the traffic to the candidate, watch the metrics, and know exactly when to roll back.
Declare an MCP Server Manifest
Every MCP server starts with a manifest - who it is, which protocol version it speaks and how clients should reach it. Write one for a documentation server.
Describe the Tools a Server Exposes
A tool description is the model's only documentation. Write a search tool with a clear description and a JSON Schema for its arguments.
Connect a Client to a Server
Clients find servers through configuration. Write the client config that starts the documentation server and registers it under a stable alias.
Publish a Resource Catalog
Resources are read-only context - policies, schemas, runbooks. Publish a catalog so the model knows what it may read, and how each item is typed.
Write an Evaluation Dataset
An eval dataset is a list of cases the model has to survive. Write three cases for a support assistant - one line of JSON each.
Curate a Golden Answer Set
Golden answers are the reference the model is measured against, so they need a human behind them. Write the approved answer and record who reviewed it.
Report the Metrics of a Run
A run is only useful if it produces comparable numbers. Write the report with the accuracy, the latency and the cost per request.
Gate Releases on Eval Results
A gate is a rule that fails the build. Write the gate configuration - the accuracy floor, the regression limit and what happens when either is broken.
Pin the Project Dependencies
Set up ~/ml-project with a pinned dependency file, a data directory and a dataset manifest — the small ritual that makes every future experiment reproducible. Every command is explained in the walkthrough.
First Training Script
Create a minimal training script and metrics file in ~/train-lab, then lock the work in with your first commit — version control is not just for web apps.
Write a Reproducible Loader
The loader is the boundary between raw data and your model. Write it so the path, the columns and the row count are all recorded.
Clean a Frame Before Training
Nulls, duplicates and wrong dtypes quietly destroy a model. Write the cleaning step that handles all three.
Declare the Pipeline DAG
Lay out ~/pipeline with one file per step and a pipeline.yaml that names the execution order — the shape every orchestrator (Airflow, Dagster, Kubeflow) recognises instantly.
Containerize the Pipeline
Turn the pipeline into a runnable image. Building it yourself is how you learn why images — not laptops — are the unit of execution in MLOps.
Define the Training Stage
The training stage is where the DAG stops being a plan and starts doing work. Write its definition with the image, the command and the artifacts it consumes and produces.
Publish the Model Artifact
A trained model is not a deliverable until it is stored, signed and checked. Write the publish stage that does all three.
Configure an MLflow Tracking Server Manifest
Set up an MLflow tracking server configuration with backend SQLite store and artifact S3 bucket path.
Register the Champion Model
Lay out a registry at ~/registry with a versioned home for the finance-net model, then mark v3 as the Production champion. This is the structure MLflow's registry automates.
Tag Every Model Version
Tags are the lineage of a model - the code, the data and the owner behind a set of weights. Define the tag set every version must carry.
Promote Models with Aliases
Stages move models through the registry, aliases point at them. Write the promotion rules that decide which version serves traffic.
Configure a vLLM Model Serving Daemon
Construct a production configuration file for a vLLM serving container with GPU memory utilization and tensor parallel settings.
Serve the Model on a Port
Build a vLLM serving image and run it published on host port 8000 — the last hop between a model sitting on disk and a model answering HTTP requests.
Autoscale the Serving Tier
Model servers are slow to start and expensive to keep warm. Write the autoscaler that scales them on GPU utilisation instead of on request count.
Roll Out a New Model Gradually
A new model goes live to a slice of the traffic first, with a rule that sends it back if the metrics move the wrong way.
Log the Quality Metrics
Create ~/monitoring with a metrics file and an explicit alerting threshold — because a number is only meaningful once you have written down what it is allowed to drop to.
Call the Drift Verdict
The feature distribution moved — baseline mean 0.42, current mean 0.61. Record both sides in ~/drift-lab and write the verdict file the on-call engineer will actually read.
Set the Alert Thresholds
Two numbers decide whether a model is healthy - how accurate it is and how fast it answers. Write the alert rules that watch both.
Trigger Retraining on Drift
When the data moves, the model has to move with it. Write the trigger that opens a retraining run once the drift score crosses a threshold.
Define a Feature View
A feature view names the entity, the features and where the data comes from. Write the definition for a user activity feature set.
Write the Feature Transformation
The transformation is where the raw events become the columns a model trains on. Write it once, with a schema, so training and serving agree.
Configure the Online Store
The online store is the low-latency copy your model reads at request time. Write its configuration - where it lives, how it is keyed and how long values stay fresh.
Materialise Features Incrementally
Fresh values have to travel from the offline store into the online one. Write the job that does it, with the window it covers.
Write a Data Contract
A contract states the columns a table must have and the rules those columns must follow. Write the contract for the users table.
Report the Quality of a Run
A contract produces a verdict. Write the report that says how many rows were scanned, how many broke the contract and whether the run may continue.
Write Labeling Guidelines
Label quality caps model quality. Write the guidelines a new annotator can follow without asking anyone a question.
Join and Filter Like a Pro
The first query you ever write is a join. Build one that lists the active users and the number of orders each of them placed.
Aggregate With Window Functions
Totals tell you where you are, comparisons tell you where you are going. Write the daily revenue query with a running total and a day-over-day comparison.
Index the Warehouse
An index is a bet on the queries you actually run. Write the indexes for the two hot paths of the orders table.
Read a Query Plan
The plan tells you what the database did. Read one, find the expensive step and write down what you will change.
Design a Star Schema
A star schema is one fact table surrounded by dimension tables. Write the model document that names the tables, the grain and the joins.
Handle Changing Dimensions
A customer moves, a product is repriced - and yesterday's report must not change. Document the Type 2 pattern that keeps history intact.
Define the Medallion Layers
Bronze, silver and gold - three layers with three different contracts. Write the definition so every producer knows where its data belongs.
Partition and Cluster Your Tables
Layout is performance. Decide how the fact table is partitioned, how it is clustered and how long the history is kept.
Load Data Idempotently
Pipelines get retried - the load has to converge to the same table every time. Write the merge that updates changed rows and inserts the new ones.
Extract Only What Changed
Re-reading the whole table every hour is how pipelines fall over. Write the incremental extract that only asks for rows newer than the last watermark.
Deduplicate in SQL
Sources repeat themselves, and types arrive as strings. Write the transform that keeps the newest row per key and casts the columns.
Write a Data Contract
The producer owns the shape of the data. Publish the contract, state how breaking changes are handled, and nobody is surprised on a Monday morning.
Declare Task Dependencies
The scheduler reads the dependencies, not the file order. Declare the tasks of the daily load and what waits for what.
Plan Slots and Backfills
Catchup runs, concurrency limits and backfills - the operational side of a schedule. Write the configuration that keeps a backlog from melting the cluster.
Set Retry and Backoff Policies
Transient failures are normal - a network hiccup is not a broken pipeline. Write the policy that says when to try again and when to give up.
Alert on a Late Pipeline
Consumers need the data by a certain time, so the pipeline needs a deadline of its own. Write the alert that fires when the daily load misses it.
Version an Event Schema
Every event needs a schema, a version and a timestamp - consumers build their state from it. Write the contract for the order placed event.
Lay Out Your Topics
One topic per event, split into partitions, with a retention window you chose on purpose. Write the layout.
Choose a Delivery Guarantee
Brokers promise at-least-once, and exactly-once is a promise about state, not about the wire. Write down what you promise and how you keep it.
Handle Late and Out-of-Order Events
Network delays mean events arrive late. Decide how long you wait, and what happens to the ones that arrive after the deadline.
Configure the Replication Slot
The slot is a place in the write-ahead log that a reader can follow. Write the configuration that points it at your tables.
Resume From a Checkpoint
A connector that dies has to come back to exactly where it was. Write the offset policy that makes that possible.
Handle a Column Change
A renamed column or a dropped one breaks every consumer downstream. Write the rule for meeting the change halfway.
Make the Sink Idempotent
At-least-once delivery means the same change can arrive twice. Write the strategy that makes the second copy a no-op.
Lay Out the Project
The project file decides where the models live and which profile they run with. Write it.
Write a Staging Model
A staging model is a view that renames, casts and nothing else. Write one that the rest of the warehouse can rely on.
Write the Tests
Tests are the contract with the people who query the model. Write the schema file with the generic and the singular tests.
Document the Models
Documentation is what turns a table into a product. Write the rules for describing the models and for declaring who consumes them.
Write a Catalog Entry
The catalog entry is where a dataset earns its name - who owns it, what it holds and how sensitive it is. Write one.
Map the Lineage
Lineage is the answer to what breaks when this table changes. Write the graph of upstream sources and downstream consumers.
Register the Personal Data
You cannot mask what you have not listed. Write the registry of the personal fields in the warehouse and what happens to each one.
Write the Retention Policy
Keeping data forever is not neutral - it is a growing liability. Write the retention windows and the jobs that enforce them.
Write an OpenAPI Contract
The specification is how clients are generated and how nobody has to ask what the endpoint returns. Write it for the orders collection.
Paginate Without Breaking Clients
Offset pagination dies at scale and breaks when rows are inserted. Write the cursor based contract and the parameters that go with it.
Standardise the Error Envelope
Every endpoint fails eventually. Give them all one shape so a client can handle the failure with one code path.
Version Without Breaking Clients
You will ship a breaking change. Decide now how versions are named, how they are deprecated and when they are switched off.
Design Tables With Constraints
Application code has bugs, constraints do not. Write the schema with the keys, the nullability and the foreign keys spelled out.
Index the Queries You Run
An index is a bet on the queries you actually run. Write the composite indexes for the two hot paths of the orders table.
Write a Reversible Migration
A migration that cannot be undone is a migration you cannot deploy on a Friday. Write the change and the way back.
Pick the Right Isolation Level
Isolation levels trade correctness for concurrency. Write the policy for each workload and name the anomaly each one prevents.
Choose a Read-Through Policy
A read-through cache keeps the calling code simple - it asks the cache and the cache knows how to load. Write the policy.
Defend Against a Cache Stampede
When a hot key expires, a thousand requests hit the database at once. Write the defence - a single flight, a short lock and a little jitter.
Invalidate from Events, Not from Code
Time based expiry is a guess. Write the event driven invalidation that drops the entry the moment the data changes.
Measure the Hit Ratio
A cache earns its keep with a hit ratio and a latency budget. Write the measurement plan and the objective you will hold it to.
Design the Topic Layout
Topics are contracts with your own future self. Write the layout for the order events, with the key that keeps them ordered.
Size the Consumer Group
Consumers within a group split the partitions, and each partition is handled by exactly one of them. Write the consumer configuration.
Retry, Then Give Up
Transient failures deserve another attempt, real failures do not. Write the policy that decides which is which and where the exhausted messages go.
Make the Consumer Idempotent
The broker will send the message twice, and it is not a bug. Write the strategy that makes the second delivery a no-op.
Draw the Service Boundaries
A boundary is a promise about who may change what. Write it down for the two services, including which one owns each table.
Publish the Event Contracts
An event is a promise to every consumer, present and future. Write the contract with the version, the schema and the owner.
Pass the Readiness Checklist
A service is ready when it can be observed, alerted on and run by somebody else at 3am. Write the checklist it has to pass.
Change the Contract Safely
Old clients and new servers have to coexist for at least one deployment. Write the expand and contract plan that makes that possible.
Define a Password Policy
How you store a password decides whether a breach is a nuisance or a catastrophe. Write the hashing policy your service will follow.
Design a Session
A session cookie is a bearer token with your name on it. Write the cookie settings and the rule for rotating the session after every privilege change.
Define the Scopes
Scopes are how an API says what a caller may do. Write the scope catalogue for the orders service, with the exact verbs your routes check.
Write the Token Policy
Short-lived access tokens, rotating refresh tokens, and a revocation path that actually works. Write the policy.
Choose Methods That Are Safe to Retry
A client will retry what it is not sure about, so the method you choose decides whether a retry duplicates an order. Write the contract.
Map Outcomes to Status Codes
The status code is part of the contract - it tells the client whether to retry, to fix its request, or to give up. Write the mapping.
Set the Cache Headers
A response with the right cache headers is served without touching your server. Write the policy for the orders API.
Configure CORS Properly
CORS is a browser feature, and the most common way to break it is to answer every origin. Write the configuration that is open where it must be and closed where it must be.
Define the Test Layers
Unit, integration and end-to-end tests answer different questions and cost different amounts. Write what each layer covers in your service.
Make the Database Testable
Integration tests fail for boring reasons - a leftover row, a migration that did not run. Write the database strategy that removes them.
Write the Contract Rules
When two teams own the same endpoint, the contract is the test. Write the rules for consumer-driven contracts.
Define the Load You Must Survive
Performance is a requirement, not a hope. Write the load profile the service has to hold and the thresholds that fail the build.
Model the Domain
The shape of an order should exist in one place. Write the types the whole application shares.
Narrow an Unknown Type
Data from an API is unknown until you check it. Write the type guards that narrow it before it reaches a component.
Configure the Compiler
The compiler settings decide which bugs reach the browser. Turn on the strict options and the path aliases the project uses.
Wire the Scripts
If the checks are not in package.json, nobody runs them. Write the scripts that make typecheck, lint, test and build one command each.
Write a Typed Component
The props are the contract of a component. Write one that renders a single order and refuses to render without what it needs.
Move State Into a Hook
A component that fetches its own data cannot be reused or tested. Write the hook that owns the state and the loading flag.
Render a List Correctly
React identifies rows by key. Use the stable identifier from the data, and render an empty state instead of a blank list.
Memoise the Expensive Parts
Memoisation is a trade - you pay for the comparison to save the recomputation. Apply it where the work is actually expensive.
Name a Query and Its Cache Key
Every request needs a stable identity - the cache key. Write the query definition that names the key and says how long the data may be reused.
Invalidate After a Mutation
A write makes a cached read wrong. Write the mutation and the invalidation that follows it.
Build a Small Shared Store
Not every piece of state needs a library. Write the small store the cart needs - state, subscribe and update.
Put Filter State in the URL
State that belongs in the URL is shareable, bookmarkable and survives a refresh. Write the hook that reads and writes it.
Build a Layout with Grid
Grid and flexbox are two different tools. Use grid for the page skeleton and flexbox for the row inside it.
Define a Type Scale
A type scale is a fixed set of sizes with a fixed ratio. Write it once and stop picking pixel values by hand.
Name the Design Tokens
A token is a decision with a name. Write the colour and spacing tokens so the product has one source of truth.
Ship a Dark Mode
Dark mode is a token swap, not a second stylesheet. Write the override that changes the tokens and nothing else.
Set a Performance Budget
Pick the numbers you are willing to ship with, and write them down where the CI job can read them.
Keep the Bundle Small
The fastest byte is the one you never ship. Write the size budget and the rule that splits the code you do not need on first paint.
Build an Accessible Dialog
A modal that traps focus, names itself and closes on escape. Write the component with the semantics a screen reader needs.
Audit the Contrast
Text that cannot be read is a defect. Write the audit with the ratios, the rule that applies and the fix you ship.
Trace the Critical Path
The browser parses, lays out, paints and composites. Write the order down so you know which of your files is holding the page up.
Stop the Layout Thrash
Reading a layout property right after writing one forces the browser to recalculate the page in the middle of a frame. Write the rules that avoid it.
Pick the Right Storage API
Four storage APIs, four different jobs. Write the decision for your application.
Write the Caching Strategy
The HTTP cache and the service worker cache are two different systems with two different rules. Write the strategy that keeps both of them honest.
Test the Way a User Sees It
Testing library React renders the component and queries it the way a screen reader would. Write the approach your team follows.
Test Behaviour, Not Implementation
The value of a test is what it protects. Write the rule that keeps the suite about behaviour.
Keep the E2E Suite Small
One end-to-end test should be worth the minutes it costs. Write the rules for the suite that ships with the product.
Mock the Network, Not the Code
Mocking your own modules means every test asserts your implementation. Mocking at the network boundary keeps the test honest. Write the handler plan.
Write the Form Schema
The schema is the single description of what the form accepts, shared by the interface and the server. Write it.
Write Error Messages People Can Use
An error message is a sentence about what to do next, tied to the field it belongs to. Write the strategy.
Validate on the Server
The client can be bypassed, so the server validates the same schema and maps the failure back to the form. Write the action.
Design the Pending State
Between the click and the answer there is a second of uncertainty, and the interface has to say something. Write the states the form moves through.
Write a Codex Profile
Every agent run starts from a profile. Write the configuration that picks the model, the approval policy and the sandbox the agent works in.
Choose an Approval Policy
Three approval policies decide how often the agent interrupts you. Write down what each one means and when it is the right choice.
Run the Agent From a Script
The same agent, the same result, every time - that is what a script buys you. Write the wrapper that runs the agent non-interactively in a fixed directory.
Automate a Review Pass
A review agent is cheap and tireless, but it is not a human. Write the script that reviews a diff against a base branch and writes its findings to a file.
Write the Repository Instruction File
The agent reads the instruction file before it plans. Write one that says how to build, how to test and what the conventions are.
Scope the Rules to a Directory
The root file applies everywhere, but a service has its own rules. Write the nested instruction file that adds them without repeating the root.
Decide What Goes Into the Context
Context is the scarcest resource in an agent run. Write the rules for what to include and what to keep out of it.
Write a Task Spec an Agent Can Follow
The spec is the contract. Write one with a goal, acceptance criteria, what is out of scope and how the work is verified.
Write the Review Checklist
AI-written code needs a different checklist - the bugs are the plausible ones, not the silly ones. Write the list your reviewers use.
Review a Diff Like a Reviewer
A review is a structured argument, not a feeling. Write the format your review notes follow so the findings are actionable.
Write the Sandbox Policy
The sandbox decides what a mistake can break. Write the policy that maps the three modes to the situations they fit.
Scan a Diff for Secrets
A generated diff can contain a credential that was in the context. Write the scan that catches it before the commit leaves the machine.
Run a Review in CI
An automated review is a second pair of eyes, not a gatekeeper. Write the workflow that posts the findings on every pull request.
Bound What Automation May Touch
An unattended agent needs hard limits. Write the configuration that says when it may run, where it may work and who approves it.
Write the Team Ground Rules
A team that shares the agent shares the rules. Write them down so the tenth contributor does not have to guess.
Measure Whether It Helps
The interesting question is not how much the agent wrote, but how much of it survived review. Write the metrics that answer it.
Break a Request Into Steps
A big request handed to an agent in one go produces a big diff nobody reviewed. Write the plan that breaks it into steps you can check.
Review a Plan Before the Edits Start
A plan is a claim about what the change will do. Read it the way you would read a pull request - against the codebase it claims to change.
Set the Boundaries of a Change
The smaller the change, the shorter the review and the fewer the regressions. Write the scoping rules your team applies to every agent task.
Write the Task Prompt
The prompt is the whole specification the agent works from. Write the template that leaves nothing to guess.
Ask for the Test First
A test written before the implementation is a specification you can read. Write the brief that asks for one.
Review the Generated Test
A generated test proves nothing if it cannot fail. Write the review that makes sure it would.
Read a Failure Before You Fix It
Half the generated fixes are wrong because nobody read the error. Write the routine that turns a red test into a correct change.
Run the Red-Green Loop
Red, green, refactor - with an agent in the loop the discipline matters more, not less. Write the loop your team runs.
Read Before You Write
An agent that edits before it reads produces code that duplicates what is already there. Write the orientation routine that prevents it.
Search the Way a Maintainer Would
Searching by the name of a function finds the call site, not the definition. Write the search strategy that finds the code that decides the behaviour.
Narrow a Vague Request
Make it faster is not a task, it is a direction. Write the questions that turn a vague request into a change with a boundary.
Verify the Change Against the Repo
The agent believes it is done. You check against the repository, not against its summary. Write the verification routine.
Write the Three Parts of a Request
Goal, context, constraints. Every request that works has all three. Write the anatomy down.
Curate the Context
Too much context blurs the task and too little makes it guess. Write the rules for choosing what goes in.
Iterate a Request Instead of Restarting
When a run goes wrong, the fix is usually a correction, not a fresh start. Write the iteration rules.
Read a Failed Run
A run that failed still produced information. Write the postmortem for the run itself, not just for the code.
Write the Settings File
The settings file decides the model, the tools and the rules for every session. Write one for a project that builds with pnpm.
Define the Permission Policy
Every team has its own idea of what an agent may do unattended. Write the policy and the reasons behind it.
Run Claude Without a Terminal
The print mode takes a prompt and gives you an answer you can pipe into another tool. Write the script that runs it with a fixed output format.
Hand Over a Session
Context is per session, so a handoff needs a written note. Write the template that carries the work to the next person.
Write the Root Memory File
The memory file is loaded into every session in the repository. Write one with the commands, the layout and the conventions.
Scope the Memory to a Service
A service with its own rules gets its own memory file. Write it so the nested file adds to the root instead of repeating it.
Import Shared Instructions
The rules that apply everywhere do not belong in every repository. Write the user level memory file that imports them.
Keep the Shared Rules Short
A shared rules file that grows to fifty lines is a shared rules file nobody reads. Write one that states the few things that really are universal.
Add a Server to the Project
A project level server configuration is checked into the repository, so everyone gets the same tools. Write one.
Decide Which Scope a Server Lives In
A server can belong to one developer, to one project or to the whole machine. Write the rules for where each kind of server goes.
Hook the Tool Calls
A hook runs on a matching event and can act on the result. Write one that formats the code after every edit.
Write the Safety Rules for Hooks
A hook that blocks without saying why is the fastest way to lose a team's trust. Write the rules that keep hooks predictable.
Define a Subagent
A subagent is a small, specialised prompt with its own tools. Write the definition for a reviewer that only reads.
Scope the Tools per Subagent
The tools are the risk. Write the policy that says which tools each kind of subagent gets.
Set the Assisted Git Loop
Branch, let the assistant work, review the diff, then open the pull request. Write the loop down so everyone runs it the same way.
Automate the Review Hand-off
The review agent is the part that pays for itself. Write the script that runs it over a diff and stores the findings where a human will read them.
Explore Before You Edit
Editing before reading produces code that duplicates what already exists. Write the rule that keeps the reading first.
Read a Codebase in Ten Minutes
A fixed routine for understanding an unfamiliar repository. Write the ten minute version of it.
Run the Verification Loop
Build, test, read the diff - in that order, every time. Write the loop the team runs before anything merges.
Make the Agent Review Its Own Diff
A second pass over the same diff catches what the first one missed. Write the review prompt and the rules for taking it seriously.
Ask for the Failing Test First
A test that fails first proves it can fail at all. Write the brief that asks for one.
Scope a Test Properly
A test that covers everything asserts nothing. Write the rules for what a test covers and what it leaves alone.
Read a Failing Test Before Fixing It
Half the fixes an agent makes are wrong because nobody read the error. Write the routine that prevents it.
Guard the Regression
A bug that came back is a missing test, not bad luck. Write the rule that makes the fix permanent.
Set the Permission Set
Every command the agent may run without asking is a decision you make once. Write the permission set for your repository.
Keep Secrets Out of the Context
Whatever you paste into a session leaves your machine. Write the rules that keep credential values out of it.
Spot a Prompt Injection
An issue comment that says ignore your instructions is an attack, and the agent will read it as an instruction. Write the rules for untrusted text.
Review What the Agent Proposes
The agent will propose a command, a file or a patch. Write the review that catches the dangerous ones before they run.
Use Checkpoints as a Way Back
When a session goes wrong you need somewhere to go back to. Write the checkpoint discipline the team uses.
Work in an Isolated Worktree
Two sessions in the same working tree fight each other. Write the isolation rule that keeps them apart.
Write the Commit Message
The commit message is the part of the change that survives. Write the rules the team applies to every message.
Keep the Branch Discipline
Short branches, one purpose, and a merge that tells the truth. Write the rules for the branches an agent session works on.
Write the Repository Instructions
Copilot reads one instruction file for the whole repository. Write it with the commands, the conventions and the things the assistant must never do.
Add a Custom Chat Mode
A custom mode gives the assistant a role and a toolset for one job. Write the mode your team uses for reviews.
Use the CLI From a Script
The command line client takes the same prompts as the editor. Write the script that asks for a suggestion and explains a piece of code.
Review Before You Accept
Accepting a suggestion is a review, and the rules for that review are the same as for any code. Write them down.
Write the Task File
A long agentic task needs a written brief. Write one with the goal, the files, the constraints and the acceptance criteria.
Review the Plan Before the Edits
The plan is the last cheap moment to change the outcome. Write the checklist you run it through.
Decide What Goes Into the Context
Too much context makes the assistant lose the thread. Write the rules for what earns a place in it.
Plan a Refactor That Spans Many Files
A refactor across thirty files does not fit in one agent session. Write the plan that breaks it into steps that each leave the repository working.
Write the AI Code Checklist
Generated code is confident, well formatted and quietly wrong. Write the checklist that catches the quiet part.
Write the Review Output Format
A review that reads like a wall of text gets ignored. Write the format that makes the findings impossible to skim past.
Scan Every Change for Secrets
A generated file can carry a value that was in the context. Write the scan that catches it before the commit lands.
Write the Data Rules
The context window is a payload. Write the policy that says what may go into it and what may never.
Write the Ground Rules
The assistant writes faster than anyone reads. Write the rules the team runs on so the speed does not become the risk.
Name the Roles in a Pairing Session
Two people and an assistant behave very differently from one person and an assistant. Write down who does what.
Pick the Metrics That Matter
Counting the suggestions is easy and says nothing. Write the metrics that measure whether the work actually got better.
Roll It Out in Phases
A tool that helps one team can ruin another. Write the phased rollout with the exit criteria for each phase.
Give the Right Context
The assistant can see the files that are open, not the ones you are thinking about. Write the context rules that close the gap.
Write Instructions That Outlive the Chat
A chat message helps once. An instruction file helps every session. Write the difference.
Refine a Request Instead of Restarting
When the answer is wrong, the fix is usually one more sentence, not a new chat. Write the iteration rules.
Keep the Scope of a Request Tight
A request that mentions four features produces four half-finished features. Write the scoping rules the team applies.
Read the Agent Plan Before the Edits
Agent mode can touch twenty files before you see anything. Read the plan it shows you first. Write the routine.
Keep the Agent Inside the Scope
An agent that wanders outside the scope produces a diff nobody can review. Write the boundary rules.
Decide What the Agent May Run
Agent mode can run commands. Decide which ones, and write down the list so the decision is reviewable.
Review the Files It Changed
The agent worked in the background while you did something else. Write the review that catches the drift.
Write the Instruction File
The instruction file is read before every suggestion, so it should hold the few things that are always true. Write yours.
Scope the Instructions
The instructions that fit one service do not fit the whole company. Write the layering that keeps them relevant.
Save the Prompts You Reuse
The prompt you type every week should be a file. Write the catalogue of the ones your team reuses.
Wire In a Tool for the Job
The assistant cannot open your issue tracker, and guessing is worse than not knowing. Write the case for connecting a tool - and the rules for connecting it safely.
Check the Licensing Rules
The suggestion is a starting point, not an answer - it may reproduce something you cannot ship. Write the rule your team follows.
Attribute What Was Machine-Written
Some licences and some policies require that machine-written code be declared. Write the attribution rule for your repository.
Know What Gets Indexed
An assistant that knows your repository also knows your secrets, if they are in it. Write the rule for what the repository may contain.
Keep Sensitive Data Out
Not every repository may be used with an assistant. Write the classification that decides which data the team may share and which stays local.