oh-my-customcode 2.0.7 → 2.0.9

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 (45) hide show
  1. package/README.md +3 -2
  2. package/dist/cli/index.js +28 -7
  3. package/dist/index.js +28 -7
  4. package/package.json +1 -1
  5. package/templates/.claude/hooks/hooks.json +29 -13
  6. package/templates/.claude/hooks/scripts/agent-teams-advisor.sh +47 -22
  7. package/templates/.claude/hooks/scripts/auto-continue-guard.sh +5 -5
  8. package/templates/.claude/hooks/scripts/auto-dev-token-tracker.sh +12 -1
  9. package/templates/.claude/hooks/scripts/bash-cd-advisor.sh +172 -0
  10. package/templates/.claude/hooks/scripts/content-hash-validator.sh +65 -48
  11. package/templates/.claude/hooks/scripts/destructive-git-guard.sh +32 -17
  12. package/templates/.claude/hooks/scripts/fail-axis-cause-advisor.sh +2 -2
  13. package/templates/.claude/hooks/scripts/failure-ledger.sh +18 -0
  14. package/templates/.claude/hooks/scripts/file-change-validator.sh +6 -3
  15. package/templates/.claude/hooks/scripts/git-delegation-guard.sh +178 -27
  16. package/templates/.claude/hooks/scripts/model-escalation-advisor.sh +43 -20
  17. package/templates/.claude/hooks/scripts/omcustom-auto-update.sh +19 -5
  18. package/templates/.claude/hooks/scripts/rule-deletion-guard.sh +118 -1
  19. package/templates/.claude/hooks/scripts/schema-validator.sh +8 -11
  20. package/templates/.claude/hooks/scripts/session-env-check.sh +20 -5
  21. package/templates/.claude/hooks/scripts/stall-detection-advisor.sh +9 -5
  22. package/templates/.claude/hooks/scripts/stuck-detector.sh +21 -4
  23. package/templates/.claude/hooks/scripts/subagent-failure-advisor.sh +48 -29
  24. package/templates/.claude/hooks/scripts/task-outcome-recorder.sh +15 -8
  25. package/templates/.claude/ontology/agents.yaml +71 -7
  26. package/templates/.claude/ontology/graphs/agent-skill.json +64 -5
  27. package/templates/.claude/ontology/graphs/full-graph.json +236 -3
  28. package/templates/.claude/ontology/skills.yaml +65 -1
  29. package/templates/.claude/rules/MUST-agent-design.md +1 -11
  30. package/templates/.claude/rules/MUST-enforcement-policy.md +7 -7
  31. package/templates/.claude/rules/MUST-orchestrator-coordination.md +1 -1
  32. package/templates/.claude/rules/SHOULD-memory-integration.md +1 -1
  33. package/templates/.claude/settings.json +29 -13
  34. package/templates/.claude/skills/fsd/SKILL.md +10 -9
  35. package/templates/.claude/skills/goal/SKILL.md +5 -5
  36. package/templates/.claude/skills/model-escalation/SKILL.md +16 -12
  37. package/templates/.claude/skills/omcustom-loop/SKILL.md +4 -4
  38. package/templates/.claude/skills/pipeline/workflows/auto-dev.yaml +13 -0
  39. package/templates/guides/claude-code/04-agent-skills.md +1 -1
  40. package/templates/guides/claude-code/15-version-compatibility.md +47 -47
  41. package/templates/guides/git-safety/README.md +4 -1
  42. package/templates/guides/middleware-patterns/README.md +4 -4
  43. package/templates/guides/multi-model-routing/README.md +1 -7
  44. package/templates/manifest.json +1 -1
  45. package/templates/workflows/auto-dev.yaml +13 -0
@@ -94,4 +94,7 @@ safe_reset() {
94
94
 
95
95
  ### Destructive op detection (advisory)
96
96
 
97
- See `.claude/hooks/scripts/git-delegation-guard.sh` for the existing R010 advisory pattern. A future `destructive-git-guard.sh` (T2 from #1146, deferred) will add R001 destructive-op-specific warnings.
97
+ Two advisory PreToolUse hooks cover this area; both always exit 0 and never block. Since #1885 each delivers its warning as stdout JSON `hookSpecificOutput.additionalContext` (visible to the model) and prints nothing when silent.
98
+
99
+ - `.claude/hooks/scripts/destructive-git-guard.sh` (T2 from #1146) warns before Bash commands that can discard work (R001): `git reset --hard`, `git clean` with any short-flag cluster containing `f` (`-f`, `-df`, `-xdf`, ...) or `--force`, `git restore` in any form (R001 treats even `git restore <path>` without `--source` as destructive), `git checkout -- .`/`*`/`/`, and `git branch -D`. All forms accept `git -C <path>` (quoted paths too) and `git -c k=v`. `git clean -nf` also fires (conservative); `-n`, `--dry-run` and `-nd` stay silent. The count line (`/tmp/.claude-destructive-git-threshold-${PPID}` marker) appears once per session when the count reaches 3.
100
+ - `.claude/hooks/scripts/git-delegation-guard.sh` flags git write keywords (commit, branch, checkout, merge, tag, ...) in delegation prompts sent to agents other than `mgr-gitnerd` (R010). It skips keywords after a negation on the same line, keywords inside a prohibition block (a `Forbidden:`-style colon header runs to the next blank line or the next non-prohibition label line such as `Allowed:` or `Steps:`, while a prohibition label like `Never:` continues it; a `Forbidden`-style markdown heading covers only its first paragraph or list), read-only `git branch`/`git tag` queries (`--list`, `-l`, `--contains`, `--show-current`, `-a`, `-r`, `-v`, ...; for `git branch` only, not when the same command also has `-d`/`-D`/`--delete`/`-m`/`-M`/`-c`/`-C`), and bare `git tag`/`git branch` used as a noun. ``` fences never open or close blocks. `git -C <path>` and `git -c k=v` (quoted arguments too) are stripped first, and keywords need word boundaries (`git merge-base` and "legit commit" do not match). The count line appears once per session when the count reaches 3.
@@ -25,9 +25,9 @@ LangChain이 정의한 6개의 lifecycle hook은 다음과 같습니다. 각 단
25
25
  | `before_agent` | 에이전트 전체 실행 시작 전 | `SessionStart`, `UserPromptSubmit` hook | MEMORY.md 자동 주입 |
26
26
  | `before_model` | 모델 호출 직전 (매 추론 루프마다) | `PreToolUse(Agent)`, pre-generation-arch-check | pre-generation-arch-check 스킬 |
27
27
  | `wrap_model_call` | 모델 호출 자체를 래핑 (실제 호출 제어) | Tier 4 permission approval (Bash/WebFetch) | permission hooks, bypassPermissions 게이트 |
28
- | `wrap_tool_call` | 도구 호출을 래핑 (전후 모두 제어) | `PreToolUse(*) + PostToolUse(*)` | action-validator, task-outcome-recorder |
28
+ | `wrap_tool_call` | 도구 호출을 래핑 (전후 모두 제어) | `PreToolUse(*) + PostToolUse(*)` | action-validator |
29
29
  | `after_model` | 모델 응답 수신 직후 | `PostToolUse(Agent)`, result-aggregation | result-aggregation 스킬, evaluator-optimizer |
30
- | `after_agent` | 에이전트 전체 실행 완료 후 | `Stop`, `SubagentStop`, post-release-followup | SubagentStop 어드바이저리 훅 (omcustom-loop 참조) |
30
+ | `after_agent` | 에이전트 전체 실행 완료 후 | `Stop`, `SubagentStop`, post-release-followup | SubagentStop 어드바이저리 훅 (omcustom-loop 참조), task-outcome-recorder.sh |
31
31
 
32
32
  ### 매핑 해설
33
33
 
@@ -158,9 +158,8 @@ oh-my-customcode에서 이 패턴은 R004의 재시도 정책으로 명문화되
158
158
  | `PreToolUse(*)` | 훅 이벤트 | 모든 도구 호출 직전 검증 |
159
159
  | `PostToolUse(*)` | 훅 이벤트 | 모든 도구 호출 직후 결과 기록 |
160
160
  | `action-validator` | 스킬 | 에이전트가 선언된 도구 범위 내에서 실행하는지 pre-flight 검사 |
161
- | `task-outcome-recorder` | 스킬 | 도구 호출 결과를 구조화된 형식으로 기록 |
162
161
  | rule-deletion-guard.sh | 훅 스크립트 | 규칙 파일 삭제 시도 하드 블록 (exit 2) |
163
- | `git-delegation-guard.sh` | 훅 스크립트 | git 직접 실행 시도 감지 및 경고 |
162
+ | `git-delegation-guard.sh` | 훅 스크립트 | mgr-gitnerd 외 에이전트로 보내는 위임 프롬프트의 git 쓰기 키워드(commit, branch, checkout 등) 감지 및 어드바이저리 전달 (additionalContext, 차단 없음) |
164
163
 
165
164
  ### after_model 단계
166
165
 
@@ -178,6 +177,7 @@ oh-my-customcode에서 이 패턴은 R004의 재시도 정책으로 명문화되
178
177
  |---|---|---|
179
178
  | `Stop` hook | 훅 이벤트 | 세션 종료 시 메모리 저장 권고 |
180
179
  | `SubagentStop` hook | 훅 이벤트 | 서브에이전트 완료 후 결과 기록·어드바이저리 출력 (오케스트레이터 워크플로 계속 프롬프트 주입 없음) |
180
+ | `task-outcome-recorder.sh` | 훅 스크립트 (SubagentStop) | 서브에이전트 완료 기록(항상 outcome=success) |
181
181
  | `omcustom-loop` | 스킬 | SubagentStop 훅 어드바이저리 안내 (오케스트레이터 워크플로 계속 프롬프트 주입 없음) |
182
182
  | sys-memory-keeper | 에이전트 | 세션 종료 시 MEMORY.md 업데이트 |
183
183
  | `SubagentStart` hook | 훅 이벤트 | 서브에이전트 시작 시 HUD 이벤트 발행 |
@@ -117,13 +117,7 @@ When a task fails at a lower model tier, escalate. Escalation is executed by re-
117
117
  haiku → sonnet → opus
118
118
  ```
119
119
 
120
- Configuration in agent frontmatter:
121
- ```yaml
122
- escalation:
123
- enabled: true
124
- path: haiku → sonnet → opus
125
- threshold: 2 # failures before escalation advisory
126
- ```
120
+ There is no agent-frontmatter switch for escalation: `model-escalation-advisor.sh` reads no frontmatter, its thresholds are hard-coded constants in the script, and it evaluates every haiku/sonnet spawn. It is currently unreachable because the outcome recorder never writes failures. See the `model-escalation` skill.
127
121
 
128
122
  ## Fast Mode Interaction
129
123
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.0.7",
2
+ "version": "2.0.9",
3
3
  "lastUpdated": "2026-10-06",
4
4
  "omcustomMinClaudeCode": "2.1.121",
5
5
  "omcustomMinClaudeCodeReason": "Sensitive-path direct Write/Edit on .claude/** under bypassPermissions (R010 deprecation, #1101)",
@@ -928,6 +928,19 @@ steps:
928
928
  각 변수에 최소 한 값 변경 대조 조건을 두게 하십시오. 측정 writer는 조건·결과 표를 제출하고
929
929
  일반화 문장에 측정 조건을 함께 적으십시오. dispatcher는 대조가 없는 함의를 가설로
930
930
  제한하며 표 없는 runtime 일반화를 완료로 받지 마십시오(#1833 P5).
931
+ - Line-anchor drift sweep: a delegation that adds or removes lines in any file MUST, as a
932
+ completion condition, run `git grep -n -E '<escaped basename>:[0-9]'` across the
933
+ repository (the BASENAME, not the path — basename-only anchors such as
934
+ `task-outcome-recorder.sh:218` carry no directory) and also check every sentence that
935
+ mentions the file for bare continuation anchors (`:[0-9]+` after a path mention, e.g.
936
+ `stall-detection-advisor.sh:44/:124` or `:451-:453`), then either re-derive each anchor
937
+ whose target text moved or replace it with a content anchor (function name / unique
938
+ string). Anchors into generated files (e.g. `.claude/settings.json`, regenerated from
939
+ hooks.json) MUST be content anchors, not line numbers. The completion report lists each
940
+ anchor (file:line, old target, new line).
941
+ (줄 수를 바꾸는 위임의 완료 조건에 그 파일을 가리키는 `file:line` 앵커 — basename 전용·
942
+ 연속 `:N` 형태 포함 — 의 전수 grep과 재도출 또는 내용 앵커 전환을 넣어야 하며, 생성 파일
943
+ 앵커는 줄 번호가 아닌 내용 앵커여야 합니다) (#1884 item 8).
931
944
  - No state-changing command (`gh issue create/edit/close`, `gh pr create/edit/close/merge`,
932
945
  `git push`, label changes) — including the orchestrator's own direct commands, not only
933
946
  delegated ones — MAY use a `||` fallback that prints success-looking output; the observed