ワンクリックで
fix-issue
Use whenever the user wants to fix a SUEWS GitHub issue into a validated, PR-ready branch. Trigger for requests like "fix issue
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use whenever the user wants to fix a SUEWS GitHub issue into a validated, PR-ready branch. Trigger for requests like "fix issue
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Review SUEWS PRs. Drafts comments for approval before posting.
Use whenever auditing, clarifying, rewriting, labelling, or batch-reviewing SUEWS GitHub issues so they become maintainer-ready. Trigger for requests like "audit this issue", "make this issue agent-ready", "rewrite issue
Use whenever auditing, prioritising, or batch-triaging SUEWS draft and stalled pull requests so each gets a clear disposition. Trigger for "triage PRs", "which draft PRs need attention", "what's the disposition of these PRs", "groom the PR backlog", "defer this PR with a reason", "which PRs are ready to advance to merge", or a scheduled PR-backlog sweep. Routes live PRs to prep-pr/split-pr/queue-pr; defers or escalates the rest; never merges or closes.
Prepare SUEWS release with pre-flight checks and tag generation.
Documentation sanity check for SUEWS source files. Two checks under one roof - non-ASCII characters in sphinx-gallery tutorials/RST/docstrings (with context-aware RST/LaTeX/matplotlib replacement), and bibliography topic-tag convention plus metadata backfill on the refs bib files. Use when editing docs/source files or the refs-*.bib files, when a doc hook flags an issue, or when asked to "audit docs", "check docs", "fix non-ASCII", "check bib tags", "curate refs". Complements sync-docs (doc-code content consistency) and lint-code (code style).
Check code style against SUEWS conventions. Complements ruff/fprettify.
| name | fix-issue |
| description | Use whenever the user wants to fix a SUEWS GitHub issue into a validated, PR-ready branch. Trigger for requests like "fix issue |
Take one SUEWS GitHub issue from maintainer-ready understanding to a validated, PR-ready branch. Reuse the repo skills that already cover each stage.
The terminal state is PR-ready, not merged. Do not report PR-ready while
audit-pr still identifies unresolved valid issues.
triage-issue instead.audit-pr, address valid findings, and re-audit until clean.split-pr rather than fixing an unreviewable diff.No bundled scripts. Use gh, git, Makefile targets, and the relevant repo
skills directly.
Remaining set to the ownership block./Users/..., worktree or internal-tooling paths), server/host names, or
other private-infrastructure references reach a PR body, commit message, or any
drafted comment. These surfaces are public; keep them public-safe.queue-pr does not transfer merge
authority: enqueue/merge stays a separate, explicitly-approved step under
queue-pr's own human gate.git status --porcelain=v1
git branch --show-current
gh repo view --json nameWithOwner,defaultBranchRef
If the worktree has unrelated uncommitted changes that cannot be isolated,
stop (per Safety Rules). Do not branch on top of a dirty tree: git checkout -b
carries those edits onto the issue branch and into validation.gh issue view <issue> --repo UMEP-dev/SUEWS \
--json number,title,body,labels,assignees,state,author,comments,url,createdAt,updatedAt
[triage-issue] verdict
block for this issue, treat it as the authoritative input; otherwise apply
triage-issue logic inline (classify readiness, preserve the reporter's
context, surface conclusions that live only in comments) and derive the same
verdict. Then branch on the verdict, matching triage-issue's own decision
rule rather than enumerating every readiness value:
Verdict: triaged with Readiness: ready (or needs-summary, which also
resolves to triaged): proceed to Scope And Implement.Verdict: needs-discussion: do not implement. Stop and hand back the
block's Blocking question / Next line. This one branch covers
needs-repro, needs-scope, needs-acceptance, superseded, and duplicate, which
triage-issue all collapses into needs-discussion.needs-split (surfaced as needs-discussion with the decomposition in
Next:): route to the umbrella/sub-issue decomposition in
.claude/rules/work-sizing.md rather than implementing or merely aborting.needs-discussion verdict: stop with concrete
questions if the issue lacks expected behaviour, reproduction, affected
versions, or safe implementation scope. The verdict-driven abort in step 3 and
these prose questions are one gate, not two.src/supy/data_model/, read
.claude/rules/python/schema-versioning.md now and plan any
CURRENT_SCHEMA_VERSION bump, SCHEMA_VERSIONS entry, yaml_upgrade.py
handler, sample_config.yml resync, and docs churn into the same change set.
Do not defer these to the audit stage; the schema-version-audit.yml CI gate
and audit-pr will otherwise bounce the PR back.suews for configuration, simulation, validation, or diagnostics.lint-code for style and file-type conventions.sync-docs when behaviour, config, outputs, APIs, or docs may drift.verify-build for source inclusion, packaging, schema, CI, or build metadata.log-changes when the fix is user-facing and should be recorded..claude/rules/work-sizing.md; if the fix grows beyond one right-sized PR,
stop and propose a split rather than growing the diff. Add or update a
regression test that
would have failed before the fix, unless the issue is docs-only or testing is
impractical; explain any exception.Run validation appropriate to the touched files, with make test-smoke as the
pre-commit baseline. Escalate to the full make test when the fix touches test
files, core physics modules, or src/supy/data_model/ (per
.claude/rules/00-project-essentials.md). Add targeted checks as needed:
pytest, ruff check, fprettify --diff, sync-docs, verify-build, or SUEWS
validate/diagnose tools. If validation fails because of the fix, repair and
rerun. If validation is blocked by environment setup, record a public-safe
description of the blocker in the PR body, with any absolute local paths, host
names, or internal references replaced by neutral phrasing (e.g. "the editable
build step failed in the local toolchain").
git diff --stat, git diff --cached --stat, and untracked files;
ensure the final diff only contains issue-scoped paths.Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Claude <noreply@anthropic.com>
gh pr view <pr> --json author,headRepositoryOwner,headRepository,headRefName;
compare author.login with gh api user --jq .login); AND the agent must own
the branch head -- confirm one of: fix-issue created the branch this run
(preferred), the remote head matches what the agent last pushed (push with
--force-with-lease so a foreign push since checkout is detected), or the
operator explicitly approved pushing to it. Commit authorship is only a weak
supplementary signal (trailers, cherry-picks, and a shared push identity make
it unreliable). If any check fails, stop and escalate -- never push to or edit a
branch/PR you do not own. Then push to origin.Fixes #<issue> only
when the PR should close it; otherwise Refs #<issue>), fix summary,
validation status, and known limitations.This loop is the per-PR instance of .claude/rules/review-convergence.md:
audit-pr is the reviewer, the 3-iteration cap is the round cap, and the
recurring-signature check is the oscillation guard.
audit-pr as a private PR-readiness audit. It may draft
comments, but do not post them without approval.audit-pr's Size Gate recommends a split (the PR is oversized or
bundled): stop the address-and-re-audit loop and hand off to split-pr
rather than fixing findings against an unreviewable diff. This mirrors the
pre-implementation split guard in step 2.5.audit-pr reports CI gate: red: the PR is not ready regardless of the
diff verdict. Treat each red check's remedy by its tier -- apply an
author-fixable remedy in this loop like any blocking finding; a
maintainer-gated (bypass label), re-trigger or infrastructure remedy is
outside fix-issue's authority, so stop and record it in Remaining naming
the check and the action needed. Never call the PR ready over a red CI gate.audit-pr on the updated PR/head. Repeat this address-and-re-audit loop
until audit-pr returns Verdict: clean and CI gate is not red, to a
maximum of 3 iterations. The
operative gate is whether any valid blocking/major finding remains, which the
per-finding [severity] field reports: a needs-attention verdict carrying
only minor/false-positive findings still resolves to PR-ready once each is
recorded per step 5.2. If valid findings remain after the 3rd iteration, stop
with Remaining set to the persisting findings and do not call the PR ready.Remaining set to that blocker. Do not
call the PR ready.End with:
[fix-issue] PR-ready report
Issue: #<number> <title>
Branch: <branch>
PR: <url or not created: reason>
Scope: <one-line summary>
Validation: <commands and pass/blocked status>
Audit loop: <clean after N iters | stopped after 3 iters: persisting | stopped on recurring finding: signature | stopped on red CI gate: check | split: handed to split-pr | not run: reason>
Public GitHub edits: <none | drafted | approved and applied>
Remaining: <none | explicit blocker>
Next: ready for the normal review/merge workflow.
If the workflow stops early, use the same format and set Remaining to the
specific question or blocker.