Agent Skillsrepowise-dev/repowise › architectural-decisions

architectural-decisions

GitHub

用于查询代码架构决策背景、评估架构变更影响及检查决策健康状态的工具。通过搜索ADR文件或代码标记,解释设计 rationale,辅助开发者避免违背既有架构选择。

plugins/claude-code/skills/architectural-decisions/SKILL.md repowise-dev/repowise

触发场景

询问代码为何这样构建 准备进行架构重构或模式变更 代码中包含 WHY/DECISION/TRADEOFF 标记 需要查看架构决策健康度仪表盘

安装

npx skills add repowise-dev/repowise --skill architectural-decisions -g -y
更多选项

非标准路径

npx skills add https://github.com/repowise-dev/repowise/tree/main/plugins/claude-code/skills/architectural-decisions -g -y

不安装直接使用

npx skills use repowise-dev/repowise@architectural-decisions

指定 Agent (Claude Code)

npx skills add repowise-dev/repowise --skill architectural-decisions -a claude-code -g -y

安装 repo 全部 skill

npx skills add repowise-dev/repowise --all -g -y

预览 repo 内 skill

npx skills add repowise-dev/repowise --list

SKILL.md

Frontmatter
{
    "name": "architectural-decisions",
    "description": "Use when encountering questions about WHY code is built a certain way, when about to make architectural changes (new patterns, restructuring, choosing between approaches), or when the user asks about design rationale in a Repowise-indexed codebase (.repowise\/ directory exists). Also activates when commit messages or code comments contain decision signals like \"WHY:\", \"DECISION:\", \"TRADEOFF:\", \"ADR:\".\n",
    "user-invocable": false
}

Architectural Decisions with Repowise

Repowise captures architectural decisions — the why behind how code is built.

get_why has four modes — pick by what you pass:

  1. get_why(query="why is auth using JWT?") — keyword + semantic decision search.
  2. get_why(query="src/auth/service.py") — decisions governing that file, plus its origin story and an alignment score (does the file still follow its own ADRs?).
  3. get_why(query="why was caching added?", targets=["src/auth/cache.py"]) — target-anchored search; decisions touching the targets get boosted.
  4. get_why() — the decision-health dashboard.

Decisions are mined from five sources (ADR files, PR and squash-commit bodies, inline markers, git archaeology, and centrality-bounded code comments). Each rationale traces to a verbatim source span, stamped exact / fuzzy / unverified. When no decision exists for a path, get_why falls back to git archaeology so the call is never empty.

When the user asks "why is X built this way?"

Call get_why(query="X").

When about to make an architectural change

  1. Call get_why(query="the specific area you're changing") to find existing decisions that govern that area.
  2. If decisions are found, present them to the user before proceeding — they may not want to contradict an existing architectural choice.
  3. If no decisions are found, proceed but note that no recorded decision governs this area.

When called with no specific query

Call get_why() with no arguments to get the decision-health dashboard:

  • Stale decisions that may no longer apply
  • Proposed decisions awaiting confirmation
  • Ungoverned hotspots (high-churn files with no recorded decisions)

The same signals surface in the CLI via repowise decision health / /repowise:decision, and you can query why mid-task with repowise why / /repowise:why (the get_why adapter). Review auto-proposed decisions with repowise decision confirm.

When a file has decision markers

If you see # WHY:, # DECISION:, # TRADEOFF:, or # ADR: comments in code, call get_context(targets=["that_file.py"]) to see the full decision record with context and affected modules.

Recording new decisions

If the user makes an architectural decision during the conversation, suggest: "Want to record this decision? Add a # DECISION: comment in the relevant code, or run repowise decision add to capture it formally."

版本历史

  • 370793f 当前 2026-08-19 23:15

    决策挖掘源从8个缩减为5个(移除CHANGELOG、README/docs等),修正了相关文档和基准测试数据。

  • b5f4753 2026-07-25 05:12

同 Skill 集合

plugins/claude-code/skills/change-review/SKILL.md
plugins/claude-code/skills/code-health/SKILL.md
plugins/claude-code/skills/codebase-exploration/SKILL.md
plugins/claude-code/skills/dead-code-cleanup/SKILL.md
plugins/claude-code/skills/pre-modification/SKILL.md
plugins/codex/skills/architectural-decisions/SKILL.md
plugins/codex/skills/change-review/SKILL.md
plugins/codex/skills/code-health/SKILL.md
plugins/codex/skills/codebase-exploration/SKILL.md
plugins/codex/skills/dead-code-cleanup/SKILL.md
plugins/codex/skills/pre-modification-check/SKILL.md

元信息

文件数
0
版本
ce350d1
Hash
cb1d9d07
收录时间
2026-07-25 05:12

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-09 18:47
浙ICP备14020137号-1 $访客地图$