Rzemiosło · The Craft
What is The CraftLevelsGet startedChapters Search Download PLEN
Level 1 · Business ~4 min read

In one sentence: Wire The Craft in with a plain pointer, write the product brief and run the only start checklist — so the project is orderly and safe from day one.

This chapter in plain terms

This chapter is a list of things to settle before the first line of code — because a few decisions are cheap on paper and very expensive later (adding languages or payments after the fact is rewriting half the project, not a fix).

It starts with wiring in the doctrine: you put The Craft in the project’s docs/rules/ folder and add a plain pointer at the top of CLAUDE.md and AGENTS.md, so the assistant really uses it instead of guessing. (No [SYSTEM] labels, nothing in README.md.)

Then the brief — a set of questions you ask yourself (or the client) before anything is built: who it’s for, in how many languages, how it earns, what its tone is. The first and most important question is the reader’s technical level — because that sets the language of the whole conversation. The result lands in a project-brief.md file in the project’s root folder.

The rest is start hygiene: one CLAUDE.md file with the project rules (including a two-line language policy: code in English, prose in the project’s language), a .gitignore for junk, a place 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 → and, from 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 →, 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 → tests that keep the most important rules alive. You don’t have to do it all at once — at the end of the chapter there’s a “minimal Day 0” for when time is short.

Example: if the app might one day be bilingual, you say so on Day 0 — then the texts are “extractable” for translation from the start, not hard-wired into the screens.

Read more: Claude Code best practices · what is .gitignore · internationalization (i18n).

07 — New project: Day 0

The checklist Claude runs when a project starts — the only checklist in the doctrine; other chapters link here. Goal: every later session stands on solid ground.

Wire The Craft in (once)

  1. Place the rules in docs/rules/ — a submodule (updatable) or a plain copy: git submodule add https://github.com/JKolada/TheCraftWithClaude docs/rules

  2. Put a plain pointer at the top of CLAUDE.md and AGENTS.md (create them if missing). If you see docs/rules/ and the pointer isn’t there — add it, don’t wait to be asked:

    This project follows Build — Turning source code into a version of the app that’s ready to run or upload to the server. A green build is the first proof a change broke nothing — many tests run right there. more in the glossary → rules in docs/rules/ (The Craft); they override default behavior. Read docs/rules/00-commandments.md first, then grep -i <keyword> docs/rules/AI_README.md and read only the matched chapter. This CLAUDE.md remains the project’s constitution.

    A pointer, not a paste — the rules live in one place. No SYSTEM labels (→ 00).

  3. Pick the rules’ language — English at the root, Polish in pl/.

0. Product brief — ask before anything is built

Ask in short groups; where the user doesn’t know, propose a default and mark it as an assumption:

  • Technical level and reporting style (ask first — it sets the register: non-technical → no jargon, closed questions with a recommendation).
  • Languages the user speaks; technologies they know.
  • Target languages and markets (i18n from day one? RTL (right to left) — Languages written from right to left, such as Arabic and Hebrew. The whole page layout has to mirror, not just the text. more in the glossary →? currencies) → 10.
  • MVP vs later; accounts and roles; integrations (payments, AI, mail, maps).
  • Monetization (free / paid / subscription / ads; when; provider; invoices/VAT) → 09.
  • Visual direction and feel (existing brand? light/dark? animation budget, prefers-reduced-motion, WCAG?).
  • Value proposition and tone (one sentence; name and domain set?).

The answer lands as project-brief.md in the project root (next to docs/rules/, not inside it), or is pasted as the first message. The brief view in the reader generates it.

Checklist

  1. Recon: read existing CLAUDE.md / 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 → / README; git log --oneline -20, git status (orphans, junk); identify stack, run command, where the data lives.
  2. CLAUDE.md from the brief (skeleton below): stack + exact run commands, policies, the user’s language and level, the permission map (→ 06), a dated “Current state”.
  3. Language policy — two lines in CLAUDE.md: code English (identifiers, tests, DB, CLI (command line) — Using a program by typing commands in a terminal instead of clicking. Commands can be saved, repeated and automated — which is why the assistant mostly works this way. more in the glossary →, keys), prose in the project’s language (→ 17).
  4. 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 → hygiene: .gitignore (deps, local DBs, *.bak, generated, temp); 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 → and 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 →-tag convention; tasks in GitHub Issue — A task or bug recorded in a tracker (e.g. GitHub Issues), with a description and acceptance criteria. That’s where the “why” of a change lives — not in someone’s head or a chat that will disappear. more in the glossary → / docs/plans/.
  5. AI_README.md in every directory with code; docs/ for architecture and data model.
  6. Tests: a test skeleton + 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 → with markers; Playwright — A tool that drives a real browser in tests: it clicks, types and checks what’s on screen. It checks the app the way a user will see it — including on a phone profile. more in the glossary → on a separate port if there’s a UI; both 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 → from 17 in the first commit, Baseline — A recorded “as of today” state — a measurement or a count of violations — later results are compared against. Without a reference point you can’t see whether things got better or worse — and in a ratchet it lets numbers only fall. more in the glossary → committed.
  7. Skills: /run + smoke, /run-tests, /update-ai-readme, /add-migration (→ 02).
  8. Data: forward-only 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 →, a backups/ directory with retention, 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 (→ 04).
  9. Before the first real user: global error handler and a 500 that leaks nothing, 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, quotas 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 →, a durable session store in its own file (→ 14); AI calls with an output contract and a Cache — A temporarily remembered result, so the same thing isn’t computed again on every request. Speeds the app up, but can be a trap: a stale cache shows old data. more in the glossary → (→ 15).
  10. 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 → (prepared, not fired): deploy 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 →, branded 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 →, 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 (tag + 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 →), public changelog, nightly backup from the first real user (→ 05).
  11. Legal: terms, privacy policy and disclaimers with [to be filled] placeholders; consent before trackers (→ 09).
  12. Baselines: Lighthouse — A free Google tool built into Chrome that measures a page’s speed, accessibility and SEO. It gives numbers instead of impressions — a reference point before and after every optimisation. more in the glossary → after the first working page; 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 → on filter columns from the first migration (→ 13).
  13. Architecture decisions only where you depart from the default stack — one ADR (decision record) — A short note: what we chose, why, and which alternatives we rejected (Architecture Decision Record). Six months later nobody has to guess whether a decision was deliberate and whether it’s safe to change. more in the glossary → each (→ 08, 12).

Minimal Day 0: brief → CLAUDE.md → .gitignore → /run with a smoke test → test skeleton with the guards → backups/. The rest grows with the project.

CLAUDE.md skeleton

# CLAUDE.md — <Project>
<pointer to docs/rules/ — see above>

## What this is
<one paragraph: what it does, for whom>

## Stack & how to run
<layer → tech → location>
run: <exact command>

## Policies (override default behavior)
- Never deploy/push without an explicit "deploy". Commit freely; confirm the irreversible (permission map: docs/rules/06).
- Dry-run by default. Prod is sacred; user data is inviolable.
- Talk to me in <language>; I know <languages / technologies>.
- Code: English (identifiers, tests, DB, CLI, keys). Prose: <language>.
- <project-specific hard rules: privacy, domain constraints>

## Current state (<date>)
- <counts, migrations applied, what's live>

Anti-patterns

  • 🚫 Code before the brief — language, monetization and brand added later are a rewrite.
  • 🚫 Thirty questions at once — ask what changes the plan, propose the rest as defaults.
  • 🚫 Silent assumptions (“probably Polish only”, “probably free”).
  • 🚫 Jargon aimed at a non-technical user.
Chapter deep-dive 07Why these rules, examples and stories from projects — what the core deliberately leaves out.

The canonical doctrine is written in English.