aimship 0.1.0-preview.16 → 0.1.0-preview.17
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/README.md +3 -3
- package/README.zh-CN.md +3 -3
- package/docs/cli.md +12 -8
- package/docs/guide.md +13 -7
- package/docs/guide.zh-CN.md +13 -9
- package/lib/cli.mjs +6 -6
- package/lib/delivery.mjs +16 -2
- package/lib/documents.mjs +5 -5
- package/lib/state.mjs +7 -12
- package/lib/view.mjs +4 -4
- package/package.json +1 -1
- package/skills/aimship/SKILL.md +7 -7
- package/skills/aimship/references/artifact-map.json +1 -1
- package/skills/aimship/references/core.md +11 -9
- package/skills/aimship/references/document-patterns.md +2 -2
- package/skills/aimship/references/document-review.md +4 -0
- package/skills/aimship/references/recovery.md +3 -3
- package/skills/aimship/references/sources-and-changes.md +2 -2
- package/skills/aimship/references/stages/contract.md +1 -1
- package/skills/aimship/references/stages/diagnose.md +1 -1
- package/skills/aimship/references/stages/plan.md +1 -1
- package/skills/aimship/references/stages/prototype.md +1 -1
- package/skills/aimship/references/stages/tech-design.md +2 -2
- package/skills/aimship/references/stages/test-design.md +1 -1
- package/skills/aimship/references/templates/tech-design.md +1 -1
package/README.md
CHANGED
|
@@ -36,14 +36,14 @@ Choose `codex`, `cursor` or `claude-code`. To connect several tools, repeat the
|
|
|
36
36
|
npx aimship@preview install --host codex --host claude-code
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
The npx package prompt confirms downloading and running the package; `install` performs the Aimship installation or upgrade. `@preview` selects the published preview channel; an exact published version, such as `@0.1.0-preview.
|
|
39
|
+
The npx package prompt confirms downloading and running the package; `install` performs the Aimship installation or upgrade. `@preview` selects the published preview channel; an exact published version, such as `@0.1.0-preview.17`, can be used instead. The preview channel is experimental and does not imply a stable release.
|
|
40
40
|
|
|
41
41
|
### A specific version or local package
|
|
42
42
|
|
|
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.17 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:
|
|
@@ -82,7 +82,7 @@ npx aimship@preview install
|
|
|
82
82
|
|
|
83
83
|
After upgrading, we recommend restarting your AI tool and opening a new session, then activating Aimship to reload the updated rules. Existing sessions may still retain older rules.
|
|
84
84
|
|
|
85
|
-
Installation and upgrades use the same `install` command. Existing tool registrations, configuration, custom content and deliveries are retained. The installer reports previous/target versions, results and conflicts; no background updater or resident process runs. To upgrade to a specific version, for example, run `npx aimship@0.1.0-preview.
|
|
85
|
+
Installation and upgrades use the same `install` command. Existing tool registrations, configuration, custom content and deliveries are retained. The installer reports previous/target versions, results and conflicts; no background updater or resident process runs. To upgrade to a specific version, for example, run `npx aimship@0.1.0-preview.17 install`. Existing installations do not need `--host` or `--data-root` repeated.
|
|
86
86
|
|
|
87
87
|
<a id="add-a-host"></a>
|
|
88
88
|
<a id="add-an-ai-development-tool"></a>
|
package/README.zh-CN.md
CHANGED
|
@@ -36,14 +36,14 @@ AI 工具可选 `codex`、`cursor` 或 `claude-code`。连接多个 AI 工具时
|
|
|
36
36
|
npx aimship@preview install --host codex --host claude-code
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
npx 的获取包提示只确认下载并运行该包;执行 `install` 才会安装或升级 Aimship。`@preview` 表示已发布的预览通道,也可以替换为明确版本号,例如 `@0.1.0-preview.
|
|
39
|
+
npx 的获取包提示只确认下载并运行该包;执行 `install` 才会安装或升级 Aimship。`@preview` 表示已发布的预览通道,也可以替换为明确版本号,例如 `@0.1.0-preview.17`。预览通道用于实验性版本,不代表稳定版。
|
|
40
40
|
|
|
41
41
|
### 指定版本或本地包
|
|
42
42
|
|
|
43
43
|
安装指定的已发布版本,例如:
|
|
44
44
|
|
|
45
45
|
```sh
|
|
46
|
-
npx aimship@0.1.0-preview.
|
|
46
|
+
npx aimship@0.1.0-preview.17 install --host codex
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
如果已有 Aimship 的 `.tgz` 安装包,将 `VERSION` 替换为实际版本号,在包所在目录执行:
|
|
@@ -82,7 +82,7 @@ npx aimship@preview install
|
|
|
82
82
|
|
|
83
83
|
升级完成后,建议重启 AI 工具并新建会话,再启用 Aimship,以便重新加载更新后的规则。已有会话可能仍保留旧规则。
|
|
84
84
|
|
|
85
|
-
安装和升级使用同一个 `install` 命令。已有 AI 工具登记、配置、自定义内容和交付资料都会保留。安装器报告旧/目标版本、结果及冲突;没有后台自动升级或常驻进程。更新到指定版本时,例如运行 `npx aimship@0.1.0-preview.
|
|
85
|
+
安装和升级使用同一个 `install` 命令。已有 AI 工具登记、配置、自定义内容和交付资料都会保留。安装器报告旧/目标版本、结果及冲突;没有后台自动升级或常驻进程。更新到指定版本时,例如运行 `npx aimship@0.1.0-preview.17 install`。已有安装无需重复填写 `--host` 或 `--data-root`。
|
|
86
86
|
|
|
87
87
|
<a id="添加宿主"></a>
|
|
88
88
|
<a id="添加-ai-开发工具"></a>
|
package/docs/cli.md
CHANGED
|
@@ -8,22 +8,24 @@ Commands emit JSON. Errors include code/message/recovery and use a nonzero exit.
|
|
|
8
8
|
|
|
9
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.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
The first successful init receipt includes a neutral directory reminder; updates and resumes do not repeat it.
|
|
12
|
+
|
|
13
|
+
Before init, save nonempty initialization notes including the original commission in `.aimship/init.md`. A concrete request needs no PRD, code or known technical conditions yet. No templates are automatically created. Minimal input:
|
|
12
14
|
|
|
13
15
|
```json
|
|
14
16
|
{
|
|
15
17
|
"language":"en",
|
|
16
|
-
"goal": {"summary":"Export the currently filtered orders"
|
|
17
|
-
"goalRef":"
|
|
18
|
+
"goal": {"summary":"Export the currently filtered orders"},
|
|
19
|
+
"goalRef":".aimship/init.md",
|
|
18
20
|
"documentPolicy":{"authority":null,"interaction":null,"prototypeCovered":null,"interface":null,"databases":null},
|
|
19
21
|
"documents":[],
|
|
20
|
-
"stageRuns":[{"id":"requirements-1","stage":"requirements","scope":"Order export","progress":"active","inputRefs":["
|
|
22
|
+
"stageRuns":[{"id":"requirements-1","stage":"requirements","scope":"Order export","progress":"active","inputRefs":[".aimship/init.md"],"outputRefs":[]}],
|
|
21
23
|
"currentRun":"requirements-1",
|
|
22
|
-
"next":{"action":"Clarify export fields and acceptance criteria","inputRefs":["
|
|
24
|
+
"next":{"action":"Clarify export fields and acceptance criteria","inputRefs":[".aimship/init.md"]}
|
|
23
25
|
}
|
|
24
26
|
```
|
|
25
27
|
|
|
26
|
-
language and goal.summary are required in new input; absent endpoint defaults to
|
|
28
|
+
language and goal.summary are required in new input; an absent or null endpoint defaults to implementation, review, independent verification and delivery acceptance in the saved language, goalRef to .aimship/init.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. For artifact conditions, 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.
|
|
27
29
|
|
|
28
30
|
```sh
|
|
29
31
|
node '<stable-launcher>' bind
|
|
@@ -59,7 +61,7 @@ Read/check/resume are read-only. They return view diagnostics and changed regist
|
|
|
59
61
|
|
|
60
62
|
## State and view recovery
|
|
61
63
|
|
|
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.
|
|
64
|
+
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. Initialization notes can be maintained and saved normally; changes to business requirements still belong in the formal authority/change log and follow its review rules. Preserve the original commission within the notes.
|
|
63
65
|
|
|
64
66
|
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:
|
|
65
67
|
|
|
@@ -87,6 +89,8 @@ Each record has `{id, kind, document, version, digest, sourceRef, summary}`. Kin
|
|
|
87
89
|
|
|
88
90
|
`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.
|
|
89
91
|
|
|
92
|
+
Nonblocking questions remain in their formal document with impact and resolution timing. Use `next.questionRef` only for a current blocker; approving a document does not resolve every question.
|
|
93
|
+
|
|
90
94
|
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, 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.
|
|
91
95
|
|
|
92
96
|
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.
|
|
@@ -107,7 +111,7 @@ Independent review, verify-only work or limited handoff can omit standard upstre
|
|
|
107
111
|
|
|
108
112
|
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.
|
|
109
113
|
|
|
110
|
-
`run.sessionGroup` remains advisory context, not permission to cross stages. Each stage finishes its work/self-check, saves artifacts and stops: `session.action` is await-review for required approval or await-continue for a completed stage awaiting continuation; `stop` and `suggestNewSession` make that advice explicit.
|
|
114
|
+
`run.sessionGroup` remains advisory context, not permission to cross stages. Each stage finishes its work/self-check, saves artifacts and stops: `session.action` is await-review for required approval or await-continue for a completed stage awaiting continuation; `stop` and `suggestNewSession` make that advice explicit. `suggestNewSession` is true only at major work boundaries: requirements to design, design/applicable contracts to test design, plan to implementation, batch review to the next batch/overall review, and overall review to independent verification. Pending review remains the current task; a suggestion never skips it. Approval and continuation may be expressed together. This is agent interaction guidance, not interception of general-purpose tools or a new approval for non-review stages. `read/check/resume` and `writeResult.session` use the same rule. Unconfirmed saves return reconcile-save with no continuation; repair the view at the saved revision without replaying approval. Pending review never becomes approval through resume or “continue”.
|
|
111
115
|
|
|
112
116
|
`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.
|
|
113
117
|
|
package/docs/guide.md
CHANGED
|
@@ -47,7 +47,7 @@ The delivery directory contains these materials:
|
|
|
47
47
|
~/Aimship/ # Materials root
|
|
48
48
|
└── 20261027-login-signup/ # Example delivery directory
|
|
49
49
|
├── status.md # Current work, pending reviews, next action
|
|
50
|
-
├──
|
|
50
|
+
├── .aimship/init.md # Initialization context for the AI
|
|
51
51
|
├── prd.md # Requirements and acceptance criteria
|
|
52
52
|
├── prototype/index.html # Page interaction prototype
|
|
53
53
|
├── tech-design.md # Technical design
|
|
@@ -76,7 +76,7 @@ Materials develop gradually and are kept as needed. Search readable REQ, AC and
|
|
|
76
76
|
|
|
77
77
|
Follow sign-up and login from requirements to acceptance. **This is fictional practice; wording and business choices need not be copied.** The example later supplies a project and isolated test database, with prototype review after requirements and before technical design. Actual prototype placement follows the delivery's needs.
|
|
78
78
|
|
|
79
|
-
Use one Aimship entry within a session; no invocation is needed at every stage. After completing and self-checking a stage, the AI saves its results, reports the stop and pauses. A new session is recommended, not
|
|
79
|
+
Use one Aimship entry within a session; no invocation is needed at every stage. After completing and self-checking a stage, the AI saves its results, reports the stop and pauses. A new session is recommended at major work transitions, not after every stop. AI-authored or substantively revised reviewable documents await approval; questions affecting current work await clarification; other completed stages await continuation. You may say “approved, continue” once. Work within a stage stays continuous.
|
|
80
80
|
|
|
81
81
|
<a id="11-prepare-a-workspace"></a>
|
|
82
82
|
<a id="12-activate-aimship-and-describe-the-request"></a>
|
|
@@ -96,13 +96,15 @@ Use one Aimship entry within a session; no invocation is needed at every stage.
|
|
|
96
96
|
|
|
97
97
|
**User actions:** Explicitly request Aimship and state the goal. For example:
|
|
98
98
|
|
|
99
|
-
> Use Aimship for username/password sign-up, login, logout and a home page requiring login. Complete development and local verification
|
|
99
|
+
> Use Aimship for username/password sign-up, login, logout and a home page requiring login. Complete development and local verification; I will supply code later.
|
|
100
100
|
|
|
101
101
|
For existing prototypes, PRDs or other documents, supply their original locations; originals stay in place and you need not copy them manually. Following the source rules, the AI retains copies of the formally adopted versions and necessary dependencies under this delivery's `source/` and records the adoption basis in the existing source record. Materials consulted only as background need not be copied in full. Before later revisions, identify the editable artifact; new versions do not overwrite earlier evidence.
|
|
102
102
|
|
|
103
103
|
**AI processing:** Determines the delivery directory and checks access, preserves the request, creates or resumes the delivery, and reports the actual saved directory, current work and next action. It starts requirement intake on the standard sequence without a full-delivery/design-only/init-only choice; explicit limits or pauses are respected. If access is unavailable, it asks you to add that directory or grant access; it does not relocate the delivery into the workspace.
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
The standard endpoint is implementation, review, independent verification and delivery acceptance; no extra scope choice is needed. On initialization, the AI reminds you to add the actual delivery directory to your current project/workspace, ignoring the reminder if already added.
|
|
106
|
+
|
|
107
|
+
**Outputs:** `.aimship/init.md` keeps the original commission, material locations and initialization context for the AI; `status.md` shows the full stage sequence and statuses, current position, pending documents, blocking questions and next action. For a new delivery, the AI saves your preferred language, or otherwise the language of the current conversation. Status and new documents use that language; filenames, IDs, original sources and existing documents remain unchanged.
|
|
106
108
|
|
|
107
109
|
<a id="14-read-the-document-and-give-a-decision"></a>
|
|
108
110
|
<a id="15-continue-after-approval"></a>
|
|
@@ -230,7 +232,7 @@ The AI rechecks access to the same delivery directory, reads its state and confi
|
|
|
230
232
|
|
|
231
233
|
**AI processing:** Summarizes results and remaining work, and records your actual acceptance decision. Complete delivery needs evidence of required document approvals, batch/overall review, independent verification and final acceptance.
|
|
232
234
|
|
|
233
|
-
**Outputs:** `handoff.md` provides result locations, usage, verification conclusions and
|
|
235
|
+
**Outputs:** `handoff.md` provides result locations, usage, verification conclusions and integration status. Earlier document approvals do not replace final acceptance.
|
|
234
236
|
|
|
235
237
|
<a id="guide-sessions"></a>
|
|
236
238
|
|
|
@@ -254,7 +256,11 @@ The AI rechecks access to the same delivery directory, reads its state and confi
|
|
|
254
256
|
|
|
255
257
|
### 2.1 When to switch sessions
|
|
256
258
|
|
|
257
|
-
|
|
259
|
+
Consider a new session after requirements before technical design, after design and applicable contracts before test design, after the plan before implementation, after each batch and its review, and after overall review before independent verification. Combine coinciding boundaries. Resume pending review before advancing; directory creation and small steps within a stage need no session change.
|
|
260
|
+
|
|
261
|
+
Review open questions with their document, including impact, recommendation and when an answer is needed. Nonblocking questions can remain open; document approval does not answer every question.
|
|
262
|
+
|
|
263
|
+
At each completed stage, follow the stop in `status.md`: approve or give feedback on pending documents, or ask to continue completed work. Changing sessions is optional; “continue” does not approve a pending document. The page prioritizes current actions and shows future stages as not started, not current defects.
|
|
258
264
|
|
|
259
265
|
See the [new-session example](#guide-session-example). Keep one writing session per delivery. Trusted records can locate it directly; missing or ambiguous matches prompt clarification. The saved delivery language carries over. If switching before the first save, carry the unsaved request, intended location and pending operations.
|
|
260
266
|
|
|
@@ -306,7 +312,7 @@ For prior discussion, say “Use Aimship to continue the requirements we just di
|
|
|
306
312
|
|
|
307
313
|
Explain what changes, why, and what stays the same; identify any documents you edited yourself. The AI records important changes in `change-log.md`. Newly supplied unchanged inputs are checked and adopted; affected AI outputs are resubmitted for review before dependent work continues. Unaffected work, earlier approvals and test history remain.
|
|
308
314
|
|
|
309
|
-
|
|
315
|
+
Maintain initialization details normally, preserving the original commission in `.aimship/init.md`; record new requirements in the PRD and change log. Typos and formatting need no full re-review. Small fixes can continue the same delivery; a new goal or major redesign gets a separate delivery linked to the original.
|
|
310
316
|
|
|
311
317
|
<a id="guide-limits"></a>
|
|
312
318
|
<a id="27-stop-at-a-limited-goal"></a>
|
package/docs/guide.zh-CN.md
CHANGED
|
@@ -46,8 +46,8 @@ AI 工具项目空间
|
|
|
46
46
|
```text
|
|
47
47
|
~/Aimship/ # 资料根目录
|
|
48
48
|
└── 20261027-login-signup/ # 示例交付目录
|
|
49
|
-
├── status.md #
|
|
50
|
-
├──
|
|
49
|
+
├── status.md # 完整阶段进度、待审材料、下一步
|
|
50
|
+
├── .aimship/init.md # AI 接续所需的初始化约定
|
|
51
51
|
├── prd.md # 需求与验收标准
|
|
52
52
|
├── prototype/index.html # 页面交互原型
|
|
53
53
|
├── tech-design.md # 技术方案
|
|
@@ -76,7 +76,7 @@ AI 工具项目空间
|
|
|
76
76
|
|
|
77
77
|
以登录注册功能演示从需求到验收。**这是虚构实践参考,措辞和业务方案无需照抄。** 本例稍后提供工程和隔离测试数据库,约定需求后确认原型,再做技术设计;实际原型安排按交付需要确定。
|
|
78
78
|
|
|
79
|
-
同一会话沿用一个 Aimship 入口,无需逐阶段调用。每阶段完成并自检后,AI
|
|
79
|
+
同一会话沿用一个 Aimship 入口,无需逐阶段调用。每阶段完成并自检后,AI 保存成果、说明停点并停下。主要工作切换时建议新会话,也可原会话继续。AI 新产出或实质修改的需审文档等待批准,影响当前推进的问题等待确认,其他已完成阶段等待继续;可以一次说“通过并继续”。阶段内部不逐小步暂停。
|
|
80
80
|
|
|
81
81
|
<a id="11-准备工作位置"></a>
|
|
82
82
|
<a id="12-启用-aimship-并说明需求"></a>
|
|
@@ -96,13 +96,13 @@ AI 工具项目空间
|
|
|
96
96
|
|
|
97
97
|
**用户操作**:明确使用 Aimship,并说明目标。例如:
|
|
98
98
|
|
|
99
|
-
> 使用 Aimship
|
|
99
|
+
> 使用 Aimship,做用户名密码注册、登录、退出和登录后首页。完成开发与本地验证;代码稍后提供。
|
|
100
100
|
|
|
101
101
|
已有原型、PRD 或其他文档时,提供原位置即可,原件保留,用户无需手动复制。AI 按来源规则将正式采用的版本及必要依赖资源留存为本次交付 `source/` 中的副本,并在已有来源记录中注明采用依据;仅作背景参考的材料无需全量复制。后续修改先明确编辑对象,新版不覆盖旧依据。
|
|
102
102
|
|
|
103
|
-
**AI
|
|
103
|
+
**AI 处理**:确定交付目录并核对访问,保留诉求,建立或续接交付,告知实际保存目录、当前工作和下一步,并提醒将交付目录添加到当前项目/工作空间,已添加则忽略;默认按主流程承接需求,不先让你选择完整交付、仅设计或仅初始化。标准终点为实现、评审、独立验证和交付验收,无需再选择交付范围。你主动要求暂停或限定范围时按要求处理。若无法访问,提示你添加该原目录或授权;不会改存到项目空间。
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
**输出产物**:`.aimship/init.md` 为 AI 保留原始委托、材料位置及初始化约定;`status.md` 展示整个交付的阶段顺序、各阶段状态、当前位置、待审文档、影响推进的问题和下一步。新建交付时,AI 优先按明确偏好,否则按当前交流语言保存本次交付语言;状态和新文档沿用,文件名、编号、来源原文及已有文档不变。
|
|
106
106
|
|
|
107
107
|
<a id="14-阅读文档并给出结论"></a>
|
|
108
108
|
<a id="15-批准后继续推进"></a>
|
|
@@ -230,7 +230,7 @@ AI 重新核对同一交付目录的访问,读取状态并确认下一步技
|
|
|
230
230
|
|
|
231
231
|
**AI 处理**:汇总成果与遗留事项,记录你的实际验收决定。完整交付需有必要文档批准、批内及整体 review、独立验证和最终验收依据。
|
|
232
232
|
|
|
233
|
-
**输出产物**:`handoff.md`
|
|
233
|
+
**输出产物**:`handoff.md` 提供成果位置、用法、验证结论和集成状态。先前文档批准不替代最终验收。
|
|
234
234
|
|
|
235
235
|
<a id="guide-sessions"></a>
|
|
236
236
|
|
|
@@ -254,7 +254,11 @@ AI 重新核对同一交付目录的访问,读取状态并确认下一步技
|
|
|
254
254
|
|
|
255
255
|
### 2.1 何时换会话
|
|
256
256
|
|
|
257
|
-
|
|
257
|
+
文档中的待确认问题随文档一起审阅,注明影响、建议和最晚解决节点。不影响下一步的问题可以留待后续;文档通过不等于其中所有疑问都已有答案。
|
|
258
|
+
|
|
259
|
+
每阶段完成后按 `status.md` 的停点处理:AI 产出待审则批准或反馈,有具体疑问则回答问题,已完成则要求继续。无需每次都换会话;“继续”不替代待审材料的批准。进度页先展示当前操作,尚未开始的后续阶段不会当作当前缺项。
|
|
260
|
+
|
|
261
|
+
建议在需求完成进入技术设计、设计及适用契约完成进入测试、计划完成进入实施、每批实施及审查完成、整体审查完成进入独立验证时换会话。重合的节点只提示一次;待审时先接续审核,单独创建目录或阶段内的小步骤不需要换窗。
|
|
258
262
|
|
|
259
263
|
新会话操作见[演示中的续接示例](#guide-session-example)。同一交付只保留一个写入会话;可信记录可直接定位,找不到或有多个候选才询问。交付语言沿用已保存设置。首次保存前就要切换时,携带未保存诉求、计划位置及未完成操作。
|
|
260
264
|
|
|
@@ -306,7 +310,7 @@ AI 重新核对同一交付目录的访问,读取状态并确认下一步技
|
|
|
306
310
|
|
|
307
311
|
说明改什么、为什么改、哪些保持不变;自行改过文档时指出文件。AI 在 `change-log.md` 记录重要变化。新提供的原样材料重新核对并记录采用;受影响的 AI 产出重新送审,相关工作审核通过后继续。未受影响的工作、旧批准和测试历史保留。
|
|
308
312
|
|
|
309
|
-
|
|
313
|
+
初始化约定可以正常维护;原始委托保留在 `.aimship/init.md`,新诉求写入需求文档和变更记录。错字或排版无需全部重审。交付后的小修可继续原交付;新目标或大幅重设计另建交付,并注明与原交付的关系。
|
|
310
314
|
|
|
311
315
|
<a id="guide-limits"></a>
|
|
312
316
|
<a id="27-只做到部分目标"></a>
|
package/lib/cli.mjs
CHANGED
|
@@ -16,7 +16,7 @@ const HELP = {
|
|
|
16
16
|
scan: 'scan <material-root>. Read immediate delivery directories at .aimship/state.json, deduplicate IDs and report conflicts or invalid records. No global search or write.',
|
|
17
17
|
status: 'status [--home <dir>]. Read only Aimship-managed paths and fixed entries. Report registration, shared entry presence/integrity, active version, pending work and config problems. Host loading, login and access permissions remain unverified; no directories are created.',
|
|
18
18
|
bind: 'Resolve active installation once. Returns immutable release/core/stage/CLI paths plus configured dataRoot, configPath and customPath. Source mode returns the default data root with null config/custom paths. No directories are created. Optional --home is for isolated testing.',
|
|
19
|
-
init: 'init <dir> --input <json-file|-> --rules-version <version>. Create state once; input requires goal.summary, language (en or zh-CN) and saved
|
|
19
|
+
init: 'init <dir> --input <json-file|-> --rules-version <version>. Create state once; input requires goal.summary, language (en or zh-CN) and saved .aimship/init.md; directory must be a child of bound dataRoot unless storage has an explicit local decisionRef; endpoint defaults to standard delivery; artifact conditions may remain null (unknown). Does not create templates.',
|
|
20
20
|
read: 'read <dir> [--rules-version <version>] [--delivery-id <known-id>]. Read current delivery state without executing work.',
|
|
21
21
|
update: 'update <dir> --revision <N> --rules-version <version> --input <json-file|->. Recursively merge objects; arrays replace in full. Identity/history fields are managed. null is a literal value, not deletion.',
|
|
22
22
|
check: 'check <dir> [--rules-version <version>] [--all]. Check structure and current input references (or every registered reference). Checks ordinary Markdown sections and searchable numbers in new local Markdown; reused and unsupported fragments are explicitly not checked. Does not prove semantics, remote access or validation results.',
|
|
@@ -40,7 +40,7 @@ const HELP = {
|
|
|
40
40
|
references: 'delivery-relative/path#optional-fragment, repo:<registered-id>/<repo-relative-path>#fragment, or HTTP(S) URL. Local paths cannot escape their root. Repository registration: {id, path: absolute-path, role}.',
|
|
41
41
|
topLevel: {
|
|
42
42
|
managed: 'schemaVersion, revision, deliveryId, rulesVersion, createdAt, updatedAt, goalHistory, documentDigests, writeResult. Do not supply these in init/update.',
|
|
43
|
-
requiredInit: 'language: en|zh-CN and goal: {summary, endpoint?}; save
|
|
43
|
+
requiredInit: 'language: en|zh-CN and goal: {summary, endpoint?}; save nonempty initialization notes in .aimship/init.md before init. Defaults: endpoint standard delivery, goalRef .aimship/init.md, empty documents, and null documentPolicy conditions/authority. Register PRD and switch goalRef when drafted; no empty templates.',
|
|
44
44
|
language: 'en or zh-CN from explicit user preference, otherwise this delivery conversation. Required in current state; retained on update/render/resume.',
|
|
45
45
|
storage: 'Init-only {mode: explicit, decisionRef: delivery-relative-readable-file} for a user-selected location. Otherwise a strict child of configured dataRoot. Returned dataRoot is managed; ordinary workspace/material location is not a choice.',
|
|
46
46
|
stageRuns: 'Ordered array of stageInstance objects, default []. Every ID is unique; currentRun must match one of these IDs or be null. Stage types may repeat with distinct IDs.',
|
|
@@ -54,13 +54,13 @@ const HELP = {
|
|
|
54
54
|
},
|
|
55
55
|
minimalInit: {
|
|
56
56
|
language: 'en',
|
|
57
|
-
goal: { summary: 'Export the currently filtered orders'
|
|
58
|
-
goalRef: '
|
|
57
|
+
goal: { summary: 'Export the currently filtered orders' },
|
|
58
|
+
goalRef: '.aimship/init.md',
|
|
59
59
|
documentPolicy: {authority:null,interaction:null,prototypeCovered:null,interface:null,databases:null},
|
|
60
60
|
documents: [],
|
|
61
|
-
stageRuns: [{ id: 'requirements-1', stage: 'requirements', scope: 'Clarify order export', progress: 'active', inputRefs: ['
|
|
61
|
+
stageRuns: [{ id: 'requirements-1', stage: 'requirements', scope: 'Clarify order export', progress: 'active', inputRefs: ['.aimship/init.md'], outputRefs: [] }],
|
|
62
62
|
currentRun: 'requirements-1',
|
|
63
|
-
next: { action: 'Clarify export fields and acceptance criteria', inputRefs: ['
|
|
63
|
+
next: { action: 'Clarify export fields and acceptance criteria', inputRefs: ['.aimship/init.md'] }
|
|
64
64
|
},
|
|
65
65
|
safety: 'Done is execution progress only. Results, applicability, goal attainment, acceptance, merge, and deployment are independent. Preserve old result references with priorResultRef/historyResultRefs. Goal revision needs a new goal.decisionRef; prior goals are retained automatically.'
|
|
66
66
|
}
|
package/lib/delivery.mjs
CHANGED
|
@@ -66,6 +66,18 @@ export function suggestedNextStage(state) {
|
|
|
66
66
|
const contracts=(state.documentPolicy.interface!=null && state.documentPolicy.interface!=='none') || state.documentPolicy.databases?.length;
|
|
67
67
|
return ({frame:'requirements',requirements:'tech-design',prototype:'tech-design','tech-design':contracts?'contract':'test-design',contract:'test-design','test-design':'plan',plan:'implement',implement:'review',review:current.overall?'verify':'review',verify:'handoff'})[current.stage]??null;
|
|
68
68
|
}
|
|
69
|
+
function majorSessionBoundary(state,current) {
|
|
70
|
+
if (!current || current.progress !== 'done') return false;
|
|
71
|
+
const next=suggestedNextStage(state);
|
|
72
|
+
if (!next) return false;
|
|
73
|
+
if (['requirements','prototype'].includes(current.stage)) return next==='tech-design';
|
|
74
|
+
if (['tech-design','contract'].includes(current.stage)) return next==='test-design';
|
|
75
|
+
if (current.stage==='plan') return next==='implement';
|
|
76
|
+
if (current.stage==='review' && current.result==='passed') {
|
|
77
|
+
return current.overall ? next==='verify' : !!current.reviewOf?.length && ['implement','review'].includes(next);
|
|
78
|
+
}
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
69
81
|
export function sessionAdvice(directory,state,review,{saved=true}={}) {
|
|
70
82
|
const groups=[];
|
|
71
83
|
for (const r of state.stageRuns) {
|
|
@@ -87,7 +99,9 @@ export function sessionAdvice(directory,state,review,{saved=true}={}) {
|
|
|
87
99
|
else if(current && ((!status?.resolvedBy && (['failed','mixed','unknown','not-run'].includes(current.result) || (current.stage==='review' && current.progress==='done' && !status?.releaseReady))) || current.progress==='blocked' || ['needs-review','unknown'].includes(current.applicability))) action=concluded && !next?'finished':'resolve-current';
|
|
88
100
|
else if(status?.ready) action=!next?endAction:next.progress!=='planned'?'inspect-existing-work':'await-continue';
|
|
89
101
|
if (saved && !pending && state.deliveryPolicy?.version === 1 && status?.ready && next && review.runs.find(r=>r.id===next.id)?.blockedBy.length) action='resolve-current';
|
|
90
|
-
const
|
|
102
|
+
const suggestNewSession=['await-review','await-continue'].includes(action) && majorSessionBoundary(state,current);
|
|
103
|
+
let instruction=action==='await-clarification'?text(state,'Please answer the question listed below so this work can continue.','请回答下一步所列的具体问题,以便继续当前工作。'):action==='await-continue'?text(state,'This stage is saved. Say “continue” when ready.','本阶段已保存。准备好后可说“继续”。'):action==='assess-outcome'?text(state,'Review the handoff against the agreed goal and record the actual goal conclusion and acceptance; completed handoff alone does not end the delivery.','请对照约定目标审阅交付材料,记录实际目标结论和用户接受结果;完成交付文档不等于交付已结束。'):null;
|
|
104
|
+
if(suggestNewSession) instruction=[instruction,action==='await-review'?text(state,'A new session is recommended to review this document; you can also review it here.','建议新开会话审阅本份文档,也可留在这里审核。'):text(state,'A new session is recommended for the next work; you can also continue here.','建议新开会话接续下一步,也可留在这里继续。')].filter(Boolean).join(' ');
|
|
91
105
|
const continuation=['reconcile-save','await-review','await-clarification','assess-outcome','finished'].includes(action)?null:text(state,`Use Aimship to continue delivery ${JSON.stringify(path.resolve(directory))}; first read its current state and relevant formal documents, then continue the recorded work.${instruction?' '+instruction:''}`,`使用 Aimship 继续交付「${path.resolve(directory)}」,先读取当前状态和相关正式文档再接续。${instruction??''}`);
|
|
92
|
-
return {action,stop:!['continue-current','inspect-existing-work'].includes(action),suggestNewSession
|
|
106
|
+
return {action,stop:!['continue-current','inspect-existing-work'].includes(action),suggestNewSession,currentRun:current?.id??null,nextRun:next?.id??null,groups,continuation,instruction,advisory:true,note:text(state,'A session boundary is not a blocker or approval. Continue here when requested. Resolve the delivery identity, current approvals and unfinished effects on every resume; this text grants no approval.','会话边界不是阻塞或批准。用户要求时可在当前会话继续。每次续接都需核对交付身份、当前审批和未完成事项;本提示不授予权限。')};
|
|
93
107
|
}
|
package/lib/documents.mjs
CHANGED
|
@@ -131,13 +131,13 @@ export async function inspectDocuments(directory, state) {
|
|
|
131
131
|
const find = kind => docs.find(d => d.kind === (kind === 'requirement' ? requirementKind : kind));
|
|
132
132
|
if (state.schemaVersion === 4) {
|
|
133
133
|
try {
|
|
134
|
-
const request = await safeRead(directory,state,'
|
|
135
|
-
if (!request?.trim()) issues.push('Missing or empty
|
|
136
|
-
else digests['
|
|
137
|
-
} catch { issues.push('Cannot read
|
|
134
|
+
const request = await safeRead(directory,state,'.aimship/init.md');
|
|
135
|
+
if (!request?.trim()) issues.push('Missing or empty .aimship/init.md.');
|
|
136
|
+
else digests['.aimship/init.md'] = hash(request);
|
|
137
|
+
} catch { issues.push('Cannot read .aimship/init.md inside this delivery.'); }
|
|
138
138
|
}
|
|
139
139
|
const preparing = state.schemaVersion === 4 && !find('requirement');
|
|
140
|
-
if (preparing && state.goalRef !== '
|
|
140
|
+
if (preparing && state.goalRef !== '.aimship/init.md') issues.push('Before requirements exist, goalRef must point to .aimship/init.md.');
|
|
141
141
|
if (!preparing && !find('requirement')) issues.push(`Register ${requirementKind} as the requirement entry.`);
|
|
142
142
|
if (!preparing && policy.authority === null) issues.push('Select the requirement authority when registering PRD.');
|
|
143
143
|
if (find('requirement') && state.goalRef.split('#')[0]!==find('requirement').path) issues.push('goalRef must point to the registered requirement authority.');
|
package/lib/state.mjs
CHANGED
|
@@ -4,10 +4,10 @@ import { validateDelivery, arrangeSessions, completionStatus, sessionAdvice } fr
|
|
|
4
4
|
import fs from 'node:fs/promises';
|
|
5
5
|
import { validateReviewState, enforceReviews, reviewStatus } from './approvals.mjs';
|
|
6
6
|
import path from 'node:path';
|
|
7
|
-
import { inspectDocuments, documentChanges, hasLocator, artifactMap
|
|
7
|
+
import { inspectDocuments, documentChanges, hasLocator, artifactMap } from './documents.mjs';
|
|
8
8
|
import { savedResult, viewStatus, generateView } from './view.mjs';
|
|
9
9
|
import { randomUUID } from 'node:crypto';
|
|
10
|
-
import { atomicWrite, exists, fail,
|
|
10
|
+
import { atomicWrite, exists, fail, inside, json, noSymlinks, readJSON, withLock } from './io.mjs';
|
|
11
11
|
|
|
12
12
|
export const SCHEMA_VERSION = 4;
|
|
13
13
|
export const STAGES = ['frame', 'requirements', 'prototype', 'diagnose', 'tech-design', 'contract', 'test-design', 'plan', 'implement', 'review', 'verify', 'handoff'];
|
|
@@ -115,11 +115,6 @@ async function inspectForWrite(directory,state,previous) {
|
|
|
115
115
|
const results=await checkReferences(directory,{...state,goalRef:run.resultRef,next:{inputRefs:[]},stageRuns:[],currentRun:null});
|
|
116
116
|
if (results.some(r=>!['exists','not-checked'].includes(r.status))) fail('DOCUMENT_CHECK',`Cannot locate result for ${run.id}.`,'Fix the result reference.',{references:results});
|
|
117
117
|
}
|
|
118
|
-
const original=previous?.documentDigests?.['source/request.md'];
|
|
119
|
-
if (original && inspected.digests['source/request.md'] === undefined) {
|
|
120
|
-
try { inspected.digests['source/request.md']=hash(await safeRead(directory,state,'source/request.md')); } catch { inspected.digests['source/request.md']=null; }
|
|
121
|
-
}
|
|
122
|
-
if (original && inspected.digests['source/request.md'] !== original) fail('SOURCE_CHANGED','The preserved original request changed.','Restore source/request.md from the original evidence; record revised requirements in the current authority and change log. An unrelated save cannot adopt changed original input.');
|
|
123
118
|
state.documentDigests=inspected.digests;
|
|
124
119
|
}
|
|
125
120
|
export async function renderState(directory,revision,rulesVersion,runtime,preserveEdits=false) {
|
|
@@ -152,10 +147,10 @@ export async function initState(directory, input, rulesVersion, runtime) {
|
|
|
152
147
|
const forbidden = ['schemaVersion', 'revision', 'deliveryId', 'rulesVersion', 'createdAt', 'updatedAt', 'goalHistory', 'documentDigests', 'writeResult'];
|
|
153
148
|
requireThat(object(input) && !forbidden.some(x => Object.hasOwn(input, x)), 'init input must not set tool-managed identity/version fields.');
|
|
154
149
|
const now = new Date().toISOString();
|
|
155
|
-
const state = { goalRef:'
|
|
150
|
+
const state = { goalRef:'.aimship/init.md', documentPolicy:{authority:null,interaction:null,prototypeCovered:null,interface:null,databases:null}, documents:[], deliveryPolicy: {version:1}, reviewPolicy: 1, reviewHistory: [], cycle: 1, closureRefs: [], stageRuns: [], currentRun: null, openChanges: [], repositories: [], outcome: { goal: 'in-progress', acceptance: 'not-recorded' }, next: { action: text(input,'Clarify the request and prepare requirements for review.','澄清诉求并准备需求审核。'), inputRefs:['.aimship/init.md'] }, ...input, storage, schemaVersion: SCHEMA_VERSION, revision: 0, deliveryId: randomUUID(), rulesVersion, createdAt: now, updatedAt: now };
|
|
156
151
|
if (object(input.documentPolicy)) state.documentPolicy = {authority:null,interaction:null,prototypeCovered:null,interface:null,databases:null,...input.documentPolicy};
|
|
157
|
-
if (object(state.goal) && state.goal.endpoint
|
|
158
|
-
arrangeSessions(state); validateState(state); requireThat(state.deliveryPolicy?.version === 1, 'New deliveries require deliveryPolicy version 1.'); await inspectForWrite(directory,state); await enforceReviews(directory,state); await enforceCompletion(directory,state); await atomicWrite(p.statePath, json(state)); return savedResult(directory,state);
|
|
152
|
+
if (object(state.goal) && state.goal.endpoint == null) state.goal.endpoint = text(state,'Implementation, review, independent verification and delivery acceptance.','完成实现、评审、独立验证和交付验收。');
|
|
153
|
+
arrangeSessions(state); validateState(state); requireThat(state.deliveryPolicy?.version === 1, 'New deliveries require deliveryPolicy version 1.'); await inspectForWrite(directory,state); await enforceReviews(directory,state); await enforceCompletion(directory,state); await atomicWrite(p.statePath, json(state)); return savedResult(directory,state,{initialized:true});
|
|
159
154
|
});
|
|
160
155
|
}
|
|
161
156
|
function merge(base, patch) {
|
|
@@ -196,7 +191,7 @@ export async function updateState(directory, patch, revision, rulesVersion, runt
|
|
|
196
191
|
requireThat(previous.deliveryPolicy === undefined || next.deliveryPolicy?.version === previous.deliveryPolicy.version, 'Cannot remove or downgrade deliveryPolicy.');
|
|
197
192
|
arrangeSessions(next); validateState(next);
|
|
198
193
|
// Registering the first formal basis is not a new user scope decision.
|
|
199
|
-
const formalizing = previous.schemaVersion === 4 && previous.goalRef === '
|
|
194
|
+
const formalizing = previous.schemaVersion === 4 && previous.goalRef === '.aimship/init.md' && !previous.documents.some(d=>d.kind==='prd') && next.documents.some(d=>d.kind==='prd' && d.path === next.goalRef.split('#')[0]);
|
|
200
195
|
if (JSON.stringify(previous.goal) !== JSON.stringify(next.goal) || (previous.goalRef !== next.goalRef && !formalizing)) {
|
|
201
196
|
requireThat(string(next.goal.decisionRef) && next.goal.decisionRef !== previous.goal.decisionRef, 'Goal revision requires a new explicit decisionRef; viewing results does not revise a goal.');
|
|
202
197
|
next.goalHistory = [...(previous.goalHistory ?? []), { goal: previous.goal, goalRef: previous.goalRef, deliveryPolicy: previous.deliveryPolicy, outcome: previous.outcome, revision: previous.revision }];
|
|
@@ -276,7 +271,7 @@ export async function checkReferences(directory, state, all = false) {
|
|
|
276
271
|
|
|
277
272
|
async function enforceCompletion(directory,state) {
|
|
278
273
|
if (state.deliveryPolicy?.version !== 1 || state.outcome.goal !== 'met') return;
|
|
279
|
-
if (state.schemaVersion === 4 && (state.goal.endpoint === null || state.goalRef === '
|
|
274
|
+
if (state.schemaVersion === 4 && (state.goal.endpoint === null || state.goalRef === '.aimship/init.md')) fail('DELIVERY_INCOMPLETE','Initialization is not a completed delivery.','Resolve the endpoint and formal requirements before claiming completion.');
|
|
280
275
|
const completion=completionStatus(state,await reviewStatus(directory,state));
|
|
281
276
|
if (!state.deliveryPolicy.partialRef && !completion.readyForAcceptance) fail('DELIVERY_INCOMPLETE','Standard delivery evidence is incomplete.','Keep the goal in progress, or record the explicitly limited scope without claiming standard completion.',completion);
|
|
282
277
|
const refs=await checkReferences(directory,state,true);
|
package/lib/view.mjs
CHANGED
|
@@ -53,7 +53,7 @@ export async function renderText(directory,state) {
|
|
|
53
53
|
lines.push(`${t('Current stage','当前阶段')}: ${v(current?.stage??'requirements preparation')}${current?' · '+progress(current):''}`);
|
|
54
54
|
for(const d of humanDocs)lines.push(`- ${artifactLink(d.path)} ${cell(d.version)} · ${d.selfCheck?t('Self-check recorded as passed','自检记录通过'):t('Self-check pending','待自检')} · ${v(d.status)}`);
|
|
55
55
|
lines.push('',`${t('Next action','下一步')}: ${cell(state.next.action)}`);
|
|
56
|
-
if(session.action==='await-review')lines.push('',t('Review the
|
|
56
|
+
if(session.action==='await-review')lines.push('',t('Review the document above and approve it or give feedback.','请查看上方文档,通过或反馈修改。'));
|
|
57
57
|
if(state.next.questionRef)lines.push('',`${t('Question and impact','问题与影响')}: ${artifactLink(state.next.questionRef)}`);
|
|
58
58
|
if(session.instruction)lines.push('',cell(session.instruction));
|
|
59
59
|
const next=suggestedNextStage(state);
|
|
@@ -88,7 +88,7 @@ export async function renderText(directory,state) {
|
|
|
88
88
|
const refs=new Map();
|
|
89
89
|
const names={testing:t('Test cases and results','用例与结果'),sql:'SQL',prd:t('Requirements','需求依据'),source:t('Source material','来源材料'),prototype:t('Prototype','原型')};
|
|
90
90
|
for(const d of state.documents)refs.set(d.path,`${names[d.kind]??v(d.kind)} · ${cell(d.version)}`);
|
|
91
|
-
for(const ref of state.stageRuns.flatMap(r=>[...r.outputRefs,r.resultRef].filter(Boolean)).concat(state.next.inputRefs??[]))if(!refs.has(ref.split('#')[0]))refs.set(ref.split('#')[0],t('Work material','工作材料'));
|
|
91
|
+
for(const ref of state.stageRuns.flatMap(r=>[...r.outputRefs,r.resultRef].filter(Boolean)).concat(state.next.inputRefs??[]))if(ref.split('#')[0]!=='.aimship/init.md' && !refs.has(ref.split('#')[0]))refs.set(ref.split('#')[0],t('Work material','工作材料'));
|
|
92
92
|
for(const [ref,role] of refs)if(await available(directory,state,ref))lines.push(`- ${role}: ${artifactLink(ref)}`);
|
|
93
93
|
lines.push('',t('## Continue this delivery','## 接续本次交付'),'',`${t('Delivery directory','交付目录')}: ${cell(path.resolve(directory))}`,'',t('You can continue here, or start a new session with “Use Aimship to continue this delivery” and this directory. The AI reads the saved state and materials and resumes the current stop.','可在当前会话继续;新会话请说“使用 Aimship 继续本次交付”并提供此目录。AI 会读取已保存状态和材料,接续本页停点。'));
|
|
94
94
|
if(state.repositories.length) {
|
|
@@ -114,7 +114,7 @@ export async function generateView(directory,state,preserveEdits=false) {
|
|
|
114
114
|
return {status:'current',revision:state.revision,...(preservedPath?{preservedPath}:{})};
|
|
115
115
|
} catch(error) {return {status:'error',reason:error.code??error.message,...(preservedPath?{preservedPath}:{}),recovery:text(state,'State was saved. Repair the view paths, then render at the returned revision; do not replay update.','状态已保存。请修复视图路径,并在返回的修订上重新生成视图;不要重复业务更新。')};}
|
|
116
116
|
}
|
|
117
|
-
export async function savedResult(directory,state) {
|
|
117
|
+
export async function savedResult(directory,state,{initialized=false}={}) {
|
|
118
118
|
const view=await generateView(directory,state);
|
|
119
|
-
return {...state,writeResult:{stateSaved:true,revision:state.revision,view,receipt:{status:view.status==='current'?'saved':'view-repair-required',deliveryId:state.deliveryId,directory:path.resolve(directory),statePath:path.join(path.resolve(directory),'.aimship/state.json'),statusPath:view.status==='current'?path.join(path.resolve(directory),'status.md'):null,rulesVersion:state.rulesVersion,currentStage:state.stageRuns.find(r=>r.id===state.currentRun)?.stage??(state.goalRef==='
|
|
119
|
+
return {...state,writeResult:{stateSaved:true,revision:state.revision,view,receipt:{status:view.status==='current'?'saved':'view-repair-required',deliveryId:state.deliveryId,directory:path.resolve(directory),statePath:path.join(path.resolve(directory),'.aimship/state.json'),statusPath:view.status==='current'?path.join(path.resolve(directory),'status.md'):null,rulesVersion:state.rulesVersion,currentStage:state.stageRuns.find(r=>r.id===state.currentRun)?.stage??(state.goalRef==='.aimship/init.md'?'requirements preparation':null),nextAction:state.next.action,repositoryCount:state.repositories.length,...(initialized?{workspaceHint:text(state,`Add ${path.resolve(directory)} to your current project/workspace; ignore this if already added.`,`请将「${path.resolve(directory)}」添加到当前项目/工作空间;已添加则忽略。`)}:{})},session:sessionAdvice(directory,state,await reviewStatus(directory,state),{saved:view.status==='current'})}};
|
|
120
120
|
}
|
package/package.json
CHANGED
package/skills/aimship/SKILL.md
CHANGED
|
@@ -8,13 +8,13 @@ disable-model-invocation: true
|
|
|
8
8
|
|
|
9
9
|
Activate only when the user explicitly asks to start or resume Aimship. A clear request such as “use Aimship to start/continue” is explicit activation; a passing mention of its name or opening a project is not. In each new session, explicitly activate it again. Ordinary conversation does not create a delivery. Once activated, continue the same delivery across turns without asking the user to invoke every stage.
|
|
10
10
|
|
|
11
|
-
1. Run `"{{AIMSHIP_NODE}}" "{{AIMSHIP_LAUNCHER}}" bind
|
|
12
|
-
2.
|
|
13
|
-
3. Follow the
|
|
14
|
-
4.
|
|
15
|
-
5.
|
|
11
|
+
1. Run `"{{AIMSHIP_NODE}}" "{{AIMSHIP_LAUNCHER}}" bind`, then read the returned fixed-version [core](references/core.md) and CLI help. Use that release's tools and references. In a source checkout, run `node bin/aimship.mjs bind` from its package root.
|
|
12
|
+
2. Locate the same delivery and read its state, initialization notes and current materials. For new work, follow [initialization](references/core.md#initialization): preserve the commission in `.aimship/init.md`, use a separate directory under the bound dataRoot, and save the actual language and scope. A concrete request is enough; code and a PRD can come later. Resume existing work rather than initialize it again.
|
|
13
|
+
3. Follow the current [stage reference](references/core.md#stage-references), complete its work and self-check, then save and report the artifacts and current stop. For a newly written or substantively revised reviewable document, show its link and review focus and collect the user's decision using [document review](references/document-review.md). Adopt unchanged supplied materials from the actual commission without asking for their review again. Keep unresolved questions in the document with their impact and the point when an answer is needed.
|
|
14
|
+
4. At the saved stop, handle review feedback or continuation. Record an actual approval before releasing dependent work; a message can approve and ask to continue together. Keep work within a stage continuous. Use the core's major work boundaries for a new-session suggestion; a pending document stays at review in either session.
|
|
15
|
+
5. Report the saved directory, materials and next action using the core's User-facing updates guidance. On initialization, remind the user once to add the actual directory to the current project/workspace, ignoring the reminder if already added. On resume, preserve the delivery ID, current stop, language and fixed rule/tool paths; reload these if context is lost.
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
Read [recovery and updates](references/recovery.md) on interruption, version mismatch or missing references; [sources and change flow](references/sources-and-changes.md) when adopting external material or revising reviewed work; [AI tool access](references/hosts.md) only when access or tool setup needs attention. Read [document patterns](references/document-patterns.md) when establishing the artifact arrangement or producing a document.
|
|
18
|
+
Read [recovery and updates](references/recovery.md) on interruption, version mismatch or missing references; [sources and change flow](references/sources-and-changes.md) when adopting external material or revising reviewed work; [AI tool access](references/hosts.md) only when access or tool setup needs attention. Read [document patterns](references/document-patterns.md) when establishing the artifact arrangement or producing a document. Formal documents and the complete progress view status.md stay at the delivery root; initialization notes and state stay under .aimship/, and adopted external materials under source/. On resume use the actual statePath returned by read, inspect view/document-change warnings, and explicitly repair supported state as described in recovery. Do not treat a generated view as editable authority.
|
|
19
19
|
|
|
20
|
-
The agent handles meaning, engineering and evidence. The local tools protect structure and writes; a successful command or a file's existence cannot establish goal completion.
|
|
20
|
+
The agent handles meaning, engineering and evidence. The local tools protect structure and writes; a successful command or a file's existence cannot establish goal completion. Session changes remain manual; engineering actions follow the actual commission.
|
|
@@ -8,7 +8,7 @@ This is presentation guidance, not permission to skip rules or hide facts. Keep
|
|
|
8
8
|
|
|
9
9
|
## Start from the commission
|
|
10
10
|
|
|
11
|
-
A delivery has one centralized material directory,
|
|
11
|
+
A delivery has one centralized material directory, initialization notes containing the original commission, a state record, and a current PRD, authored or adopted as needed. The default endpoint is implementation, review, independent verification and delivery acceptance; retain any explicit limit in the commission. Code stays in its existing locations. A single repository and several repositories use the same model; there is no project registration step, repository count limit, or route classification.
|
|
12
12
|
|
|
13
13
|
The project workspace is the AI tool's working context, not necessarily a code repository. Initialization needs no code location or repository association. Work in that workspace and, using the tool's supported controls when needed, have the user add or grant access to the actual delivery directory in place; do not copy its documents into the workspace. Do not invent workspace membership when it is unknown or claim to add a folder automatically. The configured dataRoot remains the default, not a new Aimship folder relative to the working directory.
|
|
14
14
|
|
|
@@ -21,18 +21,18 @@ Read repository instructions and existing tools for the relevant work. Record re
|
|
|
21
21
|
<a id="initialization"></a>
|
|
22
22
|
## Initialize or resume the same delivery
|
|
23
23
|
|
|
24
|
-
This flow follows explicit Aimship activation in the first and every new session. Opening a project or merely mentioning Aimship does not activate it. A concrete problem, defect, technical objective or intended change is sufficient; a complete PRD, code
|
|
24
|
+
This flow follows explicit Aimship activation in the first and every new session. Opening a project or merely mentioning Aimship does not activate it. A concrete problem, defect, technical objective or intended change is sufficient; a complete PRD, code and technical stack are not prerequisites. With only a product name or broad direction, ask a focused question about the actual problem before creating records; do not invent features or a full product scope.
|
|
25
25
|
|
|
26
26
|
1. Preserve the user's relevant wording, sources, constraints and visible discussion. Distinguish user decisions, reported facts, Agent suggestions and unknowns. Do not re-ask known answers or treat discussion as approval. Before write access exists, keep this in the conversation and say it is not saved. If a session switch is necessary before saving, provide copyable context with the intended path, original input and pending operation; it is not a new approval.
|
|
27
27
|
2. Bind the actual tool/core version and keep its returned dataRoot. Inspect the intended delivery folder or known candidates for existing state, partial creation or conflicting material. Read and resume existing state, checking deliveryId when known, including older deliveries outside today’s configured root. For a new location explicitly chosen by the user, preserve that actual decision in a nonempty local file within the delivery and supply `storage: {mode: "explicit", decisionRef: "<delivery-relative file>"}` to init; the reference is a file path without a fragment. Never invent the decision or override the tool’s dataRoot to make a path pass. Otherwise use a separate folder under the bound dataRoot. Ask only when identity/location is unresolved; do not create a replacement or infer ownership from a matching name.
|
|
28
28
|
3. Reuse the current workspace’s access to the intended materials path without changing that path. If access is missing, follow [AI tool access](hosts.md) with the exact required path; the user adds the original directory or grants the needed access. If the target does not exist, use its accessible existing parent to create it as part of saving this delivery, or explain which directory the user must create/open. No silent fallback into the workspace, unrelated probe files or global settings changes. Workspace names and “I added it” are not proof: normal reads establish read access only; actual saves establish write access for that operation. Do not report saved work before the result confirms it.
|
|
29
|
-
4.
|
|
29
|
+
4. Write concise initialization notes in .aimship/init.md: the original commission in its own words, language, supplied material locations, adopted copies, explicit user limits and the delivery endpoint. Distinguish the user’s words from your summary. Maintain these notes when facts are corrected; keep current progress in state/status and business changes in the formal requirements. Do not duplicate the general workflow or conversation history. Set `language` to `zh-CN` or `en`: an explicit user preference takes precedence, otherwise use the language of this conversation. The Agent saves this delivery setting in init; it is not an installation setting or a command the user must learn. Use init to create state and its generated status.md. An omitted or null endpoint defaults to standard delivery; provide an actual narrower endpoint when the user limits the work. Before PRD exists, use goalRef .aimship/init.md, empty documents and null for unknown documentPolicy conditions/authority (schema 4). A requirements/frame run can be active without a draft; a done result still requires its formal artifact. Do not create empty templates or mark unknown conditions false/none/[] to pass init. Use next for the concrete pending questions/work; no parallel initialization ledger.
|
|
30
30
|
5. Inspect stateSaved, revision and view from the actual result. Read back the saved state and status entry before reporting complete initialization. If the view failed, preserve the ID/revision and repair it with render; do not init again. If the response was lost, read before retrying. Source-only partial creation resumes at the same intended location after checking its ownership; stale locks require confirming the writer stopped.
|
|
31
|
-
6. Give a concise receipt: initialized / resumed / incomplete, recognizable delivery, actual absolute directory and readable status link (only when available), saved materials, bound version, saved language, code association and checked access, current stage/work and next action. A repository registration alone does not prove access. Do not claim original initialization facts for an old delivery. Separate existing materials retained or copied from documents newly authored or revised and delivery records newly created. Report “unchanged” only when supported by the actual operations and source evidence. For a complete unchanged supplied PRD with clear intent to deliver from it, report input adoption without requesting repeated source approval; clarify only actual uncertainties. Then continue authorized requirement clarification, unless the user requested a stop.
|
|
31
|
+
6. Give a concise receipt: initialized / resumed / incomplete, recognizable delivery, actual absolute directory and readable status link (only when available), saved materials, bound version, saved language, code association and checked access, current stage/work and next action. A repository registration alone does not prove access. Do not claim original initialization facts for an old delivery. Separate existing materials retained or copied from documents newly authored or revised and delivery records newly created. Report “unchanged” only when supported by the actual operations and source evidence. For a complete unchanged supplied PRD with clear intent to deliver from it, report input adoption without requesting repeated source approval; clarify only actual uncertainties. On first initialization, add one neutral reminder with the actual directory: add it to the current project/workspace, ignoring this if already added. No tool-specific instructions or membership check are needed. Then continue authorized requirement clarification, unless the user requested a stop.
|
|
32
32
|
|
|
33
33
|
Register the first substantive PRD, select its authority and change goalRef in the same update when drafting it. This reference transition alone does not alter the user's goal or require a fabricated approval; an actual endpoint/scope change still needs its decision source. AI-authored or substantively revised requirements and subsequent selected reviewable outputs keep their self-check/explicit-approval stops. An unchanged supplied PRD/prototype uses mode input and its actual adoption-request basis; self-check makes it usable input, not human-approved AI output. Internal management records are not separately reviewed. Write new formal headings/body and next-action text in the saved delivery language while retaining business IDs, machine keys and paths. Preserve source text and existing documents without automatic translation. Unknown technical conditions can be investigated during design, but must be resolved before completing design or advancing work that depends on them. Omitting a stage record cannot bypass its input document approvals. Initialization/check/resume readiness permits only the recorded current work, not all future stages.
|
|
34
34
|
|
|
35
|
-
“Clarify requirements first” describes current work, not a requirements-only endpoint or full development permission. The standard stage sequence is the default, not a choice to ask again in the receipt or next action. Clarify only a concrete unresolved scope or endpoint condition that affects the work; do not ask whether to follow the standard sequence. Use
|
|
35
|
+
“Clarify requirements first” describes current work, not a requirements-only endpoint or full development permission. The standard stage sequence is the default, not a choice to ask again in the receipt or next action. Clarify only a concrete unresolved scope or endpoint condition that affects the work; do not ask whether to follow the standard sequence. Use the standard endpoint for normal delivery; record an explicit limitation when one is actually given. Keep known conditions when available; false/none/[] mean explicitly not applicable, not unknown. Later changes use existing impact/re-review rules.
|
|
36
36
|
|
|
37
37
|
### Associate code when needed
|
|
38
38
|
|
|
@@ -63,7 +63,7 @@ Records can be stale and cannot detect all other work. Do not switch another ses
|
|
|
63
63
|
|
|
64
64
|
Use the standard delivery sequence for a developer responsible for a requirement: requirements and acceptance criteria → technical design with applicable interface/SQL/interaction artifacts → test cases → plan → implementation batches with batch review → overall review → verification → handoff and acceptance. Do not offer an arbitrary checklist of core stages or a pluggable workflow. Internal runs and batches organize this sequence. Requirements and scope alignment are always needed; use the fixed PRD conditions in [document patterns](document-patterns.md). Adopt adequate existing artifacts as inputs without claiming their stages were newly executed. Do not create empty stage runs or templates.
|
|
65
65
|
|
|
66
|
-
Start requirements intake using this standard sequence. Do not offer a default full-delivery/design-only/initialization-only choice.
|
|
66
|
+
Start requirements intake using this standard sequence. Do not offer a default full-delivery/design-only/initialization-only choice. Record the standard endpoint without a separate scope-selection question; explicit limitations or pauses take precedence. Keep actual document review decisions separate from this initial arrangement. Once confirmed, follow the order; material changes follow [change flow](sources-and-changes.md). A stage may recur as distinct instances with stable IDs and explicit scopes.
|
|
67
67
|
|
|
68
68
|
Explain each design's key decisions, why they fit the requirements, tradeoffs, artifact location and remaining questions. Ordinary internal implementation choices stay with the agent. Ask for material changes to goals, scope, external behavior, compatibility, significant cost, data handling or an explicit technical commitment. Follow [document review](document-review.md): present each selected reviewable document after self-check and pause for explicit approval. An approval releases the next authorized work; use the session boundary interaction below, without a second approval or start confirmation.
|
|
69
69
|
|
|
@@ -116,7 +116,9 @@ Use the installed tool's documented state protocol. Read the current revision be
|
|
|
116
116
|
|
|
117
117
|
Important semantic changes retain historical review and test facts, mark affected conclusions for review and update the current editable authority. Do not overwrite external adopted sources. See [sources and change flow](sources-and-changes.md).
|
|
118
118
|
|
|
119
|
-
At each stage boundary, save the completed work and self-check, show its artifacts, current stop and next suggestion, then stop. Recommend a new session without requiring one. Work continuously inside a stage; do not pause after each small step. Existing sessionGroup is only contextual grouping, never permission to cross stages. Each implementation batch and its batch review retain their own results; overall review remains distinct. Do not create a session approval record or require proof of a changed session ID.
|
|
119
|
+
At each stage boundary, save the completed work and self-check, show its artifacts, current stop and next suggestion, then stop. Recommend a new session at the major boundaries below, without requiring one. Work continuously inside a stage; do not pause after each small step. Existing sessionGroup is only contextual grouping, never permission to cross stages. Each implementation batch and its batch review retain their own results; overall review remains distinct. Do not create a session approval record or require proof of a changed session ID.
|
|
120
|
+
|
|
121
|
+
Recommend switching after requirements are ready for technical design, after design and applicable contracts before test design, after the plan before implementation, after an implementation batch and its review, and after overall review before independent verification. Combine coinciding boundaries. Directory creation alone, individual documents inside a design group, test design before planning, and implementation before its batch review do not need another suggestion. For a pending document at a major boundary, recommend resuming its review, not starting the next stage. A failed review stays with its repairs.
|
|
120
122
|
|
|
121
123
|
For a reviewable draft, show only its current stage/status, document entry and review focus; ask for explicit approval or questions. Do not issue the next stage's continuation prompt before approval. Discussion and edits retain the stop; self-check and present revisions again.
|
|
122
124
|
|
|
@@ -124,11 +126,11 @@ After explicit approval, in one handling of the message: preserve the actual dec
|
|
|
124
126
|
|
|
125
127
|
After a stage is saved, wait for explicit approval where document review is required, or for continuation where it is not. An approval may include “continue”; record it and proceed without a second confirmation. Approval without a continuation request leaves a saved boundary. Never treat “continue” alone as document approval. Continuing in this session needs no session permission. Stage-internal work and authorized repair remain continuous; failures lead to repair/re-review rather than mechanical advancement. At final handoff do not invent a next-session task.
|
|
126
128
|
|
|
127
|
-
|
|
129
|
+
At a recommended session boundary or when the user requests continuation help, give current status, artifact and next suggestion, followed by one line in the saved delivery language using the actual absolute directory: “Use Aimship to continue delivery <actual directory>; first read the current state and relevant formal documents, then continue the recorded work.” In Chinese: “使用 Aimship 继续交付「实际目录」,先读取当前状态和相关正式文档再接续。” Do not output placeholders or long prompts at every stage. Full tasks, inputs, deliverable requirements, review stops and unresolved matters stay in existing state/formal documents/rules, not a new prompt or handoff file. A complete prompt may be generated when requested, without an arbitrary length limit.
|
|
128
130
|
|
|
129
131
|
In a new session, explicitly activate Aimship and uniquely resolve the same delivery from a trustworthy path/binding; if missing or ambiguous, request the directory or candidate selection, never a global latest delivery. Read the actual statePath returned by read, verify deliveryId when known, retain the saved language, reload fixed rules and current inputs, and inspect document approval versions, real artifacts and unfinished effects before choosing work. An old prompt or “continue next stage” is not approval. A draft remains pending across sessions. Stop the old writer before the new writer takes over. Aimship does not create sessions, use the clipboard, or launch an AI tool.
|
|
130
132
|
|
|
131
|
-
End when the current confirmed goal is met. For design work this means the agreed design
|
|
133
|
+
End when the current confirmed goal is met. For explicitly limited design work this means the agreed design. For development it includes agreed review and verification. “Show me the result” does not shorten the goal. If the user explicitly changes the endpoint, preserve the old goal, decision and unfinished work, update the arrangement, and assess the revised goal. An incomplete handoff is allowed but is not goal completion.
|
|
132
134
|
|
|
133
135
|
Small corrections within the original goal can reopen the same delivery: preserve its previous closure and result basis, increment the cycle, and review/verify affected work. A separate goal or substantial redesign starts a related delivery; retain the defect or source relationship without introducing parent/child scheduling. Prepared, accepted, merged and deployed are independent facts.
|
|
134
136
|
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
[artifact-map.json](artifact-map.json) is the shared mapping for stages, templates and checks. Use [templates](templates/prd.md) for newly authored documents; preserve the ordinary section headings and their order, write visible headings and body in the saved delivery language, and explain inapplicable sections. Use the English or Chinese headings listed in the artifact map; numbered heading prefixes are optional. Keep business IDs and file paths unchanged. Original sources and existing documents are not automatically translated when the language changes. Templates are drafting guidance, not empty artifacts to generate for every delivery.
|
|
4
4
|
|
|
5
|
-
One request has one directory. New deliveries default to separate folders under the bound dataRoot; formal documents are at the delivery folder’s root, not at dataRoot or the current project merely because materials already exist there.
|
|
5
|
+
One request has one directory. New deliveries default to separate folders under the bound dataRoot; formal documents are at the delivery folder’s root, not at dataRoot or the current project merely because materials already exist there. `.aimship/init.md` holds the original commission and maintainable initialization context for the AI; adopted external versions stay in `source/` without overwriting. Follow [source retention and editing boundaries](sources-and-changes.md#location-and-version-discipline) for originals, necessary resources and subsequent versions. State, recovery copies, necessary evidence and generated AI-tool configuration belong under `.aimship/`. Generated `status.md` is the user entry for the complete stage sequence, each stage’s status, current review/questions and next work; no default INDEX, docs/sql hierarchy, AI copy, transcript or full export. A requested export is a dated object/version snapshot, never an editing authority.
|
|
6
6
|
|
|
7
7
|
## Input and output conditions
|
|
8
8
|
|
|
9
|
-
Initialization may start with preserved
|
|
9
|
+
Initialization may start with preserved .aimship/init.md before a PRD is formed. Do not generate an empty template for init. Register the substantive requirement draft and switch goalRef when ready; before completing requirements or dependent work, use the existing formal artifact and approval rules below. Unknown artifact conditions stay null until determined, distinct from false/none/[] (not applicable).
|
|
10
10
|
|
|
11
11
|
Use one registered PRD as the requirement authority. If an existing PRD fully fits this commission, retain its adopted version in source/ and register that file as kind prd, mode input, authority adopted; keep its text, numbering and outline unchanged. If only part applies, author prd.md for this iteration with source/version, included and excluded work and acceptance; retain corresponding original business IDs. Without a PRD, clarify the request and write prd.md. There is no separate Scope document or approval. For supplied inputs, basisRef identifies the actual user request to use them for delivery; file presence alone does not establish this intent. Self-check these inputs without manufacturing human approval. Ask only concrete unresolved questions. AI-authored or substantively revised PRDs require review; an evidenced current-content approval of that output can be reused.
|
|
12
12
|
|
|
@@ -15,6 +15,10 @@ For reviewable AI outputs (mode new, or mode reused for an existing reviewable o
|
|
|
15
15
|
|
|
16
16
|
Do not ask human approval for every execution log, batch review or test result. Once the plan and required documents are approved, authorized implementation, Agent review, defect repairs within those requirements and retests can continue, showing results. New material decisions and production actions still need their own authorization. Final `outcome.acceptance` is a separate user decision; document approval does not accept the delivery, merge, deploy or execute SQL.
|
|
17
17
|
|
|
18
|
+
## Questions within a document
|
|
19
|
+
|
|
20
|
+
Review the document together with its open questions. Describe each question's impact, recommendation and when an answer is needed. Keep nonblocking questions open as work continues; approving a document does not answer every question or select every alternative. Stop only the work that depends on an unresolved answer. Use `next.questionRef` for a question blocking the current work, not as a list of all document questions; do not turn each question into a separate prompt.
|
|
21
|
+
|
|
18
22
|
## State and evidence
|
|
19
23
|
|
|
20
24
|
New state has `reviewPolicy: 1` and append-only `reviewHistory`. Use the [CLI review protocol](../../../docs/cli.md#document-review-protocol) for exact fields. `read`, `check` and `resume` return current fingerprints and review status; state tools check records and dependencies, not user identity or authenticity. Preserve a concise, faithful decision excerpt with original conversation/message locator and date in a local evidence file or existing formal record. Do not label a synthetic test decision as a real user's approval. Keep decision evidence files immutable and add new decisions in new files. The source hash records submitted evidence bytes, not an authenticated signature; changed/missing evidence blocks release until reconciled.
|
|
@@ -26,8 +26,8 @@ Current deliveries require the document approval and delivery policies. Their re
|
|
|
26
26
|
|
|
27
27
|
## Early initialization and schema 4
|
|
28
28
|
|
|
29
|
-
New initialization saves the selected language and location basis and may have only
|
|
29
|
+
New initialization saves the selected language and location basis and may have only .aimship/init.md, .aimship/state.json and status.md; technical conditions may be unknown, while the endpoint defaults to standard delivery unless explicitly limited. Missing PRD at this point is normal. Read/check/resume use the same early-state rules; do not fill placeholders or infer non-applicability to clear warnings. Register the real draft when formed and retain the existing approval stops.
|
|
30
30
|
|
|
31
|
-
If source
|
|
31
|
+
If initialization notes or source materials exist but state does not, inspect the original input and ownership before completing init at that location. If state exists, resume its ID instead; init deliberately rejects duplicates. A failed view or interrupted receipt never requires a second init. Inspect state then repair only the view at the saved revision, preserving manual status edits. Do not remove locks without checking that the writer stopped.
|
|
32
32
|
|
|
33
|
-
On resume,
|
|
33
|
+
On resume, read the existing .aimship/init.md and saved language without creating another initialization record. Record new intent through the formal requirements/change flow; never automatically translate or overwrite original materials.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Adopt without rewriting the source
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Keep the original commission and stable initialization context in `.aimship/init.md`, separating quoted user input from your summary. Correct initialization details as needed without turning the file into a progress log or rewriting the original commission. Substantive requirement changes belong in the current PRD and the existing change flow. Preserve external PRD, prototype, handover-note and image originals at their supplied locations. Retain the adopted versions as described under [location and version discipline](#location-and-version-discipline); neither storing files nor extracting text establishes visual or interaction validation.
|
|
6
6
|
|
|
7
7
|
Use existing requirement IDs. If none exist, assign local IDs mapped to source sections, pages, prototype screens or short excerpts. A partial-iteration PRD records the current goal, inclusion/exclusion, sources, acceptance, constraints and decisions. A complete applicable supplied PRD is adopted directly as mode input when the user’s delivery intent is clear; basisRef preserves that actual request. Source snapshots and adoption/self-check records are not AI deliverable documents to ask the user to review. Do not transcribe an entire adequate PRD or create a second one merely to fit a template.
|
|
8
8
|
|
|
@@ -29,7 +29,7 @@ Formatting/typo corrections do not require semantic re-review. Implementation bu
|
|
|
29
29
|
|
|
30
30
|
## Location and version discipline
|
|
31
31
|
|
|
32
|
-
The agent preserves the necessary formally adopted versions under `source
|
|
32
|
+
The agent preserves the necessary formally adopted versions under `source/`; the user need not move or manually copy originals. This is source evidence retention, not a second editable delivery or automatic synchronization.
|
|
33
33
|
|
|
34
34
|
- Retain the adopted PRD, prototype, handover notes or images, plus HTML/Markdown images, styles, scripts and other resources needed to read or operate that adopted version. Do not copy unrelated workspace files. Background material that is only consulted need not be imported as a whole.
|
|
35
35
|
- In the existing adoption evidence referenced by basisRef, or the current PRD when authoring it, identify the original location, retained version/path and version or digest, adopted scope, and any missing resources or reading limits. An unpinned mutable URL is insufficient evidence. If access or tools prevent retention, report the precise gap and hold conclusions that require it; never claim the adopted set is complete.
|
|
@@ -24,4 +24,4 @@ Use openapi.yaml or the registered authoritative contract when interfaces apply.
|
|
|
24
24
|
|
|
25
25
|
## Human document review
|
|
26
26
|
|
|
27
|
-
Apply [document review](../document-review.md): generate → self-check → present the concrete document entry, current review status and focus → wait. Record explicit user approval of this version/content, then follow the core session interaction: stop at this stage boundary
|
|
27
|
+
Apply [document review](../document-review.md): generate → self-check → present the concrete document entry, current review status and focus → wait. Record explicit user approval of this version/content, then follow the core session interaction: stop at this stage boundary; suggest a new session only at a major work boundary, and continue here when requested. Approval and continuation may be expressed together. Questions or edit requests retain the stop; edits require self-check and re-review. Production `done` is separate from approval and final acceptance.
|
|
@@ -26,4 +26,4 @@ Only a commissioned independent investigation produces diagnosis.md. Known-cause
|
|
|
26
26
|
|
|
27
27
|
## Human document review
|
|
28
28
|
|
|
29
|
-
Apply [document review](../document-review.md): generate → self-check → present the concrete document entry, current review status and focus → wait. Record explicit user approval of this version/content, then follow the core session interaction: stop at this stage boundary
|
|
29
|
+
Apply [document review](../document-review.md): generate → self-check → present the concrete document entry, current review status and focus → wait. Record explicit user approval of this version/content, then follow the core session interaction: stop at this stage boundary; suggest a new session only at a major work boundary, and continue here when requested. Approval and continuation may be expressed together. Questions or edit requests retain the stop; edits require self-check and re-review. Production `done` is separate from approval and final acceptance.
|
|
@@ -24,4 +24,4 @@ Use plan.md. Preserve the ordinary template headings and section order. Follow [
|
|
|
24
24
|
|
|
25
25
|
## Human document review
|
|
26
26
|
|
|
27
|
-
Apply [document review](../document-review.md): generate → self-check → present the concrete document entry, current review status and focus → wait. Record explicit user approval of this version/content, then follow the core session interaction: stop at this stage boundary
|
|
27
|
+
Apply [document review](../document-review.md): generate → self-check → present the concrete document entry, current review status and focus → wait. Record explicit user approval of this version/content, then follow the core session interaction: stop at this stage boundary; suggest a new session only at a major work boundary, and continue here when requested. Approval and continuation may be expressed together. Questions or edit requests retain the stop; edits require self-check and re-review. Production `done` is separate from approval and final acceptance.
|
|
@@ -26,4 +26,4 @@ Use the registered prototype entry (new HTML: prototype/index.html). Follow [doc
|
|
|
26
26
|
|
|
27
27
|
For an unchanged supplied prototype with clear adoption intent, register mode input with the actual request basis, check the applicable content, then save and stop for continuation without a source approval. Report any unverified visual/interaction scope; a copied file is not newly designed or tested. Ask only concrete unresolved questions through next.questionRef.
|
|
28
28
|
|
|
29
|
-
For AI-authored or substantively changed prototypes, apply [document review](../document-review.md): generate → self-check → present the concrete document entry, current review status and focus → wait. Record explicit user approval of this version/content, then follow the core session interaction: stop at this stage boundary
|
|
29
|
+
For AI-authored or substantively changed prototypes, apply [document review](../document-review.md): generate → self-check → present the concrete document entry, current review status and focus → wait. Record explicit user approval of this version/content, then follow the core session interaction: stop at this stage boundary; suggest a new session only at a major work boundary, and continue here when requested. Approval and continuation may be expressed together. Questions or edit requests retain the stop; edits require self-check and re-review. Production `done` is separate from approval and final acceptance.
|
|
@@ -8,7 +8,7 @@ Read current requirements, relevant engineering instructions, architecture, sche
|
|
|
8
8
|
|
|
9
9
|
Choose an approach with concrete components, dependencies, errors/recovery, compatibility and tradeoffs. Link authoritative contracts instead of duplicating them. For database changes design the data change and the subsequent independent SQL deliverable; explain dialect/version, existing schema basis, conditions and sequence. Do not edit migration files or execute SQL without that commission.
|
|
10
10
|
|
|
11
|
-
For applicable concurrency and state changes, explain when the business constraint is checked, what enforces it and any remaining window. Keep that guarantee distinct from excluded product interactions; if the requirements leave its meaning unresolved,
|
|
11
|
+
For applicable concurrency and state changes, explain when the business constraint is checked, what enforces it and any remaining window. Keep that guarantee distinct from excluded product interactions; if the requirements leave its meaning unresolved, include the concrete question in the document with its impact, recommendation and the work that needs an answer. For example, a stock reservation may check and decrement within one transaction; an earlier availability display alone does not guarantee stock at commit.
|
|
12
12
|
|
|
13
13
|
For a material new database/RPC call on the critical path, describe its location, repeat calls within a request, timeout/failure behavior, cost basis and how feasibility will be checked. Distinguish observed facts, estimates and unknowns; verification should match the actual risk, without invented capacity targets.
|
|
14
14
|
|
|
@@ -32,4 +32,4 @@ Technical design does not require finished SQL before its review. After its appr
|
|
|
32
32
|
|
|
33
33
|
## Human document review
|
|
34
34
|
|
|
35
|
-
Apply [document review](../document-review.md): generate → self-check → present the concrete document entry, current review status and focus → wait. Record explicit user approval of this version/content, then follow the core session interaction: stop at this stage boundary
|
|
35
|
+
Apply [document review](../document-review.md): generate → self-check → present the concrete document entry, current review status and focus → wait. Record explicit user approval of this version/content, then follow the core session interaction: stop at this stage boundary; suggest a new session only at a major work boundary, and continue here when requested. Approval and continuation may be expressed together. Questions or edit requests retain the stop; edits require self-check and re-review. Production `done` is separate from approval and final acceptance.
|
|
@@ -24,4 +24,4 @@ Use testing.md. Preserve the ordinary template headings and section order. Follo
|
|
|
24
24
|
|
|
25
25
|
## Human document review
|
|
26
26
|
|
|
27
|
-
Apply [document review](../document-review.md): generate → self-check → present the concrete document entry, current review status and focus → wait. Record explicit user approval of this version/content, then follow the core session interaction: stop at this stage boundary
|
|
27
|
+
Apply [document review](../document-review.md): generate → self-check → present the concrete document entry, current review status and focus → wait. Record explicit user approval of this version/content, then follow the core session interaction: stop at this stage boundary; suggest a new session only at a major work boundary, and continue here when requested. Approval and continuation may be expressed together. Questions or edit requests retain the stop; edits require self-check and re-review. Production `done` is separate from approval and final acceptance.
|
|
@@ -28,6 +28,6 @@ Reasons, meaningful alternatives, compatibility and remaining risks. Keep busine
|
|
|
28
28
|
|
|
29
29
|
## Requirement coverage and questions
|
|
30
30
|
|
|
31
|
-
REQ/AC to module/operation/SQL section
|
|
31
|
+
REQ/AC to module/operation/SQL section. For unresolved business or technical questions, state the impact, recommendation and latest point needing an answer. Review these with the document; carry forward questions that do not affect the next work. Replace guidance with actual content; explain inapplicability, never prefill a result.
|
|
32
32
|
|
|
33
33
|
<!-- Review guidance: retain the fixed outline. Technical design precedes interface/SQL production; test cases precede planning. Self-check and explicit document approval are separate from stage done. For plan/testing, keep execution records after execution/runs respectively. -->
|