@saydone/dab 0.1.1 → 0.1.2
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/AGENTS.md +7 -0
- package/CHANGELOG.md +26 -1
- package/CHANGELOG.zh.md +26 -1
- package/README.i18n.yaml +8 -8
- package/README.md +16 -6
- package/README.zh.md +16 -6
- package/dist/adapter/claude-code/adapter.js +5 -2
- package/dist/adapter/claude-code/adapter.js.map +1 -1
- package/dist/adapter/claude-code/adoption.d.ts +58 -0
- package/dist/adapter/claude-code/adoption.js +749 -0
- package/dist/adapter/claude-code/adoption.js.map +1 -0
- package/dist/adapter/claude-code/policy-compile.js +1 -1
- package/dist/adapter/claude-code/policy-compile.js.map +1 -1
- package/dist/adapter/claude-code/projection.d.ts +1 -0
- package/dist/adapter/claude-code/projection.js +7 -1
- package/dist/adapter/claude-code/projection.js.map +1 -1
- package/dist/adapter/types.d.ts +7 -0
- package/dist/cli.js +9 -19
- package/dist/cli.js.map +1 -1
- package/dist/commands/detect.d.ts +14 -0
- package/dist/commands/detect.js +383 -54
- package/dist/commands/detect.js.map +1 -1
- package/dist/commands/init.d.ts +4 -1
- package/dist/commands/init.js +177 -40
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/normalize.d.ts +53 -0
- package/dist/commands/normalize.js +378 -29
- package/dist/commands/normalize.js.map +1 -1
- package/dist/commands/policy-explain.js +9 -0
- package/dist/commands/policy-explain.js.map +1 -1
- package/dist/core/diagnostics.d.ts +2 -0
- package/dist/core/diagnostics.js +18 -0
- package/dist/core/diagnostics.js.map +1 -1
- package/dist/core/fs-atomic.d.ts +6 -0
- package/dist/core/fs-atomic.js +29 -0
- package/dist/core/fs-atomic.js.map +1 -1
- package/dist/core/paths.js +29 -6
- package/dist/core/paths.js.map +1 -1
- package/dist/core/practice-paths.d.ts +73 -0
- package/dist/core/practice-paths.js +310 -0
- package/dist/core/practice-paths.js.map +1 -0
- package/dist/core/skill-marker.d.ts +28 -0
- package/dist/core/skill-marker.js +57 -0
- package/dist/core/skill-marker.js.map +1 -0
- package/dist/core/version-compare.d.ts +8 -0
- package/dist/core/version-compare.js +23 -0
- package/dist/core/version-compare.js.map +1 -0
- package/dist/core/version.d.ts +2 -0
- package/dist/core/version.js +13 -0
- package/dist/core/version.js.map +1 -0
- package/dist/detect/checklist.d.ts +42 -0
- package/dist/detect/checklist.js +137 -0
- package/dist/detect/checklist.js.map +1 -0
- package/dist/detect/checks.d.ts +1 -1
- package/dist/detect/checks.js +15 -3
- package/dist/detect/checks.js.map +1 -1
- package/dist/detect/practice.d.ts +43 -0
- package/dist/detect/practice.js +782 -0
- package/dist/detect/practice.js.map +1 -0
- package/dist/detect/preflight.d.ts +21 -0
- package/dist/detect/preflight.js +408 -0
- package/dist/detect/preflight.js.map +1 -0
- package/dist/docs/config.js +5 -0
- package/dist/docs/config.js.map +1 -1
- package/dist/init/adoption.d.ts +138 -0
- package/dist/init/adoption.js +747 -0
- package/dist/init/adoption.js.map +1 -0
- package/dist/init/docs-language.d.ts +12 -0
- package/dist/init/docs-language.js +110 -0
- package/dist/init/docs-language.js.map +1 -0
- package/dist/init/managed-skills.d.ts +81 -0
- package/dist/init/managed-skills.js +407 -0
- package/dist/init/managed-skills.js.map +1 -0
- package/dist/init/minimal-source.d.ts +14 -0
- package/dist/init/minimal-source.js +42 -0
- package/dist/init/minimal-source.js.map +1 -0
- package/dist/init/practice-authoring.d.ts +5 -0
- package/dist/init/practice-authoring.js +36 -0
- package/dist/init/practice-authoring.js.map +1 -0
- package/dist/init/practice-docs.d.ts +13 -0
- package/dist/init/practice-docs.js +278 -0
- package/dist/init/practice-docs.js.map +1 -0
- package/dist/init/practice.d.ts +78 -0
- package/dist/init/practice.js +528 -0
- package/dist/init/practice.js.map +1 -0
- package/dist/init/scanner.js +7 -0
- package/dist/init/scanner.js.map +1 -1
- package/dist/init/skill-templates.d.ts +7 -0
- package/dist/init/skill-templates.js +25 -0
- package/dist/init/skill-templates.js.map +1 -0
- package/dist/init/templates.d.ts +22 -10
- package/dist/init/templates.js +32 -88
- package/dist/init/templates.js.map +1 -1
- package/dist/model/agents-md.js +1 -1
- package/dist/model/agents-md.js.map +1 -1
- package/dist/model/agents.d.ts +10 -0
- package/dist/model/agents.js +110 -86
- package/dist/model/agents.js.map +1 -1
- package/dist/model/diagnostics-codes.d.ts +1 -0
- package/dist/model/diagnostics-codes.js +1 -0
- package/dist/model/diagnostics-codes.js.map +1 -1
- package/dist/model/facts.js +24 -4
- package/dist/model/facts.js.map +1 -1
- package/dist/model/project-manifest.js +2 -0
- package/dist/model/project-manifest.js.map +1 -1
- package/dist/model/schemas.d.ts +30 -1
- package/dist/model/schemas.js +8 -1
- package/dist/model/schemas.js.map +1 -1
- package/dist/model/scope.d.ts +13 -0
- package/dist/model/scope.js +57 -0
- package/dist/model/scope.js.map +1 -1
- package/dist/model/skills.d.ts +10 -0
- package/dist/model/skills.js +126 -56
- package/dist/model/skills.js.map +1 -1
- package/package.json +2 -1
- package/skills/dab-architecture-writing/SKILL.md +58 -0
- package/skills/dab-decision-notes/SKILL.md +57 -0
- package/skills/dab-doc-writing/SKILL.md +58 -0
package/AGENTS.md
CHANGED
|
@@ -10,12 +10,16 @@ DAB turns `AGENTS.md` and `.agents/` into governed Claude Code configuration.
|
|
|
10
10
|
- `src/model/`: authored source schemas and discovery.
|
|
11
11
|
- `src/model/scope.ts`: scope and source-root resolution.
|
|
12
12
|
- `src/model/facts.ts`: common source-fact discovery.
|
|
13
|
+
- `src/core/skill-marker.ts`: managed skill marker parsing, insertion and body hashing.
|
|
13
14
|
- `src/adapter/types.ts`: target adapter contract.
|
|
14
15
|
- `src/adapter/claude-code/adapter.ts`: Claude target adapter.
|
|
15
16
|
- `src/adapter/claude-code/instructions.ts`: instruction artifact.
|
|
16
17
|
- `src/adapter/claude-code/`: policy compilation, projections and settings.
|
|
17
18
|
- `src/detect/`: drift checks.
|
|
18
19
|
- `src/init/`: repository scan and templates.
|
|
20
|
+
- `src/init/skill-templates.ts`: canonical authoring-skill loader and renderer.
|
|
21
|
+
- `src/init/managed-skills.ts`: managed authoring-skill planning, update and apply-time revalidation.
|
|
22
|
+
- `skills/`: canonical authoring-skill templates published with the package.
|
|
19
23
|
- `src/docs/`: bilingual documentation gates.
|
|
20
24
|
- `docs/`: architecture, development and user documentation.
|
|
21
25
|
- `docs/superpowers/`: Chinese-only specs and plans for the superpowers workflow.
|
|
@@ -44,6 +48,7 @@ DAB turns `AGENTS.md` and `.agents/` into governed Claude Code configuration.
|
|
|
44
48
|
|
|
45
49
|
## Documentation
|
|
46
50
|
|
|
51
|
+
- [Documentation guide](docs/AGENTS.md)
|
|
47
52
|
- [Why DAB exists](docs/concepts/why-dab.md)
|
|
48
53
|
- [Roadmap](docs/roadmap.md)
|
|
49
54
|
- [Architecture](docs/architecture.md)
|
|
@@ -53,3 +58,5 @@ DAB turns `AGENTS.md` and `.agents/` into governed Claude Code configuration.
|
|
|
53
58
|
- [Superpowers docs](docs/superpowers/README.md)
|
|
54
59
|
- [Agent Note 0001](.agents/notes/implemented/architecture/2026-11-16-agents-source-tree.md)
|
|
55
60
|
- [Agent Note 0002](.agents/notes/implemented/architecture/2026-11-16-claude-md-compat-shim.md)
|
|
61
|
+
- [Agent Note 0003](.agents/notes/implemented/architecture/2026-11-23-practice-layer.md)
|
|
62
|
+
- [Agent Note 0004](.agents/notes/implemented/architecture/2026-11-24-managed-skills.md)
|
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,32 @@ English | [中文](CHANGELOG.zh.md)
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
-
## 0.1.
|
|
5
|
+
## 0.1.2 — 2026-11-24
|
|
6
|
+
|
|
7
|
+
- `dab init` now writes `profile: generic` and `docs.language: auto` by default. `--profile generic|feature` selects the manifest profile; `feature` is a compatibility alias with the same practice behavior. `docs.language` accepts `auto`, `en` or `zh`, is resolved from project content and locale when `auto`, and reports `{ value, source }` in human output and JSON.
|
|
8
|
+
- `dab init` and `dab normalize` adoption no longer scaffold advanced `.agents/hooks/` or `.agents/memory/` files; the generic profile focuses on drift detection/repair and the documentation, notes and skills discipline. Existing authored hooks and shared memory are untouched: hooks are still validated and compiled where applicable, memory is still preserved and validated, and `dab detect` omits their checklist groups when absent.
|
|
9
|
+
- `dab init` and `dab normalize` scaffold single-language `docs/AGENTS.md` and `docs/architecture.md` without `.zh.md` or `.i18n.yaml` pairs, plus the `dab-doc-writing`, `dab-architecture-writing` and `dab-decision-notes` authoring skills. Existing docs and skill directories are never overwritten; managed `dab-*` skills are updated only when their marker hash proves they are unmodified.
|
|
10
|
+
- Authoring skills now come from canonical `skills/<name>/SKILL.md` templates shipped in the npm package. Installed `.agents/skills/dab-*` copies carry a `<!-- dab-skill: <name>@<version> sha256=<hash> -->` marker whose hash covers the marker-stripped body; DAB reads the package templates directly and never calls `npx skills` or a network installer.
|
|
11
|
+
- `dab normalize` now manages installed `dab-*` skills before target planning: it creates missing skills, updates an unmodified copy whose marker version is older, and migrates a legacy marker without a hash when the body matches the current template. It preserves and warns about modified bodies, newer or uncomparable versions, differing legacy bodies, missing markers and markers naming another skill, and managed updates create no backups. `dab detect` reports the corresponding states: `practice.skill-stale` remains strict, while the preserved states do not fail `--strict`. `normalize --json` adds `practices.skills.updated`, `migrated`, `modified`, `newer`, `legacy`, `unversioned`, `markerMismatch` and `concurrent`.
|
|
12
|
+
- Managed skill writes re-read the target immediately before writing and verify the planned marker, version and body hash. A file changed, removed or created after planning is preserved with a `practice.skill-concurrent-change` warning, and a missing skill uses an exclusive create so a concurrent file is never replaced.
|
|
13
|
+
- An in-root symlink at `.agents/skills/dab-*/SKILL.md` is now a governed `practice.skill-path` error; only the containing skill directory may be an in-root symlink. Managed updates require stable numeric DAB versions, so a prerelease DAB version preserves installed skills instead of updating them.
|
|
14
|
+
- `dab init` now leaves an importable physical `.claude/skills/dab-*` directory pending, skips that authoring template and leaves the import to `dab normalize`; a non-directory entry is reported as a warning pending with `practice.skill-import-conflict` and no import hint. It never writes or replaces the physical entry.
|
|
15
|
+
- The generic skeleton no longer generates `.agents/rules/docs-bilingual.md`; an existing authored rule is preserved and policy-skips missing single-language docs with `practice.docs-bilingual-policy`. Existing docs are preserved as skipped and never blocked by a dangling docs path. Authoring skills and target writes continue.
|
|
16
|
+
- `dab normalize` fills missing practice files in uninitialized, partial and initialized project scopes before target planning. `--json` adds project-scope `practices` with `profile`, `mode`, `language`, `created`, `skipped`, `policySkipped`, `directories`, `skills` and `diagnostics`; a dry run and a run blocked before practice writes keep planned entries, a run blocked by a later target failure reports the files it wrote, and global scope omits the object.
|
|
17
|
+
- Practice path validation rejects escaping symlinks, special files and unreadable targets. Existing docs must be regular readable files or in-root symlinks to one; skill directories must be real directories or in-root symlinks to a directory with read and search permission. A regular file at `.agents/rules` or `.agents/skills` is a governed diagnostic in `init`, `normalize` and `detect` instead of an internal error. A regular file, dangling link, denied access or symlink loop at `.agents/agents`, `.agents/hooks`, `.agents/memory`, `.agents/notes`, `.agents/policies` or `.agents/adapters` is a governed `path.conflict`, and project and global runs block before writes or discovery. A source parent without read and search permission is governed the same way; the best-effort secret scan may skip unreadable subtrees, but access errors come from the parent probe.
|
|
18
|
+
- An unreadable nested skill directory is reported as `skill.unreadable` instead of silently emptying every skill fact. Sibling skills still validate and project, and `init`, `normalize` and `detect` never report the project healthy; `normalize` writes no Claude target output in that run.
|
|
19
|
+
- `dab normalize` converge links an existing root `AGENTS.md` from generated `docs/AGENTS.md` and omits the link when `AGENTS.md` is absent.
|
|
20
|
+
- `dab detect` adds a `Documentation` group and authoring skill entries in `Skills`, checking links, line-start TODO markers, empty architecture sections and skill version markers. Missing practice files, TODOs, empty sections and stale skills fail `--strict`; bilingual policy skips and preserved skill states stay informational.
|
|
21
|
+
- DAB now dogfoods the practice layer: its own `docs/AGENTS.md` guide and `dab-*` authoring skills live in the authored source tree and are checked by `dab detect`.
|
|
22
|
+
- `dab detect` prints a read-only checklist for uninitialized, partial and initialized project and global scopes, with `[OK]`, `[MISSING]`, `[WARN]`, `[ERROR]` and `[IMPORTABLE]` states, a score and next actions; JSON adds `scope`, `root`, `phase`, `profile`, `checklist`, `score` and `nextActions`. Initialized scopes also report importable physical entries instead of unmanaged or physical-copy drift.
|
|
23
|
+
- Uninitialized and partial `dab detect --json` results are now the full checklist object with `ok: false` and `exitCode: 2` instead of the error envelope; `schemaVersion` stays `1`.
|
|
24
|
+
- `dab normalize` adopts missing minimal source and imports physical `.claude/agents` and `.claude/skills` entries into `.agents`, backing up originals under `.dab/backups/` and replacing them with per-entry symlinks. Invalid imports block every write, and `--fix` still covers non-import conflicts only.
|
|
25
|
+
- `dab normalize --dry-run` lists import, backup and symlink actions and planned backup paths; human output also shows adoption source actions, import actions and backups on real runs.
|
|
26
|
+
- Managed projection symlink drift is repaired without `--fix`; an unmanaged entry symlink with an authored source is repaired by `--fix`, while a link with no authored source needs manual removal. `dab init` never imports existing `.claude` entries.
|
|
27
|
+
- Global scope gets the same checklist and adoption/import behavior; `~/.claude/settings.json` and `$HOME/.gitignore` remain read-only and `dab init ~/.agents` is still the explicit entry point for a missing global source.
|
|
28
|
+
- `dab init` remains the one-time full-profile initializer; existing projects use `dab detect` and `dab normalize`.
|
|
29
|
+
|
|
30
|
+
## 0.1.1 — 2026-11-23
|
|
6
31
|
|
|
7
32
|
- Published the CLI as `@saydone/dab` with a GitHub Actions release workflow, npm provenance and a GitHub Release for each tag.
|
|
8
33
|
- Added `schemaVersion: 1` to every `--json` result and rejected `--json` with `--help` or `--version`.
|
package/CHANGELOG.zh.md
CHANGED
|
@@ -2,7 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
# 变更日志
|
|
4
4
|
|
|
5
|
-
## 0.1.
|
|
5
|
+
## 0.1.2 — 2026-11-24
|
|
6
|
+
|
|
7
|
+
- `dab init` 默认写入 `profile: generic` 和 `docs.language: auto`。`--profile generic|feature` 选择 manifest profile;`feature` 是行为相同的兼容别名。`docs.language` 接受 `auto`、`en` 或 `zh`;`auto` 从项目内容和 locale 解析,并在人类输出和 JSON 中报告 `{ value, source }`。
|
|
8
|
+
- `dab init` 和 `dab normalize` adoption 不再生成高级 `.agents/hooks/` 或 `.agents/memory/` 文件;generic profile 聚焦漂移检测/修复,以及 docs、notes 和 skills 纪律。已有的 authored hooks 和共享记忆保持不变:hooks 仍会被校验并在适用时编译,记忆仍会被保留和校验;缺失时 `dab detect` 会省略它们的 checklist 组。
|
|
9
|
+
- `dab init` 和 `dab normalize` 生成单语 `docs/AGENTS.md` 和 `docs/architecture.md`,不生成 `.zh.md` 或 `.i18n.yaml` 配对,并安装 `dab-doc-writing`、`dab-architecture-writing` 和 `dab-decision-notes` authoring skills。已有 docs 和 skill 目录永不被覆盖;受管 `dab-*` skills 仅在 marker hash 证明其未被修改时更新。
|
|
10
|
+
- Authoring skills 现在来自 npm 包内发布的 canonical `skills/<name>/SKILL.md` 模板。已安装的 `.agents/skills/dab-*` 副本带 `<!-- dab-skill: <name>@<version> sha256=<hash> -->` 标记,其 hash 覆盖移除 marker 后的 body;DAB 直接读取包内模板,从不调用 `npx skills` 或网络安装器。
|
|
11
|
+
- `dab normalize` 现在在 target planning 之前管理已安装的 `dab-*` skills:创建缺失 skills,更新 marker 版本较旧且未修改的副本,并在无 hash 的 legacy marker 去掉后 body 与当前模板一致时迁移它。它会保留并警告已修改 body、较新或无法比较的版本、不同的 legacy body、缺失 marker 和指向其他 skill 的 marker,且受管更新不创建备份。`dab detect` 报告对应状态:`practice.skill-stale` 仍为 strict,保留类状态不会让 `--strict` 失败。`normalize --json` 新增 `practices.skills.updated`、`migrated`、`modified`、`newer`、`legacy`、`unversioned`、`markerMismatch` 和 `concurrent`。
|
|
12
|
+
- 受管 skill 写入会在写入前立即重新读取目标并校验计划的 marker、版本和 body hash。planning 之后被修改、删除或新建的文件会以 `practice.skill-concurrent-change` warning 保留;缺失 skill 使用独占创建,因此并发文件不会被替换。
|
|
13
|
+
- `.agents/skills/dab-*/SKILL.md` 上的 root 内符号链接现在是受管的 `practice.skill-path` 错误;只有所在 skill 目录可以是 root 内符号链接。受管更新要求稳定的数字 DAB 版本,因此 prerelease DAB 版本会保留已安装 skills 而不是更新它们。
|
|
14
|
+
- `dab init` 现在会把可导入的物理 `.claude/skills/dab-*` 目录标记为 pending,跳过对应的 authoring 模板,并把 import 留给 `dab normalize`;非目录条目以 warning pending 报告为 `practice.skill-import-conflict`,不提供 import 提示。它从不写入或替换该物理条目。
|
|
15
|
+
- Generic skeleton 不再生成 `.agents/rules/docs-bilingual.md`;已有的 authored 规则会保留,并以 `practice.docs-bilingual-policy` 对缺失的单语 docs 做 policy skip。已有 docs 作为 skipped 保留,悬空的 docs 路径不会阻断它们。Authoring skills 和 target 写入继续。
|
|
16
|
+
- `dab normalize` 在 target planning 之前为未初始化、partial 和已初始化 project scope 补齐缺失的实践文件。`--json` 为 project scope 追加 `practices`,包含 `profile`、`mode`、`language`、`created`、`skipped`、`policySkipped`、`directories`、`skills` 和 `diagnostics`;dry run 和 practice 写入前被阻断的运行保留计划条目,被后续 target 失败阻断的运行报告已写入的文件,global scope 省略该对象。
|
|
17
|
+
- Practice 路径校验拒绝逃逸符号链接、特殊文件和不可读 target。已有 docs 必须是可读普通文件或指向它的仓库内符号链接;skill 目录必须是真实目录或指向具备读与搜索权限目录的仓库内符号链接。`.agents/rules` 或 `.agents/skills` 处的普通文件在 `init`、`normalize` 和 `detect` 中是受治理的诊断,而不是内部错误。`.agents/agents`、`.agents/hooks`、`.agents/memory`、`.agents/notes`、`.agents/policies` 或 `.agents/adapters` 处的普通文件、悬空链接、访问拒绝或符号链接循环是受治理的 `path.conflict`,project 和 global 运行都会在写入或发现之前阻断。缺少读与搜索权限的 source parent 同样受治理;best-effort secret scan 可能跳过不可读子树,但访问错误由 parent probe 报告。
|
|
18
|
+
- 不可读的嵌套 skill 目录会报告为 `skill.unreadable`,而不是静默清空所有 skill 事实。同级 skills 仍会被校验和投影,`init`、`normalize` 和 `detect` 绝不会把项目报告为健康;该次 `normalize` 不会写入任何 Claude target 输出。
|
|
19
|
+
- `dab normalize` converge 在 `AGENTS.md` 存在时从生成的 `docs/AGENTS.md` 链接它,缺失时省略 `AGENTS.md` 链接。
|
|
20
|
+
- `dab detect` 增加 `Documentation` 组和 `Skills` 中的 authoring skill 条目,检查链接、行首 TODO 标记、空架构章节和 skill 版本标记。缺失的实践文件、TODO、空章节和落后 skills 会让 `--strict` 失败;双语 policy skip 和保留类 skill 状态保持信息性。
|
|
21
|
+
- DAB 现在 dogfood 实践层:自身的 `docs/AGENTS.md` 指南和 `dab-*` authoring skills 位于 authored source tree,并由 `dab detect` 检查。
|
|
22
|
+
- `dab detect` 为未初始化、partial 和已初始化的 project/global scope 输出只读 checklist,包含 `[OK]`、`[MISSING]`、`[WARN]`、`[ERROR]` 和 `[IMPORTABLE]` 状态、score 和 next actions;JSON 追加 `scope`、`root`、`phase`、`profile`、`checklist`、`score` 和 `nextActions`。已初始化 scope 也会把可导入的物理条目报告为 importable,而不是 unmanaged 或 physical-copy 漂移。
|
|
23
|
+
- 未初始化和 partial 的 `dab detect --json` 结果现在是完整 checklist 对象,包含 `ok: false` 和 `exitCode: 2`,不再使用错误信封;`schemaVersion` 仍为 `1`。
|
|
24
|
+
- `dab normalize` 采用缺失的最小 source,并把物理 `.claude/agents` 和 `.claude/skills` 条目导入 `.agents`,将原文件备份到 `.dab/backups/` 后替换为逐项符号链接。非法 import 会阻止所有写入,`--fix` 仍只处理非 import 冲突。
|
|
25
|
+
- `dab normalize --dry-run` 列出 import、backup 和 symlink 动作以及计划备份路径;真实运行时人类输出也会显示 adoption source 动作、import 动作和备份。
|
|
26
|
+
- Managed projection 符号链接漂移无需 `--fix` 即可修复;有 authored source 的 unmanaged 条目符号链接由 `--fix` 修复,没有 authored source 的链接需要手动移除。`dab init` 从不导入现有 `.claude` 条目。
|
|
27
|
+
- Global scope 获得相同的 checklist 和 adoption/import 行为;`~/.claude/settings.json` 和 `$HOME/.gitignore` 保持只读,Global source 完全缺失时仍以 `dab init ~/.agents` 作为显式入口。
|
|
28
|
+
- `dab init` 仍是一次性 full profile 初始化入口;已有项目使用 `dab detect` 和 `dab normalize`。
|
|
29
|
+
|
|
30
|
+
## 0.1.1 — 2026-11-23
|
|
6
31
|
|
|
7
32
|
- 以 `@saydone/dab` 发布 CLI,并增加 GitHub Actions release workflow、npm provenance 和逐 tag 的 GitHub Release。
|
|
8
33
|
- `schemaVersion: 1` 已加入每个 `--json` 结果,并拒绝 `--json` 与 `--help` 或 `--version` 组合使用。
|
package/README.i18n.yaml
CHANGED
|
@@ -23,20 +23,20 @@ sections:
|
|
|
23
23
|
translation: ddc3986f6439fe4688471825ac95a56e453bc43970b8d73217c2e67c2ad4cc28
|
|
24
24
|
- index: 4
|
|
25
25
|
level: 2
|
|
26
|
-
source:
|
|
27
|
-
translation:
|
|
26
|
+
source: 6c034db467c5532be52fdbe4472a828b1f6ce2a01d532aa1b215ccdd3990b0c0
|
|
27
|
+
translation: 3215d6f54fd6a11267fe4fab1cec7924daba4926d7cb2c39ff5d78bc6ecbb599
|
|
28
28
|
- index: 5
|
|
29
29
|
level: 2
|
|
30
30
|
source: b5df923effd691fbdef2abd96ebc15dae28275d51d460f9e9d9e1dcc5be2a5d0
|
|
31
31
|
translation: 9075b4e3fa78f97901e212789116953b7fe028556161944841bca92322e4cfa2
|
|
32
32
|
- index: 6
|
|
33
33
|
level: 2
|
|
34
|
-
source:
|
|
35
|
-
translation:
|
|
34
|
+
source: 971465fe62688a667fea87ced7cfbd240d1ca81ab444e5777882d7b3e52af0dc
|
|
35
|
+
translation: 13305a71e864f4c1049c18e347d260d498b4612734665faad680fc4408ad4a49
|
|
36
36
|
- index: 7
|
|
37
37
|
level: 2
|
|
38
|
-
source:
|
|
39
|
-
translation:
|
|
38
|
+
source: e49fba0ae2b5c46361a6e05b445f6964012e33eeb5b8d93701de12af50360d0d
|
|
39
|
+
translation: e6c7783cf37a4f20be9782b7908ba3a3464a96d697befc103f8e2485b7d87afc
|
|
40
40
|
- index: 8
|
|
41
41
|
level: 2
|
|
42
42
|
source: beccf7655dbadb5720623d972593f90576aa346f0abf81e1c8c7de8111d5827e
|
|
@@ -47,8 +47,8 @@ sections:
|
|
|
47
47
|
translation: 33331c29e0532744c866c0169e05989527f3de8352d6dec7bdf1c5492df6bfd3
|
|
48
48
|
- index: 10
|
|
49
49
|
level: 2
|
|
50
|
-
source:
|
|
51
|
-
translation:
|
|
50
|
+
source: 13184b5950e519c0f922cba751f80ff88313644956b9fe5d4bf6092278542074
|
|
51
|
+
translation: bd286f8f5cb9e10ac766f0753db5150cc38f6e06bcbf08a95677241570202251
|
|
52
52
|
- index: 11
|
|
53
53
|
level: 2
|
|
54
54
|
source: f20ebe6476df3c73e9ae121c1497ecfd29740dad06c28864d9e9903bbabf0100
|
package/README.md
CHANGED
|
@@ -52,17 +52,22 @@ Single-task closure belongs to DAD. DAB begins when multiple tasks must converge
|
|
|
52
52
|
|
|
53
53
|
## Current status
|
|
54
54
|
|
|
55
|
-
The diagram describes the combined target model. The
|
|
55
|
+
The diagram describes the combined target model. The DAD configuration-governance foundation is released as `@saydone/dab@0.1.2`, including the practice layer and managed authoring skills. Single-task evidence is next; DAB is not yet scheduled.
|
|
56
56
|
|
|
57
57
|
| Capability | Status |
|
|
58
58
|
|---|---|
|
|
59
|
-
| DAD authored facts, projections, drift checks and policy explanation |
|
|
60
|
-
| DAD independent project/global scopes and v2 manifests |
|
|
59
|
+
| DAD authored facts, projections, drift checks and policy explanation | Released in 0.1.1 |
|
|
60
|
+
| DAD independent project/global scopes and v2 manifests | Released in 0.1.1 |
|
|
61
|
+
| DAD practice layer: generic profile, single-language docs and authoring skills | Released in 0.1.2 |
|
|
62
|
+
| DAD managed authoring skills: packaged templates, marker hashes and managed updates | Released in 0.1.2 |
|
|
63
|
+
| DAD advanced hooks and shared memory | Optional; not scaffolded by default |
|
|
61
64
|
| DAD evidence for one development task | Planned for v0.2; next |
|
|
62
65
|
| DAD memory and operational hardening | Planned for v0.3 |
|
|
63
66
|
| DAD Codex and DSH adapters | After single-task evidence |
|
|
64
67
|
| DAB goal decomposition and cross-task convergence | Research; gated by DAD evidence |
|
|
65
68
|
|
|
69
|
+
Release: [npm](https://www.npmjs.com/package/@saydone/dab) · [GitHub Release v0.1.2](https://github.com/pzsoftchen/drive-agent-build/releases/tag/v0.1.2)
|
|
70
|
+
|
|
66
71
|
## Quick start
|
|
67
72
|
|
|
68
73
|
Requirements: Node.js `>=24.9`, Claude Code `>=2.1.277`, macOS or Linux.
|
|
@@ -97,11 +102,13 @@ Use `dab init ~/.agents` to initialize the independent global scope.
|
|
|
97
102
|
|
|
98
103
|
## What the commands do
|
|
99
104
|
|
|
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.
|
|
105
|
+
- `dab init` writes the authored project skeleton, including `docs/AGENTS.md`, `docs/architecture.md` and the `dab-*` authoring skills, and runs normalize when it is safe. It does not scaffold advanced hooks or shared memory.
|
|
106
|
+
- `dab normalize` compiles policy, materializes instruction and projection artifacts, fills missing docs and authoring skills, updates unmodified managed authoring skills, and records hashes.
|
|
102
107
|
- `dab detect` checks authored facts, generated output, ownership and scope without writing.
|
|
103
108
|
- `dab policy explain` shows the effective rules and hooks for a selected target.
|
|
104
109
|
|
|
110
|
+
The generic profile focuses on configuration drift and the documentation, notes and skills discipline. Hooks and shared memory stay advanced and opt-in: existing hooks are still validated and compiled where applicable, and existing memory is still preserved and validated.
|
|
111
|
+
|
|
105
112
|
## Why DAB exists
|
|
106
113
|
|
|
107
114
|
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.
|
|
@@ -111,7 +118,7 @@ Two observations shaped my thinking:
|
|
|
111
118
|
- A DeepSeek operator developer described a likely shift from designing, writing and optimizing operators to driving agents that perform that work.
|
|
112
119
|
- Robin Li's Builder framing broadens the creator role beyond people who write code.
|
|
113
120
|
|
|
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
|
|
121
|
+
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 and decisions, plus optional 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
122
|
|
|
116
123
|
## Design principles
|
|
117
124
|
|
|
@@ -134,6 +141,7 @@ I first explored a narrower practice, DAD (Drive Agent Development): defining ho
|
|
|
134
141
|
|
|
135
142
|
Full documentation: [docs](https://github.com/pzsoftchen/drive-agent-build/tree/main/docs)
|
|
136
143
|
|
|
144
|
+
- [Documentation guide](docs/AGENTS.md)
|
|
137
145
|
- [Why DAB exists](docs/concepts/why-dab.md)
|
|
138
146
|
- [Roadmap](docs/roadmap.md)
|
|
139
147
|
- [Architecture](docs/architecture.md)
|
|
@@ -142,6 +150,8 @@ Full documentation: [docs](https://github.com/pzsoftchen/drive-agent-build/tree/
|
|
|
142
150
|
- [Claude Code integration](docs/user/claude-code.md)
|
|
143
151
|
- [Agent Note 0001](.agents/notes/implemented/architecture/2026-11-16-agents-source-tree.md)
|
|
144
152
|
- [Agent Note 0002](.agents/notes/implemented/architecture/2026-11-16-claude-md-compat-shim.md)
|
|
153
|
+
- [Agent Note 0003](.agents/notes/implemented/architecture/2026-11-23-practice-layer.md)
|
|
154
|
+
- [Agent Note 0004](.agents/notes/implemented/architecture/2026-11-24-managed-skills.md)
|
|
145
155
|
|
|
146
156
|
## License
|
|
147
157
|
|
package/README.zh.md
CHANGED
|
@@ -52,17 +52,22 @@ DAB 是长期方向:驱动 Agent 成为构建者。当前实现路径是 DAD
|
|
|
52
52
|
|
|
53
53
|
## 当前状态
|
|
54
54
|
|
|
55
|
-
图中的方式是 DAB/DAD
|
|
55
|
+
图中的方式是 DAB/DAD 的组合目标模型。DAD 配置治理基础已发布为 `@saydone/dab@0.1.2`,包含实践层和受管 authoring skills。下一步是单任务证据;DAB 尚未排期。
|
|
56
56
|
|
|
57
57
|
| 能力 | 状态 |
|
|
58
58
|
|---|---|
|
|
59
|
-
| DAD 编写事实、投影、漂移检测和策略解释 | 已在
|
|
60
|
-
| DAD 独立的 project/global scope 与 v2 manifest | 已在
|
|
59
|
+
| DAD 编写事实、投影、漂移检测和策略解释 | 已在 0.1.1 发布 |
|
|
60
|
+
| DAD 独立的 project/global scope 与 v2 manifest | 已在 0.1.1 发布 |
|
|
61
|
+
| DAD 实践层:generic profile、单语 docs 和 authoring skills | 已在 0.1.2 发布 |
|
|
62
|
+
| DAD 受管 authoring skills:包内模板、marker hash 和受管更新 | 已在 0.1.2 发布 |
|
|
63
|
+
| DAD 高级 hooks 与共享记忆 | 可选;默认不生成 |
|
|
61
64
|
| DAD 单开发任务证据 | 计划在 v0.2 提供,这是下一步 |
|
|
62
65
|
| DAD 记忆与运行加固 | 计划在 v0.3 提供 |
|
|
63
66
|
| DAD Codex 与 DSH adapter | 在单任务证据之后 |
|
|
64
67
|
| DAB 目标拆解与跨任务收敛 | 研究阶段,以 DAD 证据为前置条件 |
|
|
65
68
|
|
|
69
|
+
发布:[npm](https://www.npmjs.com/package/@saydone/dab) · [GitHub Release v0.1.2](https://github.com/pzsoftchen/drive-agent-build/releases/tag/v0.1.2)
|
|
70
|
+
|
|
66
71
|
## 快速开始
|
|
67
72
|
|
|
68
73
|
前置条件:Node.js `>=24.9`、Claude Code `>=2.1.277`、macOS 或 Linux。
|
|
@@ -97,11 +102,13 @@ pnpm link --global
|
|
|
97
102
|
|
|
98
103
|
## 命令做什么
|
|
99
104
|
|
|
100
|
-
- `dab init`
|
|
101
|
-
- `dab normalize`
|
|
105
|
+
- `dab init` 写入项目编写骨架,包括 `docs/AGENTS.md`、`docs/architecture.md` 和 `dab-*` authoring skills,并在安全时运行 normalize。它不生成高级 hooks 或共享记忆。
|
|
106
|
+
- `dab normalize` 编译策略、生成指令和投影产物、补齐缺失的 docs 和 authoring skills、更新未修改的受管 authoring skills,并记录哈希。
|
|
102
107
|
- `dab detect` 在不写入的情况下检查编写事实、生成输出、所有权和作用域。
|
|
103
108
|
- `dab policy explain` 展示选定 target 的最终规则和 hooks。
|
|
104
109
|
|
|
110
|
+
Generic profile 聚焦配置漂移,以及 docs、notes 和 skills 纪律。Hooks 与共享记忆保持高级、可选:已有 hooks 仍会被校验并在适用时编译,已有记忆仍会被保留和校验。
|
|
111
|
+
|
|
105
112
|
## DAB 为什么存在
|
|
106
113
|
|
|
107
114
|
我从个人杠杆正在发生变化这一点开始思考 DAB。当 Agent 承担越来越多执行工作时,我相信构建者的优势不再是亲手完成每一步,而是设计让 Agent 可靠构建的条件。
|
|
@@ -111,7 +118,7 @@ pnpm link --global
|
|
|
111
118
|
- 一位 DeepSeek 算子开发者判断,工作重心可能从设计、编写和优化算子,转向驾驶 Agent 完成这些工作。
|
|
112
119
|
- 李彦宏提出的 Builder,把创造者的范围从编写代码的人扩展到更广泛的人群。
|
|
113
120
|
|
|
114
|
-
我最早实践的是一个更窄的做法:DAD(Drive Agent Development,驱动 Agent 开发),即定义 Agent 应如何开展开发工作,并驾驶 Agent 按这个过程执行。DAB 保留 DAD
|
|
121
|
+
我最早实践的是一个更窄的做法:DAD(Drive Agent Development,驱动 Agent 开发),即定义 Agent 应如何开展开发工作,并驾驶 Agent 按这个过程执行。DAB 保留 DAD 的编写事实、投影、漂移检测和决策,以及可选的共享记忆,再增加前面描述的面向交付的收敛。开发是第一个范围,因为我自己就是第一位构建者,而不是因为开发就是终点。
|
|
115
122
|
|
|
116
123
|
## 设计原则
|
|
117
124
|
|
|
@@ -134,6 +141,7 @@ pnpm link --global
|
|
|
134
141
|
|
|
135
142
|
完整文档:[docs](https://github.com/pzsoftchen/drive-agent-build/tree/main/docs)
|
|
136
143
|
|
|
144
|
+
- [文档指南](docs/AGENTS.md)
|
|
137
145
|
- [DAB 为什么存在](docs/concepts/why-dab.zh.md)
|
|
138
146
|
- [路线图](docs/roadmap.zh.md)
|
|
139
147
|
- [架构](docs/architecture.zh.md)
|
|
@@ -142,6 +150,8 @@ pnpm link --global
|
|
|
142
150
|
- [Claude Code 集成](docs/user/claude-code.zh.md)
|
|
143
151
|
- [Agent 决策记录 0001](.agents/notes/implemented/architecture/2026-11-16-agents-source-tree.zh.md)
|
|
144
152
|
- [Agent 决策记录 0002](.agents/notes/implemented/architecture/2026-11-16-claude-md-compat-shim.zh.md)
|
|
153
|
+
- [Agent 决策记录 0003](.agents/notes/implemented/architecture/2026-11-23-practice-layer.zh.md)
|
|
154
|
+
- [Agent 决策记录 0004](.agents/notes/implemented/architecture/2026-11-24-managed-skills.zh.md)
|
|
145
155
|
|
|
146
156
|
## 许可证
|
|
147
157
|
|
|
@@ -90,7 +90,10 @@ async function normalize(input) {
|
|
|
90
90
|
generated: generatedRecord,
|
|
91
91
|
fix: input.fix,
|
|
92
92
|
});
|
|
93
|
-
const projectionPlan = await planProjectionActions(input.paths.root, discovered.projections, generatedRecord, {
|
|
93
|
+
const projectionPlan = await planProjectionActions(input.paths.root, discovered.projections, generatedRecord, {
|
|
94
|
+
fix: input.fix,
|
|
95
|
+
importedTargets: new Set(input.importedTargets ?? []),
|
|
96
|
+
});
|
|
94
97
|
const backupTargets = new Set(projectionPlan.actions
|
|
95
98
|
.filter((action) => action.type === 'backup-and-replace' || action.type === 'backup-and-remove')
|
|
96
99
|
.map((action) => action.projection.target));
|
|
@@ -195,7 +198,7 @@ async function detect(input) {
|
|
|
195
198
|
diagnostics.push(...await checkSettings(input.paths.root, input.paths, generated, expectedSettings));
|
|
196
199
|
}
|
|
197
200
|
diagnostics.push(...await checkInstructions(input.paths.root, input.paths, options.instructions, generated));
|
|
198
|
-
diagnostics.push(...await checkProjections(input.paths.root, input.paths, discovered.projections, generated));
|
|
201
|
+
diagnostics.push(...await checkProjections(input.paths.root, input.paths, discovered.projections, generated, new Set(input.importedTargets ?? [])));
|
|
199
202
|
const projected = new Set(discovered.projections.map((item) => projectionKey(item.kind, item.name)));
|
|
200
203
|
const statuses = [
|
|
201
204
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../../src/adapter/claude-code/adapter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,GACd,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAcrE,OAAO,EACL,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,GAEtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,YAAY,GAEb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,SAAS,wBAAwB,CAAC,MAAwB;IACxD,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;QACpB,KAAK,cAAc,CAAC;QACpB,KAAK,iBAAiB;YACpB,OAAO,GAAG,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;QACtD;YACE,OAAO,GAAG,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,UAAU,CAAC,MAAM,OAAO,MAAM,CAAC,UAAU,EAAE,CAAC;IAChF,CAAC;AACH,CAAC;AAED,SAAS,iBAAiB,CAAC,KAA4B;IACrD,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC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AC/B,QAAQ,EAAE,aAA+B;IACzC,SAAS;IACT,MAAM;CACiB,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { Diagnostic } from '../../core/diagnostics.ts';
|
|
2
|
+
import type { Scope } from '../../model/scope.ts';
|
|
3
|
+
import type { ProjectManifest } from '../../model/types.ts';
|
|
4
|
+
export interface ClaudeAdoptionEntry {
|
|
5
|
+
kind: 'agent' | 'skill';
|
|
6
|
+
name: string;
|
|
7
|
+
source: string;
|
|
8
|
+
target: string;
|
|
9
|
+
writeSource: boolean;
|
|
10
|
+
replaceTarget: boolean;
|
|
11
|
+
diagnostics: Diagnostic[];
|
|
12
|
+
}
|
|
13
|
+
export interface ClaudeAdoptionPlan {
|
|
14
|
+
entries: ClaudeAdoptionEntry[];
|
|
15
|
+
diagnostics: Diagnostic[];
|
|
16
|
+
}
|
|
17
|
+
export interface ClaudeAdoptionInput {
|
|
18
|
+
root: string;
|
|
19
|
+
scope: Scope;
|
|
20
|
+
agentsRoot: string;
|
|
21
|
+
claudeRoot: string;
|
|
22
|
+
manifest?: ProjectManifest;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Plan the import of physical `.claude/agents/*.md` files and
|
|
26
|
+
* `.claude/skills/<dir>/SKILL.md` directories into the authored `.agents`
|
|
27
|
+
* tree. The plan is read-only; applying it is a separate step.
|
|
28
|
+
*/
|
|
29
|
+
export declare function planClaudeAdoption(input: ClaudeAdoptionInput): Promise<ClaudeAdoptionPlan>;
|
|
30
|
+
export interface ClaudeAdoptionApplyInput {
|
|
31
|
+
root: string;
|
|
32
|
+
plan: ClaudeAdoptionPlan;
|
|
33
|
+
backupRoot: string;
|
|
34
|
+
}
|
|
35
|
+
export interface ClaudeAdoptionApplyResult {
|
|
36
|
+
actions: string[];
|
|
37
|
+
backups: string[];
|
|
38
|
+
diagnostics: Diagnostic[];
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Apply a Claude import plan: copy importable agents/skills into the authored
|
|
42
|
+
* `.agents` tree, then back up and replace each `.claude` entry with a
|
|
43
|
+
* per-entry symlink. Existing `.agents` sources are never overwritten.
|
|
44
|
+
* A backup failure aborts before replacement; there is no automatic rollback,
|
|
45
|
+
* so `actions` and `backups` report writes that already happened and a rerun
|
|
46
|
+
* rebuilds the plan from the resulting tree.
|
|
47
|
+
*/
|
|
48
|
+
export declare function applyClaudeAdoption(input: ClaudeAdoptionApplyInput): Promise<ClaudeAdoptionApplyResult>;
|
|
49
|
+
export interface ClaudeAdoptionPreview {
|
|
50
|
+
actions: string[];
|
|
51
|
+
backups: string[];
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Describe what `applyClaudeAdoption` would do without touching the
|
|
55
|
+
* filesystem. Backup paths are relative to `root`, matching the applied
|
|
56
|
+
* result. Used by `dab normalize --dry-run`.
|
|
57
|
+
*/
|
|
58
|
+
export declare function previewClaudeAdoption(root: string, plan: ClaudeAdoptionPlan, backupRoot: string): ClaudeAdoptionPreview;
|