harness-everything 0.42.2 → 0.43.1
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/.agents/harness-everything/document-inventory.json +167 -0
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.github/workflows/ci.yml +82 -0
- package/CHANGELOG.md +23 -0
- package/ci/mechanism-2ax-doc-lifecycle.test.js +942 -0
- package/ci/mechanism-325-f1-doc-check.test.js +178 -0
- package/docs/own-repo-governance-e1-plan-2026-10-25-2139.md +253 -0
- package/docs/platform-capabilities.md +8 -0
- package/harness-everything/SKILL.md +1 -1
- package/harness-everything/scripts/doc-lifecycle.js +296 -3
- package/opencode-plugin/plugin.json +1 -1
- package/package.json +1 -1
- package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
- package/plugins/harness-everything/plugin.json +1 -1
- package/plugins/harness-everything/skills/harness-everything/SKILL.md +1 -1
- package/plugins/harness-everything/skills/harness-everything/scripts/doc-lifecycle.js +296 -3
- package/sbom.cdx.json +7 -7
- package/scripts/doc-governance-guard.js +344 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"documentGlobs": [
|
|
4
|
+
"**/*.md",
|
|
5
|
+
"**/*.mdx",
|
|
6
|
+
"**/*.markdown",
|
|
7
|
+
"**/*.rst",
|
|
8
|
+
"**/*.adoc",
|
|
9
|
+
"**/*.txt",
|
|
10
|
+
"**/README",
|
|
11
|
+
"**/LICENSE",
|
|
12
|
+
"**/NOTICE",
|
|
13
|
+
"**/CONTRIBUTING",
|
|
14
|
+
"**/CHANGELOG",
|
|
15
|
+
"**/CODE_OF_CONDUCT",
|
|
16
|
+
"**/SECURITY"
|
|
17
|
+
],
|
|
18
|
+
"rules": [
|
|
19
|
+
{
|
|
20
|
+
"match": "docs/architecture.md",
|
|
21
|
+
"role": "reference",
|
|
22
|
+
"lifecycle": "current",
|
|
23
|
+
"disposition": "applicable",
|
|
24
|
+
"reason": "The current project-docs config declares this exact path as a governed reference; inventory does not expand its policy."
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"match": "docs/doc-workflow-reconciliation.md",
|
|
28
|
+
"role": "reference",
|
|
29
|
+
"lifecycle": "current",
|
|
30
|
+
"disposition": "applicable",
|
|
31
|
+
"reason": "The current project-docs config declares this exact path as a governed reference; inventory does not expand its policy."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"match": "docs/governed-index.md",
|
|
35
|
+
"role": "generated-view",
|
|
36
|
+
"lifecycle": "generated",
|
|
37
|
+
"disposition": "applicable",
|
|
38
|
+
"reason": "The current project-docs config declares this exact path as derived; generator parity remains unchecked by inventory."
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"match": "**/legacy/**",
|
|
42
|
+
"role": "legacy/archive",
|
|
43
|
+
"lifecycle": "historical",
|
|
44
|
+
"disposition": "inventory-only",
|
|
45
|
+
"reason": "Historical path is retained in the inventory; semantic validation policy is not inferred from its extension."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"match": "**/archive/**",
|
|
49
|
+
"role": "legacy/archive",
|
|
50
|
+
"lifecycle": "historical",
|
|
51
|
+
"disposition": "inventory-only",
|
|
52
|
+
"reason": "Historical path is retained in the inventory; semantic validation policy is not inferred from its extension."
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"match": "**/fixtures/**",
|
|
56
|
+
"role": "fixture",
|
|
57
|
+
"lifecycle": "retained-test-input",
|
|
58
|
+
"disposition": "excluded",
|
|
59
|
+
"reason": "Fixture purpose is preserved; this path is excluded from semantic document validation."
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"match": "**/fixture/**",
|
|
63
|
+
"role": "fixture",
|
|
64
|
+
"lifecycle": "retained-test-input",
|
|
65
|
+
"disposition": "excluded",
|
|
66
|
+
"reason": "Fixture purpose is preserved; this path is excluded from semantic document validation."
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"match": "**/tests/**",
|
|
70
|
+
"role": "test-input",
|
|
71
|
+
"lifecycle": "retained-test-input",
|
|
72
|
+
"disposition": "excluded",
|
|
73
|
+
"reason": "Test input is preserved; this path is excluded from production document validation."
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"match": "benchmarks/results/**",
|
|
77
|
+
"role": "evidence",
|
|
78
|
+
"lifecycle": "retained-evidence",
|
|
79
|
+
"disposition": "excluded",
|
|
80
|
+
"reason": "Evidence purpose is preserved; inventory does not claim benchmark validation."
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"match": "**/vendor/**",
|
|
84
|
+
"role": "vendor-document",
|
|
85
|
+
"lifecycle": "external-content",
|
|
86
|
+
"disposition": "excluded",
|
|
87
|
+
"reason": "Tracked vendor content stays inventoried but is excluded from local semantic validation."
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"match": "**/node_modules/**",
|
|
91
|
+
"role": "vendor-document",
|
|
92
|
+
"lifecycle": "external-content",
|
|
93
|
+
"disposition": "excluded",
|
|
94
|
+
"reason": "Tracked dependency content stays inventoried but is excluded from local semantic validation."
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"match": "**/generated/**",
|
|
98
|
+
"role": "generated-view",
|
|
99
|
+
"lifecycle": "generated",
|
|
100
|
+
"disposition": "inventory-only",
|
|
101
|
+
"reason": "Generated path is identified; generator parity is unchecked unless an explicit generator contract is verified."
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"match": "**/SKILL.md",
|
|
105
|
+
"role": "canonical-skill",
|
|
106
|
+
"lifecycle": "current",
|
|
107
|
+
"disposition": "inventory-only",
|
|
108
|
+
"reason": "Canonical skill is inventoried; routing, token, and package gates are outside this inventory command."
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"match": "evals/**",
|
|
112
|
+
"role": "routing-eval",
|
|
113
|
+
"lifecycle": "current",
|
|
114
|
+
"disposition": "inventory-only",
|
|
115
|
+
"reason": "Routing evaluation is inventoried; evaluation gates are outside this inventory command."
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"match": "**/templates/**",
|
|
119
|
+
"role": "template",
|
|
120
|
+
"lifecycle": "current",
|
|
121
|
+
"disposition": "inventory-only",
|
|
122
|
+
"reason": "Template content is inventoried without inferring a document lifecycle policy."
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"match": "references/**",
|
|
126
|
+
"role": "reference",
|
|
127
|
+
"lifecycle": "current",
|
|
128
|
+
"disposition": "inventory-only",
|
|
129
|
+
"reason": "Reference path is inventoried; no project-specific semantic policy is added."
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"match": "docs/prd/**",
|
|
133
|
+
"role": "prd",
|
|
134
|
+
"lifecycle": "unknown",
|
|
135
|
+
"disposition": "unknown",
|
|
136
|
+
"reason": "Path suggests a PRD role, but no active project-docs rule or owner decision establishes semantic coverage."
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"match": "docs/adr/**",
|
|
140
|
+
"role": "adr",
|
|
141
|
+
"lifecycle": "unknown",
|
|
142
|
+
"disposition": "unknown",
|
|
143
|
+
"reason": "Path suggests an ADR role, but no active project-docs rule or owner decision establishes semantic coverage."
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"match": "**/README*",
|
|
147
|
+
"role": "repository-guide",
|
|
148
|
+
"lifecycle": "current",
|
|
149
|
+
"disposition": "inventory-only",
|
|
150
|
+
"reason": "README content is inventoried without inferring semantic validation from its filename."
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"match": "**/CHANGELOG*",
|
|
154
|
+
"role": "change-history",
|
|
155
|
+
"lifecycle": "current",
|
|
156
|
+
"disposition": "inventory-only",
|
|
157
|
+
"reason": "Change history is inventoried without adding a document lifecycle policy."
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"match": "docs/**",
|
|
161
|
+
"role": "project-document",
|
|
162
|
+
"lifecycle": "unknown",
|
|
163
|
+
"disposition": "unknown",
|
|
164
|
+
"reason": "No current path-specific project-docs disposition is declared for this document."
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"name": "harness-everything",
|
|
11
11
|
"source": "./",
|
|
12
12
|
"description": "Harness OS: an orchestrated agent operating system — tier routing, circuit breaker guardrails, verification gates, WAL session memory, and self-evolving workspace rules.",
|
|
13
|
-
"version": "0.
|
|
13
|
+
"version": "0.43.1",
|
|
14
14
|
"author": {
|
|
15
15
|
"name": "Miya Daniel"
|
|
16
16
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "harness-everything",
|
|
3
3
|
"description": "Harness OS: an orchestrated agent operating system — tier routing, circuit breaker guardrails, verification gates, WAL session memory, and self-evolving workspace rules.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.43.1",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Miya Daniel"
|
|
7
7
|
},
|
package/.github/workflows/ci.yml
CHANGED
|
@@ -9,6 +9,88 @@ on:
|
|
|
9
9
|
workflow_call:
|
|
10
10
|
|
|
11
11
|
jobs:
|
|
12
|
+
doc-governance:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v7
|
|
16
|
+
with:
|
|
17
|
+
fetch-depth: 0
|
|
18
|
+
- uses: actions/setup-node@v7
|
|
19
|
+
with:
|
|
20
|
+
node-version: 24
|
|
21
|
+
- name: Run base-owned document governance guard
|
|
22
|
+
env:
|
|
23
|
+
HARNESS_GUARD_EVENT: ${{ github.event_name }}
|
|
24
|
+
HARNESS_GUARD_BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
|
25
|
+
HARNESS_GUARD_CANDIDATE_SHA: ${{ github.event.pull_request.head.sha }}
|
|
26
|
+
run: |
|
|
27
|
+
node -e 'const crypto = require("node:crypto");
|
|
28
|
+
const fs = require("node:fs");
|
|
29
|
+
const os = require("node:os");
|
|
30
|
+
const path = require("node:path");
|
|
31
|
+
const { spawnSync } = require("node:child_process");
|
|
32
|
+
(function main() {
|
|
33
|
+
const guardPath = "scripts/doc-governance-guard.js";
|
|
34
|
+
const event = process.env.HARNESS_GUARD_EVENT || "unknown";
|
|
35
|
+
const baseInput = process.env.HARNESS_GUARD_BASE_SHA || "";
|
|
36
|
+
const candidateInput = process.env.HARNESS_GUARD_CANDIDATE_SHA || "";
|
|
37
|
+
function warn(state, message) {
|
|
38
|
+
console.log("::warning title=" + state + "::" + message);
|
|
39
|
+
if (process.env.GITHUB_STEP_SUMMARY) fs.appendFileSync(process.env.GITHUB_STEP_SUMMARY, "## Document governance guard\n\n**" + state + "**: " + message + "\n\n", "utf8");
|
|
40
|
+
}
|
|
41
|
+
function git(args) {
|
|
42
|
+
const result = spawnSync("git", args, { encoding: "buffer", maxBuffer: 16 * 1024 * 1024, env: { ...process.env, GIT_CONFIG_NOSYSTEM: "1", GIT_NO_REPLACE_OBJECTS: "1", GIT_PAGER: "cat", GIT_TERMINAL_PROMPT: "0" } });
|
|
43
|
+
if (result.error) throw result.error;
|
|
44
|
+
if (result.status !== 0) throw new Error("git " + args[0] + " failed: " + Buffer.from(result.stderr || result.stdout || "").toString("utf8").trim());
|
|
45
|
+
return Buffer.from(result.stdout || "");
|
|
46
|
+
}
|
|
47
|
+
function resolveCommit(input, label) {
|
|
48
|
+
if (!/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/i.test(input)) throw new Error(label + " is not a full commit SHA");
|
|
49
|
+
const resolved = git(["rev-parse", "--verify", "--quiet", "--end-of-options", input + "^{commit}"]).toString("ascii").trim().toLowerCase();
|
|
50
|
+
if (resolved !== input.toLowerCase()) throw new Error(label + " did not resolve to the supplied commit SHA");
|
|
51
|
+
return resolved;
|
|
52
|
+
}
|
|
53
|
+
if (event !== "pull_request") {
|
|
54
|
+
warn("UNCHECKED", "No externally selected PR base/head is available for event " + event + "; the base-owned guard was not executed.");
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
try {
|
|
58
|
+
const base = resolveCommit(baseInput, "PR base SHA");
|
|
59
|
+
const candidate = resolveCommit(candidateInput, "PR head SHA");
|
|
60
|
+
const checkout = process.env.GITHUB_SHA || "unavailable";
|
|
61
|
+
console.log("PR head SHA used by the guard: " + candidate);
|
|
62
|
+
console.log("GITHUB_SHA used by checkout and the ordinary suite: " + checkout + " (the pull_request checkout may be a synthetic merge commit).");
|
|
63
|
+
const entries = git(["ls-tree", "-z", "--full-tree", base, "--", guardPath]);
|
|
64
|
+
if (entries.length === 0) {
|
|
65
|
+
warn("BOOTSTRAP_UNCHECKED", "Trusted base " + base + " has no " + guardPath + "; candidate guard was not executed. Independent review of the frozen candidate guard is required.");
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (entries[entries.length - 1] !== 0) throw new Error("base guard tree entry is not NUL terminated");
|
|
69
|
+
const entry = entries.subarray(0, entries.length - 1);
|
|
70
|
+
const tab = entry.indexOf(9);
|
|
71
|
+
if (tab < 0 || entry.subarray(tab + 1).toString("utf8") !== guardPath) throw new Error("base guard tree entry is malformed");
|
|
72
|
+
const [mode, type, oid] = entry.subarray(0, tab).toString("ascii").split(" ");
|
|
73
|
+
if (!(["100644", "100755"].includes(mode)) || type !== "blob" || !/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/i.test(oid || "")) throw new Error("base guard is not a regular Git blob");
|
|
74
|
+
const guardBytes = git(["cat-file", "blob", oid]);
|
|
75
|
+
const digest = crypto.createHash("sha256").update(guardBytes).digest("hex");
|
|
76
|
+
console.log("Base guard blob: " + oid + "; SHA-256: " + digest);
|
|
77
|
+
const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "harness-doc-governance-"));
|
|
78
|
+
const tempGuard = path.join(tempDir, "doc-governance-guard.js");
|
|
79
|
+
try {
|
|
80
|
+
fs.writeFileSync(tempGuard, guardBytes, { mode: 0o600 });
|
|
81
|
+
const result = spawnSync(process.execPath, [tempGuard, "--repo", process.cwd(), "--base", base, "--candidate", candidate], { encoding: "buffer", maxBuffer: 64 * 1024 * 1024, env: { ...process.env, GIT_CONFIG_NOSYSTEM: "1", GIT_NO_REPLACE_OBJECTS: "1", GIT_PAGER: "cat", GIT_TERMINAL_PROMPT: "0" } });
|
|
82
|
+
if (result.error) throw result.error;
|
|
83
|
+
if (result.stdout) process.stdout.write(result.stdout);
|
|
84
|
+
if (result.stderr) process.stderr.write(result.stderr);
|
|
85
|
+
process.exitCode = result.status === null ? 1 : result.status;
|
|
86
|
+
} finally {
|
|
87
|
+
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
88
|
+
}
|
|
89
|
+
} catch (error) {
|
|
90
|
+
console.error("Document governance guard setup failed: " + (error.message || String(error)));
|
|
91
|
+
process.exitCode = 1;
|
|
92
|
+
}
|
|
93
|
+
})();'
|
|
12
94
|
self-regression:
|
|
13
95
|
strategy:
|
|
14
96
|
fail-fast: false
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.43.1](https://github.com/dyphn1/Harness-everything/compare/v0.43.0...v0.43.1) (2026-10-27)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
* **governance:** let the guard pass governed content revisions ([31af03d](https://github.com/dyphn1/Harness-everything/commit/31af03d02475e150210cc6b5ba0e5b90fea0163e))
|
|
10
|
+
|
|
11
|
+
## [Unreleased]
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- **doc-governance:** allow regular governed-content revisions while retaining review for structural, policy, trust-surface, fixture, and derived-output changes; run the guard in its own CI job.
|
|
16
|
+
|
|
17
|
+
## [0.43.0](https://github.com/dyphn1/Harness-everything/compare/v0.42.2...v0.43.0) (2026-10-27)
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* **doc-lifecycle:** add base-owned governance guard with tamper controls ([f195bc5](https://github.com/dyphn1/Harness-everything/commit/f195bc5fc5374e52cae1df69f3b9f157a21fa06c))
|
|
22
|
+
* **doc-lifecycle:** inventory tracked documentation ([9aaa86f](https://github.com/dyphn1/Harness-everything/commit/9aaa86fe3e2fc54efe092fe717747ae51ac1cca9))
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* **doc-lifecycle:** require review for fixture and governed content drift ([40f8ab0](https://github.com/dyphn1/Harness-everything/commit/40f8ab0e738432ea15d3ecf9c9c20aa99a8d46ff))
|
|
27
|
+
|
|
5
28
|
## [0.42.2](https://github.com/dyphn1/Harness-everything/compare/v0.42.1...v0.42.2) (2026-10-26)
|
|
6
29
|
|
|
7
30
|
### Bug Fixes
|