@namewta/speculo 0.7.4 → 0.7.5
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 +2 -2
- package/package.json +1 -1
- package/template/canonical/README.md +208 -63
- package/template/canonical/canonical-person-steelman-deliberation.md +518 -0
- package/template/skills/engineering-standards-builder/README.md +43 -0
- package/template/skills/engineering-standards-builder/SKILL.md +233 -0
- package/template/skills/engineering-standards-builder/examples/README.md +15 -0
- package/template/skills/engineering-standards-builder/examples/fallback/kotlin-gradle/build.gradle.kts +5 -0
- package/template/skills/engineering-standards-builder/examples/fallback/kotlin-gradle/expected.json +12 -0
- package/template/skills/engineering-standards-builder/examples/fallback/kotlin-gradle/src/main/kotlin/example/App.kt +2 -0
- package/template/skills/engineering-standards-builder/examples/go/service/.golangci.yml +3 -0
- package/template/skills/engineering-standards-builder/examples/go/service/cmd/api/main.go +3 -0
- package/template/skills/engineering-standards-builder/examples/go/service/expected.json +23 -0
- package/template/skills/engineering-standards-builder/examples/go/service/go.mod +3 -0
- package/template/skills/engineering-standards-builder/examples/go/service/internal/service/service.go +2 -0
- package/template/skills/engineering-standards-builder/examples/go/service/internal/service/service_test.go +3 -0
- package/template/skills/engineering-standards-builder/examples/java/spring-boot-maven/expected.json +22 -0
- package/template/skills/engineering-standards-builder/examples/java/spring-boot-maven/pom.xml +12 -0
- package/template/skills/engineering-standards-builder/examples/java/spring-boot-maven/src/main/java/dev/speculo/orders/OrdersApplication.java +7 -0
- package/template/skills/engineering-standards-builder/examples/java/spring-boot-maven/src/test/java/dev/speculo/orders/OrdersApplicationTest.java +3 -0
- package/template/skills/engineering-standards-builder/examples/polyglot/monorepo/.github/workflows/ci.yml +11 -0
- package/template/skills/engineering-standards-builder/examples/polyglot/monorepo/apps/web/package.json +11 -0
- package/template/skills/engineering-standards-builder/examples/polyglot/monorepo/apps/web/src/App.vue +2 -0
- package/template/skills/engineering-standards-builder/examples/polyglot/monorepo/apps/web/tsconfig.json +8 -0
- package/template/skills/engineering-standards-builder/examples/polyglot/monorepo/expected.json +22 -0
- package/template/skills/engineering-standards-builder/examples/polyglot/monorepo/package.json +11 -0
- package/template/skills/engineering-standards-builder/examples/polyglot/monorepo/pnpm-workspace.yaml +2 -0
- package/template/skills/engineering-standards-builder/examples/polyglot/monorepo/services/orders/pom.xml +12 -0
- package/template/skills/engineering-standards-builder/examples/polyglot/monorepo/services/orders/src/main/java/dev/speculo/orders/OrdersApplication.java +7 -0
- package/template/skills/engineering-standards-builder/examples/polyglot/monorepo/services/worker/go.mod +3 -0
- package/template/skills/engineering-standards-builder/examples/polyglot/monorepo/services/worker/main.go +2 -0
- package/template/skills/engineering-standards-builder/examples/rust/workspace/Cargo.toml +7 -0
- package/template/skills/engineering-standards-builder/examples/rust/workspace/crates/cli/Cargo.toml +8 -0
- package/template/skills/engineering-standards-builder/examples/rust/workspace/crates/cli/src/main.rs +1 -0
- package/template/skills/engineering-standards-builder/examples/rust/workspace/crates/core/Cargo.toml +5 -0
- package/template/skills/engineering-standards-builder/examples/rust/workspace/crates/core/src/lib.rs +3 -0
- package/template/skills/engineering-standards-builder/examples/rust/workspace/expected.json +14 -0
- package/template/skills/engineering-standards-builder/examples/rust/workspace/rust-toolchain.toml +3 -0
- package/template/skills/engineering-standards-builder/examples/typescript/react-vite/expected.json +21 -0
- package/template/skills/engineering-standards-builder/examples/typescript/react-vite/package.json +20 -0
- package/template/skills/engineering-standards-builder/examples/typescript/react-vite/src/App.test.tsx +2 -0
- package/template/skills/engineering-standards-builder/examples/typescript/react-vite/src/App.tsx +1 -0
- package/template/skills/engineering-standards-builder/examples/typescript/react-vite/src/main.tsx +3 -0
- package/template/skills/engineering-standards-builder/examples/typescript/react-vite/tsconfig.json +10 -0
- package/template/skills/engineering-standards-builder/examples/typescript/vue-vite/expected.json +22 -0
- package/template/skills/engineering-standards-builder/examples/typescript/vue-vite/package.json +21 -0
- package/template/skills/engineering-standards-builder/examples/typescript/vue-vite/src/App.test.ts +2 -0
- package/template/skills/engineering-standards-builder/examples/typescript/vue-vite/src/App.vue +7 -0
- package/template/skills/engineering-standards-builder/examples/typescript/vue-vite/src/main.ts +4 -0
- package/template/skills/engineering-standards-builder/examples/typescript/vue-vite/tsconfig.json +11 -0
- package/template/skills/engineering-standards-builder/examples/typescript/vue-vite/vite.config.ts +2 -0
- package/template/skills/engineering-standards-builder/manifest.txt +112 -0
- package/template/skills/engineering-standards-builder/references/go/00-detection-and-scope.md +37 -0
- package/template/skills/engineering-standards-builder/references/go/01-language-and-idioms.md +34 -0
- package/template/skills/engineering-standards-builder/references/go/02-modules-packages-and-layout.md +34 -0
- package/template/skills/engineering-standards-builder/references/go/03-errors-context-and-concurrency.md +38 -0
- package/template/skills/engineering-standards-builder/references/go/04-testing-tooling-quality-gates.md +46 -0
- package/template/skills/engineering-standards-builder/references/go/README.md +9 -0
- package/template/skills/engineering-standards-builder/references/java/00-detection-and-scope.md +40 -0
- package/template/skills/engineering-standards-builder/references/java/01-language-packages-and-api.md +35 -0
- package/template/skills/engineering-standards-builder/references/java/02-build-modules-and-dependencies.md +39 -0
- package/template/skills/engineering-standards-builder/references/java/03-errors-nullability-resources-concurrency.md +36 -0
- package/template/skills/engineering-standards-builder/references/java/04-testing-tooling-quality-gates.md +36 -0
- package/template/skills/engineering-standards-builder/references/java/README.md +10 -0
- package/template/skills/engineering-standards-builder/references/java/frameworks/spring-boot.md +74 -0
- package/template/skills/engineering-standards-builder/references/rules/00-governance-and-precedence.md +52 -0
- package/template/skills/engineering-standards-builder/references/rules/01-project-discovery.md +79 -0
- package/template/skills/engineering-standards-builder/references/rules/02-evidence-topology-and-scope.md +87 -0
- package/template/skills/engineering-standards-builder/references/rules/03-interview-and-decisions.md +77 -0
- package/template/skills/engineering-standards-builder/references/rules/04-architecture-and-dependency-boundaries.md +58 -0
- package/template/skills/engineering-standards-builder/references/rules/05-files-directories-and-naming.md +53 -0
- package/template/skills/engineering-standards-builder/references/rules/06-apis-errors-resources-and-concurrency.md +53 -0
- package/template/skills/engineering-standards-builder/references/rules/07-documentation-and-comments.md +46 -0
- package/template/skills/engineering-standards-builder/references/rules/08-testing-strategy.md +45 -0
- package/template/skills/engineering-standards-builder/references/rules/09-security-configuration-and-data.md +44 -0
- package/template/skills/engineering-standards-builder/references/rules/10-performance-observability-and-i18n.md +36 -0
- package/template/skills/engineering-standards-builder/references/rules/11-tooling-quality-gates-and-ci.md +69 -0
- package/template/skills/engineering-standards-builder/references/rules/12-git-review-and-delivery.md +46 -0
- package/template/skills/engineering-standards-builder/references/rules/13-adoption-exceptions-and-ratchets.md +60 -0
- package/template/skills/engineering-standards-builder/references/rules/14-generation-contract.md +105 -0
- package/template/skills/engineering-standards-builder/references/rules/15-validation-contract.md +65 -0
- package/template/skills/engineering-standards-builder/references/rules/16-language-adapter-contract.md +55 -0
- package/template/skills/engineering-standards-builder/references/rules/README.md +23 -0
- package/template/skills/engineering-standards-builder/references/rust/00-detection-and-scope.md +38 -0
- package/template/skills/engineering-standards-builder/references/rust/01-language-api-and-safety.md +35 -0
- package/template/skills/engineering-standards-builder/references/rust/02-crates-workspaces-and-layout.md +36 -0
- package/template/skills/engineering-standards-builder/references/rust/03-errors-ownership-and-concurrency.md +37 -0
- package/template/skills/engineering-standards-builder/references/rust/04-testing-tooling-quality-gates.md +44 -0
- package/template/skills/engineering-standards-builder/references/rust/README.md +9 -0
- package/template/skills/engineering-standards-builder/references/typescript/00-detection-and-scope.md +58 -0
- package/template/skills/engineering-standards-builder/references/typescript/01-language-and-type-system.md +49 -0
- package/template/skills/engineering-standards-builder/references/typescript/02-modules-packages-and-runtime-boundaries.md +49 -0
- package/template/skills/engineering-standards-builder/references/typescript/03-functions-async-errors-resources.md +42 -0
- package/template/skills/engineering-standards-builder/references/typescript/04-testing-tooling-quality-gates.md +51 -0
- package/template/skills/engineering-standards-builder/references/typescript/README.md +27 -0
- package/template/skills/engineering-standards-builder/references/typescript/app-types/cli.md +11 -0
- package/template/skills/engineering-standards-builder/references/typescript/app-types/library.md +11 -0
- package/template/skills/engineering-standards-builder/references/typescript/frameworks/react.md +71 -0
- package/template/skills/engineering-standards-builder/references/typescript/frameworks/vue.md +131 -0
- package/template/skills/engineering-standards-builder/references/typescript/runtimes/browser.md +15 -0
- package/template/skills/engineering-standards-builder/references/typescript/runtimes/electron.md +25 -0
- package/template/skills/engineering-standards-builder/references/typescript/runtimes/node.md +13 -0
- package/template/skills/engineering-standards-builder/scripts/discover-project.mjs +957 -0
- package/template/skills/engineering-standards-builder/scripts/self-test.mjs +203 -0
- package/template/skills/engineering-standards-builder/scripts/sync-manifest.mjs +105 -0
- package/template/skills/engineering-standards-builder/scripts/validate-builder.mjs +255 -0
- package/template/skills/engineering-standards-builder/scripts/validate-generated-skill.mjs +286 -0
- package/template/skills/engineering-standards-builder/templates/README.md +18 -0
- package/template/skills/engineering-standards-builder/templates/compatibility/agents-typescript--standards.md +6 -0
- package/template/skills/engineering-standards-builder/templates/compatibility/agents-typescript-standards.md +6 -0
- package/template/skills/engineering-standards-builder/templates/compatibility/claude-engineering-standards.md +6 -0
- package/template/skills/engineering-standards-builder/templates/compatibility/claude-typescript-standards.md +6 -0
- package/template/skills/engineering-standards-builder/templates/project-skill/SKILL.md.template +26 -0
- package/template/skills/engineering-standards-builder/templates/project-skill/references/project/00-project-profile.md.template +26 -0
- package/template/skills/engineering-standards-builder/templates/project-skill/references/project/01-module-map.md.template +27 -0
- package/template/skills/engineering-standards-builder/templates/project-skill/references/project/02-decisions-and-exceptions.md.template +31 -0
- package/template/skills/engineering-standards-builder/templates/project-skill/references/project/review-checklist.md.template +14 -0
- package/template/skills/source-code-zip-skill/SKILL.md +343 -0
- package/template/skills/source-code-zip-skill/scripts/zip_source_code.py +638 -0
- package/template/workflows/person/INDEX.md +1 -0
- package/template/workflows/person/S-steelman-deliberation/S-steelman-deliberation.md +218 -0
- package/template/workflows/person/S-steelman-deliberation/_templates/decision-template.md +51 -0
- package/template/workflows/person/S-steelman-deliberation/_templates/steelman-dossier-template.md +96 -0
- package/template/workflows/person/S-steelman-deliberation/deliberate.md +127 -0
- package/template/workflows/person/S-steelman-deliberation/evidence-gate.md +37 -0
- package/template/workflows/person/S-steelman-deliberation/judge.md +69 -0
- package/template/workflows/person/S-steelman-deliberation/tools/validate-steelman-change.mjs +697 -0
- package/template/skills/typescript-standards-builder/README.md +0 -53
- package/template/skills/typescript-standards-builder/SKILL.md +0 -245
- package/template/skills/typescript-standards-builder/examples/sample-generated-tree.md +0 -30
- package/template/skills/typescript-standards-builder/examples/sample-interview-decisions.md +0 -26
- package/template/skills/typescript-standards-builder/manifest.txt +0 -29
- package/template/skills/typescript-standards-builder/references/00-governance-and-fixed-defaults.md +0 -77
- package/template/skills/typescript-standards-builder/references/01-project-discovery.md +0 -100
- package/template/skills/typescript-standards-builder/references/02-interview-workflow.md +0 -129
- package/template/skills/typescript-standards-builder/references/03-project-architecture-and-directory-layout.md +0 -84
- package/template/skills/typescript-standards-builder/references/04-file-directory-and-symbol-naming.md +0 -92
- package/template/skills/typescript-standards-builder/references/05-modules-imports-exports-and-dependencies.md +0 -63
- package/template/skills/typescript-standards-builder/references/06-typescript-type-system.md +0 -64
- package/template/skills/typescript-standards-builder/references/07-functions-async-errors-and-resources.md +0 -42
- package/template/skills/typescript-standards-builder/references/08-comments-jsdoc-and-documentation.md +0 -51
- package/template/skills/typescript-standards-builder/references/09-testing-strategy.md +0 -58
- package/template/skills/typescript-standards-builder/references/10-react-and-frontend.md +0 -39
- package/template/skills/typescript-standards-builder/references/11-node-cli-and-cross-platform.md +0 -31
- package/template/skills/typescript-standards-builder/references/12-formatting-lint-and-complexity.md +0 -58
- package/template/skills/typescript-standards-builder/references/13-configuration-dependencies-and-ci.md +0 -71
- package/template/skills/typescript-standards-builder/references/14-security-performance-and-i18n.md +0 -32
- package/template/skills/typescript-standards-builder/references/15-git-review-and-delivery.md +0 -28
- package/template/skills/typescript-standards-builder/references/16-adoption-exceptions-and-migration.md +0 -61
- package/template/skills/typescript-standards-builder/references/17-generation-contract.md +0 -104
- package/template/skills/typescript-standards-builder/references/README.md +0 -37
- package/template/skills/typescript-standards-builder/templates/agents-compat-skill/SKILL.md +0 -1
- package/template/skills/typescript-standards-builder/templates/claude-skill/SKILL.md +0 -1
- package/template/skills/typescript-standards-builder/templates/project-skill/SKILL.md.template +0 -34
- package/template/skills/typescript-standards-builder/templates/project-skill/references/00-project-profile.md.template +0 -17
- package/template/skills/typescript-standards-builder/templates/project-skill/references/10-review-checklist.md +0 -23
- package/template/skills/typescript-standards-builder/templates/project-skill/references/11-decisions-and-exceptions.md.template +0 -19
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ After initialization, the target project gains the following AI agent-callable a
|
|
|
60
60
|
| `migrate-runtime-state` | Validate backups, lock source/target fingerprints, and apply runtime migration plans with rollback |
|
|
61
61
|
| `optimize-codex-config` | Audit and optimize local Codex configuration, custom Responses providers, permissions, and compaction failures |
|
|
62
62
|
| `speculo-retro` | Retrospective analysis |
|
|
63
|
-
| `
|
|
63
|
+
| `engineering-standards-builder` | Interview-driven generator that produces a project-specific TypeScript/JS/React/Node standards skill |
|
|
64
64
|
| `writing-great-skills` | Authoring guidance for agent skills |
|
|
65
65
|
|
|
66
66
|
### 2 Workflow Packages
|
|
@@ -68,7 +68,7 @@ After initialization, the target project gains the following AI agent-callable a
|
|
|
68
68
|
| Workflow | Work Entries | Description |
|
|
69
69
|
|---|---:|---|
|
|
70
70
|
| **specdev** | 14 | Local-first specification-driven development: archive, code review, diagnosis, mentoring, grilling, implementation, setup, goal planning, prototyping, architecture review, specs, tickets, triage, and wayfinding |
|
|
71
|
-
| **person** |
|
|
71
|
+
| **person** | 2 | Persona-methodology and rigorous deliberation workflows (Mao Zedong Cognitive OS; Bidirectional Steelman Deliberation) |
|
|
72
72
|
|
|
73
73
|
Every workflow ships an `INDEX.md` as its auto-generated work catalog. Work entries follow `<Letter>-<work_name>/<Letter>-<work_name>.md` naming with progressive-disclosure sub-files, and resolve runtime paths via `<Path>{roots.xxx}/...</Path>` pointers in `workspace.json`.
|
|
74
74
|
|
package/package.json
CHANGED
|
@@ -1,95 +1,240 @@
|
|
|
1
|
-
# Canonical —
|
|
1
|
+
# Canonical — 独立能力与可移植持久化规范
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
项目地址:https://github.com/NAMEWTA/Speculo
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Canonical 是可以单独上传到网页 AI 平台的 Markdown 能力文档。每一份文档都必须像一个完整运行单元:不依赖源仓库或第二份能力定义,同时把运行过程产生的状态、分析、决定和交付物写入统一的便携目录,支持暂停、恢复、交接和审计。
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|---|---|---|
|
|
9
|
-
| 形态 | 多文件目录结构 | 单文件 MD |
|
|
10
|
-
| 内容 | 原始分片文件 + 跨文件引用 | 主入口 + 所有引用文件内联合并 |
|
|
11
|
-
| 用途 | Speculo 运行时加载与组合 | AI 平台上传分发 |
|
|
12
|
-
| 更新 | `speculo init` 覆盖刷新 | 按需从源文件重新生成 |
|
|
7
|
+
## 两个同等重要的目标
|
|
13
8
|
|
|
14
|
-
|
|
9
|
+
### 定义隔离
|
|
15
10
|
|
|
16
|
-
|
|
11
|
+
最终文档只描述能力本身,不暴露生成它的目录、源文件、脚本、内部路由、安装方式或维护者约定。读者只凭当前文档和自己的材料即可开始使用。
|
|
17
12
|
|
|
18
|
-
|
|
19
|
-
# <能力名称>
|
|
13
|
+
### 运行持久化
|
|
20
14
|
|
|
21
|
-
|
|
22
|
-
- 所有 <Path> 标签已替换为纯文本描述
|
|
23
|
-
- 所有文件引用已替换为"参见下方 <xxx> 标签"
|
|
24
|
-
- 标准 Markdown 书写规范>
|
|
15
|
+
最终文档不能退化成一次性聊天提示。凡能力会生成产物、等待用户回答、跨轮推进或在中断后继续,都必须定义真实文件输出和恢复依据。
|
|
25
16
|
|
|
26
|
-
|
|
17
|
+
统一持久化根为:
|
|
27
18
|
|
|
28
|
-
|
|
19
|
+
```text
|
|
20
|
+
ai-workspace/
|
|
21
|
+
```
|
|
29
22
|
|
|
30
|
-
|
|
23
|
+
这是文档自身定义的便携输出命名空间,不是任何源仓库目录。用户可以把它放在自己的项目目录、平台可写工作区、挂载文件区或任意本地保存位置。
|
|
24
|
+
|
|
25
|
+
## 标准目录结构
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
ai-workspace/
|
|
29
|
+
├── status.json
|
|
30
|
+
├── changes/
|
|
31
|
+
│ └── YYYY-MM-DD-<topic>/
|
|
32
|
+
│ ├── .status.json
|
|
33
|
+
│ ├── source.md
|
|
34
|
+
│ ├── LOG.md
|
|
35
|
+
│ └── <能力拥有的工件>
|
|
36
|
+
├── knowledge/
|
|
37
|
+
│ ├── decisions/
|
|
38
|
+
│ ├── context/
|
|
39
|
+
│ └── research/
|
|
40
|
+
└── archive/
|
|
41
|
+
```
|
|
31
42
|
|
|
32
|
-
|
|
43
|
+
目录职责:
|
|
33
44
|
|
|
34
|
-
|
|
45
|
+
| 路径 | 职责 |
|
|
46
|
+
|---|---|
|
|
47
|
+
| `ai-workspace/status.json` | 全局 active change 索引和当前阶段,不替代权威工件 |
|
|
48
|
+
| `ai-workspace/changes/{change}/.status.json` | 单次 change 的状态、阶段、owned artifacts、阻塞与更新时间 |
|
|
49
|
+
| `ai-workspace/changes/{change}/source.md` | 原始请求、初始材料和不可丢失上下文 |
|
|
50
|
+
| `ai-workspace/changes/{change}/LOG.md` | 高价值决定、替代关系、偏差和恢复事件的追加记录 |
|
|
51
|
+
| `ai-workspace/changes/{change}/...` | 各能力自己的主工件和子工件 |
|
|
52
|
+
| `ai-workspace/knowledge/decisions/` | 跨 change 的稳定决定 |
|
|
53
|
+
| `ai-workspace/knowledge/context/` | 可复用领域上下文与术语 |
|
|
54
|
+
| `ai-workspace/knowledge/research/` | 可复用研究结果与证据摘要 |
|
|
55
|
+
| `ai-workspace/archive/` | 经明确规则或授权归档的完成记录 |
|
|
35
56
|
|
|
36
|
-
|
|
57
|
+
所有路径使用正斜杠相对路径。不得使用机器绝对路径、反斜杠、空路径段或 `..`。
|
|
37
58
|
|
|
38
|
-
|
|
59
|
+
## change 命名与选择
|
|
39
60
|
|
|
40
|
-
|
|
61
|
+
change 使用:
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
YYYY-MM-DD-<kebab-topic>
|
|
41
65
|
```
|
|
42
66
|
|
|
43
|
-
|
|
67
|
+
选择顺序:
|
|
68
|
+
|
|
69
|
+
1. 用户显式指定合法 change;
|
|
70
|
+
2. 未指定时,从 `ai-workspace/status.json` 恢复与当前能力匹配的唯一 active change;
|
|
71
|
+
3. 没有候选时创建新 change;
|
|
72
|
+
4. 同名存在时追加最小数字后缀;
|
|
73
|
+
5. 多个候选无法消歧时列出候选并停止,不自行猜测。
|
|
44
74
|
|
|
45
|
-
|
|
46
|
-
- **无 YAML frontmatter**:去除所有源文件的 `---` 元数据块。这是 Speculo 内部标记,AI 平台不需要。
|
|
47
|
-
- **无 `<Path>` 标签**:将 `<Path>{roots.xxx}/path/</Path>` 替换为自然语言描述。
|
|
48
|
-
- **子文件 XML 隔离**:被引用的子文件用 `<filename>...</filename>` 包裹,标签名取文件名去 `.md` 扩展名。
|
|
49
|
-
- **单文件自包含**:所有引用内容全量内联,无外部依赖,无渐进式披露。
|
|
75
|
+
恢复必须读取 `.status.json` 和该能力的权威工件。模型记忆、聊天摘要或“继续上次”不能替代文件证据。
|
|
50
76
|
|
|
51
|
-
##
|
|
77
|
+
## 最小状态格式
|
|
78
|
+
|
|
79
|
+
全局状态至少包含:
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
{
|
|
83
|
+
"schema_version": 1,
|
|
84
|
+
"active": [
|
|
85
|
+
{
|
|
86
|
+
"change": "2026-08-18-example",
|
|
87
|
+
"capability": "能力名称",
|
|
88
|
+
"phase": "active",
|
|
89
|
+
"updated_at": "2026-08-18T00:00:00Z"
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
change 状态至少包含:
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"schema_version": 1,
|
|
100
|
+
"change": "2026-08-18-example",
|
|
101
|
+
"status": "active",
|
|
102
|
+
"current_capability": "能力名称",
|
|
103
|
+
"phase": "active",
|
|
104
|
+
"owned_artifacts": [],
|
|
105
|
+
"updated_at": "2026-08-18T00:00:00Z",
|
|
106
|
+
"blockers": []
|
|
107
|
+
}
|
|
108
|
+
```
|
|
52
109
|
|
|
53
|
-
|
|
54
|
-
|----------|----------|
|
|
55
|
-
| 主入口文件(SKILL.md / INDEX.md / work .md) | 作为文档主体,去除 frontmatter |
|
|
56
|
-
| `references/*.md` | 内联至文末,用 XML 标签隔离 |
|
|
57
|
-
| `routes/*.md` | 内联至文末,用 XML 标签隔离 |
|
|
58
|
-
| `atomic-skills/*.md` | 内联至文末,用 XML 标签隔离 |
|
|
59
|
-
| `assets/*.json` | 内联至文末,用 XML 标签隔离 |
|
|
60
|
-
| `_state/`、`.speculo/`、`.gitkeep` | 排除——运行时状态,非能力定义 |
|
|
110
|
+
每份能力文档会进一步规定自己的 phase、owned artifacts 和 completed 条件。读取—合并—写入时保留未知字段,也不得覆盖其他能力的 active 条目。
|
|
61
111
|
|
|
62
|
-
##
|
|
112
|
+
## 持久化写入顺序
|
|
63
113
|
|
|
64
|
-
|
|
114
|
+
每次状态变化使用固定顺序:
|
|
65
115
|
|
|
66
|
-
```
|
|
67
|
-
|
|
116
|
+
```text
|
|
117
|
+
形成完整候选工件
|
|
118
|
+
→ 按文内门禁自检
|
|
119
|
+
→ 替换正式工件
|
|
120
|
+
→ 更新 change .status.json
|
|
121
|
+
→ 最后更新全局 status.json
|
|
122
|
+
→ 返回写入证据
|
|
68
123
|
```
|
|
69
124
|
|
|
70
|
-
|
|
125
|
+
工件与状态冲突时保持阻塞,列出冲突和恢复动作。不能为了继续流程而猜测哪个版本正确。
|
|
126
|
+
|
|
127
|
+
## 平台可写与不可写
|
|
128
|
+
|
|
129
|
+
### 平台可直接写文件
|
|
130
|
+
|
|
131
|
+
实际创建或更新 `ai-workspace/`,完成后返回:
|
|
132
|
+
|
|
133
|
+
- change;
|
|
134
|
+
- 当前 phase;
|
|
135
|
+
- 实际写入的相对路径;
|
|
136
|
+
- 已执行的内容门禁与结果;
|
|
137
|
+
- 阻塞项或下一步。
|
|
138
|
+
|
|
139
|
+
只有工具确认成功后才能声称“已持久化”。
|
|
140
|
+
|
|
141
|
+
### 平台无法直接写入文件
|
|
142
|
+
|
|
143
|
+
仍必须形成完整持久化交付。每个发生状态变化的回复都输出所有更新文件的完整内容,而不是只给摘要或 diff:
|
|
144
|
+
|
|
145
|
+
## 持久化交付
|
|
146
|
+
|
|
147
|
+
- 持久化状态:需要保存
|
|
148
|
+
- change:`<change>`
|
|
149
|
+
- 更新文件:列出全部路径
|
|
150
|
+
|
|
151
|
+
### FILE: ai-workspace/status.json
|
|
152
|
+
|
|
153
|
+
```json
|
|
154
|
+
{
|
|
155
|
+
"schema_version": 1,
|
|
156
|
+
"active": []
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### FILE: ai-workspace/changes/<change>/.status.json
|
|
161
|
+
|
|
162
|
+
```json
|
|
163
|
+
{
|
|
164
|
+
"schema_version": 1,
|
|
165
|
+
"change": "<change>",
|
|
166
|
+
"status": "active",
|
|
167
|
+
"phase": "<phase>"
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### FILE: ai-workspace/changes/<change>/<artifact>.md
|
|
172
|
+
|
|
173
|
+
```markdown
|
|
174
|
+
# 工件标题
|
|
175
|
+
|
|
176
|
+
完整工件内容。
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
这类 FILE bundle 是运行产物的运输形式,不是第二份能力定义。下一轮必须先读取用户保存后重新提供的文件,再继续;不能只依赖对话记忆。
|
|
180
|
+
|
|
181
|
+
## 每份文档必须说明的内容
|
|
182
|
+
|
|
183
|
+
一份合格能力文档应直接回答:
|
|
184
|
+
|
|
185
|
+
1. 解决什么问题,何时使用与不使用;
|
|
186
|
+
2. 用户至少需要提供什么;
|
|
187
|
+
3. 事实、推断、偏好与未知如何区分;
|
|
188
|
+
4. 必须按什么顺序工作;
|
|
189
|
+
5. 拥有哪些路径,读取哪些路径,不得修改哪些路径;
|
|
190
|
+
6. 首次运行怎样创建 change;
|
|
191
|
+
7. 暂停时写入哪些文件,恢复时读取哪些文件;
|
|
192
|
+
8. 完成时产生哪些工件,怎样更新状态;
|
|
193
|
+
9. 平台不可写时怎样输出完整文件包;
|
|
194
|
+
10. 高风险、证据不足、并发冲突和验证失败时怎样阻塞。
|
|
195
|
+
|
|
196
|
+
## 定义隔离规则
|
|
197
|
+
|
|
198
|
+
每份文档只保留一次项目地址。除此之外:
|
|
199
|
+
|
|
200
|
+
- 不出现其他网址;
|
|
201
|
+
- 不出现源项目名称或内部体系名称;
|
|
202
|
+
- 不出现源目录、源文件名、内部路径映射或内部脚本;
|
|
203
|
+
- 不出现来源清单、内容哈希、生成时间或源码标签;
|
|
204
|
+
- 不要求上传第二份能力文件;
|
|
205
|
+
- 不把源实现路径当作运行输出路径;
|
|
206
|
+
- 允许并要求出现 canonical 自己定义的 `ai-workspace/`、状态文件和运行工件。
|
|
207
|
+
|
|
208
|
+
## 多轮能力的要求
|
|
209
|
+
|
|
210
|
+
需要多轮交互时必须明确:
|
|
71
211
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
212
|
+
- 第一轮创建或更新哪些文件;
|
|
213
|
+
- 在哪里强制停止;
|
|
214
|
+
- 用户下一条消息需要回答什么;
|
|
215
|
+
- 恢复时读取哪些文件;
|
|
216
|
+
- 哪些内容不得提前输出;
|
|
217
|
+
- 用户已在初始输入中给出答案时如何跳过重复追问;
|
|
218
|
+
- 状态与工件不一致时如何阻塞;
|
|
219
|
+
- 完成后如何保留历史并清理 active 条目。
|
|
77
220
|
|
|
78
|
-
|
|
221
|
+
不能把“恢复快照”当作唯一状态。可复制快照只能在平台不可写时作为完整文件包的一部分。
|
|
79
222
|
|
|
80
|
-
##
|
|
223
|
+
## 内容质量门禁
|
|
81
224
|
|
|
82
|
-
|
|
83
|
-
|------|----------|
|
|
84
|
-
| **Claude Projects** | 项目设置 → Knowledge → 上传文件,或将内容粘贴到 Project Instructions |
|
|
85
|
-
| **ChatGPT 自定义 GPT** | Configure → Knowledge → Upload files |
|
|
86
|
-
| **NotebookLM** | 新建笔记本 → 添加来源 → 上传文件 |
|
|
87
|
-
| **其他平台** | 查找"上传知识库""添加文档""自定义指令"等功能入口 |
|
|
225
|
+
交付前逐项确认:
|
|
88
226
|
|
|
89
|
-
|
|
227
|
+
- 第一条非空行是一级标题;
|
|
228
|
+
- 项目地址恰好出现一次,没有其他网址;
|
|
229
|
+
- 没有源项目目录、文件名、命令、脚本、来源标签或生成清单;
|
|
230
|
+
- 已定义 `ai-workspace/status.json` 与 change `.status.json`;
|
|
231
|
+
- 已列出能力拥有的具体工件路径;
|
|
232
|
+
- 已定义首次运行、暂停、恢复和完成状态;
|
|
233
|
+
- 已定义平台不可写时的完整 FILE bundle;
|
|
234
|
+
- 输出不是通用建议,而是可保存、可验证、可继续运行的工件;
|
|
235
|
+
- 无法执行的动作没有被写成已经完成;
|
|
236
|
+
- 正常、缺失输入、多个候选、证据不足和高风险场景都有明确处理。
|
|
90
237
|
|
|
91
|
-
##
|
|
238
|
+
## 使用方式
|
|
92
239
|
|
|
93
|
-
-
|
|
94
|
-
- **跨 workflow 引用**:如果能力引用了其他 workflow 的文件,在文档开头注明建议的配套上传文件和 GitHub 仓库地址。
|
|
95
|
-
- **canonical-teach.md**:源在仓库外 vendor 目录(`temp/matt-pocock-skills/.../teach/`),不在 `template/` 内,不参与与 template 源文件的同步校验。
|
|
240
|
+
选择与任务匹配的一份能力文档,将它作为项目知识或对话指令上传,然后提供真实问题和材料。模型应先创建或恢复 `ai-workspace/` change,再按能力协议推进。每次状态变化都必须留下实际写入文件或完整可保存文件包。
|