@pieai/doc-gov 0.3.0 → 0.3.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.
package/cli-guide.md CHANGED
@@ -3,8 +3,8 @@
3
3
  Documentation governance CLI for PieAI projects.
4
4
 
5
5
  This package is the upstream CLI source for Project Governance System. It can
6
- replace project-local `tools/doc-gov` copies when a project is ready to update
7
- its scripts and CI together.
6
+ be installed by downstream projects as `@pieai/doc-gov` so scripts, hooks, and
7
+ CI all use the same CLI source.
8
8
 
9
9
  ## Lifecycle
10
10
 
@@ -85,5 +85,5 @@ pnpm --filter @pieai/doc-gov typecheck
85
85
  ## Current Status
86
86
 
87
87
  This package is the preferred CLI source for new adoption work. Existing
88
- projects may keep local `tools/doc-gov` copies until their scripts, local hooks,
89
- and CI are moved together.
88
+ legacy projects should move from local CLI copies to `@pieai/doc-gov` when
89
+ their scripts, local hooks, and CI are updated together.
package/dist/cli.js CHANGED
@@ -502,7 +502,7 @@ function renderManifest(records) {
502
502
  "# docs/governance/MANIFEST.yml \u2014 auto-generated, DO NOT EDIT MANUALLY",
503
503
  "# Regenerate: pnpm doc-gov scan",
504
504
  `generated_at: ${(/* @__PURE__ */ new Date()).toISOString()}`,
505
- "generator_version: doc-gov@0.3.0",
505
+ `generator_version: doc-gov@${readPackageVersion()}`,
506
506
  `docs_count: ${records.length}`,
507
507
  "docs:"
508
508
  ];
@@ -518,6 +518,16 @@ function renderManifest(records) {
518
518
  lines.push("");
519
519
  return lines.join("\n");
520
520
  }
521
+ function readPackageVersion() {
522
+ for (const candidate of ["../package.json", "../../package.json"]) {
523
+ try {
524
+ const packageJson = JSON.parse(readFileSync2(new URL(candidate, import.meta.url), "utf8"));
525
+ if (typeof packageJson.version === "string") return packageJson.version;
526
+ } catch {
527
+ }
528
+ }
529
+ return "unknown";
530
+ }
521
531
 
522
532
  // src/commands/approve.ts
523
533
  function runApprove(args2) {
@@ -945,6 +955,16 @@ var CENTRAL_REQUIRED_NEEDLES = [
945
955
  needle: ROUTER_BLOCK_BEGIN,
946
956
  message: "AGENTS.md must include the PGS router block."
947
957
  },
958
+ {
959
+ file: "AGENTS.md",
960
+ needle: "docs/policy/**/*.md",
961
+ message: "AGENTS.md must tell agents to read docs/policy/**/*.md, including subdirectories and shared-rule symlinks."
962
+ },
963
+ {
964
+ file: "AGENTS.md",
965
+ needle: "symlink",
966
+ message: "AGENTS.md must state that symlinked shared-rule files under docs/policy/ are included."
967
+ },
948
968
  {
949
969
  file: "AGENTS.md",
950
970
  needle: "docs/governance/boundary.md",
@@ -1095,6 +1115,16 @@ var CENTRAL_REQUIRED_NEEDLES = [
1095
1115
  needle: "docs/governance/doc-types.md",
1096
1116
  message: "Starter AGENTS template must point agents to docs/governance/doc-types.md."
1097
1117
  },
1118
+ {
1119
+ file: "starter/AGENTS.template.md",
1120
+ needle: "docs/policy/**/*.md",
1121
+ message: "Starter AGENTS template must tell agents to read docs/policy/**/*.md, including subdirectories and shared-rule symlinks."
1122
+ },
1123
+ {
1124
+ file: "starter/AGENTS.template.md",
1125
+ needle: "symlink",
1126
+ message: "Starter AGENTS template must state that symlinked shared-rule files under docs/policy/ are included."
1127
+ },
1098
1128
  {
1099
1129
  file: "starter/AGENTS.template.md",
1100
1130
  needle: "docs/policy/",
@@ -1134,8 +1164,13 @@ var PROJECT_REQUIRED_NEEDLES = [
1134
1164
  },
1135
1165
  {
1136
1166
  file: "AGENTS.md",
1137
- needle: "docs/policy/",
1138
- message: "AGENTS.md must point agents to docs/policy/."
1167
+ needle: "docs/policy/**/*.md",
1168
+ message: "AGENTS.md must tell agents to read docs/policy/**/*.md, including subdirectories and shared-rule symlinks."
1169
+ },
1170
+ {
1171
+ file: "AGENTS.md",
1172
+ needle: "symlink",
1173
+ message: "AGENTS.md must state that symlinked shared-rule files under docs/policy/ are included."
1139
1174
  },
1140
1175
  {
1141
1176
  file: "AGENTS.md",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pieai/doc-gov",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "AI-native documentation governance CLI for project docs, agent routing, and lifecycle checks.",
5
5
  "keywords": [
6
6
  "ai-agents",