ctxr-cli 0.4.1 → 0.6.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/dist/adapter.d.ts +0 -1
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js.map +1 -1
- package/dist/adapters/builtin/index.d.ts.map +1 -1
- package/dist/adapters/builtin/index.js +2 -2
- package/dist/adapters/builtin/index.js.map +1 -1
- package/dist/adapters/harness/claude-code.d.ts.map +1 -1
- package/dist/adapters/harness/claude-code.js +30 -14
- package/dist/adapters/harness/claude-code.js.map +1 -1
- package/dist/adapters/harness/hermes-agent.d.ts +9 -0
- package/dist/adapters/harness/hermes-agent.d.ts.map +1 -0
- package/dist/adapters/harness/hermes-agent.js +13 -0
- package/dist/adapters/harness/hermes-agent.js.map +1 -0
- package/dist/adapters/types.d.ts +39 -18
- package/dist/adapters/types.d.ts.map +1 -1
- package/dist/adapters/types.js +3 -3
- package/dist/adapters/types.js.map +1 -1
- package/dist/commands/adapters-generate.d.ts +4 -2
- package/dist/commands/adapters-generate.d.ts.map +1 -1
- package/dist/commands/adapters-generate.js +14 -6
- package/dist/commands/adapters-generate.js.map +1 -1
- package/dist/commands/archive.d.ts +4 -2
- package/dist/commands/archive.d.ts.map +1 -1
- package/dist/commands/archive.js +5 -3
- package/dist/commands/archive.js.map +1 -1
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +1 -6
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/init.d.ts +2 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +132 -18
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/publish-check.d.ts +23 -0
- package/dist/commands/publish-check.d.ts.map +1 -0
- package/dist/commands/publish-check.js +116 -0
- package/dist/commands/publish-check.js.map +1 -0
- package/dist/commands/publish-gather.d.ts +37 -0
- package/dist/commands/publish-gather.d.ts.map +1 -0
- package/dist/commands/publish-gather.js +92 -0
- package/dist/commands/publish-gather.js.map +1 -0
- package/dist/commands/publish-new.d.ts +18 -0
- package/dist/commands/publish-new.d.ts.map +1 -0
- package/dist/commands/publish-new.js +86 -0
- package/dist/commands/publish-new.js.map +1 -0
- package/dist/commands/rollup-write.d.ts.map +1 -1
- package/dist/commands/rollup-write.js +8 -0
- package/dist/commands/rollup-write.js.map +1 -1
- package/dist/commands/serve.d.ts +32 -0
- package/dist/commands/serve.d.ts.map +1 -0
- package/dist/commands/serve.js +170 -0
- package/dist/commands/serve.js.map +1 -0
- package/dist/commands/update.js +3 -3
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/verify.d.ts +9 -2
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +46 -23
- package/dist/commands/verify.js.map +1 -1
- package/dist/config/defaults.d.ts +53 -15
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +54 -19
- package/dist/config/defaults.js.map +1 -1
- package/dist/config/schema.d.ts +49 -12
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +115 -23
- package/dist/config/schema.js.map +1 -1
- package/dist/core/agents-doc.d.ts +63 -12
- package/dist/core/agents-doc.d.ts.map +1 -1
- package/dist/core/agents-doc.js +191 -41
- package/dist/core/agents-doc.js.map +1 -1
- package/dist/core/browse/link-resolver.d.ts +12 -0
- package/dist/core/browse/link-resolver.d.ts.map +1 -0
- package/dist/core/browse/link-resolver.js +12 -0
- package/dist/core/browse/link-resolver.js.map +1 -0
- package/dist/core/browse/render.d.ts +5 -0
- package/dist/core/browse/render.d.ts.map +1 -0
- package/dist/core/browse/render.js +66 -0
- package/dist/core/browse/render.js.map +1 -0
- package/dist/core/browse/routes.d.ts +31 -0
- package/dist/core/browse/routes.d.ts.map +1 -0
- package/dist/core/browse/routes.js +56 -0
- package/dist/core/browse/routes.js.map +1 -0
- package/dist/core/browse/templates.d.ts +4 -0
- package/dist/core/browse/templates.d.ts.map +1 -0
- package/dist/core/browse/templates.js +26 -0
- package/dist/core/browse/templates.js.map +1 -0
- package/dist/core/checks/harness-portability-checks.d.ts +12 -0
- package/dist/core/checks/harness-portability-checks.d.ts.map +1 -0
- package/dist/core/checks/harness-portability-checks.js +39 -0
- package/dist/core/checks/harness-portability-checks.js.map +1 -0
- package/dist/core/checks/integrity-checks.d.ts +43 -3
- package/dist/core/checks/integrity-checks.d.ts.map +1 -1
- package/dist/core/checks/integrity-checks.js +191 -13
- package/dist/core/checks/integrity-checks.js.map +1 -1
- package/dist/core/checks/manifest.d.ts.map +1 -1
- package/dist/core/checks/manifest.js +2 -0
- package/dist/core/checks/manifest.js.map +1 -1
- package/dist/core/checks/organize-checks.d.ts +21 -1
- package/dist/core/checks/organize-checks.d.ts.map +1 -1
- package/dist/core/checks/organize-checks.js +64 -4
- package/dist/core/checks/organize-checks.js.map +1 -1
- package/dist/core/convention-doc.d.ts +32 -0
- package/dist/core/convention-doc.d.ts.map +1 -0
- package/dist/core/convention-doc.js +137 -0
- package/dist/core/convention-doc.js.map +1 -0
- package/dist/core/conventions.d.ts +25 -5
- package/dist/core/conventions.d.ts.map +1 -1
- package/dist/core/conventions.js +65 -3
- package/dist/core/conventions.js.map +1 -1
- package/dist/core/disclosure/model.d.ts +11 -0
- package/dist/core/disclosure/model.d.ts.map +1 -1
- package/dist/core/disclosure/model.js +24 -0
- package/dist/core/disclosure/model.js.map +1 -1
- package/dist/core/errors.d.ts +27 -41
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js +76 -119
- package/dist/core/errors.js.map +1 -1
- package/dist/core/fs/fenced-region.d.ts +38 -0
- package/dist/core/fs/fenced-region.d.ts.map +1 -1
- package/dist/core/fs/fenced-region.js +88 -2
- package/dist/core/fs/fenced-region.js.map +1 -1
- package/dist/core/git/repo.d.ts +0 -6
- package/dist/core/git/repo.d.ts.map +1 -1
- package/dist/core/git/repo.js +0 -13
- package/dist/core/git/repo.js.map +1 -1
- package/dist/core/git/worktree.d.ts +4 -7
- package/dist/core/git/worktree.d.ts.map +1 -1
- package/dist/core/git/worktree.js +4 -10
- package/dist/core/git/worktree.js.map +1 -1
- package/dist/core/graph/model.d.ts +14 -0
- package/dist/core/graph/model.d.ts.map +1 -1
- package/dist/core/graph/model.js +30 -14
- package/dist/core/graph/model.js.map +1 -1
- package/dist/core/harness/bridge.d.ts +30 -0
- package/dist/core/harness/bridge.d.ts.map +1 -0
- package/dist/core/harness/bridge.js +178 -0
- package/dist/core/harness/bridge.js.map +1 -0
- package/dist/core/json-config-merge.d.ts.map +1 -1
- package/dist/core/json-config-merge.js +30 -7
- package/dist/core/json-config-merge.js.map +1 -1
- package/dist/core/migrations/archive-destination-from-taxonomy.d.ts +35 -0
- package/dist/core/migrations/archive-destination-from-taxonomy.d.ts.map +1 -0
- package/dist/core/migrations/archive-destination-from-taxonomy.js +109 -0
- package/dist/core/migrations/archive-destination-from-taxonomy.js.map +1 -0
- package/dist/core/migrations/drop-forge-and-workspaces-external.d.ts +19 -0
- package/dist/core/migrations/drop-forge-and-workspaces-external.d.ts.map +1 -0
- package/dist/core/migrations/drop-forge-and-workspaces-external.js +49 -0
- package/dist/core/migrations/drop-forge-and-workspaces-external.js.map +1 -0
- package/dist/core/migrations/registry.d.ts.map +1 -1
- package/dist/core/migrations/registry.js +10 -1
- package/dist/core/migrations/registry.js.map +1 -1
- package/dist/core/migrations/rename-conventions-path.d.ts +26 -0
- package/dist/core/migrations/rename-conventions-path.d.ts.map +1 -0
- package/dist/core/migrations/rename-conventions-path.js +86 -0
- package/dist/core/migrations/rename-conventions-path.js.map +1 -0
- package/dist/core/notes/list.d.ts.map +1 -1
- package/dist/core/notes/list.js +7 -3
- package/dist/core/notes/list.js.map +1 -1
- package/dist/core/publish/script-check.d.ts +12 -0
- package/dist/core/publish/script-check.d.ts.map +1 -0
- package/dist/core/publish/script-check.js +39 -0
- package/dist/core/publish/script-check.js.map +1 -0
- package/dist/core/reconcile.d.ts +3 -0
- package/dist/core/reconcile.d.ts.map +1 -1
- package/dist/core/reconcile.js +43 -6
- package/dist/core/reconcile.js.map +1 -1
- package/dist/core/rollup.d.ts +2 -2
- package/dist/core/rollup.d.ts.map +1 -1
- package/dist/core/rollup.js +24 -3
- package/dist/core/rollup.js.map +1 -1
- package/dist/core/session.d.ts +9 -9
- package/dist/core/session.js +9 -9
- package/dist/core/skills.d.ts +36 -0
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +154 -29
- package/dist/core/skills.js.map +1 -1
- package/dist/core/write-lifecycle/path-gate.d.ts.map +1 -1
- package/dist/core/write-lifecycle/path-gate.js +5 -3
- package/dist/core/write-lifecycle/path-gate.js.map +1 -1
- package/dist/prompt/inquirer-prompter.d.ts.map +1 -1
- package/dist/prompt/inquirer-prompter.js +11 -1
- package/dist/prompt/inquirer-prompter.js.map +1 -1
- package/dist/prompt/prompter.d.ts +16 -0
- package/dist/prompt/prompter.d.ts.map +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +61 -55
- package/dist/run.js.map +1 -1
- package/dist/taxonomy/profiles.d.ts +11 -0
- package/dist/taxonomy/profiles.d.ts.map +1 -1
- package/dist/taxonomy/profiles.js +1 -0
- package/dist/taxonomy/profiles.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -1
- package/templates/agents/canonical.md +2 -8
- package/templates/agents/{store-conventions.md → conventions.md} +2 -4
- package/templates/agents/mission.md +5 -0
- package/templates/conventions/baseline-conventions.md +60 -0
- package/templates/conventions/house-conventions-seed.md +34 -0
- package/templates/hooks/pre-push.sh +1 -1
- package/templates/serve/shell.html +15 -0
- package/templates/serve/style.css +88 -0
- package/templates/skills/ctxr-land.md +32 -18
- package/templates/skills/ctxr-organize-audit.md +1 -1
- package/templates/skills/ctxr-publish.md +79 -0
- package/templates/skills/ctxr-session-capture.md +44 -1
- package/templates/skills/ctxr-session-lifecycle.md +20 -1
- package/templates/skills/ctxr-submit.md +15 -11
- package/templates/vendor/frontend-design/LICENSE.txt +177 -0
- package/templates/vendor/frontend-design/SKILL.md +55 -0
- package/templates/vendor/frontend-design/provenance.json +7 -0
- package/dist/adapters/forge/github.d.ts +0 -12
- package/dist/adapters/forge/github.d.ts.map +0 -1
- package/dist/adapters/forge/github.js +0 -76
- package/dist/adapters/forge/github.js.map +0 -1
- package/dist/adapters/forge/types.d.ts +0 -46
- package/dist/adapters/forge/types.d.ts.map +0 -1
- package/dist/adapters/forge/types.js +0 -2
- package/dist/adapters/forge/types.js.map +0 -1
- package/dist/commands/session-abandon.d.ts +0 -13
- package/dist/commands/session-abandon.d.ts.map +0 -1
- package/dist/commands/session-abandon.js +0 -22
- package/dist/commands/session-abandon.js.map +0 -1
- package/dist/commands/session-land.d.ts +0 -45
- package/dist/commands/session-land.d.ts.map +0 -1
- package/dist/commands/session-land.js +0 -171
- package/dist/commands/session-land.js.map +0 -1
- package/dist/commands/session-reap.d.ts +0 -22
- package/dist/commands/session-reap.d.ts.map +0 -1
- package/dist/commands/session-reap.js +0 -52
- package/dist/commands/session-reap.js.map +0 -1
- package/dist/commands/session-submit.d.ts +0 -29
- package/dist/commands/session-submit.d.ts.map +0 -1
- package/dist/commands/session-submit.js +0 -72
- package/dist/commands/session-submit.js.map +0 -1
- package/templates/agents/store-conventions-empty.md +0 -7
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { readdir } from 'node:fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { catalogSectionsFor, sectionFileName } from '../catalog/model.js';
|
|
4
|
+
import { graphDocumentPath } from '../graph/persist.js';
|
|
5
|
+
import { listNotes } from '../notes/list.js';
|
|
6
|
+
async function walkFiles(root, relative = '') {
|
|
7
|
+
let entries;
|
|
8
|
+
try {
|
|
9
|
+
entries = await readdir(path.join(root, relative), { withFileTypes: true });
|
|
10
|
+
}
|
|
11
|
+
catch (err) {
|
|
12
|
+
if (err.code === 'ENOENT')
|
|
13
|
+
return [];
|
|
14
|
+
throw err;
|
|
15
|
+
}
|
|
16
|
+
const files = [];
|
|
17
|
+
for (const entry of entries) {
|
|
18
|
+
const entryRelative = relative ? `${relative}/${entry.name}` : entry.name;
|
|
19
|
+
if (entry.isDirectory()) {
|
|
20
|
+
files.push(...(await walkFiles(root, entryRelative)));
|
|
21
|
+
}
|
|
22
|
+
else if (entry.isFile()) {
|
|
23
|
+
files.push({ urlPath: entryRelative, absolutePath: path.join(root, entryRelative) });
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return files;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* local-browsing-surface design.md D2: built fresh from the store's own
|
|
30
|
+
* enumeration on every call, never cached — so a path outside every
|
|
31
|
+
* configured location is absent from the table by construction, and a
|
|
32
|
+
* request for it is an ordinary lookup miss rather than a check that could
|
|
33
|
+
* be forgotten on one route and not another.
|
|
34
|
+
*/
|
|
35
|
+
export async function buildRouteTable(store) {
|
|
36
|
+
const noteList = await listNotes(store.root, store.config);
|
|
37
|
+
const notes = new Map(noteList.map((note) => [note.path, note]));
|
|
38
|
+
const catalog = new Map(catalogSectionsFor(store.config).map((section) => [
|
|
39
|
+
section.id,
|
|
40
|
+
{ id: section.id, absolutePath: path.join(store.root, store.config.catalog.path, sectionFileName(section)) },
|
|
41
|
+
]));
|
|
42
|
+
const publishRoot = path.join(store.root, store.config.publish.path);
|
|
43
|
+
const publishFiles = new Map((await walkFiles(publishRoot)).map((file) => [file.urlPath, file]));
|
|
44
|
+
return { notes, catalog, graphDocumentPath: graphDocumentPath(store), publishFiles };
|
|
45
|
+
}
|
|
46
|
+
/** The distinct top-level page folders under the publish route, for the index page. */
|
|
47
|
+
export function publishSlugs(table) {
|
|
48
|
+
const slugs = new Set();
|
|
49
|
+
for (const urlPath of table.publishFiles.keys()) {
|
|
50
|
+
const slug = urlPath.split('/')[0];
|
|
51
|
+
if (slug)
|
|
52
|
+
slugs.add(slug);
|
|
53
|
+
}
|
|
54
|
+
return [...slugs].sort();
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=routes.js.map
|
|
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AAE,YAAY,EAAE,CAAC;AACvF,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,YAAY,CAAC,KAAiB;IAC5C,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,KAAK,MAAM,OAAO,IAAI,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC;QAChD,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACnC,IAAI,IAAI;YAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IACD,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Wraps rendered body HTML in the shared page shell, substituting both slots exactly once each. */
|
|
2
|
+
export declare function renderShell(title: string, bodyHtml: string): Promise<string>;
|
|
3
|
+
export declare function readStylesheet(): Promise<string>;
|
|
4
|
+
//# sourceMappingURL=templates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/core/browse/templates.ts"],"names":[],"mappings":"AAoBA,oGAAoG;AACpG,wBAAsB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGlF;AAED,wBAAsB,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAEtD"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
/**
|
|
5
|
+
* local-browsing-surface design.md D7: shell.html/style.css are markup and
|
|
6
|
+
* CSS, not markdown fragments meant for splicing, so they don't fit
|
|
7
|
+
* `packagedTemplate()`'s contract (strips exactly one trailing newline from
|
|
8
|
+
* a `.md` file, for `substituteBlock`'s line-array callers). This mirrors
|
|
9
|
+
* `hooks.ts`'s own small async reader for the same reason: a different file
|
|
10
|
+
* type needs a different loading contract, not a stretched shared one.
|
|
11
|
+
*/
|
|
12
|
+
function templatesDir() {
|
|
13
|
+
return fileURLToPath(new URL('../../../templates/serve', import.meta.url));
|
|
14
|
+
}
|
|
15
|
+
async function readServeTemplate(fileName) {
|
|
16
|
+
return readFile(path.join(templatesDir(), fileName), 'utf8');
|
|
17
|
+
}
|
|
18
|
+
/** Wraps rendered body HTML in the shared page shell, substituting both slots exactly once each. */
|
|
19
|
+
export async function renderShell(title, bodyHtml) {
|
|
20
|
+
const shell = await readServeTemplate('shell.html');
|
|
21
|
+
return shell.replace('{{TITLE}}', title).replace('{{BODY}}', bodyHtml);
|
|
22
|
+
}
|
|
23
|
+
export async function readStylesheet() {
|
|
24
|
+
return readServeTemplate('style.css');
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=templates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../../src/core/browse/templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;;;;GAOG;AACH,SAAS,YAAY;IACnB,OAAO,aAAa,CAAC,IAAI,GAAG,CAAC,0BAA0B,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7E,CAAC;AAED,KAAK,UAAU,iBAAiB,CAAC,QAAgB;IAC/C,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC;AAC/D,CAAC;AAED,oGAAoG;AACpG,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,KAAa,EAAE,QAAgB;IAC/D,MAAM,KAAK,GAAG,MAAM,iBAAiB,CAAC,YAAY,CAAC,CAAC;IACpD,OAAO,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;AACzE,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc;IAClC,OAAO,iBAAiB,CAAC,WAAW,CAAC,CAAC;AACxC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* compose-store-guidance-documents design.md D6: inlining every convention
|
|
3
|
+
* file's full body into AGENTS.md's "Store conventions" section
|
|
4
|
+
* (inline-conventions-and-mission) removed the natural size bound an index
|
|
5
|
+
* provided — an unbounded custom part could make AGENTS.md unwieldy. A
|
|
6
|
+
* configured ceiling (`harness.convention_max_bytes`, defaulting to
|
|
7
|
+
* `DEFAULT_CONVENTION_MAX_BYTES`) fails doctor loud rather than silently
|
|
8
|
+
* truncating content the inlining exists to surface.
|
|
9
|
+
*/
|
|
10
|
+
export declare const conventionsSectionSizeCheck: import("./types.js").CheckDefinition;
|
|
11
|
+
export declare const HARNESS_PORTABILITY_CHECKS: import("./types.js").CheckDefinition[];
|
|
12
|
+
//# sourceMappingURL=harness-portability-checks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harness-portability-checks.d.ts","sourceRoot":"","sources":["../../../src/core/checks/harness-portability-checks.ts"],"names":[],"mappings":"AAMA;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B,sCAuBtC,CAAC;AAEH,eAAO,MAAM,0BAA0B,wCAAgC,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { DEFAULT_CONVENTION_MAX_BYTES } from '../../config/defaults.js';
|
|
2
|
+
import { AGENTS_MD_CONVENTIONS_FENCE, agentsMdPath } from '../agents-doc.js';
|
|
3
|
+
import { readFencedRegionFromFile } from '../fs/fenced-region.js';
|
|
4
|
+
import { defineCheck } from './types.js';
|
|
5
|
+
/**
|
|
6
|
+
* compose-store-guidance-documents design.md D6: inlining every convention
|
|
7
|
+
* file's full body into AGENTS.md's "Store conventions" section
|
|
8
|
+
* (inline-conventions-and-mission) removed the natural size bound an index
|
|
9
|
+
* provided — an unbounded custom part could make AGENTS.md unwieldy. A
|
|
10
|
+
* configured ceiling (`harness.convention_max_bytes`, defaulting to
|
|
11
|
+
* `DEFAULT_CONVENTION_MAX_BYTES`) fails doctor loud rather than silently
|
|
12
|
+
* truncating content the inlining exists to surface.
|
|
13
|
+
*/
|
|
14
|
+
export const conventionsSectionSizeCheck = defineCheck({
|
|
15
|
+
id: 'harness_portability.conventions_section_size',
|
|
16
|
+
title: "AGENTS.md's inlined \"Store conventions\" section stays within its configured size budget",
|
|
17
|
+
severity: 'invariant',
|
|
18
|
+
capability: 'harness-portability',
|
|
19
|
+
scopes: ['store'],
|
|
20
|
+
async run(ctx) {
|
|
21
|
+
const region = await readFencedRegionFromFile(agentsMdPath(ctx.storeRoot), AGENTS_MD_CONVENTIONS_FENCE);
|
|
22
|
+
if (region.length === 0) {
|
|
23
|
+
return { status: 'skip', skipReason: 'AGENTS.md has not been generated yet — run `ctxr update`', findings: [] };
|
|
24
|
+
}
|
|
25
|
+
const size = Buffer.byteLength(region.join('\n'), 'utf8');
|
|
26
|
+
const budget = ctx.config.harness.convention_max_bytes ?? DEFAULT_CONVENTION_MAX_BYTES;
|
|
27
|
+
if (size <= budget)
|
|
28
|
+
return { status: 'pass', findings: [] };
|
|
29
|
+
const finding = {
|
|
30
|
+
code: 'harness_portability.conventions_section_size_exceeded',
|
|
31
|
+
severity: 'error',
|
|
32
|
+
message: `AGENTS.md's "Store conventions" section is ${size} bytes, exceeding the configured budget of ${budget}. Trim a convention file's content or raise \`harness.convention_max_bytes\`.`,
|
|
33
|
+
details: { size, budget },
|
|
34
|
+
};
|
|
35
|
+
return { status: 'fail', findings: [finding] };
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
export const HARNESS_PORTABILITY_CHECKS = [conventionsSectionSizeCheck];
|
|
39
|
+
//# sourceMappingURL=harness-portability-checks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harness-portability-checks.js","sourceRoot":"","sources":["../../../src/core/checks/harness-portability-checks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,2BAA2B,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAE7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,WAAW,CAAC;IACrD,EAAE,EAAE,8CAA8C;IAClD,KAAK,EAAE,2FAA2F;IAClG,QAAQ,EAAE,WAAW;IACrB,UAAU,EAAE,qBAAqB;IACjC,MAAM,EAAE,CAAC,OAAO,CAAC;IACjB,KAAK,CAAC,GAAG,CAAC,GAAG;QACX,MAAM,MAAM,GAAG,MAAM,wBAAwB,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,2BAA2B,CAAC,CAAC;QACxG,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,0DAA0D,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;QAClH,CAAC;QACD,MAAM,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;QAC1D,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,oBAAoB,IAAI,4BAA4B,CAAC;QACvF,IAAI,IAAI,IAAI,MAAM;YAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;QAE5D,MAAM,OAAO,GAAY;YACvB,IAAI,EAAE,uDAAuD;YAC7D,QAAQ,EAAE,OAAO;YACjB,OAAO,EAAE,8CAA8C,IAAI,8CAA8C,MAAM,+EAA+E;YAC9L,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;SAC1B,CAAC;QACF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IACjD,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,2BAA2B,CAAC,CAAC"}
|
|
@@ -8,17 +8,33 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export declare const derivedArtifactStalenessCheck: import("./types.js").CheckDefinition;
|
|
10
10
|
/**
|
|
11
|
-
* store-integrity spec: "
|
|
11
|
+
* store-integrity spec: "ambiguous link resolution... (per context-retrieval)." A
|
|
12
12
|
* genuine identity collision is NOT re-checked here — buildGraphFromNotes
|
|
13
13
|
* refuses to persist a graph that has one (core/graph/model.ts), so a
|
|
14
14
|
* persisted graph.json is proof by construction that none exists; there is
|
|
15
15
|
* nothing for a doctor check to find after the fact.
|
|
16
|
+
*
|
|
17
|
+
* `graph.dangling` covers two reasons (core/graph/model.ts: DanglingReason).
|
|
18
|
+
* They're split by owner, not shared: a link that resolves to no note at all
|
|
19
|
+
* (`not_found`) can't be told apart from a healthy forward reference, so it's
|
|
20
|
+
* lint's alone (organize-checks.ts:brokenLinksCheck, observation, code
|
|
21
|
+
* organize.broken_link). A link that resolves ambiguously, to more than one
|
|
22
|
+
* note (`ambiguous`), is always a mechanical defect with a fix (alias
|
|
23
|
+
* syntax) — never a legitimate "leave it" case — so it's this check's alone.
|
|
16
24
|
*/
|
|
17
|
-
export declare const
|
|
25
|
+
export declare const graphAmbiguousLinksCheck: import("./types.js").CheckDefinition;
|
|
18
26
|
/** store-integrity spec: "schema version currency (per store-lifecycle)." */
|
|
19
27
|
export declare const schemaVersionCurrencyCheck: import("./types.js").CheckDefinition;
|
|
20
28
|
/** store-integrity spec: "adapter compatibility (per adapters)." */
|
|
21
29
|
export declare const adapterCompatibilityCheck: import("./types.js").CheckDefinition;
|
|
30
|
+
/**
|
|
31
|
+
* harness-portability spec (vendored-craft-skills): "a broken bridge is
|
|
32
|
+
* detected and repaired" — the read-only half. A harness whose effective
|
|
33
|
+
* directory already equals the configured skills path has no bridge to
|
|
34
|
+
* check (same as `bridgeHarnessSkills` skipping it, per the adapters spec's
|
|
35
|
+
* "no bridge is created" scenario).
|
|
36
|
+
*/
|
|
37
|
+
export declare const harnessSkillsBridgeCheck: import("./types.js").CheckDefinition;
|
|
22
38
|
/**
|
|
23
39
|
* harness-portability spec: "A harness-specific entry file only imports" —
|
|
24
40
|
* SHALL contain nothing beyond the adapter's own managed import plus that
|
|
@@ -29,11 +45,35 @@ export declare const adapterCompatibilityCheck: import("./types.js").CheckDefini
|
|
|
29
45
|
* copy-pasted into the entry file outside its managed fence — the way an
|
|
30
46
|
* operator reaching for "where do I put a Claude-only note" might otherwise
|
|
31
47
|
* duplicate a whole AGENTS.md section into CLAUDE.md instead of writing a
|
|
32
|
-
* harness-specific extra beneath the import (see the `
|
|
48
|
+
* harness-specific extra beneath the import (see the `conventions`
|
|
33
49
|
* fence's own guidance in `agents-doc.ts`).
|
|
34
50
|
*/
|
|
35
51
|
export declare const harnessEntryNoDuplicateConventionTextCheck: import("./types.js").CheckDefinition;
|
|
36
52
|
/** store-integrity spec: "no unrecognized top-level config keys." */
|
|
37
53
|
export declare const noUnrecognizedConfigKeysCheck: import("./types.js").CheckDefinition;
|
|
54
|
+
/**
|
|
55
|
+
* harness-portability spec (inline-conventions-and-mission): "The entry
|
|
56
|
+
* document's inlined content matches its sources" — `AGENTS.md`'s inlined
|
|
57
|
+
* conventions/mission sections are derived content (rendered from
|
|
58
|
+
* `.contexture/conventions/*.md` and the configured mission path), so
|
|
59
|
+
* editing a source directly without regenerating `AGENTS.md` (e.g. bypassing
|
|
60
|
+
* `ctxr update`) leaves it silently stale. Reuses `checkAgentsMdDrift`, the
|
|
61
|
+
* same re-render-and-diff `ctxr verify --portable` uses, so the two commands
|
|
62
|
+
* can never disagree about whether a store is in sync.
|
|
63
|
+
*/
|
|
64
|
+
export declare const agentsMdInlinedContentCurrentCheck: import("./types.js").CheckDefinition;
|
|
65
|
+
/**
|
|
66
|
+
* write-lifecycle spec / harness-portability spec (inline-conventions-and-mission):
|
|
67
|
+
* "A commit that would leave the entry document stale is refused." The
|
|
68
|
+
* store-scope drift check above reads the working tree, which is the wrong
|
|
69
|
+
* source of truth for a pre-commit hook — an operator can edit a convention
|
|
70
|
+
* file, forget to run `ctxr update`, and `git add` only the convention file;
|
|
71
|
+
* the working tree would then have a regenerated AGENTS.md sitting right
|
|
72
|
+
* next to it only if they happened to run `ctxr update` first, which is
|
|
73
|
+
* exactly the step this check exists to enforce. So this reads STAGED
|
|
74
|
+
* content for any file this commit touches (falling back to disk for files
|
|
75
|
+
* the commit doesn't touch) and re-renders against that view instead.
|
|
76
|
+
*/
|
|
77
|
+
export declare const stagedAgentsMdInlinedContentCurrentCheck: import("./types.js").CheckDefinition;
|
|
38
78
|
export declare const INTEGRITY_CHECKS: import("./types.js").CheckDefinition[];
|
|
39
79
|
//# sourceMappingURL=integrity-checks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrity-checks.d.ts","sourceRoot":"","sources":["../../../src/core/checks/integrity-checks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"integrity-checks.d.ts","sourceRoot":"","sources":["../../../src/core/checks/integrity-checks.ts"],"names":[],"mappings":"AAkCA;;;;;;;GAOG;AACH,eAAO,MAAM,6BAA6B,sCAkCxC,CAAC;AAEH;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,wBAAwB,sCAsBnC,CAAC;AAEH,6EAA6E;AAC7E,eAAO,MAAM,0BAA0B,sCAsBrC,CAAC;AAEH,oEAAoE;AACpE,eAAO,MAAM,yBAAyB,sCAuBpC,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,sCAwBnC,CAAC;AAYH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,0CAA0C,sCAiDrD,CAAC;AAEH,qEAAqE;AACrE,eAAO,MAAM,6BAA6B,sCAgBxC,CAAC;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,kCAAkC,sCA4B7C,CAAC;AAqBH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,wCAAwC,sCAiEnD,CAAC;AAEH,eAAO,MAAM,gBAAgB,wCAU5B,CAAC"}
|
|
@@ -2,10 +2,12 @@ import { readFile } from 'node:fs/promises';
|
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { configuredAdapters, resolveAdapter } from '../../adapters/registry.js';
|
|
4
4
|
import { StoreConfigSchema, SUPPORTED_SCHEMA_VERSION } from '../../config/schema.js';
|
|
5
|
-
import { agentsMdPath } from '../agents-doc.js';
|
|
5
|
+
import { AGENTS_MD_CONVENTIONS_FENCE, AGENTS_MD_MISSION_FENCE, agentsMdPath, checkAgentsMdDrift, renderConventionsSection, renderMissionSection, } from '../agents-doc.js';
|
|
6
6
|
import { checkCatalogStale } from '../catalog/build.js';
|
|
7
|
-
import {
|
|
7
|
+
import { extractDocMetadata, scanConventions } from '../conventions.js';
|
|
8
|
+
import { readFencedRegion, removeFencedRegion } from '../fs/fenced-region.js';
|
|
8
9
|
import { buildGraphFromNotes, graphBuildOptions } from '../graph/model.js';
|
|
10
|
+
import { effectiveSkillsDir, isBridgeBroken } from '../harness/bridge.js';
|
|
9
11
|
import { harnessEntryFence } from '../markers.js';
|
|
10
12
|
import { defineCheck } from './types.js';
|
|
11
13
|
/**
|
|
@@ -60,17 +62,23 @@ export const derivedArtifactStalenessCheck = defineCheck({
|
|
|
60
62
|
},
|
|
61
63
|
});
|
|
62
64
|
/**
|
|
63
|
-
* store-integrity spec: "
|
|
65
|
+
* store-integrity spec: "ambiguous link resolution... (per context-retrieval)." A
|
|
64
66
|
* genuine identity collision is NOT re-checked here — buildGraphFromNotes
|
|
65
67
|
* refuses to persist a graph that has one (core/graph/model.ts), so a
|
|
66
68
|
* persisted graph.json is proof by construction that none exists; there is
|
|
67
69
|
* nothing for a doctor check to find after the fact.
|
|
70
|
+
*
|
|
71
|
+
* `graph.dangling` covers two reasons (core/graph/model.ts: DanglingReason).
|
|
72
|
+
* They're split by owner, not shared: a link that resolves to no note at all
|
|
73
|
+
* (`not_found`) can't be told apart from a healthy forward reference, so it's
|
|
74
|
+
* lint's alone (organize-checks.ts:brokenLinksCheck, observation, code
|
|
75
|
+
* organize.broken_link). A link that resolves ambiguously, to more than one
|
|
76
|
+
* note (`ambiguous`), is always a mechanical defect with a fix (alias
|
|
77
|
+
* syntax) — never a legitimate "leave it" case — so it's this check's alone.
|
|
68
78
|
*/
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
id: 'graph.dangling_links',
|
|
73
|
-
title: 'The graph has no dangling links',
|
|
79
|
+
export const graphAmbiguousLinksCheck = defineCheck({
|
|
80
|
+
id: 'graph.ambiguous_links',
|
|
81
|
+
title: 'The graph has no ambiguous links',
|
|
74
82
|
severity: 'invariant',
|
|
75
83
|
capability: 'context-retrieval',
|
|
76
84
|
scopes: ['store'],
|
|
@@ -79,10 +87,12 @@ export const graphDanglingLinksCheck = defineCheck({
|
|
|
79
87
|
if (!graph) {
|
|
80
88
|
return { status: 'skip', skipReason: 'graph has not been built yet — run `ctxr graph build`', findings: [] };
|
|
81
89
|
}
|
|
82
|
-
const findings = graph.dangling
|
|
83
|
-
|
|
90
|
+
const findings = graph.dangling
|
|
91
|
+
.filter((d) => d.reason === 'ambiguous')
|
|
92
|
+
.map((d) => ({
|
|
93
|
+
code: 'graph.ambiguous_link',
|
|
84
94
|
severity: 'error',
|
|
85
|
-
message: `"${d.from}" links to "${d.target}", which is
|
|
95
|
+
message: `"${d.from}" links to "${d.target}", which is ambiguous.`,
|
|
86
96
|
subject: d.from,
|
|
87
97
|
details: { target: d.target, reason: d.reason },
|
|
88
98
|
}));
|
|
@@ -139,6 +149,39 @@ export const adapterCompatibilityCheck = defineCheck({
|
|
|
139
149
|
return { status: findings.length > 0 ? 'fail' : 'pass', findings };
|
|
140
150
|
},
|
|
141
151
|
});
|
|
152
|
+
/**
|
|
153
|
+
* harness-portability spec (vendored-craft-skills): "a broken bridge is
|
|
154
|
+
* detected and repaired" — the read-only half. A harness whose effective
|
|
155
|
+
* directory already equals the configured skills path has no bridge to
|
|
156
|
+
* check (same as `bridgeHarnessSkills` skipping it, per the adapters spec's
|
|
157
|
+
* "no bridge is created" scenario).
|
|
158
|
+
*/
|
|
159
|
+
export const harnessSkillsBridgeCheck = defineCheck({
|
|
160
|
+
id: 'harness_portability.skills_bridge',
|
|
161
|
+
title: 'Every declared harness\'s skills directory resolves to the canonical skills path',
|
|
162
|
+
severity: 'invariant',
|
|
163
|
+
capability: 'harness-portability',
|
|
164
|
+
scopes: ['store'],
|
|
165
|
+
async run(ctx) {
|
|
166
|
+
const canonical = ctx.config.harness.skills_path;
|
|
167
|
+
const findings = [];
|
|
168
|
+
for (const adapter of configuredAdapters(ctx.config, 'harness-generation')) {
|
|
169
|
+
const harnessDir = effectiveSkillsDir(ctx.config, adapter.id, adapter.skillsDir);
|
|
170
|
+
if (harnessDir === canonical)
|
|
171
|
+
continue;
|
|
172
|
+
if (await isBridgeBroken(ctx.storeRoot, canonical, harnessDir)) {
|
|
173
|
+
findings.push({
|
|
174
|
+
code: 'harness_portability.broken_bridge',
|
|
175
|
+
severity: 'error',
|
|
176
|
+
message: `"${harnessDir}" (${adapter.id}) does not resolve to the configured skills path "${canonical}" — run \`ctxr update\` to repair it.`,
|
|
177
|
+
subject: adapter.id,
|
|
178
|
+
details: { path: harnessDir, canonical },
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return { status: findings.length > 0 ? 'fail' : 'pass', findings };
|
|
183
|
+
},
|
|
184
|
+
});
|
|
142
185
|
const MARKDOWN_HEADING_RE = /^#{1,6}\s+(.+)$/gm;
|
|
143
186
|
function headingsOf(text) {
|
|
144
187
|
const headings = new Set();
|
|
@@ -157,7 +200,7 @@ function headingsOf(text) {
|
|
|
157
200
|
* copy-pasted into the entry file outside its managed fence — the way an
|
|
158
201
|
* operator reaching for "where do I put a Claude-only note" might otherwise
|
|
159
202
|
* duplicate a whole AGENTS.md section into CLAUDE.md instead of writing a
|
|
160
|
-
* harness-specific extra beneath the import (see the `
|
|
203
|
+
* harness-specific extra beneath the import (see the `conventions`
|
|
161
204
|
* fence's own guidance in `agents-doc.ts`).
|
|
162
205
|
*/
|
|
163
206
|
export const harnessEntryNoDuplicateConventionTextCheck = defineCheck({
|
|
@@ -184,6 +227,8 @@ export const harnessEntryNoDuplicateConventionTextCheck = defineCheck({
|
|
|
184
227
|
const agentsMdHeadings = headingsOf(agentsMdContent);
|
|
185
228
|
const findings = [];
|
|
186
229
|
for (const adapter of adapters) {
|
|
230
|
+
if (adapter.entryFileName === undefined)
|
|
231
|
+
continue; // skills-only adapter — no entry file to check
|
|
187
232
|
let entryContent;
|
|
188
233
|
try {
|
|
189
234
|
entryContent = await readFile(path.join(ctx.storeRoot, adapter.entryFileName), 'utf8');
|
|
@@ -227,12 +272,145 @@ export const noUnrecognizedConfigKeysCheck = defineCheck({
|
|
|
227
272
|
return { status: findings.length > 0 ? 'fail' : 'pass', findings };
|
|
228
273
|
},
|
|
229
274
|
});
|
|
275
|
+
/**
|
|
276
|
+
* harness-portability spec (inline-conventions-and-mission): "The entry
|
|
277
|
+
* document's inlined content matches its sources" — `AGENTS.md`'s inlined
|
|
278
|
+
* conventions/mission sections are derived content (rendered from
|
|
279
|
+
* `.contexture/conventions/*.md` and the configured mission path), so
|
|
280
|
+
* editing a source directly without regenerating `AGENTS.md` (e.g. bypassing
|
|
281
|
+
* `ctxr update`) leaves it silently stale. Reuses `checkAgentsMdDrift`, the
|
|
282
|
+
* same re-render-and-diff `ctxr verify --portable` uses, so the two commands
|
|
283
|
+
* can never disagree about whether a store is in sync.
|
|
284
|
+
*/
|
|
285
|
+
export const agentsMdInlinedContentCurrentCheck = defineCheck({
|
|
286
|
+
id: 'harness_portability.agents_md_inlined_content_current',
|
|
287
|
+
title: "AGENTS.md's inlined conventions and mission content match their source files",
|
|
288
|
+
severity: 'invariant',
|
|
289
|
+
capability: 'harness-portability',
|
|
290
|
+
scopes: ['store'],
|
|
291
|
+
async run(ctx) {
|
|
292
|
+
const drift = await checkAgentsMdDrift(ctx.storeRoot, ctx.config);
|
|
293
|
+
const findings = [
|
|
294
|
+
...drift.driftedConventions.map((conventionPath) => ({
|
|
295
|
+
code: 'harness_portability.agents_md_convention_drifted',
|
|
296
|
+
severity: 'error',
|
|
297
|
+
message: `AGENTS.md's "Store conventions" section no longer matches "${conventionPath}" — run \`ctxr update\`.`,
|
|
298
|
+
subject: conventionPath,
|
|
299
|
+
})),
|
|
300
|
+
...(drift.driftedMission
|
|
301
|
+
? [
|
|
302
|
+
{
|
|
303
|
+
code: 'harness_portability.agents_md_mission_drifted',
|
|
304
|
+
severity: 'error',
|
|
305
|
+
message: `AGENTS.md's "Mission" section no longer matches "${drift.driftedMission}" — run \`ctxr update\`.`,
|
|
306
|
+
subject: drift.driftedMission,
|
|
307
|
+
},
|
|
308
|
+
]
|
|
309
|
+
: []),
|
|
310
|
+
];
|
|
311
|
+
return { status: findings.length > 0 ? 'fail' : 'pass', findings };
|
|
312
|
+
},
|
|
313
|
+
});
|
|
314
|
+
/**
|
|
315
|
+
* A path's staged (index) content when it's part of this commit, else its
|
|
316
|
+
* current on-disk content — the pre-commit-hook analogue of
|
|
317
|
+
* `checkAgentsMdDrift`'s working-tree reads, so a staged-but-not-yet-merged
|
|
318
|
+
* edit to a source file is seen even though nothing has been committed yet.
|
|
319
|
+
* `null` means the path doesn't exist in either the staged set or on disk
|
|
320
|
+
* (deleted, or staged as a deletion).
|
|
321
|
+
*/
|
|
322
|
+
async function stagedOrDiskContent(storeRoot, staged, relativePath) {
|
|
323
|
+
const stagedFile = staged.find((f) => f.path === relativePath);
|
|
324
|
+
if (stagedFile)
|
|
325
|
+
return stagedFile.status === 'D' ? null : (stagedFile.content ?? null);
|
|
326
|
+
try {
|
|
327
|
+
return await readFile(path.join(storeRoot, relativePath), 'utf8');
|
|
328
|
+
}
|
|
329
|
+
catch (err) {
|
|
330
|
+
if (err.code === 'ENOENT')
|
|
331
|
+
return null;
|
|
332
|
+
throw err;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* write-lifecycle spec / harness-portability spec (inline-conventions-and-mission):
|
|
337
|
+
* "A commit that would leave the entry document stale is refused." The
|
|
338
|
+
* store-scope drift check above reads the working tree, which is the wrong
|
|
339
|
+
* source of truth for a pre-commit hook — an operator can edit a convention
|
|
340
|
+
* file, forget to run `ctxr update`, and `git add` only the convention file;
|
|
341
|
+
* the working tree would then have a regenerated AGENTS.md sitting right
|
|
342
|
+
* next to it only if they happened to run `ctxr update` first, which is
|
|
343
|
+
* exactly the step this check exists to enforce. So this reads STAGED
|
|
344
|
+
* content for any file this commit touches (falling back to disk for files
|
|
345
|
+
* the commit doesn't touch) and re-renders against that view instead.
|
|
346
|
+
*/
|
|
347
|
+
export const stagedAgentsMdInlinedContentCurrentCheck = defineCheck({
|
|
348
|
+
id: 'staged.agents_md_inlined_content_current',
|
|
349
|
+
title: 'A staged convention or mission change also stages a matching AGENTS.md regeneration',
|
|
350
|
+
severity: 'invariant',
|
|
351
|
+
capability: 'harness-portability',
|
|
352
|
+
scopes: ['staged'],
|
|
353
|
+
async run(ctx) {
|
|
354
|
+
const staged = ctx.staged ?? [];
|
|
355
|
+
const conventionsPrefix = ctx.config.harness.guidance_path.endsWith('/')
|
|
356
|
+
? ctx.config.harness.guidance_path
|
|
357
|
+
: `${ctx.config.harness.guidance_path}/`;
|
|
358
|
+
const missionPath = ctx.config.organize.mission_path;
|
|
359
|
+
const relevantSourceStaged = staged.some((f) => f.path.startsWith(conventionsPrefix) || f.path === missionPath);
|
|
360
|
+
if (!relevantSourceStaged)
|
|
361
|
+
return { status: 'pass', findings: [] };
|
|
362
|
+
const agentsMdStaged = staged.find((f) => f.path === 'AGENTS.md');
|
|
363
|
+
if (!agentsMdStaged || agentsMdStaged.content === undefined) {
|
|
364
|
+
return {
|
|
365
|
+
status: 'fail',
|
|
366
|
+
findings: [
|
|
367
|
+
{
|
|
368
|
+
code: 'staged.agents_md_inlined_content_current.not_staged',
|
|
369
|
+
severity: 'error',
|
|
370
|
+
message: 'This commit stages a change to an operator convention file or the mission document, but not AGENTS.md — run `ctxr update` and stage the result.',
|
|
371
|
+
},
|
|
372
|
+
],
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
const conventions = await scanConventions(ctx.storeRoot, ctx.config);
|
|
376
|
+
const effectiveConventions = await Promise.all(conventions.map(async (doc) => {
|
|
377
|
+
const raw = await stagedOrDiskContent(ctx.storeRoot, staged, doc.path);
|
|
378
|
+
return raw === null ? doc : extractDocMetadata(raw, doc.path);
|
|
379
|
+
}));
|
|
380
|
+
const freshConventions = renderConventionsSection(ctx.config, effectiveConventions).join('\n');
|
|
381
|
+
const stagedConventionsRegion = readFencedRegion(agentsMdStaged.content, AGENTS_MD_CONVENTIONS_FENCE).join('\n');
|
|
382
|
+
const findings = [];
|
|
383
|
+
if (freshConventions !== stagedConventionsRegion) {
|
|
384
|
+
findings.push({
|
|
385
|
+
code: 'staged.agents_md_inlined_content_current.conventions_mismatch',
|
|
386
|
+
severity: 'error',
|
|
387
|
+
message: 'The staged AGENTS.md does not reflect the staged convention file content — run `ctxr update` and re-stage AGENTS.md.',
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
if (missionPath) {
|
|
391
|
+
const missionRaw = await stagedOrDiskContent(ctx.storeRoot, staged, missionPath);
|
|
392
|
+
const freshMission = renderMissionSection(ctx.config, missionRaw).join('\n');
|
|
393
|
+
const stagedMissionRegion = readFencedRegion(agentsMdStaged.content, AGENTS_MD_MISSION_FENCE).join('\n');
|
|
394
|
+
if (freshMission !== stagedMissionRegion) {
|
|
395
|
+
findings.push({
|
|
396
|
+
code: 'staged.agents_md_inlined_content_current.mission_mismatch',
|
|
397
|
+
severity: 'error',
|
|
398
|
+
message: 'The staged AGENTS.md does not reflect the staged mission document content — run `ctxr update` and re-stage AGENTS.md.',
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
return { status: findings.length > 0 ? 'fail' : 'pass', findings };
|
|
403
|
+
},
|
|
404
|
+
});
|
|
230
405
|
export const INTEGRITY_CHECKS = [
|
|
231
406
|
derivedArtifactStalenessCheck,
|
|
232
|
-
|
|
407
|
+
graphAmbiguousLinksCheck,
|
|
233
408
|
schemaVersionCurrencyCheck,
|
|
234
409
|
adapterCompatibilityCheck,
|
|
235
410
|
harnessEntryNoDuplicateConventionTextCheck,
|
|
411
|
+
harnessSkillsBridgeCheck,
|
|
236
412
|
noUnrecognizedConfigKeysCheck,
|
|
413
|
+
agentsMdInlinedContentCurrentCheck,
|
|
414
|
+
stagedAgentsMdInlinedContentCurrentCheck,
|
|
237
415
|
];
|
|
238
416
|
//# sourceMappingURL=integrity-checks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrity-checks.js","sourceRoot":"","sources":["../../../src/core/checks/integrity-checks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,E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kC;IAClC,wCAAwC;CACzC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../src/core/checks/manifest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../src/core/checks/manifest.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,SAAS,eAAe,EAS5C,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CATALOG_CHECKS } from './catalog-checks.js';
|
|
2
2
|
import { DISCLOSURE_CHECKS } from './disclosure-checks.js';
|
|
3
|
+
import { HARNESS_PORTABILITY_CHECKS } from './harness-portability-checks.js';
|
|
3
4
|
import { INTEGRITY_CHECKS } from './integrity-checks.js';
|
|
4
5
|
import { failClosedVisibilityCheck, failClosedVisibilityInvariantCheck } from '../notes/checks.js';
|
|
5
6
|
import { ORGANIZE_CHECKS } from './organize-checks.js';
|
|
@@ -16,5 +17,6 @@ export const CHECKS = [
|
|
|
16
17
|
...ORGANIZE_CHECKS,
|
|
17
18
|
...DISCLOSURE_CHECKS,
|
|
18
19
|
...INTEGRITY_CHECKS,
|
|
20
|
+
...HARNESS_PORTABILITY_CHECKS,
|
|
19
21
|
];
|
|
20
22
|
//# sourceMappingURL=manifest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../../src/core/checks/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,kCAAkC,EAAE,MAAM,oBAAoB,CAAC;AACnG,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAGrE;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAA+B;IAChD,yBAAyB;IACzB,kCAAkC;IAClC,GAAG,sBAAsB;IACzB,GAAG,cAAc;IACjB,GAAG,eAAe;IAClB,GAAG,iBAAiB;IACpB,GAAG,gBAAgB;
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../../src/core/checks/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,kCAAkC,EAAE,MAAM,oBAAoB,CAAC;AACnG,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAGrE;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAA+B;IAChD,yBAAyB;IACzB,kCAAkC;IAClC,GAAG,sBAAsB;IACzB,GAAG,cAAc;IACjB,GAAG,eAAe;IAClB,GAAG,iBAAiB;IACpB,GAAG,gBAAgB;IACnB,GAAG,0BAA0B;CAC9B,CAAC"}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
/** context-organize spec: "orphaned notes" — reported by lint, never failed by doctor. */
|
|
2
2
|
export declare const orphanNotesCheck: import("./types.js").CheckDefinition;
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* context-organize spec: "broken links" — a link that resolves to no note at all
|
|
5
|
+
* (`not_found`), reported not failed. `graph.dangling` also carries `ambiguous`-reason
|
|
6
|
+
* records (a link matching two or more notes' basenames), but those are
|
|
7
|
+
* checks/integrity-checks.ts:graphAmbiguousLinksCheck's alone (doctor, invariant): resolution
|
|
8
|
+
* is mechanically broken there, with an always-applicable fix, unlike a `not_found` link,
|
|
9
|
+
* which can't be told apart from a healthy forward reference — so this check filters
|
|
10
|
+
* `ambiguous` out rather than sharing it.
|
|
11
|
+
*/
|
|
4
12
|
export declare const brokenLinksCheck: import("./types.js").CheckDefinition;
|
|
5
13
|
/** context-ingest / context-organize: material captured but never stamped with source identity. */
|
|
6
14
|
export declare const uningestedInboxCheck: import("./types.js").CheckDefinition;
|
|
@@ -16,5 +24,17 @@ export declare const uningestedInboxCheck: import("./types.js").CheckDefinition;
|
|
|
16
24
|
export declare const catalogGapsLintCheck: import("./types.js").CheckDefinition;
|
|
17
25
|
/** context-organize spec (store-primitives-from-migration-audit D4): a rollup with no timestamp, or one whose backlinks have moved past it, reported not failed. */
|
|
18
26
|
export declare const rollupStaleCheck: import("./types.js").CheckDefinition;
|
|
27
|
+
/**
|
|
28
|
+
* harness-portability spec (inline-conventions-and-mission): "Generated
|
|
29
|
+
* sections render in a fixed order" — hand-written content interrupting the
|
|
30
|
+
* managed fences' contiguity blocks `ctxr update` from reordering them to
|
|
31
|
+
* the fixed layout (`reorderFencedRegions`' own conservative rule: never
|
|
32
|
+
* relocate content it can't be sure sits outside every managed section).
|
|
33
|
+
* Reported here as an observation, not by `doctor`: `doctor` runs only
|
|
34
|
+
* `severity: 'invariant'` checks (`src/commands/doctor.ts`), and a store
|
|
35
|
+
* whose sections are merely out of the preferred order still functions —
|
|
36
|
+
* this is exactly the report-don't-block condition lint exists for.
|
|
37
|
+
*/
|
|
38
|
+
export declare const agentsMdSectionOrderBlockedCheck: import("./types.js").CheckDefinition;
|
|
19
39
|
export declare const ORGANIZE_CHECKS: import("./types.js").CheckDefinition[];
|
|
20
40
|
//# sourceMappingURL=organize-checks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organize-checks.d.ts","sourceRoot":"","sources":["../../../src/core/checks/organize-checks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"organize-checks.d.ts","sourceRoot":"","sources":["../../../src/core/checks/organize-checks.ts"],"names":[],"mappings":"AAYA,0FAA0F;AAC1F,eAAO,MAAM,gBAAgB,sCAiB3B,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,sCAoB3B,CAAC;AAEH,mGAAmG;AACnG,eAAO,MAAM,oBAAoB,sCAqB/B,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,sCAgB/B,CAAC;AAEH,oKAAoK;AACpK,eAAO,MAAM,gBAAgB,sCAqB3B,CAAC;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gCAAgC,sCA2B3C,CAAC;AAEH,eAAO,MAAM,eAAe,wCAO3B,CAAC"}
|