Agent skill for choosing active spaces with AEGISS
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- python
- Domain
- cli, developer-experience, documentation
Research direction
Start by reading the proposed order of work and the linked documentation and API pages; the first step requires an interview with the AEGISS authors, and a linked open pull request (#120) shows work is already underway. The scope spans documentation, bundled skill files, CLI installation and link rewriting, CI checks, and evaluations across six scenarios. Done means the documented workflow and reference files, distribution and checks, and evaluation sign-off all meet the stated pass bar.
Written by the indexing model from the issue text.
Description
🤖 AI text below 🤖
Motivation
More and more users drive their analyses through coding agents (Claude Code, Codex, pi, …). An agent left alone with AEGISS copies the quick start and keeps its defaults. It doesn't apply the judgement that makes the selection good: sizing the DMRG window, keeping the high-entropy orbitals away from its edges, choosing thresholds and ao_labels, the canonical vs localized window caveat, spin-summed vs spin-resolved entropies for UHF, and the index base. An agent skill can encode that judgement as ordered steps with checks between them, and make AEGISS easier to adopt.
Audiences, in priority order:
- A. Computational chemists using an agent to choose an active space for their molecule.
- B. Agents or developers adding AEGISS to a larger pipeline.
- C. People evaluating AEGISS (what it is, how it compares with AVAS and AutoCAS, when to use it).
Proposed feature
One aegiss skill. SKILL.md holds branch A as an ordered workflow, and branches B and C are disclosed reference files.
Single source of truth
Every chemistry rule and API fact lives once, in the docs. The skill holds the steps, their checks and links to the versioned docs pages (https://algorithmiq.github.io/AEGISS/latest/…, rewritten to /X.Y/ or /dev/ at install time).
The rules that are not written down yet come from an interview with the AEGISS authors and go into a new docs page, Choosing parameters (docs/parameters.md, in the mkdocs.yml nav), plus small edits to index.md / uhf.md where a rule belongs there. The interview fills every [interview] value below and the expected outcomes of the evaluation scenarios, and asks what new users get wrong. The interview notes are not committed; only the rules that come out of them are.
SKILL.md: the workflow (branch A)
Description (draft): "AEGISS active-space selection (DMRG entropy screening + AO projection). Use when choosing an active space or CAS for a molecule, adding AEGISS to a pipeline, or comparing AEGISS with AVAS/AutoCAS."
select_aegiss reruns DMRG on every call, so the staged workflow runs run_dmrg_subprocess once, keeps the entropies and re-screens with select_by_entropy / select_by_spin_entropy and select_by_ao_projection(restricted_space=…). select_aegiss appears only in the hand-off script.
- Environment.
aegissimports,block2mainis on PATH, andMEM,SCRATCH_DIRandOMP_NUM_THREADSare set. The skill'saegiss-versionmatchesaegiss.__version__; if not, the agent suggests reinstalling the skill. Check: a short smoke run succeeds. - Frame the chemistry. Process of interest, charge and spin, reference (RHF/ROHF/UHF), expected CAS size, candidate
ao_labels. Ask the user for what can't be worked out; suggest MolTagger for clusters. Check: an expected CAS(n,m) range and a draft label set are written down. - SCF. Check: converged; ⟨S²⟩ checked for UHF; canonical vs localized decided (if localized, step 4 also checks that the window contains the orbitals of interest).
- Projection-only probe (seconds, no DMRG):
select_by_ao_projectionon the full space plusmo_ao_contributions. Check: the number and composition of candidates match step 1; otherwise the labels are revised before any DMRG. - Cheap DMRG.
ncas≈[interview]× the expected CAS,max_bond_dim=[interview], entropies kept. Check: every orbital above τ_E is at least[interview]orbitals from the window edge; otherwise widen the window and repeat. - Screen and project on the saved entropies, tuning
fraction/contribution/top_n. Check: the final set has a sensible electron count and stays the same under a small change of threshold ([interview]). - Production or hand-off. If
ncasor the bond dimension is above[interview], write aselect_aegissscript with the tuned parameters and how they were chosen, and stop. Otherwise run it. - Report. CAS(n,m), indices in the user's base (
to_display_all), saved orbitals and plots, caveats.
Other entry points: a user who brings existing entropies or outputs starts at step 5; branches B and C go straight to their reference file.
Reference files
parameters.md(branch A, opened from steps 1, 4 and 5). Decision tables: window size per system class, cheap and production bond dimension,fraction/fraction_type,contributionvstop_n,globalvssubsetranking, typicalao_labels(π systems, 3d metals, bond breaking, lone pairs). Each row is a rule plus a docs link.integration.md(branch B). Public entry points and return types, the RHF array vs UHF{"alpha", "beta"}split, 0-based indices internally vsAEGISS_ORB_BASEat boundaries,block2mainas a subprocess (PATH,SCRATCH_DIR,MEM, cleanup), and a minimal "mfin, CASSCF out" pattern. API details link to theapi/pages instead of being copied.overview.md(branch C). The six steps in short, the relation to AVAS and AutoCAS, when AEGISS is a poor fit (from the interview), and the citation requirement, linking toindex.mdandciting.md.
Distribution
- Location. The source of truth is
src/aegiss/skill/(SKILL.md,parameters.md,integration.md,overview.md). Hatchling already ships it in the wheel. - Repo install.
skills/aegiss→../src/aegiss/skillis a symlink, sonpx skills add Algorithmiq/AEGISSworks. To verify: whether theskillsCLI follows symlinks or findsSKILL.mdanywhere in the repo. If it does neither, copy the files and add a prek sync check. - New CLI subcommand next to
configinaegiss/cli.py:aegiss skill pathprints the location of the bundled skill.aegiss skill install [DIR] [--agent claude|codex|pi] [--project] [--force]copies the skill. It defaults to./.agents/skills/aegiss; the folder for each agent is confirmed against that agent's documentation. It rewrites/latest/to/X.Y/(or/dev/for.devNbuilds), stampsaegiss-versionin the frontmatter, and won't overwrite an existing skill without--force.
- Docs. A "Using AEGISS with coding agents" section in
installation.md(or its own page if it grows) and one line in theREADME.mddocumentation list.
Checks in CI (existing just recipes)
just doctestalso coverssrc/aegiss/skill/*.md: snippets that need DMRG arenotest, and the cheap ones (SCF, projection-only probe) run.- The lychee link check covers the skill files.
tests/test_cli.pycovers installing into a temporary directory, link rewriting (0.1.0→/0.1/,0.2.0.dev3→/dev/), the--forceguard and the version stamp.- A wheel test checks that
aegiss/skill/SKILL.mdis in the package.
Evaluation
tools/skill-evals/ (tracked, not shipped, not in CI) contains:
scenarios.md: the prompt, starting files, expected outcome (from the interview) and rubric for each scenario:- Benzene π (RHF): CAS(6,6) expected; geometry in
docs/tutorials/data/. - N₂ at a stretched geometry: bond breaking.
- A small 3d transition-metal complex:
Fe 3d-style labels and the hand-off script. - A UHF radical (allyl or a triplet): spin-summed vs spin-resolved choice.
- Branch B: "add AEGISS selection into my pipeline that takes an
mfand returns a CASSCF object". - Branch C: "how is AEGISS different from AVAS, and should I use it for X?"
- Benzene π (RHF): CAS(6,6) expected; geometry in
results.md: scenario × {baseline, with skill} × date / AEGISS version / agent.
Rubric (each item passes or not):
- Outcome: the final space is an acceptable one (for scenario 3: a correct hand-off script).
- Process: probe before DMRG, window margin checked, nothing run above the hand-off threshold, the UHF entropy choice justified.
- Correctness: the code runs, and indices are reported in the user's base.
- Branch B: RHF and UHF return types handled,
block2main/scratch requirements stated. - Branch C: accurate claims, citation mentioned.
Each run is a fresh session with the same model, once without and once with the skill; the baseline is recorded before the skill is written. Pass bar: every rubric item passes on all six scenarios with the skill, and the baseline shows the skill made a difference. The evals are rerun when the skill files or the public API change (the PR template gets a reminder line for this). One AEGISS author signs off on the skill PR, with the results attached.
Order of work
- Author interview → Choosing parameters page and doc edits (own PR).
- Baseline evaluation without the skill (
tools/skill-evals/). - Skill files in
src/aegiss/skill/. aegiss skillCLI, repo path, CI checks, docs (can share a PR with 3).- Evaluation with the skill, author sign-off, release.
Affected area
Configuration and CLI; Documentation and tutorials.
Additional context
Approaches considered: three separate skills (run / integrate / explain) were rejected because they mean three descriptions loaded every turn and overlapping content. A thin skill on top of llms.txt was rejected because the ordered steps and checks, which are the point of the skill, would end up spread across the docs.
Out of scope here, tracked as follow-ups:
- #108 — let
select_aegissreuse precomputed entropies - #109 —
llms.txtfor the documentation site - #110 — Claude Code plugin marketplace entry
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- Avg merge
- 19h 42m
- Merged PRs (30d)
- 33
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Algorithmiq/AEGISS
-
API reference calls CAS(4,4) the benzene π spaceMay be free again @FabioTarocco claimed this 33 days ago, and no pull request is open. Opendocumentation enhancement
Algorithmiq/AEGISS#119 · 1 assignee ·
Maintainers usually reply within 1 day
-
Parameters page: flat AO-label lists are thresholded per labelMay be free again @FabioTarocco claimed this 33 days ago, and no pull request is open. Opendocumentation enhancement
Algorithmiq/AEGISS#118 · 1 assignee ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Algorithmiq/AEGISS#110 ·
Maintainers usually reply within 1 day
-
documentation enhancement
Difficulty 3/5 1-2 days Newbie friendliness 63/100
Algorithmiq/AEGISS#109 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 63/100
Algorithmiq/AEGISS#108 ·
Maintainers usually reply within 1 day
All issues in Algorithmiq/AEGISS
Similar issues
-
[Doc]: Feedback for `/zh-cn/v0.30.0/tutorials/models/Qwen3.6-35B-A3B.html`A3社区配置和基线不一致,社区配置也达不到基线Opendocumentation
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
vllm-project/vllm-ascend#24429 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
simnJS/AnyPS5#735 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
nq-rdl/agent-extensions#623 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
vortex-data/vortex#12633 ·
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gke-labs/kube-agents#7955 ·
Maintainers usually reply within 1 day