@pieai/doc-gov 0.7.2 → 0.8.0
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 +2 -3
- package/dist/cli.js +29 -60
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -53,9 +53,8 @@ runtime notes, or source assets outside `docs/**` unless a project explicitly
|
|
|
53
53
|
opts them into doc-gov.
|
|
54
54
|
|
|
55
55
|
Reusable learning records under `docs/reference/learnings/**` are governed
|
|
56
|
-
`reference` documents.
|
|
57
|
-
`
|
|
58
|
-
decision surface.
|
|
56
|
+
`reference` documents. Project decisions use the governed `docs/adr/**` surface
|
|
57
|
+
with `decision` frontmatter and the normal decision lifecycle.
|
|
59
58
|
|
|
60
59
|
## Status
|
|
61
60
|
|
package/dist/cli.js
CHANGED
|
@@ -69,12 +69,7 @@ import { existsSync, readdirSync, statSync } from "node:fs";
|
|
|
69
69
|
import { join, relative } from "node:path";
|
|
70
70
|
|
|
71
71
|
// src/core/external-artifacts.ts
|
|
72
|
-
var EXTERNAL_ARTIFACT_PREFIXES = [
|
|
73
|
-
"docs/adr/",
|
|
74
|
-
"docs/agents/",
|
|
75
|
-
"docs/brainstorms/",
|
|
76
|
-
"docs/pulse-reports/"
|
|
77
|
-
];
|
|
72
|
+
var EXTERNAL_ARTIFACT_PREFIXES = ["docs/brainstorms/", "docs/pulse-reports/"];
|
|
78
73
|
function isExternalArtifactPath(repoPath) {
|
|
79
74
|
if (EXTERNAL_ARTIFACT_PREFIXES.some((prefix) => repoPath.startsWith(prefix))) {
|
|
80
75
|
return true;
|
|
@@ -895,13 +890,7 @@ import { existsSync as existsSync7, readFileSync as readFileSync7 } from "node:f
|
|
|
895
890
|
import { isAbsolute, join as join9, resolve as resolve2 } from "node:path";
|
|
896
891
|
|
|
897
892
|
// src/core/router-integrity.ts
|
|
898
|
-
import {
|
|
899
|
-
existsSync as existsSync6,
|
|
900
|
-
lstatSync as lstatSync2,
|
|
901
|
-
readlinkSync,
|
|
902
|
-
readdirSync as readdirSync5,
|
|
903
|
-
readFileSync as readFileSync6
|
|
904
|
-
} from "node:fs";
|
|
893
|
+
import { existsSync as existsSync6, lstatSync as lstatSync2, readlinkSync, readdirSync as readdirSync5, readFileSync as readFileSync6 } from "node:fs";
|
|
905
894
|
import { join as join8, relative as relative2 } from "node:path";
|
|
906
895
|
var CENTRAL_REQUIRED_FILES = [
|
|
907
896
|
"AGENTS.md",
|
|
@@ -920,7 +909,6 @@ var CENTRAL_REQUIRED_FILES = [
|
|
|
920
909
|
"docs/governance/templates/archive.md",
|
|
921
910
|
"docs/governance/agents-routing/engineering-runtime-v1.1.md",
|
|
922
911
|
"docs/governance/agents-routing/doc-only-v1.1.md",
|
|
923
|
-
"integrations/mattpocock-skills.md",
|
|
924
912
|
"profiles/engineering-runtime/profile.md",
|
|
925
913
|
"profiles/engineering-runtime/manifest.yml",
|
|
926
914
|
"profiles/doc-only/profile.md",
|
|
@@ -980,11 +968,7 @@ var FORBIDDEN_PROJECT_ROOTS = ["integrations"];
|
|
|
980
968
|
var FORBIDDEN_CENTRAL_ROOTS = ["shared-rules"];
|
|
981
969
|
var ROUTER_BLOCK_BEGIN = "<!-- PGS-ROUTER:BEGIN v1.1 -->";
|
|
982
970
|
var ROUTER_BLOCK_END = "<!-- PGS-ROUTER:END -->";
|
|
983
|
-
var EXTERNAL_ROUTER_MARKERS = [
|
|
984
|
-
"## gstack",
|
|
985
|
-
"## GStack",
|
|
986
|
-
"## Skill routing"
|
|
987
|
-
];
|
|
971
|
+
var EXTERNAL_ROUTER_MARKERS = ["## gstack", "## GStack", "## Skill routing"];
|
|
988
972
|
var CENTRAL_REQUIRED_NEEDLES = [
|
|
989
973
|
{
|
|
990
974
|
file: "AGENTS.md",
|
|
@@ -1056,31 +1040,11 @@ var CENTRAL_REQUIRED_NEEDLES = [
|
|
|
1056
1040
|
needle: "does not use engineering test workflows by default",
|
|
1057
1041
|
message: "Doc-only routing must exclude engineering test workflows by default."
|
|
1058
1042
|
},
|
|
1059
|
-
{
|
|
1060
|
-
file: "integrations/mattpocock-skills.md",
|
|
1061
|
-
needle: "does not vendor",
|
|
1062
|
-
message: "mattpocock/skills integration must preserve the external-skill boundary."
|
|
1063
|
-
},
|
|
1064
|
-
{
|
|
1065
|
-
file: "integrations/mattpocock-skills.md",
|
|
1066
|
-
needle: "no default workflow owner",
|
|
1067
|
-
message: "mattpocock/skills integration must not create a mandatory workflow owner."
|
|
1068
|
-
},
|
|
1069
|
-
{
|
|
1070
|
-
file: "integrations/mattpocock-skills.md",
|
|
1071
|
-
needle: "docs/agents/**",
|
|
1072
|
-
message: "mattpocock/skills integration must document Matt-owned setup artifacts."
|
|
1073
|
-
},
|
|
1074
1043
|
{
|
|
1075
1044
|
file: "profiles/engineering-runtime/manifest.yml",
|
|
1076
1045
|
needle: "docs/governance/agents-routing/engineering-runtime-v1.1.md",
|
|
1077
1046
|
message: "Engineering profile manifest must point to engineering routing."
|
|
1078
1047
|
},
|
|
1079
|
-
{
|
|
1080
|
-
file: "profiles/engineering-runtime/manifest.yml",
|
|
1081
|
-
needle: "integrations/mattpocock-skills.md",
|
|
1082
|
-
message: "Engineering profile manifest must include the mattpocock/skills integration."
|
|
1083
|
-
},
|
|
1084
1048
|
{
|
|
1085
1049
|
file: "profiles/doc-only/manifest.yml",
|
|
1086
1050
|
needle: "docs/governance/agents-routing/doc-only-v1.1.md",
|
|
@@ -1759,9 +1723,31 @@ var TEMPLATE_FILES = {
|
|
|
1759
1723
|
};
|
|
1760
1724
|
var DEFAULT_TEMPLATES = {
|
|
1761
1725
|
"adr.md": [
|
|
1762
|
-
"
|
|
1726
|
+
"---",
|
|
1727
|
+
"id: REPLACE-ME",
|
|
1728
|
+
"title: Replace Me",
|
|
1729
|
+
"type: decision",
|
|
1730
|
+
"status: proposed",
|
|
1731
|
+
"canonical: true",
|
|
1732
|
+
"owner: human",
|
|
1733
|
+
"created: YYYY-MM-DD",
|
|
1734
|
+
"last_reviewed: YYYY-MM-DD",
|
|
1735
|
+
"domain: meta",
|
|
1736
|
+
"tags:",
|
|
1737
|
+
" - replace-me",
|
|
1738
|
+
"pinned: false",
|
|
1739
|
+
"related: []",
|
|
1740
|
+
"supersedes: []",
|
|
1741
|
+
"superseded_by: null",
|
|
1742
|
+
"---",
|
|
1743
|
+
"",
|
|
1744
|
+
"# REPLACE-ME: Replace Me",
|
|
1763
1745
|
"",
|
|
1764
|
-
"
|
|
1746
|
+
"## Context",
|
|
1747
|
+
"",
|
|
1748
|
+
"## Decision",
|
|
1749
|
+
"",
|
|
1750
|
+
"## Consequences",
|
|
1765
1751
|
""
|
|
1766
1752
|
].join("\n"),
|
|
1767
1753
|
"spec.md": [
|
|
@@ -2177,26 +2163,9 @@ function runNew(args2) {
|
|
|
2177
2163
|
console.error(`File already exists: ${plan.filePath}. Use --force to overwrite.`);
|
|
2178
2164
|
return 1;
|
|
2179
2165
|
}
|
|
2180
|
-
if (type === "decision") {
|
|
2181
|
-
const title2 = titleOverride ?? slugToTitle(plan.slug);
|
|
2182
|
-
mkdirSync5(dirname4(absPath), { recursive: true });
|
|
2183
|
-
writeFileSync6(
|
|
2184
|
-
absPath,
|
|
2185
|
-
`# ${title2}
|
|
2186
|
-
|
|
2187
|
-
Record the context, decision, and why in one to three sentences.
|
|
2188
|
-
`
|
|
2189
|
-
);
|
|
2190
|
-
console.log(`Created ${plan.filePath} with id ${plan.id}.`);
|
|
2191
|
-
console.log(`
|
|
2192
|
-
Next steps:`);
|
|
2193
|
-
console.log(` 1. Replace the placeholder sentence in ${plan.filePath}.`);
|
|
2194
|
-
console.log(` 2. Keep this ADR concise; Doc Gov intentionally treats docs/adr/** as Matt-compatible external artifacts.`);
|
|
2195
|
-
return 0;
|
|
2196
|
-
}
|
|
2197
2166
|
const template = loadTemplate(root, type);
|
|
2198
|
-
const status = "draft";
|
|
2199
|
-
const canonical =
|
|
2167
|
+
const status = type === "decision" ? "proposed" : "draft";
|
|
2168
|
+
const canonical = type === "decision";
|
|
2200
2169
|
const today = todayIso();
|
|
2201
2170
|
const title = titleOverride ?? slugToTitle(plan.slug);
|
|
2202
2171
|
const rendered = renderTemplate(template, {
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pieai/doc-gov",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "AI-native documentation governance CLI for project docs, agent routing, and lifecycle checks.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-agents",
|
|
7
|
+
"cli",
|
|
7
8
|
"documentation",
|
|
8
9
|
"governance",
|
|
9
|
-
"
|
|
10
|
-
"project-management"
|
|
11
|
-
"markdown"
|
|
10
|
+
"markdown",
|
|
11
|
+
"project-management"
|
|
12
12
|
],
|
|
13
13
|
"homepage": "https://github.com/PieAIStudio/ProjectGovernanceSystem#readme",
|
|
14
14
|
"bugs": {
|