···11+# GitHub Copilot / AI agent instructions
22+33+Purpose: help an AI coding agent be immediately productive in this repository.
44+55+- Big picture
66+ - Static site built with MkDocs + Material theme. Sources live in `markdown/`; generated site is written to `public/` ([mkdocs.yml](mkdocs.yml)).
77+ - Theme customizations and build hooks are in `overrides/` (Python hooks + theme assets).
88+ - A parallel Gemini site lives in `gmi/` (different format, separate publishing flow).
99+ - Cloudflare Pages / Workers integration: see `wrangler.jsonc` (publishes assets from `public/`).
1010+1111+- Key workflows (concrete commands)
1212+ - Install dependencies (preferred): `pipenv install` (or `pip install -r requirements.txt`). See [Pipfile](Pipfile) and [requirements.txt](requirements.txt).
1313+ - Local preview: `mkdocs serve --watch overrides --watch-theme --livereload` or `pipenv run dev` (see `Pipfile` scripts and [mkdocs.yml](mkdocs.yml)).
1414+ - Build site: `pipenv run build` or `pipenv run build -f mkdocs.readthedocs.yml` (build targets in `Pipfile` and `build.sh`). `build.sh` copies favicon into `public/` after build.
1515+ - Cloudflare deploy (manual): `npm run deploy` -> `wrangler deploy` (see `package.json` and [wrangler.jsonc](wrangler.jsonc)). CI deploy logic uses `npx wrangler pages publish` in `bin/deploy.sh` when running under CI.
1616+ - CI: deployments happen via GitLab CI; do not rely on a repository-local Docker CI image.
1717+1818+- Project-specific conventions & patterns
1919+ - Content separation: author-managed Markdown in `markdown/` is canonical. Do not edit `public/` — it is generated.
2020+ - Theme overrides and custom assets live in `overrides/`; changes there affect build behavior and the site theme.
2121+ - The build copies `assets/images/favicon.png` to `public/favicon.ico` after building (see `build.sh` and `bin/build.sh`). Keep favicon at that path.
2222+ - Python environment targets Python 3.13 (see `Pipfile`). The repo commonly uses `pipenv` and a `.venv` pattern in local scripts (`bin/localdev.sh`).
2323+ - CI: deployments happen via GitLab CI and `bin/deploy.sh` (see `wrangler.jsonc` for Cloudflare Pages configuration).
2424+2525+- Integration points & external dependencies
2626+ - Cloudflare Pages / Workers via `wrangler`/`wrangler.jsonc` (assets directory: `./public`).
2727+ - CI builds run on GitLab. Avoid referencing the `docker/` folder — it may be moved to a separate repo.
2828+ - `npm` is used only for `wrangler` dev/deploy and Docker convenience scripts (`package.json`).
2929+3030+- Helpful files to inspect
3131+ - Repository README: [README.md](README.md)
3232+ - MkDocs config: [mkdocs.yml](mkdocs.yml)
3333+ - Build scripts: [build.sh](build.sh) and [bin/build.sh](bin/build.sh)
3434+ - CI/deploy: [bin/deploy.sh](bin/deploy.sh) and [wrangler.jsonc](wrangler.jsonc)
3535+ - Python deps: [Pipfile](Pipfile) and [requirements.txt](requirements.txt)
3636+ -
3737+3838+- What NOT to do
3939+ - Do not edit generated files under `public/` directly — change sources in `markdown/` or `overrides/`.
4040+ - Avoid changing `site_dir` or `assets` layout without verifying `wrangler.jsonc` and `bin/deploy.sh` updates.
4141+4242+- If you need clarification
4343+ - Ask the maintainer which mirror/CI (GitLab primary) you want to target before modifying CI configs.
4444+4545+- Next steps
4646+ - If you want, I can expand the CI section with example GitLab job snippets or add examples for contributing patches.
4747+4848+- Commit attribution
4949+ - Adopt the `Assisted-by` commit trailer for AI-assisted changes to comply with attribution policies.
5050+ - Required trailer format (commit footer):
5151+5252+```
5353+Assisted-by: <Model Name> via <Tool Name>
5454+```
5555+5656+ - Example:
5757+5858+```
5959+Assisted-by: GLM 4.6 via Claude Code
6060+```
6161+6262+ - Repository also requires Linux DCO sign-off for patches. Ensure commits include `Signed-off-by:` lines in the footer alongside `Assisted-by:` when applicable.
6363+6464+If any section is unclear or you want deeper examples (e.g., contributing workflow, CI job templates), tell me which area to expand.
6565+6666+- Example: GitLab CI snippet
6767+ - Minimal job that builds the site and publishes to Cloudflare Pages using `wrangler`.
6868+6969+```yaml
7070+stages:
7171+ - build
7272+ - deploy
7373+7474+build_site:
7575+ stage: build
7676+ image: node:20-bullseye
7777+ script:
7878+ - pip install pipenv
7979+ - pipenv install --deploy --ignore-pipfile
8080+ - pipenv run build
8181+ artifacts:
8282+ paths:
8383+ - public/
8484+8585+publish_pages:
8686+ stage: deploy
8787+ image: node:20-bullseye
8888+ dependencies:
8989+ - build_site
9090+ script:
9191+ - npm install -g wrangler
9292+ - npx wrangler pages publish public --project-name "$CF_PAGES_PROJECT_NAME" --branch "$CI_COMMIT_BRANCH"
9393+ only:
9494+ - main
9595+```
9696+9797+ - Notes: set `CF_PAGES_PROJECT_NAME` in CI variables; the repo's `bin/deploy.sh` also contains an example `npx wrangler pages publish` invocation used by CI.