maintaining-codebase
暂无简介
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-09
- Stars
- ★ 11
- Forks
- 0
03 SKILL.md 正文
Maintaining Codebase
Purpose
Turn one request for sustained codebase maintenance into an evidence-led, repository-wide improvement program. It reduces technical debt without treating "improve everything" as permission for a risky, unreviewed rewrite.
Trigger
Use for periodic maintenance, technical-debt reduction, code-quality improvement, complexity management, or a whole-repository upkeep request. This skill owns the top-level maintenance assessment and prioritisation.
Assessment
- Read the repository's architecture, ubiquitous language, testing policy, design decisions, ownership rules, and current change state.
- Gather evidence rather than rating files by intuition: churn and hotspot data, dependency state, lint/type/test/build output when configured, boundary/import patterns, duplication, complexity indicators, stale docs, dead generated assets, security advisories, and recent incident or failure evidence. State unavailable evidence and do not invent it.
- For each finding, name the owning bounded context, evidence, user impact, likely root cause, risk level, and the smallest protecting test or check.
- Score and rank work using impact, likelihood, change cost, and confidence. Separate quick safe cleanup from architectural debt, product work, and unproven speculation.
Maintenance program
Produce a compact reviewable program containing:
- a repository health snapshot and an explicit list of evidence gaps;
- a prioritised backlog with risk, ownership, expected benefit, and rollback boundary;
- dependency-ordered, behavior-preserving extraction/refactor slices;
- a cadence for repeating the assessment and measurable exit signals;
- test, documentation, security, performance, accessibility, and observability follow-ups where evidence supports them.
Do not modify code during the assessment. Present the program and wait for
approval before any implementation. After approval, route each behavior change
through the normal planning or systematic-debugging workflow, and hand
each behavior-preserving refactor slice to simplifying-code. Use
./.beryl/agent/scripts/entropy-hotspots.sh for churn and hotspot evidence.
Never bundle unrelated cleanup, weaken tests, claim all debt is removed, or
convert a finding into a feature without separate product approval.
Output
Use this structure:
skill: maintaining-codebase
status: success
health_snapshot: "<evidence-based summary>"
evidence_gaps: ["<unavailable input>"]
priorities:
- finding: "<problem>"
bounded_context: "<owner>"
evidence: "<facts>"
risk: "<low|medium|high>"
protecting_check: "<command or test>"
maintenance_slices: ["<dependency-ordered, reviewable change>"]
cadence: "<repeat interval and trigger>"
approval_required_before_implementation: true
04 同仓库更多 Skills
verification-before-completion
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
using-beryl
暂无简介
understand-codebase
Teach a developer how a repository, subsystem, execution path, migration, diff, commit, branch, or pull request works. Use when the user asks to understand, explain, map, walk through, explore, or quiz themselves on code, or asks for an interactive HTML understanding artifact.
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
simplifying-code
Use when code in a specific module or area is hard to understand or change, when the user asks to simplify, refactor, clean up, or improve the design or architecture of some code, or when a maintenance program hands over a refactor slice. Finds unmanaged complexity from evidence and removes it with small, behavior-preserving changes.