From f7703ff9f551104e4713dfbb97983f0239fe660a Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Fri, 10 Jul 2026 21:02:43 +0100 Subject: [PATCH 1/5] feat(skills): add Codex wrappers for Heart workflows --- skills/audit_docs/SKILL.md | 1 - skills/cli_noise_clean/SKILL.md | 1 - skills/dep_audit/SKILL.md | 3 +-- skills/review_release/SKILL.md | 9 +++++++++ skills/smoke_test/SKILL.md | 1 - skills/verify_install/SKILL.md | 10 ++++++++++ skills/verify_install/verify_install.md | 2 +- 7 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 skills/review_release/SKILL.md create mode 100644 skills/verify_install/SKILL.md diff --git a/skills/audit_docs/SKILL.md b/skills/audit_docs/SKILL.md index e813dc6..9a266de 100644 --- a/skills/audit_docs/SKILL.md +++ b/skills/audit_docs/SKILL.md @@ -1,7 +1,6 @@ --- name: audit-docs description: Audit docs/api/*.rst files across repos for broken module paths, missing classes, and stale autosummary entries. -user-invocable: true --- Scan Sphinx API documentation across PyAutoFit, PyAutoGalaxy, and PyAutoLens for broken `.. currentmodule::` paths and stale `.. autosummary::` class references. Optionally auto-fix broken entries. diff --git a/skills/cli_noise_clean/SKILL.md b/skills/cli_noise_clean/SKILL.md index 16009d9..6495e5d 100644 --- a/skills/cli_noise_clean/SKILL.md +++ b/skills/cli_noise_clean/SKILL.md @@ -1,7 +1,6 @@ --- name: cli-noise-clean description: Audit CLI output from tests and workspace scripts for warnings, stray prints, and library noise, then report fixes. -user-invocable: true --- Audit CLI output across PyAuto repos for noise — warnings, stray print statements, verbose logging, and third-party library messages — then report what needs fixing. diff --git a/skills/dep_audit/SKILL.md b/skills/dep_audit/SKILL.md index b8aa208..496c709 100644 --- a/skills/dep_audit/SKILL.md +++ b/skills/dep_audit/SKILL.md @@ -1,7 +1,6 @@ --- -name: dep_audit +name: dep-audit description: Audit dependency version caps across all PyAuto repos, compare against PyPI latest, and report a risk-tiered upgrade summary. -user-invocable: true --- Audit dependency version constraints across the PyAuto ecosystem, compare them against the latest versions on PyPI, and produce a risk-tiered upgrade report. diff --git a/skills/review_release/SKILL.md b/skills/review_release/SKILL.md new file mode 100644 index 0000000..872c635 --- /dev/null +++ b/skills/review_release/SKILL.md @@ -0,0 +1,9 @@ +--- +name: review-release +description: Triage a completed PyAuto release build through PyAutoHeart by reading release artifacts, classifying failures, and presenting a human release decision. Use after release validation or an overnight build; never bypass release approval. +--- + +# Review Release + +Follow [`review_release.md`](review_release.md) exactly. Keep readiness judgment +in Heart and every manual release decision with the user. diff --git a/skills/smoke_test/SKILL.md b/skills/smoke_test/SKILL.md index fa6a321..21ef978 100644 --- a/skills/smoke_test/SKILL.md +++ b/skills/smoke_test/SKILL.md @@ -1,7 +1,6 @@ --- name: smoke-test description: Run targeted workspace smoke tests to verify downstream scripts still work after library changes. -user-invocable: true --- Run a curated set of workspace scripts to verify that library changes haven't diff --git a/skills/verify_install/SKILL.md b/skills/verify_install/SKILL.md new file mode 100644 index 0000000..b3f923b --- /dev/null +++ b/skills/verify_install/SKILL.md @@ -0,0 +1,10 @@ +--- +name: verify-install +description: Run PyAutoHeart's independent pip, Python-version, conda, optional-dependency, yanked-release, and Colab installation checks. Use to verify the new-user PyAutoLens installation paths or refresh release-readiness evidence. +--- + +# Verify Install + +Follow [`verify_install.md`](verify_install.md) exactly. Use the canonical +`pyauto-heart verify_install` entrypoint and report PASS, FAIL, and SKIP results +without reinterpreting Heart's verdict. diff --git a/skills/verify_install/verify_install.md b/skills/verify_install/verify_install.md index 4bbcc83..d3983d5 100644 --- a/skills/verify_install/verify_install.md +++ b/skills/verify_install/verify_install.md @@ -23,7 +23,7 @@ about cleanup if they ran with `--keep`. A check that cannot run on the current host (interpreter missing, conda missing) is reported as **SKIP** and does not count toward overall failure. -## Running outside Claude +## Running without a skill harness The script is self-contained and runs from any shell. The canonical entry point is `pyauto-heart verify_install`, which runs the checks and writes the readiness sidecar. From 5186d4363bad84141ed6b933cd152fbd45447c01 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Sat, 11 Jul 2026 10:12:20 +0100 Subject: [PATCH 2/5] fix(skills): keep release readiness Heart-authoritative --- skills/review_release/review_release.md | 196 +++++++++--------------- 1 file changed, 69 insertions(+), 127 deletions(-) diff --git a/skills/review_release/review_release.md b/skills/review_release/review_release.md index 8e99a02..6326c46 100644 --- a/skills/review_release/review_release.md +++ b/skills/review_release/review_release.md @@ -1,165 +1,107 @@ # Review Release: Triage Release Readiness -Fetch the latest release build results, present a release readiness summary, and route to either release or fix. This is the "morning after" skill — run it after an overnight build to assess whether the software is ready for release. +Review the latest PyAutoBuild release evidence, ask PyAutoHeart for the +authoritative readiness verdict, and route the human to release, refresh, fix, +or investigate. Build artifacts explain what ran; they never determine whether +the organism is ready. -A **PyAutoHeart** skill — release-readiness triage is exactly the health/readiness verdict Heart owns (`pyauto-heart readiness`). It reads the build results that PyAutoBuild produced; Build executes, Heart judges. +A **PyAutoHeart** skill: Build executes, Heart judges, and the Brain release +conductor coordinates any subsequent release action. ## Steps -### 1. Fetch Latest Release Run +### 1. Fetch the latest release run -Find the most recent release workflow run: +List recent completed and in-progress runs: ```bash -gh run list --workflow=release.yml --repo Jammy2211/PyAutoBuild --limit 5 --json databaseId,status,conclusion,createdAt,url +gh run list --workflow=release.yml --repo PyAutoLabs/PyAutoBuild --limit 5 \ + --json databaseId,status,conclusion,createdAt,url ``` -Present the runs and let the user pick one (default: most recent completed run). Show status and conclusion for each. +Use the most recent completed run by default. If the newest run is still in +progress, report that and let the user choose whether to wait or inspect the +previous completed run. -If the most recent run is still in progress, report its status and ask if the user wants to wait or review a previous run. +### 2. Read the build evidence -### 2. Download the Release Report - -Download the `release-report` artifact from the selected run: +Download the selected run's report: ```bash -gh run download --repo Jammy2211/PyAutoBuild --name release-report --dir /tmp/release-report +gh run download --repo PyAutoLabs/PyAutoBuild \ + --name release-report --dir /tmp/release-report ``` -Read `release-report.json` and `release-report.md` from the downloaded artifact. - -If the artifact doesn't exist (workflow predates this feature, or the `analyze_results` job didn't run), fall back to checking job statuses: +Read `release-report.json` and `release-report.md`. If the artifact is absent, +fall back to job conclusions: ```bash -gh run view --repo Jammy2211/PyAutoBuild --json jobs --jq '.jobs[] | {name, conclusion}' -``` - -### 3. Present Release Readiness Summary - -Display the report in a clear format: - -``` -Release Readiness Report -======================== - -Status: READY / NOT READY -Run: -Date: - -Summary -------- -Passed: X | Failed: Y | Skipped: Z | Timeout: W - -Per-Project Breakdown ---------------------- -autofit: P passed, F failed, S skipped -autogalaxy: P passed, F failed, S skipped -autolens: P passed, F failed, S skipped -autofit_test: ... -autolens_test: ... +gh run view --repo PyAutoLabs/PyAutoBuild --json jobs \ + --jq '.jobs[] | {name, conclusion}' ``` -### 4. Failure Analysis +Treat this report as evidence only. Do not derive `READY` or `NOT READY` from +its pass/fail totals. -For each failure, present: -- File path -- Classification (source code bug, workspace issue, environment, timeout, etc.) -- Error summary (first 2-3 lines) -- PR correlation (if the script was recently modified) -- Traceback snippet (collapsible) +### 3. Ask Heart for the verdict -Group failures by classification so the user can see patterns (e.g. "3 environment failures — all ModuleNotFoundError for the same package"). - -### 5. Check for Copilot Analysis - -If a GitHub Issue was created by the build (labelled `ai-analysis`): - -```bash -gh issue list --repo Jammy2211/PyAutoBuild --label "ai-analysis" --limit 5 --json number,title,url,comments -``` - -Fetch the most recent one matching this run. Check if Copilot has posted analysis comments: +Run the canonical readiness entrypoint after reading the build evidence: ```bash -gh api repos/Jammy2211/PyAutoBuild/issues//comments --jq '.[].body' -``` - -If Copilot analysis exists, summarise its key findings (root causes, recommendations, go/no-go). - -### 6. Skipped Tests Review - -Show the count of skipped tests and flag any that seem stale or risky: -- Scripts skipped due to known bugs — are those bugs still open? -- Scripts skipped due to missing features — has the feature been implemented? -- GUI scripts — always skipped, no action needed - -### 7. Release Decision - -Ask the user: - -``` -What would you like to do? - - (a) Release — all tests pass, proceed with release - (b) Fix and rebuild — failures need fixing before release - (c) Release anyway — accept known failures and proceed - (d) Investigate — dig deeper into specific failures before deciding +pyauto-heart readiness --json ``` -#### If (a) Release: +Display: -Confirm the version number and that the `release` and `release_workspaces` jobs will execute. The release jobs in the workflow are already gated on test success, so if tests passed, they should have run. Verify: +```text +Release Readiness Report +======================== -```bash -gh run view --repo Jammy2211/PyAutoBuild --json jobs --jq '.jobs[] | select(.name | startswith("release")) | {name, conclusion}' +Heart verdict: GREEN / STALE / YELLOW / RED +Reasons: +Build run: +Build evidence: ``` -If the release jobs completed successfully, report "Release complete" with the version number. - -If the release jobs were skipped (because `skip_release` was true or tests failed), offer to re-trigger with release enabled. - -#### If (b) Fix and rebuild: +The Heart verdict is authoritative even when it differs from the selected +build's conclusion. Releases require GREEN. Never acknowledge YELLOW or infer +GREEN inside this skill. -Identify which failures need fixing and where the fix likely lives: -- **Source code bugs** → "Run `/start_library` to fix these in the library code" -- **Workspace issues** → "Run `/start_workspace` to fix these workspace scripts" -- **Environment issues** → "These may need workflow/dependency changes in PyAutoBuild" +### 4. Explain adverse evidence -Create a mini-prompt summarising the failures to give context for the next dev session. Write it to `PyAutoMind/release_fixes.md`: +For each build failure, show its file, classification, short error, relevant +traceback tail, and recent-PR correlation. Group repeated failures by likely +locus: library source, workspace, environment, timeout, or release workflow. -```markdown -## Release Fix: - -### Failures to fix - -1. `autolens/scripts/modeling/start_here.py` — AttributeError: 'FitImaging' has no attribute 'log_likelihood' - - Classification: source_code_bug - - Likely fix: check PyAutoLens FitImaging API changes - -2. `autofit/scripts/searches/nest/UltraNest.py` — ModuleNotFoundError: No module named 'ultranest' - - Classification: environment - - Likely fix: add ultranest to optional requirements or update no_run.yaml - -### Suggested approach - -``` - -Tell the user: "Failure context written to `PyAutoMind/release_fixes.md`. Run `/start_dev` to begin fixing." - -#### If (c) Release anyway: - -Warn about the known failures. If `skip_release` was set to true in the original run, offer to re-dispatch with `skip_release=false`: +If the build filed an `ai-analysis` issue, inspect its comments as additional +context: ```bash -gh workflow run release.yml --repo Jammy2211/PyAutoBuild --field minor_version= --field skip_scripts=true --field skip_notebooks=true --field skip_release=false +gh issue list --repo PyAutoLabs/PyAutoBuild --label ai-analysis --limit 5 \ + --json number,title,url,comments +gh api repos/PyAutoLabs/PyAutoBuild/issues//comments --jq '.[].body' ``` -#### If (d) Investigate: - -Ask which failure(s) to investigate. For each: -- Show the full traceback -- Show the relevant source code (read the failing script) -- Show recent git log for the file -- If PR-correlated, show the PR diff - -Let the user explore until they're ready to choose (a), (b), or (c). +Also list skipped scripts that appear stale or risky. GUI-only skips may remain +informational; skips for known bugs or missing capabilities require an open, +current reason. + +### 5. Route by the Heart verdict + +- **GREEN**: present the evidence and ask the human whether to invoke the Brain + `release` skill (`/release` or `/build` in Claude, depending on the requested + mode). Manual releases remain `human-required`. +- **STALE**: list the exact evidence Heart requires refreshing and route to the + corresponding validation command. Do not release. +- **YELLOW / RED**: route each reason and build failure to a fix or + investigation. Do not offer a release override. + +For fixes, use the current harness's `start-library` or `start-workspace` skill +(`/start_library` or `/start_workspace` in Claude) after filing a concise +PyAutoMind prompt through `intake`. Environment and workflow failures normally +target PyAutoBuild; source or script failures target the owning library or +workspace. + +If the user chooses investigation, show the full traceback, relevant source, +recent file history, and correlated PR diff until the failure has a defensible +locus. Heart remains the final readiness authority after any fix or refresh. From 7347c277bc5458e8cc7468de37d39d82d827bc06 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Sat, 11 Jul 2026 10:19:36 +0100 Subject: [PATCH 3/5] fix(skills): review available release evidence --- skills/review_release/review_release.md | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/skills/review_release/review_release.md b/skills/review_release/review_release.md index 6326c46..673a935 100644 --- a/skills/review_release/review_release.md +++ b/skills/review_release/review_release.md @@ -25,23 +25,18 @@ previous completed run. ### 2. Read the build evidence -Download the selected run's report: - -```bash -gh run download --repo PyAutoLabs/PyAutoBuild \ - --name release-report --dir /tmp/release-report -``` - -Read `release-report.json` and `release-report.md`. If the artifact is absent, -fall back to job conclusions: +Read job conclusions from the selected run and fetch failed logs when needed: ```bash gh run view --repo PyAutoLabs/PyAutoBuild --json jobs \ --jq '.jobs[] | {name, conclusion}' +gh run view --repo PyAutoLabs/PyAutoBuild --log-failed ``` -Treat this report as evidence only. Do not derive `READY` or `NOT READY` from -its pass/fail totals. +The current workflow does not publish an aggregate `release-report` artifact. +Do not invent per-script totals or tracebacks that are absent from the jobs and +logs. Treat the available run data as evidence only; never derive `READY` or +`NOT READY` from job conclusions. ### 3. Ask Heart for the verdict @@ -60,7 +55,7 @@ Release Readiness Report Heart verdict: GREEN / STALE / YELLOW / RED Reasons: Build run: -Build evidence: +Build jobs: ``` The Heart verdict is authoritative even when it differs from the selected @@ -69,8 +64,9 @@ GREEN inside this skill. ### 4. Explain adverse evidence -For each build failure, show its file, classification, short error, relevant -traceback tail, and recent-PR correlation. Group repeated failures by likely +For each build failure, show the failing job and the error detail actually +present in `--log-failed`. Include a file, traceback tail, or recent-PR +correlation only when the logs establish it. Group repeated failures by likely locus: library source, workspace, environment, timeout, or release workflow. If the build filed an `ai-analysis` issue, inspect its comments as additional From 9d735f1860169846d03b8c0e81866c6bf7c1cbfc Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Sat, 11 Jul 2026 10:36:15 +0100 Subject: [PATCH 4/5] fix(skills): complete cross-harness release review --- skills/audit_docs/SKILL.md | 12 ++++++----- skills/cli_noise_clean/SKILL.md | 8 +++++--- skills/dep_audit/SKILL.md | 9 ++++++--- skills/health_sweep/reference.md | 24 +++++++++++++--------- skills/pyauto-status-full/reference.md | 17 ++++++++-------- skills/pyauto-status/reference.md | 12 ++++++----- skills/review_release/review_release.md | 27 +++++++++++++++++++------ skills/smoke_test/SKILL.md | 15 ++++++++------ skills/smoke_test/reference.md | 10 ++++----- skills/worktree_status/reference.md | 13 +++++++----- 10 files changed, 92 insertions(+), 55 deletions(-) diff --git a/skills/audit_docs/SKILL.md b/skills/audit_docs/SKILL.md index 9a266de..efdc3dc 100644 --- a/skills/audit_docs/SKILL.md +++ b/skills/audit_docs/SKILL.md @@ -10,13 +10,15 @@ A **PyAutoHeart** check — documentation correctness is part of the validation ## Usage ``` -/audit-docs # audit all three repos (default) -/audit-docs PyAutoLens # audit one repo -/audit-docs PyAutoGalaxy PyAutoFit # audit specific repos -/audit-docs --fix # audit all repos and auto-fix broken references -/audit-docs --fix PyAutoLens # fix one repo +$audit-docs # audit all three repos (default) +$audit-docs PyAutoLens # audit one repo +$audit-docs PyAutoGalaxy PyAutoFit # audit specific repos +$audit-docs --fix # audit all repos and auto-fix broken references +$audit-docs --fix PyAutoLens # fix one repo ``` +In Claude, invoke the same skill as `/audit-docs`. + ## Repo Mapping | Argument | Docs Directory | diff --git a/skills/cli_noise_clean/SKILL.md b/skills/cli_noise_clean/SKILL.md index 6495e5d..643f862 100644 --- a/skills/cli_noise_clean/SKILL.md +++ b/skills/cli_noise_clean/SKILL.md @@ -10,11 +10,13 @@ A **PyAutoHeart** check — output-noise classification is part of the validatio ## Usage ``` -/cli_noise_clean # full audit: pytest + workspace scripts -/cli_noise_clean pytest # pytest collection + short run only -/cli_noise_clean scripts # workspace scripts only +$cli-noise-clean # full audit: pytest + workspace scripts +$cli-noise-clean pytest # pytest collection + short run only +$cli-noise-clean scripts # workspace scripts only ``` +In Claude, invoke the same skill as `/cli_noise_clean`. + ## Environment Variables All workspace script runs use these to keep execution fast: diff --git a/skills/dep_audit/SKILL.md b/skills/dep_audit/SKILL.md index 496c709..59f3825 100644 --- a/skills/dep_audit/SKILL.md +++ b/skills/dep_audit/SKILL.md @@ -10,10 +10,12 @@ A **PyAutoHeart** check — dependency drift is part of the health/readiness sur ## Usage ``` -/dep_audit # full audit of all repos -/dep_audit PyAutoFit # audit a single repo +$dep-audit # full audit of all repos +$dep-audit PyAutoFit # audit a single repo ``` +In Claude, invoke the same skill as `/dep_audit`. + ## Steps ### 1. Collect current constraints @@ -141,6 +143,7 @@ This map should be updated when constraints move between repos. ## Notes - This skill is read-only — it produces an audit report but does not change any files. -- To act on the audit, use `/start_dev` with a prompt file describing the upgrades. +- To act on the audit, use `$start-dev` (`/start_dev` in Claude) with a prompt + file describing the upgrades. - Run this quarterly or before any major release to catch stale constraints early. - The "installed" column reflects the current venv, which may lag behind what the constraints allow. A fresh `pip install` in a clean venv would pull the latest allowed version. diff --git a/skills/health_sweep/reference.md b/skills/health_sweep/reference.md index 0966a18..2a300a8 100644 --- a/skills/health_sweep/reference.md +++ b/skills/health_sweep/reference.md @@ -1,10 +1,10 @@ -# Green-Light Sweep — the `/health check` leg +# Green-Light Sweep — the `$health check` leg > Reference procedure, not a top-level command. This was the `/health_check` -> skill; it is now reached as **`/health check`** (see -> `PyAutoBrain/skills/health/health.md`). `/health` is the single health door; +> skill; it is now reached as **`$health check`** (`/health check` in Claude; +> see `PyAutoBrain/skills/health/health.md`). `$health` is the single health door; > this file is the sweep leg it drives. A **PyAutoHeart** capability — Heart owns -> health assessment; the Brain's `/health` door drives it. +> health assessment; the Brain's `$health` skill drives it. Quick "is everything still green?" sweep across the PyAuto stack. Refreshes local `main` against `origin/main` for every repo, then runs unit tests in libraries and smoke tests in workspaces. Reports a single pass/fail matrix. @@ -23,16 +23,16 @@ Quick "is everything still green?" sweep across the PyAuto stack. Refreshes loca - PyAutoLens - PyAutoBuild -**Workspaces (run `/smoke_test`):** exactly the curated set `/smoke_test` maps — +**Workspaces (run `$smoke-test`):** exactly the curated set `$smoke-test` maps — do not maintain a separate list here. As of writing that is `autofit_workspace`, `autogalaxy_workspace`, `autolens_workspace`, `autolens_workspace_test`, -`euclid_strong_lens_modeling_pipeline`, and `HowToLens`. `/smoke_test` is the +`euclid_strong_lens_modeling_pipeline`, and `HowToLens`. `$smoke-test` is the source of truth for this scope; defer to it rather than re-specifying it. **Out of scope — never touched:** - `autofit_workspace_developer`, `autolens_workspace_developer` — dev scratch - `autolens_base_project` — template -- Any workspace `/smoke_test` does not map (e.g. `z_projects`, `bad`, `priors`) +- Any workspace `$smoke-test` does not map (e.g. `z_projects`, `bad`, `priors`) Skip any in-scope entry that is missing or not a git repo. @@ -83,7 +83,10 @@ If a library has no `test/` or `tests/` directory, mark as `no tests` and contin ### 4. Run workspace smoke tests -Invoke the existing `/smoke_test` skill (its default runs its full curated set). Defer to its env-var / no_run / parallelism logic and its workspace mapping — do not reimplement or extend the workspace list here. Capture its per-workspace pass/fail counts. +Invoke the existing `$smoke-test` skill (its default runs its full curated set). +In Claude this is `/smoke_test`. Defer to its env-var / no_run / parallelism +logic and workspace mapping; do not reimplement or extend the list. Capture its +per-workspace pass/fail counts. ### 5. Report matrix @@ -115,4 +118,7 @@ End with a single-line verdict: `All green` or `N failures across M repos — se - This is a read-mostly sweep. The only mutation is `git fetch` + `git merge --ff-only` on clean repos. No branch creation, deletion, stash, or rebase. - Run-time dominated by smoke tests. Library pytest in parallel is fast; smoke tests can take many minutes — that's expected. - Do not post results anywhere (no GitHub issue comment). This is a local check; output is for the user only. -- If the user wants to skip the sync step (e.g. running offline), they can pass `--no-sync` to `/health check`. In that mode, step 2 is replaced with a single `git status` per repo and the Sync column reads `skipped (--no-sync)`. +- If the user wants to skip the sync step (e.g. running offline), they can pass + `--no-sync` to `$health check` (`/health check` in Claude). In that mode, step + 2 is replaced with a single `git status` per repo and the Sync column reads + `skipped (--no-sync)`. diff --git a/skills/pyauto-status-full/reference.md b/skills/pyauto-status-full/reference.md index c71acd4..5a73ba2 100644 --- a/skills/pyauto-status-full/reference.md +++ b/skills/pyauto-status-full/reference.md @@ -1,8 +1,8 @@ -# Release-Run Dashboard — the `/health full` leg +# Release-Run Dashboard — the `$health full` leg > Reference procedure, not a top-level command. This was `/pyauto-status-full`; -> it is now reached as **`/health full`** (see -> `PyAutoBrain/skills/health/health.md`). `/health` is the single health door; +> it is now reached as **`$health full`** (`/health full` in Claude; see +> `PyAutoBrain/skills/health/health.md`). `$health` is the single health door; > this file is the release-run dashboard leg it drives. Render the most recent PyAutoBuild full-run report as a release-readiness dashboard. Use this to inspect timing and failures from the last `python autobuild/run_all.py`. Read-only. @@ -14,13 +14,13 @@ Heart reports). The authoritative live verdict is `pyauto-heart readiness`. ## Usage ``` -/health full +$health full ``` -This is the deeper sibling of `/health status` (the active-work dashboard): +This is the deeper sibling of `$health status` (the active-work dashboard): -- `/health status` — what's in flight right now (planned/active/recently-completed tasks, branches, dirty repos). -- `/health full` — what the last full release-prep run produced (per-workspace pass/fail/timing, slowest scripts, failure tracebacks). +- `$health status` — what's in flight right now (planned/active/recently-completed tasks, branches, dirty repos). +- `$health full` — what the last full release-prep run produced (per-workspace pass/fail/timing, slowest scripts, failure tracebacks). ## Steps @@ -109,7 +109,8 @@ If only one run exists, omit this section silently. ### 5. Notes - Read-only — never modifies PyAutoBuild output, never deletes runs, never touches the `latest` symlink. -- No GitHub posting (matches `/health status` convention). The user can decide to share findings manually. +- No GitHub posting (matches the `$health status` convention). The user can + decide to share findings manually. - For quick browsing, the markdown report at `/report.md` already contains the same data — this skill is the conversational summary layer on top. ## Execution environments diff --git a/skills/pyauto-status/reference.md b/skills/pyauto-status/reference.md index aaedec6..00f5872 100755 --- a/skills/pyauto-status/reference.md +++ b/skills/pyauto-status/reference.md @@ -1,8 +1,9 @@ -# Active Work Dashboard — the `/health status` leg +# Active Work Dashboard — the `$health status` leg > Reference procedure, not a top-level command. This was `/pyauto-status`; it is -> now reached as **`/health status`** (see `PyAutoBrain/skills/health/health.md`). -> `/health` is the single health door; this file is the dashboard leg it drives. +> now reached as **`$health status`** (`/health status` in Claude; see +> `PyAutoBrain/skills/health/health.md`). `$health` is the single health door; +> this file is the dashboard leg it drives. Show a dashboard of all active work across the PyAuto repos. Use it to check for conflicts before starting work, or when resuming a session to see what's in @@ -107,9 +108,10 @@ blocked**. This is the key value of the dashboard for planned work. ### 6. Suggest actions -Per flag: ready planned task → `/start_library` / `/start_workspace`; conflict → +Per flag: ready planned task → `$start-library` / `$start-workspace` +(`/start_library` / `/start_workspace` in Claude); conflict → finish one task first; unregistered → register in `active.md` or reset to main; -stale → remove from `active.md` or re-run `/start_library`. +stale → remove from `active.md` or re-run `$start-library`. ## Notes diff --git a/skills/review_release/review_release.md b/skills/review_release/review_release.md index 673a935..2fbef34 100644 --- a/skills/review_release/review_release.md +++ b/skills/review_release/review_release.md @@ -33,6 +33,16 @@ gh run view --repo PyAutoLabs/PyAutoBuild --json jobs \ gh run view --repo PyAutoLabs/PyAutoBuild --log-failed ``` +Classify the run mode from job names and conclusions before presenting any next +action. Matrix suffixes may be present in the displayed job names. + +- **Rehearsal**: `rehearsal_version` succeeded and every `release` and + `release_workspaces` job was skipped or absent. +- **Live**: at least one `release` or `release_workspaces` job has a conclusion + other than `skipped`, whether it passed, failed, or was cancelled. +- **Unknown**: neither pattern is established. This includes an upstream failure + that skipped both terminal paths. Investigate; do not dispatch. + The current workflow does not publish an aggregate `release-report` artifact. Do not invent per-script totals or tracebacks that are absent from the jobs and logs. Treat the available run data as evidence only; never derive `READY` or @@ -55,6 +65,7 @@ Release Readiness Report Heart verdict: GREEN / STALE / YELLOW / RED Reasons: Build run: +Run mode: rehearsal / live / unknown Build jobs: ``` @@ -84,17 +95,21 @@ current reason. ### 5. Route by the Heart verdict -- **GREEN**: present the evidence and ask the human whether to invoke the Brain - `release` skill (`/release` or `/build` in Claude, depending on the requested - mode). Manual releases remain `human-required`. +- **GREEN + successful rehearsal**: present the evidence and ask the human + whether to invoke the Brain `$release` skill (`/release` or `/build` in + Claude, depending on the requested mode). Manual releases remain + `human-required`. +- **Live run**: report whether that release completed or failed. Never offer to + dispatch another release from review of a live run. +- **Unknown mode**: investigate the job graph. Do not release. - **STALE**: list the exact evidence Heart requires refreshing and route to the corresponding validation command. Do not release. - **YELLOW / RED**: route each reason and build failure to a fix or investigation. Do not offer a release override. -For fixes, use the current harness's `start-library` or `start-workspace` skill -(`/start_library` or `/start_workspace` in Claude) after filing a concise -PyAutoMind prompt through `intake`. Environment and workflow failures normally +For fixes, use `$start-library` or `$start-workspace` (`/start_library` or +`/start_workspace` in Claude) after filing a concise PyAutoMind prompt through +`$intake` (`/intake` in Claude). Environment and workflow failures normally target PyAutoBuild; source or script failures target the owning library or workspace. diff --git a/skills/smoke_test/SKILL.md b/skills/smoke_test/SKILL.md index 21ef978..d270aac 100644 --- a/skills/smoke_test/SKILL.md +++ b/skills/smoke_test/SKILL.md @@ -7,8 +7,9 @@ Run a curated set of workspace scripts to verify that library changes haven't broken downstream tutorials and examples. A **PyAutoHeart** validation skill — Heart owns tests/validation/readiness. This -is the workspace-script check the ship workflow feeds into: `/ship_library` and -`/ship_workspace` gate through the Health Agent → Heart, and this skill is the +is the workspace-script check the ship workflow feeds into: `$ship-library` and +`$ship-workspace` (`/ship_library` and `/ship_workspace` in Claude) gate through +the Health Agent → Heart, and this skill is the workspace half of that verdict. It reads the PyAutoMind registry for the active issue but its job is validation, not state. Organ boundary + execution-environment model: PyAutoBrain `skills/WORKFLOW.md`. @@ -16,11 +17,13 @@ model: PyAutoBrain `skills/WORKFLOW.md`. ## Usage ``` -/smoke-test # run all six workspaces (default) -/smoke-test autofit # run only autofit_workspace (only when explicitly requested) -/smoke-test autogalaxy autolens # run specific workspaces (only when explicitly requested) +$smoke-test # run all six workspaces (default) +$smoke-test autofit # run only autofit_workspace (only when explicitly requested) +$smoke-test autogalaxy autolens # run specific workspaces (only when explicitly requested) ``` +In Claude, invoke the same skill as `/smoke-test`. + ## Workspace mapping | Argument | Directory | Script list | Notebook list | @@ -75,7 +78,7 @@ ask the user. Comment template: [`reference.md`](reference.md) → "Issue commen ### 6. Persist summary to the status cache Write a per-workspace JSON summary to `~/.cache/pyauto/smoke/.json` -so `/health status` can show the latest smoke state. Shape + field rules: +so `$health status` can show the latest smoke state. Shape + field rules: [`reference.md`](reference.md) → "Status cache". Idempotent; safe to skip if the cache dir can't be created. diff --git a/skills/smoke_test/reference.md b/skills/smoke_test/reference.md index 267c19c..e8d6cd0 100644 --- a/skills/smoke_test/reference.md +++ b/skills/smoke_test/reference.md @@ -10,8 +10,9 @@ Each notebook in `smoke_notebooks.txt` runs via `/tmp` dir so the on-disk notebook stays clean. On failure, regenerate the single failing notebook from its source `.py` via PyAutoBuild's `py_to_notebook` and retry once (catches stale notebooks where the script moved on but the `.ipynb` -wasn't refreshed by `/pre_build`'s `generate.py`). Whole-workspace regeneration -stays `generate.py`'s job — smoke only regenerates the one failing notebook. +wasn't refreshed by `$pre-build` (`/pre_build` in Claude). Whole-workspace +regeneration stays `generate.py`'s job — smoke only regenerates the one failing +notebook. ## Environment config @@ -117,11 +118,10 @@ steps: WORK_DIR="$(pwd)" for ws in autofit_workspace autogalaxy_workspace autolens_workspace \ autolens_workspace_test euclid_strong_lens_modeling_pipeline HowToLens; do - [ -d "$WORK_DIR/$ws" ] || git clone "https://github.com/Jammy2211/$ws.git" "$WORK_DIR/$ws" + [ -d "$WORK_DIR/$ws" ] || git clone "https://github.com/PyAutoLabs/$ws.git" "$WORK_DIR/$ws" done for lib in PyAutoConf PyAutoFit PyAutoArray PyAutoGalaxy PyAutoLens; do - case "$lib" in PyAutoConf|PyAutoFit) ORG=rhayes777 ;; *) ORG=Jammy2211 ;; esac - [ -d "$WORK_DIR/$lib" ] || git clone "https://github.com/$ORG/$lib.git" "$WORK_DIR/$lib" + [ -d "$WORK_DIR/$lib" ] || git clone "https://github.com/PyAutoLabs/$lib.git" "$WORK_DIR/$lib" done export PYTHONPATH="$WORK_DIR/PyAutoConf:$WORK_DIR/PyAutoFit:$WORK_DIR/PyAutoArray:$WORK_DIR/PyAutoGalaxy:$WORK_DIR/PyAutoLens:$PYTHONPATH" export NUMBA_CACHE_DIR=/tmp/numba_cache MPLCONFIGDIR=/tmp/matplotlib diff --git a/skills/worktree_status/reference.md b/skills/worktree_status/reference.md index ff3d108..bdc5333 100644 --- a/skills/worktree_status/reference.md +++ b/skills/worktree_status/reference.md @@ -1,6 +1,7 @@ -# Worktree status — the /health worktrees leg +# Worktree status — the `$health worktrees` leg -Procedure for the `/health worktrees` leg (the former standalone `worktree_status` skill). +Procedure for the `$health worktrees` leg (`/health worktrees` in Claude; the +former standalone `worktree_status` skill). Diagnostic skill. Lists every worktree root under `$PYAUTO_WT_ROOT` (default `~/Code/PyAutoLabs-wt`), the task it belongs to per `active.md`, and the branch and dirty state of every real worktree inside it. @@ -8,7 +9,9 @@ A **PyAutoHeart** diagnostic — Heart owns the health/diagnostic surface; it **reads** the PyAutoMind work registry (`active.md`) but never mutates it. The execution-environment model is in PyAutoBrain `skills/WORKFLOW.md`. -This skill is **read-only**. It never creates, removes, or modifies worktrees. Use `/start_library` / `/ship_library` / the post-merge cleanup flow for mutations. +This skill is **read-only**. It never creates, removes, or modifies worktrees. +Use `$start-library` / `$ship-library` (`/start_library` / `/ship_library` in +Claude) or the post-merge cleanup flow for mutations. ## Steps @@ -68,14 +71,14 @@ Active Worktrees ---------------- jax-search-logging (~/Code/PyAutoLabs-wt/jax-search-logging) - issue: https://github.com/rhayes777/PyAutoFit/issues/42 + issue: https://github.com/PyAutoLabs/PyAutoFit/issues/42 activate: source ~/Code/PyAutoLabs-wt/jax-search-logging/activate.sh repos: PyAutoFit feature/jax-search-logging clean (3 commits unpushed) PyAutoArray feature/jax-search-logging 2 dirty (pushed) psf-oversampling (~/Code/PyAutoLabs-wt/psf-oversampling) - issue: https://github.com/Jammy2211/PyAutoArray/issues/50 + issue: https://github.com/PyAutoLabs/PyAutoArray/issues/50 activate: source ~/Code/PyAutoLabs-wt/psf-oversampling/activate.sh repos: PyAutoArray feature/psf-oversampling clean (up to date) From 0d24d799453b4bc535403a87b0646d907337cd17 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Sat, 11 Jul 2026 10:45:43 +0100 Subject: [PATCH 5/5] fix(skills): use available release evidence --- skills/audit_docs/SKILL.md | 2 +- skills/review_release/review_release.md | 23 +++++++++-------------- skills/smoke_test/SKILL.md | 2 +- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/skills/audit_docs/SKILL.md b/skills/audit_docs/SKILL.md index efdc3dc..d67af3b 100644 --- a/skills/audit_docs/SKILL.md +++ b/skills/audit_docs/SKILL.md @@ -17,7 +17,7 @@ $audit-docs --fix # audit all repos and auto-fix broken refere $audit-docs --fix PyAutoLens # fix one repo ``` -In Claude, invoke the same skill as `/audit-docs`. +In Claude, invoke the same skill as `/audit_docs`. ## Repo Mapping diff --git a/skills/review_release/review_release.md b/skills/review_release/review_release.md index 2fbef34..40508e7 100644 --- a/skills/review_release/review_release.md +++ b/skills/review_release/review_release.md @@ -28,11 +28,15 @@ previous completed run. Read job conclusions from the selected run and fetch failed logs when needed: ```bash -gh run view --repo PyAutoLabs/PyAutoBuild --json jobs \ - --jq '.jobs[] | {name, conclusion}' +gh api --paginate \ + 'repos/PyAutoLabs/PyAutoBuild/actions/runs//jobs?per_page=100' \ + --jq '.jobs[] | {id, name, status, conclusion}' gh run view --repo PyAutoLabs/PyAutoBuild --log-failed ``` +Use the Actions jobs API because the workspace's supported `gh 2.4.0` does not +expose `jobs` through `gh run view --json`. + Classify the run mode from job names and conclusions before presenting any next action. Matrix suffixes may be present in the displayed job names. @@ -80,18 +84,9 @@ present in `--log-failed`. Include a file, traceback tail, or recent-PR correlation only when the logs establish it. Group repeated failures by likely locus: library source, workspace, environment, timeout, or release workflow. -If the build filed an `ai-analysis` issue, inspect its comments as additional -context: - -```bash -gh issue list --repo PyAutoLabs/PyAutoBuild --label ai-analysis --limit 5 \ - --json number,title,url,comments -gh api repos/PyAutoLabs/PyAutoBuild/issues//comments --jq '.[].body' -``` - -Also list skipped scripts that appear stale or risky. GUI-only skips may remain -informational; skips for known bugs or missing capabilities require an open, -current reason. +The release workflow does not emit `ai-analysis` issues or per-script skip +reports. Do not search for or present either as evidence for this run. Report +only job conclusions and details present in the selected run's logs. ### 5. Route by the Heart verdict diff --git a/skills/smoke_test/SKILL.md b/skills/smoke_test/SKILL.md index d270aac..ba92622 100644 --- a/skills/smoke_test/SKILL.md +++ b/skills/smoke_test/SKILL.md @@ -22,7 +22,7 @@ $smoke-test autofit # run only autofit_workspace (only when explicit $smoke-test autogalaxy autolens # run specific workspaces (only when explicitly requested) ``` -In Claude, invoke the same skill as `/smoke-test`. +In Claude, invoke the same skill as `/smoke_test`. ## Workspace mapping