depa-codument 0.4.1
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/LICENSE +21 -0
- package/README.md +262 -0
- package/package.json +63 -0
- package/src/cli/commands/archive.ts +519 -0
- package/src/cli/commands/decisions.ts +123 -0
- package/src/cli/commands/engineering.ts +105 -0
- package/src/cli/commands/init.ts +54 -0
- package/src/cli/commands/list.ts +73 -0
- package/src/cli/commands/modeling.ts +105 -0
- package/src/cli/commands/show.ts +238 -0
- package/src/cli/commands/status.ts +140 -0
- package/src/cli/commands/upgrade-track.ts +385 -0
- package/src/cli/commands/upgrade-workspace.ts +138 -0
- package/src/cli/commands/validate.ts +330 -0
- package/src/cli/engineering/config.ts +68 -0
- package/src/cli/engineering/lint.ts +58 -0
- package/src/cli/engineering/merge.ts +172 -0
- package/src/cli/engineering/registry.ts +230 -0
- package/src/cli/engineering/schema.ts +126 -0
- package/src/cli/engineering/validate.ts +286 -0
- package/src/cli/index.ts +136 -0
- package/src/cli/modeling/config.ts +68 -0
- package/src/cli/modeling/lint.ts +58 -0
- package/src/cli/modeling/merge.ts +172 -0
- package/src/cli/modeling/registry.ts +229 -0
- package/src/cli/modeling/schema.ts +160 -0
- package/src/cli/modeling/validate.ts +282 -0
- package/src/cli/utils/index.ts +941 -0
- package/src/cli/utils/install.ts +291 -0
- package/src/cli/utils/spec-xml.ts +673 -0
- package/src/cli/utils/track-time.ts +75 -0
- package/src/cli/utils/vfs.ts +102 -0
- package/src/templates/codument/README.md +59 -0
- package/src/templates/codument/attractors/product.md +17 -0
- package/src/templates/codument/attractors/project.md +10 -0
- package/src/templates/codument/backlog/README.md +33 -0
- package/src/templates/codument/config/attractor-profiles.xml +31 -0
- package/src/templates/codument/config/engineering.xml +22 -0
- package/src/templates/codument/config/modeling.xml +22 -0
- package/src/templates/codument/config/operation-hooks.xml +55 -0
- package/src/templates/codument/memory/README.md +13 -0
- package/src/templates/codument/missions/README.md +125 -0
- package/src/templates/codument/sop/README.md +14 -0
- package/src/templates/codument/std/AGENTS.md +82 -0
- package/src/templates/codument/std/attractors/depa-attractor.md +572 -0
- package/src/templates/codument/std/attractors/knowledge-tiers.md +128 -0
- package/src/templates/codument/std/attractors/model-driven-docs.md +293 -0
- package/src/templates/codument/std/attractors/project-memory.md +48 -0
- package/src/templates/codument/std/docs-impl-fractal/index.md +110 -0
- package/src/templates/codument/std/docs-modeling-fractal/index.md +156 -0
- package/src/templates/codument/std/kernel-pointer.md +19 -0
- package/src/templates/codument/std/operations/README.md +30 -0
- package/src/templates/codument/std/operations/_operation-spec.md +41 -0
- package/src/templates/codument/std/operations/archive-mission.md +66 -0
- package/src/templates/codument/std/operations/archive-track.md +238 -0
- package/src/templates/codument/std/operations/artifact-sync.md +172 -0
- package/src/templates/codument/std/operations/discuss-phase.md +214 -0
- package/src/templates/codument/std/operations/discuss.md +87 -0
- package/src/templates/codument/std/operations/docs-bootstrap.md +148 -0
- package/src/templates/codument/std/operations/gap-loop.md +301 -0
- package/src/templates/codument/std/operations/impl-mission.md +167 -0
- package/src/templates/codument/std/operations/impl-quick.md +79 -0
- package/src/templates/codument/std/operations/impl-track.md +537 -0
- package/src/templates/codument/std/operations/migrate.md +337 -0
- package/src/templates/codument/std/operations/plan-mission.md +230 -0
- package/src/templates/codument/std/operations/plan-track-wave.md +231 -0
- package/src/templates/codument/std/operations/plan-track.md +579 -0
- package/src/templates/codument/std/operations/revise-track.md +136 -0
- package/src/templates/codument/std/operations/validate.md +339 -0
- package/src/templates/codument/std/operations/verify.md +184 -0
- package/src/templates/codument/std/root-agents.md +39 -0
- package/src/templates/codument/std/sop/questioning.md +98 -0
- package/src/templates/codument/std/sop/tdd.md +26 -0
- package/src/templates/codument/std/sop/validation.md +25 -0
- package/src/templates/codument/std/sop/wave-exec.md +42 -0
- package/src/templates/codument/std/sop/workflow.md +35 -0
- package/src/templates/codument/std/spec/behavior-delta.md +36 -0
- package/src/templates/codument/std/spec/behavior-registry.md +42 -0
- package/src/templates/codument/std/spec/engineering-delta.md +68 -0
- package/src/templates/codument/std/spec/engineering-node-schema.md +86 -0
- package/src/templates/codument/std/spec/engineering-registry.md +82 -0
- package/src/templates/codument/std/spec/flow-notation.md +93 -0
- package/src/templates/codument/std/spec/folder-manifest.md +99 -0
- package/src/templates/codument/std/spec/mission-xml-spec.md +249 -0
- package/src/templates/codument/std/spec/modeling-delta.md +85 -0
- package/src/templates/codument/std/spec/modeling-node-schema.md +183 -0
- package/src/templates/codument/std/spec/modeling-registry.md +49 -0
- package/src/templates/codument/std/spec/track-xml-spec.md +272 -0
- package/src/templates/codument/std/spec/xnl-format.md +301 -0
- package/src/templates/codument/workflows/README.md +15 -0
- package/src/templates/manifest.ts +177 -0
- package/src/templates/skills/README.md +38 -0
- package/src/templates/skills/codument-archive/SKILL.md +17 -0
- package/src/templates/skills/codument-archive-mission/SKILL.md +17 -0
- package/src/templates/skills/codument-archive-track/SKILL.md +17 -0
- package/src/templates/skills/codument-artifact-sync/SKILL.md +17 -0
- package/src/templates/skills/codument-code-quality-score/SKILL.md +67 -0
- package/src/templates/skills/codument-decision-tree/SKILL.md +40 -0
- package/src/templates/skills/codument-discuss/SKILL.md +17 -0
- package/src/templates/skills/codument-discuss-phase/SKILL.md +17 -0
- package/src/templates/skills/codument-docs-bootstrap/SKILL.md +17 -0
- package/src/templates/skills/codument-gap-loop/SKILL.md +17 -0
- package/src/templates/skills/codument-impl-mission/SKILL.md +17 -0
- package/src/templates/skills/codument-impl-quick/SKILL.md +17 -0
- package/src/templates/skills/codument-impl-track/SKILL.md +17 -0
- package/src/templates/skills/codument-implement/SKILL.md +14 -0
- package/src/templates/skills/codument-migrate/SKILL.md +17 -0
- package/src/templates/skills/codument-modeling-engineering-e2e/SKILL.md +74 -0
- package/src/templates/skills/codument-plan-mission/SKILL.md +17 -0
- package/src/templates/skills/codument-plan-track/SKILL.md +17 -0
- package/src/templates/skills/codument-plan-track-wave/SKILL.md +17 -0
- package/src/templates/skills/codument-revise-track/SKILL.md +17 -0
- package/src/templates/skills/codument-track/SKILL.md +14 -0
- package/src/templates/skills/codument-validate/SKILL.md +17 -0
- package/src/templates/skills/codument-verify/SKILL.md +17 -0
- package/src/types/text-assets.d.ts +9 -0
- package/src/version.ts +1 -0
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
> **Provenance(vendored 注记)**
|
|
2
|
+
> - 来源:xnl-core `doc/ai-guide/XnlDataFormatForAi.md`
|
|
3
|
+
> - 版本:xnl-core 0.1.7
|
|
4
|
+
> - vendored 日期:2026-06-21
|
|
5
|
+
> - 原因:npm 包只发布 `dist/`,`doc/` 不在包内,故 vendor 一份作为 codument 的 XNL 语法权威。
|
|
6
|
+
|
|
7
|
+
# XNL 数据格式(大模型版)
|
|
8
|
+
XNL(Extensible Notation Language)
|
|
9
|
+
用于提示大语言模型理解与生成新版短标签的 XNL(Extensible Notation Language)。语法沿用 XML 风格起始标签,但闭合极简,便于对话/提示场景快速书写。
|
|
10
|
+
|
|
11
|
+
## 核心语法速览
|
|
12
|
+
- 开始标签:`<name metadata... sections...>`。
|
|
13
|
+
- 元数据:`key=value` 紧跟在标签名后,可有多个。
|
|
14
|
+
- 属性块:`{ key = value ... }` → 存入 `attributes`。
|
|
15
|
+
- 数组块:`[ item1 item2 <child> ]` → 存入 `body`(元素可为值或子节点)。
|
|
16
|
+
- 唯一子节点块(extend):`( <child1> <child2> )` → 存入 `extend`,同名覆盖旧值并警告,保持出现顺序。
|
|
17
|
+
- 文本块:`<name metadata {attr} ?marker> ... </?marker>`,允许 metadata/`{}`,禁止 `[]`/`()`;标记可选但必须首尾一致。
|
|
18
|
+
- 无其它块时直接以 `>` 结束节点。
|
|
19
|
+
|
|
20
|
+
## 字面量与节点
|
|
21
|
+
- `ValueLiteral` 仅包含:字符串(单双引号,支持 `\\`、`\"`、`\'`、`\n`、`\t`、`\r`)、布尔、null、数值(保留整数/浮点种类)。
|
|
22
|
+
- 对象值:`{ key = value ... }`,键可为标识符或引号字符串;`value` 可以是任意 `XnlNode`(值、对象、数组、元素、注释)。
|
|
23
|
+
- 数组值:`[ ... ]`,元素是 `XnlNode`,因此数组/对象/属性可嵌入完整的子标签结构或值。
|
|
24
|
+
- `metadata`/`attributes`/`body` 同样以 `Record<string, XnlNode>` 或 `XnlNode[]` 表示,可混合值与子元素。
|
|
25
|
+
- 无表达式 `(expr)` 或原始 `<(raw)>` 语义;括号仅用于 extend 块。
|
|
26
|
+
|
|
27
|
+
## 结构与约束
|
|
28
|
+
- 文本块不能与 `[]` 或 `()` 同时出现;可带 metadata 与 `{}`。
|
|
29
|
+
- extend 块必须全是子节点;同名覆盖旧值并产生 `DUPLICATE_CHILD` 警告。
|
|
30
|
+
- 对象/数组/属性值可混合值与标签;当需要唯一子节点语义仍应使用 `()`。
|
|
31
|
+
- 注释 `<!-- ... -->` 可出现在节点间、块内、文本块中;解析时跳过(文本块会移除注释内容)。
|
|
32
|
+
- 多行文本去缩进:去掉首行空行,然后按结束 `</#...>` 行左侧缩进去除前缀(空格/Tab)。
|
|
33
|
+
|
|
34
|
+
## EBNF 摘要
|
|
35
|
+
```ebnf
|
|
36
|
+
Document = S? Node* ;
|
|
37
|
+
Node = TextNode | Element | VoidNode ;
|
|
38
|
+
Element = "<" Name Metadata? Sections ">" ;
|
|
39
|
+
VoidNode = "<" Name Metadata? ">" ;
|
|
40
|
+
TextNode = "<" Name Metadata? AttributeBlock? "?" TextMarker? ">" TextContent "</?" TextMarker? ">" ;
|
|
41
|
+
|
|
42
|
+
Metadata = (S Attribute)* ;
|
|
43
|
+
Attribute = Key S? "=" S? ValueLiteral ;
|
|
44
|
+
Key = Name | String ;
|
|
45
|
+
|
|
46
|
+
Sections = (AttributeBlock | ArrayBlock | ExtendBlock)+ ;
|
|
47
|
+
AttributeBlock = "{" MapEntries "}" ;
|
|
48
|
+
ArrayBlock = "[" ArrayItems "]" ;
|
|
49
|
+
ExtendBlock = "(" ExtendChildren ")" ;
|
|
50
|
+
|
|
51
|
+
MapEntries = (S? MapEntry S?)* ;
|
|
52
|
+
MapEntry = Key S? "=" S? ValueLiteral ;
|
|
53
|
+
ArrayItems = (S? (ValueLiteral | Node) S?)* ;
|
|
54
|
+
ExtendChildren = (S? Node S?)* ; (* child tag names unique; later wins with warning *)
|
|
55
|
+
|
|
56
|
+
ValueLiteral = Literal | ObjectLiteral | ArrayLiteral ;
|
|
57
|
+
ObjectLiteral = "{" (S? MapEntry (S MapEntry)*)? S? "}" ;
|
|
58
|
+
ArrayLiteral = "[" (S? ValueLiteral (S ValueLiteral)*)? S? "]" ;
|
|
59
|
+
|
|
60
|
+
Literal = Boolean | Null | Number | String | IdentifierString ;
|
|
61
|
+
Boolean = "true" | "false" ;
|
|
62
|
+
Null = "null" ;
|
|
63
|
+
Number = Integer | Float ;
|
|
64
|
+
String = DoubleString | SingleString ;
|
|
65
|
+
IdentifierString = IdentifierStart IdentifierChar* ;
|
|
66
|
+
TextMarker = IdentifierString ;
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## 类型定义
|
|
70
|
+
```typescript
|
|
71
|
+
export type NumericKind = "Integer" | "Float";
|
|
72
|
+
|
|
73
|
+
export interface StringValue {
|
|
74
|
+
kind: "String";
|
|
75
|
+
value: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface BooleanValue {
|
|
79
|
+
kind: "Boolean";
|
|
80
|
+
value: boolean;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface NullValue {
|
|
84
|
+
kind: "Null";
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface NumberValue {
|
|
88
|
+
kind: "Number";
|
|
89
|
+
value: number;
|
|
90
|
+
numericKind: NumericKind;
|
|
91
|
+
raw: string;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export type ValueLiteral = StringValue | BooleanValue | NullValue | NumberValue;
|
|
95
|
+
|
|
96
|
+
export interface ObjectValue {
|
|
97
|
+
kind: "Object";
|
|
98
|
+
entries: Record<string, XnlNode>;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface ArrayValue {
|
|
102
|
+
kind: "Array";
|
|
103
|
+
items: XnlNode[];
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export type AttributeMap = Record<string, XnlNode>;
|
|
107
|
+
|
|
108
|
+
export interface ExtendBody {
|
|
109
|
+
order: string[];
|
|
110
|
+
children: Record<string, ElementNode>;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface ElementNode {
|
|
114
|
+
name: string;
|
|
115
|
+
metadata: AttributeMap;
|
|
116
|
+
attributes?: AttributeMap;
|
|
117
|
+
body?: XnlNode[];
|
|
118
|
+
extend?: ExtendBody;
|
|
119
|
+
text?: string;
|
|
120
|
+
textMarker?: string;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export interface CommentNode {
|
|
124
|
+
type: "Comment";
|
|
125
|
+
value: string;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export type ContainerNode = ArrayValue | ObjectValue | ElementNode;
|
|
129
|
+
|
|
130
|
+
export type XnlNode = ValueLiteral | ContainerNode | CommentNode;
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## 示例
|
|
135
|
+
```xnl
|
|
136
|
+
<doc [
|
|
137
|
+
<no_body_node1>
|
|
138
|
+
<no_body_node2 a=[1] b={c=3}>
|
|
139
|
+
<metadata_demo1 xx=1 {
|
|
140
|
+
a = 'abc'
|
|
141
|
+
b = "tt\t\n"
|
|
142
|
+
c = { inner = 2 }
|
|
143
|
+
"string as key" = 2.3
|
|
144
|
+
'string as key2' = 3.4
|
|
145
|
+
}>
|
|
146
|
+
<list_body1 [
|
|
147
|
+
1 2 <item id="x" count=3 active=true note="hi">
|
|
148
|
+
]>
|
|
149
|
+
<has_extend1 (
|
|
150
|
+
<a {v=1}>
|
|
151
|
+
<a {v=2}> <!-- 覆盖前一个 a,产生 DUPLICATE_CHILD 警告 -->
|
|
152
|
+
)>
|
|
153
|
+
<has_extend2 (
|
|
154
|
+
<abc {
|
|
155
|
+
a = [1 2]
|
|
156
|
+
b = {c = 3}
|
|
157
|
+
}>
|
|
158
|
+
<efg [
|
|
159
|
+
1
|
|
160
|
+
<b>
|
|
161
|
+
]>
|
|
162
|
+
)>
|
|
163
|
+
<mixed_1 {
|
|
164
|
+
a = 1
|
|
165
|
+
} [
|
|
166
|
+
1
|
|
167
|
+
[2 3]
|
|
168
|
+
<tt>
|
|
169
|
+
] (
|
|
170
|
+
<abc {
|
|
171
|
+
a = [1 2]
|
|
172
|
+
b = {c = 3}
|
|
173
|
+
}>
|
|
174
|
+
<efg [
|
|
175
|
+
1
|
|
176
|
+
<b>
|
|
177
|
+
]>
|
|
178
|
+
)>
|
|
179
|
+
<text1 a=1 {b="zh"} ?>
|
|
180
|
+
在纯文本内部,无需转义,例如 & < > #
|
|
181
|
+
可以包含形如 <notatag 的内容,均按文本处理
|
|
182
|
+
多行文本会按结束标签所在行的缩进去除前缀
|
|
183
|
+
</?>
|
|
184
|
+
<text2 a=1 {b="cc"} ?flag_1234>
|
|
185
|
+
如果文本中包含 `</?>` 字样,可在开始标签后加标记,如 `?flag_1234`
|
|
186
|
+
结束标签必须使用相同标记 `?flag_1234`
|
|
187
|
+
</?flag_1234>
|
|
188
|
+
]>
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## 生成检查清单
|
|
192
|
+
- 文本块用 `<name ... ?marker?> ... </?marker?>`,不与 `[]`/`()` 同用;metadata 与 `{}` 可放在 `?` 前。
|
|
193
|
+
- extend 块只写子节点,同名覆盖并警告;需要多个同名请改用数组块。
|
|
194
|
+
- 键名若含空格/特殊字符请加引号;字符串可用单/双引号。
|
|
195
|
+
- 注释可写,但会被忽略;文本内注释也会被移除。
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
## ❌ 常见错误示例
|
|
199
|
+
|
|
200
|
+
**闭合标签类型不匹配**是最容易犯的错误!开始标签的类型必须与结束标签的类型严格对应
|
|
201
|
+
**使用了xml的闭合标签规则**是其次最容易犯的错误!虽然看起来类似,但是实际内部结构和xml有极大的不同
|
|
202
|
+
|
|
203
|
+
### 闭合标签不匹配
|
|
204
|
+
#### ❌ 错误示例
|
|
205
|
+
|
|
206
|
+
```xnl
|
|
207
|
+
<SetVariable id="SetVariable-a" {
|
|
208
|
+
name="SetVariable"
|
|
209
|
+
assignTo = "sum"
|
|
210
|
+
]> ❌ 错误!`{` 对应 `}`,不是 `]`
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
#### ✅ 正确示例
|
|
214
|
+
|
|
215
|
+
```xnl
|
|
216
|
+
<SetVariable id="SetVariable-a" {
|
|
217
|
+
name="SetVariable"
|
|
218
|
+
assignTo = "sum"
|
|
219
|
+
}> ✅ 正确! `{` 对应 `}`
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### 文本节点使用了xml的结束标签规则
|
|
223
|
+
#### ❌ 错误示例1
|
|
224
|
+
|
|
225
|
+
```xnl
|
|
226
|
+
<div id="" ?>
|
|
227
|
+
</div> ❌ 错误!文本标签的结束,如果没有自定义marker,应当用`</?>`,不是 `</div>`
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
#### ❌ 错误示例2
|
|
231
|
+
|
|
232
|
+
```xnl
|
|
233
|
+
<div id="" ?>
|
|
234
|
+
</?>
|
|
235
|
+
</div> ❌ 错误! 前面已经通过</?>,闭合了标签,不能再添加类似xml的结束标签
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
#### ✅ 正确示例
|
|
239
|
+
|
|
240
|
+
```xnl
|
|
241
|
+
<div id="" ?>
|
|
242
|
+
</?>
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
### 文本节点自定义的marker不匹配
|
|
247
|
+
#### ❌ 错误示例
|
|
248
|
+
|
|
249
|
+
```xnl
|
|
250
|
+
<my_text id="" ?ttt>
|
|
251
|
+
content
|
|
252
|
+
</?qqq>
|
|
253
|
+
❌ 错误!文本标签的结束,如果有marker,应当与开始节点一致`</?ttt>`,不能是其他marker,例如本例中错误的 `</?qqq>`
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
#### ✅ 正确示例
|
|
257
|
+
|
|
258
|
+
```xnl
|
|
259
|
+
<my_text id="" ?ttt>
|
|
260
|
+
content
|
|
261
|
+
</?ttt>
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
### 元素标签名含冒号
|
|
266
|
+
XNL 元素标签名**禁含冒号**。命名空间 / 领域前缀(如 codument modeling 的 shell kind `backend:endpoint`、`surface:route`)应放进 `kind` **属性**表达,**不要写进标签名**——标签名写冒号会触发 XNL 语法错(如 `Expected metadata key`)。
|
|
267
|
+
|
|
268
|
+
#### ❌ 错误示例
|
|
269
|
+
|
|
270
|
+
```xnl
|
|
271
|
+
<backend:endpoint id="place_order" kind="backend:endpoint"> ❌ 错误!标签名 `backend:endpoint` 含冒号 → 语法错(解析器在冒号处期望 metadata key)
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
#### ✅ 正确示例
|
|
275
|
+
|
|
276
|
+
```xnl
|
|
277
|
+
<endpoint id="place_order" kind="backend:endpoint"> ✅ 正确!标签名是普通词 `endpoint`,命名空间 kind 放进 `kind` 属性
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
### component 四块未用裸标签
|
|
282
|
+
(codument modeling 约定)`component` 节点的 runtime / input / config / output 四块**用裸标签** `<runtime>` / `<input>` / `<config>` / `<output>`(canonical / 推荐)。`<types role="runtime">` 这类 role 写法 `validate` 也兼容接受,但**裸标签为推荐形式**。
|
|
283
|
+
|
|
284
|
+
#### ❌ 不推荐(accepted-but-discouraged)
|
|
285
|
+
|
|
286
|
+
```xnl
|
|
287
|
+
<component id="place_order_proc" kind="component" [
|
|
288
|
+
<types role="runtime" ?r>type Runtime = { clock: Clock }</?r>
|
|
289
|
+
]>
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
#### ✅ 推荐(canonical)
|
|
293
|
+
|
|
294
|
+
```xnl
|
|
295
|
+
<component id="place_order_proc" kind="component" [
|
|
296
|
+
<runtime ?r>type Runtime = { clock: Clock }</?r>
|
|
297
|
+
<input ?i>interface Input { cartId: string }</?i>
|
|
298
|
+
<config ?c>interface Config { maxLines: number }</?c>
|
|
299
|
+
<output ?o>interface Output { orderId: string }</?o>
|
|
300
|
+
]>
|
|
301
|
+
```
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# codument/workflows/ —— dynamic-workflow 流程的存放目录
|
|
2
|
+
|
|
3
|
+
本目录用于存放结构化 workflow 的 definitions 与 instances,布局与通用 workflow 规范保持一致:
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
workflows/
|
|
7
|
+
├── definitions/ 预制可复用单元(AgentTaskDefinition / 类型包),与 dynamic-workflow 同格式
|
|
8
|
+
└── instances/ BTWorkflow 流程实例(process-instance.xml 等)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
- 这里放的是**结构化、可被引擎执行的流程定义/实例**(`BTWorkflow` + `<Imports>`/`<Ports>`/`<Hook>`/`<TaskSpace>`/`<Extension>`),复用同一内核。
|
|
12
|
+
- 与 codument 自身:codument track(`track.xml`)的 `<TaskSpace>` 与这里 BTWorkflow 的 task-space **同构**,可互相引用/嵌入;codument 的 `cdt:` check 是内置节点类型(配置在节点上),dynamic-workflow 侧也可用同名 kind。
|
|
13
|
+
- **业务自定义的执行流程(文字/SOP 型)不放这里**——放 `codument/std/sop/`(见 `../sop/README.md`)。
|
|
14
|
+
|
|
15
|
+
> 具体 definitions/instances 按项目需要补充。
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
// AUTO-GENERATED by scripts/gen-template-manifest.ts — do not edit by hand.
|
|
2
|
+
// Regenerate after changing anything under src/templates/:
|
|
3
|
+
// bun run scripts/gen-template-manifest.ts
|
|
4
|
+
|
|
5
|
+
import f0 from './codument/README.md' with { type: 'text' };
|
|
6
|
+
import f1 from './codument/attractors/product.md' with { type: 'text' };
|
|
7
|
+
import f2 from './codument/attractors/project.md' with { type: 'text' };
|
|
8
|
+
import f3 from './codument/backlog/README.md' with { type: 'text' };
|
|
9
|
+
import f4 from './codument/config/attractor-profiles.xml' with { type: 'text' };
|
|
10
|
+
import f5 from './codument/config/engineering.xml' with { type: 'text' };
|
|
11
|
+
import f6 from './codument/config/modeling.xml' with { type: 'text' };
|
|
12
|
+
import f7 from './codument/config/operation-hooks.xml' with { type: 'text' };
|
|
13
|
+
import f8 from './codument/memory/README.md' with { type: 'text' };
|
|
14
|
+
import f9 from './codument/missions/README.md' with { type: 'text' };
|
|
15
|
+
import f10 from './codument/sop/README.md' with { type: 'text' };
|
|
16
|
+
import f11 from './codument/std/AGENTS.md' with { type: 'text' };
|
|
17
|
+
import f12 from './codument/std/attractors/depa-attractor.md' with { type: 'text' };
|
|
18
|
+
import f13 from './codument/std/attractors/knowledge-tiers.md' with { type: 'text' };
|
|
19
|
+
import f14 from './codument/std/attractors/model-driven-docs.md' with { type: 'text' };
|
|
20
|
+
import f15 from './codument/std/attractors/project-memory.md' with { type: 'text' };
|
|
21
|
+
import f16 from './codument/std/docs-impl-fractal/index.md' with { type: 'text' };
|
|
22
|
+
import f17 from './codument/std/docs-modeling-fractal/index.md' with { type: 'text' };
|
|
23
|
+
import f18 from './codument/std/kernel-pointer.md' with { type: 'text' };
|
|
24
|
+
import f19 from './codument/std/operations/README.md' with { type: 'text' };
|
|
25
|
+
import f20 from './codument/std/operations/_operation-spec.md' with { type: 'text' };
|
|
26
|
+
import f21 from './codument/std/operations/archive-mission.md' with { type: 'text' };
|
|
27
|
+
import f22 from './codument/std/operations/archive-track.md' with { type: 'text' };
|
|
28
|
+
import f23 from './codument/std/operations/artifact-sync.md' with { type: 'text' };
|
|
29
|
+
import f24 from './codument/std/operations/discuss-phase.md' with { type: 'text' };
|
|
30
|
+
import f25 from './codument/std/operations/discuss.md' with { type: 'text' };
|
|
31
|
+
import f26 from './codument/std/operations/docs-bootstrap.md' with { type: 'text' };
|
|
32
|
+
import f27 from './codument/std/operations/gap-loop.md' with { type: 'text' };
|
|
33
|
+
import f28 from './codument/std/operations/impl-mission.md' with { type: 'text' };
|
|
34
|
+
import f29 from './codument/std/operations/impl-quick.md' with { type: 'text' };
|
|
35
|
+
import f30 from './codument/std/operations/impl-track.md' with { type: 'text' };
|
|
36
|
+
import f31 from './codument/std/operations/migrate.md' with { type: 'text' };
|
|
37
|
+
import f32 from './codument/std/operations/plan-mission.md' with { type: 'text' };
|
|
38
|
+
import f33 from './codument/std/operations/plan-track-wave.md' with { type: 'text' };
|
|
39
|
+
import f34 from './codument/std/operations/plan-track.md' with { type: 'text' };
|
|
40
|
+
import f35 from './codument/std/operations/revise-track.md' with { type: 'text' };
|
|
41
|
+
import f36 from './codument/std/operations/validate.md' with { type: 'text' };
|
|
42
|
+
import f37 from './codument/std/operations/verify.md' with { type: 'text' };
|
|
43
|
+
import f38 from './codument/std/root-agents.md' with { type: 'text' };
|
|
44
|
+
import f39 from './codument/std/sop/questioning.md' with { type: 'text' };
|
|
45
|
+
import f40 from './codument/std/sop/tdd.md' with { type: 'text' };
|
|
46
|
+
import f41 from './codument/std/sop/validation.md' with { type: 'text' };
|
|
47
|
+
import f42 from './codument/std/sop/wave-exec.md' with { type: 'text' };
|
|
48
|
+
import f43 from './codument/std/sop/workflow.md' with { type: 'text' };
|
|
49
|
+
import f44 from './codument/std/spec/behavior-delta.md' with { type: 'text' };
|
|
50
|
+
import f45 from './codument/std/spec/behavior-registry.md' with { type: 'text' };
|
|
51
|
+
import f46 from './codument/std/spec/engineering-delta.md' with { type: 'text' };
|
|
52
|
+
import f47 from './codument/std/spec/engineering-node-schema.md' with { type: 'text' };
|
|
53
|
+
import f48 from './codument/std/spec/engineering-registry.md' with { type: 'text' };
|
|
54
|
+
import f49 from './codument/std/spec/flow-notation.md' with { type: 'text' };
|
|
55
|
+
import f50 from './codument/std/spec/folder-manifest.md' with { type: 'text' };
|
|
56
|
+
import f51 from './codument/std/spec/mission-xml-spec.md' with { type: 'text' };
|
|
57
|
+
import f52 from './codument/std/spec/modeling-delta.md' with { type: 'text' };
|
|
58
|
+
import f53 from './codument/std/spec/modeling-node-schema.md' with { type: 'text' };
|
|
59
|
+
import f54 from './codument/std/spec/modeling-registry.md' with { type: 'text' };
|
|
60
|
+
import f55 from './codument/std/spec/track-xml-spec.md' with { type: 'text' };
|
|
61
|
+
import f56 from './codument/std/spec/xnl-format.md' with { type: 'text' };
|
|
62
|
+
import f57 from './codument/workflows/README.md' with { type: 'text' };
|
|
63
|
+
import f58 from './skills/README.md' with { type: 'text' };
|
|
64
|
+
import f59 from './skills/codument-archive-mission/SKILL.md' with { type: 'text' };
|
|
65
|
+
import f60 from './skills/codument-archive-track/SKILL.md' with { type: 'text' };
|
|
66
|
+
import f61 from './skills/codument-archive/SKILL.md' with { type: 'text' };
|
|
67
|
+
import f62 from './skills/codument-artifact-sync/SKILL.md' with { type: 'text' };
|
|
68
|
+
import f63 from './skills/codument-code-quality-score/SKILL.md' with { type: 'text' };
|
|
69
|
+
import f64 from './skills/codument-decision-tree/SKILL.md' with { type: 'text' };
|
|
70
|
+
import f65 from './skills/codument-discuss-phase/SKILL.md' with { type: 'text' };
|
|
71
|
+
import f66 from './skills/codument-discuss/SKILL.md' with { type: 'text' };
|
|
72
|
+
import f67 from './skills/codument-docs-bootstrap/SKILL.md' with { type: 'text' };
|
|
73
|
+
import f68 from './skills/codument-gap-loop/SKILL.md' with { type: 'text' };
|
|
74
|
+
import f69 from './skills/codument-impl-mission/SKILL.md' with { type: 'text' };
|
|
75
|
+
import f70 from './skills/codument-impl-quick/SKILL.md' with { type: 'text' };
|
|
76
|
+
import f71 from './skills/codument-impl-track/SKILL.md' with { type: 'text' };
|
|
77
|
+
import f72 from './skills/codument-implement/SKILL.md' with { type: 'text' };
|
|
78
|
+
import f73 from './skills/codument-migrate/SKILL.md' with { type: 'text' };
|
|
79
|
+
import f74 from './skills/codument-modeling-engineering-e2e/SKILL.md' with { type: 'text' };
|
|
80
|
+
import f75 from './skills/codument-plan-mission/SKILL.md' with { type: 'text' };
|
|
81
|
+
import f76 from './skills/codument-plan-track-wave/SKILL.md' with { type: 'text' };
|
|
82
|
+
import f77 from './skills/codument-plan-track/SKILL.md' with { type: 'text' };
|
|
83
|
+
import f78 from './skills/codument-revise-track/SKILL.md' with { type: 'text' };
|
|
84
|
+
import f79 from './skills/codument-track/SKILL.md' with { type: 'text' };
|
|
85
|
+
import f80 from './skills/codument-validate/SKILL.md' with { type: 'text' };
|
|
86
|
+
import f81 from './skills/codument-verify/SKILL.md' with { type: 'text' };
|
|
87
|
+
|
|
88
|
+
export interface TemplateFile {
|
|
89
|
+
/** Path relative to src/templates/, e.g. "codument/std/AGENTS.md" or "skills/codument-track/SKILL.md". */
|
|
90
|
+
path: string;
|
|
91
|
+
content: string;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export const TEMPLATE_FILES: TemplateFile[] = [
|
|
95
|
+
{ path: "codument/README.md", content: f0 },
|
|
96
|
+
{ path: "codument/attractors/product.md", content: f1 },
|
|
97
|
+
{ path: "codument/attractors/project.md", content: f2 },
|
|
98
|
+
{ path: "codument/backlog/README.md", content: f3 },
|
|
99
|
+
{ path: "codument/config/attractor-profiles.xml", content: f4 },
|
|
100
|
+
{ path: "codument/config/engineering.xml", content: f5 },
|
|
101
|
+
{ path: "codument/config/modeling.xml", content: f6 },
|
|
102
|
+
{ path: "codument/config/operation-hooks.xml", content: f7 },
|
|
103
|
+
{ path: "codument/memory/README.md", content: f8 },
|
|
104
|
+
{ path: "codument/missions/README.md", content: f9 },
|
|
105
|
+
{ path: "codument/sop/README.md", content: f10 },
|
|
106
|
+
{ path: "codument/std/AGENTS.md", content: f11 },
|
|
107
|
+
{ path: "codument/std/attractors/depa-attractor.md", content: f12 },
|
|
108
|
+
{ path: "codument/std/attractors/knowledge-tiers.md", content: f13 },
|
|
109
|
+
{ path: "codument/std/attractors/model-driven-docs.md", content: f14 },
|
|
110
|
+
{ path: "codument/std/attractors/project-memory.md", content: f15 },
|
|
111
|
+
{ path: "codument/std/docs-impl-fractal/index.md", content: f16 },
|
|
112
|
+
{ path: "codument/std/docs-modeling-fractal/index.md", content: f17 },
|
|
113
|
+
{ path: "codument/std/kernel-pointer.md", content: f18 },
|
|
114
|
+
{ path: "codument/std/operations/README.md", content: f19 },
|
|
115
|
+
{ path: "codument/std/operations/_operation-spec.md", content: f20 },
|
|
116
|
+
{ path: "codument/std/operations/archive-mission.md", content: f21 },
|
|
117
|
+
{ path: "codument/std/operations/archive-track.md", content: f22 },
|
|
118
|
+
{ path: "codument/std/operations/artifact-sync.md", content: f23 },
|
|
119
|
+
{ path: "codument/std/operations/discuss-phase.md", content: f24 },
|
|
120
|
+
{ path: "codument/std/operations/discuss.md", content: f25 },
|
|
121
|
+
{ path: "codument/std/operations/docs-bootstrap.md", content: f26 },
|
|
122
|
+
{ path: "codument/std/operations/gap-loop.md", content: f27 },
|
|
123
|
+
{ path: "codument/std/operations/impl-mission.md", content: f28 },
|
|
124
|
+
{ path: "codument/std/operations/impl-quick.md", content: f29 },
|
|
125
|
+
{ path: "codument/std/operations/impl-track.md", content: f30 },
|
|
126
|
+
{ path: "codument/std/operations/migrate.md", content: f31 },
|
|
127
|
+
{ path: "codument/std/operations/plan-mission.md", content: f32 },
|
|
128
|
+
{ path: "codument/std/operations/plan-track-wave.md", content: f33 },
|
|
129
|
+
{ path: "codument/std/operations/plan-track.md", content: f34 },
|
|
130
|
+
{ path: "codument/std/operations/revise-track.md", content: f35 },
|
|
131
|
+
{ path: "codument/std/operations/validate.md", content: f36 },
|
|
132
|
+
{ path: "codument/std/operations/verify.md", content: f37 },
|
|
133
|
+
{ path: "codument/std/root-agents.md", content: f38 },
|
|
134
|
+
{ path: "codument/std/sop/questioning.md", content: f39 },
|
|
135
|
+
{ path: "codument/std/sop/tdd.md", content: f40 },
|
|
136
|
+
{ path: "codument/std/sop/validation.md", content: f41 },
|
|
137
|
+
{ path: "codument/std/sop/wave-exec.md", content: f42 },
|
|
138
|
+
{ path: "codument/std/sop/workflow.md", content: f43 },
|
|
139
|
+
{ path: "codument/std/spec/behavior-delta.md", content: f44 },
|
|
140
|
+
{ path: "codument/std/spec/behavior-registry.md", content: f45 },
|
|
141
|
+
{ path: "codument/std/spec/engineering-delta.md", content: f46 },
|
|
142
|
+
{ path: "codument/std/spec/engineering-node-schema.md", content: f47 },
|
|
143
|
+
{ path: "codument/std/spec/engineering-registry.md", content: f48 },
|
|
144
|
+
{ path: "codument/std/spec/flow-notation.md", content: f49 },
|
|
145
|
+
{ path: "codument/std/spec/folder-manifest.md", content: f50 },
|
|
146
|
+
{ path: "codument/std/spec/mission-xml-spec.md", content: f51 },
|
|
147
|
+
{ path: "codument/std/spec/modeling-delta.md", content: f52 },
|
|
148
|
+
{ path: "codument/std/spec/modeling-node-schema.md", content: f53 },
|
|
149
|
+
{ path: "codument/std/spec/modeling-registry.md", content: f54 },
|
|
150
|
+
{ path: "codument/std/spec/track-xml-spec.md", content: f55 },
|
|
151
|
+
{ path: "codument/std/spec/xnl-format.md", content: f56 },
|
|
152
|
+
{ path: "codument/workflows/README.md", content: f57 },
|
|
153
|
+
{ path: "skills/README.md", content: f58 },
|
|
154
|
+
{ path: "skills/codument-archive-mission/SKILL.md", content: f59 },
|
|
155
|
+
{ path: "skills/codument-archive-track/SKILL.md", content: f60 },
|
|
156
|
+
{ path: "skills/codument-archive/SKILL.md", content: f61 },
|
|
157
|
+
{ path: "skills/codument-artifact-sync/SKILL.md", content: f62 },
|
|
158
|
+
{ path: "skills/codument-code-quality-score/SKILL.md", content: f63 },
|
|
159
|
+
{ path: "skills/codument-decision-tree/SKILL.md", content: f64 },
|
|
160
|
+
{ path: "skills/codument-discuss-phase/SKILL.md", content: f65 },
|
|
161
|
+
{ path: "skills/codument-discuss/SKILL.md", content: f66 },
|
|
162
|
+
{ path: "skills/codument-docs-bootstrap/SKILL.md", content: f67 },
|
|
163
|
+
{ path: "skills/codument-gap-loop/SKILL.md", content: f68 },
|
|
164
|
+
{ path: "skills/codument-impl-mission/SKILL.md", content: f69 },
|
|
165
|
+
{ path: "skills/codument-impl-quick/SKILL.md", content: f70 },
|
|
166
|
+
{ path: "skills/codument-impl-track/SKILL.md", content: f71 },
|
|
167
|
+
{ path: "skills/codument-implement/SKILL.md", content: f72 },
|
|
168
|
+
{ path: "skills/codument-migrate/SKILL.md", content: f73 },
|
|
169
|
+
{ path: "skills/codument-modeling-engineering-e2e/SKILL.md", content: f74 },
|
|
170
|
+
{ path: "skills/codument-plan-mission/SKILL.md", content: f75 },
|
|
171
|
+
{ path: "skills/codument-plan-track-wave/SKILL.md", content: f76 },
|
|
172
|
+
{ path: "skills/codument-plan-track/SKILL.md", content: f77 },
|
|
173
|
+
{ path: "skills/codument-revise-track/SKILL.md", content: f78 },
|
|
174
|
+
{ path: "skills/codument-track/SKILL.md", content: f79 },
|
|
175
|
+
{ path: "skills/codument-validate/SKILL.md", content: f80 },
|
|
176
|
+
{ path: "skills/codument-verify/SKILL.md", content: f81 },
|
|
177
|
+
];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Codument agent skill 壳
|
|
2
|
+
|
|
3
|
+
本目录是 **coding-agent 标准的 skill 壳**集合:每个操作一个目录,内含一份 `SKILL.md`(frontmatter `name`+`description` + 薄壳正文)。**codument 安装时把这些壳复制进对应 coding agent 的 skill 安装目录**(如 `.claude/skills/`)。
|
|
4
|
+
|
|
5
|
+
壳是**薄壳**:它只声明"何时用"(description 供 agent 路由)+ 指向工作区里**权威的操作 body**——`@/codument/std/operations/<op>.md`,由 agent 打开并遵循。真正的提示词内容、规则、流程都在 `@/codument/std/operations/`(不在壳里),从而:
|
|
6
|
+
|
|
7
|
+
- 壳随 agent 安装目录走、轻量、可被多种 agent 复用;
|
|
8
|
+
- body 随项目工作区(`@/codument/`)走、自包含、可被 `upgrade-workspace` 刷新;
|
|
9
|
+
- 不重复、不双源——壳变更频率低,body 是唯一真源。
|
|
10
|
+
|
|
11
|
+
## 壳 → body 映射
|
|
12
|
+
|
|
13
|
+
| skill 壳目录 | 指向的 body |
|
|
14
|
+
|---|---|
|
|
15
|
+
| `codument-impl-quick/` | `@/codument/std/operations/impl-quick.md` |
|
|
16
|
+
| `codument-discuss/` | `@/codument/std/operations/discuss.md` |
|
|
17
|
+
| `codument-plan-track/` | `@/codument/std/operations/plan-track.md` |
|
|
18
|
+
| `codument-discuss-phase/` | `@/codument/std/operations/discuss-phase.md` |
|
|
19
|
+
| `codument-plan-track-wave/` | `@/codument/std/operations/plan-track-wave.md` |
|
|
20
|
+
| `codument-impl-track/` | `@/codument/std/operations/impl-track.md` |
|
|
21
|
+
| `codument-gap-loop/` | `@/codument/std/operations/gap-loop.md` |
|
|
22
|
+
| `codument-verify/` | `@/codument/std/operations/verify.md` |
|
|
23
|
+
| `codument-revise-track/` | `@/codument/std/operations/revise-track.md` |
|
|
24
|
+
| `codument-validate/` | `@/codument/std/operations/validate.md` |
|
|
25
|
+
| `codument-archive-track/` | `@/codument/std/operations/archive-track.md` |
|
|
26
|
+
| `codument-plan-mission/` | `@/codument/std/operations/plan-mission.md` |
|
|
27
|
+
| `codument-impl-mission/` | `@/codument/std/operations/impl-mission.md` |
|
|
28
|
+
| `codument-archive-mission/` | `@/codument/std/operations/archive-mission.md` |
|
|
29
|
+
| `codument-artifact-sync/` | `@/codument/std/operations/artifact-sync.md` |
|
|
30
|
+
| `codument-docs-bootstrap/` | `@/codument/std/operations/docs-bootstrap.md` |
|
|
31
|
+
| `codument-migrate/` | `@/codument/std/operations/migrate.md` |
|
|
32
|
+
| `codument-decision-tree/` | 直接遵循 `@/codument/std/sop/questioning.md`,生成 decision-tree 并回写 decisions |
|
|
33
|
+
| `codument-modeling-engineering-e2e/` | 直接运行 `scripts/verify-modeling-engineering-e2e.sh` 的真实 E2E 操作 skill |
|
|
34
|
+
| `codument-code-quality-score/` | 直接运行 `scripts/score-e2e-code-quality.ts` 并做证据化代码质量评价的 skill |
|
|
35
|
+
|
|
36
|
+
CLI 辅助命令 `codument init` / `codument status` 不再提供 agent skill 壳;它们作为普通 CLI 命令使用。
|
|
37
|
+
|
|
38
|
+
> `SKILL.md` 采用 Agent Skills 标准:`name`(=目录名,小写连字符)+ `description`(agent 据此决定何时调用)+ 薄壳正文。其它 agent 专属命令格式(codex/opencode/…)由 codument 生成器按 agent 类型从同一 body 派生。
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codument-archive
|
|
3
|
+
description: [已更名为 codument-archive-track] 归档已完成 track——提升 behavior 进 behaviors/、移入 archive/、按开关条件提升 decision/memory、按显式 hook 同步 docs/制品、校验。track 完成并部署后收口时使用。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Codument · archive
|
|
7
|
+
|
|
8
|
+
这是 codument **archive** 操作的 skill 壳。**权威提示词在工作区** body——打开并**严格遵循**:
|
|
9
|
+
|
|
10
|
+
`@/codument/std/operations/archive-track.md`
|
|
11
|
+
|
|
12
|
+
按其中的 Markdown 说明 + `--` 流程标记块执行(带条件 gate 的提升流水线);behavior 提升格式见 `@/codument/std/spec/behavior-registry.md`,晋升判定权威见 `@/codument/std/attractors/knowledge-tiers.md` §4–§5(均由 body 引用)。
|
|
13
|
+
|
|
14
|
+
- **前置**:项目已通过 `codument init` 初始化,目标 track 已完成。
|
|
15
|
+
- **用法**:归档 track: `<track-id>`。
|
|
16
|
+
|
|
17
|
+
> 壳只做路由,不重述规则。一切以 `@/codument/std/operations/archive-track.md` 为准。
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codument-archive-mission
|
|
3
|
+
description: 归档 mission——把 completed/cancelled/superseded mission 移入 codument/missions/archived/YYYY-MM-DD-<mission-id>/,并按配置提升 durable decisions/memory。mission 收口时使用。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Codument · archive-mission
|
|
7
|
+
|
|
8
|
+
这是 codument **archive-mission** 操作的 skill 壳。**权威提示词在工作区** body——打开并**严格遵循**:
|
|
9
|
+
|
|
10
|
+
`@/codument/std/operations/archive-mission.md`
|
|
11
|
+
|
|
12
|
+
mission.xml 规范见 `@/codument/std/spec/mission-xml-spec.md`;归档晋升判定见 `@/codument/std/attractors/knowledge-tiers.md`。
|
|
13
|
+
|
|
14
|
+
- **前置**:项目已通过 `codument init` 初始化,目标 mission 已完成、取消、废弃或被替代。
|
|
15
|
+
- **用法**:归档 mission: `<mission-id>`。
|
|
16
|
+
|
|
17
|
+
> 壳只做路由,不重述规则。一切以 `@/codument/std/operations/archive-mission.md` 为准。
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codument-archive-track
|
|
3
|
+
description: 归档已完成 track——提升 behavior 进 behaviors/、移入 archive/、按开关条件提升 decision/memory、按显式 hook 同步 docs/制品、校验。track 完成并部署后收口时使用。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Codument · archive-track
|
|
7
|
+
|
|
8
|
+
这是 codument **archive** 操作的 skill 壳。**权威提示词在工作区** body——打开并**严格遵循**:
|
|
9
|
+
|
|
10
|
+
`@/codument/std/operations/archive-track.md`
|
|
11
|
+
|
|
12
|
+
按其中的 Markdown 说明 + `--` 流程标记块执行(带条件 gate 的提升流水线);behavior 提升格式见 `@/codument/std/spec/behavior-registry.md`,晋升判定权威见 `@/codument/std/attractors/knowledge-tiers.md` §4–§5(均由 body 引用)。
|
|
13
|
+
|
|
14
|
+
- **前置**:项目已通过 `codument init` 初始化,目标 track 已完成。
|
|
15
|
+
- **用法**:归档 track: `<track-id>`。
|
|
16
|
+
|
|
17
|
+
> 壳只做路由,不重述规则。一切以 `@/codument/std/operations/archive-track.md` 为准。
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codument-artifact-sync
|
|
3
|
+
description: 把 track 的 output 物料(docs/制品目录)按规则同步到一个或多个目标位置(dry-run/conflict/provenance 策略)。显式 hook 触发或手动同步制品时使用;不隐式触发。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Codument · artifact-sync
|
|
7
|
+
|
|
8
|
+
这是 codument **artifact-sync** 操作的 skill 壳。**权威提示词在工作区** body——打开并**严格遵循**:
|
|
9
|
+
|
|
10
|
+
`@/codument/std/operations/artifact-sync.md`
|
|
11
|
+
|
|
12
|
+
按其中的 Markdown 说明 + `--` 流程标记块执行(解析来源=track output MaterialBundle / 目标根 → fresh 子代理生成 → 按 policy 写);docs 路由/质量规则见 `@/codument/std/operations/artifact-sync.md` §4.5(body 引用)。
|
|
13
|
+
|
|
14
|
+
- **前置**:项目已通过 `codument init` 初始化,对应 profile(如 `docs`)已 enabled,且 hook 显式配置或用户手动调用。
|
|
15
|
+
- **用法**:同步 artifact: `<artifact>` [track-id]。
|
|
16
|
+
|
|
17
|
+
> 壳只做路由,不重述规则。一切以 `@/codument/std/operations/artifact-sync.md` 为准。
|