/dev-standards:dev-standards-decidefrom dev-standards
Record or list architectural decisions and active migrations in `.claude/rules/architecture.md`. 管理架構決策與遷移記錄。 Use when: record decision, add decision, add migration, complete migration, list decisions, list migrations, update architecture decisions, mark migration done
Ships in dev-standards. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
管理 .claude/rules/architecture.md 中「現行架構決策」與「現行遷移」二節。保持此二節最新,可防舊模式造成混亂,並確保新代碼遵循最新慣例。
讀取 .claude/rules/architecture.md。若文件不存在,警告用戶:
No .claude/rules/architecture.md found.
Run /setup-project first to generate rule files, then re-run this skill.
文件缺失則在此停止。不創建——setup-project 命令負責帶項目上下文生成初始內容。
讀文件,從以下二節提取現有條目:
- DECISION: ... 之行- REPLACING: ... 之行向用戶呈現現狀:
Active Decisions:
1. DECISION: Use Zod for all runtime validation (recorded 2025-11-15)
2. DECISION: Prefer server actions over API routes for mutations (recorded 2025-12-01)
Active Migrations:
1. REPLACING: Jest -> Vitest (started 2025-12-10)
2. REPLACING: Prisma -> Drizzle (started 2026-01-05)
(none) <-- if either section is empty
詢問用戶執行何操作:
待答後方繼續。
若用戶選「add a decision」:
詢問:「What architectural decision was made?」提示簡潔 1-2 行。例:
詢問:「Why was this decided? (1 line)」此上下文助未來開發者理解緣由。
在 .claude/rules/architecture.md 的 ## Active Architecture Decisions 節添加新行:
- DECISION: <description> (recorded <today's date>)
日期用 YYYY-MM-DD 格式。
若用戶提供理由,次行附注:
- DECISION: <description> (recorded <today's date>)
<!-- Reason: <why> -->
記錄 DECISION: 一行後,評估是否提升為完整 ADR。三條件全部成立才提升:
任一不足則跳過,只留一行索引。三者皆備則:
docs/adr/NNNN-<kebab-title>.md(序號取現有最大值 +1),格式見 ADR-FORMAT.md。DECISION: 行末附 (ADR-NNNN) 引用。docs/adr/ 不存在則於首個 ADR 提升時惰性創建。
若用戶選「add a migration」:
詢問:「What is being replaced and what is it being replaced with?」提示簡潔格式:
詢問:「Why is this migration happening? (1 line)」
在 .claude/rules/architecture.md 的 ## Active Migrations 節添加新行:
- REPLACING: <old> -> <new> (started <today's date>)
若用戶提供理由,次行附注:
- REPLACING: <old> -> <new> (started <today's date>)
<!-- Reason: <why> -->
提醒用戶:
IMPORTANT: While this migration is active, all new code must follow the NEW
pattern (<new>). Existing code using <old> should be migrated opportunistically.
Any rules referencing <old> should be updated to prefer <new>.
若用戶選「complete a migration」:
若只有一條遷移,確認之。若有多條,詢問用戶選擇哪條。若無,報「No active migrations to complete」並停止。
展示遷移條目,詢問:「Is this migration fully complete? All old usages have been replaced?」
從 ## Active Migrations 節移除該 REPLACING: 行(及其注釋行,若有)。
詢問用戶:「Record the result as an active decision? (e.g., 'Use Vitest for all tests')」
若是,依 Step 4c 格式在 ## Active Architecture Decisions 節添加相應條目。
掃描 .claude/rules/ 中引用已完成遷移舊技術的規則文件。若有,報告:
These rule files may reference the old pattern and should be updated:
- .claude/rules/testing.md (mentions "Jest")
任何寫操作後,回讀 .claude/rules/architecture.md 修改節,以 Step 2 格式呈現更新後狀態。
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub standardbeagle/standardbeagle-tools --plugin dev-standards25 skills in this plugin
/dev-standards-add-skillCreate new project-specific skill in `.claude/skills/` to codify recurring pattern. 在項目中新建可複用技能。 Use when: add skill, create skill, new skill, codify pattern, make reusable workflow/dev-standards-ce-compound記錄已解決問題以複利機構知識。Document solved problems in docs/solutions/ with structured YAML frontmatter. Use when: non-trivial problem solved + verified, prevent re-discovery, capture institutional learning before context fades, document best practice or workflow pattern. Skip: trivial (typo), solution unverified, problem in progress, project lacks docs/solutions/ convention./dev-standards-ce-setupDiagnose + configure compound-engineering env — CLI deps, plugin version, repo-local config. Guided install for missing tools, gitignore + config bootstrap. Use when: troubleshoot missing tools, verify CE setup, onboard repo, refresh config template, /ce-setup re-check. Skip: unrelated to compound-engineering tooling.