<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" xml:base="https://docs.spec-kitty.ai/context/contextive-glossaries/">
  <id>https://docs.spec-kitty.ai/context/contextive-glossaries/</id>
  <title>Contextive Glossary Integration</title>
  <updated>2026-11-13T00:00:00.000Z</updated>
  <author><name>Spec Kitty</name></author>
  <link rel="alternate" type="text/html" href="https://docs.spec-kitty.ai/context/contextive-glossaries/"/>
  <summary>How Spec Kitty generates Contextive-compatible YAML glossaries from the canonical glossary markdown, giving IDE users in-editor term hover panels without duplication.</summary>
  <content type="html">&lt;span id=&quot;contextive-glossary-integration&quot;&gt;&lt;/span&gt;
&lt;p&gt;Spec Kitty generates &lt;a href=&quot;https://contextive.tech&quot;&gt;Contextive&lt;/a&gt;-compatible YAML glossary files from the
canonical glossary markdown so that IDE users get in-editor term hover panels without any manual
duplication.&lt;/p&gt;
&lt;h2 id=&quot;how-it-works&quot;&gt;How it works&lt;/h2&gt;
&lt;figure class=&quot;dk-diagram&quot; role=&quot;group&quot; aria-labelledby=&quot;dk-diagram-caption-0&quot;&gt;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; id=&quot;m05684195389803295-0&quot; width=&quot;100%&quot; aria-describedby=&quot;chart-desc-m05684195389803295-0&quot; aria-labelledby=&quot;chart-title-m05684195389803295-0&quot; aria-roledescription=&quot;flowchart-v2&quot; class=&quot;flowchart&quot; style=&quot;font-family:arial,sans-serif;font-size:16px;fill:var(--dk-diagram-node-text);max-width:640.328125px&quot; viewBox=&quot;0 0 640.328 374&quot;&gt;&lt;title id=&quot;chart-title-m05684195389803295-0&quot;&gt;Contextive glossary generation&lt;/title&gt;&lt;desc id=&quot;chart-desc-m05684195389803295-0&quot;&gt;The generator reads the canonical term pages in docs/context and the traceability map, then writes one context YAML per referenced context and one scope YAML per mapped package.&lt;/desc&gt;&lt;marker id=&quot;m05684195389803295-0_flowchart-v2-pointEnd&quot; class=&quot;marker flowchart-v2&quot; markerHeight=&quot;8&quot; markerUnits=&quot;userSpaceOnUse&quot; markerWidth=&quot;8&quot; orient=&quot;auto&quot; refX=&quot;5&quot; refY=&quot;5&quot; viewBox=&quot;0 0 10 10&quot;&gt;&lt;path d=&quot;m0 0 10 5-10 5z&quot; class=&quot;arrowMarkerPath&quot; style=&quot;stroke-width:1;stroke-dasharray:1,0&quot;&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id=&quot;m05684195389803295-0_flowchart-v2-pointStart&quot; class=&quot;marker flowchart-v2&quot; markerHeight=&quot;8&quot; markerUnits=&quot;userSpaceOnUse&quot; markerWidth=&quot;8&quot; orient=&quot;auto&quot; refX=&quot;4.5&quot; refY=&quot;5&quot; viewBox=&quot;0 0 10 10&quot;&gt;&lt;path d=&quot;m0 5 10 5V0z&quot; class=&quot;arrowMarkerPath&quot; style=&quot;stroke-width:1;stroke-dasharray:1,0&quot;&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id=&quot;m05684195389803295-0_flowchart-v2-pointEnd-margin&quot; class=&quot;marker flowchart-v2&quot; markerHeight=&quot;14&quot; markerUnits=&quot;userSpaceOnUse&quot; markerWidth=&quot;10.5&quot; orient=&quot;auto&quot; refX=&quot;11.5&quot; refY=&quot;7&quot; viewBox=&quot;0 0 11.5 14&quot;&gt;&lt;path d=&quot;m0 0 11.5 7L0 14z&quot; class=&quot;arrowMarkerPath&quot; style=&quot;stroke-width:0;stroke-dasharray:1,0&quot;&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id=&quot;m05684195389803295-0_flowchart-v2-pointStart-margin&quot; class=&quot;marker flowchart-v2&quot; markerHeight=&quot;14&quot; markerUnits=&quot;userSpaceOnUse&quot; markerWidth=&quot;11.5&quot; orient=&quot;auto&quot; refX=&quot;1&quot; refY=&quot;7&quot; viewBox=&quot;0 0 11.5 14&quot;&gt;&lt;polygon points=&quot;0,7 11.5,14 11.5,0&quot; class=&quot;arrowMarkerPath&quot; style=&quot;stroke-width:0;stroke-dasharray:1,0&quot;&gt;&lt;/polygon&gt;&lt;/marker&gt;&lt;marker id=&quot;m05684195389803295-0_flowchart-v2-circleEnd&quot; class=&quot;marker flowchart-v2&quot; markerHeight=&quot;11&quot; markerUnits=&quot;userSpaceOnUse&quot; markerWidth=&quot;11&quot; orient=&quot;auto&quot; refX=&quot;11&quot; refY=&quot;5&quot; viewBox=&quot;0 0 10 10&quot;&gt;&lt;circle cx=&quot;5&quot; cy=&quot;5&quot; r=&quot;5&quot; class=&quot;arrowMarkerPath&quot; style=&quot;stroke-width:1;stroke-dasharray:1,0&quot;&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id=&quot;m05684195389803295-0_flowchart-v2-circleStart&quot; class=&quot;marker flowchart-v2&quot; markerHeight=&quot;11&quot; markerUnits=&quot;userSpaceOnUse&quot; markerWidth=&quot;11&quot; orient=&quot;auto&quot; refX=&quot;-1&quot; refY=&quot;5&quot; viewBox=&quot;0 0 10 10&quot;&gt;&lt;circle cx=&quot;5&quot; cy=&quot;5&quot; r=&quot;5&quot; class=&quot;arrowMarkerPath&quot; style=&quot;stroke-width:1;stroke-dasharray:1,0&quot;&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id=&quot;m05684195389803295-0_flowchart-v2-circleEnd-margin&quot; class=&quot;marker flowchart-v2&quot; markerHeight=&quot;14&quot; markerUnits=&quot;userSpaceOnUse&quot; markerWidth=&quot;14&quot; orient=&quot;auto&quot; refX=&quot;12.25&quot; refY=&quot;5&quot; viewBox=&quot;0 0 10 10&quot;&gt;&lt;circle cx=&quot;5&quot; cy=&quot;5&quot; r=&quot;5&quot; class=&quot;arrowMarkerPath&quot; style=&quot;stroke-width:0;stroke-dasharray:1,0&quot;&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id=&quot;m05684195389803295-0_flowchart-v2-circleStart-margin&quot; class=&quot;marker flowchart-v2&quot; markerHeight=&quot;14&quot; markerUnits=&quot;userSpaceOnUse&quot; markerWidth=&quot;14&quot; orient=&quot;auto&quot; refX=&quot;-2&quot; refY=&quot;5&quot; viewBox=&quot;0 0 10 10&quot;&gt;&lt;circle cx=&quot;5&quot; cy=&quot;5&quot; r=&quot;5&quot; class=&quot;arrowMarkerPath&quot; style=&quot;stroke-width:0;stroke-dasharray:1,0&quot;&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id=&quot;m05684195389803295-0_flowchart-v2-crossEnd&quot; class=&quot;marker cross flowchart-v2&quot; markerHeight=&quot;11&quot; markerUnits=&quot;userSpaceOnUse&quot; markerWidth=&quot;11&quot; orient=&quot;auto&quot; refX=&quot;12&quot; refY=&quot;5.2&quot; viewBox=&quot;0 0 11 11&quot;&gt;&lt;path d=&quot;m1 1 9 9m0-9-9 9&quot; class=&quot;arrowMarkerPath&quot; style=&quot;stroke-width:2;stroke-dasharray:1,0&quot;&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id=&quot;m05684195389803295-0_flowchart-v2-crossStart&quot; class=&quot;marker cross flowchart-v2&quot; markerHeight=&quot;11&quot; markerUnits=&quot;userSpaceOnUse&quot; markerWidth=&quot;11&quot; orient=&quot;auto&quot; refX=&quot;-1&quot; refY=&quot;5.2&quot; viewBox=&quot;0 0 11 11&quot;&gt;&lt;path d=&quot;m1 1 9 9m0-9-9 9&quot; class=&quot;arrowMarkerPath&quot; style=&quot;stroke-width:2;stroke-dasharray:1,0&quot;&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id=&quot;m05684195389803295-0_flowchart-v2-crossEnd-margin&quot; class=&quot;marker cross flowchart-v2&quot; markerHeight=&quot;12&quot; markerUnits=&quot;userSpaceOnUse&quot; markerWidth=&quot;12&quot; orient=&quot;auto&quot; refX=&quot;17.7&quot; refY=&quot;7.5&quot; viewBox=&quot;0 0 15 15&quot;&gt;&lt;path d=&quot;m1 1 13 13M1 14 14 1&quot; class=&quot;arrowMarkerPath&quot; style=&quot;stroke-width:2.5&quot;&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id=&quot;m05684195389803295-0_flowchart-v2-crossStart-margin&quot; class=&quot;marker cross flowchart-v2&quot; markerHeight=&quot;12&quot; markerUnits=&quot;userSpaceOnUse&quot; markerWidth=&quot;12&quot; orient=&quot;auto&quot; refX=&quot;-3.5&quot; refY=&quot;7.5&quot; viewBox=&quot;0 0 15 15&quot;&gt;&lt;path d=&quot;m1 1 13 13M1 14 14 1&quot; class=&quot;arrowMarkerPath&quot; style=&quot;stroke-width:2.5;stroke-dasharray:1,0&quot;&gt;&lt;/path&gt;&lt;/marker&gt;&lt;g class=&quot;root&quot;&gt;&lt;g class=&quot;edgePaths&quot;&gt;&lt;path id=&quot;m05684195389803295-0-L_pages_gen_0&quot; marker-end=&quot;url(#m05684195389803295-0_flowchart-v2-pointEnd)&quot; d=&quot;M177.84 110v4.167c0 4.166 0 12.5 11.86 20.622s35.58 16.034 47.44 19.99l11.86 3.955&quot; class=&quot;edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link&quot; data-edge=&quot;true&quot; data-et=&quot;edge&quot; data-id=&quot;L_pages_gen_0&quot; data-look=&quot;classic&quot; data-points=&quot;W3sieCI6MTc3LjgzOTg0Mzc1LCJ5IjoxMTB9LHsieCI6MTc3LjgzOTg0Mzc1LCJ5IjoxMzV9LHsieCI6MjUyLjc5NDc3MTYzNDYxNTQsInkiOjE2MH1d&quot;&gt;&lt;/path&gt;&lt;path id=&quot;m05684195389803295-0-L_map_gen_0&quot; marker-end=&quot;url(#m05684195389803295-0_flowchart-v2-pointEnd)&quot; d=&quot;M489.652 110v4.167c0 4.166 0 12.5-11.86 20.622s-35.58 16.034-47.44 19.99l-11.86 3.955&quot; class=&quot;edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link&quot; data-edge=&quot;true&quot; data-et=&quot;edge&quot; data-id=&quot;L_map_gen_0&quot; data-look=&quot;classic&quot; data-points=&quot;W3sieCI6NDg5LjY1MjM0Mzc1LCJ5IjoxMTB9LHsieCI6NDg5LjY1MjM0Mzc1LCJ5IjoxMzV9LHsieCI6NDE0LjY5NzQxNTg2NTM4NDY0LCJ5IjoxNjB9XQ==&quot;&gt;&lt;/path&gt;&lt;path id=&quot;m05684195389803295-0-L_gen_ctx_0&quot; marker-end=&quot;url(#m05684195389803295-0_flowchart-v2-pointEnd)&quot; d=&quot;m246.213 214-13.508 4.167c-13.508 4.166-40.525 12.5-54.033 22.166S165.164 261 165.164 266.5v5.5&quot; class=&quot;edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link&quot; data-edge=&quot;true&quot; data-et=&quot;edge&quot; data-id=&quot;L_gen_ctx_0&quot; data-look=&quot;classic&quot; data-points=&quot;W3sieCI6MjQ2LjIxMzExNTk4NTU3NjksInkiOjIxNH0seyJ4IjoxNjUuMTY0MDYyNSwieSI6MjM5fSx7IngiOjE2NS4xNjQwNjI1LCJ5IjoyNzZ9XQ==&quot;&gt;&lt;/path&gt;&lt;path id=&quot;m05684195389803295-0-L_gen_scope_0&quot; marker-end=&quot;url(#m05684195389803295-0_flowchart-v2-pointEnd)&quot; d=&quot;m421.279 214 13.508 4.167c13.508 4.166 40.525 12.5 54.033 20.166S502.328 253 502.328 256.5v3.5&quot; class=&quot;edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link&quot; data-edge=&quot;true&quot; data-et=&quot;edge&quot; data-id=&quot;L_gen_scope_0&quot; data-look=&quot;classic&quot; data-points=&quot;W3sieCI6NDIxLjI3OTA3MTUxNDQyMzEsInkiOjIxNH0seyJ4Ijo1MDIuMzI4MTI1LCJ5IjoyMzl9LHsieCI6NTAyLjMyODEyNSwieSI6MjY0fV0=&quot;&gt;&lt;/path&gt;&lt;/g&gt;&lt;g class=&quot;edgeLabels&quot;&gt;&lt;g class=&quot;edgeLabel&quot;&gt;&lt;foreignObject width=&quot;0&quot; height=&quot;0&quot; class=&quot;label&quot; data-id=&quot;L_pages_gen_0&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; class=&quot;labelBkg&quot; style=&quot;display:table-cell;white-space:nowrap;line-height:1.5;max-width:200px;text-align:center&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;g class=&quot;edgeLabel&quot;&gt;&lt;foreignObject width=&quot;0&quot; height=&quot;0&quot; class=&quot;label&quot; data-id=&quot;L_map_gen_0&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; class=&quot;labelBkg&quot; style=&quot;display:table-cell;white-space:nowrap;line-height:1.5;max-width:200px;text-align:center&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;g class=&quot;edgeLabel&quot;&gt;&lt;foreignObject width=&quot;0&quot; height=&quot;0&quot; class=&quot;label&quot; data-id=&quot;L_gen_ctx_0&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; class=&quot;labelBkg&quot; style=&quot;display:table-cell;white-space:nowrap;line-height:1.5;max-width:200px;text-align:center&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;g class=&quot;edgeLabel&quot;&gt;&lt;foreignObject width=&quot;0&quot; height=&quot;0&quot; class=&quot;label&quot; data-id=&quot;L_gen_scope_0&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; class=&quot;labelBkg&quot; style=&quot;display:table-cell;white-space:nowrap;line-height:1.5;max-width:200px;text-align:center&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;nodes&quot;&gt;&lt;g id=&quot;m05684195389803295-0-flowchart-pages-0&quot; class=&quot;node default&quot; data-look=&quot;classic&quot; transform=&quot;translate(177.84 59)&quot;&gt;&lt;rect width=&quot;260&quot; height=&quot;102&quot; x=&quot;-130&quot; y=&quot;-51&quot; class=&quot;basic label-container&quot;&gt;&lt;/rect&gt;&lt;g class=&quot;label&quot; transform=&quot;translate(-100 -36)&quot;&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width=&quot;200&quot; height=&quot;72&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display:table;white-space:break-spaces;line-height:1.5;max-width:200px;text-align:center;width:200px&quot;&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;docs/context/{slug}.md&lt;br&gt;canonical term definitions (edit here)&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g id=&quot;m05684195389803295-0-flowchart-map-1&quot; class=&quot;node default&quot; data-look=&quot;classic&quot; transform=&quot;translate(489.652 59)&quot;&gt;&lt;rect width=&quot;263.625&quot; height=&quot;102&quot; x=&quot;-131.813&quot; y=&quot;-51&quot; class=&quot;basic label-container&quot;&gt;&lt;/rect&gt;&lt;g class=&quot;label&quot; transform=&quot;translate(-101.813 -36)&quot;&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width=&quot;203.625&quot; height=&quot;72&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display:table;white-space:break-spaces;line-height:1.5;max-width:200px;text-align:center;width:200px&quot;&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;.kittify/traceability/contextive-map.yaml&lt;br&gt;scope to context mapping&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g id=&quot;m05684195389803295-0-flowchart-gen-2&quot; class=&quot;node default&quot; data-look=&quot;classic&quot; transform=&quot;translate(333.746 187)&quot;&gt;&lt;rect width=&quot;357.047&quot; height=&quot;54&quot; x=&quot;-178.523&quot; y=&quot;-27&quot; class=&quot;basic label-container&quot;&gt;&lt;/rect&gt;&lt;g class=&quot;label&quot; transform=&quot;translate(-148.523 -12)&quot;&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width=&quot;297.047&quot; height=&quot;24&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display:table;white-space:break-spaces;line-height:1.5;max-width:200px;text-align:center;width:200px&quot;&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;scripts/generate_contextive_glossaries.py&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g id=&quot;m05684195389803295-0-flowchart-ctx-3&quot; class=&quot;node default&quot; data-look=&quot;classic&quot; transform=&quot;translate(165.164 315)&quot;&gt;&lt;rect width=&quot;314.328&quot; height=&quot;78&quot; x=&quot;-157.164&quot; y=&quot;-39&quot; class=&quot;basic label-container&quot;&gt;&lt;/rect&gt;&lt;g class=&quot;label&quot; transform=&quot;translate(-127.164 -24)&quot;&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width=&quot;254.328&quot; height=&quot;48&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display:table;white-space:break-spaces;line-height:1.5;max-width:200px;text-align:center;width:200px&quot;&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;src/specify_cli/.contextive/{slug}.yml&lt;br&gt;one per referenced context&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g id=&quot;m05684195389803295-0-flowchart-scope-4&quot; class=&quot;node default&quot; data-look=&quot;classic&quot; transform=&quot;translate(502.328 315)&quot;&gt;&lt;rect width=&quot;260&quot; height=&quot;102&quot; x=&quot;-130&quot; y=&quot;-51&quot; class=&quot;basic label-container&quot;&gt;&lt;/rect&gt;&lt;g class=&quot;label&quot; transform=&quot;translate(-100 -36)&quot;&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width=&quot;200&quot; height=&quot;72&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display:table;white-space:break-spaces;line-height:1.5;max-width:200px;text-align:center;width:200px&quot;&gt;&lt;span class=&quot;nodeLabel&quot;&gt;&lt;p&gt;{scope path}/.contextive.yml&lt;br&gt;imports the scope&apos;s contexts&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;defs&gt;&lt;filter id=&quot;m05684195389803295-0-drop-shadow&quot; width=&quot;130%&quot; height=&quot;130%&quot;&gt;&lt;feDropShadow dx=&quot;4&quot; dy=&quot;4&quot; flood-color=&quot;#000&quot; flood-opacity=&quot;.06&quot; stdDeviation=&quot;0&quot;&gt;&lt;/feDropShadow&gt;&lt;/filter&gt;&lt;/defs&gt;&lt;defs&gt;&lt;filter id=&quot;m05684195389803295-0-drop-shadow-small&quot; width=&quot;150%&quot; height=&quot;150%&quot;&gt;&lt;feDropShadow dx=&quot;2&quot; dy=&quot;2&quot; flood-color=&quot;#000&quot; flood-opacity=&quot;.06&quot; stdDeviation=&quot;0&quot;&gt;&lt;/feDropShadow&gt;&lt;/filter&gt;&lt;/defs&gt;&lt;linearGradient id=&quot;m05684195389803295-0-gradient&quot; x1=&quot;0%&quot; x2=&quot;100%&quot; y1=&quot;0%&quot; y2=&quot;0%&quot; gradientUnits=&quot;objectBoundingBox&quot;&gt;&lt;stop offset=&quot;0%&quot; stop-color=&quot;var(--dk-diagram-node-border)&quot;&gt;&lt;/stop&gt;&lt;stop offset=&quot;100%&quot; stop-color=&quot;hsl(-40.8510638298, 21.038961039%, 74.9019607843%)&quot;&gt;&lt;/stop&gt;&lt;/linearGradient&gt;&lt;/svg&gt;&lt;figcaption class=&quot;dk-diagram__caption&quot; id=&quot;dk-diagram-caption-0&quot;&gt;&lt;span class=&quot;dk-diagram__desc&quot;&gt;The generator reads the canonical term pages in docs/context and the traceability map, then writes one context YAML per referenced context and one scope YAML per mapped package.&lt;/span&gt;&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;In words: the generator reads every context page the map references and the map itself, then writes
one context YAML per referenced context and one scope YAML per mapped package.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Context YAMLs&lt;/strong&gt; (&lt;code dir=&quot;auto&quot;&gt;src/specify_cli/.contextive/&amp;#x3C;slug&gt;.yml&lt;/code&gt;) contain the extracted terms for one
glossary context domain.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scope YAMLs&lt;/strong&gt; (&lt;code dir=&quot;auto&quot;&gt;&amp;#x3C;scope path&gt;/.contextive.yml&lt;/code&gt;, for example &lt;code dir=&quot;auto&quot;&gt;src/glossary/.contextive.yml&lt;/code&gt;) use Contextive &lt;code dir=&quot;auto&quot;&gt;imports:&lt;/code&gt; to pull in only the
contexts relevant to that package. This keeps files small and avoids copying definitions.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The mapping from source package → relevant contexts is in
&lt;code dir=&quot;auto&quot;&gt;.kittify/traceability/contextive-map.yaml&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&quot;running-the-generator&quot;&gt;Running the generator&lt;/h2&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal not-content&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#919F9F;--1:#5F636F&quot;&gt;# Write / update all generated files&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;python&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;scripts/generate_contextive_glossaries.py&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;generate&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#919F9F;--1:#5F636F&quot;&gt;# Check that generated files are up-to-date (exits 1 if stale)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;python&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;scripts/generate_contextive_glossaries.py&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;check&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h2 id=&quot;where-the-mapping-lives&quot;&gt;Where the mapping lives&lt;/h2&gt;
&lt;p&gt;&lt;code dir=&quot;auto&quot;&gt;.kittify/traceability/contextive-map.yaml&lt;/code&gt; — single source of truth for what gets generated where.&lt;/p&gt;
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame not-content&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;yaml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#7FDBCA;--1:#111111&quot;&gt;context_base_dir&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#D9F5DD;--1:#111111&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#984E4D&quot;&gt;src/specify_cli/.contextive&lt;/span&gt;&lt;span style=&quot;--0:#D9F5DD;--1:#111111&quot;&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#7FDBCA;--1:#111111&quot;&gt;scopes&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#7FDBCA;--1:#111111&quot;&gt;path&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#D9F5DD;--1:#111111&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#984E4D&quot;&gt;src/glossary&lt;/span&gt;&lt;span style=&quot;--0:#D9F5DD;--1:#111111&quot;&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#7FDBCA;--1:#111111&quot;&gt;description&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#D9F5DD;--1:#111111&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#984E4D&quot;&gt;Core glossary subsystem&lt;/span&gt;&lt;span style=&quot;--0:#D9F5DD;--1:#111111&quot;&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;--0:#7FDBCA;--1:#111111&quot;&gt;contexts&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;lexical&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;system-events&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;h2 id=&quot;adding-a-new-scope-mapping&quot;&gt;Adding a new scope mapping&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Open &lt;code dir=&quot;auto&quot;&gt;.kittify/traceability/contextive-map.yaml&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Add a new entry under &lt;code dir=&quot;auto&quot;&gt;scopes&lt;/code&gt;:
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame not-content&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;yaml&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#7FDBCA;--1:#111111&quot;&gt;path&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#D9F5DD;--1:#111111&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#984E4D&quot;&gt;src/specify_cli/my_new_package&lt;/span&gt;&lt;span style=&quot;--0:#D9F5DD;--1:#111111&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;--0:#919F9F;--1:#5F636F&quot;&gt;# illustrative path&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#7FDBCA;--1:#111111&quot;&gt;description&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--0:#D9F5DD;--1:#111111&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#984E4D&quot;&gt;What this package does&lt;/span&gt;&lt;span style=&quot;--0:#D9F5DD;--1:#111111&quot;&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;--0:#7FDBCA;--1:#111111&quot;&gt;contexts&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span class=&quot;indent&quot;&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;orchestration&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt;     &lt;/span&gt;&lt;span style=&quot;--0:#919F9F;--1:#5F636F&quot;&gt;# choose from docs/context/ filenames (without .md)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;Run the generator:
&lt;div class=&quot;expressive-code&quot;&gt;&lt;figure class=&quot;frame is-terminal not-content&quot;&gt;&lt;figcaption class=&quot;header&quot;&gt;&lt;span class=&quot;title&quot;&gt;&lt;/span&gt;&lt;span class=&quot;sr-only&quot;&gt;Terminal window&lt;/span&gt;&lt;/figcaption&gt;&lt;pre data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;div class=&quot;ec-line&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;span style=&quot;--0:#82AAFF;--1:#3B61B0&quot;&gt;python&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;scripts/generate_contextive_glossaries.py&lt;/span&gt;&lt;span style=&quot;--0:#D6DEEB;--1:#403F53&quot;&gt; &lt;/span&gt;&lt;span style=&quot;--0:#ECC48D;--1:#3B61B0&quot;&gt;generate&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;Commit the updated map together with every file the generator wrote: the new scope &lt;code dir=&quot;auto&quot;&gt;.contextive.yml&lt;/code&gt; and any new context YAML under &lt;code dir=&quot;auto&quot;&gt;src/specify_cli/.contextive/&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;available-context-slugs&quot;&gt;Available context slugs&lt;/h2&gt;
&lt;p&gt;A context slug is a filename (without &lt;code dir=&quot;auto&quot;&gt;.md&lt;/code&gt;) under &lt;code dir=&quot;auto&quot;&gt;docs/context/&lt;/code&gt;. The generator checks only that
the file exists; it extracts terms from a page that has a &lt;code dir=&quot;auto&quot;&gt;## Context:&lt;/code&gt; heading followed by &lt;code dir=&quot;auto&quot;&gt;###&lt;/code&gt;
term entries with a definition table. These pages have that shape today:&lt;/p&gt;


























































































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Slug&lt;/th&gt;&lt;th&gt;Domain&lt;/th&gt;&lt;th&gt;Mapped to a scope today&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;charter&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Charter domain model and artifact taxonomy&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;configuration-project-structure&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Project layout and configuration artifacts&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;dossier&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Artifact inventory and drift detection&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;execution&lt;/code&gt;&lt;/td&gt;&lt;td&gt;CLI invocation and semantic safety gates&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;governance&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Charter, ADR, and policy precedence&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;identity&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Actors, roles, and Human-in-Charge&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;identity-fields&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Repository, collaboration, and build identity fields&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;lexical&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Glossary internal data model&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;orchestration&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Mission, work package, and Mission lifecycle&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;planning-and-tracking&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Issue tracker organization and dispatch&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;practices-principles&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Working agreements&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;product-lines&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Spec Kitty product lines&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;system-events&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Event envelope and glossary evolution&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;technology-foundations&lt;/code&gt;&lt;/td&gt;&lt;td&gt;General tech terms (API, CLI, YAML, Git)&lt;/td&gt;&lt;td&gt;yes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;testing-taxonomy&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Test categories and pytest markers&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;topology&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Mission topology and where work runs&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Only a mapped slug gets a context YAML. The header comment in &lt;code dir=&quot;auto&quot;&gt;contextive-map.yaml&lt;/code&gt; lists 11 slugs;
the map’s &lt;code dir=&quot;auto&quot;&gt;scopes&lt;/code&gt; reference seven.&lt;/p&gt;
&lt;h2 id=&quot;keeping-the-generated-files-current&quot;&gt;Keeping the generated files current&lt;/h2&gt;
&lt;p&gt;No CI workflow runs &lt;code dir=&quot;auto&quot;&gt;check&lt;/code&gt; against the repository today. The tests in
&lt;code dir=&quot;auto&quot;&gt;tests/cross_cutting/encoding/test_contextive_traceability.py&lt;/code&gt; exercise the generator on fixtures
and parse the real context pages; they do not compare the committed files with a fresh generation.
Run &lt;code dir=&quot;auto&quot;&gt;check&lt;/code&gt; yourself after you edit a page under &lt;code dir=&quot;auto&quot;&gt;docs/context/&lt;/code&gt;, and commit the regenerated file
with the page. &lt;code dir=&quot;auto&quot;&gt;check&lt;/code&gt; exits 1 and names each stale or missing file.&lt;/p&gt;
&lt;h2 id=&quot;do-not-edit-generated-files&quot;&gt;Do not edit generated files&lt;/h2&gt;
&lt;p&gt;All files under &lt;code dir=&quot;auto&quot;&gt;src/specify_cli/.contextive/&lt;/code&gt; and any &lt;code dir=&quot;auto&quot;&gt;&amp;#x3C;package&gt;/.contextive.yml&lt;/code&gt; file whose first
line reads &lt;code dir=&quot;auto&quot;&gt;# GENERATED FILE&lt;/code&gt; are machine-generated. Edit the canonical sources instead:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Term definitions → &lt;code dir=&quot;auto&quot;&gt;docs/context/&amp;#x3C;slug&gt;.md&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Scope mapping → &lt;code dir=&quot;auto&quot;&gt;.kittify/traceability/contextive-map.yaml&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;</content>
</entry>
