adr-kit 0.15.0 → 0.16.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/README.md +3 -2
- package/README.zh.md +4 -3
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +7 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/instructions.d.ts.map +1 -1
- package/dist/commands/instructions.js +16 -3
- package/dist/commands/instructions.js.map +1 -1
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +7 -1
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/note.d.ts +2 -0
- package/dist/commands/note.d.ts.map +1 -0
- package/dist/commands/note.js +18 -0
- package/dist/commands/note.js.map +1 -0
- package/dist/core/cli-options.d.ts +1 -1
- package/dist/core/cli-options.d.ts.map +1 -1
- package/dist/core/cli-options.js +2 -0
- package/dist/core/cli-options.js.map +1 -1
- package/dist/core/notes.d.ts +21 -0
- package/dist/core/notes.d.ts.map +1 -0
- package/dist/core/notes.js +53 -0
- package/dist/core/notes.js.map +1 -0
- package/dist/core/repository.d.ts.map +1 -1
- package/dist/core/repository.js +4 -0
- package/dist/core/repository.js.map +1 -1
- package/dist/core/tool-integrations.d.ts +7 -0
- package/dist/core/tool-integrations.d.ts.map +1 -1
- package/dist/core/tool-integrations.js +44 -6
- package/dist/core/tool-integrations.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ adrkit implement "Use SQLite for session storage" --raised-by human --decided-by
|
|
|
38
38
|
adrkit validate
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
For an architectural choice already shipped, use `adrkit record "<title>" --raised-by human --decided-by human` instead.
|
|
41
|
+
For an architectural choice already shipped, use `adrkit record "<title>" --raised-by human --decided-by human` instead. Mid-task, when a choice is worth capturing but not worth the record's shape yet, `adrkit note "<one line>"` parks a timestamped line in `adr/notes.md` — outside the lifecycle, ignored by `adrkit validate`, counted by `adrkit list` and `adrkit instructions` until it is shaped or deleted.
|
|
42
42
|
|
|
43
43
|
```text
|
|
44
44
|
adr/
|
|
@@ -54,13 +54,14 @@ An uncommitted proposal is a local working-tree draft; committing it shares it.
|
|
|
54
54
|
|
|
55
55
|
## Tell your agent
|
|
56
56
|
|
|
57
|
-
Add the [reading rule](docs/workflow.md#read-decisions-before-coding) to `AGENTS.md` or `CLAUDE.md`. At task start, run `adrkit list`: read the relevant `implemented/` records in full, check `proposed/` for intent and `rejected/` for the bad cases they warn against, and consult `archived/` only for cited history. Do not filter by title alone. The `adrkit-init` skill guides setup; `adrkit update` refreshes installed skills. Before creating a record, compare it with active records covering the same choice and resolve a full replacement with `adrkit supersede --by` in the same change; when shipping or reviewing, use the `adrkit-implement` and `adrkit-review` skills to keep realization facts aligned with shipped code.
|
|
57
|
+
Agents over-focus on the current task and forget settled decisions; `adr/` is the memory against both. Add the [reading rule](docs/workflow.md#read-decisions-before-coding) to `AGENTS.md` or `CLAUDE.md`. At task start, run `adrkit list`: read the relevant `implemented/` records in full, check `proposed/` for intent and `rejected/` for the bad cases they warn against, and consult `archived/` only for cited history. Do not filter by title alone. The `adrkit-init` skill guides setup; `adrkit update` refreshes installed skills. Before creating a record, compare it with active records covering the same choice and resolve a full replacement with `adrkit supersede --by` in the same change; when shipping or reviewing, use the `adrkit-implement` and `adrkit-review` skills to keep realization facts aligned with shipped code.
|
|
58
58
|
|
|
59
59
|
## Commands
|
|
60
60
|
|
|
61
61
|
```text
|
|
62
62
|
adrkit init [path] [--tools <list>] [--workflows <list>]
|
|
63
63
|
adrkit propose <title>
|
|
64
|
+
adrkit note <text>
|
|
64
65
|
adrkit implement <name> --raised-by <human|agent> --decided-by <human|agent>
|
|
65
66
|
adrkit record <title> --raised-by <human|agent> --decided-by <human|agent>
|
|
66
67
|
adrkit reject <name> --reason <text>
|
package/README.zh.md
CHANGED
|
@@ -38,7 +38,7 @@ adrkit implement "使用 SQLite 存储会话" --raised-by human --decided-by hum
|
|
|
38
38
|
adrkit validate
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
已交付但尚未记录的选择可直接用 `adrkit record "<标题>" --raised-by human --decided-by human
|
|
41
|
+
已交付但尚未记录的选择可直接用 `adrkit record "<标题>" --raised-by human --decided-by human`。任务进行中遇到值得先记下、但还不值得展开成记录形态的选择时,`adrkit note "<一行>"` 把带时间戳的一行写进 `adr/notes.md`——它在生命周期之外,`adrkit validate` 忽略它,`adrkit list` 和 `adrkit instructions` 会计数显示,直到它被成形或删除。
|
|
42
42
|
|
|
43
43
|
```text
|
|
44
44
|
adr/
|
|
@@ -54,13 +54,14 @@ adr/
|
|
|
54
54
|
|
|
55
55
|
## 告诉 Agent
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
Agent 会过度聚焦手头任务、遗忘已定的决策;`adr/` 正是对这两者的记忆。将[任务开始阅读规则](docs/zh/workflow.md#任务开始前阅读决策)加入 `AGENTS.md` 或 `CLAUDE.md`。任务开始时先运行 `adrkit list`:四个目录是一份上下文预算——完整阅读相关的 `implemented/`;检查 `proposed/` 的意图与 `rejected/` 的反例;`archived/` 仅在任务明确引用历史时读。不能只看标题判断相关性。`adrkit-init` 指导配置,`adrkit update` 刷新已安装技能。创建记录前,先与涉及同一选择的现行记录比较,完整替代在同一次变更中用 `adrkit supersede --by` 解析;交付或审查时用 `adrkit-implement` 和 `adrkit-review` 技能保持实现事实与已交付代码一致。
|
|
58
58
|
|
|
59
59
|
## 命令
|
|
60
60
|
|
|
61
61
|
```text
|
|
62
62
|
adrkit init [path] [--tools <list>] [--workflows <list>]
|
|
63
63
|
adrkit propose <title>
|
|
64
|
+
adrkit note <text>
|
|
64
65
|
adrkit implement <name> --raised-by <human|agent> --decided-by <human|agent>
|
|
65
66
|
adrkit record <title> --raised-by <human|agent> --decided-by <human|agent>
|
|
66
67
|
adrkit reject <name> --reason <text>
|
|
@@ -135,4 +136,4 @@ npm run build
|
|
|
135
136
|
|
|
136
137
|
## 许可证
|
|
137
138
|
|
|
138
|
-
MIT
|
|
139
|
+
MIT.
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AA+EA,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CA4MzC"}
|
package/dist/cli.js
CHANGED
|
@@ -12,6 +12,7 @@ import { graphCommand } from './commands/graph.js';
|
|
|
12
12
|
import { initCommand } from './commands/init.js';
|
|
13
13
|
import { instructionsCommand } from './commands/instructions.js';
|
|
14
14
|
import { listCommand } from './commands/list.js';
|
|
15
|
+
import { noteCommand } from './commands/note.js';
|
|
15
16
|
import { proposeCommand } from './commands/propose.js';
|
|
16
17
|
import { rejectCommand } from './commands/reject.js';
|
|
17
18
|
import { showCommand } from './commands/show.js';
|
|
@@ -37,6 +38,7 @@ Usage:
|
|
|
37
38
|
adrkit record <title> --raised-by <human|agent> --decided-by <human|agent>
|
|
38
39
|
Record an already-shipped decision
|
|
39
40
|
adrkit propose <title> Create an unshipped proposal
|
|
41
|
+
adrkit note <text> Park a one-line decision note in adr/notes.md
|
|
40
42
|
adrkit implement <name> --raised-by <human|agent> --decided-by <human|agent>
|
|
41
43
|
Mark shipped proposal implemented; assign number
|
|
42
44
|
adrkit reject <name> --reason <reason> Reject a proposal; keep it as an anti-pattern
|
|
@@ -150,6 +152,11 @@ export function main(argv) {
|
|
|
150
152
|
console.log(proposeCommand(rest[0], process.cwd()));
|
|
151
153
|
return;
|
|
152
154
|
}
|
|
155
|
+
case 'note': {
|
|
156
|
+
requireTitle(rest, 'note');
|
|
157
|
+
console.log(noteCommand(rest[0], process.cwd()));
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
153
160
|
case 'record': {
|
|
154
161
|
requireTitle(rest, 'record');
|
|
155
162
|
console.log(recordCommand(rest[0], process.cwd(), requireDecidedBy(values['decided-by']), requireRaisedBy(values['raised-by'])));
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAA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C,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC7F,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../../src/commands/instructions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../../src/commands/instructions.ts"],"names":[],"mappings":"AAWA,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAgDvD"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { ADR_DIR, CONFIG_FILE, findRoot, installedWithNotice, readConfigSafe, withNotice } from '../core/config.js';
|
|
2
2
|
import { listRecords } from '../core/repository.js';
|
|
3
3
|
import { formatIssues, validateRecord, validateRepository } from '../core/validate.js';
|
|
4
|
+
import { unshapedNotesLine } from '../core/notes.js';
|
|
4
5
|
import { VERSION } from '../version.js';
|
|
6
|
+
// The one-line purpose anchor for the check-in moment: an agent glancing at
|
|
7
|
+
// this output re-binds adr/ to the drift and forgetting it exists to block.
|
|
8
|
+
const PURPOSE_LINE = "adr/ is this repository's memory against drift and forgetting: read it at task start, record when a choice settles.";
|
|
5
9
|
export function instructionsCommand(cwd) {
|
|
6
10
|
const root = findRoot(cwd);
|
|
7
11
|
if (root === undefined) {
|
|
@@ -10,7 +14,10 @@ export function instructionsCommand(cwd) {
|
|
|
10
14
|
const config = readConfigSafe(root);
|
|
11
15
|
const notice = config === undefined ? undefined : installedWithNotice(config, VERSION);
|
|
12
16
|
const issues = validateRepository(root);
|
|
13
|
-
|
|
17
|
+
// Every reachable output of this command opens with the purpose anchor, not
|
|
18
|
+
// only the happy paths: an agent fixing issues needs the same re-binding.
|
|
19
|
+
const validationIssues = () => withNotice(`${PURPOSE_LINE}\n\nThe repository has validation issues.\n\n${formatIssues(issues)}\n\nNext:\n adrkit validate`, notice);
|
|
20
|
+
const notes = unshapedNotesLine(root);
|
|
14
21
|
let records;
|
|
15
22
|
try {
|
|
16
23
|
records = listRecords(root);
|
|
@@ -23,7 +30,11 @@ export function instructionsCommand(cwd) {
|
|
|
23
30
|
return validationIssues();
|
|
24
31
|
}
|
|
25
32
|
if (proposed.length > 0) {
|
|
26
|
-
const lines = [
|
|
33
|
+
const lines = [
|
|
34
|
+
PURPOSE_LINE,
|
|
35
|
+
'',
|
|
36
|
+
`${proposed.length} proposal${proposed.length === 1 ? '' : 's'} pending:`,
|
|
37
|
+
];
|
|
27
38
|
const ready = [];
|
|
28
39
|
for (const record of proposed) {
|
|
29
40
|
const recordIssues = validateRecord(root, record);
|
|
@@ -31,6 +42,8 @@ export function instructionsCommand(cwd) {
|
|
|
31
42
|
ready.push(record.fileName);
|
|
32
43
|
lines.push(` ${recordIssues.length === 0 ? '✓' : '✗'} ${record.fileName} ${recordIssues.length === 0 ? 'validated - ready after shipping' : recordIssues[0].message}`);
|
|
33
44
|
}
|
|
45
|
+
if (notes.length > 0)
|
|
46
|
+
lines.push('', notes);
|
|
34
47
|
lines.push('', 'Next:');
|
|
35
48
|
for (const name of ready) {
|
|
36
49
|
lines.push(` adrkit implement ${name} --raised-by <human|agent> --decided-by <human|agent> # after shipping`);
|
|
@@ -43,6 +56,6 @@ export function instructionsCommand(cwd) {
|
|
|
43
56
|
if (issues.length > 0) {
|
|
44
57
|
return validationIssues();
|
|
45
58
|
}
|
|
46
|
-
return withNotice(
|
|
59
|
+
return withNotice(`${PURPOSE_LINE}\n\nNo proposals waiting.${notes.length > 0 ? `\n\n${notes}` : ''}\n\nNext:\n adrkit propose "an unshipped choice"\n adrkit record "an already-shipped choice" --raised-by <human|agent> --decided-by <human|agent>`, notice);
|
|
47
60
|
}
|
|
48
61
|
//# sourceMappingURL=instructions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../src/commands/instructions.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AAC,CAAC;IAC9C,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,OAAO,gBAAgB,EAAE,CAAC;IAC5B,CAAC;IACD,OAAO,UAAU,CAAC,GAAG,YAAY,4BAA4B,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,qJAAqJ,EAAE,MAAM,CAAC,CAAC;AACpQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"AAKA,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CA8B/C"}
|
package/dist/commands/list.js
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { installedWithNotice, readConfigSafe, requireRoot, withNotice } from '../core/config.js';
|
|
2
2
|
import { displayName, listRecords, relativePath } from '../core/repository.js';
|
|
3
|
+
import { unshapedNotesLine } from '../core/notes.js';
|
|
3
4
|
import { VERSION } from '../version.js';
|
|
4
5
|
export function listCommand(cwd) {
|
|
5
6
|
const root = requireRoot(cwd);
|
|
6
7
|
const config = readConfigSafe(root);
|
|
7
8
|
const notice = config === undefined ? undefined : installedWithNotice(config, VERSION);
|
|
8
9
|
const records = listRecords(root);
|
|
10
|
+
const notes = unshapedNotesLine(root);
|
|
9
11
|
if (records.length === 0) {
|
|
10
|
-
return withNotice(
|
|
12
|
+
return withNotice(notes.length > 0
|
|
13
|
+
? `no ADRs yet, but ${notes}`
|
|
14
|
+
: 'no ADRs yet: start one with "adrkit propose <title>" or "adrkit record <title> --raised-by human --decided-by human"', notice);
|
|
11
15
|
}
|
|
12
16
|
const lines = [];
|
|
13
17
|
for (const folder of ['proposed', 'implemented', 'rejected', 'archived']) {
|
|
@@ -23,6 +27,8 @@ export function listCommand(cwd) {
|
|
|
23
27
|
}
|
|
24
28
|
lines.push('');
|
|
25
29
|
}
|
|
30
|
+
if (notes.length > 0)
|
|
31
|
+
lines.push(notes, '');
|
|
26
32
|
return withNotice(lines.join('\n').trimEnd(), notice);
|
|
27
33
|
}
|
|
28
34
|
//# 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,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,
|
|
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,iBAAiB,EAAE,MAAM,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AK,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,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC5C,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,MAAM,CAAC,CAAC;AACxD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"note.d.ts","sourceRoot":"","sources":["../../src/commands/note.ts"],"names":[],"mappings":"AAGA,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAc7D"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { requireRoot } from '../core/config.js';
|
|
2
|
+
import { appendNote } from '../core/notes.js';
|
|
3
|
+
export function noteCommand(text, cwd) {
|
|
4
|
+
const trimmed = text.trim();
|
|
5
|
+
if (trimmed.length === 0) {
|
|
6
|
+
throw new Error('note requires a line of text');
|
|
7
|
+
}
|
|
8
|
+
const root = requireRoot(cwd);
|
|
9
|
+
const line = appendNote(root, trimmed);
|
|
10
|
+
return [
|
|
11
|
+
'noted in adr/notes.md',
|
|
12
|
+
'',
|
|
13
|
+
` ${line}`,
|
|
14
|
+
'',
|
|
15
|
+
'The buffer is capture, not record: shape it through adrkit propose / grill / record when the moment allows, and adrkit list counts what is still unshaped.',
|
|
16
|
+
].join('\n');
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=note.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"note.js","sourceRoot":"","sources":["../../src/commands/note.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,MAAM,UAAU,WAAW,CAAC,IAAY,EAAE,GAAW;IACnD,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IAC5B,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IAClD,CAAC;IACD,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;IAC9B,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACvC,OAAO;QACL,uBAAuB;QACvB,EAAE;QACF,KAAK,IAAI,EAAE;QACX,EAAE;QACF,4JAA4J;KAC7J,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* `src/commands/completion.ts` uses it to offer the same options, so the two
|
|
5
5
|
* cannot drift apart. Update this table whenever the CLI surface changes.
|
|
6
6
|
*/
|
|
7
|
-
export declare const COMMANDS: readonly ['init', 'propose', 'record', 'implement', 'reject', 'archive', 'supersede', 'list', 'show', 'status', 'instructions', 'validate', 'update', 'config', 'graph', 'tree', 'completion', 'version', 'help'];
|
|
7
|
+
export declare const COMMANDS: readonly ['init', 'propose', 'note', 'record', 'implement', 'reject', 'archive', 'supersede', 'list', 'show', 'status', 'instructions', 'validate', 'update', 'config', 'graph', 'tree', 'completion', 'version', 'help'];
|
|
8
8
|
/**
|
|
9
9
|
* Options each command accepts, spelled with their leading dashes. `--help` is
|
|
10
10
|
* valid everywhere; the global `--version` never reaches a command because the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-options.d.ts","sourceRoot":"","sources":["../../src/core/cli-options.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,QAAQ,YACnB,MAAM,EACN,SAAS,EACT,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,SAAS,EACT,WAAW,EACX,MAAM,EACN,MAAM,EACN,QAAQ,EACR,cAAc,EACd,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,MAAM,EACN,YAAY,EACZ,SAAS,EACT,MAAM,CACE,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"cli-options.d.ts","sourceRoot":"","sources":["../../src/core/cli-options.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,QAAQ,YACnB,MAAM,EACN,SAAS,EACT,MAAM,EACN,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,SAAS,EACT,WAAW,EACX,MAAM,EACN,MAAM,EACN,QAAQ,EACR,cAAc,EACd,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,MAAM,EACN,YAAY,EACZ,SAAS,EACT,MAAM,CACE,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAqBpD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,YAAI,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,CAAU,CAAC;AAEjH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAElD;AAED,wEAAwE;AACxE,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAKzF"}
|
package/dist/core/cli-options.js
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
export const COMMANDS = [
|
|
8
8
|
'init',
|
|
9
9
|
'propose',
|
|
10
|
+
'note',
|
|
10
11
|
'record',
|
|
11
12
|
'implement',
|
|
12
13
|
'reject',
|
|
@@ -33,6 +34,7 @@ export const COMMANDS = [
|
|
|
33
34
|
export const COMMAND_OPTIONS = {
|
|
34
35
|
init: ['--tools', '--workflows', '--help'],
|
|
35
36
|
propose: ['--help'],
|
|
37
|
+
note: ['--help'],
|
|
36
38
|
record: ['--raised-by', '--decided-by', '--help'],
|
|
37
39
|
implement: ['--raised-by', '--decided-by', '--help'],
|
|
38
40
|
reject: ['--reason', '--help'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-options.js","sourceRoot":"","sources":["../../src/core/cli-options.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,MAAM;IACN,SAAS;IACT,QAAQ;IACR,WAAW;IACX,QAAQ;IACR,SAAS;IACT,WAAW;IACX,MAAM;IACN,MAAM;IACN,QAAQ;IACR,cAAc;IACd,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,MAAM;IACN,YAAY;IACZ,SAAS;IACT,MAAM;CACE,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAA6B;IACvD,IAAI,EAAE,CAAC,SAAS,EAAE,aAAa,EAAE,QAAQ,CAAC;IAC1C,OAAO,EAAE,CAAC,QAAQ,CAAC;IACnB,MAAM,EAAE,CAAC,aAAa,EAAE,cAAc,EAAE,QAAQ,CAAC;IACjD,SAAS,EAAE,CAAC,aAAa,EAAE,cAAc,EAAE,QAAQ,CAAC;IACpD,MAAM,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC;IAC9B,OAAO,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC;IAC/B,SAAS,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;IAC7B,IAAI,EAAE,CAAC,QAAQ,CAA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AAO,EAAE,OAAO,EAAE,QAAQ,CAAC;IAC9F,IAAI,EAAE,CAAC,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC;IACjD,UAAU,EAAE,CAAC,QAAQ,CAAC;IACtB,OAAO,EAAE,CAAC,QAAQ,CAAC;IACnB,IAAI,EAAE,CAAC,QAAQ,CAAC;CACjB,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,CAAU,CAAC;AAEjH,MAAM,UAAU,UAAU,CAAC,MAAc;IACvC,OAAQ,aAAmC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC/D,CAAC;AAED,wEAAwE;AACxE,MAAM,UAAU,kBAAkB,CAAC,OAAe,EAAE,QAA2B;IAC7E,MAAM,OAAO,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IACzC,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACrC,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;IAC7B,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The note buffer: adr/notes.md, a plain file outside the lifecycle. It gives
|
|
3
|
+
* the settle moment a one-line legal action — capture now, shape later through
|
|
4
|
+
* propose/grill/record — without putting an unshaped fragment through the
|
|
5
|
+
* record format or inventing a fifth lifecycle folder (ADR 18). Nothing parses
|
|
6
|
+
* it: validate ignores the file (record discovery reads only the four
|
|
7
|
+
* lifecycle folders), and the commands that surface it count non-empty lines.
|
|
8
|
+
*/
|
|
9
|
+
export declare const NOTES_FILE = "notes.md";
|
|
10
|
+
export declare function notesPath(root: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Append one note line and return the written line. Multi-line or padded
|
|
13
|
+
* input collapses to the single line the buffer promises; empty text is a
|
|
14
|
+
* caller error the command layer reports.
|
|
15
|
+
*/
|
|
16
|
+
export declare function appendNote(root: string, text: string): string;
|
|
17
|
+
/** Number of unshaped notes: non-empty lines of the buffer, 0 without the file. */
|
|
18
|
+
export declare function countUnshapedNotes(root: string): number;
|
|
19
|
+
/** The one-line debt surfacing shared by `list` and `instructions`. Empty when no notes wait. */
|
|
20
|
+
export declare function unshapedNotesLine(root: string): string;
|
|
21
|
+
//# sourceMappingURL=notes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notes.d.ts","sourceRoot":"","sources":["../../src/core/notes.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,aAAa,CAAC;AAErC,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C;AAYD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAO7D;AAED,mFAAmF;AACnF,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMvD;AAED,iGAAiG;AACjG,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKtD"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { ADR_DIR } from './config.js';
|
|
4
|
+
/**
|
|
5
|
+
* The note buffer: adr/notes.md, a plain file outside the lifecycle. It gives
|
|
6
|
+
* the settle moment a one-line legal action — capture now, shape later through
|
|
7
|
+
* propose/grill/record — without putting an unshaped fragment through the
|
|
8
|
+
* record format or inventing a fifth lifecycle folder (ADR 18). Nothing parses
|
|
9
|
+
* it: validate ignores the file (record discovery reads only the four
|
|
10
|
+
* lifecycle folders), and the commands that surface it count non-empty lines.
|
|
11
|
+
*/
|
|
12
|
+
export const NOTES_FILE = 'notes.md';
|
|
13
|
+
export function notesPath(root) {
|
|
14
|
+
return join(root, ADR_DIR, NOTES_FILE);
|
|
15
|
+
}
|
|
16
|
+
/** Local timestamp prefix of a note line: `YYYY-MM-DD HH:mm`. */
|
|
17
|
+
function noteStamp() {
|
|
18
|
+
const now = new Date();
|
|
19
|
+
const pad = (value) => String(value).padStart(2, '0');
|
|
20
|
+
return (`${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad(now.getDate())}` +
|
|
21
|
+
` ${pad(now.getHours())}:${pad(now.getMinutes())}`);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Append one note line and return the written line. Multi-line or padded
|
|
25
|
+
* input collapses to the single line the buffer promises; empty text is a
|
|
26
|
+
* caller error the command layer reports.
|
|
27
|
+
*/
|
|
28
|
+
export function appendNote(root, text) {
|
|
29
|
+
const line = `${noteStamp()} ${text.replace(/\s+/g, ' ').trim()}`;
|
|
30
|
+
const file = notesPath(root);
|
|
31
|
+
const existing = existsSync(file) ? readFileSync(file, 'utf8') : '';
|
|
32
|
+
const separator = existing.length === 0 || existing.endsWith('\n') ? '' : '\n';
|
|
33
|
+
writeFileSync(file, `${existing}${separator}${line}\n`);
|
|
34
|
+
return line;
|
|
35
|
+
}
|
|
36
|
+
/** Number of unshaped notes: non-empty lines of the buffer, 0 without the file. */
|
|
37
|
+
export function countUnshapedNotes(root) {
|
|
38
|
+
const file = notesPath(root);
|
|
39
|
+
if (!existsSync(file))
|
|
40
|
+
return 0;
|
|
41
|
+
return readFileSync(file, 'utf8')
|
|
42
|
+
.split('\n')
|
|
43
|
+
.filter((line) => line.trim().length > 0).length;
|
|
44
|
+
}
|
|
45
|
+
/** The one-line debt surfacing shared by `list` and `instructions`. Empty when no notes wait. */
|
|
46
|
+
export function unshapedNotesLine(root) {
|
|
47
|
+
const count = countUnshapedNotes(root);
|
|
48
|
+
if (count === 0)
|
|
49
|
+
return '';
|
|
50
|
+
const noun = count === 1 ? 'note' : 'notes';
|
|
51
|
+
return `${count} unshaped ${noun} in adr/notes.md — park one: adrkit note "<one line>"; shape one: adrkit propose / grill / record`;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=notes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notes.js","sourceRoot":"","sources":["../../src/core/notes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAC;AAErC,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AACzC,CAAC;AAED,iEAAiE;AACjE,SAAS,SAAS;IAChB,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;IACvB,MAAM,GAAG,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACtE,OAAO,CACL,GAAG,GAAG,CAAC,WAAW,EAAE,IAAI,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,EAAE;QACvE,IAAI,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,EAAE,CACnD,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY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CAAC,OAAO,CAAC;IAC5C,OAAO,GAAG,KAAK,aAAa,IAAI,mGAAmG,CAAC;AACtI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../src/core/repository.ts"],"names":[],"mappings":"AAWA,OAAO,EAAgB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAExE,sDAAsD;AACtD,eAAO,MAAM,OAAO,EAAE,SAAS,EAAwD,CAAC;AAExF,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;
|
|
1
|
+
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../src/core/repository.ts"],"names":[],"mappings":"AAWA,OAAO,EAAgB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAExE,sDAAsD;AACtD,eAAO,MAAM,OAAO,EAAE,SAAS,EAAwD,CAAC;AAExF,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AA4ED,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,GAAE,MAAM,EAAO,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,UAAU,CA+BxG;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,MAAM,CAElE;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,CA0BrD;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,CAEvD;AA0CD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAiCpE;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQvD;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAMtG;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAQpD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAetE;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAEpD;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAMrD;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAItD"}
|
package/dist/core/repository.js
CHANGED
|
@@ -34,6 +34,10 @@ ${toolsYaml}${workflowsYaml}
|
|
|
34
34
|
}
|
|
35
35
|
const INIT_README = `# Architecture Decision Records
|
|
36
36
|
|
|
37
|
+
This directory is the repository's memory against two agent failure modes:
|
|
38
|
+
drifting from long-term decisions while deep in a task, and forgetting settled
|
|
39
|
+
choices until they resurface as inconsistencies.
|
|
40
|
+
|
|
37
41
|
Records follow the lifecycle folders proposed/, implemented/, rejected/, and
|
|
38
42
|
archived/. The folders are a context budget as well as a lifecycle:
|
|
39
43
|
implemented/ is current authority and is read in full; proposed/ is intent and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository.js","sourceRoot":"","sources":["../../src/core/repository.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EACT,WAAW,EACX,YAAY,EACZ,MAAM,EACN,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC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AC,CAAC;QAC/D,OAAO,IAAI,MAAM,CAAC,MAAM,KAAK,kBAAkB,EAAE,CAAC;IACpD,CAAC;IACD,OAAO,MAAM,CAAC,KAAK,CAAC;AACtB,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,MAAiB;IAC5C,4CAA4C;IAC5C,8CAA8C;IAC9C,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AACnE,CAAC"}
|
|
@@ -16,6 +16,13 @@ export interface Workflow {
|
|
|
16
16
|
description: string;
|
|
17
17
|
body: string;
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* The purpose sentence that opens the standing-orders section, binding adr/ to
|
|
21
|
+
* the two failure modes it exists to block. The template and this repository's
|
|
22
|
+
* dogfooded AGENTS.md must carry it verbatim; test/integrations.test.ts checks
|
|
23
|
+
* both sides.
|
|
24
|
+
*/
|
|
25
|
+
export declare const STANDING_ORDERS_PURPOSE = "`adr/` exists because agents over-focus on the current task and forget settled decisions: reading it at task start counters the drift, and recording when a choice settles counters the forgetting.";
|
|
19
26
|
export declare const WORKFLOWS: Workflow[];
|
|
20
27
|
/** Bare workflow names (without the `adrkit-` prefix), in canonical order. */
|
|
21
28
|
export declare const WORKFLOW_NAMES: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-integrations.d.ts","sourceRoot":"","sources":["../../src/core/tool-integrations.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAapD,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;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gB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,MAAM,EAAE,CAErF;AAED,qFAAqF;AACrF,eAAO,MAAM,uBAAuB,sCAAsC,CAAC;AAE3E;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,+CAA+C,CAAC;AAEjF;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAYnE;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,eAAe,EAAE,GAC9B,MAAM,GAAG,SAAS,CAcpB"}
|
|
@@ -4,6 +4,13 @@ const TARGET_DIRS = {
|
|
|
4
4
|
agents: { commands: '.agents/commands', skills: '.agents/skills' },
|
|
5
5
|
claude: { commands: '.claude/commands', skills: '.claude/skills' },
|
|
6
6
|
};
|
|
7
|
+
/**
|
|
8
|
+
* The purpose sentence that opens the standing-orders section, binding adr/ to
|
|
9
|
+
* the two failure modes it exists to block. The template and this repository's
|
|
10
|
+
* dogfooded AGENTS.md must carry it verbatim; test/integrations.test.ts checks
|
|
11
|
+
* both sides.
|
|
12
|
+
*/
|
|
13
|
+
export const STANDING_ORDERS_PURPOSE = '`adr/` exists because agents over-focus on the current task and forget settled decisions: reading it at task start counters the drift, and recording when a choice settles counters the forgetting.';
|
|
7
14
|
// The bodies mirror skills/<name>/SKILL.md one-to-one; the sync is
|
|
8
15
|
// machine-checked in test/integrations.test.ts.
|
|
9
16
|
export const WORKFLOWS = [
|
|
@@ -12,13 +19,15 @@ export const WORKFLOWS = [
|
|
|
12
19
|
description: "Use when initializing ADR Kit in a repository or when the agent cannot find an adr/ directory.",
|
|
13
20
|
body: `# ADR Kit Init
|
|
14
21
|
|
|
22
|
+
Installing ADR Kit wires a repository's decision memory into the surfaces agents read, against two failure modes: mid-task drift from long-term decisions, and forgetting settled choices until they bite.
|
|
23
|
+
|
|
15
24
|
Run \`adrkit init [path]\` for a new repository, or \`adrkit update\` if \`adr/\` exists. Confirm the four lifecycle folders: \`proposed/\`, \`implemented/\`, \`rejected/\`, and \`archived/\`. They are a context budget as well as a lifecycle: \`implemented/\` is current authority, \`proposed/\` is intent, \`rejected/\` is anti-pattern memory, and \`archived/\` is lowest-value frozen history. The CLI installs workflow skills but does not rewrite a project's standing orders.
|
|
16
25
|
|
|
17
26
|
Add or update this section in \`AGENTS.md\` (and \`CLAUDE.md\` when used):
|
|
18
27
|
|
|
19
28
|
## Reading architecture decisions
|
|
20
29
|
|
|
21
|
-
At the start of a coding, design, or review task, if \`adr/\` exists, run \`adrkit list\`. The four folders are a context budget: read the relevant \`implemented/\` records in full with \`adrkit show <N>\` or their files; check the relevant \`proposed/\` records for intent and the relevant \`rejected/\` records for the bad cases they warn against (a rejection is durable: it leaves only when another record owns its warning); treat \`archived/\` as frozen history and read it only when a task explicitly cites it. Do not judge relevance by title alone: inspect tags, paths, relationships, and task scope. Compare constraints with current code; explain conflicts or changed assumptions before choosing a different approach. Mention relevant ADR numbers and verify affected behavior. Re-read on a new or resumed task, or when scope changes. Read a \`## Deliberation\` appendix only when its decision is in play.
|
|
30
|
+
${STANDING_ORDERS_PURPOSE} At the start of a coding, design, or review task, if \`adr/\` exists, run \`adrkit list\`. The four folders are a context budget: read the relevant \`implemented/\` records in full with \`adrkit show <N>\` or their files; check the relevant \`proposed/\` records for intent and the relevant \`rejected/\` records for the bad cases they warn against (a rejection is durable: it leaves only when another record owns its warning); treat \`archived/\` as frozen history and read it only when a task explicitly cites it. Do not judge relevance by title alone: inspect tags, paths, relationships, and task scope. Compare constraints with current code; explain conflicts or changed assumptions before choosing a different approach. Mention relevant ADR numbers and verify affected behavior. Re-read on a new or resumed task, or when scope changes. Read a \`## Deliberation\` appendix only when its decision is in play.
|
|
22
31
|
|
|
23
32
|
Before creating a record, compare it with the active records covering the same choice or mechanism: extend a duplicate, fully replace through \`adrkit supersede --by\` in the same change, or link a partial overlap while the older record stays active. When shipping or reviewing, keep each active record's realization facts — paths, names, defaults — aligned with shipped code; a changed choice is a new record with an explicit relationship, not a rewrite of old rationale. Archived records are sealed in \`adr/archived/MANIFEST.json\`, never edited, and not read by default.
|
|
24
33
|
|
|
@@ -28,14 +37,16 @@ After installation, continue the original task; initializing ADR Kit is not itse
|
|
|
28
37
|
},
|
|
29
38
|
{
|
|
30
39
|
name: "adrkit-grill",
|
|
31
|
-
description: "Use when a decision is still being shaped or the user asks to grill a plan;
|
|
40
|
+
description: "Use when a decision is still being shaped, or the user asks to grill a plan; interrogate the design against the active records until no branch is silently assumed, and record every settled choice.",
|
|
32
41
|
body: `# ADR Kit Grill
|
|
33
42
|
|
|
43
|
+
Grilling is the co-design checkpoint an agent deep in a task will otherwise skip: it forces the conversation between the plan and the long-term decisions before anything settles.
|
|
44
|
+
|
|
34
45
|
Interrogate the user until the design tree has no silently assumed branch. This method is adapted from mattpocock/skills (MIT). For viewing existing records, use \`adrkit-visualize\`; grilling does not generate HTML by default.
|
|
35
46
|
|
|
36
47
|
## Method
|
|
37
48
|
|
|
38
|
-
1. Run \`adrkit list\`. Read the relevant \`implemented/\` records in full, check the relevant \`proposed/\` records for intent and the \`rejected/\` records for the bad cases they warn against, and consult \`archived/\` only when a task cites history. Recheck the inventory even if this conversation read it earlier; do not reopen a settled choice without naming that change. As the tree takes shape, search the active records for anything covering the same choice or mechanism, so a settled direction lands in the right record rather than a duplicate.
|
|
49
|
+
1. Run \`adrkit list\`. Read the relevant \`implemented/\` records in full, check the relevant \`proposed/\` records for intent and the \`rejected/\` records for the bad cases they warn against, and consult \`archived/\` only when a task cites history. Recheck the inventory even if this conversation read it earlier; do not reopen a settled choice without naming that change. \`adr/notes.md\` is the settle-moment buffer; read its unshaped lines as candidate material for the tree. As the tree takes shape, search the active records for anything covering the same choice or mechanism, so a settled direction lands in the right record rather than a duplicate.
|
|
39
50
|
2. Map root questions and their dependent questions. Work in rounds: ask every question on the currently answerable frontier, each with genuine options and your recommendation. A downstream question waits until its prerequisite is answered. Format questions as \`Q1 - <title>\` with a clear recommendation. Word each question so "yes" accepts your recommended answer.
|
|
40
51
|
3. Research repository and environment facts yourself. Do not ask the user for facts you can inspect. Let answers reshape the tree; record which option or question unlocked each follow-up.
|
|
41
52
|
4. Stop questioning only when the frontier is empty. State the proposed shared understanding and wait for the user's confirmation before acting or writing records.
|
|
@@ -51,6 +62,8 @@ State who raised and settled the unshipped choice in prose; proposal front matte
|
|
|
51
62
|
description: "Use when the user asks to visualize an existing ADR, its deliberation tree, or the whole decision set and its relationships.",
|
|
52
63
|
body: `# ADR Kit Visualize
|
|
53
64
|
|
|
65
|
+
Seeing the decision set as a picture surfaces relationships and contradictions that a file list hides.
|
|
66
|
+
|
|
54
67
|
Visualize existing records only when asked. Run \`adrkit list\` first, then read the record or relationships relevant to the requested view. Do not create a decision or invent a deliberation tree to make a picture.
|
|
55
68
|
|
|
56
69
|
- For one record's design tree, use \`adrkit tree <name> --html\` and save stdout to a local HTML file. If no \`## Deliberation\` appendix exists, say so instead of fabricating one.
|
|
@@ -61,10 +74,12 @@ When the user requests HTML visualization, open the generated file in the defaul
|
|
|
61
74
|
},
|
|
62
75
|
{
|
|
63
76
|
name: "adrkit-propose",
|
|
64
|
-
description: "Use when
|
|
77
|
+
description: "Use when you catch yourself settling a choice future work must live with — a dependency, format, boundary, or default — and adr/ does not already own it; the work is unshipped and the direction may be open or settled.",
|
|
65
78
|
body: `# ADR Kit Propose
|
|
66
79
|
|
|
67
|
-
|
|
80
|
+
A proposal is drift insurance: the cheapest durable home for a choice future tasks must inherit, written before the context that raised it evaporates.
|
|
81
|
+
|
|
82
|
+
Before writing, run \`adrkit list\` and search the active records — read relevant implemented records in full, and check proposed records for intent and rejected ones for the bad cases they warn against — for anything covering the same choice, mechanism, or rejected alternative. Read \`adr/notes.md\` too — its unshaped lines are the likeliest raw material for this record. Judge overlap from record content, not titles or tags; the CLI cannot infer it. Classify what you find:
|
|
68
83
|
|
|
69
84
|
- **Duplicate**: extend the existing record instead of opening a new one.
|
|
70
85
|
- **Full replacement**: write the new record, then resolve the old one in the same change with \`adrkit supersede --by\`; never leave duplicate active authority.
|
|
@@ -72,12 +87,23 @@ Before writing, run \`adrkit list\` and search the active records — read relev
|
|
|
72
87
|
- **Independent**: proceed without touching unrelated records.
|
|
73
88
|
|
|
74
89
|
Then run \`adrkit propose "<title>"\`; it creates a dated, unnumbered file in \`adr/proposed/\`. Fill Problem, Proposal, Alternatives considered, Acceptance criteria, and Risks with actual content. A settled direction stays proposed until shipped. An uncommitted file is a local working-tree draft; Git commit makes it shared. Run \`adrkit validate <name>\` and resolve missing requirements before formal review. Do not put provenance flags in proposal front matter; describe participants and reasoning in the body.`,
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: "adrkit-note",
|
|
93
|
+
description: "Use when you notice a choice future work must live with but cannot shape a record right now — park it as one line in the buffer and keep moving; the buffer is counted until shaped.",
|
|
94
|
+
body: `# ADR Kit Note
|
|
95
|
+
|
|
96
|
+
The note buffer is the one-line legal action at the settle moment: capture first, shape later — the quality gate stays with propose, grill, and record.
|
|
97
|
+
|
|
98
|
+
Run \`adrkit note "<one line>"\`; it appends a timestamped line to \`adr/notes.md\`, creating the file on first use. The buffer is a plain file outside the lifecycle — no front matter, no template, no number — and \`adrkit validate\` ignores it: notes are debt, not authority, and never a fifth lifecycle folder. Shape one when the moment allows — \`adrkit propose\` and \`adrkit grill\` read the buffer as candidate material, and \`adrkit record\` takes an already-shipped choice straight from it — and delete a line that shaped nothing. \`adrkit list\` and \`adrkit instructions\` count the unshaped lines so the debt stays visible.`,
|
|
75
99
|
},
|
|
76
100
|
{
|
|
77
101
|
name: "adrkit-record",
|
|
78
|
-
description: "Use when
|
|
102
|
+
description: "Use when a choice that will constrain future work has already shipped and adr/ does not own it yet; record it directly, with no pending proposal.",
|
|
79
103
|
body: `# ADR Kit Record
|
|
80
104
|
|
|
105
|
+
Recording a shipped choice at the moment of shipping keeps later tasks from re-deriving — and contradicting — it.
|
|
106
|
+
|
|
81
107
|
First run \`adrkit list\` and read relevant implemented records in full; also check proposed records for intent and rejected records for the bad cases they warn against. Compare content, not titles or tags — the CLI cannot infer semantic overlap. A duplicate means recording the choice in the existing record instead; a full replacement means recording the new decision and resolving the old one with \`adrkit supersede --by\` in the same change; a partial replacement keeps the older record active with a prose link between them.
|
|
82
108
|
|
|
83
109
|
Confirm the choice has actually shipped, and compare its claimed paths, names, defaults, and mechanisms with the current code and tests; the CLI cannot verify delivery. If a code change altered only the realization of an active decision, update those facts in the existing record rather than recording a new one; a changed choice always needs a new record and an explicit relationship. Run \`adrkit record "<title>" --raised-by <human|agent> --decided-by <human|agent>\`. Fill Problem, Decision, Alternatives considered, and Consequences with the shipped choice and genuine trade-offs. Use \`human\` for a person's judgment, \`agent\` for the agent's; passive human approval does not change an agent-origin choice. Run \`adrkit validate <N>\`.`,
|
|
@@ -87,6 +113,8 @@ Confirm the choice has actually shipped, and compare its claimed paths, names, d
|
|
|
87
113
|
description: "Use when checking ADR record format before implementation, rejection, archival, or commit.",
|
|
88
114
|
body: `# ADR Kit Validate
|
|
89
115
|
|
|
116
|
+
Validation keeps the record set a dependable memory: a format contract only works when drift fails loudly.
|
|
117
|
+
|
|
90
118
|
Run \`adrkit validate [name]\` for one record or \`adrkit validate\` for the repository. All four lifecycle folders are checked. A fresh proposal or record template intentionally fails until required sections contain real content. Fix the exact reported requirement; do not add placeholder prose merely to pass. Validate again after every lifecycle move.
|
|
91
119
|
|
|
92
120
|
Repository-wide validation also checks the archive seal: \`adr/archived/MANIFEST.json\` must cover exactly the archived records and match their bytes. When it reports drift — edited bytes, an unsealed file, a missing file, a malformed or missing manifest — restore the sealed bytes, the manifest entry, or the empty manifest; never re-seal changed archived content to make the check pass. Before pushing, \`adrkit validate --base <git-ref>\` additionally proves the archive only grew since that ref: entries sealed at the base must remain byte-identical, so a coordinated edit of an archived file and its hash still fails. A base that carries no readable manifest fails.`,
|
|
@@ -96,6 +124,8 @@ Repository-wide validation also checks the archive seal: \`adr/archived/MANIFEST
|
|
|
96
124
|
description: "Use when a proposal has shipped and should become a numbered, active decision.",
|
|
97
125
|
body: `# ADR Kit Implement
|
|
98
126
|
|
|
127
|
+
Promotion is what makes \`implemented/\` trustworthy authority — shipped guidance rather than intent — so later tasks can rely on what they read in full.
|
|
128
|
+
|
|
99
129
|
Confirm the proposal's work is shipped, not merely accepted for review. Compare the record's claimed paths, names, defaults, and mechanisms with the current code and tests, and check the active records for overlap with this choice: a full replacement is promoted and then resolved with \`adrkit supersede --by\` in the same change, while a partial replacement keeps the older record active and links both. Run \`adrkit show <name>\` and \`adrkit validate <name>\`; resolve errors. Then run \`adrkit implement <name> --raised-by <human|agent> --decided-by <human|agent>\`. The command assigns the next stable ADR number, rewrites proposal sections into a shipped decision, moves the record from \`proposed/\` to \`implemented/\`, and preserves \`created\` and \`tags\`. Inspect the generated Decision and Consequences so they state shipped facts rather than proposal-era intent, then validate the numbered record. Do not infer the two provenance declarations from the command runner.`,
|
|
100
130
|
},
|
|
101
131
|
{
|
|
@@ -103,6 +133,8 @@ Confirm the proposal's work is shipped, not merely accepted for review. Compare
|
|
|
103
133
|
description: "Use when checking whether changed code and changed decision records still agree; scoped to record coherence, not general code review.",
|
|
104
134
|
body: `# ADR Kit Review
|
|
105
135
|
|
|
136
|
+
Review closes the loop between decisions and code: it catches the moment a change quietly stops obeying the record set, before the drift becomes a bug.
|
|
137
|
+
|
|
106
138
|
Review decision-record coherence for a change, not general code quality. Run \`adrkit list\` first, then:
|
|
107
139
|
|
|
108
140
|
- Compare each changed or newly shipped record with the changed code and tests: claimed paths, names, defaults, mechanisms, and verification evidence must match what actually shipped.
|
|
@@ -116,6 +148,8 @@ Report evidence-backed findings that name the record and the code evidence. Find
|
|
|
116
148
|
description: "Use when a formal proposal is declined and its anti-pattern should be recorded.",
|
|
117
149
|
body: `# ADR Kit Reject
|
|
118
150
|
|
|
151
|
+
A rejection is memory of the road not taken; without it, a later task re-walks the same dead end.
|
|
152
|
+
|
|
119
153
|
Read the proposal and check its alternatives. Run \`adrkit reject <name> --reason "<the tempting mistake this blocks>"\`. It moves the dated file from \`proposed/\` to \`rejected/\`, stamps the lifecycle date, and preserves the record and reason. A rejected proposal gets no ADR number. \`rejected/\` is a durable terminal record of a declined proposal — not a graveyard and not a cache: keep it, and remove it only when another record owns the warning it blocks, never merely because it seems stale. Its reason names that warning. Rejections are unnumbered and unsealed, so removing a redundant one cannot reuse a number or break the archive. Do not use rejection to erase a settled but merely unshipped choice; that remains proposed.`,
|
|
120
154
|
},
|
|
121
155
|
{
|
|
@@ -123,6 +157,8 @@ Read the proposal and check its alternatives. Run \`adrkit reject <name> --reaso
|
|
|
123
157
|
description: "Use when an implemented record no longer guides work and current behavior has another authoritative owner.",
|
|
124
158
|
body: `# ADR Kit Archive
|
|
125
159
|
|
|
160
|
+
Archiving keeps the active set small enough to actually be read: guidance that stopped earning its context budget retires to sealed history.
|
|
161
|
+
|
|
126
162
|
Confirm the record has shipped, its distinct rationale no longer guides future work, and current behavior has another authoritative owner. Do not archive by age or quota. Run \`adrkit archive <N> --reason "<owner and why retired>"\`. The numbered record moves from \`implemented/\` to \`archived/\` — the lowest-value folder: sealed, frozen history, not current authority, and not read by default. Its number and history remain, and the command appends a content seal for the final archived file to \`adr/archived/MANIFEST.json\`. Validate afterward. Never edit an archived file or its seal after archival; if validation reports drift, restore the sealed bytes. If a newer implemented decision fully replaces it, use \`adrkit supersede --by\` instead; partial replacement leaves the still-relevant record active.`,
|
|
127
163
|
},
|
|
128
164
|
{
|
|
@@ -130,6 +166,8 @@ Confirm the record has shipped, its distinct rationale no longer guides future w
|
|
|
130
166
|
description: "Use when one implemented decision fully replaces another and the old record must become archived history.",
|
|
131
167
|
body: `# ADR Kit Supersede
|
|
132
168
|
|
|
169
|
+
Supersession turns a changed decision into an explicit handover instead of a silent contradiction between old and new guidance.
|
|
170
|
+
|
|
133
171
|
First record or implement the replacement and validate it. Confirm it fully replaces the old decision; partial overlap calls for prose links while the old record remains active. Run \`adrkit supersede <old> --by <new>\`. Both records must be implemented; the command stamps \`superseded-by\`, moves the old numbered file into \`archived/\` (lowest-value frozen history), preserves its provenance and number, and seals the archived file in \`adr/archived/MANIFEST.json\`. Run \`adrkit validate\` to check the chain and the new seal. Do not edit the archived choice or rationale afterward.`,
|
|
134
172
|
},
|
|
135
173
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-integrations.js","sourceRoot":"","sources":["../../src/core/tool-integrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7G,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAuBpD,MAAM,WAAW,GAA0C;IACzD,MAAM,EAAE,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,EAAE,gBAAgB,EAAE;IAClE,MAAM,EAAE,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,EAAE,gBAAgB,EAAE;CACnE,CAAC;AAQF,mEAAmE;AACnE,gDAAgD;AAChD,MAAM,CAAC,MAAM,SAAS,GAAe;IACnC;QACE,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,gGAAgG;QAC7G,IAAI,EAAE
|
|
1
|
+
{"version":3,"file":"tool-integrations.js","sourceRoot":"","sources":["../../src/core/tool-integrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7G,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAuBpD,MAAM,WAAW,GAA0C;IACzD,MAAM,EAAE,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,EA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