oh-my-codex-cli 0.1.0
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.
- package/.agent/skills/agent-kb/HOW_TO_USE.md +428 -0
- package/.agent/skills/agent-kb/README.md +46 -0
- package/.agent/skills/agent-kb/SKILL.md +128 -0
- package/.agent/skills/agent-kb/references/intelligent-analysis-explained.md +333 -0
- package/.agent/skills/agent-kb/references/query-optimization.md +225 -0
- package/.agent/skills/aireview/SKILL.md +704 -0
- package/.agent/skills/analyze/SKILL.md +81 -0
- package/.agent/skills/architect-planner/HOW_TO_USE.md +238 -0
- package/.agent/skills/architect-planner/README.md +41 -0
- package/.agent/skills/architect-planner/SKILL.md +539 -0
- package/.agent/skills/auto-mbti/SKILL.md +291 -0
- package/.agent/skills/autopilot/SKILL.md +222 -0
- package/.agent/skills/backend-patterns/SKILL.md +602 -0
- package/.agent/skills/bdd-generator/README.md +78 -0
- package/.agent/skills/bdd-generator/SKILL.md +436 -0
- package/.agent/skills/brainstorming/HOW_TO_USE.md +289 -0
- package/.agent/skills/brainstorming/README.md +41 -0
- package/.agent/skills/brainstorming/SKILL.md +165 -0
- package/.agent/skills/build-fix/SKILL.md +190 -0
- package/.agent/skills/cancel/SKILL.md +658 -0
- package/.agent/skills/checkpoint/SKILL.md +94 -0
- package/.agent/skills/code-review/SKILL.md +273 -0
- package/.agent/skills/coding-standards/SKILL.md +535 -0
- package/.agent/skills/conductor/SKILL.md +128 -0
- package/.agent/skills/conductor/commands/conductor/implement.toml +358 -0
- package/.agent/skills/conductor/commands/conductor/newTrack.toml +142 -0
- package/.agent/skills/conductor/commands/conductor/revert.toml +123 -0
- package/.agent/skills/conductor/commands/conductor/setup.toml +429 -0
- package/.agent/skills/conductor/commands/conductor/status.toml +57 -0
- package/.agent/skills/conductor/scripts/install.sh +89 -0
- package/.agent/skills/conductor/templates/code_styleguides/csharp.md +115 -0
- package/.agent/skills/conductor/templates/code_styleguides/dart.md +238 -0
- package/.agent/skills/conductor/templates/code_styleguides/general.md +23 -0
- package/.agent/skills/conductor/templates/code_styleguides/go.md +48 -0
- package/.agent/skills/conductor/templates/code_styleguides/html-css.md +49 -0
- package/.agent/skills/conductor/templates/code_styleguides/javascript.md +51 -0
- package/.agent/skills/conductor/templates/code_styleguides/python.md +37 -0
- package/.agent/skills/conductor/templates/code_styleguides/typescript.md +43 -0
- package/.agent/skills/conductor/templates/rules/README.md +23 -0
- package/.agent/skills/conductor/templates/rules/agents.md +49 -0
- package/.agent/skills/conductor/templates/rules/coding-style.md +70 -0
- package/.agent/skills/conductor/templates/rules/dev.md +20 -0
- package/.agent/skills/conductor/templates/rules/git-workflow.md +45 -0
- package/.agent/skills/conductor/templates/rules/hooks.md +6 -0
- package/.agent/skills/conductor/templates/rules/patterns.md +55 -0
- package/.agent/skills/conductor/templates/rules/performance.md +47 -0
- package/.agent/skills/conductor/templates/rules/research.md +26 -0
- package/.agent/skills/conductor/templates/rules/review.md +22 -0
- package/.agent/skills/conductor/templates/rules/security.md +36 -0
- package/.agent/skills/conductor/templates/rules/testing.md +30 -0
- package/.agent/skills/conductor/templates/workflow.md +333 -0
- package/.agent/skills/consensus/HOW_TO_USE.md +191 -0
- package/.agent/skills/consensus/README.md +41 -0
- package/.agent/skills/consensus/SKILL.md +317 -0
- package/.agent/skills/content-research-writer/SKILL.md +537 -0
- package/.agent/skills/debug-analysis/SKILL.md +331 -0
- package/.agent/skills/deepinit/SKILL.md +347 -0
- package/.agent/skills/deepsearch/SKILL.md +56 -0
- package/.agent/skills/doctor/SKILL.md +158 -0
- package/.agent/skills/drawio/EXAMPLES.md +382 -0
- package/.agent/skills/drawio/QUICK_START.md +237 -0
- package/.agent/skills/drawio/README.md +315 -0
- package/.agent/skills/drawio/SETUP_GUIDE.md +254 -0
- package/.agent/skills/drawio/SKILL.md +1176 -0
- package/.agent/skills/e2e/SKILL.md +396 -0
- package/.agent/skills/ecomode/SKILL.md +160 -0
- package/.agent/skills/electron-driver/SKILL.md +144 -0
- package/.agent/skills/electron-driver/scripts/driver-template.js +71 -0
- package/.agent/skills/eval/SKILL.md +140 -0
- package/.agent/skills/eval-harness/SKILL.md +242 -0
- package/.agent/skills/evolve/SKILL.md +213 -0
- package/.agent/skills/frontend-design/SKILL.md +42 -0
- package/.agent/skills/frontend-patterns/SKILL.md +646 -0
- package/.agent/skills/frontend-ui-ux/SKILL.md +70 -0
- package/.agent/skills/git-master/SKILL.md +75 -0
- package/.agent/skills/help/SKILL.md +89 -0
- package/.agent/skills/iterative-retrieval/SKILL.md +217 -0
- package/.agent/skills/local-skills-setup/SKILL.md +483 -0
- package/.agent/skills/log-analyzer/SKILL.md +187 -0
- package/.agent/skills/mcp-setup/SKILL.md +226 -0
- package/.agent/skills/multi-model-research/HOW_TO_USE.md +614 -0
- package/.agent/skills/multi-model-research/README.md +233 -0
- package/.agent/skills/multi-model-research/SKILL.md +541 -0
- package/.agent/skills/multi-model-research/references/troubleshooting.md +415 -0
- package/.agent/skills/note/SKILL.md +80 -0
- package/.agent/skills/omc-setup/SKILL.md +219 -0
- package/.agent/skills/orchestrate/SKILL.md +620 -0
- package/.agent/skills/patent-workflow/IMPLEMENTATION_SUMMARY.md +500 -0
- package/.agent/skills/patent-workflow/README.md +455 -0
- package/.agent/skills/patent-workflow/SKILL.md +1036 -0
- package/.agent/skills/patent-workflow/tools/irr_checker.py +260 -0
- package/.agent/skills/patent-workflow/tools/sample_terminology.json +49 -0
- package/.agent/skills/patent-workflow/tools/term_checker.py +355 -0
- package/.agent/skills/pattern-recognition/SKILL.md +792 -0
- package/.agent/skills/pipeline/SKILL.md +448 -0
- package/.agent/skills/plan/SKILL.md +309 -0
- package/.agent/skills/planning-methodology/SKILL.md +370 -0
- package/.agent/skills/planning-with-files/SKILL.md +210 -0
- package/.agent/skills/planning-with-files/examples.md +202 -0
- package/.agent/skills/planning-with-files/reference.md +218 -0
- package/.agent/skills/planning-with-files/scripts/check-complete.ps1 +42 -0
- package/.agent/skills/planning-with-files/scripts/check-complete.sh +44 -0
- package/.agent/skills/planning-with-files/scripts/init-session.ps1 +120 -0
- package/.agent/skills/planning-with-files/scripts/init-session.sh +120 -0
- package/.agent/skills/planning-with-files/scripts/session-catchup.py +208 -0
- package/.agent/skills/planning-with-files/templates/findings.md +95 -0
- package/.agent/skills/planning-with-files/templates/progress.md +114 -0
- package/.agent/skills/planning-with-files/templates/task_plan.md +132 -0
- package/.agent/skills/project-analyze/CLAUDE.md +18 -0
- package/.agent/skills/project-analyze/HOW_TO_USE.md +145 -0
- package/.agent/skills/project-analyze/README.md +42 -0
- package/.agent/skills/project-analyze/SKILL.md +289 -0
- package/.agent/skills/project-analyze/SKILL.md.backup +287 -0
- package/.agent/skills/project-analyze/SKILL.md.backup_20260105_093646 +287 -0
- package/.agent/skills/project-analyze/assets/analysis-report-template.md +433 -0
- package/.agent/skills/project-analyze/references/analysis-patterns.md +422 -0
- package/.agent/skills/project-analyze/references/projectmind-explained.md +535 -0
- package/.agent/skills/project-session-manager/SKILL.md +428 -0
- package/.agent/skills/project-session-manager/lib/config.sh +86 -0
- package/.agent/skills/project-session-manager/lib/parse.sh +121 -0
- package/.agent/skills/project-session-manager/lib/session.sh +132 -0
- package/.agent/skills/project-session-manager/lib/tmux.sh +103 -0
- package/.agent/skills/project-session-manager/lib/worktree.sh +171 -0
- package/.agent/skills/project-session-manager/psm.sh +629 -0
- package/.agent/skills/project-session-manager/templates/feature.md +56 -0
- package/.agent/skills/project-session-manager/templates/issue-fix.md +57 -0
- package/.agent/skills/project-session-manager/templates/pr-review.md +65 -0
- package/.agent/skills/project-session-manager/templates/projects.json +19 -0
- package/.agent/skills/quality-check/HOW_TO_USE.md +171 -0
- package/.agent/skills/quality-check/README.md +50 -0
- package/.agent/skills/quality-check/SKILL.md +240 -0
- package/.agent/skills/quality-check/SKILL.md.backup +238 -0
- package/.agent/skills/quality-check/SKILL.md.backup_20260105_093646 +238 -0
- package/.agent/skills/quality-check/assets/quality-report-template.md +437 -0
- package/.agent/skills/quality-check/references/refactoring-patterns.md +550 -0
- package/.agent/skills/quality-check/references/scoring-criteria.md +454 -0
- package/.agent/skills/quality-validation/SKILL.md +519 -0
- package/.agent/skills/quality-validation/SKILL.md.backup +573 -0
- package/.agent/skills/quality-validation/SKILL.md.backup_20260105_093646 +573 -0
- package/.agent/skills/ralph/SKILL.md +236 -0
- package/.agent/skills/ralph-init/SKILL.md +78 -0
- package/.agent/skills/ralplan/SKILL.md +58 -0
- package/.agent/skills/refactor-clean/SKILL.md +49 -0
- package/.agent/skills/release/SKILL.md +84 -0
- package/.agent/skills/research/SKILL.md +526 -0
- package/.agent/skills/research-methodology/SKILL.md +268 -0
- package/.agent/skills/review/SKILL.md +53 -0
- package/.agent/skills/security-review/SKILL.md +509 -0
- package/.agent/skills/security-review/cloud-infrastructure-security.md +361 -0
- package/.agent/skills/setup-pm/SKILL.md +102 -0
- package/.agent/skills/skill/SKILL.md +424 -0
- package/.agent/skills/skill-create/SKILL.md +209 -0
- package/.agent/skills/skill-debugger/HOW_TO_USE.md +244 -0
- package/.agent/skills/skill-debugger/README.md +44 -0
- package/.agent/skills/skill-debugger/SKILL.md +326 -0
- package/.agent/skills/skill-debugger/diagnostic_checklist.md +115 -0
- package/.agent/skills/skill-development/SKILL.md +661 -0
- package/.agent/skills/skill-development/references/skill-creator-original.md +209 -0
- package/.agent/skills/skill-doc-generator/README.md +37 -0
- package/.agent/skills/skill-doc-generator/SKILL.md +331 -0
- package/.agent/skills/skill-quality-analyzer/HOW_TO_USE.md +243 -0
- package/.agent/skills/skill-quality-analyzer/README.md +61 -0
- package/.agent/skills/skill-quality-analyzer/SKILL.md +247 -0
- package/.agent/skills/skill-quality-analyzer/analyzer.py +209 -0
- package/.agent/skills/skill-quality-analyzer/expected_output.json +81 -0
- package/.agent/skills/skill-quality-analyzer/sample_input.json +9 -0
- package/.agent/skills/skill-tester/README.md +46 -0
- package/.agent/skills/skill-tester/SKILL.md +345 -0
- package/.agent/skills/start-dev/SKILL.md +701 -0
- package/.agent/skills/swarm/SKILL.md +691 -0
- package/.agent/skills/task-kb-lookup/SKILL.md +211 -0
- package/.agent/skills/task-kb-record/SKILL.md +417 -0
- package/.agent/skills/tdd/SKILL.md +446 -0
- package/.agent/skills/tdd-generator/DEMO.md +516 -0
- package/.agent/skills/tdd-generator/README.md +89 -0
- package/.agent/skills/tdd-generator/SKILL.md +278 -0
- package/.agent/skills/tdd-workflow/SKILL.md +424 -0
- package/.agent/skills/test-coverage/SKILL.md +48 -0
- package/.agent/skills/thinkdeep/HOW_TO_USE.md +183 -0
- package/.agent/skills/thinkdeep/README.md +41 -0
- package/.agent/skills/thinkdeep/SKILL.md +343 -0
- package/.agent/skills/ui-ux-pro-max/SKILL.md +228 -0
- package/.agent/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/.agent/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/.agent/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/.agent/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/.agent/skills/ui-ux-pro-max/data/prompts.csv +24 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/.agent/skills/ui-ux-pro-max/data/styles.csv +59 -0
- package/.agent/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/.agent/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/.agent/skills/ui-ux-pro-max/scripts/core.py +236 -0
- package/.agent/skills/ui-ux-pro-max/scripts/search.py +61 -0
- package/.agent/skills/ultrapilot/SKILL.md +647 -0
- package/.agent/skills/ultraqa/SKILL.md +152 -0
- package/.agent/skills/ultrawork/SKILL.md +123 -0
- package/.agent/skills/update-codemaps/SKILL.md +38 -0
- package/.agent/skills/update-docs/SKILL.md +52 -0
- package/.agent/skills/verification-loop/SKILL.md +140 -0
- package/.agent/skills/verify/SKILL.md +80 -0
- package/.agent/skills/writer-memory/SKILL.md +459 -0
- package/.agent/skills/writer-memory/lib/character-tracker.ts +338 -0
- package/.agent/skills/writer-memory/lib/memory-manager.ts +804 -0
- package/.agent/skills/writer-memory/lib/relationship-graph.ts +400 -0
- package/.agent/skills/writer-memory/lib/scene-organizer.ts +544 -0
- package/.agent/skills/writer-memory/lib/synopsis-builder.ts +339 -0
- package/.agent/skills/writer-memory/templates/synopsis-template.md +46 -0
- package/.governance/skill-lint.allowlist +4 -0
- package/.governance/skill-llm.allowlist +4 -0
- package/AGENTS.md +59 -0
- package/LICENSE +21 -0
- package/README.md +169 -0
- package/README.zh.md +145 -0
- package/bin/omcodex.js +8 -0
- package/commands/conductor/implement.toml +358 -0
- package/commands/conductor/newTrack.toml +142 -0
- package/commands/conductor/revert.toml +123 -0
- package/commands/conductor/setup.toml +429 -0
- package/commands/conductor/status.toml +57 -0
- package/docs/ALIGNMENT.md +40 -0
- package/docs/CODEX.md +133 -0
- package/docs/NOTIFY.md +81 -0
- package/docs/SKILL_GOVERNANCE.md +72 -0
- package/docs/SKILL_GOVERNANCE_FRAMEWORK.md +182 -0
- package/docs/SKILL_GOVERNANCE_FRAMEWORK.zh.md +170 -0
- package/package.json +50 -0
- package/prompts/architect.md +105 -0
- package/prompts/executor.md +134 -0
- package/prompts/planner.md +113 -0
- package/scripts/check-skill-governance.sh +84 -0
- package/scripts/check-skill-llm-governance.js +302 -0
- package/scripts/eval-skills.js +217 -0
- package/scripts/generate-catalog-docs.js +95 -0
- package/scripts/generate-codex-mcp-config.sh +22 -0
- package/scripts/install-codex-force.sh +5 -0
- package/scripts/install-codex-incremental.sh +5 -0
- package/scripts/install-codex.sh +79 -0
- package/scripts/notify-dispatch.js +15 -0
- package/scripts/setup-package-manager.js +137 -0
- package/src/catalog/generated/public-catalog.json +547 -0
- package/src/catalog/manifest.json +542 -0
- package/src/catalog/reader.js +43 -0
- package/src/catalog/schema.js +79 -0
- package/src/cli/doctor.js +62 -0
- package/src/cli/index.js +85 -0
- package/src/cli/notify.js +127 -0
- package/src/cli/route.js +43 -0
- package/src/cli/setup.js +155 -0
- package/src/cli/team.js +125 -0
- package/src/config/generator.js +119 -0
- package/src/mcp/memory-server.js +241 -0
- package/src/mcp/state-server.js +112 -0
- package/src/mcp/trace-server.js +168 -0
- package/src/notify/dispatch.js +74 -0
- package/src/notify/extensibility/dispatcher.js +113 -0
- package/src/notify/extensibility/events.js +15 -0
- package/src/notify/extensibility/loader.js +54 -0
- package/src/router/skill-router.js +90 -0
- package/src/team/auto-advance.js +72 -0
- package/src/team/orchestrator.js +82 -0
- package/src/team/state-store.js +33 -0
- package/src/utils/paths.js +33 -0
- package/templates/AGENTS.md +15 -0
- package/templates/catalog-manifest.json +542 -0
- package/templates/code_styleguides/csharp.md +115 -0
- package/templates/code_styleguides/dart.md +238 -0
- package/templates/code_styleguides/general.md +23 -0
- package/templates/code_styleguides/go.md +48 -0
- package/templates/code_styleguides/html-css.md +49 -0
- package/templates/code_styleguides/javascript.md +51 -0
- package/templates/code_styleguides/python.md +37 -0
- package/templates/code_styleguides/typescript.md +43 -0
- package/templates/rules/README.md +23 -0
- package/templates/rules/agents.md +49 -0
- package/templates/rules/coding-style.md +70 -0
- package/templates/rules/dev.md +20 -0
- package/templates/rules/git-workflow.md +45 -0
- package/templates/rules/notify.md +6 -0
- package/templates/rules/patterns.md +55 -0
- package/templates/rules/performance.md +47 -0
- package/templates/rules/research.md +26 -0
- package/templates/rules/review.md +22 -0
- package/templates/rules/security.md +36 -0
- package/templates/rules/testing.md +30 -0
- package/templates/workflow.md +333 -0
|
@@ -0,0 +1,704 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: aireview
|
|
3
|
+
description: Professional multi-agent AI code review with confidence scoring
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# aireview - Enhanced AI Code Review
|
|
7
|
+
|
|
8
|
+
## Native Subagent Protocol (Codex)
|
|
9
|
+
|
|
10
|
+
Codex supports native subagents. Delegate with `spawn_agent`, coordinate with `send_input`, collect via `wait`, and clean up with `close_agent`.
|
|
11
|
+
|
|
12
|
+
Execution preference:
|
|
13
|
+
1. Use native subagents first for independent workstreams (parallel when possible).
|
|
14
|
+
2. Merge results in main thread and run final verification.
|
|
15
|
+
3. Fallback only when delegation is blocked: use the `[ANALYST]`/`[ARCHITECT]`/`[EXECUTOR]`/`[REVIEWER]` structure in a single response.
|
|
16
|
+
|
|
17
|
+
Minimal orchestration pattern:
|
|
18
|
+
```text
|
|
19
|
+
spawn_agent -> send_input (optional) -> wait -> close_agent
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
> Codex invocation: use `aireview: ...` or `$aireview ...`
|
|
23
|
+
|
|
24
|
+
Professional code review combining multi-agent parallel analysis with direct CLI invocations.
|
|
25
|
+
|
|
26
|
+
## Positioning in Review Stack
|
|
27
|
+
|
|
28
|
+
`aireview` is the advanced review layer, not a replacement for `code-review`.
|
|
29
|
+
|
|
30
|
+
Recommended usage:
|
|
31
|
+
1. Start with `$code-review` for baseline findings and fast signal.
|
|
32
|
+
2. Escalate to `$aireview` when the diff is large, sensitive, or cross-cutting.
|
|
33
|
+
3. Use `$aireview --deep` for merge gates on high-risk changes.
|
|
34
|
+
|
|
35
|
+
## Language Configuration
|
|
36
|
+
|
|
37
|
+
**始终使用中文回复**: All AI review results will be presented in Chinese.
|
|
38
|
+
|
|
39
|
+
## Quick Usage
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Review changes (most common)
|
|
43
|
+
aireview --diff # Review unstaged changes
|
|
44
|
+
aireview --diff --staged # Review staged changes
|
|
45
|
+
aireview --diff HEAD~1..HEAD # Review last commit
|
|
46
|
+
|
|
47
|
+
# Remote branch/PR review (NEW)
|
|
48
|
+
aireview origin/feature-branch # Review remote branch
|
|
49
|
+
aireview origin/feature-branch --quick # Quick review (small PR)
|
|
50
|
+
aireview origin/feature-branch --deep # Deep review (large PR)
|
|
51
|
+
|
|
52
|
+
# GitHub/GitLab PR review (if in PR context)
|
|
53
|
+
aireview --pr [PR_NUMBER] # Review specific PR
|
|
54
|
+
aireview --pr --comment # Post review as PR comment
|
|
55
|
+
|
|
56
|
+
# Deep review (Multi-AI collaboration)
|
|
57
|
+
aireview --diff --deep # Gemini + Codex parallel analysis
|
|
58
|
+
|
|
59
|
+
# Standard file/directory review
|
|
60
|
+
aireview ./src/auth
|
|
61
|
+
aireview ./src/auth/service.ts --model codex
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Enhanced Architecture
|
|
65
|
+
|
|
66
|
+
### Multi-Agent Parallel Review
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
aireview --diff
|
|
71
|
+
↓
|
|
72
|
+
Step 1: Eligibility Check (Haiku Agent)
|
|
73
|
+
- Check if review needed
|
|
74
|
+
- Skip if: closed PR, draft, trivial change, already reviewed
|
|
75
|
+
↓
|
|
76
|
+
Step 2: Gather Context (Haiku Agent)
|
|
77
|
+
- Find CLAUDE.md files (root + modified directories)
|
|
78
|
+
- Get change summary
|
|
79
|
+
↓
|
|
80
|
+
Step 3: Parallel Review (5 Specialized Agents)
|
|
81
|
+
┌─────────────────────────────────────────────┐
|
|
82
|
+
│ Agent #1 (INTJ): CLAUDE.md Compliance │
|
|
83
|
+
│ Agent #2 (ISTJ): Bug Detection (changes) │
|
|
84
|
+
│ Agent #3 (INTP): Git History Context │
|
|
85
|
+
│ Agent #4 (ENTP): Related PR Analysis │
|
|
86
|
+
│ Agent #5 (ISFJ): Code Comment Compliance │
|
|
87
|
+
└─────────────────────────────────────────────┘
|
|
88
|
+
↓
|
|
89
|
+
Step 4: Confidence Scoring (Parallel Haiku Agents)
|
|
90
|
+
- Score each issue 0-100
|
|
91
|
+
- Filter issues < 80 confidence
|
|
92
|
+
↓
|
|
93
|
+
Step 5: Generate Report (Main agent)
|
|
94
|
+
- Format and present findings
|
|
95
|
+
- Link to specific code lines
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Deep Mode: Multi-Model Sequential Analysis
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
aireview --diff --deep
|
|
102
|
+
↓
|
|
103
|
+
Layer 1: Parallel Multi-Agent Review (Step 1-3 above)
|
|
104
|
+
↓
|
|
105
|
+
Layer 2: Gemini Deep Analysis (via gemp)
|
|
106
|
+
- Architecture review (INTJ persona)
|
|
107
|
+
- Security analysis
|
|
108
|
+
- Performance implications
|
|
109
|
+
↓
|
|
110
|
+
Layer 3: Codex Quality Audit
|
|
111
|
+
- TypeScript/React best practices (ISTJ persona)
|
|
112
|
+
- Code maintainability
|
|
113
|
+
- Pattern adherence
|
|
114
|
+
↓
|
|
115
|
+
Layer 4: Synthesis & Scoring
|
|
116
|
+
- Combine all findings
|
|
117
|
+
- Final confidence scoring
|
|
118
|
+
- Comprehensive report
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Implementation
|
|
122
|
+
|
|
123
|
+
When user invokes `aireview`, execute the following:
|
|
124
|
+
|
|
125
|
+
### Step 1: Parse Parameters & Eligibility Check
|
|
126
|
+
|
|
127
|
+
```markdown
|
|
128
|
+
Parse command line arguments:
|
|
129
|
+
- MODE: "standard" | "deep" | "quick" | "pr" | "remote-branch"
|
|
130
|
+
- REVIEW_TARGET: File/directory path or remote branch name
|
|
131
|
+
- PR_NUMBER: Pull request number (if --pr)
|
|
132
|
+
- POST_COMMENT: true if --comment flag
|
|
133
|
+
- QUICK_MODE: true if --quick flag (fast review for small PRs)
|
|
134
|
+
|
|
135
|
+
If first argument starts with "origin/":
|
|
136
|
+
MODE = "remote-branch"
|
|
137
|
+
REMOTE_BRANCH = first argument (e.g., "origin/feature-cr")
|
|
138
|
+
|
|
139
|
+
# Fetch latest remote changes
|
|
140
|
+
Execute: git fetch origin
|
|
141
|
+
|
|
142
|
+
# Get PR size and determine review mode
|
|
143
|
+
Execute: git diff --stat origin/master...$REMOTE_BRANCH
|
|
144
|
+
Parse output to get file count and line changes
|
|
145
|
+
|
|
146
|
+
Auto-select mode if not specified:
|
|
147
|
+
If files <= 3:
|
|
148
|
+
MODE = "quick" # Small PR, fast review
|
|
149
|
+
Else if files <= 10:
|
|
150
|
+
MODE = "standard" # Medium PR, standard review
|
|
151
|
+
Else:
|
|
152
|
+
MODE = "deep" # Large PR, deep review
|
|
153
|
+
|
|
154
|
+
If MODE == "pr":
|
|
155
|
+
Launch Haiku agent to check:
|
|
156
|
+
1. Is PR closed?
|
|
157
|
+
2. Is PR draft?
|
|
158
|
+
3. Is change trivial (< 10 lines, auto-generated)?
|
|
159
|
+
4. Already reviewed by Codex?
|
|
160
|
+
|
|
161
|
+
If any is true → Exit with message
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Step 2: Gather Context
|
|
165
|
+
|
|
166
|
+
```markdown
|
|
167
|
+
If MODE == "remote-branch":
|
|
168
|
+
# Get diff content for remote branch review
|
|
169
|
+
Execute: git diff origin/master...$REMOTE_BRANCH > /tmp/pr_diff.txt
|
|
170
|
+
Execute: git log origin/master..$REMOTE_BRANCH --oneline
|
|
171
|
+
|
|
172
|
+
DIFF_CONTENT = read /tmp/pr_diff.txt
|
|
173
|
+
COMMIT_LOG = git log output
|
|
174
|
+
|
|
175
|
+
# For remote branch, use simplified context gathering
|
|
176
|
+
Find CLAUDE.md in root (skip directory-specific CLAUDE.md)
|
|
177
|
+
|
|
178
|
+
Else:
|
|
179
|
+
Launch Haiku agent to:
|
|
180
|
+
1. Find CLAUDE.md files:
|
|
181
|
+
- Root CLAUDE.md
|
|
182
|
+
- CLAUDE.md in modified directories
|
|
183
|
+
|
|
184
|
+
2. Get change summary:
|
|
185
|
+
- Files modified
|
|
186
|
+
- Lines changed
|
|
187
|
+
- Overall purpose
|
|
188
|
+
|
|
189
|
+
Return: {claude_md_files: [], summary: "", diff_content: ""}
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Step 3: Launch Parallel Review Agents
|
|
193
|
+
|
|
194
|
+
```markdown
|
|
195
|
+
If MODE == "quick":
|
|
196
|
+
# Quick mode: Skip parallel agents, use single fast Gemini review
|
|
197
|
+
|
|
198
|
+
Execute quick review via gemp:
|
|
199
|
+
|
|
200
|
+
cat > /tmp/quick_review_prompt.txt << 'PROMPT_EOF'
|
|
201
|
+
你是代码审查专家,快速审查以下远程分支变更:
|
|
202
|
+
|
|
203
|
+
**分支**: {REMOTE_BRANCH}
|
|
204
|
+
**提交**: {COMMIT_LOG}
|
|
205
|
+
|
|
206
|
+
```diff
|
|
207
|
+
{DIFF_CONTENT}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
只报告:
|
|
211
|
+
1. ❌ 明显错误 (语法、逻辑)
|
|
212
|
+
2. ❌ 安全漏洞 (注入、XSS、敏感信息)
|
|
213
|
+
3. ❌ 破坏性变更 (API 变更、向后兼容)
|
|
214
|
+
|
|
215
|
+
如果没有严重问题,直接说 "✅ 无明显问题,可以合并"
|
|
216
|
+
|
|
217
|
+
如果有问题,格式:
|
|
218
|
+
## ❌ 阻止合并
|
|
219
|
+
|
|
220
|
+
**问题**: [简短描述]
|
|
221
|
+
**位置**: `file:line`
|
|
222
|
+
**修复**: [一句话建议]
|
|
223
|
+
|
|
224
|
+
## ✅ 合并建议
|
|
225
|
+
|
|
226
|
+
- [ ] 可以合并
|
|
227
|
+
- [ ] 修复后合并
|
|
228
|
+
- [ ] 不建议合并
|
|
229
|
+
PROMPT_EOF
|
|
230
|
+
|
|
231
|
+
cat /tmp/quick_review_prompt.txt | gemp 2>&1
|
|
232
|
+
|
|
233
|
+
Skip to Step 6 (Generate Report)
|
|
234
|
+
|
|
235
|
+
Else:
|
|
236
|
+
Launch 5 parallel agents (use `spawn_agent` in parallel; prefer lightweight agent profiles for speed):
|
|
237
|
+
|
|
238
|
+
Agent #1 - CLAUDE.md Compliance (INTJ Persona):
|
|
239
|
+
Prompt: |
|
|
240
|
+
你是 INTJ 架构师,专注于规范合规性审查。
|
|
241
|
+
|
|
242
|
+
CLAUDE.md 规范文件:
|
|
243
|
+
{claude_md_files}
|
|
244
|
+
|
|
245
|
+
代码变更:
|
|
246
|
+
{diff_content}
|
|
247
|
+
|
|
248
|
+
任务:检查代码是否违反 CLAUDE.md 中的明确指令。
|
|
249
|
+
只标记明确违反的情况,避免泛泛的代码质量问题。
|
|
250
|
+
|
|
251
|
+
输出格式:
|
|
252
|
+
- 问题描述
|
|
253
|
+
- 违反的 CLAUDE.md 指令(引用原文)
|
|
254
|
+
- 建议修复方案
|
|
255
|
+
- 初步置信度 (0-100)
|
|
256
|
+
|
|
257
|
+
Agent #2 - Bug Detection (ISTJ Persona):
|
|
258
|
+
Prompt: |
|
|
259
|
+
你是 ISTJ 工程师,专注于 Bug 检测。
|
|
260
|
+
|
|
261
|
+
代码变更:
|
|
262
|
+
{diff_content}
|
|
263
|
+
|
|
264
|
+
任务:浅层扫描变更部分的明显 bug。
|
|
265
|
+
专注于大问题,忽略小细节和可能的误报。
|
|
266
|
+
|
|
267
|
+
False Positive 规则(不要标记):
|
|
268
|
+
- 预存在的问题
|
|
269
|
+
- linter/typechecker 会捕获的问题
|
|
270
|
+
- 样式问题
|
|
271
|
+
- 格式问题
|
|
272
|
+
- 可能是有意的功能变更
|
|
273
|
+
|
|
274
|
+
输出格式:
|
|
275
|
+
- Bug 描述
|
|
276
|
+
- 影响范围
|
|
277
|
+
- 建议修复方案
|
|
278
|
+
- 初步置信度 (0-100)
|
|
279
|
+
|
|
280
|
+
Agent #3 - Git History Analysis (INTP Persona):
|
|
281
|
+
Prompt: |
|
|
282
|
+
你是 INTP 性能极客,专注于历史上下文分析。
|
|
283
|
+
|
|
284
|
+
使用 git blame 查看修改代码的历史。
|
|
285
|
+
检查:
|
|
286
|
+
- 之前的 commit 是否揭示了问题
|
|
287
|
+
- 修改是否与历史模式一致
|
|
288
|
+
- 是否引入了回归问题
|
|
289
|
+
|
|
290
|
+
输出格式:
|
|
291
|
+
- 历史上下文发现
|
|
292
|
+
- 潜在回归问题
|
|
293
|
+
- 初步置信度 (0-100)
|
|
294
|
+
|
|
295
|
+
Agent #4 - Related PR Analysis (ENTP Persona):
|
|
296
|
+
Prompt: |
|
|
297
|
+
你是 ENTP 创新者,专注于 PR 关联分析。
|
|
298
|
+
|
|
299
|
+
查找之前修改相同文件的 PR。
|
|
300
|
+
检查:
|
|
301
|
+
- 之前 PR 的评论是否也适用于当前变更
|
|
302
|
+
- 是否有重复的问题模式
|
|
303
|
+
|
|
304
|
+
输出格式:
|
|
305
|
+
- 相关 PR 发现
|
|
306
|
+
- 适用的历史评论
|
|
307
|
+
- 初步置信度 (0-100)
|
|
308
|
+
|
|
309
|
+
Agent #5 - Code Comment Compliance (ISFJ Persona):
|
|
310
|
+
Prompt: |
|
|
311
|
+
你是 ISFJ 维护者,专注于代码注释合规性。
|
|
312
|
+
|
|
313
|
+
读取修改文件中的代码注释。
|
|
314
|
+
检查:
|
|
315
|
+
- 代码变更是否遵循注释中的指导
|
|
316
|
+
- 是否违反了 TODO/FIXME 注释
|
|
317
|
+
- 是否忽略了重要的警告注释
|
|
318
|
+
|
|
319
|
+
输出格式:
|
|
320
|
+
- 注释合规性问题
|
|
321
|
+
- 违反的具体注释
|
|
322
|
+
- 初步置信度 (0-100)
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
### Step 4: Confidence Scoring & Filtering
|
|
326
|
+
|
|
327
|
+
```markdown
|
|
328
|
+
For each issue from Step 3, launch a Haiku agent:
|
|
329
|
+
|
|
330
|
+
Prompt: |
|
|
331
|
+
你是专业的代码审查评分员。
|
|
332
|
+
|
|
333
|
+
问题描述:{issue}
|
|
334
|
+
代码变更:{diff_content}
|
|
335
|
+
CLAUDE.md 文件:{claude_md_files}
|
|
336
|
+
|
|
337
|
+
评分标准 (0-100):
|
|
338
|
+
- 0: 完全不确定,明显的误报
|
|
339
|
+
- 25: 有点怀疑,可能是误报,未明确在 CLAUDE.md 中提到
|
|
340
|
+
- 50: 中等确信,已验证是真实问题,但不是很重要
|
|
341
|
+
- 75: 高度确信,双重检查过,会影响功能,或 CLAUDE.md 明确提到
|
|
342
|
+
- 100: 绝对确定,确认是真实问题,经常发生
|
|
343
|
+
|
|
344
|
+
False Positive 规则(降低分数):
|
|
345
|
+
- 预存在的问题
|
|
346
|
+
- 看起来像 bug 但实际不是
|
|
347
|
+
- 吹毛求疵的小问题
|
|
348
|
+
- linter/typechecker 会捕获的问题
|
|
349
|
+
- 缺少测试覆盖率(除非 CLAUDE.md 要求)
|
|
350
|
+
- CLAUDE.md 提到但代码中明确忽略的问题
|
|
351
|
+
- 可能是有意的功能变更
|
|
352
|
+
- 真实问题,但在用户未修改的行上
|
|
353
|
+
|
|
354
|
+
输出:最终置信度分数 (0-100)
|
|
355
|
+
|
|
356
|
+
Filter: 只保留置信度 >= 80 的问题
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
### Step 5: Deep Mode (Optional)
|
|
360
|
+
|
|
361
|
+
```markdown
|
|
362
|
+
If MODE == "deep":
|
|
363
|
+
|
|
364
|
+
Layer 2 - Gemini Architecture Analysis:
|
|
365
|
+
Use Skill tool with 'code-review' skill (standard mode)
|
|
366
|
+
Or direct CLI:
|
|
367
|
+
|
|
368
|
+
cat > /tmp/gemini_prompt.txt << 'PROMPT_EOF'
|
|
369
|
+
你是 INTJ 架构师,进行深度架构分析。
|
|
370
|
+
|
|
371
|
+
已发现的高置信度问题:
|
|
372
|
+
{filtered_issues}
|
|
373
|
+
|
|
374
|
+
代码变更:
|
|
375
|
+
{diff_content}
|
|
376
|
+
|
|
377
|
+
任务:
|
|
378
|
+
1. 验证已发现的架构问题
|
|
379
|
+
2. 识别额外的架构级别问题
|
|
380
|
+
3. 评估安全性影响
|
|
381
|
+
4. 分析性能影响
|
|
382
|
+
|
|
383
|
+
输出:
|
|
384
|
+
- 架构问题列表
|
|
385
|
+
- 安全性评估
|
|
386
|
+
- 性能影响
|
|
387
|
+
- 总体架构评分 (1-10)
|
|
388
|
+
PROMPT_EOF
|
|
389
|
+
|
|
390
|
+
cat /tmp/gemini_prompt.txt | node ~/.gemini/long_task_runner.js 2>&1
|
|
391
|
+
|
|
392
|
+
Layer 3 - Codex Quality Audit:
|
|
393
|
+
cat > /tmp/codex_prompt.txt << 'PROMPT_EOF'
|
|
394
|
+
你是 ISTJ 工程师,进行代码质量审计。
|
|
395
|
+
|
|
396
|
+
已发现的高置信度问题:
|
|
397
|
+
{filtered_issues}
|
|
398
|
+
|
|
399
|
+
Gemini 的架构发现:
|
|
400
|
+
{gemini_findings}
|
|
401
|
+
|
|
402
|
+
代码变更:
|
|
403
|
+
{diff_content}
|
|
404
|
+
|
|
405
|
+
任务:
|
|
406
|
+
1. 验证代码质量问题
|
|
407
|
+
2. 检查 TypeScript/React 最佳实践
|
|
408
|
+
3. 评估可维护性
|
|
409
|
+
4. 识别模式违规
|
|
410
|
+
|
|
411
|
+
输出:
|
|
412
|
+
- 代码质量问题列表
|
|
413
|
+
- 最佳实践违规
|
|
414
|
+
- 可维护性评估
|
|
415
|
+
- 总体质量评分 (1-10)
|
|
416
|
+
PROMPT_EOF
|
|
417
|
+
|
|
418
|
+
cat /tmp/codex_prompt.txt | codex exec --dangerously-bypass-approvals-and-sandbox - 2>&1
|
|
419
|
+
|
|
420
|
+
Layer 4 - Synthesis:
|
|
421
|
+
Combine findings from all layers
|
|
422
|
+
Recalculate confidence scores
|
|
423
|
+
Generate comprehensive report
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
### Step 6: Generate Report
|
|
427
|
+
|
|
428
|
+
```markdown
|
|
429
|
+
Format based on mode:
|
|
430
|
+
|
|
431
|
+
If filtered_issues.length == 0:
|
|
432
|
+
Output: |
|
|
433
|
+
## AI 审查报告
|
|
434
|
+
**模式**: {MODE}
|
|
435
|
+
**模型**: {models_used}
|
|
436
|
+
|
|
437
|
+
未发现问题。已检查:
|
|
438
|
+
- Bugs
|
|
439
|
+
- CLAUDE.md 合规性
|
|
440
|
+
- 历史上下文
|
|
441
|
+
- 相关 PR
|
|
442
|
+
- 代码注释合规性
|
|
443
|
+
|
|
444
|
+
🤖 Generated with Codex
|
|
445
|
+
|
|
446
|
+
Else:
|
|
447
|
+
Output: |
|
|
448
|
+
## AI 审查报告
|
|
449
|
+
**模式**: {MODE}
|
|
450
|
+
**模型**: {models_used}
|
|
451
|
+
**文件**: {files_count}个文件变更,+{lines_added}/-{lines_removed}行
|
|
452
|
+
|
|
453
|
+
发现 {issues_count} 个高置信度问题:
|
|
454
|
+
|
|
455
|
+
{for each issue}
|
|
456
|
+
### {severity} - {issue.title}
|
|
457
|
+
|
|
458
|
+
**置信度**: {issue.confidence}/100
|
|
459
|
+
**来源**: {issue.agent} ({issue.persona})
|
|
460
|
+
**文件**: `{issue.file}:{issue.line}`
|
|
461
|
+
|
|
462
|
+
{issue.description}
|
|
463
|
+
|
|
464
|
+
**修复建议**:
|
|
465
|
+
{issue.fix_suggestion}
|
|
466
|
+
|
|
467
|
+
**代码链接**: {github_link_with_full_sha}
|
|
468
|
+
|
|
469
|
+
{end for}
|
|
470
|
+
|
|
471
|
+
---
|
|
472
|
+
|
|
473
|
+
## 总结
|
|
474
|
+
- **总体评分**: {overall_score}/10
|
|
475
|
+
- **严重问题**: {critical_count}个 (立即修复)
|
|
476
|
+
- **高优先级问题**: {high_count}个 (本周修复)
|
|
477
|
+
- **中等问题**: {medium_count}个 (本月修复)
|
|
478
|
+
|
|
479
|
+
{if deep_mode}
|
|
480
|
+
### 深度分析
|
|
481
|
+
**Gemini 架构评分**: {gemini_score}/10
|
|
482
|
+
{gemini_highlights}
|
|
483
|
+
|
|
484
|
+
**Codex 质量评分**: {codex_score}/10
|
|
485
|
+
{codex_highlights}
|
|
486
|
+
{end if}
|
|
487
|
+
|
|
488
|
+
🤖 Generated with Codex
|
|
489
|
+
|
|
490
|
+
{if pr_mode}
|
|
491
|
+
<sub>- 如果这个审查有帮助,请回复 👍。否则,回复 👎。</sub>
|
|
492
|
+
{end if}
|
|
493
|
+
|
|
494
|
+
If --comment flag && pr_mode:
|
|
495
|
+
Use gh pr comment to post the report
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
## MBTI Persona Mapping
|
|
499
|
+
|
|
500
|
+
| Agent Role | MBTI Persona | Focus Area |
|
|
501
|
+
|-----------|--------------|------------|
|
|
502
|
+
| CLAUDE.md Compliance | INTJ 架构师 | 规范遵守、系统设计 |
|
|
503
|
+
| Bug Detection | ISTJ 工程师 | 细节、逻辑错误 |
|
|
504
|
+
| Git History | INTP 性能极客 | 模式、历史上下文 |
|
|
505
|
+
| Related PR | ENTP 创新者 | 关联性、创新视角 |
|
|
506
|
+
| Code Comments | ISFJ 维护者 | 注释、文档一致性 |
|
|
507
|
+
|
|
508
|
+
## Confidence Score Rubric
|
|
509
|
+
|
|
510
|
+
| Score | Meaning | Example |
|
|
511
|
+
|-------|---------|---------|
|
|
512
|
+
| 0 | 完全不确定 | 明显误报、预存在问题 |
|
|
513
|
+
| 25 | 有点怀疑 | 可能是问题,但未验证 |
|
|
514
|
+
| 50 | 中等确信 | 真实问题,但不重要 |
|
|
515
|
+
| 75 | 高度确信 | 影响功能,CLAUDE.md 明确提到 |
|
|
516
|
+
| 100 | 绝对确定 | 确认的真实问题,经常发生 |
|
|
517
|
+
|
|
518
|
+
**过滤阈值**: 80+ (只展示高度确信的问题)
|
|
519
|
+
|
|
520
|
+
## False Positive Rules
|
|
521
|
+
|
|
522
|
+
**不要标记以下情况** (降低置信度分数):
|
|
523
|
+
|
|
524
|
+
1. **预存在的问题** - 在变更前就存在
|
|
525
|
+
2. **工具可捕获** - linter、typechecker、compiler 会发现
|
|
526
|
+
3. **样式问题** - 格式、命名(除非 CLAUDE.md 明确要求)
|
|
527
|
+
4. **吹毛求疵** - 资深工程师不会提的小问题
|
|
528
|
+
5. **有意变更** - 功能变更可能是有意的
|
|
529
|
+
6. **未修改行** - 问题在用户未修改的代码行
|
|
530
|
+
7. **明确忽略** - CLAUDE.md 提到但代码中明确忽略(lint ignore)
|
|
531
|
+
8. **缺少测试** - 除非 CLAUDE.md 明确要求测试覆盖率
|
|
532
|
+
|
|
533
|
+
## Core Advantages
|
|
534
|
+
|
|
535
|
+
### Core Features
|
|
536
|
+
- ✅ 多 agent 并行审查 (5 agents)
|
|
537
|
+
- ✅ 置信度评分系统 (0-100)
|
|
538
|
+
- ✅ False positive 过滤 (阈值 80)
|
|
539
|
+
- ✅ CLAUDE.md 合规性检查
|
|
540
|
+
- ✅ GitHub PR 集成
|
|
541
|
+
|
|
542
|
+
### From Original aireview
|
|
543
|
+
- ✅ 直接 CLI 调用 (无超时)
|
|
544
|
+
- ✅ gemp 优先 (20分钟超时)
|
|
545
|
+
- ✅ MBTI 人格系统
|
|
546
|
+
- ✅ Deep mode (多模型协作)
|
|
547
|
+
- ✅ 中文输出
|
|
548
|
+
|
|
549
|
+
### Enhanced Features
|
|
550
|
+
- ✅ Git history 上下文分析
|
|
551
|
+
- ✅ 相关 PR 分析
|
|
552
|
+
- ✅ 代码注释合规性检查
|
|
553
|
+
- ✅ 分层分析 (multi-agent → Gemini → Codex → synthesis)
|
|
554
|
+
- ✅ 详���的置信度评分标准
|
|
555
|
+
|
|
556
|
+
## CLI Implementation Templates
|
|
557
|
+
|
|
558
|
+
### Gemini CLI (优先 gemp)
|
|
559
|
+
```bash
|
|
560
|
+
cat > /tmp/gemini_prompt.txt << 'PROMPT_EOF'
|
|
561
|
+
{persona} 你的审查任务...
|
|
562
|
+
PROMPT_EOF
|
|
563
|
+
cat /tmp/gemini_prompt.txt | node ~/.gemini/long_task_runner.js 2>&1
|
|
564
|
+
```
|
|
565
|
+
|
|
566
|
+
### Gemini CLI (备用)
|
|
567
|
+
```bash
|
|
568
|
+
cat /tmp/gemini_prompt.txt | gemini --yolo 2>&1 | grep -v "STARTUP|YOLO|Load"
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
### Codex CLI
|
|
572
|
+
```bash
|
|
573
|
+
cat > /tmp/codex_prompt.txt << 'PROMPT_EOF'
|
|
574
|
+
{persona} 你的审查任务...
|
|
575
|
+
PROMPT_EOF
|
|
576
|
+
cat /tmp/codex_prompt.txt | codex exec --dangerously-bypass-approvals-and-sandbox - 2>&1
|
|
577
|
+
```
|
|
578
|
+
|
|
579
|
+
## Requirements
|
|
580
|
+
|
|
581
|
+
- Gemini CLI (gemp/long_task_runner.js) configured
|
|
582
|
+
- Codex CLI configured
|
|
583
|
+
- GitHub CLI (`gh`) for PR mode
|
|
584
|
+
- CLAUDE.md files (optional but recommended)
|
|
585
|
+
|
|
586
|
+
## Usage Examples
|
|
587
|
+
|
|
588
|
+
### Example 1: Standard Review
|
|
589
|
+
```bash
|
|
590
|
+
$ aireview --diff
|
|
591
|
+
|
|
592
|
+
🔍 正在执行多 agent 并行审查...
|
|
593
|
+
|
|
594
|
+
✅ Step 1: 资格检查通过
|
|
595
|
+
✅ Step 2: 找到 2 个 CLAUDE.md 文件
|
|
596
|
+
✅ Step 3: 启动 5 个并行审查 agents
|
|
597
|
+
✅ Step 4: 置信度评分完成,过滤后保留 3 个问题
|
|
598
|
+
|
|
599
|
+
## AI 审查报告
|
|
600
|
+
...
|
|
601
|
+
```
|
|
602
|
+
|
|
603
|
+
### Example 2: Remote Branch Quick Review (NEW)
|
|
604
|
+
```bash
|
|
605
|
+
$ aireview origin/feature-cr
|
|
606
|
+
|
|
607
|
+
🔍 正在获取远程分支信息...
|
|
608
|
+
✅ 已获取远程更新
|
|
609
|
+
📊 变更统计: 1 file, +1/-1 lines
|
|
610
|
+
🎯 自动选择: quick mode (小型 PR)
|
|
611
|
+
|
|
612
|
+
🔍 正在执行快速审查...
|
|
613
|
+
|
|
614
|
+
## ⚡ 快速审查报告
|
|
615
|
+
|
|
616
|
+
**PR**: `feature-cr` → `master`
|
|
617
|
+
**提交**: 2338116 - "docs(BDD_FOR_ELECTRON): 更新测试案例说明"
|
|
618
|
+
**变更**: 1 file, +1/-1 lines
|
|
619
|
+
|
|
620
|
+
---
|
|
621
|
+
|
|
622
|
+
### ❌ 阻止合并
|
|
623
|
+
|
|
624
|
+
**问题: 非专业用语**
|
|
625
|
+
- 文件: `BDD_FOR_ELECTRON.md:2`
|
|
626
|
+
- 问题: "这是给王大爷的测试案例" 不符合技术文档规范
|
|
627
|
+
- 修复: 移除此行或改为专业描述
|
|
628
|
+
|
|
629
|
+
**建议修复**:
|
|
630
|
+
```markdown
|
|
631
|
+
# Electron 项目的 BDD 完整实施方案
|
|
632
|
+
|
|
633
|
+
> 本文档提供 Electron 桌面应用的 BDD 完整实施指南
|
|
634
|
+
```
|
|
635
|
+
|
|
636
|
+
---
|
|
637
|
+
|
|
638
|
+
### ✅ 合并建议
|
|
639
|
+
|
|
640
|
+
- [ ] 可以合并
|
|
641
|
+
- [x] **修复后合并** (移除非专业用语)
|
|
642
|
+
- [ ] 不建议合并
|
|
643
|
+
|
|
644
|
+
---
|
|
645
|
+
|
|
646
|
+
**审查模型**: Gemini (gemp)
|
|
647
|
+
**审查时间**: 2025-12-29 14:00
|
|
648
|
+
**耗时**: < 30 秒
|
|
649
|
+
|
|
650
|
+
🤖 Generated with Codex
|
|
651
|
+
```
|
|
652
|
+
|
|
653
|
+
### Example 3: Remote Branch Deep Review
|
|
654
|
+
```bash
|
|
655
|
+
$ aireview origin/feature-payment --deep
|
|
656
|
+
|
|
657
|
+
🔍 正在获取远程分支信息...
|
|
658
|
+
✅ 已获取远程更新
|
|
659
|
+
📊 变更统计: 15 files, +450/-120 lines
|
|
660
|
+
🎯 自动选择: deep mode (大型 PR)
|
|
661
|
+
|
|
662
|
+
🔍 正在执行深度多模型审查...
|
|
663
|
+
|
|
664
|
+
✅ Layer 1: 多 agent 并行审查 (5 agents)
|
|
665
|
+
✅ Layer 2: Gemini 架构分析 (INTJ)
|
|
666
|
+
✅ Layer 3: Codex 质量审计 (ISTJ)
|
|
667
|
+
✅ Layer 4: 综合分析
|
|
668
|
+
|
|
669
|
+
## 深度 AI 审查报告
|
|
670
|
+
...
|
|
671
|
+
```
|
|
672
|
+
|
|
673
|
+
### Example 4: Deep Review (Original)
|
|
674
|
+
```bash
|
|
675
|
+
$ aireview --diff --deep
|
|
676
|
+
|
|
677
|
+
🔍 正在执行深度多模型审查...
|
|
678
|
+
|
|
679
|
+
✅ Layer 1: 多 agent 并行审查 (5 agents)
|
|
680
|
+
✅ Layer 2: Gemini 架构分析 (INTJ)
|
|
681
|
+
✅ Layer 3: Codex 质量审计 (ISTJ)
|
|
682
|
+
✅ Layer 4: 综合分析
|
|
683
|
+
|
|
684
|
+
## 深度 AI 审查报告
|
|
685
|
+
...
|
|
686
|
+
```
|
|
687
|
+
|
|
688
|
+
### Example 5: PR Review with Comment
|
|
689
|
+
```bash
|
|
690
|
+
$ aireview --pr 123 --comment
|
|
691
|
+
|
|
692
|
+
🔍 正在审查 PR #123...
|
|
693
|
+
|
|
694
|
+
✅ 审查完成,发布评论到 PR
|
|
695
|
+
```
|
|
696
|
+
|
|
697
|
+
---
|
|
698
|
+
|
|
699
|
+
**核心创新**:
|
|
700
|
+
1. Combined with official multi-agent architecture
|
|
701
|
+
2. 保留原有的 CLI 直接调用优势
|
|
702
|
+
3. 引入置信度评分和 false positive 过滤
|
|
703
|
+
4. 增强的 MBTI 人格专业化
|
|
704
|
+
5. 分层深度分析 (multi-agent → Gemini → Codex)
|