22
33Instructions for Claude Code working in this repository.
44
5- Quality conventions (git, docs, quality, scope) are defined in
6- ` docs/solid-ai-templates/ ` — a git submodule from
7- [ Imbra-Ltd/solid-ai-templates] ( https://github.com/Imbra-Ltd/solid-ai-templates ) .
5+ Quality conventions defined in ` docs/solid-ai-templates/ ` (submodule).
86Key references:
97- ` docs/solid-ai-templates/base/git.md ` — git workflow, branching, PRs
108- ` docs/solid-ai-templates/base/docs.md ` — documentation rules, ADRs, writing style
@@ -16,17 +14,16 @@ Key references:
1614Project-specific overrides and additions follow below.
1715
1816
19- ## Project identity
17+ ## 1. Project
2018
2119- ** Name** : tutorial-git (Git Tutorial — Code with Branko)
2220- ** Owner** : Branimir Georgiev — braboj
2321- ** Repo** : github.com/braboj/tutorial-git
2422- ** Stack** : Astro static site, Markdown content, draw.io diagrams
2523- ** Hosting** : GitHub Pages via GitHub Actions
26- - ** Domain** : braboj.github.io /tutorial-git (codewithbranko.com pending)
24+ - ** Domain** : braboj.me /tutorial-git (codewithbranko.com pending)
2725
28-
29- ## Project structure
26+ ### 1.1 Project structure
3027
3128```
3229chapters/ # SSG-agnostic tutorial content (canonical)
@@ -48,41 +45,27 @@ assets/
4845 doc/
4946 uml/
5047astro-site/ # Astro build (reads directly from chapters/)
51- docs/ # Legacy MkDocs content (reference, not active)
48+ docs/ # Project docs, decisions, dev journal
5249 solid-ai-templates/ # Submodule — Imbra-Ltd/solid-ai-templates
5350```
5451
5552
56- ## Scope guard override
53+ ## 2. Conventions
5754
58- Extends ` base/scope.md ` with tutorial-specific boundaries:
59- - One chapter per session is the default scope for content work
60- - Diagram, exercise, and quiz changes within that chapter are in scope
61- - Restructuring other chapters, creating new projects, or adding
62- infrastructure is out of scope unless explicitly requested
55+ ### 2.1 Git
6356
64- ## End-of-session checklist
65-
66- Before ending a session, verify all of the following:
67-
68- 1 . ** Dev journal** — add a session entry to ` docs/dev-journal.md `
69- (date, tool, key changes, PRs merged, issues closed/created, open issues)
70- 2 . ** CLAUDE.md** — update if project structure or conventions changed
71- 3 . ** README.md** — update if chapter list, links, or setup instructions changed
72- 4 . ** ONBOARDING.md** — update ` docs/ONBOARDING.md ` if prerequisites,
73- setup steps, or project structure changed
74- 5 . ** PLAYBOOK.md** — update ` docs/PLAYBOOK.md ` if operational
75- workflows or file paths changed
76- 6 . ** solid-ai-templates** — check if upstream submodule needs updates
77- based on new patterns or conventions discovered during the session
78- (e.g. new scope rules, documentation rules, quality conventions)
79- 5 . ** Open issues** — close resolved GitHub issues, update or create
80- issues for remaining work
57+ Extends ` docs/solid-ai-templates/base/git.md ` with project-specific rules:
8158
59+ - Feature branches: ` feature/<short-description> `
60+ - Always run ` git checkout main && git pull ` before creating a new
61+ feature branch
62+ - One commit per logical change
63+ - PR title: concise, under 70 characters
64+ - Delete feature branch after merge (local and remote)
8265
83- ## Content conventions
66+ ### 2.2 Content
8467
85- ### Chapter structure
68+ #### Chapter structure
8669
8770Every chapter follows this structure:
8871
@@ -92,7 +75,7 @@ Every chapter follows this structure:
92754 . ` ## Exercises ` — hands-on tasks with verification steps
93765 . ` ## Quiz ` — multiple-choice questions with answers at the bottom
9477
95- ### Writing style
78+ #### Writing style
9679
9780- ** American English** spelling (analyze, not analyse)
9881- ** Git** capitalised in prose, ` git ` lowercase in commands and code blocks
@@ -102,21 +85,24 @@ Every chapter follows this structure:
10285- No inline Practice sections — all practice goes in Exercises
10386- No emojis unless explicitly requested
10487
105- ### Quiz formatting
88+ #### Quiz formatting
10689
10790- Each option on a bullet line: ` - A) ... ` , ` - B) ... `
10891- Vary the correct answer positions — never all the same letter
10992- Answers section at the bottom: ` 1. C — explanation `
11093
111- ### Cross-references
94+ ### 2.3 Cross-references
11295
11396- Reference other chapters by file: ` [Building Blocks](02-building-blocks.md) `
11497- Reference sections within a chapter by heading anchor: ` [Tag Object](#tag-object-labels) `
115- - The remark plugin (` astro-site/src/plugins/remark-rewrite-links.ts ` )
116- rewrites ` NN-slug.md ` links to ` ../slug/ ` at build time — no manual
117- sync needed
98+ - Markdown links must use the ** URL path** (driven by ` section ` frontmatter),
99+ not the filesystem path — the remark plugin
100+ (` astro-site/src/plugins/remark-rewrite-links.ts ` ) rewrites links at
101+ build time
102+ - Recipe pages live in ` chapters/recipes/ ` but their URLs are
103+ ` /playbook/... ` — link to them as ` playbook/X.md ` , not ` recipes/X.md `
118104
119- ### Images
105+ ### 2.4 Images
120106
121107- Source files: ` assets/drawio/ ` (` .drawio ` format)
122108- Exported PNGs: ` assets/images/ `
@@ -125,11 +111,11 @@ Every chapter follows this structure:
125111- ASCII diagrams in markdown serve as fallback and source of truth
126112
127113
128- ## Figure style rules
114+ ### 2.5 Figures
129115
130116Every figure follows these rules. Applies to draw.io XML, PlantUML, and SVG.
131117
132- ### Core principles
118+ #### Core principles
133119
134120- Flat only: no gradients, shadows, glows, or 3D effects
135121- Sentence case for prose labels — filenames and acronyms keep their casing
@@ -138,7 +124,7 @@ Every figure follows these rules. Applies to draw.io XML, PlantUML, and SVG.
138124- One visual grammar per figure — if it needs two, split into two figures
139125- Shapes (circle vs pill vs card) distinguish elements in grayscale
140126
141- ### Palettes
127+ #### Palettes
142128
143129** A — Difficulty** (tier cards):
144130- Beginner: fill ` #EAF3DE ` , border ` #3B6D11 ` , text ` #27500A `
@@ -169,7 +155,7 @@ for readers who use Git tools.
169155- Border ` #D3D1C7 ` , primary text ` #2C2C2A ` , secondary text ` #5F5E5A ` ,
170156 arrow stroke ` #444441 ` , white card ` #FFFFFF ` .
171157
172- ### Typography
158+ #### Typography
173159
174160| Use | Font | Size | Weight | Style |
175161| ---| ---| ---| ---| ---|
@@ -179,7 +165,7 @@ for readers who use Git tools.
179165| Captions, footnotes | Helvetica | 11–12 px | Regular | — |
180166| Descriptive notes, placeholders | Helvetica | 11 px | Regular | Italic |
181167
182- ### Arrow conventions
168+ #### Arrow conventions
183169
184170- Solid 1 px ` #444441 ` , 6 × 6 px chevron head. Labels in clear space, never
185171 on the line.
@@ -191,7 +177,7 @@ for readers who use Git tools.
191177- ** Italic ` #5F5E5A ` label** for named relationships (` attached ` , ` parent ` ).
192178- ** Self-loop** (small arc above box corner) for recursive references.
193179
194- ### Component vocabulary
180+ #### Component vocabulary
195181
196182- ** Card** : rounded rect, rx=5–8, 0.5 px border, 10–12 px inner padding.
197183- ** Pill** : rounded rect with rx = height/2. For branches, tags, short labels.
@@ -202,22 +188,22 @@ for readers who use Git tools.
202188 readability on both light and dark page backgrounds. Export PNGs with
203189 transparent background — the card provides the contrast.
204190
205- ### Commit-chain panel variant
191+ #### Commit-chain panel variant
206192
207193Gray commit circles (diameter 28), branch pills to the right of the
208194commit they point to, italic "HEAD" label above the active branch pill.
209195` *main ` means HEAD is attached to main. Dashed arrow from pill to commit
210196shows the reference relationship. Uses Palette C.
211197
212- ### draw.io file conventions
198+ #### draw.io file conventions
213199
214200- Source files: ` assets/drawio/<name>.drawio `
215201- Naming: ` git-<topic>-<variant>.drawio ` (e.g. ` git-branch-merge.drawio ` )
216202- Readable IDs: ` card-commit-1 ` , ` pill-main ` , ` arrow-3-2 `
217203- All cells ` parent="1" `
218204- XML-escape values: ` & ` → ` & ` , ` < ` → ` < ` , ` > ` → ` > `
219205
220- ### draw.io style string templates
206+ #### draw.io style string templates
221207
222208```
223209# Commit circle (gray):
@@ -245,7 +231,7 @@ endArrow=classic;html=1;strokeColor=#444441;strokeWidth=1;endFill=1;endSize=6;da
245231rounded=1;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#D3D1C7;strokeWidth=0.5;shadow=0;arcSize=5;
246232```
247233
248- ### XML boilerplate
234+ #### XML boilerplate
249235
250236``` xml
251237<mxfile host =" app.diagrams.net" >
@@ -263,7 +249,39 @@ rounded=1;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#D3D1C7;strokeWid
263249```
264250
265251
266- ## Commands
252+ ## 3. Session protocol
253+
254+ ### 3.1 Scope guard
255+
256+ Extends ` base/scope.md ` with tutorial-specific boundaries:
257+ - One chapter per session is the default scope for content work
258+ - Diagram, exercise, and quiz changes within that chapter are in scope
259+ - Restructuring other chapters, creating new projects, or adding
260+ infrastructure is out of scope unless explicitly requested
261+
262+ ### 3.2 Startup
263+
264+ Read all referenced template documents before starting work. Confirm
265+ session scope with the user.
266+
267+ ### 3.3 End of session
268+
269+ Before ending a session, verify all of the following:
270+
271+ 1 . ** Dev journal** — add a session entry to ` docs/dev-journal.md `
272+ (date, tool, key changes, PRs merged, issues closed/created, open issues)
273+ 2 . ** CLAUDE.md** — update if project structure or conventions changed
274+ 3 . ** README.md** — update if chapter list, links, or setup instructions changed
275+ 4 . ** ONBOARDING.md** — update ` docs/ONBOARDING.md ` if prerequisites,
276+ setup steps, or project structure changed
277+ 5 . ** PLAYBOOK.md** — update ` docs/PLAYBOOK.md ` if operational
278+ workflows or file paths changed
279+ 6 . ** solid-ai-templates** — check if upstream submodule needs updates
280+ 7 . ** Open issues** — close resolved GitHub issues, update or create
281+ issues for remaining work
282+
283+
284+ ## 4. Commands
267285
268286``` bash
269287# Astro site (from astro-site/)
0 commit comments