@archsight/aios 1.3.2 → 1.4.0
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/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +23 -0
- package/README.md +38 -0
- package/RELEASE_NOTES.md +31 -0
- package/bin/archsight-aios.mjs +253 -8
- package/delivery/README.md +1 -0
- package/delivery/v1.4.0-release-readiness.md +64 -0
- package/docs/quickstart.md +8 -0
- package/docs/v1.4.0-writing-boundary.md +42 -0
- package/docs/v1.4.0-writing-workflow-quickstart.md +83 -0
- package/gemini-extension.json +1 -1
- package/package.json +5 -1
- package/prompts/README.md +3 -0
- package/prompts/evaluation-policy.md +33 -0
- package/prompts/evaluations/engineering-document-writing-fixtures.json +129 -0
- package/prompts/evaluations/engineering-document-writing-scorecard.json +108 -0
- package/prompts/evaluations/skill-runtime/README.md +15 -0
- package/prompts/evaluations/skill-runtime/raw/codex-scheme-writing-sample.md +111 -0
- package/prompts/evaluations/skill-runtime/raw/codex-tender-writing-sample.md +108 -0
- package/prompts/evaluations/skill-runtime/raw/workbuddy-scheme-writing-sample.md +228 -0
- package/prompts/evaluations/skill-runtime/raw/workbuddy-tender-writing-sample.md +143 -0
- package/prompts/evaluations/skill-runtime/v1.4.0-writing-host-scorecard-review.md +29 -0
- package/prompts/evaluations/skill-runtime/v1.4.0-writing-host-validation.json +112 -0
- package/prompts/evaluations/skill-runtime/v1.4.0-writing-host-validation.md +43 -0
- package/prompts/prompt-registry.md +2 -0
- package/runtime/archsight-aios.manifest.json +70 -8
- package/runtime/skill-routing.md +4 -1
- package/scripts/build-prompt-run-pack.mjs +27 -9
- package/scripts/validate-prompt-fixtures.mjs +31 -10
- package/scripts/validate-prompt-scorecard.mjs +22 -6
- package/scripts/validate-skill-runtime-evidence.mjs +125 -0
- package/skills/README.md +5 -1
- package/skills/aios/SKILL.md +5 -2
- package/skills/aios-scheme-write/SKILL.md +132 -0
- package/skills/aios-scheme-write/agents/openai.yaml +4 -0
- package/skills/aios-scheme-write/prompts/basic-prompt.md +83 -0
- package/skills/aios-tender-write/SKILL.md +130 -0
- package/skills/aios-tender-write/agents/openai.yaml +4 -0
- package/skills/aios-tender-write/prompts/basic-prompt.md +82 -0
- package/skills/archsight-aios/SKILL.md +2 -0
- package/templates/README.md +35 -0
- package/templates/document-writing/draft.md +15 -0
- package/templates/document-writing/final.md +16 -0
- package/templates/document-writing/material-index.md +18 -0
- package/templates/document-writing/review-notes.md +18 -0
- package/templates/document-writing/source-normalized.md +20 -0
- package/templates/document-writing/writing-brief.md +23 -0
- package/templates/document-writing-samples/scheme/README.md +16 -0
- package/templates/document-writing-samples/scheme/draft.md +25 -0
- package/templates/document-writing-samples/scheme/final.md +20 -0
- package/templates/document-writing-samples/scheme/material-index.md +23 -0
- package/templates/document-writing-samples/scheme/review-notes.md +23 -0
- package/templates/document-writing-samples/scheme/source-normalized.md +35 -0
- package/templates/document-writing-samples/scheme/writing-brief.md +26 -0
- package/templates/document-writing-samples/tender/README.md +16 -0
- package/templates/document-writing-samples/tender/draft.md +27 -0
- package/templates/document-writing-samples/tender/final.md +20 -0
- package/templates/document-writing-samples/tender/material-index.md +23 -0
- package/templates/document-writing-samples/tender/review-notes.md +23 -0
- package/templates/document-writing-samples/tender/source-normalized.md +34 -0
- package/templates/document-writing-samples/tender/writing-brief.md +26 -0
- package/templates/project-ai/.ai/agent-routing.md +6 -2
- package/templates/project-ai/.ai/skills.md +6 -1
- package/vision/README.md +1 -0
- package/vision/roadmap.md +8 -0
- package/vision/v1.4.0-engineering-document-workflow.md +205 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "archsight-aios",
|
|
3
3
|
"displayName": "ArchSight AIOS",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.4.0",
|
|
5
5
|
"description": "面向建筑行业知识工作从业者与 AI 研发团队的 Skills、Workflow 与多 Agent 工具包 / Building-industry AI agent skills for BIM, IFC, RAG, GraphRAG, project evidence work, code review, and runtime governance.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "ArchSightLabs",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# 变更记录
|
|
2
2
|
|
|
3
|
+
## 1.4.0
|
|
4
|
+
|
|
5
|
+
### 新增
|
|
6
|
+
|
|
7
|
+
- 新增 `aios-tender-write` 写作型 Skill,用于工程标书、技术标、投标响应章节生成 / 改写和历史标书素材复用;生成后必须交回 `aios-commercial-tender` 做响应性、废标风险、评分点缺口和人工复核门禁。
|
|
8
|
+
- 新增 `aios-scheme-write` 写作型 Skill,用于专项施工方案、施工技术措施和交底材料生成 / 改写和历史方案素材复用;生成后必须交回 `aios-construction-scheme` 做危险源、规范 / 计算书、专家意见和交底要点门禁。
|
|
9
|
+
- 新增 `templates/document-writing/` Markdown 工作母版,覆盖 `source-normalized.md`、`material-index.md`、`writing-brief.md`、`draft.md`、`review-notes.md` 和 `final.md`。
|
|
10
|
+
- 新增 `archsight-aios writing:init`,可在业务项目中一键创建标书 / 方案写作工作台;默认不覆盖已有工作文件。
|
|
11
|
+
- 新增 `archsight-aios writing:validate`,用于检查写作工作台的文件链、来源、历史素材复用、待补占位、审核门禁和人工定稿边界。
|
|
12
|
+
- `writing:init` 支持 `--sample`,可生成技术标和专项施工方案的端到端脱敏样板工作台。
|
|
13
|
+
- 新增 `prompts/evaluations/engineering-document-writing-fixtures.json` 及 `validate:document-writing-run-pack` / `build:document-writing-run-pack`,用于验证写作型 Skill 的脱敏 weak/basic 对照输入。
|
|
14
|
+
- 新增 `engineering-document-writing-scorecard.json`,固定来源链、素材复用、初稿可操作性、边界安全、审核门禁和交接可读性评分维度。
|
|
15
|
+
- 新增 `prompts/evaluations/skill-runtime/` 归档规范和 `validate:skill-runtime-evidence`,用于区分真实 Skill 触发、blocked 状态和 prompt paste 结果。
|
|
16
|
+
- 新增 Codex / WorkBuddy 写作型 Skill raw output 归档和 scorecard 复核记录,覆盖 `aios-tender-write` / `aios-scheme-write` 四个宿主样板 case。
|
|
17
|
+
- 新增 WorkBuddy-first 写作工作流快速使用说明、写作能力边界和 v1.4.0 release readiness 清单。
|
|
18
|
+
|
|
19
|
+
### 调整
|
|
20
|
+
|
|
21
|
+
- `aios` / `archsight-aios` 总入口、CLI 自动识别、manifest、Skill 路由和项目接入模板补充写作型 Skill。
|
|
22
|
+
- CLI Skill 自动识别改为对更具体的写作短语加权,减少“技术标生成 / 施工方案生成”误落到审核型 Skill 的概率。
|
|
23
|
+
- v1.4.0 发布门槛明确:Codex / WorkBuddy 写作型 Skill raw output 与 scorecard 复核已具备;版本号已同步,正式发布仍需 tag、push 和 GitHub Release。
|
|
24
|
+
- v1.4.0 路线图明确“工程文档生成、改写与复核闭环”:Markdown 是工作母版,Word / PDF / PPT 是交付格式;现有审核型 Skill 继续作为质量门禁。
|
|
25
|
+
|
|
3
26
|
## 1.3.2
|
|
4
27
|
|
|
5
28
|
### 发布说明
|
package/README.md
CHANGED
|
@@ -109,6 +109,8 @@ AIOS 的多 Agent 协作不应停留在 Prompt 角色扮演。Agent 提出架构
|
|
|
109
109
|
| `install` | 安装 ArchSight AIOS 用户级资产到 Codex、Claude Code、OpenCode、Antigravity 2.0、Gemini、WorkBuddy 和共享目录。 |
|
|
110
110
|
| `doctor` | 检查仓库资产、manifest、用户级安装、Skill 和 Workflow 是否一致。 |
|
|
111
111
|
| `init` | 给具体业务项目接入 AI 规则、`.ai/` 治理目录、自动 profile 识别和项目上下文草稿。 |
|
|
112
|
+
| `writing:init` | 在业务项目中创建标书 / 方案写作 Markdown 工作台,用于写作型 Skill 生成和审核门禁交接。 |
|
|
113
|
+
| `writing:validate` | 检查写作工作台的文件链、来源、复用、待补、审核门禁和人工定稿边界。 |
|
|
112
114
|
| `validate` | 验证项目接入模板能否生成并引用当前登记的 Skills / Workflows。 |
|
|
113
115
|
| `validate:skills` | 校验公共 skill 发现入口、frontmatter、跨 host manifest 和 npm metadata 是否一致。 |
|
|
114
116
|
| `capability:call` | 按 Capability Registry 权限边界调用本地 MCP Adapter,并输出 Tool Result 与仲裁 Decision。 |
|
|
@@ -123,6 +125,40 @@ npx @archsight/aios capability:call --capability solver.beam_deflection_servicea
|
|
|
123
125
|
|
|
124
126
|
如果 `archsight-aios` 和 `archsight-solver` 是同级目录,CLI 会默认尝试使用相邻的 `../archsight-solver`,通常无需设置 `ARCHSIGHT_SOLVER_HOME`。
|
|
125
127
|
|
|
128
|
+
## 工程文档写作工作台
|
|
129
|
+
|
|
130
|
+
v1.4.0 开始,AIOS 提供写作型 Skill 和 Markdown 工作母版,用于标书、技术标、专项施工方案和交底材料的生成 / 改写。Markdown 是 AIOS 工作母版,Word / PDF / PPT 只作为后续交付格式。
|
|
131
|
+
|
|
132
|
+
在项目目录创建工作台:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
npx @archsight/aios writing:init --type tender
|
|
136
|
+
npx @archsight/aios writing:init --type scheme --name scheme-workbench
|
|
137
|
+
npx @archsight/aios writing:init --type tender --sample --name tender-sample
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
生成目录默认包含:
|
|
141
|
+
|
|
142
|
+
- `source-normalized.md`:归一化输入资料和来源链。
|
|
143
|
+
- `material-index.md`:历史素材、复用级别和不可套用原因。
|
|
144
|
+
- `writing-brief.md`:写作任务、目标章节、禁止结论和人工复核岗位。
|
|
145
|
+
- `draft.md`:AI 生成或改写的章节草稿。
|
|
146
|
+
- `review-notes.md`:交给审核 Skill 后的复核记录。
|
|
147
|
+
- `final.md`:人工确认后的最终 Markdown 母版。
|
|
148
|
+
|
|
149
|
+
检查工作台完整性:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
npx @archsight/aios writing:validate --name document-writing
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
推荐路由:
|
|
156
|
+
|
|
157
|
+
- 标书 / 技术标写作:先用 `aios-tender-write`,再交给 `aios-commercial-tender` 审核门禁。
|
|
158
|
+
- 专项施工方案写作:先用 `aios-scheme-write`,再交给 `aios-construction-scheme` 审核门禁。
|
|
159
|
+
|
|
160
|
+
`writing:init` 只创建缺失文件,重复执行不会覆盖已有工作台内容。
|
|
161
|
+
|
|
126
162
|
## 安装位置
|
|
127
163
|
|
|
128
164
|
`install --target all --scope user` 会写入当前用户目录:
|
|
@@ -223,6 +259,8 @@ npm test
|
|
|
223
259
|
- [Templates](templates/README.md)
|
|
224
260
|
- [Runtime 路由](runtime/agent-routing.md)
|
|
225
261
|
- [WorkBuddy 适配说明](adapters/workbuddy/README.md)
|
|
262
|
+
- [v1.4.0 写作工作流快速使用](docs/v1.4.0-writing-workflow-quickstart.md)
|
|
263
|
+
- [v1.4.0 写作能力边界](docs/v1.4.0-writing-boundary.md)
|
|
226
264
|
- [公共发现与上架清单](docs/PUBLIC_DISCOVERY.md)
|
|
227
265
|
|
|
228
266
|
## 开源协作
|
package/RELEASE_NOTES.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# Release Notes
|
|
2
2
|
|
|
3
|
+
## 1.4.0
|
|
4
|
+
|
|
5
|
+
本版本主线是把 AIOS 从“审核型 Skill”推进到“工程文档生成、改写与复核闭环”。新增写作型 Skill 负责初稿生成、历史素材复用和 Markdown 工作母版;现有审核型 Skill 继续负责响应性、证据链、风险和人工复核门禁。
|
|
6
|
+
|
|
7
|
+
核心变化:
|
|
8
|
+
|
|
9
|
+
- 新增 `aios-tender-write`:基于招标文件、评分办法、企业历史标书素材、类似项目案例和用户初稿生成 / 改写技术标章节。
|
|
10
|
+
- 新增 `aios-scheme-write`:基于方案初稿、历史方案素材、工程概况、专家意见和用户模板生成 / 改写专项施工方案章节。
|
|
11
|
+
- 新增 `templates/document-writing/`:提供 `source-normalized.md`、`material-index.md`、`writing-brief.md`、`draft.md`、`review-notes.md` 和 `final.md` 工作母版。
|
|
12
|
+
- 新增 `archsight-aios writing:init`:在业务项目中创建标书 / 方案 Markdown 写作工作台,已有文件不覆盖。
|
|
13
|
+
- 新增 `archsight-aios writing:validate`:检查写作工作台结构和关键边界。
|
|
14
|
+
- `writing:init --sample` 可生成技术标 / 专项施工方案端到端脱敏样板。
|
|
15
|
+
- 新增写作型脱敏评测 fixture 和 run-pack 命令:`validate:document-writing-run-pack`、`build:document-writing-run-pack`。
|
|
16
|
+
- 新增写作型 scorecard 和 skill-runtime 证据归档校验:`validate:document-writing-scorecard`、`validate:skill-runtime-evidence`。
|
|
17
|
+
- 新增 Codex / WorkBuddy 写作型 Skill raw output 归档和 scorecard 复核记录,覆盖 `aios-tender-write` / `aios-scheme-write` 四个宿主样板 case。
|
|
18
|
+
- 新增 WorkBuddy-first 快速使用说明、写作能力边界和 v1.4.0 release readiness 清单。
|
|
19
|
+
- 写作型 Skill 必须保留资料来源、素材复用判断、待补占位、人工复核岗位和审核门禁,不得把历史项目事实直接套入当前项目。
|
|
20
|
+
- CLI 自动识别对更具体的生成 / 改写短语加权,降低写作请求误入审核型 Skill 的概率。
|
|
21
|
+
- 当前 skill-runtime 归档已记录 Codex / WorkBuddy 真实触发 raw output,并按写作型 scorecard 复核通过;版本号已同步到 `1.4.0`,正式发布仍需 tag、push 和 GitHub Release。
|
|
22
|
+
|
|
23
|
+
发布前验证建议:
|
|
24
|
+
|
|
25
|
+
- `npm run validate:skills`
|
|
26
|
+
- `npm run validate:prompts`
|
|
27
|
+
- `npm run validate:document-writing-run-pack`
|
|
28
|
+
- `npm run validate:document-writing-scorecard`
|
|
29
|
+
- `npm run validate:skill-runtime-evidence`
|
|
30
|
+
- `npm test`
|
|
31
|
+
- `git diff --check`
|
|
32
|
+
- `npm pack --dry-run`
|
|
33
|
+
|
|
3
34
|
## 1.3.2
|
|
4
35
|
|
|
5
36
|
本版本修复 v1.3.1 后在不同宿主中出现的 Skill 遵从度不一致问题。用户只说“用 AIOS 分析该文档”且没有要求摘要时,AIOS 默认应输出标准详版报告,而不是短摘要。
|
package/bin/archsight-aios.mjs
CHANGED
|
@@ -56,11 +56,13 @@ const skillAliases = {
|
|
|
56
56
|
],
|
|
57
57
|
"aios-exec": ["aios-controlled-execution", "archsight-controlled-execution"],
|
|
58
58
|
"aios-commercial-tender": ["aios-tender", "archsight-tender"],
|
|
59
|
+
"aios-tender-write": ["aios-bid-write", "archsight-bid-write", "aios-technical-bid-write"],
|
|
59
60
|
"aios-commercial-contract": ["aios-contract", "archsight-contract"],
|
|
60
61
|
"aios-commercial-variation": ["aios-variation", "archsight-variation"],
|
|
61
62
|
"aios-construction-daily": ["aios-daily", "archsight-daily"],
|
|
62
63
|
"aios-construction-meeting": ["aios-meeting", "archsight-meeting"],
|
|
63
|
-
"aios-construction-scheme": ["aios-scheme", "archsight-scheme"]
|
|
64
|
+
"aios-construction-scheme": ["aios-scheme", "archsight-scheme"],
|
|
65
|
+
"aios-scheme-write": ["aios-construction-scheme-write", "archsight-scheme-write"]
|
|
64
66
|
};
|
|
65
67
|
|
|
66
68
|
const profileDetectionRules = {
|
|
@@ -132,11 +134,13 @@ const skillDetectionRules = {
|
|
|
132
134
|
"aios-compare": ["aios-compare"],
|
|
133
135
|
"aios-prompt-compare": ["aios-prompt-compare"],
|
|
134
136
|
"aios-commercial-tender": ["招标", "投标", "技术标", "商务标", "评分", "废标", "招采", "资格"],
|
|
137
|
+
"aios-tender-write": ["标书编写", "技术标编写", "技术标生成", "技术标改写", "投标文件生成", "投标响应生成", "标书优化", "标书改写", "历史标书", "评分点响应"],
|
|
135
138
|
"aios-commercial-contract": ["合同", "协议", "付款", "履约", "违约", "分包", "采购", "结算条款"],
|
|
136
139
|
"aios-construction-daily": ["日报", "周报", "现场记录", "施工日志", "进度", "材料进场", "机械", "劳务"],
|
|
137
140
|
"aios-construction-meeting": ["会议纪要", "例会", "协调会", "专题会", "待办", "责任人"],
|
|
138
141
|
"aios-commercial-variation": ["变更", "签证", "联系单", "索赔", "洽商", "工程量"],
|
|
139
|
-
"aios-construction-scheme": ["施工方案", "专项方案", "危大", "交底", "危险源", "专家论证"]
|
|
142
|
+
"aios-construction-scheme": ["施工方案", "专项方案", "危大", "交底", "危险源", "专家论证"],
|
|
143
|
+
"aios-scheme-write": ["方案编写", "方案生成", "施工方案生成", "专项施工方案生成", "方案改写", "施工方案改写", "方案优化", "历史方案", "专家意见回写", "施工方案初稿"]
|
|
140
144
|
};
|
|
141
145
|
|
|
142
146
|
const ignoredDetectionDirs = new Set([
|
|
@@ -164,6 +168,8 @@ function usage() {
|
|
|
164
168
|
" archsight-aios install --target <codex|agents|gemini|antigravity|workbuddy|opencode|claude-code|all> --scope user",
|
|
165
169
|
" archsight-aios doctor",
|
|
166
170
|
" archsight-aios init [--cwd <path>] [--mode <auto|full|linked|ai-only>] [--profile <auto|none|all|name>]",
|
|
171
|
+
" archsight-aios writing:init [--cwd <path>] [--type <tender|scheme|general>] [--name <folder>] [--sample]",
|
|
172
|
+
" archsight-aios writing:validate [--cwd <path>] [--name <folder>]",
|
|
167
173
|
" archsight-aios validate [--cwd <path>] [--profile <auto|none|all|name>] [--temp]",
|
|
168
174
|
" archsight-aios capability:call --capability <id> --agent <id> --skill <id> --input <json-file>",
|
|
169
175
|
" archsight-aios hermes:validate",
|
|
@@ -175,6 +181,8 @@ function usage() {
|
|
|
175
181
|
" install Install AIOS assets into user-level assistant locations.",
|
|
176
182
|
" doctor Check repository assets and user-level installation.",
|
|
177
183
|
" init Add AI rules and .ai governance files to a project.",
|
|
184
|
+
" writing:init Create a Markdown document-writing workbench.",
|
|
185
|
+
" writing:validate Check a Markdown document-writing workbench.",
|
|
178
186
|
" validate Validate the project AI template output.",
|
|
179
187
|
" capability:call Authorize and call a registered local Capability adapter.",
|
|
180
188
|
" hermes:* Validate or dry-run Hermes runtime prompt sync.",
|
|
@@ -186,6 +194,9 @@ function usage() {
|
|
|
186
194
|
" npx @archsight/aios install --target opencode --scope user",
|
|
187
195
|
" npx @archsight/aios install --target claude-code --scope user",
|
|
188
196
|
" npx @archsight/aios init",
|
|
197
|
+
" npx @archsight/aios writing:init --type tender",
|
|
198
|
+
" npx @archsight/aios writing:init --type scheme --sample --name scheme-sample",
|
|
199
|
+
" npx @archsight/aios writing:validate --name document-writing",
|
|
189
200
|
" npx @archsight/aios validate --temp",
|
|
190
201
|
" npx @archsight/aios doctor"
|
|
191
202
|
].join("\n");
|
|
@@ -206,6 +217,9 @@ function parseArgs(argv) {
|
|
|
206
217
|
capability: undefined,
|
|
207
218
|
agent: undefined,
|
|
208
219
|
skill: undefined,
|
|
220
|
+
documentType: "general",
|
|
221
|
+
workspaceName: "document-writing",
|
|
222
|
+
sample: false,
|
|
209
223
|
input: undefined,
|
|
210
224
|
mcpCwd: undefined,
|
|
211
225
|
mcpCommand: undefined,
|
|
@@ -233,6 +247,12 @@ function parseArgs(argv) {
|
|
|
233
247
|
options.agent = rest[++i];
|
|
234
248
|
} else if (arg === "--skill") {
|
|
235
249
|
options.skill = rest[++i];
|
|
250
|
+
} else if (arg === "--type") {
|
|
251
|
+
options.documentType = rest[++i];
|
|
252
|
+
} else if (arg === "--name") {
|
|
253
|
+
options.workspaceName = rest[++i];
|
|
254
|
+
} else if (arg === "--sample") {
|
|
255
|
+
options.sample = true;
|
|
236
256
|
} else if (arg === "--input") {
|
|
237
257
|
options.input = path.resolve(rest[++i]);
|
|
238
258
|
} else if (arg === "--mcp-cwd") {
|
|
@@ -625,7 +645,7 @@ function callMcpStdio({ command, args, cwd, toolName, input, timeoutMs }) {
|
|
|
625
645
|
params: {
|
|
626
646
|
protocolVersion: "2025-06-18",
|
|
627
647
|
capabilities: {},
|
|
628
|
-
clientInfo: { name: "archsight-aios", version: "1.
|
|
648
|
+
clientInfo: { name: "archsight-aios", version: "1.4.0" }
|
|
629
649
|
}
|
|
630
650
|
};
|
|
631
651
|
const callTool = {
|
|
@@ -971,15 +991,32 @@ function confidenceFromScore(score) {
|
|
|
971
991
|
return "low";
|
|
972
992
|
}
|
|
973
993
|
|
|
974
|
-
function
|
|
994
|
+
function detectionKeywordWeight(keyword, weighted) {
|
|
995
|
+
if (!weighted) {
|
|
996
|
+
return 1;
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
const length = normalizeSignal(keyword).trim().length;
|
|
1000
|
+
if (length >= 8) {
|
|
1001
|
+
return 4;
|
|
1002
|
+
}
|
|
1003
|
+
if (length >= 5) {
|
|
1004
|
+
return 3;
|
|
1005
|
+
}
|
|
1006
|
+
return 1;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
function scoreDetectionRules(ruleMap, signalText, options = {}) {
|
|
975
1010
|
const normalized = normalizeSignal(signalText);
|
|
976
1011
|
return Object.entries(ruleMap)
|
|
977
1012
|
.map(([id, keywords]) => {
|
|
978
1013
|
const matches = keywords.filter((keyword) => normalized.includes(normalizeSignal(keyword)));
|
|
1014
|
+
const score = matches.reduce((sum, keyword) => sum + detectionKeywordWeight(keyword, options.weighted), 0);
|
|
979
1015
|
return {
|
|
980
1016
|
id,
|
|
981
|
-
score
|
|
982
|
-
|
|
1017
|
+
score,
|
|
1018
|
+
matchCount: matches.length,
|
|
1019
|
+
confidence: score > 0 ? confidenceFromScore(score) : "none",
|
|
983
1020
|
matches
|
|
984
1021
|
};
|
|
985
1022
|
})
|
|
@@ -1077,7 +1114,7 @@ async function collectProjectDiscovery(targetRoot) {
|
|
|
1077
1114
|
|
|
1078
1115
|
function detectProjectContext(manifest, discovery) {
|
|
1079
1116
|
const profileScores = scoreDetectionRules(profileDetectionRules, discovery.signalText);
|
|
1080
|
-
const skillScores = scoreDetectionRules(skillDetectionRules, discovery.signalText);
|
|
1117
|
+
const skillScores = scoreDetectionRules(skillDetectionRules, discovery.signalText, { weighted: true });
|
|
1081
1118
|
const profileDescriptions = new Map((manifest.projectProfiles ?? []).map((profile) => [profile.id, profile.description]));
|
|
1082
1119
|
const skillMetadata = new Map((manifest.skills ?? []).map((skill) => [skill.id, skill]));
|
|
1083
1120
|
|
|
@@ -1129,7 +1166,10 @@ function renderMatchList(scores, emptyText) {
|
|
|
1129
1166
|
|
|
1130
1167
|
return scores.map((item) => {
|
|
1131
1168
|
const matches = item.matches.slice(0, 8).join("、");
|
|
1132
|
-
|
|
1169
|
+
const scoreText = item.matchCount && item.matchCount !== item.score
|
|
1170
|
+
? `命中 ${item.matchCount} 项,权重 ${item.score}`
|
|
1171
|
+
: `命中 ${item.score} 项`;
|
|
1172
|
+
return `- \`${item.id}\`:${item.confidence},${scoreText}(${matches})`;
|
|
1133
1173
|
});
|
|
1134
1174
|
}
|
|
1135
1175
|
|
|
@@ -1755,6 +1795,207 @@ async function initProject(options) {
|
|
|
1755
1795
|
}
|
|
1756
1796
|
}
|
|
1757
1797
|
|
|
1798
|
+
function resolveDocumentWritingType(value) {
|
|
1799
|
+
const normalized = normalizeSignal(value ?? "general").replaceAll("_", "-");
|
|
1800
|
+
const aliases = new Map([
|
|
1801
|
+
["general", "general"],
|
|
1802
|
+
["all", "general"],
|
|
1803
|
+
["通用", "general"],
|
|
1804
|
+
["tender", "tender"],
|
|
1805
|
+
["bid", "tender"],
|
|
1806
|
+
["technical-bid", "tender"],
|
|
1807
|
+
["标书", "tender"],
|
|
1808
|
+
["技术标", "tender"],
|
|
1809
|
+
["投标", "tender"],
|
|
1810
|
+
["scheme", "scheme"],
|
|
1811
|
+
["construction-scheme", "scheme"],
|
|
1812
|
+
["方案", "scheme"],
|
|
1813
|
+
["施工方案", "scheme"],
|
|
1814
|
+
["专项施工方案", "scheme"]
|
|
1815
|
+
]);
|
|
1816
|
+
|
|
1817
|
+
const type = aliases.get(normalized);
|
|
1818
|
+
if (!type) {
|
|
1819
|
+
throw new Error(`Unsupported writing workspace type: ${value}`);
|
|
1820
|
+
}
|
|
1821
|
+
return type;
|
|
1822
|
+
}
|
|
1823
|
+
|
|
1824
|
+
function documentWritingTypeConfig(type) {
|
|
1825
|
+
const configs = {
|
|
1826
|
+
general: {
|
|
1827
|
+
label: "工程文档写作",
|
|
1828
|
+
skill: "aios-tender-write / aios-scheme-write",
|
|
1829
|
+
gate: "aios-commercial-tender / aios-construction-scheme",
|
|
1830
|
+
firstStep: "先在 writing-brief.md 明确是标书、技术标、专项施工方案还是交底材料。"
|
|
1831
|
+
},
|
|
1832
|
+
tender: {
|
|
1833
|
+
label: "标书 / 技术标写作",
|
|
1834
|
+
skill: "aios-tender-write",
|
|
1835
|
+
gate: "aios-commercial-tender",
|
|
1836
|
+
firstStep: "先把招标文件、评分办法、技术要求、用户初稿和历史标书索引写入工作母版。"
|
|
1837
|
+
},
|
|
1838
|
+
scheme: {
|
|
1839
|
+
label: "专项施工方案写作",
|
|
1840
|
+
skill: "aios-scheme-write",
|
|
1841
|
+
gate: "aios-construction-scheme",
|
|
1842
|
+
firstStep: "先把工程概况、方案初稿、历史方案、专家意见和计算书目录写入工作母版。"
|
|
1843
|
+
}
|
|
1844
|
+
};
|
|
1845
|
+
return configs[type];
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
function renderDocumentWritingReadme(type) {
|
|
1849
|
+
const config = documentWritingTypeConfig(type);
|
|
1850
|
+
return [
|
|
1851
|
+
"# AIOS Document Writing Workbench",
|
|
1852
|
+
"",
|
|
1853
|
+
`> 类型:${config.label}`,
|
|
1854
|
+
"",
|
|
1855
|
+
"## 使用顺序",
|
|
1856
|
+
"",
|
|
1857
|
+
"1. 在 `source-normalized.md` 中归一化输入资料,只写来源明确的事实。",
|
|
1858
|
+
"2. 在 `material-index.md` 中登记历史素材、复用级别和不可复用原因。",
|
|
1859
|
+
"3. 在 `writing-brief.md` 中明确写作任务、目标章节、人工复核岗位和禁止结论。",
|
|
1860
|
+
"4. 使用对应写作 Skill 生成或改写 `draft.md`。",
|
|
1861
|
+
"5. 把草稿交给审核门禁 Skill,审核结论写入 `review-notes.md`。",
|
|
1862
|
+
"6. 人工确认后再整理 `final.md`,Word / PDF / PPT 只作为交付格式。",
|
|
1863
|
+
"",
|
|
1864
|
+
"## 推荐 Skill",
|
|
1865
|
+
"",
|
|
1866
|
+
`- 写作入口:\`${config.skill}\``,
|
|
1867
|
+
`- 审核门禁:\`${config.gate}\``,
|
|
1868
|
+
"",
|
|
1869
|
+
"## 首步动作",
|
|
1870
|
+
"",
|
|
1871
|
+
config.firstStep,
|
|
1872
|
+
"",
|
|
1873
|
+
"## 边界",
|
|
1874
|
+
"",
|
|
1875
|
+
"- 不编造资质、业绩、人员、设备、工期、金额、奖项或项目事实。",
|
|
1876
|
+
"- 缺少依据时写 `待补`、`需核验` 或 `转人工复核`。",
|
|
1877
|
+
"- AI 输出是 Markdown 工作母版,不是正式交付定稿。",
|
|
1878
|
+
""
|
|
1879
|
+
].join("\n");
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
async function initDocumentWritingWorkspace(options) {
|
|
1883
|
+
const targetRoot = path.resolve(options.cwd);
|
|
1884
|
+
const workspaceName = options.workspaceName ?? "document-writing";
|
|
1885
|
+
if (!workspaceName || path.isAbsolute(workspaceName)) {
|
|
1886
|
+
throw new Error("--name must be a relative folder name");
|
|
1887
|
+
}
|
|
1888
|
+
|
|
1889
|
+
const requestedType = resolveDocumentWritingType(options.documentType);
|
|
1890
|
+
const type = options.sample && requestedType === "general" ? "tender" : requestedType;
|
|
1891
|
+
const templateRoot = options.sample
|
|
1892
|
+
? path.join(repoRoot, "templates", "document-writing-samples", type)
|
|
1893
|
+
: path.join(repoRoot, "templates", "document-writing");
|
|
1894
|
+
const workspaceRoot = path.resolve(targetRoot, workspaceName);
|
|
1895
|
+
assertInside(workspaceRoot, targetRoot);
|
|
1896
|
+
|
|
1897
|
+
await ensureDir(targetRoot);
|
|
1898
|
+
await copyTreeMissing(templateRoot, workspaceRoot);
|
|
1899
|
+
|
|
1900
|
+
const readmePath = path.join(workspaceRoot, "README.md");
|
|
1901
|
+
assertInside(readmePath, workspaceRoot);
|
|
1902
|
+
if (await exists(readmePath)) {
|
|
1903
|
+
console.log(`SKIP existing ${readmePath}`);
|
|
1904
|
+
} else {
|
|
1905
|
+
await fs.writeFile(readmePath, renderDocumentWritingReadme(type), "utf8");
|
|
1906
|
+
console.log(`CREATE ${readmePath}`);
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
console.log(`WRITING ${type}: ${workspaceRoot}`);
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1912
|
+
const documentWritingFiles = [
|
|
1913
|
+
"source-normalized.md",
|
|
1914
|
+
"material-index.md",
|
|
1915
|
+
"writing-brief.md",
|
|
1916
|
+
"draft.md",
|
|
1917
|
+
"review-notes.md",
|
|
1918
|
+
"final.md"
|
|
1919
|
+
];
|
|
1920
|
+
|
|
1921
|
+
async function resolveDocumentWritingWorkspaceRoot(options) {
|
|
1922
|
+
const targetRoot = path.resolve(options.cwd);
|
|
1923
|
+
const workspaceName = options.workspaceName ?? "document-writing";
|
|
1924
|
+
if (!workspaceName || path.isAbsolute(workspaceName)) {
|
|
1925
|
+
throw new Error("--name must be a relative folder name");
|
|
1926
|
+
}
|
|
1927
|
+
|
|
1928
|
+
const namedRoot = path.resolve(targetRoot, workspaceName);
|
|
1929
|
+
assertInside(namedRoot, targetRoot);
|
|
1930
|
+
if (await exists(namedRoot)) {
|
|
1931
|
+
return namedRoot;
|
|
1932
|
+
}
|
|
1933
|
+
|
|
1934
|
+
let targetRootHasWorkbench = true;
|
|
1935
|
+
for (const fileName of documentWritingFiles) {
|
|
1936
|
+
if (!(await exists(path.join(targetRoot, fileName)))) {
|
|
1937
|
+
targetRootHasWorkbench = false;
|
|
1938
|
+
break;
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1941
|
+
if (targetRootHasWorkbench) {
|
|
1942
|
+
return targetRoot;
|
|
1943
|
+
}
|
|
1944
|
+
|
|
1945
|
+
return namedRoot;
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
async function validateDocumentWritingWorkspace(options) {
|
|
1949
|
+
const workspaceRoot = await resolveDocumentWritingWorkspaceRoot(options);
|
|
1950
|
+
const checks = [];
|
|
1951
|
+
|
|
1952
|
+
async function check(label, ok, detail = "") {
|
|
1953
|
+
checks.push({ label, ok, detail });
|
|
1954
|
+
}
|
|
1955
|
+
|
|
1956
|
+
await check("workspace directory", await exists(workspaceRoot), workspaceRoot);
|
|
1957
|
+
for (const fileName of documentWritingFiles) {
|
|
1958
|
+
const filePath = path.join(workspaceRoot, fileName);
|
|
1959
|
+
const ok = await exists(filePath);
|
|
1960
|
+
await check(`${fileName} exists`, ok, filePath);
|
|
1961
|
+
if (!ok) {
|
|
1962
|
+
continue;
|
|
1963
|
+
}
|
|
1964
|
+
const content = await fs.readFile(filePath, "utf8");
|
|
1965
|
+
await check(`${fileName} is non-empty`, content.trim().length > 0, filePath);
|
|
1966
|
+
}
|
|
1967
|
+
|
|
1968
|
+
const source = await readTextIfExists(path.join(workspaceRoot, "source-normalized.md"));
|
|
1969
|
+
const materials = await readTextIfExists(path.join(workspaceRoot, "material-index.md"));
|
|
1970
|
+
const brief = await readTextIfExists(path.join(workspaceRoot, "writing-brief.md"));
|
|
1971
|
+
const draft = await readTextIfExists(path.join(workspaceRoot, "draft.md"));
|
|
1972
|
+
const review = await readTextIfExists(path.join(workspaceRoot, "review-notes.md"));
|
|
1973
|
+
const final = await readTextIfExists(path.join(workspaceRoot, "final.md"));
|
|
1974
|
+
|
|
1975
|
+
await check("source-normalized keeps source list", source.includes("资料来源清单"));
|
|
1976
|
+
await check("material-index keeps reuse levels", materials.includes("复用级别"));
|
|
1977
|
+
await check("writing-brief keeps banned claims", brief.includes("禁止承诺") || brief.includes("禁止结论"));
|
|
1978
|
+
await check("draft keeps provenance placeholders", draft.includes("来源") && draft.includes("待补"));
|
|
1979
|
+
await check(
|
|
1980
|
+
"review-notes keeps audit gate",
|
|
1981
|
+
review.includes("aios-commercial-tender") || review.includes("aios-construction-scheme")
|
|
1982
|
+
);
|
|
1983
|
+
await check("final keeps manual confirmation", final.includes("人工") && final.includes("定稿"));
|
|
1984
|
+
|
|
1985
|
+
const failed = checks.filter((item) => !item.ok);
|
|
1986
|
+
for (const item of checks) {
|
|
1987
|
+
console.log(`${item.ok ? "OK " : "MISS"} ${item.label}${item.detail ? `: ${item.detail}` : ""}`);
|
|
1988
|
+
}
|
|
1989
|
+
|
|
1990
|
+
if (failed.length > 0) {
|
|
1991
|
+
process.exitCode = 1;
|
|
1992
|
+
console.error(`Writing workbench validation failed: ${failed.length} issue(s).`);
|
|
1993
|
+
return;
|
|
1994
|
+
}
|
|
1995
|
+
|
|
1996
|
+
console.log(`Writing workbench validation passed: ${workspaceRoot}`);
|
|
1997
|
+
}
|
|
1998
|
+
|
|
1758
1999
|
async function validateProjectTemplate(options) {
|
|
1759
2000
|
const manifest = await readManifest();
|
|
1760
2001
|
const createdTemp = options.temp;
|
|
@@ -1949,6 +2190,10 @@ async function main() {
|
|
|
1949
2190
|
await doctor();
|
|
1950
2191
|
} else if (options.command === "init") {
|
|
1951
2192
|
await initProject(options);
|
|
2193
|
+
} else if (options.command === "writing:init") {
|
|
2194
|
+
await initDocumentWritingWorkspace(options);
|
|
2195
|
+
} else if (options.command === "writing:validate") {
|
|
2196
|
+
await validateDocumentWritingWorkspace(options);
|
|
1952
2197
|
} else if (options.command === "validate") {
|
|
1953
2198
|
await validateProjectTemplate(options);
|
|
1954
2199
|
} else if (options.command === "capability:call") {
|
package/delivery/README.md
CHANGED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# v1.4.0 Release Readiness
|
|
2
|
+
|
|
3
|
+
本清单用于 v1.4.0 正式发布前收口。当前版本元数据已同步到 `1.4.0`;不得仅因版本同步就视为 GitHub Release 已发布。
|
|
4
|
+
|
|
5
|
+
## 发布硬门槛
|
|
6
|
+
|
|
7
|
+
- [x] `aios-tender-write` 和 `aios-scheme-write` 的写作样板已通过 `writing:validate`。
|
|
8
|
+
- [x] `engineering-document-writing-scorecard.json` 已通过校验。
|
|
9
|
+
- [x] Codex 真实触发 `aios-tender-write` 原始输出已归档。
|
|
10
|
+
- [x] Codex 真实触发 `aios-scheme-write` 原始输出已归档。
|
|
11
|
+
- [x] WorkBuddy 真实触发 `aios-tender-write` 原始输出已归档。
|
|
12
|
+
- [x] WorkBuddy 真实触发 `aios-scheme-write` 原始输出已归档。
|
|
13
|
+
- [x] 所有真实输出已按写作型 scorecard 复核,不把 prompt paste 结果冒充为 skill-runtime。
|
|
14
|
+
- [x] 外部使用说明已更新,并优先展示 WorkBuddy-first 最短路径。
|
|
15
|
+
|
|
16
|
+
## 发布级验证命令
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm run validate:skills
|
|
20
|
+
npm run validate:prompts
|
|
21
|
+
npm run validate:prompt-run-pack
|
|
22
|
+
npm run validate:public-advisory-run-pack
|
|
23
|
+
npm run validate:document-writing-run-pack
|
|
24
|
+
npm run validate:prompt-run-results
|
|
25
|
+
npm run validate:prompt-outputs
|
|
26
|
+
npm run validate:prompt-scorecard
|
|
27
|
+
npm run validate:skill-runtime-evidence
|
|
28
|
+
npm run doctor
|
|
29
|
+
npm run smoke:project
|
|
30
|
+
npm test
|
|
31
|
+
npx skills add . --list
|
|
32
|
+
npm pack --dry-run
|
|
33
|
+
claude plugin validate .
|
|
34
|
+
git diff --check
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
如果某个宿主 CLI 不支持对应命令,应记录为宿主工具能力限制,不得写成仓库验证失败或通过。
|
|
38
|
+
|
|
39
|
+
## 版本同步点
|
|
40
|
+
|
|
41
|
+
正式 bump 到 `1.4.0` 时必须同步:
|
|
42
|
+
|
|
43
|
+
- `package.json`
|
|
44
|
+
- `gemini-extension.json`
|
|
45
|
+
- `.claude-plugin/plugin.json`
|
|
46
|
+
- `runtime/archsight-aios.manifest.json`
|
|
47
|
+
- `bin/archsight-aios.mjs` 中 MCP `clientInfo.version`
|
|
48
|
+
- `CHANGELOG.md`
|
|
49
|
+
- `RELEASE_NOTES.md`
|
|
50
|
+
|
|
51
|
+
## 发布步骤
|
|
52
|
+
|
|
53
|
+
1. 冻结发布范围。
|
|
54
|
+
2. 更新版本同步点。
|
|
55
|
+
3. 跑完整发布级验证命令。
|
|
56
|
+
4. 提交 release metadata。
|
|
57
|
+
5. 创建 `v1.4.0` tag。
|
|
58
|
+
6. 推送 commit 和 tag。
|
|
59
|
+
7. 检查同名 GitHub Release 是否已存在。
|
|
60
|
+
8. 从 `RELEASE_NOTES.md` 提取 `## 1.4.0` 小节创建 GitHub Release。
|
|
61
|
+
|
|
62
|
+
## 当前阻断
|
|
63
|
+
|
|
64
|
+
截至本清单更新时,Codex / WorkBuddy 写作型 Skill 的 raw output 已归档并通过 scorecard 复核,版本元数据已同步到 `1.4.0`。正式发布前剩余工作是最终发布 commit 验证、`v1.4.0` tag、push 和 GitHub Release。
|
package/docs/quickstart.md
CHANGED
|
@@ -10,6 +10,14 @@ npx @archsight/aios install --target all --scope user
|
|
|
10
10
|
|
|
11
11
|
这一步会把 ArchSight AIOS 的 Skills、Workflows、Runtime 和模板同步到当前用户目录,让 Codex、Claude Code、OpenCode、Gemini、Antigravity、WorkBuddy 等工具可以读取。
|
|
12
12
|
|
|
13
|
+
如果只是想先在 WorkBuddy 中试用标书 / 方案写作能力,可以先走最短路径:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx @archsight/aios install --target workbuddy --scope user
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
写作型工作流见 [v1.4.0 写作工作流快速使用](v1.4.0-writing-workflow-quickstart.md)。
|
|
20
|
+
|
|
13
21
|
## 2. 检查安装
|
|
14
22
|
|
|
15
23
|
```bash
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# v1.4.0 写作能力边界
|
|
2
|
+
|
|
3
|
+
v1.4.0 的目标是让 AIOS 从“可用 Skill”进入“可试点落地的工程业务工作流包”。边界必须清楚,否则写作型能力会把初稿生成误包装成专业结论。
|
|
4
|
+
|
|
5
|
+
## 能做
|
|
6
|
+
|
|
7
|
+
- 基于用户提供的脱敏资料生成或改写 Markdown 初稿。
|
|
8
|
+
- 整理资料来源、历史素材复用判断和待补资料。
|
|
9
|
+
- 生成技术标、投标响应章节、专项施工方案章节和交底材料初稿。
|
|
10
|
+
- 把生成稿交给审核型 Skill 做响应性、风险、资料缺口和人工复核分流。
|
|
11
|
+
- 为后续 Word / PDF / PPT 定稿提供 Markdown 工作母版。
|
|
12
|
+
|
|
13
|
+
## 不能做
|
|
14
|
+
|
|
15
|
+
- 不替代投标负责人做最终投标决策。
|
|
16
|
+
- 不判断中标概率、评标结论、废标最终结论或采购承诺。
|
|
17
|
+
- 不替代总工、专家论证、危大工程审批、结构计算、监理、安全负责人或审批主体。
|
|
18
|
+
- 不确认方案合格、计算正确、专家论证通过、审批通过或现场安全满足。
|
|
19
|
+
- 不把历史项目事实、人员、设备、工期、金额、参数、图号和奖项自动套入当前项目。
|
|
20
|
+
|
|
21
|
+
## 优秀输出的最低标准
|
|
22
|
+
|
|
23
|
+
- 有资料来源清单。
|
|
24
|
+
- 有写作 brief。
|
|
25
|
+
- 有历史素材匹配表和复用级别。
|
|
26
|
+
- 有章节初稿或改写稿。
|
|
27
|
+
- 有待补资料和人工复核岗位。
|
|
28
|
+
- 有审核门禁交接。
|
|
29
|
+
- 有明确禁止结论和输出自检。
|
|
30
|
+
|
|
31
|
+
## 停止条件
|
|
32
|
+
|
|
33
|
+
遇到以下情况,应停止生成定稿式正文,只输出待补清单和复核建议:
|
|
34
|
+
|
|
35
|
+
- 缺少招标文件原文、评分办法、技术要求或投标格式要求。
|
|
36
|
+
- 缺少工程概况、图纸、计算书、设备资料或专家意见。
|
|
37
|
+
- 用户要求输出中标概率、审批通过、计算正确、合规结论或法律意见。
|
|
38
|
+
- 历史素材含大量旧项目事实且无法确认当前项目依据。
|
|
39
|
+
|
|
40
|
+
## 发布前事实边界
|
|
41
|
+
|
|
42
|
+
仓库级测试能验证资产、路由、模板和脱敏 run-pack;不能替代真实宿主输出评估。v1.4.0 正式发布前,必须归档 Codex 和 WorkBuddy 的真实 Skill 触发输出,并按写作型 scorecard 复核。
|