Repository navigation
Description
Split from #25.
Problem The repository template renders no .gitignore. A repository that devops repos onboard creates thus ignores neither .venv/ nor .data/. On 2026-11-30, dan-petty/devcontainer-features listed .data/ as untracked after devops roadmap intake, because its .gitignore does not list the folder. ## Why this part is deferred Issue #25 changes the .gitignore of this repository only. The rendered file needs its own content decision, a row in templates/README.md and a case in tests/test-repository-template.sh. ## Acceptance criteria - The repository template SHALL render a .gitignore that lists .data/. - mise exec -- tests/test-repository-template.sh SHALL pass with a case for the rendered .gitignore. - A repository that the template renders SHALL list no path under .data/ in git status --short after devops roadmap intake.
Proposed design
Problem statement
The Copier template of a new repository renders no .gitignore. Thus a repository that devops repos onboard creates ignores neither .venv/ nor .data/. On 2026-11-30, dan-petty/devcontainer-features listed .data/ as untracked after devops roadmap intake. This change adds templates/repository/.gitignore with .data/ and .venv/. It adds the file to _skip_if_exists of copier.yml, so the repository keeps its own entries. It adds a row in templates/README.md and cases in tests/test-repository-template.sh.
Acceptance criteria
Requirement: The template renders a .gitignore
The repository template SHALL render a .gitignore in each repository that Copier renders.
Scenario: The default answers hold the file
- WHEN
mise exec -- tests/test-repository-template.shrenders the template with the default answers - THEN The case
defaults: filespasses, and the render holds.gitignore.
Requirement: The rendered .gitignore lists the two folders
The rendered .gitignore MUST list .data/ and .venv/, each on a line of its own.
Scenario: The entries of the rendered file
- WHEN
mise exec -- tests/test-repository-template.shchecks the.gitignoreof the default render - THEN The case
defaults: .gitignorepasses with the entries.data/and.venv/.
Requirement: The repository keeps its own .gitignore
copier update MUST keep each entry that a repository adds to its .gitignore.
Scenario: An update after the repository changes the file
- WHEN
mise exec -- tests/test-repository-template.shupdates a render whose.gitignoreholds an entry of its own - THEN The case
update: each file of the repository keeps its contentpasses, and the entry stays.
Requirement: Pending a person after the merge
A repository that devops repos onboard creates from the release MUST list no path under .data/ in git status --short after devops roadmap intake.
Scenario: The live proof in a new repository
- WHEN A person runs
devops roadmap intakein a repository thatdevops repos onboardcreated from the release, and then runsgit status --short - THEN
git status --shortlists no path under.data/.
Existing Tool Considered
No alternatives check has run. The Python.gitignore file of the maintained github/gitignore collection of GitHub lists .venv and the Python caches. It lacks .data/, and it holds entries that a repository of another language does not need. Copier renders the static file. The change writes no code, so no written build cost applies.
Key questions
- Which entries does the rendered
.gitignorehold?:.data/and.venv/, one on each line, and no other entry. The issue names.data/. The test of this repository puts the virtual environment in.venv. (best practice) [sources: tests/test-repository-template.sh, templates/README.md]- Chosen: The two entries only. The issue names both folders, and the tools of this repository use
.venv. - Rejected: The whole
Python.gitignoreofgithub/gitignore. It holds entries for Python files only, and it lacks.data/. - Rejected: The entries of
Python.gitignoreand.data/. The extra entries ignore files that a repository of another language does not make.
- Chosen: The two entries only. The issue names both folders, and the tools of this repository use
- Who owns the rendered
.gitignoreafter the first copy?: The repository. The change adds.gitignoreto_skip_if_existsofcopier.yml, socopier updatekeeps each entry that the repository adds. (best practice) [sources: templates/README.md, copier.yml]- Chosen: Add it to
_skip_if_exists.copier updatewrites each other file again, which would drop the entries of the repository (templates/README.md, Owners). - Rejected: The template owns the file. Each update would replace the
.gitignoreof each rendered repository. - Rejected: A question gives the entries. The entries need no answer, so a question adds a prompt and a key of
.copier-answers.ymlwith no gain.
- Chosen: Add it to
- Does the template render the file with Jinja or as a plain file?: As a plain file,
templates/repository/.gitignore. The content holds no answer, so it needs no Jinja. [sources: templates/README.md, templates/repository/.pre-commit-config.yaml] - Which lists of
tests/test-repository-template.shhold the new file?: The listcommonadds.gitignore, so the casedefaults: filesholds it. The listkeptadds.gitignore, so the update and recopy cases keep the entries of the repository. [sources: tests/test-repository-template.sh]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Dec 1, 2026
Both concern which files the repository template renders, but #11 deletes existing rendered files while the candidate adds a new .gitignore file.devops-cli-service commentedon Dec 1, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.