@trendai-crem/claude-skills 1.3.0 → 1.5.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/README.md +26 -3
- package/cli.js +3 -1
- package/lib/handlers/index.js +2 -0
- package/lib/handlers/rules-dir.js +70 -0
- package/package.json +3 -2
- package/rules/confluence-editing.md +20 -0
- package/skills/code-review/README.md +5 -4
- package/skills/code-review/SKILL.md +32 -11
- package/skills/code-review/TEST_PLAN.md +22 -0
- package/sources.json +5 -0
package/README.md
CHANGED
|
@@ -8,13 +8,14 @@ One-command Claude Code skill installer for the team. Installs curated AI agent
|
|
|
8
8
|
npx @trendai-crem/claude-skills
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
That's it. The command installs all
|
|
11
|
+
That's it. The command installs all four source types declared in `sources.json`:
|
|
12
12
|
|
|
13
13
|
| Source type | What it installs | How to change |
|
|
14
14
|
|-------------|-----------------|---------------|
|
|
15
|
+
| **rules-dir** | Team-shared rules to `~/.claude/rules/team/` (loaded in every session) | Add/remove `rules/<name>.md`, bump version, PR |
|
|
15
16
|
| **skills-repo** | [superpowers](https://github.com/obra/superpowers) — brainstorming, debugging, TDD, and more | Edit `sources.json`, bump version, PR |
|
|
16
17
|
| **skills-dir** | Team skills in this repo's `skills/` directory | Add/remove `skills/<name>/`, bump version, PR |
|
|
17
|
-
| **marketplace** | Plugins from `ai-skill-marketplace`, `claude-plugins-official`,
|
|
18
|
+
| **marketplace** | Plugins from `ai-skill-marketplace`, `claude-plugins-official`, `openai-codex`, and `everything-claude-code` | Edit `plugins` list in `sources.json`, bump version, PR |
|
|
18
19
|
|
|
19
20
|
Re-run to update everything:
|
|
20
21
|
|
|
@@ -24,6 +25,14 @@ npx @trendai-crem/claude-skills@latest
|
|
|
24
25
|
|
|
25
26
|
Auto-update runs at session start — you'll be notified when a new version is available and it installs automatically.
|
|
26
27
|
|
|
28
|
+
## Team Rules (`rules/`)
|
|
29
|
+
|
|
30
|
+
Rules are `.md` files installed to `~/.claude/rules/team/` and automatically loaded in every Claude session across all projects. Use rules for team-wide conventions that should always apply.
|
|
31
|
+
|
|
32
|
+
| Rule | Description |
|
|
33
|
+
|------|-------------|
|
|
34
|
+
| **confluence-editing** | Use `atlassian-tools` skill for Confluence edits — never use raw MCP update tools |
|
|
35
|
+
|
|
27
36
|
## Team Skills (`skills/`)
|
|
28
37
|
|
|
29
38
|
| Skill | Trigger | Description |
|
|
@@ -49,6 +58,16 @@ Installed from [ai-skill-marketplace](https://github.com/trend-ai-taskforce/ai-s
|
|
|
49
58
|
|
|
50
59
|
## For Maintainers
|
|
51
60
|
|
|
61
|
+
### Adding a team rule
|
|
62
|
+
|
|
63
|
+
1. Create a branch: `git checkout -b feat/add-<rule-name>`
|
|
64
|
+
2. Add `rules/<rule-name>.md` (plain markdown, no frontmatter needed)
|
|
65
|
+
3. Keep rules short (<50 lines) — they consume context window in every session
|
|
66
|
+
4. Bump version: `npm version patch`
|
|
67
|
+
5. Commit, push, open a PR, merge — CI publishes automatically
|
|
68
|
+
|
|
69
|
+
Rules are always overwritten on install (not no-clobber) to stay in sync with the repo.
|
|
70
|
+
|
|
52
71
|
### Adding a team skill
|
|
53
72
|
|
|
54
73
|
1. Create a branch: `git checkout -b feat/add-<skill-name>`
|
|
@@ -178,9 +197,13 @@ sources.json
|
|
|
178
197
|
↓
|
|
179
198
|
cli.js (thin orchestrator)
|
|
180
199
|
↓
|
|
181
|
-
lib/handlers/{skills-dir, skills-repo, marketplace}.js
|
|
200
|
+
lib/handlers/{rules-dir, skills-dir, skills-repo, marketplace}.js
|
|
182
201
|
↓
|
|
183
202
|
~/.claude/claude-skills-manifest.json (tracks what's installed)
|
|
203
|
+
↓
|
|
204
|
+
~/.claude/rules/team/ ← rules-dir handler
|
|
205
|
+
~/.claude/skills/ ← skills-dir, skills-repo handlers
|
|
206
|
+
~/.claude/plugins/ ← marketplace handler
|
|
184
207
|
```
|
|
185
208
|
|
|
186
209
|
Removals propagate automatically: remove an entry from `sources.json`, bump version, and the next auto-update uninstalls it for all team members.
|
package/cli.js
CHANGED
|
@@ -92,9 +92,11 @@ function installEccRules() {
|
|
|
92
92
|
const eccRulesDir = join(eccMarketplace, 'rules');
|
|
93
93
|
if (!existsSync(eccRulesDir)) return;
|
|
94
94
|
|
|
95
|
+
const ALLOWED_LANGS = new Set(['common', 'typescript', 'java', 'golang', 'python', 'swift']);
|
|
96
|
+
|
|
95
97
|
const destDir = join(homedir(), '.claude', 'rules');
|
|
96
98
|
const languages = readdirSync(eccRulesDir, { withFileTypes: true })
|
|
97
|
-
.filter(d => d.isDirectory())
|
|
99
|
+
.filter(d => d.isDirectory() && ALLOWED_LANGS.has(d.name))
|
|
98
100
|
.map(d => d.name);
|
|
99
101
|
|
|
100
102
|
let copied = 0;
|
package/lib/handlers/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { skillsDirHandler } from './skills-dir.js';
|
|
2
2
|
import { skillsRepoHandler } from './skills-repo.js';
|
|
3
3
|
import { marketplaceHandler } from './marketplace.js';
|
|
4
|
+
import { rulesDirHandler } from './rules-dir.js';
|
|
4
5
|
|
|
5
6
|
// Use Object.create(null) to prevent prototype chain traversal on adversarial type values.
|
|
6
7
|
export const HANDLERS = Object.create(null);
|
|
7
8
|
HANDLERS['skills-dir'] = skillsDirHandler;
|
|
8
9
|
HANDLERS['skills-repo'] = skillsRepoHandler;
|
|
9
10
|
HANDLERS['marketplace'] = marketplaceHandler;
|
|
11
|
+
HANDLERS['rules-dir'] = rulesDirHandler;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { readdirSync, copyFileSync, mkdirSync, existsSync, unlinkSync, rmdirSync } from 'fs';
|
|
2
|
+
import { join } from 'path';
|
|
3
|
+
import { homedir } from 'os';
|
|
4
|
+
|
|
5
|
+
const DEST_DIR = join(homedir(), '.claude', 'rules', 'team');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Handler for team-shared rules (type: "rules-dir").
|
|
9
|
+
* Copies .md files from <repo>/rules/ to ~/.claude/rules/team/.
|
|
10
|
+
*/
|
|
11
|
+
export const rulesDirHandler = {
|
|
12
|
+
/**
|
|
13
|
+
* Returns the set of rule file names in the source directory.
|
|
14
|
+
* @param {object} entry - Source entry (uses convention: <baseDir>/rules/).
|
|
15
|
+
* @param {string} baseDir - Repository base directory.
|
|
16
|
+
* @returns {Set<string>|null}
|
|
17
|
+
*/
|
|
18
|
+
getDesired(entry, baseDir) {
|
|
19
|
+
const srcDir = join(baseDir, entry.path ?? 'rules');
|
|
20
|
+
try {
|
|
21
|
+
const names = readdirSync(srcDir)
|
|
22
|
+
.filter(f => f.endsWith('.md'))
|
|
23
|
+
.sort();
|
|
24
|
+
return new Set(names);
|
|
25
|
+
} catch (err) {
|
|
26
|
+
console.warn(`\nWARN: Cannot read rules directory "${srcDir}": ${err.message}`);
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Copies rule .md files to ~/.claude/rules/team/.
|
|
33
|
+
* Always overwrites to keep rules in sync with the repo.
|
|
34
|
+
* @returns {Array<{label, action, ok}>}
|
|
35
|
+
*/
|
|
36
|
+
install(entry, baseDir) {
|
|
37
|
+
const srcDir = join(baseDir, entry.path ?? 'rules');
|
|
38
|
+
mkdirSync(DEST_DIR, { recursive: true });
|
|
39
|
+
|
|
40
|
+
try {
|
|
41
|
+
const files = readdirSync(srcDir).filter(f => f.endsWith('.md'));
|
|
42
|
+
for (const file of files) {
|
|
43
|
+
copyFileSync(join(srcDir, file), join(DEST_DIR, file));
|
|
44
|
+
}
|
|
45
|
+
console.log(`\n Rules installed to ${DEST_DIR}/ (${files.length} files)`);
|
|
46
|
+
return [{ label: entry.label, action: 'install-group', ok: true }];
|
|
47
|
+
} catch (err) {
|
|
48
|
+
console.error(`\nFailed: ${entry.label} (${err.message})`);
|
|
49
|
+
return [{ label: entry.label, action: 'install-group', ok: false }];
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Removes stale rule files from ~/.claude/rules/team/.
|
|
55
|
+
* @param {string[]} staleItems - File names to remove.
|
|
56
|
+
* @returns {Array<{label, action, ok}>}
|
|
57
|
+
*/
|
|
58
|
+
uninstall(staleItems) {
|
|
59
|
+
return staleItems.map(file => {
|
|
60
|
+
const dest = join(DEST_DIR, file);
|
|
61
|
+
try {
|
|
62
|
+
if (existsSync(dest)) unlinkSync(dest);
|
|
63
|
+
return { label: file, action: 'uninstall', ok: true };
|
|
64
|
+
} catch (err) {
|
|
65
|
+
console.error(`\nFailed to remove rule ${file}: ${err.message}`);
|
|
66
|
+
return { label: file, action: 'uninstall', ok: false };
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
},
|
|
70
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trendai-crem/claude-skills",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Claude Code skills installer for the trendai-crem team",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"sources.json",
|
|
16
16
|
"marketplace.json",
|
|
17
17
|
"lib/",
|
|
18
|
-
"skills/"
|
|
18
|
+
"skills/",
|
|
19
|
+
"rules/"
|
|
19
20
|
],
|
|
20
21
|
"type": "module",
|
|
21
22
|
"engines": {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Confluence Editing
|
|
2
|
+
|
|
3
|
+
When editing Confluence pages, ALWAYS use the `atlassian-tools` skill
|
|
4
|
+
(confluence_cli.py retrieve → edit local .md → update --file).
|
|
5
|
+
|
|
6
|
+
NEVER use `mcp__atlassian__updateConfluencePage` with markdown contentFormat — it loses
|
|
7
|
+
diagrams, macros, panels, and other ADF elements.
|
|
8
|
+
|
|
9
|
+
NEVER use `mcp__atlassian__updateConfluencePage` with ADF contentFormat for large pages —
|
|
10
|
+
the body parameter has a size limit that truncates content.
|
|
11
|
+
|
|
12
|
+
Correct workflow:
|
|
13
|
+
1. `confluence_cli.py -o <project>/.atlassian retrieve <pageId>`
|
|
14
|
+
2. Edit the local `.md` file (Mermaid = ```mermaid blocks, macros = <!-- confluence-macro --> comments)
|
|
15
|
+
3. `confluence_cli.py -o <project>/.atlassian update <pageId> --file <path>.md`
|
|
16
|
+
|
|
17
|
+
The atlassian-tools skill handles:
|
|
18
|
+
- Bidirectional HTML↔Markdown conversion preserving all Confluence elements
|
|
19
|
+
- Version conflict detection with auto patch-merge
|
|
20
|
+
- Local caching for offline editing
|
|
@@ -14,7 +14,7 @@ Multi-perspective code review for Trend Micro teams, powered by Claude Code.
|
|
|
14
14
|
| Quality | Naming, style guide compliance, documentation |
|
|
15
15
|
| Testing | Coverage, error handling, regression tests, requirements |
|
|
16
16
|
|
|
17
|
-
Optional 6th reviewer: **Codex (gpt-5.4, fallback gpt-5.3-codex)** as cross-model baseline (auto-detected, not required). Retries 3 times on gpt-5.4 before falling back.
|
|
17
|
+
Optional 6th reviewer: **Codex (gpt-5.4, fallback gpt-5.3-codex)** as cross-model baseline (auto-detected, not required). Supports the official Codex companion plugin (`codex-companion.mjs`) with fallback to raw CLI (`codex exec`). Retries 3 times on gpt-5.4 before falling back.
|
|
18
18
|
|
|
19
19
|
### Security Gate (Mandatory, Non-Bypassable)
|
|
20
20
|
|
|
@@ -139,7 +139,7 @@ The skill auto-triggers when Claude detects a code review request.
|
|
|
139
139
|
[Step 3] Write review prompt with language packs
|
|
140
140
|
|
|
|
141
141
|
v
|
|
142
|
-
[Step 3.5]
|
|
142
|
+
[Step 3.5] Detect Codex mode (companion → CLI → unavailable)
|
|
143
143
|
|
|
|
144
144
|
v
|
|
145
145
|
[Step 4] Launch reviewers in parallel (ONE message)
|
|
@@ -149,7 +149,7 @@ The skill auto-triggers when Claude detects a code review request.
|
|
|
149
149
|
+---> security-reviewer (Claude Agent, MANDATORY GATE)
|
|
150
150
|
+---> quality-reviewer (Claude Agent)
|
|
151
151
|
+---> testing-reviewer (Claude Agent)
|
|
152
|
-
+---> codex (gpt-5.4 x3 retry, fallback gpt-5.3-codex
|
|
152
|
+
+---> codex (companion plugin or CLI, gpt-5.4 x3 retry, fallback gpt-5.3-codex)
|
|
153
153
|
|
|
|
154
154
|
v
|
|
155
155
|
[Step 5-7] Collect results, synthesize report
|
|
@@ -178,7 +178,7 @@ Installation is handled by the repo's root `install.sh`.
|
|
|
178
178
|
## FAQ
|
|
179
179
|
|
|
180
180
|
**Q: Do I need Codex CLI installed?**
|
|
181
|
-
A: No. The skill auto-detects Codex. Without
|
|
181
|
+
A: No. The skill auto-detects Codex in three modes: (1) official Codex companion plugin (`codex-companion.mjs` via `--prompt-file`), (2) raw Codex CLI (`codex exec`), (3) not available. Without Codex, 5 Claude reviewers provide full coverage. Codex adds an independent cross-model baseline.
|
|
182
182
|
|
|
183
183
|
**Q: Does it work with repos using `main` instead of `develop`?**
|
|
184
184
|
A: Yes. The skill shows commit counts for origin/develop, origin/main, and origin/master, then asks you to confirm the correct base branch.
|
|
@@ -201,6 +201,7 @@ A: The skill produces a report — it does not directly block git operations. Th
|
|
|
201
201
|
|
|
202
202
|
| Version | Date | Changes |
|
|
203
203
|
|---------|------|---------|
|
|
204
|
+
| v1.3.0 | 2026-03-31 | Codex companion plugin support (`codex-companion.mjs` with `--prompt-file`), three-mode detection (companion → CLI → skip), raw CLI preserved as fallback |
|
|
204
205
|
| v1.2.0 | 2026-03-23 | Session-isolated temp files, user-confirmed base branch, SOLID/design pattern evaluation, Codex gpt-5.4 retry x3 + gpt-5.3-codex fallback, 30min timeout |
|
|
205
206
|
| v1.1.0 | 2026-03-21 | Base branch detection fix, `.c` extension support, security-reviewer gets language pack |
|
|
206
207
|
| v1.0.0 | 2026-03-20 | Initial release: 5 lenses + Codex, SCD 10, OWASP Top 10, Red/Blue Team, language packs, JSON output |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: code-review
|
|
3
|
-
version: "1.
|
|
3
|
+
version: "1.3.0"
|
|
4
4
|
description: "Multi-perspective code review with 5 standards-aligned reviewers + Codex baseline. Enforces Trend Micro RDSec policy, Secure Coding Dojo checkpoints, and company-wide review checklist. Use when the user asks for code review, review changes, review branch, or review PR."
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -120,14 +120,17 @@ Use the `Write` tool to create `${REVIEW_DIR}/review-prompt.txt` with the REVIEW
|
|
|
120
120
|
|
|
121
121
|
## Step 3.5: Detect Codex Availability
|
|
122
122
|
|
|
123
|
-
Before launching reviews,
|
|
123
|
+
Before launching reviews, detect Codex integration mode. The official Codex companion plugin is preferred over the raw CLI:
|
|
124
124
|
|
|
125
125
|
```
|
|
126
|
-
Bash("command -v codex >/dev/null 2>&1
|
|
126
|
+
Bash("COMPANION=$(find \"$HOME/.claude/plugins/marketplaces\" -name \"codex-companion.mjs\" -path \"*/openai-codex/*\" 2>/dev/null | head -1); if [ -n \"$COMPANION\" ] && [ -f \"$COMPANION\" ]; then echo \"CODEX_MODE=companion\"; echo \"COMPANION_PATH=$COMPANION\"; elif command -v codex >/dev/null 2>&1; then echo \"CODEX_MODE=cli\"; else echo \"CODEX_MODE=unavailable\"; fi")
|
|
127
127
|
```
|
|
128
128
|
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
Save `CODEX_MODE` and (if applicable) `COMPANION_PATH` for use in Step 4b.
|
|
130
|
+
|
|
131
|
+
- If `CODEX_MODE=companion` → official Codex plugin detected. Use `node "$COMPANION_PATH" task --prompt-file` for execution. Include Codex as the 6th reviewer.
|
|
132
|
+
- If `CODEX_MODE=cli` → legacy Codex CLI available. Use `codex exec` for execution (backward-compatible). Include Codex as the 6th reviewer.
|
|
133
|
+
- If `CODEX_MODE=unavailable` → no Codex integration. Proceed with 5 Claude reviewers only. Note in report: "Codex baseline: SKIPPED (not installed)"
|
|
131
134
|
|
|
132
135
|
**This is NOT a blocker.** The 5 Claude lens reviewers provide full coverage. Codex adds independent cross-model validation but is optional.
|
|
133
136
|
|
|
@@ -140,7 +143,20 @@ Execute ALL of the following in a SINGLE message (5 reviewers if no Codex, 6 if
|
|
|
140
143
|
TeamCreate(team_name="code-review")
|
|
141
144
|
```
|
|
142
145
|
|
|
143
|
-
### 4b. Launch Codex (ONLY if
|
|
146
|
+
### 4b. Launch Codex (ONLY if CODEX_MODE is "companion" or "cli")
|
|
147
|
+
|
|
148
|
+
Select the appropriate invocation based on `CODEX_MODE` from Step 3.5. Skip this step entirely if `CODEX_MODE=unavailable`.
|
|
149
|
+
|
|
150
|
+
**If CODEX_MODE is "companion" (official plugin):**
|
|
151
|
+
```
|
|
152
|
+
Bash(
|
|
153
|
+
command='COMPANION="${COMPANION_PATH}"; REVIEW_DIR_VAL="${REVIEW_DIR}"; MODEL="gpt-5.4"; FALLBACK="gpt-5.3-codex"; MAX_RETRY=3; for i in $(seq 1 $MAX_RETRY); do echo "Attempt $i/$MAX_RETRY with $MODEL via companion"; node "$COMPANION" task --prompt-file "${REVIEW_DIR_VAL}/review-prompt.txt" --model $MODEL 2>"${REVIEW_DIR_VAL}/codex-stderr.txt" && exit 0; echo "Failed (attempt $i)"; sleep 2; done; echo "gpt-5.4 failed after $MAX_RETRY attempts. Falling back to $FALLBACK..."; node "$COMPANION" task --prompt-file "${REVIEW_DIR_VAL}/review-prompt.txt" --model $FALLBACK 2>"${REVIEW_DIR_VAL}/codex-stderr.txt"',
|
|
154
|
+
run_in_background=true,
|
|
155
|
+
timeout=1800000
|
|
156
|
+
)
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**If CODEX_MODE is "cli" (legacy fallback):**
|
|
144
160
|
```
|
|
145
161
|
Bash(
|
|
146
162
|
command='REVIEW_DIR_VAL="${REVIEW_DIR}"; MODEL="gpt-5.4"; FALLBACK="gpt-5.3-codex"; MAX_RETRY=3; for i in $(seq 1 $MAX_RETRY); do echo "Attempt $i/$MAX_RETRY with $MODEL"; cat ${REVIEW_DIR_VAL}/review-prompt.txt | codex exec -m $MODEL -s read-only --skip-git-repo-check - 2>${REVIEW_DIR_VAL}/codex-stderr.txt && exit 0; echo "Failed (attempt $i)"; sleep 2; done; echo "gpt-5.4 failed after $MAX_RETRY attempts. Falling back to $FALLBACK..."; cat ${REVIEW_DIR_VAL}/review-prompt.txt | codex exec -m $FALLBACK -s read-only --skip-git-repo-check - 2>${REVIEW_DIR_VAL}/codex-stderr.txt',
|
|
@@ -149,10 +165,15 @@ Bash(
|
|
|
149
165
|
)
|
|
150
166
|
```
|
|
151
167
|
|
|
152
|
-
**Codex retry strategy:**
|
|
168
|
+
**Codex retry strategy (same for both modes):**
|
|
153
169
|
- Default model: `gpt-5.4` (retry up to 3 times on failure)
|
|
154
170
|
- Fallback: `gpt-5.3-codex` (if all 3 retries fail)
|
|
155
|
-
- Skip this step entirely if
|
|
171
|
+
- Skip this step entirely if `CODEX_MODE=unavailable`. Do NOT error or warn the user to install it.
|
|
172
|
+
|
|
173
|
+
**Companion mode advantages:**
|
|
174
|
+
- `--prompt-file` reads the review prompt directly from disk (no stdin piping)
|
|
175
|
+
- The companion validates authentication via `ensureCodexReady()` before executing
|
|
176
|
+
- No `--skip-git-repo-check` or `-s read-only` flags needed (companion defaults to read-only sandbox without `--write`)
|
|
156
177
|
|
|
157
178
|
### 4c. Spawn Architecture Reviewer
|
|
158
179
|
```
|
|
@@ -754,7 +775,7 @@ TypeScript-specific checks:
|
|
|
754
775
|
| security-reviewer | Security (GATE) | Claude | [OK/FAILED/TIMEOUT] | N crit, N major, N minor |
|
|
755
776
|
| quality-reviewer | Style + Documentation | Claude | [OK/FAILED/TIMEOUT] | N crit, N major, N minor |
|
|
756
777
|
| testing-reviewer | Testing + Requirements | Claude | [OK/FAILED/TIMEOUT] | N crit, N major, N minor |
|
|
757
|
-
| codex | External Baseline | gpt-5.4 (fallback: gpt-5.3-codex) | [OK/FAILED/TIMEOUT] | N crit, N major, N minor |
|
|
778
|
+
| codex | External Baseline | gpt-5.4 via companion/CLI (fallback: gpt-5.3-codex) | [OK/FAILED/TIMEOUT] | N crit, N major, N minor |
|
|
758
779
|
|
|
759
780
|
### Dimension Scores
|
|
760
781
|
|
|
@@ -800,7 +821,7 @@ TypeScript-specific checks:
|
|
|
800
821
|
#### Testing Reviewer
|
|
801
822
|
(same format)
|
|
802
823
|
|
|
803
|
-
#### Codex (gpt-5.4 / gpt-5.3-codex
|
|
824
|
+
#### Codex (gpt-5.4 via companion/CLI, fallback: gpt-5.3-codex)
|
|
804
825
|
(same format)
|
|
805
826
|
|
|
806
827
|
---
|
|
@@ -859,7 +880,7 @@ Note: These three verdicts are evaluated in order: FAIL first, then PASS, then P
|
|
|
859
880
|
|
|
860
881
|
## Rules
|
|
861
882
|
|
|
862
|
-
1. **Codex
|
|
883
|
+
1. **Codex uses the official companion plugin when available (`codex-companion.mjs` with `--prompt-file`), falling back to raw CLI (`codex exec`) if the plugin is not installed. Default model is `gpt-5.4`, retry 3 times on failure, then fallback to `gpt-5.3-codex`. If neither companion nor CLI is available, skip gracefully — do NOT ask the user to install it.**
|
|
863
884
|
2. **Claude teammates use Agent Teams. No `claude -p`. No `unset CLAUDECODE`.**
|
|
864
885
|
3. **Every issue must have exact file:line, code snippet, and policy reference. No vague descriptions.**
|
|
865
886
|
4. **Do NOT recommend replacing dependencies unless a concrete bug is demonstrated.**
|
|
@@ -269,6 +269,28 @@ for issue in data["issues"]:
|
|
|
269
269
|
- **Expected**: Remaining reviewers complete, report marks failed reviewer, averages adjust
|
|
270
270
|
- **Validates**: Graceful partial failure
|
|
271
271
|
|
|
272
|
+
### 2.8 Codex Integration Modes
|
|
273
|
+
|
|
274
|
+
#### TC-CDX-01: Companion plugin detected and used
|
|
275
|
+
- **Setup**: Ensure `~/.claude/plugins/marketplaces/openai-codex/` contains `codex-companion.mjs`
|
|
276
|
+
- **Expected**: `CODEX_MODE=companion`, `COMPANION_PATH` resolved, Codex invoked via `node "$COMPANION" task --prompt-file`
|
|
277
|
+
- **Validates**: Official companion plugin detection and execution path
|
|
278
|
+
|
|
279
|
+
#### TC-CDX-02: Companion not found, CLI fallback
|
|
280
|
+
- **Setup**: Remove or rename companion plugin directory, ensure `codex` CLI is in PATH
|
|
281
|
+
- **Expected**: `CODEX_MODE=cli`, Codex invoked via `cat ... | codex exec -m ... -s read-only --skip-git-repo-check -`
|
|
282
|
+
- **Validates**: Backward-compatible CLI fallback when plugin is not installed
|
|
283
|
+
|
|
284
|
+
#### TC-CDX-03: Neither companion nor CLI available
|
|
285
|
+
- **Setup**: Remove companion plugin AND ensure `codex` not in PATH
|
|
286
|
+
- **Expected**: `CODEX_MODE=unavailable`, report notes "Codex baseline: SKIPPED (not installed)", 5 Claude reviewers only
|
|
287
|
+
- **Validates**: Graceful skip without error or user prompt
|
|
288
|
+
|
|
289
|
+
#### TC-CDX-04: Companion auth failure
|
|
290
|
+
- **Setup**: Companion plugin exists but Codex is not authenticated (`codex login` not run)
|
|
291
|
+
- **Expected**: Companion's `ensureCodexReady()` throws, retry loop catches failure, Codex marked as FAILED in report
|
|
292
|
+
- **Validates**: Auth failure handling in companion mode
|
|
293
|
+
|
|
272
294
|
---
|
|
273
295
|
|
|
274
296
|
## 3. Test Fixtures
|