scalematic.
Prompt LibraryAgentsPrompt Engineering 8 min read · v1.0 · July 2026

Coding Agent Discipline Kit

A CLAUDE.md scaffolding template plus ten reusable prompts for operating Claude Code, Cursor, or Codex on a real codebase — read before writing, plan before multi-file changes, keep diffs minimal, and verify before calling anything done.

Executive summary

What problem does this solve?

AI coding output feels like guesswork — wrong files touched, confident edits to code the agent never read, scope creep on a one-line fix, and "done" that means "it compiled" rather than "it works."

Business outcome

  • A CLAUDE.md template that sets the rules once per repo
  • Ten copy-paste prompts for the moments that cause the most bad output
  • A repeatable, coachable process instead of hoping the agent reads your mind
Revenue maturityLvl 14

Foundational discipline for anyone using an AI coding agent on a real codebase.

Implementation effort
0implementation hours
People required
FounderMarketingSalesRevOpsDeveloper
DifficultyBeginner
Business impactHigh
Time to installInstant — copy and paste
Automation0%
MaintenanceLow
OwnerScaleMatic
Required software
Claude CodeCursorCodex
Architecture

How the system fits together

Coding Agent Discipline Kit — system architecture
100%
01 · Scaffold
02 · Before
03 · During
04 · After
05 · Escalate

Hover a node for detail, or tap a tool below to see where it runs.

The problem it solves

AI coding output feels like guesswork — wrong files touched, confident edits to code the agent never read, scope creep on a one-line fix, and "done" that means "it compiled" rather than "it works." None of this is a model-capability problem; it's a missing operating discipline.

Expected outcomes
  • A CLAUDE.md template that sets the rules once per repo instead of repeating them every session
  • Ten copy-paste prompts for the moments that cause the most bad output
  • A repeatable, coachable process instead of hoping the agent reads your mind
Who it's for
  • Founders building with AI coding agents
  • RevOps teams shipping internal tools
  • Anyone using Claude Code, Cursor, or Codex
Implementation

10 steps, start to finish

Set the operating rules once instead of restating them every session.

  • Six numbered rules: task completion, no emojis, read before write, minimal diff, no fallbacks for impossible cases, no comments unless they explain WHY
  • Tech stack, conventions, commands, and project structure sections
  • A "what done means" checklist and a "things to never do" list

Prompt library

Copy-ready prompts

Tuned for Claude, GPT, Gemini, and Grok. Copy and run.

CLAUDE.md Template
# [PROJECT NAME]

## Project Overview
[One paragraph: what this project is, who uses it, where it's deployed.]

**Domain**: [yourdomain.com]
**Deployment**: [Vercel / Railway / Fly / etc.]
**Repository**: [URL]

---

## IMPORTANT RULES

### 1. Task completion
A task is NEVER complete until [your bar — pushed, deployed, tested in staging, etc.]. Always verify before declaring done.

### 2. No emojis
Do not use emojis in code, comments, commit messages, or user-facing text.

### 3. Read before write
Before changing a file, read it fully. Before adding a function, search the codebase for an existing one. Never generate code based on an assumption about what the codebase looks like.

### 4. Minimal diff
Touch only the files necessary for the task. Do not refactor surrounding code, rename variables, or reformat. List cleanup ideas separately — don't bundle them into the diff.

### 5. No fallbacks for impossible cases
Trust internal code. Only validate at system boundaries (user input, external APIs, untrusted data). Don't add try/catch to silence an error — find the root cause and fix it.

### 6. No comments unless they explain WHY
Default to no comments. Add one only when the WHY is non-obvious — a hidden constraint, a workaround for a specific bug, a subtle invariant.

---

## Tech Stack
[Frontend / Backend / Infrastructure — framework, language, styling, state, database, hosting.]

## Conventions
[Naming, imports, tests, commit style.]

## Commands
- Dev / Build / Typecheck / Test / Lint / Deploy: [commands]

## Project Structure
[Tree — top two levels of the source tree.]

## What "Done" Means
- [ ] Code changes match the planned scope
- [ ] Typecheck passes
- [ ] Tests pass (or new tests added if behavior changed)
- [ ] Manually verified [in browser / via curl / etc.]
- [ ] Committed with a meaningful message
- [ ] Pushed (deploy trigger, if applicable)

## Things to NEVER do
- Push without verifying the build
- Skip pre-commit hooks to force a commit through
- Run destructive git operations without confirmation
- Add features or abstractions beyond what the task requires
- Create a new file when an existing one would do
Read Before Write
Before writing any code: list every file you need to read to understand this task, read each one fully, then state back in 3-5 bullets what you understood — what the existing code does, what convention you're following, and where the change goes. Wait for confirmation before writing code. If you're guessing instead of reading at any point, stop and say what you'd need to read.
Plan, Then Execute
Don't write code yet. Read the relevant files, then produce a plan: files to change (path — what changes), files to create (path — purpose), a 2-4 sentence approach, and any risks or open questions. Wait for a go-ahead before writing code. If the task turns out to be bigger or different than described once you've read the files, say so before planning.
Minimal Diff Mode
Make the smallest change that solves the problem. Touch only necessary files. Don't refactor surrounding code, rename variables you think are misnamed, "improve" formatting, or add error handling for cases that can't happen. Don't add comments unless they explain a non-obvious WHY. If you see something worth cleaning up, list it separately at the end — don't fold it into the diff. Show the diff and wait for confirmation before applying.
Verify Before Done
Before saying you're done: run the typechecker and paste the result; run the test command for the affected module and paste the result; if it's a UI change, open the dev server and describe what you see; if it's an API change, hit the endpoint and paste the response; if it's a database change, run a query that proves it. If any step fails, fix the root cause — don't skip the step or rationalize past it. Only then call the task complete.
No Fallbacks, No Hacks
When you hit an error or unexpected state: find the root cause, don't hide it. Don't add try/catch just to silence an error, don't add fallback values for cases that shouldn't happen, don't add compatibility shims or underscore-prefix unused variables, don't validate internal data you already control. If something's broken, surface it — the fix is to fix it, not hide it. Only validate at real system boundaries: user input, external APIs, untrusted data.
Commit Message From Diff
Look at the staged diff. Write a commit message in imperative mood ("Add", "Fix", not "Added"), title under 72 characters, describing WHY the change was made rather than restating the diff. If unrelated changes are staged together, suggest splitting into separate commits. No emojis. Output only the message.
PR Description From Branch
Look at the diff and every commit between this branch and main. Write a PR description with: a Summary (2-4 bullets on what this delivers), a Why (1-2 sentences on the motivation), a What Changed section grouped by area, a Test Plan checklist, and a Risks section (reviewers should pay attention to — "none" is fine if true). Be specific about file paths and behavior, skip generic boilerplate.
Rubber Duck Debug
I'm debugging: [describe the bug, paste relevant code/logs]. Don't suggest a fix yet. Walk through: what the code is supposed to do, what's actually happening based on the evidence, where exactly the divergence happens, why it diverges (the underlying mechanism), and three possible causes ranked by likelihood with what would distinguish between them. Once I confirm your read of the situation, then suggest the fix.
Tradeoff Analysis
I'm choosing between [Approach A] and [Approach B] for [problem]. Give me a table comparing implementation cost, long-term maintenance, performance impact, reversibility, and failure modes. Then pick one explicitly, state the deciding factor in one sentence, and name what would change your mind — under what conditions the other approach wins. Don't hedge, don't say "it depends."
System Design Walkthrough
I'm designing [system/feature]. Walk through it senior-style: the problem in one sentence, hard constraints and assumptions, the simplest possible design (not the right one — the dumbest one that could work), specifically where and how that design breaks, the next iteration and what new failure mode it introduces, then stop — don't jump to microservices, queues, or sharding unless the prior steps actually required them. End with open questions and a one-paragraph summary of the chosen architecture and why.
FAQ

Common questions

Install this system

Build it yourself, or have it installed

The documentation above is complete — everything you need is on this page. The only question is whether you want to spend the time.

Do it yourself

Free · Instant — copy and paste

Have ScaleMatic install it

Done with your team

Follow the documentation
Complete implementation
Configure every tool yourself
Tool configuration included
Troubleshoot issues yourself
Tested and supported setup
Train your team on it
Team training and SOPs included
Time investment: several hours or days
Guided implementation

We diagnose the constraint first — if this system isn’t what you need, we’ll say so.