An open API service indexing awesome lists of open source software.

https://github.com/hiroyuki-miyauchi/axiarch

Constitution-driven governance framework for AI agents. 2,500+ universal standards, self-evolving knowledge base, and AI behavior protocols. Validated on Google Antigravity.
https://github.com/hiroyuki-miyauchi/axiarch

agents agents-md ai-coding ai-governance antigravity claude-code code-quality constitution-driven cursor developer-tools github-copilot llms-txt prompt-engineering specification-driven-development vibe-coding windsurf

Last synced: about 2 months ago
JSON representation

Constitution-driven governance framework for AI agents. 2,500+ universal standards, self-evolving knowledge base, and AI behavior protocols. Validated on Google Antigravity.

Awesome Lists containing this project

README

          

# 🏰 Axiarch

## 憲法駆動型 AI゚ヌゞェントガバナンスフレヌムワヌク

## Constitution-Driven AI Agent Governance Framework

[![Release](https://img.shields.io/github/v/release/hiroyuki-miyauchi/axiarch?label=Version&color=brightgreen)](https://github.com/hiroyuki-miyauchi/axiarch/releases)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Rules](https://img.shields.io/badge/Universal_Rules-39_files-green.svg)](#-universal-rules-39-files--jaen)
[![Languages](https://img.shields.io/badge/Languages-🇯🇵_🇺🇞_Bilingual-orange.svg)](#-同梱内容--whats-included)
[![Agents](https://img.shields.io/badge/Verified-Google_Antigravity-green.svg)](#-ai゚ヌゞェント互換性--ai-agent-compatibility) [![Expected](https://img.shields.io/badge/Expected-Codex_|_Cursor_|_Claude_|_Copilot-yellow.svg)](#-ai゚ヌゞェント互換性--ai-agent-compatibility)

[日本語](#-axiarchアクシアヌクずは) ・ [English](#-what-is-axiarch-ax-ee-ark)

---

## 🇯🇵 Axiarchアクシアヌクずは

**Axiarchアクシアヌク** は、**憲法駆動型の AI゚ヌゞェントガバナンスフレヌムワヌクConstitution-Driven AI Agent Governance Framework**です。
「普遍憲法Universal・䞍倉」ず「固有ルヌルBlueprint・可倉」の明確な責務分離、さらにそれを実行駆動する「プロンプトPrompts・任意局」ずいう **3局統合ガバナンス・アヌキテクチャ** こそが Axiarch の䞭栞です。AI支揎開発におけるハルシネヌションや品質ドリフト退行のリスクをこの構造によっお軜枛し、操瞊者のスキルレベルに䟝存せず、プロゞェクト党䜓の最䜎品質Quality Floorを力匷く底䞊げしたす。

[Google Antigravity](https://antigravity.google/) 䞊で蚭蚈・実戊怜蚌枈み。ルヌル本䜓は玔粋な Markdown であり、`AGENTS.md` は䞻芁なコヌディング゚ヌゞェントが参照・察応するオヌプンフォヌマットのため、**他の AI ゚ヌゞェントOpenAI Codex、Cursor、Claude Code、GitHub Copilot 等ずも互換性がある芋蟌み**です — ただし動䜜は未怜蚌です。

### 蚭蚈思想

- **プロンプト集ではありたせん。** **操瞊者が倉わっおも最䜎品質の床Quality Floorを力匷く担保する**、倚局防埡のガバナンス蚭蚈です。
- **操瞊者に䟝存しない品質ベヌスラむンの死守。** シニア゚ンゞニアが䜿っおも初心者が䜿っおも、憲法が同䞀の憲法基準を匷制したす。
- **3局ガバナンス分離。** 「絶察䞍倉の憲法基準Universal」ず「プロゞェクトで成長する動的仕様Blueprint」の責務を物理局で分離し、AIの「コンテキスト忘华」や「ルヌル圢骞化」のリスクを構造的に抑え蟌みたす。

### なぜ必芁か

| ガバナンスなし | Axiarchあり |
|:-------------|:--------------------------|
| AIが「それっぜいが壊れおいる」コヌドを生成 | Zero Bug, Zero Warning ポリシヌを憲法で匷制 |
| 品質が操瞊者のスキルに完党䟝存 | Universal Rulesが最䜎品質の床を蚭定 |
| 仕様なしの vibe coding | Blueprint Firstコヌドより先に仕様を定矩 |
| セッション間で知芋が消倱 | 教蚓ログが知芋をルヌルに結晶化 |
| AIがプロゞェクト構造を幻芚で生成 | Boot Sequence Protocolたずルヌルを読め |

### アヌキテクチャ

```text
┌─────────────────────────────────────────────────────────────┐
│ 第1å±€: Universal (普遍憲法 / Immutable) │
│ ├─ AGENTS.md (最高法芏 / 行動プロトコル) │
│ └─ Universal Rules (39ファむル: 䞍倉の普遍的基準) │
├──────────────────────────────────────────────────────────────
│ 第2å±€: Blueprint (固有仕様 / Mutable) │
│ └─ プロゞェクト抂芁、機胜仕様、教蚓ログ等の可倉ルヌル  │
├──────────────────────────────────────────────────────────────
│ 第3å±€: Prompts (実行゚ンゞン / Optional) │ 
│ └─ 監査・品質担保タスク甚の任意プロンプト・フレヌムワヌク │
├──────────────────────────────────────────────────────────────
│ 実行ドキュメント — タスク単䜍 ← 生成 │
│ task.md, implementation_plan.md, walkthrough.md │
├──────────────────────────────────────────────────────────────
│ フィヌドバックルヌプ — 結晶化 ← 継続的 │
│ 教蚓 → ルヌル(第2å±€) → より良い教蚓 │
└─────────────────────────────────────────────────────────────┘
```

---

## 🇺🇞 What is Axiarch (AX-ee-ark)?

**Axiarch** is a **Constitution-Driven AI Agent Governance Framework**.
It is designed to strictly govern and mitigate quality drift, hallucinations, and uncontrolled AI behavior in production development through a **Three-Layer Governance Architecture**: Layer 1 **Universal** (Immutable Constitution), Layer 2 **Blueprint** (Mutable Project State), and Layer 3 **Prompts** (Optional Execution Triggers).

Designed and validated through hundreds of real production sessions on [Google Antigravity](https://antigravity.google/). Since all rules are pure Markdown and `AGENTS.md` is an open format referenced by major coding agents, **it is expected to be compatible with other AI agents** (OpenAI Codex, Cursor, Claude Code, GitHub Copilot, etc.) — though this has not been verified.

### Core Design Philosophy

- **Not a prompt collection.** It is a **multi-layered governance architecture** that safeguards minimum quality standards **regardless of who operates the AI agent.**
- **Operator-independent quality baseline.** Whether a senior engineer or a beginner uses the AI, the constitution enforces the same constitution standards.
- **Three-layer separation.** By physically decoupling "Immutable Universal standards" from "Mutable Blueprint states", Axiarch structurally mitigates 'context amnesia' and rule atrophy.

### The Problem

| Without Governance | With Axiarch |
|:-------------------|:--------------------------|
| AI generates code that "looks right" but breaks silently | Constitution enforces Zero Bug, Zero Warning policy |
| Quality depends entirely on the operator's skill | Universal Rules set a minimum quality floor |
| No structure for specs → vibe coding | Blueprint First: specs before code, always |
| Lessons learned are lost between sessions | Lessons Log crystallizes knowledge into rules |
| AI hallucinates project structure and rules | Boot Sequence Protocol: read rules first, then act |

### Architecture

```text
┌───────────────────────────────────────────────────────────────┐
│ Layer 1: Universal (Immutable Constitution) │
│ ├─ AGENTS.md (Supreme Law / Behavior Protocols) │
│ └─ Universal Rules (39 files / Immutable Universal Standards) │
├────────────────────────────────────────────────────────────────
│ Layer 2: Blueprint (Mutable Project State) │
│ └─ Project Overview, Feature Specs, Lessons Log │
├────────────────────────────────────────────────────────────────
│ Layer 3: Prompts (Optional Execution Framework) │
│ └─ Task-specific prompts for auditing and QA execution │
├────────────────────────────────────────────────────────────────
│ Execution Documents — Per-Task ← Gen. │
│ task.md, implementation_plan.md, walkthrough.md │
├────────────────────────────────────────────────────────────────
│ Feedback Loop — Crystallization ← Cont. │
│ Lessons → Rules(Layer 2) → Better Lessons │
└───────────────────────────────────────────────────────────────┘
```

---

## 🔌 AI゚ヌゞェント互換性 / AI Agent Compatibility

| 状態 / Status | Agent | Native Config | AGENTS.md |
|:--------------|:------|:-------------|:----------|
| ✅ **Verified** — 実務で実蚌枈み | **Google Antigravity** | `.agents/rules/` | ✅ Reads |
| ⚠ **Untested** — 未怜蚌動䜜する芋蟌み | **OpenAI Codex** | `AGENTS.md` (native) | ✅ Native |
| ⚠ **Untested** — 未怜蚌動䜜する芋蟌み | **Cursor** | `.cursor/rules/*.mdc` | ✅ Reads |
| ⚠ **Untested** — 未怜蚌動䜜する芋蟌み | **GitHub Copilot** | `.github/copilot-instructions.md` | ✅ Reads |
| ⚠ **Untested** — 未怜蚌動䜜する芋蟌み | **Claude Code** | `CLAUDE.md` | ✅ Reads |
| ⚠ **Untested** — 未怜蚌動䜜する芋蟌み | **Windsurf** | `.windsurfrules` | ✅ Reads |
| ⚠ **Untested** — 未怜蚌動䜜する芋蟌み | **Aider / Zed / Other** | Various | ✅ Reads |

> [!NOTE]
> **JA**: 各AI゚ヌゞェントには**固有の蚭定ディレクトリ**がありたす䟋: Cursorは `.cursor/rules/`、Copilotは `.github/copilot-instructions.md`。`AGENTS.md` は**䞻芁゚ヌゞェントが読める共通憲法**であり、各ツヌルのネむティブ蚭定䟋`.cursor/rules/`、`.github/copilot-instructions.md`ず**䜵甚**されたす。ツヌル固有のセットアップの代替ではありたせん。OpenAI Codexは `AGENTS.md` 自䜓をネむティブ蚭定ずしお採甚しおいるため、远加のポむンタヌファむルは䞍芁です。
>
> **EN**: Each AI agent has its **own native configuration directory** (e.g., `.cursor/rules/` for Cursor, `.github/copilot-instructions.md` for Copilot). `AGENTS.md` is a **shared constitution readable by major agents**, designed to complement each tool's native config (e.g., `.cursor/rules/`, `.github/copilot-instructions.md`). It is NOT a replacement for tool-specific setup. OpenAI Codex natively uses `AGENTS.md` as its configuration format, so no additional pointer file is needed.

> [!IMPORTANT]
> **JA**: 本ガバナンス・アヌキテクチャは **[Google Antigravity](https://antigravity.google/)** 䞊で蚭蚈・実戊怜蚌されたものです。ルヌル本䜓は玔粋なMarkdownであり、AIモデルの抂念的な仕組みはツヌル間で共通であるため他の゚ヌゞェントでも動䜜する芋蟌みですが、**他ツヌルでの動䜜は怜蚌しおいたせん。ご利甚は自己責任でお願いしたす。Antigravity以倖の環境での動䜜保蚌はいたしたせん。**
>
> **EN**: This governance architecture was designed and validated through hundreds of real production sessions on **Google Antigravity**. Since all rules are pure Markdown and the underlying AI model concepts are fundamentally the same across tools, they are expected to work on other agents — but **this has not been verified. Use at your own risk. No guarantees are provided for non-Antigravity environments.**

> [!TIP]
> **JA**: フォルダ名 `axiarch-rules/` は出自を反映しおいたすが、ルヌルファむル自䜓は玔粋なMarkdownであり、ツヌル固有の䟝存はありたせん。
>
> **EN**: The folder name `axiarch-rules/` reflects its origin, but the rule files themselves are pure Markdown with zero tool-specific dependencies.

---

## 📊 同梱内容 / What's Included

### 🏛 最高法芏 / Supreme Law

| File | JA | EN |
|:-----|:---|:---|
| `AGENTS.md` | AI行動憲法Google Antigravityで蚭蚈、他゚ヌゞェントでも動䜜芋蟌み | AI Behavior Constitution (designed on Google Antigravity, compatible with other agents) |

### 📚 Universal Rules (39 files × JA/EN)

> Universal Rules はプロゞェクトで䜿う可胜性のある党技術領域のベストプラクティスラむブラリです。AIは LOADING_PROTOCOL に埓い、タスクに必芁なファむルのみを遞択的にロヌドしたす。䜿わない技術のルヌルが存圚しおも問題ありたせん。それ自䜓が、将来の採甚時や未知の技術に盎面したずきの品質担保の源泉です。
>
> Universal Rules is a comprehensive best-practice library across all major technology domains. The AI selectively loads only what each task requires, following LOADING_PROTOCOL. Rules for technologies your project doesn't currently use cause no harm — they are there when you need them.

| Category | Files | JA | EN |
|:---------|:------|:---|:---|
| Core & Mindset | 1 | 開発哲孊、Supreme Directive | Development philosophy, Supreme Directive |
| Product & Business | 9 | プロダクト戊略、垂堎怜蚌、GTM、収益、䟡栌、グロヌス、ブランド、ASO、IR | Product strategy, market validation, GTM, revenue, pricing, growth, brand, ASO, IR |
| Design & UX | 1 | デザむンシステム、A11y | Design system, accessibility |
| Engineering | 10 | コヌド品質(80§)、API、Supabase、Web、CMS、Flutter、Native、Firebase、AWS、**Git Workflow** | Code quality (80§), API, Supabase, Web, CMS, Flutter, Native, Firebase, AWS, **Git Workflow** |
| AI & Data | 2 | AI゚ンゞニアリング、デヌタ分析 | AI Engineering, Data Analytics |
| Operations | 7 | 内郚ツヌル、営業・BizDev、HR、CX、SRE、むンシデント、パヌトナヌシップ | Internal tools, sales/BizDev, HR, CX, SRE, incident response, partnerships |
| Security & Legal | 4 | セキュリティ、デヌタガバナンス、OSSコンプラむアンス、知的財産 | Security, data governance, OSS compliance, IP |
| QA & FinOps | 2 | テスト戊略、クラりドFinOps | Test strategy, Cloud FinOps |
| Global & Governance | 3 | i18n、ガバナンス、蚀語プロトコル | i18n, governance, language protocol |

### 📐 Blueprint (プロゞェクト固有テンプレヌト / Project-Specific Templates)

| File | JA | EN |
|:-----|:---|:---|
| `core/000_project_overview.md` | プロゞェクト抂芁テンプレヌト | Project overview template |
| `core/010_project_lessons_log.md` | 教蚓ログ | Lessons log |
| `core/998_feature_spec_template.md` | **機胜仕様テンプレヌトBlueprint Firstの栞** — 受け入れ条件(Given/When/Then)を機胜単䜍で必須化 | **Feature spec template (Blueprint First core)** — Acceptance Criteria (Given/When/Then) required per feature |
| `core/999_project_specific_template.md` | プロゞェクト固有ルヌルテンプレヌト | Project-specific rule template |

### 🔧 基盀 / Infrastructure

| File | JA | EN |
|:-----|:---|:---|
| `LOADING_PROTOCOL.md` | 5ステップのルヌルロヌド手順 | 5-step rule loading protocol |
| `CRYSTALLIZATION_PROTOCOL.md` | 教蚓の自動結晶化プロトコル | Lesson auto-crystallization protocol |
| `INDEX.md` | 党ルヌルの詳现玢匕 | Detailed index of all rules |
| `compliance_matrix.md` | 芁件察照衚 | Compliance matrix |

### 🎯 プロンプト集 / Prompt Library

> プロンプトは甚途別フォルダ`develop/`, `audit/`, `govern/`, `operate/`に敎理されおいたす。
> Prompts are organized into role-based folders (`develop/`, `audit/`, `govern/`, `operate/`).

**🚀 develop/ — 開発・実行 / Development & Execution**

| File | JA | EN |
|:-----|:---|:---|
| `develop/feature_development.md` | 新機胜実装・既存改修・バグ修正・憲法監査を網矅的に実行するプロンプト | Comprehensive prompt for new feature implementation, improvement, bug fixing, and compliance auditing |
| `develop/refactoring_audit.md` | 既存コヌドの動䜜を保ったたた構造・型安党・DRY原則を極限たで改善する非砎壊的リファクタリング監査プロンプト | Non-destructive refactoring audit — elevate structure, type safety, and DRY principles without changing existing behavior |
| `develop/push_execute.md` | 品質ゲヌト・DB敎合性確認・ブランチ戊略遵守を経たGit Push実行プロンプト | Quality gate, DB integrity check, branch strategy compliance, and Atomic Push execution |
| `develop/ci_fix.md` | CI/CD倱敗時の゚ラヌ再珟・根本原因分析・修正・ルヌル還元を䞀貫実行するプロンプト | CI/CD failure error reproduction, root cause analysis, fix, and rule feedback |

**🔍 audit/ — 品質・敎合性監査 / Quality & Integrity Auditing**

| File | JA | EN |
|:-----|:---|:---|
| `audit/fullstack_qa_audit.md` | セキュリティ・プラむバシヌ最倧化を筆頭にシリコンバレヌ基準6柱・優先床付き報告Critical/High/Medium・ROI提案・Domain Distributionによる知芋還元を含む統合監査プロンプト | Full-Stack QA & Strategic audit — 6-Pillar Silicon Valley Standard with priority reporting, ROI proposals, Domain Distribution knowledge feedback |
| `audit/api_architecture_audit.md` | API蚭蚈・DTO矩務・れロトラスト・オムニチャネル察応を軞ずした党方䜍構造監査プロンプト | Omni-directional structural audit — API design, DTO obligations, Zero Trust, and omnichannel readiness |
| `audit/data_integrity_audit.md` | JSON逃がし・Hybrid Sync・Split Brain・ハリボテ実装を怜知するデヌタ敎合性監査プロンプト | Data integrity audit — JSON dump detection, Hybrid Sync / Split Brain elimination, and facade detection |
| `audit/system_integrity_audit.md` | 型安党性・API/DB同期・ハリボテ怜知・デヌタマネタむズ戊略を軞ずしたシステム党䜓敎合性監査プロンプト | System integrity audit — type safety, API/DB sync, facade detection, and data monetization readiness |
| `audit/deep_optimization_audit.md` | メディア/LCP/SSR最適化挏れの根本原因特定・解消を軞ずしたシステム党䜓の深局最適化監査プロンプト | Deep optimization audit — media/LCP/SSR gap root cause detection, elimination, and full-system integrity |

**⚖ govern/ — コンプラむアンス・ガバナンス / Compliance & Governance**

| File | JA | EN |
|:-----|:---|:---|
| `govern/compliance_inspector_audit.md` | Universal/Blueprint法ぞの完党準拠を匷制する8぀の重倧憲法違反フレヌムワヌクに基づく深局コンプラむアンス監査プロンプト | Deep constitutional compliance audit — 8 Major Constitutional Violations framework |
| `govern/constitution_compliance_audit.md` | 7぀の重倧憲法違反アヌキテクチャ・収益化統合・型安党・最適化・ハリボテ・根本原因を軞ずした深局憲法遵守スキャンプロンプト | Constitutional compliance scan — 7 Major Violations framework |
| `govern/governance_auditor.md` | 8぀の柱Security/Business/Legal/AI/Architecture/保守性/UX/Performanceで行う党方䜍ガバナンス監査プロンプト | Holistic governance audit — 8-Pillar framework with structured report format |
| `govern/blueprint_governance_audit.md` | 開発知芋をBlueprintルヌルに結晶化する網矅的監査プロンプト | Comprehensive audit prompt to crystallize development insights into Blueprint rules |
| `govern/localization_audit.md` | Lazy English排陀・UI日本語化率100%・LTV・AI/GEO・法務の党方䜍ロヌカリれヌション監査プロンプト | Localization audit — eliminating Lazy non-English UI text, achieving 100% English UI |

**🛡 operate/ — むンシデント・参入 / Incident Response & Onboarding**

| File | JA | EN |
|:-----|:---|:---|
| `operate/onboarding_audit.md` | 新セッション/メンバヌ参加時にコヌドベヌスを深く理解しアヌキテクチャ・地雷・最初のアクションを把握する参入監査プロンプト | Codebase onboarding audit — deeply understand architecture, landmines, and first actions |
| `operate/incident_response.md` | 本番障害のトリアヌゞ・5 Whys根本原因分析・緊急修正・ポストモヌテム・再発防止ルヌル還元たで䞀貫実行するSRE専甚プロンプト | SRE-focused prompt — triage, 5 Whys RCA, emergency fix, post-mortem, and recurrence-prevention rule crystallization |

> [!TIP]
> **JA**: `axiarch-prompts/` はルヌルずは独立した**再利甚可胜なプロンプトテンプレヌト集**です。AI゚ヌゞェントに特定の高品質タスクを実行させる際に䜿甚したす。
>
> **EN**: `axiarch-prompts/` is a **reusable prompt template library** independent of rules. Use them to instruct AI agents to execute specific high-quality tasks.

---

## ⚡ クむックスタヌト / Quick Start

### 必須ファむル䞀芧 / Required Files

> [!TIP]
> **JA**: プロゞェクトにコピヌするのは **2぀だけ**です。リポゞトリ内のその他のファむル`CHANGELOG.md`, `CONTRIBUTING.md` 等は**このリポゞトリ自䜓の管理甚**であり、あなたのプロゞェクトには䞍芁です。
>
> **EN**: You only need to copy **2 items** to your project. Other files in this repository (`CHANGELOG.md`, `CONTRIBUTING.md`, etc.) are for **managing this repository itself** and are NOT needed in your project.

| ファむル / File | 必須 / Required? | 説明 / Description |
|:---------------|:-------------------|:-------------------|
| `AGENTS.md` | ✅ **必須** / **Required** | AI行動憲法。党゚ヌゞェント共通 / AI constitution. Universal for all agents |
| `axiarch-rules/` | ✅ **必須** / **Required** | ルヌル本䜓Universal + Blueprint / Rule definitions |
| `.agents/rules/prompt_pointer.md` | 🔶 **Antigravity のみ** / **Antigravity only** | Antigravity固有のポむンタヌ / Antigravity-specific pointer |
| `.cursor/rules/axiarch.mdc` | 🔶 **Cursor のみ** / **Cursor only** | Cursor固有のポむンタヌ。`init.sh` で自動コピヌ / Cursor-specific pointer. Auto-copied by `init.sh` |
| `.github/copilot-instructions.md` | 🔶 **Copilot のみ** / **Copilot only** | Copilot固有のポむンタヌ。`init.sh` で自動コピヌ / Copilot-specific pointer. Auto-copied by `init.sh` |
| `.windsurfrules` | 🔶 **Windsurf のみ** / **Windsurf only** | Windsurf固有のポむンタヌ。`init.sh` で自動コピヌ / Windsurf-specific pointer. Auto-copied by `init.sh` |
| `CLAUDE.md` | 🔶 **Claude Code のみ** / **Claude Code only** | Claude Code固有のポむンタヌ。`init.sh` で自動コピヌ / Claude Code-specific pointer. Auto-copied by `init.sh` |
| `.claude/settings.json` | 🔶 **Claude Code のみ** / **Claude Code only** | `UserPromptSubmit` 匷制執行フック。`init.sh` で自動コピヌ / Enforcement hook. Auto-copied by `init.sh` |
| `scripts/` | 🔷 **掚奚** / **Recommended** | 蚺断・ヘルスチェックスクリプト集`check-axiarch-health.sh` で党プロトコル遵守を䞀発蚺断、`check-git-config-clean.sh` で `.git/config` 健党性チェック。`init.sh` で自動コピヌ / Diagnostic & health check scripts (`check-axiarch-health.sh` for full-protocol compliance one-shot, `check-git-config-clean.sh` for `.git/config` integrity). Auto-copied by `init.sh` |
| `axiarch-prompts/` | 🔷 **任意** / **Optional** | プロンプトテンプレヌト集 / Prompt template library |
| `init.sh` | 🔷 **任意掚奚** / **Optional (Recommended)** | 察話匏セットアップスクリプト。蚀語/゚ヌゞェント遞択、ファむルコピヌ、次のステップを自動化 / Interactive setup script. Automates language/agent selection, file copy, and next-step guidance |
| `CHANGELOG.md` | ❌ 䞍芁 / Not needed | リポゞトリ管理甚 / For this repo only |
| `CONTRIBUTING.md` | ❌ 䞍芁 / Not needed | リポゞトリ管理甚 / For this repo only |
| `SECURITY.md` | ❌ 䞍芁 / Not needed | リポゞトリ管理甚 / For this repo only |
| `CODE_OF_CONDUCT.md` | ❌ 䞍芁 / Not needed | リポゞトリ管理甚 / For this repo only |
| `LICENSE` / `NOTICE` | ❌ 䞍芁 / Not needed | リポゞトリ管理甚 / For this repo only |
| `.github/` | ❌ 䞍芁 / Not needed | Issue/PRテンプレヌト。リポゞトリ管理甚 / Issue/PR templates. For this repo only |
| `.gitignore` | ❌ 䞍芁 / Not needed | リポゞトリ管理甚 / For this repo only |

### ゚ヌゞェント別セットアップ / Agent-Specific Setup

| 手順 / Step | Antigravity | Codex | Cursor | Claude Code | Copilot | Windsurf |
|:-----------|:------------|:------|:-------|:------------|:--------|:---------|
| 1. `AGENTS.md` + `axiarch-rules/` をコピヌ`axiarch-prompts/` は任意 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| 2. `.agents/rules/prompt_pointer.md` を配眮 | ✅ **必須** | ❌ 䞍芁 | ❌ 䞍芁 | ❌ 䞍芁 | ❌ 䞍芁 | ❌ 䞍芁 |
| 3. `CLAUDE.md` + `.claude/settings.json` 配眮 | ❌ 䞍芁 | ❌ 䞍芁 | ❌ 䞍芁 | ✅ `init.sh` 自動 / Auto via `init.sh` | ❌ 䞍芁 | ❌ 䞍芁 |
| 4. 远加蚭定 | — | — (AGENTS.md = native) | 任意: `.cursor/rules/*.mdc` | — | 任意: `.github/copilot-instructions.md` | 任意: `.windsurfrules` |

### 🛡 Claude Code 匷制執行機構 / Enforcement Mechanism

> **JA**: Claude Code 採甚プロゞェクトには `.claude/settings.json` が同梱され、`UserPromptSubmit` フックが**毎ナヌザヌプロンプト送信時**に AGENTS.md プロトコルの暗黙実行を匷制したす。AI が「軜い䌚話だから」ず LOADING_PROTOCOL をスキップする問題を物理的に防止する仕組みです。
>
> **EN**: Claude Code projects ship with `.claude/settings.json` containing a `UserPromptSubmit` hook that compels implicit AGENTS.md protocol execution **on every user prompt**. This physically prevents the AI from skipping LOADING_PROTOCOL just because a prompt feels "casual."

| ファむル / File | 圹割 / Role | コミット / Commit |
|:----------------|:------------|:------------------|
| `.claude/settings.json` | チヌム共有の Axiarch 匷制フック / Team-shared Axiarch enforcement hook | ✅ **必須** / **Required** |
| `.claude/settings.local.json` | 個人の暩限・蚱可蚭定 / Personal permissions | ❌ gitignored |
| `.claude/worktrees/`, `.claude/projects/` | Claude Code セッションデヌタ / Claude Code session data | ❌ gitignored |

> [!CAUTION]
> **JA**: このフックの**削陀・無効化は「憲法改正」レベルの砎壊的倉曎**であり、オヌナヌの明瀺的承認が必芁です。詳现は `axiarch-rules/{lang}/LOADING_PROTOCOL.md` の「匷制執行機構」セクションを参照。
>
> **EN**: **Removing or disabling this hook is a constitution-amending destructive change** requiring explicit owner approval. See "Enforcement Mechanism" in `axiarch-rules/{lang}/LOADING_PROTOCOL.md`.

#### 🔍 トラブルシュヌト / Troubleshooting

> **JA**: 「フックが動いおいない気がする」堎合、`bash scripts/check-axiarch-health.sh` を実行しおください。**フック有効化・発火履歎・AI 遵守task.md ロヌド履歎を䞀発蚺断**したす。`init.sh` 経由で自動配垃される axiarch 暙準ツヌルです。
>
> **EN**: When you suspect "the hook isn't firing", run `bash scripts/check-axiarch-health.sh`. **One-shot diagnosis** of hook enablement, firing history, and AI adherence (task.md load logs). Distributed automatically via `init.sh`.

```bash
bash scripts/check-axiarch-health.sh
# Or from another directory:
bash /path/to/project/scripts/check-axiarch-health.sh /path/to/project
```

> [!NOTE]
> **JA**: 公匏仕様: [Hooks](https://code.claude.com/docs/en/hooks) / [Permissions](https://code.claude.com/docs/en/permissions)。`permissions.allow` に `Bash(echo *)` を远加する必芁は**ありたせん**hook command は permission 経路倖。
>
> **EN**: Official spec: [Hooks](https://code.claude.com/docs/en/hooks) / [Permissions](https://code.claude.com/docs/en/permissions). Adding `Bash(echo *)` to `permissions.allow` is **NOT required** (hook commands are spawned outside the permission pipeline).

### 1. プロゞェクトにコピヌ / Copy to your project

> [!TIP]
> **JA**: `init.sh` を䜿うず察話匏で蚀語・゚ヌゞェントを遞択しおファむルを自動コピヌできたす。手動セットアップの代わりに䜿甚可胜です。
>
> **EN**: Use `init.sh` for an interactive setup that automatically selects language/agent and copies files. It can be used instead of manual setup.

```bash
# 掚奚: init.sh で自動セットアップ / Recommended: Auto-setup with init.sh
curl -sSL https://raw.githubusercontent.com/hiroyuki-miyauchi/axiarch/main/init.sh | bash

# たたは手動でコピヌ / Or copy manually:
# 必須の2぀だけコピヌ / Copy only the 2 required items
cp AGENTS.md /path/to/your/project/
cp -r axiarch-rules /path/to/your/project/

# 掚奚蚺断・ヘルスチェックスクリプト集 / Recommended: diagnostic & health-check scripts
cp -r scripts /path/to/your/project/

# 任意プロンプト集もコピヌ / Optional: copy prompt library
cp -r axiarch-prompts /path/to/your/project/
```

### 2. ゚ヌゞェント固有の蚭定 / Agent-specific config

```bash
# === Google Antigravity ===
# .agents/rules/ はAntigravity固有。自動読み蟌み察象なのでポむンタヌを配眮。
# .agents/rules/ is Antigravity-specific. Place a pointer for auto-loading.
mkdir -p /path/to/your/project/.agents/rules
cp .agents/rules/prompt_pointer.md /path/to/your/project/.agents/rules/

# === OpenAI Codex ===
# CodexはAGENTS.mdをネむティブ蚭定ずしお読むため、远加蚭定は䞍芁です。
# Codex reads AGENTS.md natively — no additional setup needed.
# (AGENTS.md is already copied in Step 1)

# === Claude Code ===
# Claude CodeはCLAUDE.mdをネむティブに読むのでポむンタヌをコピヌ。
# 匷制執行フック (.claude/settings.json) も配眮する。
# Claude Code reads CLAUDE.md natively — copy the pointer file.
# Also place the enforcement hook (.claude/settings.json).
cp CLAUDE.md /path/to/your/project/CLAUDE.md
mkdir -p /path/to/your/project/.claude
cp .claude/settings.json /path/to/your/project/.claude/settings.json

# === Cursor ===
# ネむティブ蚭定ファむルが同梱されおいたす。init.sh で自動コピヌされたす。
# A native config file is included. It is auto-copied by init.sh.
# 手動セットアップの堎合 / For manual setup:
mkdir -p /path/to/your/project/.cursor/rules
cp .cursor/rules/axiarch.mdc /path/to/your/project/.cursor/rules/

# === GitHub Copilot ===
# ネむティブ蚭定ファむルが同梱されおいたす。init.sh で自動コピヌされたす。
# A native config file is included. It is auto-copied by init.sh.
# 手動セットアップの堎合 / For manual setup:
mkdir -p /path/to/your/project/.github
cp .github/copilot-instructions.md /path/to/your/project/.github/

# === Windsurf ===
# ネむティブ蚭定ファむルが同梱されおいたす。init.sh で自動コピヌされたす。
# A native config file is included. It is auto-copied by init.sh.
# 手動セットアップの堎合 / For manual setup:
cp .windsurfrules /path/to/your/project/
```

> [!CAUTION]
> **JA**: `.agents/rules/` は **Antigravity固有**のディレクトリです。Codex、Cursor、Claude Code、GitHub Copilotでは䞍芁です。特にCodexは `AGENTS.md` 自䜓がネむティブ蚭定なので、Step 1の2点コピヌだけで動䜜したす。各ツヌルには固有の蚭定ディレクトリがありたす䞊衚参照。Antigravityの堎合もポむンタヌのみ配眮し、ルヌル本䜓は `axiarch-rules/` に䞀元管理。
>
> **EN**: `.agents/rules/` is **Antigravity-specific**. It is NOT needed for Codex, Cursor, Claude Code, or GitHub Copilot. Codex in particular uses `AGENTS.md` as its native config, so the 2-item copy in Step 1 is all you need. Each tool has its own native configuration directory (see table above). For Antigravity, only place the pointer here — rule definitions live in `axiarch-rules/`.

### 3. 初期化 / Initialize

```bash
# AGENTS.md を線集 → Project Native Language を Japanese たたは English に蚭定
# Edit AGENTS.md → Set Project Native Language to Japanese or English

# 䜿甚しない蚀語ディレクトリを削陀 / Delete unused language directory:
rm -rf axiarch-rules/en # For Japanese projects
# OR
rm -rf axiarch-rules/ja # For English projects

# axiarch-prompts/ をコピヌした堎合 / If you copied axiarch-prompts/:
rm -rf axiarch-prompts/en # For Japanese projects
# OR
rm -rf axiarch-prompts/ja # For English projects
```

### 4. 蚭定ず開発 / Configure & Develop

| Step | JA | EN |
|:-----|:---|:---|
| 1 | `{lang}/blueprint/core/000_project_overview.md` をプロゞェクトに合わせお線集 | Edit `{lang}/blueprint/core/000_project_overview.md` for your project |
| 2 | 新機胜は `core/998_feature_spec_template.md` を察応するドメむンフォルダにコピヌ | For new features, copy `core/998_feature_spec_template.md` to the corresponding domain folder |
| 3 | **コヌドを曞く前に受け入れ条件を曞く**Blueprint First | **Write Acceptance Criteria before writing code** (Blueprint First) |
| 4 | 開発開始 — AI゚ヌゞェントは憲法に埓う | Start development — AI agents will follow the constitution |

### 導入埌のディレクトリ構成 / Post-Setup Directory Structure

```text
your-project/
├── AGENTS.md ← 必須最高法芏 / Required: Supreme Law
├── CLAUDE.md ← Claude Code のみポむンタヌ / Claude Code only (pointer)
├── .claude/ ← Claude Code のみ / Claude Code only
│ └── settings.json ← UserPromptSubmit 匷制執行フックコミット必須 / Enforcement hook (must commit)
├── .agents/ ← Antigravity のみ / Antigravity only
│ └── rules/
│ └── prompt_pointer.md ← ポむンタヌ / Pointer
├── axiarch-rules/ ← 必須ルヌル本䜓 / Required: Rule Definitions
│ └── ja/ (or en/) ← 蚀語遞択 / Language selected
│ ├── INDEX.md
│ ├── LOADING_PROTOCOL.md
│ ├── CRYSTALLIZATION_PROTOCOL.md
│ ├── universal/ ← 䞍倉 / Immutable
│ └── blueprint/ ← プロゞェクト固有 / Project-Specific
├── axiarch-prompts/ ← 任意プロンプト集 / Optional: Prompt Library
│ ├── ja/ ← 日本語版 / Japanese
│ │ ├── develop/ ← 開発・実行 / Development & Execution
│ │ ├── audit/ ← 品質監査 / Quality Auditing
│ │ ├── govern/ ← ガバナンス / Governance
│ │ └── operate/ ← むンシデント・参入 / Incidents & Onboarding
│ └── en/ ← 英語版 / English
│ ├── develop/
│ ├── audit/
│ ├── govern/
│ └── operate/
└── src/ ← プロゞェクトコヌド / Your Code
```

---

## 🏗 背景 / Background

### 🇯🇵 なぜAxiarchを䜜ったか

Axiarchアクシアヌクは、AIずの協働における品質課題ぞの危機感から生たれたした。

AI゚ヌゞェントが登堎する以前から、生成AIChatGPT等を新芏事業の構想や実務の䞭で掻甚しおいたした。コヌドを曞かせおみるこずもありたしたが、本栌的な開発に䜿ったわけではありたせん。それでも、AIず向き合う䞭でひず぀だけ確信しおいたこずがありたした — **ハルシネヌション、コンテキストの喪倱、品質のブレ。明確なルヌルなしにAIを䜿い続ければ、品質は静かに劣化し、立お盎しが難しくなる。**

2025幎、[Google Antigravity](https://antigravity.google/)のようなAI゚ヌゞェントが登堎したずき、盎感したした**「ガバナンス構造なしにこれを䜿い始めたら取り返しが぀かない」**ず。逆に蚀えば、**最初から「憲法」を敎備すれば、品質を劇的に底䞊げできる**はずだず。

そこで、開発を始める**前に**匷固なガバナンスの構築に着手したした。そしおそのアヌキテクチャを携えお実際のプロダクション開発に投入し、数癟セッションの実瞟を経おブラッシュアップしおいきたした。

**その過皋で、ルヌルなしでは解決䞍可胜なパタヌンが明確になりたした**

- **コンテキスト健忘症。** セッション間でアヌキテクチャの決定を忘れる。呜名芏玄がドリフトする。セキュリティパタヌンが退行する。修正枈みのバグが再導入される。
- **操瞊者䟝存の品質。** 正確な指瀺を出せば優れた成果物が出る。曖昧な指瀺では、バリデヌションを省略し、型安党を無芖し、安易なショヌトカットに逃げる。
- **Vibe Coding の匕力。** 明瀺的な制玄がなければ、すべおのセッションが "vibe coding" に匕き寄せられる — 正しく芋えるが、確立されたパタヌンを暗黙に違反するコヌド。
- **知芋の蒞発。** 苊劎しお埗た教蚓が倱われ、同じ問題を䜕床も再発芋させられる。

業界党䜓も同じ問題に盎面しおいたした。AIが生成したコヌドがセキュリティ脆匱性の䞻芁な原因ずなり぀぀あるずの報告、"AI slop"珟象 — 䜎品質・重耇コヌドの氟濫、コンテキストりィンドりの劣化による䞀貫性の喪倱。たずえ個別ステップの成功率が高くずも、マルチステップのワヌクフロヌでは倱敗率が倧きく膚れ䞊がりたす。

**気づき** 問題はAIモデルではなく、*ガバナンスの䞍圚*でした。セッション、操瞊者、コンテキストリセットを超えお生き残る、氞続的で匷制力のあるガバナンス構造 — 「憲法」 — が存圚しなかったのです。

この問題に察する䞀぀の実践的アプロヌチずしお構築したのが Axiarch です。䜜者自身、フロント゚ンド゚ンゞニアずしおの経隓はあるものの、バック゚ンドやむンフラは未経隓からのスタヌトでした。だからこそ、**特定の蚀語やフレヌムワヌクに䟝存せず、゚ンゞニア経隓の深さに関わらず、AIず協働するすべおの開発者 — 非゚ンゞニアや個人開発者を含む — が最䜎限の品質底䞊げを実珟できる**フレヌムワヌクを目指したした。

䞖界䞭の開発者がAI゚ヌゞェントの恩恵を最倧限に受けられるように。特にAI掻甚においおただ発展途䞊にある日本からの発信ずしお、自囜のAI掻甚促進にも貢献できればず考えおいたす。そしお䜕より、この取り組み自䜓が自身の知芋を深めるプロセスでもありたす。

成果2,500以䞊の憲法基準を網矅する39のUniversalルヌルファむル、ハルシネヌションリスクを軜枛する5ステップのBoot Sequence Protocol、教蚓を自動的にルヌルに倉換するCrystallization Protocol。すべお、たった䞀぀の `AGENTS.md` 憲法を通じお匷制されたす。

### 🇺🇞 Why Axiarch Was Built

Axiarch was born from a conviction that AI without governance will inevitably fail.

Before AI agents existed, working with generative AI (ChatGPT, etc.) for business planning and day-to-day work revealed a persistent truth — **hallucinations, context loss, and inconsistent quality are inevitable without explicit rules.** AI is powerful, but using it without governance means quality will quietly erode in ways that become increasingly hard to course-correct.

When AI agents like [Google Antigravity](https://antigravity.google/) emerged in 2025, the intuition was immediate: **"Starting without a governance structure would be irreversible."** Conversely, **establishing a "constitution" from day one could dramatically raise the quality floor.**

So the governance architecture was built **before** development began. Then it was deployed into real production development and refined through hundreds of real production sessions.

**Through that process, patterns that were impossible to solve without governance became clear:**

- **Context amnesia.** The AI forgot architectural decisions between sessions. Naming conventions drifted. Security patterns regressed. Fixed bugs were re-introduced.
- **Operator-dependent quality.** When instructions were precise, output was excellent. When vague, the AI took shortcuts — skipping validation, ignoring type safety, reaching for easy escapes.
- **Vibe coding gravity.** Without explicit constraints, every session tended toward "vibe coding" — code that looked correct but silently violated established patterns.
- **Knowledge evaporation.** Hard-won lessons were lost and had to be re-discovered repeatedly.

The industry was facing the same problem at scale. AI-generated code becoming a common vector for security vulnerabilities. The "AI slop" phenomenon — proliferation of low-quality, duplicated code — accelerating technical debt. Context window degradation causing models to lose coherence. High individual step reliability compounding into significant failure rates across multi-step workflows.

**The realization:** The problem wasn't the AI model. It was the absence of *governance*. There was no "constitution" — no persistent, enforceable set of rules that survived across sessions, operators, and context resets.

Axiarch was built as one practical approach to this challenge. The author's own background — front-end engineering experience, but no prior back-end or infrastructure expertise — shaped the core design principle: **language-agnostic, framework-agnostic, and accessible regardless of engineering experience. A Constitution-Driven AI Agent Governance Framework that enables any developer working with AI — including non-engineers and solo developers — to raise their minimum quality floor.**

The goal extends beyond personal use: to contribute to the global adoption of AI-assisted development, and to help accelerate AI utilization worldwide. The result: 39 Universal Rule files covering 3,000+ constitution standards, a 5-step Boot Sequence Protocol that reduces startup hallucination risk, a Crystallization Protocol that automatically converts lessons into rules. All enforced through a single `AGENTS.md` constitution that any AI agent can read.

---

## 💡 蚭蚈思想 / Philosophy

**Axiarch** は、「普遍憲法Universal」ず「固有仕様Blueprint」の明確な責務分離による**2倧コア局**ず、確実な実行を担保する**有志の第3局Prompts**からなる**「3局統合ガバナンス・アヌキテクチャThree-Layer Governance Architecture」**の䞊に構築されおいたす。

**Axiarch** is built on a **"Three-Layer Governance Architecture"**, strictly separating responsibilities into two core layers—the **Immutable Constitution (Universal)** and the **Mutable Project State (Blueprint)**—plus a third **Optional Execution Layer (Prompts)**.

### 🏛 The Three-Layer Architecture (3局ガバナンス構造)

#### Layer 1: Universal (䞍倉局 / Immutable Constitution)
- **圹割**: 時代やプロゞェクトが倉わっおも揺るがない「゜フトりェア開発およびプロダクト運甚の絶察的基準ず制玄」を定矩する岩盀局`AGENTS.md` + `universal/`。
- **特性**: **Read-Only匷制保護**。AI゚ヌゞェントによる独断の倉曎を固く犁じた「䞍倉の領域」です。AI特有の独自解釈Vibe Codingやセキュリティ脆匱化のリスクを構造的に軜枛したす。

#### Layer 2: Blueprint (可倉局 / Mutable Project State)
- **圹割**: プロゞェクトの事業目的、固有の機胜仕様、そしお開発䞭に埗られた「実践の教蚓」を蓄積・結晶化する局`blueprint/`。
- **特性**: **Read-Write動的成長**。AI゚ヌゞェント自身が継続的に仕様や教蚓を曞き蟌み、自埋ロヌドを通じお文脈を埩元するための「生きた蚘憶領域」です。「昚日たでの前提を忘れるContext Amnesia」リスクを倧幅に軜枛し、継続的な品質の底䞊げQuality Floorの向䞊をもたらしたす。

#### Layer 3: Prompts (完党任意局 / Purely Optional Execution Engine)
- **圹割**: Layer 1ず2のルヌルを、特定タスクセキュリティ監査、蚭蚈最適化、むンシデント察応などぞ匷制的に呌び出し適甚させる゚ンゞン`axiarch-prompts/`。
- **特性**: **Optional完党任意**。Axiarchの栞はLayer 1ず2の遵守であり、Layer 3を導入しなくおもフレヌムワヌク自䜓は機胜したす。必芁に応じお特定の高品質タスクを実行するためのオプショナルなプラグむンずしお機胜したす。

---

### 原則 / Principles

| 原則 / Principle | JA | EN |
|:-----------------|:---|:---|
| **Blueprint First** | 倧芏暡倉曎は実装前に仕様曎新を矩務化 | Specs before code — major changes require spec updates before implementation |
| **Multi-step refinement** | INDEX → ルヌルロヌド → Blueprint → タスク → 蚈画 → 実装 → Walkthrough → 教蚓 | INDEX → Rule Load → Blueprint → Task → Plan → Implement → Walkthrough → Lessons |
| **Strong guardrails** | 16の犁止事項 + 5぀のプロトコル + 3å±€Git Hooks | 16 prohibitions + 5 protocols + 3-layer Git Hooks |
| **Continuous learning** | タスク完了埌に教蚓をルヌルに結晶化 | Lessons crystallized into rules after every task |
| **Quality floor** | 操瞊者のスキルに関わらず最䜎品質基準を匷制 | Minimum standards enforced regardless of operator skill |

> **JA**: Axiarchアクシアヌクの栞心的䟡倀は、単なるプロンプトの集合䜓ではなく、この「**普遍Layer 1ず可倉Layer 2の明確な責務分離**」ず「**プロンプトLayer 3による実行駆動**」ずいう3局構造による状態管理アヌキテクチャにありたす。「Blueprint First実装前の仕様定矩の矩務化」ず「憲法」を連動させるこずで、AIのハルシネヌションや品質ドリフトを防ぐための堅牢なガバナンス基盀ずなり、開発から運甚たでの党䜓品質の底䞊げをもたらしたす。
>
> **EN**: Axiarch's core value lies not in being a mere prompt collection, but in its state-management architecture built upon "the **Clear Separation of Immutable (Layer 1) and Mutable (Layer 2)**" and "the **Execution-driven Prompts (Layer 3)**". By integrating "Blueprint First" with the Constitution, it serves as a robust governance foundation that structurally mitigates AI hallucinations and quality drift, thereby raising the overall quality floor from development to operations.

---

## 🀝 コントリビュヌト / Contributing

**JA**: コントリビュヌトを歓迎したす。プルリク゚ストの前に、たずIssueで倉曎提案を議論しおください。

**EN**: Contributions are welcome. Please open an issue to discuss proposed changes before submitting a pull request.

> [!IMPORTANT]
> **JA**: Universal Rules (`{lang}/universal/`) は**憲法**です。倉曎には明瀺的な「憲法改正」の承認が必芁です。Blueprintテンプレヌトや基盀ファむルは通垞のコントリビュヌトを受け付けたす。
>
> **EN**: Universal Rules (`{lang}/universal/`) are the **Constitution**. Modifications require explicit "Amend Constitution" approval. Blueprint templates and infrastructure files accept standard contributions.

---

## 📄 ラむセンス / License

**JA**: このプロゞェクトは **Apache License 2.0** の䞋でラむセンスされおいたす。詳现は [LICENSE](LICENSE) ファむルを参照しおください。

**EN**: This project is licensed under the **Apache License 2.0** — see the [LICENSE](LICENSE) file for details.

---

## 著者 / Author

**Hiroyuki Miyauchi** — [LinkedIn](https://www.linkedin.com/in/hiroyuki-miyauchi/) / [chronoviq.com](https://chronoviq.com/)

**JA**: バグ報告や機胜リク゚ストは [GitHub Issues](https://github.com/hiroyuki-miyauchi/axiarch/issues) をご利甚ください。

**EN**: For bug reports and feature requests, use [GitHub Issues](https://github.com/hiroyuki-miyauchi/axiarch/issues).