oh-my-customcode 1.1.38 → 1.1.39
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/dist/cli/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/templates/.claude/hooks/hooks.json +5 -1
- package/templates/.claude/hooks/scripts/r007-r008-drift-advisor.sh +11 -1
- package/templates/.claude/skills/pipeline/workflows/auto-dev.yaml +36 -14
- package/templates/manifest.json +1 -1
- package/templates/workflows/auto-dev.yaml +36 -14
package/dist/cli/index.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -261,12 +261,16 @@
|
|
|
261
261
|
"type": "command",
|
|
262
262
|
"command": "bash .claude/hooks/scripts/auto-continue-guard.sh"
|
|
263
263
|
},
|
|
264
|
+
{
|
|
265
|
+
"type": "command",
|
|
266
|
+
"command": "bash .claude/hooks/scripts/r007-r008-drift-advisor.sh"
|
|
267
|
+
},
|
|
264
268
|
{
|
|
265
269
|
"type": "prompt",
|
|
266
270
|
"prompt": "A background subagent just completed. If it FAILED, do NOT auto-continue \u2014 report the failure and wait for user input."
|
|
267
271
|
}
|
|
268
272
|
],
|
|
269
|
-
"description": "Record agent outcomes + auto-continue workflow on subagent completion"
|
|
273
|
+
"description": "Record agent outcomes + auto-continue workflow + R007/R008 drift advisory on subagent completion (autonomous-loop re-entry, #1545)"
|
|
270
274
|
}
|
|
271
275
|
],
|
|
272
276
|
"CwdChanged": [
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# r007-r008-drift-advisor.sh —
|
|
2
|
+
# r007-r008-drift-advisor.sh — PROACTIVE R007/R008 drift advisory (#1229, #1545)
|
|
3
|
+
#
|
|
4
|
+
# Wired to TWO trigger points:
|
|
5
|
+
# 1. UserPromptSubmit — fires before Claude responds to a user-typed prompt (#1229).
|
|
6
|
+
# 2. SubagentStop — fires when a background subagent (Agent tool) completes, covering
|
|
7
|
+
# autonomous-loop re-entry (e.g. /fsd) where the orchestrator resumes WITHOUT a
|
|
8
|
+
# UserPromptSubmit event. Prior to #1545, autonomous-loop re-entry had zero R007/R008
|
|
9
|
+
# advisory coverage since UserPromptSubmit never fires in that path.
|
|
3
10
|
#
|
|
4
11
|
# Inspects the LAST completed assistant turn in the session transcript for R007/R008
|
|
5
12
|
# compliance BEFORE Claude responds. If the previous turn drifted (missing identification
|
|
@@ -10,6 +17,9 @@
|
|
|
10
17
|
#
|
|
11
18
|
# Advisory-only: ALWAYS exits 0, ALWAYS passes stdin through to stdout, NEVER blocks.
|
|
12
19
|
# Performance: parses ONLY the last assistant turn (not the whole transcript).
|
|
20
|
+
# Input-schema note: session_id/transcript_path are COMMON fields present on both
|
|
21
|
+
# UserPromptSubmit and SubagentStop hook payloads, so the detection logic below is
|
|
22
|
+
# event-agnostic and required no functional changes for the SubagentStop wiring.
|
|
13
23
|
#
|
|
14
24
|
# 환경변수 override (테스트/디버깅용):
|
|
15
25
|
# OMCUSTOM_R007_ADVISOR=off — advisory 완전 비활성화 (pass-through)
|
|
@@ -210,7 +210,11 @@ steps:
|
|
|
210
210
|
- Detect file types in scope and route to matching agent
|
|
211
211
|
- Use specialized agents (lang-*, be-*, fe-*, infra-*) over general-purpose
|
|
212
212
|
4. TDD via superpowers:test-driven-development when tests apply
|
|
213
|
-
5. Commit via mgr-gitnerd with `
|
|
213
|
+
5. Commit via mgr-gitnerd with `Refs #<N>` trailer in body — NEVER `Fixes`/`Closes`/`Resolves` (#1542).
|
|
214
|
+
⚠ implement-stage commits land directly on develop (no PR gate here). A close-keyword trailer on a
|
|
215
|
+
develop-bound commit auto-closes the issue on push — BEFORE release/tag/publish (observed v1.1.38,
|
|
216
|
+
07:49:26Z). Close keywords belong ONLY in the release-stage PR body (see release step 3.b) — auto-tag.yml
|
|
217
|
+
greps the PR body, not commit messages, to decide which issues to close.
|
|
214
218
|
6. On success: remove in-progress, add verify-ready
|
|
215
219
|
7. On failure: remove in-progress, add needs-review, comment error summary
|
|
216
220
|
|
|
@@ -299,21 +303,38 @@ steps:
|
|
|
299
303
|
Reference: issue #1141 (v0.135.0 follow-up), mgr-gitnerd MEMORY.md.
|
|
300
304
|
|
|
301
305
|
1. Version bump (mandatory):
|
|
302
|
-
Orchestrator delegates to mgr-updater (R010)
|
|
303
|
-
Determine NEW version per semver rules below.
|
|
306
|
+
Orchestrator delegates to mgr-updater (R010) for the file edits below; mgr-gitnerd (R010) for branch/commit/push.
|
|
307
|
+
Determine NEW version per semver rules below FIRST — before touching any file.
|
|
308
|
+
|
|
309
|
+
⚠ Branch-before-bump (#1542, observed v1.1.38): for npm project with auto-tag.yml (this repo), the
|
|
310
|
+
version-bump commit MUST be created ON release/v{NEW}, and MUST NOT be pushed to develop directly.
|
|
311
|
+
Pushing the bump commit to develop before branching leaves develop and release/v{NEW} pointing at the
|
|
312
|
+
SAME commit → PR diff=0 → `gh pr create` fails with "GraphQL: No commits between develop and
|
|
313
|
+
release/v{NEW}". Evidence: PR #1538 (v1.1.37) and PR #1534 (v1.1.36) each contain exactly ONE commit
|
|
314
|
+
(the bump commit) — proof the bump belongs on the release branch, never on develop directly.
|
|
315
|
+
|
|
304
316
|
npm project (package.json exists):
|
|
305
|
-
a.
|
|
317
|
+
a. mgr-gitnerd: git checkout develop && git pull origin develop
|
|
318
|
+
(R017 Pre-Branch Freshness Gate — ensures local develop holds every merged feature commit before branching)
|
|
319
|
+
b. mgr-gitnerd creates release/v{NEW} branch from develop and checks it out — BEFORE any edit in c–i below.
|
|
320
|
+
(This is the step that used to run AFTER the bump in step 3.a of the old ordering — moving it here
|
|
321
|
+
is the #1542 fix. Do NOT perform steps c–i on develop.)
|
|
322
|
+
c. package.json: jq '.version = "<NEW>"' package.json > package.json.tmp && mv package.json.tmp package.json [on release/v{NEW}]
|
|
306
323
|
# ⚠ jq '.version=...' PRESERVES the manifest structure {version, lastUpdated, omcustomMinClaudeCode, components[]}.
|
|
307
324
|
# Edit ONLY the .version field — do NOT overwrite templates/manifest.json wholesale (e.g. a source-hash path→hash map).
|
|
308
325
|
# Recover a corrupted manifest: git show HEAD:templates/manifest.json | jq '.version="<NEW>"' > templates/manifest.json (#1423/#1154).
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
This regenerates .omcustom.lock.json (generatorVersion/templateVersion) to <NEW> via scripts/sync-source-lockfile.ts.
|
|
312
|
-
|
|
313
|
-
(#1531 — .omcustom.lock.json missed staging across 4 consecutive releases after v1.1.29; root cause was no build step between version bump and commit.)
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
326
|
+
d. templates/manifest.json: jq '.version = "<NEW>"' templates/manifest.json > templates/manifest.json.tmp && mv templates/manifest.json.tmp templates/manifest.json [on release/v{NEW}]
|
|
327
|
+
e. bun run build — run standalone (NO pipe), read exit code directly ($? after a pipe is the last command's, R005/#1492).
|
|
328
|
+
This regenerates .omcustom.lock.json (generatorVersion/templateVersion) to <NEW> via scripts/sync-source-lockfile.ts. [on release/v{NEW}]
|
|
329
|
+
f. git status --short — enumerate ALL tracked drift (`^ M`) the build produced; stage EVERY one (esp. .omcustom.lock.json) before commit.
|
|
330
|
+
(#1531 — .omcustom.lock.json missed staging across 4 consecutive releases after v1.1.29; root cause was no build step between version bump and commit.) [on release/v{NEW}]
|
|
331
|
+
g. mgr-gitnerd commit: "chore(release): bump to v<NEW>" — MUST include the drift from step f.
|
|
332
|
+
⚠ do NOT add Closes/Fixes/Resolves keywords to this commit message (#1542) — this commit merges into
|
|
333
|
+
develop later via the release PR; a close keyword here bypasses the PR-body mechanism auto-tag.yml
|
|
334
|
+
relies on (see step 3.b below). Use `Refs #N` if a cross-reference is needed.
|
|
335
|
+
h. mgr-gitnerd push release/v{NEW} to origin — NEVER push this commit to develop directly. Pushing to
|
|
336
|
+
develop here reproduces the diff=0 PR failure this reordering fixes (#1542).
|
|
337
|
+
i. mandatory verification (with existence guard for partial-update safety), run on release/v{NEW}:
|
|
317
338
|
[ -f scripts/verify-version-sync.sh ] && bash scripts/verify-version-sync.sh || echo "::warning::verify-version-sync.sh not found, version sync verification skipped"
|
|
318
339
|
(verify-version-sync.sh 가 exit 1 시 release 단계 halt)
|
|
319
340
|
|
|
@@ -328,9 +349,10 @@ steps:
|
|
|
328
349
|
2. Release notes via omcustom-release-notes skill
|
|
329
350
|
3. Adapt release mechanism to project (determines how steps 3-5 execute):
|
|
330
351
|
- npm project with auto-tag.yml (this repo — release/v* PR pattern):
|
|
331
|
-
a.
|
|
352
|
+
a. release/v{NEW} branch + version-bump commit were already created in step 1.b–1.h above — do NOT
|
|
353
|
+
re-create the branch or re-run the bump here; this step only opens the PR against the existing branch.
|
|
332
354
|
b. mgr-gitnerd creates PR: gh pr create --base develop --head release/v{NEW} --title "chore(release): bump to v{NEW}" --body "<MUST include 'Closes #N' for EVERY issue this release resolves>"
|
|
333
|
-
⚠ auto-tag.yml closes issues by grep'ing Closes/Fixes/Resolves keywords in the PR BODY — NOT by milestone membership. If the keywords are missing, no issues close and the workflow still reports success (#1531).
|
|
355
|
+
⚠ auto-tag.yml closes issues by grep'ing Closes/Fixes/Resolves keywords in the PR BODY — NOT by milestone membership NOR by commit message trailers. If the keywords are missing, no issues close and the workflow still reports success (#1531). Commit-message close keywords are explicitly forbidden during `implement` and step 1.g above (#1542) — the PR body is the ONLY place a close keyword should appear.
|
|
334
356
|
Before creating the PR (whether via inline --body or --body-file), confirm the body text actually contains a Closes line per issue.
|
|
335
357
|
c. mgr-gitnerd merges PR (admin merge required due to branch protection)
|
|
336
358
|
d. DO NOT manually git tag or gh release create.
|
package/templates/manifest.json
CHANGED
|
@@ -210,7 +210,11 @@ steps:
|
|
|
210
210
|
- Detect file types in scope and route to matching agent
|
|
211
211
|
- Use specialized agents (lang-*, be-*, fe-*, infra-*) over general-purpose
|
|
212
212
|
4. TDD via superpowers:test-driven-development when tests apply
|
|
213
|
-
5. Commit via mgr-gitnerd with `
|
|
213
|
+
5. Commit via mgr-gitnerd with `Refs #<N>` trailer in body — NEVER `Fixes`/`Closes`/`Resolves` (#1542).
|
|
214
|
+
⚠ implement-stage commits land directly on develop (no PR gate here). A close-keyword trailer on a
|
|
215
|
+
develop-bound commit auto-closes the issue on push — BEFORE release/tag/publish (observed v1.1.38,
|
|
216
|
+
07:49:26Z). Close keywords belong ONLY in the release-stage PR body (see release step 3.b) — auto-tag.yml
|
|
217
|
+
greps the PR body, not commit messages, to decide which issues to close.
|
|
214
218
|
6. On success: remove in-progress, add verify-ready
|
|
215
219
|
7. On failure: remove in-progress, add needs-review, comment error summary
|
|
216
220
|
|
|
@@ -299,21 +303,38 @@ steps:
|
|
|
299
303
|
Reference: issue #1141 (v0.135.0 follow-up), mgr-gitnerd MEMORY.md.
|
|
300
304
|
|
|
301
305
|
1. Version bump (mandatory):
|
|
302
|
-
Orchestrator delegates to mgr-updater (R010)
|
|
303
|
-
Determine NEW version per semver rules below.
|
|
306
|
+
Orchestrator delegates to mgr-updater (R010) for the file edits below; mgr-gitnerd (R010) for branch/commit/push.
|
|
307
|
+
Determine NEW version per semver rules below FIRST — before touching any file.
|
|
308
|
+
|
|
309
|
+
⚠ Branch-before-bump (#1542, observed v1.1.38): for npm project with auto-tag.yml (this repo), the
|
|
310
|
+
version-bump commit MUST be created ON release/v{NEW}, and MUST NOT be pushed to develop directly.
|
|
311
|
+
Pushing the bump commit to develop before branching leaves develop and release/v{NEW} pointing at the
|
|
312
|
+
SAME commit → PR diff=0 → `gh pr create` fails with "GraphQL: No commits between develop and
|
|
313
|
+
release/v{NEW}". Evidence: PR #1538 (v1.1.37) and PR #1534 (v1.1.36) each contain exactly ONE commit
|
|
314
|
+
(the bump commit) — proof the bump belongs on the release branch, never on develop directly.
|
|
315
|
+
|
|
304
316
|
npm project (package.json exists):
|
|
305
|
-
a.
|
|
317
|
+
a. mgr-gitnerd: git checkout develop && git pull origin develop
|
|
318
|
+
(R017 Pre-Branch Freshness Gate — ensures local develop holds every merged feature commit before branching)
|
|
319
|
+
b. mgr-gitnerd creates release/v{NEW} branch from develop and checks it out — BEFORE any edit in c–i below.
|
|
320
|
+
(This is the step that used to run AFTER the bump in step 3.a of the old ordering — moving it here
|
|
321
|
+
is the #1542 fix. Do NOT perform steps c–i on develop.)
|
|
322
|
+
c. package.json: jq '.version = "<NEW>"' package.json > package.json.tmp && mv package.json.tmp package.json [on release/v{NEW}]
|
|
306
323
|
# ⚠ jq '.version=...' PRESERVES the manifest structure {version, lastUpdated, omcustomMinClaudeCode, components[]}.
|
|
307
324
|
# Edit ONLY the .version field — do NOT overwrite templates/manifest.json wholesale (e.g. a source-hash path→hash map).
|
|
308
325
|
# Recover a corrupted manifest: git show HEAD:templates/manifest.json | jq '.version="<NEW>"' > templates/manifest.json (#1423/#1154).
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
This regenerates .omcustom.lock.json (generatorVersion/templateVersion) to <NEW> via scripts/sync-source-lockfile.ts.
|
|
312
|
-
|
|
313
|
-
(#1531 — .omcustom.lock.json missed staging across 4 consecutive releases after v1.1.29; root cause was no build step between version bump and commit.)
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
326
|
+
d. templates/manifest.json: jq '.version = "<NEW>"' templates/manifest.json > templates/manifest.json.tmp && mv templates/manifest.json.tmp templates/manifest.json [on release/v{NEW}]
|
|
327
|
+
e. bun run build — run standalone (NO pipe), read exit code directly ($? after a pipe is the last command's, R005/#1492).
|
|
328
|
+
This regenerates .omcustom.lock.json (generatorVersion/templateVersion) to <NEW> via scripts/sync-source-lockfile.ts. [on release/v{NEW}]
|
|
329
|
+
f. git status --short — enumerate ALL tracked drift (`^ M`) the build produced; stage EVERY one (esp. .omcustom.lock.json) before commit.
|
|
330
|
+
(#1531 — .omcustom.lock.json missed staging across 4 consecutive releases after v1.1.29; root cause was no build step between version bump and commit.) [on release/v{NEW}]
|
|
331
|
+
g. mgr-gitnerd commit: "chore(release): bump to v<NEW>" — MUST include the drift from step f.
|
|
332
|
+
⚠ do NOT add Closes/Fixes/Resolves keywords to this commit message (#1542) — this commit merges into
|
|
333
|
+
develop later via the release PR; a close keyword here bypasses the PR-body mechanism auto-tag.yml
|
|
334
|
+
relies on (see step 3.b below). Use `Refs #N` if a cross-reference is needed.
|
|
335
|
+
h. mgr-gitnerd push release/v{NEW} to origin — NEVER push this commit to develop directly. Pushing to
|
|
336
|
+
develop here reproduces the diff=0 PR failure this reordering fixes (#1542).
|
|
337
|
+
i. mandatory verification (with existence guard for partial-update safety), run on release/v{NEW}:
|
|
317
338
|
[ -f scripts/verify-version-sync.sh ] && bash scripts/verify-version-sync.sh || echo "::warning::verify-version-sync.sh not found, version sync verification skipped"
|
|
318
339
|
(verify-version-sync.sh 가 exit 1 시 release 단계 halt)
|
|
319
340
|
|
|
@@ -328,9 +349,10 @@ steps:
|
|
|
328
349
|
2. Release notes via omcustom-release-notes skill
|
|
329
350
|
3. Adapt release mechanism to project (determines how steps 3-5 execute):
|
|
330
351
|
- npm project with auto-tag.yml (this repo — release/v* PR pattern):
|
|
331
|
-
a.
|
|
352
|
+
a. release/v{NEW} branch + version-bump commit were already created in step 1.b–1.h above — do NOT
|
|
353
|
+
re-create the branch or re-run the bump here; this step only opens the PR against the existing branch.
|
|
332
354
|
b. mgr-gitnerd creates PR: gh pr create --base develop --head release/v{NEW} --title "chore(release): bump to v{NEW}" --body "<MUST include 'Closes #N' for EVERY issue this release resolves>"
|
|
333
|
-
⚠ auto-tag.yml closes issues by grep'ing Closes/Fixes/Resolves keywords in the PR BODY — NOT by milestone membership. If the keywords are missing, no issues close and the workflow still reports success (#1531).
|
|
355
|
+
⚠ auto-tag.yml closes issues by grep'ing Closes/Fixes/Resolves keywords in the PR BODY — NOT by milestone membership NOR by commit message trailers. If the keywords are missing, no issues close and the workflow still reports success (#1531). Commit-message close keywords are explicitly forbidden during `implement` and step 1.g above (#1542) — the PR body is the ONLY place a close keyword should appear.
|
|
334
356
|
Before creating the PR (whether via inline --body or --body-file), confirm the body text actually contains a Closes line per issue.
|
|
335
357
|
c. mgr-gitnerd merges PR (admin merge required due to branch protection)
|
|
336
358
|
d. DO NOT manually git tag or gh release create.
|