qgraphflow 0.0.6 → 0.0.7
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/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +2 -2
- package/.cursor-plugin/plugin.json +1 -1
- package/.qoder-plugin/plugin.json +1 -1
- package/README.md +119 -70
- package/docs/clients.de.md +15 -24
- package/docs/clients.es.md +15 -24
- package/docs/clients.ja.md +15 -24
- package/docs/clients.md +15 -24
- package/docs/clients.pt.md +15 -24
- package/docs/clients.ru.md +15 -24
- package/docs/clients.zh-CN.md +15 -24
- package/docs/readme/README.de.md +120 -71
- package/docs/readme/README.es.md +120 -71
- package/docs/readme/README.ja.md +120 -71
- package/docs/readme/README.pt.md +120 -71
- package/docs/readme/README.ru.md +120 -71
- package/docs/readme/README.zh-CN.md +106 -59
- package/examples/jeepay/README.md +23 -0
- package/examples/jeepay/capabilities.graph.json +270 -0
- package/examples/jeepay/class.graph.json +237 -0
- package/examples/jeepay/collection.graph.json +3057 -0
- package/examples/jeepay/dataflow.graph.json +212 -0
- package/examples/jeepay/deployment.graph.json +222 -0
- package/examples/jeepay/engineering.graph.json +277 -0
- package/examples/jeepay/er.graph.json +482 -0
- package/examples/jeepay/flowchart.graph.json +312 -0
- package/examples/jeepay/relations.graph.json +289 -0
- package/examples/jeepay/sequence.graph.json +355 -0
- package/examples/jeepay/source.json +95 -0
- package/examples/jeepay/state.graph.json +175 -0
- package/examples/jeepay/usecase.graph.json +222 -0
- package/package.json +14 -3
- package/skills/q-flow/SKILL.md +28 -20
- package/skills/q-flow/agents/openai.yaml +1 -1
- package/skills/q-flow/assets/viewer/package.json +1 -1
- package/skills/q-flow/assets/viewer/src/architecture-overview-theme.js +22 -0
- package/skills/q-flow/assets/viewer/src/architecture-overview.js +340 -0
- package/skills/q-flow/assets/viewer/src/diagrams/architecture.js +8 -5
- package/skills/q-flow/assets/viewer/src/diagrams/card.js +35 -17
- package/skills/q-flow/assets/viewer/src/diagrams/deployment.js +7 -5
- package/skills/q-flow/assets/viewer/src/diagrams/drawing.js +5 -2
- package/skills/q-flow/assets/viewer/src/diagrams/registry.js +10 -0
- package/skills/q-flow/assets/viewer/src/diagrams/sequence.js +13 -7
- package/skills/q-flow/assets/viewer/src/edge-routing.js +43 -22
- package/skills/q-flow/assets/viewer/src/export-svg.js +27 -5
- package/skills/q-flow/assets/viewer/src/graph-validation.js +72 -15
- package/skills/q-flow/assets/viewer/src/i18n-messages.json +184 -8
- package/skills/q-flow/assets/viewer/src/layout-compaction.js +123 -0
- package/skills/q-flow/assets/viewer/src/layout-measure.js +14 -8
- package/skills/q-flow/assets/viewer/src/layout-policy.js +6 -0
- package/skills/q-flow/assets/viewer/src/layout-quality.js +61 -15
- package/skills/q-flow/assets/viewer/src/layout-refinement.js +271 -0
- package/skills/q-flow/assets/viewer/src/layout-semantics.js +8 -0
- package/skills/q-flow/assets/viewer/src/layout-spacing.js +23 -4
- package/skills/q-flow/assets/viewer/src/layout-templates.js +298 -0
- package/skills/q-flow/assets/viewer/src/node-svg.js +1 -1
- package/skills/q-flow/assets/viewer/src/orthogonal-routing.js +475 -0
- package/skills/q-flow/assets/viewer/src/presentation-graph.js +31 -0
- package/skills/q-flow/assets/viewer/src/route-clearance.js +144 -0
- package/skills/q-flow/assets/viewer/src/sequence-executions.js +22 -0
- package/skills/q-flow/assets/viewer/src/sequence-fragments.js +20 -2
- package/skills/q-flow/assets/viewer/src/session-graph.js +46 -3
- package/skills/q-flow/assets/viewer/src/text-layout.js +33 -6
- package/skills/q-flow/assets/viewer/src/view-identity.js +26 -0
- package/skills/q-flow/assets/viewer/src/visual-style.js +13 -5
- package/skills/q-flow/assets/viewer-dist/index.html +30 -28
- package/skills/q-flow/references/evidence-sources.md +7 -5
- package/skills/q-flow/references/graph-common.md +34 -34
- package/skills/q-flow/references/graph-schema.md +28 -7
- package/skills/q-flow/references/guided-intake.md +51 -71
- package/skills/q-flow/references/layout-routing.md +47 -0
- package/skills/q-flow/references/types/architecture.md +42 -22
- package/skills/q-flow/references/types/class.md +9 -2
- package/skills/q-flow/references/types/dataflow.md +11 -4
- package/skills/q-flow/references/types/deployment.md +11 -3
- package/skills/q-flow/references/types/er.md +8 -1
- package/skills/q-flow/references/types/flowchart.md +12 -5
- package/skills/q-flow/references/types/sequence.md +20 -16
- package/skills/q-flow/references/types/state.md +10 -3
- package/skills/q-flow/references/types/usecase.md +6 -0
- package/skills/q-flow/references/viewer-development.md +37 -24
- package/skills/q-flow/references/visual-contract.md +12 -6
- package/skills/q-flow/scripts/compile-layout.mjs +85 -102
- package/skills/q-flow/scripts/compile-sequence.mjs +4 -21
- package/skills/q-flow/scripts/generate-viewer.mjs +18 -9
- package/skills/q-flow/scripts/validate-graph.mjs +38 -21
- package/examples/order-flow.graph.json +0 -94
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "Jeepay 支付网关用例图",
|
|
4
|
+
"subtitle": "Jeepay 源码与配置证据",
|
|
5
|
+
"sourceRef": "jeequan/jeepay@e1ac9086d679826bab593f20431b7ecd292eb685",
|
|
6
|
+
"scope": "支付网关公开 API 能力",
|
|
7
|
+
"diagramType": "usecase",
|
|
8
|
+
"locale": "zh-CN",
|
|
9
|
+
"notes": [
|
|
10
|
+
"商户系统与支付渠道是从 API 路由与回调入口归纳的外部角色。",
|
|
11
|
+
"图中是接口能力,不表示当前环境中已接入或已调用任一支付渠道。"
|
|
12
|
+
],
|
|
13
|
+
"viewId": "jeepay-usecase"
|
|
14
|
+
},
|
|
15
|
+
"nodes": [
|
|
16
|
+
{
|
|
17
|
+
"id": "mch",
|
|
18
|
+
"label": "商户系统",
|
|
19
|
+
"kind": "actor"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"id": "channel",
|
|
23
|
+
"label": "支付渠道",
|
|
24
|
+
"kind": "actor"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "create",
|
|
28
|
+
"label": "统一下单",
|
|
29
|
+
"kind": "usecase",
|
|
30
|
+
"module": "payment",
|
|
31
|
+
"source": {
|
|
32
|
+
"file": "jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/UnifiedOrderController.java",
|
|
33
|
+
"lineStart": 52,
|
|
34
|
+
"lineEnd": 52,
|
|
35
|
+
"kind": "source"
|
|
36
|
+
},
|
|
37
|
+
"groupId": "system",
|
|
38
|
+
"tags": [
|
|
39
|
+
"core"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "query",
|
|
44
|
+
"label": "查询支付订单",
|
|
45
|
+
"kind": "usecase",
|
|
46
|
+
"module": "payment",
|
|
47
|
+
"source": {
|
|
48
|
+
"file": "jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/QueryOrderController.java",
|
|
49
|
+
"lineStart": 50,
|
|
50
|
+
"lineEnd": 50,
|
|
51
|
+
"kind": "source"
|
|
52
|
+
},
|
|
53
|
+
"groupId": "system"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"id": "close",
|
|
57
|
+
"label": "关闭支付订单",
|
|
58
|
+
"kind": "usecase",
|
|
59
|
+
"module": "payment",
|
|
60
|
+
"source": {
|
|
61
|
+
"file": "jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/CloseOrderController.java",
|
|
62
|
+
"lineStart": 55,
|
|
63
|
+
"lineEnd": 55,
|
|
64
|
+
"kind": "source"
|
|
65
|
+
},
|
|
66
|
+
"groupId": "system"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"id": "refund",
|
|
70
|
+
"label": "申请退款",
|
|
71
|
+
"kind": "usecase",
|
|
72
|
+
"module": "refund",
|
|
73
|
+
"source": {
|
|
74
|
+
"file": "jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/refund/RefundOrderController.java",
|
|
75
|
+
"lineStart": 66,
|
|
76
|
+
"lineEnd": 66,
|
|
77
|
+
"kind": "source"
|
|
78
|
+
},
|
|
79
|
+
"groupId": "system"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"id": "transfer",
|
|
83
|
+
"label": "发起转账",
|
|
84
|
+
"kind": "usecase",
|
|
85
|
+
"module": "transfer",
|
|
86
|
+
"source": {
|
|
87
|
+
"file": "jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/transfer/TransferOrderController.java",
|
|
88
|
+
"lineStart": 65,
|
|
89
|
+
"lineEnd": 65,
|
|
90
|
+
"kind": "source"
|
|
91
|
+
},
|
|
92
|
+
"groupId": "system"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"id": "division",
|
|
96
|
+
"label": "执行分账",
|
|
97
|
+
"kind": "usecase",
|
|
98
|
+
"module": "division",
|
|
99
|
+
"source": {
|
|
100
|
+
"file": "jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/division/PayOrderDivisionExecController.java",
|
|
101
|
+
"lineStart": 66,
|
|
102
|
+
"lineEnd": 66,
|
|
103
|
+
"kind": "source"
|
|
104
|
+
},
|
|
105
|
+
"groupId": "system"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"id": "callback",
|
|
109
|
+
"label": "通知支付结果",
|
|
110
|
+
"kind": "usecase",
|
|
111
|
+
"module": "payment",
|
|
112
|
+
"source": {
|
|
113
|
+
"file": "jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/ChannelNoticeController.java",
|
|
114
|
+
"lineStart": 169,
|
|
115
|
+
"lineEnd": 169,
|
|
116
|
+
"kind": "source"
|
|
117
|
+
},
|
|
118
|
+
"groupId": "system"
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"edges": [
|
|
122
|
+
{
|
|
123
|
+
"id": "u1",
|
|
124
|
+
"source": "mch",
|
|
125
|
+
"target": "create",
|
|
126
|
+
"kind": "association",
|
|
127
|
+
"label": "下单",
|
|
128
|
+
"evidence": "source",
|
|
129
|
+
"site": {
|
|
130
|
+
"file": "jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/UnifiedOrderController.java",
|
|
131
|
+
"lineStart": 52,
|
|
132
|
+
"lineEnd": 52
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"id": "u2",
|
|
137
|
+
"source": "mch",
|
|
138
|
+
"target": "query",
|
|
139
|
+
"kind": "association",
|
|
140
|
+
"label": "查单",
|
|
141
|
+
"evidence": "source",
|
|
142
|
+
"site": {
|
|
143
|
+
"file": "jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/QueryOrderController.java",
|
|
144
|
+
"lineStart": 50,
|
|
145
|
+
"lineEnd": 50
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"id": "u3",
|
|
150
|
+
"source": "mch",
|
|
151
|
+
"target": "close",
|
|
152
|
+
"kind": "association",
|
|
153
|
+
"label": "关单",
|
|
154
|
+
"evidence": "source",
|
|
155
|
+
"site": {
|
|
156
|
+
"file": "jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/CloseOrderController.java",
|
|
157
|
+
"lineStart": 55,
|
|
158
|
+
"lineEnd": 55
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"id": "u4",
|
|
163
|
+
"source": "mch",
|
|
164
|
+
"target": "refund",
|
|
165
|
+
"kind": "association",
|
|
166
|
+
"label": "退款",
|
|
167
|
+
"evidence": "source",
|
|
168
|
+
"site": {
|
|
169
|
+
"file": "jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/refund/RefundOrderController.java",
|
|
170
|
+
"lineStart": 66,
|
|
171
|
+
"lineEnd": 66
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"id": "u5",
|
|
176
|
+
"source": "mch",
|
|
177
|
+
"target": "transfer",
|
|
178
|
+
"kind": "association",
|
|
179
|
+
"label": "转账",
|
|
180
|
+
"evidence": "source",
|
|
181
|
+
"site": {
|
|
182
|
+
"file": "jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/transfer/TransferOrderController.java",
|
|
183
|
+
"lineStart": 65,
|
|
184
|
+
"lineEnd": 65
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"id": "u6",
|
|
189
|
+
"source": "mch",
|
|
190
|
+
"target": "division",
|
|
191
|
+
"kind": "association",
|
|
192
|
+
"label": "分账",
|
|
193
|
+
"evidence": "source",
|
|
194
|
+
"site": {
|
|
195
|
+
"file": "jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/division/PayOrderDivisionExecController.java",
|
|
196
|
+
"lineStart": 66,
|
|
197
|
+
"lineEnd": 66
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"id": "u7",
|
|
202
|
+
"source": "channel",
|
|
203
|
+
"target": "callback",
|
|
204
|
+
"kind": "association",
|
|
205
|
+
"label": "异步回调",
|
|
206
|
+
"evidence": "source",
|
|
207
|
+
"site": {
|
|
208
|
+
"file": "jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/ChannelNoticeController.java",
|
|
209
|
+
"lineStart": 169,
|
|
210
|
+
"lineEnd": 169
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
],
|
|
214
|
+
"groups": [
|
|
215
|
+
{
|
|
216
|
+
"id": "system",
|
|
217
|
+
"label": "Jeepay 支付网关",
|
|
218
|
+
"kind": "system"
|
|
219
|
+
}
|
|
220
|
+
],
|
|
221
|
+
"layout": {}
|
|
222
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qgraphflow",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Generate evidence-grounded interactive software diagrams with offline HTML, SVG and PNG export.",
|
|
6
6
|
"repository": {
|
|
@@ -43,7 +43,6 @@
|
|
|
43
43
|
"README.md",
|
|
44
44
|
"docs/clients*.md",
|
|
45
45
|
"docs/readme/",
|
|
46
|
-
"examples/order-flow.graph.json",
|
|
47
46
|
"skills/q-flow/scripts/compile-layout.mjs",
|
|
48
47
|
"skills/q-flow/scripts/compile-sequence.mjs",
|
|
49
48
|
"skills/q-flow/assets/layout-dist/",
|
|
@@ -51,9 +50,21 @@
|
|
|
51
50
|
"skills/q-flow/assets/viewer/src/layout-measure.js",
|
|
52
51
|
"skills/q-flow/assets/viewer/src/layout-spacing.js",
|
|
53
52
|
"skills/q-flow/assets/viewer/src/session-graph.js",
|
|
53
|
+
"skills/q-flow/assets/viewer/src/view-identity.js",
|
|
54
|
+
"skills/q-flow/assets/viewer/src/architecture-overview.js",
|
|
54
55
|
"skills/q-flow/assets/viewer/src/layout-quality.js",
|
|
56
|
+
"skills/q-flow/assets/viewer/src/layout-policy.js",
|
|
57
|
+
"skills/q-flow/assets/viewer/src/layout-compaction.js",
|
|
58
|
+
"skills/q-flow/assets/viewer/src/route-clearance.js",
|
|
55
59
|
"skills/q-flow/assets/viewer/src/export-svg.js",
|
|
56
|
-
"skills/q-flow/assets/viewer/src/node-svg.js"
|
|
60
|
+
"skills/q-flow/assets/viewer/src/node-svg.js",
|
|
61
|
+
"skills/q-flow/assets/viewer/src/architecture-overview-theme.js",
|
|
62
|
+
"skills/q-flow/assets/viewer/src/orthogonal-routing.js",
|
|
63
|
+
"skills/q-flow/assets/viewer/src/layout-refinement.js",
|
|
64
|
+
"skills/q-flow/assets/viewer/src/layout-templates.js",
|
|
65
|
+
"skills/q-flow/assets/viewer/src/presentation-graph.js",
|
|
66
|
+
"skills/q-flow/assets/viewer/src/layout-semantics.js",
|
|
67
|
+
"examples/jeepay/"
|
|
57
68
|
],
|
|
58
69
|
"scripts": {
|
|
59
70
|
"package": "node scripts/package.mjs"
|
package/skills/q-flow/SKILL.md
CHANGED
|
@@ -6,32 +6,38 @@ argument-hint: "[module or flow] [what the diagram should answer]"
|
|
|
6
6
|
|
|
7
7
|
# Q flow
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Offline HTML diagrams with SVG/PNG downloads.
|
|
10
10
|
|
|
11
11
|
## Intake
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Resolve intent first: an audit is read-only, even if source drift is found. Read and validate without `--fix`; report findings without generation, edits or `--force`. Only an explicit update enters Refresh. Read all supplied material, combining source and documents when requested; distinguish implemented facts from documented intent. Existing graphs supply scope, type, granularity, views and directory; inherit these unless changed.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
A request is ready when every requested view has a subject and question. Structure accepts a system, module or entity set; behaviour needs a flow or component, including one described in a document. For missing scope or output location, use [guided-intake.md](references/guided-intake.md). Ask only for missing information, usually in one or two rounds; continue if essential scope remains unclear. Use a structured question tool when available, otherwise numbered options. After asking, end the turn and wait for the reply; never assume an answer. Write no output files before the round completes.
|
|
16
|
+
|
|
17
|
+
For every ready request, apply [Granularity](references/graph-common.md#granularity) before Evidence, even when intake is skipped. Default unspecified preferences; then start without another confirmation.
|
|
16
18
|
|
|
17
19
|
## Evidence
|
|
18
20
|
|
|
19
|
-
-
|
|
21
|
+
- For repository evidence, follow [evidence-sources.md](references/evidence-sources.md): verify tool/index availability before reporting CodeGraph, otherwise trace directly. Documents use document evidence.
|
|
20
22
|
- Use source/tests for calls, DDL/mappings for ER, manifests for deployment, and accepted requirements plus implementation for business behavior.
|
|
21
23
|
- Preserve exact identifiers and file/line anchors. Separate repository facts, framework behavior, documents, and inference; omit unproven critical relationships and label other inference. Never put secrets or token values in graph data.
|
|
24
|
+
- Public examples and documentation must use independently authored fictional content or public sources. Never reuse private project names, paths, architecture, rules, versions, status or reference images; renaming them is insufficient. Remove affected generated copies when replacing private-derived examples. This does not restrict private diagrams explicitly requested for the user's own project.
|
|
22
25
|
|
|
23
26
|
## Author
|
|
24
27
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
Eleven templates: three architecture views (`meta.architectureView`: `capabilities`, `engineering`, `relations`) and eight other types below.
|
|
29
|
+
|
|
30
|
+
1. Choose `meta.diagramType` by intent: structure → `architecture`; decisions → `flowchart`; ordered calls → `sequence`; stored data → `er`; runtime placement → `deployment`; types → `class`; lifecycle → `state`; actors/capabilities → `usecase`; data movement → `dataflow`. Default to `architecture` when ambiguous. Architecture: platform capabilities / business integration → `capabilities`; engineering organization / component layers → `engineering`; component calls / dependencies → `relations`. Use one graph unless the user explicitly requests multiple views.
|
|
31
|
+
2. Each view uses [graph-common.md](references/graph-common.md) and its matching page in [references/types/](references/types/) (`types/<diagramType>.md`); reuse loaded references across views. Do not read `graph-schema.md`, `visual-contract.md`, `examples/`, `scripts/`, `assets/` or tests to learn rules. Use the type skeleton and validator messages for fields.
|
|
32
|
+
3. Write the evidenced graph at the chosen granularity, without coordinates. Record level/coverage in `meta.scope` and check every user requirement before layout. Apply the common rules for names, evidence, ownership, order and business centre. Across views reuse the same non-empty `module` value for the same business module. Preserve ER keys/cardinalities, class members/multiplicities, sequence pairing/fragments/executions, state guards and architecture/deployment boundaries required at this level. Write once; correct only reported fields.
|
|
33
|
+
4. Templates measure text and preserve order; routes use feasible outlines and independent labels. Never remove facts.
|
|
34
|
+
5. Default output: `<repository-root>/docs/qgraphflow/<scope>-<diagram-type>/`. Document-only work uses the current project root instead; without a suitable project or specified directory, ask only for the output location. Honor user-selected directories.
|
|
29
35
|
|
|
30
36
|
## Generate and verify
|
|
31
37
|
|
|
32
|
-
Resolve
|
|
38
|
+
Resolve the skill directory from the loaded `SKILL.md`, not the client's working directory or a hard-coded installation path. Quote absolute paths in the target repository; never output into plugin caches.
|
|
33
39
|
|
|
34
|
-
Run from
|
|
40
|
+
Run from the skill directory:
|
|
35
41
|
|
|
36
42
|
```bash
|
|
37
43
|
node scripts/validate-graph.mjs "<absolute-graph.json>" --input-only --repo-root "<absolute-repository-root>"
|
|
@@ -39,13 +45,13 @@ node scripts/generate-viewer.mjs "<absolute-graph.json>" "<absolute-output-direc
|
|
|
39
45
|
node scripts/validate-graph.mjs "<absolute-output-directory>/graph.json" --repo-root "<absolute-repository-root>"
|
|
40
46
|
```
|
|
41
47
|
|
|
42
|
-
- Execute the scripts; do not read them, the bundled HTML, the Viewer source or tests. `--help` lists every option.
|
|
43
|
-
- On failure,
|
|
44
|
-
- Composition warnings never fail the run;
|
|
45
|
-
- If bounded layout still fails, report the blocking nodes and relationships and propose separate views with explicit coverage of the original model; never silently reduce the requested detail. Generation defaults to `--layout auto`; `--layout preserve` keeps existing geometry under the same gate.
|
|
46
|
-
- For repository-backed diagrams, pass the target repository root to both commands: they verify every node `source` against local UTF-8 files (existence, line range, symbol, no path escape) and report `sourceEvidence
|
|
47
|
-
- Outputs are `index.html`, `graph.json` and one SVG per view (`diagram.svg`, or `diagram-<n>-<type>.svg` in a collection), built from the prebuilt
|
|
48
|
-
- Reply with
|
|
48
|
+
- Execute the scripts; do not read them, the bundled HTML, the Viewer source or tests. `--help` lists every option. Failures report elements, rule, measurement and remediation; `--verbose` prints the receipt.
|
|
49
|
+
- On failure, run `node scripts/validate-graph.mjs "<graph.json>" --input-only --fix --repo-root "<root>"` first: it repairs sequence order, operand ids, unambiguous replies/callee bars and unique source/site symbols, prints changes and writes only a valid graph. Then edit only reported fields/elements and rerun. Rewrite the whole file only for a wrong type or view split. Never delete supported facts, shrink text or use `--force` to pass a check.
|
|
50
|
+
- Composition warnings never fail the run; input validation prints them, later commands count them (`warnings: n`). Fix `module.missing`, `module.inconsistent`, `flowchart.process-branch` (a non-decision branches) and `edge.site-missing`. For `module.single-tone`, keep one module if the flow really belongs to it; never rename a module for colour. `view.oversized` means over 4 screens at readable zoom: apply the common contract's view-splitting rules while preserving requested detail and graph count. A failing collection names every failing view.
|
|
51
|
+
- If bounded layout still fails, distinguish a search budget from proven impossibility, report the blocking nodes and relationships and propose separate views with explicit coverage of the original model; never silently reduce the requested detail. Generation defaults to `--layout auto`; `--layout preserve` keeps existing geometry under the same gate.
|
|
52
|
+
- For repository-backed diagrams, pass the target repository root to both commands: they verify every node `source` and edge `site` against local UTF-8 files (existence, line range, symbol, no path escape) and report `sourceEvidence` with its `relations` coverage. This checks the working tree, not the commit in `sourceRef` or whether code proves a relationship. Omitting `--repo-root` reports `skipped`, never verified evidence; say so when source files are unavailable. Conceptual diagrams need no root.
|
|
53
|
+
- Outputs are `index.html`, `graph.json` and one SVG per view (`diagram.svg`, or `diagram-<n>-<type>.svg` in a collection), built from the prebuilt viewer; no rebuild or install. Use `--force` only with approval to replace the named outputs. All collection views must pass before replacing output.
|
|
54
|
+
- Reply with artifact paths, types, granularity and coverage (`meta.scope`), semantic/geometry/source-relation results, `meta.notes`, unresolved evidence boundaries, and `Browser acceptance: not performed` unless the next section ran. Never paste full HTML or graph JSON.
|
|
49
55
|
|
|
50
56
|
## Acceptance on request
|
|
51
57
|
|
|
@@ -53,17 +59,19 @@ Ordinary graph delivery ends with the three commands above. Run the browser chec
|
|
|
53
59
|
|
|
54
60
|
## Refresh an existing diagram
|
|
55
61
|
|
|
56
|
-
|
|
62
|
+
Read the supplied graph and collection metadata. Inherit type, scope, granularity, view count and directory. An explicit update approves `--force` for that directory; audit findings alone do not. Resolve only the requested views; ask if their identity is ambiguous.
|
|
63
|
+
|
|
64
|
+
Simplification uses verified facts in Author. Expansion returns to Evidence before Author. Preserve stable IDs; report gaps, aggregations, additions and exclusions. These changes authorize `--layout auto --force` for the requested views only. In a collection add `--view <view-id>` for each changed view; omit it only when all views need layout. Unselected views must pass preserve; never relayout them to clear a failure. Ordinary refresh preserves geometry:
|
|
57
65
|
|
|
58
66
|
```bash
|
|
59
67
|
node scripts/validate-graph.mjs "<dir>/graph.json" --input-only --fix --repo-root "<root>"
|
|
60
68
|
node scripts/generate-viewer.mjs "<dir>/graph.json" "<dir>" --layout preserve --force --repo-root "<root>"
|
|
61
69
|
```
|
|
62
70
|
|
|
63
|
-
Between the two, fix only anchors still reported: read just their files, edit just those
|
|
71
|
+
Between the two, fix only anchors still reported: read just their files, edit just those `source` / `site` anchors or facts, and report a symbol you cannot place. Then validate the output as above. `preserve` keeps the user's moved positions and edited text; if it fails the gate, report the nodes and ask before `--layout auto`. Reply with the changed anchors and every artifact path. If a browser could only download `graph.json`, put it in `<dir>` and regenerate the page and SVGs.
|
|
64
72
|
|
|
65
73
|
## Viewer maintenance
|
|
66
74
|
|
|
67
|
-
For Viewer changes or interaction audits, read [viewer-development.md](references/viewer-development.md), including its maintained visual/interaction contract. Changes to Viewer source, routing, schema behavior, or validation require the full
|
|
75
|
+
For Viewer changes or interaction audits, read [viewer-development.md](references/viewer-development.md), including its maintained visual/interaction contract. Changes to Viewer source, routing, schema behavior, or validation require the full eleven-view browser matrix described there. Graph-only delivery uses the single-page check in [acceptance.md](references/acceptance.md).
|
|
68
76
|
|
|
69
77
|
Publishing the plugin or creating a remote repository requires separate user authorization.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "Q flow"
|
|
3
|
-
short_description: "
|
|
3
|
+
short_description: "Eleven kinds of interactive software diagrams from source, configuration and documents"
|
|
4
4
|
brand_color: "#203f35"
|
|
5
5
|
default_prompt: "Use $q-flow to generate the right kind of interactive software diagram from the current evidence."
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Shared overview presentation tokens on a 1440px layer band.
|
|
2
|
+
// Presentation tokens are independent of module identity and never change ownership or evidence.
|
|
3
|
+
export const OVERVIEW = Object.freeze({ width: 1440, margin: 42, padding: 22, cardPadding: 18, cardGap: 14, bandGap: 28, connectedGap: 56, cardRadius: 14, sectionRadius: 20, title: 22, titleLine: 28, body: 18, bodyLine: 26, badge: 16, badgeLine: 20, sectionTitle: 24, sectionLine: 30 });
|
|
4
|
+
export const OVERVIEW_TONES = ['white', 'subtle', 'blue', 'green', 'lavender', 'plain'];
|
|
5
|
+
const light = {
|
|
6
|
+
paper: '#ffffff', ink: '#242628', body: '#566475', line: '#e1e5e8', edge: '#7d8798',
|
|
7
|
+
white: { fill: '#ffffff', stroke: '#e1e5e8' }, subtle: { fill: '#f5fafc', stroke: '#e1e5e8' },
|
|
8
|
+
blue: { fill: '#eef7fd', stroke: '#87cdee', band: ['#e5f3fb', '#cde8f5'], accent: '#327d9f' },
|
|
9
|
+
green: { fill: '#edf9f5', stroke: '#a7e5d3', band: ['#edf9f5', '#dff4ed'], accent: '#2d8269' },
|
|
10
|
+
lavender: { fill: '#eaf0fe', stroke: '#aac6fd', band: ['#edf2fe', '#d7e4fc'], accent: '#5375aa' },
|
|
11
|
+
badge: { fill: '#e9edf0', ink: '#5f6a7a' }, success: { fill: '#e7f5e9', ink: '#2b763d' }
|
|
12
|
+
};
|
|
13
|
+
const dark = {
|
|
14
|
+
paper: '#171b22', ink: '#eef1f5', body: '#b4bdcb', line: '#404955', edge: '#a8b6c9',
|
|
15
|
+
white: { fill: '#242b35', stroke: '#404955' }, subtle: { fill: '#222d38', stroke: '#404955' },
|
|
16
|
+
blue: { fill: '#223746', stroke: '#457d9e', band: ['#243c4d', '#294b5f'], accent: '#8bc4e0' },
|
|
17
|
+
green: { fill: '#203c34', stroke: '#437d6b', band: ['#243f37', '#294e43'], accent: '#89cbb2' },
|
|
18
|
+
lavender: { fill: '#2c354d', stroke: '#657eaf', band: ['#2f3c58', '#364b70'], accent: '#aec6f1' },
|
|
19
|
+
badge: { fill: '#3b4552', ink: '#c0c9d6' }, success: { fill: '#294c38', ink: '#a6d9af' }
|
|
20
|
+
};
|
|
21
|
+
export const overviewPalette = palette => parseInt(palette.paper.slice(1, 3), 16) < 128 ? dark : light;
|
|
22
|
+
export const overviewAppearance = (node, palette) => ({ ...(overviewPalette(palette)[node.overviewTone ?? 'subtle'] ?? overviewPalette(palette).subtle), role: 'neutral', label: 'Components / actors' });
|