diff --git a/.claude/commands/af_adapt_to_domain.md b/.claude/commands/af_adapt_to_domain.md new file mode 120000 index 0000000..72ecd08 --- /dev/null +++ b/.claude/commands/af_adapt_to_domain.md @@ -0,0 +1 @@ +../../skills/af_adapt_to_domain.md \ No newline at end of file diff --git a/.claude/commands/af_audit_skill_apis.md b/.claude/commands/af_audit_skill_apis.md new file mode 120000 index 0000000..d1e9866 --- /dev/null +++ b/.claude/commands/af_audit_skill_apis.md @@ -0,0 +1 @@ +../../skills/af_audit_skill_apis.md \ No newline at end of file diff --git a/.claude/commands/af_chain_searches.md b/.claude/commands/af_chain_searches.md new file mode 120000 index 0000000..e7704f9 --- /dev/null +++ b/.claude/commands/af_chain_searches.md @@ -0,0 +1 @@ +../../skills/af_chain_searches.md \ No newline at end of file diff --git a/.claude/commands/af_compose_model.md b/.claude/commands/af_compose_model.md new file mode 120000 index 0000000..8d4fd7d --- /dev/null +++ b/.claude/commands/af_compose_model.md @@ -0,0 +1 @@ +../../skills/af_compose_model.md \ No newline at end of file diff --git a/.claude/commands/af_configure_search.md b/.claude/commands/af_configure_search.md new file mode 120000 index 0000000..94832d8 --- /dev/null +++ b/.claude/commands/af_configure_search.md @@ -0,0 +1 @@ +../../skills/af_configure_search.md \ No newline at end of file diff --git a/.claude/commands/af_custom_analysis.md b/.claude/commands/af_custom_analysis.md new file mode 120000 index 0000000..8f823f3 --- /dev/null +++ b/.claude/commands/af_custom_analysis.md @@ -0,0 +1 @@ +../../skills/af_custom_analysis.md \ No newline at end of file diff --git a/.claude/commands/af_debug_fit_failure.md b/.claude/commands/af_debug_fit_failure.md new file mode 120000 index 0000000..f4e81a2 --- /dev/null +++ b/.claude/commands/af_debug_fit_failure.md @@ -0,0 +1 @@ +../../skills/af_debug_fit_failure.md \ No newline at end of file diff --git a/.claude/commands/af_ingest_paper.md b/.claude/commands/af_ingest_paper.md new file mode 120000 index 0000000..3f6a58e --- /dev/null +++ b/.claude/commands/af_ingest_paper.md @@ -0,0 +1 @@ +../../skills/af_ingest_paper.md \ No newline at end of file diff --git a/.claude/commands/af_inspect_results_mcp.md b/.claude/commands/af_inspect_results_mcp.md new file mode 120000 index 0000000..6dd84cd --- /dev/null +++ b/.claude/commands/af_inspect_results_mcp.md @@ -0,0 +1 @@ +../../skills/af_inspect_results_mcp.md \ No newline at end of file diff --git a/.claude/commands/af_load_results.md b/.claude/commands/af_load_results.md new file mode 120000 index 0000000..995b30f --- /dev/null +++ b/.claude/commands/af_load_results.md @@ -0,0 +1 @@ +../../skills/af_load_results.md \ No newline at end of file diff --git a/.claude/commands/af_plot_fit.md b/.claude/commands/af_plot_fit.md new file mode 120000 index 0000000..62c8d9b --- /dev/null +++ b/.claude/commands/af_plot_fit.md @@ -0,0 +1 @@ +../../skills/af_plot_fit.md \ No newline at end of file diff --git a/.claude/commands/af_refresh_api_docs.md b/.claude/commands/af_refresh_api_docs.md new file mode 120000 index 0000000..24beaaf --- /dev/null +++ b/.claude/commands/af_refresh_api_docs.md @@ -0,0 +1 @@ +../../skills/af_refresh_api_docs.md \ No newline at end of file diff --git a/.claude/commands/af_run_search.md b/.claude/commands/af_run_search.md new file mode 120000 index 0000000..b22395a --- /dev/null +++ b/.claude/commands/af_run_search.md @@ -0,0 +1 @@ +../../skills/af_run_search.md \ No newline at end of file diff --git a/.claude/commands/af_setup_environment.md b/.claude/commands/af_setup_environment.md new file mode 120000 index 0000000..4417726 --- /dev/null +++ b/.claude/commands/af_setup_environment.md @@ -0,0 +1 @@ +../../skills/af_setup_environment.md \ No newline at end of file diff --git a/.claude/commands/af_simulate_dataset.md b/.claude/commands/af_simulate_dataset.md new file mode 120000 index 0000000..0e84dd5 --- /dev/null +++ b/.claude/commands/af_simulate_dataset.md @@ -0,0 +1 @@ +../../skills/af_simulate_dataset.md \ No newline at end of file diff --git a/.claude/commands/af_to_notebook.md b/.claude/commands/af_to_notebook.md new file mode 120000 index 0000000..cc67418 --- /dev/null +++ b/.claude/commands/af_to_notebook.md @@ -0,0 +1 @@ +../../skills/af_to_notebook.md \ No newline at end of file diff --git a/.claude/commands/af_update_wiki.md b/.claude/commands/af_update_wiki.md new file mode 120000 index 0000000..f3887e0 --- /dev/null +++ b/.claude/commands/af_update_wiki.md @@ -0,0 +1 @@ +../../skills/af_update_wiki.md \ No newline at end of file diff --git a/.claude/commands/af_wrap_likelihood.md b/.claude/commands/af_wrap_likelihood.md new file mode 120000 index 0000000..4bc3f14 --- /dev/null +++ b/.claude/commands/af_wrap_likelihood.md @@ -0,0 +1 @@ +../../skills/af_wrap_likelihood.md \ No newline at end of file diff --git a/.claude/commands/contribute-upstream.md b/.claude/commands/contribute-upstream.md new file mode 120000 index 0000000..c388cef --- /dev/null +++ b/.claude/commands/contribute-upstream.md @@ -0,0 +1 @@ +../../skills/contribute-upstream.md \ No newline at end of file diff --git a/.claude/commands/start-new-project.md b/.claude/commands/start-new-project.md new file mode 120000 index 0000000..b709b4d --- /dev/null +++ b/.claude/commands/start-new-project.md @@ -0,0 +1 @@ +../../skills/start-new-project.md \ No newline at end of file diff --git a/.claude/skills/af_adapt_to_domain.md b/.claude/skills/af_adapt_to_domain.md new file mode 120000 index 0000000..72ecd08 --- /dev/null +++ b/.claude/skills/af_adapt_to_domain.md @@ -0,0 +1 @@ +../../skills/af_adapt_to_domain.md \ No newline at end of file diff --git a/.claude/skills/af_ingest_paper.md b/.claude/skills/af_ingest_paper.md new file mode 120000 index 0000000..3f6a58e --- /dev/null +++ b/.claude/skills/af_ingest_paper.md @@ -0,0 +1 @@ +../../skills/af_ingest_paper.md \ No newline at end of file diff --git a/.claude/skills/af_wrap_likelihood.md b/.claude/skills/af_wrap_likelihood.md new file mode 120000 index 0000000..4bc3f14 --- /dev/null +++ b/.claude/skills/af_wrap_likelihood.md @@ -0,0 +1 @@ +../../skills/af_wrap_likelihood.md \ No newline at end of file diff --git a/.claude/skills/contribute-upstream.md b/.claude/skills/contribute-upstream.md new file mode 120000 index 0000000..c388cef --- /dev/null +++ b/.claude/skills/contribute-upstream.md @@ -0,0 +1 @@ +../../skills/contribute-upstream.md \ No newline at end of file diff --git a/.claude/skills/start-new-project.md b/.claude/skills/start-new-project.md new file mode 120000 index 0000000..b709b4d --- /dev/null +++ b/.claude/skills/start-new-project.md @@ -0,0 +1 @@ +../../skills/start-new-project.md \ No newline at end of file diff --git a/.codex/skills/autofit-assistant-af-adapt-to-domain/SKILL.md b/.codex/skills/autofit-assistant-af-adapt-to-domain/SKILL.md new file mode 100644 index 0000000..9500e2a --- /dev/null +++ b/.codex/skills/autofit-assistant-af-adapt-to-domain/SKILL.md @@ -0,0 +1,7 @@ +--- +name: autofit-assistant-af-adapt-to-domain +description: "The domain-adaptation orchestrator — turn a fresh clone of this assistant into the user's own domain inference assistant. Runs a light interview about their field, data and conventions; drives the three adaptation channels (paper ingestion into wiki/literature/, likelihood wrapping, model composition); and records everything durable in wiki/project/profile.md so future sessions start domain-aware. Use when a user says \"become my assistant for (field)\", \"adapt to my domain\", \"train yourself on my papers\", or arrives with a new scientific domain the assistant hasn't recorded. Not for a single paper (af_ingest_paper) or a single wrap (af_wrap_likelihood) — this composes them." +--- + + +Read and follow the canonical skill: [SKILL](../../../skills/af_adapt_to_domain.md). diff --git a/.codex/skills/autofit-assistant-af-audit-skill-apis/SKILL.md b/.codex/skills/autofit-assistant-af-audit-skill-apis/SKILL.md new file mode 100644 index 0000000..c540675 --- /dev/null +++ b/.codex/skills/autofit-assistant-af-audit-skill-apis/SKILL.md @@ -0,0 +1,7 @@ +--- +name: autofit-assistant-af-audit-skill-apis +description: "Verify every PyAuto* API symbol cited in skills/, wiki/core/, and generated scripts (scripts/) resolves in the currently installed stack. Reports stale references (renamed, moved, or removed) with suggested replacements drawn from string-similarity and a cross-module search. Also owns the API version baseline (`wiki/core/api_audit_baseline.json`) that pins the workspace to an autofit version: `--write-baseline` records the installed versions + public-API-surface hash, and `--check-version` (the cheap session-start drift-check) flags when the installed stack has moved. Pairs with `af_update_wiki` (which detects prose drift via pinned source commits) — this skill closes the complementary gap that skills have no pinned commits and that wiki pages can name symbols that no longer exist. Run when a user reports an API error, after a PyAuto* upgrade, or on a manual cadence; the helper script `autoassistant/audit_skill_apis.py` does the mechanical pass and this skill drives interpretation and curates fixes." +--- + + +Read and follow the canonical skill: [SKILL](../../../skills/af_audit_skill_apis.md). diff --git a/.codex/skills/autofit-assistant-af-chain-searches/SKILL.md b/.codex/skills/autofit-assistant-af-chain-searches/SKILL.md new file mode 100644 index 0000000..ecbb717 --- /dev/null +++ b/.codex/skills/autofit-assistant-af-chain-searches/SKILL.md @@ -0,0 +1,7 @@ +--- +name: autofit-assistant-af-chain-searches +description: "Chain non-linear searches — pass one fit's result into the next fit's priors or start points, so a cheap simplified fit hands a focused parameter space to the expensive full fit. Covers `result.instance` (fix at fitted values), `result.model` (posterior-updated priors), the `model_centred*` variants, and the Initializer start-point classes. Use when the user says \"use the first fit to seed the second\", \"fix these components at the previous result\", \"chain searches\", or wants a staged/pipelined analysis. Not for choosing a single sampler (af_configure_search) or combining datasets (that is the factor graph)." +--- + + +Read and follow the canonical skill: [SKILL](../../../skills/af_chain_searches.md). diff --git a/.codex/skills/autofit-assistant-af-compose-model/SKILL.md b/.codex/skills/autofit-assistant-af-compose-model/SKILL.md new file mode 100644 index 0000000..1088b70 --- /dev/null +++ b/.codex/skills/autofit-assistant-af-compose-model/SKILL.md @@ -0,0 +1,7 @@ +--- +name: autofit-assistant-af-compose-model +description: "Compose a PyAutoFit model from the user's parametrisation — turn Python classes into `af.Model` objects, combine components with `af.Collection`, and set every prior deliberately (uniform, log-uniform, Gaussian, fixed, linked, asserted). Use when the user wants to define what is being fitted — \"set up my model\", \"what priors should I use\", \"fix this parameter\", \"tie these two parameters together\". Not for writing the likelihood (that is `af_wrap_likelihood` / a custom Analysis) or for running the fit (that is `af_run_search`)." +--- + + +Read and follow the canonical skill: [SKILL](../../../skills/af_compose_model.md). diff --git a/.codex/skills/autofit-assistant-af-configure-search/SKILL.md b/.codex/skills/autofit-assistant-af-configure-search/SKILL.md new file mode 100644 index 0000000..0b8604b --- /dev/null +++ b/.codex/skills/autofit-assistant-af-configure-search/SKILL.md @@ -0,0 +1,7 @@ +--- +name: autofit-assistant-af-configure-search +description: "Choose and configure a PyAutoFit non-linear search — nested samplers (Nautilus, DynestyStatic/Dynamic), MCMC (Emcee, Zeus, BlackJAXNUTS), and MLE optimizers (LBFGS, Drawer) — including output paths, cores, initializers and per-sampler settings. Use when the user asks \"which sampler should I use\", \"configure the search\", or wants to tune convergence/runtime. Not for actually executing the fit (that is `af_run_search`) or for composing the model (that is `af_compose_model`)." +--- + + +Read and follow the canonical skill: [SKILL](../../../skills/af_configure_search.md). diff --git a/.codex/skills/autofit-assistant-af-custom-analysis/SKILL.md b/.codex/skills/autofit-assistant-af-custom-analysis/SKILL.md new file mode 100644 index 0000000..17e660e --- /dev/null +++ b/.codex/skills/autofit-assistant-af-custom-analysis/SKILL.md @@ -0,0 +1,7 @@ +--- +name: autofit-assistant-af-custom-analysis +description: "Extend an Analysis class beyond plain likelihood wrapping — extra data/config inputs in __init__, a custom Visualizer that plots model fits during and after the search, and a custom Result carrying science-specific attributes. Use when the user wants on-disk visualization of fits as the search runs, richer Result objects, or an Analysis carrying masks/kernels/covariances. Builds on af_wrap_likelihood (do that first if the likelihood isn't wrapped yet); not for the wrapping itself." +--- + + +Read and follow the canonical skill: [SKILL](../../../skills/af_custom_analysis.md). diff --git a/.codex/skills/autofit-assistant-af-debug-fit-failure/SKILL.md b/.codex/skills/autofit-assistant-af-debug-fit-failure/SKILL.md new file mode 100644 index 0000000..9edf678 --- /dev/null +++ b/.codex/skills/autofit-assistant-af-debug-fit-failure/SKILL.md @@ -0,0 +1,7 @@ +--- +name: autofit-assistant-af-debug-fit-failure +description: "Triage a misbehaving fit — garbage posteriors, stuck samplers, NaN likelihoods, truth not recovered, walls of sampler warnings. A strict-order diagnostic flowchart: likelihood sanity first, then prior coverage, then data pathology, then sampler diagnostics — because each later stage is meaningless if an earlier one is broken. Use when the user says \"the fit isn't working\", \"the posterior looks wrong\", \"the sampler is stuck\", or a simulation recovery failed. Not for slow-but-correct fits (that is a chaining/budget conversation, af_chain_searches / af_configure_search)." +--- + + +Read and follow the canonical skill: [SKILL](../../../skills/af_debug_fit_failure.md). diff --git a/.codex/skills/autofit-assistant-af-ingest-paper/SKILL.md b/.codex/skills/autofit-assistant-af-ingest-paper/SKILL.md new file mode 100644 index 0000000..b008929 --- /dev/null +++ b/.codex/skills/autofit-assistant-af-ingest-paper/SKILL.md @@ -0,0 +1,7 @@ +--- +name: autofit-assistant-af-ingest-paper +description: "Add a verified paper from the user's scientific domain to the literature record — project-local (`wiki/project/bibliography.md`) by default when working inside a science project, or this clone's literature wiki + canonical BibTeX layer when in the assistant clone or on explicit promotion. Accepts a local PDF or public paper URL, resolves or adds canonical metadata, writes a compact claim-oriented source entry, updates relevant concept/entity links, validates key consistency, and never records local PDF paths. This is a primary domain-adaptation channel: each ingested paper makes the assistant more fluent in the user's field. Use when a user wants a paper added so future sessions can cite its supported claims reliably." +--- + + +Read and follow the canonical skill: [SKILL](../../../skills/af_ingest_paper.md). diff --git a/.codex/skills/autofit-assistant-af-inspect-results-mcp/SKILL.md b/.codex/skills/autofit-assistant-af-inspect-results-mcp/SKILL.md new file mode 100644 index 0000000..54c709a --- /dev/null +++ b/.codex/skills/autofit-assistant-af-inspect-results-mcp/SKILL.md @@ -0,0 +1,7 @@ +--- +name: autofit-assistant-af-inspect-results-mcp +description: "Run and configure the read-only results-inspector MCP server, which lets an MCP client (Claude Desktop, Claude Code) inspect PyAutoFit output directories without running Python — list fits ranked by evidence, read model and posterior summaries, and view result images inline in chat. Use when the user wants to \"browse/inspect my results from chat\", asks about the MCP server, or wants Claude Desktop wired to their output folder. Not for loading results in Python (that is `af_load_results`) and not for running fits." +--- + + +Read and follow the canonical skill: [SKILL](../../../skills/af_inspect_results_mcp.md). diff --git a/.codex/skills/autofit-assistant-af-load-results/SKILL.md b/.codex/skills/autofit-assistant-af-load-results/SKILL.md new file mode 100644 index 0000000..bb23ce5 --- /dev/null +++ b/.codex/skills/autofit-assistant-af-load-results/SKILL.md @@ -0,0 +1,7 @@ +--- +name: autofit-assistant-af-load-results +description: "Load and analyse the results of completed PyAutoFit fits — the Result object's posterior samples (medians, errors at sigma, instances), the Bayesian evidence, marginalisation, CSV export, and bulk loading of many fits via the aggregator/database. Use when the user says \"load my results\", \"what did the fit find\", \"get the posterior/errors/evidence\", or wants to compare or tabulate many completed fits. Not for running fits (that is `af_run_search`)." +--- + + +Read and follow the canonical skill: [SKILL](../../../skills/af_load_results.md). diff --git a/.codex/skills/autofit-assistant-af-plot-fit/SKILL.md b/.codex/skills/autofit-assistant-af-plot-fit/SKILL.md new file mode 100644 index 0000000..ae59863 --- /dev/null +++ b/.codex/skills/autofit-assistant-af-plot-fit/SKILL.md @@ -0,0 +1,7 @@ +--- +name: autofit-assistant-af-plot-fit +description: "Visualise fits and posteriors — corner plots and search diagnostics via autofit.plot (aplt), model-vs-data and residual figures via matplotlib over model instances, and the af.ex.plot_profile_1d helper for 1D profiles. Use when the user says \"plot the fit\", \"show me the corner plot\", \"plot residuals\", or wants figures from a completed search. Not for the in-search Visualizer hooks (that is af_custom_analysis) or for loading the results being plotted (af_load_results)." +--- + + +Read and follow the canonical skill: [SKILL](../../../skills/af_plot_fit.md). diff --git a/.codex/skills/autofit-assistant-af-refresh-api-docs/SKILL.md b/.codex/skills/autofit-assistant-af-refresh-api-docs/SKILL.md new file mode 100644 index 0000000..b9d6e40 --- /dev/null +++ b/.codex/skills/autofit-assistant-af-refresh-api-docs/SKILL.md @@ -0,0 +1,7 @@ +--- +name: autofit-assistant-af-refresh-api-docs +description: "Run a full workspace-maintenance pass to bring skill recipes, wiki API pages, and other PyAuto* references back into line with the current installed stack and source repos. This is the umbrella entry point when the user wants \"make the docs current again\" rather than only \"check whether this symbol still exists\" or only \"refresh this wiki page\". It orchestrates `af_audit_skill_apis` (symbol-resolution drift), `af_update_wiki` (pinned-source prose drift), and any follow-up edits to `skills/*.md`. Use after a PyAuto* upgrade, after pulling fresh source repos, or on a deliberate maintenance cadence. Do not use for unrelated feature work." +--- + + +Read and follow the canonical skill: [SKILL](../../../skills/af_refresh_api_docs.md). diff --git a/.codex/skills/autofit-assistant-af-run-search/SKILL.md b/.codex/skills/autofit-assistant-af-run-search/SKILL.md new file mode 100644 index 0000000..77bae15 --- /dev/null +++ b/.codex/skills/autofit-assistant-af-run-search/SKILL.md @@ -0,0 +1,7 @@ +--- +name: autofit-assistant-af-run-search +description: "Execute a PyAutoFit model-fit — bring together the composed model, the Analysis (likelihood) and the configured search, run `search.fit(...)`, monitor progress, and do the first inspection of the returned Result. Use when the user says \"run the fit\", \"fit my data\", or has a model+analysis ready to execute. Not for choosing the sampler (that is `af_configure_search`) or deep posterior analysis (that is `af_load_results`)." +--- + + +Read and follow the canonical skill: [SKILL](../../../skills/af_run_search.md). diff --git a/.codex/skills/autofit-assistant-af-setup-environment/SKILL.md b/.codex/skills/autofit-assistant-af-setup-environment/SKILL.md new file mode 100644 index 0000000..b22728e --- /dev/null +++ b/.codex/skills/autofit-assistant-af-setup-environment/SKILL.md @@ -0,0 +1,7 @@ +--- +name: autofit-assistant-af-setup-environment +description: "Detect, install, and configure a Python environment for the PyAutoFit stack. First checks the active interpreter and distinguishes an absent, broken, or ready stack; then offers pip in a venv (the normal user path) or editable clones (contributors). Sets sandbox cache env vars and verifies imports. Use when PyAutoFit is unavailable, imports fail, or a new machine needs setup." +--- + + +Read and follow the canonical skill: [SKILL](../../../skills/af_setup_environment.md). diff --git a/.codex/skills/autofit-assistant-af-simulate-dataset/SKILL.md b/.codex/skills/autofit-assistant-af-simulate-dataset/SKILL.md new file mode 100644 index 0000000..81a73cd --- /dev/null +++ b/.codex/skills/autofit-assistant-af-simulate-dataset/SKILL.md @@ -0,0 +1,7 @@ +--- +name: autofit-assistant-af-simulate-dataset +description: "Simulate a dataset from a composed model — draw or fix \"true\" parameters, generate noiseless model data, add noise, and save it alongside a truth record, so fits can be validated against a known answer before touching real data. Use when the user says \"simulate data\", \"make a test dataset\", \"check the pipeline recovers known inputs\", or before a first fit on an expensive real dataset. Not for preparing real data (that is the data-inspection conversation in af_run_search)." +--- + + +Read and follow the canonical skill: [SKILL](../../../skills/af_simulate_dataset.md). diff --git a/.codex/skills/autofit-assistant-af-to-notebook/SKILL.md b/.codex/skills/autofit-assistant-af-to-notebook/SKILL.md new file mode 100644 index 0000000..205b10c --- /dev/null +++ b/.codex/skills/autofit-assistant-af-to-notebook/SKILL.md @@ -0,0 +1,7 @@ +--- +name: autofit-assistant-af-to-notebook +description: "Convert a generated narrative-docstring PyAutoFit script (.py) into a Jupyter notebook (.ipynb) — each top-level docstring becomes a markdown cell, the code between becomes code cells. Use when the user says \"turn this into a notebook\", \"convert to ipynb\", or wants a Jupyter/Colab version of a script the assistant produced." +--- + + +Read and follow the canonical skill: [SKILL](../../../skills/af_to_notebook.md). diff --git a/.codex/skills/autofit-assistant-af-update-wiki/SKILL.md b/.codex/skills/autofit-assistant-af-update-wiki/SKILL.md new file mode 100644 index 0000000..a6bd00d --- /dev/null +++ b/.codex/skills/autofit-assistant-af-update-wiki/SKILL.md @@ -0,0 +1,7 @@ +--- +name: autofit-assistant-af-update-wiki +description: "Refresh wiki/ pages whose pinned source commits have moved, by re-reading the relevant source files from the PyAuto* repos and rewriting stale sections. Also surfaces newly added public APIs (new classes / functions in __init__.py) so the user can decide whether they warrant new wiki pages. Use whenever the user reports an API change, after pulling fresh source repos, or on a manual refresh cadence. Do NOT run opportunistically as part of unrelated work — the diff should be reviewable." +--- + + +Read and follow the canonical skill: [SKILL](../../../skills/af_update_wiki.md). diff --git a/.codex/skills/autofit-assistant-af-wrap-likelihood/SKILL.md b/.codex/skills/autofit-assistant-af-wrap-likelihood/SKILL.md new file mode 100644 index 0000000..3480fb9 --- /dev/null +++ b/.codex/skills/autofit-assistant-af-wrap-likelihood/SKILL.md @@ -0,0 +1,7 @@ +--- +name: autofit-assistant-af-wrap-likelihood +description: "Wrap the user's existing likelihood code into a PyAutoFit `Analysis` class — the assistant's defining task and the ideal domain-adaptation entry point. Takes a function or method the user already trusts (anything that scores parameters against their data), builds the `af.Analysis` subclass around it without altering its numerics, pairs it with a composed model, and validates the wrapper on hand-built instances before any fit. Use when the user says \"wrap my likelihood\", \"connect my code to PyAutoFit\", \"I already have a function that computes chi-squared/log-likelihood\", or brings analysis code of their own. Not for composing priors (af_compose_model) or running fits (af_run_search)." +--- + + +Read and follow the canonical skill: [SKILL](../../../skills/af_wrap_likelihood.md). diff --git a/.codex/skills/autofit-assistant-contribute-upstream/SKILL.md b/.codex/skills/autofit-assistant-contribute-upstream/SKILL.md new file mode 100644 index 0000000..80f0b89 --- /dev/null +++ b/.codex/skills/autofit-assistant-contribute-upstream/SKILL.md @@ -0,0 +1,7 @@ +--- +name: autofit-assistant-contribute-upstream +description: "Prepare a scoped update to autofit_assistant and propose it back upstream. Use this skill when the user says \"contribute this back\", \"open a PR upstream\", \"suggest this to the assistant\", or \"send this to PyAutoLabs/autofit_assistant\". It validates the git remote layout, confirms PR scope, creates or reuses a feature branch, stages only the intended files, commits with the repo's commit conventions, pushes either to the upstream repo (for collaborators) or the user's fork, and opens a draft PR against PyAutoLabs/autofit_assistant." +--- + + +Read and follow the canonical skill: [SKILL](../../../skills/contribute-upstream.md). diff --git a/.codex/skills/autofit-assistant-start-new-project/SKILL.md b/.codex/skills/autofit-assistant-start-new-project/SKILL.md new file mode 100644 index 0000000..e6a64b0 --- /dev/null +++ b/.codex/skills/autofit-assistant-start-new-project/SKILL.md @@ -0,0 +1,7 @@ +--- +name: autofit-assistant-start-new-project +description: "The single bridge from the assistant to a standalone science project, and the project's full lifecycle. Use when the user says \"start a new project\", \"create a project\", \"set up a science project\", \"set up a paper repo\", \"share this analysis with collaborators\", \"continue a collaborator's project\" (they forked/cloned one), \"open-source the repo that goes with my paper\", or \"prepare this project for public release\". Creates a separate, self-contained git repo for one analysis/paper that refers back to this assistant for skills and wiki, then carries it through Create → Work → Collaborate → Publish." +--- + + +Read and follow the canonical skill: [SKILL](../../../skills/start-new-project.md). diff --git a/AGENTS.md b/AGENTS.md index 12627a9..6e14a10 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -82,7 +82,7 @@ never-rewrite-history. Map every request onto one or more layers: 1. **Instructions** (this file, `README.md`) — meta. -2. **Skills** (`skills/*.md`, symlinked into `.claude/skills/`) — *procedural*: how to do a +2. **Skills** (`skills/*.md`, exposed through generated Claude and Codex adapters) — *procedural*: how to do a task. Inference skills are `af_.md` and produce/evolve a Python script; project-workflow skills (`start-new-project.md`, `contribute-upstream.md`) drive repo-level operations. Skills starting with `_` (`_style.md`, `_bootstrap_skill.md`) are @@ -191,7 +191,7 @@ grep the frontmatter `description:` of `skills/*.md` for a topical question. When no skill fits, follow [`skills/_bootstrap_skill.md`](./skills/_bootstrap_skill.md): confirm scope, read `_style.md`, derive the API by reading inside the relevant source repos (never guess), draft `skills/.md`, add a wiki page if needed, register it in -`skills/README.md`, and add a `.claude/skills/.md` symlink. +`skills/README.md`, and regenerate both discovery surfaces as described there. --- @@ -218,9 +218,11 @@ When **not** in maintainer mode, commit at natural checkpoints (a script + its - **One checkpoint = one commit.** **Stage explicitly by filename** — never `git add -A`. - **Never push** (always an explicit user action). **Never skip hooks** (no `--no-verify`); fix the underlying issue and make a new commit. -- **Co-author trailer.** End every agent commit with a - `Co-Authored-By: Claude ` trailer naming the current - session's model — this marks the commit as agent-authored. +- **Agent attribution.** Name the actual harness and model in the commit body + when known (for example, `Agent: Codex; model: `). Use a + `Co-Authored-By` trailer only when the active harness supplies a valid identity; + never invent a provider email, model name, or Claude attribution. If the model + is unavailable, record the known harness and say the model is unavailable. - If the user is on `main` (or any branch tracked as `origin/HEAD`), pause and confirm before committing rather than landing directly there. diff --git a/README.md b/README.md index 8cc70ef..ce1a868 100644 --- a/README.md +++ b/README.md @@ -39,12 +39,12 @@ computer and inspects the results. That is what lets it install **PyAutoFit**, w searches and look at the plots they produce. You do not have to run anything to use it: discussing a model, choosing priors, planning an analysis or learning in Teacher Mode all happen inside the same agent. -1. **Choose Claude Code or Codex.** These are the two recommended agents and the ones the assistant is developed and - tested against — see [Claude Code](docs/setup/claude_code.md) and [Codex](docs/setup/codex_cli.md). For sustained +1. **Choose Claude Code or Codex.** These are the two recommended agents. Codex discovery and safety adapters have + focused validation; full science fits depend on the local environment — see [Claude Code](docs/setup/claude_code.md) and [Codex](docs/setup/codex_cli.md). For sustained scientific work expect to pay for one of them, but how depends on your situation: a personal subscription, access through your institution or team, or usage-based API billing. Check the provider's current plans rather than - assuming a subscription is the only route. Desktop and IDE versions of either agent are fine, provided they can - read this repository and execute code. + assuming a subscription is the only route. The setup below uses the CLI; the linked smoke record describes + its tested coverage. 2. **Open the assistant workspace.** Clone this repository and start the agent inside it — the instructions load automatically, and the assistant installs PyAutoFit for you if it is missing: diff --git a/docs/setup/codex_cli.md b/docs/setup/codex_cli.md index 97b9853..834c112 100644 --- a/docs/setup/codex_cli.md +++ b/docs/setup/codex_cli.md @@ -1,21 +1,21 @@ # Codex (coding agent — recommended) -OpenAI's coding agent (CLI, IDE extension and cloud), and one of the two **recommended, -thoroughly exercised** harnesses for the assistant (alongside [Claude Code](claude_code.md)). It -reads the assistant's canonical instructions (`AGENTS.md`) directly, and can install PyAutoFit, -run fits end-to-end and inspect the results. The tracked `.codex/hooks.json` registers the -assistant's API gate and end-at-deliverable guard. Open `/hooks` after cloning (and after that -file changes) to review and trust its exact current hash; Codex skips untrusted project hooks. -The separate Claude remote-session Python bootstrap is intentionally not registered for Codex, -so continue to use `source activate.sh` for local development setup. - -**Access.** Codex is included with paid ChatGPT plans (Plus, Pro, Business, Edu and Enterprise — -the last three are the usual institutional routes) and can also be used with an OpenAI API key on -usage-based billing. Whether a Free-plan allowance exists has changed over time and could not be -re-verified against the official pricing page when this page was last revised (2026-09-10); -check [OpenAI's Codex pricing page](https://developers.openai.com/codex/pricing/) for the current -position rather than relying on this page. Sustained scientific use should be budgeted as paid -access. +OpenAI's coding agent (CLI, IDE extension and cloud). It reads the shared +`AGENTS.md` instructions, and this repository exposes its canonical `skills/*.md` +through generated, project-level `.codex/skills/` adapters. Discovery was checked +with an installed Codex CLI; adapter validation and fixture guard tests cover the +setup, while scientific fits still need to be exercised in the user's environment. +See the [harness smoke record](https://github.com/PyAutoLabs/PyAutoBrain/blob/main/docs/agent_harness_smoke.md) +for the measured scope. + +The tracked `.codex/hooks.json` registers the API and end-at-deliverable guards. +Review and trust its current hash in `/hooks` after cloning and after changes; +Codex skips project hooks until that hash is trusted. The separate Claude +remote-session Python bootstrap is not registered for Codex, so use +`source activate.sh` for local development setup. + +**Access.** Check [OpenAI's Codex pricing page](https://developers.openai.com/codex/pricing/) +for current plans and API billing. ## Setup diff --git a/modes/maintainer.md b/modes/maintainer.md index d8c0176..d413abf 100644 --- a/modes/maintainer.md +++ b/modes/maintainer.md @@ -21,7 +21,8 @@ skills, wiki schema, hooks, or infrastructure — not user inference work. `AGEN - Every safety invariant in `AGENTS.md` still applies — in particular the two hard-absolutes (the data-inspection gate and never-rewrite-history), plus bulk-edit safety and the `output/` write-ban. -- Commits still end with the `Co-Authored-By: Claude ` trailer. +- Commits follow the actual-harness attribution rule in `AGENTS.md`; never + fabricate a provider identity or model. ## Maintainer procedures @@ -77,6 +78,12 @@ names is reported `unclassified` and blocks a birth until the boundary is fixed `llms.txt` / `llms-full.txt`, and `benchmarks/README.md` (generic protocol, domain table). +Generated `.codex/skills/*/SKILL.md` wrappers are **domain** for cloning: their +namespace and targets belong to this assistant, so they must never be copied +blind. Regenerate them from the newborn's adapted skill inventory with Brain's +project-discovery installer. Claude command links for `af_*` and generic +framework skills share their canonical skills' generic classification. + The contrast with `autolens_assistant` (above) is the point: there `al_*` skills and a lensing-API `wiki/core/` are *domain*; here `af_*` skills and a statistics `wiki/core/` are *generic*. Each reference owns its own seam; the Clone Agent carries one profile per diff --git a/skills/README.md b/skills/README.md index 1e498fc..970a1f2 100644 --- a/skills/README.md +++ b/skills/README.md @@ -4,8 +4,23 @@ Procedural how-to-do-X skills for PyAutoFit-driven statistical inference. Each s single Markdown file with YAML frontmatter; the body teaches an agent (and through them, the user) how to write Python that accomplishes one inference task. -Skills are also exposed at `.claude/skills/` (Claude Code) and `~/.codex/skills/` (when -configured) via symlinks; the canonical files live here. +Public skills are exposed through `.claude/skills/` symlinks and generated +`.codex/skills/-/SKILL.md` adapters; the canonical files live here. +Codex names use the repository name and skill name with underscores changed to +hyphens, so shared skills from different assistants remain distinct. Helper files +beginning with `_` and this index are not public skills. + +After adding or renaming a public skill, run the shared Brain generator from the +PyAutoLabs workspace (set `PYAUTO_BRAIN` to its checkout if using another layout): + +```bash +bash "${PYAUTO_BRAIN:-organs/PyAutoBrain}/bin/install.sh" --write-project-discovery autofit_assistant +bash "${PYAUTO_BRAIN:-organs/PyAutoBrain}/bin/install.sh" --check-project-discovery autofit_assistant +``` + +Commit both generated discovery surfaces with the canonical skill. A standalone +assistant checkout retains the committed adapters; regeneration requires the +Brain checkout and registered workspace body map. ## Conventions diff --git a/skills/_bootstrap_skill.md b/skills/_bootstrap_skill.md index b9817b3..63886ab 100644 --- a/skills/_bootstrap_skill.md +++ b/skills/_bootstrap_skill.md @@ -12,7 +12,7 @@ file is the protocol. The output of running this skill is: - A new `skills/af_.md` file authored against `skills/_style.md`. -- A symlink at `.claude/skills/af_.md` pointing to `../../skills/af_.md`. +- Generated Claude symlinks and Codex `SKILL.md` adapters pointing to that canonical file. - An updated `skills/README.md` entry. - Optionally, one or more new wiki pages the new skill links into. - A working `.py` script in `scripts/` that demonstrates the new skill on the user's data. @@ -105,10 +105,17 @@ Save the new skill at `skills/af_.md`. Follow `_style.md`: ## Step 7 — register the skill +Run the shared discovery generator from the PyAutoLabs workspace: + ```bash -ln -s ../../skills/af_.md .claude/skills/af_.md +bash "${PYAUTO_BRAIN:-organs/PyAutoBrain}/bin/install.sh" --write-project-discovery autofit_assistant +bash "${PYAUTO_BRAIN:-organs/PyAutoBrain}/bin/install.sh" --check-project-discovery autofit_assistant ``` +Keep the flat skill file canonical. Commit both generated harness adapters; never +maintain a separate copy of the instructions. `skills/README.md` documents names +and standalone-checkout setup. + Add a one-line entry under the appropriate category in `skills/README.md`. ## Step 8 — verify @@ -148,6 +155,6 @@ When it runs, tell the user: 4. Read the relevant source. Take signature notes. 5. Read or draft the matching wiki page(s). 6. Write `skills/af_.md`. -7. Add symlink under `.claude/skills/`; add entry to `skills/README.md`. +7. Regenerate and check both Claude and Codex adapters; add entry to `skills/README.md`. 8. Generate the user-specific script in `scripts/`. Run it with `PYAUTO_TEST_MODE=1`. 9. Report to the user: skill name, script path, new wiki pages, suggested chain. diff --git a/skills/contribute-upstream.md b/skills/contribute-upstream.md index 07bd1c0..9e5d489 100644 --- a/skills/contribute-upstream.md +++ b/skills/contribute-upstream.md @@ -96,12 +96,9 @@ Commit conventions: - Subject must follow the repo's conventional style: `feat:`, `fix:`, `docs:`, `chore:`. - The body explains **why**, not just what changed. -- Include the required trailer, naming the **current session's model** (per `AGENTS.md` - "Commit cadence"), e.g.: - -```text -Co-Authored-By: Claude -``` +- Follow `AGENTS.md` "Agent attribution": name the actual harness and model + when known. Add a `Co-Authored-By` trailer only when the active harness supplies + a valid identity. Do not guess a model, provider email, or session identity. If hooks fail, fix the underlying issue and create a new commit. Do not use `--no-verify`.