Nightly refactor review: find the systems the last day's commits hit hardest, use three weeks of history to tell fragile from fast-moving, write a plan per systemic fix, and file deduplicated Jira tickets. Use for /identify-fragile-systems or the nightly run. For a single bug report, use investigate-bug instead.
92%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Built to run unattended once a day. It strings together four skills, and each step's details live in that skill's SKILL.md:
system-history: collecting history and scoring systems;jira-refactor-findings: duplicate matching, sightings, and filing;refactor-plan: the fragile vs fast-moving judgment, and the plan file;fragility-common: the run directory and the plan format.H=.agents/skills/system-history/scripts
J=.agents/skills/jira-refactor-findings/scripts
P=.agents/skills/refactor-plan/scripts
S=.agents/skills/identify-fragile-systems/scripts
RUN=<YYYY-MM-DD> # defaults to today's UTC datefragility-common.high or medium confidence plans. A low finding goes in
decisions.json, so a later night can confirm it.Preflight: $H/doctor.ts and $J/doctor.ts. For a run-link
warning, set FRAGILITY_RUN_URL.
Collect: $H/collect.ts --run $RUN (24 h window, 21-day lookback).
Triage: $H/analyze.ts --run $RUN. It writes analysis.md and
targets.json, with the hot systems, their scores, and triage verdicts.
Dedup early: $J/jira-match.ts --run $RUN. For each hot system
matched to an open or declined ticket, run
$J/jira-upsert.ts --run $RUN --key <KEY> --system <system> --apply
and don't re-plan it. The exceptions:
Investigate the unmatched systems in score order. Focus on
likely-fragile, mixed, and high-scoring settling. Skip coupled
unless the coupling is the defect. Skip likely-fast-moving and
insufficient-signal unless their diffs say otherwise. For each system:
$H/pr.ts;.agents/skills/refactor-plan/references/rubric.md.Fan out one read-only sub-agent per system when you can. Give it the
system's analysis.md section and the rubric, and ask for the mechanism,
the PR numbers, and a verdict.
Plan: one plan per root problem, which may span several systems.
Scaffold it with $P/new-plan.ts, then fill it in as refactor-plan
describes.
Record decisions: give every hot system you didn't plan or sight a
one-line reason in <dataDir>/$RUN/decisions.json.
File: $J/jira-upsert.ts --plan <file> (a dry run), then add --apply.
If it reports overlapping tickets, read their diffs: pass --key KEY when
the plan is that ticket's problem, or --distinct-from KEY,... when it
isn't.
Summarize: $S/summarize.ts --run $RUN. Exit 1 means some hot system
is still undecided, so go back to step 7.
Write 3 to 6 lines covering:
Use 🟢 when nothing is undecided and every applied upsert succeeded. Use 🟡 when something was held back or a check exited 2, and say what.
BuilderIO/agent-native
a0356c6
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.