@saydone/dab 0.0.0-stage → 0.1.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.
Files changed (191) hide show
  1. package/AGENTS.md +55 -0
  2. package/CHANGELOG.md +27 -0
  3. package/CHANGELOG.zh.md +27 -0
  4. package/LICENSE +21 -0
  5. package/README.i18n.yaml +55 -0
  6. package/README.md +147 -2
  7. package/README.zh.md +148 -0
  8. package/dist/adapter/claude-code/adapter.d.ts +10 -0
  9. package/dist/adapter/claude-code/adapter.js +223 -0
  10. package/dist/adapter/claude-code/adapter.js.map +1 -0
  11. package/dist/adapter/claude-code/hooks.d.ts +10 -0
  12. package/dist/adapter/claude-code/hooks.js +58 -0
  13. package/dist/adapter/claude-code/hooks.js.map +1 -0
  14. package/dist/adapter/claude-code/instructions.d.ts +26 -0
  15. package/dist/adapter/claude-code/instructions.js +235 -0
  16. package/dist/adapter/claude-code/instructions.js.map +1 -0
  17. package/dist/adapter/claude-code/options.d.ts +12 -0
  18. package/dist/adapter/claude-code/options.js +27 -0
  19. package/dist/adapter/claude-code/options.js.map +1 -0
  20. package/dist/adapter/claude-code/policy-compile.d.ts +30 -0
  21. package/dist/adapter/claude-code/policy-compile.js +293 -0
  22. package/dist/adapter/claude-code/policy-compile.js.map +1 -0
  23. package/dist/adapter/claude-code/projection.d.ts +35 -0
  24. package/dist/adapter/claude-code/projection.js +266 -0
  25. package/dist/adapter/claude-code/projection.js.map +1 -0
  26. package/dist/adapter/claude-code/settings-plan.d.ts +12 -0
  27. package/dist/adapter/claude-code/settings-plan.js +64 -0
  28. package/dist/adapter/claude-code/settings-plan.js.map +1 -0
  29. package/dist/adapter/claude-code/settings.d.ts +21 -0
  30. package/dist/adapter/claude-code/settings.js +58 -0
  31. package/dist/adapter/claude-code/settings.js.map +1 -0
  32. package/dist/adapter/claude-code/version.d.ts +8 -0
  33. package/dist/adapter/claude-code/version.js +32 -0
  34. package/dist/adapter/claude-code/version.js.map +1 -0
  35. package/dist/adapter/registry.d.ts +3 -0
  36. package/dist/adapter/registry.js +8 -0
  37. package/dist/adapter/registry.js.map +1 -0
  38. package/dist/adapter/types.d.ts +63 -0
  39. package/dist/adapter/types.js +2 -0
  40. package/dist/adapter/types.js.map +1 -0
  41. package/dist/cli.d.ts +12 -0
  42. package/dist/cli.js +270 -0
  43. package/dist/cli.js.map +1 -0
  44. package/dist/commands/detect.d.ts +30 -0
  45. package/dist/commands/detect.js +214 -0
  46. package/dist/commands/detect.js.map +1 -0
  47. package/dist/commands/init.d.ts +45 -0
  48. package/dist/commands/init.js +590 -0
  49. package/dist/commands/init.js.map +1 -0
  50. package/dist/commands/normalize.d.ts +53 -0
  51. package/dist/commands/normalize.js +366 -0
  52. package/dist/commands/normalize.js.map +1 -0
  53. package/dist/commands/policy-explain.d.ts +47 -0
  54. package/dist/commands/policy-explain.js +274 -0
  55. package/dist/commands/policy-explain.js.map +1 -0
  56. package/dist/core/command.d.ts +13 -0
  57. package/dist/core/command.js +68 -0
  58. package/dist/core/command.js.map +1 -0
  59. package/dist/core/compare.d.ts +7 -0
  60. package/dist/core/compare.js +16 -0
  61. package/dist/core/compare.js.map +1 -0
  62. package/dist/core/diagnostics.d.ts +13 -0
  63. package/dist/core/diagnostics.js +47 -0
  64. package/dist/core/diagnostics.js.map +1 -0
  65. package/dist/core/errors.d.ts +25 -0
  66. package/dist/core/errors.js +45 -0
  67. package/dist/core/errors.js.map +1 -0
  68. package/dist/core/exit-codes.d.ts +8 -0
  69. package/dist/core/exit-codes.js +8 -0
  70. package/dist/core/exit-codes.js.map +1 -0
  71. package/dist/core/fs-atomic.d.ts +7 -0
  72. package/dist/core/fs-atomic.js +84 -0
  73. package/dist/core/fs-atomic.js.map +1 -0
  74. package/dist/core/gitignore.d.ts +6 -0
  75. package/dist/core/gitignore.js +54 -0
  76. package/dist/core/gitignore.js.map +1 -0
  77. package/dist/core/hash.d.ts +1 -0
  78. package/dist/core/hash.js +5 -0
  79. package/dist/core/hash.js.map +1 -0
  80. package/dist/core/json.d.ts +3 -0
  81. package/dist/core/json.js +21 -0
  82. package/dist/core/json.js.map +1 -0
  83. package/dist/core/markdown-links.d.ts +5 -0
  84. package/dist/core/markdown-links.js +37 -0
  85. package/dist/core/markdown-links.js.map +1 -0
  86. package/dist/core/paths.d.ts +12 -0
  87. package/dist/core/paths.js +129 -0
  88. package/dist/core/paths.js.map +1 -0
  89. package/dist/core/platform.d.ts +1 -0
  90. package/dist/core/platform.js +7 -0
  91. package/dist/core/platform.js.map +1 -0
  92. package/dist/core/security.d.ts +2 -0
  93. package/dist/core/security.js +101 -0
  94. package/dist/core/security.js.map +1 -0
  95. package/dist/core/semver.d.ts +9 -0
  96. package/dist/core/semver.js +32 -0
  97. package/dist/core/semver.js.map +1 -0
  98. package/dist/core/version-check.d.ts +10 -0
  99. package/dist/core/version-check.js +28 -0
  100. package/dist/core/version-check.js.map +1 -0
  101. package/dist/core/yaml.d.ts +4 -0
  102. package/dist/core/yaml.js +24 -0
  103. package/dist/core/yaml.js.map +1 -0
  104. package/dist/detect/ancestor-claude-md.d.ts +1 -0
  105. package/dist/detect/ancestor-claude-md.js +33 -0
  106. package/dist/detect/ancestor-claude-md.js.map +1 -0
  107. package/dist/detect/checks.d.ts +13 -0
  108. package/dist/detect/checks.js +525 -0
  109. package/dist/detect/checks.js.map +1 -0
  110. package/dist/docs/budgets.d.ts +2 -0
  111. package/dist/docs/budgets.js +57 -0
  112. package/dist/docs/budgets.js.map +1 -0
  113. package/dist/docs/cli.d.ts +7 -0
  114. package/dist/docs/cli.js +102 -0
  115. package/dist/docs/cli.js.map +1 -0
  116. package/dist/docs/config.d.ts +8 -0
  117. package/dist/docs/config.js +77 -0
  118. package/dist/docs/config.js.map +1 -0
  119. package/dist/docs/doc-sync.d.ts +10 -0
  120. package/dist/docs/doc-sync.js +33 -0
  121. package/dist/docs/doc-sync.js.map +1 -0
  122. package/dist/docs/files.d.ts +1 -0
  123. package/dist/docs/files.js +42 -0
  124. package/dist/docs/files.js.map +1 -0
  125. package/dist/docs/links.d.ts +3 -0
  126. package/dist/docs/links.js +90 -0
  127. package/dist/docs/links.js.map +1 -0
  128. package/dist/docs/markdown.d.ts +55 -0
  129. package/dist/docs/markdown.js +227 -0
  130. package/dist/docs/markdown.js.map +1 -0
  131. package/dist/docs/notes.d.ts +2 -0
  132. package/dist/docs/notes.js +175 -0
  133. package/dist/docs/notes.js.map +1 -0
  134. package/dist/docs/pairing.d.ts +45 -0
  135. package/dist/docs/pairing.js +472 -0
  136. package/dist/docs/pairing.js.map +1 -0
  137. package/dist/docs/wrap.d.ts +2 -0
  138. package/dist/docs/wrap.js +98 -0
  139. package/dist/docs/wrap.js.map +1 -0
  140. package/dist/init/ai-proposal.d.ts +15 -0
  141. package/dist/init/ai-proposal.js +164 -0
  142. package/dist/init/ai-proposal.js.map +1 -0
  143. package/dist/init/scanner.d.ts +22 -0
  144. package/dist/init/scanner.js +183 -0
  145. package/dist/init/scanner.js.map +1 -0
  146. package/dist/init/templates.d.ts +41 -0
  147. package/dist/init/templates.js +310 -0
  148. package/dist/init/templates.js.map +1 -0
  149. package/dist/model/agents-md.d.ts +6 -0
  150. package/dist/model/agents-md.js +41 -0
  151. package/dist/model/agents-md.js.map +1 -0
  152. package/dist/model/agents.d.ts +2 -0
  153. package/dist/model/agents.js +322 -0
  154. package/dist/model/agents.js.map +1 -0
  155. package/dist/model/diagnostics-codes.d.ts +33 -0
  156. package/dist/model/diagnostics-codes.js +34 -0
  157. package/dist/model/diagnostics-codes.js.map +1 -0
  158. package/dist/model/facts.d.ts +10 -0
  159. package/dist/model/facts.js +16 -0
  160. package/dist/model/facts.js.map +1 -0
  161. package/dist/model/frontmatter.d.ts +17 -0
  162. package/dist/model/frontmatter.js +97 -0
  163. package/dist/model/frontmatter.js.map +1 -0
  164. package/dist/model/hooks.d.ts +2 -0
  165. package/dist/model/hooks.js +175 -0
  166. package/dist/model/hooks.js.map +1 -0
  167. package/dist/model/memory.d.ts +3 -0
  168. package/dist/model/memory.js +165 -0
  169. package/dist/model/memory.js.map +1 -0
  170. package/dist/model/policy.d.ts +8 -0
  171. package/dist/model/policy.js +46 -0
  172. package/dist/model/policy.js.map +1 -0
  173. package/dist/model/project-manifest.d.ts +26 -0
  174. package/dist/model/project-manifest.js +208 -0
  175. package/dist/model/project-manifest.js.map +1 -0
  176. package/dist/model/rules.d.ts +2 -0
  177. package/dist/model/rules.js +98 -0
  178. package/dist/model/rules.js.map +1 -0
  179. package/dist/model/schemas.d.ts +350 -0
  180. package/dist/model/schemas.js +303 -0
  181. package/dist/model/schemas.js.map +1 -0
  182. package/dist/model/scope.d.ts +16 -0
  183. package/dist/model/scope.js +147 -0
  184. package/dist/model/scope.js.map +1 -0
  185. package/dist/model/skills.d.ts +2 -0
  186. package/dist/model/skills.js +111 -0
  187. package/dist/model/skills.js.map +1 -0
  188. package/dist/model/types.d.ts +87 -0
  189. package/dist/model/types.js +2 -0
  190. package/dist/model/types.js.map +1 -0
  191. package/package.json +59 -4
package/AGENTS.md ADDED
@@ -0,0 +1,55 @@
1
+ # DAB — Drive Agent as Builder
2
+
3
+ DAB turns `AGENTS.md` and `.agents/` into governed Claude Code configuration.
4
+ `.claude/` is generated; never edit it by hand.
5
+
6
+ ## Project map
7
+
8
+ - `src/cli.ts`: command dispatch and exit codes.
9
+ - `src/commands/`: `init`, `detect`, `normalize`, `policy explain`.
10
+ - `src/model/`: authored source schemas and discovery.
11
+ - `src/model/scope.ts`: scope and source-root resolution.
12
+ - `src/model/facts.ts`: common source-fact discovery.
13
+ - `src/adapter/types.ts`: target adapter contract.
14
+ - `src/adapter/claude-code/adapter.ts`: Claude target adapter.
15
+ - `src/adapter/claude-code/instructions.ts`: instruction artifact.
16
+ - `src/adapter/claude-code/`: policy compilation, projections and settings.
17
+ - `src/detect/`: drift checks.
18
+ - `src/init/`: repository scan and templates.
19
+ - `src/docs/`: bilingual documentation gates.
20
+ - `docs/`: architecture, development and user documentation.
21
+ - `docs/superpowers/`: Chinese-only specs and plans for the superpowers workflow.
22
+ - `.agents/`: agents, skills, rules, policies, hooks and shared memory.
23
+
24
+ ## Commands
25
+
26
+ - Install: `pnpm install`
27
+ - Build: `pnpm build`
28
+ - Test: `pnpm test`
29
+ - Typecheck: `pnpm typecheck`
30
+ - Docs gate: `pnpm doc-sync`
31
+ - Normalize generated config: `node dist/cli.js normalize`
32
+ - Detect drift: `node dist/cli.js detect`
33
+
34
+ ## Rules
35
+
36
+ 1. `AGENTS.md` and `.agents/` are the only authored agent configuration. Never edit `.claude/` by hand.
37
+ 2. Write a failing test before production code. Run the focused test, then the full suite.
38
+ 3. Keep TypeScript ESM, Node `>=24.9`, and the public `dab` command stable.
39
+ 4. Fail loud: no silent fallback, no silent permission widening, no deletion of unmanaged files.
40
+ 5. Update English and Chinese documentation in the same change. The pairing record is part of the change. Chinese-only artifacts under `docs/superpowers/` are exempt unless explicitly requested.
41
+ 6. Run `pnpm doc-sync` before committing documentation changes.
42
+ 7. Record important decisions in `.agents/notes/` with alternatives, consequences and verification.
43
+ 8. Use `feature-delivery` for scoped work and `doc-sync` when changing paired docs.
44
+
45
+ ## Documentation
46
+
47
+ - [Why DAB exists](docs/concepts/why-dab.md)
48
+ - [Roadmap](docs/roadmap.md)
49
+ - [Architecture](docs/architecture.md)
50
+ - [Development](docs/development.md)
51
+ - [CLI](docs/user/cli.md)
52
+ - [Claude Code integration](docs/user/claude-code.md)
53
+ - [Superpowers docs](docs/superpowers/README.md)
54
+ - [Agent Note 0001](.agents/notes/implemented/architecture/2026-11-16-agents-source-tree.md)
55
+ - [Agent Note 0002](.agents/notes/implemented/architecture/2026-11-16-claude-md-compat-shim.md)
package/CHANGELOG.md ADDED
@@ -0,0 +1,27 @@
1
+ English | [中文](CHANGELOG.zh.md)
2
+
3
+ # Changelog
4
+
5
+ ## 0.1.1 — 2026-11-19
6
+
7
+ - Published the CLI as `@saydone/dab` with a GitHub Actions release workflow, npm provenance and a GitHub Release for each tag.
8
+ - Added `schemaVersion: 1` to every `--json` result and rejected `--json` with `--help` or `--version`.
9
+ - Agent, skill and rule frontmatter now preserves unknown top-level fields and warns with a did-you-mean hint, including transposed letters; DAB-owned YAML remains strict.
10
+ - Added `dab detect --strict` to fail CI on project and configuration warnings.
11
+ - `dab normalize --json` includes an absolute `root`; `dab init --json` includes `root` and `scopeRoot`, with generated and backup paths relative to them.
12
+ - Unified the Windows platform guard across all commands and reduced normalize to one Claude Code version check.
13
+ - Made file and diagnostic ordering locale-independent so hashes and JSON stay stable across machines.
14
+ - `dab --version` now reads the version from `package.json`.
15
+ - Added independent project and global scopes with v2 manifests and per-target generated records.
16
+ - Added the target adapter foundation and symlink-first Claude Code instruction artifacts.
17
+ - Added the bilingual conceptual model for DAB, DAD and their nested delivery levels.
18
+ - Clarified the boundary between implemented governance and planned evidence work.
19
+ - Reordered the roadmap around DAD first, with DAB gated on observed goal-level delivery failures.
20
+
21
+ ## 0.1.0 — 2026-11-16
22
+
23
+ - Initial `dab` CLI with `init`, `detect`, `normalize` and `policy explain`.
24
+ - Claude Code-first adapter with deterministic `.claude/settings.json` and per-entry symlinks.
25
+ - Generated `.claude/CLAUDE.md` import shim for AGENTS.md compatibility.
26
+ - Bilingual documentation gates for pairing, links, wrap, budgets and Agent Notes.
27
+ - Shared policy and Claude Code adapter layers with deny-first compilation.
@@ -0,0 +1,27 @@
1
+ [English](CHANGELOG.md) | 中文
2
+
3
+ # 变更日志
4
+
5
+ ## 0.1.1 — 2026-11-19
6
+
7
+ - 以 `@saydone/dab` 发布 CLI,并增加 GitHub Actions release workflow、npm provenance 和逐 tag 的 GitHub Release。
8
+ - `schemaVersion: 1` 已加入每个 `--json` 结果,并拒绝 `--json` 与 `--help` 或 `--version` 组合使用。
9
+ - Agent、skill 和 rule frontmatter 现在保留未知顶层字段,并以 did-you-mean 提示发出警告(包含字母转置);DAB 自有 YAML 仍然严格。
10
+ - 增加 `dab detect --strict`,在项目/配置类 warning 时让 CI 失败。
11
+ - `dab normalize --json` 包含绝对 `root`;`dab init --json` 包含 `root` 和 `scopeRoot`,生成与 backup 路径相对于它们。
12
+ - 统一所有命令的 Windows 平台守卫,并将 normalize 的 Claude Code 版本检查减少为一次。
13
+ - 文件与诊断排序不再依赖 locale,使哈希和 JSON 在不同机器上保持稳定。
14
+ - `dab --version` 现在从 `package.json` 读取版本。
15
+ - 增加相互独立的 project/global scope、v2 manifest 和逐 target 生成记录。
16
+ - 增加 target adapter 基础层和 symlink 优先的 Claude Code 指令产物。
17
+ - 增加 DAB、DAD 及其嵌套交付层级的中英文概念模型。
18
+ - 明确区分已实现的治理能力与计划中的证据能力。
19
+ - 将 Roadmap 重排为 DAD 优先,并以真实目标级交付失败作为 DAB 的研究门槛。
20
+
21
+ ## 0.1.0 — 2026-11-16
22
+
23
+ - 初始 `dab` CLI,包含 `init`、`detect`、`normalize` 和 `policy explain`。
24
+ - Claude Code-first adapter,生成确定性的 `.claude/settings.json` 和逐项符号链接。
25
+ - 生成 `.claude/CLAUDE.md` 导入垫片,兼容 AGENTS.md。
26
+ - 双语文档门禁,覆盖配对、链接、排版、预算和 Agent 决策记录。
27
+ - 共享策略与 Claude Code adapter 分层,采用 deny 优先编译。
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DAB contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,55 @@
1
+ version: 1
2
+ source: README.md
3
+ translation: README.zh.md
4
+ frontmatter:
5
+ source: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
6
+ translation: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
7
+ sections:
8
+ - index: 0
9
+ level: 0
10
+ source: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b
11
+ translation: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b
12
+ - index: 1
13
+ level: 1
14
+ source: d7f8fe9e8582cc22e7cf0aab17534df3b344f8a3c40debe6a5008cc2141002bb
15
+ translation: 3cc7fe20c7cc7a2f8c0f6e3c86f353fc796aa5ed12daa71e624846fa153849b3
16
+ - index: 2
17
+ level: 2
18
+ source: f3ed1fffec70326edfdfb14bcfb8c2aff0f611c52f6d040ff3b7f833b5379146
19
+ translation: 6b4daa93e70cde4f4d1a84e92d81b048e47b2136f57bf54ecae858828ea31fb0
20
+ - index: 3
21
+ level: 3
22
+ source: f6b8c87b286ebc04dd339346848ee6f83be71b0ee722bf80494f68803fe3a999
23
+ translation: ddc3986f6439fe4688471825ac95a56e453bc43970b8d73217c2e67c2ad4cc28
24
+ - index: 4
25
+ level: 2
26
+ source: 5f3a4646e9563044322b272d59268f79aaac94a48113ab0f903acc579cb5ba21
27
+ translation: bee50d33f0f1bb93d0ace29f2beb35ae715a8d220659d313ab2c7ed6d9de57e4
28
+ - index: 5
29
+ level: 2
30
+ source: b5df923effd691fbdef2abd96ebc15dae28275d51d460f9e9d9e1dcc5be2a5d0
31
+ translation: 9075b4e3fa78f97901e212789116953b7fe028556161944841bca92322e4cfa2
32
+ - index: 6
33
+ level: 2
34
+ source: 8b597ab34f74bff8cbc083f2c2e592bb00e6009ded8d223d94cbdfa6195a15d8
35
+ translation: 855fd43fea96519fed76fe6dbed8752617535e13ab588b6c5deaf1cb96a8cdb1
36
+ - index: 7
37
+ level: 2
38
+ source: ea4a961118888c00d710969684e37823ca0a73d3de8ad8d5d4ed0eac4ececdfc
39
+ translation: 5a9e744f2d528c2e0ec63a1a0da8a856df4c52c93c45ccb699659386f18dbd8d
40
+ - index: 8
41
+ level: 2
42
+ source: beccf7655dbadb5720623d972593f90576aa346f0abf81e1c8c7de8111d5827e
43
+ translation: 55cf08493684d9fc90c58f85beff38b3a6877689a885068e3e1582a4eb674c32
44
+ - index: 9
45
+ level: 2
46
+ source: d0f65bd3ef43259a301d244c07061c3da61f75124a63d442c42b1e351f4ba8eb
47
+ translation: 33331c29e0532744c866c0169e05989527f3de8352d6dec7bdf1c5492df6bfd3
48
+ - index: 10
49
+ level: 2
50
+ source: d9a1ce71eb324f5d41289c4da76909736b8f3ae7114a42aeb0f47c1de83b334f
51
+ translation: 5692b94470396fae40ea1c00a061592fd05e180d6c38c34a89433abdec22654c
52
+ - index: 11
53
+ level: 2
54
+ source: f20ebe6476df3c73e9ae121c1497ecfd29740dad06c28864d9e9903bbabf0100
55
+ translation: e1e4dea8d186e41a71d3271f25fda29b6cd8351ad7e4c0371d8b43f86d925704
package/README.md CHANGED
@@ -1,3 +1,148 @@
1
- # Temporary Holding Version
1
+ English | [中文](README.zh.md)
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ # DAB — Drive Agent as Builder
4
+
5
+ DAB is the long-term direction: driving agents as Builders. The current implementation path is DAD (Drive Agent Development): making agents reliably drivable through governed project configuration, then proving that a single development task can be completed and accepted.
6
+
7
+ ## How DAB fits
8
+
9
+ The working model is `Agent = Model + Harness`. DAB is not a third term in that equation; it drives how the harness is configured and how the resulting work converges into a deliverable.
10
+
11
+ ```text
12
+ Builder
13
+ intent / constraints / acceptance
14
+ |
15
+ v
16
+ +------------------- DAB direction (research) --------------+
17
+ | Goal loop |
18
+ | Frame goal -> Decompose -> Integrate -> Accept -> Learn |
19
+ | | |
20
+ | v |
21
+ | DAD path (current) |
22
+ | facts / roles / tools / permissions / verification |
23
+ | Task loop: Frame -> Drive -> Inspect -> Recover |
24
+ | accepted -> Complete Task |
25
+ +------------------------------+---------------------------+
26
+ | configures + directs
27
+ v
28
+ Harness loop: think -> act -> observe
29
+ |
30
+ v
31
+ Model + Project
32
+ | evidence
33
+ +--------------> DAD / DAB
34
+ ```
35
+
36
+ The actors have distinct responsibilities:
37
+
38
+ - A Builder is the person accountable for intent, constraints, judgment and acceptance.
39
+ - An Agent is the execution actor that performs building work inside the harness.
40
+ - DAB is conceptually a driving system; this repository implements its control plane.
41
+ - The Harness is the execution engine: loop, tools, context, permissions and sessions.
42
+
43
+ ### Nested loops
44
+
45
+ - The harness loop handles local execution: `think -> act -> observe -> continue`.
46
+ - The DAD task loop drives one development task to completion and acceptance evidence.
47
+ - The DAB goal loop is a research direction for decomposing and integrating multiple tasks into one accepted goal.
48
+
49
+ Single-task closure belongs to DAD. DAB begins when multiple tasks must converge into a larger goal.
50
+
51
+ [Read the full conceptual model](docs/concepts/why-dab.md).
52
+
53
+ ## Current status
54
+
55
+ The diagram describes the combined target model. The current `main` branch implements the DAD configuration-governance foundation. Single-task evidence is next; DAB is not yet scheduled.
56
+
57
+ | Capability | Status |
58
+ |---|---|
59
+ | DAD authored facts, projections, drift checks and policy explanation | Implemented on `main` |
60
+ | DAD independent project/global scopes and v2 manifests | Implemented on `main`; pending release |
61
+ | DAD evidence for one development task | Planned for v0.2; next |
62
+ | DAD memory and operational hardening | Planned for v0.3 |
63
+ | DAD Codex and DSH adapters | After single-task evidence |
64
+ | DAB goal decomposition and cross-task convergence | Research; gated by DAD evidence |
65
+
66
+ ## Quick start
67
+
68
+ Requirements: Node.js `>=24.9`, Claude Code `>=2.1.277`, macOS or Linux.
69
+
70
+ Run the CLI without installing:
71
+
72
+ ```bash
73
+ npx @saydone/dab init /path/to/project
74
+ cd /path/to/project
75
+ npx @saydone/dab normalize --dry-run
76
+ npx @saydone/dab detect
77
+ ```
78
+
79
+ Install globally to use the shorter `dab` command:
80
+
81
+ ```bash
82
+ npm install -g @saydone/dab
83
+ dab --version
84
+ ```
85
+
86
+ The npm package is `@saydone/dab`; `npx dab` resolves to a different package.
87
+
88
+ For source development:
89
+
90
+ ```bash
91
+ pnpm install
92
+ pnpm build
93
+ pnpm link --global
94
+ ```
95
+
96
+ Use `dab init ~/.agents` to initialize the independent global scope.
97
+
98
+ ## What the commands do
99
+
100
+ - `dab init` writes the authored project skeleton and runs normalize when it is safe.
101
+ - `dab normalize` compiles policy, materializes instruction and projection artifacts, and records hashes.
102
+ - `dab detect` checks authored facts, generated output, ownership and scope without writing.
103
+ - `dab policy explain` shows the effective rules and hooks for a selected target.
104
+
105
+ ## Why DAB exists
106
+
107
+ I started DAB from a change in where leverage lives. As agents take on more execution, I believe the Builder's advantage moves from completing every step by hand to designing the conditions under which agents can build reliably.
108
+
109
+ Two observations shaped my thinking:
110
+
111
+ - A DeepSeek operator developer described a likely shift from designing, writing and optimizing operators to driving agents that perform that work.
112
+ - Robin Li's Builder framing broadens the creator role beyond people who write code.
113
+
114
+ I first explored a narrower practice, DAD (Drive Agent Development): defining how agents should carry out development work and driving them through that process. DAB keeps DAD's authored facts, projections, drift detection, decisions and shared memory, then adds the delivery-oriented convergence described above. Development is the first scope because I am the first Builder, not because it is the endpoint.
115
+
116
+ ## Design principles
117
+
118
+ - DAB is a control plane, not an agent runtime.
119
+ - The Builder retains intent, constraints, acceptance and judgment; agents execute.
120
+ - Harnesses are replaceable. Claude Code is the first target, not the definition of DAB.
121
+ - Knowledge that should survive a session belongs in reviewable files, not hidden prompts.
122
+ - Repeatability beats one-off prompting; authored facts and generated configuration must remain comparable.
123
+
124
+ ## What DAB does not guarantee
125
+
126
+ - v0.1 is currently a single-developer, macOS and Linux, Claude Code-first implementation.
127
+ - It does not implement the DAB goal loop, a task graph, cross-task learning or automatic memory promotion.
128
+ - v0.2 will validate one development task at a time; it will not by itself prove DAB.
129
+ - Path deny rules are tool-level guardrails, not a sandbox.
130
+ - Hooks are trusted executable code; DAB checks metadata and static safety, not runtime behavior.
131
+ - Windows junctions, a GUI, a plugin marketplace and automatic DAD migration are out of scope.
132
+
133
+ ## Documentation
134
+
135
+ Full documentation: [docs](https://github.com/pzsoftchen/drive-agent-build/tree/main/docs)
136
+
137
+ - [Why DAB exists](docs/concepts/why-dab.md)
138
+ - [Roadmap](docs/roadmap.md)
139
+ - [Architecture](docs/architecture.md)
140
+ - [Development](docs/development.md)
141
+ - [CLI](docs/user/cli.md)
142
+ - [Claude Code integration](docs/user/claude-code.md)
143
+ - [Agent Note 0001](.agents/notes/implemented/architecture/2026-11-16-agents-source-tree.md)
144
+ - [Agent Note 0002](.agents/notes/implemented/architecture/2026-11-16-claude-md-compat-shim.md)
145
+
146
+ ## License
147
+
148
+ MIT.
package/README.zh.md ADDED
@@ -0,0 +1,148 @@
1
+ [English](README.md) | 中文
2
+
3
+ # DAB:驱动 Agent 成为构建者
4
+
5
+ DAB 是长期方向:驱动 Agent 成为构建者。当前实现路径是 DAD(Drive Agent Development):先让 Agent 通过受治理的项目配置变得可可靠驾驶,再证明单个开发任务能够完成并通过验收。
6
+
7
+ ## DAB 位于哪里
8
+
9
+ 工作模型是 `Agent = Model + Harness`。DAB 不是这个等式中的第三项;它负责驾驶 Harness 如何被配置,以及工作如何收敛为可交付结果。
10
+
11
+ ```text
12
+ Builder
13
+ intent / constraints / acceptance
14
+ |
15
+ v
16
+ +------------------- DAB direction (research) --------------+
17
+ | Goal loop |
18
+ | Frame goal -> Decompose -> Integrate -> Accept -> Learn |
19
+ | | |
20
+ | v |
21
+ | DAD path (current) |
22
+ | facts / roles / tools / permissions / verification |
23
+ | Task loop: Frame -> Drive -> Inspect -> Recover |
24
+ | accepted -> Complete Task |
25
+ +------------------------------+---------------------------+
26
+ | configures + directs
27
+ v
28
+ Harness loop: think -> act -> observe
29
+ |
30
+ v
31
+ Model + Project
32
+ | evidence
33
+ +--------------> DAD / DAB
34
+ ```
35
+
36
+ 不同角色承担不同责任:
37
+
38
+ - Builder 是对意图、约束、判断和验收负责的人。
39
+ - Agent 是在 Harness 中执行构建工作的执行主体。
40
+ - DAB 在产品概念上是驾驶系统;本仓库实现的是它的控制面。
41
+ - Harness 是执行引擎,提供循环、工具、上下文、权限和会话。
42
+
43
+ ### 嵌套 Loop
44
+
45
+ - Harness Loop 负责局部执行:`think -> act -> observe -> continue`。
46
+ - DAD 任务循环负责把一个开发任务驾驶到完成,并产生验收证据。
47
+ - DAB 目标循环是研究方向,负责把多个任务分解、集成并收敛为一个通过验收的整体目标。
48
+
49
+ 单任务闭包属于 DAD。只有当多个任务必须共同收敛到一个更大目标时,DAB 才真正开始。
50
+
51
+ [阅读完整概念说明](docs/concepts/why-dab.zh.md)。
52
+
53
+ ## 当前状态
54
+
55
+ 图中的方式是 DAB/DAD 的组合目标模型。当前 `main` 分支实现的是 DAD 配置治理基础。下一步是单任务证据;DAB 尚未排期。
56
+
57
+ | 能力 | 状态 |
58
+ |---|---|
59
+ | DAD 编写事实、投影、漂移检测和策略解释 | 已在 `main` 实现 |
60
+ | DAD 独立的 project/global scope 与 v2 manifest | 已在 `main` 实现,尚未发布 |
61
+ | DAD 单开发任务证据 | 计划在 v0.2 提供,这是下一步 |
62
+ | DAD 记忆与运行加固 | 计划在 v0.3 提供 |
63
+ | DAD Codex 与 DSH adapter | 在单任务证据之后 |
64
+ | DAB 目标拆解与跨任务收敛 | 研究阶段,以 DAD 证据为前置条件 |
65
+
66
+ ## 快速开始
67
+
68
+ 前置条件:Node.js `>=24.9`、Claude Code `>=2.1.277`、macOS 或 Linux。
69
+
70
+ 无需安装,直接运行 CLI:
71
+
72
+ ```bash
73
+ npx @saydone/dab init /path/to/project
74
+ cd /path/to/project
75
+ npx @saydone/dab normalize --dry-run
76
+ npx @saydone/dab detect
77
+ ```
78
+
79
+ 全局安装后可使用更短的 `dab` 命令:
80
+
81
+ ```bash
82
+ npm install -g @saydone/dab
83
+ dab --version
84
+ ```
85
+
86
+ npm 包名是 `@saydone/dab`;`npx dab` 会解析到另一个包。
87
+
88
+ 从源码开发:
89
+
90
+ ```bash
91
+ pnpm install
92
+ pnpm build
93
+ pnpm link --global
94
+ ```
95
+
96
+ 使用 `dab init ~/.agents` 初始化独立的 global scope。
97
+
98
+ ## 命令做什么
99
+
100
+ - `dab init` 写入项目编写骨架,并在安全时运行 normalize。
101
+ - `dab normalize` 编译策略、生成指令和投影产物,并记录哈希。
102
+ - `dab detect` 在不写入的情况下检查编写事实、生成输出、所有权和作用域。
103
+ - `dab policy explain` 展示选定 target 的最终规则和 hooks。
104
+
105
+ ## DAB 为什么存在
106
+
107
+ 我从个人杠杆正在发生变化这一点开始思考 DAB。当 Agent 承担越来越多执行工作时,我相信构建者的优势不再是亲手完成每一步,而是设计让 Agent 可靠构建的条件。
108
+
109
+ 两个判断影响了我的想法:
110
+
111
+ - 一位 DeepSeek 算子开发者判断,工作重心可能从设计、编写和优化算子,转向驾驶 Agent 完成这些工作。
112
+ - 李彦宏提出的 Builder,把创造者的范围从编写代码的人扩展到更广泛的人群。
113
+
114
+ 我最早实践的是一个更窄的做法:DAD(Drive Agent Development,驱动 Agent 开发),即定义 Agent 应如何开展开发工作,并驾驶 Agent 按这个过程执行。DAB 保留 DAD 的编写事实、投影、漂移检测、决策和共享记忆,再增加前面描述的面向交付的收敛。开发是第一个范围,因为我自己就是第一位构建者,而不是因为开发就是终点。
115
+
116
+ ## 设计原则
117
+
118
+ - DAB 是控制面,不是 Agent runtime。
119
+ - 构建者保留意图、约束、验收和判断;Agent 负责执行。
120
+ - Harness 可以替换。Claude Code 是第一个目标,不是 DAB 的定义。
121
+ - 应当跨会话保留的知识放在可评审文件中,而不是隐藏在提示词里。
122
+ - 可重复性优先于一次性提示;编写事实和生成配置必须始终可比较。
123
+
124
+ ## DAB 不保证什么
125
+
126
+ - v0.1 当前是单开发者、macOS 和 Linux、Claude Code 优先的实现。
127
+ - 它不实现 DAB 目标循环、任务图、跨任务学习或自动记忆提升。
128
+ - v0.2 将验证单个开发任务,不代表 DAB 已被证明。
129
+ - 路径 deny 规则是工具级护栏,不是沙箱。
130
+ - Hooks 是可信的可执行代码;DAB 只检查元数据和静态安全,不检查运行时行为。
131
+ - Windows junction、GUI、插件市场和自动 DAD 迁移不在范围内。
132
+
133
+ ## 文档
134
+
135
+ 完整文档:[docs](https://github.com/pzsoftchen/drive-agent-build/tree/main/docs)
136
+
137
+ - [DAB 为什么存在](docs/concepts/why-dab.zh.md)
138
+ - [路线图](docs/roadmap.zh.md)
139
+ - [架构](docs/architecture.zh.md)
140
+ - [开发](docs/development.zh.md)
141
+ - [CLI](docs/user/cli.zh.md)
142
+ - [Claude Code 集成](docs/user/claude-code.zh.md)
143
+ - [Agent 决策记录 0001](.agents/notes/implemented/architecture/2026-11-16-agents-source-tree.zh.md)
144
+ - [Agent 决策记录 0002](.agents/notes/implemented/architecture/2026-11-16-claude-md-compat-shim.zh.md)
145
+
146
+ ## 许可证
147
+
148
+ MIT。
@@ -0,0 +1,10 @@
1
+ import type { TargetProvider } from '../../model/types.ts';
2
+ import type { TargetContext, TargetDetectOutcome, TargetNormalizeInput, TargetNormalizePlan } from '../types.ts';
3
+ declare function normalize(input: TargetNormalizeInput): Promise<TargetNormalizePlan>;
4
+ declare function detect(input: TargetContext): Promise<TargetDetectOutcome>;
5
+ export declare const claudeCodeAdapter: {
6
+ provider: TargetProvider;
7
+ normalize: typeof normalize;
8
+ detect: typeof detect;
9
+ };
10
+ export {};