forked from diegoecab/oci-deal-accelerator
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>
276 lines
4.0 KiB
YAML
276 lines
4.0 KiB
YAML
# Auto-extracted absolute_layout template from
|
|
# kb/diagram/assets/archcenter-refs/oracle-db-at-google-cloud-migration/oracle_database_at_google_cloud_w_zdm-oracle/oracle_database_at_google_cloud_w_zdm.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: c8
|
|
type: region
|
|
label: ''
|
|
x: 1089
|
|
y: 0
|
|
w: 258
|
|
h: 650
|
|
- id: c7
|
|
type: region
|
|
label: ''
|
|
x: 0
|
|
y: 0
|
|
w: 249
|
|
h: 650
|
|
services:
|
|
- id: _EfNwBSLM2400bKqzdRG-45
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 22
|
|
y: 4
|
|
w: 24
|
|
h: 33
|
|
- id: s4
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 514
|
|
y: 139
|
|
w: 33
|
|
h: 33
|
|
- id: s2
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 1013
|
|
y: 139
|
|
w: 33
|
|
h: 33
|
|
- id: s18
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 19
|
|
y: 148
|
|
w: 164
|
|
h: 143
|
|
- id: s3
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 514
|
|
y: 148
|
|
w: 33
|
|
h: 25
|
|
- id: s1
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 1013
|
|
y: 148
|
|
w: 33
|
|
h: 25
|
|
- id: s24
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 160
|
|
y: 192
|
|
w: 42
|
|
h: 42
|
|
- id: s23
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 402
|
|
y: 192
|
|
w: 42
|
|
h: 42
|
|
- id: s5
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 896
|
|
y: 194
|
|
w: 46
|
|
h: 37
|
|
- id: s6
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 986
|
|
y: 194
|
|
w: 34
|
|
h: 38
|
|
- id: s10
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 1104
|
|
y: 264
|
|
w: 42
|
|
h: 40
|
|
- id: s9
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 1105
|
|
y: 264
|
|
w: 41
|
|
h: 39
|
|
- id: s11
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 1105
|
|
y: 265
|
|
w: 40
|
|
h: 38
|
|
- id: s12
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 1095
|
|
y: 309
|
|
w: 41
|
|
h: 41
|
|
- id: s13
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 1095
|
|
y: 309
|
|
w: 42
|
|
h: 42
|
|
- id: s14
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 1096
|
|
y: 323
|
|
w: 29
|
|
h: 26
|
|
- id: s26
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 73
|
|
y: 339
|
|
w: 56
|
|
h: 63
|
|
- id: s25
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 74
|
|
y: 340
|
|
w: 55
|
|
h: 61
|
|
- id: s27
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 74
|
|
y: 341
|
|
w: 53
|
|
h: 60
|
|
- id: s20
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 1226
|
|
y: 370
|
|
w: 65
|
|
h: 33
|
|
- id: s19
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 1227
|
|
y: 370
|
|
w: 63
|
|
h: 31
|
|
- id: s21
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 1228
|
|
y: 371
|
|
w: 61
|
|
h: 30
|
|
- id: s29
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 924
|
|
y: 428
|
|
w: 64
|
|
h: 84
|
|
- id: s30
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 926
|
|
y: 430
|
|
w: 60
|
|
h: 30
|
|
- id: s32
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 941
|
|
y: 447
|
|
w: 31
|
|
h: 64
|
|
- id: s28
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 945
|
|
y: 450
|
|
w: 25
|
|
h: 58
|
|
- id: s31
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 945
|
|
y: 450
|
|
w: 25
|
|
h: 58
|
|
- id: s33
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 464
|
|
y: 464
|
|
w: 55
|
|
h: 63
|
|
- id: s35
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 1230
|
|
y: 464
|
|
w: 55
|
|
h: 63
|
|
- id: s34
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 466
|
|
y: 466
|
|
w: 34
|
|
h: 25
|
|
- id: s36
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 1231
|
|
y: 466
|
|
w: 34
|
|
h: 25
|
|
- id: s16
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 1095
|
|
y: 470
|
|
w: 42
|
|
h: 42
|
|
- id: s15
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 1095
|
|
y: 471
|
|
w: 41
|
|
h: 41
|
|
- id: s22
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 79
|
|
y: 476
|
|
w: 44
|
|
h: 44
|
|
- id: s17
|
|
type: TODO_identify
|
|
label: ''
|
|
x: 1096
|
|
y: 485
|
|
w: 29
|
|
h: 26
|
|
labels: []
|
|
connections: []
|