Skip to content

Stop shipping template machinery: remove docs/, trim CLAUDE.md, drop copier answers - #11

Merged
albertotb merged 4 commits into
mainfrom
claude/react-template-modernize-7q6egv
Aug 10, 2026
Merged

Stop shipping template machinery: remove docs/, trim CLAUDE.md, drop copier answers#11
albertotb merged 4 commits into
mainfrom
claude/react-template-modernize-7q6egv

Conversation

@albertotb

@albertotb albertotb commented Aug 10, 2026

Copy link
Copy Markdown
Member

Everything about how backend/ is produced leaves this repo — it's python-copier-template's business, and anything left here gets copied into every project made from the template. Paired with python-copier-template#41, which now owns that documentation.

1. docs/ deleted

docs/backend-sync.md was its only file: it duplicated the sync workflow (drift risk) and shipped into downstream projects describing a sync that never runs for them. Its content now lives upstream in python-copier-template's README — a table of both render targets with their answers, the subdirectory-specific adjustments, and the branch-protection requirement — right next to the workflows it describes, following the convention that repo already had for the python-template sync.

2. CLAUDE.md trimmed to what a generated project needs

The ownership-model section is gone: those rules only apply to the template repo, and every project created from the template inherits this file, where they are false (their backend/ is theirs to edit). What remains is 18 lines — commands for both halves, the /api prefix contract, and a note to keep GET /health since compose and CI depend on it.

3. README is purely user-facing

Removed the ownership-model paragraph, both python-copier-template links and the copier-update guidance. The structure block just describes the two halves; backend-only projects are pointed at python-template (public, so the link works for anyone). Kept one self-contained line at the bottom so a maintainer of this repo doesn't hand-edit backend/ and lose it at the next sync. Also refreshed: the Checks section lists the Docker workflow, and step 2 mentions the pyproject.toml fields to rename.

4. backend/.copier-answers.yml dropped

  • The sync job never reads it — it renders from answers hardcoded in its workflow (copier copy, not copier update).
  • "Use this template" copies files, not a copier relationship — downstream projects have nothing to copier update, exactly like python-template (whose sync also deletes the file).
  • copier update on an embedded subdirectory is unsupported anyway — verified against backend/: copier resolves the template's latest tag against the recorded dev commit and refuses (You are downgrading from 0.2.post25.dev0+d788f09 to 0.2).
  • The recorded _src_path pointed at a private repo, a dead end for anyone using this template.

Backend ruff + pytest stay green and the version still resolves from git metadata (0.1.dev15+g8ec7cc6) with the file gone — nothing functional depended on it. #41 drops the file in its render too, so the first sync is a no-op for this decision.

Verification

Frontend lint + tests and backend pytest green; no dangling references to the removed doc or to CLAUDE.md remain in the README, workflows or docs.

🤖 Generated with Claude Code

https://claude.ai/code/session_011texLkDBELWbXsBf6San3M

claude added 2 commits August 10, 2026 12:00
Nothing reads the answers file: the sync job renders from answers
hardcoded in its workflow, and this repo is consumed through GitHub's
"Use this template", which copies files without any copier relationship
— so there is nothing for `copier update` to update downstream. Running
it against the embedded subdirectory is unsupported anyway (copier
compares template tags against the recorded dev commit and refuses as a
downgrade), and the recorded _src_path pointed at a private repo, which
would be a dead end for anyone using a public template.

This mirrors the python-template sync, which also drops the file.
python-copier-template#41 is updated to match, so the first sync stays a
no-op for this decision.

Docs corrected accordingly: the render recipe is the source of truth for
re-rendering, "Starting a project" no longer promises copier updates and
points at python-copier-template for standalone services, and the Safety
section now lists the Docker check alongside Backend and Contract.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011texLkDBELWbXsBf6San3M
People starting a project from this template do not need to know how
backend/ is produced. Removed the ownership-model paragraph, the
python-copier-template links and the copier-update guidance; the
structure block now just describes both halves. Backend-only projects
are pointed at python-template instead.

The bot-ownership rules stay where maintainers (and Claude) look for
them: docs/backend-sync.md and CLAUDE.md, with a one-line pointer at the
bottom of the README so nobody hand-edits backend/ by accident.

Also refreshed: the Checks section now lists the Docker workflow, and
step 2 mentions the pyproject fields to rename.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011texLkDBELWbXsBf6San3M
@albertotb albertotb changed the title Drop backend/.copier-answers.yml and correct the docs Drop backend/.copier-answers.yml; keep the README user-facing Aug 10, 2026
The sync mechanism is python-copier-template's, and it now documents both
render targets in its own README, next to the workflows. Keeping a copy
here duplicated it (drift risk) and shipped it into every project created
from this template, where it describes a sync that never runs.

What this repo still needs — do not hand-edit backend/ — stays in
CLAUDE.md, together with the two subdirectory adjustments worth knowing
and a note telling downstream projects to delete the section. README
keeps its one-line pointer, now self-contained.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011texLkDBELWbXsBf6San3M
@albertotb albertotb changed the title Drop backend/.copier-answers.yml; keep the README user-facing Stop shipping template-machinery docs; drop backend/.copier-answers.yml Aug 10, 2026
Drop the ownership-model section entirely: the sync only concerns the
template repo, and every project created from this template inherits this
file, where those rules are false. What is left is commands for both
halves and the two conventions worth preserving (the /api prefix
contract and the /health endpoint CI depends on).

Pointers that referenced it are now self-contained.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011texLkDBELWbXsBf6San3M
@albertotb albertotb changed the title Stop shipping template-machinery docs; drop backend/.copier-answers.yml Stop shipping template machinery: remove docs/, trim CLAUDE.md, drop copier answers Aug 10, 2026
@albertotb
albertotb merged commit 8c3efb3 into main Aug 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants