Commit guideline copies with projects and allow single-number versioning

This commit is contained in:
Jan Doubravský
2026-08-18 13:08:06 +02:00
parent 78f1f863bf
commit 950e946004
11 changed files with 300 additions and 25 deletions
+25 -1
View File
@@ -47,6 +47,7 @@ Dokumentace/
│ ├── ZSCALER_CERTIFICATE.md # Cert setup for Node, Python, git, cargo
│ └── ZscalerRootCertificate-2048-SHA256.crt
├── check_versions.py # Reports projects whose guideline copies are behind
└── CHANGELOG.md # History of this repository
```
@@ -71,9 +72,32 @@ Where the two disagree, **the design document wins**.
1. Copy `Project template/PROJECT.md` and `Project template/CHANGELOG.md` into the project root and write a `README.md` — all three are committed.
2. Build `.gitignore` from `Project template/.gitignore` plus the `.gitignore` of the matching language folder.
3. Copy `Claude/AGENTS.md` and the matching `DESIGN_DOCUMENT*.md` into the project root — these are **not** committed, they come from here.
3. Copy `Claude/CLAUDE.md`, `Claude/AGENTS.md` and the matching `DESIGN_DOCUMENT*.md` into the project root. This repository is their source of truth, but the copies **are committed** with the project — see "Guideline copies in projects" below.
4. For Python, follow `Python/TEMPLATE.md` to generate the project skeleton.
### Guideline copies in projects
`CLAUDE.md`, `AGENTS.md` and the matching `DESIGN_DOCUMENT*.md` live in the root of every project and
are **committed there**. They are duplicated on purpose:
- A checkout of an old commit carries the rules that applied to that code. Kept only here, the
guidelines are always "latest" and the pairing is lost.
- A fresh clone — another machine, CI, Claude Code on the web or a remote agent — has to work
standalone. `CLAUDE.md` and `AGENTS.md` are only picked up from the repository root.
- Drift becomes visible: `git log DESIGN_DOCUMENT.md` shows when a project was last synchronised.
Three rules keep the copies from rotting:
- **Never edit a copy inside a project.** Changes go into this repository and are copied outward.
- **Project-specific deviations belong in `PROJECT.md`**, which is project-owned and already on the
session read list. That is also where extra files to read (for example a generated `CONTEXT.md`)
are named.
- **Sync commits stand alone**, in the form
`docs: sync guidelines to AGENTS v6 / DESIGN_DOCUMENT v9`. They do not go into the project
`CHANGELOG.md` — they are not a change to the product.
Run `check_versions.py` from this repository to list every sibling project whose copies are behind.
### Skills
The skills in `Claude/skills/` are the source of truth; the copies Claude Code actually runs live in