Communitygithub.com

lguidolin/recording-decisions

設計やアーキテクチャの決定を記録するために使用します。決定記録(ADR)の作成、決定インデックスの更新、延期されたアイデアの記録、過去の決定の置き換えなどを扱います。キーワード: ADR、決定記録、根拠、却下された代替案、依存関係インデックス。

recording-decisions とは?

このスキルは、設計やアーキテクチャ上の決定を永続的な記録として残すための枠組みを提供します。チャット履歴や記憶に頼るのではなく、決定記録(ADR)を作成することで、後からコードから意図を逆推測するコストを削減します。記録は「アーキテクチャ」「データモデル」「決定とその理由」「インターフェース」「制約」「落とし穴」「却下された代替案」という固定構造を持ち、一貫性と検索性を確保します。また、すべての記録をナビゲート可能なグラフにする依存関係トラッキング付きインデックス、将来の考慮事項ドキュメント、および置き換えられた記録を削除せずに保存するアーカイブという3つの補助成果物を生成します。このスキルには、仕様や計画から決定記録を生成するスクリプトや、記録のフロントマターからインデックスを自動生成するスクリプトがバンドルされており、Claude Codeや同様のエージェント環境で使用できます。

対応✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/lguidolin/agent-skills/tree/main/skills/recording-decisions

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

決定記録

概要

決定は永続的なインフラです。メモリやチャット履歴はそうではありません。記録のコストは一度支払われるだけですが、失われた決定のコストは、誰かがコードから意図を逆解析するたびに支払われます。

記録の構造

すべての重要な決定は、固定された構造を持つ記録を生成します。これにより、誰でもどこを見ればよいかがわかります。

セクション内容
アーキテクチャソリューションの形状と主要ファイル
データモデルエンティティ、フィールド、リレーションシップ
決定(理由付き)各選択とその根拠のペア — 理由は必須
インターフェース他のコードがこれをどのように使用するか
制約常に真であり続けなければならないこと
落とし穴次の人が遭遇するわかりにくい罠
却下された代替案検討されたが破棄されたもの、およびその理由 — 解決済みの問題の再議論を防ぐ

3つの補助成果物

  • すべての決定のインデックス。明示的な依存関係トラッキング(どの決定がどの決定に基づくか)と置き換えられたセクションを含む。記録の山をナビゲート可能なグラフに変える。
  • 「将来の考慮事項」ドキュメント — 延期されたアイデアや既知の懸念事項。新しい作業を開始する際に参照することで、何も黙って忘れられないようにする。インシデントのアクションアイテムと、トリガー付きで延期された決定はここに置かれる。
  • アーカイブ — 置き換えられた記録は削除されるのではなく、ここに移動される。履歴は保持され、上書きされない。

クイックリファレンス

  • 記録の配置場所の規則: docs/superpowers/decisions/YYYY-MM-DD-<トピック>.md。YAMLフロントマター(title、date、component、status、supersedes、dependencies)を含む。
  • 「将来の考慮事項」は docs/superpowers/future-considerations.md に配置される。各エントリにはステータス(open / triggered / done / dropped)が付与され、該当する場合はそれを再活性化すべきトリガーも含まれる。新しい作業を開始する際に参照すること。
  • フロントマターは自動生成されるインデックスの元となる — 正確に保つこと。
  • 理由と却下された代替案は最も価値の高い2つのセクションである。これらがない記録は地雷である。
  • 記録はパイプラインの記録段階(designing-before-building を参照)で、実行後に行う。

バンドルツール

このスキルには独自のスクリプトとテンプレートが同梱されており、スキルがインストールされた任意のリポジトリで機能します。これらは SKILL.md の隣に配置されます。

recording-decisions/
  scripts/doc-archive.sh      決定記録がない仕様/計画を見つける
  scripts/index-rebuild.sh    記録のフロントマターからインデックスを再生成する
  templates/decision-record.md

それらの場所を特定する — スキルはプロジェクト単位またはグローバルにインストールされている可能性があります。

for base in .claude/skills ~/.claude/skills; do
  d="$base/recording-decisions/scripts"
  [ -d "$d" ] && echo "$d" && break
done

doc-archive.sh [specs_dir] [plans_dir] [decisions_dir] [archive_dir] 一致する決定記録がない仕様を一覧表示し、テンプレートから構築された変換プロンプトを出力します。デフォルトは docs/superpowers/{specs,plans,decisions,archive} です。

index-rebuild.sh [decisions_dir] [output_file] すべての記録のフロントマターから docs/superpowers/index.md を書き換えます — アクティブテーブル(コンポーネント、タイトル、日付、依存関係)と置き換えられたテーブル(コンポーネント、タイトル、置き換え元)を生成します。全体が再生成されるため、手動で編集しないでください。

どちらも依存関係のないbashです。このスキルを使用するプロジェクトは yq、jq、タスクランナーを必要としません。スクリプトがない場合でも、上記の手順は自己完結型であるため、直接作業を行ってください。

これがコンテキストにとって重要な理由

仕様書や計画書は意図的に冗長です。人間が推論を追跡するために書かれています。その冗長性は、Claudeがそれらを開くたびにコンテキストにチャージされます。決定記録は、前に進むために必要なもの(決定、理由、インターフェース、制約、落とし穴、却下された代替案)を約30〜50行に収め、元の仕様書は archive/ に移動され、人間が読める状態を保ちつつ、意図的に開かれるまでコストは発生しません。

使用すべきでない場合

些細で自明な変更には記録は不要です。判断基準: 後で「なぜこの方法で実装されたのか?」と誰かが尋ねるだろうか? 「はい」の場合は記録します。

完全な根拠: 憲法第2条。engineering-constitution/references/engineering-constitution.md にバンドルされています。

Individual skills in this repo

This repo contains 18 individual skills — each has its own dedicated page.

lguidolin/change-hygiene-and-code-craft

Use when writing or refactoring code, structuring a commit or PR, or deciding whether to abstract duplication. Symptoms — mixing reorg with logic changes, a PR doing several things at once, a file growing large, the second copy of similar code, or unsure whether to DRY something up.

lguidolin/cloud-delivery-aks

Use when deploying to Kubernetes or Azure Kubernetes Service (AKS), configuring cloud secrets, setting up progressive rollout/canary, per-PR ephemeral environments, or k8s health probes. Keywords — Kubernetes, AKS, Key Vault, Argo Rollouts, Flagger, canary, blue-green, liveness, readiness, PodDisruptionBudget, HPA, rollback, GHCR.

lguidolin/commit-history-rewrite

Use when an existing repository has messy commit history that needs to conform to conventional commits before adopting release-please, or when intermediate WIP/fixup/merge commits need to be cleaned up.

lguidolin/conventional-commits-and-releases

Use when committing, writing a commit message, opening a PR that will be squash-merged, or configuring automated versioning/changelogs. Keywords — conventional commits, release-please, semver, feat/fix/chore, breaking change, changelog.

lguidolin/defense-in-depth-security

Use when handling untrusted input, secrets, authentication/authorization, or dependencies — or threat-modeling a new surface. Keywords — STRIDE, threat model, least privilege, secrets management, supply chain, dependency scanning, input validation, audit log, defense in depth.

lguidolin/designing-before-building

Use when starting a feature, fixing a non-trivial bug, or about to write implementation code — before any code exists. Symptoms you need this: "this is simple, I'll just code it", reaching for the editor before a design is approved, or an idea that hasn't been turned into a spec and plan.

lguidolin/engineering-constitution

Use when starting work in a project that follows the engineering constitution, orienting to its rules, or deciding which engineering practice applies to a task — spec writing, commits, testing, security, deploys, database, or UI work.

lguidolin/graphql-contract-testing

Use when writing a GraphQL query/mutation that the UI and a test will share, or building route/schema contract or smoke tests. Symptoms — copying a query into a test, a test asserting on query text, schema change that didn't break the UI build, or RLS/permission drift. Keywords — graphql-codegen, typed document, contract test, route smoke test.

lguidolin/init-repo-CI

Use when setting up a new repository with conventional commits, release-please, and CI automation, or when retrofitting an existing repository that lacks automated versioning and PR validation workflows.

lguidolin/interface-craft-and-accessibility

Use when building or styling UI — components, layouts, forms, design tokens — or making accessibility decisions. Keywords — a11y, WCAG, keyboard navigation, focus state, contrast, design system, minimalist UI, component reuse, ARIA, semantic HTML.

lguidolin/merge-gates-and-automation

Use when setting up or changing CI, pre-push hooks, or a task runner, or deciding what must pass before merge. Symptoms — tempted to put authoritative checks only in a local hook, skip CI, bypass with --no-verify, or unsure what gates a merge vs. runs locally.

lguidolin/observability-and-slos

Use when adding logging, metrics, tracing, health checks, SLOs, or alerting — or when building a service surface that needs to be operable and debuggable. Keywords — structured logs, OpenTelemetry, correlation id, RED metrics, liveness, readiness, SLI, SLO, error budget, alerting.

lguidolin/performance-and-scale

Use when working on hot paths, list endpoints, pagination, data-access in loops, or public interfaces/schemas. Symptoms — unbounded queries, N+1 access, no latency budget, optimizing without measuring, or changing an interface many consumers depend on. Keywords — pagination, N+1, Hyrum's Law, performance budget, bundle size.

lguidolin/postgres-postgraphile-rls-and-sql

Use when writing PostgreSQL, PostGraphile config, Row-Level Security policies, SQL schema files, or working on the Browser→App→PostGraphile→Postgres data path. Keywords — RLS, SECURITY DEFINER, search_path, pgSettings, grants, roles, GraphQL depth limit, query cost, statement_timeout, SQL file organization.

lguidolin/resilience-and-deploy-safety

Use when planning a deploy, designing a rollback, or responding to an incident or writing a postmortem. Keywords — deploy safety, rollback, immutable artifact, progressive delivery, canary, blast radius, incident response, blameless postmortem, error budget.

lguidolin/ship-it

Use when the user wants to ship work — push, PR, archive decision records, merge, and clean up. Handles the full lifecycle from committing final changes through post-merge cleanup including converting specs/plans to compact decision records.

lguidolin/tests-as-a-control

Use when writing or modifying tests, when a test breaks during a refactor, or when testing permission/role rules. Symptoms — tempted to edit a test to make it pass, testing only the happy path, a deny-test that started passing, flaky tests, or unsure what to assert.

lguidolin/zero-downtime-migrations

Use when changing a database schema where data must survive the change — adding/removing/renaming columns, constraints, indexes, or backfilling. Symptoms — a destructive migration bundled with a code deploy, a NOT NULL column with a backfill, a table-locking UPDATE, or a rename. Keywords — expand/contract, parallel change, backfill, NOT VALID, CREATE INDEX CONCURRENTLY, graphile-migrate.

関連スキル