@ryuenn3123/agentic-senior-core 6.4.0 → 6.4.1

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.4.0",
3
+ "version": "6.4.1",
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": [
package/README.md CHANGED
@@ -111,6 +111,20 @@ If you need to override these defaults (e.g., to whitelist a specific dependency
111
111
  ASC provides powerful commands to steer your agents (e.g. `/asc-refactor`, `/asc-audit`).
112
112
  It also provides a CLI to manage your local setup (e.g. `asc adapter --all`, `asc global --all`).
113
113
 
114
+ ### Git Pre-Commit Hook
115
+
116
+ ASC automatically installs a native Git pre-commit hook when you run `asc adapter`. This hook runs via Git's own hook system — independent of any AI host's plugin runtime — so it works on **every** host, including adapter-only hosts (Cursor, Cline, Copilot IDE extension, etc.) and hosts where agent lifecycle hooks are unreliable.
117
+
118
+ The hook:
119
+ - Runs `jscpd` on directories containing staged files, using policy from `.asc/dedup-config.json`
120
+ - Auto-fixes ESLint issues (including `no-confusing-void-expression`) and re-stages, if the target project has a typed ESLint config
121
+ - Blocks the commit if a staged file duplicates existing code, with a clear message citing the match
122
+ - Bypass with `git commit --no-verify` when duplication is intentional
123
+
124
+ Supports both `.husky/` (appends without overwriting) and `.git/hooks/` (direct install). Remove with `asc uninstall`. To install the hook standalone without generating adapter files: `asc install-git-hook`.
125
+
126
+ > **Known limitation — Antigravity IDE hooks**: Agent lifecycle hooks (`hooks.json`) are documented but do not execute on Antigravity IDE's chat surface as of August 2026. The git pre-commit hook is the recommended primary enforcement mechanism for Antigravity users.
127
+
114
128
  **[See all available CLI Options and Agent Commands](docs/INSTALLATION.md#commands--cli)**
115
129
 
116
130
  ---
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-senior-core",
3
- "version": "6.4.0",
3
+ "version": "6.4.1",
4
4
  "description": "Universal AI coding rules. Write code like a staff engineer.",
5
5
  "author": "fatidaprilian",
6
6
  "license": "MIT",
@@ -1,11 +1,19 @@
1
1
  import fs from 'fs';
2
2
  import path from 'path';
3
+ import { createRequire } from 'node:module';
3
4
  import { compileAndSaveValidator } from '../../core/rule-compiler.mjs';
4
5
 
6
+ // Single source of truth: import extension list from constants.cjs
7
+ const require_ = createRequire(import.meta.url);
8
+ const { SOURCE_EXTENSIONS } = require_('../../../.agents/plugins/agentic-senior-core/hooks/constants.cjs');
9
+
5
10
  export const ASC_HOOK_HEADER = '# Agentic Senior Core Git Pre-Commit Hook';
6
11
  export const ASC_HOOK_RUNNER_REL_PATH = path.join('.asc', 'hooks', 'pre-commit-runner.cjs').replace(/\\/g, '/');
7
12
 
8
13
  export function generatePreCommitRunnerScript() {
14
+ // Serialize SOURCE_EXTENSIONS from constants.cjs into the generated script
15
+ const extensionsList = Array.from(SOURCE_EXTENSIONS).map(e => `'${e}'`).join(', ');
16
+
9
17
  return `#!/usr/bin/env node
10
18
  // # Agentic Senior Core -- Git Pre-Commit Dedup & Quality Gate
11
19
  // Auto-generated by Agentic Senior Core (ASC). DO NOT EDIT DIRECTLY.
@@ -15,10 +23,7 @@ const path = require('path');
15
23
  const os = require('os');
16
24
  const { execSync } = require('child_process');
17
25
 
18
- const SOURCE_EXTENSIONS = new Set([
19
- 'js', 'ts', 'mjs', 'cjs', 'jsx', 'tsx',
20
- 'py', 'rb', 'go', 'rs', 'java', 'kt', 'swift', 'cs',
21
- ]);
26
+ const SOURCE_EXTENSIONS = new Set([${extensionsList}]);
22
27
 
23
28
  const JSCPD_TIMEOUT_MS = 10000;
24
29
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ryuenn3123/agentic-senior-core",
3
- "version": "6.4.0",
3
+ "version": "6.4.1",
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.4.0
2
+ version: 6.4.1
3
3
  description: Universal AI coding rules. Write code like a staff engineer.
4
4
  author: fatidaprilian
5
5
  provides_hooks: