Project guidance for Claude Code (CLI, IDE, and the GitHub Action). The same conventions apply to GitHub Copilot --- see .github/copilot-instructions.md, which is the source of truth for style.
qwt (Quarto Website Template) is a template repository for Quarto websites maintained by the UCD-SERG lab. Downstream repos are created from this template via the GitHub "Use this template" button, so changes here propagate to new books.
Authoritative style guides:
- UCD-SERG Lab Manual (source: https://github.com/UCD-SERG/lab-manual)
- Principles of Scientific Writing (source: https://github.com/Morrison-Lab/psw), for prose
index.qmd,chapters/,appendix-*.qmd--- Quarto source pagesreferences.qmd--- standalone reference page; excluded from the default website render (!references.qmdin_quarto-website.yml), so it isn't part of the normal site build_quarto.yml,_quarto-website.yml--- Quarto project + website config_extensions/--- vendored Quarto extensions (includingcode-language-labels, which labels each code block with its language in HTML and revealjs output; vendored fromd-morrison/code-language-labels)latex-macros/--- git submodule for shortcode/macro definitions (see.gitmodules)R/,man/,DESCRIPTION,NAMESPACE--- the project is also a small R packagereferences.bib--- BibTeX bibliographyoffwhite.scss,theme-picker.html--- the website's Light / Off-white / Parchment / Dark theme dropdown (theme-picker.htmlbuilds it,offwhite.scssstyles the two tinted palettes); the choice is saved undermln-theme, shared with the slides and with the other sites on this originpage-navigation.html--- HTML include (format.html.include-after-body) that adds floating previous/next arrows in the page margins and fixes navbar highlighting now that Home is in the sidebar; vendored fromMorrison-Lab/lbt(a private repo, so not linked)anchor-landing.html--- HTML include (format.html.include-after-body) that keeps the reader's place while equations and images change the page height (the same file as inMorrison-Lab/lds)styles.css--- website styling;styles-reveal.scss,qwt-reveal-toggle.html(the same four-theme dropdown for slides), and therevealjs-*.luafilters drive the reveal.js slide outputassets/,images/--- static image and asset files (site pages, docs, CI/PR screenshots).github/workflows/--- CI workflow definitions.github/scripts/--- helper scripts used by workflows.github/instructions/--- path-scoped Copilot rules that attach by file glob (see.github/copilot-instructions.md)CONTRIBUTING.md--- contributor guide_site/,_freeze/,.quarto/--- build artifacts (do not edit by hand)
Mirrors .github/copilot-instructions.md. Key points:
- Lists of 3+ items: use bullet lists rather than comma-separated prose. Always leave a blank line before a markdown bullet list (especially in
.qmdfiles). - Code chunks: HTML output folds code by default:
_quarto-website.ymlsetscode-fold: true(withcode-tools: true, so readers can show all code at once), as rme does. Keep the default when the output (plot, table) is the point and the code is incidental. Set#| code-fold: falseon tutorial code, short examples, code that is the main focus, and chunks where the console output is the main content. - R style: respect
.lintr.R. Runlintr::lint_dir()before declaring R changes done. - Navigation:
_quarto-website.ymldefines a docked sidebar becausepage-navigation: truebuilds its previous/next links from the sidebar. Add each new page to both the navbar and the sidebar, in the same order. Keep Home as the first sidebar entry and keeppage-navigation.htmlincluded, which fixes the navbar highlighting that entry would otherwise break (see the README's "Page navigation" section). - Quarto chunks: prefer chunk options as YAML-style
#|directives, not as inliner, opt = valarguments.
- Don't edit generated files:
README.mdis built fromREADME.Rmd;_site/and_freeze/are build outputs. - Local preview:
quarto preview(live reload). Full build:quarto render. When verifying a single edited page, render just that page (quarto render <file>.qmd --to html) rather than the whole site --- the/rendercommand is for the full build. - Submodules:
latex-macros/is the only git submodule (see.gitmodules). Rungit submodule update --init --recursiveafter cloning. - Spell check: words go in
inst/WORDLIST(see.github/workflows/check-spelling.yaml). Update the wordlist instead of disabling the check. - Link check: tuned in
lychee.toml; prefer fixing broken links over adding exceptions. - Other CI checks: workflows also verify bibliography DOIs (
check-bibliography-dois.yml) and flag non-standard characters (check-non-standard-chars.yaml). Fix the flagged source rather than relaxing the check. - Dependencies: Dependabot auto-updates the
latex-macrossubmodule and GitHub Actions (see.github/dependabot.yml); don't bump those by hand unless a PR needs it.
.claude/settings.json declares the Morrison-Lab marketplace (source:
Morrison-Lab/ai-config) and enables
its ai-config@Morrison-Lab plugin, along with the posit-dev-skills and sembr
marketplaces this template also carries, matching
Morrison-Lab/qbt. Declaring is not
installing: a local session still needs claude plugin install ai-config@Morrison-Lab
once. Because this is a template repository, this declaration is copied once into
every repo created from it --- an omission here silently ships to every downstream
site.
- Keep PRs scoped --- bug fixes shouldn't smuggle in refactors.
- Write commit messages and PR descriptions explaining the why, not just the what.
- Don't bypass CI failures (spell check, link check, lint, bibliography DOIs, non-standard chars) --- fix the underlying issue.
- Don't commit
_site/or_freeze/changes unless that is genuinely the intent of the PR.
- Adding new top-level dependencies (R packages, Quarto extensions) without a clear reason; this is a template, so every dependency lands in every downstream book.
- Reformatting unrelated files.
- Inventing URLs or citations --- only use sources actually present in
references.bibor explicitly provided.
This repository follows the maintainer's cross-project agent rules in Morrison-Lab/ai-config. If your harness has not already loaded them (Claude Code loads them through the ai-config plugin), read AGENTS.md before starting work, and follow it alongside this file. This file's own instructions add to those rules, and win only where they are more specific.