← Files Computable Systems EngineeringARCHIVED FILE

docs/workbench/composition-walkthrough.html

13.9 KB · Dec 3, 2026 · 18:30 UTC

↓ Download file

See the change to this file →

<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>CSE physical composition — interaction proposal</title>
<style>
@font-face{font-family:"DejaVu Sans";src:url("../../assets/engineering-library/fonts/DejaVuSans.ttf")}@font-face{font-family:"DejaVu Sans";font-weight:700;src:url("../../assets/engineering-library/fonts/DejaVuSans-Bold.ttf")}@font-face{font-family:"DejaVu Sans Mono";src:url("../../assets/engineering-library/fonts/DejaVuSansMono.ttf")}@font-face{font-family:"DejaVu Sans Mono";font-weight:700;src:url("../../assets/engineering-library/fonts/DejaVuSansMono-Bold.ttf")}

*{box-sizing:border-box}body{margin:0;background:#eee;color:#242424;font:16px/1.5 "DejaVu Sans",sans-serif}header,main,footer{max-width:1400px;margin:auto;padding:20px}h1{font-size:24px;margin:0}p{margin:8px 0}nav{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}button{font:inherit;color:inherit;background:white;border:1px solid #777;padding:8px 12px;cursor:pointer}button[aria-current=true]{background:#292929;color:white}button:focus-visible{outline:3px solid #8c5d00;outline-offset:3px}.note{background:#fff6d7;border:1px solid #c7b070;padding:10px}.workspace{border:1px solid #777;background:white}.bar{padding:12px 16px;border-bottom:1px solid #aaa;display:flex;justify-content:space-between;gap:16px}.columns{display:grid;grid-template-columns:210px minmax(400px,1fr) 310px;min-height:420px}.chat,.inspector{padding:18px}.chat{border-right:1px solid #bbb}.inspector{border-left:1px solid #bbb}.canvas{padding:20px;overflow:auto}.graph-viewport{max-width:100%;overflow-x:auto;outline-offset:3px}.canvas svg{min-width:720px;width:720px;height:410px}dt{font-size:13px;color:#555;margin-top:12px}dd{margin:0;font-family:"DejaVu Sans Mono",monospace;overflow-wrap:anywhere}.field{display:block;border:1px solid #777;padding:7px 10px;margin-top:6px;background:#fafafa}.route{padding:14px 18px;border-top:1px solid #aaa;background:#f7f7f7}.gap{border-left:3px solid #555;padding-left:12px}code,pre{font:14px/1.6 "DejaVu Sans Mono",monospace}pre{white-space:pre-wrap;background:white;border:1px solid #aaa;padding:14px}.tag{font-size:12px;text-transform:uppercase;letter-spacing:.06em}.source{display:grid;grid-template-columns:1fr 1fr;gap:16px}footer{font-size:14px}a{color:#174c76}@media(max-width:1000px){.columns{grid-template-columns:1fr}.chat{border:0;border-bottom:1px solid #bbb}.inspector{border:0;border-top:1px solid #bbb}.source{grid-template-columns:1fr}}
</style></head><body>
<header><div class="tag">CSE · physical composition · low-fidelity walkthrough</div><h1>Inspect and rename the same model element through conversation and diagram</h1>
<p class="note">Interaction proposal. Buttons move between example states. This sketch has no project connection and does not save engineering changes.</p>
<nav aria-label="Walkthrough states">
<button data-state="inspect" aria-current="true">1 · Inspect</button><button data-state="preview">2 · Rename preview</button><button data-state="conflict">Conflict branch · Revision conflict</button><button data-state="reopen">Success branch · Reopen in ChatGPT</button><button data-state="unknown">Separate example · Optional role</button>
</nav></header>
<main><p class="note"><strong>Success branch:</strong> Inspect → Pending rename → Apply → Saved → Reopen. <strong>Conflict branch:</strong> Pending rename → Conflict → Compare → Refresh or cancel. Optional role is a separate example.</p><section class="workspace" aria-label="Proposed engineering workspace">
<div class="bar"><strong id="context">Codex · synthetic project · revision 7</strong><span>View: declaration ownership · proposal</span></div>
<div class="columns">
<aside class="chat"><div class="tag">Conversation</div><p id="request">Inspect the selected sensor role.</p><p id="response">The role is owned by Base. Its declared multiplicity is 2.</p><p class="gap">The selection is shared with this conversation. Required review scope is retained separately.</p></aside>
<section class="canvas" aria-label="Composition sketch"><div class="tag">Declaration ownership · proposed projection</div><p>Scroll horizontally to inspect the complete view at reading size.</p>
<div class="graph-viewport" tabindex="0" aria-label="Scrollable declaration ownership diagram"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 720 410" width="720" height="410" role="img" aria-labelledby="diagramTitle" data-kit="engineering-palette-complete-05"><title id="diagramTitle">Declaration ownership: Base owns sensor [2] typed by Sensor</title><defs><rect id="wb-base-frame" x="0" y="0" width="656" height="110" />
    <rect id="wb-role-frame" x="0" y="0" width="656" height="130" />
    </defs><g transform="translate(32 28)" data-component="palette-rectangle-white-plain" data-source-sha256="c17ecc3fbd7b9bb7271ca710517c651de4a2db485d54fb0015b2bdcec7673398" data-model-element="Composition::Base" data-occurrence="PC-base"><use href="#wb-base-frame" fill="#fff" />
    <use href="#wb-base-frame" fill="none" stroke="#000" stroke-width="3" />
    <text x="328" y="35" text-anchor="middle" font-family="DejaVu Sans" font-size="24" font-weight="400" fill="#000000">part def</text><text x="328" y="78" text-anchor="middle" font-family="DejaVu Sans" font-size="28" font-weight="700" fill="#000000">Base</text></g><g transform="translate(32 244)" data-component="palette-rectangle-white-plain" data-source-sha256="c17ecc3fbd7b9bb7271ca710517c651de4a2db485d54fb0015b2bdcec7673398" data-model-element="Composition::Base::sensor" data-occurrence="PC-role"><use href="#wb-role-frame" fill="#fff" />
    <use href="#wb-role-frame" fill="none" stroke="#000" stroke-width="3" />
    <text x="328" y="35" text-anchor="middle" font-family="DejaVu Sans" font-size="24" font-weight="400" fill="#000000">part usage</text><text x="328" y="78" text-anchor="middle" font-family="DejaVu Sans Mono" font-size="24" font-weight="700" fill="#000000" id="roleLabel">sensor [2] : Sensor</text></g><path d="M360 138 V244" fill="none" stroke="#000000" stroke-width="2.5" data-relation="native-declaration-ownership" data-source-element="Composition::Base" data-target-element="Composition::Base::sensor" /></svg></div>
<p>Moving this box changes its placement. <strong>Change owner</strong> is a separate proposed model operation.</p></section>
<aside class="inspector"><div class="tag">Selected engineering element</div><strong id="name">sensor</strong><dl><dt>Declared name</dt><dd class="field" id="nameField">sensor</dd><dt>Candidate name</dt><dd id="candidateName">None</dd><dt>Engineering short ID</dt><dd>SENSOR</dd><dt>Registry identity</dt><dd>Stable element UUID (project registry)</dd><dt>Native declaration owner</dt><dd>Composition::Base</dd><dt>Direct type</dt><dd>Composition::Sensor</dd><dt>Declared multiplicity</dt><dd id="multiplicity">2</dd><dt>Type membership · not selected configuration</dt><dd id="membership">Inherited member of Assembly; selected configuration not evaluated</dd></dl></aside>
</div><div class="route" role="status" aria-live="polite"><strong id="feedback">Selection only; no model change.</strong><p id="next">Next: edit the declared name or ask the agent to rename this exact element.</p></div>
</section>
<section class="source"><div><h2 style="font-size:18px">Proposed source change</h2><pre id="source">part &lt;SENSOR&gt; sensor [2] : Sensor;</pre></div><div><h2 style="font-size:18px">Acceptance obligation</h2><p id="acceptance">PC-INSPECT: diagram, inspector and agent context identify one native role. Ownership and inherited configuration membership remain distinct.</p></div></section>
<p><a href="../../examples/workbench/composition/model.sysml">Synthetic SysML source</a> · <a href="composition-walkthrough.md">Trace, contracts, precedents and open decisions</a></p>
</main><footer>This sketch tests interaction meaning and recovery. The diagram reuses the saved engineering-kit frame, exact neutral swatches and DejaVu fonts. This is a proposed projection, not implemented editor behavior.</footer>
<script>
function setRole(value){
 const label=document.getElementById('roleLabel'),split=value.indexOf(' : ');label.replaceChildren();
 for(const [i,text] of [value.slice(0,split),value.slice(split)].entries()){
  const line=document.createElementNS('http://www.w3.org/2000/svg','tspan');line.setAttribute('x','328');line.setAttribute('dy',i?'34':'0');line.textContent=text;label.appendChild(line);
 }
}
function revealGraph(){const viewport=document.querySelector('.graph-viewport');viewport.scrollLeft=(viewport.scrollWidth-viewport.clientWidth)/2;}
const states={
inspect:{context:'Codex · synthetic project · revision 7',request:'Inspect the selected sensor role.',response:'The role is owned by Base. Its declared multiplicity is 2.',name:'sensor',role:'sensor [2] : Sensor',multiplicity:'2',membership:'Inherited member of Assembly; selected configuration not evaluated',feedback:'Selection only; no model change.',next:'Next: edit the declared name or ask the agent to rename this exact element.',source:'part <SENSOR> sensor [2] : Sensor;',acceptance:'PC-INSPECT: diagram, inspector and agent context identify one native role. Ownership and inherited configuration membership remain distinct.'},
preview:{context:'Codex · synthetic project · revision 7 · candidate pending',request:'Rename this role to detector.',response:'The candidate changes the declared name and resolved references. Short ID SENSOR and the separate registry UUID are retained. This renames the shared Base declaration and affects inherited/redefined consumers. Linked scope bindings require reconciliation.',name:'sensor',role:'sensor [2] : Sensor',multiplicity:'2',membership:'Inherited member of Assembly; selected configuration not evaluated',feedback:'Candidate only. The committed diagram still shows sensor.',next:'Proposed next action: apply the revision-checked rename. A draft edit requires no change of accepted engineering intent.',source:'− part <SENSOR> sensor [2] : Sensor;\n+ part <SENSOR> detector [2] : Sensor;',acceptance:'PC-RENAME: same typed command from inspector and agent; preserve identity, multiplicity, references, comments and unrelated source bytes. The separate local workbench implements and tests this path; actual Codex/ChatGPT journeys remain unverified. This sketch edits no project.'},
conflict:{context:'Codex · conflict branch · current revision 8',request:'Apply the pending rename from revision 7.',response:'Another edit changed this project. The pending rename was not applied.',name:'sensor',role:'sensor [3] : Sensor',multiplicity:'3',membership:'Inherited member of Assembly; selected configuration not evaluated',feedback:'Revision conflict. Current project retained; candidate preserved for comparison.',next:'Proposed recovery: inspect the intervening change, refresh the candidate, then apply against the new revision.',source:'Current: part <SENSOR> sensor [3] : Sensor;\nPending: rename sensor → detector (base revision 7)',acceptance:'PC-CONFLICT: an intervening manual edit cannot be overwritten by the agent; retrying a committed request must return its original receipt. Local Git and browser checks cover stale refusal and exact lost-response retry; actual-host recovery remains unverified. This sketch executes no transaction.'},
reopen:{context:'ChatGPT · success branch · same project · revision 8',request:'Show the component I renamed in Codex.',response:'The saved role is detector. Its engineering ID and native owner are preserved.',name:'detector',role:'detector [2] : Sensor',multiplicity:'2',membership:'Inherited member of Assembly; selected configuration not evaluated',feedback:'Proposed restored state after saving in Codex and restarting compute.',next:'Select this element in ChatGPT and continue through the same command service. Each application keeps its own selection and viewport.',source:'part <SENSOR> detector [2] : Sensor;',acceptance:'PC-REOPEN: save exact SysML, registry and view; terminate compute; open from the other app; independently verify sources, Git history and identities. This actual-host journey is not yet implemented or run.'},
unknown:{context:'Codex · optional-role example · revision 9',request:'Does this selected role establish a present component?',response:'The declared lower bound is zero. With a retained selected-presence obligation, this lower bound yields unknown under the current contract.',name:'sensor',role:'sensor [0..1] : Sensor',multiplicity:'0..1',membership:'Optional declaration; selected presence unresolved',feedback:'Expected unknown presence; no configuration check is executed by this sketch.',next:'Retain the optional role. Resolve the selected configuration through an engineer-directed scope/model revision.',source:'part <SENSOR> sensor [0..1] : Sensor;',acceptance:'PC-OPTIONAL: display exact multiplicity; retain the checker’s unknown result; do not draw an asserted installed instance or silently replace zero with one.'}
};
for(const b of document.querySelectorAll('[data-state]'))b.addEventListener('click',()=>{
 const s=states[b.dataset.state];for(const key of ['context','request','response','name','multiplicity','membership','feedback','next','source','acceptance'])document.getElementById(key).textContent=s[key];
 document.getElementById('candidateName').textContent=['preview','conflict'].includes(b.dataset.state)?'detector (pending)':'None';document.getElementById('nameField').textContent=s.name;setRole(s.role);document.querySelector('[data-occurrence=PC-role]').setAttribute('data-model-element','Composition::Base::'+(b.dataset.state==='reopen'?'detector':'sensor'));document.querySelector('[data-relation=native-declaration-ownership]').setAttribute('data-target-element','Composition::Base::'+(b.dataset.state==='reopen'?'detector':'sensor'));revealGraph();document.getElementById('diagramTitle').textContent='Base owns '+s.role;
 for(const other of document.querySelectorAll('[data-state]'))other.setAttribute('aria-current',String(other===b));
});
setRole(states.inspect.role);document.fonts.ready.then(revealGraph);window.addEventListener('resize',revealGraph);
</script></body></html>

SHA-256: f292cea206dc3cde0183ef364c84b028f5a4c6ecbad10ccb8e1fa01d91ca1a5a