ADR - Architecture Decision Records(轻量级架构决策记录工具)
Inspired by https://github.com/npryce/adr-tools, but supported Windows.
ADR Blogpost: Documenting Architecture Decisions
A good material about Architecture decision record
中文翻译:架构决策记录
功能特性
Features
template.md
(or template.adoc
, template.asciidoc
) file in the save pathnpm install -g adr
adr init <language>
e.x: adr init en
adr new <decision>
e.x: adr new "create project"
. It will open the new file with your config editor
adr list
result:
╔══════════════════════════════════════╤══════════════╤═══════════════════╗
║ Decision │ Last Modified│ Last Status ║
╟──────────────────────────────────────┼──────────────┼───────────────────╢
║ 1.编写完整的单元测试 │ 2017-11-26 │ 2017-11-26 已完成 ║
╟──────────────────────────────────────┼──────────────┼───────────────────╢
║ 2.添加目录生成 │ 2017-11-26 │ 2017-11-25 已完成 ║
╟──────────────────────────────────────┼──────────────┼───────────────────╢
║ 3.图形生成功能 │ 2017-11-26 │ 2017-11-24 已完成 ║
╟──────────────────────────────────────┼──────────────┼───────────────────╢
║ 4.生成在线图形 │ 2017-11-26 │ 2017-11-22 提议 ║
╚══════════════════════════════════════╧══════════════╧═══════════════════╝
adr generate toc
results:
# Architecture Decision Records
* [1. 编写完整的单元测试](001-编写完整的单元测试.md)
* [2. 添加目录生成](002-添加目录生成.md)
* [3. 图形生成](003-图形生成.md)
adr generate graph
results:
digraph {
node [shape=plaintext];
_1 [label="1.编写完整的单元测试"; URL="001-编写完整的单元测试.md"]
_2 [label="2.添加目录生成"; URL="002-添加目录生成.md"]
_1 -> _2 [style="dotted"];
_3 [label="3.图形生成"; URL="003-图形生成.md"]
_2 -> _3 [style="dotted"];
}
adr update
adr logs <index>
e.x. adr logs 9
╔════════════╤══════╗
║ - │ - ║
╟────────────┼──────╢
║ 2017-11-23 │ 提议 ║
╟────────────┼──────╢
║ 2017-11-24 │ 通过 ║
╚════════════╧══════╝
support: json, csv, html, markdown
adr export <type>
e.x. adr export csv
Index, 决策, 上次修改时间, 最后状态
1, 编写完整的单元测试, 2017-11-26, 2017-11-26 已完成
2, 添加目录生成, 2017-11-26, 2017-11-25 已完成
3, 图形生成功能, 2017-11-26, 2017-11-24 已完成
adr search <keyword>
e.x. adr search 测试
╔══════════════════════╤══════════════════╗
║ 决策 │ 最后状态 ║
╟──────────────────────┼──────────────────╢
║ 19.添加-e2e-测试 │ 2017-11-28 提议 ║
╟──────────────────────┼──────────────────╢
║ 1.编写完整的单元测试 │ 2017-11-26 完成 ║
╚══════════════════════╧══════════════════╝
current:
/System/Applications/TextEdit.app/Contents/MacOS/TextEdit
adr
commands in NFC (Normalization Form Canonical Composition) format, e.x. true
md
for Markdown (default value) oradoc
for asciidocexample config:
{
"path":"doc/adr/",
"language":"zh-cn",
"prefix": "",
"digits": 4,
"editor": "code",
"force_nfc": true,
"extension": "md"
}
@ 2017~2021 A Phodal Huang's Idea. This code is distributed under the MIT license. See LICENSE
in this directory.