template / workflows
AGENTS.md20 starsChanged 3 months agoApache-2.0View on GitHub
The workflows/ directory contains GitHub Actions workflows that automate the continuous integration and delivery pipeline for the Research Project Template. These workflows ensure code quality, test reliability, and compatibility across environments. Concurrency: PR runs share a group by PR ref and cancel superseded runs. Push, scheduled, and manual runs use their unique github.run_id and do not cancel other runs, preserving exact-commit post-merge evidence while main advances. GitHub runner availability still bounds job execution; this policy does not guarantee completion or…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository37 other files it gives its agents.
- .agents/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- .agents/skills/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- fonds/AGENTS.mdAGENTS.md
- .github/actions/AGENTS.mdAGENTS.md
- .github/actions/setup-docs-lint/AGENTS.mdAGENTS.md
- .github/actions/setup-python-env/AGENTS.mdAGENTS.md
- .github/AGENTS.mdAGENTS.md
- .github/ISSUE_TEMPLATE/AGENTS.mdAGENTS.md
- infrastructure/AGENTS.mdAGENTS.md
- projects/AGENTS.mdAGENTS.md
- rules/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- tests/AGENTS.mdAGENTS.md
- tools/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- advanced-evaluationSkill
- bdi-mental-statesSkill
- context-compressionSkill
- context-degradationSkill
- context-fundamentalsSkill
- context-optimizationSkill
- evaluationSkill
- filesystem-contextSkill
- harness-engineeringSkill
- hosted-agentsSkill
- latent-briefingSkill
- long-horizon-promptingSkill
- memory-systemsSkill
- multi-agent-patternsSkill
- project-developmentSkill
- self-improvement-loopsSkill
- tool-designSkill
- continual-learningSkill
- gauss-open-gauss-cliSkill
- infrastructure-overviewSkill
The file
We split this AGENTS.md into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 45
No path lets a failed job merge silently: if lint fails, every dependent job never starts — a merged commit with red lint is treated as a …
- Very specific: line 127
Enforced policy: no configured prohibited mock-framework imports/calls (MagicMock, mocker.patch, unittest.mock, and related lexical forms) …
- Very specific: line 165
External render tool: every lane provisions the same SHA-pinned Pandoc action as test-infra, because project suites may exercise real …
- Very specific: line 274
Never checks out or executes PR HEAD code — only reads metadata and calls the GitHub API — so the elevated pull_request_target trigger does …
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CI/CD Workflows
Overview
The workflows/ directory contains GitHub Actions workflows that automate the continuous integration and delivery pipeline for the Research Project Template. These workflows ensure code quality, test reliability, and compatibility across environments.
Directory Structure
flowchart LR
W[.github/workflows/]
W --> META[AGENTS.md · README.md]
W --> CI[ci.yml<br/>16 jobs — 2 conditional via detect-job outputs — fep-lean, setup-hook-windows-smoke — plus 1 scheduled-only — public-matrix-receipt]
W --> STALE[stale.yml<br/>Auto-label/close stale issues/PRs]
W --> REL[release.yml<br/>Create GitHub Releases on version tags]
W --> DA[dependabot-automerge.yml<br/>Auto-merge safe Dependabot PRs]
classDef d fill:#0f172a,stroke:#0f172a,color:#fff
classDef code fill:#1e3a8a,stroke:#0f172a,color:#fff
classDef doc fill:#0f766e,stroke:#0f172a,color:#fff
class W d
class CI,STALE,REL code
class META docCI Pipeline (ci.yml)
Triggers
| Trigger | Condition |
push | Commits to main |
pull_request | PRs targeting main |
schedule | Weekly Sunday midnight UTC (CVE catch-up) |
workflow_dispatch | Manual trigger (no inputs) |
Concurrency: PR runs share a group by PR ref and cancel superseded runs. Push, scheduled, and manual runs use their unique github.run_id and do not cancel other runs, preserving exact-commit post-merge evidence while main advances. GitHub runner availability still bounds job execution; this policy does not guarantee completion or permit a cancelled run to count as green. Historical reruns retain their original workflow and concurrency group: avoid running two old-policy main workflows concurrently during exact-commit certification. The first new-policy PR run also has a different group from any pre-policy run of that PR.
Global env: UV_FROZEN=true, MPLBACKEND=Agg (non-interactive matplotlib backend).
Job Graph
health depends on lint only and is blocking. A broken health job therefore blocks merge on its own; deleting the health gate from the graph fails this workflow definition check rather than silently skipping static health. validate, security, and docs-lint depend on lint only (parallel with the verify-no-mocks subtree). setup-hook-windows-smoke depends on verify-no-mocks and detect and is skipped unless needs.detect.outputs.setup_hook == 'true'. test-infra, test-regression, test-project, and fep-lean depend on verify-no-mocks. Known-wrong condition: a red lint job must block every downstream job — a skip-with-success path that masks it is the defect this graph forbids. This graph is descriptive prose about ci.yml; nothing here verifies that the documentation stays synchronized with the workflow file. Known-wrong input under this graph: a lint failure propagates downstream — every dependent job (health, validate, security, docs-lint) is skipped or fails, so a broken lint can never reach test-infra masked as green.
This contract is documentation only — it does not certify that ci.yml matches it; drift checking and review are what catch divergence.
No path lets a failed job merge silently: if lint fails, every dependent job never starts — a merged commit with red lint is treated as a known-wrong outcome for this graph.
flowchart TB
DET[detect<br/>optional-project outputs]
DETP[detect-projects<br/>validated capability matrix output]
ACTLINT[actionlint<br/>lints workflow YAML · standalone]
LINT[lint] --> HEALTH[health<br/>unified JSON artefact]
VNM[verify-no-mocks<br/>parallel with lint · no needs:]
LINT --> VAL[validate]
LINT --> SEC[security]
LINT --> DL[docs-lint<br/>mermaid + cross-links + consistency<br/>installs mmdc + chrome-headless-shell]
VNM --> SHW[setup-hook-windows-smoke<br/>skipped if no setup_hook.py]
DETP -.->|infra_matrix output| TI
VNM --> TI[test-infra<br/>dynamic matrix from detect-projects<br/>push/schedule: ubuntu × 3.10-3.14 + macOS × 3.14<br/>PR: ubuntu-3.14 + macOS-3.14 only<br/>codecov on 3.14/ubuntu only]
VNM --> TR[test-regression<br/>claim-binding pins · tests/regression/]
VNM --> TP[test-project<br/>capability manifest roster × canonical Python versions<br/>stage_01_test.py --project per cell]
VNM --> FL[fep-lean<br/>ubuntu-only · skipped if no lean-toolchain]
DET --> SHW
DET --> FL
DETP --> TP
PERF[performance<br/>no needs · CI-FAST-PERF-1]
classDef gate fill:#1e3a8a,stroke:#0f172a,color:#fff
classDef matrix fill:#0f766e,stroke:#0f172a,color:#fff
classDef terminal fill:#7c2d12,stroke:#0f172a,color:#fff
classDef info fill:#334155,stroke:#0f172a,color:#fff
class DET,DETP,LINT,VNM gate
class TI,TR,TP,FL,SHW matrix
class VAL,SEC,DL,PERF,ACTLINT terminal
class HEALTH infoShared setup — local composite actions
Jobs that need Python share one local composite action,
.github/actions/setup-python-env,
which runs astral-sh/setup-uv (with uv.lock cache) + actions/setup-python.
The pinned action SHAs and cache config live there once instead of being
copy-pasted per job. Usage (checkout must come first — a local action's
files only exist after checkout):
steps:
- uses: actions/checkout@<sha>
- uses: ./.github/actions/setup-python-env # defaults to Python 3.14
# with: { python-version: ${{ matrix.python-version }} } # matrix jobs only
- run: uv sync # per-job groups stay explicitdetect and actionlint are checkout-only and do not use it. Each job keeps
its own uv sync … line so optional groups (rendering/monitoring/discopy)
remain visible per job. When bumping a setup action's SHA, edit the composite
action — not each job.
The health and docs-lint jobs additionally share
.github/actions/setup-docs-lint,
which provisions the pinned Node runtime/cache plus real mmdc and
chrome-headless-shell. This keeps unified health's docs-lint constituent
behaviorally equivalent to the dedicated documentation job.
Job Details
1. Lint & Type Check (lint)
- Runner:
ubuntu-latest/ Python 3.14 - Tools:
uv run ruff check,uv run ruff format --check,uv run mypy,uv run python -m infrastructure.skills check-all-exports,uv run python scripts/audit/check_template_drift.py --strict - Scope: Ruff uses public lint paths from
infrastructure.project.public_scope lint-paths; mypy uses its narrowersource-pathsoutput.
2. Static Health Report (health)
- Runner:
ubuntu-latest/ Python 3.14 - Depends on:
lintA red static gate turns this job red and blocks dependents; this page does not certify hosted-runner behavior beyond that. - Purpose: Runs
uv run python -m infrastructure.core.health --json --quiet→health-report.json; every represented static gate blocks, while behavioral and platform matrices remain separate jobs; a gate exiting non-zero must turn the job red, and warnings alone never satisfy it. Negative control: when any represented static gate fails,infrastructure.core.healthexits non-zero and blocks this job rather than reporting green alongside a failure. A negative control backs this contract: deliberately breaking any represented static check locally flips the aggregate health report away from healthy status, which blocks the job.- Negative control: removing or weakening a represented static gate in
infrastructure/core/health.pymust make thehealthjob fail on the next run — a green report with a missing gate is invalid.
- Negative control: removing or weakening a represented static gate in
3. Verify No Mocks Policy (verify-no-mocks)
- Runner:
ubuntu-latest/ Python 3.14 - Script:
scripts/audit/verify_no_mocks.py(repository root) - Enforced policy: no configured prohibited mock-framework imports/calls
(
MagicMock,mocker.patch,unittest.mock, and related lexical forms) in test files. - Boundary:
--inventoryseparately classifies permitted environment isolation and semantic dependency replacement. CI enforces a zero ceiling for dependency replacements; environment isolation remains permitted.
3b. Setup hook — Windows smoke (setup-hook-windows-smoke)
- Runner:
windows-latest/ Python 3.14 - Depends on:
verify-no-mocks - Conditional:
if: needs.detect.outputs.setup_hook == 'true'— no-op skip when no project shipsinfrastructure.project.setup_hook. Thedetectjob computes this because job-levelhashFiles()is invalid in GitHub Actions. - Step:
uv run pytest tests/infra_tests/project/test_setup_hook.pywithPYTHONUTF8=1
4. Infrastructure Tests (test-infra)
- Matrix:
ubuntu-latest×3.10,3.11,3.12,3.13,3.14, plus aninclude:ofmacos-latest×3.14(6 cells). macOS legs are ~10x cost and rarely surface OS-specific breakage beyond the 3.14 cell, so only the 3.14 smoke runs there. - Event gating (CI-FAST-INFRA-COMPAT-1): on
pull_requestonly the ubuntu/py3.14 (coverage-bearing) and macOS/py3.14 cells run; the py3.10-3.13 compatibility legs run onpushtomain, the weeklyschedule, andworkflow_dispatch. Implementation: thedetect-projectsjob emits the event-shaped matrix (infra_matrixoutput) because thematrixcontext is NOT valid in a job-levelif(actionlint rejects it);test-infranowneeds: [verify-no-mocks, detect-projects]and consumes the dynamic matrix. Measured: those legs are 6-8 min each, never the PR critical path, and occupy 4 runner slots that deepen wave-2 queue spill for the 48-cell project matrix. Known cost, stated honestly: infra-layer 3.10-3.13 compatibility is proven on the same-day main push / weekly lane rather than pre-merge. Project-floor py3.10 coverage is unaffected (project matrix cells keep py3.10 + py3.14 on PRs); the full matrix still gates every main push, so a merged 3.10-incompatible change fails the exact-commit run. - Coverage threshold: 60% (
--cov-fail-under=60) - Coverage file:
.coverage.infra(isolated from project coverage) - Browser reflow: the Ubuntu/Python 3.14 cell runs the real Chromium MathJax regression after infrastructure tests. It provisions
@playwright/test@1.62.1and Chromium, waits for completed typesetting, and verifies visible equation numbers across live viewport changes. CDN access is required; a browser or MathJax failure fails the cell. - Exclusions: Tests marked
requires_ollamaare skipped (-m "not requires_ollama") - Codecov upload: On Python 3.14 /
ubuntu-latestonly to avoid duplicate reports; upload failures do not fail CI
4b. Regression Tier — claim-binding pins (test-regression)
- Depends on:
verify-no-mocks,timeout-minutes: 20, ubuntu-only. - Sync:
uv sync --group public-exemplars. - What it runs:
uv run pytest tests/regression/ -q --no-cov --timeout=120, serial (no-n auto) — seedocs/maintenance/regression-testing.mdfor why (exemplars ship colliding top-levelsrcpackages resolved via per-project aliases + temporarysys.meta_pathfinders whose isolation is collection-order-sensitive). - Collection contract: the collection pass must succeed and emit node IDs (
--collect-only -q) before the behavioral run. A separate "Assert regression tier is not empty" step counts those IDs and fails the job when fewer than 3 tests collect, so claim-binding pins cannot silently vanish behind a vacuous success.
5. Project Tests (test-project)
- Sync:
uv sync --group public-exemplars— the same deterministic dependency union as a fresh localuv sync, including the DisCoPy, monitoring, scientific, LLM-client, and PPTX groups used by the public roster. Hypothesis comes from the dev group (see rootpyproject.toml[dependency-groups]anddefault-groups). - Matrix: Per-project split — the
detect-projectsjob runsscripts/gates/public_capabilities.py --ci-matrix-json, which validates unique normalized package identities, full-minor Python compatibility, source/test syntax, format declarations, compiled/confined direct hydration, analysis declarations, reason-bearing skips, exact roster membership, and exact matrix parity before emitting the canonicalproject × Pythoninclude list. The current source of truth yields 24 exemplars × Python 3.10/3.14 = 48 matrix cells onubuntu-latest; no project or Python literal is duplicated in workflow YAML. Both matrix jobs setUV_PYTHONand assert the selected runtime minor so the repository.python-versioncannot override a matrix cell. Jobtimeout-minutes: 135; its direct Stage-01 invocation owns one 115-minute generic-or-declared project budget, leaving 20 minutes for setup, descendant cleanup, and uploads. The full pipeline's separate 120-minute stage wrapper is not present on this hosted direct path. These limits provide execution capacity; they do not show that a project suite passed or emitted valid evidence. - Coverage threshold: Each job enforces that project's own ≥ 90% floor on its
src/(per CLAUDE.md). There is no longer a combined-union run or--cov-append— every project is isolated in its own job, which also removes the oldcode_project/fep_leanconftest plugin-name collision. - Coverage files: project-local
.coverage.projectfor the generic pytest path or.coveragefor a declared structured verifier; both are isolated, cleaned before the run, and independently produce the same project-localcoverage_project.json. - Scope:
scripts/pipeline/stage_01_test.py--project <name> --project-only --include-slow(one invocation per matrix cell). The workflow uploads the resulting project-local JSON directly; it does not synthesize a separate XML report. Rotating local projects are not part of this public-repo gate; dedicated project jobs own their own toolchains. - External render tool: every lane provisions the same SHA-pinned Pandoc action as
test-infra, because project suites may exercise real DOCX/EPUB rendering during Stage 1. A required converter is never handled by skipping or weakening those regression tests. - Codecov upload: On Python 3.14 /
ubuntu-latestonly; upload failures do not fail CI
6. fep_lean — real Open Gauss + Lake (fep-lean)
- Conditional: Job is skipped unless
projects/fep_lean/lean/lean-toolchainexists and thedetectjob emitsfep_lean == 'true'. When fep_lean lives underprojects/working/,detectreportsfalseand the job is skipped. Promote withmv projects/working/fep_lean projects/fep_leanto activate. - Runner:
ubuntu-latest/ Python 3.14 only; jobtimeout-minutes: 60 - Depends on:
verify-no-mocks - Working directory (when present):
projects/fep_leanfor pytest;projects/fep_lean/leanfor Lake warm-up - Toolchain: SHA-pinned elan installer (with checksum verification) + pinned
lean-toolchain,lake buildwarm-up - Open Gauss: clone math-inc/OpenGauss,
./scripts/install.sh --plain --noninteractive --skip-system-packages,gauss doctor - Tests:
uv run pytest tests/ --timeout=1200 --cov=src --cov-fail-under=89withCOVERAGE_FILE: ../../.coverage.fep_lean - Scaling: Full catalogue × Lean is expensive; if runtime grows past the job budget, split slow integration tests behind a pytest marker or shard topics in a follow-up workflow.
7. Validate Manuscripts (validate)
- Runner:
ubuntu-latest/ Python 3.14 - Steps:
infrastructure.validation.cli markdown projects/*/manuscript/— validates all active project manuscriptsscripts/docgen/api_reference.py --check— API reference drift gate- Dynamic project import check — imports the public project source paths from
infrastructure.project.public_scope
8. Security Scan (security)
- Runner:
ubuntu-latest/ Python 3.14 - pip-audit: blocking; audits the root all-groups/all-extras export and every canonical public-exemplar all-extras export, builds
--ignore-vulnargs from.github/pip-audit-ignore.txt, and retries each export up to 3 times with backoff on failure (transient OSV/network issues) - bandit:
bandit -c bandit.yaml -r -ll, coversinfrastructure/,scripts/,projects/; path exclusions are inbandit.yaml(exclude_dirs, including archive/WIP roots and.venv/site-packagesso local trees are not scanned)
9. Documentation Lint (docs-lint)
- Runner:
ubuntu-latest/ Python 3.14 / Node 20 - Depends on:
lint - Timeout: 15 minutes
- External tools (real, not mocked):
mmdc(mermaid-cli) — pinned in the rootpackage.json; runnpm cichrome-headless-shell—npx --no-install puppeteer browsers install chrome-headless-shell, exported viaCHROME_EXECUTABLE_PATH
- Linters (thin orchestrator
scripts/audit/lint_docs.py):- Mermaid — every fenced ```mermaid block in
docs/,infrastructure/,.github/,scripts/, and root*.mdis rendered with the realmmdcbinary. Failure exits non-zero. - Cross-links — every relative Markdown link must resolve on disk; fenced and inline-code spans are skipped.
- Consistency —
N Python (sub)packagesclaims must match the live count underinfrastructure/; rotating project names (fep_lean,cogant, …) must be conditionally framed in long-lived docs. Skip lists narrow the scan — they do not certify the excluded trees; anything outside the skips still fails the lint job. - Doc pairs — permanent-template content folders must carry paired
AGENTS.mdandREADME.md; generated/local paths and rotating projects are excluded.
- Mermaid — every fenced ```mermaid block in
- Escape hatch: append
<!-- noqa: docs-lint -->to a Markdown line to suppress consistency or broken-link warnings on that line. Negative control: adding a deliberately broken relative link to a tracked doc makesuv run python scripts/audit/lint_docs.pyexit non-zero — the run fails when any unresolved cross-link is reported. This skip list bounds what the linter checks: it scans tracked documentation only, and checking skip rules does not prove correctness of excluded generated trees. - Scope guarantees: the linter scans only tracked Markdown outside generated/local paths such as
output/,.venv/,.claude/,projects/archive/,projects/working/,htmlcov/, andnode_modules/; inside those trees it enforces nothing. Known-wrong input: an unlisted build tree such as a freshdist/holding broken links is NOT skipped by these guarantees — the exclusion list is closed, and excluding a new path requires an explicit entry ininfrastructure/validation/docs/scan_scope.py. - Module:
infrastructure/validation/docs/—mermaid_lint.py,cross_link_lint.py,consistency_lint.py,doc_pair_lint.py.
10. Performance Check (performance)
- Runner:
ubuntu-latest/ Python 3.14 - Depends on: nothing (CI-FAST-PERF-1 — the job consumes no upstream artifacts, so no
needs:;ci-gatestill requires it). It therefore runs in the first wave instead of after the slowest project cell. - Threshold: each
infrastructure.coreor public projectsrccold import frominfrastructure.project.public_scopemust complete in ≤ 5 seconds - Per-module timing and the roster-dependent total are reported to stdout for trend analysis
Quality Gates
| Gate | Threshold | Enforced by |
| Ruff linting | zero violations | lint job |
| Ruff formatting | zero diffs | lint job |
| mypy strict gate | zero errors across the generated public source scope | lint job |
| Mock-framework lexical gate | zero prohibited imports/calls | verify-no-mocks job |
| Public capability parity | exact roster/matrix; compatible Python floors; valid package/render/hydration/analysis declarations | detect-projects + unified health |
| Infrastructure coverage | ≥ 60% | test-infra job |
| Per-project coverage (standalone) | ≥ 90% | each project's own pytest gate |
| Combined-union public-project coverage | ≥ 75% | test-project job (DEFAULT_FAIL_UNDER) |
| fep_lean coverage | ≥ 89% | fep-lean job (skipped if projects/fep_lean/lean/lean-toolchain absent) |
| pip-audit | no unignored vulnerabilities | security job |
Bandit MEDIUM+ (bandit.yaml) | zero findings | security job |
| Import time | ≤ 5 seconds total | performance job |
Stale Workflow (stale.yml)
Runs daily at 01:00 UTC using actions/stale@v10.3.0.
| Item | Stale after | Closed after |
| Issues | 60 days inactive | + 14 days |
| Pull Requests | 30 days inactive | + 14 days |
Exempt labels: pinned, security, in-progress, blocked, do-not-close
Release Workflow (release.yml)
Triggers on v*.*.* tag push or workflow_dispatch (with tag input).
- Resolves the requested tag before checkout and checks out that exact ref
- Proves
HEADequals the dereferenced tag commit and runs the root release contract - Runs the bounded pipeline-smoke infrastructure test lane + no-mocks gate on the tagged SHA (executable test evidence, without the per-commit full matrix)
- Runs the fail-closed public capability manifest
- Clean-exports, installs, and import-smokes every canonical public exemplar without credentials
- Runs the strict rendered publication audit across every canonical public exemplar before building
- Generates a commit-based changelog excerpt since the previous tag
- Creates a GitHub Release using
softprops/action-gh-release@v3.0.2withgenerate_release_notes: falseso the body is the git-log excerpt only (no duplicate auto-generated section) - Auto-marks as pre-release if tag contains
-rc,-beta, or-alpha
Current pinned GitHub Actions use the Node 20 action runtime. GitHub-hosted runners satisfy this; self-hosted runners must be Actions runner v2.327.1 or newer.
Dependabot Automerge Workflow (dependabot-automerge.yml)
Triggers on pull_request_target (opened, reopened, synchronize, ready_for_review) — but only acts when github.actor == 'dependabot[bot]'.
- Fetches Dependabot update metadata via
dependabot/fetch-metadata@v3.1.0 - Enables GitHub native auto-merge (
gh pr merge --auto --squash) forsemver-minorandsemver-patchupdates only; major bumps are left for human review - Never checks out or executes PR HEAD code — only reads metadata and calls the GitHub API — so the elevated
pull_request_targettrigger does not expose secrets to untrusted code - Auto-merge must also be enabled in repository settings (Settings → General → "Allow auto-merge")
Local CI Simulation
# Reproduce lint locally
uv sync
uv run python -m infrastructure.project.public_scope lint-paths | xargs uv run ruff check
uv run python -m infrastructure.project.public_scope lint-paths | xargs uv run ruff format --check
uv run python -m infrastructure.project.public_scope source-paths | xargs uv run mypy
# Reproduce infrastructure tests locally
COVERAGE_FILE=.coverage.infra uv run pytest tests/infra_tests/ \
--cov=infrastructure \
--cov-fail-under=60 \
-m "not requires_ollama"
# Reproduce project tests locally (matrix job ignores fep_lean). The root
# default groups include the deterministic public-exemplar dependency union.
uv sync
COVERAGE_FILE=.coverage.project uv run python scripts/pipeline/stage_01_test.py --project-only --all-projects --public-projects --non-strict --include-slow
uv run coverage xml -o coverage-project.xml
# fep_lean only — requires gauss, lake, lean on PATH (see that project's tests/AGENTS.md when present)
(cd projects/fep_lean && COVERAGE_FILE=../../.coverage.fep_lean uv run pytest tests/ \
--timeout=900 \
--cov=src \
--cov-fail-under=89 \
-m "not requires_ollama")
# Reproduce security scan locally (mirror CI — build ignores from file)
IGNORE_ARGS=()
while IFS= read -r raw || [ -n "$raw" ]; do
[[ "$raw" =~ ^[[:space:]]*# ]] && continue
line="${raw%%#*}"
line="$(echo "$line" | xargs)"
[ -z "$line" ] && continue
IGNORE_ARGS+=(--ignore-vuln "$line")
done < .github/pip-audit-ignore.txt
AUDIT_DIR="$(mktemp -d /tmp/template-public-audit.XXXXXX)"
uv export --all-groups --all-extras --frozen --no-hashes \
--no-emit-project --output-file "$AUDIT_DIR/root.txt"
uv run pip-audit --requirement "$AUDIT_DIR/root.txt" \
--no-deps --disable-pip "${IGNORE_ARGS[@]}"
for project in $(uv run python -m infrastructure.project.public_scope project-names); do
slug="${project//\//-}"
uv export --project "projects/$project" --all-extras --frozen --no-hashes \
--no-emit-project --output-file "$AUDIT_DIR/${slug}.txt"
uv run pip-audit --requirement "$AUDIT_DIR/${slug}.txt" \
--no-deps --disable-pip "${IGNORE_ARGS[@]}"
done
uv run bandit -c bandit.yaml -r -ll infrastructure/ scripts/ projects/Troubleshooting
Linting failures
uv run python -m infrastructure.project.public_scope lint-paths | xargs uv run ruff check --fix
uv run python -m infrastructure.project.public_scope lint-paths | xargs uv run ruff formatTest failures
# Infrastructure
uv run pytest tests/infra_tests/ -v --tb=long -s
# Project tests — prefer the orchestrator (runs one pytest per project; avoids conftest/package collisions):
uv run python scripts/pipeline/stage_01_test.py --project template_code_project
# Advanced / blanket globs — running **all** `projects/*/tests/` in **one** pytest process can fail when multiple projects ship `tests/conftest` packages with identical names; use per-project directories instead.
uv run pytest projects/*/tests/ -v --tb=long -s
# Single test
uv run pytest tests/infra_tests/test_foo.py::TestClass::test_method -s --pdbCoverage below threshold
# Infrastructure report
COVERAGE_FILE=.coverage.infra uv run pytest tests/infra_tests/ \
--cov=infrastructure --cov-report=html
open htmlcov/index.html
# Project report — replace SRC_PATH with `projects/<name>/src` from _generated/active_projects.md when benchmarking coverage manually:
COVERAGE_FILE=.coverage.project uv run pytest projects/templates/template_code_project/tests/ \
--cov=projects/templates/template_code_project/src --cov-report=html
open htmlcov/index.htmlPerformance check slow
# Profile imports
uv run python -c "
import cProfile, pstats, io
pr = cProfile.Profile()
pr.enable()
import infrastructure.core
pr.disable()
s = io.StringIO()
ps = pstats.Stats(pr, stream=s).sort_stats('cumulative')
ps.print_stats(20)
print(s.getvalue())
"See Also
../README.md—.github/human guide (workflows, Dependabot, templates)../AGENTS.md— GitHub integration overview../../AGENTS.md— Root system overview and pipeline stages- GitHub Actions Documentation
- uv Documentation
- Codecov Documentation
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

