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
21 changes: 11 additions & 10 deletions commands/optional/codex-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,24 +120,25 @@ git diff --name-only HEAD~1 2>/dev/null || git status --short

### Step 3: Execute Codex Review

Request review from Codex via MCP:
Execute Codex CLI directly (progress displayed in real-time on STDERR):

```
📊 Starting Codex review...
```bash
codex exec "Review the following code changes and output issues and improvement suggestions:

Model: gpt-5.2-codex (configurable in config file)
Target files: {changed_files}
Prompt: Perform code review and output issues and improvement suggestions
Files: {changed_files}

{file_contents}"
```

**Model configuration**:
> **Legacy mode**: Set `execution_mode: mcp` to use MCP (no progress display)

**Configuration**:
```yaml
# .claude-code-harness.config.yaml
review:
codex:
model: gpt-5.2-codex # Recommended (top-tier model)
# model: gpt-5.1-codex
# model: gpt-5-codex-mini # Low-cost version
model: gpt-5.2-codex # Recommended (top-tier model)
# execution_mode: mcp # Legacy: MCP (no progress display)
```

### Step 4: Claude Verification
Expand Down
6 changes: 5 additions & 1 deletion skills/codex-review/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,18 @@ review:
codex:
enabled: true # Codex セカンドオピニオン有効化
auto: false # true: 自動実行 / false: 毎回確認
prompt: "日本語でコードレビューを行い、問題点と改善提案を出力してください"
prompt: "Review the code and output issues and improvement suggestions"
# execution_mode: mcp # Legacy: MCP (no progress display)
```

| 設定項目 | デフォルト | 説明 |
|---------|-----------|------|
| `enabled` | `false` | Codex 統合の有効/無効 |
| `auto` | `false` | 自動レビュー実行 |
| `prompt` | (上記) | Codex へのレビュープロンプト |
| `execution_mode` | `exec` | 実行モード(`exec`: CLI直接 / `mcp`: レガシー)|

> **Note**: 単発 `/codex-review` は `exec` (進捗表示あり)、並列エキスパートは常に `mcp` (Claude 組み込み並列機能)

---

Expand Down
17 changes: 17 additions & 0 deletions skills/codex-review/references/codex-parallel-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ experts:

### Step 5: 並列 MCP 呼び出し

**実行モード**: 並列エキスパートは **MCP 固定**(Claude 組み込み並列機能を活用)

> 単発 `/codex-review` は exec だが、並列は mcp の方がシェル管理不要で効率的

**重要**: Step 3 で決定した有効なエキスパートのみ呼び出し

```typescript
Expand All @@ -194,6 +198,19 @@ const results = await Promise.all(
);
```

### Step 5.1: 出力制限ルール(Context 溢れ防止)

各エキスパートの応答は以下の制約に従う(experts/*.md に埋め込み済み):

| 制約 | 内容 |
|------|------|
| 言語 | **English only**(トークン節約、Claude が統合時に日本語化) |
| 最大文字数 | 500 文字 |
| 件数制限 | Critical/High: 全件、Medium/Low: 各3件まで |
| 問題なし | `Score: A / No issues.` のみ |

> **理由**: 8エキスパート並列で Context 溢れを防止

### Step 6: 結果統合

各エキスパートからの結果を統合:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ Web アクセシビリティ(a11y)を分析し、WCAG 2.1 AA ガイドライ

### CONSTRAINTS

- 日本語で回答
- WCAG 2.1 AA を基準とする
- フレームワーク固有のパターンを考慮(React/Vue/Svelte)
- **English only, max 500 chars** (Claude integrates in Japanese)
- Critical/High: report all, Medium/Low: max 3 each
- No issues → `Score: A / No issues.`
- WCAG 2.1 AA baseline
- Consider framework-specific patterns (React/Vue/Svelte)
Comment on lines +28 to +32

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 | 🟡 Minor

アクセシビリティレビューの出力形式と文字数制限の整合性を確認してください。

OUTPUT FORMAT(50-66行目)で期待される詳細なテーブル(File、Line、Issue、WCAG、Fix列を含む)と500文字制限が矛盾する可能性があります。複数のa11y問題が検出された場合、WCAG基準への参照と具体的な修正案を含めると、制限を超過する可能性があります。

出力例をベースに実際の文字数を検証し、必要に応じて制限を調整してください(例: 700-800文字)。

🤖 Prompt for AI Agents
In `@skills/codex-review/references/experts/accessibility-expert.md` around lines
28 - 32, The OUTPUT FORMAT section expects a detailed table with
File/Line/Issue/WCAG/Fix entries which can exceed the current "English only, max
500 chars" constraint; update the guidance in accessibility-expert.md
(referencing the "OUTPUT FORMAT" block) to either raise the character limit
(suggest 700–800 chars) or explicitly allow a short summary (≤500 chars) plus an
expanded per-issue details block for each finding, and make the rule consistent
with the example output and WCAG requirement language so automated validators
and reviewers know which limit to enforce.


### MUST DO

Expand Down
8 changes: 5 additions & 3 deletions skills/codex-review/references/experts/architect-expert.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ Codex MCP に送信する設計レビュー用プロンプト。

### CONSTRAINTS

- 日本語で回答
- 早期の過度な抽象化を避ける
- 実際の要件に基づいた判断
- **English only, max 500 chars** (Claude integrates in Japanese)
- Critical/High: report all, Medium/Low: max 3 each
- No issues → `Score: A / No issues.`
- Avoid premature over-abstraction
Comment on lines +29 to +32

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

アーキテクチャレビューでは500文字制限が不十分です。

アーキテクチャエキスパートは設計パターン、トレードオフ分析、スケーラビリティの評価を行いますが、500文字ではトレードオフの詳細な説明(現在のアプローチの長所/短所、推奨アプローチとその理由など)を提供することが困難です。OUTPUT FORMATセクション(76-80行目)で期待される「Tradeoff Analysis」の詳細度と矛盾しています。

アーキテクチャレビューの性質を考慮し、文字数制限を1000文字程度に緩和するか、トレードオフ分析を別枠として扱うことを検討してください。

🤖 Prompt for AI Agents
In `@skills/codex-review/references/experts/architect-expert.md` around lines 29 -
32, Update the English length constraint for the architecture expert: change the
"English only, max 500 chars" rule to a higher limit (suggest ~1000 chars) or
split the constraint so that the main summary remains concise while the
"Tradeoff Analysis" gets its own separate, larger limit; locate and edit the
rule text (the line containing "English only, max 500 chars") and the OUTPUT
FORMAT / "Tradeoff Analysis" guidance to reflect the new limits and ensure they
are consistent.

- Base decisions on actual requirements

Comment on lines +29 to 34

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 | 🟡 Minor

言語指示の一貫性を改善してください。

scope-analyst-expert.mdと同様、「English only」と「(Claude integrates in Japanese)」の関係が不明確です。全エキスパートファイルで統一された明確な言語指示が必要です。

🤖 Prompt for AI Agents
In `@skills/codex-review/references/experts/architect-expert.md` around lines 29 -
34, Update the ambiguous language instruction line (- **English only, max 500
chars** (Claude integrates in Japanese)) to a single, explicit rule used across
all expert files (see scope-analyst-expert.md for desired format): state the
primary response language ("English") and, if an alternate integration language
like Japanese is permitted for a specific model (Claude), specify the exact
condition and notation to use (e.g., "Primary: English; For Claude integrations,
responses may be in Japanese — annotate with '(Claude: Japanese)'"). Apply this
same explicit phrasing to the corresponding line in all expert files to ensure
consistency.

### MUST DO

Expand Down
8 changes: 5 additions & 3 deletions skills/codex-review/references/experts/performance-expert.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ Codex MCP に送信するパフォーマンスレビュー用プロンプト。

### CONSTRAINTS

- 日本語で回答
- 早期最適化を避け、実際のボトルネックを優先
- 測定可能な改善効果を示す
- **English only, max 500 chars** (Claude integrates in Japanese)
- Critical/High: report all, Medium/Low: max 3 each
- No issues → `Score: A / No issues.`
- Avoid premature optimization, focus on real bottlenecks
- Show measurable improvement impact

### MUST DO

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ Codex MCP に送信する計画レビュー用プロンプト。

### CONSTRAINTS

- 日本語で回答
- 「実際に実装できるか」の視点で評価
- 過度に厳格な基準を適用しない
- **English only, max 500 chars** (Claude integrates in Japanese)
- Critical/High: report all, Medium/Low: max 3 each
- No issues → `Score: A / No issues.`
- Evaluate from "can this actually be implemented?" perspective
- Avoid overly strict criteria
Comment on lines +28 to +32

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

計画レビューの出力制約を見直してください。

計画レビューエキスパートは、実装をブロックする可能性のあるギャップ、曖昧さ、不足コンテキストを検出し、具体的な改善提案を提供する役割があります。500文字制限では、複数の問題点と改善提案を十分に説明できない可能性があります。特に、OUTPUT FORMAT(62-88行目)で期待される評価サマリーテーブルと詳細なFindings テーブルを含めると、制限を超過する可能性が高いです。

計画レビューの包括性を維持するため、文字数制限を800-1000文字に緩和することを推奨します。


### MUST DO

Expand Down
8 changes: 5 additions & 3 deletions skills/codex-review/references/experts/quality-expert.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ Codex MCP に送信するコード品質レビュー用プロンプト。

### CONSTRAINTS

- 日本語で回答
- プロジェクトの既存スタイルを尊重
- 過度な改善提案を避ける
- **English only, max 500 chars** (Claude integrates in Japanese)
- Critical/High: report all, Medium/Low: max 3 each
- No issues → `Score: A / No issues.`
- Respect existing project style
- Avoid excessive improvement suggestions

### MUST DO

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ Codex MCP に送信する要件分析用プロンプト。

### CONSTRAINTS

- 日本語で回答
- 実際の問題に焦点を当てる
- 過度な分析を避ける
- **English only, max 500 chars** (Claude integrates in Japanese)
- Critical/High: report all, Medium/Low: max 3 each
- No issues → `Score: A / No issues.`
Comment on lines +29 to +31

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 | 🟡 Minor

言語指示の曖昧さを明確化してください。

「English only」という制約と「(Claude integrates in Japanese)」という注記が矛盾しています。エキスパートの出力言語が英語なのか日本語なのかが不明確です。

💡 提案される修正

出力言語を明確に指定してください:

-- **English only, max 500 chars** (Claude integrates in Japanese)
+- **Output in English only, max 500 chars** (main Claude system integrates responses in Japanese)

または、日本語出力を意図している場合:

-- **English only, max 500 chars** (Claude integrates in Japanese)
+- **Output in Japanese, max 500 chars** (constraints documented in English for clarity)
📝 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
- **English only, max 500 chars** (Claude integrates in Japanese)
- Critical/High: report all, Medium/Low: max 3 each
- No issues → `Score: A / No issues.`
- **Output in English only, max 500 chars** (main Claude system integrates responses in Japanese)
- Critical/High: report all, Medium/Low: max 3 each
- No issues → `Score: A / No issues.`
Suggested change
- **English only, max 500 chars** (Claude integrates in Japanese)
- Critical/High: report all, Medium/Low: max 3 each
- No issues → `Score: A / No issues.`
- **Output in Japanese, max 500 chars** (constraints documented in English for clarity)
- Critical/High: report all, Medium/Low: max 3 each
- No issues → `Score: A / No issues.`
🤖 Prompt for AI Agents
In `@skills/codex-review/references/experts/scope-analyst-expert.md` around lines
29 - 31, The language instruction is ambiguous because the line "**English only,
max 500 chars** (Claude integrates in Japanese)" contradicts itself; remove
ambiguity by replacing that line with an explicit output-language field such as
"Output language: English — max 500 characters" or, if Japanese output is
intended, "Output language: Japanese — max 500 characters", and ensure any
parenthetical note about Claude integration is moved to a separate clarification
line like "Note: Claude may integrate with Japanese inputs" so the directives in
the header (the bolded language+length rule) and the explanatory note are not
conflicting.

- Focus on real problems
- Avoid over-analysis
Comment on lines +29 to +33

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

500文字制限が要件分析には厳しすぎる可能性があります。

スコープアナリストは隠れた要件、曖昧さ、依存関係、リスクを検出する役割を持っていますが、500文字の制限では詳細な分析結果や質問リストを十分に提供できない可能性があります。特に、複雑な要件や複数の曖昧さが存在する場合、制限により重要な情報が省略される恐れがあります。

要件分析の性質を考慮し、文字数制限を750-1000文字に緩和することを検討してください。

🤖 Prompt for AI Agents
In `@skills/codex-review/references/experts/scope-analyst-expert.md` around lines
29 - 33, The "English only, max 500 chars" constraint in scope-analyst-expert.md
is too strict for thorough requirement analysis; update that directive to a
higher limit (suggest 750–1000 characters) by replacing the "English only, max
500 chars" line with "English only, max 750-1000 chars" and adjust any related
guidance or validation expectations in the same file (e.g., examples or scoring
rules like "Score: A / No issues.") to reflect the new limit so analysts can
provide fuller findings, questions, and risk descriptions.


### MUST DO

Expand Down
8 changes: 5 additions & 3 deletions skills/codex-review/references/experts/security-expert.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ Codex MCP に送信するセキュリティレビュー用プロンプト。

### CONSTRAINTS

- 日本語で回答
- false positive を減らすためコンテキストを考慮
- フレームワーク固有のセキュリティ機能を考慮
- **English only, max 500 chars** (Claude integrates in Japanese)
- Critical/High: report all, Medium/Low: max 3 each

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

Medium/Low脆弱性の報告制限を再考してください。

「Medium/Low: max 3 each」という制限により、複数の中程度のセキュリティ問題が隠される可能性があります。セキュリティの文脈では、複数のMedium脆弱性が組み合わさることでHigh/Criticalリスクに発展する場合があります。

セキュリティレビューでは少なくともMedium脆弱性は全件報告することを推奨します。

🤖 Prompt for AI Agents
In `@skills/codex-review/references/experts/security-expert.md` at line 28, Update
the vulnerability reporting guideline that currently reads "Critical/High:
report all, Medium/Low: max 3 each" so it no longer caps Medium/Low findings;
replace that phrase with wording that requires all Critical/High and all Medium
vulnerabilities to be reported (and remove or revise the "max 3 each" constraint
for Low to either report all or a justified sampling policy). Locate the exact
string "Critical/High: report all, Medium/Low: max 3 each" in the document and
change it to something like "Critical/High: report all, Medium: report all, Low:
[policy]" or an equivalent that explicitly mandates reporting all Medium
findings.

- No issues → `Score: A / No issues.`
- Reduce false positives by considering context
- Consider framework-specific security features
Comment on lines +27 to +31

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 | 🔴 Critical

セキュリティレビューでは500文字制限がリスクになります。

セキュリティエキスパートは脆弱性の詳細な説明、攻撃ベクトル、修正手順を提供する必要がありますが、500文字では不十分です。例えば、SQLインジェクションの脆弱性を報告する際には、脆弱なコード箇所、攻撃可能性、影響範囲、具体的な修正コードの提示が必要であり、これらを500文字に収めることは困難です。不完全なセキュリティレポートは、開発者が脆弱性の深刻さを理解できず、適切な対策を講じられないリスクがあります。

セキュリティドメインの特性を考慮し、文字数制限を1000文字以上に緩和するか、セキュリティエキスパートのみ制限を除外することを強く推奨します。

🤖 Prompt for AI Agents
In `@skills/codex-review/references/experts/security-expert.md` around lines 27 -
31, The guidance line "**English only, max 500 chars**" imposes an overly strict
length limit for security-expert reports; update this rule to either state
"English only, max 1000+ chars" or add an explicit exemption for security
experts (e.g., "security-expert reports exempt from char limit") so
vulnerability findings can include detailed description, exploit vector, impact,
and remediation; make the change in security-expert.md by replacing the 500-char
rule with the relaxed/exception wording and keep the rest of the bullets
unchanged.


### MUST DO

Expand Down
8 changes: 5 additions & 3 deletions skills/codex-review/references/experts/seo-expert.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ SEO 最適化と OGP タグを分析し、検索エンジン・SNS シェア品

### CONSTRAINTS

- 日本語で回答
- フレームワーク固有の SEO 機能を考慮(Next.js Metadata API 等)
- 動的ページは代表的なパターンでチェック
- **English only, max 500 chars** (Claude integrates in Japanese)
- Critical/High: report all, Medium/Low: max 3 each
- No issues → `Score: A / No issues.`
- Consider framework-specific SEO features (Next.js Metadata API, etc.)
- Check dynamic pages with representative patterns

### MUST DO

Expand Down
Loading