@floless/app 0.138.1 → 0.139.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/autostart.mjs +6 -2
- package/desktop-access-production-manifest.mjs +7 -0
- package/dist/floless-server.cjs +157133 -70500
- package/dist/schemas/model.continuation.v1.schema.json +19 -0
- package/dist/schemas/model.continuation.v2.schema.json +19 -0
- package/dist/schemas/model.query-response.v1.schema.json +95 -0
- package/dist/schemas/model.query-response.v2.schema.json +80 -0
- package/dist/schemas/model.query.v1.schema.json +87 -0
- package/dist/schemas/model.query.v2.schema.json +87 -0
- package/dist/schemas/model.snap-candidate.v1.schema.json +48 -0
- package/dist/schemas/model.snap-constraint.v1.schema.json +18 -0
- package/dist/schemas/model.snap-query.v1.schema.json +24 -0
- package/dist/schemas/model.snap-result.v1.schema.json +33 -0
- package/dist/schemas/model.snapshot.v1.schema.json +136 -0
- package/dist/schemas/revit.model.v1.schema.json +24 -0
- package/dist/schemas/steel.model.v2.schema.json +45 -6
- package/dist/skills/floless-app-approval/SKILL.md +19 -5
- package/dist/skills/floless-app-bridge/SKILL.md +19 -6
- package/dist/skills/floless-app-knowledge/SKILL.md +22 -1
- package/dist/skills/floless-app-new-workflow/SKILL.md +31 -27
- package/dist/skills/floless-app-new-workflow/references/build-and-verify.md +13 -12
- package/dist/skills/floless-app-onboarding/SKILL.md +3 -3
- package/dist/skills/floless-app-onboarding/references/floless-app-tour.md +16 -9
- package/dist/skills/floless-app-steel-model/SKILL.md +11 -2
- package/dist/skills/floless-app-steel-model/references/detail-from-a-screenshot.md +95 -0
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +146 -21
- package/dist/skills/floless-app-steel-takeoff/references/elevation-registration.md +19 -0
- package/dist/skills/floless-app-tweak-contract/SKILL.md +42 -8
- package/dist/skills/floless-app-vectorize/SKILL.md +19 -6
- package/dist/skills/floless-app-workflows/SKILL.md +30 -3
- package/dist/skills/floless-app-workflows/references/workspace-data.md +77 -4
- package/dist/templates/floless-workspace-model-report.flo +77 -0
- package/dist/templates/revit-model.flo +111 -0
- package/dist/web/app.css +415 -177
- package/dist/web/app.js +302 -51
- package/dist/web/aware.js +1430 -1040
- package/dist/web/chat.css +692 -0
- package/dist/web/chat.js +2651 -0
- package/dist/web/commands-revit.js +42 -0
- package/dist/web/commands-shell.js +536 -70
- package/dist/web/commands-steel.js +344 -146
- package/dist/web/commands.js +1 -1
- package/dist/web/index.html +283 -77
- package/dist/web/instructor.js +217 -36
- package/dist/web/left-pane.js +636 -0
- package/dist/web/model-artifact-loader.js +75 -0
- package/dist/web/model-authoring-gestures.js +141 -0
- package/dist/web/model-cad-tools.js +20 -0
- package/dist/web/model-clip-gesture.js +148 -0
- package/dist/web/model-clip-list.js +156 -0
- package/dist/web/model-clip-session.js +274 -0
- package/dist/web/model-clip-three-overlay.js +295 -0
- package/dist/web/model-clip-three-preview.js +59 -0
- package/dist/web/model-editor-contract.js +519 -0
- package/dist/web/model-editor-revit-adapter.js +139 -0
- package/dist/web/model-editor-shell.js +271 -0
- package/dist/web/model-editor-state-recovery.js +44 -0
- package/dist/web/model-editor-steel-adapter.js +410 -0
- package/dist/web/model-editor.css +268 -0
- package/dist/web/model-frame.js +192 -0
- package/dist/web/model-inspector.js +128 -0
- package/dist/web/model-measure.js +390 -0
- package/dist/web/model-navigation-controls.js +246 -0
- package/dist/web/model-orientation-overlay.js +217 -0
- package/dist/web/model-panel-bridge.js +230 -0
- package/dist/web/model-pointer-dock.js +164 -0
- package/dist/web/model-revit-module.js +83 -0
- package/dist/web/model-selection-coordinator.js +151 -0
- package/dist/web/model-selection-tools.js +290 -0
- package/dist/web/model-snap-contract.js +267 -0
- package/dist/web/model-snapping.js +497 -0
- package/dist/web/model-spatial-panel.js +294 -0
- package/dist/web/model-spatial-tools.js +249 -0
- package/dist/web/model-tree.js +47 -0
- package/dist/web/model-viewport-lighting.js +166 -0
- package/dist/web/model-viewport-revit-adapter.js +1224 -0
- package/dist/web/model-viewport-state.js +505 -0
- package/dist/web/model-viewport-steel-adapter.js +150 -0
- package/dist/web/model-viewport-toolbar.js +516 -0
- package/dist/web/model-viewport.js +717 -0
- package/dist/web/panels.js +8 -15
- package/dist/web/renderers.js +3 -0
- package/dist/web/revit-editor.css +35 -0
- package/dist/web/revit-editor.html +74 -0
- package/dist/web/revit-editor.js +845 -0
- package/dist/web/steel-3d-core.js +16 -44
- package/dist/web/steel-3d-view.js +1384 -633
- package/dist/web/steel-canvas-guidance.js +3 -1
- package/dist/web/steel-editor.html +2121 -1253
- package/dist/web/steel-filter.html +5 -1
- package/dist/web/steel-model-v2-commands.js +72 -1
- package/dist/web/steel-split-view.js +5 -39
- package/dist/web/steel-view-generation.js +107 -17
- package/dist/web/vector-3d.html +12 -0
- package/dist/web/workspaces.js +2190 -277
- package/distribution-profile-active.mjs +2 -0
- package/distribution-profile-production.mjs +47 -0
- package/distribution-profile-shared.mjs +8 -0
- package/distribution-profile.mjs +18 -0
- package/distribution-resource-inventory.mjs +81 -0
- package/launch.mjs +18 -10
- package/log.mjs +2 -1
- package/managed-runtime-policy.mjs +104 -0
- package/model-reader-policy-active.mjs +7 -0
- package/network-policy-active.mjs +6 -0
- package/package.json +17 -2
- package/post-update-marker.mjs +3 -1
- package/rvt-production-uat-authority.mjs +60 -0
- package/teardown.mjs +4 -3
|
@@ -6,16 +6,17 @@ live state. Keep each section short; check in before moving on. If the app isn't
|
|
|
6
6
|
user to start it first.
|
|
7
7
|
|
|
8
8
|
Throughout: floless.app is a **thin UI** — it renders AWARE state and triggers `aware` verbs. It
|
|
9
|
-
never composes workflows or
|
|
9
|
+
never composes workflows or contains an LLM. FloLess AI Chat relays turns through the local server to
|
|
10
|
+
the selected provider runtime; that provider remains the brain.
|
|
10
11
|
|
|
11
12
|
---
|
|
12
13
|
|
|
13
14
|
## B1 · The 3-column window
|
|
14
15
|
|
|
15
16
|
The layout is **header / `chat │ canvas │ inspect` / footer**:
|
|
16
|
-
- **Left —
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
- **Left — AI Chat (~340px):** the conversation for this one project or standalone workflow. It keeps
|
|
18
|
+
dated history, drafts, attachments, loaded provider skills and model/effort/access settings, and
|
|
19
|
+
relays turns to the selected signed-in provider runtime.
|
|
19
20
|
- **Center — canvas:** the open workflow's **topology** — nodes and the edges between them, rendered
|
|
20
21
|
from the `.flo`. Zoom / fit controls; click a node to inspect it; **star ★** a node to save it as a
|
|
21
22
|
reusable Template (B3).
|
|
@@ -25,6 +26,12 @@ The layout is **header / `chat │ canvas │ inspect` / footer**:
|
|
|
25
26
|
|
|
26
27
|
Have the user pick a workflow from the switcher so there's something real on the canvas to tour.
|
|
27
28
|
|
|
29
|
+
Open **Chat settings** and explain its locality statement precisely: project files, chat history,
|
|
30
|
+
attachments and Knowledge stay on this computer; messages, images and relevant file content go to the
|
|
31
|
+
selected provider service for AI processing; connected integrations contact their services. Desktop
|
|
32
|
+
continuation is shown as unavailable unless the exact installed CLI and desktop version has passed the
|
|
33
|
+
complete transfer-and-return proof. Never describe that as an offline or on-device model.
|
|
34
|
+
|
|
28
35
|
---
|
|
29
36
|
|
|
30
37
|
## B2 · The gate (Compile → Approve → Run)
|
|
@@ -123,9 +130,9 @@ user's behalf. When the user wants to *do* something, invoke the matching one:
|
|
|
123
130
|
- **floless-app-bridge** — pick up what the user did in the UI (a queued **Tweak**, a "use this
|
|
124
131
|
Template" request), apply the change to the `.flo`, recompile, and clear the request.
|
|
125
132
|
|
|
126
|
-
All three talk to the same local server (port 4317) and preserve the contract: the UI
|
|
127
|
-
the
|
|
128
|
-
|
|
133
|
+
All three talk to the same local server (port 4317) and preserve the contract: the UI records intent;
|
|
134
|
+
the selected provider AI does the real authoring. The user can continue in FloLess AI Chat or use an
|
|
135
|
+
external terminal, then watch and approve in the browser.
|
|
129
136
|
|
|
130
137
|
---
|
|
131
138
|
|
|
@@ -145,5 +152,5 @@ Edit → recompile → run.
|
|
|
145
152
|
- **Reuse aggressively.** ★ star nodes/commands as **Templates**; **Bake** proven workflows into
|
|
146
153
|
agents; **Graft** your own tools in.
|
|
147
154
|
- **Keep AWARE current (A2).** New releases bring new agents and features.
|
|
148
|
-
- **Remember who's the brain.** Ask the
|
|
149
|
-
run in the browser. The UI is the window, not the engine.
|
|
155
|
+
- **Remember who's the brain.** Ask the selected provider AI to build and change things; watch,
|
|
156
|
+
approve, and run in the browser. The UI is the window, not the engine.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: floless-app-steel-model
|
|
3
3
|
description: The front-door guide for turning a structural steel drawing set into an editable native steel.model/v2 model in floless.app. It orchestrates project setup, set knowledge, AWARE detailer agents, Drawing Filter review, registered plan views, model reading, connection detailing, clash checks, and exports. Use for asks such as "model this steel job from the drawings", "take off this whole set", "start a steel model project", or "/floless-app-steel-model". It is re-runnable and preserves the Filter → Save → read → review → History process end to end.
|
|
4
4
|
metadata:
|
|
5
|
-
version: 0.
|
|
5
|
+
version: 0.13.0
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Steel Model — guide a steel drawing set into an editable model
|
|
@@ -130,7 +130,7 @@ already have one, use it. Record the absolute path for the rest of the run.
|
|
|
130
130
|
Before any geometry, **read** the set — not skim it — in the `reading-structural-drawings` order:
|
|
131
131
|
Pass 0 inventory first (index, legend, notes), then elevations and sections before any plan.
|
|
132
132
|
|
|
133
|
-
What you learn is the **design-set knowledge** record (`set-knowledge/
|
|
133
|
+
What you learn is the **design-set knowledge** record (`set-knowledge/v2`), not loose notes: every
|
|
134
134
|
sheet with its role, the abbreviations, the level datums as drawn, the notes that bind the whole job,
|
|
135
135
|
the schedules and what keys them, cross-references, and the questions the set does not answer. Every
|
|
136
136
|
claim quotes the drawing and the server re-checks the quote; an open question, or a page with nothing
|
|
@@ -140,6 +140,15 @@ stage 6 after **Filter → Save** (which pins the manifest) and **before its fir
|
|
|
140
140
|
(`floless-app-steel-takeoff` → "Build the design-set knowledge first"); the audit and the final
|
|
141
141
|
commit both refuse a read without it. The reading happens HERE; the reader only records it.
|
|
142
142
|
|
|
143
|
+
When an exact referenced detail states a member mark and section designation together, record that
|
|
144
|
+
as a member-size claim with the detail tag, page, region, and the one quoted drawing element carrying
|
|
145
|
+
both values. During the member read, follow the plan marker to that exact detail and apply the stated
|
|
146
|
+
size instead of asking the user again. Record the claim hash and the marker used on the member
|
|
147
|
+
observation. This authority is deliberately narrow: page co-location, an inherited observation, a
|
|
148
|
+
different detail region, a stale request, or a claim that does not leave exactly one member with the
|
|
149
|
+
stated size does not count. Leave the size unresolved in those cases; never use the claim to hide an
|
|
150
|
+
open size question.
|
|
151
|
+
|
|
143
152
|
No legend sheet? `steel-drawing-abbreviations` is the fallback; the set's own legend always overrides.
|
|
144
153
|
|
|
145
154
|
**`company-rules.md`** — **ask whether the firm has company-specific standards.** It is the firm's
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Build a steel detail from a screenshot
|
|
2
|
+
|
|
3
|
+
Use this workflow when a `tweak-contract` request has `intent: "create"` or carries a snapshot marked
|
|
4
|
+
as a drawing detail. The flat image in `detail_placements[]` is a reference placeholder, not fabricated
|
|
5
|
+
steel. Keep it in the model until a real connection has been identified, confirmed, and proven to fit.
|
|
6
|
+
|
|
7
|
+
## 1. Resolve the request honestly
|
|
8
|
+
|
|
9
|
+
- Read the current contract and resolve every captured member, joint, and placed-detail id. Selection
|
|
10
|
+
order is display order only; it does not say which member supports another.
|
|
11
|
+
- If the saved model has moved since the request was sent, resolve the ids again and tell the user what
|
|
12
|
+
changed or disappeared before continuing.
|
|
13
|
+
- Treat a drawing-detail snapshot as design evidence. Treat a model-location snapshot only as a clue to
|
|
14
|
+
where the request applies. Never promote a location image into design evidence.
|
|
15
|
+
- A headless run stops at the first question with `needs-you`. Continue the detailing conversation in
|
|
16
|
+
the preserved terminal session; do not invent an answer merely to finish the run.
|
|
17
|
+
|
|
18
|
+
## 2. Read and locate the drawing detail
|
|
19
|
+
|
|
20
|
+
Read the members, plates, bolts, welds, dimensions, notes, and any detail tag visible in the crop. Then
|
|
21
|
+
look for it in the current drawing set: use the design-set knowledge, the plan callouts and detail cells,
|
|
22
|
+
and the candidate sheets themselves.
|
|
23
|
+
|
|
24
|
+
Present the match using evidence, not a confidence percentage. For example: “This matches 5/S-504:
|
|
25
|
+
four anchors, a 3/4-inch plate, and the 1 1/2-inch grout note. The other base-plate detail on that sheet
|
|
26
|
+
is for W columns and has eight anchors.” Offer clear choices: confirm the match, choose the competing
|
|
27
|
+
detail, say it is not in this set, or skip matching. If the user names a tag, still verify its sheet and
|
|
28
|
+
revision against the current set.
|
|
29
|
+
|
|
30
|
+
## 3. Choose a connection type that really models it
|
|
31
|
+
|
|
32
|
+
Use an existing `base-plate`, `shear-plate`, or `brace-gusset` recipe only when its topology matches the
|
|
33
|
+
drawing: what attaches to what, where it bears, how many plies exist, and which member is cut back.
|
|
34
|
+
|
|
35
|
+
If no available kind models the detail, do not force it into the nearest-looking type and never create a
|
|
36
|
+
`custom` mesh from a screenshot. Keep the flat reference image and record what is missing, use a
|
|
37
|
+
Favourite only when it genuinely models the connection, or offer to raise an RFI.
|
|
38
|
+
|
|
39
|
+
## 4. Confirm which members do what
|
|
40
|
+
|
|
41
|
+
Infer a candidate topology from the model geometry, member roles, and member ends. Then ask one explicit
|
|
42
|
+
mapping question before building, such as: “I read W24×76 member m-14 as the supporting member, with
|
|
43
|
+
m-22 and m-23 framing into it at end0. Is that correct?” Never assign roles from click order.
|
|
44
|
+
|
|
45
|
+
Use the editor's terms in every question: member ids, `end0` or `end1`, and the +n or −n side of the
|
|
46
|
+
member's local frame. Do not say “near” or “far” without naming the viewing or local-axis reference.
|
|
47
|
+
|
|
48
|
+
## 5. Ask only for facts the project does not establish
|
|
49
|
+
|
|
50
|
+
Ask one or two questions at a time. Resolve a schedule row deterministically from the member profile;
|
|
51
|
+
ask about the row only when no row or more than one row matches.
|
|
52
|
+
|
|
53
|
+
For a base plate, establish the column datum, grout thickness, plate size/thickness/orientation, anchor
|
|
54
|
+
diameter/grade/count/layout/hole type/projection/embedment, weld, stiffeners, pedestal, and shear transfer.
|
|
55
|
+
|
|
56
|
+
For a shear or fin plate, establish the supporting member, plate elevation/size/thickness, bolt
|
|
57
|
+
diameter/grade/pitch/rows/edges/hole type, beam setback, erection clearance, skew/slope, cope/access,
|
|
58
|
+
weld, and the side of the supporting web in its local frame.
|
|
59
|
+
|
|
60
|
+
For a brace gusset, establish the work point and plane, brace end cut/setback, plate shape/thickness and
|
|
61
|
+
whether it occurs one side or both, bolt or weld layout, HSS slot or angle orientation, and clearances.
|
|
62
|
+
|
|
63
|
+
Engineering authority is, in order: the detail itself, the set's notes and specification, then
|
|
64
|
+
`company-rules.md`. If none states an engineering value, do not default it from common practice. Offer
|
|
65
|
+
an RFI. The user may direct work to proceed on a named assumption; record that assumption on the
|
|
66
|
+
connection row.
|
|
67
|
+
|
|
68
|
+
## 6. Build a candidate without clobbering existing work
|
|
69
|
+
|
|
70
|
+
Before changing a connection-library row, check whether other member ends or joints use it. Ask whether
|
|
71
|
+
the change should apply to all users of that row or whether a new row should be created. If a target end
|
|
72
|
+
already has a detail or a joint at the same member/end, ask before replacing it.
|
|
73
|
+
|
|
74
|
+
In a private candidate copy, write the connection row, its drawing tag, kind, parameters, size schedule,
|
|
75
|
+
verbatim drawing notes, and crop image. Bind the confirmed member ends and add joints for the confirmed
|
|
76
|
+
members. Do not write the shared document yet.
|
|
77
|
+
|
|
78
|
+
## 7. Prove fit before saving
|
|
79
|
+
|
|
80
|
+
Send the candidate contract to `POST /api/contract/<appId>/scene?project=<project>` and inspect the new
|
|
81
|
+
joints' `fitEvidence` and `diagnostics`. The engine—not the AI—must prove that bearing faces meet with no
|
|
82
|
+
gap or overlap, nothing interpenetrates, bolt grip equals the plies actually clamped, heads and nuts bear
|
|
83
|
+
on real faces, and welds lie on the drawn joint line. Also confirm each placed joint produced its own
|
|
84
|
+
parts and inspect the rendered connection at useful zoom.
|
|
85
|
+
|
|
86
|
+
If the engine reports a problem, give the user the relevant member/end and measured problem as a
|
|
87
|
+
question. Leave the shared contract unchanged and keep the flat reference placeholder. Only after the
|
|
88
|
+
new joints pass should the complete candidate replace the shared contract using the ETag from the latest
|
|
89
|
+
read. If that write is stale, re-read, rebuild the candidate on the new document, and prove it again.
|
|
90
|
+
|
|
91
|
+
## 8. Finish without hiding uncertainty
|
|
92
|
+
|
|
93
|
+
After a successful write, summarize only what was built, where it was placed, which drawing detail it
|
|
94
|
+
uses, and whether the fit checks passed. Do not approve the model. If the user cannot supply a required
|
|
95
|
+
engineering value, hand the question to `floless-app-rfi`; never bury it as a silent assumption.
|
|
@@ -7,7 +7,7 @@ description: >-
|
|
|
7
7
|
two-phase Drawing Filter process: first prepare and save the deterministic Filter, then read only the
|
|
8
8
|
selected evidence into model-global members, registered plan views, observations, and revision history.
|
|
9
9
|
metadata:
|
|
10
|
-
version: 0.
|
|
10
|
+
version: 0.59.7
|
|
11
11
|
---
|
|
12
12
|
|
|
13
13
|
# Steel Takeoff — read drawings into `steel.model/v2`
|
|
@@ -84,6 +84,12 @@ Do not read members before the user saves the Drawing Filter.
|
|
|
84
84
|
1. POST the request's `/steel-manifest` route. The server rehashes every attached PDF, inventories
|
|
85
85
|
every page, and mints the Filter geometry and element identities. If sheet identity is ambiguous,
|
|
86
86
|
inspect only the pages named by `sheet-identification-required` and retry with explicit bindings.
|
|
87
|
+
Each binding's `evidenceKind` is exactly one of `plan`, `elevation`, `section`, `detail`,
|
|
88
|
+
`schedule`, `notes`, `foundation`, or `other`; never invent a value from the drawing title.
|
|
89
|
+
If preparation returns `steel-manifest-preparation-busy`, `steel-manifest-inspection-interrupted`,
|
|
90
|
+
or `steel-manifest-extraction-interrupted`, wait at least `retryAfterMs` and retry this same request.
|
|
91
|
+
The drawings and completed page identification remain attached; never replace or split the set merely
|
|
92
|
+
because a preparation worker exceeded one attempt window.
|
|
87
93
|
Never build, rename, or replace server-owned Filter geometry yourself.
|
|
88
94
|
2. Stop and ask the user to review the Filter in **Drawing Filter** and press **Save filter** in the
|
|
89
95
|
top-right corner.
|
|
@@ -171,8 +177,12 @@ owner's ruling behind this whole design is that the read stays a conversation:
|
|
|
171
177
|
|
|
172
178
|
How to say it:
|
|
173
179
|
|
|
174
|
-
- **Group by kind, and lead with what changes the model most
|
|
175
|
-
|
|
180
|
+
- **Group by kind, and lead with what changes the model most — the briefing has already done it.** The
|
|
181
|
+
order is: steel that is in the model and wrong; then parts of the set nobody read, because steel may
|
|
182
|
+
be missing from the model entirely; then sizes and heights; then connections. So a layer nobody
|
|
183
|
+
classified comes BEFORE a member with no elevation, and an unreviewed sheet before a connection that
|
|
184
|
+
does not fit — an unknown unknown outranks a known one. Earlier wording here had both pairs the other
|
|
185
|
+
way round, which now contradicts the server.
|
|
176
186
|
- **Name things the way a detailer would** — the mark and the sheet (*"the beam at grid C/3 on S-201"*),
|
|
177
187
|
never an element id or a `gapKey`.
|
|
178
188
|
- **Say WHERE it is, from `at`.** Every question carries `at`: the thing it is about, so the user can go
|
|
@@ -190,11 +200,57 @@ How to say it:
|
|
|
190
200
|
`{"where":"filter"}` entry is a Drawing Filter row, for a question about a setting no line carries.
|
|
191
201
|
A question with only a model or filter target is one the drawings never showed: say the set does not
|
|
192
202
|
draw it, rather than pointing at a page it is not on.
|
|
193
|
-
- **
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
203
|
+
- **A COUNT IS NEVER THE ANSWER ON ITS OWN.** An earlier version of this section said two hundred
|
|
204
|
+
unresolved lines were "one sentence with a number, not two hundred bullets", and a read took it at
|
|
205
|
+
its word: it told a user there were *"140 review questions"* and stopped. The user had to ask
|
|
206
|
+
repeatedly before a single sheet was named. Both halves were wrong — the bullets are not the problem
|
|
207
|
+
and the number is not the answer.
|
|
208
|
+
- **The response carries `questionBriefing`**, a response-only sibling of `audit.rfis` the server
|
|
209
|
+
derives for exactly this. It groups the questions, ranks the groups, and gives each one a plain
|
|
210
|
+
category, what not answering it costs, how many QUESTIONS are in it, how many are already filed, and
|
|
211
|
+
a few exact locations. **Relay it; do not re-derive it and do not re-order it** — the ranking is the
|
|
212
|
+
server's, because a model asked to both find the gaps and decide which matter will summarise.
|
|
213
|
+
`affected` counts questions, not members: two unknown endpoints on one member are two, a layer
|
|
214
|
+
question is about no member at all, and calling them members would misreport the size of the job.
|
|
215
|
+
- **The first turn, in this order, before the user asks for any of it:**
|
|
216
|
+
1. the totals by priority — **name each non-zero priority label explicitly, even when its total is
|
|
217
|
+
one**, and include all four bands that have questions, in the server's order: "13 change
|
|
218
|
+
what the model contains, 13 are parts of the set nobody read, 96 are sizes and heights, 18 are
|
|
219
|
+
connections". An earlier example here listed three and silently dropped the unread-coverage band —
|
|
220
|
+
the very one the ranking above promotes to second;
|
|
221
|
+
2. **`groups[0]` in full** — it is already the most urgent, because the server ordered them: state
|
|
222
|
+
its explicit `priority` label, category, what it costs, how many questions, and its named locations
|
|
223
|
+
("S-203, page 7", or the member to select);
|
|
224
|
+
3. state every available route in that group's `routes`, using these plain-English choices exactly:
|
|
225
|
+
**answer now**, **file an RFI**, and/or **proceed on a stated assumption**. Omit only a route the
|
|
226
|
+
server omitted; never leave the choices implicit in a later paragraph;
|
|
227
|
+
4. ask exactly one answerable question about THAT group; do not ask any additional questions in
|
|
228
|
+
this turn.
|
|
229
|
+
There is no separate rule for a read with nothing model-changing in it: whatever `groups[0]` is, that
|
|
230
|
+
is the group you lead with. **A briefing with no groups at all means the read raised no questions —
|
|
231
|
+
say so and move on, rather than manufacturing one.**
|
|
232
|
+
- **Then work group by group.** Take the answer, re-audit, say what moved, and go to the next group.
|
|
233
|
+
`audit.rfisOmitted`, when present, is how many did not fit the report at all — say that number rather
|
|
234
|
+
than implying the list is complete.
|
|
235
|
+
- **Never open with "Should I publish all N as RFIs?"** It is the count-only answer wearing a question
|
|
236
|
+
mark, and it asks the user to dispose of work nobody has described to them yet.
|
|
237
|
+
- **Offer the ways out a group actually HAS — read them off `routes`, do not recite all three.** Each
|
|
238
|
+
still ends with a model: the user gives you the value, you carry it as an RFI, or you proceed on an
|
|
239
|
+
assumption you state. `file-rfi` is withheld in exactly the two cases the rules above already forbid
|
|
240
|
+
filing in, and the briefing has applied both, so following `routes` and following `rfiAnnotations`
|
|
241
|
+
cannot disagree: a group **every one** of whose questions has an `open`, `sent` or `answered` record,
|
|
242
|
+
and — when `rfiAnnotations` came back `ok: false` — every group, because nothing may be filed until
|
|
243
|
+
current RFI state can be checked. A **closed** record withholds nothing; its question returning is a
|
|
244
|
+
recurrence to file as a linked successor, so a group can be filed end to end and still carry
|
|
245
|
+
`file-rfi`.
|
|
246
|
+
- **`alreadyFiled` can be `null`, and null is not zero.** It means the project's RFI file could not be
|
|
247
|
+
read, so the server does not know what is filed — say that rather than implying nothing is.
|
|
248
|
+
- **`exactEvidenceUnavailable` sits on a LOCATION, not on a group, and it means there is no exact area
|
|
249
|
+
to highlight — not that nobody knows where to look.** Every whole-sheet question carries it, an
|
|
250
|
+
`unreviewed-page` one included, because a sheet is not a crop. When the location still names a
|
|
251
|
+
`sheet`, name that sheet as somewhere to look and say the read cannot point at a spot on it — never
|
|
252
|
+
as if it were the exact spot. Only where a location has no sheet, no member, no joint and no Filter
|
|
253
|
+
row say the set does not show where it is.
|
|
198
254
|
|
|
199
255
|
### Carrying one as an RFI — what to actually send
|
|
200
256
|
|
|
@@ -510,6 +566,23 @@ For the first read, the current contract is a schema-valid provisional native mo
|
|
|
510
566
|
registered `plans[]` and the saved `filter` — not a historical version yet. A later read starts from the
|
|
511
567
|
committed model and proposes a candidate; it does not overwrite the working tree.
|
|
512
568
|
|
|
569
|
+
### Helper scripts go in the request's scratch directory, never in the user's project
|
|
570
|
+
|
|
571
|
+
A read often needs a throwaway script — a `.ps1` to probe pages, a `.mjs` to fold counts. **Write every
|
|
572
|
+
one of them in the scratch directory the request instruction names** (`request-work/<requestId>/` under
|
|
573
|
+
the FloLess home). FloLess creates that directory when the drawing set is attached and deletes it when
|
|
574
|
+
the request settles or is discarded, so nothing there needs tidying up afterwards — and nothing you want
|
|
575
|
+
to keep belongs there.
|
|
576
|
+
|
|
577
|
+
**Never write a helper into the project folder or beside the drawings.** That folder is the user's own
|
|
578
|
+
document, not a workspace: a `.ps1` left in it outlives the request that needed it, and the user has no
|
|
579
|
+
way to tell your scratch file apart from something of theirs.
|
|
580
|
+
|
|
581
|
+
If the instruction names **no** scratch directory, use your own temporary location — still never the
|
|
582
|
+
project, and do not go looking for a `request-work` path to create yourself. The server names that
|
|
583
|
+
directory only when it created one and checked it, so its absence means the server deliberately declined
|
|
584
|
+
to send you there.
|
|
585
|
+
|
|
513
586
|
## Read the drawings
|
|
514
587
|
|
|
515
588
|
Use `reading-structural-drawings` for the reading discipline and
|
|
@@ -547,7 +620,7 @@ Sequence, and the order is the point:
|
|
|
547
620
|
2. **Read the set.** Index, abbreviations and legend, general notes, typical details, schedules,
|
|
548
621
|
elevations and sections — then the plans. `reading-structural-drawings` owns this discipline
|
|
549
622
|
(its Pass 0); do not re-derive it.
|
|
550
|
-
3. Compose the `set-knowledge/
|
|
623
|
+
3. Compose the `set-knowledge/v2` artifact and `POST` it to `…/set-knowledge` with
|
|
551
624
|
`{ expectedManifestHash, knowledge }`.
|
|
552
625
|
4. Only then read members.
|
|
553
626
|
|
|
@@ -582,6 +655,16 @@ checks the claims:
|
|
|
582
655
|
The server then checks every member whose mark matches a row against that row, and **asks** when
|
|
583
656
|
they disagree. It never blocks, and it treats a legacy family name and its modern equivalent as the
|
|
584
657
|
same section (`UC305x305x97` and `UKC305x305x97`), so do not "modernise" what the sheet says.
|
|
658
|
+
- **When an exact referenced detail states a member mark and its complete section designation
|
|
659
|
+
together, record a `memberSizeClaims[]` row.** Name the mark, canonical profile, detail tag, detail
|
|
660
|
+
page and full detail-cell region, and cite the one drawing element carrying both the mark and size.
|
|
661
|
+
When the plan member's marker resolves to that exact detail, apply the claimed profile and put
|
|
662
|
+
`{ claimHash, referenceElementId }` in that member observation's `evidence.setKnowledgeClaim`.
|
|
663
|
+
Read `claimHash` from the successful set-knowledge response; do not calculate or invent it.
|
|
664
|
+
`audit.claimReuses` then reports the applied resolution, so tell the user the size came from that
|
|
665
|
+
detail instead of asking the same question again. Page co-location is not enough, and neither is an
|
|
666
|
+
inherited, multi-member, stale, foreign or differently-sized observation. The audit blocks an
|
|
667
|
+
explicit invalid link; without exact authority leave the profile unresolved and keep its question.
|
|
585
668
|
- **A value split across two text spans is normal** — quote it and cite *both* elements. Roughly a
|
|
586
669
|
third of real feet-and-inch values are not in any single span.
|
|
587
670
|
- **A page you found nothing on carries `noneFound` with that page's `candidateShardHash`**, not a
|
|
@@ -638,6 +721,18 @@ non-coincident registration controls:
|
|
|
638
721
|
- `control2_at`: the display point of a second grid intersection;
|
|
639
722
|
- `control2_ref`: that intersection's `{xAxisId, yAxisId}` axis ids.
|
|
640
723
|
|
|
724
|
+
When a later read reports an unregistered or invalid plan, repair the named controls rather than
|
|
725
|
+
discarding the source-local member or its evidence. Check the exact refusal: a missing/invalid
|
|
726
|
+
`datum_at` or `control2_at` needs a finite two-number display point; a missing/invalid `datum_ref` or
|
|
727
|
+
`control2_ref` needs exactly `{ "xAxisId": "<grid axis id>", "yAxisId": "<grid axis id>" }`.
|
|
728
|
+
Both ids must resolve uniquely in the current root grid, the two references must name distinct grid
|
|
729
|
+
intersections, and their world/display spans must still satisfy the sheet scale and orientation proof.
|
|
730
|
+
If an axis is absent, ambiguous, or wrong, repair and publish the root grid first; a registration
|
|
731
|
+
promotion deliberately refuses a candidate that also changes the grid. Then reread the drawing set with
|
|
732
|
+
both affected references naming that published grid and let the review present the whole view registration
|
|
733
|
+
plus every affected source-view member as one decision. Never delete authored registration, lineage,
|
|
734
|
+
observations, or provisional members merely to make validation green.
|
|
735
|
+
|
|
641
736
|
**Prefer the server's proposal where there is one.** The manifest response carries `scaleProposals`,
|
|
642
737
|
one row per plan page: the same fit, computed deterministically over EVERY printed dimension string
|
|
643
738
|
between that sheet's grid bubbles instead of the two runs you would pick by eye. Each row's
|
|
@@ -651,6 +746,34 @@ an `mmPerPx` and a support count, so quote those rather than describing evidence
|
|
|
651
746
|
measurement from the user is a legitimate answer you then author), `fallback-hand-fit` (nothing a user
|
|
652
747
|
could answer would help, so derive it by hand as below and do not ask), `report-defect` (say so).
|
|
653
748
|
|
|
749
|
+
**Any row carrying a `printedNotes` item with status `page-size-unverified` has an unsafe printed
|
|
750
|
+
note, whatever its `outcome.reason`.** Its visible PDF page does not match a recognised paper size,
|
|
751
|
+
so its printed imperial note may describe the original plotted paper rather than the delivered page.
|
|
752
|
+
The producer omits its `mmPerPx` and every note-derived candidate; never recover, show, quote, ask
|
|
753
|
+
the user to choose, or adopt a note-derived number from the row. **Only when
|
|
754
|
+
`outcome.decidedBy === "ask"`** does this become a geometry-calibration question: ask for one known
|
|
755
|
+
printed dimension, measure that dimension's endpoints in the delivered PDF/manifest **point**
|
|
756
|
+
coordinate frame, derive a scale from that geometry, and run a fresh two-control `2 pt` proof. A
|
|
757
|
+
`measured` or `metric-unverified` outcome remains its own dimension-backed authority; do not discard
|
|
758
|
+
it because a note was sanitised. A claimed original paper size is context only: it must never
|
|
759
|
+
calculate or unblock a scale.
|
|
760
|
+
|
|
761
|
+
When the response carries `scaleQuestionBriefing`, require `version: 2` and use that response-only object as the
|
|
762
|
+
authoritative human presentation of every `ask-and-confirm` scale question. Relay its `questions`
|
|
763
|
+
in their exact order and copy each question's `question`, `confirmLabel`, `technicalDetails`, all
|
|
764
|
+
counts, and every evidence `label` and `summary` exactly. Do not re-derive, merge, omit, or
|
|
765
|
+
reorder the questions from `scaleProposals`. Open evidence only through the exact server-issued
|
|
766
|
+
`locations[].openPath`, using that location's `actionLabel` exactly as the Markdown link text; never expose a raw source path, make a `file://` link, or construct an
|
|
767
|
+
evidence route yourself. A location with role `page` is an honest whole-sheet fallback, not an exact
|
|
768
|
+
highlight. A `Winning X dimension chain` or `Winning Y dimension chain` row is the fitter's complete,
|
|
769
|
+
ordered chain membership; the manifest separately rechecks each listed element's page ownership, text kind,
|
|
770
|
+
and normalized magnitude. Relay that producer-owned claim exactly, but never call it
|
|
771
|
+
independent proof or confirmation. `General dimension references` are merely the broader proposal inputs
|
|
772
|
+
and are explicitly not identified as members of a complete winning chain. A truncated producer chain gets
|
|
773
|
+
no winning-chain row. Winning-chain locations are budgeted before general dimensions across the whole
|
|
774
|
+
response; response truncation and producer truncation are different facts and must not be conflated. None
|
|
775
|
+
of these locations makes the scale confirmed.
|
|
776
|
+
|
|
654
777
|
**`bubbleTokenQuestion` is the one thing on a row that `outcome.action` does NOT govern.** It sits
|
|
655
778
|
beside the outcome rather than inside it, and you raise it even on `fallback-hand-fit` — that action
|
|
656
779
|
silences the question about the SCALE, and this is a question about the GRID. It appears when every
|
|
@@ -688,23 +811,25 @@ sheet may go on only where it does not depend on which reading is right, which o
|
|
|
688
811
|
is the open question is usually very little. And confirming a token settles the **grid**, not the
|
|
689
812
|
scale: you still derive `mm_per_px` yourself, and the two-control 2 pt proof is unchanged.
|
|
690
813
|
|
|
691
|
-
**The two `ask-and-confirm` arms
|
|
692
|
-
untrue rather than merely vague.** `printed-unverified`
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
`author`, however
|
|
814
|
+
**The two `ask-and-confirm` arms record different producer conclusions, and saying the wrong one is
|
|
815
|
+
untrue rather than merely vague.** `printed-unverified` records a scale from a printed note without a
|
|
816
|
+
confirmed fit. `metric-unverified` records that the proposal's dimension analysis selected a metric
|
|
817
|
+
value inside the band opened by the sheet's printed `1:N` ratio. These are producer records, not an
|
|
818
|
+
independent geometric proof by the reader or by `scaleQuestionBriefing`; a person still confirms
|
|
819
|
+
because nothing automatic can tell a genuine dimension chain apart from a coincidence assembled out
|
|
820
|
+
of a neighbouring row of dimensions. **A metric sheet never reaches `author`, however strong the
|
|
821
|
+
recorded analysis.**
|
|
698
822
|
|
|
699
823
|
On a `metric-unverified` row, quote `outcome.standard`, `outcome.unit` (whether the sheet's bare
|
|
700
824
|
numbers were read as millimetres or centimetres — real sets use either, and the difference is a factor
|
|
701
825
|
of ten), and `outcome.plottedAtPct` (how far the drawn content sits from that ratio: a real metric
|
|
702
826
|
sheet is often several percent off its own printed scale, and a page can be a reduction of the paper
|
|
703
|
-
it was plotted on).
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
827
|
+
it was plotted on). When no `scaleQuestionBriefing` is present, report whether
|
|
828
|
+
`outcome.chains.x` / `.y` record `anchoredByOverall`, but attribute that flag to the proposal's
|
|
829
|
+
analysis rather than claiming the reader independently proved the geometry; **its recorded absence
|
|
830
|
+
is something to say plainly, not a detail to skip**. Name every `outcome.runnersUp` row as another
|
|
831
|
+
reading recorded by the proposal, never as independently proven support. A metric sheet whose
|
|
832
|
+
readings could not be separated asks instead, carrying
|
|
708
833
|
`outcome.metricCandidates` — those rows each name their unit, and dropping the unit makes the question
|
|
709
834
|
unanswerable.
|
|
710
835
|
An ABSENT `scaleProposals` means the manifest predates the proposer and every scale is yours to derive.
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Registering an elevation or section view
|
|
2
2
|
|
|
3
|
+
## Repair a plan registration without deleting evidence
|
|
4
|
+
|
|
5
|
+
A plan uses the four plan controls, not `sourceRegistration`. When a read names one as missing or
|
|
6
|
+
invalid, repair exactly that control and the grid authority it points to:
|
|
7
|
+
|
|
8
|
+
- `datum_at` and `control2_at` are finite two-number display points;
|
|
9
|
+
- `datum_ref` and `control2_ref` have exactly the shape
|
|
10
|
+
`{ "xAxisId": "<grid axis id>", "yAxisId": "<grid axis id>" }`;
|
|
11
|
+
- every referenced id resolves uniquely in the root grid, and the two references name different
|
|
12
|
+
intersections;
|
|
13
|
+
- the resulting world/display spans still prove the plan's `mm_per_px` and handedness.
|
|
14
|
+
|
|
15
|
+
If the needed axis is missing, duplicated, or incorrectly identified, repair and publish the root grid
|
|
16
|
+
first; a registration promotion deliberately refuses a candidate that also changes the grid. Then reread
|
|
17
|
+
with every affected reference naming that published grid. A successful later read presents registration
|
|
18
|
+
plus all source-view members owned by that plan as one all-or-nothing review row. Never remove authored
|
|
19
|
+
registration, endpoint lineage, observations, or provisional members to silence a validator; that destroys
|
|
20
|
+
the evidence the reread needs to promote the same member ids safely.
|
|
21
|
+
|
|
3
22
|
The plan idiom does not work here, and nothing about it fails loudly enough to notice on its own.
|
|
4
23
|
|
|
5
24
|
A PLAN registers with two control points that name grid intersections: `datum_at` / `datum_ref` and
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: floless-app-tweak-contract
|
|
3
|
-
description: Handle a pending floless tweak-contract request from the Steel Model editor. Use when a user asks the terminal AI to change a member, grid, plan view, connection, or other field in the current steel.model/v2 project contract.
|
|
3
|
+
description: Handle a pending floless tweak-contract request from the Steel Model editor. Use when a user asks the terminal AI a question about selected model items or asks it to change a member, grid, plan view, connection, or other field in the current steel.model/v2 project contract. Resolve typed selections from the current native model, answer queries without writing, or apply only the requested edit with optimistic concurrency and without approving it.
|
|
4
4
|
metadata:
|
|
5
|
-
version: 0.
|
|
5
|
+
version: 0.11.0
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Handle a `tweak-contract` request
|
|
9
9
|
|
|
10
|
-
This verb edits the current native `steel.model/v2` working document.
|
|
11
|
-
|
|
10
|
+
This verb reads or edits the current native `steel.model/v2` working document. A `query` answers from
|
|
11
|
+
the current document without writing; a `modify` applies a requested change. Neither mode reads drawings,
|
|
12
|
+
prepares a Drawing Filter, creates a revision, approves the model, or bakes the workflow.
|
|
12
13
|
|
|
13
14
|
## Loop
|
|
14
15
|
|
|
@@ -20,13 +21,42 @@ prepare a Drawing Filter, create a revision, approve the model, or bake the work
|
|
|
20
21
|
`plans[]` are registered drawing views with observations and presentation refs.
|
|
21
22
|
Before changing project truth, consult `floless-app-knowledge` § "Consulting the KB from other work (the Feed)"
|
|
22
23
|
→ "Required first step" and retain only facts relevant to this request.
|
|
23
|
-
4.
|
|
24
|
+
4. For `query`, answer only what the user asked, in plain English, and stop without PUT, approval, or
|
|
25
|
+
any other model change. One requested fact should normally be one short sentence. Several requested
|
|
26
|
+
facts may use a compact list. Do not volunteer other model facts or expose routes, tools, functions,
|
|
27
|
+
ETags, schemas, provenance, validation steps, request ids, cleanup, execution mode, or changes not
|
|
28
|
+
made unless the user explicitly asks for diagnostics. For `modify` (and durable legacy requests with
|
|
29
|
+
no mode), apply only what the instruction asks.
|
|
30
|
+
Preserve all other data byte-for-byte where practical,
|
|
24
31
|
especially the saved Filter, plan registration, source hashes, observations, views, details, and
|
|
25
32
|
confidential draft state.
|
|
26
|
-
5. PUT the complete contract back to the same project-scoped route with `If-Match: <ETag>` and the
|
|
33
|
+
5. For `modify` only, PUT the complete contract back to the same project-scoped route with `If-Match: <ETag>` and the
|
|
27
34
|
request header required by the server. If the ETag is stale, refetch and reapply the edit; never
|
|
28
35
|
overwrite concurrent work.
|
|
29
|
-
6. Resolve
|
|
36
|
+
6. Resolve a query after answering, or a modification only after its write succeeds. Do not approve or
|
|
37
|
+
mint a History version.
|
|
38
|
+
|
|
39
|
+
## Selection
|
|
40
|
+
|
|
41
|
+
- In a headless read-only run, use only the operation-shaped tools offered by the host to read the
|
|
42
|
+
leased request, this skill, the exact contract, and the selected items' derived properties. Do not
|
|
43
|
+
use shell commands, arbitrary HTTP routes, filesystem tools, or mutation tools. The host binds those
|
|
44
|
+
readers to the leased request's app, project, and captured selection.
|
|
45
|
+
- Treat `target.items[]` as the selection captured when the request was sent, in display order rather
|
|
46
|
+
than as semantic roles. Resolve every `{kind, id}` against the fresh contract GET: member and joint ids
|
|
47
|
+
are model-global; detail ids resolve on `target.sheet`. If an item is missing, stale, or ambiguous, say
|
|
48
|
+
so instead of substituting another object.
|
|
49
|
+
- When `target.baseEtag` differs from the fresh GET's ETag, re-resolve every id and tell the user what
|
|
50
|
+
moved or disappeared before answering or editing.
|
|
51
|
+
- Read authored fields directly from the contract GET. For server-derived member properties, POST
|
|
52
|
+
`/api/contract/<appId>/properties?project=<project>` with `{ "items": target.items }`. Use the
|
|
53
|
+
response's units for requested values; mention provenance only when the user asks for it. Its `etag`
|
|
54
|
+
must equal the contract GET's ETag; if it
|
|
55
|
+
differs, re-GET and retry so authored and derived values never come from different generations.
|
|
56
|
+
Never calculate length, unit weight, or weight yourself.
|
|
57
|
+
- Screenshots are independent evidence. A `reference` image is drawing/design information; a `locator`
|
|
58
|
+
image only shows where the request applies in the model. Missing roles on durable older requests mean
|
|
59
|
+
`locator`. Never silently promote a locator into design evidence.
|
|
30
60
|
|
|
31
61
|
## Field guide
|
|
32
62
|
|
|
@@ -62,7 +92,11 @@ prepare a Drawing Filter, create a revision, approve the model, or bake the work
|
|
|
62
92
|
- **Delete member:** remove or update every real reference to its id. Archive its observations by setting
|
|
63
93
|
binding status to `archived` and memberIds to `[]`; retain immutable evidence for audit.
|
|
64
94
|
- **Connection/detail:** follow the clash and exact-placement discipline in `floless-app-steel-model`.
|
|
65
|
-
|
|
95
|
+
For a create request or any drawing-detail snapshot, first read
|
|
96
|
+
[Build a steel detail from a screenshot](../floless-app-steel-model/references/detail-from-a-screenshot.md).
|
|
97
|
+
Confirm the drawing match and member roles, build in a candidate, and use the scene's fit evidence
|
|
98
|
+
before writing. Measure contact faces, grip, clearances, and intersections; dimensions alone do not
|
|
99
|
+
prove fit.
|
|
66
100
|
|
|
67
101
|
## Guardrails
|
|
68
102
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: floless-app-vectorize
|
|
3
3
|
description: Vectorize a drawing into an editable drawing.vector/v1 contract in floless.app — the "Vectorize" reader. Triggers on a pending floless `rebake` request for the `vectorize` app (queued from its "Re-read & re-bake ▸" button), or asks like "vectorize this PDF", "turn my sketch into clean CAD linework", "read this detail into vectors", "trace this photo", "make this drawing 3D". Teaches the host AI to read a drawing at COMPOSE time — a vector PDF via ONE deterministic PyMuPDF pass (no LLM), a scan/photo/hand sketch by MEASURING its ink with a deterministic OpenCV centerline tracer for geometry plus AWARE's fenced vision.extract for the text (schema-bound, cached) — emit the drawing.vector/v1 contract, PUT it to the contract store, and hand the 2D vector editor to the user; and, for a multi-view set (plan + elevation), to classify views, read datums, and declare entities so the server reconstructs a viewable 3D model.
|
|
4
4
|
metadata:
|
|
5
|
-
version: 0.
|
|
5
|
+
version: 0.8.0
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Vectorize — read a drawing into a drawing.vector/v1 contract
|
|
@@ -57,6 +57,19 @@ prose, skip the lookup and proceed from that path. Resolve the port from the run
|
|
|
57
57
|
floless.app (check `~/.floless/port` or the active server port), as the other floless-app
|
|
58
58
|
skills do.
|
|
59
59
|
|
|
60
|
+
### Keep scratch work out of the user's project
|
|
61
|
+
|
|
62
|
+
Before running an extractor, define `<scratch>`. If the request instruction names a scratch directory,
|
|
63
|
+
use that exact server-created path. If it names no scratch directory, use your own newly-created operating-
|
|
64
|
+
system temporary location outside the project and drawing folders. **Never write a helper into the project
|
|
65
|
+
folder or beside the drawings.** If the instruction names no scratch directory, use your own temporary
|
|
66
|
+
location and do not go looking for a `request-work` path to create yourself: its absence means the server
|
|
67
|
+
deliberately declined to send you there.
|
|
68
|
+
|
|
69
|
+
Every helper, intermediate file, and generated `contract.json` stays under `<scratch>`. The user's project
|
|
70
|
+
is their document, not this reader's workspace. FloLess removes a server-provided request directory when
|
|
71
|
+
the request settles or is discarded; remove an OS-temporary fallback when this read finishes.
|
|
72
|
+
|
|
60
73
|
### 2. Pick the path — vector or raster?
|
|
61
74
|
|
|
62
75
|
Probe the file: a PDF whose pages return `page.get_drawings()` paths is a **vector PDF** →
|
|
@@ -71,7 +84,7 @@ confidence-flagged instead.
|
|
|
71
84
|
Run the bundled extractor (it lives beside this file):
|
|
72
85
|
|
|
73
86
|
```
|
|
74
|
-
python <skill dir>/scripts/extract_pdf.py <drawing.pdf> [more.pdf …] --out contract.json
|
|
87
|
+
python <skill dir>/scripts/extract_pdf.py <drawing.pdf> [more.pdf …] --out <scratch>/contract.json
|
|
75
88
|
```
|
|
76
89
|
|
|
77
90
|
Requires PyMuPDF (`pip install pymupdf`). The script forces UTF-8 on its own output; but any
|
|
@@ -95,8 +108,8 @@ page:
|
|
|
95
108
|
- **Ids** — the PUT schema **requires** per-element ids; the script assigns `e1…` per sheet
|
|
96
109
|
and `s1…` sheets in document order.
|
|
97
110
|
|
|
98
|
-
If the script needs adapting (odd PDF, extra filtering),
|
|
99
|
-
above is the contract. Hard schema requirements the server enforces on PUT: `type`,
|
|
111
|
+
If the script needs adapting (odd PDF, extra filtering), copy it to `<scratch>/extract_pdf.py` and
|
|
112
|
+
patch that scratch copy — the mapping above is the contract. Hard schema requirements the server enforces on PUT: `type`,
|
|
100
113
|
`sheets[].id`, and `sheets[].elements[].{id,kind}` (a missing element id is rejected). Do NOT
|
|
101
114
|
dedupe, snap, or derive layers yourself — the server post-processes every read of this
|
|
102
115
|
contract type.
|
|
@@ -159,10 +172,10 @@ For each raster image (or rasterized PDF page exported to an image):
|
|
|
159
172
|
|
|
160
173
|
```
|
|
161
174
|
python <skill dir>/scripts/vision_to_contract.py <scratch>/vision-out.json <image> \
|
|
162
|
-
--geometry <scratch>/cv.json --out contract.json
|
|
175
|
+
--geometry <scratch>/cv.json --out <scratch>/contract.json
|
|
163
176
|
```
|
|
164
177
|
|
|
165
|
-
For a multi-image set, run steps 1–3 per image and append with `--merge-into contract.json`
|
|
178
|
+
For a multi-image set, run steps 1–3 per image and append with `--merge-into <scratch>/contract.json`
|
|
166
179
|
instead of `--out`. The contract's `source.extractor` records both halves
|
|
167
180
|
(`opencv/centerline+vision.text@<model>`), which is what the editor reads to tell the user
|
|
168
181
|
honestly how the drawing was read.
|