adr-kit 0.2.4 → 0.2.6
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/LICENSE +1 -1
- package/README.md +57 -45
- package/README.zh.md +53 -41
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +10 -11
- package/dist/cli.js.map +1 -1
- package/dist/commands/accept.d.ts.map +1 -1
- package/dist/commands/accept.js +12 -14
- package/dist/commands/accept.js.map +1 -1
- package/dist/commands/decide.d.ts.map +1 -1
- package/dist/commands/decide.js +3 -2
- package/dist/commands/decide.js.map +1 -1
- package/dist/commands/init.js +2 -2
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/instructions.d.ts.map +1 -1
- package/dist/commands/instructions.js +24 -25
- package/dist/commands/instructions.js.map +1 -1
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +14 -14
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/propose.d.ts.map +1 -1
- package/dist/commands/propose.js +12 -5
- package/dist/commands/propose.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 +8 -19
- package/dist/commands/reject.js.map +1 -1
- package/dist/commands/show.d.ts.map +1 -1
- package/dist/commands/show.js +16 -2
- package/dist/commands/show.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +15 -14
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/supersede.d.ts.map +1 -1
- package/dist/commands/supersede.js +14 -5
- package/dist/commands/supersede.js.map +1 -1
- package/dist/core/adr.d.ts +24 -9
- package/dist/core/adr.d.ts.map +1 -1
- package/dist/core/adr.js +97 -65
- package/dist/core/adr.js.map +1 -1
- package/dist/core/git.d.ts +9 -0
- package/dist/core/git.d.ts.map +1 -0
- package/dist/core/git.js +22 -0
- package/dist/core/git.js.map +1 -0
- package/dist/core/repository.d.ts +11 -0
- package/dist/core/repository.d.ts.map +1 -1
- package/dist/core/repository.js +95 -18
- package/dist/core/repository.js.map +1 -1
- package/dist/core/templates.d.ts +18 -10
- package/dist/core/templates.d.ts.map +1 -1
- package/dist/core/templates.js +65 -41
- package/dist/core/templates.js.map +1 -1
- package/dist/core/tool-integrations.d.ts.map +1 -1
- package/dist/core/tool-integrations.js +38 -30
- package/dist/core/tool-integrations.js.map +1 -1
- package/dist/core/validate.d.ts +7 -1
- package/dist/core/validate.d.ts.map +1 -1
- package/dist/core/validate.js +109 -97
- package/dist/core/validate.js.map +1 -1
- package/package.json +3 -2
package/dist/core/validate.js
CHANGED
|
@@ -1,23 +1,80 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import { join, relative } from 'node:path';
|
|
3
|
-
import { DATE_PATTERN, hasMeaningfulBody, PROPOSAL_ERA_HEADINGS,
|
|
3
|
+
import { DATE_PATTERN, hasMeaningfulBody, PROPOSAL_ERA_HEADINGS, } from './adr.js';
|
|
4
4
|
import { ADR_DIR, CONFIG_FILE, readConfig } from './config.js';
|
|
5
|
-
import {
|
|
5
|
+
import { listRecords } from './repository.js';
|
|
6
6
|
const DECISION_REQUIRED = ['Problem', 'Decision', 'Alternatives considered', 'Consequences'];
|
|
7
7
|
const PROPOSED_REQUIRED = ['Problem', 'Proposal', 'Alternatives considered', 'Acceptance criteria', 'Risks'];
|
|
8
|
-
|
|
8
|
+
function calendarDateIsValid(year, month, day) {
|
|
9
|
+
const date = new Date(year, month - 1, day);
|
|
10
|
+
return date.getFullYear() === year && date.getMonth() === month - 1 && date.getDate() === day;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The parser already enforces the YYYY-MM-DD format, so this only checks
|
|
14
|
+
* calendar validity; the match is never null for a parsed record.
|
|
15
|
+
*/
|
|
16
|
+
function dateIssue(record) {
|
|
17
|
+
const match = record.date.match(DATE_PATTERN);
|
|
18
|
+
if (match === null)
|
|
19
|
+
return undefined;
|
|
20
|
+
if (!calendarDateIsValid(Number(match[1]), Number(match[2]), Number(match[3]))) {
|
|
21
|
+
return 'front matter date contains an invalid calendar date';
|
|
22
|
+
}
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
/** Required-section, meaningful-body, and duplicate-section checks, shared by decisions and drafts. */
|
|
26
|
+
function sectionIssues(path, sections, required, meaningful) {
|
|
27
|
+
const issues = [];
|
|
28
|
+
const headings = new Set(sections.map((section) => section.heading));
|
|
29
|
+
for (const heading of required) {
|
|
30
|
+
if (!headings.has(heading)) {
|
|
31
|
+
issues.push({ path, message: `missing required section "## ${heading}"` });
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
for (const heading of meaningful) {
|
|
35
|
+
const body = sections.find((section) => section.heading === heading)?.body;
|
|
36
|
+
if (!hasMeaningfulBody(body)) {
|
|
37
|
+
issues.push({ path, message: `section "## ${heading}" must contain written content` });
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
const seen = new Set();
|
|
41
|
+
for (const section of sections) {
|
|
42
|
+
if (seen.has(section.heading)) {
|
|
43
|
+
issues.push({ path, message: `duplicate section "## ${section.heading}"` });
|
|
44
|
+
}
|
|
45
|
+
seen.add(section.heading);
|
|
46
|
+
}
|
|
47
|
+
return issues;
|
|
48
|
+
}
|
|
49
|
+
function alternativesIssue(path, sections) {
|
|
50
|
+
if (!hasMeaningfulBody(sections.find((section) => section.heading === 'Alternatives considered')?.body)) {
|
|
51
|
+
return [
|
|
52
|
+
{
|
|
53
|
+
path,
|
|
54
|
+
message: 'section "## Alternatives considered" must contain at least one written alternative',
|
|
55
|
+
},
|
|
56
|
+
];
|
|
57
|
+
}
|
|
58
|
+
return [];
|
|
59
|
+
}
|
|
9
60
|
export function validateRecord(root, record) {
|
|
10
61
|
const issues = [];
|
|
11
62
|
const path = relative(root, record.path);
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
if (
|
|
63
|
+
for (const key of record.frontMatterExtras ?? []) {
|
|
64
|
+
issues.push({ path, message: `unknown front matter field "${key}"` });
|
|
65
|
+
}
|
|
66
|
+
if (record.status !== 'accepted' && record.status !== 'superseded') {
|
|
67
|
+
const hint = record.status === 'rejected'
|
|
68
|
+
? 'rejection is recorded in a decision\'s "Alternatives considered", not as a standalone status'
|
|
69
|
+
: 'proposals are ephemeral drafts in adr/.drafts/';
|
|
16
70
|
issues.push({
|
|
17
71
|
path,
|
|
18
|
-
message: `status "${record.status}"
|
|
72
|
+
message: `status "${record.status}" is not a durable decision status; ${hint}`,
|
|
19
73
|
});
|
|
20
74
|
}
|
|
75
|
+
if (record.commit !== undefined && !/^[0-9a-f]{7,40}$/.test(record.commit)) {
|
|
76
|
+
issues.push({ path, message: `commit "${record.commit}" is not a git hash` });
|
|
77
|
+
}
|
|
21
78
|
if (record.status === 'superseded') {
|
|
22
79
|
if (record.supersededBy === undefined) {
|
|
23
80
|
issues.push({ path, message: 'superseded status must reference a decision number' });
|
|
@@ -26,97 +83,57 @@ export function validateRecord(root, record) {
|
|
|
26
83
|
issues.push({ path, message: 'a decision cannot supersede itself' });
|
|
27
84
|
}
|
|
28
85
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if (
|
|
33
|
-
|
|
34
|
-
const month = Number(dateMatch[2]);
|
|
35
|
-
const day = Number(dateMatch[3]);
|
|
36
|
-
const date = new Date(year, month - 1, day);
|
|
37
|
-
if (date.getFullYear() !== year ||
|
|
38
|
-
date.getMonth() !== month - 1 ||
|
|
39
|
-
date.getDate() !== day) {
|
|
40
|
-
issues.push({ path, message: 'Date line contains an invalid calendar date' });
|
|
41
|
-
}
|
|
86
|
+
const dateError = dateIssue(record);
|
|
87
|
+
if (dateError !== undefined)
|
|
88
|
+
issues.push({ path, message: dateError });
|
|
89
|
+
if (!/^[1-9]\d*-[a-z0-9一-鿿-]+\.md$/.test(record.fileName)) {
|
|
90
|
+
issues.push({ path, message: 'decision file name must be "N-slug.md"' });
|
|
42
91
|
}
|
|
43
|
-
if (record.
|
|
44
|
-
|
|
45
|
-
issues.push({ path, message: 'decision file name must be "N-slug.md"' });
|
|
46
|
-
}
|
|
47
|
-
if (record.number === undefined) {
|
|
48
|
-
issues.push({ path, message: 'accepted decision title must be "# ADR: N <title>"' });
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
if (!record.fileName.startsWith(`${record.number}-`)) {
|
|
52
|
-
issues.push({ path, message: `file name number must match title number ${record.number}` });
|
|
53
|
-
}
|
|
54
|
-
}
|
|
92
|
+
if (record.number === undefined) {
|
|
93
|
+
issues.push({ path, message: 'accepted decision title must be "# ADR: N <title>"' });
|
|
55
94
|
}
|
|
56
|
-
else {
|
|
57
|
-
|
|
58
|
-
const match = record.fileName.match(datePattern);
|
|
59
|
-
if (match === null) {
|
|
60
|
-
issues.push({ path, message: 'file name must be "YYYY-MM-DD-slug.md"' });
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
const year = Number(match[1]);
|
|
64
|
-
const month = Number(match[2]);
|
|
65
|
-
const day = Number(match[3]);
|
|
66
|
-
const date = new Date(year, month - 1, day);
|
|
67
|
-
if (date.getFullYear() !== year ||
|
|
68
|
-
date.getMonth() !== month - 1 ||
|
|
69
|
-
date.getDate() !== day) {
|
|
70
|
-
issues.push({ path, message: 'file name contains an invalid calendar date' });
|
|
71
|
-
}
|
|
72
|
-
}
|
|
95
|
+
else if (!record.fileName.startsWith(`${record.number}-`)) {
|
|
96
|
+
issues.push({ path, message: `file name number must match title number ${record.number}` });
|
|
73
97
|
}
|
|
74
|
-
|
|
75
|
-
? DECISION_REQUIRED
|
|
76
|
-
: record.folder === 'proposed'
|
|
77
|
-
? PROPOSED_REQUIRED
|
|
78
|
-
: REJECTED_REQUIRED;
|
|
98
|
+
issues.push(...sectionIssues(path, record.sections, DECISION_REQUIRED, ['Problem', 'Decision']));
|
|
79
99
|
const headings = new Set(record.sections.map((section) => section.heading));
|
|
80
|
-
for (const heading of
|
|
81
|
-
if (
|
|
82
|
-
issues.push({ path, message: `missing required section "## ${heading}"` });
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
const meaningfulHeadings = record.folder === 'decisions'
|
|
86
|
-
? ['Problem', 'Decision']
|
|
87
|
-
: ['Problem', 'Proposal'];
|
|
88
|
-
for (const heading of meaningfulHeadings) {
|
|
89
|
-
const body = record.sections.find((section) => section.heading === heading)?.body;
|
|
90
|
-
if (!hasMeaningfulBody(body)) {
|
|
100
|
+
for (const heading of PROPOSAL_ERA_HEADINGS) {
|
|
101
|
+
if (headings.has(heading)) {
|
|
91
102
|
issues.push({
|
|
92
103
|
path,
|
|
93
|
-
message: `section "## ${heading}"
|
|
104
|
+
message: `accepted decision must not contain proposal-era section "## ${heading}"`,
|
|
94
105
|
});
|
|
95
106
|
}
|
|
96
107
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
108
|
+
issues.push(...alternativesIssue(path, record.sections));
|
|
109
|
+
return issues;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Validate a draft proposal in `adr/.drafts/` before `accept` promotes it.
|
|
113
|
+
* Drafts are ephemeral and deliberately outside the `adrkit validate` surface;
|
|
114
|
+
* this is the gate that keeps a half-written proposal from becoming a decision.
|
|
115
|
+
*/
|
|
116
|
+
export function validateDraft(root, draft) {
|
|
117
|
+
const issues = [];
|
|
118
|
+
const path = relative(root, draft.path);
|
|
119
|
+
for (const key of draft.frontMatterExtras ?? []) {
|
|
120
|
+
issues.push({ path, message: `unknown front matter field "${key}"` });
|
|
103
121
|
}
|
|
104
|
-
if (
|
|
105
|
-
|
|
106
|
-
if (headings.has(heading)) {
|
|
107
|
-
issues.push({
|
|
108
|
-
path,
|
|
109
|
-
message: `accepted decision must not contain proposal-era section "## ${heading}"`,
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
}
|
|
122
|
+
if (draft.status !== 'proposed') {
|
|
123
|
+
issues.push({ path, message: `draft status must be "proposed"` });
|
|
113
124
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
125
|
+
const dateError = dateIssue(draft);
|
|
126
|
+
if (dateError !== undefined)
|
|
127
|
+
issues.push({ path, message: dateError });
|
|
128
|
+
const match = draft.fileName.match(/^(\d{4})-(\d{2})-(\d{2})-[a-z0-9一-鿿-]+\.md$/);
|
|
129
|
+
if (match === null) {
|
|
130
|
+
issues.push({ path, message: 'draft file name must be "YYYY-MM-DD-slug.md"' });
|
|
131
|
+
}
|
|
132
|
+
else if (!calendarDateIsValid(Number(match[1]), Number(match[2]), Number(match[3]))) {
|
|
133
|
+
issues.push({ path, message: 'file name contains an invalid calendar date' });
|
|
119
134
|
}
|
|
135
|
+
issues.push(...sectionIssues(path, draft.sections, PROPOSED_REQUIRED, ['Problem', 'Proposal']));
|
|
136
|
+
issues.push(...alternativesIssue(path, draft.sections));
|
|
120
137
|
return issues;
|
|
121
138
|
}
|
|
122
139
|
export function validateRepository(root) {
|
|
@@ -136,11 +153,6 @@ export function validateRepository(root) {
|
|
|
136
153
|
});
|
|
137
154
|
}
|
|
138
155
|
}
|
|
139
|
-
for (const folder of FOLDERS) {
|
|
140
|
-
if (!existsSync(join(root, ADR_DIR, folder))) {
|
|
141
|
-
issues.push({ path: `${ADR_DIR}/${folder}`, message: 'missing folder' });
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
156
|
let records;
|
|
145
157
|
try {
|
|
146
158
|
records = listRecords(root);
|
|
@@ -155,7 +167,7 @@ export function validateRepository(root) {
|
|
|
155
167
|
const decisionRecords = new Map();
|
|
156
168
|
for (const record of records) {
|
|
157
169
|
issues.push(...validateRecord(root, record));
|
|
158
|
-
if (record.
|
|
170
|
+
if (record.number !== undefined) {
|
|
159
171
|
if (decisionRecords.has(record.number)) {
|
|
160
172
|
issues.push({
|
|
161
173
|
path: relative(root, record.path),
|
|
@@ -177,21 +189,21 @@ function supersedeReferenceIssues(root, record, decisions) {
|
|
|
177
189
|
const target = decisions.get(record.supersededBy);
|
|
178
190
|
if (target === undefined) {
|
|
179
191
|
return [
|
|
180
|
-
{ path, message: `"superseded
|
|
192
|
+
{ path, message: `"superseded-by: ${record.supersededBy}" references a missing decision` },
|
|
181
193
|
];
|
|
182
194
|
}
|
|
183
195
|
if (target.status === 'superseded') {
|
|
184
196
|
return [
|
|
185
197
|
{
|
|
186
198
|
path,
|
|
187
|
-
message: `"superseded
|
|
199
|
+
message: `"superseded-by: ${record.supersededBy}" references a superseded decision; supersede that decision instead`,
|
|
188
200
|
},
|
|
189
201
|
];
|
|
190
202
|
}
|
|
191
203
|
return [];
|
|
192
204
|
}
|
|
193
205
|
/**
|
|
194
|
-
* Repository-level checks for a single record: a
|
|
206
|
+
* Repository-level checks for a single record: a `superseded-by: N` reference
|
|
195
207
|
* must point at an existing decision that is not itself superseded.
|
|
196
208
|
* validateRecord only sees one file; this adds the cross-record half so
|
|
197
209
|
* `adrkit validate <name>` keeps the same promise as a full validate.
|
|
@@ -199,7 +211,7 @@ function supersedeReferenceIssues(root, record, decisions) {
|
|
|
199
211
|
export function validateRecordReferences(root, record, records) {
|
|
200
212
|
const decisions = new Map();
|
|
201
213
|
for (const candidate of records) {
|
|
202
|
-
if (candidate.
|
|
214
|
+
if (candidate.number !== undefined) {
|
|
203
215
|
decisions.set(candidate.number, candidate);
|
|
204
216
|
}
|
|
205
217
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../src/core/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../src/core/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS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AAC;AAED,MAAM,UAAU,YAAY,CAAC,MAAyB;IACpD,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACrC,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IACzE,OAAO,SAAS,MAAM,CAAC,MAAM,SAAS,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;AAC/F,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adr-kit",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.2.6",
|
|
4
|
+
"description": "Architecture Decision Records (ADRs) for AI coding assistants.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
|
+
"author": "Chang Luo <luochang212@gmail.com>",
|
|
7
8
|
"repository": {
|
|
8
9
|
"type": "git",
|
|
9
10
|
"url": "git+https://github.com/luochang212/adr-kit.git"
|