oh-my-customcode 1.1.93 → 1.1.95
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 +1 -1
- package/dist/cli/index.js +435 -63
- package/dist/index.js +430 -58
- package/package.json +1 -1
- package/templates/.claude/agents/mgr-gitnerd.md +8 -1
- package/templates/.claude/hooks/scripts/adaptive-harness-scan.sh +2 -1
- package/templates/.claude/hooks/scripts/claude-md-reinject.sh +2 -1
- package/templates/.claude/hooks/scripts/omcustom-auto-update.sh +7 -0
- package/templates/.claude/hooks/scripts/rule-deletion-guard.sh +890 -45
- package/templates/.claude/hooks/scripts/session-autofix.sh +7 -0
- package/templates/.claude/hooks/scripts/session-env-check.sh +7 -0
- package/templates/.claude/hooks/scripts/stale-todo-scanner.sh +7 -0
- package/templates/.claude/rules/SHOULD-hud-statusline.md +2 -2
- package/templates/.claude/skills/claude-native/SKILL.md +2 -2
- package/templates/.claude/skills/homework/SKILL.md +2 -0
- package/templates/.claude/skills/pipeline/workflows/auto-dev.yaml +18 -4
- package/templates/.claude/skills/playwright-compress/SKILL.md +2 -2
- package/templates/guides/middleware-patterns/README.md +3 -3
- package/templates/manifest.json +1 -1
- package/templates/workflows/auto-dev.yaml +18 -4
package/package.json
CHANGED
|
@@ -33,9 +33,16 @@ You are a Git operations specialist following GitHub flow best practices.
|
|
|
33
33
|
```
|
|
34
34
|
<type>(<scope>): <subject>
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
<trailer string from delegation>
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
+
Example trailer line: `Co-Authored-By: <model from delegation> <noreply@anthropic.com>`
|
|
40
|
+
|
|
41
|
+
Trailer rules:
|
|
42
|
+
- The trailer comes from the delegation prompt (which takes it from the session's attribution guidance). This agent definition and its examples never contain a model-name literal; the commit itself carries whatever model name the delegation's trailer string contains.
|
|
43
|
+
- When the delegation gives a trailer string, use it verbatim, even if your own environment suggests a different attribution.
|
|
44
|
+
- When the delegation gives no trailer string, do not commit; stop and report that the delegation did not provide a trailer string. Never invent one.
|
|
45
|
+
|
|
39
46
|
Types: feat, fix, docs, style, refactor, test, chore
|
|
40
47
|
|
|
41
48
|
## Safety Rules
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
set -euo pipefail
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
# #1770: honor CLAUDE_PROJECT_DIR first; fallback git toplevel (or pwd), not script location.
|
|
8
|
+
PROJECT_ROOT="${CLAUDE_PROJECT_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"
|
|
8
9
|
PROFILE="$PROJECT_ROOT/.claude/project-profile.yaml"
|
|
9
10
|
|
|
10
11
|
# Skip if this IS the oh-my-customcode project itself (meta-project)
|
|
@@ -38,7 +38,8 @@ fi
|
|
|
38
38
|
|
|
39
39
|
source_field=$(printf '%s' "$input" | jq -r '.source // "unknown"' 2>/dev/null) || source_field="unknown"
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
# #1770: honor CLAUDE_PROJECT_DIR first; fallback git toplevel (or pwd), not script location.
|
|
42
|
+
PROJECT_ROOT="${CLAUDE_PROJECT_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"
|
|
42
43
|
CLAUDE_MD="$PROJECT_ROOT/CLAUDE.md"
|
|
43
44
|
|
|
44
45
|
if [ ! -f "$CLAUDE_MD" ]; then
|
|
@@ -8,6 +8,13 @@
|
|
|
8
8
|
# Pass through stdin immediately — capture for later output
|
|
9
9
|
input=$(cat)
|
|
10
10
|
|
|
11
|
+
# Anchor cwd to the project root (#1770): hooks may be launched from a subdirectory.
|
|
12
|
+
# Fallback is the git toplevel (or pwd), NOT the script location: tests run these scripts
|
|
13
|
+
# from a tmp cwd with inherited env. (schema-validator.sh/skill-count-reminder.sh instead
|
|
14
|
+
# use a script-location fallback.) The guarded cd must not abort under set -e (e.g. mode-000 dir).
|
|
15
|
+
ROOT="${CLAUDE_PROJECT_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"
|
|
16
|
+
{ [ -d "$ROOT" ] && cd "$ROOT"; } 2>/dev/null || true
|
|
17
|
+
|
|
11
18
|
# --- Guard: skip conditions ---
|
|
12
19
|
|
|
13
20
|
# Skip if explicitly disabled
|