oh-my-customcodex 0.4.17 → 0.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.
Files changed (34) hide show
  1. package/README.md +7 -7
  2. package/dist/cli/index.js +1 -1
  3. package/dist/index.js +1 -1
  4. package/package.json +1 -1
  5. package/templates/.claude/agents/mgr-gitnerd.md +4 -0
  6. package/templates/.claude/agents/mgr-sauron.md +5 -4
  7. package/templates/.claude/hooks/hooks.json +10 -0
  8. package/templates/.claude/hooks/scripts/destructive-git-guard.sh +53 -0
  9. package/templates/.claude/rules/MUST-safety.md +15 -0
  10. package/templates/.claude/rules/SHOULD-memory-integration.md +21 -11
  11. package/templates/.claude/skills/adversarial-review/SKILL.md +10 -0
  12. package/templates/.claude/skills/dev-review/SKILL.md +15 -5
  13. package/templates/.claude/skills/gitlab/SKILL.md +346 -0
  14. package/templates/.claude/skills/harness-export/SKILL.md +46 -0
  15. package/templates/.claude/skills/instinct-extractor/SKILL.md +54 -0
  16. package/templates/.claude/skills/manifest-install/SKILL.md +53 -0
  17. package/templates/.claude/skills/memory-management/SKILL.md +71 -12
  18. package/templates/.claude/skills/memory-recall/SKILL.md +6 -4
  19. package/templates/.claude/skills/memory-save/SKILL.md +8 -5
  20. package/templates/.claude/skills/npm-version/SKILL.md +6 -0
  21. package/templates/.claude/skills/pipeline/labels.md +55 -0
  22. package/templates/.claude/skills/sec-agentshield-wrapper/SKILL.md +49 -0
  23. package/templates/AGENTS.md.en +6 -2
  24. package/templates/AGENTS.md.ko +6 -2
  25. package/templates/CLAUDE.md +6 -2
  26. package/templates/CLAUDE.md.en +6 -2
  27. package/templates/CLAUDE.md.ko +6 -2
  28. package/templates/README.md +110 -0
  29. package/templates/guides/claude-code/14-token-efficiency.md +6 -1
  30. package/templates/guides/claude-code/15-version-compatibility.md +35 -0
  31. package/templates/guides/git-safety/README.md +44 -0
  32. package/templates/guides/index.yaml +6 -0
  33. package/templates/manifest.json +4 -4
  34. package/templates/workflows/auto-dev.yaml +93 -6
package/README.md CHANGED
@@ -13,7 +13,7 @@
13
13
 
14
14
  **[한국어 문서 (Korean)](./README_ko.md)**
15
15
 
16
- 49 agents. 118 skills. 22 rules. One command.
16
+ 49 agents. 123 skills. 22 rules. One command.
17
17
 
18
18
  ```bash
19
19
  npm install -g oh-my-customcodex && cd your-project && omcustomcodex init
@@ -134,7 +134,7 @@ Each agent declares its tools, model, memory scope, and limitations in YAML fron
134
134
 
135
135
  ---
136
136
 
137
- ### Skills (118)
137
+ ### Skills (123)
138
138
 
139
139
  | Category | Count | Includes |
140
140
  |----------|-------|----------|
@@ -147,7 +147,7 @@ Each agent declares its tools, model, memory scope, and limitations in YAML fron
147
147
  | Package | 3 | npm-publish, npm-version, npm-audit |
148
148
  | Optimization | 3 | optimize-analyze, optimize-bundle, optimize-report |
149
149
  | Security | 3 | adversarial-review, cve-triage, jinja2-prompts |
150
- | Other | 12 | codex-exec, claude-native, visual-ralph, visual-verdict, vercel-deploy, skills-sh-search, result-aggregation, writing-clearly-and-concisely, and more |
150
+ | Other | 13 | codex-exec, claude-native, gitlab, visual-ralph, visual-verdict, vercel-deploy, skills-sh-search, result-aggregation, writing-clearly-and-concisely, and more |
151
151
 
152
152
  Skills use a 3-tier scope system: `core` (universal), `harness` (agent/skill maintenance), `package` (project-specific).
153
153
 
@@ -228,7 +228,7 @@ Key rules: R010 (orchestrator never writes files), R009 (parallel execution mand
228
228
 
229
229
  ---
230
230
 
231
- ### Guides (47)
231
+ ### Guides (48)
232
232
 
233
233
  Reference documentation covering best practices, architecture decisions, and integration patterns. Located in `guides/` at project root, covering topics from agent design to CI/CD to observability.
234
234
 
@@ -287,8 +287,8 @@ your-project/
287
287
  │ ├── contexts/ # 4 shared context files
288
288
  │ └── ontology/ # Knowledge graph for RAG
289
289
  ├── .agents/
290
- │ └── skills/ # 118 installed skill modules
291
- └── guides/ # 47 reference documents
290
+ │ └── skills/ # 123 installed skill modules
291
+ └── guides/ # 48 reference documents
292
292
  ```
293
293
 
294
294
  ### Source Repository And Compatibility Surfaces
@@ -325,7 +325,7 @@ bun test # Run tests
325
325
  bun run build # Production build
326
326
  ```
327
327
 
328
- Requirements: Node.js >= 18.0.0, Codex CLI.
328
+ Requirements: Node.js >= 18.0.0, Bun, Codex CLI. GitHub CLI (`gh`) and `jq` are recommended for release automation and local hook validation.
329
329
 
330
330
  ---
331
331
 
package/dist/cli/index.js CHANGED
@@ -3091,7 +3091,7 @@ var init_package = __esm(() => {
3091
3091
  workspaces: [
3092
3092
  "packages/*"
3093
3093
  ],
3094
- version: "0.4.17",
3094
+ version: "0.5.1",
3095
3095
  requiresCC: ">=2.1.121",
3096
3096
  claudeCode: {
3097
3097
  minimumVersion: "2.1.121",
package/dist/index.js CHANGED
@@ -2180,7 +2180,7 @@ var package_default = {
2180
2180
  workspaces: [
2181
2181
  "packages/*"
2182
2182
  ],
2183
- version: "0.4.17",
2183
+ version: "0.5.1",
2184
2184
  requiresCC: ">=2.1.121",
2185
2185
  claudeCode: {
2186
2186
  minimumVersion: "2.1.121",
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "workspaces": [
4
4
  "packages/*"
5
5
  ],
6
- "version": "0.4.17",
6
+ "version": "0.5.1",
7
7
  "requiresCC": ">=2.1.121",
8
8
  "claudeCode": {
9
9
  "minimumVersion": "2.1.121",
@@ -46,8 +46,12 @@ Types: feat, fix, docs, style, refactor, test, chore
46
46
 
47
47
  - NEVER force push to main/master
48
48
  - NEVER reset --hard without confirmation
49
+ - NEVER run `git clean -fd`, broad `git restore`, or `git checkout -- .` without preserving diffs and confirming the exact scope
50
+ - NEVER delete branches with `git branch -D` until merge state and remote backup are checked
49
51
  - NEVER skip pre-commit hooks without reason
50
52
  - ALWAYS create new commits (avoid --amend unless requested)
53
+ - BEFORE release branch creation, check for a local `release` branch that blocks the `release/v*` namespace; rename or remove it only after proving it is merged/backed up
54
+ - AFTER unexpected destructive git output, inspect `git reflog`, `git status`, and `git diff` before any repair attempt
51
55
 
52
56
  ## Push Rules (R016)
53
57
 
@@ -29,10 +29,11 @@ You are an automated verification specialist that executes the mandatory R017 ve
29
29
  5. Verify reference integrity (frontmatter, memory fields, skill refs)
30
30
  6. Verify philosophy compliance (R006-R011)
31
31
  7. Verify Claude-native compatibility
32
- 8. Spec density analysis: detects agents with excessive inline implementation detail (R006 compliance)
33
- 9. Structural linting: routing coverage (unreachable agents), orphan skill detection, circular dependency check, context:fork cap verification, R006 fork-list/frontmatter cross-validation
34
- 10. Auto-fix simple issues (count mismatches, missing fields)
35
- 11. Generate verification report
32
+ 8. Verify working-tree preservation: no verification step may reset, clean, restore, or delete branch state without explicit approval and recovery evidence
33
+ 9. Spec density analysis: detects agents with excessive inline implementation detail (R006 compliance)
34
+ 10. Structural linting: routing coverage (unreachable agents), orphan skill detection, circular dependency check, context:fork cap verification, R006 fork-list/frontmatter cross-validation
35
+ 11. Auto-fix simple issues (count mismatches, missing fields)
36
+ 12. Generate verification report
36
37
 
37
38
  ## Commands
38
39
 
@@ -42,6 +42,16 @@
42
42
  ],
43
43
  "description": "Pause before git push to review changes"
44
44
  },
45
+ {
46
+ "matcher": "tool == \"Bash\" && tool_input.command matches \"git (reset --hard|clean -f|clean -d|restore|checkout --|branch -D|push --force|push -f)\"",
47
+ "hooks": [
48
+ {
49
+ "type": "command",
50
+ "command": "bash .codex/hooks/scripts/destructive-git-guard.sh"
51
+ }
52
+ ],
53
+ "description": "Warn on destructive git commands and print recovery guidance without blocking"
54
+ },
45
55
  {
46
56
  "matcher": "tool == \"Write\" && tool_input.file_path matches \"\\\\.(md|txt)$\" && !(tool_input.file_path matches \"README\\\\.md|CLAUDE\\\\.md|AGENT\\\\.md|SKILL\\\\.md\")",
47
57
  "hooks": [
@@ -0,0 +1,53 @@
1
+ #!/bin/bash
2
+ # Advisory guard for destructive git commands.
3
+ # Warns before commands that can discard worktree or branch state.
4
+ # This hook is advisory only: it prints warnings to stderr, records a
5
+ # PPID-scoped event, echoes the original hook input, and exits 0.
6
+
7
+ input=$(cat)
8
+ cmd=""
9
+
10
+ if command -v jq >/dev/null 2>&1; then
11
+ cmd=$(echo "$input" | jq -r '.tool_input.command // ""' 2>/dev/null)
12
+ elif command -v node >/dev/null 2>&1; then
13
+ cmd=$(
14
+ printf '%s' "$input" | node -e 'let s = ""; process.stdin.on("data", d => s += d); process.stdin.on("end", () => { try { const j = JSON.parse(s); process.stdout.write(j?.tool_input?.command || ""); } catch { process.exit(0); } });' 2>/dev/null
15
+ )
16
+ fi
17
+
18
+ warn() {
19
+ local pattern="$1"
20
+ local command="$2"
21
+ local violation_file="/tmp/.codex-destructive-git-violations-${PPID}"
22
+
23
+ echo "[Hook] WARNING: destructive git command detected: ${pattern}" >&2
24
+ echo "[Hook] Command: ${command}" >&2
25
+ echo "[Hook] Verify target, preserve important work, and get explicit approval before continuing." >&2
26
+ echo "[Hook] Recovery: inspect 'git status', 'git diff', and 'git reflog' before attempting repair." >&2
27
+
28
+ printf '%s\t%s\t%s\n' "$(date -u +%Y-%m-%dT%H:%M:%SZ)" "$pattern" "$command" >> "$violation_file"
29
+ }
30
+
31
+ if [ -n "$cmd" ]; then
32
+ case "$cmd" in
33
+ *"git reset --hard"*)
34
+ warn "git reset --hard" "$cmd"
35
+ ;;
36
+ *"git clean -fd"*|*"git clean -df"*|*"git clean -fxd"*|*"git clean -xdf"*)
37
+ warn "git clean -fd/-fdx" "$cmd"
38
+ ;;
39
+ *"git restore"*|*"git checkout -- ."*|*"git checkout -- *"*)
40
+ warn "git restore / git checkout --" "$cmd"
41
+ ;;
42
+ *"git branch -D"*)
43
+ warn "git branch -D" "$cmd"
44
+ echo "[Hook] Check whether the branch is merged before deleting it." >&2
45
+ ;;
46
+ *"git push --force"*|*"git push -f"*)
47
+ warn "git push --force" "$cmd"
48
+ ;;
49
+ esac
50
+ fi
51
+
52
+ echo "$input"
53
+ exit 0
@@ -15,6 +15,21 @@
15
15
 
16
16
  Verify target, assess impact scope, check recoverability, get user approval.
17
17
 
18
+ ## Destructive Git Commands
19
+
20
+ Treat these commands as destructive even when they look like routine cleanup:
21
+
22
+ | Command pattern | Risk | Required action |
23
+ |-----------------|------|-----------------|
24
+ | `git reset --hard` | Discards tracked worktree changes and can hide recent work behind reflog recovery | Preserve diffs first, verify target ref, and get explicit approval |
25
+ | `git clean -fd` / `git clean -fdx` | Deletes untracked files, including generated plans and local-only artifacts | List targets with `git clean -ndx` first and get explicit approval |
26
+ | `git restore .` / broad `git restore <path>` | Reverts tracked files without preserving intent | Inspect `git diff` and confirm the exact path scope |
27
+ | `git checkout -- .` | Reverts tracked files using legacy checkout semantics | Prefer explicit path review and preserve diffs first |
28
+ | `git branch -D <branch>` | Deletes branch refs even when unmerged | Check merge state and remote backup before deletion |
29
+ | `git push --force` / `git push -f` | Rewrites remote history | Use only with explicit approval and a protected-branch check |
30
+
31
+ Advisory hooks may warn on these patterns, but warnings do not replace the approval and preservation requirements.
32
+
18
33
  ## On Violation
19
34
 
20
35
  1. Stop all operations
@@ -5,9 +5,9 @@
5
5
  ## Architecture
6
6
 
7
7
  **Primary**: Native auto memory (`memory` field in agent frontmatter). No external dependencies.
8
- **Supplementary**: claude-mem MCP (optional, for cross-session search and temporal queries).
8
+ **Supplementary**: AgentMemory-compatible MCP or `omx-memory` for cross-session searchable recall; legacy `claude-mem` is fallback only.
9
9
 
10
- Rule: If native auto memory can handle it, do NOT use claude-mem.
10
+ Rule: If native auto memory can handle it, do NOT use a searchable MCP backend.
11
11
 
12
12
  ## Native Auto Memory
13
13
 
@@ -22,15 +22,23 @@ Agent frontmatter `memory: project|user|local` enables persistent memory:
22
22
  | `project` | `.codex/agent-memory/<name>/` | Yes |
23
23
  | `local` | `.codex/agent-memory-local/<name>/` | No |
24
24
 
25
- ## When to Use claude-mem
25
+ ## When to Use Searchable MCP Memory
26
26
 
27
- | Scenario | Native | claude-mem |
27
+ | Scenario | Native | AgentMemory-compatible / omx-memory |
28
28
  |----------|--------|------------|
29
29
  | Agent learns project patterns | Yes | |
30
30
  | Search across sessions | | Yes |
31
31
  | Temporal queries | | Yes |
32
32
  | Cross-agent sharing | | Yes |
33
33
 
34
+ <!-- DETAIL: Backend Selection and Split-Brain Guard
35
+
36
+ Prefer MCP tools named `memory_search`, `memory_add`, `observation_add`, and `memory_read`. Treat `chroma_query_documents`, `chroma_add_documents`, and `chroma_get_documents` as legacy `claude-mem` fallbacks.
37
+
38
+ If both backend families are available, warn before writing. Dual-write is acceptable only during an explicit migration window; outside that window, choose one canonical searchable backend and record which one was used in the session summary.
39
+
40
+ -->
41
+
34
42
  ## Best Practices
35
43
 
36
44
  - Consult memory before starting work
@@ -324,20 +332,21 @@ User signals session end
324
332
  2. Update native auto-memory (MEMORY.md)
325
333
  3. Return formatted summary to orchestrator
326
334
  → Orchestrator performs MCP saves directly:
327
- 1. claude-mem save (if available via ToolSearch)
335
+ 1. searchable memory save (AgentMemory-compatible or omx-memory, if available via ToolSearch)
336
+ 2. legacy claude-mem save only when it is the configured fallback
328
337
  (episodic-memory auto-indexes after session — no action needed)
329
338
  → Orchestrator confirms to user
330
339
  ```
331
340
 
332
341
  ### Responsibility Split
333
342
 
334
- MCP tools (claude-mem, episodic-memory) are **orchestrator-scoped** and not inherited by subagents. Therefore:
343
+ MCP tools (searchable memory backends, episodic-memory) are **orchestrator-scoped** and not inherited by subagents. Therefore:
335
344
 
336
345
  | Responsibility | Owner | Reason |
337
346
  |----------------|-------|--------|
338
347
  | Session summary collection | sys-memory-keeper | Domain expertise in memory formatting |
339
348
  | Native auto-memory (MEMORY.md) | sys-memory-keeper | Has Write access to memory directory |
340
- | claude-mem MCP save | Orchestrator | MCP tools only available at orchestrator level |
349
+ | Searchable memory MCP save | Orchestrator | MCP tools only available at orchestrator level |
341
350
  | episodic-memory | Automatic | Conversations are auto-indexed after session ends — no manual action needed |
342
351
 
343
352
  ### Dual-System Save
@@ -345,13 +354,14 @@ MCP tools (claude-mem, episodic-memory) are **orchestrator-scoped** and not inhe
345
354
  | System | Owner | Tool | Action | Required |
346
355
  |--------|-------|------|--------|----------|
347
356
  | Native auto-memory | sys-memory-keeper | Write | Update MEMORY.md with session learnings | Yes |
348
- | claude-mem | Orchestrator | `mcp__plugin_claude-mem_mcp-search__save_memory` | Save session summary with project, tasks, decisions | No (best-effort) |
357
+ | AgentMemory-compatible / omx-memory | Orchestrator | `memory_add` or `observation_add` | Save session summary with project, tasks, decisions | No (best-effort) |
358
+ | legacy claude-mem | Orchestrator | `chroma_add_documents` or compatible save wrapper | Fallback searchable save when no preferred backend exists | No (best-effort) |
349
359
  | episodic-memory | Automatic | (auto-indexed) | No action needed — conversations are indexed automatically after session ends | N/A |
350
360
  -->
351
361
 
352
362
  ### Session-End Self-Check (MANDATORY)
353
363
 
354
- (1) sys-memory-keeper updated MEMORY.md? (2) claude-mem save attempted? Both are required before confirming session-end to the user. See full self-check via Read tool.
364
+ (1) sys-memory-keeper updated MEMORY.md? (2) searchable memory save attempted when a backend is available? Both are required before confirming session-end to the user. See full self-check via Read tool.
355
365
 
356
366
  <!-- DETAIL: Session-End Self-Check (MANDATORY)
357
367
  ```
@@ -362,7 +372,7 @@ MCP tools (claude-mem, episodic-memory) are **orchestrator-scoped** and not inhe
362
372
  ║ YES → Continue ║
363
373
  ║ NO → Delegate to sys-memory-keeper first ║
364
374
  ║ ║
365
- ║ 2. Did I attempt claude-mem save?
375
+ ║ 2. Did I attempt searchable memory save when available?
366
376
  ║ YES → Continue (even if it failed) ║
367
377
  ║ NO → ToolSearch + save now ║
368
378
  ║ ║
@@ -379,5 +389,5 @@ MCP tools (claude-mem, episodic-memory) are **orchestrator-scoped** and not inhe
379
389
  ### Failure Policy
380
390
 
381
391
  - MCP saves are **non-blocking**: memory failure MUST NOT prevent session from ending
382
- - If claude-mem unavailable: skip, log warning
392
+ - If no searchable memory backend is available: skip, log warning
383
393
  - episodic-memory: no action needed (auto-indexed after session)
@@ -12,6 +12,16 @@ Review code from an attacker's perspective using STRIDE + OWASP frameworks.
12
12
 
13
13
  ## 4-Phase Review Process
14
14
 
15
+ ### Pre-flight: CRG Attack-Surface Probe
16
+ If a code-review graph or CRG MCP server is available, use it before manual inspection:
17
+
18
+ ```text
19
+ Preferred: query_graph({ target, focus: "trust-boundaries attack-surface data-flow" })
20
+ Fallback: get_impact_radius({ target })
21
+ ```
22
+
23
+ Use the result to seed trust-boundary, data-flow, and dependency-risk analysis. If CRG tools are unavailable, continue with local `rg`, route inspection, and dependency/file reads; CRG is advisory and must not block adversarial review.
24
+
15
25
  ### Phase 1: Trust Boundary Analysis
16
26
  Identify where trust transitions occur:
17
27
  - External input reaching internal logic without validation → **Tampering**
@@ -85,6 +85,15 @@ If any GATE: block and suggest alternative.
85
85
  If any WARN: show warning, ask user to confirm.
86
86
  If only PASS/INFO: proceed automatically.
87
87
 
88
+ ### Guard 5: Review Graph Context Probe
89
+ **Level**: INFO
90
+ **Check**: If a code-review graph or CRG MCP server is available, query impact radius before selecting the expert:
91
+ ```text
92
+ Preferred: get_impact_radius({ target })
93
+ Fallback: get_minimal_context({ target, purpose: "dev-review" })
94
+ ```
95
+ **Action**: Attach the returned affected files, owners, and dependency edges to the review prompt. If the CRG tools are unavailable or time out, continue with `rg`, `git diff`, and local file reads; CRG is advisory and must not block review.
96
+
88
97
  ## Parameters
89
98
 
90
99
  | Name | Type | Required | Description |
@@ -105,12 +114,13 @@ If only PASS/INFO: proceed automatically.
105
114
  ```
106
115
  0. Run pre-flight guards (see ## Pre-flight Guards)
107
116
  1. Detect language (or use --lang)
108
- 2. Select appropriate expert agent
109
- 3. Load language-specific skill
110
- 4. Analyze code against best practices
111
- 5. Generate review report
117
+ 2. Include CRG impact context when available
118
+ 3. Select appropriate expert agent
119
+ 4. Load language-specific skill
120
+ 5. Analyze code against best practices
121
+ 6. Generate review report
112
122
  ```
113
- 6. **Artifact persistence** (optional): Review agent saves findings to:
123
+ 7. **Artifact persistence** (optional): Review agent saves findings to:
114
124
  ```
115
125
  .codex/outputs/sessions/{YYYY-MM-DD}/dev-review-{HHmmss}.md
116
126