technical-debt-workflow
Orchestrate evidence-first repository assessment, debt inventory, prioritization, one approved refactoring slice, and regression review. Use for end-to-end technical-debt cleanup requests; do not use for feature delivery or an unapproved behavior change.
- License 许可
- MPL-2.0
- 最近更新
- 2026-11-13
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- technical-debt-workflow
- updated
- 1785024000000
- metadata
- { "version": "1.0.0", "akm-type": "skill", "akm-updated": "2026-07-26" }
- description
- Orchestrate evidence-first repository assessment, debt inventory, prioritization, one approved refactoring slice, and regression review. Use for end-to-end technical-debt cleanup requests; do not use for feature delivery or an unapproved behavior change.
- compatibility
- Requires repository read access; execution uses Git when available and repository-provided verification commands.
02 资源文件 9
- 资产文件assets/client-entrypoints/AGENTS.md481 B
- 资产文件assets/client-entrypoints/CLAUDE.md356 B
- 资产文件assets/client-entrypoints/copilot-instructions.md346 B
- 资产文件assets/client-entrypoints/refactoring-policy.mdc336 B
- 资产文件assets/client-entrypoints/refactoring.yml688 B
- 资产文件assets/slice-report-template.md907 B
- 参考文档references/adoption.md5.3 KB
- 参考文档references/lifecycle.md3.4 KB
- 参考文档references/primary-references.md1.5 KB
03 SKILL.md 正文
Technical Debt Workflow
When To Use It
Use for a repository-wide or scoped cleanup engagement that needs assessment, ranking, approval gates, bounded execution, and evidence-backed reporting.
When Not To Use It
Do not use for feature work, incident response, a known single-line fix, or a request that already provides one approved and fully specified refactoring slice. Route those directly to the relevant focused skill.
Required Inputs
- Repository root and requested scope
- Applicable repository instructions and canonical policy
- Approval authority and any deadline or risk tolerance
- Existing verification commands, if known
- Explicit behavioral changes, if any; default is none
Procedure
- Read
knowledge/coding/technical-debt/refactoring-policy.mdand applicable repository instructions. - Run
skills/coding/repository-assessmentread-only and executescripts/skills/coding/technical-debt-workflow/refactoring/baseline --root <repository-root>using discovered commands. Never omit--rootwhen invoking the external stash tooling. - Run
skills/coding/architecture-review,skills/coding/debt-inventory, andskills/coding/test-gap-analysisas read-only analyses. Keep facts separate from recommendations. - Run
skills/coding/refactoring-plan; verify each finding's premise before ranking it. - Propose the smallest high-value, low-risk pilot and wait for approval when the slice crosses any policy gate.
- For an approved slice only, run
skills/coding/refactoring-executorin an isolated branch or worktree, thenskills/coding/documentation-syncif documentation changed in meaning. - Run
skills/coding/regression-verificationandskills/coding/refactoring-reviewindependently. - Produce the final report using
skills/coding/technical-debt-workflow/assets/slice-report-template.md.
Read skills/coding/technical-debt-workflow/references/lifecycle.md only when
phase hand-offs or status semantics need more detail. Read
skills/coding/technical-debt-workflow/references/primary-references.md before
changing skill format, client adapters, or evaluation assumptions.
Constraints
- Assessment is read-only except for ignored evidence under
.refactoring/. - Preserve observable behavior unless a behavioral change is explicitly approved and separated from mechanical work.
- Execute one coherent slice at a time; do not bundle upgrades, formatting, feature work, and architecture changes.
- Never weaken tests, suppress unexplained warnings, or treat baseline failures as permission for new failures.
- Prefer deletion and simplification; no hypothetical abstractions.
Expected Output
- Baseline with passed, failed, timed-out, unavailable, and skipped checks
- File- and symbol-level debt inventory with confidence and risk
- Prioritized roadmap with approval gates and rollback guidance
- Pilot proposal, or a completed approved slice with before-and-after evidence
- Final status that never overstates incomplete verification
Verification
Run
scripts/skills/coding/technical-debt-workflow/refactoring/verify --root <repository-root>
after execution and
scripts/skills/coding/technical-debt-workflow/refactoring/report --root <repository-root>
before review. Confirm the final diff is limited to the approved slice and every
required check has an explicit result.
Stop Or Escalation Conditions
Stop before mutation when expected behavior, ownership, public contracts, or architecture boundaries cannot be established; baseline commands are unsafe or unknown; approval is missing; or the proposed slice changes behavior, public API, dependencies, migrations, or high-risk architecture. Escalate with one focused question and the evidence needed to decide.
04 同仓库更多 Skills
tax-filing-checklist
Walk through the steps and documents needed to file an individual federal income tax return
patient-vitals-charting
Record patient vital signs consistently and flag values outside the normal reference range
pasta-from-scratch
Make fresh egg pasta dough from scratch, roll it, and cut it into shapes
knife-sharpening
Sharpen and hone kitchen knives to keep an edge safe and effective
first-aid-response
Respond to a first aid emergency using a scene-safety-first, ABC-based (airway, breathing, circulation) approach
contract-review-basics
Review a contract draft for missing terms, ambiguous language, and risky clauses before signing