adr-kit 0.13.0 → 0.14.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/README.md +62 -211
- package/README.zh.md +58 -174
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +41 -25
- package/dist/cli.js.map +1 -1
- package/dist/commands/archive.d.ts +2 -0
- package/dist/commands/archive.d.ts.map +1 -0
- package/dist/commands/archive.js +62 -0
- package/dist/commands/archive.js.map +1 -0
- package/dist/commands/completion.d.ts.map +1 -1
- package/dist/commands/completion.js +5 -4
- package/dist/commands/completion.js.map +1 -1
- package/dist/commands/{accept.d.ts → implement.d.ts} +2 -2
- package/dist/commands/implement.d.ts.map +1 -0
- package/dist/commands/implement.js +42 -0
- package/dist/commands/implement.js.map +1 -0
- package/dist/commands/init.js +3 -3
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/instructions.d.ts.map +1 -1
- package/dist/commands/instructions.js +24 -81
- package/dist/commands/instructions.js.map +1 -1
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +9 -14
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/propose.d.ts.map +1 -1
- package/dist/commands/propose.js +9 -10
- package/dist/commands/propose.js.map +1 -1
- package/dist/commands/{decide.d.ts → record.d.ts} +2 -2
- package/dist/commands/record.d.ts.map +1 -0
- package/dist/commands/{decide.js → record.js} +6 -6
- package/dist/commands/{decide.js.map → record.js.map} +1 -1
- package/dist/commands/reject.d.ts +1 -1
- package/dist/commands/reject.d.ts.map +1 -1
- package/dist/commands/reject.js +24 -8
- package/dist/commands/reject.js.map +1 -1
- package/dist/commands/show.d.ts.map +1 -1
- package/dist/commands/show.js +2 -16
- package/dist/commands/show.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +6 -17
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/supersede.d.ts.map +1 -1
- package/dist/commands/supersede.js +44 -10
- package/dist/commands/supersede.js.map +1 -1
- package/dist/commands/validate.d.ts +1 -1
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +11 -3
- package/dist/commands/validate.js.map +1 -1
- package/dist/core/adr.d.ts +22 -20
- package/dist/core/adr.d.ts.map +1 -1
- package/dist/core/adr.js +31 -10
- package/dist/core/adr.js.map +1 -1
- package/dist/core/archive-seal.d.ts +48 -0
- package/dist/core/archive-seal.d.ts.map +1 -0
- package/dist/core/archive-seal.js +122 -0
- package/dist/core/archive-seal.js.map +1 -0
- package/dist/core/cli-options.d.ts +2 -2
- package/dist/core/cli-options.d.ts.map +1 -1
- package/dist/core/cli-options.js +8 -6
- package/dist/core/cli-options.js.map +1 -1
- package/dist/core/config.d.ts +1 -1
- package/dist/core/deliberation.d.ts.map +1 -1
- package/dist/core/deliberation.js +2 -3
- package/dist/core/deliberation.js.map +1 -1
- package/dist/core/git.d.ts +9 -0
- package/dist/core/git.d.ts.map +1 -1
- package/dist/core/git.js +31 -0
- package/dist/core/git.js.map +1 -1
- package/dist/core/graph-html.js +5 -5
- package/dist/core/graph-html.js.map +1 -1
- package/dist/core/graph.d.ts +2 -1
- package/dist/core/graph.d.ts.map +1 -1
- package/dist/core/graph.js +9 -4
- package/dist/core/graph.js.map +1 -1
- package/dist/core/repository.d.ts +3 -11
- package/dist/core/repository.d.ts.map +1 -1
- package/dist/core/repository.js +60 -141
- package/dist/core/repository.js.map +1 -1
- package/dist/core/templates.d.ts +6 -7
- package/dist/core/templates.d.ts.map +1 -1
- package/dist/core/templates.js +13 -14
- package/dist/core/templates.js.map +1 -1
- package/dist/core/tool-integrations.d.ts.map +1 -1
- package/dist/core/tool-integrations.js +77 -422
- package/dist/core/tool-integrations.js.map +1 -1
- package/dist/core/validate.d.ts +19 -6
- package/dist/core/validate.d.ts.map +1 -1
- package/dist/core/validate.js +295 -91
- package/dist/core/validate.js.map +1 -1
- package/package.json +1 -1
- package/dist/commands/accept.d.ts.map +0 -1
- package/dist/commands/accept.js +0 -42
- package/dist/commands/accept.js.map +0 -1
- package/dist/commands/decide.d.ts.map +0 -1
package/dist/commands/list.js
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { installedWithNotice, readConfigSafe, requireRoot, withNotice } from '../core/config.js';
|
|
2
|
-
import { displayName,
|
|
2
|
+
import { displayName, listRecords, relativePath } from '../core/repository.js';
|
|
3
3
|
import { VERSION } from '../version.js';
|
|
4
4
|
export function listCommand(cwd) {
|
|
5
5
|
const root = requireRoot(cwd);
|
|
6
6
|
const config = readConfigSafe(root);
|
|
7
7
|
const notice = config === undefined ? undefined : installedWithNotice(config, VERSION);
|
|
8
8
|
const records = listRecords(root);
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return withNotice('no ADRs yet: start one with "adrkit decide <title> --raised-by human --decided-by human" or "adrkit propose <title>"', notice);
|
|
9
|
+
if (records.length === 0) {
|
|
10
|
+
return withNotice('no ADRs yet: start one with "adrkit propose <title>" or "adrkit record <title> --raised-by human --decided-by human"', notice);
|
|
12
11
|
}
|
|
13
12
|
const lines = [];
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
for (const folder of ['proposed', 'implemented', 'rejected', 'archived']) {
|
|
14
|
+
const group = records.filter((record) => record.folder === folder);
|
|
15
|
+
if (group.length === 0)
|
|
16
|
+
continue;
|
|
17
|
+
lines.push(folder[0].toUpperCase() + folder.slice(1), '');
|
|
18
|
+
for (const record of group) {
|
|
17
19
|
const supersededNote = record.status === 'superseded' && record.supersededBy !== undefined
|
|
18
20
|
? ` [superseded by ${record.supersededBy}]`
|
|
19
21
|
: '';
|
|
@@ -21,13 +23,6 @@ export function listCommand(cwd) {
|
|
|
21
23
|
}
|
|
22
24
|
lines.push('');
|
|
23
25
|
}
|
|
24
|
-
if (drafts.length > 0) {
|
|
25
|
-
lines.push('Drafts (pending)', '');
|
|
26
|
-
for (const draft of drafts) {
|
|
27
|
-
lines.push(` ${draft.title} (${relativePath(draft)})`);
|
|
28
|
-
}
|
|
29
|
-
lines.push('');
|
|
30
|
-
}
|
|
31
26
|
return withNotice(lines.join('\n').trimEnd(), notice);
|
|
32
27
|
}
|
|
33
28
|
//# sourceMappingURL=list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACjG,OAAO,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACjG,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,MAAM,UAAU,WAAW,CAAC,GAAW;IACrC,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;IAC9B,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IACpC,MAAM,MAAM,GAAG,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,mBAAmB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvF,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IAClC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,UAAU,CACf,sHAAsH,EACtH,MAAM,CACP,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,MAAM,IAAI,CAAC,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,CAAU,EAAE,CAAC;QAClF,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC;QACnE,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QACjC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAE,CAAC,WAAW,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAC3D,KAAK,MAAM,MAAM,IAAI,KAAK,EAAE,CAAC;YAC3B,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,KAAK,YAAY,IAAI,MAAM,CAAC,YAAY,KAAK,SAAS;gBACxF,CAAC,CAAC,oBAAoB,MAAM,CAAC,YAAY,GAAG;gBAC5C,CAAC,CAAC,EAAE,CAAC;YACP,KAAK,CAAC,IAAI,CAAC,KAAK,WAAW,CAAC,MAAM,CAAC,GAAG,cAAc,MAAM,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACrF,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjB,CAAC;IACD,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,MAAM,CAAC,CAAC;AACxD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propose.d.ts","sourceRoot":"","sources":["../../src/commands/propose.ts"],"names":[],"mappings":"AAQA,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"propose.d.ts","sourceRoot":"","sources":["../../src/commands/propose.ts"],"names":[],"mappings":"AAQA,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAyBjE"}
|
package/dist/commands/propose.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { readConfig, requireRoot } from '../core/config.js';
|
|
4
|
-
import {
|
|
4
|
+
import { folderPath, writeRecord } from '../core/repository.js';
|
|
5
5
|
import { todayStamp } from '../core/adr.js';
|
|
6
6
|
import { proposalTemplate } from '../core/templates.js';
|
|
7
7
|
import { slugify } from '../core/slug.js';
|
|
@@ -16,20 +16,19 @@ export function proposeCommand(title, cwd) {
|
|
|
16
16
|
const root = requireRoot(cwd);
|
|
17
17
|
const slug = slugify(trimmed);
|
|
18
18
|
const fileName = `${todayStamp()}-${slug}.md`;
|
|
19
|
-
const path = join(
|
|
19
|
+
const path = join(folderPath(root, 'proposed'), fileName);
|
|
20
20
|
if (existsSync(path)) {
|
|
21
|
-
throw new Error(`
|
|
21
|
+
throw new Error(`proposal already exists: adr/proposed/${fileName}`);
|
|
22
22
|
}
|
|
23
23
|
const content = proposalTemplate(trimmed, readConfig(root).context);
|
|
24
|
-
writeRecord(root, '
|
|
24
|
+
writeRecord(root, 'proposed', fileName, content);
|
|
25
25
|
return [
|
|
26
|
-
`created adr
|
|
26
|
+
`created adr/proposed/${fileName}`,
|
|
27
27
|
'',
|
|
28
|
-
'
|
|
29
|
-
` adrkit
|
|
30
|
-
'
|
|
31
|
-
|
|
32
|
-
` adrkit reject "${trimmed}"`,
|
|
28
|
+
'When the work ships, record its outcome with',
|
|
29
|
+
` adrkit implement "${trimmed}" --raised-by human --decided-by human`,
|
|
30
|
+
'or reject the proposal with',
|
|
31
|
+
` adrkit reject "${trimmed}" --reason "<why>"`,
|
|
33
32
|
].join('\n');
|
|
34
33
|
}
|
|
35
34
|
//# sourceMappingURL=propose.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propose.js","sourceRoot":"","sources":["../../src/commands/propose.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,M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f,CAAC"}
|
|
@@ -3,5 +3,5 @@ import type { DecidedBy, RaisedBy } from '../core/adr.js';
|
|
|
3
3
|
* `decidedBy` is the declaration the caller made for this decision: the CLI
|
|
4
4
|
* cannot observe who chose, so the value travels in rather than being inferred.
|
|
5
5
|
*/
|
|
6
|
-
export declare function
|
|
7
|
-
//# sourceMappingURL=
|
|
6
|
+
export declare function recordCommand(title: string, cwd: string, decidedBy: DecidedBy, raisedBy: RaisedBy): string;
|
|
7
|
+
//# sourceMappingURL=record.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../src/commands/record.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAO1D;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,GACjB,MAAM,CAyBR"}
|
|
@@ -9,7 +9,7 @@ import { slugify } from '../core/slug.js';
|
|
|
9
9
|
* `decidedBy` is the declaration the caller made for this decision: the CLI
|
|
10
10
|
* cannot observe who chose, so the value travels in rather than being inferred.
|
|
11
11
|
*/
|
|
12
|
-
export function
|
|
12
|
+
export function recordCommand(title, cwd, decidedBy, raisedBy) {
|
|
13
13
|
const trimmed = title.trim();
|
|
14
14
|
if (trimmed.length === 0) {
|
|
15
15
|
throw new Error('title must not be empty');
|
|
@@ -20,12 +20,12 @@ export function decideCommand(title, cwd, decidedBy, raisedBy) {
|
|
|
20
20
|
const root = requireRoot(cwd);
|
|
21
21
|
const number = nextDecisionNumber(root);
|
|
22
22
|
const fileName = `${number}-${slugify(trimmed)}.md`;
|
|
23
|
-
const path = join(folderPath(root, '
|
|
23
|
+
const path = join(folderPath(root, 'implemented'), fileName);
|
|
24
24
|
if (existsSync(path)) {
|
|
25
|
-
throw new Error(`decision already exists: adr/
|
|
25
|
+
throw new Error(`decision already exists: adr/implemented/${fileName}`);
|
|
26
26
|
}
|
|
27
27
|
const content = decisionTemplate(number, trimmed, readConfig(root).context, gitHead(root), decidedBy, raisedBy);
|
|
28
|
-
writeRecord(root, '
|
|
29
|
-
return `created adr/
|
|
28
|
+
writeRecord(root, 'implemented', fileName, content);
|
|
29
|
+
return `created adr/implemented/${fileName}\n\nfill in the shipped decision and validate it with:\n adrkit validate ${number}`;
|
|
30
30
|
}
|
|
31
|
-
//# sourceMappingURL=
|
|
31
|
+
//# sourceMappingURL=record.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"record.js","sourceRoot":"","sources":["../../src/commands/record.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C;;;GAGG;AACH,MAAM,UAAU,aAAa,CAC3B,KAAa,EACb,GAAW,EACX,SAAoB,EACpB,QAAkB;IAElB,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,IAAI,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,sEAAsE,CAAC,CAAC;IAC1F,CAAC;IACD,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;IAC9B,MAAM,MAAM,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACxC,MAAM,QAAQ,GAAG,GAAG,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC;IACpD,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,aAAa,CAAC,EAAE,QAAQ,CAAC,CAAC;IAC7D,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,4CAA4C,QAAQ,EAAE,CAAC,CAAC;IAC1E,CAAC;IACD,MAAM,OAAO,GAAG,gBAAgB,CAC9B,MAAM,EACN,OAAO,EACP,UAAU,CAAC,IAAI,CAAC,CAAC,OAAO,EACxB,OAAO,CAAC,IAAI,CAAC,EACb,SAAS,EACT,QAAQ,CACT,CAAC;IACF,WAAW,CAAC,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IACpD,OAAO,2BAA2B,QAAQ,6EAA6E,MAAM,EAAE,CAAC;AAClI,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function rejectCommand(query: string, reason: string
|
|
1
|
+
export declare function rejectCommand(query: string, reason: string, cwd: string): string;
|
|
2
2
|
//# sourceMappingURL=reject.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reject.d.ts","sourceRoot":"","sources":["../../src/commands/reject.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reject.d.ts","sourceRoot":"","sources":["../../src/commands/reject.ts"],"names":[],"mappings":"AAQA,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAoBhF"}
|
package/dist/commands/reject.js
CHANGED
|
@@ -1,14 +1,30 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { todayStamp } from '../core/adr.js';
|
|
1
4
|
import { requireRoot } from '../core/config.js';
|
|
2
|
-
import { removeRecord,
|
|
5
|
+
import { folderPath, readRecord, removeRecord, resolveProposed, writeRecord } from '../core/repository.js';
|
|
6
|
+
import { stampLifecycleMove } from '../core/templates.js';
|
|
7
|
+
import { formatIssues, validateRecord } from '../core/validate.js';
|
|
3
8
|
export function rejectCommand(query, reason, cwd) {
|
|
4
9
|
const root = requireRoot(cwd);
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
if (reason !== undefined && reason.trim().length > 0) {
|
|
9
|
-
lines.push(`reason: ${reason.trim()}`);
|
|
10
|
+
const proposal = resolveProposed(root, query);
|
|
11
|
+
if (reason.trim().length === 0) {
|
|
12
|
+
throw new Error('reject requires a non-empty --reason');
|
|
10
13
|
}
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
const issues = validateRecord(root, proposal);
|
|
15
|
+
if (issues.length > 0) {
|
|
16
|
+
throw new Error(`proposal is not ready to reject:\n${formatIssues(issues)}`);
|
|
17
|
+
}
|
|
18
|
+
const target = join(folderPath(root, 'rejected'), proposal.fileName);
|
|
19
|
+
if (existsSync(target))
|
|
20
|
+
throw new Error(`rejected record already exists: adr/rejected/${proposal.fileName}`);
|
|
21
|
+
const content = stampLifecycleMove(readRecord(proposal), {
|
|
22
|
+
status: 'rejected',
|
|
23
|
+
date: todayStamp(),
|
|
24
|
+
reason: reason.trim(),
|
|
25
|
+
});
|
|
26
|
+
writeRecord(root, 'rejected', proposal.fileName, content);
|
|
27
|
+
removeRecord(proposal);
|
|
28
|
+
return `rejected adr/proposed/${proposal.fileName} as adr/rejected/${proposal.fileName}`;
|
|
13
29
|
}
|
|
14
30
|
//# sourceMappingURL=reject.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reject.js","sourceRoot":"","sources":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,CAAC;IACrE,IAAI,UAAU,CAAC,MAAM,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,gDAAgD,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC7G,MAAM,OAAO,GAAG,kBAAkB,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;QACvD,MAAM,EAAE,UAAU;QAClB,IAAI,EAAE,UAAU,EAAE;QAClB,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE;KACtB,CAAC,CAAC;IACH,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC1D,YAAY,CAAC,QAAQ,CAAC,CAAC;IACvB,OAAO,yBAAyB,QAAQ,CAAC,QAAQ,oBAAoB,QAAQ,CAAC,QAAQ,EAAE,CAAC;AAC3F,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"show.d.ts","sourceRoot":"","sources":["../../src/commands/show.ts"],"names":[],"mappings":"AAIA,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"show.d.ts","sourceRoot":"","sources":["../../src/commands/show.ts"],"names":[],"mappings":"AAIA,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAM9D"}
|
package/dist/commands/show.js
CHANGED
|
@@ -1,23 +1,9 @@
|
|
|
1
1
|
import { readFileSync } from 'node:fs';
|
|
2
2
|
import { requireRoot } from '../core/config.js';
|
|
3
|
-
import { relativePath,
|
|
3
|
+
import { relativePath, resolveRecord } from '../core/repository.js';
|
|
4
4
|
export function showCommand(query, cwd) {
|
|
5
5
|
const root = requireRoot(cwd);
|
|
6
|
-
|
|
7
|
-
// If neither resolves, surface the decisions-oriented error rather than the
|
|
8
|
-
// draft fallback's, so a mistyped number still says "no ADR matches".
|
|
9
|
-
let record;
|
|
10
|
-
try {
|
|
11
|
-
record = resolveRecord(root, query);
|
|
12
|
-
}
|
|
13
|
-
catch (decisionError) {
|
|
14
|
-
try {
|
|
15
|
-
record = resolveDraft(root, query);
|
|
16
|
-
}
|
|
17
|
-
catch {
|
|
18
|
-
throw decisionError;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
6
|
+
const record = resolveRecord(root, query);
|
|
21
7
|
const path = relativePath(record);
|
|
22
8
|
const content = readFileSync(record.path, 'utf8');
|
|
23
9
|
return `${path}\n${'='.repeat(path.length)}\n\n${content.trimEnd()}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"show.js","sourceRoot":"","sources":["../../src/commands/show.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"show.js","sourceRoot":"","sources":["../../src/commands/show.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEpE,MAAM,UAAU,WAAW,CAAC,KAAa,EAAE,GAAW;IACpD,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;IAC9B,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC1C,MAAM,IAAI,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IAClC,MAAM,OAAO,GAAG,YAAY,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAClD,OAAO,GAAG,IAAI,KAAK,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;AACvE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAqBvD"}
|
package/dist/commands/status.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { requireRoot } from '../core/config.js';
|
|
2
|
-
import {
|
|
2
|
+
import { listRecords } from '../core/repository.js';
|
|
3
3
|
import { formatIssues, validateRepository } from '../core/validate.js';
|
|
4
4
|
export function statusCommand(cwd) {
|
|
5
5
|
const root = requireRoot(cwd);
|
|
@@ -11,25 +11,14 @@ export function statusCommand(cwd) {
|
|
|
11
11
|
catch {
|
|
12
12
|
// Validation already reported the parse failure above; keep counts empty.
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
try {
|
|
16
|
-
drafts = listDrafts(root);
|
|
17
|
-
}
|
|
18
|
-
catch {
|
|
19
|
-
// A corrupt draft is surfaced by accept/instructions, not by the count.
|
|
20
|
-
}
|
|
21
|
-
const counts = { accepted: 0, superseded: 0, drafts: 0 };
|
|
14
|
+
const counts = { proposed: 0, implemented: 0, rejected: 0, archived: 0 };
|
|
22
15
|
for (const record of records) {
|
|
23
|
-
|
|
24
|
-
counts.superseded += 1;
|
|
25
|
-
else
|
|
26
|
-
counts.accepted += 1;
|
|
16
|
+
counts[record.folder] += 1;
|
|
27
17
|
}
|
|
28
|
-
counts.drafts = drafts.length;
|
|
29
18
|
const lines = ['Lifecycle', ''];
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
for (const folder of ['proposed', 'implemented', 'rejected', 'archived']) {
|
|
20
|
+
lines.push(` ${folder}: ${counts[folder]}`);
|
|
21
|
+
}
|
|
33
22
|
lines.push('');
|
|
34
23
|
lines.push(issues.length === 0 ? 'validation: OK' : `validation: ${formatIssues(issues)}`);
|
|
35
24
|
return { valid: issues.length === 0, output: lines.join('\n') };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAOvE,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;IAC9B,MAAM,MAAM,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACxC,IAAI,OAAO,GAAgB,EAAE,CAAC;IAC9B,IAAI,CAAC;QACH,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAAC,MAAM,CAAC;QACP,0EAA0E;IAC5E,CAAC;IACD,MAAM,MAAM,GAAG,EAAE,QAAQ,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;IACzE,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;IAED,MAAM,KAAK,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IAChC,KAAK,MAAM,MAAM,IAAI,CAAC,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,CAAU,EAAE,CAAC;QAClF,KAAK,CAAC,IAAI,CAAC,KAAK,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC/C,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,eAAe,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC3F,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;AAClE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supersede.d.ts","sourceRoot":"","sources":["../../src/commands/supersede.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"supersede.d.ts","sourceRoot":"","sources":["../../src/commands/supersede.ts"],"names":[],"mappings":"AAkBA,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CA8EpF"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import { existsSync, rmSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
1
3
|
import { todayStamp } from '../core/adr.js';
|
|
4
|
+
import { appendSeal, ARCHIVED_DIR, driftedSeals, MANIFEST_FILE, readArchiveManifest, sealBytes, writeArchiveManifest, } from '../core/archive-seal.js';
|
|
2
5
|
import { requireRoot } from '../core/config.js';
|
|
6
|
+
import { formatIssues, validateRecord } from '../core/validate.js';
|
|
3
7
|
import { gitHead } from '../core/git.js';
|
|
4
|
-
import { readRecord, resolveRecord, writeRecord } from '../core/repository.js';
|
|
8
|
+
import { folderPath, readRecord, removeRecord, resolveRecord, writeRecord } from '../core/repository.js';
|
|
5
9
|
import { stampLifecycleMove } from '../core/templates.js';
|
|
6
10
|
export function supersedeCommand(query, byQuery, cwd) {
|
|
7
11
|
const root = requireRoot(cwd);
|
|
@@ -14,17 +18,17 @@ export function supersedeCommand(query, byQuery, cwd) {
|
|
|
14
18
|
if (replacement.path === record.path) {
|
|
15
19
|
throw new Error('a decision cannot supersede itself');
|
|
16
20
|
}
|
|
17
|
-
if (replacement.status
|
|
18
|
-
throw new Error(`"--by ${byQuery}"
|
|
19
|
-
}
|
|
20
|
-
if (replacement.status !== 'accepted') {
|
|
21
|
-
throw new Error(`"--by ${byQuery}" is not an accepted decision (status "${replacement.status}")`);
|
|
21
|
+
if (replacement.status !== 'implemented' || replacement.folder !== 'implemented') {
|
|
22
|
+
throw new Error(`"--by ${byQuery}" must be an implemented decision`);
|
|
22
23
|
}
|
|
23
24
|
if (replacement.number === undefined) {
|
|
24
25
|
throw new Error(`"--by ${byQuery}" has no decision number`);
|
|
25
26
|
}
|
|
26
|
-
if (record.status !== '
|
|
27
|
-
throw new Error(`
|
|
27
|
+
if (record.status !== 'implemented' || record.folder !== 'implemented') {
|
|
28
|
+
throw new Error(`"${query}" must be an implemented decision`);
|
|
29
|
+
}
|
|
30
|
+
if (existsSync(join(folderPath(root, 'archived'), record.fileName))) {
|
|
31
|
+
throw new Error(`archived record already exists: adr/archived/${record.fileName}`);
|
|
28
32
|
}
|
|
29
33
|
// A lifecycle rewrite emits only the canonical fields, so a key outside the
|
|
30
34
|
// set would disappear silently. Refuse and point at the command that reports
|
|
@@ -34,16 +38,46 @@ export function supersedeCommand(query, byQuery, cwd) {
|
|
|
34
38
|
throw new Error(`"${query}" has unknown front matter field(s): ${extras.join(', ')}; ` +
|
|
35
39
|
`fix them with "adrkit validate ${record.number ?? query}" before superseding`);
|
|
36
40
|
}
|
|
41
|
+
// The retiring record is about to be sealed, so it must validate first.
|
|
42
|
+
const recordIssues = validateRecord(root, record);
|
|
43
|
+
if (recordIssues.length > 0) {
|
|
44
|
+
throw new Error(`"${query}" is not valid; fix it before superseding:\n${formatIssues(recordIssues)}`);
|
|
45
|
+
}
|
|
37
46
|
const original = readRecord(record);
|
|
38
47
|
const patch = {
|
|
39
48
|
status: 'superseded',
|
|
40
49
|
date: todayStamp(),
|
|
41
50
|
'superseded-by': replacement.number,
|
|
51
|
+
archived: todayStamp(),
|
|
52
|
+
'archive-reason': `superseded by ADR ${replacement.number}`,
|
|
42
53
|
};
|
|
43
54
|
const commit = gitHead(root);
|
|
44
55
|
if (commit !== undefined)
|
|
45
56
|
patch.commit = commit;
|
|
46
|
-
|
|
47
|
-
|
|
57
|
+
// Same preflight as archive: the manifest must be readable and must not
|
|
58
|
+
// already seal the retiring file, and both sides are checked before either
|
|
59
|
+
// file moves.
|
|
60
|
+
const manifest = readArchiveManifest(root);
|
|
61
|
+
if (manifest === undefined) {
|
|
62
|
+
throw new Error(`missing adr/${ARCHIVED_DIR}/${MANIFEST_FILE}; the archive manifest must exist before superseding`);
|
|
63
|
+
}
|
|
64
|
+
if (manifest.entries.some((entry) => entry.path === record.fileName)) {
|
|
65
|
+
throw new Error(`the archive manifest already seals adr/archived/${record.fileName}`);
|
|
66
|
+
}
|
|
67
|
+
const drift = driftedSeals(root, manifest);
|
|
68
|
+
if (drift.length > 0) {
|
|
69
|
+
throw new Error(`the archive is inconsistent; fix it before superseding:\n ${drift.join('\n ')}`);
|
|
70
|
+
}
|
|
71
|
+
const content = stampLifecycleMove(original, patch);
|
|
72
|
+
writeRecord(root, 'archived', record.fileName, content);
|
|
73
|
+
try {
|
|
74
|
+
writeArchiveManifest(root, appendSeal(manifest, record.fileName, sealBytes(content)));
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
rmSync(join(folderPath(root, 'archived'), record.fileName), { force: true });
|
|
78
|
+
throw error;
|
|
79
|
+
}
|
|
80
|
+
removeRecord(record);
|
|
81
|
+
return `superseded adr/implemented/${record.fileName} by adr/implemented/${replacement.fileName}; archived old record with a manifest seal`;
|
|
48
82
|
}
|
|
49
83
|
//# sourceMappingURL=supersede.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supersede.js","sourceRoot":"","sources":["../../src/commands/supersede.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"supersede.js","sourceRoot":"","sources":["../../src/commands/supersede.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EACL,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,SAAS,EACT,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzG,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CA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,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;QACrE,MAAM,IAAI,KAAK,CAAC,mDAAmD,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;IACxF,CAAC;IACD,MAAM,KAAK,GAAG,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC3C,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,8DAA8D,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACtG,CAAC;IACD,MAAM,OAAO,GAAG,kBAAkB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IACpD,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACxD,IAAI,CAAC;QACH,oBAAoB,CAAC,IAAI,EAAE,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACxF,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QAC7E,MAAM,KAAK,CAAC;IACd,CAAC;IACD,YAAY,CAAC,MAAM,CAAC,CAAC;IACrB,OAAO,8BAA8B,MAAM,CAAC,QAAQ,uBAAuB,WAAW,CAAC,QAAQ,4CAA4C,CAAC;AAC9I,CAAC"}
|
|
@@ -2,5 +2,5 @@ export interface ValidateResult {
|
|
|
2
2
|
valid: boolean;
|
|
3
3
|
output: string;
|
|
4
4
|
}
|
|
5
|
-
export declare function validateCommand(cwd: string, query?: string): ValidateResult;
|
|
5
|
+
export declare function validateCommand(cwd: string, query?: string, base?: string): ValidateResult;
|
|
6
6
|
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/commands/validate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/commands/validate.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,cAAc,CAsC1F"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { ADR_DIR, requireRoot } from '../core/config.js';
|
|
2
2
|
import { listRecords, relativePath, resolveRecord } from '../core/repository.js';
|
|
3
|
-
import { formatIssues, validateRecord, validateRecordReferences, validateRepository } from '../core/validate.js';
|
|
4
|
-
export function validateCommand(cwd, query) {
|
|
3
|
+
import { formatIssues, recordSealIssues, validateRecord, validateRecordReferences, validateRepository, validateRepositoryWithBase, } from '../core/validate.js';
|
|
4
|
+
export function validateCommand(cwd, query, base) {
|
|
5
5
|
const root = requireRoot(cwd);
|
|
6
|
+
// Append-only history is a corpus property: a single record has no entry
|
|
7
|
+
// sequence to compare, so --base is refused instead of silently narrowed.
|
|
8
|
+
if (base !== undefined && query !== undefined && query.trim().length > 0) {
|
|
9
|
+
throw new Error(`--base checks the archive's append-only history and requires repository-wide validation; run "adrkit validate --all --base <git-ref>"`);
|
|
10
|
+
}
|
|
6
11
|
if (query !== undefined && query.trim().length > 0) {
|
|
7
12
|
const record = resolveRecord(root, query);
|
|
8
13
|
const issues = validateRecord(root, record);
|
|
@@ -17,6 +22,7 @@ export function validateCommand(cwd, query) {
|
|
|
17
22
|
message: error instanceof Error ? error.message : String(error),
|
|
18
23
|
});
|
|
19
24
|
}
|
|
25
|
+
issues.push(...recordSealIssues(root, record));
|
|
20
26
|
return {
|
|
21
27
|
valid: issues.length === 0,
|
|
22
28
|
output: issues.length === 0
|
|
@@ -24,7 +30,9 @@ export function validateCommand(cwd, query) {
|
|
|
24
30
|
: formatIssues(issues),
|
|
25
31
|
};
|
|
26
32
|
}
|
|
27
|
-
const issues =
|
|
33
|
+
const issues = base === undefined
|
|
34
|
+
? validateRepository(root)
|
|
35
|
+
: validateRepositoryWithBase(root, base);
|
|
28
36
|
return {
|
|
29
37
|
valid: issues.length === 0,
|
|
30
38
|
output: issues.length === 0 ? 'OK' : formatIssues(issues),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../src/commands/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../src/commands/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,wBAAwB,EACxB,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAO7B,MAAM,UAAU,eAAe,CAAC,GAAW,EAAE,KAAc,EAAE,IAAa;IACxE,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;IAC9B,yEAAyE;IACzE,0EAA0E;IAC1E,IAAI,IAAI,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,IAAI,EAAE,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M,CAAC,MAAM,KAAK,CAAC;QAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC;KAC1D,CAAC;AACJ,CAAC"}
|
package/dist/core/adr.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type AdrStatus = 'proposed' | '
|
|
1
|
+
export type AdrStatus = 'proposed' | 'implemented' | 'rejected' | 'superseded';
|
|
2
2
|
/**
|
|
3
3
|
* The two declaration values, single-sourced: the parser, the CLI prompt, and
|
|
4
4
|
* the shell completion scripts all read the set from here, so a third value
|
|
@@ -23,22 +23,21 @@ export declare function isDecidedBy(value: unknown): value is DecidedBy;
|
|
|
23
23
|
* Who put the decision on the table, as opposed to `decided-by`, whose
|
|
24
24
|
* judgment settled it. The same two values on a different axis: a person may
|
|
25
25
|
* raise what the agent settles, and the agent may raise what a person settles.
|
|
26
|
-
* Declared
|
|
27
|
-
* never carries it.
|
|
26
|
+
* Declared on entry to implemented/, never inferred; proposals do not carry it.
|
|
28
27
|
*/
|
|
29
28
|
export type RaisedBy = DecidedBy;
|
|
30
29
|
/** Narrow an unknown front matter value to a raised-by declaration. */
|
|
31
30
|
export declare function isRaisedBy(value: unknown): value is RaisedBy;
|
|
32
31
|
/**
|
|
33
|
-
* The
|
|
34
|
-
*
|
|
35
|
-
* their own status, and drafts are proposals that will either be promoted or
|
|
36
|
-
* discarded.
|
|
32
|
+
* The four lifecycle directories. Numbered decisions occupy implemented/
|
|
33
|
+
* or archived/; unnumbered proposals occupy proposed/ or rejected/.
|
|
37
34
|
*/
|
|
38
|
-
export type AdrFolder = '
|
|
35
|
+
export type AdrFolder = 'proposed' | 'implemented' | 'rejected' | 'archived';
|
|
39
36
|
/** Canonical front matter field order; only fields that exist are written. */
|
|
40
|
-
export declare const FRONT_MATTER_ORDER: readonly ['status', 'date', 'raised-by', 'decided-by', 'created', 'commit', 'superseded-by', 'reason', 'tags'];
|
|
41
|
-
/**
|
|
37
|
+
export declare const FRONT_MATTER_ORDER: readonly ['status', 'date', 'raised-by', 'decided-by', 'created', 'commit', 'superseded-by', 'reason', 'archived', 'archive-reason', 'tags'];
|
|
38
|
+
/** File name of a numbered record in implemented/ or archived/: `N-slug.md`. */
|
|
39
|
+
export declare const NUMBERED_FILE_NAME_PATTERN: RegExp;
|
|
40
|
+
/** Sections that only make sense during the proposal era and must not appear in an implemented decision. */
|
|
42
41
|
export declare const PROPOSAL_ERA_HEADINGS: string[];
|
|
43
42
|
/** A `YYYY-MM-DD` date value. Shared by the parser (format) and validate (calendar validity). */
|
|
44
43
|
export declare const DATE_PATTERN: RegExp;
|
|
@@ -58,13 +57,13 @@ export interface AdrRecord {
|
|
|
58
57
|
fileName: string;
|
|
59
58
|
title: string;
|
|
60
59
|
status: AdrStatus;
|
|
61
|
-
/** Date the
|
|
60
|
+
/** Date of the latest lifecycle move, `YYYY-MM-DD` in local time. */
|
|
62
61
|
date: string;
|
|
63
62
|
/**
|
|
64
63
|
* For durable records: who put the decision on the table. The `decided-by`
|
|
65
64
|
* axis turned around: a person may raise what the agent settles, and vice
|
|
66
|
-
* versa. Declared by the writer
|
|
67
|
-
* verified.
|
|
65
|
+
* versa. Declared by the writer on implementation, never inferred or
|
|
66
|
+
* verified. An unshipped proposal never carries it.
|
|
68
67
|
*/
|
|
69
68
|
raisedBy?: RaisedBy;
|
|
70
69
|
/**
|
|
@@ -73,8 +72,8 @@ export interface AdrRecord {
|
|
|
73
72
|
* person's own choice, a proposal they changed into what shipped, and a
|
|
74
73
|
* choice they made earlier that is only now being recorded; `agent` means the
|
|
75
74
|
* direction came from the agent's own judgment, even when a person let it
|
|
76
|
-
* through. Declared by the writer at
|
|
77
|
-
* verified.
|
|
75
|
+
* through. Declared by the writer at record or implement time, never inferred or
|
|
76
|
+
* verified. An unshipped proposal never carries it.
|
|
78
77
|
*/
|
|
79
78
|
decidedBy?: DecidedBy;
|
|
80
79
|
/** Date the record was created; stamped once and never re-stamped, so the
|
|
@@ -84,8 +83,12 @@ export interface AdrRecord {
|
|
|
84
83
|
commit?: string;
|
|
85
84
|
rejectionReason?: string;
|
|
86
85
|
/** For superseded decisions: the number of the decision that replaced this one. */
|
|
87
|
-
/** Immediate historical successor; validation follows the chain to an
|
|
86
|
+
/** Immediate historical successor; validation follows the chain to an implemented record. */
|
|
88
87
|
supersededBy?: number;
|
|
88
|
+
/** Date a shipped record entered frozen history. */
|
|
89
|
+
archived?: string;
|
|
90
|
+
/** Why a shipped record no longer needs to be active guidance. */
|
|
91
|
+
archiveReason?: string;
|
|
89
92
|
/** Optional kebab-case theme keywords; validate checks the shape. */
|
|
90
93
|
tags?: string[];
|
|
91
94
|
number?: number;
|
|
@@ -105,7 +108,7 @@ export declare function hasMeaningfulBody(body: string | undefined): boolean;
|
|
|
105
108
|
* The format is YAML front matter followed by a Markdown body:
|
|
106
109
|
*
|
|
107
110
|
* ---
|
|
108
|
-
* status: proposed |
|
|
111
|
+
* status: proposed | implemented | rejected | superseded
|
|
109
112
|
* date: YYYY-MM-DD
|
|
110
113
|
* raised-by: human | agent (durable records only)
|
|
111
114
|
* decided-by: human | agent (durable records only)
|
|
@@ -118,9 +121,8 @@ export declare function hasMeaningfulBody(body: string | undefined): boolean;
|
|
|
118
121
|
* ## Problem
|
|
119
122
|
* ...
|
|
120
123
|
*
|
|
121
|
-
* The `date` field records the date the
|
|
122
|
-
* stamped by the CLI at every lifecycle move
|
|
123
|
-
* reject, supersede).
|
|
124
|
+
* The `date` field records the date of the latest lifecycle move and is
|
|
125
|
+
* stamped by the CLI at every lifecycle move.
|
|
124
126
|
*/
|
|
125
127
|
export declare function parseAdrFile(filePath: string): AdrRecord;
|
|
126
128
|
//# sourceMappingURL=adr.d.ts.map
|
package/dist/core/adr.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adr.d.ts","sourceRoot":"","sources":["../../src/core/adr.ts"],"names":[],"mappings":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