Files
root b77a855a3e 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>
2026-04-25 23:56:29 -03:00

437 lines
6.0 KiB
YAML

# Auto-extracted absolute_layout template from
# kb/diagram/assets/archcenter-refs/modernize-app-dev-oci-postgresql-redis-opensearch/dr-architecture-diagram-oracle/dr-architecture-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: 0
y: 0
w: 502
h: 720
- id: c2
type: region
label: ''
x: 631
y: 0
w: 502
h: 720
- id: c9
type: region
label: ''
x: 472
y: 133
w: 2
h: 63
- id: c13
type: region
label: ''
x: 660
y: 133
w: 2
h: 63
- id: c55
type: region
label: ''
x: 337
y: 340
w: 8
h: 8
- id: c56
type: region
label: ''
x: 337
y: 499
w: 8
h: 8
services:
- id: s4
type: TODO_identify
label: ''
x: 421
y: 18
w: 42
h: 40
- id: s7
type: TODO_identify
label: ''
x: 1072
y: 18
w: 42
h: 40
- id: s3
type: TODO_identify
label: ''
x: 421
y: 19
w: 41
h: 39
- id: s5
type: TODO_identify
label: ''
x: 422
y: 19
w: 40
h: 38
- id: s6
type: TODO_identify
label: ''
x: 1072
y: 19
w: 41
h: 39
- id: s8
type: TODO_identify
label: ''
x: 1073
y: 19
w: 40
h: 38
- id: s17
type: TODO_identify
label: ''
x: 20
y: 69
w: 206
h: 171
- id: s19
type: TODO_identify
label: ''
x: 236
y: 69
w: 206
h: 171
- id: s18
type: TODO_identify
label: ''
x: 691
y: 69
w: 206
h: 171
- id: s20
type: TODO_identify
label: ''
x: 907
y: 69
w: 206
h: 171
- id: s22
type: TODO_identify
label: ''
x: 96
y: 119
w: 47
h: 74
- id: s26
type: TODO_identify
label: ''
x: 767
y: 119
w: 47
h: 74
- id: s21
type: TODO_identify
label: ''
x: 97
y: 120
w: 45
h: 72
- id: s25
type: TODO_identify
label: ''
x: 768
y: 120
w: 45
h: 72
- id: s23
type: TODO_identify
label: ''
x: 98
y: 121
w: 40
h: 67
- id: s24
type: TODO_identify
label: ''
x: 98
y: 121
w: 40
h: 67
- id: s27
type: TODO_identify
label: ''
x: 769
y: 121
w: 40
h: 67
- id: s28
type: TODO_identify
label: ''
x: 769
y: 121
w: 40
h: 67
- id: s30
type: TODO_identify
label: ''
x: 310
y: 130
w: 63
h: 63
- id: s29
type: TODO_identify
label: ''
x: 311
y: 130
w: 62
h: 62
- id: s34
type: TODO_identify
label: ''
x: 981
y: 130
w: 63
h: 63
- id: s33
type: TODO_identify
label: ''
x: 982
y: 130
w: 62
h: 62
- id: s31
type: TODO_identify
label: ''
x: 312
y: 131
w: 60
h: 60
- id: s35
type: TODO_identify
label: ''
x: 983
y: 131
w: 60
h: 60
- id: s11
type: TODO_identify
label: ''
x: 451
y: 133
w: 42
h: 42
- id: s10
type: TODO_identify
label: ''
x: 452
y: 133
w: 41
h: 41
- id: s15
type: TODO_identify
label: ''
x: 639
y: 133
w: 42
h: 42
- id: s14
type: TODO_identify
label: ''
x: 640
y: 133
w: 41
h: 41
- id: s12
type: TODO_identify
label: ''
x: 452
y: 134
w: 40
h: 40
- id: s16
type: TODO_identify
label: ''
x: 640
y: 134
w: 40
h: 40
- id: s32
type: TODO_identify
label: ''
x: 318
y: 159
w: 47
h: 25
- id: s36
type: TODO_identify
label: ''
x: 989
y: 159
w: 47
h: 25
- id: s38
type: TODO_identify
label: ''
x: 188
y: 300
w: 57
h: 63
- id: s41
type: TODO_identify
label: ''
x: 859
y: 300
w: 57
h: 63
- id: s37
type: TODO_identify
label: ''
x: 188
y: 301
w: 55
h: 61
- id: s40
type: TODO_identify
label: ''
x: 859
y: 301
w: 55
h: 61
- id: s39
type: TODO_identify
label: ''
x: 189
y: 302
w: 54
h: 60
- id: s42
type: TODO_identify
label: ''
x: 860
y: 302
w: 54
h: 60
- id: s43
type: TODO_identify
label: ''
x: 185
y: 454
w: 61
h: 61
- id: s44
type: TODO_identify
label: ''
x: 185
y: 454
w: 62
h: 63
- id: s47
type: TODO_identify
label: ''
x: 856
y: 454
w: 61
h: 61
- id: s48
type: TODO_identify
label: ''
x: 856
y: 454
w: 62
h: 63
- id: s45
type: TODO_identify
label: ''
x: 192
y: 455
w: 48
h: 45
- id: s49
type: TODO_identify
label: ''
x: 863
y: 455
w: 48
h: 45
- id: s46
type: TODO_identify
label: ''
x: 215
y: 482
w: 30
h: 34
- id: s50
type: TODO_identify
label: ''
x: 886
y: 482
w: 30
h: 34
- id: s52
type: TODO_identify
label: ''
x: 186
y: 592
w: 59
h: 63
- id: s58
type: TODO_identify
label: ''
x: 857
y: 592
w: 59
h: 63
- id: s53
type: TODO_identify
label: ''
x: 199
y: 609
w: 42
h: 42
- id: s59
type: TODO_identify
label: ''
x: 870
y: 609
w: 42
h: 42
- id: s51
type: TODO_identify
label: ''
x: 200
y: 611
w: 28
h: 26
- id: s54
type: TODO_identify
label: ''
x: 200
y: 611
w: 28
h: 26
- id: s57
type: TODO_identify
label: ''
x: 871
y: 611
w: 28
h: 26
- id: s60
type: TODO_identify
label: ''
x: 871
y: 611
w: 28
h: 26
labels: []
connections: []