Communitygithub.com

lguidolin/engineering-constitution

新しいプロジェクトでエンジニアリング憲法に従って作業を開始する際、そのルールを理解するため、または仕様作成、コミット、テスト、セキュリティ、デプロイ、データベース、UI作業など、どのエンジニアリングプラクティスをタスクに適用すべきかを判断するために使用します。

engineering-constitution とは?

このスキルは、エンジニアリングプラクティスの移植可能な憲章であり、特定のタスクに焦点を当てたサブスキルへのインデックスとして機能します。不変の8つの原則(理解してから構築する、決定を記録する、テストをコントロールとして扱う、YAGNI、自動化、長期的なシステム最適化、ルールの強制、ユーザー指示の優先)を定義し、設計、コミット、テスト、UI、セキュリティ、パフォーマンス、デプロイなどの分野にマッピングします。 このスキルは、Claude CodeやCursor、CodexなどのAIエージェントプラットフォームで使用するために設計されており、新しいプロジェクトに参加したときや、特定のエンジニアリングタスクに直面したときに、どのプラクティスを適用すべきかを迅速に判断できます。Tier 1(全プロジェクトに適用)とTier 2(スタック固有)の2層構造で、スキルはSKILL.mdと共にバンドルされたreferences/engineering-constitution.mdに基づいて動作します。 重要なのは、コードを書く、コミットする、デプロイする、テストを変更する前に、関連するサブスキルを読み込むことを強制する点です。デフォルトの習慣をオーバーライドし、長期的なシステムの健全性を優先するよう設計されています。

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

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

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

ドキュメント

エンジニアリング憲法

概要

エンジニアリングプラクティスの移植可能な憲章。焦点を絞ったスキルに分解されています。このスキルはインデックスです:不変の原則を宣言し、タスクに適した特定のスキルへと導きます。完全な推論は references/engineering-constitution.md に記述されており、この SKILL.md とバンドルされているため、スキルがインストールされている場所ならどこにでも一緒に移動します。

核となる考え方: ソフトウェアエンジニアリングとは、時間をかけて統合されたプログラミングである。 最初のデプロイではなく、長期にわたって運用されるシステム(運用、安全な変更、障害時の復旧)を最適化します。

8つの不変の原則

  1. 理解してから構築する。 承認された設計なしにコードは書かない。
  2. すべての決定を、その根拠と却下した選択肢とともに記録する。
  3. テストはコントロールであり、形式的なものではない。そして、振る舞いの変更はテストファーストである。 失敗するテストは情報であり、決して編集してはならない。構造的な変更は、代わりに既存のスイートが編集されずにパスすることによってゲートされる。
  4. YAGNI(必要になるまでやるな)、容赦なく。
  5. 繰り返し可能なことは自動化する。
  6. ソフトウェアエンジニアリングとは、時間をかけて統合されたプログラミングである。
  7. 強制されないルールは提案に過ぎない。 ルールはツールにバインドするか、レビューアの判断としてラベル付けする。
  8. ユーザーの明示的な指示は、このドキュメントよりも優先される。 優先順位:ユーザー → 憲法 → ツールのデフォルト。

どのスキルが必要ですか?

Tier 1 — 普遍的(すべてのプロジェクトに適用):

あなたのタスクスキル
機能の開始、アイデアを仕様/計画に変換designing-before-building
決定が行われたので、それを文書化(ADR、インデックス、先送りされたアイデア)recording-decisions
コミット、メッセージ作成、自動リリースconventional-commits-and-releases
テストの作成/変更、権限/ロールルール、リファクタリングでテストが失敗tests-as-a-control
コードの作成/リファクタリング、変更の構造化、DRYの決定change-hygiene-and-code-craft
UI、コンポーネント、スタイリング、アクセシビリティの構築interface-craft-and-accessibility
CI、プッシュ前フック、タスクランナー、マージゲートmerge-gates-and-automation
ロギング、メトリクス、トレーシング、ヘルスチェック、SLO、アラートobservability-and-slos
信頼できない入力、シークレット、認証、依存関係、脅威モデリングdefense-in-depth-security
ホットパス、ページネーション、N+1、リストエンドポイント、公開インターフェースperformance-and-scale
デプロイ、ロールバック、インシデント/ポストモーテムの計画resilience-and-deploy-safety

Tier 2 — スタック固有(ツール/トピックが存在する場合のみ読み込む):

あなたのタスクスキル
PostgreSQL、PostGraphile、RLS、SQLファイル、アプリ→GraphQL→DBのパスpostgres-postgraphile-rls-and-sql
UIとテストで共有されるGraphQLクエリ、ルート/スキーマコントラクトテストgraphql-contract-testing
存続しなければならないデータを伴うスキーマ変更 — マイグレーション、バックフィルzero-downtime-migrations
Kubernetes/AKSへのデプロイ、クラウドシークレット、プログレッシブロールアウト、PRごとの環境cloud-delivery-aks

新しいプロジェクトへのこれらのスキルの適用方法

  • Tier 1 はそのまま持ち運べます。 上記の線より上のすべてのスキルは、ウェブアプリ、パイプライン、CLI、ライブラリなど、あらゆるプロジェクトに適用されます。
  • Tier 2 は交換可能です。 スタックが異なる場合、Tier 2 のスキルはトリガーされず(その説明はスタック固有です)、同等のものに置き換えます。それらが実装する原則(単一のデータパス、最終的な強制は低いレベルで、コントラクトのシーム、元に戻せるデプロイ)は引き続き有効です。
  • ライフサイクルに応じてスケールします。 ローンチ前またはローカル専用のプロジェクトでは、ゼロダウンタイムマイグレーション、カナリアリリース、正式なインシデントプロセスを今ルールを書き、トリガー時に有効化として適用します。プロジェクトのモードは最初の決定レコードに記述します。

レッドフラグ

コードを書いたり、コミットしたり、デプロイしたり、テストを変更しようとしているときに、上記の関連スキルを参照していない場合は、停止して最初にそれを読み込んでください。憲法はデフォルトの習慣をオーバーライドします(原則7)。習慣こそが、憲法が修正しようとしているものなのです。

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/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/recording-decisions

Use when a design or architecture decision has been made and needs to be captured — writing a decision record or ADR, updating a decision index, noting a deferred idea, or superseding a past decision. Keywords — ADR, decision record, rationale, rejected alternatives, dependency index.

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.

関連スキル