aimship 0.1.0-preview.11 → 0.1.0-preview.13
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 +3 -3
- package/README.md +6 -10
- package/README.zh-CN.md +6 -10
- package/docs/cli.md +23 -25
- package/docs/guide.md +314 -148
- package/docs/guide.zh-CN.md +314 -148
- package/lib/approvals.mjs +77 -13
- package/lib/cli.mjs +27 -21
- package/lib/delivery.mjs +15 -12
- package/lib/discovery.mjs +25 -0
- package/lib/documents.mjs +159 -65
- package/lib/install.mjs +1 -1
- package/lib/language.mjs +41 -0
- package/lib/location.mjs +65 -0
- package/lib/state.mjs +54 -87
- package/lib/view.mjs +36 -34
- package/package.json +1 -1
- package/skills/aimship/SKILL.md +3 -3
- package/skills/aimship/references/artifact-map.json +165 -9
- package/skills/aimship/references/core.md +17 -13
- package/skills/aimship/references/document-patterns.md +17 -11
- package/skills/aimship/references/document-review.md +1 -3
- package/skills/aimship/references/hosts.md +11 -9
- package/skills/aimship/references/recovery.md +9 -13
- package/skills/aimship/references/sources-and-changes.md +11 -4
- package/skills/aimship/references/stages/diagnose.md +1 -1
- package/skills/aimship/references/stages/frame.md +1 -1
- package/skills/aimship/references/stages/handoff.md +1 -1
- package/skills/aimship/references/stages/implement.md +2 -2
- package/skills/aimship/references/stages/plan.md +1 -1
- package/skills/aimship/references/stages/requirements.md +1 -1
- package/skills/aimship/references/stages/review.md +1 -1
- package/skills/aimship/references/stages/scope.md +1 -1
- package/skills/aimship/references/stages/tech-design.md +1 -1
- package/skills/aimship/references/stages/test-design.md +1 -1
- package/skills/aimship/references/stages/verify.md +2 -2
- package/skills/aimship/references/templates/change-log.md +0 -2
- package/skills/aimship/references/templates/diagnosis.md +0 -7
- package/skills/aimship/references/templates/handoff.md +0 -6
- package/skills/aimship/references/templates/plan.md +2 -8
- package/skills/aimship/references/templates/prd.md +0 -7
- package/skills/aimship/references/templates/review.md +0 -3
- package/skills/aimship/references/templates/scope.md +0 -7
- package/skills/aimship/references/templates/tech-design.md +0 -7
- package/skills/aimship/references/templates/testing.md +2 -8
- package/lib/migrate.mjs +0 -77
package/CONTRIBUTING.md
CHANGED
|
@@ -14,7 +14,7 @@ Use GitHub Issues for bugs and feature suggestions. Provide the version, host de
|
|
|
14
14
|
|
|
15
15
|
## Documentation
|
|
16
16
|
|
|
17
|
-
The English/Chinese README introduces the
|
|
17
|
+
The English/Chinese README introduces the workflow, its value and outputs, and owns installation, upgrades, host management, version/health queries and uninstallation. After installation, it directs readers to the Guide. The Guide leads with first use, document review and continuation, then covers progress and acceptance, alternative starting points, troubleshooting and reference material. Explain what the user does and what follows; keep internal state/tool procedures out of the first-use path. Avoid generic prompt tutorials. Keep stage mappings and document/identifier rules in the [shared agent references](skills/aimship/references/document-patterns.md); retain the annotated [delivery directory](docs/guide.md#delivery-structure) as reference material. Keep both languages equivalent. Put source development and isolated validation here, and agent/tool details in the [CLI protocol](docs/cli.md). Old installation/example URLs retain short compatibility pointers rather than duplicate instructions.
|
|
18
18
|
|
|
19
19
|
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.
|
|
20
20
|
|
|
@@ -23,7 +23,7 @@ Validate public links and the shared stage/template mapping with `npm run check:
|
|
|
23
23
|
|
|
24
24
|
To try unreleased initialization changes, open a session with access to the checkout and a separate disposable materials directory. Explicitly ask to use the checkout's `skills/aimship/SKILL.md`, read its core, and run `node bin/aimship.mjs bind` from this package root. Verify the returned releaseRoot/corePath/cliPath all point into that checkout and schemaVersion is 3; a version string alone is insufficient when local code retains the published version. Then provide a concrete synthetic request, the trial materials path, and the desired stop. Do not load the installed launcher or run install.
|
|
25
25
|
|
|
26
|
-
In the next session, explicitly request that same source Skill and bind again, then provide the original delivery directory and ask to resume. Check its saved deliveryId, revision, review status and next action. This exercises source rules and local tooling without replacing global entries. Whether a specific host automatically discovers a checkout Skill is separate and must be tested rather than promised. Check `test/initialization.test.mjs` for deterministic initialization, interruption
|
|
26
|
+
In the next session, explicitly request that same source Skill and bind again, then provide the original delivery directory and ask to resume. Check its saved deliveryId, revision, review status and next action. This exercises source rules and local tooling without replacing global entries. Whether a specific host automatically discovers a checkout Skill is separate and must be tested rather than promised. Check `test/initialization.test.mjs` for deterministic initialization, interruption and approval-bypass regressions; their synthetic decisions are not real AI-host evidence.
|
|
27
27
|
|
|
28
28
|
<a id="isolated-installation-check"></a>
|
|
29
29
|
## Isolated installation lifecycle check
|
|
@@ -74,7 +74,7 @@ node scripts/run-examples.mjs <new-output-directory>
|
|
|
74
74
|
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.
|
|
75
75
|
|
|
76
76
|
- **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.
|
|
77
|
-
- **Adopted, multiple batches:** preserved catalog PRD/prototype inputs, Scope mappings, shared price validation and quoting with each batch reviewed. A discount change
|
|
77
|
+
- **Adopted, multiple batches:** preserved catalog PRD/prototype inputs, Scope mappings, shared price validation and quoting with each batch reviewed. A discount change updates the testing document while keeping stable case IDs, records document reapproval and earlier review applicability, and binds exact code hashes. A known rounding fault fails overall review; the example asserts that starting verification is rejected without changing state. A separate maintainer probe preserves six real assertions (five pass, rounding fails) in `negative-probe.json`; it is not a formal verification stage or RUN. After fixing the code and recording a matching passing repair review, formal verification runs all six assertions successfully. Failed review and probe evidence remain available. Shared business rules, role restrictions and performance requirements have independent identities and acceptance.
|
|
78
78
|
|
|
79
79
|
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.
|
|
80
80
|
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**Aimship is a software delivery workflow for AI tools, connecting requirements, design, implementation, review and verification.**
|
|
6
6
|
|
|
7
|
-
For developers responsible for delivering a requirement. You provide the goal
|
|
7
|
+
For developers responsible for delivering a requirement. You provide the goal and existing materials; code can be associated when needed. Aimship helps the agent turn them into a clear scope, a reasoned design, an implementation plan and verified results. It connects these stages so that you can follow the work, understand key decisions and assess what has actually been delivered.
|
|
8
8
|
|
|
9
9
|
<a id="what-a-delivery-contains"></a>
|
|
10
10
|
<a id="delivery-structure-and-documents"></a>
|
|
@@ -12,7 +12,7 @@ For developers responsible for delivering a requirement. You provide the goal, e
|
|
|
12
12
|
Standard document outlines, identifiers and references connect requirements and acceptance criteria to designs, implementation tasks, reviews and test results. Documents are produced as needed for the delivery goal, giving you a consistent basis for review without requiring an empty template for every stage.
|
|
13
13
|
|
|
14
14
|
<a id="delivery-workflow"></a>
|
|
15
|
-
|
|
15
|
+
The agent organizes requirements, design, implementation and verification; you review key documents and important decisions. Feedback leads to revisions, and approval enables subsequent work. Final acceptance is based on the agreed goal and actual verification results.
|
|
16
16
|
|
|
17
17
|
Documents and state are saved throughout the work, keeping progress, decisions and verification evidence traceable and reducing the need to repeat background or reconstruct earlier work.
|
|
18
18
|
|
|
@@ -43,7 +43,7 @@ Confirm npm's package installation prompt. `@preview` selects the published prev
|
|
|
43
43
|
To install an exact published version, for example:
|
|
44
44
|
|
|
45
45
|
```sh
|
|
46
|
-
npx aimship@0.1.0-preview.
|
|
46
|
+
npx aimship@0.1.0-preview.13 install --host codex
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
If you already have an Aimship `.tgz` package, replace `VERSION` with its actual version and run from the directory containing it:
|
|
@@ -64,13 +64,9 @@ npx aimship@preview install --host codex --data-root "./MyDeliveries"
|
|
|
64
64
|
|
|
65
65
|
The example uses a `MyDeliveries` folder under the current working directory; you can replace it with an absolute path to your preferred location. This sets the default material location for new deliveries. It is not a code repository location and does not move existing materials. Later installations retain the configuration; no per-project installation is needed.
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
Explicitly select Aimship in your AI tool, or ask it to **use Aimship** for a concrete request. For example: “Use Aimship to deliver an export of the currently filtered orders. First clarify the fields; code will be prepared later.” A PRD, code repository and settled technical conditions are not required. A product name alone prompts a short clarification first.
|
|
72
|
-
|
|
73
|
-
The agent preserves your request, helps you make the materials location accessible, and creates or resumes one delivery. Its receipt shows the actual saved directory, `status.md`, current work and next step. Opening a project or mentioning the name in passing does not activate Aimship. In a new session, explicitly use Aimship again and identify the same delivery; see the [Guide](docs/guide.md#start). Source edits do not update an installed Skill; contributors can use the [local source trial](CONTRIBUTING.md#local-source-trial).
|
|
67
|
+
<a id="start-a-delivery"></a>
|
|
68
|
+
<a id="getting-started"></a>
|
|
69
|
+
After installation, follow the [Guide](docs/guide.md#start) to prepare a workspace, activate Aimship and begin your first request. For an existing delivery, follow [continuation](docs/guide.md#continue).
|
|
74
70
|
|
|
75
71
|
<a id="update"></a>
|
|
76
72
|
<a id="update-or-stop-using-aimship"></a>
|
package/README.zh-CN.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**Aimship 是面向 AI 工具的软件交付流程,贯通需求、设计、实施、审核与验证。**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
面向有开发基础、对一项需求交付负责的开发者。你提供目标及已有资料,代码可按需要关联。Aimship 帮助 Agent 将需求整理为清晰的范围、有依据的设计、可执行的计划和经过验证的成果,并衔接各阶段的工作,让你能了解推进过程、理解关键决定、判断实际交付结果。
|
|
8
8
|
|
|
9
9
|
<a id="一个需求会留下哪些文档"></a>
|
|
10
10
|
<a id="交付目录与文档"></a>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
统一的文档大纲、编号和引用,将需求与验收标准关联到设计、实施任务、审核和测试结果。文档按交付目标和实际需要生成,既提供一致的阅读与核对依据,也不要求每个阶段都填一份空模板。
|
|
13
13
|
|
|
14
14
|
<a id="交付流程"></a>
|
|
15
|
-
|
|
15
|
+
Agent 整理需求、设计方案并组织实施与验证,你审核关键文档和重要决定。修改意见纳入修订,审核通过后推进后续工作;最终依据约定目标和实际验证结果验收成果。
|
|
16
16
|
|
|
17
17
|
文档与状态在工作过程中持续保存,使进度、决定和验证依据可追溯,减少重复交代背景和重新梳理已有工作的负担。
|
|
18
18
|
|
|
@@ -43,7 +43,7 @@ npx aimship@preview install --host codex --host claude-code
|
|
|
43
43
|
安装指定的已发布版本,例如:
|
|
44
44
|
|
|
45
45
|
```sh
|
|
46
|
-
npx aimship@0.1.0-preview.
|
|
46
|
+
npx aimship@0.1.0-preview.13 install --host codex
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
如果已有 Aimship 的 `.tgz` 安装包,将 `VERSION` 替换为实际版本号,在包所在目录执行:
|
|
@@ -64,13 +64,9 @@ npx aimship@preview install --host codex --data-root "./MyDeliveries"
|
|
|
64
64
|
|
|
65
65
|
示例使用当前执行目录下的 `MyDeliveries` 文件夹,也可以替换为所需位置的绝对路径。此选项设置后续新交付的默认资料位置,不是代码仓库位置,也不会搬迁已有资料。后续安装保留已有配置;无需逐项目安装。
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
在 AI 工具中明确选择 Aimship,或明确要求**使用 Aimship** 处理具体诉求。例如:“使用 Aimship 交付按当前筛选条件导出订单的功能,先确认导出字段,代码稍后准备。”不要求先有 PRD、代码仓库或明确的技术条件。只有产品名称时,Agent 会先简短澄清实际问题。
|
|
72
|
-
|
|
73
|
-
Agent 保留原始诉求,引导准备资料位置的访问条件,然后创建或续接同一次交付。回执会说明实际保存目录、`status.md`、当前工作和下一步。打开项目空间或偶然提到名称不会启用 Aimship。新会话仍需明确使用 Aimship 并定位原交付,详见[指南](docs/guide.zh-CN.md#start)。源码修改不会更新已安装的 Skill;贡献者可按[本地源码体验](CONTRIBUTING.md#local-source-trial)加载。
|
|
67
|
+
<a id="开始一次交付"></a>
|
|
68
|
+
<a id="使用入口"></a>
|
|
69
|
+
安装完成后,按[使用指南](docs/guide.zh-CN.md#start)准备工作位置、启用 Aimship 并开始首个需求;已有交付可按[续接说明](docs/guide.zh-CN.md#continue)继续。
|
|
74
70
|
|
|
75
71
|
<a id="update"></a>
|
|
76
72
|
<a id="update-or-stop-using-aimship"></a>
|
package/docs/cli.md
CHANGED
|
@@ -4,12 +4,15 @@ Commands emit JSON. Errors include code/message/recovery and use a nonzero exit.
|
|
|
4
4
|
|
|
5
5
|
## Create and bind
|
|
6
6
|
|
|
7
|
-
`bind` returns fixed CLI/core/stage paths, version and configured data root. Keep that binding for the session. Installation does not create deliveries.
|
|
7
|
+
`bind` returns fixed CLI/core/stage paths, the bound version/schema, separate executing toolVersion/toolSchemaVersion, and configured data root. On a version switch, rebind through the stable launcher and read the returned fixed CLI help; a retained older executable may return stale schema metadata. Keep that binding for the session. Installation does not create deliveries.
|
|
8
|
+
|
|
9
|
+
Default initialization must use a distinct delivery directory under the bound dataRoot; the root itself is not a delivery. The current project or supplied-material directory is not an explicit location choice. A different user-selected directory requires init input `storage: {"mode":"explicit","decisionRef":"source/location-decision.md"}` with a nonempty readable local record of that choice. The tool validates evidence access, not the truth of the decision. Do not supply dataRoot in input. No access means report the intended location and stop saving, without falling back elsewhere. Existing deliveries outside the root remain readable and recoverable.
|
|
8
10
|
|
|
9
11
|
Before init, save the nonempty original input in `source/request.md`. A concrete request needs no PRD, code or known technical conditions yet. No templates are automatically created. Minimal input:
|
|
10
12
|
|
|
11
13
|
```json
|
|
12
14
|
{
|
|
15
|
+
"language":"en",
|
|
13
16
|
"goal": {"summary":"Export the currently filtered orders", "endpoint":null},
|
|
14
17
|
"goalRef":"source/request.md",
|
|
15
18
|
"documentPolicy":{"authority":null,"interaction":null,"prototypeCovered":null,"interface":null,"databases":null},
|
|
@@ -20,18 +23,18 @@ Before init, save the nonempty original input in `source/request.md`. A concrete
|
|
|
20
23
|
}
|
|
21
24
|
```
|
|
22
25
|
|
|
23
|
-
|
|
26
|
+
language and goal.summary are required in new input; absent endpoint defaults to null, goalRef to source/request.md, documents to [], and documentPolicy fields to null. Known facts may be supplied. Use `language: "zh-CN"` or `"en"`: explicit language preference takes precedence, otherwise use the delivery conversation language. This setting persists through update/render/resume and guides new formal documents; preserve original input, existing documents, filenames and machine identifiers. An explicit language update changes subsequent generated display, not existing document text. Null means unknown, while false/none/[] mean explicitly not applicable. The CLI validates saved structure, not whether the user's request is concrete or authorized; the Agent must establish that before creating records.
|
|
24
27
|
|
|
25
28
|
```sh
|
|
26
29
|
node '<stable-launcher>' bind
|
|
27
30
|
node '<fixed-cli>' init '<delivery-dir>' --rules-version '<bound-version>' --input '<init.json>'
|
|
28
31
|
```
|
|
29
32
|
|
|
30
|
-
init uses schema
|
|
33
|
+
init uses schema 4, 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 are managed; never supply them in a patch. `writeResult` is return metadata, not state input. Its receipt contains actual identity, directory/state/status paths, bound version, current stage and next action; statusPath is null when view repair is needed. Verify the saved files before presenting the user receipt. Repeated init returns ALREADY_EXISTS; read/resume the same delivery and render a missing view instead of replaying creation.
|
|
31
34
|
|
|
32
|
-
`documentPolicy.authority`: null while the requirement authority is undecided; authored → prd.md; adopted → scope.md; editable → an explicitly authorized existing PRD containing this commission's complete scope/authorization/endpoint. `
|
|
35
|
+
`documentPolicy.authority`: null while the requirement authority is undecided; authored → prd.md; adopted → scope.md; editable → an explicitly authorized existing PRD containing this commission's complete scope/authorization/endpoint. `interaction`, `prototypeCovered`, `interface` (none/http/other) and target `databases` IDs record artifact conditions. They do not select a preset route. Register the first real PRD/Scope and switch goalRef in the same update; this reference-only transition does not need a fabricated goal decision. Actual goal/endpoint changes still require goal.decisionRef. Early frame/requirements/scope work can be active without the draft; done requires it. Design requires approved requirements and an agreed endpoint, but may analyze unknown technical conditions. Resolve those conditions before completing design or starting dependent contract/cases/plan/implementation. Required document approvals remain checked even when producer runs are absent; existing stage ordering and review semantics are unchanged.
|
|
33
36
|
|
|
34
|
-
Register documents as `{kind,path,mode,version,assetRefs?}`. List local/repository prototype images, scripts and other review-relevant assets in assetRefs so their bytes participate in the document fingerprint; the Agent must identify the complete asset set. 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
|
|
37
|
+
Register documents as `{kind,path,mode,version,assetRefs?}`. List local/repository prototype images, scripts and other review-relevant assets in assetRefs so their bytes participate in the document fingerprint; the Agent must identify the complete asset set. 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 ordinary Markdown headings. 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.
|
|
35
38
|
|
|
36
39
|
## Update and inspect
|
|
37
40
|
|
|
@@ -44,17 +47,19 @@ node '<fixed-cli>' resume '<delivery-dir>' --rules-version '<bound-version>'
|
|
|
44
47
|
|
|
45
48
|
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.
|
|
46
49
|
|
|
47
|
-
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
|
|
50
|
+
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. For standard delivery, review requires completed implementation coverage, verify requires a passing overall review with resolved preceding reviews, and handoff requires passing verification (or a passing rerun retaining earlier results). These required predecessors cannot be removed by empty dependsOn/inputRefs. Actual execution, coverage quality and approval authenticity still require Agent judgment.
|
|
51
|
+
|
|
52
|
+
New Markdown uses the ordinary headings in the artifact map and searchable business IDs. Checks reject missing or duplicate definitions and unresolved ID references. Results use section keys or unique record IDs as search locators; no HTML anchors, embedded definition metadata, item versions or hidden traceability index are required. These structural checks do not establish semantic completeness.
|
|
48
53
|
|
|
49
|
-
|
|
54
|
+
Bare IDs resolve against current local definitions, including readable IDs in an explicitly registered editable Markdown requirement authority. File-qualified Markdown record citations check the actual source file and a unique substantive record; missing, duplicate or unreadable sources fail. Reused documents retain their outline and separately reported unchecked content. B/TASK/TC definitions belong in batch/task/case design sections; execution sections may cite those IDs without defining new obligations. Delivery `language` is required for all current states.
|
|
50
55
|
|
|
51
56
|
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.
|
|
52
57
|
|
|
53
|
-
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.
|
|
58
|
+
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. `scan <material-root>` reads immediate delivery children using .aimship/state.json, 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.
|
|
54
59
|
|
|
55
60
|
## State and view recovery
|
|
56
61
|
|
|
57
|
-
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.
|
|
62
|
+
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. A changed source/request.md cannot be rebaselined by an unrelated update. Restore the preserved original before continuing; record actual requirement changes in the editable authority/change log, retaining the original input.
|
|
58
63
|
|
|
59
64
|
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:
|
|
60
65
|
|
|
@@ -67,34 +72,24 @@ The delivery identity, view digest and state revision are stored in `.aimship/vi
|
|
|
67
72
|
|
|
68
73
|
`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.
|
|
69
74
|
|
|
70
|
-
##
|
|
71
|
-
|
|
72
|
-
Schema 3 is used for new deliveries; older tools treat it as unknown/read-only. Existing schema 2 continues without automatic conversion, and its recorded history is preserved. 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:
|
|
75
|
+
## Rule updates
|
|
73
76
|
|
|
74
|
-
```sh
|
|
75
|
-
node '<new-fixed-cli>' migrate '<delivery-dir>' --revision '<old-revision>' --rules-version '<new-version>' --input '<assessment.json>'
|
|
76
|
-
node '<new-fixed-cli>' adopt '<delivery-dir>' --revision '<returned-revision>' --rules-version '<new-version>' --input '<assessment.json>'
|
|
77
|
-
```
|
|
78
77
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
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.
|
|
82
|
-
|
|
83
|
-
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.
|
|
78
|
+
Bind the active tool and reload its rules before work. State, session and executing tool must use the same rules version. Software installation does not authorize changing delivery state versions or inventing approvals.
|
|
84
79
|
|
|
85
80
|
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 [README](../README.md#update) for software lifecycle operations and the [Guide](guide.md#hosts) for host-discovery limits.
|
|
86
81
|
|
|
87
82
|
## Document review protocol
|
|
88
83
|
|
|
89
|
-
Schema
|
|
84
|
+
Schema 4 requires `reviewPolicy: 1`, append-only `reviewHistory` and `deliveryPolicy: {version: 1}`. Document approvals remain bound to document version/content; business item numbers do not replace them.
|
|
90
85
|
|
|
91
|
-
Each record has `{id, kind, document, version, digest, sourceRef, summary}`. Kinds are `self-check`, `approved`, `changes-requested`, and `editorial`. `self-check` requires `result: "passed"` or `"failed"`; only a passing self-check can support approval. `approved` additionally requires `decision: "explicit-approval"`; `editorial` requires `previousDigest`. Use unique local review-record IDs (for example `approval-1`); these are state record identifiers, not a replacement for REQ/AC/CHG. Send the complete preserved history plus new records through revision-checked `update`. Existing records cannot be edited, removed or reordered. The tool records `sourceDigest` from readable local or repo-relative evidence; keep it unchanged when sending history back. Evidence files are versioned/immutable: changed or missing evidence produces evidence-changed and does not release dependencies; preserve the original bytes and add new decisions in new evidence files. Evidence fragments
|
|
86
|
+
Each record has `{id, kind, document, version, digest, sourceRef, summary}`. Kinds are `self-check`, `approved`, `changes-requested`, and `editorial`. `self-check` requires `result: "passed"` or `"failed"`; only a passing self-check can support approval. `approved` additionally requires `decision: "explicit-approval"`; `editorial` requires `previousDigest`. Use unique local review-record IDs (for example `approval-1`); these are state record identifiers, not a replacement for REQ/AC/CHG. Send the complete preserved history plus new records through revision-checked `update`. Existing records cannot be edited, removed or reordered. The tool records `sourceDigest` from readable local or repo-relative evidence; keep it unchanged when sending history back. Evidence files are versioned/immutable: changed or missing evidence produces evidence-changed and does not release dependencies; preserve the original bytes and add new decisions in new evidence files. Evidence fragments locate unique ordinary headings or numbered records, not HTML anchors. A remote source must have a local preserved decision excerpt with its original locator and date.
|
|
92
87
|
|
|
93
88
|
`read`, `check`, and `resume` return `review.documents` with current `path`, `version`, `digest`, `selfCheck`, `approval` and status. First append a self-check of those exact bytes; after presenting the document and receiving explicit approval, append an approved record binding the same version/digest and the actual user message. Questions, silence, and “show the result” cannot be recorded as approval. A hash/source reference validates the record's content basis, **not user identity or authenticity**. Never synthesize a real approval to make an update pass.
|
|
94
89
|
|
|
95
90
|
Production `progress: done` may be saved while approval is pending. Starting/completing dependent runs is blocked until prerequisite completion and document approval are current. Runs default to depending on their predecessor; explicit `dependsOn: [preceding-run-ids]` supports recorded independent branches, while input/output producers and earlier selected development prerequisites also apply. The initial applicable development order is requirements/Scope, technical design, interface/SQL, test-design, plan, implement. Unselected stages are not created. Contract can produce only SQL when no interface change applies; technical design no longer requires SQL files before completion.
|
|
96
91
|
|
|
97
|
-
For new `plan.md` and `testing.md`, fingerprints cover the content before the
|
|
92
|
+
For new `plan.md` and `testing.md`, fingerprints cover the content before the ordinary headings mapped to `execution` and `runs` respectively. Append implementation and RUN/conclusion evidence after those boundaries. Reused formats and other documents use whole-file content; remote/binary or linked-asset semantic inspection still belongs to the host/Agent. `done`, matching hashes and structural checks do not prove semantic quality.
|
|
98
93
|
|
|
99
94
|
A material change needs an open CHG with impact/decision evidence, a revised document version, a new self-check and explicit reapproval. Old review records remain. Affected producer/dependent runs become `needs-review`; update currentRun/next to the re-review stop and restore applicability after evidence-backed rechecking in dependency order. Independent branches are preserved. An `editorial` record carries a prior approval only after a same-version self-check explains a formatting/typo change and references its previous digest; it is not a new user approval. Do not hide changed design in excluded result sections. Final `outcome.acceptance` stays independent.
|
|
100
95
|
|
|
@@ -106,10 +101,13 @@ New state defaults to `deliveryPolicy: {version: 1}`. The standard main sequence
|
|
|
106
101
|
|
|
107
102
|
An explicit limited-scope decision (including no cases and testing) is referenced by `deliveryPolicy.partialRef` in existing PRD/Scope/change material. Such a scope may reach `outcome.goal: met` and have a real acceptance decision, but derived `completion.status` remains `partial-scope`, never `standard-complete`. Adding/changing/removing this basis needs a new goal.decisionRef, preserving goal history; set partialRef to null to restore standard scope. Standard goal completion checks recorded stages/approvals, passing batch and overall review, passing independent verification, handoff and resolvable evidence; standard-complete additionally requires recorded acceptance. These checks cannot prove actual execution or semantic quality. Failed or omitted checks must never be labeled passed.
|
|
108
103
|
|
|
104
|
+
Independent review, verify-only work or limited handoff can omit standard upstream work only with a nonempty readable local partialRef (including a resolvable ordinary heading or record if supplied). The tool checks the evidence reference, not whether a user actually authorized its contents. Declared dependencies and applicable document approvals remain in force. Planned future work and draft materials may be saved before entry conditions are met; active/done transitions are checked. Existing records remain readable and report unresolved entry conditions rather than automatically acquiring a scope exception.
|
|
105
|
+
|
|
109
106
|
Reviews identify their actual implementation coverage with `reviewOf: [implementationRunId, ...]`; overall review has `overall: true`. For a single batch one review may explicitly cover both. An unresolved failed review prevents standard completion even if an earlier overall review passed. A passing repair review or retest may list the superseded review/RUN result references in its existing `historyResultRefs`, preserving old failures; the Agent must verify that it actually resolves or covers them on current objects. Verification must follow the applicable overall review. Merely setting a link is not semantic evidence.
|
|
110
107
|
|
|
111
108
|
`run.sessionGroup` is an advisory group ID persisted when a new policy-enabled run is saved: requirements; technical/contract/prototype; cases; plan; each implementation batch with its batch review; overall review; each verify batch. Adjusting groups does not change document approval, add a stage, or block work. `read/check/resume` expose `session.action`, groups and a concise continuation entry; pending review and unconfirmed saves do not return a next-stage entry. `writeResult.session` becomes reconcile-save with no entry if view saving fails, even when stateSaved is true. Repair at the returned revision; do not repeat the approval update. At a confirmed saved group boundary, the Agent suggests a new session without executing the next group in that response. A user request to continue here proceeds with the normal authorized update.
|
|
112
109
|
|
|
113
110
|
`read` and `resume` accept optional `--delivery-id <known-id>` to reject a wrong directory binding. A directory remains required; no implicit latest-delivery lookup exists. Resume is read-only and inspects actual state, approval/content versions, references and view diagnostics; old prompts grant no approval. The Agent must additionally inspect relevant complete formal documents, actual artifacts and unfinished effects before acting.
|
|
114
111
|
|
|
115
|
-
|
|
112
|
+
|
|
113
|
+
Review run `ready` describes a completed, current record; `releaseReady` additionally requires a usable passing review before releasing dependent work. Failed review records remain saved. A later passing repair review must preserve the old result reference and cover the affected implementation scope; unrelated passing reviews do not clear the failure. Session suggestions distinguish exhausting registered work from completing the agreed goal: an unfinished goal with no next run requires arranging the next authorized work, not declaring finished.
|