- ErgoDocs is the MkDocs Material documentation site for Ergo.
- Docs live in
docs/; site config and nav live inmkdocs.yml. - Maintenance scripts live in
tools/.
- Default to caveman-style brevity for all Codex responses in this project.
- Keep answers terse, direct, and low-filler.
- Prefer short bullets or compact paragraphs.
- Do not add long explanations unless explicitly asked.
- Preserve technical accuracy and call out uncertainty.
- Never compress or alter code, commands, file paths, identifiers, logs, stack traces, or error messages.
- When making changes, summarize only what changed and how to verify it.
- Ask at most one clarifying question when blocked; otherwise make a reasonable assumption and proceed.
- Install:
python -m pip install -r requirements.txt - Serve locally:
./run.sh - Build:
.venv/bin/mkdocs build --site-dir /tmp/ergodocs-site-check - Use the repo
.venvonly. Do not activate stale temporary envs such as.tmp_mdtest; if Codex auto-enters one, remove it from~/.codex/history.jsonl.
docs/: published docs and maintainer docs.docs/start_here.md: maintainer map for workflows, tools, and repo hygiene.tools/source_watch.py: source-linked docs scanner.tools/docs_update_candidates.py: shared page-aware candidate builder used by weekly issues and AI draft PRs.tools/source_watch_inventory.py: generates/checksdocs/contribute/source-watch-inventory.mdfrom pagesource_repos.docs/contribute/ecosystem-repo-watchlist.md: broad maintainer reference list for ecosystem repos without dedicated docs pages; not active Source Watch metadata.tools/discord_dev_digest/discord_dev_digest.py: exports Discord development chat and generates source-verification leads.tools/discord_dev_digest/state/: ignored local Discord exports and digest reports.tools/weekly_docs_prs.py: opens/updates per-page source-review issues from Source Watch JSON.tools/ai_docs_draft_prs.py: optional GitHub Models-assisted draft PR creator from Source Watch JSON.tools/nav_audit.py: navigation coverage check.tools/structure_audit.py: section structure check..github/workflows/docs-quality.yml: PR build and docs audit workflow..github/workflows/source-watch.yml: scheduled watched-source scan and issue creation..github/workflows/weekly-discord-docs.yml: Friday Discord lead scan, artifact upload, weekly tracking issue, and per-page source-review issues..github/workflows/ai-docs-draft-prs.yml: manual AI-assisted draft PR workflow using GitHub Models; never auto-merges..github/workflows/ci.yml: main-branch deploy workflow..github/codeql/codeql-config.yml: CodeQL config.overrides/: MkDocs Material theme overrides; keep becausemkdocs.ymlusescustom_dir: overrides.tools/state/: ignored local/generated working state, not durable project guidance.
- Keep changes small and focused.
- Do not introduce new dependencies without asking.
- Prefer existing docs structure, nav naming, and Markdown style.
- Linux deploy builds are case-sensitive. If MkDocs warns remotely but not locally, check for case-only path mismatches tracked by Git.
.gitignorehas broad Python ignores such aslib/; docs subdirectories namedlibmust be explicitly unignored or new files inside them will exist locally but not deploy.- When source behavior changes, update docs naturally; do not add tool-review boilerplate.
- Do not paste date-stamped changelog bullets into conceptual docs unless the page is already a changelog or release note. Fold verified changes into the relevant explanation, caveat, or workflow section in the page's existing voice.
- Set
last_reviewedonly after the page was actually checked against source. - Treat Discord chat as review leads only; verify against repositories, issues, releases, EIPs, or maintainer confirmation before changing docs.
- For broad ecosystem sweeps, run Discord Dev Digest with
--profile ecosystemand--profile github-links; compare linked GitHub repos against docs before deciding what belongs. - Do not put secrets, credentials, tokens, or private data in docs or project memory.
- For normal Markdown links between docs pages, prefer basename-only links:
[Label](page.md). - Do not rewrite normal Markdown links to full relative paths such as
../eco/page.mdordocs/eco/page.mdunless required by non-doc context. - Exception: card blocks (
::cards::) with JSON/YAMLurlfields must use a valid relative path from the current page to the target page. A basename is OK only when the target page is in the same directory. - Root
README.mdis GitHub-facing, not a docs page; links from README should use repo-relative paths such asdocs/contribute/tools.md. - Do not re-add hook logic that rewrites card
urlbasenames at render time. Card paths should be explicit in source. - After broad link edits, scan card URLs and run MkDocs build; card links can fail differently than normal Markdown links.
- Use
docs/contribute/source-watch.mdfor metadata rules. - Use
docs/contribute/source-watch-playbook.mdfor repeatable scan workflow. - Source Watch baseline defaults to
tools/state/source-watch-baseline.json. - Use GitHub scans only with
GITHUB_TOKENavailable;.envmay provide it locally. - Source Watch JSON includes
author_loginwhen GitHub exposes a linked user for a commit, open pull request, or release. - Source Watch scans watched GitHub path commits by default. GitHub release scans are opt-in per repository entry with
release_watch: true; keep them on repository/product status pages, not narrow implementation or conceptual pages. - Open pull request scanning is opt-in with
--open-prs; use it only for explicit roadmap/latest-work reviews, not normal weekly docs update issues. - Do not add broad external standards, analytics trackers, or one-off aggregator PRs to
source_reposunless ongoing changes should trigger docs review; keep those assource_of_truthlinks only. - Optional
source_reposfields:watch_mode,release_watch, andpriority; page-level defaults aresource_watch_mode,source_release_watch, andsource_priority. - Do not put broad ecosystem inventory repos into
source_repos; only add activesource_reposto pages where upstream changes should trigger review. - Weekly automation should scope release scans with
--release-owner ergoplatform --release-owner ScorexFoundation; do not run releases across every ecosystem repo unless explicitly doing a broad inventory pass.
- Current report:
tools/discord_dev_digest/state/669989266478202917-after-2026-04-26-report.md. - Latest focused Source Watch output:
/tmp/source-watch-discord-guided.md. - Resume prompt:
$caveman Read AGENTS.md, docs/contribute/source-watch-playbook.md, and tools/discord_dev_digest/state/669989266478202917-after-2026-04-26-report.md. Treat Discord as leads only. Continue source-backed doc updates from the 2026-05 Discord dev digest, verify against GitHub PRs/repos before editing, skip unverified sidechain-prefix claims, then run source_watch --strict, nav_audit --strict, structure_audit --strict, git diff --check, and mkdocs build. - Verified PR leads already checked:
ergoplatform/ergo#2299,#2302,#2305,#2310are merged intov6.0.3;ergoplatform/sigmastate-interpreter#1136is merged intov6.0.4;ergoplatform/ergo#2306,#2307,#2312,ergoplatform/ergo-appkit#253, andergoplatform/sigmastate-interpreter#1138were open when checked on 2026-05-27.
DISCORD_TOKENis configured as a GitHub Actions repository secret; do not commit.env..github/workflows/weekly-discord-docs.ymlis namedWeekly Docs Review; it runs Fridays at 09:00 UTC and supports manual runs withdays,after, andmode.- Manual
modevalues:full,discord-only,source-only. - In
fullanddiscord-only, it exports the previous week from general (668903786902847502) and development (669989266478202917), then generatesdocs,ecosystem, andgithub-linksreports. - The workflow separately runs Source Watch across every page with
source_reposfor the same date window. This scan is not limited to repositories mentioned on Discord that week. - It then calls
tools/weekly_docs_prs.py, which usestools/docs_update_candidates.py, to open/update per-page source-review issues. tools/weekly_docs_prs.pylabels per-page issuesdocs,source-watch, andautomated; titles should describe the likely missing feature or behavior.- The candidate layer skips pages whose
last_revieweddate is on or after the latest matching source change, skips low-severity-only pages, skips broad source changes that do not look documentation-relevant for the page, and skips candidates already covered in page text. - Weekly review closes stale open
source-watchissues that no longer appear actionable. - If every per-page candidate is skipped, the weekly workflow comments on the tracking issue and closes it as up to date. Keep the tracking issue open only when actionable page-review issues or errors remain.
- The workflow closes older open weekly tracking issues as superseded, labels the current tracking issue
docs,automated, andweekly-review, writes a GitHub Actions summary, and uploads the per-page issue summary as an artifact. - Weekly review and AI draft PR workflows share
concurrency.group: docs-source-watchso broad Source Watch scans do not run concurrently. Weekly review hastimeout-minutes: 20. - Per-page review issues list source commit authors as plain usernames only; do not add
@mentions until the automation has proven low-noise. - Keep Discord exports/reports as artifacts or ignored local state. Do not commit raw Discord logs or generated reports with chat content.
- These issues are review leads, not proof that docs changes are required. Verify source before editing public docs.
.github/workflows/ai-docs-draft-prs.ymlis manual only.- It runs Source Watch for the requested window, reuses the shared candidate layer, asks GitHub Models to assess candidate pages with commit/PR/release evidence, and may open one draft PR per page.
- Draft PRs are labelled
docs,automated, andneeds-human-review; sensitive pages also getsensitive. - It uses optional
DOCS_BOT_TOKENfor checkout, branch pushes, and PR creation; otherwise falls back toGITHUB_TOKEN. PreferDOCS_BOT_TOKENif generated PRs should trigger normal PR workflows. - AI output must remain draft-only. Never auto-merge AI docs PRs.
- The script should choose
needs-human-revieworno-doc-changewhen source evidence is weak; humans still verify every source claim before merge.
- Pull requests touching docs/tooling run
.github/workflows/docs-quality.yml. - Weekly/source-triggered review uses
.github/workflows/source-watch.yml. - Weekly Discord lead review uses
.github/workflows/weekly-discord-docs.yml. - Main branch deploy uses
.github/workflows/ci.yml. - Deploy syncs the checked-out repo to the server, then builds on Linux from
PROJECT_DIR/src; only committed/tracked files are present remotely. - Remote deploy now skips
apt-get updatewhenpython3-venv,python3-pip, andrsyncare already installed. If installation is needed and the Caddy apt source is configured, the workflow refreshes the Caddy Cloudsmith key before updating package indexes. tools/deploy.shis a manual legacy deploy helper; prefer GitHub Actions unless explicitly asked.
Before saying work is complete, run the narrowest relevant checks first. For docs/tooling changes, prefer:
.venv/bin/python tools/source_watch.py scan --strict
.venv/bin/python tools/source_watch_inventory.py --check
.venv/bin/python tools/nav_audit.py --strict
.venv/bin/python tools/structure_audit.py --strict
git diff --check
.venv/bin/mkdocs build --site-dir /tmp/ergodocs-site-checkIf a check is not run, say why.
- Call out risky changes, broken links, nav movement, generated files, and any unchecked source claims.
- Keep generated build output, local caches,
.env, and virtualenv files out of commits.