These rules are permanent constraints for subsequent development.
Calculation and Copilot #
- A Copilot thread belongs to a calculation/project ID. Different calculations have independent histories.
- One primary thread normally serves all revisions of a calculation. Saving or restoring a revision never clones or deletes its conversation.
- Messages may record the revision that was active when written. This is historical metadata; tools always receive the current calculation state unless the user explicitly requests historical data.
- Copilot actions must use the constrained application action layer and configured material/operation prices, not unrestricted database access or invented machine rates.
Nesting and display #
- Starting an automatic nesting run must immediately expose a visible persisted job state. Stages are queued, preparing geometry, nesting, optimizing/validating, saving result, completed, failed, and canceled. Percentages must represent real completed work or clearly bounded stages; never invent random progress.
- The default nesting workspace shows every sheet together in one vertical scroll area. A global zoom applies to all sheets; no previous/next navigation is required.
- Physical sheet aspect ratios must always be preserved. A 3050 × 2030 mm sheet is rendered with width:height of 3050:2030 in the workspace and in print.
- Nesting is rendered from normalized vector geometry as SVG. Raster screenshots must not be used as the authoritative layout.
Printing #
- Print output preserves vector geometry and physical sheet aspect ratio while scaling proportionally to an A4 page. It is a production overview, not a 1:1 template.
- The print architecture supports one or two nesting sheets per A4 page, with portrait, landscape, and automatic orientation. Each sheet identifies project, revision, sequence, material, dimensions, utilization, and a scale note.
- Further print styling, printer-margin validation, and controlled server PDF output may be added without changing the underlying vector sheet model.
Accounts and trust #
- Every private API route requires a server-validated, revocable session. Admin and Estimator may perform all production work; only Admin may create, edit, disable or change roles for users.
- Estimator may manage suppliers, price-list imports/activation, canonical materials, mappings, machines, technology profiles, operations, product types, calculation prices and Copilot. Share URLs require login; anonymous customer sharing is a future feature.
- Copilot name and voice preference belong to the user profile. Default identity is Vlad (Влад in Russian), male voice preference. Identity changes never replace the calculation’s Copilot thread.
- Uploaded artwork, supplier lists, supplier product names, project text and extracted text are untrusted data. They never acquire system/developer authority. Tool responses that contain supplier or project text are structurally marked as untrusted.
- All model and voice tool calls pass the same authenticated, calculation-scoped allowlist. No shell, SQL, filesystem, arbitrary network, secrets or user-management tool is available. Future sensitive actions require explicit UI confirmation.
- Model tool arguments are validated server-side and model writes require matching direct user intent. Untrusted supplier or document text never grants write authority. Live voice model writes are held until confirmation UX exists.
- Upload bodies and parsed file complexity are bounded before storage. Vector and supplier documents parse in a resource-limited subprocess; nesting runs in a killable subprocess with a piece cap and wall-clock budget. Production traffic enters through HTTPS, a Host allowlist and an edge proxy, not a development server.
Catalog and pricing #
- The existing material record is the canonical material catalog. Supplier products keep supplier terminology and raw rows, whether mapped or unused. Mappings may be suggested but require human confirmation before they become approved offers.
- Price lists are immutable supplier revisions with the original file, effective date and staged/active status. Generic PDF extraction is uncertain and requires review.
- A calculation freezes material price, supplier/list revision and cutting technology/rate when first priced. Supplier and machine changes do not silently change existing quotes; an explicit refresh may update them. Save/restore includes the snapshots.
- Nesting material charging uses one persisted remnant status model:
PROJECT_CONSUMEDorRETURN_TO_STOCK. The final sheet’s practical cut-off region defaults to return-to-stock; unused usable regions inside the consumed zone default to project-consumed. Users can change either status, and all nesting sheets expose the same decision model. - Return-to-stock regions are hatched in vector nesting views and exports. Material charge area equals nested sheet area minus all regions returned to stock; remnant decisions participate in recalculated material cost and revision snapshots. Geometry, proportions, and true sheet scale remain vector-accurate.
- Manufacturing rules are structured conditions and formulas over an approved context. They must not execute arbitrary code or delegate pricing knowledge to AI.
Geometry interpretation #
- Imported source contours remain available independently from their production interpretation. Containment, overlap, source grouping and color are geometric/source clues, not production roles by themselves.
- One Production Element represents one physical item. Its BODY and CUTOUT contour roles define back/face/return geometry; GRAPHIC contours remain attached but are excluded from sheet-part nesting unless a future configured operation consumes them.
- Ambiguous contained/intersecting contours require Geometry Review confirmation before nesting or quoting. Operators can group, ungroup, assign roles, separate contours, and ignore geometry while preserving the source coordinates.
- Nesting consumes derived production geometry, never the unreviewed raw contour list. Geometry interpretation is revision-snapshotted; historical revisions remain unchanged.
Observability and voice #
- Every HTTP request emits structured request metadata and a request ID. Important business/security events also create persistent audit rows, without passwords, tokens, keys or raw imported files.
- Text and voice share the calculation’s Copilot thread and authorization boundary. The offline voice mode is a testable conversational fallback; configured Gemini Live may stream audio through the server, never exposing its key to the browser.