Rzemiosło · The Craft
What is The CraftLevelsGet startedChapters Search Download PLEN
Rules of chapter 07
Level 1 · Business Chapter deep-dive

In the core the rules are short and hard. Here is what stands behind them: the why, examples and stories from real projects. Rule quotes come straight from the core.

07 — A new project: Day 0

Chapter 07 is the only checklist in the whole doctrine — every other chapter links to it. Its goal is simple: after day one, every following session stands on solid ground instead of starting by guessing what the project is and how to run it. Below is what stands behind the items.

Wiring that actually works

Place the rules in docs/rules/ ↗

Rules the agent never opens are dead. Copying the pack in changes nothing by itself — what changes things is the wiring: the place every session starts from. A git submodule keeps the rules updatable (one command pulls a newer version); a plain copy is simpler and perfectly enough to start.

Put a plain pointer at the top of CLAUDE.md and AGENTS.md ↗

CLAUDE.md is read by Claude Code, AGENTS.md by other agent tools; two files cover everything you work with. The pointer is a plain sentence, not a paste of the whole rulebook: the rules live in one place, and three copies in three files would say three different things a month later (01).

Why no big labels like “SYSTEM — READ FIRST”? Because that’s what an attack looks like — a Prompt injection — An attack on AI: someone weaves a hidden instruction into text to make the assistant act against the rules. If AI reads outside content (emails, pages), treat it as untrusted — otherwise it can be manipulated. more in the glossary →: text in a file pretending to be a system instruction. A well-built assistant learns not to trust such banners, and rightly so. A calm sentence, “this project follows the rules in docs/rules/”, works better than shouting. For the same reason the pointer isn’t in README.md: the README is for people who landed on the Repository (repo) — A store of the whole project’s code together with its full history of changes — who changed what and when. The repo is the project’s memory: code, documentation and change history in one place. more in the glossary → (01).

The pointer says to read chapter 00 (the whole doctrine on one screen), then search the Index (database) — A lookup in the database that makes searching instant instead of scanning everything in order. The first move for slow queries — like an index at the back of a book instead of reading 400 pages. more in the glossary → for the topic and open only the matched chapter. Reading the whole pack every session would burn the context the rules are meant to save.

The brief — questions before code

mark it as an assumption ↗

Some decisions are cheap on paper and very expensive in code: an interface language added after the fact is a rewrite, and monetization added later is a data Migration (database) — A controlled change to the database layout — adding a column, a table or moving data — step by step. Like a renovation to plan: rebuilding data in a set order so nothing “collapses”. more in the glossary →. So before the first line exists, questions get asked. But not thirty at once: in short groups, only about what changes the plan. When the user doesn’t know something, the assistant proposes a sensible default — and clearly marks it as an assumption, not a decision, so it can be checked later. A silent “probably Polish only” or “probably free” is the most common source of rewrites in week three.

The same questions are asked when wiring the doctrine into an existing project — then as an audit: what’s already there, and what’s missing.

First: who am I talking to

Technical level and reporting style ↗

This question comes first because it sets the register of the whole collaboration. Do you program and read code? Do you know terms like repository, Deploy — Releasing a new version of the app “live”, where real people use it. It’s the moment a change reaches real people — which is why it happens only on an explicit “deploy”. more in the glossary →, database — or do they need explaining? Do you want to co-decide on technical matters, or would you rather have sensible decisions with a short “why”? On a “non-technical” answer the assistant changes how it talks: no unexplained jargon, analogies instead of terms, closed questions with a recommendation instead of open technical ones. Saying “I’ll rebase and bump the version after the migration” to someone who doesn’t program isn’t a message, it’s noise.

Languages the user speaks; technologies they know. ↗

A conversation in your native language is faster and more precise — ideally, describe the idea in the language you think in. Knowing your toolkit lets the project rest on technologies you understand, not unfamiliar ones. Both answers go into CLAUDE.md, so every later session knows straight away how to talk to you — it’s configuration you set once.

The rest of the brief, one sentence each

  • Languages and markets — one language or many, which is the source of truth, currencies and date formats. It decides the data structure from day one (10, 11).
  • MVP and “later” — what the product can’t exist without, and what’s a nice extra; that sets the layers and what goes behind a flag (12).
  • Monetization — it touches both the data model and legal duties (invoices, VAT) (09).
  • Visual direction — an existing brand or from scratch, a dense dashboard or an airy landing page, how much animation the performance budget can take (13).
  • Value proposition and tone — the same “why” that later drives the changelog and copy written in the user’s language.

Where the brief lands

project-brief.md in the project root ↗

The brief sits next to docs/rules/, not inside it — because docs/rules/ is someone else’s replaceable pack, while the brief is yours. The quickest way to fill it in is the reader that ships with the pack (its brief view generates a ready file), or you paste the answers as the first message to Claude opened in the project folder. CLAUDE.md is born from the brief; hard decisions (language, policies) go there, and the business goal and constraints go into memory (06).

The checklist — why each step

Recon: ↗

Even a “new” project often already has something: a notes file, an abandoned skeleton, uncommitted junk. Commandment II (“search before you write”) applies from the first minute — a few git commands show what’s already there, what’s in progress, and whether orphans are lying in the tree (05).

The following steps are a digest of the whole doctrine, ordered by when they become useful:

  • CLAUDE.md and the language policy — the constitution read every session (01), with two lines on the language of code (17).
  • Repo hygiene and directory maps — .gitignore right away, an AI_README — A map file in every code directory: what’s here, what it’s for and what to watch out for — written for search. The assistant finds the right file with one search instead of reading the whole directory. more in the glossary → in every folder with code; catching up on this later always costs more.
  • Tests with Guard — A test that enforces a project rule (e.g. “every module is in the AI_README”) and stops the commit when it’s broken. A rule without a guard is only a wish — a long session will break it in good faith. more in the glossary → in the first Commit — A saved, labelled point in the project’s history — a confirmation of a specific batch of changes. Small, described commits make a history you can return to any working state from. more in the glossary → — a guard added to an existing project first has to swallow all the inherited mess; added on day one, it guards from zero (17).
  • Skills and data — /run with a Smoke test — A quick “does it even work” test right after a deploy — checks the most important paths (e.g. login). Catches disasters in 30 seconds before a user sees them. A cheap way to sleep well after a deploy. more in the glossary → and Dry-run — A “dry” run — the script shows what it WOULD do but changes nothing. You see the effects before executing; a data change happens only after deliberate confirmation. more in the glossary → by default make running the app and safely changing data a single command, not a ritual (02, 04).

Before the first real user: ↗

This step gathers things a prototype doesn’t need but that become critical the moment the first real person arrives: an error that doesn’t reveal server details, a Timeout — The maximum time to wait for a response — after it the request fails instead of waiting forever. Without it one slow service can quietly hang the whole app. more in the glossary → on every external call (so one slow service can’t hang everything), limits on paid Endpoint — A single “address” in an API you send a request to for a specific thing (e.g. the list of orders). Apps talk through endpoints — one endpoint = one function you expose. more in the glossary → (so nobody burns through your AI bill), and login sessions that survive a restart (14, 15).

Environment (dev / prod) — Separate places where the app runs: “dev” for safe tests, “prod” for real users. Dev is a playground, prod is where real users are — the rules for each are completely different. more in the glossary → is on the checklist prepared, not fired: the Runbook — A written step-by-step guide for production operations, with numbered lessons from incidents. The memory of outages can’t live in someone’s head — the next deploy starts by reading the runbook. more in the glossary →, the Maintenance window — A short, planned period when users see a “work in progress” page while the database or configuration changes behind it. It guarantees the app never runs, even briefly, on half-changed data. more in the glossary → and the Rollback — Reverting a change to the previous, working state — “Ctrl+Z” for a deployment. When a new version breaks production, a rollback restores the previous one in seconds instead of fixing in a panic. more in the glossary → plan are written before they’re needed — in the middle of an outage there’s no headspace for it. Legal gets templates with visible [to be filled] placeholders, not invented content (09). Architecture decisions are recorded only where you depart from the default stack — the rest needs no justification (08).

The minimum version

Minimal Day 0: ↗

When there’s no time for everything, six steps give a foundation: the brief, CLAUDE.md, .gitignore, /run with a smoke test, a test skeleton with the guards, and a directory for Backup — A copy of your data saved earlier, which you return to when something goes wrong. It’s the only way to undo a change to data — code comes back from git, data only from a backup. more in the glossary →. Each costs minutes on day one and saves hours later. The rest of the checklist grows with the project — at the moment it becomes needed.