Skip to content

Commit ebeabb5

Browse files
committed
refactor(change-author): 收紧按 schema 模板的详细文档编写
1 parent 7f61a11 commit ebeabb5

10 files changed

Lines changed: 572 additions & 234 deletions

File tree

README.en.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Aisee makes that context explicit:
6969

7070
- clarify business requirements or establish an existing-system baseline before implementation;
7171
- separate setup, baseline migration, change planning, and detailed change authoring;
72-
- create and complete OpenSpec changes while working from the current project schema or official `spec-driven`;
72+
- create and complete OpenSpec changes while working from the schema bound to the current change;
7373
- keep OpenSpec as the only persistent specification source of truth;
7474
- expose durable project memory and team knowledge guardrails without replacing OpenSpec facts;
7575
- constrain document-local numbering through skills/templates to reduce invented or duplicated labels;
@@ -146,7 +146,7 @@ Legacy / transitional:
146146
- **Existing-project baseline migration**: `aisee:spec-migrate` derives current system behavior into OpenSpec baseline specs before brownfield enhancement work starts.
147147
- **Structured requirement clarification**: `aisee:srs` clarifies business needs through dialogue and produces the inputs needed for change planning.
148148
- **OpenSpec change planning**: `aisee:change-plan` maps confirmed inputs into independently deliverable OpenSpec changes.
149-
- **Detailed change authoring**: `aisee:change-author` strengthens OpenSpec change content so proposal, specs, design, and tasks are more actionable.
149+
- **Detailed change authoring**: `aisee:change-author` fills out a single OpenSpec change document set in detail from the current schema templates, then strengthens the result with clearer boundaries, risks, verification, and implementation sequencing.
150150
- **Project memory**: `aisee memory` retrieves and writes current-repository long-lived guidance without replacing OpenSpec facts.
151151
- **Team knowledge guardrails**: `aisee knowledge` retrieves a small number of reviewed engineering lessons through pack/card protocols without turning the knowledge repository into a second specification source.
152152
- **Controlled memory and knowledge retrieval**: `aisee memory` and `aisee knowledge` provide direct retrieval entrypoints without becoming workflow authority.
@@ -339,7 +339,7 @@ For existing projects or brownfield enhancement work, use `aisee:spec-migrate` t
339339
| `aisee:spec-migrate` | Build OpenSpec baseline specs for existing projects or brownfield enhancement work. |
340340
| `aisee:srs` | Clarify software requirements and produce the inputs needed for change planning. |
341341
| `aisee:change-plan` | Plan independent OpenSpec changes and prepare `/opsx:new` inputs. |
342-
| `aisee:change-author` | Strengthen the current OpenSpec change so proposal/specs/design/tasks are more actionable. |
342+
| `aisee:change-author` | Generate and refine a single change's documents from the current schema templates, then strengthen them with clearer boundaries, risks, verification, and implementation sequencing. |
343343
| `aisee:memory` | Guide project memory CLI inspect/search/add/update-index usage. |
344344
| `aisee:knowledge` | Guide team knowledge CLI initialization, configuration, sync, retrieval, and promote workflows. |
345345
| `aisee:knowledge-curate` | Batch-review project-local reusable knowledge candidates and produce card drafts for human submission to team knowledge. |

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Aisee 的目标是让这些上下文显式化:
6969

7070
- 在实现前澄清业务需求或补齐已有系统 baseline;
7171
- 把已有项目接入、baseline 迁移、change planning 和 change authoring 明确分层;
72-
- 创建和补齐 OpenSpec changes,并优先围绕项目当前 schema 或官方 `spec-driven` 工作;
72+
- 创建和补齐 OpenSpec changes,并按当前 change 绑定的 schema 工作;
7373
- 保持 OpenSpec 作为唯一持久规范事实源;
7474
- 用 skill/template 约束文档内编号,减少临时发明和重复命名;
7575
- 检查 artifacts、tasks、source-map、测试和 review evidence 是否闭环。
@@ -145,7 +145,7 @@ legacy / transitional:
145145
- **已有项目 baseline 迁移**`aisee:spec-migrate` 反向整理现有系统当前行为,帮助已有项目先建立 OpenSpec baseline specs。
146146
- **结构化需求澄清**`aisee:srs` 通过对话澄清业务需求,并生成 change planning 所需需求输入。
147147
- **OpenSpec change planning**`aisee:change-plan` 将已确认输入映射为可独立交付的 OpenSpec changes。
148-
- **Detailed change authoring**`aisee:change-author` 细化 OpenSpec change 内容,强化 proposal、specs、design、tasks 的可实现性
148+
- **Detailed change authoring**`aisee:change-author` 按当前 schema 的模板详细补齐单个 OpenSpec change 文档,并在模板基础上补强边界、风险、验证和实施顺序
149149
- **项目记忆**`aisee memory` 受控检索和写入当前仓库长期 guidance,不替代 OpenSpec 事实源。
150150
- **团队知识 Guardrails**`aisee knowledge` 基于 pack/card 协议按需检索少量已审查工程经验,不把知识库变成第二份规范事实源。
151151
- **受控记忆与知识检索**`aisee memory``aisee knowledge` 直接提供项目记忆和团队 guardrails 查询,不升级为 workflow authority。
@@ -338,7 +338,7 @@ quick-fix / quick-research / 其它轻量 schema
338338
| `aisee:spec-migrate` | 为已有项目或二开场景整理 OpenSpec baseline specs。 |
339339
| `aisee:srs` | 澄清软件需求并生成 change planning 所需需求输入。 |
340340
| `aisee:change-plan` | 规划独立 OpenSpec changes,并为 `/opsx:new` 提供范围和 schema 建议。 |
341-
| `aisee:change-author` | 细化当前 OpenSpec change 内容,强化 proposal/specs/design/tasks 的可实现性。 |
341+
| `aisee:change-author` | 按当前 schema 的模板详细生成和补全单个 change 文档,并在模板基础上补强边界、风险、验证和实施顺序。 |
342342
| `aisee:memory` | 引导项目记忆 CLI 的 inspect/search/add/update-index 使用。 |
343343
| `aisee:knowledge` | 引导团队知识 CLI 的初始化、配置、同步、检索和 promote 流程。 |
344344
| `aisee:knowledge-curate` | 批量审查项目内 reusable knowledge candidates,产出可人工提交到 team knowledge 的 card drafts。 |

docs/architecture/aisee-harness-design.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,15 @@ Skill eval 文件应使用下面的结构,同时保留 `prompt` 和 `expected_
109109
"fact_source_constraints": [
110110
"避免平行事实源或不受支持来源的规则。"
111111
],
112+
"template_checks": [
113+
"输出必须遵循当前 schema 模板和 instruction,而不是自创文档结构。"
114+
],
115+
"strengthening_checks": [
116+
"在模板骨架基础上补强必要的边界、风险、验证或实施细节。"
117+
],
118+
"consistency_checks": [
119+
"多个文档或多个章节之间的术语、范围和验证口径必须一致。"
120+
],
112121
"files": []
113122
}
114123
]
@@ -124,6 +133,9 @@ Skill eval 文件应使用下面的结构,同时保留 `prompt` 和 `expected_
124133
- 当场景包含范围、业务规则、架构、平台、证据或迁移决策缺口时,必须填写 `must_ask`
125134
- `must_not` 必须覆盖该 skill 最容易越界的 artifact 或行为。
126135
- `fact_source_constraints` 应在相关场景中说明 OpenSpec、Aisee docs、ID registry、source-map 或 CLI JSON 的边界。
136+
- `template_checks` 是可选字段,用于检查输出是否真正以 schema 模板 / instruction 为基础,而不是绕开模板重新组织。
137+
- `strengthening_checks` 是可选字段,用于检查 skill 是否在模板基础上补强了必要信息,而不是机械填空。
138+
- `consistency_checks` 是可选字段,用于检查多文档或多章节之间是否保持一致。
127139

128140
## Runner 策略
129141

@@ -138,7 +150,7 @@ Skill eval 文件应使用下面的结构,同时保留 `prompt` 和 `expected_
138150
后续可选:
139151

140152
1. 增加小型 eval linter,检查必填字段和稳定 ID。
141-
2. 可选增加模型评分,检查 `expected_outputs``must_include``must_not`
153+
2. 可选增加模型评分,检查 `expected_outputs``must_include``must_not`,以及存在时的 `template_checks``strengthening_checks``consistency_checks`
142154
3. 模型评分只作为审查建议,不能写项目事实,也不能批准 archive。
143155

144156
## 归属
@@ -147,4 +159,3 @@ Skill eval 文件应使用下面的结构,同时保留 `prompt` 和 `expected_
147159
- Skill eval harness:`skills/<skill>/evals/`
148160
- Workflow scenario harness:未来的 `tests/fixtures/projects/`
149161
- Harness 设计:本文档。
150-

docs/workflow.en.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Artifact roles:
6868
| --- | --- | --- |
6969
| SRS | Clarifies business goals, scope, functional requirements, non-functional requirements, and acceptance criteria | Does not write implementation tasks |
7070
| Change Plan | Maps confirmed inputs into one or more OpenSpec changes | Does not write change artifact bodies directly |
71-
| Change Author | Strengthens the current change's `proposal`, `specs`, `design`, and `tasks` | Does not write implementation code |
71+
| Change Author | Fills out the current change's schema-defined documents in detail and strengthens them with clearer boundaries, risks, verification, and implementation sequencing | Does not write implementation code |
7272

7373
These documents are planning docs for the current version or iteration. They are planning inputs, not OpenSpec baseline facts.
7474

@@ -95,24 +95,27 @@ Splitting rules:
9595

9696
## 3. Change Creation And Authoring
9797

98-
After creating a change, use `aisee:change-author` to complete artifacts according to the schema artifact DAG.
98+
After creating a change, use `aisee:change-author` to fill out the current schema's documents in detail. Preserve the template structure first, then strengthen the parts most likely to cause implementation, review, or verification mistakes.
9999

100100
Typical commands:
101101

102102
```bash
103103
/opsx:new "<change>" --schema <project-schema-or-spec-driven>
104104
openspec validate <change>
105105
```
106-
service-contract.md # as needed
107-
data-model.md # as needed
108-
```
109106

110-
`source-map.md` decides whether as-needed artifacts are required:
107+
Common as-needed document examples:
108+
109+
- `service-contract.md`
110+
- `data-model.md`
111+
112+
Current rules:
111113

112-
- Required=yes: expand the artifact.
113-
- Required=no: provide a concrete N/A reason.
114-
- Do not generate unrelated contracts for completeness.
115-
- Use `Ref` / `Refs` for source references in upstream tables; use document-local numbers for new objects created inside the current change.
114+
- Only write documents declared by the current schema; do not invent undeclared files.
115+
- Templates are the starting skeleton, not the completion condition; each document should strengthen the needed boundaries, exceptions, risks, verification details, or implementation handoff.
116+
- Required=yes documents must be expanded; Required=no documents must provide a concrete N/A reason.
117+
- Do not generate unrelated contracts or helper docs for completeness.
118+
- If a schema still declares `source-map.md`, treat it as an ordinary schema document and fill it according to its template; do not make it the center of the whole authoring phase.
116119

117120
## 4. Implementation Handoff
118121

@@ -156,8 +159,8 @@ Read-only Aisee reviewer lens timing:
156159
| Reviewer | When to trigger | Purpose |
157160
| --- | --- | --- |
158161
| `aisee-change-architect` | After `aisee:change-plan` and before `aisee:change-author` when the change has complex boundaries, cross-module or cross-schema impact, unclear dependencies, or uncertain granularity | Review change boundaries, dependencies, granularity, and independent deliverability |
159-
| `aisee-spec-reviewer` | After `aisee:change-author` and before implementation | Review whether artifacts, contracts, source-map, and tasks are complete, consistent, and verifiable |
160-
| `aisee-implementation-reviewer` | After `ce-work` | Compare implementation, tasks, specs/source-map, and evidence for drift |
162+
| `aisee-spec-reviewer` | After `aisee:change-author` and before implementation | Review whether the current schema documents, N/A reasons, tasks, and verification posture are complete, consistent, and verifiable |
163+
| `aisee-implementation-reviewer` | After `ce-work` | Compare implementation, the current schema documents, tasks, and evidence for drift |
161164

162165
These reviewers only return structured review conclusions. They do not edit code, run tests, submit PRs, or replace `ce-doc-review`, `ce-code-review`, `ce-test-*`, or `ce-work`. Interface, UI, hardware, firmware, security, and verification differences should remain schema-aware check lenses rather than new all-purpose agents.
163166

docs/workflow.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ aisee:srs
6767
| --- | --- | --- |
6868
| SRS | 澄清业务目标、范围、功能需求、非功能需求和验收标准 | 不写实现任务 |
6969
| Change Plan | 把已确认输入映射为一个或多个 OpenSpec changes | 不直接写 change artifact 正文 |
70-
| Change Author | 细化当前 change 的 `proposal``specs``design``tasks` 等内容 | 不写实现代码 |
70+
| Change Author | 按当前 schema 模板详细补齐当前 change 的各项文档,并在模板基础上补强边界、风险、验证和实施顺序 | 不写实现代码 |
7171

7272
这些前置文档是当前版本 / 迭代的 planning docs,是 change planning 的输入,不是 OpenSpec baseline。
7373

@@ -94,24 +94,27 @@ aisee:change-plan
9494

9595
## 3. Change 创建与 Authoring
9696

97-
创建 change 后,用 `aisee:change-author` schema artifact DAG 补齐文档
97+
创建 change 后,用 `aisee:change-author` 按当前 schema 模板详细补齐文档。先保留模板结构,再补强当前 change 最容易导致实现、评审或验证出错的信息
9898

9999
典型命令:
100100

101101
```bash
102102
/opsx:new "<change>" --schema <project-schema-or-spec-driven>
103103
openspec validate <change>
104104
```
105-
service-contract.md # 按需
106-
data-model.md # 按需
107-
```
108105

109-
`source-map.md` 决定按需 artifacts 是否 Required:
106+
常见的按需文档示例:
107+
108+
- `service-contract.md`
109+
- `data-model.md`
110+
111+
当前规则:
110112

111-
- Required=yes:必须展开对应 artifact。
112-
- Required=no:必须写清楚 N/A 原因。
113-
- 不要为了“完整”强行生成与当前 change 无关的 contract。
114-
- Upstream Sources / Trace 表记录来源 `Ref` / `Refs`;当前 change 内新对象使用文档内编号。
113+
- 只写当前 schema 声明的文档,不补未声明文件。
114+
- 模板是基础骨架,不是完成条件;每个文档都应补强边界、例外、风险、验证或实施衔接中的必要内容。
115+
- Required=yes 的文档必须展开;Required=no 的文档必须写清楚 N/A 原因。
116+
- 不要为了“完整”强行生成与当前 change 无关的 contract 或辅助文档。
117+
- 如果某个 schema 仍声明 `source-map.md`,把它当成该 schema 的普通文档按模板补齐,不把它当成整个 authoring 阶段的中心。
115118

116119
## 4. 实现交接
117120

@@ -155,8 +158,8 @@ Knowledge matches 只作为提醒,不改变当前 change 的规范事实源,
155158
| Reviewer | 触发时机 | 用途 |
156159
| --- | --- | --- |
157160
| `aisee-change-architect` | `aisee:change-plan` 后、`aisee:change-author` 前按需触发;仅用于边界复杂、跨模块、跨 schema、依赖不清或粒度不确定的 change | 审查 change 边界、依赖、粒度和可独立交付性 |
158-
| `aisee-spec-reviewer` | `aisee:change-author` 后、进入实现前建议触发 | 审查 artifacts、contracts、source-map、tasks 是否完整、一致、可验证 |
159-
| `aisee-implementation-reviewer` | `ce-work` 完成后建议触发 | 比对实现、tasks、spec/source-map 和 evidence 是否一致 |
161+
| `aisee-spec-reviewer` | `aisee:change-author` 后、进入实现前建议触发 | 审查当前 schema 文档、N/A 理由、tasks 和验证口径是否完整、一致、可验证 |
162+
| `aisee-implementation-reviewer` | `ce-work` 完成后建议触发 | 比对实现、当前 schema 文档、tasks 和 evidence 是否一致 |
160163

161164
这些 reviewer 只输出结构化审查结论,不改代码、不跑测试、不提交 PR,也不替代 `ce-doc-review``ce-code-review``ce-test-*``ce-work`。接口、UI、硬件、固件、安全和验证差异应作为 schema-aware check lenses,而不是新增独立全能 agent。
162165

0 commit comments

Comments
 (0)