@aipper/aiws-spec 0.0.41 → 0.0.42
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 +1 -1
- package/docs/cli-interface.md +26 -0
- package/docs/ws-goal-contract.md +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ npx @aipper/aiws init .
|
|
|
13
13
|
- `docs/spec-contract.md`:模板契约(required/optional、managed markers、tool matrix、`.aiws/manifest.json` 约定)
|
|
14
14
|
- `docs/cli-interface.md`:CLI 行为语义(定义为主)
|
|
15
15
|
- `docs/aiws-governance-positioning.md`:`aiws` 作为工作流治理内核的定位、分层与边界
|
|
16
|
-
- `docs/aiws-bootstrap-routing-design.md`:bootstrap/router
|
|
16
|
+
- `docs/aiws-bootstrap-routing-design.md`:bootstrap/router 与目录对齐设计
|
|
17
17
|
- `docs/superpowers-collaboration-adoption.md`:吸收 `superpowers` 与协同模式的范围、非目标与分阶段路线
|
|
18
18
|
- `docs/workflow-stage-contracts.md`:核心 `ws-*` workflow 的人类可读阶段契约说明(由 JSON 真值生成)
|
|
19
19
|
- `docs/workflow-stage-contracts.json`:dashboard / API 共用的机器可读阶段契约真值
|
package/docs/cli-interface.md
CHANGED
|
@@ -359,6 +359,32 @@ Dashboard API(本地只读):
|
|
|
359
359
|
- `aiws change templates which`
|
|
360
360
|
- `aiws change templates init`
|
|
361
361
|
|
|
362
|
+
## `aiws retro-require`
|
|
363
|
+
|
|
364
|
+
语义:
|
|
365
|
+
- 对已有老项目(尚无 `REQUIREMENTS.md` 的仓库)做逆向需求分析,生成一份结构化的 `REQUIREMENTS.md` 草案。
|
|
366
|
+
- 扫描策略(纯文件系统 + 轻量静态分析,无外部依赖):
|
|
367
|
+
- **元数据** — 读取 `package.json` 等项目元信息 → 项目名、语言、框架
|
|
368
|
+
- **模块发现** — 扫描 `src/`、`app/` 等顶层目录 → 模块树
|
|
369
|
+
- **源码模式** — 正则匹配路由注册(`app.get(`、`router.post(`、`@Get`、`@Post` 等)、数据模型(`interface`、`class.*Model`、`@Entity`)、配置文件
|
|
370
|
+
- **合成** — 输出分析报告 + `REQUIREMENTS.md` 草案
|
|
371
|
+
- 输出分两阶段:
|
|
372
|
+
- `--analyze-only`:只输出分析报告(`.aiws/tmp/retro-require/analysis-report.md` + `scan-summary.json`),不生成 `REQUIREMENTS.md`
|
|
373
|
+
- 默认模式:同时生成 `REQUIREMENTS.md` 草案
|
|
374
|
+
- 交互确认:默认提示 `Save to ./REQUIREMENTS.md? [y/N]`;`--yes` 跳过
|
|
375
|
+
- `--output <path>`:将生成的 `REQUIREMENTS.md` 写入指定路径(而非项目根目录)
|
|
376
|
+
- 预先检查:若目标路径已存在 `REQUIREMENTS.md`,报错退出(除非使用 `--yes`)
|
|
377
|
+
- 生成的 `REQUIREMENTS.md` 保留模板的 `AIWS_MANAGED_BEGIN/END` 托管块,只填充 `需求概述`/`接口需求`/`验收标准` 章节;`业务链路`/`接口清单真值`/`变更记录` 留空待人工编辑
|
|
378
|
+
- 扫描范围限制:自动跳过 `node_modules/`、`.git/`、`dist/`、`build/`、`.aiws/`、`.agentdocs/`;最多扫描 500 个源文件
|
|
379
|
+
- 临时产物写入 `.aiws/tmp/retro-require/`(已在 `.gitignore` 中忽略)
|
|
380
|
+
|
|
381
|
+
接口(仅定义):
|
|
382
|
+
- `aiws retro-require [path] [--output <path>] [--yes] [--analyze-only]`
|
|
383
|
+
|
|
384
|
+
退出码:
|
|
385
|
+
- `0`:成功
|
|
386
|
+
- `2`:校验失败(如目标路径已有 `REQUIREMENTS.md` 但未使用 `--yes`)
|
|
387
|
+
|
|
362
388
|
## `aiws metrics`
|
|
363
389
|
|
|
364
390
|
语义:
|
package/docs/ws-goal-contract.md
CHANGED
|
@@ -738,7 +738,7 @@ Phase-Level Pipeline Dispatch 的审计分散在各 phase 的门禁验证中,
|
|
|
738
738
|
|
|
739
739
|
### 7.1 Motivation & Gap Analysis
|
|
740
740
|
|
|
741
|
-
Codex /goal
|
|
741
|
+
一些系统(如 Codex /goal)使用 machine state table(pursuing/paused/achieved/budget_limited)作为持久化状态源,独立于人类可读的格式展示。状态由 runtime 自动管理,session 重启时恢复 thread-level 状态,无需用户额外操作。
|
|
742
742
|
|
|
743
743
|
ws-goal 当前仅依赖 `.md` YAML frontmatter 中的 `ws_goal.state` 字段管理状态。这导致两个问题:
|
|
744
744
|
1. **Session 重启后 frontmatter 可能不被正确读取**:AI agent 的上下文窗口在重启后丢失,依赖人类可读文件恢复状态不可靠。
|