forked from diegoecab/oci-deal-accelerator
Extractor: drawio → absolute_layout YAML scaffold (107/132 cached)
Closes the procedural hole that kept making Codex sessions fall back
to ``examples/`` for YAML scaffolding even after the SKILL forbade it.
The lookup tool returns a canonical Oracle ``.drawio`` as the geometry
source, but the agent had no YAML version of that geometry to copy —
the .drawio is XML with stencil-encoded icons. Without a scaffold,
agents reverse-engineered or fell back to ``examples/`` (which is
forbidden but happened anyway because the alternative was painful).
New tool ``tools/archcenter_drawio_to_template.py`` extracts:
• canvas dimensions
• containers (region / vcn / ad / subnet) classified by stroke /
fill style markers
• service bounding boxes with ``type: TODO_identify`` (the icon
type is encoded in stencil bytes — agent fills it from the
renderer's TYPE_TO_ICON aliases when authoring the spec)
• edge waypoints (source, target, points)
Output lands at ``kb/diagram/assets/archcenter-refs/<slug>/_template.yaml``
next to the .drawio. Lookup now surfaces it as
``cached: yaml=<path>`` so the agent has a one-step "copy this YAML
and adapt" path.
Ran across all 132 cached folders: 107 templates emitted, 24 had no
.drawio (zip didn't ship one), 1 already cached.
Other persistent guardrails added in this commit:
- SKILL.md option 2 step 3: explicit reminder that valid ``type:``
values come from ``TYPE_TO_ICON`` / ``ICON_TYPE_ALIASES`` in the
renderer source plus the icon-index JSON files. Do NOT grep
``examples/`` for ``type:`` — that's where the previous Codex
session was looking, against the rule.
- ``make archcenter-templates-refresh`` Makefile target.
- The lookup index now also indexes ``_template.yaml`` per slug.
- Auto-extracted templates committed under
``kb/diagram/assets/archcenter-refs/*/_template.yaml`` so a fresh
clone has them on first lookup (no extraction step needed).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,373 @@
|
||||
# Auto-extracted absolute_layout template from
|
||||
# kb/diagram/assets/archcenter-refs/oci-ops-insights-and-em-bridge/oci-ops-insights-diagram-oracle/oci-ops-insights-diagram.drawio
|
||||
# Source: Oracle Architecture Center reference (canonical geometry).
|
||||
# Use this as the starting scaffold for a new spec — copy, rename ids,
|
||||
# and replace `type: TODO_identify` on services with the right OCI
|
||||
# type alias (adb_s, drg, fastconnect, etc.). Container coords and
|
||||
# edge waypoints are Oracle's canonical layout; preserve unless the
|
||||
# customer's topology requires a change.
|
||||
absolute_layout:
|
||||
canvas:
|
||||
width: 850
|
||||
height: 1100
|
||||
containers:
|
||||
- id: c1
|
||||
type: region
|
||||
label: ''
|
||||
x: 450
|
||||
y: 330
|
||||
w: 407
|
||||
h: 364
|
||||
- id: c2
|
||||
type: region
|
||||
label: ''
|
||||
x: 875
|
||||
y: 330
|
||||
w: 402
|
||||
h: 364
|
||||
services:
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-9
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 0
|
||||
y: 0
|
||||
w: 62
|
||||
h: 59
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-10
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 0
|
||||
y: 0
|
||||
w: 63
|
||||
h: 61
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-15
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 0
|
||||
y: 0
|
||||
w: 62
|
||||
h: 57
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-16
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 0
|
||||
y: 0
|
||||
w: 63
|
||||
h: 59
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-20
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 0
|
||||
y: 0
|
||||
w: 62
|
||||
h: 57
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-21
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 0
|
||||
y: 0
|
||||
w: 63
|
||||
h: 59
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-25
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 0
|
||||
y: 0
|
||||
w: 55
|
||||
h: 61
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-26
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 0
|
||||
y: 0
|
||||
w: 56
|
||||
h: 63
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-32
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 0
|
||||
y: 0
|
||||
w: 62
|
||||
h: 62
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-33
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 0
|
||||
y: 0
|
||||
w: 63
|
||||
h: 63
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-37
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 0
|
||||
y: 0
|
||||
w: 55
|
||||
h: 61
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-38
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 0
|
||||
y: 0
|
||||
w: 56
|
||||
h: 63
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-44
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 0
|
||||
y: 0
|
||||
w: 63
|
||||
h: 63
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-45
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 0
|
||||
y: 0
|
||||
w: 62
|
||||
h: 62
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-46
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 0
|
||||
y: 0
|
||||
w: 63
|
||||
h: 63
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-58
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 0
|
||||
y: 0
|
||||
w: 62
|
||||
h: 55
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-59
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 0
|
||||
y: 0
|
||||
w: 63
|
||||
h: 56
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-72
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 0
|
||||
y: 0
|
||||
w: 62
|
||||
h: 59
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-73
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 0
|
||||
y: 0
|
||||
w: 63
|
||||
h: 61
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-12
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 1
|
||||
y: 1
|
||||
w: 60
|
||||
h: 30
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-17
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 1
|
||||
y: 1
|
||||
w: 60
|
||||
h: 56
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-22
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 1
|
||||
y: 1
|
||||
w: 60
|
||||
h: 56
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-27
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 1
|
||||
y: 1
|
||||
w: 53
|
||||
h: 60
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-34
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 1
|
||||
y: 1
|
||||
w: 60
|
||||
h: 60
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-39
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 1
|
||||
y: 1
|
||||
w: 53
|
||||
h: 60
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-47
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 1
|
||||
y: 1
|
||||
w: 60
|
||||
h: 60
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-60
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 1
|
||||
y: 1
|
||||
w: 61
|
||||
h: 30
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-74
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 1
|
||||
y: 1
|
||||
w: 60
|
||||
h: 30
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-52
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 1
|
||||
y: 7
|
||||
w: 60
|
||||
h: 54
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-51
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 11
|
||||
y: 13
|
||||
w: 38
|
||||
h: 43
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-75
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 12
|
||||
y: 16
|
||||
w: 42
|
||||
h: 42
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-61
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 18
|
||||
y: 16
|
||||
w: 30
|
||||
h: 39
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-11
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 9
|
||||
y: 23
|
||||
w: 45
|
||||
h: 35
|
||||
- id: 63VU8Y6kWO1pHm1vqkuK-66
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 30
|
||||
y: 29
|
||||
w: 25
|
||||
h: 25
|
||||
- id: s6
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 481
|
||||
y: 376
|
||||
w: 56
|
||||
h: 63
|
||||
- id: s4
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 1079
|
||||
y: 380
|
||||
w: 63
|
||||
h: 59
|
||||
- id: s12
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 1186
|
||||
y: 383
|
||||
w: 63
|
||||
h: 56
|
||||
- id: s16
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 539
|
||||
y: 410
|
||||
w: 52
|
||||
h: 203
|
||||
- id: s17
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 1023
|
||||
y: 410
|
||||
w: 57
|
||||
h: 203
|
||||
- id: s7
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 468
|
||||
y: 443
|
||||
w: 169
|
||||
h: 37
|
||||
- id: s13
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 1183
|
||||
y: 443
|
||||
w: 152
|
||||
h: 37
|
||||
- id: s8
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 632
|
||||
y: 478
|
||||
w: 63
|
||||
h: 63
|
||||
- id: s11
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 918
|
||||
y: 478
|
||||
w: 63
|
||||
h: 63
|
||||
- id: s3
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 759
|
||||
y: 480
|
||||
w: 63
|
||||
h: 61
|
||||
- id: s9
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 481
|
||||
y: 579
|
||||
w: 56
|
||||
h: 63
|
||||
- id: s14
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 1186
|
||||
y: 582
|
||||
w: 63
|
||||
h: 61
|
||||
- id: s5
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 1079
|
||||
y: 584
|
||||
w: 63
|
||||
h: 59
|
||||
- id: s10
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 485
|
||||
y: 646
|
||||
w: 101
|
||||
h: 37
|
||||
- id: s15
|
||||
type: TODO_identify
|
||||
label: ''
|
||||
x: 1176
|
||||
y: 646
|
||||
w: 169
|
||||
h: 37
|
||||
labels: []
|
||||
connections: []
|
||||
Reference in New Issue
Block a user