@pieai/doc-gov 0.3.3 → 0.3.5

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/dist/cli.js +12 -3
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -45,7 +45,7 @@ pnpm doc-gov migrate --profile engineering-runtime --check
45
45
  By default, Project Governance System governs:
46
46
 
47
47
  - `docs/**`
48
- - AI entry files such as `AGENTS.md`, `CLAUDE.md`, and `GEMINI.md`
48
+ - AI entry files/config adapters such as `AGENTS.md`, `CLAUDE.md`, and `.gemini/settings.json`
49
49
  - documentation-governance templates, manifest, and agents-routing files
50
50
 
51
51
  It does not try to swallow product artifacts, prompts, generated media,
package/dist/cli.js CHANGED
@@ -869,8 +869,9 @@ function runCheck() {
869
869
  }
870
870
 
871
871
  // src/commands/doctor.ts
872
+ import { spawnSync } from "node:child_process";
872
873
  import { existsSync as existsSync7, readFileSync as readFileSync7 } from "node:fs";
873
- import { join as join9 } from "node:path";
874
+ import { isAbsolute, join as join9, resolve as resolve2 } from "node:path";
874
875
 
875
876
  // src/core/router-integrity.ts
876
877
  import { existsSync as existsSync6, readdirSync as readdirSync5, readFileSync as readFileSync6 } from "node:fs";
@@ -1564,8 +1565,8 @@ function checkLefthook(rootDir) {
1564
1565
  });
1565
1566
  }
1566
1567
  }
1567
- const preCommit = join9(rootDir, ".git/hooks/pre-commit");
1568
- const commitMsg = join9(rootDir, ".git/hooks/commit-msg");
1568
+ const preCommit = resolveGitHookPath(rootDir, "pre-commit");
1569
+ const commitMsg = resolveGitHookPath(rootDir, "commit-msg");
1569
1570
  if (!hookCallsLefthook(preCommit)) {
1570
1571
  issues.push({
1571
1572
  severity: "error",
@@ -1615,6 +1616,14 @@ function checkDocsCheckWorkflow(rootDir) {
1615
1616
  function hookCallsLefthook(path) {
1616
1617
  return existsSync7(path) && readFileSync7(path, "utf8").includes("lefthook");
1617
1618
  }
1619
+ function resolveGitHookPath(rootDir, hookName) {
1620
+ const result = spawnSync("git", ["-C", rootDir, "rev-parse", "--git-path", `hooks/${hookName}`], {
1621
+ encoding: "utf8"
1622
+ });
1623
+ const gitPath = result.status === 0 ? result.stdout.trim() : "";
1624
+ if (!gitPath) return join9(rootDir, ".git/hooks", hookName);
1625
+ return isAbsolute(gitPath) ? gitPath : resolve2(rootDir, gitPath);
1626
+ }
1618
1627
 
1619
1628
  // src/commands/find.ts
1620
1629
  function runFind(args2) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pieai/doc-gov",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "description": "AI-native documentation governance CLI for project docs, agent routing, and lifecycle checks.",
5
5
  "keywords": [
6
6
  "ai-agents",