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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "workspaces": [
4
4
  "packages/*"
5
5
  ],
6
- "version": "1.1.93",
6
+ "version": "1.1.95",
7
7
  "description": "Batteries-included agent harness for Claude Code",
8
8
  "type": "module",
9
9
  "bin": {
@@ -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
- Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
- PROJECT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
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
- PROJECT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
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