Skip to content

feat(skills): author the ac_* CTI calibration skill set (Phase 2)#2

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/phase2-ac-skills
Jul 17, 2026
Merged

feat(skills): author the ac_* CTI calibration skill set (Phase 2)#2
Jammy2211 merged 1 commit into
mainfrom
feature/phase2-ac-skills

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Phase 2 of the autocti_assistant epic (PyAutoBrain#136). Grows the lightweight
seed into a working assistant: nine skills covering the CTI calibration
pipeline end-to-end, each grounded in a validated autocti_workspace script and
verified against the live stack.

The skills

Skill Covers Grounded in
ac_setup_environment install incl. arcticpy (the #1 failure) PyAutoCTI:AGENTS.md, smoke_install.sh
ac_workspace_navigation the map: two geometries, shared stage pipeline autocti_workspace tree
ac_simulate_dataset_1d simulate a 1D CTI dataset with a known trap model dataset_1d/simulators/start_here.py
ac_simulate_imaging_ci simulate a 2D charge-injection image (Clocker2D) imaging_ci/simulators/start_here.py
ac_mask_and_extract mask FPR/EPER; layout.extract.fpr/eper dataset_1d/{modeling,extract}
ac_fit_cti_model compose + fit, incl. the AnalysisFactor/FactorGraphModel joint fit dataset_1d/modeling/start_here.py
ac_correct_cti clocker.remove_cti for correction + diagnosis dataset_1d/correction/start_here.py
ac_plot the autocti.plot function API (no MatPlot/Output object) scripts/plot/start_here.py
ac_load_results result objects + the aggregator (ac.agg.CTIAgg) dataset_1d/results/

Wired into .claude/skills/ (symlinks), indexed in a rewritten
skills/README.md — the old index was the autolens catalogue with al_→ac_
substitution, listing 45 skills of which only 13 files existed; it now honestly
describes the CTI catalogue and points at PENDING.md for the growth queue.

Grounding beat the prompt's assumptions twice

  • The aggregator is ac.agg.CTIAgg, not Dataset1DAgg as the seed prompt
    guessed (both exist; CTIAgg is what the scripts use).
  • The plot scripts live at scripts/plot/, not per-geometry — my first draft
    cited scripts/dataset_1d/plot/ and the citation check caught it.

Validation — every wiki-currency check green

Run with audit_skill_apis.py against the live CTI stack:

--scope all         PASS   (0 broken / 33 symbols)
--check-citations   PASS   (0 missing / 27 citations)
--lint-idioms       PASS
--check-provenance  PASS
--check-version     PASS   (wrote wiki/core/api_audit_baseline.json,
                            pinning the 4-module CTI stack — no autogalaxy)

The audit earned its keep three times: it caught aplt.Output and
analysis + analysis written in prose to say they're gone (rephrased so the
parser doesn't read them as live symbols), a wildcard aplt.subplot_* token, and
the wrong plot-script paths.

Also fixes the pre-existing _style.md lensing-path citation
(scripts/imaging/scripts/dataset_1d/modeling/), the last seed content leak
the earlier PR flagged.

Expected CI

wiki-currency should now go green — the reason it was red on the seed-infra
PR (no baseline) is resolved, and every check above passes locally against the
same main source the CI installs. boundary skips (not a clone reference).

Part of #136 (Phase 2). Wiki (Phase 3) and end-to-end demonstrations (Phase 4)
still to come; the newborn stays private until then.

Grow the lightweight seed into a working assistant: nine skills covering the CTI
calibration pipeline end-to-end, each grounded in a validated autocti_workspace
script rather than API memory, and each verified against the live stack.

Skills:
  ac_setup_environment    — install the stack incl. arcticpy (the #1 failure)
  ac_workspace_navigation — the map: two geometries, shared stage pipeline
  ac_simulate_dataset_1d  — simulate a 1D CTI dataset with a known trap model
  ac_simulate_imaging_ci  — simulate a 2D charge-injection image (Clocker2D)
  ac_mask_and_extract     — mask FPR/EPER; extract regions via layout.extract
  ac_fit_cti_model        — compose + fit, incl. the AnalysisFactor / FactorGraphModel
                            joint fit over several charge lines (the core capability)
  ac_correct_cti          — clocker.remove_cti, for correction + calibration diagnosis
  ac_plot                 — the autocti.plot function API (no MatPlot/Output object)
  ac_load_results         — result objects + the aggregator (ac.agg.CTIAgg generators)

Wiring: symlinked into .claude/skills/, indexed in a rewritten skills/README.md
(the old index was the autolens catalogue with al_->ac_ substitution, listing 45
skills of which only 13 files existed — now an honest CTI catalogue pointing at
PENDING.md for the growth queue), matching PENDING entries removed.

Grounding surfaced two facts worth recording: the aggregator is ac.agg.CTIAgg
(the seed prompt guessed Dataset1DAgg — both exist, CTIAgg is what the scripts
use), and the plot scripts live at scripts/plot/, not per-geometry.

Validation (audit_skill_apis.py against the live CTI stack):
  --scope all         PASS (0 broken across 33 symbols)
  --check-citations   PASS (0 missing across 27 citations)
  --lint-idioms       PASS
  --check-provenance  PASS
  --check-version     PASS — wrote wiki/core/api_audit_baseline.json, pinning the
                      four-module CTI stack (no autogalaxy) at the current main.

Also fixes the pre-existing _style.md lensing-path citation
(scripts/imaging/ -> scripts/dataset_1d/modeling/), a seed content leak.

Part of #136 (Phase 2). Wiki (Phase 3) and demonstrations (Phase 4) still to come.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit 557ba0b into main Jul 17, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the feature/phase2-ac-skills branch July 17, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant