@cleocode/core 2026.11.8 → 2026.11.9
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/.source-stamp.json +1 -1
- package/dist/adrs/find.d.ts +1 -0
- package/dist/adrs/find.js +4 -12
- package/dist/adrs/find.js.map +1 -1
- package/dist/adrs/home.d.ts +73 -0
- package/dist/adrs/home.js +117 -0
- package/dist/adrs/home.js.map +1 -0
- package/dist/adrs/link-pipeline.d.ts +1 -1
- package/dist/adrs/link-pipeline.js +9 -32
- package/dist/adrs/link-pipeline.js.map +1 -1
- package/dist/adrs/list.d.ts +4 -2
- package/dist/adrs/list.js +6 -13
- package/dist/adrs/list.js.map +1 -1
- package/dist/adrs/parse.d.ts +4 -1
- package/dist/adrs/parse.js +6 -3
- package/dist/adrs/parse.js.map +1 -1
- package/dist/adrs/show.d.ts +6 -1
- package/dist/adrs/show.js +12 -12
- package/dist/adrs/show.js.map +1 -1
- package/dist/adrs/sync.d.ts +3 -0
- package/dist/adrs/sync.js +14 -53
- package/dist/adrs/sync.js.map +1 -1
- package/dist/adrs/validate.d.ts +2 -1
- package/dist/adrs/validate.js +11 -10
- package/dist/adrs/validate.js.map +1 -1
- package/dist/build-provenance.json +2 -2
- package/dist/gateway-client/generated/sdk.gen.d.ts +1 -1
- package/dist/gateway-client/generated/sdk.gen.js +1 -1
- package/dist/hooks/handlers/work-capture-hooks.d.ts +14 -3
- package/dist/hooks/handlers/work-capture-hooks.js +198 -23
- package/dist/hooks/handlers/work-capture-hooks.js.map +1 -1
- package/dist/hooks/registry.d.ts +15 -3
- package/dist/hooks/registry.js +61 -12
- package/dist/hooks/registry.js.map +1 -1
- package/dist/hooks/types.d.ts +24 -2
- package/dist/hooks/types.js.map +1 -1
- package/dist/memory/brain-writer-thread.d.ts +19 -1
- package/dist/memory/brain-writer-thread.js +20 -3
- package/dist/memory/brain-writer-thread.js.map +1 -1
- package/dist/memory/retrieval/observe.d.ts +4 -1
- package/dist/memory/retrieval/observe.js +4 -2
- package/dist/memory/retrieval/observe.js.map +1 -1
- package/dist/migration/manual/T10165-backfill-adr-index.js +19 -2
- package/dist/migration/manual/T10165-backfill-adr-index.js.map +1 -1
- package/dist/orchestrate/agentmbx.js +15 -3
- package/dist/orchestrate/agentmbx.js.map +1 -1
- package/dist/orchestrate/spawn-ops.js +4 -2
- package/dist/orchestrate/spawn-ops.js.map +1 -1
- package/dist/resources/admission-ledger.d.ts +4 -0
- package/dist/resources/admission-ledger.js +19 -7
- package/dist/resources/admission-ledger.js.map +1 -1
- package/dist/resources/hook-footprint.d.ts +19 -0
- package/dist/resources/hook-footprint.js +81 -1
- package/dist/resources/hook-footprint.js.map +1 -1
- package/dist/resources/run-admission.d.ts +18 -1
- package/dist/resources/run-admission.js +48 -1
- package/dist/resources/run-admission.js.map +1 -1
- package/dist/resources/run-class.js +10 -0
- package/dist/resources/run-class.js.map +1 -1
- package/dist/resources/run-governed.js +69 -6
- package/dist/resources/run-governed.js.map +1 -1
- package/dist/setup/sections/telemetry.d.ts +1 -1
- package/dist/setup/sections/telemetry.js +1 -1
- package/dist/skills/hermes-import-classifier.d.ts +1 -1
- package/dist/skills/hermes-import-classifier.js +1 -1
- package/dist/store/agent-registry-accessor.d.ts +1 -1
- package/dist/store/agent-registry-accessor.js +1 -1
- package/dist/store/open-cleo-db.d.ts +14 -3
- package/dist/store/open-cleo-db.js +300 -7
- package/dist/store/open-cleo-db.js.map +1 -1
- package/dist/store/recover-malformed-db.d.ts +2 -0
- package/dist/store/recover-malformed-db.js +28 -0
- package/dist/store/recover-malformed-db.js.map +1 -1
- package/dist/store/repair-store-files.d.ts +3 -3
- package/dist/store/repair-store-files.js +85 -28
- package/dist/store/repair-store-files.js.map +1 -1
- package/dist/store/repair-store-salvage.d.ts +1 -1
- package/dist/store/repair-store-salvage.js +18 -6
- package/dist/store/repair-store-salvage.js.map +1 -1
- package/dist/store/repair-store.js +59 -37
- package/dist/store/repair-store.js.map +1 -1
- package/dist/store/restore-marker.d.ts +8 -0
- package/dist/store/restore-marker.js +74 -1
- package/dist/store/restore-marker.js.map +1 -1
- package/dist/store/restore-store.js +5 -2
- package/dist/store/restore-store.js.map +1 -1
- package/dist/store/schema/audit.d.ts +2 -2
- package/dist/store/schema/cleo-project/audit.d.ts +2 -2
- package/dist/store/schema/cleo-project/lifecycle.d.ts +1 -1
- package/dist/store/schema/cleo-project/provenance-rest.d.ts +1 -1
- package/dist/store/schema/cleo-shared/brain.d.ts +1 -1
- package/dist/store/schema/lifecycle.d.ts +1 -1
- package/dist/store/schema/memory-schema.d.ts +1 -1
- package/dist/store/schema/provenance/releases.d.ts +1 -1
- package/dist/store/sqlite-backup.js +8 -5
- package/dist/store/sqlite-backup.js.map +1 -1
- package/dist/store/validation-schemas.d.ts +6 -6
- package/dist/tasks/evidence.d.ts +15 -0
- package/dist/tasks/evidence.js +42 -5
- package/dist/tasks/evidence.js.map +1 -1
- package/dist/tasks/gate-notes.d.ts +37 -0
- package/dist/tasks/gate-notes.js +52 -0
- package/dist/tasks/gate-notes.js.map +1 -1
- package/dist/tasks/task-reparent.d.ts +1 -1
- package/dist/tasks/task-reparent.js +13 -5
- package/dist/tasks/task-reparent.js.map +1 -1
- package/dist/tasks/update.js +7 -2
- package/dist/tasks/update.js.map +1 -1
- package/dist/tasks/verification-policy.d.ts +1 -1
- package/dist/tasks/verification-policy.js +3 -5
- package/dist/tasks/verification-policy.js.map +1 -1
- package/dist/validation/engine-ops.js +6 -3
- package/dist/validation/engine-ops.js.map +1 -1
- package/dist/worktree/list.js +6 -2
- package/dist/worktree/list.js.map +1 -1
- package/package.json +13 -13
package/dist/.source-stamp.json
CHANGED
package/dist/adrs/find.d.ts
CHANGED
package/dist/adrs/find.js
CHANGED
|
@@ -13,11 +13,10 @@
|
|
|
13
13
|
* 5 — id contains query term
|
|
14
14
|
*
|
|
15
15
|
* @task T4942
|
|
16
|
+
* @task T14108 — reads the canon ADR home instead of `.cleo/adrs/`
|
|
16
17
|
* @see ADR-017 §5.4 for cognitive search spec
|
|
17
18
|
*/
|
|
18
|
-
import {
|
|
19
|
-
import { join } from 'node:path';
|
|
20
|
-
import { parseAdrFile } from './parse.js';
|
|
19
|
+
import { loadAdrs } from './home.js';
|
|
21
20
|
/** Normalise a string for comparison: lowercase, strip punctuation */
|
|
22
21
|
function normalise(s) {
|
|
23
22
|
return s
|
|
@@ -47,21 +46,14 @@ function matchedTerms(target, terms) {
|
|
|
47
46
|
}
|
|
48
47
|
export async function findAdrs(projectRoot, params) {
|
|
49
48
|
const query = params.query ?? '';
|
|
50
|
-
const
|
|
51
|
-
if (!existsSync(adrsDir)) {
|
|
52
|
-
return { adrs: [], query, total: 0 };
|
|
53
|
-
}
|
|
54
|
-
const files = readdirSync(adrsDir)
|
|
55
|
-
.filter((f) => f.endsWith('.md') && f.startsWith('ADR-'))
|
|
56
|
-
.sort();
|
|
49
|
+
const adrs = loadAdrs(projectRoot);
|
|
57
50
|
const queryTerms = normalise(query)
|
|
58
51
|
.split(' ')
|
|
59
52
|
.filter((t) => t.length > 1);
|
|
60
53
|
const filterTopics = params.topics ? parseTags(params.topics) : null;
|
|
61
54
|
const filterKeywords = params.keywords ? parseTags(params.keywords) : null;
|
|
62
55
|
const results = [];
|
|
63
|
-
for (const
|
|
64
|
-
const record = parseAdrFile(join(adrsDir, file), projectRoot);
|
|
56
|
+
for (const { record } of adrs) {
|
|
65
57
|
const fm = record.frontmatter;
|
|
66
58
|
// Status filter
|
|
67
59
|
if (params.status && fm.Status !== params.status)
|
package/dist/adrs/find.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find.js","sourceRoot":"","sources":["../../src/adrs/find.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"find.js","sourceRoot":"","sources":["../../src/adrs/find.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;A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1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ADR home resolution (T14108).
|
|
3
|
+
*
|
|
4
|
+
* ADRs live in the CLEO docs store; their human-readable mirror is the
|
|
5
|
+
* `publishMirror` of the `adr` kind in `.cleo/canon.yml` (`docs/adr/`), which
|
|
6
|
+
* `cleo docs publish` generates from the store. The legacy `.cleo/adrs/`
|
|
7
|
+
* mirror is retired. Every `cleo adr` operation reads ADR files through
|
|
8
|
+
* {@link listAdrFiles}, so the home is resolved in one place.
|
|
9
|
+
*
|
|
10
|
+
* @task T14108
|
|
11
|
+
*/
|
|
12
|
+
import type { AdrRecord } from './types.js';
|
|
13
|
+
/** Project-relative ADR mirror used when `.cleo/canon.yml` declares none. */
|
|
14
|
+
export declare const DEFAULT_ADR_HOME = "docs/adr";
|
|
15
|
+
/** One ADR markdown file in the ADR home. */
|
|
16
|
+
export interface AdrFile {
|
|
17
|
+
/** File name, e.g. `adr-051-programmatic-gate-integrity.md`. */
|
|
18
|
+
readonly name: string;
|
|
19
|
+
/** Absolute path. */
|
|
20
|
+
readonly absPath: string;
|
|
21
|
+
/** Project-relative path with `/` separators, e.g. `docs/adr/adr-051-….md`. */
|
|
22
|
+
readonly relPath: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Resolve the project-relative ADR home: the `adr` kind's `publishMirror`
|
|
26
|
+
* from `.cleo/canon.yml`, else {@link DEFAULT_ADR_HOME}.
|
|
27
|
+
*
|
|
28
|
+
* @param projectRoot - Absolute project root.
|
|
29
|
+
* @returns The ADR home without a trailing slash, e.g. `docs/adr`.
|
|
30
|
+
* @throws Error when `.cleo/canon.yml` exists but is malformed.
|
|
31
|
+
*/
|
|
32
|
+
export declare function resolveAdrHome(projectRoot: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* List the ADR markdown files directly inside the ADR home, sorted by name
|
|
35
|
+
* (case-insensitively, so `ADR-051` and `adr-052` sort by number).
|
|
36
|
+
* Returns an empty list when the home does not exist.
|
|
37
|
+
*
|
|
38
|
+
* @param projectRoot - Absolute project root.
|
|
39
|
+
* @returns ADR files in name order.
|
|
40
|
+
*/
|
|
41
|
+
export declare function listAdrFiles(projectRoot: string): AdrFile[];
|
|
42
|
+
/** One ADR in the ADR home with an id that is unique across the home. */
|
|
43
|
+
export interface ResolvedAdr {
|
|
44
|
+
/** The file. */
|
|
45
|
+
readonly file: AdrFile;
|
|
46
|
+
/** Lowercase file stem, e.g. `adr-086-cli-output-contract-e9`. */
|
|
47
|
+
readonly slug: string;
|
|
48
|
+
/** Parsed record; `record.id` is unique (see {@link loadAdrs}). */
|
|
49
|
+
readonly record: AdrRecord;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Parse every ADR in the ADR home and give each one an id unique across the
|
|
53
|
+
* home. ADR numbers are display aliases and several ADRs share one (ADR-090:
|
|
54
|
+
* the slug is the handle). For each number the preferred ADR (accepted, then
|
|
55
|
+
* proposed, then undeclared, deprecated, superseded; an amendment after a
|
|
56
|
+
* decision of the same status; ties by file name) keeps
|
|
57
|
+
* the id `ADR-NNN`; every other ADR with that number is keyed by its slug, so
|
|
58
|
+
* no ADR overwrites another in `architecture_decisions` (T14108).
|
|
59
|
+
*
|
|
60
|
+
* @param projectRoot - Absolute project root.
|
|
61
|
+
* @returns ADRs in file-name order.
|
|
62
|
+
*/
|
|
63
|
+
export declare function loadAdrs(projectRoot: string): ResolvedAdr[];
|
|
64
|
+
/**
|
|
65
|
+
* Resolve an ADR reference such as `ADR-086 (\`adr-086-cli-output-contract-e9\`)`
|
|
66
|
+
* or `adr-024-multi-store-canonical-logging.md` to a {@link loadAdrs} id: an
|
|
67
|
+
* ADR slug in the reference wins, else its `ADR-NNN` number.
|
|
68
|
+
*
|
|
69
|
+
* @param ref - Frontmatter value or link text.
|
|
70
|
+
* @param adrs - Result of {@link loadAdrs}.
|
|
71
|
+
* @returns The id, or null when the reference names no ADR in the home.
|
|
72
|
+
*/
|
|
73
|
+
export declare function resolveAdrRef(ref: string, adrs: readonly ResolvedAdr[]): string | null;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ADR home resolution (T14108).
|
|
3
|
+
*
|
|
4
|
+
* ADRs live in the CLEO docs store; their human-readable mirror is the
|
|
5
|
+
* `publishMirror` of the `adr` kind in `.cleo/canon.yml` (`docs/adr/`), which
|
|
6
|
+
* `cleo docs publish` generates from the store. The legacy `.cleo/adrs/`
|
|
7
|
+
* mirror is retired. Every `cleo adr` operation reads ADR files through
|
|
8
|
+
* {@link listAdrFiles}, so the home is resolved in one place.
|
|
9
|
+
*
|
|
10
|
+
* @task T14108
|
|
11
|
+
*/
|
|
12
|
+
import { existsSync, readdirSync } from 'node:fs';
|
|
13
|
+
import { join } from 'node:path';
|
|
14
|
+
import { loadCanonRegistry } from '../session/canon-lint.js';
|
|
15
|
+
import { parseAdrFile } from './parse.js';
|
|
16
|
+
/** Project-relative ADR mirror used when `.cleo/canon.yml` declares none. */
|
|
17
|
+
export const DEFAULT_ADR_HOME = 'docs/adr';
|
|
18
|
+
/** An ADR file name: `ADR-NNN-…md` or `adr-NNN-…md`. */
|
|
19
|
+
const ADR_FILE = /^adr-\d+.*\.md$/i;
|
|
20
|
+
/**
|
|
21
|
+
* Resolve the project-relative ADR home: the `adr` kind's `publishMirror`
|
|
22
|
+
* from `.cleo/canon.yml`, else {@link DEFAULT_ADR_HOME}.
|
|
23
|
+
*
|
|
24
|
+
* @param projectRoot - Absolute project root.
|
|
25
|
+
* @returns The ADR home without a trailing slash, e.g. `docs/adr`.
|
|
26
|
+
* @throws Error when `.cleo/canon.yml` exists but is malformed.
|
|
27
|
+
*/
|
|
28
|
+
export function resolveAdrHome(projectRoot) {
|
|
29
|
+
const mirror = loadCanonRegistry(projectRoot)?.kinds.adr?.publishMirror;
|
|
30
|
+
return (mirror ?? DEFAULT_ADR_HOME).replace(/\/+$/, '');
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* List the ADR markdown files directly inside the ADR home, sorted by name
|
|
34
|
+
* (case-insensitively, so `ADR-051` and `adr-052` sort by number).
|
|
35
|
+
* Returns an empty list when the home does not exist.
|
|
36
|
+
*
|
|
37
|
+
* @param projectRoot - Absolute project root.
|
|
38
|
+
* @returns ADR files in name order.
|
|
39
|
+
*/
|
|
40
|
+
export function listAdrFiles(projectRoot) {
|
|
41
|
+
const home = resolveAdrHome(projectRoot);
|
|
42
|
+
const dir = join(projectRoot, home);
|
|
43
|
+
if (!existsSync(dir))
|
|
44
|
+
return [];
|
|
45
|
+
return readdirSync(dir, { withFileTypes: true })
|
|
46
|
+
.filter((entry) => entry.isFile() && ADR_FILE.test(entry.name))
|
|
47
|
+
.map((entry) => entry.name)
|
|
48
|
+
.sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase()))
|
|
49
|
+
.map((name) => ({ name, absPath: join(dir, name), relPath: `${home}/${name}` }));
|
|
50
|
+
}
|
|
51
|
+
/** Status preference when several ADRs share a number: the live decision wins. */
|
|
52
|
+
const STATUS_RANK = {
|
|
53
|
+
accepted: 0,
|
|
54
|
+
proposed: 1,
|
|
55
|
+
deprecated: 3,
|
|
56
|
+
superseded: 4,
|
|
57
|
+
};
|
|
58
|
+
function statusRank(record, slug) {
|
|
59
|
+
// An amendment never takes its parent's number from a decision of the same status.
|
|
60
|
+
const amendment = slug.includes('-amendment-') ? 0.5 : 0;
|
|
61
|
+
if (record.frontmatter['Superseded By'])
|
|
62
|
+
return STATUS_RANK.superseded + amendment;
|
|
63
|
+
const word = (record.frontmatter.Status ?? '')
|
|
64
|
+
.trim()
|
|
65
|
+
.split(/[\s—–-]/)[0]
|
|
66
|
+
?.toLowerCase() ?? '';
|
|
67
|
+
return (STATUS_RANK[word] ?? 2) + amendment;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Parse every ADR in the ADR home and give each one an id unique across the
|
|
71
|
+
* home. ADR numbers are display aliases and several ADRs share one (ADR-090:
|
|
72
|
+
* the slug is the handle). For each number the preferred ADR (accepted, then
|
|
73
|
+
* proposed, then undeclared, deprecated, superseded; an amendment after a
|
|
74
|
+
* decision of the same status; ties by file name) keeps
|
|
75
|
+
* the id `ADR-NNN`; every other ADR with that number is keyed by its slug, so
|
|
76
|
+
* no ADR overwrites another in `architecture_decisions` (T14108).
|
|
77
|
+
*
|
|
78
|
+
* @param projectRoot - Absolute project root.
|
|
79
|
+
* @returns ADRs in file-name order.
|
|
80
|
+
*/
|
|
81
|
+
export function loadAdrs(projectRoot) {
|
|
82
|
+
const parsed = listAdrFiles(projectRoot).map((file) => ({
|
|
83
|
+
file,
|
|
84
|
+
slug: file.name.replace(/\.md$/i, '').toLowerCase(),
|
|
85
|
+
record: parseAdrFile(file.absPath, projectRoot),
|
|
86
|
+
}));
|
|
87
|
+
const primary = new Map();
|
|
88
|
+
for (const adr of parsed) {
|
|
89
|
+
const current = primary.get(adr.record.id);
|
|
90
|
+
if (!current || statusRank(adr.record, adr.slug) < statusRank(current.record, current.slug)) {
|
|
91
|
+
primary.set(adr.record.id, adr);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return parsed.map((adr) => primary.get(adr.record.id) === adr ? adr : { ...adr, record: { ...adr.record, id: adr.slug } });
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Resolve an ADR reference such as `ADR-086 (\`adr-086-cli-output-contract-e9\`)`
|
|
98
|
+
* or `adr-024-multi-store-canonical-logging.md` to a {@link loadAdrs} id: an
|
|
99
|
+
* ADR slug in the reference wins, else its `ADR-NNN` number.
|
|
100
|
+
*
|
|
101
|
+
* @param ref - Frontmatter value or link text.
|
|
102
|
+
* @param adrs - Result of {@link loadAdrs}.
|
|
103
|
+
* @returns The id, or null when the reference names no ADR in the home.
|
|
104
|
+
*/
|
|
105
|
+
export function resolveAdrRef(ref, adrs) {
|
|
106
|
+
for (const token of ref.toLowerCase().match(/adr-\d+(?:-[a-z0-9]+)*/g) ?? []) {
|
|
107
|
+
const bySlug = adrs.find((adr) => adr.slug === token);
|
|
108
|
+
if (bySlug)
|
|
109
|
+
return bySlug.record.id;
|
|
110
|
+
}
|
|
111
|
+
const number = ref.match(/adr-(\d+)/i)?.[1];
|
|
112
|
+
if (!number)
|
|
113
|
+
return null;
|
|
114
|
+
const id = `ADR-${number}`;
|
|
115
|
+
return adrs.some((adr) => adr.record.id === id) ? id : null;
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=home.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home.js","sourceRoot":"","sources":["../../src/adrs/home.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG1C,6EAA6E;AAC7E,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAC;AAE3C,wDAAwD;AACxD,MAAM,QAAQ,GAAG,kBAAkB,CAAC;AAYpC;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,WAAmB;IAChD,MAAM,MAAM,GAAG,iBAAiB,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,GAAG,EAAE,aAAa,CAAC;IACxE,OAAO,CAAC,MAAM,IAAI,gBAAgB,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAC1D,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,WAAmB;IAC9C,MAAM,IAAI,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;IACzC,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;IACpC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,EAAE,CAAC;IAChC,OAAO,WAA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;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW,EAAE,IAA4B;IACrE,KAAK,MAAM,KAAK,IAAI,GAAG,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,yBAAyB,CAAC,IAAI,EAAE,EAAE,CAAC;QAC7E,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC;QACtD,IAAI,MAAM;YAAE,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;IACtC,CAAC;IACD,MAAM,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC5C,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IACzB,MAAM,EAAE,GAAG,OAAO,MAAM,EAAE,CAAC;IAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAC9D,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* When an architecture_decision stage completes for a pipeline task, this
|
|
5
5
|
* module automatically:
|
|
6
|
-
* 1. Finds ADRs in
|
|
6
|
+
* 1. Finds ADRs in the ADR home (`docs/adr/`, see `home.ts`) that reference the task in Related Tasks
|
|
7
7
|
* 2. Upserts those ADRs into architecture_decisions DB
|
|
8
8
|
* 3. Creates adr_task_links with link_type='implements'
|
|
9
9
|
* 4. Links related ADRs via adr_relations if cross-references exist
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* When an architecture_decision stage completes for a pipeline task, this
|
|
5
5
|
* module automatically:
|
|
6
|
-
* 1. Finds ADRs in
|
|
6
|
+
* 1. Finds ADRs in the ADR home (`docs/adr/`, see `home.ts`) that reference the task in Related Tasks
|
|
7
7
|
* 2. Upserts those ADRs into architecture_decisions DB
|
|
8
8
|
* 3. Creates adr_task_links with link_type='implements'
|
|
9
9
|
* 4. Links related ADRs via adr_relations if cross-references exist
|
|
@@ -13,10 +13,9 @@
|
|
|
13
13
|
* @task T4947
|
|
14
14
|
* @see ADR-017 §5.3 for adr_task_links and adr_relations schemas
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
import { basename, join } from 'node:path';
|
|
16
|
+
import { readFileSync } from 'node:fs';
|
|
18
17
|
import { adrRelations, adrTaskLinks, architectureDecisions } from '../store/tasks-schema.js';
|
|
19
|
-
import {
|
|
18
|
+
import { loadAdrs } from './home.js';
|
|
20
19
|
/**
|
|
21
20
|
* Parse comma-separated task IDs from a Related Tasks value
|
|
22
21
|
*/
|
|
@@ -29,29 +28,10 @@ function parseTaskIds(raw) {
|
|
|
29
28
|
.filter((t) => /^T\d{1,5}$/.test(t));
|
|
30
29
|
}
|
|
31
30
|
/**
|
|
32
|
-
*
|
|
33
|
-
* Returns file paths of matching ADRs.
|
|
31
|
+
* Find the ADRs in the ADR home that reference the given taskId in Related Tasks.
|
|
34
32
|
*/
|
|
35
|
-
function findAdrsForTask(
|
|
36
|
-
|
|
37
|
-
return [];
|
|
38
|
-
return readdirSync(adrsDir)
|
|
39
|
-
.filter((f) => f.endsWith('.md') && /^ADR-\d+/.test(f))
|
|
40
|
-
.filter((file) => {
|
|
41
|
-
try {
|
|
42
|
-
const content = readFileSync(join(adrsDir, file), 'utf-8');
|
|
43
|
-
// Quick check before parsing — look for task ID in Related Tasks line
|
|
44
|
-
const relatedTasksMatch = content.match(/^\*\*Related Tasks\*\*:\s*(.+)$/m);
|
|
45
|
-
if (!relatedTasksMatch)
|
|
46
|
-
return false;
|
|
47
|
-
const taskIds = parseTaskIds(relatedTasksMatch[1]);
|
|
48
|
-
return taskIds.includes(taskId);
|
|
49
|
-
}
|
|
50
|
-
catch {
|
|
51
|
-
return false;
|
|
52
|
-
}
|
|
53
|
-
})
|
|
54
|
-
.map((f) => join(adrsDir, f));
|
|
33
|
+
function findAdrsForTask(projectRoot, taskId) {
|
|
34
|
+
return loadAdrs(projectRoot).filter((adr) => parseTaskIds(adr.record.frontmatter['Related Tasks']).includes(taskId));
|
|
55
35
|
}
|
|
56
36
|
/**
|
|
57
37
|
* Link ADRs to a pipeline task when the architecture_decision stage completes.
|
|
@@ -66,8 +46,7 @@ export async function linkPipelineAdr(projectRoot, taskId) {
|
|
|
66
46
|
skipped: 0,
|
|
67
47
|
errors: [],
|
|
68
48
|
};
|
|
69
|
-
const
|
|
70
|
-
const matchingFiles = findAdrsForTask(adrsDir, taskId);
|
|
49
|
+
const matchingFiles = findAdrsForTask(projectRoot, taskId);
|
|
71
50
|
if (matchingFiles.length === 0) {
|
|
72
51
|
return result;
|
|
73
52
|
}
|
|
@@ -75,13 +54,11 @@ export async function linkPipelineAdr(projectRoot, taskId) {
|
|
|
75
54
|
const { and, eq } = await import('drizzle-orm');
|
|
76
55
|
const db = await getDb(projectRoot);
|
|
77
56
|
const now = new Date().toISOString();
|
|
78
|
-
for (const
|
|
79
|
-
const filename =
|
|
57
|
+
for (const { file: adrFile, record } of matchingFiles) {
|
|
58
|
+
const { name: filename, absPath: filePath, relPath: relativePath } = adrFile;
|
|
80
59
|
try {
|
|
81
|
-
const record = parseAdrFile(filePath, projectRoot);
|
|
82
60
|
const fm = record.frontmatter;
|
|
83
61
|
const content = readFileSync(filePath, 'utf-8');
|
|
84
|
-
const relativePath = `.cleo/adrs/${filename}`;
|
|
85
62
|
// Upsert ADR row
|
|
86
63
|
const existing = await db
|
|
87
64
|
.select({ id: architectureDecisions.id })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link-pipeline.js","sourceRoot":"","sources":["../../src/adrs/link-pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"link-pipe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O,EAAE,CAAC;QACnB,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/adrs/list.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ADR List Operation (ADR-017)
|
|
3
3
|
*
|
|
4
|
-
* Lists ADR records from
|
|
4
|
+
* Lists ADR records from the ADR home (`docs/adr/`, see `home.ts`) with
|
|
5
|
+
* optional filtering.
|
|
5
6
|
*
|
|
6
7
|
* @task T4792
|
|
8
|
+
* @task T14108 — reads the canon ADR home instead of `.cleo/adrs/`
|
|
7
9
|
*/
|
|
8
10
|
import type { AdminAdrFindParams } from '@cleocode/contracts';
|
|
9
11
|
import type { AdrListResult } from './types.js';
|
|
10
|
-
/** List ADRs from
|
|
12
|
+
/** List ADRs from the ADR home with optional status filter */
|
|
11
13
|
export declare function listAdrs(projectRoot: string, params?: AdminAdrFindParams): Promise<AdrListResult>;
|
package/dist/adrs/list.js
CHANGED
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ADR List Operation (ADR-017)
|
|
3
3
|
*
|
|
4
|
-
* Lists ADR records from
|
|
4
|
+
* Lists ADR records from the ADR home (`docs/adr/`, see `home.ts`) with
|
|
5
|
+
* optional filtering.
|
|
5
6
|
*
|
|
6
7
|
* @task T4792
|
|
8
|
+
* @task T14108 — reads the canon ADR home instead of `.cleo/adrs/`
|
|
7
9
|
*/
|
|
8
|
-
import { existsSync, readdirSync } from 'node:fs';
|
|
9
|
-
import { join } from 'node:path';
|
|
10
10
|
import { paginate } from '../pagination.js';
|
|
11
|
-
import {
|
|
12
|
-
/** List ADRs from
|
|
11
|
+
import { loadAdrs } from './home.js';
|
|
12
|
+
/** List ADRs from the ADR home with optional status filter */
|
|
13
13
|
export async function listAdrs(projectRoot, params = {}) {
|
|
14
|
-
const
|
|
15
|
-
if (!existsSync(adrsDir)) {
|
|
16
|
-
return { adrs: [], total: 0, filtered: 0 };
|
|
17
|
-
}
|
|
18
|
-
const files = readdirSync(adrsDir)
|
|
19
|
-
.filter((f) => f.endsWith('.md') && f.startsWith('ADR-'))
|
|
20
|
-
.sort();
|
|
21
|
-
const records = files.map((f) => parseAdrFile(join(adrsDir, f), projectRoot));
|
|
14
|
+
const records = loadAdrs(projectRoot).map((adr) => adr.record);
|
|
22
15
|
const total = records.length;
|
|
23
16
|
const filtered = records.filter((r) => {
|
|
24
17
|
if (params.status && r.frontmatter.Status !== params.status)
|
package/dist/adrs/list.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/adrs/list.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/adrs/list.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAGrC,8DAA8D;AAC9D,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC5B,WAAmB,EACnB,SAA6B,EAAE;IAE/B,MAAM,OAAO,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAE/D,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC;IAC7B,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE;QACpC,IAAI,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC,WAAW,CAAC,MAAM,KAAK,MAAM,CAAC,MAAM;YAAE,OAAO,KAAK,CAAC;QAC1E,IAAI,MAAM,CAAC,KAAK,IAAI,CAAC,CAAC,WAAW,CAAC,IAAI,GAAG,MAAM,CAAC,KAAK;YAAE,OAAO,KAAK,CAAC;QACpE,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;IACH,MAAM,IAAI,GAAG,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAE7D,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YAC3B,EAAE,EAAE,CAAC,CAAC,EAAE;YACR,KAAK,EAAE,CAAC,CAAC,KAAK;YACd,MAAM,EAAE,CAAC,CAAC,WAAW,CAAC,MAAM;YAC5B,IAAI,EAAE,CAAC,CAAC,WAAW,CAAC,IAAI;YACxB,QAAQ,EAAE,CAAC,CAAC,IAAI;SACjB,CAAC,CAAC;QACH,KAAK;QACL,QAAQ,EAAE,QAAQ,CAAC,MAAM;KAC1B,CAAC;AACJ,CAAC"}
|
package/dist/adrs/parse.d.ts
CHANGED
|
@@ -7,7 +7,10 @@
|
|
|
7
7
|
* @task T4792
|
|
8
8
|
*/
|
|
9
9
|
import type { AdrFrontmatter, AdrRecord } from './types.js';
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Extract the ADR ID from a file name, in either case
|
|
12
|
+
* (e.g. `ADR-007-domain-consolidation.md` or `adr-007-domain-consolidation.md` -> `ADR-007`).
|
|
13
|
+
*/
|
|
11
14
|
export declare function extractAdrId(filename: string): string;
|
|
12
15
|
/** Parse bold-key frontmatter pattern: **Key**: value */
|
|
13
16
|
export declare function parseFrontmatter(content: string): AdrFrontmatter;
|
package/dist/adrs/parse.js
CHANGED
|
@@ -8,10 +8,13 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { readFileSync } from 'node:fs';
|
|
10
10
|
import { basename, isAbsolute, join } from 'node:path';
|
|
11
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* Extract the ADR ID from a file name, in either case
|
|
13
|
+
* (e.g. `ADR-007-domain-consolidation.md` or `adr-007-domain-consolidation.md` -> `ADR-007`).
|
|
14
|
+
*/
|
|
12
15
|
export function extractAdrId(filename) {
|
|
13
|
-
const match = filename.match(/^(
|
|
14
|
-
return match ? match[1] : filename.replace('.md', '');
|
|
16
|
+
const match = filename.match(/^adr-(\d+)/i);
|
|
17
|
+
return match ? `ADR-${match[1]}` : filename.replace('.md', '');
|
|
15
18
|
}
|
|
16
19
|
/** Parse bold-key frontmatter pattern: **Key**: value */
|
|
17
20
|
export function parseFrontmatter(content) {
|
package/dist/adrs/parse.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.js","sourceRoot":"","sources":["../../src/adrs/parse.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGvD
|
|
1
|
+
{"version":3,"file":"parse.js","sourceRoot":"","sources":["../../src/adrs/parse.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGvD;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,QAAgB;IAC3C,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IAC5C,OAAO,KAAK,CAAC,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,CAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AAClE,CAAC;AAED,yDAAyD;AACzD,MAAM,UAAU,gBAAgB,CAAC,OAAe;IAC9C,MAAM,OAAO,GAA4B,EAAE,CAAC;IAC5C,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAElC,wDAAwD;IACxD,KAAK,MAAM,IAAI,IAAI,K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
|
package/dist/adrs/show.d.ts
CHANGED
|
@@ -4,8 +4,13 @@
|
|
|
4
4
|
* Retrieves a single ADR record by ID.
|
|
5
5
|
*
|
|
6
6
|
* @task T4792
|
|
7
|
+
* @task T14108 — reads the canon ADR home instead of `.cleo/adrs/`
|
|
7
8
|
*/
|
|
8
9
|
import type { AdminAdrShowParams } from '@cleocode/contracts';
|
|
9
10
|
import type { AdrRecord } from './types.js';
|
|
10
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* Retrieve a single ADR, case-insensitively, by its id (`ADR-007` resolves to
|
|
13
|
+
* the preferred ADR of that number, see `loadAdrs`), by its slug, or by a
|
|
14
|
+
* file-name prefix.
|
|
15
|
+
*/
|
|
11
16
|
export declare function showAdr(projectRoot: string, params: AdminAdrShowParams): Promise<AdrRecord | null>;
|
package/dist/adrs/show.js
CHANGED
|
@@ -4,19 +4,19 @@
|
|
|
4
4
|
* Retrieves a single ADR record by ID.
|
|
5
5
|
*
|
|
6
6
|
* @task T4792
|
|
7
|
+
* @task T14108 — reads the canon ADR home instead of `.cleo/adrs/`
|
|
8
|
+
*/
|
|
9
|
+
import { loadAdrs } from './home.js';
|
|
10
|
+
/**
|
|
11
|
+
* Retrieve a single ADR, case-insensitively, by its id (`ADR-007` resolves to
|
|
12
|
+
* the preferred ADR of that number, see `loadAdrs`), by its slug, or by a
|
|
13
|
+
* file-name prefix.
|
|
7
14
|
*/
|
|
8
|
-
import { existsSync, readdirSync } from 'node:fs';
|
|
9
|
-
import { join } from 'node:path';
|
|
10
|
-
import { parseAdrFile } from './parse.js';
|
|
11
|
-
/** Retrieve a single ADR by ID (e.g., 'ADR-007') */
|
|
12
15
|
export async function showAdr(projectRoot, params) {
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return null;
|
|
19
|
-
const filePath = join(adrsDir, files[0]);
|
|
20
|
-
return parseAdrFile(filePath, projectRoot);
|
|
16
|
+
const wanted = params.adrId.toLowerCase();
|
|
17
|
+
const adrs = loadAdrs(projectRoot);
|
|
18
|
+
const match = adrs.find((adr) => adr.record.id.toLowerCase() === wanted || adr.slug === wanted) ??
|
|
19
|
+
adrs.find((adr) => adr.file.name.toLowerCase().startsWith(wanted));
|
|
20
|
+
return match?.record ?? null;
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=show.js.map
|
package/dist/adrs/show.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"show.js","sourceRoot":"","sources":["../../src/adrs/show.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"show.js","sourceRoot":"","sources":["../../src/adrs/show.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAGrC;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO,CAC3B,WAAmB,EACnB,MAA0B;IAE1B,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;IAC1C,MAAM,IAAI,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;IACnC,MAAM,KAAK,GACT,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,KAAK,MAAM,IAAI,GAAG,CAAC,IAAI,KAAK,MAAM,CAAC;QACjF,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;IACrE,OAAO,KAAK,EAAE,MAAM,IAAI,IAAI,CAAC;AAC/B,CAAC"}
|
package/dist/adrs/sync.d.ts
CHANGED
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
* Single command: ct adr sync (or admin.adr.sync)
|
|
7
7
|
* - Updates architecture_decisions + adr_task_links in SQLite (runtime search)
|
|
8
8
|
*
|
|
9
|
+
* ADR files are read from the canon ADR home (`docs/adr/`, see `home.ts`;
|
|
10
|
+
* T14108 retired the `.cleo/adrs/` markdown mirror).
|
|
11
|
+
*
|
|
9
12
|
* NOTE: `.cleo/adrs/adr-index.jsonl` is FROZEN as of T10165 (Saga T9855). The
|
|
10
13
|
* canonical store for the same metadata is the `attachments` table provenance
|
|
11
14
|
* columns shipped by T10158, reachable via `cleo docs fetch <adr-slug>` and
|