@ryuenn3123/agentic-senior-core 6.7.1 → 6.7.2

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-senior-core",
3
- "version": "6.7.1",
3
+ "version": "6.7.2",
4
4
  "description": "Universal AI coding rules. Write code like a staff engineer.",
5
5
  "skills": "./skills/",
6
6
  "hooks": "./hooks/hooks.json",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-senior-core",
3
- "version": "6.7.1",
3
+ "version": "6.7.2",
4
4
  "description": "Universal AI coding rules. Because your AI writes code like it gets paid by the line.",
5
5
  "contextFileName": "rules/agentic-senior-core.md",
6
6
  "rules": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-senior-core",
3
- "version": "6.7.1",
3
+ "version": "6.7.2",
4
4
  "description": "Universal AI coding rules. Write code like a staff engineer.",
5
5
  "author": "fatidaprilian",
6
6
  "license": "MIT",
@@ -418,23 +418,41 @@ export function installGlobalGitPreCommitHook({ homeDir = os.homedir() } = {}) {
418
418
  const dispatcherContent = `#!/bin/sh
419
419
  ${ASC_HOOK_HEADER} -- Global Smart Dispatcher
420
420
 
421
- # 1. Prioritize local project hook if present (.husky/pre-commit or .git/hooks/pre-commit.local)
422
- if [ -f ".husky/pre-commit" ] && [ -x ".husky/pre-commit" ]; then
423
- .husky/pre-commit "$@"
424
- LOCAL_STATUS=$?
425
- if [ $LOCAL_STATUS -ne 0 ]; then
426
- exit $LOCAL_STATUS
421
+ # 1. Resolve Git Root directory
422
+ GIT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
423
+ LOCAL_HOOK=""
424
+
425
+ if [ -n "$GIT_ROOT" ]; then
426
+ # Check 1: Root level (.husky/pre-commit or .git/hooks/pre-commit.local)
427
+ if [ -f "$GIT_ROOT/.husky/pre-commit" ] && [ -x "$GIT_ROOT/.husky/pre-commit" ]; then
428
+ LOCAL_HOOK="$GIT_ROOT/.husky/pre-commit"
429
+ elif [ -f "$GIT_ROOT/.git/hooks/pre-commit.local" ] && [ -x "$GIT_ROOT/.git/hooks/pre-commit.local" ]; then
430
+ LOCAL_HOOK="$GIT_ROOT/.git/hooks/pre-commit.local"
431
+ else
432
+ # Check 2: Monorepo & Microservice subfolders (web/, api/, apps/*, services/*, packages/*)
433
+ for sub in "$GIT_ROOT"/* "$GIT_ROOT"/apps/* "$GIT_ROOT"/services/* "$GIT_ROOT"/packages/*; do
434
+ if [ -d "$sub" ] && [ -f "$sub/.husky/pre-commit" ] && [ -x "$sub/.husky/pre-commit" ]; then
435
+ LOCAL_HOOK="$sub/.husky/pre-commit"
436
+ break
437
+ fi
438
+ done
427
439
  fi
428
- elif [ -f ".git/hooks/pre-commit.local" ] && [ -x ".git/hooks/pre-commit.local" ]; then
429
- .git/hooks/pre-commit.local "$@"
440
+ fi
441
+
442
+ # 2. Prioritize local team hook if found
443
+ if [ -n "$LOCAL_HOOK" ]; then
444
+ "$LOCAL_HOOK" "$@"
430
445
  LOCAL_STATUS=$?
431
446
  if [ $LOCAL_STATUS -ne 0 ]; then
432
447
  exit $LOCAL_STATUS
433
448
  fi
434
449
  fi
435
450
 
436
- # 2. Run ASC workspace pre-commit runner if present
437
- if [ -f ".asc/hooks/pre-commit-runner.cjs" ]; then
451
+ # 3. Run ASC workspace pre-commit runner if present
452
+ if [ -n "$GIT_ROOT" ] && [ -f "$GIT_ROOT/.asc/hooks/pre-commit-runner.cjs" ]; then
453
+ node "$GIT_ROOT/.asc/hooks/pre-commit-runner.cjs" "$@"
454
+ exit $?
455
+ elif [ -f ".asc/hooks/pre-commit-runner.cjs" ]; then
438
456
  node .asc/hooks/pre-commit-runner.cjs "$@"
439
457
  exit $?
440
458
  fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ryuenn3123/agentic-senior-core",
3
- "version": "6.7.1",
3
+ "version": "6.7.2",
4
4
  "type": "module",
5
5
  "description": "Agentic Senior Core: Universal AI coding rules and workflows. Write code like a staff engineer, not a junior.",
6
6
  "bin": {
package/plugin.yaml CHANGED
@@ -1,5 +1,5 @@
1
1
  name: agentic-senior-core
2
- version: 6.7.1
2
+ version: 6.7.2
3
3
  description: Universal AI coding rules. Write code like a staff engineer.
4
4
  author: fatidaprilian
5
5
  provides_hooks: