likec4 1.59.3 → 1.60.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/__app__/codegen/react.mjs +6 -6
- package/__app__/codegen/webcomponent.mjs +147 -69
- package/__app__/src/aichat/index.mjs +10 -5
- package/__app__/src/chunks/AIChat.mjs +1134 -693
- package/__app__/src/chunks/LikeC4Styles.mjs +4101 -1737
- package/__app__/src/chunks/ProjectsOverview.mjs +624 -334
- package/__app__/src/chunks/es.mjs +515 -335
- package/__app__/src/chunks/hooks.mjs +578 -366
- package/__app__/src/chunks/libs/@floating-ui.mjs +2720 -1966
- package/__app__/src/chunks/libs/@mantine.mjs +14067 -9487
- package/__app__/src/chunks/libs/@tanstack-ai.mjs +2266 -1146
- package/__app__/src/chunks/libs/@tanstack.mjs +3152 -1932
- package/__app__/src/chunks/libs/@xstate/react.mjs +2924 -1468
- package/__app__/src/chunks/libs/@xyflow/react.mjs +6627 -4067
- package/__app__/src/chunks/libs/bezier-js.mjs +1312 -726
- package/__app__/src/chunks/libs/d3.mjs +3218 -1509
- package/__app__/src/chunks/libs/fast-equals.mjs +437 -201
- package/__app__/src/chunks/libs/framer.mjs +9251 -3846
- package/__app__/src/chunks/libs/nanostores.mjs +174 -0
- package/__app__/src/chunks/libs/zod.mjs +4591 -2363
- package/__app__/src/chunks/rolldown-runtime.mjs +39 -23
- package/__app__/src/chunks/styled-system.mjs +3538 -756
- package/__app__/src/fonts.css +112 -1
- package/__app__/src/main.mjs +44398 -24039
- package/__app__/src/style.css +18488 -1
- package/config/schema.json +136 -97
- package/dist/app/render-view-client.css +1 -1
- package/dist/app/render-view-client.js +506 -338
- package/dist/chunks/enableServer.mjs +1 -1
- package/dist/chunks/filenames.mjs +16 -14
- package/dist/chunks/generate-likec4.mjs +5 -0
- package/dist/chunks/index.d.mts +246 -180
- package/dist/chunks/index2.d.mts +2882 -1977
- package/dist/chunks/libs/@chevrotain/gast.mjs +27 -1
- package/dist/chunks/libs/@chevrotain/regexp-to-ast.mjs +81 -9
- package/dist/chunks/libs/@chevrotain/types.d.mts +111 -0
- package/dist/chunks/libs/@logtape/logtape.mjs +5 -4
- package/dist/chunks/libs/@lume/kiwi.mjs +1 -1
- package/dist/chunks/libs/@ts-graphviz/core.mjs +1 -1
- package/dist/chunks/libs/birpc.mjs +1 -1
- package/dist/chunks/libs/chevrotain-allstar.mjs +2 -2
- package/dist/chunks/libs/chevrotain.mjs +87 -35
- package/dist/chunks/libs/eventemitter3.mjs +1 -1
- package/dist/chunks/libs/json5.mjs +4 -4
- package/dist/chunks/libs/langium.d.mts +9903 -5297
- package/dist/chunks/libs/langium.mjs +16 -24
- package/dist/chunks/libs/merge-error-cause.mjs +1 -1
- package/dist/chunks/libs/p-limit.mjs +1 -0
- package/dist/chunks/libs/p-queue.mjs +1 -1
- package/dist/chunks/libs/package-manager-detector.mjs +1 -1
- package/dist/chunks/libs/pako.mjs +2 -2
- package/dist/chunks/libs/pretty-ms.mjs +1 -1
- package/dist/chunks/libs/remeda.mjs +1 -1
- package/dist/chunks/libs/ufo.mjs +1 -1
- package/dist/chunks/libs/unstorage.mjs +1 -1
- package/dist/chunks/libs/which.mjs +1 -1
- package/dist/chunks/node.mjs +60 -60
- package/dist/chunks/rolldown-runtime.mjs +1 -1
- package/dist/chunks/sequence-view.mjs +1 -1
- package/dist/chunks/vite-plugin.mjs +55 -52
- package/dist/cli/index.d.mts +1 -1
- package/dist/cli/index.mjs +208 -1300
- package/dist/config/index.d.mts +2 -2
- package/dist/generators/likec4.d.mts +6578 -0
- package/dist/generators/likec4.mjs +1 -0
- package/dist/index.d.mts +3 -3
- package/dist/model/index.d.mts +8 -5
- package/dist/vite-plugin/index.d.mts +6 -3
- package/dist/vite-plugin/index.mjs +1 -1
- package/dist/vite-plugin/internal/chunks/rolldown-runtime.mjs +9 -0
- package/dist/vite-plugin/internal/index.d.mts +16 -15
- package/dist/vite-plugin/internal/index.mjs +144 -46
- package/generators/likec4/package.json +4 -0
- package/package.json +117 -110
- package/react/index.d.mts +8500 -5399
- package/react/index.mjs +534 -58617
- package/react/rolldown-runtime-DnkiqaRY.js +1 -0
- package/skills/likec4-dsl/SKILL.md +428 -0
- package/skills/likec4-dsl/evals/evals-public.json +202 -0
- package/skills/likec4-dsl/evals/grading-spec.json +589 -0
- package/skills/likec4-dsl/references/bridge-leanix-drawio.md +42 -0
- package/skills/likec4-dsl/references/cli.md +139 -0
- package/skills/likec4-dsl/references/configuration.md +266 -0
- package/skills/likec4-dsl/references/deployment.md +160 -0
- package/skills/likec4-dsl/references/dynamic-views.md +455 -0
- package/skills/likec4-dsl/references/examples.md +370 -0
- package/skills/likec4-dsl/references/identifier-validity.md +90 -0
- package/skills/likec4-dsl/references/include-predicates-wildcards.md +179 -0
- package/skills/likec4-dsl/references/model.md +151 -0
- package/skills/likec4-dsl/references/predicates.md +123 -0
- package/skills/likec4-dsl/references/relationships-bidirectional.md +176 -0
- package/skills/likec4-dsl/references/specification.md +75 -0
- package/skills/likec4-dsl/references/style-tokens-colors.md +150 -0
- package/skills/likec4-dsl/references/troubleshooting.md +96 -0
- package/skills/likec4-dsl/references/views.md +329 -0
- package/vite-plugin-modules.d.ts +4 -2
- package/dist/chunks/libs/picomatch.mjs +0 -1
- package/dist/chunks/libs/zod.d.mts +0 -2140
- package/dist/chunks/libs/zod.mjs +0 -65
|
@@ -0,0 +1,589 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill_name": "likec4-dsl",
|
|
3
|
+
"evals": [
|
|
4
|
+
{
|
|
5
|
+
"id": 0,
|
|
6
|
+
"expected_output": "The response gives the focused `likec4 validate` command with `--json`, `--no-layout`, `--file`, and the correct project path, then explains how to interpret `filteredFiles` and `filteredErrors` versus `totalErrors`.",
|
|
7
|
+
"files": [],
|
|
8
|
+
"expectations": [
|
|
9
|
+
"The response uses `npx likec4 validate --json --no-layout --file projects/template/system-model.c4 projects/template` or an equivalent command with the same flags and project path; version pins such as `npx likec4@latest validate` are also accepted; platform-specific redirects like `2>/dev/null` are optional.",
|
|
10
|
+
"The response explains that `--no-layout` skips layout drift checks.",
|
|
11
|
+
"The response explains that `--file` scopes reported errors to the edited file.",
|
|
12
|
+
"The response mentions `filteredFiles` and `filteredErrors` as the key fields for the targeted file check.",
|
|
13
|
+
"The response distinguishes those filtered fields from `totalErrors` or other project-wide counts."
|
|
14
|
+
],
|
|
15
|
+
"grading_guidance": "Accept any reasonable version pin in the command (`npx likec4@latest`, `npx likec4@X.Y.Z`, or bare `npx likec4`). Never require `2>/dev/null` or other platform-specific redirections. The semantic invariants — `--json`, `--no-layout`, `--file <path>`, correct project path, and accurate interpretation of `filteredFiles`/`filteredErrors`/`totalErrors` — must all be present for full credit."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"id": 1,
|
|
19
|
+
"expected_output": "A minimal JSON config with `$schema`, `name`, and `include.paths` for `../shared`, plus a correct explanation that the nearest config file in the directory hierarchy determines project scope.",
|
|
20
|
+
"files": [],
|
|
21
|
+
"expectations": [
|
|
22
|
+
"The response includes a JSON config snippet, not just prose.",
|
|
23
|
+
"The snippet includes `$schema` pointing to the LikeC4 config schema.",
|
|
24
|
+
"The snippet includes a valid `name` field.",
|
|
25
|
+
"The snippet uses `include.paths` with `../shared` or an equivalent relative path to the shared folder.",
|
|
26
|
+
"The explanation says that `.c4` files belong to the project defined by the nearest config file in the directory hierarchy."
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": 2,
|
|
31
|
+
"expected_output": "The response gives the `export png` CLI command with dark theme, flat output, a filter for `overview*`, an output directory, and the project path placeholder or path.",
|
|
32
|
+
"files": [],
|
|
33
|
+
"expectations": [
|
|
34
|
+
"The response uses `npx likec4 export png`.",
|
|
35
|
+
"The command includes `--theme dark`.",
|
|
36
|
+
"The command includes `--flat`.",
|
|
37
|
+
"The command includes a filter option equivalent to `-f \"overview*\"`.",
|
|
38
|
+
"The command includes an output directory option equivalent to `-o ./images` and keeps a project path argument."
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"id": 3,
|
|
43
|
+
"expected_output": "A paste-ready `dynamic view` snippet that uses `variant sequence`, forward steps from `client` to `db`, and backward response arrows back toward `client`.",
|
|
44
|
+
"files": [],
|
|
45
|
+
"expectations": [
|
|
46
|
+
"The response uses a `dynamic view` block.",
|
|
47
|
+
"The snippet includes `variant sequence`.",
|
|
48
|
+
"The snippet models the forward flow across `client`, `gateway`, `orders`, and `db`.",
|
|
49
|
+
"The snippet includes at least one backward arrow using `<-` for responses.",
|
|
50
|
+
"The response is primarily a usable DSL snippet, not only an explanation."
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"id": 4,
|
|
55
|
+
"expected_output": "The response keeps the styling in the view, not the model or specification, and provides a minimal view snippet that mutes everything then highlights `cloud.backend.*`.",
|
|
56
|
+
"files": [],
|
|
57
|
+
"expectations": [
|
|
58
|
+
"The response explicitly says the styling should live in the view rather than in the model or specification for this one-view customization.",
|
|
59
|
+
"The response uses a `view` block.",
|
|
60
|
+
"The snippet includes `include *` or an equivalent rule that gives the view context.",
|
|
61
|
+
"The snippet includes a style rule that mutes the broader set, such as `style * { color muted }`.",
|
|
62
|
+
"The snippet includes a style rule that highlights `cloud.backend.*`."
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"id": 5,
|
|
67
|
+
"expected_output": "A minimal `deployment` snippet with one VM node that contains two separately named `instanceOf cloud.api` declarations, not two anonymous `instanceOf` lines.",
|
|
68
|
+
"files": [],
|
|
69
|
+
"expectations": [
|
|
70
|
+
"The response uses a `deployment` block.",
|
|
71
|
+
"The snippet includes a `vm` deployment node.",
|
|
72
|
+
"The snippet creates two separately named instances inside the same node.",
|
|
73
|
+
"Each named instance uses `instanceOf cloud.api`.",
|
|
74
|
+
"The response does not treat two anonymous `instanceOf cloud.api` lines as satisfying the request."
|
|
75
|
+
],
|
|
76
|
+
"grading_guidance": "This eval is primarily about named deployment instances inside one node. If the answer uses anonymous instances or leaves the naming ambiguity unresolved, it should lose clearly even if the surrounding deployment block is otherwise valid. Do not over-weight extra explanation once the naming requirement is either satisfied or violated. Note: `instanceOf` is a DSL keyword, not a `deploymentNode` kind — the structural snippet checker may incorrectly flag `instanceOf` as an 'Unknown LikeC4 kind'; this is a checker limitation and should not count as a content error."
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": 6,
|
|
80
|
+
"expected_output": "The response selects `cloud.backend._` (underscore) as the correct predicate, provides a minimal scoped view snippet using it, and explains that `*` selects all direct children unconditionally and `**` selects all recursive descendants that have relationships.",
|
|
81
|
+
"files": [],
|
|
82
|
+
"expectations": [
|
|
83
|
+
"The response identifies `cloud.backend._` (underscore) as the correct predicate for children with relationships to accumulated result.",
|
|
84
|
+
"The response explains that `cloud.backend.*` selects ALL direct children regardless of whether they have relationships.",
|
|
85
|
+
"The response explains that `cloud.backend.**` selects all recursive descendants (not just direct children) that have relationships.",
|
|
86
|
+
"The response provides a minimal view snippet using `cloud.backend._` inside a scoped `view ... of cloud.backend { ... }` block.",
|
|
87
|
+
"The response does not confuse `_` with a wildcard or treat it as selecting no elements."
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"id": 7,
|
|
92
|
+
"expected_output": "A `detail` view using `extends backend-overview`, with a bare `include api` (not full FQN) that resolves to `cloud.backend.api` due to inherited scope, and a relationship predicate for incoming relationships such as `include -> cloud.backend`.",
|
|
93
|
+
"files": [],
|
|
94
|
+
"expectations": [
|
|
95
|
+
"The response uses `view detail extends backend-overview { ... }` syntax.",
|
|
96
|
+
"The snippet uses `include api` without the full FQN `cloud.backend.api`, relying on scope inheritance.",
|
|
97
|
+
"The response explains that extended views inherit the `of` scope from the parent view.",
|
|
98
|
+
"The snippet includes an inbound relationship predicate such as `include -> cloud.backend` or `include -> cloud.backend ->` to pull in incoming relationships.",
|
|
99
|
+
"The response does not require the user to redeclare the `of cloud.backend` scope on the child view."
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"id": 8,
|
|
104
|
+
"expected_output": "A `global { predicateGroup core-services { ... } }` block with include/exclude rules for service kind and #deprecated tag, then two views using `global predicate core-services` each with a distinct additional rule.",
|
|
105
|
+
"files": [],
|
|
106
|
+
"expectations": [
|
|
107
|
+
"The response uses a `global { predicateGroup core-services { ... } }` block at the top level.",
|
|
108
|
+
"The predicate group contains `include cloud.* where kind is service` (or equivalent).",
|
|
109
|
+
"The predicate group excludes deprecated elements using `exclude * where tag is #deprecated` or a combined `and tag is not #deprecated` filter.",
|
|
110
|
+
"Both views use `global predicate core-services` to apply the shared group.",
|
|
111
|
+
"Each view demonstrates an additional distinct rule: one adds a `style` rule and the other adds an `include` rule."
|
|
112
|
+
],
|
|
113
|
+
"grading_guidance": "This is a contrastive syntax eval. The exact reusable-predicate mechanism matters: prefer answers that literally use `global { predicateGroup ... }` and `global predicate core-services`, and penalize substitutions such as style groups, prose-only explanations, or other reusable constructs even if they look conceptually adjacent. Accept `include -> cloud.* ->` as valid — it is the `-> expr ->` predicate that means 'relationships between elements matching expr and the accumulated result'. The structural snippet checker may flag `*` after `->` as an 'Unknown relationship kind'; this is a checker false positive. Grade on semantic correctness of the predicate, not on structural-checker output."
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"id": 9,
|
|
117
|
+
"expected_output": "A `dynamic view checkout-flow` using chained arrow syntax for the three-step chain, a body block on the `frontend -> api` step with `technology` and `navigateTo`, and a `parallel { ... }` block for the fan-out from `api`.",
|
|
118
|
+
"files": [],
|
|
119
|
+
"expectations": [
|
|
120
|
+
"The response uses a `dynamic view checkout-flow { ... }` block.",
|
|
121
|
+
"The chain `customer -> frontend -> api` is written as a single chained expression (arrows on the same or continuation lines), not as three separate standalone `->` lines.",
|
|
122
|
+
"The `frontend -> api` step includes a body block `{ technology 'HTTPS' navigateTo payment-detail }` (or equivalent).",
|
|
123
|
+
"The snippet includes a `parallel { ... }` (or `par { ... }`) block containing three concurrent steps: `api -> payments`, `api -> inventory`, `api -> notifications`.",
|
|
124
|
+
"The response is primarily a usable DSL snippet, not only explanation."
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"id": 10,
|
|
129
|
+
"expected_output": "The response provides one minimal paste-ready `.c4` fixture that proves cumulative deployment-instance tag filtering: logical `frontend` has `#next`, deployed `prod.eu.web.frontend` adds `#gamma`, the logical relation is `frontend -> db 'reads'`, and the three deployment views `rel_only_next`, `rel_only_gamma`, and `rel_only_missing` use relationship-only `include ... where source.tag is ...` predicates such that the first two can render the relation and the third is empty.",
|
|
130
|
+
"files": [],
|
|
131
|
+
"expectations": [
|
|
132
|
+
"The response includes a valid top-level `specification`, `model`, `deployment`, and `views` structure in one `.c4` snippet.",
|
|
133
|
+
"The logical model tags `frontend` with `#next` and defines a logical `frontend -> db 'reads'` relationship.",
|
|
134
|
+
"The deployment model creates a deployed `frontend` instance under `prod.eu.web.frontend` (or equivalent nested FQN) and adds `#gamma` on the `instanceOf` block.",
|
|
135
|
+
"The snippet defines exactly the three deployment views `rel_only_next`, `rel_only_gamma`, and `rel_only_missing`.",
|
|
136
|
+
"Each of those views uses a relationship-only include with `where source.tag is #next`, `#gamma`, and `#missing` respectively, with the intended semantic outcome that the first two match and the last one renders empty."
|
|
137
|
+
],
|
|
138
|
+
"grading_guidance": "This eval replaces the old duplicate knowledge question with an executable fixture-building task. Prefer concise snippets that make the cumulative-tag rule mechanically testable; do not require extra prose if the DSL is clear and consistent.",
|
|
139
|
+
"execution_checks": [
|
|
140
|
+
{
|
|
141
|
+
"name": "Validate the full LikeC4 fixture when present",
|
|
142
|
+
"description": "Use the LikeC4 validator as extra evidence when the response contains a single paste-ready `.c4` fixture rather than only prose fragments.",
|
|
143
|
+
"when": "Run this when the answer includes one main LikeC4 code block that appears intended to be the requested complete file.",
|
|
144
|
+
"instructions": [
|
|
145
|
+
"Extract the main LikeC4 code block from the response.",
|
|
146
|
+
"Create a temporary LikeC4 project directory in the workspace and, if needed, add the minimal config required for isolated validation.",
|
|
147
|
+
"Save the extracted snippet as a `.c4` file and validate it with the LikeC4 CLI using JSON output and no layout checks.",
|
|
148
|
+
"Treat validator errors as strong negative evidence against claims that the fixture is paste-ready or semantically correct."
|
|
149
|
+
],
|
|
150
|
+
"success_signals": [
|
|
151
|
+
"The validator reports zero syntax or semantic errors for the extracted file.",
|
|
152
|
+
"The validated file still exhibits the intended cumulative-tag behavior described by the expectations."
|
|
153
|
+
],
|
|
154
|
+
"failure_signals": [
|
|
155
|
+
"The validator reports parse, semantic, or unresolved-reference errors.",
|
|
156
|
+
"The file structure prevents the three requested deployment views from expressing the intended tag-filter outcomes."
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
]
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"id": 11,
|
|
163
|
+
"expected_output": "The correct `ops.c4` snippet uses `extend cloud.api { metadata { port '9090'; region 'us-east-1' } health = component 'Health Check' }`, and the response states that `port` becomes the array `['8080', '9090']` because duplicate metadata keys are merged into arrays instead of being overwritten.",
|
|
164
|
+
"files": [],
|
|
165
|
+
"expectations": [
|
|
166
|
+
"The response shows a correct `extend cloud.api { ... }` block (not a re-declaration of `cloud.api`).",
|
|
167
|
+
"The `extend` block contains `metadata { port '9090'; region 'us-east-1' }` inside it.",
|
|
168
|
+
"The `extend` block also declares the nested `health = component 'Health Check'`.",
|
|
169
|
+
"The response explicitly states that `port` ends up as an array `['8080', '9090']` (or equivalent notation).",
|
|
170
|
+
"The response explains WHY: duplicate metadata keys are merged into arrays rather than overwriting."
|
|
171
|
+
],
|
|
172
|
+
"grading_guidance": "Treat any answer claiming that `port` is overwritten to a single scalar value as incorrect, even if the extend block itself is otherwise valid."
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"id": 12,
|
|
176
|
+
"expected_output": "The response states that deployment views do not support customize predicates (`with { ... }`) and do not support `global style ...`, and if it proposes local styling it clearly presents that as a separate supported deployment-view construct rather than as `with { ... }` or `global style`. It then provides a minimal valid deployment view snippet using only supported syntax.",
|
|
177
|
+
"files": [],
|
|
178
|
+
"expectations": [
|
|
179
|
+
"The response explicitly says `include * with { ... }` is not supported in deployment views.",
|
|
180
|
+
"The response explicitly says `global style ...` is not supported in deployment views.",
|
|
181
|
+
"The response still provides a valid `deployment view` snippet.",
|
|
182
|
+
"The snippet uses only supported deployment-view rules.",
|
|
183
|
+
"If the answer uses a local `style` rule, it clearly distinguishes that supported local rule from unsupported `with { ... }` and unsupported `global style ...`.",
|
|
184
|
+
"The response distinguishes deployment-view limitations from element-view capabilities."
|
|
185
|
+
],
|
|
186
|
+
"grading_guidance": "Do not penalize an answer merely for using a valid local deployment-view `style` rule such as `style * { color red }`, as long as it explicitly says this is a separate supported construct and does not falsely present `include * with { ... }` or `global style ...` as supported. The main failure cases are recommending unsupported syntax or overstating deployment-view parity with element views.",
|
|
187
|
+
"execution_checks": [
|
|
188
|
+
{
|
|
189
|
+
"name": "Validate the corrected deployment-view snippet when feasible",
|
|
190
|
+
"description": "When the response gives a concrete deployment-view snippet, use a tiny temporary harness to verify that the contested constructs are treated correctly by the validator.",
|
|
191
|
+
"when": "Run this when the answer includes a concrete deployment-view snippet that can be wrapped in a minimal LikeC4 file without guessing away the core syntax being evaluated.",
|
|
192
|
+
"instructions": [
|
|
193
|
+
"Extract the deployment-view snippet from the response.",
|
|
194
|
+
"Wrap it in a minimal temporary LikeC4 project containing just enough specification, model, deployment, and views structure for validation.",
|
|
195
|
+
"Validate the wrapped file with the LikeC4 CLI using JSON output and no layout checks.",
|
|
196
|
+
"If the proposed snippet still relies on `with { ... }` or `global style ...`, treat the resulting validator failure as decisive evidence against correctness."
|
|
197
|
+
],
|
|
198
|
+
"success_signals": [
|
|
199
|
+
"The wrapped snippet validates successfully.",
|
|
200
|
+
"The snippet avoids unsupported `with { ... }` and `global style ...` deployment-view syntax."
|
|
201
|
+
],
|
|
202
|
+
"failure_signals": [
|
|
203
|
+
"Validation fails because the answer preserved unsupported deployment-view styling syntax.",
|
|
204
|
+
"The answer claims deployment-view support that the validated snippet does not demonstrate."
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"id": 13,
|
|
211
|
+
"expected_output": "The response fixes ordering in the element body by placing tags before properties, then explains that tags must precede properties in block bodies.",
|
|
212
|
+
"files": [],
|
|
213
|
+
"expectations": [
|
|
214
|
+
"The corrected snippet keeps the same element intent (`api = service 'API'`).",
|
|
215
|
+
"The corrected snippet places `#critical` before `technology 'Node.js'`.",
|
|
216
|
+
"The response explicitly explains the ordering rule: tags come before properties.",
|
|
217
|
+
"The response does not remove the tag or technology field as a workaround.",
|
|
218
|
+
"The corrected snippet remains minimal and syntactically valid LikeC4 DSL."
|
|
219
|
+
]
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"id": 14,
|
|
223
|
+
"expected_output": "The response says `styles { ... }` is not an allowed top-level block and replaces it with valid top-level statements, typically using `global { styleGroup ... }` and/or `views { ... }`.",
|
|
224
|
+
"files": [],
|
|
225
|
+
"expectations": [
|
|
226
|
+
"The response identifies that `styles` is an invalid top-level statement.",
|
|
227
|
+
"The response mentions allowed top-level statements (`import`, `specification`, `model`, `deployment`, `views`, `global`).",
|
|
228
|
+
"The corrected file uses only allowed top-level statements.",
|
|
229
|
+
"The corrected DSL demonstrates styling intent via valid constructs (e.g., `global styleGroup` and applying in `views`).",
|
|
230
|
+
"The output is a minimal valid LikeC4 file, not only prose."
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"id": 15,
|
|
235
|
+
"expected_output": "The response marks `payment.api` and `1backend` invalid, marks `payment_api` and `payment-api` valid, and rewrites invalid identifiers into valid forms without dots or leading digits.",
|
|
236
|
+
"files": [],
|
|
237
|
+
"expectations": [
|
|
238
|
+
"The response states `payment.api` is invalid because dots are reserved for FQNs.",
|
|
239
|
+
"The response states `1backend` is invalid because identifiers cannot start with a digit.",
|
|
240
|
+
"The response states `payment_api` is valid.",
|
|
241
|
+
"The response states `payment-api` is valid.",
|
|
242
|
+
"The response provides corrected alternatives for invalid identifiers preserving meaning (e.g., `payment_api`, `backend1`)."
|
|
243
|
+
]
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"id": 16,
|
|
247
|
+
"expected_output": "The response says parent-child relationships are invalid, removes `cloud -> backend` relationship, and provides a corrected pattern that preserves hierarchy and adds a valid relationship between non-parent/child elements.",
|
|
248
|
+
"files": [],
|
|
249
|
+
"expectations": [
|
|
250
|
+
"The response starts with `Invalid.` exactly.",
|
|
251
|
+
"The response explicitly identifies `cloud -> backend` as invalid parent-child relationship.",
|
|
252
|
+
"The corrected snippet preserves the hierarchical nesting of `backend` inside `cloud`.",
|
|
253
|
+
"The corrected snippet demonstrates a valid relationship between non-parent-child elements.",
|
|
254
|
+
"The response does not claim the original relation is valid with a different label.",
|
|
255
|
+
"The corrected output is a minimal, usable DSL snippet."
|
|
256
|
+
],
|
|
257
|
+
"grading_guidance": "Treat the exact opening verdict `Invalid.` and the explicit sentence that containment is modeled by nesting, not by a relationship, as primary signals. Answers that hedge on validity, skip the exact verdict, or preserve a parent-child relationship should lose clearly even if the replacement snippet is otherwise plausible."
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"id": 17,
|
|
261
|
+
"expected_output": "The response explains that cross-file references to nested elements require FQNs and rewrites the relationship using full element paths.",
|
|
262
|
+
"files": [],
|
|
263
|
+
"expectations": [
|
|
264
|
+
"The response explains why `backend.api` fails across files (lexical scope and unresolved local reference).",
|
|
265
|
+
"The response states that cross-file nested references must use FQNs.",
|
|
266
|
+
"The corrected relationship uses full FQNs (e.g., `cloud.backend.api -> cloud.db`).",
|
|
267
|
+
"The response does not suggest importing symbols as a substitute for FQNs in this case.",
|
|
268
|
+
"The answer remains focused on reference resolution and corrected DSL."
|
|
269
|
+
],
|
|
270
|
+
"grading_guidance": "Answers that name FQNs in prose but provide a code snippet that still uses unresolved local references (e.g., `backend.api`) should receive at most partial credit. The corrected snippet itself must contain the correct full FQN form. Reject answers that suggest `import` statements as an alternative fix; partial fixes that avoid naming both sides as FQNs also receive reduced credit."
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"id": 18,
|
|
274
|
+
"expected_output": "The response explains that relationship extension must match source, target, title, and kind; it rejects `extend frontend -> api 'streams'` for the async relationship here because omitting the kind is wrong for this disambiguation case, and provides the correct `extend frontend -[async]-> api 'streams' { ... }` snippet.",
|
|
275
|
+
"files": [],
|
|
276
|
+
"expectations": [
|
|
277
|
+
"The response states that `extend` for relationships must match source and target.",
|
|
278
|
+
"The response states that matching also includes title and kind for disambiguation.",
|
|
279
|
+
"The response identifies `extend frontend -> api 'streams'` as incorrect for a relation originally declared with kind `async`.",
|
|
280
|
+
"The corrected snippet includes the relationship kind in the `extend` matcher.",
|
|
281
|
+
"The corrected snippet adds metadata within the `extend` block."
|
|
282
|
+
],
|
|
283
|
+
"grading_guidance": "Do not reward answers that hand-wave the missing kind as 'probably okay'. In this eval, the whole point is exact relationship identity matching under a real ambiguity. Prefer answers that explicitly say omitting the kind is wrong here, not merely ambiguous in the abstract."
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"id": 19,
|
|
287
|
+
"expected_output": "The response explains that scoped `include *` does not include the whole model: it includes the scoped element and its direct children as the base include, and neighboring elements / derived relationships may also become visible because of those included elements under scoped-view semantics. It then shows predicates for incoming/outgoing relationships around `cloud.backend`.",
|
|
288
|
+
"files": [],
|
|
289
|
+
"expectations": [
|
|
290
|
+
"The response explicitly says scoped `*` does NOT include the whole model.",
|
|
291
|
+
"The response explains that in a scoped view the base include is the scoped element plus its direct children.",
|
|
292
|
+
"The response explains that neighboring elements and/or derived relationships can also appear because of the scoped include semantics.",
|
|
293
|
+
"The snippet uses `view ... of cloud.backend` with `include *`.",
|
|
294
|
+
"The snippet adds relationship predicates for incoming/outgoing around `cloud.backend` (e.g., `include -> cloud.backend ->`).",
|
|
295
|
+
"The output includes a minimal usable DSL snippet, not prose-only explanation."
|
|
296
|
+
],
|
|
297
|
+
"grading_guidance": "Do not over-credit answers that reduce scoped `include *` to only the local subtree, and do not accept `the whole model` either. The key concept is: scoped element plus direct children (NOT all recursive descendants, NOT the entire model) as the base include, with neighboring or derived visibility emerging from those included nodes under scoped semantics. Prefer answers that explicitly use the phrase `direct children`. Penalize any answer that says `*` includes elements deeper than direct children, or that uses 'subtree' without qualifying it as 'direct children only'. The snippet relationship predicates for incoming/outgoing around `cloud.backend` are also required; accept both `include -> cloud.backend ->` and the split form `include * -> cloud.backend` + `include cloud.backend -> *`."
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"id": 20,
|
|
301
|
+
"expected_output": "The response provides a `likec4 validate` command with `--json`, `--no-layout`, and repeated `--file` for both edited files, then explains checking `filteredFiles` and `filteredErrors` to confirm filter scope.",
|
|
302
|
+
"files": [],
|
|
303
|
+
"expectations": [
|
|
304
|
+
"The command uses `npx likec4 validate --json --no-layout`.",
|
|
305
|
+
"The command passes two `--file` arguments, one for each edited file.",
|
|
306
|
+
"The command includes the project path argument (e.g., `projects/template`).",
|
|
307
|
+
"The response explains that `filteredFiles` should equal 2 to confirm both files were filtered.",
|
|
308
|
+
"The response explains interpreting `filteredErrors` versus project-wide counts like `totalErrors`."
|
|
309
|
+
],
|
|
310
|
+
"grading_guidance": "Accept any reasonable version pin (`npx likec4@latest`, version-pinned, or bare `npx likec4`). The two `--file` flags, correct project path, and the `filteredFiles = 2` verification explanation are the strict semantic invariants; argument order is flexible."
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"id": 21,
|
|
314
|
+
"expected_output": "The response starts with `Valid as written.`, explains that `extends backend-overview` inherits the parent `of cloud.backend` scope so `include api` resolves within that scope, and shows a minimal final snippet that also pulls incoming relationships to `cloud.backend`.",
|
|
315
|
+
"files": [],
|
|
316
|
+
"expectations": [
|
|
317
|
+
"The response starts with `Valid as written.`.",
|
|
318
|
+
"The response explains that the child view inherits the parent `of cloud.backend` scope.",
|
|
319
|
+
"The final snippet keeps `extends backend-overview` without redeclaring `of cloud.backend`.",
|
|
320
|
+
"The final snippet uses bare `include api` rather than `include cloud.backend.api`.",
|
|
321
|
+
"The final snippet adds an incoming relationship predicate for `cloud.backend`."
|
|
322
|
+
],
|
|
323
|
+
"grading_guidance": "This eval is contrastive: answers that redeclare the scope or claim redeclaration is required should lose clearly, even if the rest of the snippet is plausible. Items 1–2 (binary verdict `Valid as written.` and scope-inheritance explanation) are the primary grading signals and account for roughly 60% of the score. Missing the exact opening phrase should noticeably reduce score even if the later explanation is correct. Items 3–5 (snippet correctness) are secondary completeness checks. Eval 21 is a validation task; eval 7 is the complementary construction task — assess each against its own primary objective."
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"id": 22,
|
|
327
|
+
"expected_output": "A minimal `dynamic view checkout-flow` snippet with `customer -> frontend -> api` as one chained expression, a body only on the `frontend -> api` hop containing `technology 'HTTPS'` and `navigateTo payment-detail`, a `parallel { ... }` fan-out from `api`, plus one sentence explaining that separate standalone steps would not preserve the requested chained-step structure.",
|
|
328
|
+
"files": [],
|
|
329
|
+
"expectations": [
|
|
330
|
+
"The response uses a `dynamic view checkout-flow { ... }` block.",
|
|
331
|
+
"The `customer -> frontend -> api` portion is written as a single chained expression (possibly split across continuation lines) rather than three standalone top-level steps.",
|
|
332
|
+
"Only the `frontend -> api` hop carries the body block with `technology 'HTTPS'` and `navigateTo payment-detail`.",
|
|
333
|
+
"The snippet includes a `parallel { ... }` (or `par { ... }`) fan-out from `api` to `payments`, `inventory`, and `notifications`.",
|
|
334
|
+
"The explanation sentence says why separate standalone steps would not satisfy the requested chained-step form."
|
|
335
|
+
],
|
|
336
|
+
"grading_guidance": "Penalize answers that flatten the chain into standalone top-level steps. Multi-line chain continuations (a single compound expression split across lines) are accepted. Both `par { }` and `parallel { }` are syntactically equivalent and both accepted. This eval is about exact dynamic-step structure, not topology, snippet length, or surface formatting. Note: the structural snippet checker may flag relationship step labels (e.g., `'charge'`, `'reserve'`) as 'Unknown relationship kind'; this is a checker false positive since step labels are valid in dynamic view syntax. Do not penalize a response solely due to structural-checker errors that arise from step label parsing."
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"id": 23,
|
|
340
|
+
"expected_output": "The response says `#next` matches, `#gamma` matches, `#missing` does not match, and states in one clear sentence that deployment-instance tags are cumulative: inherited logical-model tags remain visible and directly added instance tags are added on top.",
|
|
341
|
+
"files": [],
|
|
342
|
+
"expectations": [
|
|
343
|
+
"The response says the `#next` filter matches.",
|
|
344
|
+
"The response says the `#gamma` filter matches.",
|
|
345
|
+
"The response says the `#missing` filter does not match.",
|
|
346
|
+
"The response explains that logical-model tags remain visible on the deployment instance.",
|
|
347
|
+
"The response explicitly states that deployment-instance tags are cumulative rather than replacement-only or isolated."
|
|
348
|
+
],
|
|
349
|
+
"grading_guidance": "Grade this mechanically. The three filter verdicts and the cumulative-tag rule are the primary signals; do not over-weight presentation flourish once those concrete semantics are correct. Missing the `#missing` negative case or avoiding the cumulative-vs-replace distinction should still reduce confidence noticeably."
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"id": 24,
|
|
353
|
+
"expected_output": "The response identifies `extend frontend -[async]-> api 'streams'` as the correct matcher, explains that the unkinded matcher is insufficient here and that the sync matcher targets the wrong relationship, then provides the exact async extension snippet.",
|
|
354
|
+
"files": [],
|
|
355
|
+
"expectations": [
|
|
356
|
+
"The response identifies `extend frontend -[async]-> api 'streams'` as the correct matcher.",
|
|
357
|
+
"The response explains that `extend frontend -> api 'streams'` is not the right matcher in this ambiguity case.",
|
|
358
|
+
"The response explains that `extend frontend -[sync]-> api 'streams'` would target the wrong relationship.",
|
|
359
|
+
"The final snippet uses the async matcher exactly.",
|
|
360
|
+
"The final snippet adds metadata within the `extend` block."
|
|
361
|
+
],
|
|
362
|
+
"grading_guidance": "Treat exact matcher selection as the primary grading signal. Prefer answers that begin with the exact required matcher line when the prompt asks for it. Answers that fail to explicitly reject `extend frontend -> api 'streams'` as ambiguous or insufficient in this context lose points, even if they eventually provide the correct async matcher. Do not let extra rhetorical explanation outweigh a wrong matcher choice."
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"id": 25,
|
|
366
|
+
"expected_output": "The response provides a `likec4 validate` command with `--json`, `--no-layout`, and three repeated `--file` flags for the edited template files, explains the roles of `filteredFiles`, `filteredErrors`, and `totalErrors`, and states that `filteredFiles = 2` means one intended file was not actually included in the filter set.",
|
|
367
|
+
"files": [],
|
|
368
|
+
"expectations": [
|
|
369
|
+
"The command uses `npx likec4 validate --json --no-layout`.",
|
|
370
|
+
"The command passes three `--file` arguments, one per edited file.",
|
|
371
|
+
"The command includes the template project path argument.",
|
|
372
|
+
"The response explains `filteredFiles`, `filteredErrors`, and `totalErrors` distinctly.",
|
|
373
|
+
"The response explains that `filteredFiles = 2` means one of the intended files was not actually filtered by the command."
|
|
374
|
+
],
|
|
375
|
+
"grading_guidance": "Do not give full credit to answers that only restate the command. This eval checks partial filter coverage interpretation: `filteredFiles = 2` means one of the three intended files was not captured, and the response must state this explicitly. Prefer answers that put the command on the first line by itself when the prompt requires it. Accept any reasonable version pin (`npx likec4@latest`, `npx likec4@X.Y.Z`, or bare `npx likec4`). The semantic invariants — three `--file` flags, correct project path, accurate distinction of all three JSON fields, and the `filteredFiles = 2` interpretation — are strict and non-negotiable."
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"id": 26,
|
|
379
|
+
"expected_output": "A single DSL snippet that defines `core-services` using `global { predicateGroup ... }` and then applies it in one view with the exact line `global predicate core-services`.",
|
|
380
|
+
"files": [],
|
|
381
|
+
"expectations": [
|
|
382
|
+
"The response contains one DSL snippet only.",
|
|
383
|
+
"The snippet uses `global { predicateGroup core-services { ... } }` exactly as the reusable mechanism.",
|
|
384
|
+
"The predicate group includes `cloud.*` elements whose kind is `service`.",
|
|
385
|
+
"The predicate group excludes elements tagged `#deprecated`.",
|
|
386
|
+
"The view applies the reusable predicate with the exact line `global predicate core-services`."
|
|
387
|
+
],
|
|
388
|
+
"grading_guidance": "This is a sharp contrastive eval. Do not give full credit to answers that substitute style groups, aliases, prose descriptions, or any other reusable mechanism. Exact keyword fidelity (`predicateGroup`, `global predicate`) is the primary signal."
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
"id": 27,
|
|
392
|
+
"expected_output": "The response starts with `B`, explicitly identifies scoped `include *` as the scoped element plus its direct children as the base include set, and gives a minimal snippet that keeps `include *` while adding incoming relationships around `cloud.backend`.",
|
|
393
|
+
"files": [],
|
|
394
|
+
"expectations": [
|
|
395
|
+
"The response starts with `B` exactly.",
|
|
396
|
+
"The justification states that the base include set is the scoped element plus its direct children.",
|
|
397
|
+
"The answer rejects both the recursive-subtree interpretation and the whole-model interpretation.",
|
|
398
|
+
"The snippet keeps `include *` inside `view ... of cloud.backend { ... }`.",
|
|
399
|
+
"The snippet adds only incoming relationships around `cloud.backend`."
|
|
400
|
+
],
|
|
401
|
+
"grading_guidance": "Treat the exact initial choice `B` and the phrase `direct children` as primary signals. Reject answers that blur choice B with a full subtree interpretation even if the rest of the prose sounds knowledgeable."
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"id": 28,
|
|
405
|
+
"expected_output": "The response starts with `Wrong: extend frontend -> api 'streams'`, explains that omitting the relationship kind is wrong under this ambiguity, and ends with the exact async extension snippet including metadata.",
|
|
406
|
+
"files": [],
|
|
407
|
+
"expectations": [
|
|
408
|
+
"The response starts with `Wrong: extend frontend -> api 'streams'` exactly.",
|
|
409
|
+
"The explanation says omitting the kind is wrong here because multiple relationships could match.",
|
|
410
|
+
"The explanation stays focused on relationship identity matching rather than unrelated syntax issues.",
|
|
411
|
+
"The final snippet is exactly `extend frontend -[async]-> api 'streams' { metadata { qos 'high' } }` or a formatting-equivalent multi-line form.",
|
|
412
|
+
"The answer does not present the unkinded matcher as acceptable."
|
|
413
|
+
],
|
|
414
|
+
"grading_guidance": "This eval is about explicit rejection of the near-miss matcher. The exact opening line and the exact async extension snippet are the decisive signals; do not over-credit generic ambiguity talk if those are missing."
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"id": 29,
|
|
418
|
+
"expected_output": "The response selects only option `A`, places only `A`/`B`/`C`/`D` on the first line, and gives one sentence explaining that the others break chained-hop body semantics.",
|
|
419
|
+
"files": [],
|
|
420
|
+
"expectations": [
|
|
421
|
+
"The first line is exactly one letter among `A`, `B`, `C`, or `D`.",
|
|
422
|
+
"The selected option is `A`.",
|
|
423
|
+
"The explanation is exactly one sentence after the first line.",
|
|
424
|
+
"The explanation mentions why non-`A` options violate chained-hop/body placement constraints.",
|
|
425
|
+
"The response does not include extra snippets or alternative rewrites."
|
|
426
|
+
],
|
|
427
|
+
"grading_guidance": "This is a strict-format discriminator. The first-line token and option choice dominate scoring. Any first-line mismatch or selecting non-`A` should lose heavily, even if surrounding prose is generally knowledgeable."
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"id": 30,
|
|
431
|
+
"expected_output": "The response outputs five required lines in the exact `<filter> => prod:<match|no> canary:<match|no>` format with correct match matrix (`#next` and `#web` match both, `#gamma` only prod, `#canary` only canary, `#missing` neither), followed by exactly one sentence explicitly using the word `cumulative`.",
|
|
432
|
+
"files": [],
|
|
433
|
+
"expectations": [
|
|
434
|
+
"The response includes one line for each required filter: `#next`, `#web`, `#gamma`, `#canary`, `#missing`.",
|
|
435
|
+
"`#next` line marks `prod:match` and `canary:match`.",
|
|
436
|
+
"`#web` line marks `prod:match` and `canary:match`.",
|
|
437
|
+
"`#gamma` line marks `prod:match` and `canary:no`, and `#canary` line marks `prod:no` and `canary:match`.",
|
|
438
|
+
"`#missing` line marks `prod:no` and `canary:no`.",
|
|
439
|
+
"The final rule sentence contains the word `cumulative` and states the inherited-logical-plus-instance-tag behavior."
|
|
440
|
+
],
|
|
441
|
+
"grading_guidance": "Grade mechanically by the matrix and format contract. Missing one filter line, swapping prod/canary outcomes, or omitting the word `cumulative` in the final sentence should materially reduce score."
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"id": 31,
|
|
445
|
+
"expected_output": "The response classifies (1) as `correct`, (2) as `ambiguous`, and (3) as `wrong`, then provides the exact unambiguous extension snippet `extend api -[async]-> service 'GetData' { metadata { timeout '5s' } }` (format-equivalent multi-line accepted).",
|
|
446
|
+
"files": [],
|
|
447
|
+
"expectations": [
|
|
448
|
+
"Classification line for matcher (1) marks it `correct`.",
|
|
449
|
+
"Classification line for matcher (2) marks it `ambiguous` because title is omitted while multiple async relationships exist.",
|
|
450
|
+
"Classification line for matcher (3) marks it `wrong` because kind is omitted while typed alternatives exist.",
|
|
451
|
+
"The final snippet targets async + exact title `GetData`.",
|
|
452
|
+
"The final snippet includes metadata field `timeout '5s'`."
|
|
453
|
+
],
|
|
454
|
+
"grading_guidance": "Prioritize matcher-identity reasoning (source/target/kind/title). Answers that call (2) fully correct or call (3) acceptable should lose clearly, even if they provide a plausible final snippet."
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"id": 32,
|
|
458
|
+
"expected_output": "The response provides a minimal view with `include * -> *` followed by `exclude * -> * where metadata.protocol is \"http\"` (quote style may vary), and it treats `metadata.protocol` as relationship-own metadata rather than endpoint metadata.",
|
|
459
|
+
"files": [],
|
|
460
|
+
"expectations": [
|
|
461
|
+
"The snippet includes all relationships with a relationship predicate such as `include * -> *`.",
|
|
462
|
+
"The exclusion uses `exclude * -> * where metadata.protocol is \"http\"` or an equivalent multi-line form.",
|
|
463
|
+
"The response does not use `source.metadata.protocol` or `target.metadata.protocol` for this own-relationship metadata case.",
|
|
464
|
+
"The response is primarily a usable LikeC4 view snippet."
|
|
465
|
+
],
|
|
466
|
+
"grading_guidance": "The distinction between relationship metadata and endpoint metadata is the main signal. Do not give full credit if the answer filters `source.metadata` or `target.metadata` when the prompt explicitly asks for the relationship's own metadata."
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
"id": 33,
|
|
470
|
+
"expected_output": "The response provides a minimal view with `include * -> *` followed by `exclude * -> * where target.metadata.zone is \"restricted\"` (quote style may vary), using endpoint metadata on the target.",
|
|
471
|
+
"files": [],
|
|
472
|
+
"expectations": [
|
|
473
|
+
"The snippet includes relationships before excluding from them.",
|
|
474
|
+
"The exclusion uses `target.metadata.zone is \"restricted\"` or an equivalent multi-line form.",
|
|
475
|
+
"The response uses endpoint metadata rather than relationship-own `metadata.zone`.",
|
|
476
|
+
"The response is primarily a usable LikeC4 view snippet."
|
|
477
|
+
],
|
|
478
|
+
"grading_guidance": "The target endpoint qualifier is required. Answers that use unqualified `metadata.zone` are filtering the relationship itself and should lose clearly."
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
"id": 34,
|
|
482
|
+
"expected_output": "The response states that the deployed instance without metadata falls back to logical metadata value `model-public`, while the instance with metadata uses `instance-private` and replaces the logical metadata for predicate filtering. It includes one clear rule sentence distinguishing fallback from replacement.",
|
|
483
|
+
"files": [],
|
|
484
|
+
"expectations": [
|
|
485
|
+
"The no-instance-metadata case uses `model-public`.",
|
|
486
|
+
"The instance-metadata case uses `instance-private`.",
|
|
487
|
+
"The response explicitly says instance metadata replaces logical element metadata when present.",
|
|
488
|
+
"The response explicitly says logical element metadata is used as fallback when the deployed instance has no metadata.",
|
|
489
|
+
"The rule is framed for deployment-view relationship endpoint filters such as `source.metadata.zone`."
|
|
490
|
+
],
|
|
491
|
+
"grading_guidance": "Do not accept answers that claim deployment metadata merges key-by-key with logical metadata. The key contrast is fallback when absent versus replacement when present."
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
"id": 35,
|
|
495
|
+
"expected_output": "The response provides one minimal element view using `include * where kind is service and metadata.regions is \"eu\"` (or equivalent ordering) and `exclude * where not metadata.owner`.",
|
|
496
|
+
"files": [],
|
|
497
|
+
"expectations": [
|
|
498
|
+
"The view includes services using `kind is service`.",
|
|
499
|
+
"The include filter uses `metadata.regions is \"eu\"` to express array containment.",
|
|
500
|
+
"The view removes elements missing owner metadata with `exclude * where not metadata.owner`.",
|
|
501
|
+
"The response provides one minimal view snippet rather than prose-only guidance."
|
|
502
|
+
],
|
|
503
|
+
"grading_guidance": "The eval checks both array containment syntax and missing-key syntax. Accept equivalent line breaks and quote style, but not invented operators such as `contains` or `exists`."
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
"id": 36,
|
|
507
|
+
"expected_output": "A paste-ready `dynamic view auth-flow` snippet with the forward step `app -> api 'authorize'`, then an `alt { ... }` flow-control block containing a `when 'authorized'` branch (`api -> db 'load data'`) and an `else 'denied'` branch (`api -> app 'show login'`).",
|
|
508
|
+
"files": [],
|
|
509
|
+
"expectations": [
|
|
510
|
+
"The response uses a `dynamic view auth-flow { ... }` block.",
|
|
511
|
+
"The snippet includes the `app -> api 'authorize'` step before the block.",
|
|
512
|
+
"The snippet uses an `alt { ... }` block.",
|
|
513
|
+
"The `alt` block contains a `when 'authorized'` branch whose body is `api -> db 'load data'`.",
|
|
514
|
+
"The `alt` block contains an `else 'denied'` branch whose body is `api -> app 'show login'`.",
|
|
515
|
+
"The `when` / `else` branches appear only inside the `alt` block, not as standalone top-level steps.",
|
|
516
|
+
"The response is primarily a usable DSL snippet, not only an explanation."
|
|
517
|
+
],
|
|
518
|
+
"grading_guidance": "Flow-control blocks are the focus. `if` is an accepted alias for `when`. Titles on the branches (`'authorized'`, `'denied'`) may vary in quote style but should be present. Penalize answers that place `when`/`else` outside `alt`, or that fall back to `notes`-only narrative branching instead of the real `alt` block."
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
"id": 37,
|
|
522
|
+
"expected_output": "A paste-ready `dynamic view query-flow` snippet wrapping `service -> db 'query'` in a `try` block, followed by `catch 'on error' { service -> logger 'log failure' }` and `finally { service -> service 'release connection' }`, in that order.",
|
|
523
|
+
"files": [],
|
|
524
|
+
"expectations": [
|
|
525
|
+
"The response uses a `dynamic view query-flow { ... }` block.",
|
|
526
|
+
"The snippet wraps `service -> db 'query'` inside a `try { ... }` block.",
|
|
527
|
+
"The snippet includes a `catch 'on error' { ... }` block with `service -> logger 'log failure'`.",
|
|
528
|
+
"The snippet includes a `finally { ... }` block with `service -> service 'release connection'`.",
|
|
529
|
+
"The blocks appear in the order `try` then `catch` then `finally`.",
|
|
530
|
+
"The response is primarily a usable DSL snippet, not only an explanation."
|
|
531
|
+
],
|
|
532
|
+
"grading_guidance": "The try/catch/finally ordering is a hard constraint: `catch` after `finally`, or a standalone `catch`, is invalid. Accept minor title/quote variation on `catch`/`finally`. Penalize answers that reorder the blocks or emit `catch`/`finally` without a preceding `try`."
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
"id": 38,
|
|
536
|
+
"expected_output": "The response starts with `Invalid.`, explains that the direct children of an `alt` block must be `when` / `if` / `else` branches so a bare `loop` cannot sit directly inside `alt`, and provides a corrected snippet that nests the `loop` inside a `when` (or `else`) branch.",
|
|
537
|
+
"files": [],
|
|
538
|
+
"expectations": [
|
|
539
|
+
"The response starts with `Invalid.` exactly.",
|
|
540
|
+
"The response explains that `alt` accepts only branch blocks (`when` / `if` / `else`) as direct children.",
|
|
541
|
+
"The response states that `loop` cannot be a direct child of `alt` (it can not be used as an alternative branch).",
|
|
542
|
+
"The corrected snippet keeps the `loop` but nests it inside a `when` or `else` branch within the `alt` block.",
|
|
543
|
+
"The corrected snippet is minimal and syntactically valid LikeC4 DSL."
|
|
544
|
+
],
|
|
545
|
+
"grading_guidance": "This is a contrastive placement-rule eval. The exact opening verdict `Invalid.` and the alt-branch rule are the primary signals. Reject answers that call the snippet valid, or that 'fix' it by removing the `loop` or by dropping the `alt` block entirely instead of nesting the loop inside a branch. `if` is an accepted alias for `when`."
|
|
546
|
+
}
|
|
547
|
+
],
|
|
548
|
+
"default_execution_checks": [
|
|
549
|
+
{
|
|
550
|
+
"name": "Validate executable LikeC4 snippet when response is runnable",
|
|
551
|
+
"description": "Provide objective evidence by validating the answer with LikeC4 when the response includes a coherent runnable snippet or fixture.",
|
|
552
|
+
"when": "Run this when the response contains one main LikeC4 code block that can be validated with minimal wrapping and without inventing task semantics.",
|
|
553
|
+
"instructions": [
|
|
554
|
+
"Extract the main LikeC4 snippet from the response.",
|
|
555
|
+
"Create a temporary isolated LikeC4 project and add minimal surrounding structure only when necessary for syntactic validation.",
|
|
556
|
+
"Validate with the LikeC4 CLI in JSON mode and with layout checks disabled.",
|
|
557
|
+
"Use validator output as additional evidence for pass/fail decisions, while still grading task semantics from expectations."
|
|
558
|
+
],
|
|
559
|
+
"success_signals": [
|
|
560
|
+
"The snippet validates without syntax or semantic errors.",
|
|
561
|
+
"Validated output is consistent with the eval's requested LikeC4 construct."
|
|
562
|
+
],
|
|
563
|
+
"failure_signals": [
|
|
564
|
+
"Validation fails with parse, semantic, or unresolved-reference errors.",
|
|
565
|
+
"The snippet cannot be made runnable without rewriting core logic claimed by the response."
|
|
566
|
+
]
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
"name": "Penalize prose-only answers on snippet-first prompts",
|
|
570
|
+
"description": "When the prompt explicitly requires a command-first, snippet-first, paste-ready, one-snippet, or exact first-line answer, treat prose-only or prose-first outputs as a meaningful failure.",
|
|
571
|
+
"when": "Run this when the prompt asks for an exact command, a minimal paste-ready snippet, one DSL snippet only, or a strict first-line token/verdict/letter.",
|
|
572
|
+
"instructions": [
|
|
573
|
+
"Check whether the answer delivers the required command/snippet/token as the first meaningful content instead of leading with explanatory prose.",
|
|
574
|
+
"If the prompt requires one snippet only or a command on the first line, treat prose-first structure as negative evidence even when later content is knowledgeable.",
|
|
575
|
+
"If the prompt asks for a strict one-line token or exact opening phrase, verify that contract before considering the rest of the answer."
|
|
576
|
+
],
|
|
577
|
+
"success_signals": [
|
|
578
|
+
"The first meaningful content is the requested command, snippet, or exact verdict token.",
|
|
579
|
+
"The answer stays snippet-first or command-first when the prompt explicitly requires it."
|
|
580
|
+
],
|
|
581
|
+
"failure_signals": [
|
|
582
|
+
"The answer starts with explanatory prose when the prompt requires command-first or snippet-first output.",
|
|
583
|
+
"The answer is prose-only even though the prompt requires a concrete snippet, command, or exact opening token."
|
|
584
|
+
]
|
|
585
|
+
}
|
|
586
|
+
],
|
|
587
|
+
"artifact_type": "grading-spec",
|
|
588
|
+
"schema_version": 2
|
|
589
|
+
}
|