@cyning/harness 1.0.2 → 2.0.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/CHANGELOG.md +45 -0
- package/README.md +4 -2
- package/docs/USER_GUIDE_v1.0_zh.md +95 -6
- package/docs/methodology/graph/DECISIONS_hgm_g1_maintainer_v1_zh.md +196 -0
- package/docs/methodology/graph/HGM_UPGRADE_OUTLINE_v1_zh.md +12 -6
- package/docs/methodology/graph/INFORM_YAML_MIGRATION_v1_zh.md +81 -0
- package/docs/methodology/graph/PROMPT_ontology_inventory_scan_G0_v1_zh.md +313 -0
- package/docs/methodology/graph/README.md +2 -0
- package/docs/methodology/graph/inventory/ONTOLOGY_INVENTORY_ai_ink_brain_api_python_v1.yaml +283 -0
- package/docs/methodology/graph/inventory/ONTOLOGY_INVENTORY_cyning_harness_v1.yaml +233 -0
- package/docs/methodology/graph/schemas/hgm_event_v1.schema.json +301 -0
- package/examples/demo_checkout/00_main.graph.yaml +42 -0
- package/examples/demo_checkout/00_main.md +66 -0
- package/examples/demo_checkout/README.md +3 -0
- package/examples/demo_checkout/graph.json +111 -0
- package/lib/cli.js +276 -3
- package/lib/graph-hgm.js +563 -0
- package/lib/graph-yaml.js +547 -0
- package/ontology.yaml +1 -1
- package/package.json +4 -1
- package/schema/inform_graph.v3.schema.json +134 -0
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# G0 本体构成扫描 · 产品仓主报告
|
|
2
|
+
# 生成:ontology-inventory-scan-g0 · 30 执行 · freeze_id ONTOLOGY-INVENTORY-G0
|
|
3
|
+
# 约束:只读扫描 · 未修改 DESIGN_ONTOLOGY 或任何真值文件
|
|
4
|
+
|
|
5
|
+
project: cyning-harness
|
|
6
|
+
scan_date: "2026-06-17"
|
|
7
|
+
report_role: primary
|
|
8
|
+
prompt_version: "1.3"
|
|
9
|
+
freeze_id: ONTOLOGY-INVENTORY-G0
|
|
10
|
+
|
|
11
|
+
preconditions:
|
|
12
|
+
P1: pass # cwd = cyning-harness/
|
|
13
|
+
P2: skip # 产品仓无 docs/_tech_graph/
|
|
14
|
+
P3: skip # 产品仓无 .ai.md
|
|
15
|
+
P4: pass # HG-TASK-DRAFT approved
|
|
16
|
+
P5: pass # G0 讨论素材 · 不修改 DESIGN_ONTOLOGY
|
|
17
|
+
|
|
18
|
+
scanned_manifest:
|
|
19
|
+
product_manifest:
|
|
20
|
+
- path: docs/methodology/STRATEGY_ONTOLOGY_cyning_harness_v1_zh.md
|
|
21
|
+
role: 战略本体
|
|
22
|
+
exists: false
|
|
23
|
+
note: 清单路径未落盘;真值 POINTER 见 docs/methodology/pointers/STRATEGY_ONTOLOGY_v1_zh.md → 工作区 docs/harness/guides/
|
|
24
|
+
- path: docs/methodology/pointers/STRATEGY_ONTOLOGY_v1_zh.md
|
|
25
|
+
role: 战略本体(POINTER · 追加扫描)
|
|
26
|
+
exists: true
|
|
27
|
+
note: 禁止复制全文 · 指向工作区 L1 战略本体
|
|
28
|
+
- path: docs/methodology/product/DESIGN_ONTOLOGY_v1_zh.md
|
|
29
|
+
role: 产品设计本体(主)
|
|
30
|
+
exists: true
|
|
31
|
+
version: v1.2
|
|
32
|
+
status: draft
|
|
33
|
+
- path: docs/methodology/product/PRODUCT_ONTOLOGY_v1.1.md
|
|
34
|
+
role: 产品设计本体(v1.1,若存在)
|
|
35
|
+
exists: false
|
|
36
|
+
- path: docs/methodology/graph/HGM_UPGRADE_OUTLINE_v1_zh.md
|
|
37
|
+
role: HGM 升级大纲(G0)
|
|
38
|
+
exists: true
|
|
39
|
+
version: v1.0
|
|
40
|
+
status: outline
|
|
41
|
+
- path: docs/methodology/graph/HARNESS_GRAPH_MODEL_design_v0_zh.md
|
|
42
|
+
role: HGM 设计稿(v0)
|
|
43
|
+
exists: true
|
|
44
|
+
version: v0.1
|
|
45
|
+
status: proposal
|
|
46
|
+
- path: docs/methodology/ROADMAP_v1_zh.md
|
|
47
|
+
role: 路线图
|
|
48
|
+
exists: true
|
|
49
|
+
version: v1.4
|
|
50
|
+
status: active
|
|
51
|
+
- path: harness/meta/ontology.yaml
|
|
52
|
+
role: 机器可读本体(v0.4+ 规划,若存在)
|
|
53
|
+
exists: false
|
|
54
|
+
note: DESIGN_ONTOLOGY §0.4 骨架已文档化 · v0.4+ harness ontology-check 待实现
|
|
55
|
+
|
|
56
|
+
meta_ontology:
|
|
57
|
+
implicit_primitive_lens:
|
|
58
|
+
present: true
|
|
59
|
+
documents:
|
|
60
|
+
- PROMPT_ontology_inventory_scan_G0_v1_zh.md # T/K/H/B 仅作扫描 Lens
|
|
61
|
+
- DESIGN_ONTOLOGY_v1_zh.md # 类/关系/公理 · 非 T/K/H/B 节点类型
|
|
62
|
+
explicit_meta_path_convention:
|
|
63
|
+
present: false
|
|
64
|
+
note: HGM design v0 提及事件→投影路径 · 未在产品仓固化 T→K→B 元路径 schema
|
|
65
|
+
global_axioms:
|
|
66
|
+
present: true
|
|
67
|
+
source: DESIGN_ONTOLOGY_v1_zh.md §5
|
|
68
|
+
axiom_ids_sample: [P1, P2, S1, S2, S3, S4, S5, D1, D2, D3, D4, D5, D6, D7]
|
|
69
|
+
note: P=过程 · S=同步 · D=部署/发布 · 与 gate-check / sync 机械检查对齐
|
|
70
|
+
|
|
71
|
+
sub_ontologies:
|
|
72
|
+
- id: PROCESS_TRACK
|
|
73
|
+
name: 过程本体
|
|
74
|
+
files:
|
|
75
|
+
- docs/methodology/product/DESIGN_ONTOLOGY_v1_zh.md
|
|
76
|
+
- harness/prompts/10-requirements.md
|
|
77
|
+
- harness/prompts/22-task-audit.md
|
|
78
|
+
- harness/prompts/30-execute-code.md
|
|
79
|
+
- harness/prompts/40-self-check.md
|
|
80
|
+
- harness/templates/TASK_TEMPLATE.md
|
|
81
|
+
- harness/templates/TASK_epic.md
|
|
82
|
+
primitives_used: [T, K, H, B]
|
|
83
|
+
core_classes:
|
|
84
|
+
- Task
|
|
85
|
+
- Epic
|
|
86
|
+
- Hat
|
|
87
|
+
- HumanGate
|
|
88
|
+
- InvokeSnapshot
|
|
89
|
+
- AuditReview
|
|
90
|
+
- FailureReport
|
|
91
|
+
- GateCheckRun
|
|
92
|
+
key_relations:
|
|
93
|
+
- Task --governedBy--> Hat
|
|
94
|
+
- Task --hasGate--> HumanGate
|
|
95
|
+
- HumanGate --blocks--> Hat
|
|
96
|
+
- Epic --decomposesInto--> Task
|
|
97
|
+
- Task --dependsOn--> Task
|
|
98
|
+
- Hat --mayProduce--> InvokeSnapshot
|
|
99
|
+
- Hat --mayProduce--> AuditReview
|
|
100
|
+
key_axioms:
|
|
101
|
+
- S2 禁止 sync 覆盖 docs/tasks、reviews、invokes/by-task
|
|
102
|
+
- 改码类 Task 须 HG-AUDIT-R1 approved 方可 30
|
|
103
|
+
- depends_on 禁止循环依赖
|
|
104
|
+
|
|
105
|
+
- id: GRAPH_TRACK
|
|
106
|
+
name: 图源本体(HGM 设计轨 · 非 Inform _tech_graph)
|
|
107
|
+
files:
|
|
108
|
+
- docs/methodology/graph/HARNESS_GRAPH_MODEL_design_v0_zh.md
|
|
109
|
+
- docs/methodology/graph/HGM_UPGRADE_OUTLINE_v1_zh.md
|
|
110
|
+
- docs/methodology/graph/PROMPT_ontology_inventory_scan_G0_v1_zh.md
|
|
111
|
+
primitives_used: [T, H]
|
|
112
|
+
core_classes:
|
|
113
|
+
- BusinessRepository
|
|
114
|
+
- InformArtifact # HGM 节点标签 · 引用业务仓 GraphTrack
|
|
115
|
+
- GateCheckRun
|
|
116
|
+
- SyncOperation
|
|
117
|
+
key_relations:
|
|
118
|
+
- Task --mustRead--> InformArtifact
|
|
119
|
+
- GateCheckRun --CHECKED--> Task
|
|
120
|
+
- SyncOperation --SYNCED--> BusinessRepository
|
|
121
|
+
- Epic --DECOMPOSES--> Task
|
|
122
|
+
key_axioms:
|
|
123
|
+
- H1 无侵入 · 未启用 HGM 时与纯文件模式一致
|
|
124
|
+
- H2 文件优先 · S2 保护域只追加事件
|
|
125
|
+
- H3 事件不可变
|
|
126
|
+
|
|
127
|
+
- id: GOVERNANCE_TRACK
|
|
128
|
+
name: 治理本体
|
|
129
|
+
files:
|
|
130
|
+
- docs/methodology/ROADMAP_v1_zh.md
|
|
131
|
+
- docs/methodology/product/DESIGN_ONTOLOGY_v1_zh.md # §0.1 变更原则 · §0.3 外部贡献清单
|
|
132
|
+
- docs/methodology/graph/HGM_UPGRADE_OUTLINE_v1_zh.md # D1–D5 维护者决策
|
|
133
|
+
primitives_used: [T, K]
|
|
134
|
+
core_classes:
|
|
135
|
+
- Track
|
|
136
|
+
- Preset
|
|
137
|
+
- VersionManifest
|
|
138
|
+
key_relations:
|
|
139
|
+
- Preset --configures--> AdoptedProfile
|
|
140
|
+
- Track --declaredIn--> TrackManifest
|
|
141
|
+
key_axioms:
|
|
142
|
+
- SEM-02 Track G 用 v2.x · 不写 v0.5/v0.6 指 HGM
|
|
143
|
+
- v1.0 关账后启动 G1
|
|
144
|
+
|
|
145
|
+
- id: IDE_TRACK
|
|
146
|
+
name: IDE 适配本体
|
|
147
|
+
files:
|
|
148
|
+
- harness/prompts/FRAGMENT_30_invoke_block_v1_zh.md
|
|
149
|
+
- harness/prompts/FRAGMENT_30_gate_verify_v1_zh.md
|
|
150
|
+
- harness/prompts/FRAGMENT_task_domain_infer_v1_zh.md
|
|
151
|
+
primitives_used: [K]
|
|
152
|
+
core_classes:
|
|
153
|
+
- IDEFragment
|
|
154
|
+
- MarkerBlock
|
|
155
|
+
key_relations:
|
|
156
|
+
- IDEFragment --embeddedIn--> CLAUDE.md / AGENTS.md
|
|
157
|
+
key_axioms:
|
|
158
|
+
- cyning-harness:begin/end marker 可 merge 区段
|
|
159
|
+
|
|
160
|
+
- id: VERIFY_TRACK
|
|
161
|
+
name: 验证本体
|
|
162
|
+
files:
|
|
163
|
+
- wizard/gate-check.sh
|
|
164
|
+
- test/ # npm test · audit · gate-check.graph
|
|
165
|
+
primitives_used: [K, H]
|
|
166
|
+
core_classes:
|
|
167
|
+
- GateCheckRun
|
|
168
|
+
- VerifyArtifact
|
|
169
|
+
key_relations:
|
|
170
|
+
- Task --verifiedBy--> VerifyArtifact
|
|
171
|
+
- GateCheckRun --CHECKED--> Task
|
|
172
|
+
key_axioms:
|
|
173
|
+
- gate-check 机械扫描 active task 闸表
|
|
174
|
+
- v1.0 gate-check --graph 校验 Inform 模块依赖
|
|
175
|
+
|
|
176
|
+
- id: STANDARDS_TRACK
|
|
177
|
+
name: 约束本体
|
|
178
|
+
files: []
|
|
179
|
+
primitives_used: [K]
|
|
180
|
+
core_classes:
|
|
181
|
+
- ConstrainArtifact
|
|
182
|
+
key_relations:
|
|
183
|
+
- Task --constrainedBy--> ConstrainArtifact
|
|
184
|
+
key_axioms: []
|
|
185
|
+
note: 产品仓模板级 · 实例化后落业务仓 docs/standards/ 与 .cursor/rules/
|
|
186
|
+
|
|
187
|
+
- id: WIKI_TRACK
|
|
188
|
+
name: 知识库本体
|
|
189
|
+
files: []
|
|
190
|
+
primitives_used: [T]
|
|
191
|
+
core_classes: []
|
|
192
|
+
key_relations: []
|
|
193
|
+
key_axioms: []
|
|
194
|
+
note: 产品仓无 coding_wiki · 试点在业务仓
|
|
195
|
+
|
|
196
|
+
epic_task_mapping:
|
|
197
|
+
definition: EpicTask 是 Task 的特化子类
|
|
198
|
+
evidence: DESIGN_ONTOLOGY_v1_zh.md §1.4
|
|
199
|
+
fields:
|
|
200
|
+
- depends_on: string[] — 子 Task slug 列表
|
|
201
|
+
- completion_policy: must_complete_all | any_completes
|
|
202
|
+
- child_tasks: string[]
|
|
203
|
+
related_gate: HG-EPIC-ROADMAP(Epic CLOSE 专用闸门)
|
|
204
|
+
note: Epic 不直接执行 30,通过子 Task 状态聚合判断完成
|
|
205
|
+
|
|
206
|
+
graph_summary:
|
|
207
|
+
primitive_lens_used: [T, K, H, B]
|
|
208
|
+
hgm_node_labels:
|
|
209
|
+
- BusinessRepository
|
|
210
|
+
- Task
|
|
211
|
+
- HumanGate
|
|
212
|
+
- Hat
|
|
213
|
+
- AuditReview
|
|
214
|
+
- InvokeSnapshot
|
|
215
|
+
- FailureReport
|
|
216
|
+
- GateCheckRun
|
|
217
|
+
- SyncOperation
|
|
218
|
+
- InformArtifact
|
|
219
|
+
meta_paths_observed:
|
|
220
|
+
- tkb # Track/Preset 配置 → 约束键(test_strategy) → Task 实例
|
|
221
|
+
- htb # VersionManifest/upgrade 历史 → Track 版本 → 同步产物
|
|
222
|
+
missing_meta_paths:
|
|
223
|
+
- 显式 T→K→B schema 未落盘(仅 Prompt G0 Lens 分析用)
|
|
224
|
+
- ontology.yaml 机器可读双轨未实现
|
|
225
|
+
|
|
226
|
+
legacy_pending_delete: [] # 产品仓无 .ai.md
|
|
227
|
+
|
|
228
|
+
gaps:
|
|
229
|
+
- manifest 路径 STRATEGY_ONTOLOGY_cyning_harness_v1_zh.md 不存在;实际为 pointers/STRATEGY_ONTOLOGY_v1_zh.md(POINTER)
|
|
230
|
+
- PRODUCT_ONTOLOGY_v1.1.md 未发现
|
|
231
|
+
- harness/meta/ontology.yaml 未实现(v0.4+ 规划 · DESIGN_ONTOLOGY §0.4 仅文档骨架)
|
|
232
|
+
- 产品仓无 docs/_tech_graph/ · Inform GraphTrack 在业务仓试点
|
|
233
|
+
- WIKI_TRACK / STANDARDS_TRACK 在产品仓仅为模板引用 · 无实例文件
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://cyning.dev/schemas/cyning-harness/hgm_event.v1.json",
|
|
4
|
+
"title": "cyning-harness HGM Event v1",
|
|
5
|
+
"description": "Harness Graph Model 过程轨事件 schema · append-only JSONL · v2.0+",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["event_id", "type", "occurred_at", "actor", "subject", "data"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"event_id": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"pattern": "^evt:[0-9]{8}T[0-9]{6}Z:[0-9]{3,}$",
|
|
13
|
+
"description": "全局唯一事件 ID · 格式 evt:{YYYYMMDD}T{HHMMSS}Z:{seq}"
|
|
14
|
+
},
|
|
15
|
+
"type": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"enum": [
|
|
18
|
+
"RepositoryAdopted",
|
|
19
|
+
"TaskCreated",
|
|
20
|
+
"TaskStatusChanged",
|
|
21
|
+
"GateStatusChanged",
|
|
22
|
+
"HumanGateRejected",
|
|
23
|
+
"AuditReviewProduced",
|
|
24
|
+
"InvokeSnapshotCreated",
|
|
25
|
+
"FailureReportProduced",
|
|
26
|
+
"GateCheckRunCompleted",
|
|
27
|
+
"SyncOperationCompleted",
|
|
28
|
+
"InformArtifactUpdated",
|
|
29
|
+
"CorrectionEvent"
|
|
30
|
+
],
|
|
31
|
+
"description": "事件类型"
|
|
32
|
+
},
|
|
33
|
+
"occurred_at": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"format": "date-time",
|
|
36
|
+
"description": "事件发生 UTC 时间 · ISO 8601"
|
|
37
|
+
},
|
|
38
|
+
"actor": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"pattern": "^(maintainer|gate-check|sync|ci|agent:[a-zA-Z0-9_-]+|manual|system)$",
|
|
41
|
+
"description": "动作主体"
|
|
42
|
+
},
|
|
43
|
+
"subject": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"minLength": 1,
|
|
46
|
+
"description": "事件主题节点 ID · 如 task:{slug} / gate:{slug}:{gate_id}"
|
|
47
|
+
},
|
|
48
|
+
"data": {
|
|
49
|
+
"description": "事件 payload"
|
|
50
|
+
},
|
|
51
|
+
"source": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"enum": ["file_watch", "gate-check.sh", "harness-sync.sh", "manual", "cli", "agent"],
|
|
54
|
+
"description": "事件采集来源"
|
|
55
|
+
},
|
|
56
|
+
"supersedes": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"pattern": "^evt:[0-9]{8}T[0-9]{6}Z:[0-9]{3,}$",
|
|
59
|
+
"description": "CorrectionEvent 指向被修正的事件 ID(可选)"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"$defs": {
|
|
63
|
+
"statusValue": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"enum": ["draft", "pending", "in_progress", "approved", "rejected", "done", "archived"]
|
|
66
|
+
},
|
|
67
|
+
"taskSubject": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"pattern": "^task:[a-zA-Z0-9_-]+$"
|
|
70
|
+
},
|
|
71
|
+
"gateSubject": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"pattern": "^gate:[a-zA-Z0-9_-]+:[a-zA-Z0-9_-]+$"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"allOf": [
|
|
77
|
+
{
|
|
78
|
+
"if": { "properties": { "type": { "const": "RepositoryAdopted" } } },
|
|
79
|
+
"then": {
|
|
80
|
+
"properties": {
|
|
81
|
+
"subject": { "pattern": "^repo:[a-zA-Z0-9_-]+$" },
|
|
82
|
+
"data": {
|
|
83
|
+
"type": "object",
|
|
84
|
+
"additionalProperties": false,
|
|
85
|
+
"required": ["manifest_version", "preset"],
|
|
86
|
+
"properties": {
|
|
87
|
+
"manifest_version": { "type": "string" },
|
|
88
|
+
"preset": { "type": "string" },
|
|
89
|
+
"ide": { "type": "array", "items": { "type": "string" } }
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"if": { "properties": { "type": { "const": "TaskCreated" } } },
|
|
97
|
+
"then": {
|
|
98
|
+
"properties": {
|
|
99
|
+
"subject": { "$ref": "#/$defs/taskSubject" },
|
|
100
|
+
"data": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"additionalProperties": false,
|
|
103
|
+
"required": ["task_slug", "title", "status"],
|
|
104
|
+
"properties": {
|
|
105
|
+
"task_slug": { "type": "string" },
|
|
106
|
+
"title": { "type": "string" },
|
|
107
|
+
"status": { "$ref": "#/$defs/statusValue" },
|
|
108
|
+
"path": { "type": "string" },
|
|
109
|
+
"tags": { "type": "array", "items": { "type": "string" } }
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"if": { "properties": { "type": { "const": "TaskStatusChanged" } } },
|
|
117
|
+
"then": {
|
|
118
|
+
"properties": {
|
|
119
|
+
"subject": { "$ref": "#/$defs/taskSubject" },
|
|
120
|
+
"data": {
|
|
121
|
+
"type": "object",
|
|
122
|
+
"additionalProperties": false,
|
|
123
|
+
"required": ["old_status", "new_status"],
|
|
124
|
+
"properties": {
|
|
125
|
+
"old_status": { "$ref": "#/$defs/statusValue" },
|
|
126
|
+
"new_status": { "$ref": "#/$defs/statusValue" },
|
|
127
|
+
"artifact": { "type": "string" }
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"if": { "properties": { "type": { "const": "GateStatusChanged" } } },
|
|
135
|
+
"then": {
|
|
136
|
+
"properties": {
|
|
137
|
+
"subject": { "$ref": "#/$defs/gateSubject" },
|
|
138
|
+
"data": {
|
|
139
|
+
"type": "object",
|
|
140
|
+
"additionalProperties": false,
|
|
141
|
+
"required": ["old_status", "new_status", "task_slug", "human_gate_id"],
|
|
142
|
+
"properties": {
|
|
143
|
+
"old_status": { "$ref": "#/$defs/statusValue" },
|
|
144
|
+
"new_status": { "$ref": "#/$defs/statusValue" },
|
|
145
|
+
"task_slug": { "type": "string" },
|
|
146
|
+
"human_gate_id": { "type": "string" },
|
|
147
|
+
"blocks_hats": { "type": "array", "items": { "type": "string" } }
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"if": { "properties": { "type": { "const": "HumanGateRejected" } } },
|
|
155
|
+
"then": {
|
|
156
|
+
"properties": {
|
|
157
|
+
"subject": { "$ref": "#/$defs/gateSubject" },
|
|
158
|
+
"data": {
|
|
159
|
+
"type": "object",
|
|
160
|
+
"additionalProperties": false,
|
|
161
|
+
"required": ["task_slug", "human_gate_id", "reason"],
|
|
162
|
+
"properties": {
|
|
163
|
+
"task_slug": { "type": "string" },
|
|
164
|
+
"human_gate_id": { "type": "string" },
|
|
165
|
+
"reason": { "type": "string" },
|
|
166
|
+
"returns_to_status": { "$ref": "#/$defs/statusValue" }
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"if": { "properties": { "type": { "const": "AuditReviewProduced" } } },
|
|
174
|
+
"then": {
|
|
175
|
+
"properties": {
|
|
176
|
+
"subject": { "$ref": "#/$defs/taskSubject" },
|
|
177
|
+
"data": {
|
|
178
|
+
"type": "object",
|
|
179
|
+
"additionalProperties": false,
|
|
180
|
+
"required": ["review_path", "round"],
|
|
181
|
+
"properties": {
|
|
182
|
+
"review_path": { "type": "string" },
|
|
183
|
+
"round": { "type": "string", "enum": ["R1", "R2", "CLOSE"] },
|
|
184
|
+
"hat_id": { "type": "string" }
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"if": { "properties": { "type": { "const": "InvokeSnapshotCreated" } } },
|
|
192
|
+
"then": {
|
|
193
|
+
"properties": {
|
|
194
|
+
"subject": { "$ref": "#/$defs/taskSubject" },
|
|
195
|
+
"data": {
|
|
196
|
+
"type": "object",
|
|
197
|
+
"additionalProperties": false,
|
|
198
|
+
"required": ["invoke_path"],
|
|
199
|
+
"properties": {
|
|
200
|
+
"invoke_path": { "type": "string" },
|
|
201
|
+
"hat_id": { "type": "string" }
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"if": { "properties": { "type": { "const": "FailureReportProduced" } } },
|
|
209
|
+
"then": {
|
|
210
|
+
"properties": {
|
|
211
|
+
"subject": { "$ref": "#/$defs/taskSubject" },
|
|
212
|
+
"data": {
|
|
213
|
+
"type": "object",
|
|
214
|
+
"additionalProperties": false,
|
|
215
|
+
"required": ["failure_path", "at_gate"],
|
|
216
|
+
"properties": {
|
|
217
|
+
"failure_path": { "type": "string" },
|
|
218
|
+
"at_gate": { "type": "string" },
|
|
219
|
+
"reason": { "type": "string" }
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"if": { "properties": { "type": { "const": "GateCheckRunCompleted" } } },
|
|
227
|
+
"then": {
|
|
228
|
+
"properties": {
|
|
229
|
+
"subject": { "$ref": "#/$defs/taskSubject" },
|
|
230
|
+
"data": {
|
|
231
|
+
"type": "object",
|
|
232
|
+
"additionalProperties": false,
|
|
233
|
+
"required": ["exit_code", "task_slug"],
|
|
234
|
+
"properties": {
|
|
235
|
+
"exit_code": { "type": "integer" },
|
|
236
|
+
"task_slug": { "type": "string" },
|
|
237
|
+
"graph_checked": { "type": "boolean" },
|
|
238
|
+
"audit_checked": { "type": "boolean" }
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"if": { "properties": { "type": { "const": "SyncOperationCompleted" } } },
|
|
246
|
+
"then": {
|
|
247
|
+
"properties": {
|
|
248
|
+
"subject": { "pattern": "^repo:[a-zA-Z0-9_-]+$" },
|
|
249
|
+
"data": {
|
|
250
|
+
"type": "object",
|
|
251
|
+
"additionalProperties": false,
|
|
252
|
+
"required": ["mode", "version"],
|
|
253
|
+
"properties": {
|
|
254
|
+
"mode": { "type": "string", "enum": ["plan", "apply"] },
|
|
255
|
+
"version": { "type": "string" },
|
|
256
|
+
"files_touched": { "type": "array", "items": { "type": "string" } }
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"if": { "properties": { "type": { "const": "InformArtifactUpdated" } } },
|
|
264
|
+
"then": {
|
|
265
|
+
"properties": {
|
|
266
|
+
"subject": { "pattern": "^inform:.+" },
|
|
267
|
+
"data": {
|
|
268
|
+
"type": "object",
|
|
269
|
+
"additionalProperties": false,
|
|
270
|
+
"required": ["path", "inform_schema"],
|
|
271
|
+
"properties": {
|
|
272
|
+
"path": { "type": "string" },
|
|
273
|
+
"inform_schema": { "type": "string" },
|
|
274
|
+
"compiled_from": { "type": "string" }
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"if": { "properties": { "type": { "const": "CorrectionEvent" } } },
|
|
282
|
+
"then": {
|
|
283
|
+
"required": ["supersedes"],
|
|
284
|
+
"properties": {
|
|
285
|
+
"subject": { "minLength": 1 },
|
|
286
|
+
"data": {
|
|
287
|
+
"type": "object",
|
|
288
|
+
"additionalProperties": false,
|
|
289
|
+
"required": ["field", "old_value", "new_value"],
|
|
290
|
+
"properties": {
|
|
291
|
+
"field": { "type": "string" },
|
|
292
|
+
"old_value": {},
|
|
293
|
+
"new_value": {},
|
|
294
|
+
"reason": { "type": "string" }
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
]
|
|
301
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
schema_version: "inform_graph.v3"
|
|
2
|
+
graph_id: "00_main"
|
|
3
|
+
title: "Harness P0 金样流程"
|
|
4
|
+
description: "demo_checkout 最小 SDD 闭环流程图"
|
|
5
|
+
version: "2026-06-17"
|
|
6
|
+
direction: "TD"
|
|
7
|
+
|
|
8
|
+
nodes:
|
|
9
|
+
- id: "START"
|
|
10
|
+
label: "空 Git 仓"
|
|
11
|
+
- id: "INIT"
|
|
12
|
+
label: "harness init"
|
|
13
|
+
- id: "TASK"
|
|
14
|
+
label: "task_demo_p0_golden"
|
|
15
|
+
- id: "R1"
|
|
16
|
+
label: "22 审核帽"
|
|
17
|
+
- id: "GATE"
|
|
18
|
+
label: "gate-check"
|
|
19
|
+
- id: "EXEC"
|
|
20
|
+
label: "30 执行帽"
|
|
21
|
+
- id: "DONE"
|
|
22
|
+
label: "P0 通过"
|
|
23
|
+
|
|
24
|
+
edges:
|
|
25
|
+
- from: "START"
|
|
26
|
+
to: "INIT"
|
|
27
|
+
label: "install.sh"
|
|
28
|
+
- from: "INIT"
|
|
29
|
+
to: "TASK"
|
|
30
|
+
label: "复制金样 task"
|
|
31
|
+
- from: "TASK"
|
|
32
|
+
to: "R1"
|
|
33
|
+
label: "10 → 22"
|
|
34
|
+
- from: "R1"
|
|
35
|
+
to: "GATE"
|
|
36
|
+
label: "HG-AUDIT-R1 approved"
|
|
37
|
+
- from: "GATE"
|
|
38
|
+
to: "EXEC"
|
|
39
|
+
label: "exit 0"
|
|
40
|
+
- from: "EXEC"
|
|
41
|
+
to: "DONE"
|
|
42
|
+
label: "40 自检"
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
graph_id: 00_main
|
|
3
|
+
version: 2026-06-17
|
|
4
|
+
generated_at: 2026-06-17T06:16:31Z
|
|
5
|
+
source: 00_main.graph.yaml
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Harness P0 金样流程
|
|
9
|
+
|
|
10
|
+
demo_checkout 最小 SDD 闭环流程图
|
|
11
|
+
|
|
12
|
+
## Mermaid
|
|
13
|
+
|
|
14
|
+
```mermaid
|
|
15
|
+
flowchart TD
|
|
16
|
+
START[空 Git 仓]
|
|
17
|
+
INIT[harness init]
|
|
18
|
+
TASK[task_demo_p0_golden]
|
|
19
|
+
R1[22 审核帽]
|
|
20
|
+
GATE[gate-check]
|
|
21
|
+
EXEC[30 执行帽]
|
|
22
|
+
DONE[P0 通过]
|
|
23
|
+
|
|
24
|
+
START --"install.sh"--> INIT
|
|
25
|
+
INIT --"复制金样 task"--> TASK
|
|
26
|
+
TASK --"10 → 22"--> R1
|
|
27
|
+
R1 --"HG-AUDIT-R1 approved"--> GATE
|
|
28
|
+
GATE --"exit 0"--> EXEC
|
|
29
|
+
EXEC --"40 自检"--> DONE
|
|
30
|
+
|
|
31
|
+
classDef phase fill:#e1f5fe,stroke:#01579b,stroke-width:2px
|
|
32
|
+
classDef doc fill:#fff8e1,stroke:#ff6f00,stroke-width:1px
|
|
33
|
+
classDef infra fill:#e8f5e9,stroke:#2e7d32,stroke-width:1px
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Structured Data
|
|
37
|
+
|
|
38
|
+
### Nodes
|
|
39
|
+
|
|
40
|
+
| ID | Label | Kind |
|
|
41
|
+
|----|-------|------|
|
|
42
|
+
| START | 空 Git 仓 | |
|
|
43
|
+
| INIT | harness init | |
|
|
44
|
+
| TASK | task_demo_p0_golden | |
|
|
45
|
+
| R1 | 22 审核帽 | |
|
|
46
|
+
| GATE | gate-check | |
|
|
47
|
+
| EXEC | 30 执行帽 | |
|
|
48
|
+
| DONE | P0 通过 | |
|
|
49
|
+
|
|
50
|
+
### Edges
|
|
51
|
+
|
|
52
|
+
| From | To | Mark | Type | Label | Anchors |
|
|
53
|
+
|------|----|------|------|-------|---------|
|
|
54
|
+
| START | INIT | -> | depends_on | install.sh | |
|
|
55
|
+
| INIT | TASK | -> | depends_on | 复制金样 task | |
|
|
56
|
+
| TASK | R1 | -> | depends_on | 10 → 22 | |
|
|
57
|
+
| R1 | GATE | -> | depends_on | HG-AUDIT-R1 approved | |
|
|
58
|
+
| GATE | EXEC | -> | depends_on | exit 0 | |
|
|
59
|
+
| EXEC | DONE | -> | depends_on | 40 自检 | |
|
|
60
|
+
|
|
61
|
+
## Sub-graph Links
|
|
62
|
+
|
|
63
|
+
- `Struct`: [`01_struct.md`](01_struct.md)(手写 · 无 `.graph.yaml`)
|
|
64
|
+
- `Version`: [`02_version.md`](02_version.md)(手写 · 无 `.graph.yaml`)
|
|
65
|
+
- 子图编辑源见 `docs/_tech_graph/*.graph.yaml`
|
|
66
|
+
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
| --- | --- |
|
|
11
11
|
| [`task_demo_p0_golden_v1.md`](./task_demo_p0_golden_v1.md) | 金样 task · 复制到 `docs/tasks/active/` |
|
|
12
12
|
| [`ACCEPTANCE.md`](./ACCEPTANCE.md) | 分阶段验收勾选 |
|
|
13
|
+
| [`00_main.graph.yaml`](./00_main.graph.yaml) | Inform-YAML v3 编辑源示例(v1.1+) |
|
|
14
|
+
| [`00_main.md`](./00_main.md) | 由 `graph yaml compile` 生成的人类可读图 |
|
|
15
|
+
| [`graph.json`](./graph.json) | 由 YAML 物化的机器可读图切片 |
|
|
13
16
|
| `reviews/` | (自行创建)22 产出落盘目录 |
|
|
14
17
|
|
|
15
18
|
---
|