aimship 0.1.0-preview.4 → 0.1.0-preview.7
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/CONTRIBUTING.md +22 -0
- package/README.md +68 -23
- package/README.zh-CN.md +69 -24
- package/docs/cli.md +52 -32
- package/docs/examples.md +5 -0
- package/docs/guide.md +248 -30
- package/docs/guide.zh-CN.md +277 -0
- package/docs/installation.md +17 -110
- package/lib/cli.mjs +28 -16
- package/lib/documents.mjs +155 -0
- package/lib/migrate.mjs +77 -0
- package/lib/state.mjs +87 -21
- package/lib/view.mjs +69 -0
- package/package.json +3 -2
- package/skills/aimship/SKILL.md +1 -1
- package/skills/aimship/references/artifact-map.json +163 -0
- package/skills/aimship/references/core.md +8 -4
- package/skills/aimship/references/document-patterns.md +30 -10
- package/skills/aimship/references/hosts.md +4 -2
- package/skills/aimship/references/recovery.md +8 -0
- package/skills/aimship/references/sources-and-changes.md +6 -0
- package/skills/aimship/references/stages/contract.md +4 -0
- package/skills/aimship/references/stages/diagnose.md +6 -0
- package/skills/aimship/references/stages/frame.md +4 -0
- package/skills/aimship/references/stages/handoff.md +4 -0
- package/skills/aimship/references/stages/implement.md +6 -0
- package/skills/aimship/references/stages/plan.md +5 -1
- package/skills/aimship/references/stages/prototype.md +4 -0
- package/skills/aimship/references/stages/requirements.md +4 -0
- package/skills/aimship/references/stages/review.md +4 -0
- package/skills/aimship/references/stages/scope.md +4 -0
- package/skills/aimship/references/stages/tech-design.md +6 -0
- package/skills/aimship/references/stages/test-design.md +5 -1
- package/skills/aimship/references/stages/verify.md +6 -0
- package/skills/aimship/references/templates/change-log.md +14 -0
- package/skills/aimship/references/templates/diagnosis.md +39 -0
- package/skills/aimship/references/templates/handoff.md +34 -0
- package/skills/aimship/references/templates/plan.md +34 -0
- package/skills/aimship/references/templates/prd.md +39 -0
- package/skills/aimship/references/templates/review.md +19 -0
- package/skills/aimship/references/templates/scope.md +39 -0
- package/skills/aimship/references/templates/tech-design.md +39 -0
- package/skills/aimship/references/templates/testing.md +34 -0
package/CONTRIBUTING.md
CHANGED
|
@@ -9,3 +9,25 @@ Keep agent workflow semantics in `skills/aimship/references`, deterministic file
|
|
|
9
9
|
A passing structural test does not prove agent behavior. Record actual host/version/model/permission conditions for behavioral checks; leave unavailable combinations unverified. Review affected changes and preserve historical failure evidence when retesting.
|
|
10
10
|
|
|
11
11
|
Use GitHub Issues for bugs and feature suggestions. Provide the version, host details and a minimal synthetic reproduction; redact credentials, personal paths and delivery data.
|
|
12
|
+
|
|
13
|
+
## Documentation
|
|
14
|
+
|
|
15
|
+
Users enter through the English/Chinese README and Guide. Keep both languages equivalent when changing installation, workflow or artifact rules. The Guide owns installation, usage, continuation, lifecycle and troubleshooting; old installation/example URLs retain short compatibility pointers. The [CLI protocol](docs/cli.md) serves agents and contributors.
|
|
16
|
+
|
|
17
|
+
Validate public links and the shared stage/template mapping with `npm run check:docs`. Treat [artifact-map.json](skills/aimship/references/artifact-map.json) and the [document rules](skills/aimship/references/document-patterns.md) as the mapping to check against; update user-facing explanations when that mapping changes.
|
|
18
|
+
|
|
19
|
+
<a id="executable-examples"></a>
|
|
20
|
+
## Executable examples
|
|
21
|
+
|
|
22
|
+
From a source checkout, run:
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
node scripts/run-examples.mjs <new-output-directory>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The output directory must not exist. The harness creates isolated code and delivery folders, exercises real functions with Node assertions, and saves readable documents, state and evidence. It does not install Aimship, touch user deliveries, access the network or publish anything. Do not use a real delivery as the output. The scripts are source-checkout tools, not installed user commands.
|
|
29
|
+
|
|
30
|
+
- **Authored, single batch:** a line-normalization PRD, plan before implementation, one review covering batch/overall scope, and independent normal/empty/error assertions. Execution updates the same plan; cases and RUN results share the testing document.
|
|
31
|
+
- **Adopted, multiple batches:** preserved catalog PRD/prototype inputs, Scope mappings, shared price validation and quoting with each batch reviewed. A discount change keeps case v1 and adds v2, updates earlier review applicability and binds exact code hashes. A deliberate rounding fault produces a failed RUN, followed by repair review and a successful retest while retaining failure history. Shared business rules, role restrictions and performance requirements have independent identities and acceptance.
|
|
32
|
+
|
|
33
|
+
These examples check local document/state behavior. They do not establish automatic Skill discovery, real cross-host continuation, UI interaction or HTTP acceptance. Run output records assertions and limitations. Results from older schemas do not establish current behavior.
|
package/README.md
CHANGED
|
@@ -1,45 +1,90 @@
|
|
|
1
1
|
# Aimship
|
|
2
2
|
|
|
3
|
-
[中文](README.zh-CN.md)
|
|
3
|
+
[中文](README.zh-CN.md) · [Guide](docs/guide.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**A development workflow for AI coding tools, connecting requirements, implementation and verification.**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Aimship supports feature development, defect fixes, technical refactoring and solution design. It arranges stages around the delivery goal, maintains requirements, design, implementation and verification records, and supports continuation from existing materials.
|
|
8
8
|
|
|
9
|
-
Each
|
|
9
|
+
Each request has an independent delivery directory under `~/Aimship/`, while code remains in its repositories. A commission can cover the full development workflow or specific outputs such as requirements analysis or technical design.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Quick start
|
|
12
12
|
|
|
13
|
-
Requires Node.js 22+ and npm
|
|
13
|
+
Requires **Node.js 22+ and npm**. Choose `codex`, `cursor` or `claude-code`:
|
|
14
14
|
|
|
15
15
|
```sh
|
|
16
16
|
npx aimship@preview install --host codex
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
Aimship
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
Start a new host session and select Aimship: `$aimship` in Codex CLI, or `/aimship` in Cursor and Claude Code. Authorize access to the delivery folder and relevant repositories when needed, then describe the work:
|
|
20
|
+
|
|
21
|
+
> Use Aimship to add Excel export to the order list. The code is in my existing repository. Complete implementation and verification; leave deployment for later.
|
|
22
|
+
|
|
23
|
+
The npm command installs the published preview channel. For a specific version, source checkout or local package, see the [installation instructions](docs/guide.md#install).
|
|
24
|
+
|
|
25
|
+
One installation serves your projects and selected hosts. Host integrations are experimental: actual Skill discovery and cross-host continuation still need validation. See [host setup](docs/guide.md#hosts) if Aimship does not appear.
|
|
26
|
+
|
|
27
|
+
## Delivery workflow
|
|
28
|
+
|
|
29
|
+
1. **Establish the requirements.** Preserve original inputs, author a PRD or adopt existing requirements through Scope, and agree on the outcome and execution order.
|
|
30
|
+
2. **Prepare the work.** Produce the needed prototype, technical design, contracts, implementation plan and test cases.
|
|
31
|
+
3. **Implement and review.** Implement each batch and review it, then review the integrated change.
|
|
32
|
+
4. **Verify and hand off.** Execute the cases against the actual result, preserve failures and retests, and record the outcome and remaining work.
|
|
33
|
+
|
|
34
|
+
This outlines the development delivery process; not every request requires every stage. Design-only, review-only and verification-only commissions stop at their agreed endpoint. Ordinary debugging stays in the current workflow; a separate investigation stage is used only when explicitly arranged.
|
|
35
|
+
|
|
36
|
+
<a id="what-a-delivery-contains"></a>
|
|
37
|
+
## Delivery structure and documents
|
|
38
|
+
|
|
39
|
+
**`status.md`** is the delivery overview, with the current stage, blockers, next actions and document links. The tree below lists delivery artifacts and their purposes. Files are generated according to the selected stages and input conditions; unselected stages produce no empty documents. `prd.md` and `scope.md` are alternative requirement entries, not two files required for every delivery.
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
~/Aimship/
|
|
43
|
+
├── 20261023-order-export/ # One request, one delivery folder
|
|
44
|
+
│ ├── status.md # Generated overview and reading entry
|
|
45
|
+
│ ├── prd.md # Authored requirements, scope and acceptance
|
|
46
|
+
│ ├── scope.md # Used instead of PRD when adopting authoritative inputs
|
|
47
|
+
│ ├── tech-design.md # Architecture, changes, data, risks and requirement coverage
|
|
48
|
+
│ ├── plan.md # Implementation batches, tasks and actual execution
|
|
49
|
+
│ ├── testing.md # Test cases, coverage, runs and retest results
|
|
50
|
+
│ ├── review.md # Batch/overall reviews, findings and follow-up
|
|
51
|
+
│ ├── handoff.md # Delivered result, usage, validation and remaining work
|
|
52
|
+
│ ├── diagnosis.md # Only for an independent investigation
|
|
53
|
+
│ ├── change-log.md # Meaningful changes, decisions and affected work
|
|
54
|
+
│ ├── openapi.yaml # New HTTP contract; reuse an existing authority when available
|
|
55
|
+
│ ├── database.sql # SQL for one database; multiple targets use database-<id>.sql
|
|
56
|
+
│ ├── prototype/ # Newly authored prototypes when required
|
|
57
|
+
│ │ └── index.html # Entry for an HTML prototype; its assets stay here
|
|
58
|
+
│ ├── source/ # Preserved original request and adopted input versions
|
|
59
|
+
│ │ ├── request.md # Original commission or source entry
|
|
60
|
+
│ │ └── … # External PRD, prototype, screenshots and other inputs
|
|
61
|
+
│ └── .aimship/ # Managed state and supporting evidence
|
|
62
|
+
│ ├── state.json # Stages, references, versions and repository/worktree links
|
|
63
|
+
│ ├── state.previous.json # Previous state for recovery after writes
|
|
64
|
+
│ ├── view.json # Metadata for the generated status view
|
|
65
|
+
│ └── evidence/ # Evidence retained when needed
|
|
66
|
+
└── 20261024-another-request/ # Independent request and progress
|
|
67
|
+
```
|
|
26
68
|
|
|
27
|
-
|
|
69
|
+
Formal documents are directly in the request folder. `source/` preserves adopted originals; `.aimship/` holds internal records. The software itself is installed separately in `~/.aimship/`.
|
|
28
70
|
|
|
29
|
-
|
|
71
|
+
Filenames, outlines and identifier rules come from shared templates. Requirements and acceptance criteria link to implementation tasks, reviews and versioned test cases/results. The [Guide](docs/guide.md#artifacts) explains exactly when each artifact is produced and what it contains.
|
|
30
72
|
|
|
31
|
-
|
|
73
|
+
## Use cases and examples
|
|
32
74
|
|
|
33
|
-
|
|
75
|
+
| Use case | Example request |
|
|
76
|
+
| --- | --- |
|
|
77
|
+
| Existing PRD and prototype | “Use these materials for order export. Preserve the originals and confirm the scope before implementation.” |
|
|
78
|
+
| Feature requirements and design | “Help define notification preferences and produce a prototype and technical design. Stop before implementation.” |
|
|
79
|
+
| Refactor | “Refactor the pricing module without changing observable behavior. Implement and verify it.” |
|
|
80
|
+
| Investigate a failure | “Investigate this intermittent timeout and report the cause and evidence. Do not implement a fix yet.” |
|
|
34
81
|
|
|
35
|
-
|
|
82
|
+
Independent deliveries can progress at the same time, with one writing session per delivery. When they share code, arrange sequential implementation or separate checkouts/worktrees. See [parallel work](docs/guide.md#parallel).
|
|
36
83
|
|
|
37
|
-
## Documentation and
|
|
84
|
+
## Documentation and contributions
|
|
38
85
|
|
|
39
|
-
|
|
40
|
-
- [User guide](docs/guide.md): scope, stages, changes, parallel deliveries and session handoff.
|
|
41
|
-
- [Tool protocol](docs/cli.md): state and recovery commands for agents and contributors.
|
|
86
|
+
The **[Guide](docs/guide.md)** covers installation, daily use, document rules, continuation, updates and troubleshooting. For contributors, [CONTRIBUTING](CONTRIBUTING.md) covers development and checks; the [CLI protocol](docs/cli.md) is the agent/tool reference.
|
|
42
87
|
|
|
43
|
-
|
|
88
|
+
Report bugs and feature requests through [GitHub Issues](https://github.com/clsx/aimship/issues). Aimship is a preview; completed work, user acceptance, merge and deployment are recorded separately.
|
|
44
89
|
|
|
45
90
|
Released under the [MIT License](LICENSE).
|
package/README.zh-CN.md
CHANGED
|
@@ -1,45 +1,90 @@
|
|
|
1
1
|
# Aimship
|
|
2
2
|
|
|
3
|
-
[English](README.md)
|
|
3
|
+
[English](README.md) · [使用指南](docs/guide.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**面向 AI 编程工具的开发交付流程,贯通需求、实施与验证。**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Aimship 适用于功能开发、缺陷修复、技术重构和方案设计。根据交付目标安排所需阶段,维护需求、设计、实施和验证记录,并支持基于已有资料接续工作。
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
每个需求在 `~/Aimship/` 下使用独立交付目录,代码保留在原仓库。交付范围可以覆盖完整开发流程,也可以限定为需求分析、技术方案等指定成果。
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## 快速开始
|
|
12
12
|
|
|
13
|
-
需要 Node.js 22+ 和 npm
|
|
13
|
+
需要 **Node.js 22+ 和 npm**。宿主可选 `codex`、`cursor` 或 `claude-code`:
|
|
14
14
|
|
|
15
15
|
```sh
|
|
16
16
|
npx aimship@preview install --host codex
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
安装后开启新的宿主会话,选择 Aimship:Codex CLI 使用 `$aimship`,Cursor 和 Claude Code 使用 `/aimship`。在需要时授权访问交付目录和相关代码仓库,然后描述任务:
|
|
20
|
+
|
|
21
|
+
> 使用 Aimship 给订单列表增加 Excel 导出功能。代码在我现有的仓库中。本次完成实施和验证,部署留待后续处理。
|
|
22
|
+
|
|
23
|
+
该 npm 命令安装已发布的预览通道版本。指定版本、源码或本地包的安装方式,参见[安装说明](docs/guide.zh-CN.md#install)。
|
|
24
|
+
|
|
25
|
+
安装一次即可用于多个项目和已选择的宿主。宿主集成仍处于实验阶段,真实 Skill 发现和跨宿主接续仍需验证。宿主未显示 Aimship 时,请参阅[宿主设置](docs/guide.zh-CN.md#hosts)。
|
|
26
|
+
|
|
27
|
+
## 交付流程
|
|
28
|
+
|
|
29
|
+
1. **明确需求。** 保留原始资料,自编 PRD 或通过 Scope 承接已有需求,确认本次目标和执行顺序。
|
|
30
|
+
2. **准备实施。** 按确定的条件产出原型、技术方案、契约、实施计划和测试用例。
|
|
31
|
+
3. **实施与审核。** 每批实施后进行 review,全部完成后再做整体 review。
|
|
32
|
+
4. **验证与交接。** 对实际成果执行用例,保留失败和重测记录,说明交付结果与遗留事项。
|
|
33
|
+
|
|
34
|
+
这是开发交付的基本过程,并非每个需求都要执行全部阶段。只做设计、review 或验证的委托,在约定的终点结束。普通调试在当前流程中处理;只有明确安排独立调查时才加入调查阶段。
|
|
35
|
+
|
|
36
|
+
<a id="一个需求会留下哪些文档"></a>
|
|
37
|
+
## 交付目录与文档
|
|
38
|
+
|
|
39
|
+
**`status.md`** 是交付进度的统一阅读入口,包含当前阶段、阻塞事项、后续操作和文档链接。下方列出交付产物及其用途;实际生成范围由所选阶段和输入条件确定,未选阶段不生成空文档。`prd.md` 与 `scope.md` 是需求入口的两种选择,并非每个需求都要同时生成。
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
~/Aimship/
|
|
43
|
+
├── 20261023-订单导出/ # 每个需求一个独立交付目录
|
|
44
|
+
│ ├── status.md # 自动生成的进度总览和阅读入口
|
|
45
|
+
│ ├── prd.md # 自编需求:目标、范围、需求和验收标准
|
|
46
|
+
│ ├── scope.md # 采用权威外部资料时使用,替代自编 PRD
|
|
47
|
+
│ ├── tech-design.md # 技术方案:架构、改动、数据、风险和需求覆盖
|
|
48
|
+
│ ├── plan.md # 实施计划:批次、任务及实际执行记录
|
|
49
|
+
│ ├── testing.md # 测试用例、覆盖关系、执行与重测结果
|
|
50
|
+
│ ├── review.md # 各批及整体审核、发现的问题和处理结论
|
|
51
|
+
│ ├── handoff.md # 交付结果、使用方式、验证结论和遗留事项
|
|
52
|
+
│ ├── diagnosis.md # 仅独立调查时生成的定位与证据记录
|
|
53
|
+
│ ├── change-log.md # 重要变更、决定及受影响的工作
|
|
54
|
+
│ ├── openapi.yaml # 新建 HTTP 契约;已有权威契约优先复用
|
|
55
|
+
│ ├── database.sql # 单数据库 SQL;多目标为 database-<id>.sql
|
|
56
|
+
│ ├── prototype/ # 符合生成条件时新建的原型
|
|
57
|
+
│ │ └── index.html # HTML 原型入口,相关资源也放在此目录
|
|
58
|
+
│ ├── source/ # 保留原始需求和采用的外部资料版本
|
|
59
|
+
│ │ ├── request.md # 原始委托或来源入口
|
|
60
|
+
│ │ └── … # 外部 PRD、原型、截图及其他输入
|
|
61
|
+
│ └── .aimship/ # 工具维护的内部状态与辅助证据
|
|
62
|
+
│ ├── state.json # 阶段、引用、版本及仓库/worktree 关联
|
|
63
|
+
│ ├── state.previous.json # 写入后用于恢复的上一版状态
|
|
64
|
+
│ ├── view.json # 进度视图的生成元信息
|
|
65
|
+
│ └── evidence/ # 按需保留的验证等证据
|
|
66
|
+
└── 20261024-另一个需求/ # 独立的资料与进度
|
|
67
|
+
```
|
|
26
68
|
|
|
27
|
-
|
|
69
|
+
正式文档直接放在需求目录下;`source/` 保留采用的原件,`.aimship/` 保存内部记录。软件安装目录为 `~/.aimship/`,与各需求目录内的 `.aimship/` 分别管理。
|
|
28
70
|
|
|
29
|
-
|
|
71
|
+
文档名称、大纲和编号遵循统一模板。需求与验收标准关联到实施任务、审核、带版本的测试用例及执行结果。[使用指南](docs/guide.zh-CN.md#artifacts)进一步说明每种文档的生成条件和具体内容。
|
|
30
72
|
|
|
31
|
-
|
|
73
|
+
## 适用场景与示例
|
|
32
74
|
|
|
33
|
-
|
|
75
|
+
| 场景 | 委托示例 |
|
|
76
|
+
| --- | --- |
|
|
77
|
+
| 已有 PRD 和原型 | “根据这些资料开发订单导出,保留原件,实施前先确认本次范围。” |
|
|
78
|
+
| 功能需求分析与设计 | “梳理通知偏好功能,完成原型和技术方案,本次先不实施。” |
|
|
79
|
+
| 技术重构 | “重构计价模块,不改变对外行为,完成实施和验证。” |
|
|
80
|
+
| 故障调查 | “调查偶发超时的原因,给出证据和结论,本次先不修复。” |
|
|
34
81
|
|
|
35
|
-
|
|
82
|
+
多个独立需求可以同时推进,每个交付只保留一个写入会话。共享代码时,安排串行实施或使用独立 checkout/worktree,详见[并行需求](docs/guide.zh-CN.md#parallel)。
|
|
36
83
|
|
|
37
|
-
##
|
|
84
|
+
## 文档与贡献
|
|
38
85
|
|
|
39
|
-
-
|
|
40
|
-
- [使用指南](docs/guide.md):范围、阶段、变更、并行交付与会话交接。
|
|
41
|
-
- [工具协议](docs/cli.md):供 Agent 与贡献者使用的状态及恢复命令。
|
|
86
|
+
**[使用指南](docs/guide.zh-CN.md)**涵盖安装、日常使用、文档规则、进度接续、升级和排障。[CONTRIBUTING](CONTRIBUTING.md)说明开发与贡献要求;[CLI 协议](docs/cli.md)供 Agent 和工具开发者查阅。
|
|
42
87
|
|
|
43
|
-
|
|
88
|
+
通过 [GitHub Issues](https://github.com/clsx/aimship/issues)反馈问题和建议。Aimship 目前为预览版;目标完成、用户验收、合并和部署分别记录。
|
|
44
89
|
|
|
45
|
-
|
|
90
|
+
采用 [MIT 许可证](LICENSE)。
|
package/docs/cli.md
CHANGED
|
@@ -1,62 +1,82 @@
|
|
|
1
1
|
# Local tool protocol
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Commands emit JSON. Errors include code/message/recovery and use a nonzero exit. `help` describes options; installation `status` is separate from a delivery's generated `status.md`. The agent interprets business meaning and authorization. Examples use placeholders for absolute paths and the bound version.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Create and bind
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
`bind` returns fixed CLI/core/stage paths, version and configured data root. Keep that binding for the session. Installation does not create deliveries.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
node '<stable-launcher>' bind
|
|
11
|
-
node '<fixed-cli>' init '<delivery-dir>' --rules-version '0.1.0-preview.4' --input '<init.json>'
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
Before `init`, save the original request and current requirements/Scope in the actual delivery directory. `init` creates state once; it does not create requirement templates or infer authority. Minimal input:
|
|
9
|
+
Before init, save `source/request.md` and the PRD/Scope draft from the [templates](../skills/aimship/references/document-patterns.md). No templates are automatically created. Example input:
|
|
15
10
|
|
|
16
11
|
```json
|
|
17
12
|
{
|
|
18
|
-
"goal": {"summary":
|
|
19
|
-
"goalRef":
|
|
20
|
-
"
|
|
21
|
-
"
|
|
13
|
+
"goal": {"summary":"Define the selected design", "endpoint":"Design handoff"},
|
|
14
|
+
"goalRef":"prd.md",
|
|
15
|
+
"documentPolicy":{"authority":"authored","interaction":false,"prototypeCovered":false,"interface":"none","databases":[]},
|
|
16
|
+
"documents":[{"kind":"prd","path":"prd.md","mode":"new","version":"1"}],
|
|
17
|
+
"stageRuns":[],
|
|
18
|
+
"next":{"action":"Draft the agreed design","inputRefs":["prd.md"]}
|
|
22
19
|
}
|
|
23
20
|
```
|
|
24
21
|
|
|
25
|
-
|
|
22
|
+
```sh
|
|
23
|
+
node '<stable-launcher>' bind
|
|
24
|
+
node '<fixed-cli>' init '<delivery-dir>' --rules-version '<bound-version>' --input '<init.json>'
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
init allocates deliveryId and revision 0, creates `.aimship/state.json`, and generates `status.md`. Add that ID to the document information at the next save point. Identity/version/timestamps, documentDigests, identityHistory, retiredIdentities and legacyRunIds are managed; never supply them in a patch. `writeResult` is return metadata, not state input.
|
|
28
|
+
|
|
29
|
+
`documentPolicy.authority`: authored → prd.md; adopted → scope.md; editable → an explicitly authorized existing PRD containing this commission's complete scope/authorization/endpoint. `legacy` is migration-only. `interaction`, `prototypeCovered`, `interface` (none/http/other) and target `databases` IDs record artifact conditions. They do not select a preset route.
|
|
26
30
|
|
|
27
|
-
|
|
31
|
+
Register documents as `{kind,path,mode,version}`. Kinds: prd, scope, tech-design, plan, testing, review, diagnosis, handoff, change-log, prototype, contract, sql, source. New formal Markdown follows the artifact map's root filename and ordered anchors. Reused files additionally need `basisRef` recording location/version/coverage/gaps and editability; unsupported content is explicitly not checked. New HTML prototype is prototype/index.html; register other agreed formats. HTTP contracts use openapi.yaml unless reused. SQL filenames follow database count. Source files are immutable adopted versions by workflow, not OS access controls.
|
|
32
|
+
|
|
33
|
+
## Update and inspect
|
|
28
34
|
|
|
29
35
|
```sh
|
|
30
|
-
node '<fixed-cli>' read '<delivery-dir>' --rules-version '
|
|
31
|
-
node '<fixed-cli>' update '<delivery-dir>' --revision 0 --rules-version '
|
|
32
|
-
node '<fixed-cli>' check '<delivery-dir>' --rules-version '
|
|
33
|
-
node '<fixed-cli>' resume '<delivery-dir>' --rules-version '
|
|
36
|
+
node '<fixed-cli>' read '<delivery-dir>' --rules-version '<bound-version>'
|
|
37
|
+
node '<fixed-cli>' update '<delivery-dir>' --revision 0 --rules-version '<bound-version>' --input '<patch.json>'
|
|
38
|
+
node '<fixed-cli>' check '<delivery-dir>' --all --rules-version '<bound-version>'
|
|
39
|
+
node '<fixed-cli>' resume '<delivery-dir>' --rules-version '<bound-version>'
|
|
34
40
|
```
|
|
35
41
|
|
|
36
|
-
|
|
42
|
+
Objects merge, arrays replace entirely; null is literal, not deletion. `--input -` accepts stdin JSON. A revision conflict requires rereading and reconciling, not guessing a revision. Keep one writing session per delivery.
|
|
43
|
+
|
|
44
|
+
Stage runs are ordered `{id,stage,scope,progress,inputRefs,outputRefs}`. currentRun refers to one ID or null. Progress: planned/active/blocked/done; result: passed/failed/not-run/unknown/mixed; applicability: current/needs-review/unknown. Done requires a precise resultRef. Preserve past results in priorResultRef/historyResultRefs; do not delete started runs. Shared files never complete two runs automatically. Plan must complete before implementation; batch review, then overall review, then independent verify remains the agent's semantic responsibility.
|
|
37
45
|
|
|
38
|
-
|
|
46
|
+
New Markdown uses explicit `<a id="..."></a>` anchors. Definition metadata in the document supplies namespace/ID/version/status/refs; see document-patterns. REV and RUN additionally set `run` to the stageRun ID and use a result anchor such as `review.md#rev-001-v1` or `testing.md#run-001-v1`. Basic uniqueness, exact reference resolution, REQ→AC, AC→TC and RUN→TC versions are checked; prose truth, every-assertion coverage and object versions require Agent review. `nextIds` reports historical maxima plus one, including retired IDs. Keep historical definitions; retired identities cannot be reused.
|
|
39
47
|
|
|
40
|
-
|
|
48
|
+
References stay delivery-root-relative despite state being internal, or use `repo:<id>/<path>` / HTTP(S). Repository records `{id,path,role}` name actual absolute checkout/worktree roots. A branch is not a code version. Paths cannot escape roots through traversal or symlinks. check defaults to current inputs; --all adds registered history/decisions/outcomes. Exact fragments in registered new Markdown are checked; reused/remote/unsupported ones return not-checked. That does not establish semantics or passing verification.
|
|
41
49
|
|
|
42
|
-
|
|
50
|
+
Read/check/resume are read-only. They return view diagnostics and changed registered documents; matching revisions do not prove unchanged formal content. Resume canProceed is conservative structural readiness, never authorization or acceptance. Read returns conflicting layout candidates and unknown formats without rewriting them. `scan <material-root>` reads immediate delivery children in both layouts, deduplicates deliveryId and reports conflicting/unknown/inaccessible records. It neither scans unknown roots nor determines code-writing safety; inspect recorded roles/scopes and actual Git/worktree identity.
|
|
43
51
|
|
|
44
|
-
##
|
|
52
|
+
## State and view recovery
|
|
45
53
|
|
|
46
|
-
|
|
54
|
+
State writes are atomic per file and keep `.aimship/state.previous.json`. Across formal documents/state/status there is no transaction. First persist unfinished intent, edit and inspect documents, then save state. Managed document digests detect some external changes, never semantic equivalence.
|
|
55
|
+
|
|
56
|
+
A write returns the actual state revision and `writeResult: {stateSaved:true,revision,view}`. If view status is protected/error, the JSON is already saved. Do not replay the business patch; explicitly repair:
|
|
47
57
|
|
|
48
58
|
```sh
|
|
49
|
-
node '<fixed-cli>'
|
|
59
|
+
node '<fixed-cli>' render '<delivery-dir>' --revision '<saved-revision>' --rules-version '<bound-version>'
|
|
60
|
+
node '<fixed-cli>' render '<delivery-dir>' --revision '<saved-revision>' --rules-version '<bound-version>' --preserve-edits
|
|
50
61
|
```
|
|
51
62
|
|
|
52
|
-
|
|
63
|
+
The delivery identity, view digest and state revision are stored in `.aimship/view.json`; identity and revision must both match for a view to be current. Missing/stale views can be regenerated; modified or untrusted existing status is preserved in place by default. --preserve-edits first saves its full bytes to `.aimship/status-edits-<id>.md`, then rebuilds. Inspect the preserved intent and update formal authority separately. View text does not authorize acceptance, scope changes or publication. render does not increment state revision.
|
|
64
|
+
|
|
65
|
+
`recover <dir> --revision <backup-revision> --rules-version <bound-version>` restores only over missing/corrupt state, preserves corrupt bytes and advances revision. It refuses a valid or unknown state. Inspect actual effects afterward, never automatically repeat them. Remove only a stale task lock after confirming no writer exists.
|
|
53
66
|
|
|
54
|
-
|
|
67
|
+
## Explicit migration and rule adoption
|
|
68
|
+
|
|
69
|
+
Schema 1 root state remains readable; normal updates/adopt require migration first. Unknown schemas stay read-only. To migrate one selected old delivery, record a compatibility assessment and original/new artifact mapping:
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
node '<new-fixed-cli>' migrate '<delivery-dir>' --revision '<old-revision>' --rules-version '<new-version>' --input '<assessment.json>'
|
|
73
|
+
node '<new-fixed-cli>' adopt '<delivery-dir>' --revision '<returned-revision>' --rules-version '<new-version>' --input '<assessment.json>'
|
|
74
|
+
```
|
|
55
75
|
|
|
56
|
-
|
|
76
|
+
Both inputs are `{"compatibilityRef":"change-log.md#rules-switch"}`. Migration saves original state/recovery bytes under `.aimship/legacy/`, journals checksums in `.aimship/migration.json`, converts layout/schema and increments revision while retaining old rulesVersion. Interrupted migration resumes with the original parameters only after checksum checks; conflicting copies are preserved. Adopt separately records the assessed rule change. It does not convert business meaning.
|
|
57
77
|
|
|
58
|
-
|
|
78
|
+
Reconcile legacy documents by role, preserve original text/results/version basis, register reused files or create new forward-looking documents. Move evidence/host configuration only with mapped references and correct relative-link/workspace resolution. Never fabricate a past plan stage or tests. Unchanged completed historical execution records retain their old format, verified against the preserved migration target. Changing applicability alone does not rewrite that history. Planned or in-progress runs and any run whose execution facts change must satisfy current artifact contracts; an old ID is not an exemption. After adoption, legacy document policy still blocks stage/outcome advancement and resume readiness; reconcile documents and set the current policy first. Subsequent new runs follow the new mapping. Finished deliveries are never swept by install.
|
|
59
79
|
|
|
60
|
-
|
|
80
|
+
A compatible old fixed tool can checkpoint only next/checkpoint facts during version mismatch, once per active version. It cannot complete stages. Save before migration, reload new rules, migrate then adopt. Old tools must not write migrated schema 2. No DeliveryArc migration is provided.
|
|
61
81
|
|
|
62
|
-
|
|
82
|
+
Goal changes need a new goal.decisionRef; prior goals/outcomes are retained. A met goal requires goalConclusionRef; acceptance needs its own acceptanceRef. Merge and deployment refs remain independent. Reopening increments cycle, appends closureRefs and resets acceptance. See the [user guide](guide.md#update) for lifecycle operations and their separate host-discovery limits.
|
package/docs/examples.md
ADDED