@leejungkiin/awkit 1.4.3 β 1.5.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.
- package/README.md +38 -14
- package/bin/awk.js +438 -86
- package/bin/claude-generators.js +3 -1
- package/bin/cline-generators.js +3 -1
- package/bin/codex-generators.js +7 -2
- package/core/orchestrator.md +17 -3
- package/core/skill-runtime-manifest.json +37 -0
- package/package.json +2 -2
- package/skill-packs/creator-studio/README.md +19 -0
- package/skill-packs/creator-studio/pack.json +10 -0
- package/skill-packs/marketing/README.md +64 -0
- package/skill-packs/marketing/pack.json +37 -0
- package/skill-packs/mobile-android/README.md +16 -0
- package/skill-packs/mobile-android/pack.json +10 -0
- package/skill-packs/mobile-ios/README.md +22 -0
- package/skill-packs/mobile-ios/pack.json +16 -0
- package/skill-packs/neural-memory/pack.json +8 -2
- package/skill-packs/superpowers/pack.json +1 -0
- package/skill-packs/superpowers/skills/single-flow-task-execution/SKILL.md +59 -358
- package/skill-packs/superpowers/skills/writing-skills/SKILL.md +60 -654
- package/skill-packs/superpowers/skills/writing-skills/examples/anti-rationalization.md +75 -0
- package/skill-packs/superpowers/skills/writing-skills/examples/cso-optimization.md +67 -0
- package/skill-packs/superpowers/skills/writing-skills/examples/tdd-for-skills.md +63 -0
- package/skills/CATALOG.md +49 -44
- package/skills/brainstorm-agent/SKILL.md +55 -315
- package/skills/brainstorm-agent/templates/brief-template.md +76 -0
- package/skills/codex-conductor/SKILL.md +55 -259
- package/skills/codex-conductor/examples/prompt-templates.md +72 -0
- package/skills/module-spec-writer/SKILL.md +38 -365
- package/skills/module-spec-writer/examples/port-migration-mode.md +40 -0
- package/skills/module-spec-writer/templates/module-spec-template.md +118 -0
- package/skills/orchestrator/SKILL.md +17 -8
- package/skills/single-flow-task-execution/SKILL.md +56 -363
- package/skills/single-flow-task-execution/examples/workflow-example.md +91 -0
- package/skills/smali-to-kotlin/SKILL.md +23 -416
- package/skills/smali-to-kotlin/examples/getting-started/tech-stack.md +58 -0
- package/skills/smali-to-kotlin/examples/pipeline/data-ui-parity.md +118 -0
- package/skills/smali-to-kotlin/examples/pipeline/scanner-and-bootstrap.md +106 -0
- package/skills/smali-to-swift/SKILL.md +18 -621
- package/skills/smali-to-swift/examples/getting-started/tech-stack.md +72 -0
- package/skills/smali-to-swift/examples/getting-started/toolchain.md +32 -0
- package/skills/smali-to-swift/examples/pipeline/core-logic.md +45 -0
- package/skills/smali-to-swift/examples/pipeline/data-layer.md +76 -0
- package/skills/smali-to-swift/examples/pipeline/framework-scanner.md +73 -0
- package/skills/smali-to-swift/examples/pipeline/project-bootstrap.md +76 -0
- package/skills/smali-to-swift/examples/pipeline/sdk-integration.md +66 -0
- package/skills/smali-to-swift/examples/pipeline/ui-viewmodel.md +96 -0
- package/skills/smali-to-swift/references/objc-to-swift-mapping.md +57 -0
- package/skills/spec-gate/SKILL.md +51 -265
- package/skills/spec-gate/templates/design-templates.md +93 -0
- package/skills/symphony-enforcer/SKILL.md +24 -555
- package/skills/symphony-enforcer/examples/startup-protocol.md +92 -0
- package/skills/symphony-enforcer/examples/task-completion.md +100 -0
- package/skills/symphony-enforcer/examples/three-phase.md +107 -0
- package/skills/symphony-enforcer/examples/trigger-points.md +99 -0
- package/skills/symphony-orchestrator/SKILL.md +1 -1
- package/skills/writing-skills/SKILL.md +82 -70
- package/skills/writing-skills/examples/anti-rationalization.md +53 -0
- package/skills/writing-skills/examples/cso-optimization.md +52 -0
- package/skills/writing-skills/examples/tdd-for-skills.md +48 -0
- package/templates/help.html +447 -0
- package/skills/memory-sync/SKILL.md +0 -424
- package/skills/memory-sync/memory-router.md +0 -185
- package/skills/memory-sync/memory-templates.md +0 -201
|
@@ -6,7 +6,7 @@ description: >-
|
|
|
6
6
|
Codex is READ-ONLY: it inspects and reports to .md files, never edits code.
|
|
7
7
|
metadata:
|
|
8
8
|
stage: core
|
|
9
|
-
version: "1.
|
|
9
|
+
version: "1.1"
|
|
10
10
|
requires: codex (npm i -g @openai/codex)
|
|
11
11
|
tags: [conductor, codex, debug, review, logic, verification, delegation]
|
|
12
12
|
agent: Inspector
|
|
@@ -15,323 +15,119 @@ invocation-type: auto
|
|
|
15
15
|
priority: 5
|
|
16
16
|
---
|
|
17
17
|
|
|
18
|
-
# π Codex Conductor
|
|
18
|
+
# π Codex Conductor β Router
|
|
19
19
|
|
|
20
|
-
> **Purpose:**
|
|
21
|
-
> **Key
|
|
20
|
+
> **Purpose:** Gα»i Codex CLI qua terminal khi cαΊ§n rΓ soΓ‘t logic, debug, review code chuyΓͺn sΓ’u.
|
|
21
|
+
> **Key:** Codex = Inspector (bΓ‘o cΓ‘o .md). TUYα»T Δα»I KHΓNG sα»a code.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
## π Topic Index
|
|
24
|
+
|
|
25
|
+
| Topic | Khi nΓ o load | File |
|
|
26
|
+
|-------|-------------|------|
|
|
27
|
+
| 6 prompt templates (bug, review, logic, test, plan, refactor) | Khi cαΊ§n invoke Codex | `examples/prompt-templates.md` |
|
|
24
28
|
|
|
25
|
-
## β οΈ
|
|
29
|
+
## β οΈ Three-Agent Model
|
|
26
30
|
|
|
27
31
|
```
|
|
28
32
|
Antigravity (IDE) = Executor β code, implement, create
|
|
29
33
|
Gemini CLI = Strategist β analysis, architecture, planning
|
|
30
34
|
Codex CLI = Inspector β debug, review, verify, test
|
|
31
|
-
|
|
32
|
-
ββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
33
|
-
β Codex CHα» RΓ SOΓT + TαΊ O BΓO CΓO (.md) β
|
|
34
|
-
β TUYα»T Δα»I KHΓNG ΔΖ―α»’C SỬA CODE β
|
|
35
|
-
ββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
36
35
|
```
|
|
37
36
|
|
|
38
|
-
---
|
|
39
|
-
|
|
40
37
|
## π§ Prerequisites
|
|
41
38
|
|
|
42
|
-
TrΖ°α»c khi gα»i Codex CLI, kiα»m tra:
|
|
43
|
-
|
|
44
39
|
```bash
|
|
45
|
-
# Check if codex is installed
|
|
46
40
|
which codex || command -v codex
|
|
41
|
+
# If not installed: npm i -g @openai/codex
|
|
47
42
|
```
|
|
48
43
|
|
|
49
|
-
```yaml
|
|
50
|
-
if_not_installed:
|
|
51
|
-
option_1: "npm i -g @openai/codex"
|
|
52
|
-
option_2: Ask user to install manually
|
|
53
|
-
message: "β οΈ Codex CLI chΖ°a cΓ i. ChαΊ‘y: npm i -g @openai/codex"
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
---
|
|
57
|
-
|
|
58
44
|
## π― Trigger Conditions
|
|
59
45
|
|
|
60
|
-
KΓch hoαΊ‘t khi Antigravity nhαΊn diα»n task cαΊ§n thαΊΏ mαΊ‘nh Codex:
|
|
61
|
-
|
|
62
46
|
```yaml
|
|
63
47
|
auto_trigger:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
- Logic verification (race conditions, edge cases)
|
|
68
|
-
- Implementation plan review (find holes in plan)
|
|
69
|
-
- Refactor verification (ensure no regression)
|
|
70
|
-
|
|
71
|
-
medium_confidence (confirm before invoking):
|
|
72
|
-
- Test case generation for new feature
|
|
73
|
-
- Security audit
|
|
74
|
-
- Performance bottleneck analysis
|
|
75
|
-
|
|
76
|
-
never_trigger:
|
|
77
|
-
- Simple questions / explanations
|
|
78
|
-
- UI-only changes (styling, layout)
|
|
79
|
-
- Documentation edits
|
|
80
|
-
- Tasks Antigravity can handle alone easily
|
|
48
|
+
high: Bug report | Pre-commit review (>3 files) | Logic verification | Plan review | Refactor verification
|
|
49
|
+
medium (confirm): Test generation | Security audit | Performance analysis
|
|
50
|
+
never: Simple questions | UI-only changes | Docs edits
|
|
81
51
|
```
|
|
82
52
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
## π§ CLI Invocation Pattern
|
|
86
|
-
|
|
87
|
-
### Mode 1: Quick Analysis (read + stream response)
|
|
53
|
+
## π§ CLI Invocation
|
|
88
54
|
|
|
55
|
+
### Mode 1: Quick Analysis
|
|
89
56
|
```bash
|
|
90
57
|
cd <PROJECT_ROOT> && timeout 120 codex \
|
|
91
|
-
"<PROMPT>. DO NOT edit any files.
|
|
92
|
-
--approval-mode suggest
|
|
93
|
-
-q 2>/dev/null
|
|
58
|
+
"<PROMPT>. DO NOT edit any files." \
|
|
59
|
+
--approval-mode suggest -q 2>/dev/null
|
|
94
60
|
```
|
|
95
61
|
|
|
96
|
-
|
|
97
|
-
|------|---------|
|
|
98
|
-
| `"prompt"` | Single-prompt mode β reads cwd, streams response, exits |
|
|
99
|
-
| `--approval-mode suggest` | Read-only: can browse files, won't make changes |
|
|
100
|
-
| `-q` | Quiet mode β no TUI, output to stdout |
|
|
101
|
-
|
|
102
|
-
### Mode 2: Deep Inspection (exec with JSON output)
|
|
103
|
-
|
|
62
|
+
### Mode 2: Deep Inspection
|
|
104
63
|
```bash
|
|
105
64
|
cd <PROJECT_ROOT> && timeout 180 codex exec \
|
|
106
|
-
"<PROMPT>. DO NOT edit any files.
|
|
65
|
+
"<PROMPT>. DO NOT edit any files." \
|
|
107
66
|
--json 2>/dev/null
|
|
108
67
|
```
|
|
109
68
|
|
|
110
|
-
| Flag | Purpose |
|
|
111
|
-
|------|---------|
|
|
112
|
-
| `exec` | Non-interactive scripting mode |
|
|
113
|
-
| `--json` | Structured JSON output for parsing |
|
|
114
|
-
|
|
115
69
|
### Safety Rules
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
- ALWAYS inject "DO NOT edit any files" in every prompt.
|
|
122
|
-
- Timeout: 120s for quick analysis, 180s for deep inspection.
|
|
123
|
-
- If CLI fails β gracefully fallback to Antigravity-only mode.
|
|
124
|
-
- NEVER pass secrets/tokens in prompt.
|
|
125
|
-
- Working directory: ALWAYS set to project root.
|
|
126
|
-
- Output: ALWAYS save to .md report file.
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
## π Use Cases & Prompt Templates
|
|
132
|
-
|
|
133
|
-
### 1. Bug Root Cause Analysis
|
|
134
|
-
|
|
135
|
-
```bash
|
|
136
|
-
codex "A bug was reported: <BUG_DESCRIPTION>. \
|
|
137
|
-
Analyze the codebase to find the root cause. \
|
|
138
|
-
List: (1) most likely root cause with file:line, \
|
|
139
|
-
(2) contributing factors, (3) suggested fix approach. \
|
|
140
|
-
DO NOT edit any files." \
|
|
141
|
-
--approval-mode suggest -q
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
**When:** User reports a bug, crash, or unexpected behavior.
|
|
145
|
-
**Report to:** `codex-reports/bug-analysis-<date>.md`
|
|
146
|
-
|
|
147
|
-
### 2. Pre-Commit Code Review
|
|
148
|
-
|
|
149
|
-
```bash
|
|
150
|
-
codex "Review the uncommitted changes in this repo. \
|
|
151
|
-
Check for: bugs, logic errors, edge cases, thread safety, \
|
|
152
|
-
security issues, performance problems, naming inconsistencies. \
|
|
153
|
-
Rank issues by severity (critical/warning/info). \
|
|
154
|
-
DO NOT edit any files." \
|
|
155
|
-
--approval-mode suggest -q
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
**When:** Before committing changes across >3 files.
|
|
159
|
-
**Report to:** `codex-reports/review-<date>.md`
|
|
160
|
-
|
|
161
|
-
### 3. Logic & Edge Case Analysis
|
|
162
|
-
|
|
163
|
-
```bash
|
|
164
|
-
codex "Analyze <FILE_OR_MODULE> for logic correctness. \
|
|
165
|
-
Focus on: edge cases (null, empty, boundary), race conditions, \
|
|
166
|
-
error handling gaps, unreachable code, off-by-one errors. \
|
|
167
|
-
List each issue with file:line and severity. \
|
|
168
|
-
DO NOT edit any files." \
|
|
169
|
-
--approval-mode suggest -q
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
**When:** Complex logic that needs verification.
|
|
173
|
-
**Report to:** `codex-reports/logic-analysis-<date>.md`
|
|
174
|
-
|
|
175
|
-
### 4. Test Case Generation
|
|
176
|
-
|
|
177
|
-
```bash
|
|
178
|
-
codex "Analyze <FILE_OR_MODULE> and generate a comprehensive \
|
|
179
|
-
list of test cases. Include: happy path, edge cases, error cases, \
|
|
180
|
-
boundary values, concurrent scenarios. Format as markdown table. \
|
|
181
|
-
DO NOT edit any files." \
|
|
182
|
-
--approval-mode suggest -q
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
**When:** New feature needs test coverage planning.
|
|
186
|
-
**Report to:** `codex-reports/test-cases-<date>.md`
|
|
187
|
-
|
|
188
|
-
### 5. Implementation Plan Review
|
|
189
|
-
|
|
190
|
-
```bash
|
|
191
|
-
codex "Review this implementation plan: <PLAN_CONTENT>. \
|
|
192
|
-
Find: logic holes, missing error handling, security risks, \
|
|
193
|
-
race conditions, scalability issues, missing edge cases. \
|
|
194
|
-
Rate each issue by severity. \
|
|
195
|
-
DO NOT edit any files." \
|
|
196
|
-
--approval-mode suggest -q
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
**When:** After Antigravity creates an implementation plan.
|
|
200
|
-
**Report to:** `codex-reports/plan-review-<date>.md`
|
|
201
|
-
|
|
202
|
-
### 6. Refactor Verification
|
|
203
|
-
|
|
204
|
-
```bash
|
|
205
|
-
codex "Compare the recent changes in this repo against the \
|
|
206
|
-
original code. Verify: (1) no behavioral regression, \
|
|
207
|
-
(2) all original edge cases still handled, \
|
|
208
|
-
(3) no new bugs introduced. List any regressions found. \
|
|
209
|
-
DO NOT edit any files." \
|
|
210
|
-
--approval-mode suggest -q
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
**When:** After refactoring to ensure no regression.
|
|
214
|
-
**Report to:** `codex-reports/refactor-verify-<date>.md`
|
|
215
|
-
|
|
216
|
-
---
|
|
70
|
+
- ALWAYS `--approval-mode suggest` (read-only)
|
|
71
|
+
- ALWAYS inject "DO NOT edit any files"
|
|
72
|
+
- Timeout: 120s quick, 180s deep
|
|
73
|
+
- CLI fails β fallback gracefully
|
|
74
|
+
- NEVER pass secrets in prompt
|
|
217
75
|
|
|
218
76
|
## π Integration Flow
|
|
219
77
|
|
|
220
78
|
```
|
|
221
|
-
1.
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
6. Capture output
|
|
227
|
-
7. Save report to codex-reports/<type>-<date>.md
|
|
228
|
-
8. Summarize key findings for user
|
|
229
|
-
9. Act on findings (Antigravity executes fixes if needed)
|
|
79
|
+
1. Detect trigger β 2. Check codex installed
|
|
80
|
+
3. "π Δang gα»i Codex CLI [mα»₯c ΔΓch]..."
|
|
81
|
+
4. Build prompt β 5. Run command
|
|
82
|
+
6. Capture output β 7. Save to codex-reports/<type>-<date>.md
|
|
83
|
+
8. Summarize findings β 9. Act on findings
|
|
230
84
|
```
|
|
231
85
|
|
|
232
|
-
###
|
|
233
|
-
|
|
234
|
-
```yaml
|
|
235
|
-
on_success:
|
|
236
|
-
- Parse Codex output (text or JSON)
|
|
237
|
-
- Save full report to codex-reports/<type>-<date>.md
|
|
238
|
-
- Extract key findings + severity
|
|
239
|
-
- Present summary to user
|
|
240
|
-
- If critical issues found β suggest fixes
|
|
86
|
+
### Error Handling
|
|
241
87
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
88
|
+
| Event | Action |
|
|
89
|
+
|-------|--------|
|
|
90
|
+
| Success | Parse β save report β summarize β suggest fixes |
|
|
91
|
+
| Timeout | "β³ Timed out (>120s)" β fallback Antigravity-only |
|
|
92
|
+
| Error | Check `codex --version` β suggest install |
|
|
93
|
+
| Not installed | Ask user to install |
|
|
245
94
|
|
|
246
|
-
|
|
247
|
-
- Log: "β οΈ Codex CLI invocation failed"
|
|
248
|
-
- Check: "codex --version" β suggest install if missing
|
|
249
|
-
- Fall back gracefully β CLI is enhancement, not dependency
|
|
95
|
+
## π Report Structure
|
|
250
96
|
|
|
251
|
-
on_not_installed:
|
|
252
|
-
- Ask user: "Codex CLI chΖ°a cΓ i. CΓ i bαΊ±ng: npm i -g @openai/codex?"
|
|
253
|
-
- If yes β run install β retry
|
|
254
|
-
- If no β fall back to Antigravity-only
|
|
255
97
|
```
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
98
|
+
<project_root>/codex-reports/ # Gitignored recommended
|
|
99
|
+
βββ bug-analysis-<date>.md
|
|
100
|
+
βββ review-<date>.md
|
|
101
|
+
βββ logic-analysis-<date>.md
|
|
102
|
+
βββ ...
|
|
261
103
|
```
|
|
262
|
-
<project_root>/
|
|
263
|
-
βββ codex-reports/ # Gitignored recommended
|
|
264
|
-
βββ bug-analysis-2026-03-21.md
|
|
265
|
-
βββ review-2026-03-21.md
|
|
266
|
-
βββ logic-analysis-2026-03-21.md
|
|
267
|
-
βββ test-cases-2026-03-21.md
|
|
268
|
-
βββ plan-review-2026-03-21.md
|
|
269
|
-
βββ refactor-verify-2026-03-21.md
|
|
270
|
-
```
|
|
271
|
-
|
|
272
|
-
---
|
|
273
104
|
|
|
274
105
|
## π« Anti-Patterns
|
|
275
106
|
|
|
276
107
|
```yaml
|
|
277
108
|
never_do:
|
|
278
109
|
- Let Codex edit source code (EVER)
|
|
279
|
-
- Use --approval-mode auto
|
|
280
|
-
- Pass
|
|
281
|
-
- Block
|
|
282
|
-
- Call CLI
|
|
283
|
-
- Ignore CLI output β if you called it, use the result
|
|
284
|
-
- Call Codex for tasks Antigravity handles well alone
|
|
110
|
+
- Use --approval-mode auto (ALWAYS suggest)
|
|
111
|
+
- Pass API keys/tokens in prompts
|
|
112
|
+
- Block without timeout
|
|
113
|
+
- Call CLI >3 times per task
|
|
285
114
|
|
|
286
115
|
always_do:
|
|
287
|
-
- Mention
|
|
116
|
+
- Mention "π Δang gα»i Codex CLI..."
|
|
288
117
|
- Include "DO NOT edit any files" in EVERY prompt
|
|
289
|
-
-
|
|
290
|
-
-
|
|
291
|
-
- Summarize findings before acting on them
|
|
292
|
-
- Fall back gracefully if CLI unavailable
|
|
293
|
-
- Check codex installation before first use
|
|
118
|
+
- Save reports to codex-reports/
|
|
119
|
+
- Fall back gracefully if unavailable
|
|
294
120
|
```
|
|
295
121
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
## π€ Three-Agent Collaboration
|
|
299
|
-
|
|
300
|
-
```
|
|
301
|
-
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
302
|
-
β User Request β
|
|
303
|
-
βββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββ
|
|
304
|
-
β
|
|
305
|
-
βΌ
|
|
306
|
-
βββββββββββββββββββ
|
|
307
|
-
β Antigravity β β Primary: plan, code, implement
|
|
308
|
-
β (IDE Agent) β
|
|
309
|
-
βββββ¬ββββββββββ¬ββββ
|
|
310
|
-
β β
|
|
311
|
-
Strategy? Debug/Review?
|
|
312
|
-
β β
|
|
313
|
-
βΌ βΌ
|
|
314
|
-
ββββββββββββ ββββββββββββ
|
|
315
|
-
β Gemini β β Codex β
|
|
316
|
-
β CLI β β CLI β
|
|
317
|
-
β ββββββββββ β ββββββββββ β
|
|
318
|
-
β Architect β β Inspectorβ
|
|
319
|
-
β .md only β β .md only β
|
|
320
|
-
ββββββββββββ ββββββββββββ
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
---
|
|
324
|
-
|
|
325
|
-
## π§© Skill Relationships
|
|
122
|
+
## π§© Relationships
|
|
326
123
|
|
|
327
124
|
```
|
|
328
|
-
Uses: run_command (to invoke
|
|
329
|
-
Enhances: /debug, /code, /refactor, /plan
|
|
330
|
-
Saves to: codex-reports/*.md
|
|
125
|
+
Uses: run_command (to invoke CLI)
|
|
126
|
+
Enhances: /debug, /code, /refactor, /plan
|
|
331
127
|
Parallel: gemini-conductor (different role, can coexist)
|
|
332
|
-
Independent of: NeuralMemory
|
|
128
|
+
Independent of: NeuralMemory
|
|
333
129
|
```
|
|
334
130
|
|
|
335
131
|
---
|
|
336
132
|
|
|
337
|
-
*codex-conductor v1.
|
|
133
|
+
*codex-conductor v1.1 β Modular Router Architecture*
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Codex CLI Prompt Templates
|
|
2
|
+
|
|
3
|
+
## 1. Bug Root Cause Analysis
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
codex "A bug was reported: <BUG_DESCRIPTION>. \
|
|
7
|
+
Analyze the codebase to find the root cause. \
|
|
8
|
+
List: (1) most likely root cause with file:line, \
|
|
9
|
+
(2) contributing factors, (3) suggested fix approach. \
|
|
10
|
+
DO NOT edit any files." \
|
|
11
|
+
--approval-mode suggest -q
|
|
12
|
+
```
|
|
13
|
+
**Report to:** `codex-reports/bug-analysis-<date>.md`
|
|
14
|
+
|
|
15
|
+
## 2. Pre-Commit Code Review
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
codex "Review the uncommitted changes in this repo. \
|
|
19
|
+
Check for: bugs, logic errors, edge cases, thread safety, \
|
|
20
|
+
security issues, performance problems, naming inconsistencies. \
|
|
21
|
+
Rank issues by severity (critical/warning/info). \
|
|
22
|
+
DO NOT edit any files." \
|
|
23
|
+
--approval-mode suggest -q
|
|
24
|
+
```
|
|
25
|
+
**Report to:** `codex-reports/review-<date>.md`
|
|
26
|
+
|
|
27
|
+
## 3. Logic & Edge Case Analysis
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
codex "Analyze <FILE_OR_MODULE> for logic correctness. \
|
|
31
|
+
Focus on: edge cases (null, empty, boundary), race conditions, \
|
|
32
|
+
error handling gaps, unreachable code, off-by-one errors. \
|
|
33
|
+
List each issue with file:line and severity. \
|
|
34
|
+
DO NOT edit any files." \
|
|
35
|
+
--approval-mode suggest -q
|
|
36
|
+
```
|
|
37
|
+
**Report to:** `codex-reports/logic-analysis-<date>.md`
|
|
38
|
+
|
|
39
|
+
## 4. Test Case Generation
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
codex "Analyze <FILE_OR_MODULE> and generate a comprehensive \
|
|
43
|
+
list of test cases. Include: happy path, edge cases, error cases, \
|
|
44
|
+
boundary values, concurrent scenarios. Format as markdown table. \
|
|
45
|
+
DO NOT edit any files." \
|
|
46
|
+
--approval-mode suggest -q
|
|
47
|
+
```
|
|
48
|
+
**Report to:** `codex-reports/test-cases-<date>.md`
|
|
49
|
+
|
|
50
|
+
## 5. Implementation Plan Review
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
codex "Review this implementation plan: <PLAN_CONTENT>. \
|
|
54
|
+
Find: logic holes, missing error handling, security risks, \
|
|
55
|
+
race conditions, scalability issues, missing edge cases. \
|
|
56
|
+
Rate each issue by severity. \
|
|
57
|
+
DO NOT edit any files." \
|
|
58
|
+
--approval-mode suggest -q
|
|
59
|
+
```
|
|
60
|
+
**Report to:** `codex-reports/plan-review-<date>.md`
|
|
61
|
+
|
|
62
|
+
## 6. Refactor Verification
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
codex "Compare the recent changes in this repo against the \
|
|
66
|
+
original code. Verify: (1) no behavioral regression, \
|
|
67
|
+
(2) all original edge cases still handled, \
|
|
68
|
+
(3) no new bugs introduced. List any regressions found. \
|
|
69
|
+
DO NOT edit any files." \
|
|
70
|
+
--approval-mode suggest -q
|
|
71
|
+
```
|
|
72
|
+
**Report to:** `codex-reports/refactor-verify-<date>.md`
|