\clearpage \section{Reviewed Shape Plugin Contract}\label{Section:PluginContract} \index{plugin API}\index{shape provider} The November review defines the wider contract. The first native rectangle API is now implemented in Section~\ref{Section:CurrentPlugin}; candidate-choice, updating and creation obligations remain planned. Current host classes remain in Section~\ref{Section:CurrentClassDiagram}. This section adapts the course's linked architecture/component pattern to UML~\cite{OMGUML251}; it does not replace current-code evidence with future classes. \begin{tabularx}{\linewidth}{@{}L{3.1cm}Y@{}} \caption{Plugin Delivery Boundaries\label{Table:PluginDeliveryBoundaries}}\\ \toprule\textbf{Delivery boundary} & \textbf{Meaning}\\\midrule Implemented & Explicit rectangles/lines/default arrows; move, rectangle resize, constraints, cancellation, fitted canvas and guarded source batches; separate rectangle provider for display/selection/move/resize.\\ Next milestone & Shape discovery and host-controlled creation, targeted at 0.2.0-alpha after detailed interaction review.\\ Later implementation & Automatic updates, migrations, adapters, generic transaction/history extensions and integrated compiler/PDF viewing.\\\bottomrule \end{tabularx} \subsection{UML and Diagram Convention}\label{Section:UMLConvention} The author uses applicable UML structure and behavior notation with editable TikZ sources. Orthogonal routing is the project layout convention, not a new UML relationship: horizontal/vertical segments and elbows replace diagonals. Aligned links and sequence messages remain straight. Association, dependency, realization, generalization and ownership retain their standard meanings. Explicit planned labels distinguish future elements; dashed lines retain their relationship meaning. This convention applies to current and planned active views, not historical screenshots or submitted decks. \subsection{Responsibilities and Module Boundary}\label{Section:PluginResponsibilities} \RequirementRef{REQ-A-015} separates \glspl{shapeprovider} from syntax support. The host owns registration, binding/routing and acceptance. Module lifetime management and provider registration are distinct responsibilities; the diagram does not require a single manager to perform both or freeze new C++ classes. The application must retain loaded implementations while dependencies exist. \begin{figure}[ht] \centering \resizebox{\linewidth}{!}{\input{../assets/design-diagrams/plugin-components.tex}} \caption[Reviewed wider plugin component boundaries]{Planned UML component/interface boundary. The rectangle module already exists; wider registration and syntax contracts remain planned. Current deployment is Figure~\ref{Figure:AlphaDeployment}.\label{Figure:PluginComponents}} \end{figure} \clearpage \subsection{Versioned Data and Operation Records}\label{Section:PluginRecords} \RequirementRef{REQ-D-009}--\RequirementRef{REQ-D-017} separate interpreted meaning from source spelling. Records are in memory; saved TikZ remains authoritative. The first rectangle uses two opposite corners in document centimetres. Stroke width is appearance, not another coordinate pair. Other types may document different geometry schemas. Providers borrow inputs for calculation rather than own the document's records. \begin{tabularx}{\linewidth}{@{}L{4.8cm}Y@{}} \caption{Reviewed Plugin Record Sketches\label{Table:PluginRecordSketches}}\\ \toprule\textbf{Record sketch} & \textbf{Reviewed contents}\\\midrule ElementDescription & Document/element identity and revision; family, specific type and schema; typed geometry, appearance and relevant content.\\ ShapeOperationRequest & Operation ID; parameter-schema version; target and initial description; typed parameters and document constraints. Move supplies total displacement; resize supplies corner identity and total displacement.\\ PreparationResult & Prepared change with interpreted changes; Unchanged; or Cannot prepare with reason. This result never means source was applied.\\ SourceBinding & Host/syntax-owned revision-scoped source ranges and rewrite information. The shape API receives no original byte ranges or widgets.\\ PresentationDescription & Drawing/selection geometry, readable description and handle identity/positions. Rectangle API v1 is implemented; additional primitive/handle schemas remain open.\\ \bottomrule \end{tabularx} \begin{figure}[ht] \centering \resizebox{\linewidth}{!}{\input{../assets/design-diagrams/plugin-records.tex}} \caption[Reviewed wider plugin records]{Planned UML data types and preparation outcome enumeration. Attributes describe contracts, not a frozen binary layout.\label{Figure:PluginRecords}} \end{figure} \clearpage \subsection{Provider Interface and Host Operations}\label{Section:ShapeOperations} Common operation IDs \texttt{tkr.move} and \texttt{tkr.resize} belong to the application. Custom operation IDs are qualified by the provider's stable identity; parameter data and \gls{parameterschema} versions are separate. Unknown/invalid schemas cannot be guessed. Availability is the intersection of shape support, syntax/binding support and document context, checked both for controls and at execution (\RequirementRef{REQ-A-017}). The shape calculates proposed geometry under the supplied bounds and its own valid shape rules. Each preview and release uses initial geometry plus total displacement, preserving grab offset and avoiding accumulated drift (\RequirementRef{REQ-A-023}). The host prepares source rewrites, validates the candidate and asks the document to accept. Generic source/history atomicity remains the separately planned transaction contract; the current implementation publishes prepared coordinate batches and session history atomically. \noindent\textbf{Requested rename:} \texttt{tkrShapeProviderRectangle}.\par \noindent\textbf{Actual declaration:} \texttt{tkrRectangleShapeProvider}.\par Vincent reported Professor Darian's suffix convention. The coordinated rename remains pending; Figure~\ref{Figure:CurrentProviderClasses} follows source. No class, DLL or plugin identity is renamed here. \begin{figure}[ht] \centering \resizebox{\linewidth}{!}{\input{../assets/design-diagrams/plugin-classes.tex}} \caption[Planned provider interface extensions]{Wider planned UML interface realization and host collaboration; implemented API v1 is in Figure~\ref{Figure:CurrentProviderClasses}. Operation names and class names are sketches; current classes are not silently replaced. Strategy delegates shape behavior; an internal Abstract Factory is optional. \label{Figure:PluginClasses}} \end{figure} \clearpage \begin{figure}[ht] \centering \resizebox{\linewidth}{!}{\input{../assets/design-diagrams/plugin-sequence.tex}} \caption[Planned generic provider interaction]{Planned shape preparation and host acceptance sequence. Applied is a host outcome; it is never a provider's preparation result. \label{Figure:PluginSequence}} \end{figure} Cancellation discards temporary geometry; selection and Unchanged create no accepted edit. Cannot prepare and later host rejection preserve authoritative source. Prepared changes may still fail stale-revision, source-binding or candidate checks. Later history behavior follows Figure~\ref{Figure:TransactionSequence}, not an implemented undo stack. \clearpage \subsection{Planned MVC Allocation}\label{Section:PluginMVC} Current allocation remains Figure~\ref{Figure:MVCAllocation}. The planned extension keeps presentation and input in View, coordination in Controller, accepted source in Model, and shape/syntax calculation in services/providers. Owning a service does not turn the controller into its implementation. The current fixed-candidate store is scene-owned. The reviewed window-owned shared store/catalogue and sidebar are planned in Section~\ref{Section:SidebarOwnership}; wider registry and update wiring also remain planned. No additional persistent document owner is introduced. \begin{figure}[ht] \centering \resizebox{\linewidth}{!}{\input{../assets/design-diagrams/plugin-mvc.tex}} \caption[Reviewed provider MVC allocation]{Wider planned UML provider allocation; the implemented fixed-candidate rectangle route appears in Figure~\ref{Figure:MVCAllocation}. Palette, creation and updater interfaces remain later work.\label{Figure:PluginMVC}} \end{figure} \clearpage \subsection{Registration, Compatibility and Lifetime}\label{Section:PluginLifecycle} \UseCaseRef{UC-007} covers explicit provider choice; \UseCaseRef{UC-008} covers updates. Registration metadata and runtime identity follow \RequirementRef{REQ-A-019} and \RequirementRef{REQ-D-016}. Different providers for one family may coexist. Duplicate stable IDs require candidate choice; neither discovery order nor a changed default replaces an element's established \gls{sourcebinding} or shape-provider binding. Compatibility checks API, interpreted data and used capabilities. A new release must support old data or a defined validated conversion without dropping content; otherwise keep the prior version. Reopening may reconstruct compatible records from source, but is not evidence that an arbitrary conversion is possible. Adapters and migration algorithms remain future work. \begin{figure}[ht] \centering \resizebox{\linewidth}{!}{\input{../assets/design-diagrams/plugin-lifecycle.tex}} \caption[Planned provider lifecycle]{Planned UML lifecycle activity with guarded activation and separate update staging. Distribution/recovery mechanisms remain open. \label{Figure:PluginLifecycle}} \end{figure} \clearpage \subsection{Later Palette, Creation and Compiled Fallback} \RequirementRef{REQ-F-033}, \RequirementRef{REQ-F-034} and \RequirementRef{REQ-I-015} record discovery and creation as later product scope, not prerequisites of extraction. A collapsible Shapes panel must keep its reopen control available and distinguish provider alternatives. Browsing changes no source and selecting an entry does not replace an existing element's provider. Creation needs a shape-supported proposal and a syntax-supported insertion; host validation/document acceptance precede new element identity. Click/drag placement, one-placement completion and sidebar roles are reviewed in Section~\ref{Section:SidebarDesign}; New/Save As, insertion contexts and exact API mechanisms remain unresolved. Missing provider support preserves source and explains unavailable edits. \RequirementRef{REQ-I-017} permits a future successful read-only compiled view, provided LaTeX dependencies exist and its source revision/stale status is clear. PDF visibility does not restore graphical editing. Unknown syntax still rejects the current interpretation as a whole; no partial-editing implementation is claimed by these future requirements. \subsection{First Extraction and Evidence Gate}\label{Section:PluginIncrement} \RequirementRef{REQ-A-018}, \TestCaseRef{TC-061} and \VerificationRef{VER-074} define the implemented bounded delivery in Section~\ref{Section:CurrentPlugin}. Retain the explicit parser, coordinate mapping, exact source replacement and document acceptance. Move rectangle drawing, selection/handle descriptions and move/resize calculation behind the shape API; keep lines/arrows working through their existing route. Verify actual module delegation, no hidden built-in rectangle fallback, missing and incompatible module diagnostics, geometry parity, crossing/minima/bounds, cancellation, source bytes and save/reopen. Executed rectangle checks are in Section~\ref{Section:RectanglePluginCheck}; broader provider scenarios remain planned. Use a separate development package. The frozen \texttt{0.10.3} package and edited examples remain untouched. The rectangle extraction baseline is \texttt{0.1.2-alpha}, with hash-free folder/title and About identity per \RequirementRef{REQ-DEV-006}--\RequirementRef{REQ-DEV-008}. The later \texttt{0.2.0-alpha} milestone is shape discovery and creation. Future ABI, registry and presentation-extension mechanisms remain open; reviewed placement and sidebar ownership appear in Section~\ref{Section:SidebarDesign}.