Maintenance¶
This page is for whoever owns the template for the team.
Repository layout¶
copier.yml questions, variant logic, post-create tasks, files projects own
template/ everything copied into a workspace
AGENTS.md.jinja the agent's instructions (per-variant sections)
standards/ shared rules + enforcement code (the part you'll edit most)
scripts/ fetch_context.py, render_diagrams.py, check_figures.py
{% if kind == 'paper' %}paper{% endif %}/ variant-only folders (empty name = skipped)
docs-site/ this documentation (Sphinx + MyST)
.github/workflows/ docs deployment and template tests
CHANGELOG.md template release history (Keep a Changelog + semver)
Folder names wrapped in {% if … %} render only for that variant. Files ending in
.jinja are templated; everything else is copied verbatim.
Changing a standard¶
Typical examples: new color, different figure aspect ratio, a new writing rule.
Edit the file under
template/standards/.Render a test workspace and check the result (see Testing below).
Add a line under
## [Unreleased]inCHANGELOG.md.Release (below).
Where things live:
To change… |
Edit |
|---|---|
Plot fonts, sizes, spines, colors |
|
Figure helpers, settings capture |
|
Page geometry / figure widths |
|
Document fonts, sizes, captions, |
|
Diagram theme |
|
Rules agents read |
|
Agent workflow |
|
Questions asked at creation |
|
Keep AGENTS.md.jinja short. If you’re adding more than a line or two, the detail
probably belongs in a standards/*.md file that AGENTS.md points to.
Changing the page layout¶
layout.tex must keep the format \def\teamNAME{<number><unit>} (unit in, pt,
pc, bp, cm, or mm) because teamplot parses it with a regex. Existing figures won’t resize themselves: projects must
regenerate figures after updating, so treat a layout change as a minor release and say
so in the changelog.
Changing the stale-annotation tolerance¶
It’s defined twice, deliberately kept in sync: \teamfigtolerance in
teamtufte.sty and STALE_TOLERANCE_MIN in teamplot/__init__.py.
Releasing¶
Copier updates projects to git tags, so every release is a tag.
In
CHANGELOG.md, rename## [Unreleased]to## [1.2.0] - YYYY-MM-DD, add a fresh empty## [Unreleased], and update the compare links at the bottom.Update
releaseindocs-site/conf.py.Commit and push to
main:git commit -am "Release 1.2.0" git push
You don’t tag by hand. The
releaseworkflow (.github/workflows/release.yml) runs whenCHANGELOG.mdchanges onmain. For each## [X.Y.Z] - YYYY-MM-DDheading without a tag, it tagsvX.Y.Zon the commit that added the heading and publishes a GitHub release with that changelog section as its notes. It also warns ifdocs-site/conf.pynames a different version. To re-run it, use Run workflow on the workflow’s Actions page; existing tags and releases are left alone.
Version numbers:
MAJOR: a project needs manual migration (renamed/moved files, changed questions, removed helpers).
MINOR: new rules, helpers, variant features, layout changes.
PATCH: fixes and wording.
Updating existing projects¶
In each workspace (with a clean git tree):
copier update --trust # to the latest tag
copier update --trust --vcs-ref v1.2.0 # or a specific one
Copier re-renders the template with the project’s saved answers
(.copier-answers.yml) and three-way-merges the result:
Template-owned files (
AGENTS.md,standards/,scripts/,.latexmkrc) update.TASK.mdandCHANGELOG.mdare never touched (_skip_if_existsincopier.yml).Deliverables (notebook, writeup,
main.tex) keep local edits; template changes to them are merged in.Conflicts appear as inline conflict markers (or
.rejfiles); resolve them like a git merge.
Then add a line to the project’s CHANGELOG.md:
### Changed
- Template 1.1.0 → 1.2.0 (see agent-workspace-template CHANGELOG).
and regenerate figures if the release notes say the style or layout changed.
Adding a variant¶
Add the choice to
kindincopier.yml.Create
template/{% if kind == 'newkind' %}folder{% endif %}/with its starter files.Add an
{%- elif kind == 'newkind' -%}section toAGENTS.md.jinja.Document it in
docs-site/usage/variants.md, test, release as minor.
Testing¶
The test-template workflow renders every variant, runs the Python helpers, builds
both paper styles with LaTeX, and checks the stale-annotation logic. To test locally:
copier copy --trust --defaults --vcs-ref HEAD --data kind=paper . /tmp/t-paper
cd /tmp/t-paper/paper && latexmk main.tex
--vcs-ref HEAD renders your latest commit; commit first, since uncommitted changes
aren’t included.
The documentation site¶
Source is in docs-site/ (Sphinx with MyST Markdown and the Furo theme). The
docs workflow builds it on every push to main and deploys to GitHub Pages.
One-time setup: repo Settings → Pages → Build and deployment → Source: GitHub Actions.
Local preview:
pip install -r docs-site/requirements.txt sphinx-build -W -b html docs-site docs-site/_build/html
reference/standards.mdincludestemplate/standards/*.mddirectly, so the rules are documented from a single source and never drift.Example images live in
docs-site/_static/img/; regenerate them when the house style changes.