oh-my-codex-cli 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -54,7 +54,7 @@ aireview --pr [PR_NUMBER] # Review specific PR
|
|
|
54
54
|
aireview --pr --comment # Post review as PR comment
|
|
55
55
|
|
|
56
56
|
# Deep review (Multi-AI collaboration)
|
|
57
|
-
aireview --diff --deep # Gemini +
|
|
57
|
+
aireview --diff --deep # Gemini + Claude Code parallel analysis
|
|
58
58
|
|
|
59
59
|
# Standard file/directory review
|
|
60
60
|
aireview ./src/auth
|
|
@@ -107,7 +107,7 @@ Layer 2: Gemini Deep Analysis (via gemp)
|
|
|
107
107
|
- Security analysis
|
|
108
108
|
- Performance implications
|
|
109
109
|
↓
|
|
110
|
-
Layer 3:
|
|
110
|
+
Layer 3: Claude Code Quality Audit
|
|
111
111
|
- TypeScript/React best practices (ISTJ persona)
|
|
112
112
|
- Code maintainability
|
|
113
113
|
- Pattern adherence
|
|
@@ -389,8 +389,8 @@ If MODE == "deep":
|
|
|
389
389
|
|
|
390
390
|
cat /tmp/gemini_prompt.txt | node ~/.gemini/long_task_runner.js 2>&1
|
|
391
391
|
|
|
392
|
-
Layer 3 -
|
|
393
|
-
cat > /tmp/
|
|
392
|
+
Layer 3 - Claude Code Quality Audit:
|
|
393
|
+
cat > /tmp/claude_prompt.txt << 'PROMPT_EOF'
|
|
394
394
|
你是 ISTJ 工程师,进行代码质量审计。
|
|
395
395
|
|
|
396
396
|
已发现的高置信度问题:
|
|
@@ -415,7 +415,7 @@ If MODE == "deep":
|
|
|
415
415
|
- 总体质量评分 (1-10)
|
|
416
416
|
PROMPT_EOF
|
|
417
417
|
|
|
418
|
-
cat /tmp/
|
|
418
|
+
cat /tmp/claude_prompt.txt | claude -p --output-format text --dangerously-skip-permissions 2>&1
|
|
419
419
|
|
|
420
420
|
Layer 4 - Synthesis:
|
|
421
421
|
Combine findings from all layers
|
|
@@ -481,8 +481,8 @@ Else:
|
|
|
481
481
|
**Gemini 架构评分**: {gemini_score}/10
|
|
482
482
|
{gemini_highlights}
|
|
483
483
|
|
|
484
|
-
**
|
|
485
|
-
{
|
|
484
|
+
**Claude Code 质量评分**: {claude_score}/10
|
|
485
|
+
{claude_highlights}
|
|
486
486
|
{end if}
|
|
487
487
|
|
|
488
488
|
🤖 Generated with Codex
|
|
@@ -550,7 +550,7 @@ If --comment flag && pr_mode:
|
|
|
550
550
|
- ✅ Git history 上下文分析
|
|
551
551
|
- ✅ 相关 PR 分析
|
|
552
552
|
- ✅ 代码注释合规性检查
|
|
553
|
-
- ✅ 分层分析 (multi-agent → Gemini →
|
|
553
|
+
- ✅ 分层分析 (multi-agent → Gemini → Claude Code → synthesis)
|
|
554
554
|
- ✅ 详���的置信度评分标准
|
|
555
555
|
|
|
556
556
|
## CLI Implementation Templates
|
|
@@ -568,18 +568,18 @@ cat /tmp/gemini_prompt.txt | node ~/.gemini/long_task_runner.js 2>&1
|
|
|
568
568
|
cat /tmp/gemini_prompt.txt | gemini --yolo 2>&1 | grep -v "STARTUP|YOLO|Load"
|
|
569
569
|
```
|
|
570
570
|
|
|
571
|
-
###
|
|
571
|
+
### Claude Code CLI
|
|
572
572
|
```bash
|
|
573
|
-
cat > /tmp/
|
|
573
|
+
cat > /tmp/claude_prompt.txt << 'PROMPT_EOF'
|
|
574
574
|
{persona} 你的审查任务...
|
|
575
575
|
PROMPT_EOF
|
|
576
|
-
cat /tmp/
|
|
576
|
+
cat /tmp/claude_prompt.txt | claude -p --output-format text --dangerously-skip-permissions 2>&1
|
|
577
577
|
```
|
|
578
578
|
|
|
579
579
|
## Requirements
|
|
580
580
|
|
|
581
581
|
- Gemini CLI (gemp/long_task_runner.js) configured
|
|
582
|
-
-
|
|
582
|
+
- Claude Code CLI configured
|
|
583
583
|
- GitHub CLI (`gh`) for PR mode
|
|
584
584
|
- CLAUDE.md files (optional but recommended)
|
|
585
585
|
|
|
@@ -663,7 +663,7 @@ $ aireview origin/feature-payment --deep
|
|
|
663
663
|
|
|
664
664
|
✅ Layer 1: 多 agent 并行审查 (5 agents)
|
|
665
665
|
✅ Layer 2: Gemini 架构分析 (INTJ)
|
|
666
|
-
✅ Layer 3:
|
|
666
|
+
✅ Layer 3: Claude Code 质量审计 (ISTJ)
|
|
667
667
|
✅ Layer 4: 综合分析
|
|
668
668
|
|
|
669
669
|
## 深度 AI 审查报告
|
|
@@ -678,7 +678,7 @@ $ aireview --diff --deep
|
|
|
678
678
|
|
|
679
679
|
✅ Layer 1: 多 agent 并行审查 (5 agents)
|
|
680
680
|
✅ Layer 2: Gemini 架构分析 (INTJ)
|
|
681
|
-
✅ Layer 3:
|
|
681
|
+
✅ Layer 3: Claude Code 质量审计 (ISTJ)
|
|
682
682
|
✅ Layer 4: 综合分析
|
|
683
683
|
|
|
684
684
|
## 深度 AI 审查报告
|
package/package.json
CHANGED
package/src/config/generator.js
CHANGED
|
@@ -61,22 +61,16 @@ function upsertFeatureFlags(config) {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
function buildManagedBlock(root, options = {}) {
|
|
64
|
-
const notifyScript = path.join(root, 'scripts', 'notify-dispatch.js').replace(/\\/g, '\\\\').replace(/"/g, '\\"');
|
|
65
64
|
const stateServer = path.join(root, 'src', 'mcp', 'state-server.js').replace(/\\/g, '\\\\').replace(/"/g, '\\"');
|
|
66
65
|
const memoryServer = path.join(root, 'src', 'mcp', 'memory-server.js').replace(/\\/g, '\\\\').replace(/"/g, '\\"');
|
|
67
66
|
const traceServer = path.join(root, 'src', 'mcp', 'trace-server.js').replace(/\\/g, '\\\\').replace(/"/g, '\\"');
|
|
68
67
|
const includeContext7 = options.enableContext7 === true;
|
|
68
|
+
const includeOpenaiDocs = options.includeOpenaiDocs !== false;
|
|
69
69
|
|
|
70
70
|
const lines = [
|
|
71
71
|
'# ============================================================',
|
|
72
72
|
'# oh-my-codex managed block',
|
|
73
73
|
'# ============================================================',
|
|
74
|
-
`notify = ["node", "${notifyScript}"]`,
|
|
75
|
-
'model_reasoning_effort = "high"',
|
|
76
|
-
'[mcp_servers.openaiDeveloperDocs]',
|
|
77
|
-
'url = "https://developers.openai.com/mcp"',
|
|
78
|
-
'enabled = true',
|
|
79
|
-
'',
|
|
80
74
|
'[mcp_servers.omcodex_state]',
|
|
81
75
|
'command = "node"',
|
|
82
76
|
`args = ["${stateServer}"]`,
|
|
@@ -93,7 +87,11 @@ function buildManagedBlock(root, options = {}) {
|
|
|
93
87
|
'enabled = true',
|
|
94
88
|
];
|
|
95
89
|
|
|
96
|
-
if (
|
|
90
|
+
if (includeOpenaiDocs) {
|
|
91
|
+
lines.push('', '[mcp_servers.openaiDeveloperDocs]', 'url = "https://developers.openai.com/mcp"', 'enabled = true');
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (includeContext7 && options.includeContext7Server !== false) {
|
|
97
95
|
lines.push('', '[mcp_servers.context7]', 'command = "npx"', 'args = ["-y", "@upstash/context7-mcp"]', 'enabled = true');
|
|
98
96
|
}
|
|
99
97
|
|
|
@@ -101,6 +99,12 @@ function buildManagedBlock(root, options = {}) {
|
|
|
101
99
|
return lines.join('\n');
|
|
102
100
|
}
|
|
103
101
|
|
|
102
|
+
function hasSection(config, sectionName) {
|
|
103
|
+
const escaped = sectionName.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
104
|
+
const pattern = new RegExp(`^\\s*\\[${escaped}\\]\\s*$`, 'm');
|
|
105
|
+
return pattern.test(config);
|
|
106
|
+
}
|
|
107
|
+
|
|
104
108
|
function mergeConfig(configFile, root, options = {}) {
|
|
105
109
|
const dir = path.dirname(configFile);
|
|
106
110
|
fs.mkdirSync(dir, { recursive: true });
|
|
@@ -111,7 +115,11 @@ function mergeConfig(configFile, root, options = {}) {
|
|
|
111
115
|
let next = stripManagedBlock(existing, startMarker, endMarker).trim();
|
|
112
116
|
next = upsertFeatureFlags(next);
|
|
113
117
|
|
|
114
|
-
const managed = buildManagedBlock(root,
|
|
118
|
+
const managed = buildManagedBlock(root, {
|
|
119
|
+
...options,
|
|
120
|
+
includeOpenaiDocs: !hasSection(next, 'mcp_servers.openaiDeveloperDocs'),
|
|
121
|
+
includeContext7Server: !hasSection(next, 'mcp_servers.context7'),
|
|
122
|
+
});
|
|
115
123
|
const output = `${next.trim()}\n\n${managed}\n`;
|
|
116
124
|
fs.writeFileSync(configFile, output, 'utf8');
|
|
117
125
|
}
|