jpskill.com
✍️ ライティング コミュニティ

devflow-constitution-quick-ref

CC-DevFlow Constitution v2.0.0の10の条項とフェーズ-1ゲートをまとめたクイックリファレンスで、詳細な情報へのリンクも含まれており、開発フローの憲章を素早く理解するSkill。

📜 元の英語説明(参考)

Quick reference guide to CC-DevFlow Constitution v2.0.0 with links to full text. Covers all 10 Articles and Phase -1 Gates.

🇯🇵 日本人クリエイター向け解説

一言でいうと

CC-DevFlow Constitution v2.0.0の10の条項とフェーズ-1ゲートをまとめたクイックリファレンスで、詳細な情報へのリンクも含まれており、開発フローの憲章を素早く理解するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o devflow-constitution-quick-ref.zip https://jpskill.com/download/18684.zip && unzip -o devflow-constitution-quick-ref.zip && rm devflow-constitution-quick-ref.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/18684.zip -OutFile "$d\devflow-constitution-quick-ref.zip"; Expand-Archive "$d\devflow-constitution-quick-ref.zip" -DestinationPath $d -Force; ri "$d\devflow-constitution-quick-ref.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して devflow-constitution-quick-ref.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → devflow-constitution-quick-ref フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

DevFlow Constitution クイックリファレンス

目的

10個の憲法条項すべての簡単な要約を、完全な憲法ドキュメントへのリンクとともに提供します。このスキルは、完全な憲法テキストを複製するものではありません。

完全な憲法: .claude/rules/project-constitution.md v2.0.0

憲法の概要

バージョン: v2.0.0 発効日: 2025-01-10 権限: 最高の優先度、不可侵、永続的、普遍的 範囲: すべての要件、すべての段階、すべてのエージェント

第1条: 品質第一 (质量至上)

概要

品質は交渉の余地のないベースラインです。

主要なルール

  • I.1: 部分的な実装の禁止 (TODO/FIXME のプレースホルダーは不可)
  • I.2: テストカバレッジ ≥80%
  • I.3: 「とりあえず簡略化」という言い訳は不可
  • I.4: 型チェック、リンティング、セキュリティスキャン、ビルド検証に合格する必要がある

実施

  • リアルタイム: constitution-guardian ガードレール (TODO/FIXME をブロック)
  • バッチ: validate-constitution.sh --type all
  • プリプッシュ: pre-push-guard.sh

違反の例

❌ "TODO later: Add email verification"
❌ "// Simplified for now, will complete in v2"
❌ "defer to v2"

詳細: .claude/rules/project-constitution.md#article-i-quality-first-质量至上 を参照してください


第2条: アーキテクチャの一貫性 (架构一致性)

概要

コードベースの均一性と予測可能性を維持します。

主要なルール

  • II.1: コードの重複禁止 (既存のコードベースを最初に検索)
  • II.2: 一貫した命名 (既存のパターンに従う)
  • II.3: 過剰なエンジニアリングの防止 (no BaseController, AbstractService)
  • II.4: 単一責任 (ファイルあたり ≤500 行)

実施

  • フェーズ -1 ゲート: planner エージェントが EPIC 生成前にチェック
  • コードレビュー: code-reviewer エージェント

違反の例

❌ class BaseController {}       // 過剰な抽象化
❌ function helperManager() {}   // 曖昧な命名
❌ 800-line file                 // 制限超過

詳細: .claude/rules/project-constitution.md#article-ii-architectural-consistency-架构一致性 を参照してください


第3条: セキュリティ第一 (安全优先)

概要

セキュリティは後付けではなく、基盤となるものです。

主要なルール

  • III.1: ハードコードされたシークレットの禁止 (環境変数を使用)
  • III.2: すべての入力は処理前に検証する必要がある
  • III.3: 最小特権の原則 (デフォルトで拒否)
  • III.4: デフォルトで安全 (HTTPS, CORS ホワイトリスト, 認証必須)

実施

  • リアルタイム: constitution-guardian ガードレール (ハードコードされたシークレットをブロック)
  • プリプッシュ: pre-push-guard.sh がシークレットパターンをスキャン
  • QA: security-reviewer エージェント

違反の例

❌ const API_KEY = "sk-abc123..."    // ハードコード
❌ const PASSWORD = "admin123"       // ハードコード

詳細: .claude/rules/project-constitution.md#article-iii-security-first-安全优先 を参照してください


第4条: パフォーマンス責任 (性能责任)

概要

パフォーマンスはユーザーエクスペリエンスです。積極的な最適化が必要です。

主要なルール

  • IV.1: リソースリークの防止 (常に接続を閉じる)
  • IV.2: アルゴリズムの効率 (O(n) が存在する場合、O(n²) を避ける)
  • IV.3: 遅延ロード (大規模なデータセットのページネーション)
  • IV.4: インテリジェントなキャッシュ (TTL と無効化を使用)

実施

  • QA: qa-tester エージェントがパフォーマンスプロファイリングを含む
  • コードレビュー: code-reviewer エージェントがリソース管理をチェック

違反の例

❌ loadAllUsers()                    // 100万人のユーザーをメモリにロード
❌ nested loops over same dataset    // O(n²)
❌ no connection.close()             // リソースリーク

詳細: .claude/rules/project-constitution.md#article-iv-performance-accountability-性能责任 を参照してください


第5条: メンテナンス性 (可维护性)

概要

コードは理解しやすく、修正可能で、拡張可能である必要があります。

主要なルール

  • V.1: デッドコードの排除 (未使用のインポート、コメントアウトされたコードを削除)
  • V.2: 関心の分離 (モデル、サービス、コントローラー、ビュー)
  • V.3: ドキュメントの義務 (複雑なアルゴリズム、ビジネスロジック)
  • V.4: ファイルサイズの制限 (ファイルあたり ≤500 行、関数あたり ≤50 行)

実施

  • リンティング: ESLint, Pylint のルール
  • コードレビュー: code-reviewer エージェント

違反の例

❌ // Commented-out code block    // デッドコード
❌ Unused import statements         // デッドコード
❌ 800-line function               // 制限超過

詳細: .claude/rules/project-constitution.md#article-v-maintainability-可维护性 を参照してください


第6条: テスト駆動開発 (测试优先开发)

概要

テストは動作を定義します。実装はテストをパスさせます。

主要なルール

  • VI.1: TDD の義務 (最初にテストを書き、テストは最初に失敗する必要がある)
  • VI.2: テストの独立性 (各テストは独立して実行される)
  • VI.3: 意味のあるテスト (no assert True, 実際の動作をテスト)

実施

  • リアルタイム: devflow-tdd-enforcer ガードレール (TDD 違反をブロック)
  • TASKS.md: フェーズ 2 とフェーズ 3 の間のテスト検証チェックポイント
  • planner エージェント: TDD 順序で TASKS.md を生成

TDD シーケンス

Phase 2: Write Tests FIRST ⚠️
  → All tests MUST fail initially
  → TEST VERIFICATION CHECKPOINT

Phase 3: Write Implementation
  → Goal: Make tests pass

詳細: .claude/rules/project-constitution.md#article-vi-test-first-development-测试优先开发 を参照してください


第7条: シンプルさゲート (简单性闸门)

概要

デフォルトはシンプルさです。複雑さには正当な理由が必要です。

主要なルール (フェーズ -1 ゲート)

  • VII.1: 同時進行プロジェクトの最大数 ≤3
  • VII.2: 最小限の依存関係 (可能な場合は標準ライブラリを使用)
  • VII.3: 垂直スライスを最初に (次の機能の前に完全な機能を)
  • VII.4: 直接的なフレームワークの使用 (カスタム抽象化を避ける)

実施

  • フェーズ -1 ゲート: planner エージェントが EPIC を生成する前に実施
  • EPIC.md: 「フェーズ -1 シンプルさゲート」チェックセクションを含む

違反の例

❌ 5 projects in scope                    # 制限超過
❌ Adding new framework for simple task   # 過剰な依存関係
❌ Custom ORM wrapper                     # Unn

(原文がここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

DevFlow Constitution Quick Reference

Purpose

Provide quick summaries of all 10 Constitutional Articles with links to full Constitution document. This skill does NOT duplicate the complete Constitution text.

Full Constitution: .claude/rules/project-constitution.md v2.0.0

Constitution Overview

Version: v2.0.0 Effective Date: 2025-01-10 Authority: Supreme Priority, Inviolable, Persistent, Universal Scope: All requirements, all stages, all agents

Article I: Quality First (质量至上)

Summary

Quality is the non-negotiable baseline.

Key Rules

  • I.1: NO PARTIAL IMPLEMENTATION (no TODO/FIXME placeholders)
  • I.2: Test coverage ≥80%
  • I.3: No "simplified for now" excuses
  • I.4: Must pass type checking, linting, security scanning, build verification

Enforcement

  • Real-time: constitution-guardian guardrail (blocks TODOs/FIXMEs)
  • Batch: validate-constitution.sh --type all
  • Pre-push: pre-push-guard.sh

Example Violations

❌ "TODO later: Add email verification"
❌ "// Simplified for now, will complete in v2"
❌ "defer to v2"

For Details: See .claude/rules/project-constitution.md#article-i-quality-first-质量至上


Article II: Architectural Consistency (架构一致性)

Summary

Maintain codebase uniformity and predictability.

Key Rules

  • II.1: No code duplication (search existing codebase first)
  • II.2: Consistent naming (follow existing patterns)
  • II.3: Anti-over-engineering (no BaseController, AbstractService)
  • II.4: Single responsibility (≤500 lines per file)

Enforcement

  • Phase -1 Gates: planner agent checks before EPIC generation
  • Code review: code-reviewer agent

Example Violations

❌ class BaseController {}       // Over-abstraction
❌ function helperManager() {}   // Vague naming
❌ 800-line file                 // Exceeds limit

For Details: See .claude/rules/project-constitution.md#article-ii-architectural-consistency-架构一致性


Article III: Security First (安全优先)

Summary

Security is foundational, not an afterthought.

Key Rules

  • III.1: NO HARDCODED SECRETS (use env variables)
  • III.2: All inputs must be validated BEFORE processing
  • III.3: Principle of least privilege (deny by default)
  • III.4: Secure by default (HTTPS, CORS whitelist, auth required)

Enforcement

  • Real-time: constitution-guardian guardrail (blocks hardcoded secrets)
  • Pre-push: pre-push-guard.sh scans for secret patterns
  • QA: security-reviewer agent

Example Violations

❌ const API_KEY = "sk-abc123..."    // Hardcoded
❌ const PASSWORD = "admin123"       // Hardcoded

For Details: See .claude/rules/project-constitution.md#article-iii-security-first-安全优先


Article IV: Performance Accountability (性能责任)

Summary

Performance is user experience; proactive optimization required.

Key Rules

  • IV.1: No resource leaks (always close connections)
  • IV.2: Algorithm efficiency (avoid O(n²) when O(n) exists)
  • IV.3: Lazy loading (pagination for large datasets)
  • IV.4: Intelligent caching (with TTL and invalidation)

Enforcement

  • QA: qa-tester agent includes performance profiling
  • Code review: code-reviewer agent checks resource management

Example Violations

❌ loadAllUsers()                    // Loads 1M users into memory
❌ nested loops over same dataset    // O(n²)
❌ no connection.close()             // Resource leak

For Details: See .claude/rules/project-constitution.md#article-iv-performance-accountability-性能责任


Article V: Maintainability (可维护性)

Summary

Code must be understandable, modifiable, and extensible.

Key Rules

  • V.1: No dead code (delete unused imports, commented code)
  • V.2: Separation of concerns (models, services, controllers, views)
  • V.3: Documentation mandate (complex algorithms, business logic)
  • V.4: File size limits (≤500 lines per file, ≤50 lines per function)

Enforcement

  • Linting: ESLint, Pylint rules
  • Code review: code-reviewer agent

Example Violations

❌ // Commented-out code block    // Dead code
❌ Unused import statements         // Dead code
❌ 800-line function               // Exceeds limit

For Details: See .claude/rules/project-constitution.md#article-v-maintainability-可维护性


Article VI: Test-First Development (测试优先开发)

Summary

Tests define behavior; implementation makes tests pass.

Key Rules

  • VI.1: TDD mandate (write tests FIRST, tests MUST fail initially)
  • VI.2: Test independence (each test runs in isolation)
  • VI.3: Meaningful tests (no assert True, test actual behavior)

Enforcement

  • Real-time: devflow-tdd-enforcer guardrail (blocks TDD violations)
  • TASKS.md: TEST VERIFICATION CHECKPOINT between Phase 2 and Phase 3
  • planner agent: Generates TASKS.md with TDD order

TDD Sequence

Phase 2: Write Tests FIRST ⚠️
  → All tests MUST fail initially
  → TEST VERIFICATION CHECKPOINT

Phase 3: Write Implementation
  → Goal: Make tests pass

For Details: See .claude/rules/project-constitution.md#article-vi-test-first-development-测试优先开发


Article VII: Simplicity Gate (简单性闸门)

Summary

Default to simplicity; complexity requires justification.

Key Rules (Phase -1 Gates)

  • VII.1: Maximum project count ≤3 simultaneously
  • VII.2: Minimal dependencies (use standard library when possible)
  • VII.3: Vertical slice first (full feature before next feature)
  • VII.4: Direct framework usage (avoid custom abstractions)

Enforcement

  • Phase -1 Gates: planner agent enforces BEFORE generating EPIC
  • EPIC.md: Contains "Phase -1 Simplicity Gate" check section

Example Violations

❌ 5 projects in scope                    # Exceeds limit
❌ Adding new framework for simple task   # Over-dependency
❌ Custom ORM wrapper                     # Unnecessary abstraction

For Details: See .claude/rules/project-constitution.md#article-vii-simplicity-gate-简单性闸门


Article VIII: Anti-Abstraction (反抽象化)

Summary

Prefer concrete code over abstractions until three+ use cases proven.

Key Rules (Phase -1 Gates)

  • VIII.1: No premature abstraction (Rule of Three)
  • VIII.2: No generic layers (no GenericService<T>)
  • VIII.3: Direct framework usage (Express, FastAPI, Flask)
  • VIII.4: Inline before extract (copy-paste OK until 3rd repetition)

Enforcement

  • Phase -1 Gates: planner agent enforces BEFORE generating EPIC
  • EPIC.md: Contains "Phase -1 Anti-Abstraction Gate" check section

Example Violations

❌ class BaseController {}              // Premature abstraction
❌ GenericRepository<T>                 // Generic layer
❌ Custom framework wrapper             // Over-abstraction

For Details: See .claude/rules/project-constitution.md#article-viii-anti-abstraction-反抽象化


Article IX: Integration-First Testing (集成优先测试)

Summary

Test contracts/integrations before internal logic.

Key Rules (Phase -1 Gates)

  • IX.1: Contract tests first (API contracts, GraphQL schemas)
  • IX.2: Integration tests before unit tests (test boundaries first)
  • IX.3: Test external dependencies (database, APIs, queues)
  • IX.4: E2E critical paths (happy path + error path)

Enforcement

  • Phase -1 Gates: planner agent enforces BEFORE generating EPIC
  • TASKS.md Phase 2: Lists contract/integration tests FIRST
  • TEST VERIFICATION CHECKPOINT: Ensures Phase 2 tests run before Phase 3

Test Order

1. Contract tests (API contracts, GraphQL)
2. Integration tests (DB, external APIs)
3. E2E tests (critical user paths)
4. Unit tests (internal logic)

For Details: See .claude/rules/project-constitution.md#article-ix-integration-first-testing-集成优先测试


Article X: Requirement Boundary (需求边界)

Summary

Prevent scope creep; enforce strict requirement boundaries.

Key Rules

  • X.1: One REQ-ID, one bounded context (no "also add X")
  • X.2: No feature expansion during implementation
  • X.3: Separate REQ-IDs for separate concerns
  • X.4: Explicit scope documentation in PRD.md

Enforcement

  • PRD generation: prd-writer agent enforces Anti-Expansion mandate
  • Scope validation: validate-scope-boundary.sh
  • Code review: code-reviewer agent checks for scope violations

Example Violations

❌ PRD.md: "User Registration (also add social login)"    # Scope creep
❌ Adding unplanned features during /flow-dev             # Feature expansion

For Details: See .claude/rules/project-constitution.md#article-x-requirement-boundary-需求边界


Phase -1 Gates

Executed by: planner agent BEFORE generating EPIC and TASKS

Gate 1: Simplicity Check (Article VII)

  • [ ] Project count ≤3
  • [ ] Minimal dependencies
  • [ ] Vertical slice approach
  • [ ] Direct framework usage

Gate 2: Anti-Abstraction Check (Article VIII)

  • [ ] No premature abstractions
  • [ ] No generic layers
  • [ ] Inline before extract
  • [ ] Direct framework calls

Gate 3: Integration-First Check (Article IX)

  • [ ] Contract tests listed first
  • [ ] Integration tests before unit tests
  • [ ] External dependency tests included
  • [ ] E2E critical paths covered

Documented in: EPIC.md contains "Phase -1 Gates" check section

For Details: See planner agent Phase -1 Gates Enforcement Sequence


Enforcement Summary

Article Real-time Guardrail Phase Gate Batch Validation Pre-push
I constitution-guardian prd/tech/epic Exit validate-constitution.sh
II Phase -1 (planner) validate-constitution.sh
III constitution-guardian validate-constitution.sh
IV validate-constitution.sh (QA)
V Linting + code review
VI devflow-tdd-enforcer TEST VERIFICATION validate-constitution.sh
VII Phase -1 (planner) validate-constitution.sh
VIII Phase -1 (planner) validate-constitution.sh
IX Phase -1 (planner) validate-constitution.sh
X PRD generation validate-scope-boundary.sh

Quick Lookup by Scenario

Scenario: "Can I add TODO for later?"

Answer: ❌ NO (Article I.1 - No Partial Implementation) Guardrail: constitution-guardian blocks save Alternative: Complete implementation now, or remove from scope

Scenario: "Should I create BaseController?"

Answer: ❌ NO (Article II.3, VIII.2 - Anti-Abstraction) Phase Gate: Phase -1 Gates block EPIC generation Alternative: Use framework directly (Express, FastAPI)

Scenario: "Can I hardcode API_KEY for testing?"

Answer: ❌ NO (Article III.1 - No Hardcoded Secrets) Guardrail: constitution-guardian blocks save Alternative: Use .env file with dotenv library

Scenario: "Should I write implementation first?"

Answer: ❌ NO (Article VI.1 - TDD Mandate) Guardrail: devflow-tdd-enforcer blocks TASKS.md edit Sequence: Write failing test FIRST, then implementation

Scenario: "Can I add social login to user registration?"

Answer: ❌ NO (Article X.1 - Requirement Boundary) Enforcement: prd-writer agent Anti-Expansion mandate Alternative: Create separate REQ-ID for social login


Design Principle

This skill does NOT contain:

  • ❌ Complete Constitution text (that's in project-constitution.md)
  • ❌ Detailed Article explanations (that's in full Constitution)
  • ❌ Implementation guidelines (those are in agent files)

This skill ONLY contains:

  • ✅ Article summaries (quick reference)
  • ✅ Key rules and examples
  • ✅ Enforcement mechanisms
  • ✅ Links to full Constitution document
  • ✅ Quick lookup by scenario

Rationale: Avoid duplication ("不重不漏" principle). Constitution document owns full text, this skill owns quick reference and routing.