跳到正文
cccskills
免费在 GitHub 公开

improve-codebase-architecture

Surface architectural friction and propose deepening opportunities that improve testability and AI-navigability. Use when the user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase easier for agents to navigate.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(4)

  • SKILL.md3.9 KB
  • references/DEEPENING.md4.2 KB
  • references/INTERFACE-DESIGN.md2.5 KB
  • references/LANGUAGE.md2.6 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Improve Codebase Architecture

Use this skill to find deepening opportunities: refactors that turn shallow Modules into deeper ones by putting more useful behavior behind a smaller, clearer Interface. The output is candidates and a guided design conversation. Do not refactor, create a new Interface, or rewrite production code until the user selects a candidate and asks for implementation.

Required Vocabulary

Use these terms exactly: Module, Interface, Implementation, Depth, Seam, Adapter, Leverage, and Locality. Do not replace them with "component," "service," "API," or "boundary." See references/LANGUAGE.md. Principles: run the deletion test; treat the Interface as the test surface; one Adapter is a hypothetical Seam and two Adapters make it real.

Agent Forge Context

Load existing context first:

  1. knowledge/_shared.yaml.
  2. Relevant knowledge/repos/*.yaml for domain language and repo patterns.
  3. Active Beads issue context, including design: and worklog: comments.
  4. Existing ADRs when the repo already has them.

If knowledge or ADR files are absent, proceed silently. Do not create CONTEXT.md, ADRs, knowledge YAML, or Beads issues up front. Beads is the default place for durable decisions and follow-up work unless the user explicitly asks otherwise.

Process

1. Explore Organically

Walk the codebase with focused searches, file reads, and exploration agents when the scope is broad. Note where understanding becomes expensive:

  • Understanding one concept requires bouncing between many small Modules.
  • A Module is shallow: its Interface is nearly as complex as its Implementation.
  • Pure functions exist only for testability while real bugs hide in call choreography, with poor Locality.
  • Tightly-coupled Modules leak across Seams.
  • Code is untested or hard to test through its current Interface.

Apply the deletion test to suspected shallow Modules. A strong candidate is one where deletion would spread complexity across callers instead of making it disappear.

2. Present Candidates

Present a numbered list. For each candidate include:

  • Files/Modules - files and Modules involved.
  • Problem - why the current architecture causes friction.
  • Solution - what would change in plain English.
  • Benefits - Leverage, Locality, and test impact.

Use domain language from knowledge/ and Beads with the architecture vocabulary. If a candidate conflicts with an ADR or Beads design: decision, surface it only when real friction justifies revisiting that decision. Do not propose new Interfaces yet. End by asking: "Which of these would you like to explore?"

3. Grilling Loop

After the user chooses a candidate, ask through constraints before proposing implementation: what behavior belongs behind the deepened Interface, where the Seam should live, which dependencies fit references/DEEPENING.md, what callers should stop knowing, and which tests should survive internal refactors.

Record durable decisions in Beads with design: or worklog: comments. If follow-up implementation work appears, create or suggest Beads issues with priority. If the user rejects a candidate for a load-bearing reason, ask whether to record it in Beads or an existing ADR mechanism.

4. Design Interfaces Only After Selection

When the user wants alternatives for the selected candidate, hand off to references/INTERFACE-DESIGN.md. That workflow compares multiple possible Interfaces only after candidate selection.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

add-bead

免费

Capture free-text work as a tracked Beads issue. Use when the user runs /add-bead or wants to quickly file a Beads issue.

中文简介正在准备中。当前显示原文说明。

jupes/agent-forge-harness22026年10月19日 更新

add-repo

免费

Register a new sub-repo in the knowledge base.

中文简介正在准备中。当前显示原文说明。

jupes/agent-forge-harness22026年10月19日 更新

Add focused Bun unit tests for mission-critical behavior and edge cases — not blanket coverage.

中文简介正在准备中。当前显示原文说明。

jupes/agent-forge-harness22026年10月19日 更新

ask

免费

Answer questions about the codebase from knowledge files. Use when the user runs /ask or asks a domain/knowledge question about the repos.

中文简介正在准备中。当前显示原文说明。

jupes/agent-forge-harness22026年10月19日 更新

Meta-skill for creating Agent Forge skills under .claude/skills/ with SKILL.md, optional references/ and scripts/, and Bun scaffolds. Use when the user wants to add or author a skill, scaffold a new skill folder, or align skill docs with harness conventions (JSON script output, Beads for tasks).

中文简介正在准备中。当前显示原文说明。

jupes/agent-forge-harness22026年10月19日 更新

Choose Beads issue priority (P0–P4, numeric, or named) from urgency, impact, and risk when creating or triaging work.

中文简介正在准备中。当前显示原文说明。

jupes/agent-forge-harness22026年10月19日 更新

查看 jupes 的全部技能

报告此技能的问题