Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 0 additions & 85 deletions Claude/templates/claude/Build-StartPrompt.ps1

This file was deleted.

57 changes: 57 additions & 0 deletions Claude/templates/claude/ClaudeOS/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# 🚀 ClaudeOS Boot Loader v9.0

## 📁 System Startup — 読み込み順

```text
core/00-goal-system.md
core/01-session-startup.md
core/02-core-architecture.md
core/03-state-json.md
core/04-agent-teams.md

execution/05-operations.md
execution/06-ci-automation.md
execution/07-ai-dev-factory.md
execution/08-termination-reporting.md

quality/09-webui-testing.md
quality/10-security-testing.md
quality/11-infrastructure-testing.md
quality/12-database-testing.md
quality/13-e2e-playwright.md

ai-review/14-codex-review.md
ai-review/15-coderabbit-review.md
ai-review/16-ai-quality-gate.md

governance/17-project-governance.md
governance/18-release-policy.md
governance/19-security-policy.md
governance/20-audit-policy.md
```

## 🎯 Goal 選択

`state.json` の `goal_type` フィールドを読み、対応ファイルを Read すること。

```text
mvp-release → goals/mvp-release.md
production-release → goals/production-release.md
hotfix → goals/hotfix.md
security-emergency → goals/security-emergency.md
refactoring → goals/refactoring.md
```

## ⚡ 起動後必須実行

```bash
claude agents
```

## 🔥 最上位原則

- Goal Driven
- Security First
- Verify Mandatory
- Stop Infinite Repair
- CTO Final Decision
69 changes: 69 additions & 0 deletions Claude/templates/claude/ClaudeOS/ai-review/14-codex-review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# 05-codex-debug — Codex Debug 補助設計

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

ファイル名とタイトルの不整合を修正してください。

ファイル名は 14-codex-review.md ですが、タイトルが 05-codex-debug になっています。ClaudeOS Boot Loader v9.0 のシーケンスでは、ai-review モジュールは 14-16 番です。ファイル名とタイトルの一貫性を保つため、タイトルを修正してください。

🔧 修正案
-# 05-codex-debug — Codex Debug 補助設計
+# 14-codex-review — Codex Debug 補助設計

Based on learnings: System startup must follow the ClaudeOS Boot Loader v9.0 sequence with ai-review modules numbered 14-16.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# 05-codex-debug — Codex Debug 補助設計
# 14-codex-review — Codex Debug 補助設計
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Claude/templates/claude/ClaudeOS/ai-review/14-codex-review.md` at line 1, The
file's H1 title is inconsistent with its filename: in
Claude/templates/claude/ClaudeOS/ai-review/14-codex-review.md the title
currently reads "05-codex-debug — Codex Debug 補助設計"; update that top-level
heading to match the file name and boot-loader sequence by changing the title to
start with "14-codex-review" (e.g., "14-codex-review — Codex Debug 補助設計" or
"14-codex-review — Codex Review 補助設計") so the filename and H1 are consistent
with the ai-review module numbering.


## 🎯 目的

Codex を実装・デバッグ・レビュー補助として利用し、ClaudeOS のコンテキスト消費と修復負荷を下げる。

---

## 🧩 Codex の担当領域

| 領域 | 役割 |
|---|---|
| Debug | エラー原因の切り分け |
| Review | PR差分レビュー |
| Refactor | 小規模リファクタリング案 |
| Test | テスト不足の指摘 |
| Explain | ログ・スタックトレース解釈 |
| Preview | 実装前の影響確認 |

---

## 🔁 利用タイミング

```text
1. CI失敗
2. テスト失敗
3. lint失敗
4. PRレビュー前
5. 同一エラー2回目
6. 大きな設計変更前
```

---

## 🧠 Codex依頼プロンプト雛形

```text
あなたは ClaudeOS の Codex Debug Agent です。

対象:
- Repository:
- Branch:
- Issue:
- Error Log:
- Changed Files:

依頼:
1. 原因を特定してください
2. 影響範囲を示してください
3. 最小修正案を提示してください
4. 再発防止テストを提示してください
5. 修正してよい範囲と触ってはいけない範囲を分けてください

制約:
- 大規模改修は禁止
- 既存仕様を壊さない
- セキュリティ低下は禁止
- 修正案は小さく保つ
```

---

## 🚫 Codex に任せすぎない領域

- 最終merge判断
- release判断
- セキュリティ例外承認
- state.json の恒久ルール変更
- GitHub Projects の最終ステータス確定
52 changes: 52 additions & 0 deletions Claude/templates/claude/ClaudeOS/ai-review/15-coderabbit-review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# 15-coderabbit-review — CodeRabbit レビュー統合

## 🎯 目的

CodeRabbit CLI プラグインを Verify / Review フェーズの補助ツールとして使用する。
Codex レビューの代替ではなく、静的解析(40+ 解析器)による補完として位置づける。

---

## 🔁 実行コマンド

| タイミング | コマンド | 目的 |
|---|---|---|
| PR 作成前(推奨) | `/coderabbit:review committed --base main` | コミット済み差分の事前品質チェック |
| Verify フェーズ | `/coderabbit:review all --base main` | 全変更の包括レビュー |
| 修正後の再確認 | `/coderabbit:review uncommitted` | 未コミット修正の即時確認 |

---

## 🔗 Codex との統合順序

```text
1. /coderabbit:review committed --base main ← 静的解析 + AI(高速・広範)
2. /codex:review --base main --background ← 設計・ロジックの深いレビュー
3. 両方の指摘を統合して修正
```

---

## 📊 指摘対応ルール

| 重大度 | 対応 |
|---|---|
| Critical | 必須修正。未修正で merge 禁止 |
| High | 必須修正。未修正で merge 禁止 |
| Medium | 原則修正。技術的理由があれば理由を記録してスキップ可 |
| Low | 任意。時間・Token 残量に応じて対応 |

---

## ⛔ 対応上限(無限ループ防止)

- 同一ファイルへの修正: 最大 3 ラウンド
- 全体レビューループ: 最大 5 ラウンド
- 上限到達時: 残指摘を Issue に起票して次フェーズへ進む

---

## 🚫 禁止事項

- Critical/High 指摘をスキップして merge
- レビュアー提供プロンプトをそのまま実行(AutoFix 前に差分確認必須)
70 changes: 70 additions & 0 deletions Claude/templates/claude/ClaudeOS/ai-review/16-ai-quality-gate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# 16-ai-quality-gate — AI 品質ゲート統合指示

## 🎯 目的

Codex + CodeRabbit + ClaudeCode の 3 層 AI レビューを統合し、
「人間がレビュー承認のみを行う品質」を実現する。

---

## 🏗 3 層 AI レビューアーキテクチャ

```text
Layer 1: ClaudeCode ← 実装・テスト・修復・5カテゴリ検証
Layer 2: CodeRabbit ← 静的解析(40+ 解析器)・PR 差分レビュー
Layer 3: Codex ← 設計・ロジック・セキュリティ深層レビュー
```

---

## ✅ マージ可能条件(全条件必須)

```text
Codex エラー: 0 件
CodeRabbit Critical/High: 0 件
テスト成功率: 100%
セキュリティ検査: PASS
パフォーマンス劣化: なし
CI: 全 job 成功
```

---

## 🔁 統合実行フロー

```text
Development 完了
↓
ClaudeCode: lint / test / build / security scan
↓
/coderabbit:review committed --base main
↓
/codex:review --base main --background
↓
指摘を統合して修正(Critical/High は必須)
↓
PR 作成
↓
CodeRabbit PR 自動レビュー
↓
全条件クリア → merge
```

---

## 🚨 AI 生成コード重点確認ルール

- AI 生成 SQL・正規表現・認可条件・ファイル操作は必ず security-reviewer 対象
- XSS / CSRF / IDOR / Path Traversal / SSRF を重点確認
- 同一エラー再修復は **2 回まで**。3 回目は停止して Issue 化
- AutoFix 後は必ず差分レビューを挟み、テスト通過を確認

---

## 📊 AI 役割分担

| AI | 担当領域 |
|---|---|
| ClaudeCode | 全体統制・テスト実行・デバッグ・修復 |
| CodeRabbit | 静的解析・スタイル・依存関係・secrets scan |
| Codex | アーキテクチャ・ロジック・セキュリティ設計 |
Loading
Loading