@pieai/pro-gov 0.4.1 → 0.4.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
|
@@ -72,7 +72,7 @@ What these commands do:
|
|
|
72
72
|
| `lens report` | Writes the requested report file. | Only the explicit output |
|
|
73
73
|
| `init --dry-run` | Shows starter/profile files that would be needed. | No |
|
|
74
74
|
| `init --apply` | Installs one profile into a fresh target; refuses the whole operation if any target file exists. Optional CI and Lefthook references are not installed. | Yes |
|
|
75
|
-
| `sync --check` | Strictly compares shared core files
|
|
75
|
+
| `sync --check` | Strictly compares shared core files, checks project-local seeds for presence, and leaves optional guardrail contents consumer-owned. | No |
|
|
76
76
|
| `sync --apply-host-hooks` | Merges current PGS Compound Gate entries into engineering-runtime host configs while preserving consumer-owned keys and hooks. | Only the three host config files |
|
|
77
77
|
| `doctor` | Checks required packaged assets and whether `doc-gov` is available. | No |
|
|
78
78
|
|
|
@@ -34,4 +34,6 @@ This profile is a human/AI adoption contract. `doc-gov` validates the resulting
|
|
|
34
34
|
project shape. `pro-gov init --apply` can install it into a fresh target, but
|
|
35
35
|
refuses all writes when any destination already exists. `sync --check` compares
|
|
36
36
|
shared core files while leaving project-local router, policy, and current-work
|
|
37
|
-
content under the target project's ownership.
|
|
37
|
+
content under the target project's ownership. Optional Lefthook and CI
|
|
38
|
+
guardrails are also consumer-owned when installed; `doc-gov doctor` checks that
|
|
39
|
+
their required governance commands remain present.
|
|
@@ -40,7 +40,9 @@ This profile is a human/AI adoption contract. `doc-gov` validates the resulting
|
|
|
40
40
|
project shape. `pro-gov init --apply` can install it into a fresh target, but
|
|
41
41
|
refuses all writes when any destination already exists. `sync --check` compares
|
|
42
42
|
shared core files while leaving project-local router, policy, and current-work
|
|
43
|
-
content under the target project's ownership.
|
|
43
|
+
content under the target project's ownership. Optional Lefthook and CI
|
|
44
|
+
guardrails are also consumer-owned when installed; `doc-gov doctor` checks that
|
|
45
|
+
their required governance commands remain present.
|
|
44
46
|
|
|
45
47
|
Engineering-runtime starters also include Codex, Claude Code, and Antigravity
|
|
46
48
|
Stop hooks that call `pro-gov host-hook`. Use `pro-gov doctor --strict-hooks`
|
package/cli-guide.md
CHANGED
|
@@ -43,9 +43,12 @@ Actions references stay packaged but are not installed by default.
|
|
|
43
43
|
|
|
44
44
|
`sync --check` is read-only. It compares shared governance core files strictly,
|
|
45
45
|
but checks project-local seeds such as `AGENTS.md`, project policy, and current
|
|
46
|
-
work for presence only.
|
|
47
|
-
consumer
|
|
48
|
-
|
|
46
|
+
work for presence only. Optional `lefthook.yml` and CI guardrails remain
|
|
47
|
+
consumer-owned when installed; `doc-gov doctor` validates their required PGS
|
|
48
|
+
commands without requiring byte-for-byte template equality. Host configs are
|
|
49
|
+
compared by PGS-owned entries, so consumer hooks do not create false drift. It
|
|
50
|
+
infers the installed profile when exactly one route exists; `--profile` resolves
|
|
51
|
+
an empty or temporarily ambiguous target.
|
|
49
52
|
|
|
50
53
|
`sync --apply-host-hooks` is the bounded write path for engineering-runtime
|
|
51
54
|
host configs. It updates only PGS Compound Gate entries and preserves consumer
|
package/dist/cli.js
CHANGED
|
@@ -4211,6 +4211,7 @@ function runSync(args) {
|
|
|
4211
4211
|
differences += 1;
|
|
4212
4212
|
continue;
|
|
4213
4213
|
}
|
|
4214
|
+
if (file.ownership === "optional-guardrail") continue;
|
|
4214
4215
|
if (file.ownership === "project-local-seed") continue;
|
|
4215
4216
|
const source = readFileSync18(file.absoluteSourcePath, "utf8");
|
|
4216
4217
|
const target = readFileSync18(targetPath, "utf8");
|
|
@@ -4259,7 +4260,12 @@ function applyHostHookConfigs(profile) {
|
|
|
4259
4260
|
return 0;
|
|
4260
4261
|
}
|
|
4261
4262
|
function matchesExpectedContent(targetPath, source, target) {
|
|
4262
|
-
if (!isHostHookTargetPath(targetPath))
|
|
4263
|
+
if (!isHostHookTargetPath(targetPath)) {
|
|
4264
|
+
if (targetPath.endsWith(".md")) {
|
|
4265
|
+
return normalizeMarkdownTablePadding(source) === normalizeMarkdownTablePadding(target);
|
|
4266
|
+
}
|
|
4267
|
+
return source === target;
|
|
4268
|
+
}
|
|
4263
4269
|
try {
|
|
4264
4270
|
const current = JSON.parse(target);
|
|
4265
4271
|
const template = JSON.parse(source);
|
|
@@ -4268,6 +4274,19 @@ function matchesExpectedContent(targetPath, source, target) {
|
|
|
4268
4274
|
return false;
|
|
4269
4275
|
}
|
|
4270
4276
|
}
|
|
4277
|
+
function normalizeMarkdownTablePadding(content) {
|
|
4278
|
+
return content.split("\n").map((line) => {
|
|
4279
|
+
const match = line.match(/^(\s*)\|(.+)\|\s*$/);
|
|
4280
|
+
if (!match) return line;
|
|
4281
|
+
const [, indentation, cells] = match;
|
|
4282
|
+
return `${indentation}|${cells.split(/(?<!\\)\|/).map((cell) => normalizeMarkdownTableCell(cell)).join("|")}|`;
|
|
4283
|
+
}).join("\n");
|
|
4284
|
+
}
|
|
4285
|
+
function normalizeMarkdownTableCell(cell) {
|
|
4286
|
+
const trimmed = cell.trim();
|
|
4287
|
+
const separator = trimmed.match(/^(:?)-{3,}(:?)$/);
|
|
4288
|
+
return separator ? `${separator[1]}---${separator[2]}` : trimmed;
|
|
4289
|
+
}
|
|
4271
4290
|
function inferInstalledProfile(root) {
|
|
4272
4291
|
const installed = ["engineering-runtime", "doc-only"].filter(
|
|
4273
4292
|
(profile) => existsSync23(join22(root, `docs/governance/agents-routing/${profile}-v0.9.md`))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pieai/pro-gov",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "Project-level distribution kit for Project Governance System.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-agents",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@pieai/doc-gov": "^0.4.
|
|
38
|
+
"@pieai/doc-gov": "^0.4.3"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "24.13.2",
|