@pieai/doc-gov 0.3.2 → 0.3.3

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 CHANGED
@@ -6,6 +6,9 @@ AI-assisted projects.
6
6
  It checks whether governed Markdown documents have the right frontmatter,
7
7
  lifecycle status, links, manifest freshness, agents-routing, and project wiring.
8
8
 
9
+ `@pieai/doc-gov` is the validator package. For reusable starter/profile assets
10
+ and read-only project-level init/sync checks, use `@pieai/pro-gov` beside it.
11
+
9
12
  ## Install
10
13
 
11
14
  ```bash
@@ -61,5 +64,6 @@ The CLI is in public preview. The read-only checks are the stable path:
61
64
  - `doctor`
62
65
  - `migrate --profile <profile> --check`
63
66
 
64
- Future `migrate --apply` and full init profiles should be added only after more
65
- real projects prove the same migration shape.
67
+ Future write-mode migration or apply behavior should be added only after more
68
+ real projects prove the same migration shape. Project-level write behavior
69
+ belongs in `pro-gov`, not in the validator by default.
package/cli-guide.md CHANGED
@@ -6,6 +6,10 @@ This package is the upstream CLI source for Project Governance System. It can
6
6
  be installed by downstream projects as `@pieai/doc-gov` so scripts, hooks, and
7
7
  CI all use the same CLI source.
8
8
 
9
+ It is intentionally the validator package. Install `@pieai/pro-gov` beside it
10
+ when a project needs packaged starter/profile assets or read-only init/sync
11
+ planning.
12
+
9
13
  ## Lifecycle
10
14
 
11
15
  Normal documents:
@@ -86,4 +90,6 @@ pnpm --filter @pieai/doc-gov typecheck
86
90
 
87
91
  This package is the preferred CLI source for new adoption work. Existing
88
92
  legacy projects should move from local CLI copies to `@pieai/doc-gov` when
89
- their scripts, local hooks, and CI are updated together.
93
+ their scripts, local hooks, and CI are updated together. Use `@pieai/pro-gov`
94
+ for the project-level asset surface instead of copying the whole upstream
95
+ repository into each target project.
package/dist/cli.js CHANGED
@@ -1264,7 +1264,7 @@ function checkRouterIntegrity(rootDir = process.cwd()) {
1264
1264
  issues.push({
1265
1265
  file,
1266
1266
  code: "project-root-integration-path",
1267
- message: `Project-level root integrations path must not exist: ${file}. Keep upstream integration docs in project-governance-system; use AGENTS.md or docs/reference/integrations/ only when project-specific guidance is needed.`
1267
+ message: `Project-level root integrations path must not exist: ${file}. Keep upstream integration docs in the Project Governance System upstream repository; use AGENTS.md or docs/reference/integrations/ only when project-specific guidance is needed.`
1268
1268
  });
1269
1269
  }
1270
1270
  }
@@ -1333,8 +1333,20 @@ function checkRouterIntegrity(rootDir = process.cwd()) {
1333
1333
  function isCentralRepository(rootDir) {
1334
1334
  const packageJsonPath = join8(rootDir, "package.json");
1335
1335
  if (!existsSync6(packageJsonPath)) return false;
1336
- const packageJson = readFileSync6(packageJsonPath, "utf8");
1337
- return packageJson.includes('"name": "project-governance-system"') && existsSync6(join8(rootDir, "profiles")) && existsSync6(join8(rootDir, "starter")) && existsSync6(join8(rootDir, "integrations"));
1336
+ const packageName = readPackageName(packageJsonPath);
1337
+ const centralPackageNames = /* @__PURE__ */ new Set(["project-governance-system", "pro-gov"]);
1338
+ return centralPackageNames.has(packageName) && hasCentralRepositoryShape(rootDir);
1339
+ }
1340
+ function readPackageName(packageJsonPath) {
1341
+ try {
1342
+ const packageJson = JSON.parse(readFileSync6(packageJsonPath, "utf8"));
1343
+ return typeof packageJson.name === "string" ? packageJson.name : "";
1344
+ } catch {
1345
+ return "";
1346
+ }
1347
+ }
1348
+ function hasCentralRepositoryShape(rootDir) {
1349
+ return existsSync6(join8(rootDir, "profiles")) && existsSync6(join8(rootDir, "starter")) && existsSync6(join8(rootDir, "integrations"));
1338
1350
  }
1339
1351
  function validateProjectAgentsRouting(rootDir) {
1340
1352
  const issues = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pieai/doc-gov",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "AI-native documentation governance CLI for project docs, agent routing, and lifecycle checks.",
5
5
  "keywords": [
6
6
  "ai-agents",
@@ -10,15 +10,15 @@
10
10
  "project-management",
11
11
  "markdown"
12
12
  ],
13
- "homepage": "https://github.com/PieAIStudio/project-governance-system#readme",
13
+ "homepage": "https://github.com/PieAIStudio/ProjectGovernanceSystem#readme",
14
14
  "bugs": {
15
- "url": "https://github.com/PieAIStudio/project-governance-system/issues"
15
+ "url": "https://github.com/PieAIStudio/ProjectGovernanceSystem/issues"
16
16
  },
17
17
  "license": "MIT",
18
18
  "author": "PieAI <PIEAI@hotmail.com>",
19
19
  "repository": {
20
20
  "type": "git",
21
- "url": "git+https://github.com/PieAIStudio/project-governance-system.git",
21
+ "url": "git+https://github.com/PieAIStudio/ProjectGovernanceSystem.git",
22
22
  "directory": "packages/doc-gov"
23
23
  },
24
24
  "bin": {
@@ -34,13 +34,6 @@
34
34
  "publishConfig": {
35
35
  "access": "public"
36
36
  },
37
- "scripts": {
38
- "dev": "tsx src/cli.ts",
39
- "build": "node node_modules/esbuild/bin/esbuild src/cli.ts --bundle --platform=node --format=esm --target=node22 --banner:js=\"#!/usr/bin/env node\" --outfile=dist/cli.js && chmod +x dist/cli.js",
40
- "prepack": "pnpm build",
41
- "test": "tsx --test src/**/*.test.ts",
42
- "typecheck": "tsc -p tsconfig.json --noEmit"
43
- },
44
37
  "devDependencies": {
45
38
  "@types/node": "25.0.0",
46
39
  "esbuild": "0.27.7",
@@ -49,5 +42,11 @@
49
42
  },
50
43
  "engines": {
51
44
  "node": ">=22.12.0"
45
+ },
46
+ "scripts": {
47
+ "dev": "tsx src/cli.ts",
48
+ "build": "node node_modules/esbuild/bin/esbuild src/cli.ts --bundle --platform=node --format=esm --target=node22 --banner:js=\"#!/usr/bin/env node\" --outfile=dist/cli.js && chmod +x dist/cli.js",
49
+ "test": "tsx --test src/**/*.test.ts",
50
+ "typecheck": "tsc -p tsconfig.json --noEmit"
52
51
  }
53
- }
52
+ }