@pieai/doc-gov 0.3.6 → 0.3.8

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
@@ -52,6 +52,10 @@ It does not try to swallow product artifacts, prompts, generated media,
52
52
  runtime notes, or source assets outside `docs/**` unless a project explicitly
53
53
  opts them into doc-gov.
54
54
 
55
+ It also recognizes selected external workflow artifacts under `docs/**` as
56
+ outside the Doc Gov schema. For example, Compound Engineering learning records
57
+ under `docs/solutions/**` use CE frontmatter, not Doc Gov frontmatter.
58
+
55
59
  ## Status
56
60
 
57
61
  The CLI is in public preview. The read-only checks are the stable path:
package/cli-guide.md CHANGED
@@ -1,14 +1,14 @@
1
1
  # @pieai/doc-gov
2
2
 
3
- Documentation governance CLI for PieAI projects.
3
+ Documentation governance CLI for AI-assisted projects.
4
4
 
5
5
  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
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.
10
+ when a project needs packaged starter/profile assets, guarded fresh-target init,
11
+ or read-only sync planning.
12
12
 
13
13
  ## Lifecycle
14
14
 
package/dist/cli.js CHANGED
@@ -67,6 +67,24 @@ function parseScalar(value) {
67
67
  // src/core/files.ts
68
68
  import { existsSync, readdirSync, statSync } from "node:fs";
69
69
  import { join, relative } from "node:path";
70
+
71
+ // src/core/external-artifacts.ts
72
+ var EXTERNAL_ARTIFACT_PREFIXES = [
73
+ "docs/brainstorms/",
74
+ "docs/solutions/",
75
+ "docs/pulse-reports/"
76
+ ];
77
+ function isExternalArtifactPath(repoPath) {
78
+ if (EXTERNAL_ARTIFACT_PREFIXES.some((prefix) => repoPath.startsWith(prefix))) {
79
+ return true;
80
+ }
81
+ if (repoPath.startsWith("docs/plans/") && repoPath !== "docs/plans/active" && !repoPath.startsWith("docs/plans/active/") && repoPath !== "docs/plans/completed" && !repoPath.startsWith("docs/plans/completed/")) {
82
+ return true;
83
+ }
84
+ return false;
85
+ }
86
+
87
+ // src/core/files.ts
70
88
  function listGovernedMarkdownFiles(rootDir) {
71
89
  const roots = [join(rootDir, "docs")];
72
90
  const files = [];
@@ -90,7 +108,7 @@ function walk(rootDir, dir) {
90
108
  return files;
91
109
  }
92
110
  function shouldSkip(repoPath) {
93
- return repoPath.startsWith("docs/governance/templates/") || repoPath === "docs/governance/MANIFEST.yml";
111
+ return isExternalArtifactPath(repoPath) || repoPath.startsWith("docs/governance/templates/") || repoPath === "docs/governance/MANIFEST.yml";
94
112
  }
95
113
  function toRepoPath(rootDir, absolutePath) {
96
114
  return relative(rootDir, absolutePath).split(/\\/g).join("/");
@@ -750,12 +768,14 @@ function walkMarkdown(rootDir, dir) {
750
768
  return files;
751
769
  }
752
770
  function shouldSkipTree(repoPath) {
771
+ if (isExternalArtifactPath(repoPath)) return true;
753
772
  if (repoPath.startsWith("docs/archive/")) return true;
754
773
  if (repoPath.startsWith("docs/governance/templates/")) return true;
755
774
  if (repoPath === "docs/governance/MANIFEST.yml") return true;
756
775
  return false;
757
776
  }
758
777
  function shouldIncludeSource(repoPath) {
778
+ if (isExternalArtifactPath(repoPath)) return false;
759
779
  if (repoPath.startsWith("docs/")) {
760
780
  if (repoPath.startsWith("docs/governance/")) return true;
761
781
  return CURRENT_DOC_DIR_PREFIXES.some((prefix) => repoPath.startsWith(prefix));
@@ -2346,6 +2366,7 @@ function escapeRegex(s) {
2346
2366
  }
2347
2367
  function isGovernedMarkdownPath(path) {
2348
2368
  if (!/\.md$/.test(path)) return false;
2369
+ if (isExternalArtifactPath(path)) return false;
2349
2370
  if (path.startsWith("docs/governance/templates/")) return false;
2350
2371
  if (path === "docs/governance/MANIFEST.yml") return false;
2351
2372
  if (path.startsWith("docs/")) return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pieai/doc-gov",
3
- "version": "0.3.6",
3
+ "version": "0.3.8",
4
4
  "description": "AI-native documentation governance CLI for project docs, agent routing, and lifecycle checks.",
5
5
  "keywords": [
6
6
  "ai-agents",