@wrenai/genbi 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +141 -0
- package/bin/genbi.mjs +31 -0
- package/dist/assets/echarts-LTFC-ysd.js +40 -0
- package/dist/assets/index-Bo--QMUN.js +441 -0
- package/dist/assets/index-Xs4q7pNo.css +1 -0
- package/dist/index.html +14 -0
- package/dist/wrenai_logo.png +0 -0
- package/dist/wrenai_logo_white.png +0 -0
- package/dist-server/harness/auth/detect.d.ts +18 -0
- package/dist-server/harness/auth/detect.js +37 -0
- package/dist-server/harness/auth/index.d.ts +4 -0
- package/dist-server/harness/auth/index.js +2 -0
- package/dist-server/harness/auth/probe.d.ts +18 -0
- package/dist-server/harness/auth/probe.js +52 -0
- package/dist-server/harness/auth/types.d.ts +42 -0
- package/dist-server/harness/auth/types.js +9 -0
- package/dist-server/harness/bundle/loader.d.ts +32 -0
- package/dist-server/harness/bundle/loader.js +43 -0
- package/dist-server/harness/bundle/schema.d.ts +199 -0
- package/dist-server/harness/bundle/schema.js +127 -0
- package/dist-server/harness/bundle/version.d.ts +10 -0
- package/dist-server/harness/bundle/version.js +43 -0
- package/dist-server/harness/capability/gate.d.ts +6 -0
- package/dist-server/harness/capability/gate.js +29 -0
- package/dist-server/harness/capability/registry.d.ts +6 -0
- package/dist-server/harness/capability/registry.js +17 -0
- package/dist-server/harness/cli-args.d.ts +123 -0
- package/dist-server/harness/cli-args.js +247 -0
- package/dist-server/harness/cli.d.ts +2 -0
- package/dist-server/harness/cli.js +151 -0
- package/dist-server/harness/compile/cache.d.ts +23 -0
- package/dist-server/harness/compile/cache.js +109 -0
- package/dist-server/harness/compile/compose-profile.d.ts +34 -0
- package/dist-server/harness/compile/compose-profile.js +95 -0
- package/dist-server/harness/compile/errors.d.ts +22 -0
- package/dist-server/harness/compile/errors.js +41 -0
- package/dist-server/harness/compile/fingerprint.d.ts +22 -0
- package/dist-server/harness/compile/fingerprint.js +84 -0
- package/dist-server/harness/compile/index.d.ts +8 -0
- package/dist-server/harness/compile/index.js +7 -0
- package/dist-server/harness/compile/pipeline.d.ts +66 -0
- package/dist-server/harness/compile/pipeline.js +176 -0
- package/dist-server/harness/compile/resolve-binary.d.ts +55 -0
- package/dist-server/harness/compile/resolve-binary.js +133 -0
- package/dist-server/harness/compile/types.d.ts +107 -0
- package/dist-server/harness/compile/types.js +1 -0
- package/dist-server/harness/compile/warble-identity.d.ts +12 -0
- package/dist-server/harness/compile/warble-identity.js +33 -0
- package/dist-server/harness/compliance/gate.d.ts +35 -0
- package/dist-server/harness/compliance/gate.js +48 -0
- package/dist-server/harness/compliance/index.d.ts +2 -0
- package/dist-server/harness/compliance/index.js +1 -0
- package/dist-server/harness/compliance/types.d.ts +16 -0
- package/dist-server/harness/compliance/types.js +1 -0
- package/dist-server/harness/events/emitter.d.ts +34 -0
- package/dist-server/harness/events/emitter.js +25 -0
- package/dist-server/harness/events/index.d.ts +4 -0
- package/dist-server/harness/events/index.js +2 -0
- package/dist-server/harness/events/sse.d.ts +20 -0
- package/dist-server/harness/events/sse.js +48 -0
- package/dist-server/harness/events/types.d.ts +131 -0
- package/dist-server/harness/events/types.js +1 -0
- package/dist-server/harness/exec/errors.d.ts +16 -0
- package/dist-server/harness/exec/errors.js +29 -0
- package/dist-server/harness/exec/index.d.ts +5 -0
- package/dist-server/harness/exec/index.js +2 -0
- package/dist-server/harness/exec/local.d.ts +32 -0
- package/dist-server/harness/exec/local.js +134 -0
- package/dist-server/harness/exec/policy.d.ts +12 -0
- package/dist-server/harness/exec/policy.js +1 -0
- package/dist-server/harness/exec/types.d.ts +63 -0
- package/dist-server/harness/exec/types.js +1 -0
- package/dist-server/harness/guardrails/index.d.ts +2 -0
- package/dist-server/harness/guardrails/index.js +1 -0
- package/dist-server/harness/guardrails/policy.d.ts +45 -0
- package/dist-server/harness/guardrails/policy.js +57 -0
- package/dist-server/harness/index.d.ts +37 -0
- package/dist-server/harness/index.js +19 -0
- package/dist-server/harness/loop/errors.d.ts +53 -0
- package/dist-server/harness/loop/errors.js +72 -0
- package/dist-server/harness/loop/executor.d.ts +123 -0
- package/dist-server/harness/loop/executor.js +380 -0
- package/dist-server/harness/loop/guard.d.ts +16 -0
- package/dist-server/harness/loop/guard.js +1 -0
- package/dist-server/harness/loop/index.d.ts +5 -0
- package/dist-server/harness/loop/index.js +3 -0
- package/dist-server/harness/native-producer/index.d.ts +109 -0
- package/dist-server/harness/native-producer/index.js +302 -0
- package/dist-server/harness/npm-package-resolve.d.ts +28 -0
- package/dist-server/harness/npm-package-resolve.js +47 -0
- package/dist-server/harness/providers/adapters/anthropic.d.ts +7 -0
- package/dist-server/harness/providers/adapters/anthropic.js +6 -0
- package/dist-server/harness/providers/adapters/mock.d.ts +4 -0
- package/dist-server/harness/providers/adapters/mock.js +5 -0
- package/dist-server/harness/providers/adapters/openai-compatible.d.ts +10 -0
- package/dist-server/harness/providers/adapters/openai-compatible.js +10 -0
- package/dist-server/harness/providers/binding.d.ts +23 -0
- package/dist-server/harness/providers/binding.js +13 -0
- package/dist-server/harness/providers/errors.d.ts +6 -0
- package/dist-server/harness/providers/errors.js +12 -0
- package/dist-server/harness/providers/index.d.ts +18 -0
- package/dist-server/harness/providers/index.js +22 -0
- package/dist-server/harness/providers/registry.d.ts +16 -0
- package/dist-server/harness/providers/registry.js +24 -0
- package/dist-server/harness/render/envelope.d.ts +145 -0
- package/dist-server/harness/render/envelope.js +428 -0
- package/dist-server/harness/render/errors.d.ts +33 -0
- package/dist-server/harness/render/errors.js +46 -0
- package/dist-server/harness/render/index.d.ts +5 -0
- package/dist-server/harness/render/index.js +3 -0
- package/dist-server/harness/render/validate.d.ts +13 -0
- package/dist-server/harness/render/validate.js +88 -0
- package/dist-server/harness/route/adapter-spec.d.ts +40 -0
- package/dist-server/harness/route/adapter-spec.js +61 -0
- package/dist-server/harness/route/agent-sdk-cli.d.ts +30 -0
- package/dist-server/harness/route/agent-sdk-cli.js +86 -0
- package/dist-server/harness/route/agent-sdk-manifest.d.ts +31 -0
- package/dist-server/harness/route/agent-sdk-manifest.js +56 -0
- package/dist-server/harness/route/artifact-content.d.ts +53 -0
- package/dist-server/harness/route/artifact-content.js +83 -0
- package/dist-server/harness/route/chat-event-mapper.d.ts +95 -0
- package/dist-server/harness/route/chat-event-mapper.js +164 -0
- package/dist-server/harness/route/codex-ask-events.d.ts +25 -0
- package/dist-server/harness/route/codex-ask-events.js +395 -0
- package/dist-server/harness/route/codex-ask.d.ts +15 -0
- package/dist-server/harness/route/codex-ask.js +242 -0
- package/dist-server/harness/route/codex-local-cli.d.ts +20 -0
- package/dist-server/harness/route/codex-local-cli.js +78 -0
- package/dist-server/harness/route/codex-local-manifest.d.ts +22 -0
- package/dist-server/harness/route/codex-local-manifest.js +180 -0
- package/dist-server/harness/route/describe.d.ts +54 -0
- package/dist-server/harness/route/describe.js +84 -0
- package/dist-server/harness/route/dispatched.d.ts +138 -0
- package/dist-server/harness/route/dispatched.js +339 -0
- package/dist-server/harness/route/in-process.d.ts +43 -0
- package/dist-server/harness/route/in-process.js +106 -0
- package/dist-server/harness/route/index.d.ts +19 -0
- package/dist-server/harness/route/index.js +12 -0
- package/dist-server/harness/route/profile-source.d.ts +37 -0
- package/dist-server/harness/route/profile-source.js +76 -0
- package/dist-server/harness/route/route.d.ts +33 -0
- package/dist-server/harness/route/route.js +114 -0
- package/dist-server/harness/route/tier-binding.d.ts +36 -0
- package/dist-server/harness/route/tier-binding.js +63 -0
- package/dist-server/harness/route/types.d.ts +286 -0
- package/dist-server/harness/route/types.js +1 -0
- package/dist-server/harness/session/errors.d.ts +4 -0
- package/dist-server/harness/session/errors.js +7 -0
- package/dist-server/harness/session/gate.d.ts +11 -0
- package/dist-server/harness/session/gate.js +13 -0
- package/dist-server/harness/session/index.d.ts +5 -0
- package/dist-server/harness/session/index.js +3 -0
- package/dist-server/harness/session/run.d.ts +60 -0
- package/dist-server/harness/session/run.js +333 -0
- package/dist-server/harness/session/types.d.ts +29 -0
- package/dist-server/harness/session/types.js +1 -0
- package/dist-server/harness/setup/codex-events.d.ts +12 -0
- package/dist-server/harness/setup/codex-events.js +108 -0
- package/dist-server/harness/setup/runner.d.ts +497 -0
- package/dist-server/harness/setup/runner.js +1314 -0
- package/dist-server/harness/tools/errors.d.ts +107 -0
- package/dist-server/harness/tools/errors.js +141 -0
- package/dist-server/harness/tools/index.d.ts +13 -0
- package/dist-server/harness/tools/index.js +8 -0
- package/dist-server/harness/tools/mcp.d.ts +26 -0
- package/dist-server/harness/tools/mcp.js +15 -0
- package/dist-server/harness/tools/native.d.ts +179 -0
- package/dist-server/harness/tools/native.js +322 -0
- package/dist-server/harness/tools/parse.d.ts +14 -0
- package/dist-server/harness/tools/parse.js +18 -0
- package/dist-server/harness/tools/resolve-wren-binary.d.ts +12 -0
- package/dist-server/harness/tools/resolve-wren-binary.js +21 -0
- package/dist-server/harness/tools/resolve.d.ts +51 -0
- package/dist-server/harness/tools/resolve.js +79 -0
- package/dist-server/harness/tools/setup-native.d.ts +84 -0
- package/dist-server/harness/tools/setup-native.js +353 -0
- package/dist-server/harness/tools/wiring.d.ts +10 -0
- package/dist-server/harness/tools/wiring.js +16 -0
- package/dist-server/providers/setup.provider.yaml +31 -0
- package/dist-server/providers/wren.provider.yaml +33 -0
- package/dist-server/server/adopt.d.ts +87 -0
- package/dist-server/server/adopt.js +263 -0
- package/dist-server/server/app.d.ts +6 -0
- package/dist-server/server/app.js +2521 -0
- package/dist-server/server/auth-choice.d.ts +16 -0
- package/dist-server/server/auth-choice.js +36 -0
- package/dist-server/server/bin.d.ts +2 -0
- package/dist-server/server/bin.js +601 -0
- package/dist-server/server/bootstrap-project-binding.d.ts +31 -0
- package/dist-server/server/bootstrap-project-binding.js +71 -0
- package/dist-server/server/clarify.d.ts +10 -0
- package/dist-server/server/clarify.js +17 -0
- package/dist-server/server/codex-setup-mcp.d.ts +2 -0
- package/dist-server/server/codex-setup-mcp.js +147 -0
- package/dist-server/server/compose.d.ts +89 -0
- package/dist-server/server/compose.js +271 -0
- package/dist-server/server/conn-config.d.ts +30 -0
- package/dist-server/server/conn-config.js +253 -0
- package/dist-server/server/context-files.d.ts +12 -0
- package/dist-server/server/context-files.js +117 -0
- package/dist-server/server/context-map.d.ts +30 -0
- package/dist-server/server/context-map.js +95 -0
- package/dist-server/server/context-source.d.ts +68 -0
- package/dist-server/server/context-source.js +85 -0
- package/dist-server/server/db.d.ts +862 -0
- package/dist-server/server/db.js +1839 -0
- package/dist-server/server/enrichment-runner.d.ts +184 -0
- package/dist-server/server/enrichment-runner.js +213 -0
- package/dist-server/server/enrichment-verify.d.ts +73 -0
- package/dist-server/server/enrichment-verify.js +290 -0
- package/dist-server/server/enrichment.d.ts +232 -0
- package/dist-server/server/enrichment.js +199 -0
- package/dist-server/server/env-detect.d.ts +8 -0
- package/dist-server/server/env-detect.js +17 -0
- package/dist-server/server/env-field-hints.d.ts +46 -0
- package/dist-server/server/env-field-hints.js +48 -0
- package/dist-server/server/fold.d.ts +133 -0
- package/dist-server/server/fold.js +407 -0
- package/dist-server/server/harness-profile-sources.d.ts +3 -0
- package/dist-server/server/harness-profile-sources.js +24 -0
- package/dist-server/server/harness.d.ts +19 -0
- package/dist-server/server/harness.js +439 -0
- package/dist-server/server/impact.d.ts +18 -0
- package/dist-server/server/impact.js +85 -0
- package/dist-server/server/interactive-terminal.d.ts +175 -0
- package/dist-server/server/interactive-terminal.js +336 -0
- package/dist-server/server/native-artifacts.d.ts +1004 -0
- package/dist-server/server/native-artifacts.js +564 -0
- package/dist-server/server/native-dispatch-registry.d.ts +42 -0
- package/dist-server/server/native-dispatch-registry.js +45 -0
- package/dist-server/server/native-producer-fence.d.ts +14 -0
- package/dist-server/server/native-producer-fence.js +48 -0
- package/dist-server/server/native-session-resume.d.ts +6 -0
- package/dist-server/server/native-session-resume.js +103 -0
- package/dist-server/server/native-session-workspace.d.ts +40 -0
- package/dist-server/server/native-session-workspace.js +175 -0
- package/dist-server/server/native-sessions.d.ts +374 -0
- package/dist-server/server/native-sessions.js +1517 -0
- package/dist-server/server/native-wren-runtime.d.ts +20 -0
- package/dist-server/server/native-wren-runtime.js +259 -0
- package/dist-server/server/node-pty-host.d.ts +31 -0
- package/dist-server/server/node-pty-host.js +100 -0
- package/dist-server/server/route-intent.d.ts +40 -0
- package/dist-server/server/route-intent.js +23 -0
- package/dist-server/server/runtime-binding.d.ts +52 -0
- package/dist-server/server/runtime-binding.js +258 -0
- package/dist-server/server/source-catalog.d.ts +84 -0
- package/dist-server/server/source-catalog.js +221 -0
- package/dist-server/server/source-driver.d.ts +35 -0
- package/dist-server/server/source-driver.js +124 -0
- package/dist-server/server/spa.d.ts +2 -0
- package/dist-server/server/spa.js +51 -0
- package/dist-server/server/subscription-model-catalog.d.ts +27 -0
- package/dist-server/server/subscription-model-catalog.js +203 -0
- package/dist-server/server/turn.d.ts +249 -0
- package/dist-server/server/turn.js +1074 -0
- package/dist-server/server/wire-types.d.ts +799 -0
- package/dist-server/server/wire-types.js +1 -0
- package/dist-server/server/wren-home.d.ts +19 -0
- package/dist-server/server/wren-home.js +33 -0
- package/dist-server/server/wren-profiles.d.ts +43 -0
- package/dist-server/server/wren-profiles.js +123 -0
- package/package.json +93 -0
- package/profiles/genbi-default/context/binding.yml +9 -0
- package/profiles/genbi-default/ir.golden.json +506 -0
- package/profiles/genbi-default/profile.yml +16 -0
- package/profiles/genbi-enrich-context/components/apply_enrichment/component.yml +42 -0
- package/profiles/genbi-enrich-context/components/draft_enrichment/component.yml +30 -0
- package/profiles/genbi-enrich-context/components/draft_enrichment/steps/draft.md +34 -0
- package/profiles/genbi-enrich-context/components/inspect_context/component.yml +32 -0
- package/profiles/genbi-enrich-context/components/inspect_context/steps/inspect.md +13 -0
- package/profiles/genbi-enrich-context/context/binding.yml +4 -0
- package/profiles/genbi-enrich-context/ir.golden.json +302 -0
- package/profiles/genbi-enrich-context/profile.yml +15 -0
- package/profiles/genbi-monitor/context/binding.yml +7 -0
- package/profiles/genbi-monitor/ir.golden.json +188 -0
- package/profiles/genbi-monitor/profile.yml +27 -0
- package/profiles/genbi-setup/components/build_context/component.yml +44 -0
- package/profiles/genbi-setup/components/build_context/steps/build.md +14 -0
- package/profiles/genbi-setup/components/connect_source/component.yml +51 -0
- package/profiles/genbi-setup/components/connect_source/steps/connect.md +23 -0
- package/profiles/genbi-setup/context/binding.yml +8 -0
- package/profiles/genbi-setup/ir.golden.json +140 -0
- package/profiles/genbi-setup/profile.yml +18 -0
- package/profiles/genbi-setup/raw/schema.json +5 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# inspect_context — cheap, read-only inventory of a bound project's enrichment surface.
|
|
2
|
+
# It observes MDL, cubes, knowledge rules, NL→SQL entries, and raw-material availability, but it
|
|
3
|
+
# emits only opaque evidence references and gap classifications. It never reads credentials or
|
|
4
|
+
# returns raw material content across the host boundary.
|
|
5
|
+
id: inspect_context
|
|
6
|
+
verb: inspect_context
|
|
7
|
+
type: analytical
|
|
8
|
+
realization_kind: skill
|
|
9
|
+
|
|
10
|
+
binding_mode: pinned
|
|
11
|
+
context_requirements:
|
|
12
|
+
- "an existing pinned Wren project whose semantic layer parses and has a successful build proof"
|
|
13
|
+
context_precondition:
|
|
14
|
+
- { predicate: wren_project_exists }
|
|
15
|
+
|
|
16
|
+
params: []
|
|
17
|
+
llm_steps:
|
|
18
|
+
- { name: inspect, tier: cheap, prompt_ref: steps/inspect.md, produces: enrichment_gaps }
|
|
19
|
+
trigger: { kind: one_shot }
|
|
20
|
+
guardrails:
|
|
21
|
+
- { name: read_only_execution, locked: true }
|
|
22
|
+
required_capabilities:
|
|
23
|
+
- semantic_introspection
|
|
24
|
+
- raw_material_read
|
|
25
|
+
- llm:cheap
|
|
26
|
+
borrowed_actions: []
|
|
27
|
+
effect:
|
|
28
|
+
render_blocks: []
|
|
29
|
+
outcome: { kind: none }
|
|
30
|
+
eval:
|
|
31
|
+
template_ref: eval/
|
|
32
|
+
metrics: [enrichment_gap_coverage]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Inspect the already bound project without changing it.
|
|
2
|
+
|
|
3
|
+
- Read the current MDL, cube names and definitions, business rules, NL-to-SQL pairs, and available
|
|
4
|
+
raw material. Do not read or expose credential values, and do not put raw excerpts in the output.
|
|
5
|
+
- Classify gaps as structural coverage, raw-vs-current claim difference, or inference. Emit only
|
|
6
|
+
opaque evidence ids/locators, confidence, the proposed sink, and whether a conflict or ambiguous
|
|
7
|
+
sink exists.
|
|
8
|
+
- In grill mode, live database probes are allowed only after the host records the user's one-time
|
|
9
|
+
consent; in autopilot they are forbidden. Probe results remain local to the executor.
|
|
10
|
+
- Do not write files, create a gaps/state artifact, invoke validation/build, or make a decision.
|
|
11
|
+
|
|
12
|
+
Produce `enrichment_gaps` as the input to the strong drafting step. It is an inventory, not a
|
|
13
|
+
proposal and not authorization to apply a change.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# A pinned, existing semantic project. Runtime hosts replace this fixture binding with the project
|
|
2
|
+
# selected at bind time and must present a successful context-build proof before starting a run.
|
|
3
|
+
# Path is relative to this profile directory.
|
|
4
|
+
project: ../../../../examples/v5-jaffle
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
{
|
|
2
|
+
"components": [
|
|
3
|
+
{
|
|
4
|
+
"borrowed_actions": [],
|
|
5
|
+
"context_binding": {
|
|
6
|
+
"binding_mode": "pinned",
|
|
7
|
+
"project": "../../../../examples/v5-jaffle"
|
|
8
|
+
},
|
|
9
|
+
"context_precondition": [
|
|
10
|
+
{
|
|
11
|
+
"predicate": "wren_project_exists"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"context_requirements": [
|
|
15
|
+
"an existing pinned Wren project whose semantic layer parses and has a successful build proof"
|
|
16
|
+
],
|
|
17
|
+
"effect": {
|
|
18
|
+
"outcome": {
|
|
19
|
+
"kind": "none"
|
|
20
|
+
},
|
|
21
|
+
"render_blocks": []
|
|
22
|
+
},
|
|
23
|
+
"eval": {
|
|
24
|
+
"metrics": [
|
|
25
|
+
"enrichment_gap_coverage"
|
|
26
|
+
],
|
|
27
|
+
"template_ref": "eval/"
|
|
28
|
+
},
|
|
29
|
+
"eval_ref": "inspect_context.eval",
|
|
30
|
+
"guardrails": [
|
|
31
|
+
{
|
|
32
|
+
"locked": true,
|
|
33
|
+
"name": "read_only_execution"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"id": "inspect_context",
|
|
37
|
+
"llm_calls": [
|
|
38
|
+
{
|
|
39
|
+
"conditional": false,
|
|
40
|
+
"consumes": [],
|
|
41
|
+
"name": "inspect",
|
|
42
|
+
"produces": "enrichment_gaps",
|
|
43
|
+
"prompt": "Inspect the already bound project without changing it.\n\n- Read the current MDL, cube names and definitions, business rules, NL-to-SQL pairs, and available\n raw material. Do not read or expose credential values, and do not put raw excerpts in the output.\n- Classify gaps as structural coverage, raw-vs-current claim difference, or inference. Emit only\n opaque evidence ids/locators, confidence, the proposed sink, and whether a conflict or ambiguous\n sink exists.\n- In grill mode, live database probes are allowed only after the host records the user's one-time\n consent; in autopilot they are forbidden. Probe results remain local to the executor.\n- Do not write files, create a gaps/state artifact, invoke validation/build, or make a decision.\n\nProduce `enrichment_gaps` as the input to the strong drafting step. It is an inventory, not a\nproposal and not authorization to apply a change.",
|
|
44
|
+
"tier": "cheap",
|
|
45
|
+
"when": null
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"params": [],
|
|
49
|
+
"precondition_result": {
|
|
50
|
+
"checks": [
|
|
51
|
+
{
|
|
52
|
+
"outcome": "pass",
|
|
53
|
+
"predicate": "wren_project_exists"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"status": "pass"
|
|
57
|
+
},
|
|
58
|
+
"prompt_fragment": "## inspect\n\nInspect the already bound project without changing it.\n\n- Read the current MDL, cube names and definitions, business rules, NL-to-SQL pairs, and available\n raw material. Do not read or expose credential values, and do not put raw excerpts in the output.\n- Classify gaps as structural coverage, raw-vs-current claim difference, or inference. Emit only\n opaque evidence ids/locators, confidence, the proposed sink, and whether a conflict or ambiguous\n sink exists.\n- In grill mode, live database probes are allowed only after the host records the user's one-time\n consent; in autopilot they are forbidden. Probe results remain local to the executor.\n- Do not write files, create a gaps/state artifact, invoke validation/build, or make a decision.\n\nProduce `enrichment_gaps` as the input to the strong drafting step. It is an inventory, not a\nproposal and not authorization to apply a change.",
|
|
59
|
+
"realization_kind": "skill",
|
|
60
|
+
"required_capabilities": [
|
|
61
|
+
"semantic_introspection",
|
|
62
|
+
"raw_material_read",
|
|
63
|
+
"llm:cheap"
|
|
64
|
+
],
|
|
65
|
+
"trigger": {
|
|
66
|
+
"kind": "one_shot"
|
|
67
|
+
},
|
|
68
|
+
"type": "analytical",
|
|
69
|
+
"verb": "inspect_context"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"borrowed_actions": [],
|
|
73
|
+
"context_binding": {
|
|
74
|
+
"binding_mode": "pinned",
|
|
75
|
+
"project": "../../../../examples/v5-jaffle"
|
|
76
|
+
},
|
|
77
|
+
"context_precondition": [
|
|
78
|
+
{
|
|
79
|
+
"predicate": "wren_project_exists"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"context_requirements": [
|
|
83
|
+
"an existing pinned Wren project whose semantic layer parses and has a successful build proof"
|
|
84
|
+
],
|
|
85
|
+
"effect": {
|
|
86
|
+
"outcome": {
|
|
87
|
+
"kind": "none"
|
|
88
|
+
},
|
|
89
|
+
"render_blocks": [
|
|
90
|
+
{
|
|
91
|
+
"fields": {},
|
|
92
|
+
"type": "diff"
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
"eval": {
|
|
97
|
+
"metrics": [
|
|
98
|
+
"enrichment_proposal_soundness",
|
|
99
|
+
"enrichment_sink_routing"
|
|
100
|
+
],
|
|
101
|
+
"template_ref": "eval/"
|
|
102
|
+
},
|
|
103
|
+
"eval_ref": "draft_enrichment.eval",
|
|
104
|
+
"guardrails": [
|
|
105
|
+
{
|
|
106
|
+
"locked": true,
|
|
107
|
+
"name": "read_only_execution"
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"id": "draft_enrichment",
|
|
111
|
+
"llm_calls": [
|
|
112
|
+
{
|
|
113
|
+
"conditional": false,
|
|
114
|
+
"consumes": [],
|
|
115
|
+
"name": "draft",
|
|
116
|
+
"produces": "enrichment_proposal",
|
|
117
|
+
"prompt": "Turn the read-only gap inventory into concrete, minimal, append-only proposals. Do not apply them.\n\n- Treat the pinned project revision as input, not something to infer. Return canonicalizable draft\n material and evidence locators, but do not invent or claim authoritative proposal hashes or content\n digests. The host validates the sink and revision, canonicalizes the payload, and computes both.\n- Each proposed operation has exactly one allowed relative sink. Existing text, MDL fields, cubes,\n and relationships are never overwritten.\n- A cube proposal must target `cubes/<name>/metadata.yml` and use Wren's cube schema: `name`,\n `base_object`, `measures`, optional `dimensions` / `time_dimensions`, and `properties`. Measures and\n dimensions may reference only columns that actually exist on the chosen base object. Never invent\n columns, use model-MDL keys such as `columns` / `metrics` / `relationships`, or hide a required join\n inside a cube expression. If one append-only operation cannot implement the gap, emit a paused\n decision explaining the missing prerequisite instead of fabricating a payload.\n- For a cube, put the file body in `recommended_yaml` and follow this exact field grammar:\n `measures: [{name, expression, type}]`, `dimensions: [{name, expression, type}]`, and\n `time_dimensions: [{name, expression, type}]`. Use SQL aggregate expressions such as\n `SUM(units_on_hand)` and Wren scalar types such as `BIGINT`, `INTEGER`, and `DATE`. Do not emit\n `sql`, `model`, `columns`, `metrics`, or aggregation names such as `type: sum`.\n- Grill mode emits one decision request at a time with a concrete recommended draft and accepts only\n accept, edit, or skip for that operation. Skip is final for this run.\n- Autopilot may mark only append-only low-risk model/column descriptions, knowledge rules, and\n NL-to-SQL pairs as eligible to apply. It must pause for raw-vs-current conflicts, ambiguous sink\n selection, and every new cube, view, relationship, MDL metric, or calculated column.\n- Mark all inference and partial-raw evidence with confidence. Do not include raw text, credentials,\n local paths, provider-session ids, or SDK internals in the host-facing proposal.\n- A new cube is high impact, always requires approval, and is never autopilot-eligible.\n\nProduce `enrichment_proposal`; approval, canonical hashes/digests, and application are deterministic\nhost responsibilities. Your FINAL message must be one JSON object only. Do not include prose or\nMarkdown fences. The top level is `{ \"enrichment_proposal\": { ... } }`; for Grill it contains the\nsupplied `project_revision`, exactly one operation with `relative_sink` and `recommended_yaml`,\nconfidence/evidence locators, `impact: \"high\"`, `requires_approval: true`,\n`autopilot_eligible: false`, and one decision whose allowed responses are exactly\n`[\"accept\", \"edit\", \"skip\"]`.",
|
|
118
|
+
"tier": "strong",
|
|
119
|
+
"when": null
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"params": [],
|
|
123
|
+
"precondition_result": {
|
|
124
|
+
"checks": [
|
|
125
|
+
{
|
|
126
|
+
"outcome": "pass",
|
|
127
|
+
"predicate": "wren_project_exists"
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"status": "pass"
|
|
131
|
+
},
|
|
132
|
+
"prompt_fragment": "## draft\n\nTurn the read-only gap inventory into concrete, minimal, append-only proposals. Do not apply them.\n\n- Treat the pinned project revision as input, not something to infer. Return canonicalizable draft\n material and evidence locators, but do not invent or claim authoritative proposal hashes or content\n digests. The host validates the sink and revision, canonicalizes the payload, and computes both.\n- Each proposed operation has exactly one allowed relative sink. Existing text, MDL fields, cubes,\n and relationships are never overwritten.\n- A cube proposal must target `cubes/<name>/metadata.yml` and use Wren's cube schema: `name`,\n `base_object`, `measures`, optional `dimensions` / `time_dimensions`, and `properties`. Measures and\n dimensions may reference only columns that actually exist on the chosen base object. Never invent\n columns, use model-MDL keys such as `columns` / `metrics` / `relationships`, or hide a required join\n inside a cube expression. If one append-only operation cannot implement the gap, emit a paused\n decision explaining the missing prerequisite instead of fabricating a payload.\n- For a cube, put the file body in `recommended_yaml` and follow this exact field grammar:\n `measures: [{name, expression, type}]`, `dimensions: [{name, expression, type}]`, and\n `time_dimensions: [{name, expression, type}]`. Use SQL aggregate expressions such as\n `SUM(units_on_hand)` and Wren scalar types such as `BIGINT`, `INTEGER`, and `DATE`. Do not emit\n `sql`, `model`, `columns`, `metrics`, or aggregation names such as `type: sum`.\n- Grill mode emits one decision request at a time with a concrete recommended draft and accepts only\n accept, edit, or skip for that operation. Skip is final for this run.\n- Autopilot may mark only append-only low-risk model/column descriptions, knowledge rules, and\n NL-to-SQL pairs as eligible to apply. It must pause for raw-vs-current conflicts, ambiguous sink\n selection, and every new cube, view, relationship, MDL metric, or calculated column.\n- Mark all inference and partial-raw evidence with confidence. Do not include raw text, credentials,\n local paths, provider-session ids, or SDK internals in the host-facing proposal.\n- A new cube is high impact, always requires approval, and is never autopilot-eligible.\n\nProduce `enrichment_proposal`; approval, canonical hashes/digests, and application are deterministic\nhost responsibilities. Your FINAL message must be one JSON object only. Do not include prose or\nMarkdown fences. The top level is `{ \"enrichment_proposal\": { ... } }`; for Grill it contains the\nsupplied `project_revision`, exactly one operation with `relative_sink` and `recommended_yaml`,\nconfidence/evidence locators, `impact: \"high\"`, `requires_approval: true`,\n`autopilot_eligible: false`, and one decision whose allowed responses are exactly\n`[\"accept\", \"edit\", \"skip\"]`.",
|
|
133
|
+
"realization_kind": "skill",
|
|
134
|
+
"required_capabilities": [
|
|
135
|
+
"semantic_introspection",
|
|
136
|
+
"llm:strong"
|
|
137
|
+
],
|
|
138
|
+
"trigger": {
|
|
139
|
+
"kind": "one_shot"
|
|
140
|
+
},
|
|
141
|
+
"type": "analytical",
|
|
142
|
+
"verb": "draft_enrichment"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"borrowed_actions": [],
|
|
146
|
+
"context_binding": {
|
|
147
|
+
"binding_mode": "pinned",
|
|
148
|
+
"project": "../../../../examples/v5-jaffle"
|
|
149
|
+
},
|
|
150
|
+
"context_precondition": [
|
|
151
|
+
{
|
|
152
|
+
"predicate": "wren_project_exists"
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
"context_requirements": [
|
|
156
|
+
"an existing pinned Wren project whose semantic layer parses and has a successful build proof"
|
|
157
|
+
],
|
|
158
|
+
"effect": {
|
|
159
|
+
"outcome": {
|
|
160
|
+
"change_type": "context_enrichment",
|
|
161
|
+
"kind": "mutation",
|
|
162
|
+
"target": "context"
|
|
163
|
+
},
|
|
164
|
+
"render_blocks": [
|
|
165
|
+
{
|
|
166
|
+
"fields": {},
|
|
167
|
+
"type": "diff"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"fields": {},
|
|
171
|
+
"type": "status"
|
|
172
|
+
}
|
|
173
|
+
]
|
|
174
|
+
},
|
|
175
|
+
"eval": {
|
|
176
|
+
"metrics": [
|
|
177
|
+
"enrichment_apply_safety",
|
|
178
|
+
"compliance"
|
|
179
|
+
],
|
|
180
|
+
"template_ref": "eval/"
|
|
181
|
+
},
|
|
182
|
+
"eval_ref": "apply_enrichment.eval",
|
|
183
|
+
"guardrails": [
|
|
184
|
+
{
|
|
185
|
+
"locked": true,
|
|
186
|
+
"name": "must_dry_run"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"locked": true,
|
|
190
|
+
"name": "human_approval"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"locked": true,
|
|
194
|
+
"name": "no_silent_overwrite"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"locked": true,
|
|
198
|
+
"name": "context_write_authz",
|
|
199
|
+
"scope": "enrichment-sinks"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"locked": true,
|
|
203
|
+
"name": "rollback_available"
|
|
204
|
+
}
|
|
205
|
+
],
|
|
206
|
+
"id": "apply_enrichment",
|
|
207
|
+
"llm_calls": [],
|
|
208
|
+
"params": [],
|
|
209
|
+
"precondition_result": {
|
|
210
|
+
"checks": [
|
|
211
|
+
{
|
|
212
|
+
"outcome": "pass",
|
|
213
|
+
"predicate": "wren_project_exists"
|
|
214
|
+
}
|
|
215
|
+
],
|
|
216
|
+
"status": "pass"
|
|
217
|
+
},
|
|
218
|
+
"prompt_fragment": "",
|
|
219
|
+
"realization_kind": "gated-tool",
|
|
220
|
+
"required_capabilities": [
|
|
221
|
+
"context_write_authz",
|
|
222
|
+
"context_validate",
|
|
223
|
+
"context_build",
|
|
224
|
+
"version_control",
|
|
225
|
+
"human_approval",
|
|
226
|
+
"enrichment_apply:deterministic"
|
|
227
|
+
],
|
|
228
|
+
"trigger": {
|
|
229
|
+
"kind": "one_shot"
|
|
230
|
+
},
|
|
231
|
+
"type": "constitutive",
|
|
232
|
+
"verb": "apply_enrichment"
|
|
233
|
+
}
|
|
234
|
+
],
|
|
235
|
+
"config": {},
|
|
236
|
+
"context_binding": {
|
|
237
|
+
"binding_mode": "pinned",
|
|
238
|
+
"project": "../../../../examples/v5-jaffle",
|
|
239
|
+
"resolved": {
|
|
240
|
+
"dimensions": [
|
|
241
|
+
{
|
|
242
|
+
"name": "customer_id",
|
|
243
|
+
"temporal": false
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"name": "name",
|
|
247
|
+
"temporal": false
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"name": "order_date",
|
|
251
|
+
"temporal": true
|
|
252
|
+
}
|
|
253
|
+
],
|
|
254
|
+
"lineage": {
|
|
255
|
+
"consumers": {
|
|
256
|
+
"dashboards": 0,
|
|
257
|
+
"queries": 1
|
|
258
|
+
},
|
|
259
|
+
"edges": 7,
|
|
260
|
+
"nodes": 8,
|
|
261
|
+
"resolvable": true
|
|
262
|
+
},
|
|
263
|
+
"metrics": [
|
|
264
|
+
{
|
|
265
|
+
"additivity": "additive",
|
|
266
|
+
"declared": true,
|
|
267
|
+
"name": "total_revenue"
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"additivity": "additive",
|
|
271
|
+
"declared": true,
|
|
272
|
+
"name": "order_count"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"declared": false,
|
|
276
|
+
"name": "id"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"declared": false,
|
|
280
|
+
"name": "id"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"declared": false,
|
|
284
|
+
"name": "customer_id"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"declared": false,
|
|
288
|
+
"name": "amount"
|
|
289
|
+
}
|
|
290
|
+
],
|
|
291
|
+
"models": [
|
|
292
|
+
"customers",
|
|
293
|
+
"orders"
|
|
294
|
+
],
|
|
295
|
+
"time_dimensions": [
|
|
296
|
+
"order_date"
|
|
297
|
+
]
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
"profile": "genbi-enrich-context",
|
|
301
|
+
"warble_ir_version": "0.6"
|
|
302
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# genbi-enrich-context — optional post-bind enrichment for an already built Wren project.
|
|
2
|
+
#
|
|
3
|
+
# This is deliberately separate from genbi-setup: setup creates and builds a project, whereas
|
|
4
|
+
# this profile only operates after a pinned project's MDL is already valid and built. The host
|
|
5
|
+
# starts the run only after it has recorded that build proof; the typed terminal contract owns
|
|
6
|
+
# that runtime-only proof so no state file is added to the project.
|
|
7
|
+
profile: genbi-enrich-context
|
|
8
|
+
|
|
9
|
+
context:
|
|
10
|
+
project: context/binding.yml
|
|
11
|
+
|
|
12
|
+
components:
|
|
13
|
+
- use: inspect_context
|
|
14
|
+
- use: draft_enrichment
|
|
15
|
+
- use: apply_enrichment
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Coarse context binding: the whole v5-jaffle semantic layer — same shape and same resolution path
|
|
2
|
+
# as genbi-default/context/binding.yml (IR v0.3+ builds a real MdlContext over the bound project and
|
|
3
|
+
# evaluates context_precondition predicates against it). The host rewrites this `project:` line to
|
|
4
|
+
# the user's own wren project at onboarding time; this repo pins v5-jaffle so `genbi-monitor`
|
|
5
|
+
# compiles standalone for CI/dev.
|
|
6
|
+
# Path is relative to this profile directory.
|
|
7
|
+
project: ../../../../examples/v5-jaffle
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
{
|
|
2
|
+
"components": [
|
|
3
|
+
{
|
|
4
|
+
"binds": {
|
|
5
|
+
"expected_cadence": "48h",
|
|
6
|
+
"model": "orders"
|
|
7
|
+
},
|
|
8
|
+
"borrowed_actions": [
|
|
9
|
+
"notify_slack",
|
|
10
|
+
"open_ticket"
|
|
11
|
+
],
|
|
12
|
+
"context_binding": {
|
|
13
|
+
"binding_mode": "pinned",
|
|
14
|
+
"project": "../../../../examples/v5-jaffle"
|
|
15
|
+
},
|
|
16
|
+
"context_precondition": [
|
|
17
|
+
{
|
|
18
|
+
"args": {
|
|
19
|
+
"model": "orders"
|
|
20
|
+
},
|
|
21
|
+
"predicate": "model_has_timestamp"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"context_requirements": [
|
|
25
|
+
"a model with a load/event timestamp column (DATE / TIMESTAMP)",
|
|
26
|
+
"an expected freshness cadence (from the MDL or the expected_cadence param)"
|
|
27
|
+
],
|
|
28
|
+
"effect": {
|
|
29
|
+
"outcome": {
|
|
30
|
+
"emits": [
|
|
31
|
+
"freshness_breach"
|
|
32
|
+
],
|
|
33
|
+
"kind": "assertion",
|
|
34
|
+
"verdict_type": "freshness_verdict"
|
|
35
|
+
},
|
|
36
|
+
"render_blocks": [
|
|
37
|
+
{
|
|
38
|
+
"fields": {},
|
|
39
|
+
"type": "status"
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"eval": {
|
|
44
|
+
"metrics": [
|
|
45
|
+
"detection_accuracy",
|
|
46
|
+
"severity_calibration"
|
|
47
|
+
],
|
|
48
|
+
"template_ref": "eval/"
|
|
49
|
+
},
|
|
50
|
+
"eval_ref": "monitor_freshness.eval",
|
|
51
|
+
"guardrails": [
|
|
52
|
+
{
|
|
53
|
+
"locked": true,
|
|
54
|
+
"name": "read_only_execution"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"locked": false,
|
|
58
|
+
"name": "alert_routing"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"id": "monitor_freshness",
|
|
62
|
+
"llm_calls": [
|
|
63
|
+
{
|
|
64
|
+
"conditional": true,
|
|
65
|
+
"consumes": [
|
|
66
|
+
"freshness_reading"
|
|
67
|
+
],
|
|
68
|
+
"name": "assess_severity",
|
|
69
|
+
"produces": "severity_verdict",
|
|
70
|
+
"prompt": "You are the `assess_severity` step of the `monitor_freshness` assertion, bound to the\n`v5-jaffle` wren project.\n\nYou run ONLY when the deterministic freshness assert has already decided the data is **stale** —\ni.e. `max(<timestamp>)` on the monitored model is older than the expected cadence. The fresh-vs-stale\ndecision is not yours; it was a SQL comparison. You never re-run it, and when the data is fresh this\nstep does not run at all.\n\nYour one job: given the `freshness_reading` (the observed newest timestamp, the observed lag, and the\nexpected cadence), classify how bad the breach is:\n\n- `warn` — modestly overdue (roughly within ~2× the cadence), no compounding signal. The pipeline is\n probably just late.\n- `critical` — badly overdue (well beyond ~2× the cadence), or the lag is still growing across recent\n readings, or this model feeds known-critical downstreams. Someone should be paged.\n\nJudge from the lag magnitude relative to the cadence and any history in the reading; do not invent\nnumbers you were not given. Keep it to a reproducible, conservative call — when genuinely on the\nboundary, prefer `warn` and say why.\n\nProduce `severity_verdict` as a compact judgement: the chosen `severity` (`warn` | `critical`) and a\none-line rationale grounded in the lag vs cadence. This feeds the `status` block's `severity` field\nin the verdict envelope; it does not change the fresh/stale verdict itself.",
|
|
71
|
+
"tier": "cheap",
|
|
72
|
+
"when": {
|
|
73
|
+
"guard": "on_flag",
|
|
74
|
+
"target": "freshness_reading.stale"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"params": [
|
|
79
|
+
{
|
|
80
|
+
"bind": "required",
|
|
81
|
+
"name": "model"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"bind": "optional",
|
|
85
|
+
"default": "24h",
|
|
86
|
+
"name": "expected_cadence"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "connection",
|
|
90
|
+
"source": "runtime-injected"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "model_binding",
|
|
94
|
+
"source": "runtime-injected"
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"precondition_result": {
|
|
98
|
+
"checks": [
|
|
99
|
+
{
|
|
100
|
+
"outcome": "pass",
|
|
101
|
+
"predicate": "model_has_timestamp"
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
"status": "pass"
|
|
105
|
+
},
|
|
106
|
+
"prompt_fragment": "## assess_severity\n\nYou are the `assess_severity` step of the `monitor_freshness` assertion, bound to the\n`v5-jaffle` wren project.\n\nYou run ONLY when the deterministic freshness assert has already decided the data is **stale** —\ni.e. `max(<timestamp>)` on the monitored model is older than the expected cadence. The fresh-vs-stale\ndecision is not yours; it was a SQL comparison. You never re-run it, and when the data is fresh this\nstep does not run at all.\n\nYour one job: given the `freshness_reading` (the observed newest timestamp, the observed lag, and the\nexpected cadence), classify how bad the breach is:\n\n- `warn` — modestly overdue (roughly within ~2× the cadence), no compounding signal. The pipeline is\n probably just late.\n- `critical` — badly overdue (well beyond ~2× the cadence), or the lag is still growing across recent\n readings, or this model feeds known-critical downstreams. Someone should be paged.\n\nJudge from the lag magnitude relative to the cadence and any history in the reading; do not invent\nnumbers you were not given. Keep it to a reproducible, conservative call — when genuinely on the\nboundary, prefer `warn` and say why.\n\nProduce `severity_verdict` as a compact judgement: the chosen `severity` (`warn` | `critical`) and a\none-line rationale grounded in the lag vs cadence. This feeds the `status` block's `severity` field\nin the verdict envelope; it does not change the fresh/stale verdict itself.",
|
|
107
|
+
"realization_kind": "tool",
|
|
108
|
+
"required_capabilities": [
|
|
109
|
+
"scheduler",
|
|
110
|
+
"sql_execution:read_only",
|
|
111
|
+
"notify_channel",
|
|
112
|
+
"llm:cheap"
|
|
113
|
+
],
|
|
114
|
+
"trigger": {
|
|
115
|
+
"kind": "scheduled"
|
|
116
|
+
},
|
|
117
|
+
"type": "assertive",
|
|
118
|
+
"verb": "monitor_freshness"
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"config": {},
|
|
122
|
+
"context_binding": {
|
|
123
|
+
"binding_mode": "pinned",
|
|
124
|
+
"project": "../../../../examples/v5-jaffle",
|
|
125
|
+
"resolved": {
|
|
126
|
+
"dimensions": [
|
|
127
|
+
{
|
|
128
|
+
"name": "customer_id",
|
|
129
|
+
"temporal": false
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"name": "name",
|
|
133
|
+
"temporal": false
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"name": "order_date",
|
|
137
|
+
"temporal": true
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
"lineage": {
|
|
141
|
+
"consumers": {
|
|
142
|
+
"dashboards": 0,
|
|
143
|
+
"queries": 1
|
|
144
|
+
},
|
|
145
|
+
"edges": 7,
|
|
146
|
+
"nodes": 8,
|
|
147
|
+
"resolvable": true
|
|
148
|
+
},
|
|
149
|
+
"metrics": [
|
|
150
|
+
{
|
|
151
|
+
"additivity": "additive",
|
|
152
|
+
"declared": true,
|
|
153
|
+
"name": "total_revenue"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"additivity": "additive",
|
|
157
|
+
"declared": true,
|
|
158
|
+
"name": "order_count"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"declared": false,
|
|
162
|
+
"name": "id"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"declared": false,
|
|
166
|
+
"name": "id"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"declared": false,
|
|
170
|
+
"name": "customer_id"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"declared": false,
|
|
174
|
+
"name": "amount"
|
|
175
|
+
}
|
|
176
|
+
],
|
|
177
|
+
"models": [
|
|
178
|
+
"customers",
|
|
179
|
+
"orders"
|
|
180
|
+
],
|
|
181
|
+
"time_dimensions": [
|
|
182
|
+
"order_date"
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"profile": "genbi-monitor",
|
|
187
|
+
"warble_ir_version": "0.6"
|
|
188
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# genbi-monitor — the freshness-monitoring GenBI profile. Sibling to genbi-default (the
|
|
2
|
+
# answer/dashboard flagship) and genbi-setup (the onboarding profile): this one is the ASSERTIVE
|
|
3
|
+
# profile — a resident scheduled check, not a one-shot render or a setup action. It mounts the single
|
|
4
|
+
# `monitor_freshness` component from Warble's shared Hub; like genbi-default it does not own its own
|
|
5
|
+
# component library.
|
|
6
|
+
#
|
|
7
|
+
# `model: orders` below is a TEMPLATE value, not a fixed product choice: the host rewrites this bind
|
|
8
|
+
# to whichever model the user actually picks to monitor, the same way it already rewrites
|
|
9
|
+
# context/binding.yml's `project:` line to the user's own semantic layer at onboarding time. The
|
|
10
|
+
# committed value here just pins `orders` (v5-jaffle's `orders` model carries an `order_date`
|
|
11
|
+
# TIMESTAMP column, so `model_has_timestamp` holds) so this profile has a deterministic, compilable
|
|
12
|
+
# golden for CI — see ir.golden.json.
|
|
13
|
+
#
|
|
14
|
+
# `expected_cadence: 48h` is deliberately NOT the component's own default (`24h`): a non-default bind
|
|
15
|
+
# is what proves an *optional* bind actually flows through compilation into the IR's `binds` facet,
|
|
16
|
+
# rather than a bind that happens to look identical to the param's declared default either way.
|
|
17
|
+
|
|
18
|
+
profile: genbi-monitor
|
|
19
|
+
|
|
20
|
+
context:
|
|
21
|
+
project: ./context/binding.yml
|
|
22
|
+
|
|
23
|
+
components:
|
|
24
|
+
- use: monitor_freshness
|
|
25
|
+
bind:
|
|
26
|
+
model: orders
|
|
27
|
+
expected_cadence: 48h
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# build_context — generate the semantic layer (MDL) for a project connect_source just scaffolded.
|
|
2
|
+
# Second half of the genbi-setup flow (see ../../profile.yml). Assumes credentials have already been
|
|
3
|
+
# filled in by the user following connect_source's hand-off; this component does not itself touch
|
|
4
|
+
# credential values.
|
|
5
|
+
#
|
|
6
|
+
# Same shape and same reasoning as connect_source: `type: analytical` + `realization_kind: skill` +
|
|
7
|
+
# `outcome.kind: none`, NOT `constitutive`/`gated-tool` -- see connect_source/component.yml for why
|
|
8
|
+
# (human_approval would loud-fail headless). MDL generated here is a fresh scaffold with no existing
|
|
9
|
+
# lineage to gate, so it does not reuse bootstrap_mdl's context_write_authz/mutation lifecycle either;
|
|
10
|
+
# it stays on the same setup_execution guarded-Bash lifecycle as connect_source.
|
|
11
|
+
|
|
12
|
+
id: build_context
|
|
13
|
+
verb: build_context
|
|
14
|
+
type: analytical
|
|
15
|
+
realization_kind: skill
|
|
16
|
+
|
|
17
|
+
binding_mode: runtime_selected
|
|
18
|
+
context_requirements:
|
|
19
|
+
- "a project connect_source has already scaffolded, with credentials filled in and connectable"
|
|
20
|
+
# No context_precondition: same reasoning as connect_source -- there is no existing semantic layer to
|
|
21
|
+
# probe yet; this component is what produces one.
|
|
22
|
+
|
|
23
|
+
params: []
|
|
24
|
+
|
|
25
|
+
llm_steps:
|
|
26
|
+
# Single strong step, same reasoning as connect_source (avoids requiring llm:per_step_tier).
|
|
27
|
+
- { name: build, tier: strong, prompt_ref: steps/build.md, produces: context_summary }
|
|
28
|
+
trigger: { kind: one_shot }
|
|
29
|
+
guardrails:
|
|
30
|
+
# Same setup_execution guardrail/scope as connect_source -- see that component.yml's comment.
|
|
31
|
+
- { name: setup_execution, locked: true, scope: "." }
|
|
32
|
+
required_capabilities:
|
|
33
|
+
- context_build
|
|
34
|
+
- llm:strong
|
|
35
|
+
borrowed_actions: []
|
|
36
|
+
|
|
37
|
+
effect:
|
|
38
|
+
render_blocks: []
|
|
39
|
+
outcome:
|
|
40
|
+
kind: none
|
|
41
|
+
|
|
42
|
+
eval:
|
|
43
|
+
template_ref: eval/
|
|
44
|
+
metrics: [build_success]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
You generate the semantic layer (MDL) for a wren project that connect_source already scaffolded and
|
|
2
|
+
whose credentials the user has already filled in.
|
|
3
|
+
|
|
4
|
+
- Follow the `wren` CLI's MDL-generation skill: run the `generate-mdl` skill (if available) to
|
|
5
|
+
introspect the connected source and draft models, then optionally the `enrich-context` skill to add
|
|
6
|
+
business knowledge/descriptions on top. Do not hand-write MDL from scratch if a generation skill is
|
|
7
|
+
available -- generate first, then refine.
|
|
8
|
+
- Validate before building: run `wren context validate` and only proceed to `wren context build` once
|
|
9
|
+
it reports clean. If validation fails, fix the reported issues and re-validate rather than forcing a
|
|
10
|
+
build through errors.
|
|
11
|
+
- Do not touch credential values at any point in this step -- if the connection fails, report the
|
|
12
|
+
failure back to the user rather than editing the `.env` file's values yourself.
|
|
13
|
+
- Produce `context_summary`: report how many models were generated, whether validation passed, and
|
|
14
|
+
whether the build succeeded. Your FINAL message must include this summary.
|