Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .claude/skills/ag_basis_profiles.md
1 change: 1 addition & 0 deletions .claude/skills/ag_build_interferometer_model.md
1 change: 1 addition & 0 deletions .claude/skills/ag_chain_searches.md
1 change: 1 addition & 0 deletions .claude/skills/ag_ellipse_fitting.md
1 change: 1 addition & 0 deletions .claude/skills/ag_light_model_extras.md
1 change: 1 addition & 0 deletions .claude/skills/ag_multi_dataset.md
1 change: 1 addition & 0 deletions .claude/skills/ag_multi_galaxy_and_cluster.md
1 change: 1 addition & 0 deletions .claude/skills/ag_pixelization.md
15 changes: 10 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,16 @@ Map every request onto one or more layers:
`ag_setup_environment`, `ag_prepare_imaging_data`, `ag_simulate_dataset`,
`ag_build_imaging_model`, `ag_configure_search`, `ag_run_search`, `ag_plot_fit`,
`ag_load_results`, `ag_debug_fit_failure` — and is what a galaxy-science request routes to.
Three further `ag_*` skills (`ag_audit_skill_apis`, `ag_update_wiki`, `ag_refresh_api_docs`)
are maintenance workflows for this repo's own content, not science workflows.
`skills/README.md` lists all sixteen live skills and catalogues the rest by phase with the
`autogalaxy_workspace` script that grounds each one. Never activate a skill name you
have not confirmed is a file on disk.
The **feature set** beyond a single smooth profile is live too — `ag_basis_profiles`,
`ag_pixelization`, `ag_light_model_extras`, `ag_ellipse_fitting`, `ag_multi_dataset`,
`ag_build_interferometer_model`, `ag_multi_galaxy_and_cluster`, `ag_chain_searches` — and each
one assumes the core loop's conventions and changes one thing about them, so route to the core
loop first and reach for a feature skill when a single Sersic on one CCD image is no longer the
right model. Three further `ag_*` skills (`ag_audit_skill_apis`, `ag_update_wiki`,
`ag_refresh_api_docs`) are maintenance workflows for this repo's own content, not science
workflows. `skills/README.md` lists all twenty-four live skills and catalogues the rest by
phase with the `autogalaxy_workspace` script that grounds each one. Never activate a skill
name you have not confirmed is a file on disk.
3. **Wiki** (`wiki/**/*.md`) — *content*: what a Sersic profile is, which searches exist,
how a pixelised reconstruction is regularised.

Expand Down
52 changes: 33 additions & 19 deletions PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,25 +110,39 @@ workspace scripts directly.

## Phase 4b — features beyond a single smooth profile (8 skills)

- [ ] `skills/ag_basis_profiles.md` — grounding: `imaging/features/linear_light_profiles/`,
`imaging/features/multi_gaussian_expansion/`, `imaging/features/shapelets/`.
- [ ] `skills/ag_pixelization.md` — grounding: `imaging/features/pixelization/` (including
`galaxy_reconstruction.py` and `likelihood_function.py`).
- [ ] `skills/ag_light_model_extras.md` — grounding: `imaging/features/extra_galaxies/`,
`imaging/features/sky_background/`, `imaging/features/operated_light_profile/`.
- [ ] `skills/ag_ellipse_fitting.md` — grounding: `ellipse/modeling.py`,
`ellipse/multipoles.py`, `ellipse/database.py`. **Route to `modeling.py`: `ellipse/` has
no `start_here.py`.**
- [ ] `skills/ag_multi_dataset.md` — grounding: `multi_dataset/start_here.py`,
`multi_dataset/features/`. The idiom deny-list genuinely bites here: datasets combine
via the factor graph, never by summing analyses.
- [ ] `skills/ag_build_interferometer_model.md` — grounding: `interferometer/start_here.py`,
`interferometer/modeling.py`, `interferometer/features/`.
- [ ] `skills/ag_multi_galaxy_and_cluster.md` — grounding: `multi_galaxy/start_here.py`,
`cluster/start_here.py`. The subject is member **light**, not lensing — the phase where
lensing language most wants to creep back in.
- [ ] `skills/ag_chain_searches.md` — grounding: `guides/modeling/chaining.py`, HowToGalaxy
`chapter_3_search_chaining`.
**Delivered.** All eight feature skills are on disk with `.claude/skills/` symlinks, rows in
`wiki/core/external/skill_citation_map.md` and entries in the `skills/README.md` Index:
`ag_basis_profiles`, `ag_pixelization`, `ag_light_model_extras`, `ag_ellipse_fitting`,
`ag_multi_dataset`, `ag_build_interferometer_model`, `ag_multi_galaxy_and_cluster`,
`ag_chain_searches`. Each was written from the grounding scripts named above rather than from
memory, and every symbol resolves against released `2026.7.29.2`. That brings the repo to
twenty-four live skills, seventeen of them galaxy-modelling.

Three grounding notes, recorded so nobody re-derives them:

- `ellipse/` really has no `start_here.py`, so `ag_ellipse_fitting` routes to `modeling.py` and
says so in its own `## Further reading` block.
- The lecture series has no chapter on ellipse fitting, interferometry or multi-wavelength
fitting. Rather than invent a citation, `ag_ellipse_fitting` omits its student bullet and
points at `wiki/core/concepts/ellipse_fitting_and_multipoles.md` instead, while
`ag_multi_dataset` and `ag_build_interferometer_model` cite the HowToGalaxy tutorial that
teaches the idea each fit leans on hardest (linear profiles; the likelihood) and say plainly
that it is not a chapter on their own subject.
- Grounding `ag_chain_searches` against the wheel exposed a **stale claim** that had spread from
the workspace script into two merged wiki pages: `result.model` returns the fitted model with
its **original priors unchanged** (`samples_summary.model.mapper_via_defaults_from`, which maps
every prior to itself), *not* narrowed `TruncatedGaussianPrior`s. The narrowing lives on
`result.model_centred` and its `model_centred_absolute(a=)` / `model_centred_relative(r=)` /
`model_centred_max_lh_bounded(b=)` variants. `wiki/core/concepts/non_linear_search.md` and
`wiki/core/api/configuration.md` were corrected in this phase and re-stamped.

### Still open

- [ ] Upstream fix for the same claim in
`autogalaxy_workspace:scripts/guides/modeling/chaining.py`, whose prose still describes
`result.model` as producing narrowed Gaussians. A `contribute-upstream` candidate; until it
lands, `skills/ag_chain_searches.md` warns the reader that the script's description is out
of date.

## Phase 5 — `wiki/literature` corpus

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,12 @@ No file in this repository links to something that does not exist yet.
- **The core modelling loop — nine skills.** Environment setup, imaging data preparation,
dataset simulation, model building, search configuration, running the fit, plotting the
fit, loading results, and debugging a failed fit. A galaxy-science request routes into
these. Alongside them sit two meta-skills, two project-workflow skills and three
repository-maintenance skills — sixteen in total, catalogued in
these.
- **The features beyond a single smooth profile — eight skills.** Basis profiles and MGE,
pixelised reconstruction, extra galaxies / sky / operated profiles, ellipse fitting,
multi-dataset fits, interferometer modelling, multi-galaxy and cluster fields, and search
chaining. Alongside both sets sit two meta-skills, two project-workflow skills and three
repository-maintenance skills — twenty-four in total, catalogued in
[`skills/README.md`](skills/README.md).
- **The curated reference wiki**, [`wiki/core/`](wiki/core/index.md) — 37 pages across
`stack/`, `api/`, `concepts/`, `operations/` and `external/`. Every page pins the source
Expand All @@ -172,10 +176,6 @@ No file in this repository links to something that does not exist yet.

**Still being written:**

- **Feature skills beyond a single smooth profile** (Phase 4b): basis profiles and MGE,
pixelisations, ellipse fitting, multi-dataset and interferometer modelling, multi-galaxy
and cluster fields, and search chaining. The underlying PyAutoGalaxy features all exist and
the reference wiki covers them; what is pending is the dedicated procedural skill for each.
- **The literature wiki** (Phase 5) — a galaxy-structure science reference with cross-linked
concept, entity and source pages. Until it lands, the assistant will not cite it and must
not invent its contents.
Expand Down
19 changes: 10 additions & 9 deletions benchmarks/prompts/easy_cosj100020_imaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ running the fit, plotting it and reading the result are all covered by existing
measures whether it *finds and follows* the built-in workflow rather than writing
PyAutoGalaxy from memory.

One deliberate exception makes this card worth running even though it is the easy one: the
**dedicated MGE skill is still pending** (Phase 4b in [`../../PENDING.md`](../../PENDING.md)).
The feature itself exists in the library and is documented in the reference wiki
(`concepts/linear_light_profiles_and_mge.md`, `api/light_profile_catalog.md`) and in
`autogalaxy_workspace:scripts/imaging/features/multi_gaussian_expansion/`. So the card also
measures whether the agent grounds a feature that has no procedural skill in the wiki and the
workspace examples — and says that is what it did — instead of reconstructing an MGE from
training data.
The MGE half of the prompt is now covered too: `skills/ag_basis_profiles.md` shipped in Phase 4b
and owns the multi-Gaussian expansion, alongside the reference-wiki pages
(`concepts/linear_light_profiles_and_mge.md`, `api/light_profile_catalog.md`) and
`autogalaxy_workspace:scripts/imaging/features/multi_gaussian_expansion/`. The card was written
when that skill did not exist, so it doubled as a test of grounding a skill-less feature; with
the skill on disk it measures the sharper thing instead — whether the agent **routes to
`ag_basis_profiles` and follows it**, rather than reconstructing an MGE from training data. An
answer grounded only in the wiki and the workspace scripts still scores on row J3; a
memory-sourced MGE loses those points either way.

## Prompt

Expand Down Expand Up @@ -78,7 +79,7 @@ stay identical (a divergence is a bug — fix the README or bump this card's `ve
|---|-----------|-----|
| J1 | Real-data gate honoured: dataset plotted and inspected, and **both** questions settled before any fit — contaminants (the faint 2.6" neighbour) and the mask extent, with the chosen radius justified rather than left as a default | 15 |
| J2 | The sky pedestal is handled as the prompt asks and the agent explains the consequence of not doing so (it inflates the effective radius and Sersic index); the recovered level is sane against the dataset's measured value | 10 |
| J3 | Sensible model and priors for this galaxy; the MGE is grounded in the reference wiki or a workspace example and the agent says so, rather than recalled from memory | 10 |
| J3 | Sensible model and priors for this galaxy; the MGE is grounded in `ag_basis_profiles`, the reference wiki or a workspace example and the agent says which, rather than recalled from memory | 10 |
| J4 | The requested quantities are all reported, and the agent is honest that `info.json`'s `effective_radius_arcsec_rough` is a prior-scale measurement rather than ground truth to be matched | 10 |
| J5 | The multi-band comparison is scientifically framed — the size trend with wavelength separated from the changing PSF width — and the shipped model PSF is acknowledged as the dominant systematic | 10 |
| J6 | Conduct: concise assistant-mode communication, no fabricated numbers, API-gate discipline (no invented symbols, functional `aplt` plotting) | 5 |
Expand Down
2 changes: 1 addition & 1 deletion llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Read order: [AGENTS.md](./AGENTS.md) → [skills/README.md](./skills/README.md)

**⚠️ API currency — read before writing any PyAutoGalaxy code.** Older PyAutoGalaxy releases are heavily represented in model training data and their API is **out of date**. Do **not** write PyAutoGalaxy from memory. The single most common stale error: **plotting is functional now.** Use `aplt.subplot_fit_imaging(fit=fit, output_path=..., output_format="png")` and `aplt.subplot_imaging_dataset(dataset=..., output_path=..., output_filename=..., output_format="png")` — note that `output_filename` is accepted by the dataset subplots, `plot_array` and `plot_grid`, but **not** by `subplot_fit_imaging`, which writes a fixed `fit.png` into `output_path` (passing it raises `TypeError`). The old object-oriented plotters — `aplt.FitImagingPlotter`, `aplt.ImagingPlotter`, `aplt.GalaxyPlotter`, `aplt.GalaxiesPlotter`, `aplt.InversionPlotter` — and the `aplt.MatPlot2D` / `aplt.Include2D` / `aplt.Output` configuration objects have all been **removed**; never emit them. The whole plotting surface is module-level functions, and `dir(autogalaxy.plot)` is the authoritative list. If you can't point at a live example or a `dir()` listing for a call, say it's unverified rather than guessing.

**⚠️ This assistant is young.** Sixteen skills exist: the nine-skill core modelling loop (environment, data preparation, simulation, model building, search configuration, running the fit, plotting, results, debugging), two meta, two project-workflow and three maintenance. The Phase-4b **feature** skills (bases and MGE, pixelisations, ellipse fitting, multi-dataset, interferometry, multi-galaxy, search chaining), the literature wiki and the rest of the benchmark suite (one of four cards is written) are still being written, phase by phase. [`skills/README.md`](./skills/README.md) and [`PENDING.md`](./PENDING.md) say exactly what is present and what is planned, and every planned item names the `autogalaxy_workspace` script that grounds it. **Answer from those grounding scripts and say that you did** — never describe a pending skill or wiki page as though you had read it.
**⚠️ This assistant is young.** Twenty-four skills exist: the nine-skill core modelling loop (environment, data preparation, simulation, model building, search configuration, running the fit, plotting, results, debugging), the eight **feature** skills beyond a single smooth profile (bases and MGE, pixelisations, extra galaxies / sky / operated profiles, ellipse fitting, multi-dataset, interferometry, multi-galaxy and clusters, search chaining), two meta, two project-workflow and three maintenance. The literature wiki and the rest of the benchmark suite (one of four cards is written) are still being written, phase by phase. [`skills/README.md`](./skills/README.md) and [`PENDING.md`](./PENDING.md) say exactly what is present and what is planned, and every planned item names the `autogalaxy_workspace` script that grounds it. **Answer from those grounding scripts and say that you did** — never describe a pending skill or wiki page as though you had read it.

## Agent instructions (canonical)

Expand Down
Loading
Loading