The setup laid on top. Ticket untouched. One prompt per step. A person decides between every two prompts.
What is different in this folder.env:PORT=8162. A fresh clone says 8160. Seven folders run on one machine.- The Claude Code setup:
CLAUDE.md,CLAUDE-SETUP.md, the settings, two hooks and two skills. Laid on top and left uncommitted. - git remote
origin: fetch works. The push address isDISABLED_demo_copy_no_push, so nothing can be pushed. README-SETUP.md,WALKTHROUGH.md,.vscode/anddocs/pr/are listed in.git/info/exclude, so git never shows them.
~/Projects/runway-1-steps-start
The steps of this page, in order, each with what to type. The colour of a step's number is its kind. Sections and groups open and close, on the page and in the list on the left, and the two stay the same. Tick a step when it is done, on the page or in the list. Every group and every section counts its done steps. The time beside a step, a group or a section is rounded: ~2 min, or ~2–3 min. A time marked planned is the time of the recorded reference run, which is the work of Claude Code only. Press Start and End on a step and your own time takes its place.
Platform These steps were prepared and run on macOS. They run the same on Linux. On Windows, work inside WSL 2 or a dev container. Other operating systems
Commit the setup Git
The Claude Code setup is uncommitted in this folder. Committing it first keeps the diff of the ticket free of it.
Open the Claude Code panel in the VS Code window of the folder (the Spark icon, top right of the editor), then
The Claude Code setup in this folder is new and uncommitted: CLAUDE.md, CLAUDE-SETUP.md and .claude/ (settings, two hooks, two skills). Read CLAUDE.md first. Check that `make test`, `make lint` and `.claude/hooks/guard-check.sh` pass. Then commit the setup as one commit, in the style of this repository's history. You have my yes for this commit. Do not push. End with `git log --oneline -3` and `git status --short`.
- Three checks pass first:
make testwith 61 passed and 1 skipped,make lint, and the guard's own examples. - One commit with 12 files:
CLAUDE.md,CLAUDE-SETUP.mdand the files under.claude/. .claude/settings.local.jsonstays out. It is listed in.git/info/exclude.- Claude said that it did not run
/review-change, and that it took the explicit yes as the approval for this commit. git status --shortprints nothing.
git log --oneline -3: the new commit is on top ofe02fe7f.
- 23.4 s (0:23) of work by Claude Code.
Ask about the ticket, against the code and its history Claude Code
The ticket says what is wanted. The code and its history say what is already there, and why two earlier attempts stopped.
Read GitHub issue 8 with `gh issue view 8`. Change nothing in this step. Explain the ticket against the code and its history: 1. What does the board do today when two slots on one runway are a few seconds apart? Show me where in the code, with file and line. 2. Two earlier attempts at this rule are in the code (RB-97 and RB-118). For each: who wrote it, when, in which commits, what it does, and why it was left. Use `git log` and `git blame`, and give the commit hashes. 3. What does the ticket leave open? List the questions that I must answer before anyone writes code. Keep it short enough to read in three minutes.
- Today the board accepts both slots. The only check is behind
SEPARATION_CHECK=on, and that setting is off. - RB-97: a list in the memory of the process. It never forgets a cancelled slot, and it forgets everything at a restart. Commits
db99fd3and5da9dbe, switched off by7b5dc34. - RB-118: a minute bucket on each slot, for a unique constraint that was never added. It is wrong at the edge of a minute. Commits
e1826f8,77a2cc4and01a5996. - Nine questions the ticket leaves open. Among them: do released slots count, does the HEAVY rule work in both directions, what exactly is
next_free_at, which error body, and what happens to the old attempts and to the seed data.
git show --stat 7b5dc34andgit show --stat 01a5996. The reasons stand in the two commit messages.
- 40.6 s (0:41) of work by Claude Code.
Ask for two or three options with trade-offs Claude Code
One proposal invites a yes. Two or three complete options force a comparison, and the trade-offs are visible before any code exists.
Give me two or three complete options to implement the ticket, with their trade-offs. Still no code, and write nothing to disk. For each option say: - where the check lives (route, service function, database) and which files change; - what counts as an active slot: planned, released, cancelled; - what happens at exactly 120 seconds, and at exactly 180 seconds after a HEAVY; - how `next_free_at` is computed when several slots are close together; - what happens to the two old attempts (the list in memory with its setting, the bucket column with its skipped test); - what happens to the seed data that already breaks the rule (ORB65 and NLA118 on 09R); - how time is handled in the tests; - what it costs, and what it makes harder later. Put the options side by side in one table at the end.
- Three options. A: the check in the route. B: a service function in
runway_board/services/separation.py. C: a database trigger, plus the service. - A list of what is the same in every option: planned and released slots count, exactly 120 and 180 seconds are accepted, and
next_free_atis found by walking the active slots of the runway. - One table at the end, side by side: where the check lives, the old attempts, the seed pair, two requests at once, the size.
- Claude already named B as its favourite in this answer, before it was asked.
- 83.2 s (1:23) of work by Claude Code.
Ask questions Claude Code
An option that is not understood cannot be chosen. This is the step to ask until every row of the table is clear.
Three example questions. Ask your own
Before I choose, three questions. Still no code. 1. Show me with times how `next_free_at` is found when three slots are close together. 2. In option B, what exactly can still get past the check? 3. What happens to an existing data file when the column `slot_bucket` leaves the model?
- This step is new: no answer to these questions was recorded. The recorded run said the following elsewhere, so an answer can be checked against it.
- The walk starts at the requested time. On a conflict it jumps to that slot's time plus its gap and checks again. Three slots close together give three jumps.
- Under B, a script that writes rows directly gets past the check, and two requests at the same moment can both pass.
- Claude expected an old data file to keep working without
make seed. It called that an inference, to verify on a scratch copy first.
Ask for a recommendation Claude Code
A recommendation is useful when it comes with its weakest point. The prompt asks for the argument against it, and for what would change the answer.
Which option do you recommend, and why? Give me the one reason that decides it, the strongest argument against your recommendation, and what would make you change your mind. Still no code.
- Option B. The reason that decides it: the ticket asks for an answer, not only a refusal, and only Python code that reads the slots table can give the conflicting flight and
next_free_at. - The strongest argument against: the rule is enforced on one path only. Direct writes and two requests at once get past it.
- What would change its mind: another writer than
POST /slots, more than one worker process, or a decision that the database must guarantee the rule.
- 16.7 s (0:17) of work by Claude Code.
Choose, and say why Decision
This decision belongs to the person. Claude recommends. The person chooses, gives the reason and answers the open questions, and the approach note records all of it.
The prompt of the recorded run, as one example. Put your own choice, reason and answers in its place
I choose option B, the service function in `runway_board/services/separation.py`.
Why: the ticket asks for an answer, not only a refusal, so the rule has to be Python code that reads the slots table. B holds the rule in exactly one place, the boundary cases can be tested as plain function calls, and both old attempts leave the code, so a new developer finds one rule and not three. I do not choose C: one process writes slots here, and a rule written twice, in SQL and in Python, is a cost I do not want for a teaching sample. I do not choose A because the route would stop being thin.
My answers to the open questions:
1. Active means planned and released. Cancelled does not count.
2. Exactly 120 seconds is accepted. Exactly 180 seconds after a HEAVY is accepted. One second less is refused.
3. The gap depends on the earlier flight of each pair, in both directions.
4. `next_free_at` is the earliest accepted time at or after the requested time, found by walking the runway's active slots.
5. The 409 uses the `{"error": {...}}` shape, with the code `separation_conflict`, the conflicting callsign and slot time, and `next_free_at`. It names the nearest conflicting flight.
6. RB-97 goes completely: the list, the function, the setting, the fixture, its tests. RB-118 goes too: the bucket function, its tests and the two places that write the column.
7. The column `slot_bucket`: you have my yes to remove it from the model, on one condition. First prove on a scratch copy of a data file that an existing file still works without seeding. If it does not, keep the column in the model, unused, with a comment that says why.
8. Seed data: move NLA118 so the sample data obeys the rule, and add a test that checks the whole seed list against the rule.
9. Two requests at the same moment: not in this ticket. Write it down as a known limit.
Now write the approach note. Read `.claude/skills/ticket-approach/SKILL.md` and follow it for issue 8, with one difference: the decisions are made, so write my answers on the `Decision:` lines and do not ask them again. No code and no tests in this step.- What was chosen in the recorded run: option B. The reasons: the rule in exactly one place, limits that can be tested as plain function calls, and both old attempts out of the code. Not C, because the rule would be written twice. Not A, because the route would stop being thin.
- Claude wrote the approach note in
docs/approach/. The nine answers stand on theDecision:lines D1 to D9, in the person's words. - It found three decisions that the prompt had not covered and left their lines empty. D10: a request without a slot time when the next whole minute is taken. D11: may the supervisor override the rule. D12: an existing test that plans two slots at one time.
- No code and no tests.
grep -n "Decision:" docs/approach/*.mdshows which lines are still empty.
- 84.2 s (1:24) of work by Claude Code.
Fill the empty decisions Decision
The skill forbids Claude to fill a Decision: line. An empty line that the code later answers by itself keeps the review at Not ready. In the recorded run these decisions came last, after two reviews had said Not ready for this reason alone.
The decisions of the recorded run, as one example
Three decisions are still mine: D10, D11 and D12. D10: a request without a slot time takes the next whole minute, and it is refused when that minute is too close to another slot. A slot at the default time is a slot like any other, so the first acceptance criterion applies. The 409 gives `next_free_at`, so the caller knows which time to send. D11: no position can override the rule, also not the supervisor. The ticket names no exception, and a rule that the supervisor can switch off is how RB-97 ended. D12: keep the test. Change it so that it still proves what it was written to prove. Write each on its `Decision:` line in the approach note. Change no code.
- This step is new as a step of its own. In the recorded run D10 and D11 were the first half of the last prompt, and D12 was answered inside the build prompt.
- Recorded: both answers stand on their
Decision:lines, with the reasons and the date. No code changed. - Deciding here is what the recorded run teaches: no code changed between its second review (Not ready) and its third (Ready). Two lines in the note did.
- No time of its own. In the recorded run the decisions were part of the last prompt (137.1 s with the final review).
Tests first, one or more per criterion, with a controlled clock Claude Code
A test written before the code states what done means. Every slot time is a fixed value, so the result is the same on any day: the clock is controlled, not read.
Tests first. Make a branch for the ticket. Run `make test` once and note the numbers. Then write the tests from the note, and no application code yet: - at least one test for each of the four acceptance criteria, named so that I can see which criterion it proves; - every slot time is a fixed value. No test reads the real clock; - the limits themselves: 119, 120 and 121 seconds, 179 and 180 seconds after a HEAVY, a new slot before an existing one and after it, a HEAVY placed before an existing slot; - `next_free_at` with several slots close together, and a check that the time it gives is really accepted; - another runway, a cancelled slot, a released slot. Run only the new tests and show me that they fail for the right reason: the behaviour is missing, not an import error. If you need an empty module so that the tests can import it, say so. Do not make the tests pass in this step.
- A branch,
rb-142-separation, and the baseline: 61 passed, 1 skipped. - 25 new tests in
tests/test_separation.py. Each name starts with its criterion, for exampletest_ac2_slot_179_seconds_after_a_heavy_is_refused. - 16 fail, all at the same assertion: the app answered 201 where the ticket wants 409. No import error.
- 9 pass today. They check that a slot is accepted, and the app accepts everything. Their job starts with the code: they fail when the rule refuses too much.
- No empty module was needed, because every test goes through
POST /slots.
.venv/bin/python -m pytest tests/test_separation.py -q | tail -3. Read one failure: it must be an assertion about the status, not an error.
- 83.3 s (1:23) of work by Claude Code.
Build, in small steps Claude Code
Small steps keep each failure close to its cause. The order is the person's: the service, the route, the removal of the old attempts, the seed data.
Now build it, in small steps, following the steps of the note. Run the tests of each step after it. - The service first, then the route, then the removal of the two old attempts, then the seed data. - For the column `slot_bucket`: do the scratch check I asked for and show me its output before you change the model. - Existing tests that plan two slots close together through the API must change. Change each one so that it still proves what it was written to prove, and tell me which ones you changed. - If the code needs something the note did not plan, add it to the note. Done when `make test` and `make lint` are green and `.venv/bin/ruff format --check .` passes. Give me the numbers before and after, and the list of files changed. Make no commit yet.
- After the build: 84 passed, 0 skipped. Lint and format pass.
- The scratch check ran on a copy of the data file before the model changed. It passed, so the column
slot_bucketleft the model. The real data file kept its checksum, andmake seedwas not run. - One existing test changed:
test_same_time_keeps_creation_ordernow writes its two rows directly. The two RB-97 tests and the five bucket tests went with their code. - NLA118 moved from 9:45 to 11:00 after the base time, and a new test checks the whole seed list.
- Claude noted that D10 and D11 were still empty in the note. After the step before this one, they are not.
make test,make lintand.venv/bin/ruff format --check ., thengit status --short. Nothing is committed.
- 220.5 s (3:40) of work by Claude Code.
Review in the same conversation Skill
The review skill runs the gates and maps every acceptance criterion to a real test. It edits nothing: it reports, and the person decides.
/review-change
- A table of checks, a table from criteria to tests, numbered findings, and a last line that is exactly Ready or Not ready.
- The recorded review: Not ready, with ten findings. One was blocking: a request without
slot_timeis now refused when the next whole minute is too close. D10 was empty, and no test covered it. - It compared
next_free_atwith a brute-force search on 4000 random sets of slots and found no mismatch. - With D10 and D11 decided before the build, this review can come out differently from the recorded one.
- 93.0 s (1:33) of work by Claude Code.
Review by a separate agent Claude Code
The first review ran in the conversation that wrote the code, and that conversation already believes the code is right. A separate agent (a second Claude that gets only the path of the note) does not share that view.
The first half of the recorded prompt. The person decides in the next step
That review ran in the same conversation that wrote the code. I want a second opinion that does not share your view of the change. 1. Start one separate agent. Give it only the path of the approach note and the instruction to read `.claude/skills/review-change/SKILL.md` and follow it exactly, including its rule that it edits nothing. Do not tell it what you think of the change. 2. Put the findings of both reviews in one list. For each finding propose: fix now, later ticket, or no action, with one reason. Change nothing yet. End with the last line of the second review.
- The separate agent ran the same three gates with the same results, and it edited nothing.
- It agreed with the blocking finding, and it found three things the first review missed:
next_free_atwas not tested next to old rows that break the rule, the scratch proof existed only as text, and the test table of the note named tests that did not exist. - One list of 13 findings from both reviews.
- Its last line in the recorded run: Not ready, because D10 and D11 were still undecided.
- 181.5 s (3:02) of work by Claude Code. The recorded prompt also held the next step: the sorting and the fixes. 181.5 s is for both.
Decide on each finding Decision
A finding is a proposal, not an order. The person says which ones are fixed now, which become later tickets, and which need no action.
The sorting of the recorded run, as one example. The numbers follow the recorded list of 13 findings
My decisions on the findings: - Fix now: 1 to 8. Test first where behaviour changes. - Later ticket: 9 (a flight refused by its own released slot) and 10 (one query for each active slot). - At commit time: 11 (four logical changes in one working tree). - No action: 12 and 13. Write every finding and what happened to it into the approach note, under Comments. Run `make test` and `make lint` again and give me the numbers.
- In the recorded run Claude proposed this sorting and carried it out in one prompt. Here the person reads the list first.
- No application code changed. All eight fixes were tests and documents.
- Six new tests: the tie between two equally near slots, old rows 45 seconds apart, two for the default slot time with a fixed time, one for the supervisor, and one for an old data file.
- 90 passed, 0 skipped. Lint and format pass.
- Open the approach note and read the section Comments. Every finding has an outcome.
- No time of its own. It is inside the 181.5 s of the step before.
Show each criterion on the running app Claude Code
Tests prove the code in isolation: they replace the database and call the app inside the test process. A script against the running app proves the real server, the real data file and real HTTP. Then a person looks at the board.
First the script
Tests prove the code in isolation. Now show me each acceptance criterion on the running app. You have my yes to create test flights and slots on the running app in this folder. Do not seed and do not wipe the data file. 1. Start the app with `./start.sh` and check `/health`. 2. Write one script, `scripts/show_rb_142.py`, that I run with one command. It talks to the app over HTTP only (standard library, header `X-Position`). It prints each request and each answer, and it ends with a table: one line per acceptance criterion, PASS or FAIL, with the observed fact that proves it. Exit status 0 only when all four pass. 3. Its own data: new flights with callsigns that start with `ZZ`, slot times on a day far in the future with a random offset, so a second run does not collide with the first. At the end it cancels every slot it created, also when it fails. An option `--keep` leaves them, so I can look at `/board`. 4. For each criterion that changes what is on a runway, the script also reads `/board` and checks that the accepted flight is on the page and the refused flight is not. 5. Run it and show me its full output. Then tell me the address of the board. The script must pass `make lint`. Stop the app at the end.
Then by hand. The script expects a running app
./start.sh .venv/bin/python scripts/show_rb_142.py --keep open http://127.0.0.1:$(grep '^PORT=' .env | cut -d= -f2)/board
When done
./start.sh stop
- The script prints every request and every answer, then one block for each criterion: AC1 to AC4, each PASS, with the observed facts. Exit status 0.
- A refusal is a 409 with the code
separation_conflict, the conflicting callsign and slot time, andnext_free_at. - Without
--keepthe script cancels every slot it created. With--keepthe acceptedZZflights stay on/board, and the refused ones are not there. - The board shows the time of a slot without its day. Look for the
ZZcallsigns that the script prints. - The API cannot delete a flight, so the
ZZflights stay in the data file, without an active slot.
- Read a FAIL line before believing it: first the script, then the app. In the run with skills the first FAIL was a fault in the script (see
LESSONS.md).
- 167.8 s (2:48) of work by Claude Code.
Commit in small commits Git
One logical change per commit lets a later reader find the rule, the removal of each old attempt and the seed change one by one. The plan comes first, as a table.
Commit the work, in small commits. You have my yes to commit. Do not push. 1. First bring the documents up to date, but only the lines this change made untrue: CLAUDE.md (traps that are gone, the number of tests, the new service), ARCHITECTURE.md (the steps of `POST /slots`, the section about unfinished work), README.md (the settings table), `.env.example`. 2. Plan the commits and show me the plan as a table before you make them: one logical change per commit, in the style of this repository's history, the ticket key first. Tests go with the code they test. The removal of each old attempt is a commit of its own. The seed change, the script and the documents are commits of their own. 3. Make the commits. Run `make test` and `make lint` after the last one. End with `git log --oneline main..HEAD`, `git status --short`, and the last line of `make test`.
- The documents first, and only the lines the change made untrue.
- Seven commits: RB-97 removed, the rule, RB-118 removed, the seed data, the script, the documents, the approach note.
- Each commit is green on its own. After the last one: 90 passed.
- The order of the commits is not the order of the work. RB-97 goes first, because its tests expect a slot 30 seconds after another one to be accepted.
git status --shortprints nothing. Nothing is pushed.
- To approve the plan before any commit exists, send points 1 and 2 first, read the table, and then send point 3.
- 128.9 s (2:09) of work by Claude Code.
A last review, until it says Ready Claude Code
The ticket is done when a review by an agent that did not write the code ends with Ready. The work is in commits now, so the agent reviews the branch against main.
The second half of the last recorded prompt
The review must end with Ready before I call this done. Start one new separate agent, give it only the path of the approach note and the instruction to read `.claude/skills/review-change/SKILL.md` and follow it exactly. The work is in commits now, so it reviews `git diff main...HEAD`. If it finds something blocking, fix it, and review again with a new agent, at most two more rounds. Commit the note, and any fix, in the same style as before. Do not push. End with the last line of the last review, `git log --oneline main..HEAD`, `git status --short` and the last line of `make test`.
- Recorded: Ready in the first round, with seven findings, none of them blocking and none fixed.
- Its last line:
Ready: tests, lint and format pass, every acceptance criterion and decision has a real test with fixed times, and none of the seven findings is blocking. - The findings stand in the note under Comments, and the note is committed.
- Nine commits for the ticket on the branch, ten with the setup. 90 passed.
git log --oneline main..HEADandgit status --short.
- 137.1 s (2:17) of work by Claude Code. The recorded prompt began with the decisions D10 and D11. Here they are a step of their own, before the build.
Read the open issues with Claude Claude Code
A finished ticket changes what the other issues mean. Reading them again with the branch in hand shows what to tell the team, and which ticket comes next.
Read the open issues with `gh issue list` and `gh issue view`. Change nothing and close nothing. For each issue say in one or two lines: does this branch change it, answer it, or leave it as it is? Name the file or the test that shows it. Then tell me which issue you would take next, and why.
- This step is new: no answer to this prompt was recorded. The recorded run gives these facts to check an answer against.
- Issue 8, the ticket: done on the branch. All four criteria PASS on the running app.
- Issue 7, released slots never leave the board: untouched. The approach note names it as out of scope. One later ticket belongs with it: a flight is refused by its own released slot.
- Issue 2, two shapes of error body: untouched. The new 409 uses the
{"error": {...}}shape. - Issue 1, the README names
make reset-db: untouched.
gh issue view 7. The question in it is still open, and it is the tower's to answer.
A fresh clone holds no file for Claude Code. Every item below says who added it, in one of these ways.
- Part of the prepared setup The memory file, the settings, the hooks, the skills and the architecture view. Written for Runway Board, from its code. In the prepared folders setups/make.sh copies it from the kit. In the fresh clone, section B builds it with prompts.
- Claude Code wrote it, during the ticket Made or changed while the ticket was carried out. A person read it before the commit.
- Made when the folder was built Belongs to this copy only: its port, its data, its notes. Git never shows it.
The repository comes with its history, and the ticket cannot be done well without it. This history is constructed for teaching. Counted from git: 54 commits, from June 2026 to November 2026, by 3 authors: Ilse Brandt (20), Tomas Wrona (20), Nadia Okoye (14).
A first attempt at the rule exists: RB-97, a list in memory.
Commits db99fd3 and 5da9dbe added a separation check to POST /slots that keeps recent slots in the memory of the process. Commit 7b5dc34 (RB-103) switched it off by default. The ticket has to say what happens to this code.
git log --oneline --grep RB-97 --grep RB-103
A second attempt exists: RB-118, a minute bucket.
Commit e1826f8 added the column slot_bucket, 77a2cc4 a test that is skipped, and 01a5996 a note that the work is parked. The column is written on every new slot and nothing reads it.
git log --oneline --grep RB-118
The README names a command that is gone.
Commit 2d93bb8 removed make reset-db and made make seed the only reset. make seed drops every table before it loads the sample data.
git show --stat 2d93bb8
The history shows how commits are named.
One short line, lowercase, the ticket key first when there is one. The commits of the ticket follow that style.
git log --oneline -12
Where it is used Every cadence reads the history before it proposes anything. Steps: C1 · step 2, Ask about the ticket, against the code and its history.
CLAUDE.mdThe memory filePart of the prepared setupHow to run and test, the traps, the layout, and what needs a person's yes.
| Who added it | Part of the prepared setup. In the prepared folders setups/make.sh copies it from the kit. In the fresh clone, section B builds it with prompts. |
|---|---|
| The steps | No step on this page. |
| Git | New, not committed yet. |
CLAUDE.md
CLAUDE-SETUP.mdA first hour with this setupPart of the prepared setupFor a team member who is new to it: what is here for Claude Code, and how to try each part.
| Who added it | Part of the prepared setup. In the prepared folders setups/make.sh copies it from the kit. In the fresh clone, section B builds it with prompts. |
|---|---|
| The steps | No step on this page. |
| Git | New, not committed yet. |
CLAUDE-SETUP.md
.claude/settings.jsonThe shared settingsPart of the prepared setupThe deny rules and the hooks. The same for everyone on the team.
| Who added it | Part of the prepared setup. In the prepared folders setups/make.sh copies it from the kit. In the fresh clone, section B builds it with prompts. |
|---|---|
| The steps | No step on this page. |
| Git | New, not committed yet. |
.claude/settings.json
.claude/hooks/ruff-format-file.shHook: format the edited Python filePart of the prepared setupAfter Claude Code edits a .py file, ruff formats that one file.
| Who added it | Part of the prepared setup. In the prepared folders setups/make.sh copies it from the kit. In the fresh clone, section B builds it with prompts. |
|---|---|
| The steps | No step on this page. |
| Git | New, not committed yet. |
.claude/hooks/ruff-format-file.sh
.claude/hooks/ · 5 filesHook: the guard for the data filePart of the prepared setupIt blocks make seed and the other commands that wipe the data file, and allows the same command on a scratch file.
| Who added it | Part of the prepared setup. In the prepared folders setups/make.sh copies it from the kit. In the fresh clone, section B builds it with prompts. |
|---|---|
| The steps | No step on this page. |
| Files | .claude/hooks/guard-check.sh new .claude/hooks/guard-data-file.sh new .claude/hooks/guard_check.py new .claude/hooks/guard_data_file.py new .claude/hooks/guard_examples.txt new |
| Git | New, not committed yet. |
.claude/hooks/guard_data_file.py
.claude/skills/ticket-approach/ · 2 filesSkill: /ticket-approachPart of the prepared setupStart a ticket: the approach note. Planning only. The one file it creates is the note in docs/approach. No code, no tests, no stubs.
| Who added it | Part of the prepared setup. In the prepared folders setups/make.sh copies it from the kit. In the fresh clone, section B builds it with prompts. |
|---|---|
| The steps | No step on this page. |
| Files | .claude/skills/ticket-approach/SKILL.md new .claude/skills/ticket-approach/template.md new |
| Git | New, not committed yet. |
.claude/skills/ticket-approach/SKILL.md
.claude/skills/review-change/SKILL.mdSkill: /review-changePart of the prepared setupReview a change before the commit. Read-only. It reports and fixes nothing: the person decides what to change.
| Who added it | Part of the prepared setup. In the prepared folders setups/make.sh copies it from the kit. In the fresh clone, section B builds it with prompts. |
|---|---|
| The steps | No step on this page. |
| Git | New, not committed yet. |
.claude/skills/review-change/SKILL.md
.envThe settings of this folderMade when the folder was builtThe port of this folder and the address of the data file.
| Who added it | Made when the folder was built. make install copies it from .env.example. The kit writes the port. |
|---|---|
| Git | Only in this folder. Git leaves it out, so no commit can contain it. |
.env
runway_board.dbThe data fileMade when the folder was builtAll data of this folder, in one SQLite file.
| Who added it | Made when the folder was built. Made by make seed when the folder was built. |
|---|---|
| Git | Only in this folder. Git leaves it out, so no commit can contain it. |
README-SETUP.mdWhat this folder isMade when the folder was builtThe state of the folder and how it differs from a fresh clone.
| Who added it | Made when the folder was built. Written by setups/make.sh. |
|---|---|
| Git | Only in this folder. Git leaves it out, so no commit can contain it. |
README-SETUP.md
WALKTHROUGH.mdThe steps of this page, as MarkdownMade when the folder was builtThe same steps, to read inside the editor.
| Who added it | Made when the folder was built. Written by notes/build.py --folders. |
|---|---|
| Git | Only in this folder. Git leaves it out, so no commit can contain it. |
WALKTHROUGH.md
.vscode/settings.jsonWindow title and colourMade when the folder was builtThe VS Code window of this folder has the colour of this page's bar.
| Who added it | Made when the folder was built. Written by setups/vscode.sh. |
|---|---|
| Git | Only in this folder. Git leaves it out, so no commit can contain it. |
.vscode/settings.json
.claude/settings.local.jsonThe local settingsMade when the folder was builtThe permission mode of this machine.
| Who added it | Made when the folder was built. Written when the folder was marked as trusted. |
|---|---|
| Git | Only in this folder. Git leaves it out, so no commit can contain it. |
Each acceptance criterion on the running app
One PASS or FAIL line per criterion. The script exists once the change is built. If it says the app does not answer, run ./start.sh first
.venv/bin/python scripts/show_*.py
The board, as the tower team sees it
open http://127.0.0.1:$(grep '^PORT=' .env | cut -d= -f2)/board
All tests
Before the ticket: 61 pass, 1 is skipped
make test
The lint and the format
make lint && .venv/bin/ruff format --check .
The files of the change
Before the commit
git status --short && git diff --stat
The commits of the change
After the commit
git log --oneline origin/main..HEAD && git status --short
/review-changeReview a change before the commitReview the change of a ticket before a commit (tests, acceptance-criteria coverage, CLAUDE.md conventions, missed edge cases, unrelated edits) and end with Ready or Not ready. Read-only; edits nothing.
- Read-only. It reports and fixes nothing: the person decides what to change.
- It runs make test, make lint and the format check, and records each result exactly.
- For every acceptance criterion it names the test that proves it.
- The last line is Ready or Not ready.
| How to start it | Type /review-change in Claude Code, then: optional path to the approach note in docs/approach/. |
|---|---|
| Who can start it | A person only. Claude Code cannot start it by itself (disable-model-invocation: true). |
| In the steps | C1 · step 10, Review in the same conversation |
| Tools | Only these: Read Grep Glob Bash(git diff *) Bash(git status *) Bash(git ls-files *) Bash(git log *) Bash(git show *) Bash(make test) Bash(make lint) Bash(.venv/bin/python -m pytest *) Bash(.venv/bin/ruff check *) Bash(.venv/bin/ruff format --check *) Bash(.claude/hooks/guard-check.sh) |
| Git | New in this folder, not committed yet. |
.claude/skills/review-change/SKILL.md
/ticket-approachStart a ticket: the approach noteWrite a short approach note for a ticket in docs/approach/, then walk the person through its open decisions. Planning only; writes no code or tests.
- Planning only. The one file it creates is the note in docs/approach. No code, no tests, no stubs.
- It reads CLAUDE.md, the code and the git history first, and cites what it finds as path:line.
- It walks the person through the open decisions. It never fills a Decision line itself.
| How to start it | Type /ticket-approach in Claude Code, then: issue number or ticket text; empty = the ticket already in the conversation. |
|---|---|
| Who can start it | A person only. Claude Code cannot start it by itself (disable-model-invocation: true). |
| In the steps | No step on this page types it. |
| Tools | Only these: Read Grep Glob Write Bash(git log *) Bash(git blame *) Bash(git show *) Bash(git grep *) Bash(ls *) Bash(gh issue view *) Bash(gh issue list *) |
| Git | New in this folder, not committed yet. |
.claude/skills/ticket-approach/SKILL.md · template.md
Guard: the data file is not wiped by accidentIt runs before every shell command of Claude Code. It blocks make seed, the other ways to run the seed script, and the common ways to remove the data file.
- The reason: make seed drops every table of runway_board.db before it loads the sample data. The README only says it loads data.
- The same command on a scratch file is allowed: DATABASE_URL=sqlite:///./scratch.db make seed.
- The rule is a small Python file with 56 example commands. guard-check.sh runs them all.
| Event | PreToolUse, tools: Bash |
|---|---|
| Command | "${CLAUDE_PROJECT_DIR}/.claude/hooks/guard-data-file.sh" |
| Registered in | .claude/settings.json |
| Git | New in this folder, not committed yet. |
.claude/hooks/guard-data-file.sh · guard_data_file.py · guard_examples.txt · guard-check.sh
Format the edited Python fileIt runs after every Edit or Write of Claude Code and formats the one .py file that was edited.
- A file that was changed through the shell is not seen by this hook. The gate is the check at the end: ruff format --check.
| Event | PostToolUse, tools: Edit|Write |
|---|---|
| Command | "${CLAUDE_PROJECT_DIR}/.claude/hooks/ruff-format-file.sh" |
| Registered in | .claude/settings.json |
| Git | New in this folder, not committed yet. |
.claude/hooks/ruff-format-file.sh
CLAUDE.mdThe memory fileLoaded into every Claude Code session in this repository.
- How to run and test, the traps, the layout, the conventions, and what needs a person's yes.
- Every line was checked by running it. A wrong line here is repeated in every session.
- Claude Code reads it and usually follows it. Nothing forces it to. The settings and the hooks do the forcing.
| Size | 78 lines |
|---|---|
| Git | New in this folder, not committed yet. |
CLAUDE.md
CLAUDE-SETUP.mdA first hour with this setupFor a team member who is new to the setup.
- What the repository holds for Claude Code, and how to try each part.
| Size | 64 lines |
|---|---|
| Git | New in this folder, not committed yet. |
CLAUDE-SETUP.md
.claude/settings.jsonThe shared settingsIn the repository, so the same for everyone on the team.
- The deny rules: editing .env, and git push.
- The hooks are registered here: which event, which tool, which script.
| Never allowed | Edit(./.env) Write(./.env) Bash(git push *) Bash(git push) |
|---|---|
| Git | New in this folder, not committed yet. |
.claude/settings.json
.claude/settings.local.jsonThe local settingsOnly on this machine. Git leaves the file out.
- The permission mode of this machine. Not part of the team's setup.
| Default mode | bypassPermissions |
|---|---|
| Git | Only in this folder. Git leaves it out, so no commit can contain it. |
.claude/settings.local.json
Give the ticket first
Before any skill that works a ticket
The ticket for this session is GitHub issue 8. Read it with `gh issue view 8`, then show me its title and its acceptance criteria. Change nothing.
Start a ticket with an approach note
Folders with the setup. The ticket is in the conversation
/ticket-approach
Review the change
It ends with Ready or Not ready
/review-change
The whole ticket, with two stops
Folders of cadence 2 and 3. The ticket is in the conversation
/ticket-to-commit
See the plan before any edit
Plan mode. Or click the mode indicator under the prompt box and choose Plan
/plan
CadenceThe rhythm of the work: how often a person decides, and how much the tool does between two decisions.
- The ticket is the same in all three cadences, so only the way of working changes.
| In this repository | Three: step by step, with skills, with the architecture view. |
|---|---|
| Not the same as | A process. It is one ticket, done three ways. |
Memory fileCLAUDE.md. Claude Code loads it into every session in this repository.
- Claude Code reads it and usually follows it. Nothing forces it to.
| In this repository | How to run and test, the traps, the layout, and what needs a person's yes. |
|---|---|
| Not the same as | The settings, which are enforced. |
CLAUDE.md
Deny ruleA line in .claude/settings.json that names something Claude Code may never do.
| In this repository | Two things are denied: editing .env, and git push. |
|---|---|
| Not the same as | A hook, which runs a script and can look at the whole command. |
.claude/settings.json
HookA script that Claude Code runs by itself at a fixed moment, for example before every shell command.
- A hook that runs before a tool call can block the call. Claude Code then reads the reason.
| In this repository | The guard for the data file runs before every shell command. The format hook runs after Edit or Write. |
|---|---|
| Not the same as | A git hook. That one belongs to git and runs at a commit. |
.claude/settings.json
SkillA routine written down once, in .claude/skills/<name>/SKILL.md, and started by its slash name.
- Every skill of this setup can be started only by a person.
| In this repository | Two in the base setup. Five more that run a ticket. Five more for the architecture view. |
|---|---|
| Not the same as | A prompt, which is typed again every time. |
Approach noteA short file in docs/approach, written before any code: the ticket, the options, the decisions, the tests.
- Claude Code never fills a Decision line. A person does.
| In this repository | Written by /ticket-approach or /ticket-options. |
|---|---|
| Not the same as | A plan in the conversation, which is gone when the session ends. |
Acceptance criterionOne numbered sentence of the ticket that a test or a request can show.
- Each one gets one or more tests, and one PASS or FAIL line of the show script.
| In this repository | RB-142 has four. |
|---|---|
| Not the same as | A test. The criterion says what must be true. The test proves it. |
Reference runThe recorded run of a cadence: every prompt, every answer, and the seconds Claude Code worked.
- The seconds do not include the time a person needs to read an answer and to decide.
| In this repository | In the kit, under runs/. A planned time on this page is a reference time. |
|---|---|
| Not the same as | Your own time, which the page measures with Start and End. |
Start it, or start it again
In the background
./start.sh
Stop it
./start.sh stop
Is it running?
./start.sh status
Health check
Expect {"status":"ok","db":"ok"}
curl -s http://127.0.0.1:$(grep '^PORT=' .env | cut -d= -f2)/health
One test
.venv/bin/python -m pytest tests/test_slots.py::test_assign_slot -q
Without the test that reads the real clock
That test fails when the minute changes while it runs
.venv/bin/python -m pytest -m "not wallclock" -q
The guard's own examples
Folders with the setup
.claude/hooks/guard-check.sh
Sample data on a scratch file
The data file stays as it is
DATABASE_URL=sqlite:///./scratch.db make seed
Wipe the data file and load the sample data
It drops every table first. A person types it. The guard hook blocks it for Claude Code
make seed
Read the ticket
RB-142 is GitHub issue 8
gh issue view 8
Where a word came into the code
Change the word
git log --oneline -S'slot_bucket'
Where this folder pushes
The push address is DISABLED_demo_copy_no_push
git remote -v