| name | liouscope-agents-md |
|---|---|
| description | AI coding agent instructions for LiouScope (open quantum lattice diagnostics) |
| version | 1.5 |
| last_updated | 2026-07-07 |
| priority_when_in_conflict | 1 |
AI Coding Agent Instructions. Tool-agnostic format per agents.md (Linux Foundation AAIF standard, Dec 2025). Read by Codex, Cursor, Goose and others. Claude Code does not read AGENTS.md natively (issue anthropics/claude-code#6235); see
CLAUDE.mdwhich imports this file via@AGENTS.md. Coworkerz convention: AGENTS.md is the single-source-of-truth;CLAUDE.mdis the thin import layer.
Priority when working agreements conflict: lower number wins. §1 (working agreements) > §2 (conventions) > §3 (don't/do) > §4 (when stuck).
- Stack: Python >=3.10 (CI matrix 3.10/3.11/3.12/3.13/3.14), pytest, ruff, mypy, NumPy / SciPy, optional QuTiP cross-checks.
- Purpose: Multi-diagnostic relaxation analysis for open quantum lattice
systems (GKSL / Lindblad). 24 diagnostics D1-D24 in six layers (D1-D20 =
peer-review submission set; D21-D24 post-submission, D24 = opt-in Zhou
mixing-time predictor; schema
D1-D24-Übersicht-v3) + twelve mechanism classes A1-A12. Replaces single-number "decay rate" with a layered, auditableDiagnosticReport. - Version: see
src/liouscope/_version.py(single source;pyproject.tomlreads it dynamically — numbers drift, pointers don't). - Taxonomy version:
A1-A12-v3.1 - Manifest schema:
src/liouscope/MANIFEST_SCHEMA.json(version: see itsschema_versionconst; SHA-256-stable run manifests) - License: Apache-2.0
- Visibility: PUBLIC (
marcohost33-maker/Liouscope). Do not assume that internal Drive/canon context is public unless it is explicitly committed or cited in release notes. - KANON anchor:
RESEARCH-LIOUSCOPEin<internal-ref-redacted>
src/liouscope/ # main package
└── MANIFEST_SCHEMA.json # contract for run manifests (packaged, NOT repo root)
tests/ # pytest suite: anchors, qutip, numerics, fitting, classification
└── test_anchors.py # anchor regressions — must pass on every CI run
examples/ # quickstart + tutorial scripts
benchmarks/ # performance / reproducibility scripts
figures/ # generated diagnostic plots
CITATION.cff # DOI / academic citation
codemeta.json # CodeMeta 3.0 metadata
.github/workflows/
├── ci.yml # test + lint + mypy + anchor regressions (required)
├── ci-qutip.yml # optional-dependency QuTiP cross-checks (required)
├── scorecard.yml # OpenSSF Scorecard (public-repo active)
├── encoding-guard.yml # UTF-8 / line-ending guard
├── zizmor.yml # workflow security audit (SHA-pinned actions)
└── pypi.yml # release publication template
python -m venv .venv
source .venv/bin/activate # or .venv\Scripts\activate on Windows
pip install -e .[dev,qutip]
pytest -q # full suite
pytest tests/test_anchors.py -v # anchor regressions only (CI gate)
ruff check src tests benchmarks
mypy src/liouscope # enforcing CI gate (must exit 0)
python examples/quickstart.py # smoke run- Branch protection: Tier-2 active.
mainrequires ALL required status checks green (strict=true): Python-matrixtest 3.10-3.14+ QuTiP cross-checks3.11/3.12(7 checks as of 2026-06-26 — authoritative list: branch protection viagh api, not this file). PRs only. - Backup-First on destructive ops. History-handling incident 2026-05-16
wiped ~20 files via unverified branch-delete + GH-GC. Backup-Triple is the
recovery anchor in
<internal-ref-redacted>. Before anygit push --force, branch delete, or ref-PATCH: capture pre-SHA viagh api repos/.../git/refs/heads/..., run the op, verify post-SHA. - Anchor regressions are sacred.
tests/test_anchors.pypins the reference behaviour of D1-D20 on canonical fixtures. If anchors must change, do it in a dedicated PR with the physics rationale in the body, not as a side-effect of an unrelated change. - SHA-pin all GitHub Actions. Welle G established the gold-standard:
every action reference is
@<full-sha> # vX.Y.Z. Dependabot is on a cooldown to avoid PR-spam. - Reproducibility. The run manifest records seed, framework/schema/
taxonomy versions, Python/NumPy/SciPy versions, platform, solver path and a
run-invariant
input_hashautomatically; do not bypass the manifest writer. (Lattice geometry / dissipator family are NOT yet manifest fields — do not claim them; see MANIFEST_SCHEMA.json for the authoritative field list.) - Reality-Anchor. Prefer "anchors pass (verified )" over "diagnostics implemented". No claims without code-belege.
- Plain paths in code-blocks for file references (no markdown links —
code-blockpaths are clickable in CLI; markdown links are not).
- Imports: intra-package imports are relative (
from .._consts import ...,from ..numerics.linalg import ...); external imports are absolute. Tests, examples and benchmarks import the installed package absolutely (from liouscope... import ...). Rationale (issue #110, decided 2026-08-15): the rule here previously demanded absolute intra-package imports, which the package has never followed — measured at 135 relative statements across 39 of 53 modules and 0 absolute ones. Relative intra-package imports are the norm for asrc/layout and keep the package re-namable; the divergence only produced false review findings against conforming code, so the convention was corrected to the codebase rather than the codebase to the convention. - Numerical libraries: prefer
numpy/scipy;qutipis an optional extra used for cross-checks, not a core runtime dependency. - Plots: matplotlib only, no interactive backends in CI; save to
figures/if persisted. - Citations: changes touching results or methodology must update
CITATION.cffand the relevantMANIFEST_SCHEMAversion if the run manifest contract changes. - Docs: README is the public surface; deep methodology in module docstrings.
- One agent = one branch prefix:
claude/<task>(Claude Code),codex/<task>(OpenAI Codex),bot/<task>(CI/automation). Human-led work:feat|fix|docs/<task>. - Agent output opens as a Draft PR and stays draft until Definition-of-Done is verified; then mark ready.
- Label agent PRs:
agent:claude/agent:codex/agent:bot. - Auto-merge over manual merge: enable
gh pr merge --auto --squashonce required checks exist; a second concurrent PR must rebase on the updated main. - No concurrent agent pushes to the same repo: serialize, or split work by branch namespace and let auto-merge order the merges.
- Don't merge without ALL required status checks green (matrix + QuTiP).
- Don't use
--no-verify,--no-gpg-sign,--forcewithout explicit User1 OK. - Don't bump
MANIFEST_SCHEMAversion without simultaneously updating consuming code paths and adding a backward-compat note inCHANGELOG.md. - Don't introduce a "single decay rate" API surface — it contradicts the library's core thesis ("no single number").
- Don't commit or leak secrets, API keys,
.env/credential files,GITHUB_TOKEN, or signing keys (logs included).
- Do run
pytest -q+ruff checkbefore pushing. - Do update
CHANGELOG.mdon feature merge. - Do reference the KANON anchor (
RESEARCH-LIOUSCOPE) andclaim_status:pendingfor new diagnostics until anchors confirm them. - A11 (quantum-Mpemba) single-state floor (issue #78 / decision E0706-13).
A single-state run that picks A11 on a maximally mixed steady state
(
rho_ss = I/d) must report UNDEFINED / EXPLORATION unless a validatedEnsembleEvidenceobject supplies a passing reference-family comparison. A bareensemble_confirmation=Trueis a caller assertion, not evidence, and must raise fail-closed. The evidence object must bind its manifest digest, initial-state family and ordering parameter, paired run IDs/input hashes, metric/test/uncertainty method, software version, gate status/reason code and distinct producer/reviewer attestation digests. Onlygate_status="PASS"with reasonENSEMBLE_MPEMBA_CONFIRMEDmay suppress the floor; FAIL, REVIEW, malformed or missing evidence must not. The canonical evidence SHA-256 must enter the run input hash and the full payload must remain serialisable in the report. Do not weaken the single-state floor to CANDIDATE and do not strengthen it to EXCLUDED. - For any branch / history-touching operation, reference the 2026-05-16 incident in the PR body as a reminder of why Backup-First exists (the backup-triple recovered ~20 files after an unverified branch-delete + GH-GC).
- See
README.md"Why LiouScope" for the design philosophy (no-single-number, explicit uncertainty, auditable manifests). - See
CHANGELOG.mdfor what shipped in each version. - See
src/liouscope/MANIFEST_SCHEMA.jsonfor the run-manifest contract. - See
tests/test_anchors.pyfor the canonical reference behaviour. - See
docs/RELEASE_AUDIT_v0.5.0.mdfor the current public/citable release gates. - Escalate after 3 failed attempts at the same step — stop and ask in a PR draft or issue instead of looping.
A change is "done" only when all of the following hold:
| # | Check | Exit-Code / Evidence |
|---|---|---|
| 1 | pytest -q runs cleanly |
exit 0 |
| 2 | pytest tests/test_anchors.py -v (anchor regressions) green |
exit 0 |
| 3 | ruff check src tests benchmarks passes |
exit 0 |
| 4 | ALL required status checks green on PR (test 3.10-3.14 + qutip-cross-check 3.11/3.12, 7 as of 2026-06-26) |
required-status checks |
| 5 | If methodology/results touched: CITATION.cff updated |
PR diff |
| 6 | If run-manifest contract touched: MANIFEST_SCHEMA.json version bumped + CHANGELOG.md migration note |
PR diff |
| 7 | CHANGELOG.md updated or an explicit no-changelog rationale is in the PR body |
PR diff / PR body |
| 8 | PR body contains Summary + Test plan checklist | manual review |
A PR that misses any of 1-8 is not "ready". Anchor regressions (item 2) are the sacred gate — never merge with them red, even if the change is unrelated.
Tier-1 rollout 2026-05-28 (v1.0 → v1.1 hardening). Format spec: https://agents.md/.