intentdna 1.9.0 → 1.9.3
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +227 -87
- package/dist/cli/commands/run-lifecycle.d.ts +61 -11
- package/dist/cli/commands/run-lifecycle.js +184 -50
- package/dist/cli/commands/run-observer.d.ts +15 -0
- package/dist/cli/commands/run-observer.js +210 -0
- package/dist/cli/commands/run.d.ts +16 -20
- package/dist/cli/commands/run.js +461 -659
- package/dist/cli/commands/sync.js +16 -12
- package/dist/cli/index.js +14 -5
- package/dist/compiler/compile.d.ts +1 -0
- package/dist/compiler/compile.js +1 -1
- package/dist/compiler/controller.d.ts +16 -0
- package/dist/compiler/controller.js +693 -0
- package/dist/compiler/input-resolver.d.ts +2 -0
- package/dist/compiler/input-resolver.js +22 -6
- package/dist/hooks/cli.d.ts +45 -0
- package/dist/hooks/cli.js +263 -31
- package/dist/hooks/host-event.d.ts +57 -0
- package/dist/hooks/host-event.js +187 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/protocol.d.ts +7 -0
- package/dist/hooks/schema.d.ts +1 -0
- package/dist/hooks/schema.js +89 -1
- package/dist/hooks/state.d.ts +23 -1
- package/dist/hooks/state.js +9 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/mcp/index.js +2 -0
- package/dist/mcp/tools-run.d.ts +4 -0
- package/dist/mcp/tools-run.js +419 -0
- package/dist/mcp/tools-state.d.ts +1 -1
- package/dist/mcp/tools-state.js +13 -241
- package/dist/runtime/artifact-store.d.ts +146 -0
- package/dist/runtime/artifact-store.js +1436 -0
- package/dist/runtime/canonical-attempt-outcome.d.ts +12 -0
- package/dist/runtime/canonical-attempt-outcome.js +195 -0
- package/dist/runtime/canonical-json.d.ts +10 -0
- package/dist/runtime/canonical-json.js +105 -0
- package/dist/runtime/canonical-run-application.d.ts +93 -0
- package/dist/runtime/canonical-run-application.js +229 -0
- package/dist/runtime/canonical-run-service.d.ts +454 -0
- package/dist/runtime/canonical-run-service.js +4760 -0
- package/dist/runtime/canonical-runtime-composition.d.ts +22 -0
- package/dist/runtime/canonical-runtime-composition.js +34 -0
- package/dist/runtime/canonical-runtime-projection.d.ts +3 -0
- package/dist/runtime/canonical-runtime-projection.js +4 -0
- package/dist/runtime/canonical-target-compiler.d.ts +46 -0
- package/dist/runtime/canonical-target-compiler.js +514 -0
- package/dist/runtime/claude-agent-identity.d.ts +2 -0
- package/dist/runtime/claude-agent-identity.js +21 -0
- package/dist/runtime/executable-run-plan.d.ts +328 -0
- package/dist/runtime/executable-run-plan.js +1485 -0
- package/dist/runtime/execution-authority.d.ts +83 -0
- package/dist/runtime/execution-authority.js +98 -0
- package/dist/runtime/handoff-resolver.js +4 -1
- package/dist/runtime/harness-pull-adapter.d.ts +146 -0
- package/dist/runtime/harness-pull-adapter.js +315 -0
- package/dist/runtime/index.d.ts +39 -14
- package/dist/runtime/index.js +29 -7
- package/dist/runtime/local-execution-authority.d.ts +194 -0
- package/dist/runtime/local-execution-authority.js +2897 -0
- package/dist/runtime/local-execution-reconciliation.d.ts +20 -0
- package/dist/runtime/local-execution-reconciliation.js +107 -0
- package/dist/runtime/local-execution-supervisor-script.d.ts +7 -0
- package/dist/runtime/local-execution-supervisor-script.js +793 -0
- package/dist/runtime/local-provider-sandbox.d.ts +42 -0
- package/dist/runtime/local-provider-sandbox.js +154 -0
- package/dist/runtime/local-verifier-execution.d.ts +24 -0
- package/dist/runtime/local-verifier-execution.js +290 -0
- package/dist/runtime/local-windows-execution-supervisor-script.d.ts +6 -0
- package/dist/runtime/local-windows-execution-supervisor-script.js +788 -0
- package/dist/runtime/plan-store.d.ts +30 -0
- package/dist/runtime/plan-store.js +231 -0
- package/dist/runtime/process-tree.d.ts +9 -0
- package/dist/runtime/process-tree.js +97 -24
- package/dist/runtime/providers/codex.js +2 -2
- package/dist/runtime/push-driver.d.ts +184 -0
- package/dist/runtime/push-driver.js +1002 -0
- package/dist/runtime/result-store.d.ts +34 -3
- package/dist/runtime/result-store.js +1073 -2
- package/dist/runtime/run-binding.d.ts +68 -0
- package/dist/runtime/run-binding.js +278 -0
- package/dist/runtime/run-contracts.d.ts +575 -0
- package/dist/runtime/run-contracts.js +58 -7
- package/dist/runtime/run-controller.d.ts +1 -6
- package/dist/runtime/run-controller.js +0 -41
- package/dist/runtime/run-store.d.ts +85 -7
- package/dist/runtime/run-store.js +2528 -186
- package/dist/runtime/skill-adapter.d.ts +18 -7
- package/dist/runtime/skill-adapter.js +100 -742
- package/dist/runtime/structured-output-validator.d.ts +44 -0
- package/dist/runtime/structured-output-validator.js +171 -0
- package/dist/runtime/verifier-command-binding.d.ts +22 -0
- package/dist/runtime/verifier-command-binding.js +162 -0
- package/dist/runtime/verifier.d.ts +46 -6
- package/dist/runtime/verifier.js +355 -53
- package/dist/runtime/windows-job-keeper.d.ts +47 -0
- package/dist/runtime/windows-job-keeper.js +231 -0
- package/dist/runtime/worker-executor.d.ts +17 -1
- package/dist/runtime/worker-executor.js +26 -5
- package/dist/runtime/workflow-plan-adapter.d.ts +19 -0
- package/dist/runtime/workflow-plan-adapter.js +502 -6
- package/dist/runtime/workflow-runtime-manifest.d.ts +1 -0
- package/dist/runtime/workflow-runtime-manifest.js +5 -0
- package/dist/runtime/workspace-isolation.d.ts +29 -2
- package/dist/runtime/workspace-isolation.js +488 -11
- package/dist/runtime/workspace-observation.d.ts +44 -0
- package/dist/runtime/workspace-observation.js +216 -0
- package/dist/schema/controller-registry.d.ts +0 -7
- package/dist/schema/controller-registry.js +0 -8
- package/dist/schema/types.d.ts +84 -10
- package/dist/schema/types.js +2 -0
- package/dist/schema/validate.js +151 -1
- package/dist/schema/validators/controllers.d.ts +1 -1
- package/dist/schema/validators/controllers.js +126 -41
- package/dist/schema/workflow-authoring-contract.js +2 -0
- package/dist/schema/yaml-parser.js +1 -1
- package/dist/templates/flutter-rewrite-new.dna.yaml +1 -0
- package/dist/templates/flutter-rewrite.dna.yaml +87 -60
- package/dist/templates/safe-refactoring.dna.yaml +1 -0
- package/native/windows-job-keeper/README.md +80 -0
- package/native/windows-job-keeper/bin/aarch64/intentdna-windows-job-keeper.exe +0 -0
- package/native/windows-job-keeper/bin/x86_64/intentdna-windows-job-keeper.exe +0 -0
- package/native/windows-job-keeper/keeper.c +979 -0
- package/native/windows-job-keeper/manifest.json +33 -0
- package/package.json +6 -2
- package/scripts/build-windows-job-keeper.mjs +172 -0
- package/scripts/verify-windows-job-keeper.mjs +184 -0
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
{
|
|
10
10
|
"name": "intentdna",
|
|
11
11
|
"description": "Declarative policy layer for AI agent behavior with plugin-managed hook runtime for Claude Code.",
|
|
12
|
-
"version": "1.9.
|
|
12
|
+
"version": "1.9.3",
|
|
13
13
|
"author": {
|
|
14
14
|
"name": "Samuel"
|
|
15
15
|
},
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
]
|
|
26
26
|
}
|
|
27
27
|
],
|
|
28
|
-
"version": "1.9.
|
|
28
|
+
"version": "1.9.3"
|
|
29
29
|
}
|
package/README.md
CHANGED
|
@@ -1,26 +1,35 @@
|
|
|
1
1
|
# IntentDNA
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**面向 Codex CLI、Claude Code 等 AI 编程环境的声明式工作流资产、同步与运行工具。**
|
|
4
4
|
|
|
5
5
|
[English](#english) | [路线转换文章](https://wanglushan.cn/blog/intentdna-route-reset-from-platform-to-workflow-cli) | [历史 Online 看板](https://online-plum-one.vercel.app)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
> **项目状态 / Project status:** 本项目后续不再进行独立扩展;新的研发自动化能力将以独立 CLI 等工具的形式在其他仓库开发。 / This project will not be expanded independently; new engineering automation capabilities will be developed in other repositories as standalone CLIs and related tools.
|
|
8
8
|
|
|
9
|
-
IntentDNA
|
|
9
|
+
IntentDNA 把一套可重复的 AI 工作方法描述为版本化的 `.dna.yaml` 资产,并提供确定性的校验、编译、同步、运行和证据能力。你可以用它定义步骤、角色、权限、交接、检查点、重试和验证规则,再把工作流同步到本地 Harness 中执行。
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## 它解决什么问题
|
|
12
|
+
|
|
13
|
+
AI 编程工作流经常散落在 Prompt、对话、个人经验和临时脚本中。IntentDNA 将这些方法变成可以审查和复用的工程资产:
|
|
14
|
+
|
|
15
|
+
- 用 YAML 明确适用场景、输入、输出、角色、步骤和边界;
|
|
16
|
+
- 在执行前确定性校验结构、引用、权限和工作流约束;
|
|
17
|
+
- 同步为 Codex Skills、Claude agents/skills/hooks 等 Harness 资产;
|
|
18
|
+
- 用 Controller 支持持久运行、并行步骤、检查点、审查、重试和恢复;
|
|
19
|
+
- 打包、签名并验证本地运行证据;
|
|
20
|
+
- 从真实 Skills 和源码提炼候选资产,同时保留来源与许可证信息。
|
|
21
|
+
|
|
22
|
+
核心边界是:
|
|
12
23
|
|
|
13
24
|
```text
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
25
|
+
.dna.yaml 资产 = 工作流定义
|
|
26
|
+
dna validate / compile / sync = 确定性工具链
|
|
27
|
+
Codex CLI / Claude Code / provider = 实际执行环境
|
|
28
|
+
本地运行记录与 verifier = 完成证据
|
|
29
|
+
Online = 历史看板与可选投影,不是运行时
|
|
19
30
|
```
|
|
20
31
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
完整背景见《[IntentDNA 路线重置:从平台优先到工作流 CLI](https://wanglushan.cn/blog/intentdna-route-reset-from-platform-to-workflow-cli)》。此前的 [IntentDNA Online 看板](https://online-plum-one.vercel.app) 作为历史产品证据继续保留;它展示了资产选择、安装指引和证据投影,但不是当前运行时,也不执行工作流。
|
|
32
|
+
IntentDNA 不重造通用模型循环,不把 Online 或 Supabase 当作本地权限来源,也不接受模型的“已完成”声明替代验证结果。
|
|
24
33
|
|
|
25
34
|
## 安装
|
|
26
35
|
|
|
@@ -29,74 +38,148 @@ npm install --global intentdna@latest
|
|
|
29
38
|
dna --version
|
|
30
39
|
```
|
|
31
40
|
|
|
32
|
-
Claude Code
|
|
41
|
+
Claude Code 插件与 npm 包使用相同版本发布:
|
|
33
42
|
|
|
34
43
|
```bash
|
|
35
44
|
claude plugin marketplace add lushan1314/intentdna-repo
|
|
36
45
|
claude plugin install intentdna@intentdna
|
|
37
46
|
```
|
|
38
47
|
|
|
39
|
-
##
|
|
48
|
+
## 使用现有工作流
|
|
40
49
|
|
|
41
|
-
|
|
50
|
+
先查看内置资产,再在目标项目中初始化和同步:
|
|
42
51
|
|
|
43
52
|
```bash
|
|
44
|
-
dna quickstart --asset flutter-rewrite --sync-target codex
|
|
45
53
|
dna templates list
|
|
46
54
|
dna templates show flutter-rewrite
|
|
55
|
+
dna quickstart --asset flutter-rewrite --sync-target codex
|
|
56
|
+
|
|
47
57
|
dna init --template flutter-rewrite
|
|
48
58
|
dna sync --codex --dry-run
|
|
49
59
|
dna sync --codex
|
|
50
60
|
```
|
|
51
61
|
|
|
52
|
-
|
|
62
|
+
`dna quickstart` 只输出指引;`dna sync --dry-run` 预览文件变更;`dna sync` 才会写入 Harness 资产,但不会自动运行工作流。
|
|
63
|
+
|
|
64
|
+
同步完成后,在对应项目中使用 Codex CLI 或 Claude Code 调用生成的 Skill、agent 或工作流入口。检查同步状态:
|
|
53
65
|
|
|
54
66
|
```bash
|
|
55
|
-
dna
|
|
56
|
-
dna
|
|
57
|
-
dna report verify <envelope-path> --json
|
|
67
|
+
dna sync status
|
|
68
|
+
dna sync doctor
|
|
58
69
|
```
|
|
59
70
|
|
|
60
|
-
|
|
71
|
+
## 打造自己的工作流
|
|
61
72
|
|
|
62
|
-
|
|
73
|
+
IntentDNA 将“理解人的意图”和“确定性验证”分开:外部 Agent 负责访谈并编写 YAML,`dna` 负责提供完整创作契约并验证结果,人负责确认是否保存和采用。
|
|
63
74
|
|
|
64
|
-
|
|
75
|
+
### 1. 生成创作包
|
|
65
76
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
-
|
|
69
|
-
|
|
70
|
-
|
|
77
|
+
```bash
|
|
78
|
+
dna workflow authoring-packet "描述要沉淀的重复工作方法" \
|
|
79
|
+
--project-dir /path/to/project \
|
|
80
|
+
--json
|
|
81
|
+
```
|
|
71
82
|
|
|
72
|
-
|
|
83
|
+
创作包包含字段约束、红线、真实示例、访谈问题、校验循环和交接边界。这个命令不调用模型,也不生成或保存 YAML。
|
|
84
|
+
|
|
85
|
+
### 2. 让 Agent 编写候选资产
|
|
86
|
+
|
|
87
|
+
候选文件放在:
|
|
88
|
+
|
|
89
|
+
```text
|
|
90
|
+
.dna/authoring/<asset>.candidate.dna.yaml
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
一个工作流资产通常包括:
|
|
94
|
+
|
|
95
|
+
- `id`、`name`、`version`、`purpose`、`maturity`;
|
|
96
|
+
- `fit`、`not_for`、`inputs`、`outputs`;
|
|
97
|
+
- `roles` 及其工具权限和读写范围;
|
|
98
|
+
- `workflow` 或 `workflows` 中的步骤、依赖、交接、检查点和重试;
|
|
99
|
+
- `boundaries`、`evidence` 和 `lineage`。
|
|
100
|
+
|
|
101
|
+
### 3. 校验并修订
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
dna validate .dna/authoring/<asset>.candidate.dna.yaml
|
|
105
|
+
```
|
|
73
106
|
|
|
74
|
-
|
|
75
|
-
- 不要求所有工作流先进入统一 DSL;
|
|
76
|
-
- 不把 Online、市场或 Supabase 当作本地运行权限的来源;
|
|
77
|
-
- 不用模型的“已完成”声明替代确定性验证。
|
|
107
|
+
Agent 只根据校验诊断和已确认的人类意图修改 YAML,直到校验通过。`dna` 不推断目标,也不会自动放宽边界。
|
|
78
108
|
|
|
79
|
-
|
|
109
|
+
### 4. 人工确认并加入项目资产库
|
|
80
110
|
|
|
81
|
-
|
|
111
|
+
确认候选内容后,将同一份 YAML 保存为:
|
|
82
112
|
|
|
83
113
|
```text
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
114
|
+
.dna/templates/<asset>.dna.yaml
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
然后检查资产并预览同步结果:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
dna assets show <asset> --project-dir /path/to/project
|
|
121
|
+
dna assets inspect <asset> --project-dir /path/to/project
|
|
122
|
+
dna sync --project-dir /path/to/project --dry-run
|
|
123
|
+
dna sync --project-dir /path/to/project --codex --dry-run
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
保存、采用和同步是彼此独立的人工决策。校验通过不代表资产已被采用或执行。
|
|
127
|
+
|
|
128
|
+
## 运行与证据
|
|
129
|
+
|
|
130
|
+
工作流可以在同步后的 Harness 中执行,也可以使用 IntentDNA Controller 的运行入口。可用命令以当前 CLI 帮助为准:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
dna run --help
|
|
134
|
+
dna run status <run-id>
|
|
135
|
+
dna run inspect <run-id>
|
|
136
|
+
dna run resume <run-id>
|
|
88
137
|
```
|
|
89
138
|
|
|
90
|
-
|
|
139
|
+
真实执行后,可打包、签名并验证本地证据:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
dna report package --json
|
|
143
|
+
dna report sign --package .dna/reports/latest-report-package.json \
|
|
144
|
+
--output .dna/reports/ingest/local-envelope.json \
|
|
145
|
+
--json
|
|
146
|
+
dna report verify .dna/reports/ingest/local-envelope.json --json
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
云端上传是可选能力,并且必须先通过凭证和部署检查。本地工作流的运行事实不会因为上传而转移到云端。
|
|
150
|
+
|
|
151
|
+
## 内置工作流类型
|
|
152
|
+
|
|
153
|
+
仓库包含多种可直接查看和复用的资产,包括:
|
|
154
|
+
|
|
155
|
+
- Flutter 重写、行为锁定、诊断与修复审查;
|
|
156
|
+
- 代码审查、TDD、QA、调试、迁移和发布证据;
|
|
157
|
+
- 并行子 Agent、多角色交接和持久执行;
|
|
158
|
+
- 研究改进、工作流创作和资产提炼;
|
|
159
|
+
- 安全开发、事故响应和组织基线。
|
|
160
|
+
|
|
161
|
+
使用 `dna templates list` 查看当前安装版本中的完整目录。
|
|
162
|
+
|
|
163
|
+
## 路线转换与历史
|
|
164
|
+
|
|
165
|
+
IntentDNA 曾优先建设跨 Harness 抽象、组织治理、市场和 Online 控制面。实践表明,这些机制具备工程可行性,但平台优先并不是后续研发自动化最合适的起点。
|
|
166
|
+
|
|
167
|
+
完整反思见《[IntentDNA 路线重置:从平台优先到工作流 CLI](https://wanglushan.cn/blog/intentdna-route-reset-from-platform-to-workflow-cli)》。
|
|
168
|
+
|
|
169
|
+
[IntentDNA Online 看板](https://online-plum-one.vercel.app) 作为历史产品证据继续保留,用于展示当时的资产选择、安装指引和证据投影。它不执行工作流。
|
|
170
|
+
|
|
171
|
+
仓库中的当前文档和历史证据采用两态管理:少量 living docs 描述当前实现,带日期和索引的 `docs/archive/` 保存路线演进;本地会话状态、临时提示词、运行日志和 IDE workspace 不进入版本控制。
|
|
91
172
|
|
|
92
173
|
## 文档
|
|
93
174
|
|
|
94
175
|
- [快速开始](docs/quickstart.md)
|
|
176
|
+
- [工作流资产格式](docs/architecture/c1-asset-format.md)
|
|
177
|
+
- [工作流创作包契约](docs/architecture/c3-authoring-packet.md)
|
|
178
|
+
- [Controller 与 worker 运行时](docs/architecture/controller-worker-runtime.md)
|
|
95
179
|
- [工作流运行时清单](docs/architecture/workflow-runtime-manifest.md)
|
|
180
|
+
- [本地证据捕获](docs/architecture/c5-evidence-capture.md)
|
|
96
181
|
- [产品重置 ADR](docs/decisions/ADR-001-product-reset.md)
|
|
97
|
-
- [
|
|
98
|
-
- [2026 H2 路线分享](docs/archive/2026H2/sharing/2026-08-01-build-your-workflow-cli.md)
|
|
99
|
-
- [v1.9.0 发布说明](docs/archive/2026H2/release-notes/v1.9.0.md)
|
|
182
|
+
- [文档与历史档案索引](docs/README.md)
|
|
100
183
|
|
|
101
184
|
## License
|
|
102
185
|
|
|
@@ -108,27 +191,34 @@ Apache-2.0
|
|
|
108
191
|
|
|
109
192
|
## English
|
|
110
193
|
|
|
111
|
-
**
|
|
194
|
+
**Declarative workflow assets, synchronization, and runtime tooling for AI coding harnesses such as Codex CLI and Claude Code.**
|
|
112
195
|
|
|
113
196
|
[Route reset article (Chinese)](https://wanglushan.cn/blog/intentdna-route-reset-from-platform-to-workflow-cli) | [Historical Online dashboard](https://online-plum-one.vercel.app)
|
|
114
197
|
|
|
115
|
-
|
|
198
|
+
IntentDNA describes repeatable AI work methods as versioned `.dna.yaml` assets and provides deterministic validation, compilation, synchronization, runtime, and evidence tooling. A workflow can define steps, roles, permissions, handoffs, checkpoints, retries, and verifiers before being synchronized into a local harness.
|
|
199
|
+
|
|
200
|
+
### What It Solves
|
|
201
|
+
|
|
202
|
+
AI coding workflows often remain scattered across prompts, conversations, personal experience, and temporary scripts. IntentDNA turns those methods into reviewable engineering assets:
|
|
116
203
|
|
|
117
|
-
|
|
204
|
+
- define fit, inputs, outputs, roles, steps, and boundaries in YAML;
|
|
205
|
+
- validate structure, references, permissions, and workflow constraints deterministically;
|
|
206
|
+
- synchronize Codex Skills, Claude agents/skills/hooks, and other harness assets;
|
|
207
|
+
- support durable runs, parallel steps, checkpoints, reviews, retries, and recovery;
|
|
208
|
+
- package, sign, and verify local runtime evidence;
|
|
209
|
+
- refine candidates from real skills and source while retaining provenance and license data.
|
|
118
210
|
|
|
119
|
-
The
|
|
211
|
+
The authority model is:
|
|
120
212
|
|
|
121
213
|
```text
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
214
|
+
.dna.yaml asset = workflow definition
|
|
215
|
+
dna validate / compile / sync = deterministic toolchain
|
|
216
|
+
Codex CLI / Claude Code / provider = execution environment
|
|
217
|
+
local run records and verifiers = completion evidence
|
|
218
|
+
Online = historical dashboard and optional projection, not runtime
|
|
127
219
|
```
|
|
128
220
|
|
|
129
|
-
IntentDNA
|
|
130
|
-
|
|
131
|
-
The full rationale is documented in [IntentDNA Route Reset: From Platform to Workflow CLI](https://wanglushan.cn/blog/intentdna-route-reset-from-platform-to-workflow-cli). The previous [IntentDNA Online dashboard](https://online-plum-one.vercel.app) remains available as historical product evidence. It demonstrates asset selection, setup guidance, and evidence projection, but it is not the current runtime and does not execute workflows.
|
|
221
|
+
IntentDNA does not rebuild the generic model loop, make Online or Supabase the authority for local execution, or accept a model's completion claim as a substitute for verification.
|
|
132
222
|
|
|
133
223
|
### Install
|
|
134
224
|
|
|
@@ -137,74 +227,124 @@ npm install --global intentdna@latest
|
|
|
137
227
|
dna --version
|
|
138
228
|
```
|
|
139
229
|
|
|
140
|
-
Claude Code
|
|
230
|
+
The Claude Code plugin is released at the same version as the npm package:
|
|
141
231
|
|
|
142
232
|
```bash
|
|
143
233
|
claude plugin marketplace add lushan1314/intentdna-repo
|
|
144
234
|
claude plugin install intentdna@intentdna
|
|
145
235
|
```
|
|
146
236
|
|
|
147
|
-
###
|
|
237
|
+
### Use An Existing Workflow
|
|
148
238
|
|
|
149
|
-
|
|
239
|
+
Inspect built-in assets, then initialize and synchronize one inside the target project:
|
|
150
240
|
|
|
151
241
|
```bash
|
|
152
|
-
dna quickstart --asset flutter-rewrite --sync-target codex
|
|
153
242
|
dna templates list
|
|
154
243
|
dna templates show flutter-rewrite
|
|
244
|
+
dna quickstart --asset flutter-rewrite --sync-target codex
|
|
245
|
+
|
|
155
246
|
dna init --template flutter-rewrite
|
|
156
247
|
dna sync --codex --dry-run
|
|
157
248
|
dna sync --codex
|
|
158
249
|
```
|
|
159
250
|
|
|
160
|
-
|
|
251
|
+
`dna quickstart` only prints guidance. `dna sync --dry-run` previews file changes. `dna sync` writes harness assets but does not execute the workflow.
|
|
252
|
+
|
|
253
|
+
Use the generated Skill, agent, or workflow entry point from Codex CLI or Claude Code. Inspect synchronization state with:
|
|
161
254
|
|
|
162
255
|
```bash
|
|
163
|
-
dna
|
|
164
|
-
dna
|
|
165
|
-
dna report verify <envelope-path> --json
|
|
256
|
+
dna sync status
|
|
257
|
+
dna sync doctor
|
|
166
258
|
```
|
|
167
259
|
|
|
168
|
-
|
|
260
|
+
### Author A Workflow
|
|
261
|
+
|
|
262
|
+
IntentDNA separates probabilistic intent interpretation from deterministic validation. An external agent interviews the human and authors YAML; `dna` emits the complete authoring contract and validates the result; the human decides whether the candidate is saved and adopted.
|
|
263
|
+
|
|
264
|
+
Generate an authoring packet:
|
|
169
265
|
|
|
170
|
-
|
|
266
|
+
```bash
|
|
267
|
+
dna workflow authoring-packet "describe the repeated work method" \
|
|
268
|
+
--project-dir /path/to/project \
|
|
269
|
+
--json
|
|
270
|
+
```
|
|
171
271
|
|
|
172
|
-
|
|
272
|
+
The packet includes field constraints, red lines, real examples, interview questions, the validation loop, and handoff boundaries. It does not call a model or create YAML.
|
|
173
273
|
|
|
174
|
-
|
|
175
|
-
- synchronize assets into execution environments such as Codex CLI and Claude Code;
|
|
176
|
-
- support durable runs with controllers, checkpoints, reviews, and recovery;
|
|
177
|
-
- capture local run facts and produce signed, verifiable evidence;
|
|
178
|
-
- refine candidate assets from real skills, scripts, and source while retaining provenance and license data.
|
|
274
|
+
Have the external agent write the candidate to:
|
|
179
275
|
|
|
180
|
-
|
|
276
|
+
```text
|
|
277
|
+
.dna/authoring/<asset>.candidate.dna.yaml
|
|
278
|
+
```
|
|
181
279
|
|
|
182
|
-
|
|
183
|
-
- require every workflow to enter a universal DSL first;
|
|
184
|
-
- make Online, a marketplace, or Supabase the authority for local execution;
|
|
185
|
-
- accept a model's completion claim as a substitute for deterministic verification.
|
|
280
|
+
A workflow asset normally describes metadata, fit, inputs and outputs, roles and permissions, steps and dependencies, handoffs, checkpoints, retries, boundaries, evidence, and lineage.
|
|
186
281
|
|
|
187
|
-
|
|
282
|
+
Validate and revise it:
|
|
188
283
|
|
|
189
|
-
|
|
284
|
+
```bash
|
|
285
|
+
dna validate .dna/authoring/<asset>.candidate.dna.yaml
|
|
286
|
+
```
|
|
190
287
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
288
|
+
After explicit human confirmation, save the same YAML under `.dna/templates/<asset>.dna.yaml`, then inspect it and preview synchronization:
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
dna assets show <asset> --project-dir /path/to/project
|
|
292
|
+
dna assets inspect <asset> --project-dir /path/to/project
|
|
293
|
+
dna sync --project-dir /path/to/project --dry-run
|
|
294
|
+
dna sync --project-dir /path/to/project --codex --dry-run
|
|
196
295
|
```
|
|
197
296
|
|
|
198
|
-
|
|
297
|
+
Saving, adopting, and synchronizing are separate human decisions. Successful validation does not mean the asset has been adopted or executed.
|
|
298
|
+
|
|
299
|
+
### Runtime And Evidence
|
|
300
|
+
|
|
301
|
+
Workflows can execute in the synchronized harness or through the IntentDNA Controller. Use the installed CLI help as the command authority:
|
|
302
|
+
|
|
303
|
+
```bash
|
|
304
|
+
dna run --help
|
|
305
|
+
dna run status <run-id>
|
|
306
|
+
dna run inspect <run-id>
|
|
307
|
+
dna run resume <run-id>
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
After a real run, package, sign, and verify local evidence:
|
|
311
|
+
|
|
312
|
+
```bash
|
|
313
|
+
dna report package --json
|
|
314
|
+
dna report sign --package .dna/reports/latest-report-package.json \
|
|
315
|
+
--output .dna/reports/ingest/local-envelope.json \
|
|
316
|
+
--json
|
|
317
|
+
dna report verify .dna/reports/ingest/local-envelope.json --json
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
Cloud upload is optional and credential-gated. Uploading evidence does not move runtime authority away from the local workflow.
|
|
321
|
+
|
|
322
|
+
### Included Workflow Categories
|
|
323
|
+
|
|
324
|
+
The repository includes assets for Flutter rewrites and repair reviews, code review, TDD, QA, debugging, migrations, release evidence, parallel subagents, multi-role handoffs, durable execution, research improvement, workflow authoring, asset refinement, secure development, incident response, and organization baselines.
|
|
325
|
+
|
|
326
|
+
Run `dna templates list` for the complete catalog in the installed version.
|
|
327
|
+
|
|
328
|
+
### Route Reset And History
|
|
329
|
+
|
|
330
|
+
IntentDNA previously led with cross-harness abstraction, organization governance, a marketplace, and an Online control plane. Those experiments demonstrated engineering feasibility, but platform-first development is not the chosen starting point for the next phase of task-specific automation.
|
|
331
|
+
|
|
332
|
+
The rationale is documented in [IntentDNA Route Reset: From Platform to Workflow CLI](https://wanglushan.cn/blog/intentdna-route-reset-from-platform-to-workflow-cli).
|
|
333
|
+
|
|
334
|
+
The [IntentDNA Online dashboard](https://online-plum-one.vercel.app) remains available as historical product evidence. It demonstrates the earlier asset selection, setup guidance, and evidence projection work; it does not execute workflows.
|
|
335
|
+
|
|
336
|
+
Current documentation and historical evidence follow a two-state model: a small living set describes the implementation, while dated, indexed files under `docs/archive/` preserve route history. Local session state, temporary prompts, runtime logs, and IDE workspace data are excluded from version control.
|
|
199
337
|
|
|
200
338
|
### Documentation
|
|
201
339
|
|
|
202
340
|
- [Quickstart](docs/quickstart.md)
|
|
341
|
+
- [Workflow asset format](docs/architecture/c1-asset-format.md)
|
|
342
|
+
- [Workflow authoring packet](docs/architecture/c3-authoring-packet.md)
|
|
343
|
+
- [Controller and worker runtime](docs/architecture/controller-worker-runtime.md)
|
|
203
344
|
- [Workflow runtime manifest](docs/architecture/workflow-runtime-manifest.md)
|
|
345
|
+
- [Local evidence capture](docs/architecture/c5-evidence-capture.md)
|
|
204
346
|
- [Product reset ADR](docs/decisions/ADR-001-product-reset.md)
|
|
205
|
-
- [
|
|
206
|
-
- [2026 H2 route-sharing note](docs/archive/2026H2/sharing/2026-08-01-build-your-workflow-cli.md)
|
|
207
|
-
- [v1.9.0 release notes](docs/archive/2026H2/release-notes/v1.9.0.md)
|
|
347
|
+
- [Documentation and archive index](docs/README.md)
|
|
208
348
|
|
|
209
349
|
### License
|
|
210
350
|
|
|
@@ -1,30 +1,42 @@
|
|
|
1
|
-
import type { JsonValue, RunId, TaskState } from "../../runtime/run-contracts.js";
|
|
2
|
-
import type {
|
|
3
|
-
import type
|
|
4
|
-
export type RunLifecycleAction = "start" | "status" | "inspect" | "resume" | "cancel";
|
|
1
|
+
import type { CanonicalActivationState, JsonValue, RunId, TaskState } from "../../runtime/run-contracts.js";
|
|
2
|
+
import type { RunAuditView, RunView } from "../../runtime/canonical-run-service.js";
|
|
3
|
+
import { type DurableRunStore, type RunRecord, type RunStatus, type RunStoreSnapshot } from "../../runtime/run-store.js";
|
|
4
|
+
export type RunLifecycleAction = "start" | "status" | "inspect" | "resume" | "cancel" | "close";
|
|
5
5
|
interface LifecycleOutputOptions {
|
|
6
6
|
readonly json?: boolean;
|
|
7
7
|
}
|
|
8
|
-
export interface RunLifecycleStartOptions extends LifecycleOutputOptions {
|
|
9
|
-
readonly controller: RunController;
|
|
10
|
-
readonly run: RunRecord;
|
|
11
|
-
}
|
|
12
8
|
export interface RunLifecycleStatusOptions extends LifecycleOutputOptions {
|
|
13
9
|
readonly run_store: DurableRunStore;
|
|
14
10
|
readonly run_id: RunId;
|
|
11
|
+
readonly service?: CanonicalLifecycleService;
|
|
12
|
+
readonly service_factory?: () => Promise<CanonicalLifecycleService>;
|
|
15
13
|
}
|
|
16
14
|
export interface RunLifecycleInspectOptions extends LifecycleOutputOptions {
|
|
17
15
|
readonly run_store: DurableRunStore;
|
|
18
16
|
readonly run_id: RunId;
|
|
17
|
+
readonly service?: CanonicalLifecycleService;
|
|
18
|
+
readonly service_factory?: () => Promise<CanonicalLifecycleService>;
|
|
19
19
|
}
|
|
20
20
|
export interface RunLifecycleResumeOptions extends LifecycleOutputOptions {
|
|
21
|
-
readonly
|
|
21
|
+
readonly run_store: DurableRunStore;
|
|
22
22
|
readonly run_id: RunId;
|
|
23
|
+
readonly service?: CanonicalLifecycleService;
|
|
24
|
+
readonly service_factory?: () => Promise<CanonicalLifecycleService>;
|
|
25
|
+
readonly drive?: (service: CanonicalLifecycleService, run_id: RunId) => Promise<RunView>;
|
|
23
26
|
}
|
|
24
27
|
export interface RunLifecycleCancelOptions extends LifecycleOutputOptions {
|
|
25
|
-
readonly
|
|
28
|
+
readonly run_store: DurableRunStore;
|
|
26
29
|
readonly run_id: RunId;
|
|
27
30
|
readonly reason?: string | null;
|
|
31
|
+
readonly service?: CanonicalLifecycleService;
|
|
32
|
+
readonly service_factory?: () => Promise<CanonicalLifecycleService>;
|
|
33
|
+
}
|
|
34
|
+
export type RunLifecycleCloseOptions = RunLifecycleCancelOptions;
|
|
35
|
+
export interface CanonicalLifecycleService {
|
|
36
|
+
inspect(run_id: RunId): Promise<RunView>;
|
|
37
|
+
inspectAudit(run_id: RunId): Promise<RunAuditView>;
|
|
38
|
+
resume(run_id: RunId): Promise<RunView>;
|
|
39
|
+
cancel(run_id: RunId, reason?: string | null): Promise<RunView>;
|
|
28
40
|
}
|
|
29
41
|
export interface RunStatusProjection {
|
|
30
42
|
readonly schema_version: "intentdna.run_status.v1";
|
|
@@ -41,6 +53,24 @@ export interface RunStatusProjection {
|
|
|
41
53
|
readonly created_at: string;
|
|
42
54
|
readonly updated_at: string;
|
|
43
55
|
}
|
|
56
|
+
export interface CanonicalRunStatusProjection {
|
|
57
|
+
readonly schema_version: "intentdna.run_status.v2";
|
|
58
|
+
readonly ledger_schema_version: 2;
|
|
59
|
+
readonly run_id: RunId;
|
|
60
|
+
readonly target: RunView["run"]["target"];
|
|
61
|
+
readonly plan_id: string;
|
|
62
|
+
readonly binding_id: string;
|
|
63
|
+
readonly status: RunStatus;
|
|
64
|
+
readonly record_version: number;
|
|
65
|
+
readonly activation_counts: Readonly<Record<CanonicalActivationState, number>>;
|
|
66
|
+
readonly attempt_count: number;
|
|
67
|
+
readonly result_count: number;
|
|
68
|
+
readonly cancellation: RunView["run"]["cancellation"];
|
|
69
|
+
readonly terminal: RunView["run"]["terminal"];
|
|
70
|
+
readonly created_at: string;
|
|
71
|
+
readonly updated_at: string;
|
|
72
|
+
}
|
|
73
|
+
export type AnyRunStatusProjection = RunStatusProjection | CanonicalRunStatusProjection;
|
|
44
74
|
export interface DurableHandoffInspection {
|
|
45
75
|
readonly event_id: string;
|
|
46
76
|
readonly sequence: number;
|
|
@@ -65,9 +95,29 @@ export interface RunInspectionProjection {
|
|
|
65
95
|
readonly ledger_created_at: string;
|
|
66
96
|
readonly ledger_updated_at: string;
|
|
67
97
|
}
|
|
68
|
-
export
|
|
98
|
+
export interface CanonicalRunInspectionProjection {
|
|
99
|
+
readonly schema_version: "intentdna.run_inspection.v2";
|
|
100
|
+
readonly ledger_schema_version: 2;
|
|
101
|
+
readonly record_version: number;
|
|
102
|
+
readonly run: RunAuditView["run"];
|
|
103
|
+
readonly activations: RunAuditView["activations"];
|
|
104
|
+
readonly attempts: RunAuditView["attempts"];
|
|
105
|
+
readonly claims: RunAuditView["claims"];
|
|
106
|
+
readonly events: RunAuditView["events"];
|
|
107
|
+
readonly result_refs: RunAuditView["results"];
|
|
108
|
+
readonly ledger_created_at: string;
|
|
109
|
+
readonly ledger_updated_at: string;
|
|
110
|
+
}
|
|
111
|
+
interface LifecycleOperationProjection {
|
|
112
|
+
readonly schema_version: "intentdna.run_lifecycle_operation.v1";
|
|
113
|
+
readonly action: Exclude<RunLifecycleAction, "status" | "inspect">;
|
|
114
|
+
readonly status: AnyRunStatusProjection;
|
|
115
|
+
}
|
|
116
|
+
export declare function canonicalViewStatusProjection(view: RunView): CanonicalRunStatusProjection;
|
|
117
|
+
export declare function writeCanonicalOperation(action: LifecycleOperationProjection["action"], view: RunView, json: boolean): void;
|
|
69
118
|
export declare function runLifecycleStatus(options: RunLifecycleStatusOptions): Promise<number>;
|
|
70
119
|
export declare function runLifecycleInspect(options: RunLifecycleInspectOptions): Promise<number>;
|
|
71
120
|
export declare function runLifecycleResume(options: RunLifecycleResumeOptions): Promise<number>;
|
|
72
121
|
export declare function runLifecycleCancel(options: RunLifecycleCancelOptions): Promise<number>;
|
|
122
|
+
export declare function runLifecycleClose(options: RunLifecycleCloseOptions): Promise<number>;
|
|
73
123
|
export {};
|