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.
- package/README.md +3 -2
- package/dist/cli/index.js +28 -7
- package/dist/index.js +28 -7
- package/package.json +1 -1
- package/templates/.claude/hooks/hooks.json +29 -13
- package/templates/.claude/hooks/scripts/agent-teams-advisor.sh +47 -22
- package/templates/.claude/hooks/scripts/auto-continue-guard.sh +5 -5
- package/templates/.claude/hooks/scripts/auto-dev-token-tracker.sh +12 -1
- package/templates/.claude/hooks/scripts/bash-cd-advisor.sh +172 -0
- package/templates/.claude/hooks/scripts/content-hash-validator.sh +65 -48
- package/templates/.claude/hooks/scripts/destructive-git-guard.sh +32 -17
- package/templates/.claude/hooks/scripts/fail-axis-cause-advisor.sh +2 -2
- package/templates/.claude/hooks/scripts/failure-ledger.sh +18 -0
- package/templates/.claude/hooks/scripts/file-change-validator.sh +6 -3
- package/templates/.claude/hooks/scripts/git-delegation-guard.sh +178 -27
- package/templates/.claude/hooks/scripts/model-escalation-advisor.sh +43 -20
- package/templates/.claude/hooks/scripts/omcustom-auto-update.sh +19 -5
- package/templates/.claude/hooks/scripts/rule-deletion-guard.sh +118 -1
- package/templates/.claude/hooks/scripts/schema-validator.sh +8 -11
- package/templates/.claude/hooks/scripts/session-env-check.sh +20 -5
- package/templates/.claude/hooks/scripts/stall-detection-advisor.sh +9 -5
- package/templates/.claude/hooks/scripts/stuck-detector.sh +21 -4
- package/templates/.claude/hooks/scripts/subagent-failure-advisor.sh +48 -29
- package/templates/.claude/hooks/scripts/task-outcome-recorder.sh +15 -8
- package/templates/.claude/ontology/agents.yaml +71 -7
- package/templates/.claude/ontology/graphs/agent-skill.json +64 -5
- package/templates/.claude/ontology/graphs/full-graph.json +236 -3
- package/templates/.claude/ontology/skills.yaml +65 -1
- package/templates/.claude/rules/MUST-agent-design.md +1 -11
- package/templates/.claude/rules/MUST-enforcement-policy.md +7 -7
- package/templates/.claude/rules/MUST-orchestrator-coordination.md +1 -1
- package/templates/.claude/rules/SHOULD-memory-integration.md +1 -1
- package/templates/.claude/settings.json +29 -13
- package/templates/.claude/skills/fsd/SKILL.md +10 -9
- package/templates/.claude/skills/goal/SKILL.md +5 -5
- package/templates/.claude/skills/model-escalation/SKILL.md +16 -12
- package/templates/.claude/skills/omcustom-loop/SKILL.md +4 -4
- package/templates/.claude/skills/pipeline/workflows/auto-dev.yaml +13 -0
- package/templates/guides/claude-code/04-agent-skills.md +1 -1
- package/templates/guides/claude-code/15-version-compatibility.md +47 -47
- package/templates/guides/git-safety/README.md +4 -1
- package/templates/guides/middleware-patterns/README.md +4 -4
- package/templates/guides/multi-model-routing/README.md +1 -7
- package/templates/manifest.json +1 -1
- package/templates/workflows/auto-dev.yaml +13 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: omcustom:goal
|
|
3
|
-
description: Disciplined goal-to-execution workflow for any user task. Parses objective, asks only for materially missing requirements via ambiguity-gate, inspects repo via idea, plans via sdd-dev or deep-plan, executes safely under project conventions, verifies completion per R020, and reports changed files with evidence. Use when user invokes /goal <task>.
|
|
3
|
+
description: Disciplined goal-to-execution workflow for any user task. Parses objective, asks only for materially missing requirements via ambiguity-gate, inspects repo via idea, plans via sdd-dev or deep-plan, executes safely under project conventions, verifies completion per R020, and reports changed files with evidence. Use when user invokes /omcustom:goal <task>.
|
|
4
4
|
version: 1.0.0
|
|
5
5
|
scope: core
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# /goal — Disciplined Goal-to-Execution Workflow
|
|
8
|
+
# /omcustom:goal — Disciplined Goal-to-Execution Workflow
|
|
9
9
|
|
|
10
10
|
Apply project discipline (planning, verification, cleanup, review) to any user-provided task. Acts as a thin orchestrator that routes to existing oh-my-customcode skills rather than duplicating logic.
|
|
11
11
|
|
|
12
12
|
## Usage
|
|
13
13
|
|
|
14
14
|
```
|
|
15
|
-
/goal <task description>
|
|
15
|
+
/omcustom:goal <task description>
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
Example: `/goal Add a /weekly-summary command that aggregates last 7 days of git activity`
|
|
18
|
+
Example: `/omcustom:goal Add a /weekly-summary command that aggregates last 7 days of git activity`
|
|
19
19
|
|
|
20
20
|
## Workflow
|
|
21
21
|
|
|
@@ -73,7 +73,7 @@ This skill is intentionally a **thin wrapper / orchestrator**. It does NOT dupli
|
|
|
73
73
|
- Stable entry point that routes to whichever underlying skills are best at the moment
|
|
74
74
|
- Documented contract that callers can rely on regardless of internal skill evolution
|
|
75
75
|
|
|
76
|
-
If a future skill replaces `idea` or `sdd-dev`, only the integration table updates — `/goal` remains stable.
|
|
76
|
+
If a future skill replaces `idea` or `sdd-dev`, only the integration table updates — `/omcustom:goal` remains stable.
|
|
77
77
|
|
|
78
78
|
## Cross-References
|
|
79
79
|
|
|
@@ -19,33 +19,37 @@ haiku → sonnet → opus
|
|
|
19
19
|
|
|
20
20
|
| Condition | Action |
|
|
21
21
|
|-----------|--------|
|
|
22
|
-
| 2+ failures
|
|
23
|
-
| 3+ consecutive failures across any agent type | Advise global
|
|
24
|
-
| Sustained success after escalation | Advise de-escalation |
|
|
22
|
+
| 2+ recorded failures for the same agent type (any model; evaluated only for haiku/sonnet spawns) | Advise escalation |
|
|
23
|
+
| 3+ consecutive failures across any agent type | Advise escalation (per spawn, not global; only when the spawn's `model` parameter is haiku or sonnet) |
|
|
24
|
+
| Sustained success after escalation | Advise de-escalation (opt-in: `OMCUSTOM_MODEL_DEESCALATION=on`) |
|
|
25
25
|
|
|
26
26
|
## Thresholds
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
|
31
|
-
|
|
32
|
-
| `
|
|
28
|
+
Hard-coded in `model-escalation-advisor.sh` (not configurable via frontmatter or settings):
|
|
29
|
+
|
|
30
|
+
| Constant | Value | Description |
|
|
31
|
+
|----------|-------|-------------|
|
|
32
|
+
| `FAILURE_THRESHOLD` | 2 | Failures before escalation advisory |
|
|
33
|
+
| `CONSECUTIVE_THRESHOLD` | 3 | Consecutive failures for the per-spawn advisory |
|
|
34
|
+
| `COOLDOWN` | 5 | Successes before de-escalation advisory (opt-in only) |
|
|
35
|
+
|
|
36
|
+
Each distinct advisory is shown at most once per session (atomic per-key marker dir `/tmp/.claude-model-advisory-shown-${PPID}.d/`). De-escalation is off by default because `task-outcome-recorder.sh` records every subagent completion as success, so consecutive successes carry no signal.
|
|
33
37
|
|
|
34
38
|
## Cost Guard
|
|
35
39
|
|
|
36
40
|
- Advisory includes estimated cost multiplier
|
|
37
|
-
- De-escalation suggested after sustained success at higher tier
|
|
41
|
+
- De-escalation (opt-in via `OMCUSTOM_MODEL_DEESCALATION=on`) suggested after sustained success at higher tier
|
|
38
42
|
- Cost tracked per session via PPID-scoped temp file
|
|
39
43
|
|
|
40
44
|
## Architecture
|
|
41
45
|
|
|
42
46
|
```
|
|
43
|
-
|
|
44
|
-
Records: agent_type, model, success
|
|
47
|
+
SubagentStop → task-outcome-recorder.sh (the only wiring; not PostToolUse)
|
|
48
|
+
Records: agent_type, model ("inherit"), outcome (always success; no failure signal, so the escalation advisory is currently unreachable)
|
|
45
49
|
Storage: /tmp/.claude-task-outcomes-$PPID (JSON lines, max 50)
|
|
46
50
|
|
|
47
51
|
PreToolUse (Task) → model-escalation-advisor.sh
|
|
48
|
-
Reads outcomes → counts failures → advises escalation via
|
|
52
|
+
Reads outcomes → counts failures → advises escalation via additionalContext
|
|
49
53
|
Advisory only — never blocks, never modifies tool input
|
|
50
54
|
```
|
|
51
55
|
|
|
@@ -15,19 +15,19 @@ When background subagents complete, `SubagentStop` command hooks record outcomes
|
|
|
15
15
|
## How It Works
|
|
16
16
|
|
|
17
17
|
1. When a background subagent completes, Claude Code fires the `SubagentStop` event
|
|
18
|
-
2. The command hooks run: `task-outcome-recorder.sh` (records an outcome entry, but SubagentStop exposes no failure signal, so entries are always outcome=success; see the "Outcome caveat" comment in the script), `stall-detection-advisor.sh` (stderr advisory on stalled parallel agents; stderr on exit 0 is
|
|
19
|
-
3. None of them continues the orchestrator's workflow; the orchestrator decides the next workflow step itself from the returned results. Exception: when `r007-r008-drift-advisor.sh` emits an advisory on SubagentStop, CC delivers the `additionalContext` to the stopping subagent, which continues its turn to respond (CHANGELOG 2.1.163).
|
|
18
|
+
2. The command hooks run: `task-outcome-recorder.sh` (records an outcome entry, but SubagentStop exposes no failure signal, so entries are always outcome=success (hooks doc lists SubagentStop input fields as `stop_hook_active`, `agent_id`, `agent_type`, `agent_transcript_path`, `last_assistant_message`, `background_tasks`, `session_crons` plus common fields; measured payload keys: https://github.com/baekenough/oh-my-customcode/issues/1775#issuecomment-6404861043); see the "Outcome caveat" comment in the script), `stall-detection-advisor.sh` (stderr advisory on stalled parallel agents; stderr on exit 0 is not fed to the model (the doc says only: "To read it yourself … enable debug logging"); official hooks doc https://code.claude.com/docs/en/hooks.md: "Claude never sees stderr from a hook that exits 0."), `auto-continue-guard.sh` (counts consecutive completions), `r007-r008-drift-advisor.sh` (R007/R008 drift advisory); failure advisories for Agent/Task calls come from `PostToolUseFailure` (`subagent-failure-advisor.sh`) instead, not from SubagentStop
|
|
19
|
+
3. None of them continues the orchestrator's workflow; the orchestrator decides the next workflow step itself from the returned results. Exception: when `r007-r008-drift-advisor.sh` emits an advisory on SubagentStop, CC delivers the `additionalContext` to the stopping subagent, which continues its turn to respond (CHANGELOG 2.1.163); hooks doc: SubagentStop hooks support `hookSpecificOutput.additionalContext` "for non-error feedback that keeps the subagent running", and "To inject context into the parent session after a subagent returns, use a [`PostToolUse`](#posttooluse) hook on the `Agent` tool instead."
|
|
20
20
|
4. If no steps remain, it reports results and waits for user input
|
|
21
21
|
|
|
22
22
|
## Consecutive-Completion Advisory
|
|
23
23
|
|
|
24
|
-
- **Consecutive-completion counter**: `auto-continue-guard.sh` counts SubagentStop events (counter resets after
|
|
24
|
+
- **Consecutive-completion counter**: `auto-continue-guard.sh` counts SubagentStop events (counter resets after more than 60 s idle since the last completion, so the window chains); from the 4th completion onward within the window (count >= 4) it prints a stderr line "[ConsecutiveCompletions] ADVISORY: 4+ consecutive subagent completions, each within 60s of the previous (advisory only; nothing is paused)." (human-visible only, not a model-visible signal; among these four SubagentStop hooks only `r007-r008-drift-advisor.sh` uses `additionalContext`) and its script contains no `exit 2` statement (its only explicit exit is `exit 0`); it echoes the input payload to stdout, and the CC 2.1.310 SubagentStop payload has no top-level `decision`/`continue` key (CC 2.1.310 binary SubagentStop payload builder, inspected during the v2.0.6/v2.0.7 reviews), so it does not block
|
|
25
25
|
- **stuck-detector integration**: If the same action repeats 3+ times, the independent PostToolUse stuck-detector hook intervenes
|
|
26
26
|
- **cost-cap-advisor**: Cost monitoring is independent of these hooks
|
|
27
27
|
|
|
28
28
|
## Configuration
|
|
29
29
|
|
|
30
|
-
The hooks are configured in `.claude/hooks/hooks.json` under `SubagentStop`. All
|
|
30
|
+
The hooks are configured in `.claude/hooks/hooks.json` under `SubagentStop`. All four hooks are `type: command` and advisory (none contains an `exit 2` statement or emits a `decision`/`continue` field outside comments, so none blocks; the grep pattern covered `exit 2`, `"decision"`, `decision:`, `"continue"` and `continue:` and hit only comments in `r007-r008-drift-advisor.sh`; the `continue:` form added no hits. Three of the four hooks (`task-outcome-recorder.sh`, `stall-detection-advisor.sh`, `auto-continue-guard.sh`; measured by `git grep -n` of `printf '%s\n' "$input"` at task-outcome-recorder.sh:218, stall-detection-advisor.sh:31/:44/:124, auto-continue-guard.sh:32; `r007-r008-drift-advisor.sh` instead prints the `additionalContext` JSON on stdout, :456-:457; its advisory text also goes to stderr at :451, which the model does not see) echo the CC payload to stdout, which carries no top-level `decision`/`continue` key in CC 2.1.310. The drift advisor's `additionalContext` makes the stopping subagent continue its own turn; that continuation is not a block).
|
|
31
31
|
|
|
32
32
|
## Limitations
|
|
33
33
|
|
|
@@ -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
|
|
@@ -55,7 +55,7 @@ description: Brief description of what this Skill does and when to use it
|
|
|
55
55
|
|
|
56
56
|
### 위치 인자 `$N` 치환 (#1879)
|
|
57
57
|
|
|
58
|
-
Claude Code 2.1.310에서 스킬을 인자 3개(`alpha beta gamma`)와 함께 호출해 관측한 결과, `SKILL.md` 안의 인자 범위 안의 인덱스(이번 관측 `$0`~`$2`)는 bash 펜스 코드 블록, 큰따옴표, 함수 본문, 산문에서 인자 값으로 치환되었습니다(`"$1"` → `"beta"`). `${1}` 표기는 치환되지 않았고, 두 번째 관측(스킬 도구로 omcustom-feedback을 인자 `alpha beta gamma`와 함께 로드, CC 2.1.310)에서도 `"${1}"`, `[ -f "${1}" ]`, `kind="${2}"`가 리터럴로 남았으므로, 스킬의 셸 코드에서는 위치 매개변수를 `${1}`로 쓰십시오.
|
|
58
|
+
Claude Code 2.1.310에서 스킬을 인자 3개(`alpha beta gamma`)와 함께 호출해 관측한 결과, `SKILL.md` 안의 인자 범위 안의 인덱스(이번 관측 `$0`~`$2`)는 bash 펜스 코드 블록, 큰따옴표, 함수 본문, 산문에서 인자 값으로 치환되었습니다(`"$1"` → `"beta"`). `${1}` 표기는 치환되지 않았고, 두 번째 관측(스킬 도구로 omcustom-feedback을 인자 `alpha beta gamma`와 함께 로드, CC 2.1.310)에서도 `"${1}"`, `[ -f "${1}" ]`, `kind="${2}"`가 리터럴로 남았으므로, 스킬의 셸 코드에서는 위치 매개변수를 `${1}`로 쓰십시오. 범위 밖이 확실한 인덱스는 산문의 `$5`만 관측했고 리터럴로 남았으며, 인자 없는 호출도 치환되지 않았고, `$10`도 3개 인자 호출에서는 리터럴로 남았습니다(한 자리 숫자만 인식하는지는 확정하지 못했습니다 [가설]). 인자가 있는 호출에서는, 인자 6개 이상이면 산문의 `$5` 같은 금액 표기도 같은 규칙으로 치환될 수 있으므로, 금액은 `USD 5`처럼 쓰는 것을 권장합니다.
|
|
59
59
|
|
|
60
60
|
## 사용 가능한 Skills
|
|
61
61
|
|