oh-my-customcodex 0.4.15 → 0.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 +7 -7
- package/dist/cli/index.js +65 -20
- package/dist/index.js +40 -4
- package/package.json +1 -1
- package/templates/.claude/agents/mgr-gitnerd.md +4 -0
- package/templates/.claude/agents/mgr-sauron.md +5 -4
- package/templates/.claude/hooks/hooks.json +13 -0
- package/templates/.claude/hooks/scripts/context-budget-advisor.sh +40 -2
- package/templates/.claude/hooks/scripts/cost-cap-advisor.sh +8 -3
- package/templates/.claude/hooks/scripts/destructive-git-guard.sh +53 -0
- package/templates/.claude/hooks/scripts/omcustom-auto-update.sh +5 -5
- package/templates/.claude/hooks/scripts/session-env-check.sh +8 -6
- package/templates/.claude/hooks/scripts/stuck-detector.sh +2 -2
- package/templates/.claude/ontology/skills.yaml +3 -3
- package/templates/.claude/rules/MUST-agent-design.md +1 -0
- package/templates/.claude/rules/MUST-orchestrator-coordination.md +6 -0
- package/templates/.claude/rules/MUST-safety.md +15 -0
- package/templates/.claude/rules/SHOULD-hud-statusline.md +2 -0
- package/templates/.claude/skills/gitlab/SKILL.md +346 -0
- package/templates/.claude/skills/goal/SKILL.md +5 -3
- package/templates/.claude/skills/harness-synthesizer/SKILL.md +32 -0
- package/templates/.claude/skills/help/SKILL.md +2 -2
- package/templates/.claude/skills/lists/SKILL.md +2 -2
- package/templates/.claude/skills/npm-version/SKILL.md +6 -0
- package/templates/.claude/skills/omcodex-release-notes/SKILL.md +5 -4
- package/templates/.claude/skills/post-release-followup/SKILL.md +1 -1
- package/templates/.claude/skills/status/SKILL.md +1 -1
- package/templates/.claude/statusline.sh +24 -3
- package/templates/AGENTS.md.en +5 -3
- package/templates/AGENTS.md.ko +5 -3
- package/templates/CLAUDE.md +12 -3
- package/templates/CLAUDE.md.en +12 -3
- package/templates/CLAUDE.md.ko +12 -3
- package/templates/guides/claude-code/04-agent-skills.md +16 -0
- package/templates/guides/claude-code/06-mcp.md +6 -0
- package/templates/guides/claude-code/13-cli-flags.md +13 -1
- package/templates/guides/claude-code/15-version-compatibility.md +59 -0
- package/templates/guides/claude-code/index.yaml +5 -0
- package/templates/guides/git-safety/README.md +44 -0
- package/templates/guides/hook-data-flow/README.md +16 -16
- package/templates/guides/index.yaml +6 -0
- package/templates/guides/professor-triage/phases.md +324 -0
- package/templates/manifest.json +3 -3
- package/templates/workflows/auto-dev.yaml +13 -1
package/templates/CLAUDE.md
CHANGED
|
@@ -99,7 +99,7 @@ oh-my-customcodex로 구동됩니다.
|
|
|
99
99
|
|----------|------------|------|
|
|
100
100
|
| 프로젝트 관리 | `/omcustomcodex:analysis`, `/omcustomcodex:create-agent`, `/omcustomcodex:audit-agents` | 분석, 에이전트/스킬 생성, 감사 |
|
|
101
101
|
| 아이디어 | `/idea` | 자연어 아이디어를 구조화된 이슈 스펙으로 변환 |
|
|
102
|
-
| 개발 | `/goal`, `/dev-review`, `/dev-refactor`, `/sdd-dev`, `/structured-dev-cycle` | 목표 실행, 코드 리뷰, 리팩토링, SDD |
|
|
102
|
+
| 개발 | `/omcustomcodex:goal`, `/dev-review`, `/dev-refactor`, `/sdd-dev`, `/structured-dev-cycle` | 목표 실행, 코드 리뷰, 리팩토링, SDD |
|
|
103
103
|
| 검증 | `/omcustomcodex:sauron-watch`, `/deep-verify`, `/adversarial-review` | R017 검증, 릴리즈 품질, 보안 리뷰 |
|
|
104
104
|
| 릴리즈 | `/pipeline auto-dev`, `/omcustomcodex-release-notes`, `/release-plan` | 자동 개발, 릴리즈 노트 |
|
|
105
105
|
| 리서치 | `/research`, `/scout`, `/deep-plan`, `/omcustomcodex:agora` | 병렬 분석, URL 평가, 연구 계획 |
|
|
@@ -119,8 +119,8 @@ project/
|
|
|
119
119
|
| +-- hooks/ # 훅 스크립트 (보안, 검증, HUD)
|
|
120
120
|
| +-- contexts/ # 컨텍스트 파일 (ecomode)
|
|
121
121
|
+-- .agents/
|
|
122
|
-
| +-- skills/ # 스킬 (
|
|
123
|
-
+-- guides/ # 레퍼런스 문서 (
|
|
122
|
+
| +-- skills/ # 스킬 (119 디렉토리)
|
|
123
|
+
+-- guides/ # 레퍼런스 문서 (40 토픽)
|
|
124
124
|
```
|
|
125
125
|
|
|
126
126
|
## 오케스트레이션
|
|
@@ -256,6 +256,15 @@ Codex CLI의 Agent Teams 기능이 활성화되어 있으면 (`OMCODEX_AGENT_TEA
|
|
|
256
256
|
/plugin install openai-docs
|
|
257
257
|
/plugin install elements-of-style
|
|
258
258
|
|
|
259
|
+
# 플러그인 인벤토리와 세션 토큰 비용 예측 확인 (Claude Code v2.1.139+)
|
|
260
|
+
claude plugin details superpowers
|
|
261
|
+
|
|
262
|
+
# 세션 전체 에이전트 목록 확인 (Claude Code v2.1.139+)
|
|
263
|
+
claude agents
|
|
264
|
+
|
|
265
|
+
# 인터랙티브 세션에서 마우스 휠 스크롤 속도 조정
|
|
266
|
+
/scroll-speed
|
|
267
|
+
|
|
259
268
|
# MCP 설정 (omx-memory)
|
|
260
269
|
omx memory doctor
|
|
261
270
|
```
|
package/templates/CLAUDE.md.en
CHANGED
|
@@ -121,7 +121,7 @@ NO EXCEPTIONS. NO EXCUSES.
|
|
|
121
121
|
| `/pre-generation-arch-check` | Check architecture risks before implementation |
|
|
122
122
|
| `/omcustomcodex:sauron-watch` | Full R017 verification |
|
|
123
123
|
| `/structured-dev-cycle` | 6-stage structured development cycle (Plan → Verify → Implement → Verify → Compound → Done) |
|
|
124
|
-
| `/goal` | Keep a concrete objective through planning, execution, and verification |
|
|
124
|
+
| `/omcustomcodex:goal` | Keep a concrete objective through planning, execution, and verification |
|
|
125
125
|
| `/omcustomcodex:lists` | Show all available commands |
|
|
126
126
|
| `/omcustomcodex:status` | Show system status |
|
|
127
127
|
| `/omcustomcodex:help` | Show help information |
|
|
@@ -133,11 +133,11 @@ project/
|
|
|
133
133
|
+-- AGENTS.md # Entry point
|
|
134
134
|
+-- .codex/
|
|
135
135
|
| +-- agents/ # Subagent definitions (49 files)
|
|
136
|
-
| +-- skills/ # Skills (
|
|
136
|
+
| +-- skills/ # Skills (119 directories)
|
|
137
137
|
| +-- rules/ # Global rules (22 files)
|
|
138
138
|
| +-- hooks/ # Hook scripts (security, validation, HUD)
|
|
139
139
|
| +-- contexts/ # Context files (4 files)
|
|
140
|
-
+-- guides/ # Reference docs (
|
|
140
|
+
+-- guides/ # Reference docs (40 topics)
|
|
141
141
|
```
|
|
142
142
|
|
|
143
143
|
## Orchestration
|
|
@@ -252,6 +252,15 @@ Install in Claude Code via `/plugin install <name>`:
|
|
|
252
252
|
/plugin install openai-docs
|
|
253
253
|
/plugin install elements-of-style
|
|
254
254
|
|
|
255
|
+
# Inspect plugin inventory and projected session token cost (Claude Code v2.1.139+)
|
|
256
|
+
claude plugin details superpowers
|
|
257
|
+
|
|
258
|
+
# Inspect installed agents across sessions (Claude Code v2.1.139+)
|
|
259
|
+
claude agents
|
|
260
|
+
|
|
261
|
+
# Tune local mouse-wheel scrolling inside the interactive session
|
|
262
|
+
/scroll-speed
|
|
263
|
+
|
|
255
264
|
# MCP setup (omx-memory)
|
|
256
265
|
omx memory doctor
|
|
257
266
|
```
|
package/templates/CLAUDE.md.ko
CHANGED
|
@@ -121,7 +121,7 @@ oh-my-customcodex로 구동됩니다.
|
|
|
121
121
|
| `/pre-generation-arch-check` | 구현 전 아키텍처 위험 점검 |
|
|
122
122
|
| `/omcustomcodex:sauron-watch` | 전체 R017 검증 |
|
|
123
123
|
| `/structured-dev-cycle` | 6단계 구조적 개발 사이클 (Plan → Verify → Implement → Verify → Compound → Done) |
|
|
124
|
-
| `/goal` | 구체 목표를 계획, 실행, 검증까지 유지 |
|
|
124
|
+
| `/omcustomcodex:goal` | 구체 목표를 계획, 실행, 검증까지 유지 |
|
|
125
125
|
| `/omcustomcodex:lists` | 모든 사용 가능한 커맨드 표시 |
|
|
126
126
|
| `/omcustomcodex:status` | 시스템 상태 표시 |
|
|
127
127
|
| `/omcustomcodex:help` | 도움말 표시 |
|
|
@@ -133,11 +133,11 @@ project/
|
|
|
133
133
|
+-- AGENTS.md # 진입점
|
|
134
134
|
+-- .codex/
|
|
135
135
|
| +-- agents/ # 서브에이전트 정의 (49 파일)
|
|
136
|
-
| +-- skills/ # 스킬 (
|
|
136
|
+
| +-- skills/ # 스킬 (119 디렉토리)
|
|
137
137
|
| +-- rules/ # 전역 규칙 (22 파일)
|
|
138
138
|
| +-- hooks/ # 훅 스크립트 (보안, 검증, HUD)
|
|
139
139
|
| +-- contexts/ # 컨텍스트 파일 (4 파일)
|
|
140
|
-
+-- guides/ # 레퍼런스 문서 (
|
|
140
|
+
+-- guides/ # 레퍼런스 문서 (40 토픽)
|
|
141
141
|
```
|
|
142
142
|
|
|
143
143
|
## 오케스트레이션
|
|
@@ -252,6 +252,15 @@ Claude Code 환경에서 `/plugin install <이름>`으로 설치:
|
|
|
252
252
|
/plugin install openai-docs
|
|
253
253
|
/plugin install elements-of-style
|
|
254
254
|
|
|
255
|
+
# 플러그인 인벤토리와 세션 토큰 비용 예측 확인 (Claude Code v2.1.139+)
|
|
256
|
+
claude plugin details superpowers
|
|
257
|
+
|
|
258
|
+
# 세션 전체 에이전트 목록 확인 (Claude Code v2.1.139+)
|
|
259
|
+
claude agents
|
|
260
|
+
|
|
261
|
+
# 인터랙티브 세션에서 마우스 휠 스크롤 속도 조정
|
|
262
|
+
/scroll-speed
|
|
263
|
+
|
|
255
264
|
# MCP 설정 (omx-memory)
|
|
256
265
|
omx memory doctor
|
|
257
266
|
```
|
|
@@ -53,6 +53,22 @@ description: Brief description of what this Skill does and when to use it
|
|
|
53
53
|
- 비어 있지 않아야 함
|
|
54
54
|
- 최대 1024자
|
|
55
55
|
|
|
56
|
+
### 네이티브 커맨드 충돌 피하기
|
|
57
|
+
|
|
58
|
+
Claude Code v2.1.139+는 `/goal`을 세션 완료 조건 추적용 네이티브 커맨드로 예약합니다. oh-my-customcodex의 목표 실행 워크플로우는 `/omcustomcodex:goal`로 호출해야 하며, Skill 프론트매터도 `name: omcustomcodex:goal`을 사용합니다.
|
|
59
|
+
|
|
60
|
+
디렉터리 이름은 호환성을 위해 `goal/`로 유지할 수 있지만, 사용자에게 노출되는 엔트리포인트는 프론트매터의 `name` 값입니다. 새 스킬이 Claude Code 네이티브 커맨드와 이름이 겹칠 가능성이 있으면 `omcustomcodex:` 네임스페이스를 우선 사용하세요.
|
|
61
|
+
|
|
62
|
+
### 플러그인 인벤토리 검증
|
|
63
|
+
|
|
64
|
+
Claude Code v2.1.139+에서는 다음 명령으로 설치된 플러그인의 구성 요소와 세션별 토큰 비용 예측을 확인할 수 있습니다:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
claude plugin details <plugin-name>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
oh-my-customcodex 호환 템플릿을 검증할 때는 플러그인 설치 후 이 명령으로 skill/agent 구성 요소 수와 예상 토큰 비용을 확인하고, Codex 쪽 패키지 인벤토리는 `omcustomcodex list`로 확인하세요.
|
|
71
|
+
|
|
56
72
|
## 사용 가능한 Skills
|
|
57
73
|
|
|
58
74
|
### 사전 구축된 Agent Skills
|
|
@@ -55,6 +55,12 @@ response = client.beta.messages.create(
|
|
|
55
55
|
| `name` | string | 예 | 이 MCP 서버의 고유 식별자 |
|
|
56
56
|
| `authorization_token` | string | 아니오 | OAuth 인증 토큰 |
|
|
57
57
|
|
|
58
|
+
## Claude Code 로컬 MCP 재연결
|
|
59
|
+
|
|
60
|
+
Claude Code v2.1.139+에서는 `/mcp` reconnect가 `.mcp.json` 편집을 전체 재시작 없이 다시 읽습니다. Claude Code 호환 템플릿을 검증할 때 로컬 MCP 서버를 추가하거나 수정했다면 `/mcp`에서 reconnect를 실행해 즉시 반영 여부를 확인하세요.
|
|
61
|
+
|
|
62
|
+
oh-my-customcodex의 Codex 런타임 MCP 설정은 여전히 `.codex/config.toml` 및 `omcustomcodex` 관리 경로를 기준으로 합니다. Claude Code 호환 테스트를 위해 `.mcp.json`을 쓰더라도 Codex 설치 경로의 MCP 설정과 혼동하지 마세요.
|
|
63
|
+
|
|
58
64
|
## MCP 도구 집합 구성
|
|
59
65
|
|
|
60
66
|
```json
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
| `--remote` | Connect to remote Claude Code instance | `claude --remote` |
|
|
9
9
|
| `--bare` | Minimal UI, no statusline | `claude --bare` |
|
|
10
10
|
| `--agent <name>` | Use specific agent as main thread | `claude --agent lang-golang-expert` |
|
|
11
|
-
| `--agents` | List available agents | `claude --agents` |
|
|
11
|
+
| `--agents` | List available agents (legacy flag; use `claude agents` for the unified view on v2.1.139+) | `claude --agents` |
|
|
12
12
|
| `--from-pr <url>` | Start from a pull request | `claude --from-pr https://github.com/org/repo/pull/123` |
|
|
13
13
|
| `--chrome` | Enable Chrome browser automation | `claude --chrome` |
|
|
14
14
|
| `--json-schema` | Output JSON schema for structured output | `claude --json-schema schema.json` |
|
|
@@ -17,6 +17,18 @@
|
|
|
17
17
|
| `--fork-session` | Fork an existing session | `claude --fork-session` |
|
|
18
18
|
| `--teleport` | Transfer session context to another terminal | `claude --teleport` |
|
|
19
19
|
|
|
20
|
+
## Interactive Commands
|
|
21
|
+
|
|
22
|
+
Claude Code v2.1.139+ adds a few user-facing commands that are useful when running oh-my-customcodex compatibility templates inside Claude Code:
|
|
23
|
+
|
|
24
|
+
| Command | Use |
|
|
25
|
+
|---------|-----|
|
|
26
|
+
| `claude agents` | Open the Research Preview agent view with a unified list across sessions. Use it to confirm installed `.claude/agents/` entries after template updates. |
|
|
27
|
+
| `/scroll-speed` | Tune mouse-wheel scroll speed with live preview. This is a local UI preference and does not change harness behavior. |
|
|
28
|
+
| `claude plugin details <name>` | Inspect a plugin's component inventory and projected per-session token cost. Use it after plugin installs to validate skill/agent counts. |
|
|
29
|
+
|
|
30
|
+
`/goal` is also native in v2.1.139+. The oh-my-customcodex workflow entrypoint is `/omcustomcodex:goal` so the workflow does not shadow the native completion tracker.
|
|
31
|
+
|
|
20
32
|
## Headless Mode (`claude -p`)
|
|
21
33
|
|
|
22
34
|
Headless mode runs Claude Code non-interactively, useful for CI/CD pipelines and automated workflows.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Claude Code Version Compatibility
|
|
2
|
+
|
|
3
|
+
This guide records Claude Code release-note impact that affects the Claude compatibility template. The Codex-native runtime still uses `.codex/**` and OMX as the primary surface.
|
|
4
|
+
|
|
5
|
+
## v2.1.141
|
|
6
|
+
|
|
7
|
+
Published: 2026-05-13.
|
|
8
|
+
|
|
9
|
+
Source: upstream oh-my-customcode #1137, Codex port #1310.
|
|
10
|
+
|
|
11
|
+
| Change | Impact on oh-my-customcodex | Action |
|
|
12
|
+
|--------|------------------------------|--------|
|
|
13
|
+
| Hook JSON output can include `terminalSequence` for desktop notifications, window titles, and terminal bells | Optional complement to stderr HUD events and the command statusline; no Codex hook change is required for this release. | Record the option in R012 and defer any hook implementation until there is a concrete UX need. |
|
|
14
|
+
| `CLAUDE_CODE_PLUGIN_PREFER_HTTPS` clones GitHub plugin sources over HTTPS instead of SSH | Helps Claude-template users install plugins in CI or locked-down networks without GitHub SSH keys. | No command change; document as opt-in environment behavior. |
|
|
15
|
+
| `ANTHROPIC_WORKSPACE_ID` scopes workload identity federation tokens to one workspace | Useful only for multi-workspace enterprise Claude environments. | No Codex-side change required. |
|
|
16
|
+
| `claude agents --cwd <path>` scopes the session list to a directory | Reduces noise when monitoring Claude compatibility sessions from a monorepo or multi-project workspace. | Track as a P3 CLI-flags guide follow-up; keep canonical project examples on `oh-my-customcodex`. |
|
|
17
|
+
| `/feedback` can include recent sessions from the last 24 hours or 7 days | Improves upstream bug reports for multi-session agent behavior. | No harness change required. |
|
|
18
|
+
| Rewind menu can summarize earlier context while preserving recent turns | Complements manual context management and memory handoff guidance. | No hook change required. |
|
|
19
|
+
| Auto-mode permission dialogs explain which `permissions.ask` rule caused a prompt | Makes Claude-template permission debugging easier. | Keep permission guidance explicit; no template mutation needed. |
|
|
20
|
+
| IDE file-edit prompts restored the "view diff in your IDE" option | UX restoration only. | No action. |
|
|
21
|
+
| Background agents launched via `/bg` or `←←` preserve the current permission mode | Removes a historical source of unattended permission prompts in Claude compatibility sessions. | Add an R010 note; keep delegated tool policy explicit for workflows that rely on unattended writes. |
|
|
22
|
+
| `claude agents` marks completed agents correctly even if a background shell remains | Improves R009/R018 monitoring for long-running compatibility sessions. | No Codex-side change required. |
|
|
23
|
+
| Spinner, plugin menu, provider fallback, daemon, and Windows fixes are additive stability improvements | No direct package behavior change. | No action beyond this compatibility record. |
|
|
24
|
+
|
|
25
|
+
## v2.1.140
|
|
26
|
+
|
|
27
|
+
Published: 2026-05-12.
|
|
28
|
+
|
|
29
|
+
| Change | Impact on oh-my-customcodex | Action |
|
|
30
|
+
|--------|------------------------------|--------|
|
|
31
|
+
| Agent `subagent_type` matching accepts case and separator variants | No runtime change. This repo still documents strict kebab-case agent names so Codex and Claude template references stay deterministic. | Keep examples such as `code-reviewer` and `lang-typescript-expert` in canonical form. |
|
|
32
|
+
| Native `/goal` no longer silently hangs under managed-hook restrictions | Compatible with the v0.4.16 namespace split. | Keep the native `/goal` reserved and call the packaged workflow as `/omcustomcodex:goal`. |
|
|
33
|
+
| Settings hot reload handles symlinked settings files more reliably | Reduces false `ConfigChange` noise for Claude template users. | No template change required. |
|
|
34
|
+
| `claude --bg` and background service startup were hardened | Improves long-running Claude compatibility sessions. | No Codex-side change required. |
|
|
35
|
+
| Remote managed settings retry once after a 401 | Reduces transient managed-settings failures. | No template change required. |
|
|
36
|
+
| Managed `extraKnownMarketplaces` persistence was fixed | Relevant only when Claude plugin marketplaces are managed externally. | Audit managed settings if plugin marketplace state appears stale. |
|
|
37
|
+
| `/loop` avoids redundant polling wakeups | Aligns with the repo's loop guidance to avoid unnecessary background wakeups. | No template change required. |
|
|
38
|
+
| Windows missing-executable checks avoid repeated synchronous `where.exe` spawns | Helps Windows users when tools such as `gh` are missing. | Keep hook scripts graceful when optional tools are absent. |
|
|
39
|
+
| `Read` offset validation accepts whitespace-padded or plus-prefixed strings | No template change. The repo examples already use numeric offsets plainly. | Keep generated examples simple. |
|
|
40
|
+
| Plugin component-folder conflicts now warn in `/doctor`, `claude plugin list`, and `/plugin` | Useful for template compatibility checks. | Run `claude plugin details <name>` and `/doctor` after plugin manifest changes. |
|
|
41
|
+
|
|
42
|
+
## v2.1.139
|
|
43
|
+
|
|
44
|
+
Published: 2026-05-11.
|
|
45
|
+
|
|
46
|
+
| Change | Port decision |
|
|
47
|
+
|--------|---------------|
|
|
48
|
+
| Hook `args: string[]` exec form | Reviewed. The current hook registry intentionally keeps shell `command` form because most hooks use `jq`, environment expansion, pipes, or inline shell snippets. Use `args` only for new hooks that are a single binary plus static arguments. |
|
|
49
|
+
| PostToolUse `continueOnBlock` | Ported for high-signal advisory hooks. `context-budget-advisor.sh`, `stuck-detector.sh`, and `cost-cap-advisor.sh` set `continueOnBlock: true`; scripts use `exit 2` only when model-visible recovery guidance is needed. |
|
|
50
|
+
| Native `/goal` | The packaged workflow uses `/omcustomcodex:goal`; native `/goal` stays available for Claude Code completion tracking. |
|
|
51
|
+
| `claude agents`, `/scroll-speed`, `claude plugin details <name>`, `/mcp` reconnect | Documented in the CLI, MCP, AGENTS, and CLAUDE template guidance. |
|
|
52
|
+
|
|
53
|
+
## Compatibility Rules
|
|
54
|
+
|
|
55
|
+
1. Keep `.codex/**` as the source of truth for the Codex package.
|
|
56
|
+
2. Mirror Claude compatibility guidance under `templates/.claude/**` and `templates/guides/**` when behavior affects installed templates.
|
|
57
|
+
3. Prefer canonical kebab-case agent names even if Claude Code accepts looser variants.
|
|
58
|
+
4. Do not migrate shell hook entries to `args` unless the hook has no shell expansion, no pipes, and no inline script body.
|
|
59
|
+
5. Use `continueOnBlock` only for PostToolUse signals that the model can act on immediately.
|
|
@@ -64,3 +64,8 @@ documents:
|
|
|
64
64
|
title: 토큰 효율 레이어
|
|
65
65
|
description: 플러그인, 런타임, 설정 레이어를 분리한 토큰 효율 최적화 가이드
|
|
66
66
|
path: ./14-token-efficiency.md
|
|
67
|
+
|
|
68
|
+
- name: version-compatibility
|
|
69
|
+
title: 버전 호환성
|
|
70
|
+
description: Claude Code 릴리스별 oh-my-customcodex 호환성 판단 기록
|
|
71
|
+
path: ./15-version-compatibility.md
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Git Safety Guide
|
|
2
|
+
|
|
3
|
+
Use this guide when an agent or workflow needs to clean, reset, delete, or rewrite git state. The goal is to preserve user work first, then make the smallest safe git change with clear recovery evidence.
|
|
4
|
+
|
|
5
|
+
## Destructive Command Reference
|
|
6
|
+
|
|
7
|
+
| Command | Primary risk | Safer first step |
|
|
8
|
+
|---------|--------------|------------------|
|
|
9
|
+
| `git reset --hard` | Drops tracked worktree changes | Save `git diff` output or commit/stash intentionally |
|
|
10
|
+
| `git clean -fd` / `git clean -fdx` | Deletes untracked files and generated artifacts | Run `git clean -ndx` and inspect the target list |
|
|
11
|
+
| `git restore .` | Reverts tracked files broadly | Limit to explicit files after reviewing `git diff` |
|
|
12
|
+
| `git checkout -- .` | Legacy broad revert of tracked files | Prefer explicit `git restore -- <file>` with approval |
|
|
13
|
+
| `git branch -D <branch>` | Deletes an unmerged branch ref | Check merge state and remote backup first |
|
|
14
|
+
| `git push --force` / `git push -f` | Rewrites remote history | Use only with explicit approval and protected-branch checks |
|
|
15
|
+
|
|
16
|
+
## Preflight Checklist
|
|
17
|
+
|
|
18
|
+
1. Run `git status --short` and identify tracked, untracked, and ignored files separately.
|
|
19
|
+
2. Preserve useful changes with a commit, patch, stash, or copied artifact before cleanup.
|
|
20
|
+
3. For branch deletion, run `git branch --merged` and check whether the branch exists on a remote.
|
|
21
|
+
4. For release branches, check that a local `release` branch does not block the `release/v*` namespace.
|
|
22
|
+
5. State the exact target and recovery path before running the command.
|
|
23
|
+
|
|
24
|
+
## Recovery Checklist
|
|
25
|
+
|
|
26
|
+
1. Stop further destructive git commands.
|
|
27
|
+
2. Inspect `git reflog` for the prior `HEAD`.
|
|
28
|
+
3. Use `git status --short` and `git diff` to identify current loss scope.
|
|
29
|
+
4. Recover tracked changes from the reflog or saved patch.
|
|
30
|
+
5. Recover untracked files only from backups, editor history, or generated artifacts.
|
|
31
|
+
|
|
32
|
+
## Agent Workflow Rules
|
|
33
|
+
|
|
34
|
+
- Verification agents must not clean the worktree to create a baseline.
|
|
35
|
+
- Git specialists should commit or otherwise preserve implemented changes before deep verification.
|
|
36
|
+
- Release workflows must prefer branch rename over forced deletion when a local `release` branch blocks `release/v*`.
|
|
37
|
+
- Advisory hooks are evidence, not permission. A warning still requires the R001 approval path before continuing.
|
|
38
|
+
|
|
39
|
+
## See Also
|
|
40
|
+
|
|
41
|
+
- `.codex/rules/MUST-safety.md`
|
|
42
|
+
- `.codex/hooks/scripts/destructive-git-guard.sh`
|
|
43
|
+
- `.codex/agents/mgr-gitnerd.md`
|
|
44
|
+
- `guides/git-worktree-workflow/README.md`
|
|
@@ -26,22 +26,22 @@ The pipeline spans two hook events and three scripts:
|
|
|
26
26
|
SubagentStart event
|
|
27
27
|
└─ agent-start-recorder.sh
|
|
28
28
|
reads: stdin JSON (agent_type, model, description)
|
|
29
|
-
writes: /tmp/.
|
|
29
|
+
writes: /tmp/.codex-agent-starts-$PPID (appends 1 JSON line)
|
|
30
30
|
|
|
31
31
|
SubagentStop event [hooks execute in array order — ordering is critical]
|
|
32
32
|
│
|
|
33
33
|
├─ [1] task-outcome-recorder.sh
|
|
34
34
|
│ reads: stdin JSON (agent_type, model, outcome)
|
|
35
|
-
│ reads: /tmp/.
|
|
36
|
-
│ writes: /tmp/.
|
|
35
|
+
│ reads: /tmp/.codex-agent-starts-$PPID (duration calc — entry still present)
|
|
36
|
+
│ writes: /tmp/.codex-task-outcomes-$PPID (appends 1 JSON line with duration_seconds)
|
|
37
37
|
│ writes: stderr (on failure only)
|
|
38
38
|
│
|
|
39
39
|
└─ [2] stall-detection-advisor.sh
|
|
40
40
|
reads: stdin JSON (agent_type, model, description)
|
|
41
|
-
reads: /tmp/.
|
|
42
|
-
reads: /tmp/.
|
|
43
|
-
writes: /tmp/.
|
|
44
|
-
writes: /tmp/.
|
|
41
|
+
reads: /tmp/.codex-agent-starts-$PPID (finds matching start entry for duration)
|
|
42
|
+
reads: /tmp/.codex-agent-durations-$PPID (peer durations for average calculation)
|
|
43
|
+
writes: /tmp/.codex-agent-durations-$PPID (appends completed agent's duration)
|
|
44
|
+
writes: /tmp/.codex-agent-starts-$PPID (removes consumed start entry)
|
|
45
45
|
writes: stderr (advisory block if stall detected — R021 advisory-only)
|
|
46
46
|
```
|
|
47
47
|
|
|
@@ -49,9 +49,9 @@ SubagentStop event [hooks execute in array order — ordering is critical]
|
|
|
49
49
|
|
|
50
50
|
At SubagentStop, after at least one peer has already completed:
|
|
51
51
|
|
|
52
|
-
1. Calculate `avg_duration` from all entries in `.
|
|
52
|
+
1. Calculate `avg_duration` from all entries in `.codex-agent-durations-$PPID`
|
|
53
53
|
2. Set `stall_threshold = avg_duration * 2`
|
|
54
|
-
3. Scan `.
|
|
54
|
+
3. Scan `.codex-agent-starts-$PPID` for agents not yet in the duration file (still running)
|
|
55
55
|
4. For each still-running agent where `elapsed > stall_threshold`, emit advisory to stderr
|
|
56
56
|
|
|
57
57
|
The current agent's duration is recorded *after* stall detection so it does not inflate the average for its own check.
|
|
@@ -73,9 +73,9 @@ The current agent's duration is recorded *after* stall detection so it does not
|
|
|
73
73
|
|
|
74
74
|
| File | Writer | Readers | Lifecycle |
|
|
75
75
|
|------|--------|---------|-----------|
|
|
76
|
-
| `/tmp/.
|
|
77
|
-
| `/tmp/.
|
|
78
|
-
| `/tmp/.
|
|
76
|
+
| `/tmp/.codex-agent-starts-$PPID` | `agent-start-recorder.sh` (append) | `task-outcome-recorder.sh` (read), `stall-detection-advisor.sh` (read + remove entry) | Session-scoped via PPID; ring buffer 50 entries; entry removed after `stall-detection-advisor` consumes it |
|
|
77
|
+
| `/tmp/.codex-task-outcomes-$PPID` | `task-outcome-recorder.sh` (append) | `feedback-collector.sh`, `eval-core-batch-save.sh` (at Stop) | Session-scoped via PPID; ring buffer 50 entries |
|
|
78
|
+
| `/tmp/.codex-agent-durations-$PPID` | `stall-detection-advisor.sh` (append) | `stall-detection-advisor.sh` (read for average calculation) | Session-scoped via PPID; ring buffer 50 entries |
|
|
79
79
|
|
|
80
80
|
---
|
|
81
81
|
|
|
@@ -93,7 +93,7 @@ The SubagentStop hook array in `hooks.json` defines a strict ordering:
|
|
|
93
93
|
|
|
94
94
|
**task-outcome-recorder MUST run before stall-detection-advisor.**
|
|
95
95
|
|
|
96
|
-
Reason: `stall-detection-advisor.sh` removes the matching start entry from `.
|
|
96
|
+
Reason: `stall-detection-advisor.sh` removes the matching start entry from `.codex-agent-starts-$PPID` after reading it (to prevent re-matching on the next SubagentStop). If the order were reversed, `task-outcome-recorder.sh` would find no start entry for the agent and would always record `duration_seconds=0`.
|
|
97
97
|
|
|
98
98
|
If the order is swapped:
|
|
99
99
|
- `task-outcome-recorder` records `duration_seconds=0` for all agents
|
|
@@ -107,10 +107,10 @@ If the order is swapped:
|
|
|
107
107
|
```
|
|
108
108
|
Session start (PPID assigned)
|
|
109
109
|
│
|
|
110
|
-
├─ First SubagentStart → .
|
|
110
|
+
├─ First SubagentStart → .codex-agent-starts-$PPID created
|
|
111
111
|
│
|
|
112
|
-
├─ First SubagentStop → .
|
|
113
|
-
│ .
|
|
112
|
+
├─ First SubagentStop → .codex-task-outcomes-$PPID created
|
|
113
|
+
│ .codex-agent-durations-$PPID created
|
|
114
114
|
│
|
|
115
115
|
├─ Each SubagentStop → start entry consumed (removed by stall-detection-advisor)
|
|
116
116
|
│ duration entry appended
|
|
@@ -278,6 +278,12 @@ guides:
|
|
|
278
278
|
source:
|
|
279
279
|
type: internal
|
|
280
280
|
|
|
281
|
+
- name: git-safety
|
|
282
|
+
description: Destructive git command preflight, recovery, and release branch namespace guardrails
|
|
283
|
+
path: ./git-safety/
|
|
284
|
+
source:
|
|
285
|
+
type: internal
|
|
286
|
+
|
|
281
287
|
# Architecture
|
|
282
288
|
- name: skill-bundle-design
|
|
283
289
|
description: Domain skill bundle design patterns for Author/Test/Troubleshoot tri-pattern
|