@floless/app 0.84.0 → 0.86.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/dist/floless-server.cjs +2180 -791
- package/dist/schemas/steel.takeoff.v1.schema.json +34 -4
- package/dist/skills/floless-app-knowledge/SKILL.md +206 -0
- package/dist/skills/floless-app-knowledge/references/schema.md +132 -0
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +380 -28
- package/dist/skills/floless-app-workflows/SKILL.md +33 -7
- package/dist/skills/floless-app-workflows/references/dev-server-and-run-trace.md +2 -1
- package/dist/skills/floless-app-workflows/references/exec-contract.md +1 -1
- package/dist/skills/floless-app-workflows/references/workspace-data.md +111 -0
- package/dist/skills/reading-structural-drawings/SKILL.md +102 -1
- package/dist/skills/steel-drawing-abbreviations/SKILL.md +33 -1
- package/dist/templates/floless-workspace-read.flo +161 -0
- package/dist/templates/steel-model.flo +6 -0
- package/dist/templates/vectorize.flo +6 -0
- package/dist/web/analytics.js +31 -0
- package/dist/web/app.css +330 -15
- package/dist/web/aware.js +488 -54
- package/dist/web/grid-core.js +40 -6
- package/dist/web/index.html +60 -11
- package/dist/web/steel-3d-view.js +117 -20
- package/dist/web/steel-editor.html +1424 -294
- package/dist/web/steel-filter.html +3 -1
- package/dist/web/vector-3d.html +3 -3
- package/dist/web/vector-editor.html +41 -12
- package/dist/web/workspaces.js +1307 -78
- package/package.json +1 -1
|
@@ -2,11 +2,158 @@
|
|
|
2
2
|
name: floless-app-steel-takeoff
|
|
3
3
|
description: Read a structural steel drawing into an editable steel.takeoff/v1 contract in floless.app — the "Steel Takeoff" reader. Triggers on a pending floless `rebake` request for the `steel-model` app (queued from its "Re-read & re-bake ▸" button), or asks like "read this framing plan into a takeoff", "turn this structural drawing into a takeoff", "bake my drawing into steel-model", "extract members from this PDF". Teaches the host AI to READ a steel drawing (PDF/image) with its own vision at COMPOSE time, build a steel.takeoff/v1 contract (members + profiles + elevations + weights from AISC lookup), write it to the contract store, and hand control to the editor — no model in the run path, no API key.
|
|
4
4
|
metadata:
|
|
5
|
-
version: 0.
|
|
5
|
+
version: 0.9.1
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Steel Takeoff — read a drawing into a steel.takeoff/v1 contract
|
|
9
9
|
|
|
10
|
+
## 0. Deterministic-first — extract geometry, NEVER invent it (READ THIS FIRST)
|
|
11
|
+
|
|
12
|
+
The drawing's **vector linework is ground truth.** Phase 1 (the Steel Filter / PyMuPDF pass) must
|
|
13
|
+
extract **all geometry deterministically**; Phase 2 (your vision) only **binds text labels**
|
|
14
|
+
(profiles, marks, callout numbers, TOS) to that geometry — it never *places* geometry. Hard rules,
|
|
15
|
+
each learned from a real failure:
|
|
16
|
+
|
|
17
|
+
- **NEVER hand-place or fabricate a member/column/grid.** If you are typing coordinates you made up
|
|
18
|
+
(or "reasonable" positions like beam-endpoint clusters), STOP — that is invention. Every member,
|
|
19
|
+
column, grid line, and callout comes from the linework. Inventing geometry is the #1 sin here.
|
|
20
|
+
- **Grids FIRST — they are the common frame.** Extract the grid before anything else; every member,
|
|
21
|
+
column, and callout registers to it (and it is why columns stack across stories). **Reuse the real
|
|
22
|
+
detector `web/grid-core.js` `gridFromDrawing`** — do NOT reimplement grid detection (a naive
|
|
23
|
+
re-port produces sign-flipped spacings and spurious bays; the real detector anchors to bubble
|
|
24
|
+
clusters, rejects impostor lines, and even reads printed labels). Run it over the grid-layer lines
|
|
25
|
+
+ bubbles (`*S-ANNO-GRID*`).
|
|
26
|
+
- **Columns are extracted, as sections, from the column linework** — match **EVERY `S-COLS*` layer, on
|
|
27
|
+
EVERY xref**, not just `S-COLS-STEL` on the shared grid xref. (Matching only
|
|
28
|
+
`…-grids|S-COLS-STEL` misses real columns — the seismic-joint "(N) COL ABOVE" pairs live on the
|
|
29
|
+
per-floor-plan `…Framing Plan|S-COLS-STEL`, and a partial-height post on a separate "not-to-roof" column layer.
|
|
30
|
+
Cluster by the `S-COLS` prefix across all layer/xref names.) The shared-grid-xref columns stack across
|
|
31
|
+
stories; the per-floor ones are floor-specific (off-grid posts, seismic-joint doubles, hangers). Cluster
|
|
32
|
+
the section segments into footprints (evidence-gate against leaders/tags: compact closed section,
|
|
33
|
+
balanced H/V segments, ~6–40px; HSS boxes are ~4–9 segs, so gate on ≥4 not ≥6). Read the profile tag
|
|
34
|
+
next to each (`HSS6X6X3/8`, `(N) COL ABOVE` → size per schedule → RFI). **A column needs a `section`
|
|
35
|
+
(traced `{w,d}`) or a resolved `profile` to render at all** — one with neither is DROPPED from the 3D
|
|
36
|
+
scene. Give every extracted column its traced section so it is visible even before its profile is read.
|
|
37
|
+
- **The traced `section` is in MILLIMETRES and is only a placeholder for BEFORE the profile resolves —
|
|
38
|
+
once a real profile is set, drop it (or match it to the profile), never ship a mis-scaled trace.** The
|
|
39
|
+
scene builder now lets a resolved standard profile WIN over the section (so a bad trace no longer
|
|
40
|
+
renders), but a member with NO resolvable profile renders straight from its `section`, so a wrong-scale
|
|
41
|
+
trace there = a wrong-size member. Trace footprints in mm (px → mm via `pt_per_ft`, like member coords),
|
|
42
|
+
and sanity-check: an HSS6X6 is ~152 mm, a W14 ~356 mm — a `{3.3,3.3}` section is display-pixel units
|
|
43
|
+
(~46× too small) and renders a hairline (it's in display-pixel units, not mm). If the column has a resolved profile,
|
|
44
|
+
prefer emitting NO `section` (let the profile drive the exact dims) over a hand-traced approximation.
|
|
45
|
+
- **Callouts/sections/details are extracted, deterministically, from the annotation layers**
|
|
46
|
+
(`*S-ANNO-SECT*`, elevation/detail layers) → `plan.callouts[]` marker positions. Their numbers +
|
|
47
|
+
target sheets are outlined text → Phase-2 vision. (Callout `target` is REQUIRED — emit `target:{}`
|
|
48
|
+
until vision fills `sheet`/`number`.)
|
|
49
|
+
- **RFI is a LAST RESORT, not a shortcut — READ THE WHOLE SET FIRST.** The drawing SET is the source of
|
|
50
|
+
truth; a value missing from *one* sheet is NOT an RFI. Before you RFI anything you MUST exhaust the
|
|
51
|
+
set for it:
|
|
52
|
+
- **Column profile — the FOUNDATION / FIRST-FLOOR plan is the #1 place, ALWAYS double-check it.** An
|
|
53
|
+
upper framing plan usually does NOT size its columns, but the **foundation plan (and/or the first /
|
|
54
|
+
ground-floor framing plan) almost always does** — as a **COLUMN SCHEDULE** (a table keyed by column
|
|
55
|
+
mark / grid) or as **per-column size tags at each base**. That sheet is the biggest candidate; make
|
|
56
|
+
reading it for column sizes a REQUIRED step, not an afterthought. (Designers occasionally put the
|
|
57
|
+
schedule elsewhere — a general/schedule sheet, or sections/details through the column, or a general
|
|
58
|
+
note like "ALL COLS HSS6×6×3/8 UON" — so if the foundation plan doesn't have it, keep looking there.)
|
|
59
|
+
Match each plan column to its size by **grid mark** (+ story). Only when the size is genuinely
|
|
60
|
+
nowhere in the entire set — foundation plan checked FIRST — does the column stay `rfi:true`.
|
|
61
|
+
- **Column ROTATION (`rot`) is MANDATORY — and derive it from the FLANGE-SEGMENT INK, not the bounding
|
|
62
|
+
box.** A column has a weak and a strong axis; which way it faces is structural, not cosmetic. Render
|
|
63
|
+
convention: `rot:0` = flanges horizontal / depth (strong axis) vertical; `rot:90` = flanges vertical.
|
|
64
|
+
**The bbox aspect is NOISE for heavy near-square sections** (bf≈d on a heavy wide-flange, so h-vs-w
|
|
65
|
+
is a coin-flip) — so the aspect misclassifies it. Instead, sum the cluster's
|
|
66
|
+
near-horizontal segment length vs near-vertical: the **flanges carry ≈2× the ink of the web**, so
|
|
67
|
+
the axis with more ink IS the flange axis → `rot:0` if horizontal-ink dominates, else `rot:90`.
|
|
68
|
+
Use the **bbox aspect only as a tie-breaker when clearly elongated** (aspect ≳1.3) — there a beam
|
|
69
|
+
line crossing the cluster can contaminate the ink count, and the elongation is unambiguous. HSS/pipe
|
|
70
|
+
are symmetric → `rot` doesn't matter. Verify a sample against the drawing (draw the chosen flange axis
|
|
71
|
+
over the footprint crop and confirm it lies along the drawn flanges). For skewed / special columns the
|
|
72
|
+
user can dial the exact angle in the Inspect → **Rotation** control (any double, normalised −360…360).
|
|
73
|
+
Do NOT default every column to `rot:0` without looking. Cross-check against the grid + frame elevations.
|
|
74
|
+
- **Height (`bos`/`tos`) — ONE continuous member per COLUMN, read its extent from the FRAME ELEVATIONS,
|
|
75
|
+
not one member per framing plan.** A steel column is a SINGLE member for its full vertical run. Read its
|
|
76
|
+
true bottom and top from the **frame-elevation sheets / column schedule** — never infer the extent by
|
|
77
|
+
splitting the column per plan. A column is normally **continuous through the intermediate floors**: the
|
|
78
|
+
framing beams FRAME INTO it, they do not break it, so the frame elevation draws one unbroken column line
|
|
79
|
+
through every level. Therefore the same column shown on more than one framing plan (a floor plan AND the
|
|
80
|
+
roof plan) is the **SAME member** — create it **ONCE**, spanning its real base→top, never one copy per
|
|
81
|
+
plan. Duplicating it per plan makes overlapping members that telescope through each other and
|
|
82
|
+
**double-count weight in the BOM**. Read each column's SIZE from the elevation per grid **intersection**
|
|
83
|
+
(it can differ bay to bay, and change up the height only where the elevation shows a splice — then it is
|
|
84
|
+
one member per splice-to-splice run, still never one-per-floor). A foundation-plan mark with `bos==tos`
|
|
85
|
+
is a **base plate / anchor point** (zero-height → the scene skips it; it is NOT the column). The scene
|
|
86
|
+
**carries `rot` for ALL members**. RFI a column's extent only if no elevation or level datum ties its ends.
|
|
87
|
+
- Same for `MF`/`BF`, materials, connection details — resolve from the set, RFI only after a real search.
|
|
88
|
+
- **Never fabricate** a value to avoid an RFI, and **never RFI to avoid reading another sheet.** Both
|
|
89
|
+
are the same sin (a shortcut on the source of truth). A confident wrong number and a lazy RFI are
|
|
90
|
+
both failures; the honest path is: read the whole set, resolve what the set shows, RFI only the true
|
|
91
|
+
unknowns — and say which sheet each answer came from.
|
|
92
|
+
- **`MF`/`BF` resolve specific-first:** local/elevation callout → frame schedule keyed by mark+grid+
|
|
93
|
+
level → general notes/UON default. Notes only set semantics/defaults; keep `mf:true` until resolved.
|
|
94
|
+
- **READ THE SECTIONS + FRAME ELEVATIONS — they carry members and sizes the plan doesn't.** A plan
|
|
95
|
+
member marked only `MF` (or `BF`) is NOT resolved until you read the **frame elevation** it belongs to
|
|
96
|
+
(that sheet sizes the moment/braced-frame beams AND columns by grid + level). And a **roof / sloped /
|
|
97
|
+
stepped** area is often framed in **SECTION**, not fully in plan — beams you can't find on the roof
|
|
98
|
+
framing plan are in the building sections and frame elevations. **Never leave `MF`/`BF` beams
|
|
99
|
+
unsized, and never present a roof as "missing beams" without opening every section and frame
|
|
100
|
+
elevation that cuts it.** Cross-check the section/elevation member count against the plan; a bare `MF`
|
|
101
|
+
mark or a suspiciously empty roof means a section is still unread — go read it.
|
|
102
|
+
- **Not every line the filter grabs is a gravity beam — but the LAYER NAME is a hypothesis, not a fact.**
|
|
103
|
+
The Steel Filter pulls ALL linework into `members`. Layer naming is a per-firm CAD-template choice, so
|
|
104
|
+
**census each candidate layer before you classify it**, and treat the legend as authoritative:
|
|
105
|
+
- **Census, then decide.** For each layer, count how many of its elements are *member-scale strokes*
|
|
106
|
+
versus *tiny end-glyph fills*. A layer that is nothing but long strokes and their arrowheads holds
|
|
107
|
+
**members**, whatever its name implied. A layer that is overwhelmingly small fills sitting **on**
|
|
108
|
+
other members holds **annotation**. Under the US NCS naming most sets follow, the beam layer
|
|
109
|
+
(`*BEAM*`) and the bracing layer (`*BRAC*`) carry members while `*ANNO*` layers carry the symbols —
|
|
110
|
+
use that as the *starting hypothesis*, never as the answer.
|
|
111
|
+
- **NEVER drop a layer you have not censused.** Dropping a member layer deletes every member on it,
|
|
112
|
+
silently, and nothing downstream will notice. If a layer is dropped, say which and why.
|
|
113
|
+
- **The legend defines the glyphs; this file does not.** A plan's PLAN NOTES block declares what each
|
|
114
|
+
line symbol means — which end-glyph marks a moment connection, a braced-frame connection, a drag
|
|
115
|
+
connection, a stiffener, a deck span, a lateral brace. **These differ between firms.** Read the
|
|
116
|
+
legend of the set in hand and bind each symbol to what it declares. A symbol drawn as its own line
|
|
117
|
+
*between* two members is typically a member (a kicker/brace); a mark drawn *on* an existing member is
|
|
118
|
+
typically annotation — corroborate both readings against the layer, the geometry and the legend
|
|
119
|
+
before committing.
|
|
120
|
+
- **Suffixed variants of a member layer usually mean scope, not kind** (existing, hidden/below,
|
|
121
|
+
demolished). Confirm from the legend / line style, then treat them per the `(E)`/`(N)` scope rule —
|
|
122
|
+
do not silently model them, and do not silently discard them either: record the decision.
|
|
123
|
+
- **Never size a brace from an adjacent beam's W-label.** Assigning the nearest W-size is fabrication,
|
|
124
|
+
and it renders a phantom member in 3D. A lateral brace's size comes from the detail the legend names
|
|
125
|
+
(a `n/S-5xx` typical-detail reference); when it does not resolve there, emit `rfi:true` with `profile:""` and carry the
|
|
126
|
+
reference in `ends[].detail`.
|
|
127
|
+
- **A brace is `role:'beam'` + `memberType:'brace'` — NEVER `role:'brace'`.** The schema's `role` enum
|
|
128
|
+
is `beam|column` and rejects `brace`, so the whole contract fails to PUT. See §2b **Braces**.
|
|
129
|
+
- **`MF`/`BF` on a REAL (`S-BEAM-STEL`) beam = the extractor grabbed the mark, not the size — read the
|
|
130
|
+
W-size, which sits ON or directly ABOVE the beam line** (the mark is a separate note beside it; per-beam
|
|
131
|
+
zoom when they overlap). If the beam truly carries no W-size on the plan (only `MF`/`BF`), its size is
|
|
132
|
+
**section-defined** — roof MF girder → the `n/S-3xx` frame-elevation bubble drawn on it; braced-frame
|
|
133
|
+
beam → the brace-frame detail (e.g. `n/S-3xx`, `n/S-8xx`). Flag it RFI **with that section reference**;
|
|
134
|
+
never guess between the two adjacent candidate sizes.
|
|
135
|
+
- **Legend / plan-notes glyphs get mis-extracted as members.** The bar inside an "INDICATES BRACED FRAME"
|
|
136
|
+
legend symbol lands on `S-BEAM-STEL` and looks like a 1-ft beam. Reject any "member" sitting in the
|
|
137
|
+
sheet's legend / PLAN NOTES block (the title/side region), not the framing area.
|
|
138
|
+
- **`(E)` = existing (often out of scope), `(N)` = new.** Read the scope note per column/member;
|
|
139
|
+
don't take off existing steel as if it were new.
|
|
140
|
+
- **Coordinates stay DISPLAY space.** There is no "grid-coordinate" storage — `wp`/`disp` are
|
|
141
|
+
display-space (the schema + `contract-to-scene` require it). A column is **one member for its full
|
|
142
|
+
vertical run** (see the Height rule above), not one member per story.
|
|
143
|
+
|
|
144
|
+
## VECTORIZE the overlay — never ship a blurry raster on a vector PDF
|
|
145
|
+
|
|
146
|
+
**When the PDF has vector linework (any `page.get_drawings()` paths — the normal case), the 2D plan
|
|
147
|
+
overlay MUST be the drawing's VECTOR linework, not a rasterized JPEG.** The vectors are already
|
|
148
|
+
enumerated in the `filter` block (`filter.sheets[].elements` `d` paths) — that IS the overlay source,
|
|
149
|
+
and it is crisp, snappable, and measurable. A `raster_b64` JPEG overlay on a vector PDF is a **defect**
|
|
150
|
+
(blurry, and you cannot snap/measure to it). Only fall back to `raster_b64` for a genuinely
|
|
151
|
+
**scanned/raster-only** PDF that exposes no vector paths — and say so explicitly when you do. (Editor
|
|
152
|
+
note: the model overlay renders the vector elements like the Filter view does; a raster is the
|
|
153
|
+
scanned-only fallback.)
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
10
157
|
## What this is
|
|
11
158
|
|
|
12
159
|
`steel-model` is a FloLess app that turns a structural steel drawing into an editable
|
|
@@ -37,7 +184,7 @@ From a `rebake` request: `GET http://localhost:<port>/api/requests` → the entr
|
|
|
37
184
|
`type:"rebake"` and `appId:"steel-model"` carries `snapshots: ["<abs path>", …]` and optionally
|
|
38
185
|
`sourceName` (the original filename of the first file — use it for the `source.name` provenance
|
|
39
186
|
field). **`snapshots` may hold MULTIPLE files** — the user can attach a whole set (e.g. separate
|
|
40
|
-
PDFs for
|
|
187
|
+
PDFs for the Foundation / Floor / Roof plans, or one multi-sheet PDF plus a detail sheet). **Read every file in
|
|
41
188
|
`snapshots[]`, not just the first** — treat them as one combined set: run the sheet index (step 2.1)
|
|
42
189
|
across all of them, and the per-sheet filter pass (1b) and member read span every file. If the user
|
|
43
190
|
just attaches or points at a drawing in prose, skip the lookup and proceed from that path (again,
|
|
@@ -65,13 +212,13 @@ labels to, per sheet.
|
|
|
65
212
|
|
|
66
213
|
**First, pick the plans (confirm gate).** From the sheet index (step 2.1) enumerate the framing-plan
|
|
67
214
|
sheets (Foundation, each Floor, Roof). **Show the user the list and get an explicit OK** —
|
|
68
|
-
"I found these framing plans:
|
|
215
|
+
"I found these framing plans: Foundation, 2nd Floor, Roof — filter all of these?" — before the pass. (The full
|
|
69
216
|
elevation/detail classification is the broader workflow; here we only need the plan set.)
|
|
70
217
|
|
|
71
218
|
⚠️ **This ONE plan-scope confirm covers both the filter pass AND the member read — they run on the
|
|
72
219
|
same sheet set. Getting the OK does NOT mean "go read members"; the very next thing you do is the
|
|
73
220
|
filter pass below, then hand off the Filter node. Do not let the confirm gate double as permission to
|
|
74
|
-
skip the filter** (that collision is exactly how
|
|
221
|
+
skip the filter** (that collision is exactly how the filter gets skipped and members are read with no filter block).
|
|
75
222
|
|
|
76
223
|
Then, for **each** confirmed plan sheet, one pass in display space (`page.rotation_matrix` — never mix
|
|
77
224
|
native/display coords):
|
|
@@ -159,7 +306,7 @@ Follow the methodology condensed here (full detail + every gotcha in
|
|
|
159
306
|
framing bay read together with the orthogonal grid loses its diagonal members (the orthogonal
|
|
160
307
|
pass "swallows" them, and free-hand label positions don't bind to the diagonal lines).
|
|
161
308
|
- **Reliable skew method = bind to the EXACT diagonal geometry, don't free-place.** This is the
|
|
162
|
-
technique that works
|
|
309
|
+
technique that works:
|
|
163
310
|
1. From step 3, take the `D` member-scale segments (the exact diagonal geometry) and their
|
|
164
311
|
bounding box — that's the skew bay.
|
|
165
312
|
2. Render that bbox at high DPI and **draw the `D` segments over it, each NUMBERED** at its
|
|
@@ -180,16 +327,57 @@ Follow the methodology condensed here (full detail + every gotcha in
|
|
|
180
327
|
6. **Work-point extend.** Extend each bound segment's drawn-short ends to the centerline
|
|
181
328
|
intersection of connecting members (line–line intersection, capped reach). This closes joints
|
|
182
329
|
and is skew-proof.
|
|
183
|
-
7. **AISC lookup for weights
|
|
184
|
-
|
|
185
|
-
profile → plf }`.
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
330
|
+
7. **AISC lookup for weights — look up EVERY distinct designation; NEVER read the weight off the name.**
|
|
331
|
+
Call the `steel-detailer-us` agent's `lookup` verb for **every** distinct profile in the takeoff →
|
|
332
|
+
`plf`, and build `weights: { profile → plf }`. Do **not** derive plf from the designation: the trailing
|
|
333
|
+
number is the weight *only* for W/S/M/HP/C/MC/WT (e.g. `W16X26`→26, `C6X8.2`→8.2), but it is the **wall
|
|
334
|
+
thickness / leg size** for `HSS`/`PIPE`/`L` — `HSS6X6X3/8` is **27.48 plf, not 3/8**; `L4X4X3/8` is 9.8.
|
|
335
|
+
Cherry-picking (looking up only the W's, or "eyeballing" the number) is exactly how HSS/pipe/angle
|
|
336
|
+
members ship weightless. (A common miss: the W's and an angle resolve, but an `HSS6X6X3/8` is
|
|
337
|
+
never looked up → it rendered but had no weight, so the editor flagged it RFI "not in the AISC table"
|
|
338
|
+
and it dropped out of the BOM.) The lookup **is** the source of truth for weight — batch **all** distinct
|
|
339
|
+
designations through it, HSS/PIPE/L/WT included.
|
|
340
|
+
- **Validate each designation before you trust the read — a garbled one won't resolve.** The lookup key
|
|
341
|
+
must be a real AISC form: `W/S/M/HP<d>X<wt>`, `C/MC<d>X<wt>`, `WT/ST/MT<d>X<wt>`, `HSS<a>X<b>X<t>` (or
|
|
342
|
+
`HSS<od>X<t>`), `PIPE<…>`, `L<a>X<b>X<t>`, and the **double angle `2L…`** — a detail that reads
|
|
343
|
+
"DOUBLE L4x4x3/8" is a double angle, **not** the single `L4X4X3/8` (which is half the steel). A
|
|
344
|
+
`2L` key also encodes the back-to-back spacing (and, for unequal legs, the orientation), so read
|
|
345
|
+
those off the detail and look the exact key up; never double a single shape's weight by hand.
|
|
346
|
+
*(A `2L` has no single-section footprint, so `contract-to-scene` cannot extrude it — it renders in
|
|
347
|
+
the 2D plan and counts in the BOM, but is reported in the 3D bake's `skipped` list. Say so.)* **The separator between tokens is `X`, never a repeated
|
|
348
|
+
letter** — an OCR read like `C6C8.2` (the `X` misread as `C`) is malformed and must be corrected to
|
|
349
|
+
`C6X8.2` before lookup (a whole run of channels can otherwise ship as `C6C8.2` → all weightless). If a
|
|
350
|
+
designation doesn't resolve, first check it's not a misread (fix + retry) before deciding it's a true
|
|
351
|
+
RFI — a lookup miss on a resolvable size is a reader bug, not an unknown.
|
|
352
|
+
- **Completeness self-check (do this before hand-off, it's cheap and deterministic).** After building
|
|
353
|
+
`weights`, assert **every distinct non-`MF`/`BF` profile used by a member has a numeric weight**. Any
|
|
354
|
+
gap is a **reader miss to fix** (re-validate the designation, re-run the lookup) — **not** an RFI to
|
|
355
|
+
pass to the user. The `/score` endpoint surfaces the same signal: an rfi-band member whose reason is
|
|
356
|
+
**"…not in the AISC table"** (as opposed to "no profile assigned") means the size *is* known but you
|
|
357
|
+
failed to resolve its weight — go resolve it, don't ship it. (`MF`/`BF` marks are the only legitimately
|
|
358
|
+
weightless entries — they stay RFI until resolved to a real size from the Frame Elevations.)
|
|
359
|
+
- Verify the lookup is live with a known section (e.g. `W16X26 → 26 lb/ft`) before trusting a full run —
|
|
360
|
+
`~/.aware` rules can vanish on agent re-update (gotcha §6); if every member comes back weightless,
|
|
361
|
+
restore `rules/aisc-shapes-v15.json` into the installed agent dir.
|
|
362
|
+
8. **Dedupe coincident members — by FOOTPRINT *and* ORDERED ELEVATION, never by footprint alone.**
|
|
363
|
+
Two labels binding the same segment (a W-size + its `MF` mark, or overlapping tile reads) emit
|
|
364
|
+
coincident members that double-count the BOM. But two members can legitimately share a footprint —
|
|
365
|
+
a beam stacked over a beam, and (critically) **the two legs of an X-brace, which project onto the
|
|
366
|
+
same plan line**. Collapsing on work-points alone silently destroys one of them. Use the exact rule
|
|
367
|
+
the editor and server use (`redundantDups` / `redundantDupIds`):
|
|
368
|
+
|
|
369
|
+
- group by **footprint**: the two work-points, order-independent, rounded to ~3 px;
|
|
370
|
+
- within a group, compute each member's **elevation signature** `[tos0, tos1]` **in end order**
|
|
371
|
+
(a column's is `[col.tos, col.bos]`); a member with no explicit elevation signs as `na`;
|
|
372
|
+
- **≤ 1 distinct explicit signature** ⇒ they are copies of one member: keep the most-resolved
|
|
373
|
+
(a real profile beats an `MF`/blank; an elevation-tagged copy wins ties), drop the rest — an
|
|
374
|
+
`na` member is a **wildcard** and collapses against whatever shares its footprint;
|
|
375
|
+
- **≥ 2 distinct explicit signatures** ⇒ genuinely different objects: keep the best per signature,
|
|
376
|
+
and **keep every `na` member** (ambiguous — never silently dropped).
|
|
377
|
+
|
|
378
|
+
The signature is **order-sensitive** on purpose. That is what lets an X-brace's two legs coexist —
|
|
379
|
+
see §2b. (The editor ALSO auto-dedupes on load, and it **deletes**, not flags. Produce a clean
|
|
380
|
+
contract here; do not lean on it, and do not hand it a contract it will quietly prune.)
|
|
193
381
|
9. **Cross-sheet sources.** Frame Elevation sheets → moment-frame schedule (resolve `MF` marks),
|
|
194
382
|
level datums (Ground / Second Floor / Roof elevations). Roof framing → per-zone T.O. STEEL
|
|
195
383
|
callouts. See guidance spec §5 for what each sheet gives you.
|
|
@@ -216,6 +404,110 @@ Follow the methodology condensed here (full detail + every gotcha in
|
|
|
216
404
|
- **`(N)` = new, `(E)` = existing (often out of scope).** Read the full set for context before
|
|
217
405
|
deciding.
|
|
218
406
|
|
|
407
|
+
### 2b. Braces — emit them as first-class members
|
|
408
|
+
|
|
409
|
+
A brace is a **member**, not annotation. Two kinds, one contract shape:
|
|
410
|
+
|
|
411
|
+
```jsonc
|
|
412
|
+
"role": "beam", // ALWAYS 'beam' — the schema's role enum is beam|column
|
|
413
|
+
"memberType": "brace",
|
|
414
|
+
"position": "middle", // VERTICAL braces only (see below)
|
|
415
|
+
"brace": {
|
|
416
|
+
"type": "lateral" | "vertical",
|
|
417
|
+
"floor": "above" | "below", // vertical only → solid vs long-short-dashed in the 2D plan
|
|
418
|
+
"offset": 12, // vertical only, SIGNED INCHES, DISPLAY-ONLY
|
|
419
|
+
"lowerEnd": 0 // optional override; otherwise derived from the ends' TOS
|
|
420
|
+
}
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
`brace` is a **closed** sub-object — an unknown key or a bad enum value fails the PUT.
|
|
424
|
+
|
|
425
|
+
**Lateral brace** — a kicker that braces a beam, running between beams.
|
|
426
|
+
|
|
427
|
+
1. Take the kept **member-scale stroke lines on the bracing layer** (identified by the census in §0, not
|
|
428
|
+
by its name), one member per line, work-points
|
|
429
|
+
from the line's **own endpoints** (then run the work-point extend of step 6). `brace:{type:'lateral'}`.
|
|
430
|
+
2. **No `offset`, no `position`** — a flat kicker keeps the beam default.
|
|
431
|
+
3. **Size it from the detail the legend names — read that detail, do not skip to RFI.** It carries the
|
|
432
|
+
member (e.g. *"DOUBLE L4x4x3/8 w/(2) bolts each end"* → a **double angle** in the `2L…` family, NOT
|
|
433
|
+
the single `L4X4X3/8`, which is half the steel; read the back-to-back spacing to form the exact key).
|
|
434
|
+
A detail may defer (*"see <n>/<sheet> for balance of info"*) — follow the chain. Only when the size is
|
|
435
|
+
genuinely nowhere in the set does the brace become
|
|
436
|
+
`rfi:true`, `profile:""`, reference in `ends[].detail`. Never copy a neighbouring beam's W-size, and
|
|
437
|
+
never RFI a size the set actually shows.
|
|
438
|
+
4. `ends[].tos` from the beams it connects to (explicit, `tosDef:false`).
|
|
439
|
+
5. **Retype an already-read diagonal only on hard evidence.** Convert an existing member to
|
|
440
|
+
`memberType:'brace'` when **all three** hold: its end-note is **exactly** `brace` (trimmed,
|
|
441
|
+
case-insensitive), its profile is a **brace family** (`HSS…`, `L…`, `PIPE…`, rod), and its geometry
|
|
442
|
+
is diagonal / off the orthogonal frame. Never substring-match the note — a *braced-frame beam*
|
|
443
|
+
carries notes like `"braced-frame beam; size defined in Section <n>/<sheet>"`, which contains the
|
|
444
|
+
word `brace` and is a wide-flange **beam**.
|
|
445
|
+
|
|
446
|
+
**Vertical brace** — diagonal frame bracing between two column lines. It is drawn on the **BRACE FRAME
|
|
447
|
+
ELEVATION** sheets, not on the plan, so it is **derived**, and every step must stay deterministic.
|
|
448
|
+
|
|
449
|
+
1. **Supported topologies: a full-bay `X` and a single full-bay diagonal.** Chevron, inverted-V, K and
|
|
450
|
+
multi-panel frames have intermediate work-points that are not the column centres — record them in
|
|
451
|
+
`read_notes` and emit nothing. **Never fabricate a second leg to "complete" an X.**
|
|
452
|
+
2. **Geometry deterministically, labels by vision** — the elevation sheet is not in `filter.sheets`, so
|
|
453
|
+
run a dedicated `page.get_drawings()` pass over that page (display space via `page.rotation_matrix`),
|
|
454
|
+
isolate each `BRACE FRAME ELEVATION ALONG GRID <g>` detail by its viewport, and **count the legs from
|
|
455
|
+
the diagonal stroke segments**. Vision only reads the labels (grid marks, level elevations, the
|
|
456
|
+
`HSS…` size, the connection ids).
|
|
457
|
+
3. **No scale mixing.** The elevation supplies *topology, levels, grids, labels*. The **plan** supplies
|
|
458
|
+
the *work-points*. An elevation coordinate must never land in `wp`.
|
|
459
|
+
4. **Work-points** are the plan **column centre-lines** at the frame's two end grids, ordered by the
|
|
460
|
+
canonical endpoint rule (left→right). **Both legs of an X share that same `wp` order.**
|
|
461
|
+
5. **Transpose the elevations between the legs**, never mirror the work-points. With canonical
|
|
462
|
+
endpoints `A`,`B`: one leg is `ends = [lowerAtA, upperAtB]`, its partner `ends = [upperAtA, lowerAtB]`
|
|
463
|
+
(`tosDef:false` on all four). Per-side elevations matter — a roof at `ELEV = VARIES` differs between
|
|
464
|
+
the two grids.
|
|
465
|
+
|
|
466
|
+
> **Why:** dedupe (step 8) groups by an order-independent footprint but an **order-sensitive**
|
|
467
|
+
> elevation signature. Transposed elevations give the two legs distinct signatures and both survive.
|
|
468
|
+
> Mirror the `wp` instead and both collapse to one signature — the editor's first-load auto-dedupe
|
|
469
|
+
> **deletes** a leg and the BOM silently loses its tonnage.
|
|
470
|
+
|
|
471
|
+
6. **`position:'middle'`** — emit it explicitly. A vertical brace is centred on its work-line, and both
|
|
472
|
+
the bake and the editor's inspector now default it that way, but stating it in the contract keeps the
|
|
473
|
+
placement independent of that default (and of the slope heuristic, which mis-reads a shallow brace in
|
|
474
|
+
a wide bay as "roughly flat").
|
|
475
|
+
7. **`offset`** is DISPLAY-ONLY and never reaches 3D/IFC/Tekla. A vertical brace's plan line is
|
|
476
|
+
collinear with the braced-frame beam above it, so `offset:0` hides the symbol under the beam, and an
|
|
477
|
+
X's two legs at the *same* offset overlap so only the topmost is clickable. Emit **`+12` and `−12`**
|
|
478
|
+
for a paired X (one foot each side); **`+12`** for a lone diagonal.
|
|
479
|
+
8. **Profile** from the elevation label, through the `steel-detailer-us` lookup like every other
|
|
480
|
+
designation — an `HSS`'s trailing number is its **wall thickness**, not its weight.
|
|
481
|
+
9. **`id`** — stable, globally unique, and **sheet-independent**:
|
|
482
|
+
`vb-<detailRef>-<alongGrid>-<endGridA>_<endGridB>-<story>-<leg>`, e.g. `vb-<detail>-<grid>-<endA>_<endB>-<lowElev>_<highElev>-a`.
|
|
483
|
+
`<story>` is the ordered level-elevation pair (`0_198`), never an index. `<leg>` is the physical
|
|
484
|
+
orientation (`a` rises A→B, `b` rises B→A), never extraction order. The **sheet is deliberately not
|
|
485
|
+
in the id** — the version diff keys members by `sheet + id`, so baking the owner sheet in would break
|
|
486
|
+
identity as soon as ownership changes. On a **revision re-read, reuse the previous owner sheet** before
|
|
487
|
+
applying the fallback below.
|
|
488
|
+
10. **Provenance:** `ends[].detail` = the frame-elevation reference (e.g. `n/S-3xx`); `ends[].note` =
|
|
489
|
+
that end's brace-frame connection label, bound to the endpoint it actually annotates. Neither
|
|
490
|
+
creates a `connections[]` row.
|
|
491
|
+
|
|
492
|
+
**Which plan owns a vertical brace (or the BOM double-counts it).** A brace spans two levels, so two
|
|
493
|
+
plans could claim it. Emit it **exactly once**:
|
|
494
|
+
|
|
495
|
+
- the **lower** level's plan if that plan is *usable*, with `floor:'above'`;
|
|
496
|
+
- else the **upper** level's plan if usable, with `floor:'below'`;
|
|
497
|
+
- else **no member** — a `read_notes` entry.
|
|
498
|
+
|
|
499
|
+
*Usable* means that plan's own filtered `S-COLS*` linework resolves a column footprint at **each** end
|
|
500
|
+
grid, registered to its grid. It does **not** mean the plan owns a column *member* — a column is stored
|
|
501
|
+
once as a single continuous member, so most plans legitimately hold none.
|
|
502
|
+
|
|
503
|
+
**Emit a `read_notes` entry and NO member** when the end grids are absent from `plan.grid`, when no plan
|
|
504
|
+
resolves a column centre at an intersection, when the upper level is `VARIES` with no local `T.O. STEEL`
|
|
505
|
+
callout for that bay, or when the topology is unsupported. An unplaceable brace **cannot** be a member
|
|
506
|
+
(`wp` is required), and an `rfi:true` member whose profile *does* resolve would still be counted in the
|
|
507
|
+
BOM. Key each note `brace:<id> — <reason>`, rebuild them from the source on **every** read (drop the ones
|
|
508
|
+
that have become resolvable — never carry a stale note forward), and **state them in the hand-off**
|
|
509
|
+
(step 6): nothing else surfaces `read_notes` to the user.
|
|
510
|
+
|
|
219
511
|
### 3. Honor `target_confidence` — score, then LOOP to the goal
|
|
220
512
|
|
|
221
513
|
Read the app's `target_confidence` input (default 70). The user may also set a **per-read override**
|
|
@@ -248,8 +540,8 @@ one.)
|
|
|
248
540
|
|
|
249
541
|
**`filterMissing` is the completeness gate — independent of the confidence score.** `true` means the
|
|
250
542
|
contract has no usable `filter` block: step 1b never ran, so the members were bound by the length
|
|
251
|
-
heuristic, not the user's steel. A filter-less contract can still hit `meetsTarget`
|
|
252
|
-
|
|
543
|
+
heuristic, not the user's steel. A filter-less contract can still hit `meetsTarget` — so **do not treat
|
|
544
|
+
`meetsTarget` alone as "done."** If `filterMissing` is `true`,
|
|
253
545
|
go back to step 1b, bake the filter, and hand off the Filter node before continuing. Hand-off (step 6)
|
|
254
546
|
requires `filterMissing: false`.
|
|
255
547
|
|
|
@@ -324,8 +616,24 @@ Important optional fields:
|
|
|
324
616
|
"wp": [[x,y0],[x,y1]],
|
|
325
617
|
"angle": "V",
|
|
326
618
|
"role": "column",
|
|
619
|
+
"rot": 0,
|
|
327
620
|
"rfi": false,
|
|
328
621
|
"col": { "bos": 0, "tos": 198, "note": "", "detail": "" }
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
"id": "vb-<detail>-<grid>-<endA>_<endB>-<lo>_<hi>-a", // one leg of an X; its partner is …-b with the elevations transposed
|
|
625
|
+
"profile": "HSS6X6X5/8",
|
|
626
|
+
"wp": [[x0,y0],[x1,y1]], // the two COLUMN CENTRES, same order on both legs
|
|
627
|
+
"angle": "D",
|
|
628
|
+
"role": "beam", // never 'brace'
|
|
629
|
+
"memberType": "brace",
|
|
630
|
+
"position": "middle",
|
|
631
|
+
"rfi": false,
|
|
632
|
+
"brace": { "type": "vertical", "floor": "above", "offset": 12 },
|
|
633
|
+
"ends": [
|
|
634
|
+
{ "tos": 0, "tosDef": false, "detail": "3/S-3xx", "note": "brace-frame connection <mark>" },
|
|
635
|
+
{ "tos": 198, "tosDef": false, "detail": "3/S-3xx", "note": "brace-frame connection <mark>" }
|
|
636
|
+
]
|
|
329
637
|
}
|
|
330
638
|
]
|
|
331
639
|
}
|
|
@@ -344,11 +652,30 @@ Key field rules:
|
|
|
344
652
|
(start = the lower end on the sheet, i.e. the **larger** display-Y since display Y grows downward).
|
|
345
653
|
This is the on-screen reading direction (→ or ↑). It costs nothing to get right at authoring time and
|
|
346
654
|
makes the yellow/magenta end handles meaningful in both the 2D and 3D editor.
|
|
655
|
+
- **Section rotation (`rot`) is a MEMBER-level field — it applies to ANY member, not just columns.** A
|
|
656
|
+
column renders in the 2D plan (and 3D) as its **profile-section footprint** (the I-shape, box, channel,
|
|
657
|
+
or angle of its `profile`), and a beam/brace carries the same roll about its work-line in 3D. Emit `rot`
|
|
658
|
+
as the section's in-plan orientation in **degrees** (`0` = as drawn; `90` = a quarter-turn, strong axis
|
|
659
|
+
swapped; any double is accepted, normalised −360…360). **For columns it is MANDATORY — derive it from the
|
|
660
|
+
flange-segment ink, never the bbox** (see §0 "Column ROTATION"). For a beam/brace, emit `rot` only when
|
|
661
|
+
the section is visibly rolled (a canted member); a normal beam stays `0`. The whole path carries it end
|
|
662
|
+
to end — `contract-to-scene` emits `rot` for every member (not gated on `role`) and both the 2D editor
|
|
663
|
+
(`columnSectionPoly`) and the 3D view (`orientMember`) apply it — so the user can dial the exact angle in
|
|
664
|
+
Inspect → **Profile Rotation** for any selected member(s). The section size itself comes from the
|
|
665
|
+
`profile` (no need to trace it). *(The scene builder also skips a zero-height column, `bos==tos` — a
|
|
666
|
+
foundation base marker — so it never renders as a flat plate; the real column is the single continuous
|
|
667
|
+
member read from the frame elevations. Set its true `bos`/`tos` from the elevation, not a per-plan guess.)*
|
|
347
668
|
- Elevations are **decimal inches** (canonical); the editor accepts/displays ft-in strings.
|
|
348
669
|
`tosDef: false` means the value came from a drawing callout; `true` means it follows the plan
|
|
349
670
|
default.
|
|
350
671
|
- `rfi: true` means no AISC size resolved — excluded from the BOM. `mf: true` marks a
|
|
351
672
|
moment-frame member (persistent; survives AISC resolution).
|
|
673
|
+
- **`read_notes` (top-level `string[]`) is where what you could NOT resolve goes.** An ambiguous label,
|
|
674
|
+
a member you cannot place, an unsupported brace topology. It is the honest carrier because an
|
|
675
|
+
unplaceable member has no work-points (`wp` is required, so it cannot be a member at all) and an
|
|
676
|
+
`rfi:true` member whose profile *does* resolve is still counted in the BOM. Rebuild these from the
|
|
677
|
+
source on every read — drop notes whose subject has become resolvable rather than carrying them
|
|
678
|
+
forward — and **read them out in the hand-off** (step 6); nothing in the UI surfaces them yet.
|
|
352
679
|
- **`material` (grade) — capture it (Slice 5b).** Read the drawing's **general-notes grade table**
|
|
353
680
|
(the "MATERIAL" / "STRUCTURAL STEEL" notes) and stamp each member's `material` from its section
|
|
354
681
|
family: wide-flange / WT → `A992`, HSS → `A500` (Gr. B or C per the notes), pipe → `A53`,
|
|
@@ -356,7 +683,10 @@ Key field rules:
|
|
|
356
683
|
overrides the family default. Capturing grade is what lets the Workspaces **History → "What
|
|
357
684
|
changed"** compare surface a **Material** change when a revision re-grades a member.
|
|
358
685
|
- `raster_b64` is a base64 JPEG of the framing area (title block excluded). It is
|
|
359
|
-
**machine-local** and **never committed**.
|
|
686
|
+
**machine-local** and **never committed**. **It is the SCANNED-ONLY fallback overlay** — on a vector
|
|
687
|
+
PDF the overlay is the `filter` vector linework (see "VECTORIZE the overlay" above), so a vector read
|
|
688
|
+
does not need to lean on `raster_b64` for a crisp plan. Emit it for provenance / raster-only sheets;
|
|
689
|
+
never treat a raster overlay as acceptable when vectors exist.
|
|
360
690
|
- **Connection library (`connections[]`) + per-end refs.** A vendor-neutral top-level
|
|
361
691
|
`connections: [{ id, type, detail, targets:{ tekla:"146", … }, source }]` maps a connection
|
|
362
692
|
TYPE → the firm's design detail# → per-platform component ids. A member end references a row by id
|
|
@@ -451,14 +781,33 @@ Key field rules:
|
|
|
451
781
|
Format in `company-rules.md`: plain headed sections the AI can read (e.g. `## Bolts` with the grade
|
|
452
782
|
default + the length chart, `## Gages`, `## Shear tab (NS-FS, edge, clearance)`). The author keeps it
|
|
453
783
|
private; FloLess just reads + applies it.
|
|
454
|
-
- **Clickable callouts (`callouts[]`)
|
|
455
|
-
point to ANOTHER sheet — **section cuts** (e.g. a
|
|
456
|
-
**elevation/interior-elevation marks**, and **detail
|
|
457
|
-
|
|
458
|
-
`
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
784
|
+
- **Clickable callouts (`callouts[]`) — position is deterministic, the REFERENCE is mandatory.** Harvest
|
|
785
|
+
the cross-reference marks drawn ON the plan that point to ANOTHER sheet — **section cuts** (e.g. a
|
|
786
|
+
circle with `A` over `A` and a sheet ref), **elevation/interior-elevation marks**, and **detail
|
|
787
|
+
references** — as per-plan
|
|
788
|
+
`callouts: [{ kind:"section"|"elevation"|"detail-ref", text:"5/S-501", disp:[x,y], target:{ sheet:"S-501", number:"5" } }]`.
|
|
789
|
+
`disp` (the clickable hotspot) comes deterministically from the annotation-layer marker circle
|
|
790
|
+
(`*S-ANNO-SECT*`), but the **detail NUMBER and target SHEET are the point of a callout — a callout
|
|
791
|
+
without them is useless.** The number/sheet are OUTLINED text (`get_text` returns nothing), so **read
|
|
792
|
+
them with vision** at the marker (verify at high zoom — both the number and the sheet are easy to
|
|
793
|
+
misread) and fill BOTH `text` (the mark as drawn, e.g. `"5/S-501"`) and `target:{sheet,number}`. Do
|
|
794
|
+
NOT ship a callout with an empty `target` as finished — a positionless-ref bubble is a regression from
|
|
795
|
+
the detail bubbles that already carry `"2/S-701"`-style marks; if the mark truly can't be read, RFI it,
|
|
796
|
+
don't leave it blank.
|
|
797
|
+
- **Link the referenced drawing — VECTORIZED when possible.** A callout must LINK to the real target
|
|
798
|
+
drawing, not just name it: when the referenced sheet/detail is in the set, extract it and wire the
|
|
799
|
+
callout so clicking it opens that drawing. Render the linked detail/section the SAME vector-first way
|
|
800
|
+
as the plan overlay (see "VECTORIZE the overlay") — the referenced sheet's vector linework, crisp and
|
|
801
|
+
snappable, NOT a rasterized JPEG. A raster detail preview is the scanned-only fallback. (The editor
|
|
802
|
+
draws a clickable bubble at each `disp`: it jumps to the referenced sheet if that sheet is loaded as a
|
|
803
|
+
plan, else opens the detail lightbox — which must show the VECTOR detail when the source is vector.)
|
|
804
|
+
- **Recipe:** for every DISTINCT sheet the callouts target (the `S-3xx` sections/frame-elevations AND
|
|
805
|
+
the `S-4xx…S-8xx` details), export that PDF page to a vector SVG — `page.get_svg_image(fitz.Identity)`,
|
|
806
|
+
then **strip the embedded `<image>` raster** (it duplicates the linework and bloats the file) — and
|
|
807
|
+
write it to `<project>/details/<sheet>.svg`. The editor fetches `GET /api/contract/<app>/detail/<sheet>`
|
|
808
|
+
(server reads that file). Extract EVERY referenced sheet, not just the section sheets — a `1/S-801`
|
|
809
|
+
callout with no `details/S-801.svg` silently falls back to raster. Map sheet→PDF page by reading the
|
|
810
|
+
title-block sheet numbers (they're outlined text → render the bottom-right corner and read with vision).
|
|
462
811
|
|
|
463
812
|
### 5. Write to the contract store
|
|
464
813
|
|
|
@@ -480,8 +829,11 @@ member read bound to it). If it's still `true`, you are not done — return to s
|
|
|
480
829
|
takeoff whose filter was skipped as finished.
|
|
481
830
|
|
|
482
831
|
Tell the user:
|
|
483
|
-
- What you read (e.g. "read 14 beams
|
|
484
|
-
Frame-Elevation resolution; aggregate confidence 78% — above your 70% target").
|
|
832
|
+
- What you read (e.g. "read 14 beams, 6 columns and 9 braces on the two framing plans; 3 MF members
|
|
833
|
+
await Frame-Elevation resolution; aggregate confidence 78% — above your 70% target").
|
|
834
|
+
- **Every `read_notes` entry, in plain English** — what could not be resolved and why (an unplaceable
|
|
835
|
+
brace, a missing half-grid, an unsupported brace topology). Nothing in the UI shows `read_notes`, so
|
|
836
|
+
this hand-off is the only place the user learns what was left out. Never let an omission pass silently.
|
|
485
837
|
- **Open the editor**: double-click the `read` node (or the takeoff node) in the FloLess
|
|
486
838
|
canvas. The editor renders the overlay, the member list, the RFI panel, and the confidence
|
|
487
839
|
report so they can verify and correct.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: floless-app-workflows
|
|
3
|
-
description: This skill should be used when building, modifying, or reasoning about FloLess .flo workflows for floless.app — especially reusable apps that take inputs (e.g. a phase number) and run across different Tekla models, exec nodes that run Roslyn C# against the live model, the in-app HTML Viewer, the Code tab, or "Debug in VS". Covers the exec contract, the install→validate→compile→run loop, app inputs templating, and the server seams (aware-adapter, app-reader, index).
|
|
3
|
+
description: This skill should be used when building, modifying, or reasoning about FloLess .flo workflows for floless.app — especially reusable apps that take inputs (e.g. a phase number) and run across different Tekla models, exec nodes that run Roslyn C# against the live model, the in-app HTML Viewer, the Code tab, or "Debug in VS". Covers the exec contract, the install→validate→compile→run loop, app inputs templating, reading an approved Workspace project's data from a running workflow via the floless-workspace REST seam plus its workspace-project input picker, and the server seams (aware-adapter, app-reader, index).
|
|
4
4
|
metadata:
|
|
5
|
-
version: 0.
|
|
5
|
+
version: 0.3.1
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Building reusable .flo workflows in floless.app
|
|
@@ -293,6 +293,29 @@ A node can **land an artifact on disk as part of the run** with the `_core/file`
|
|
|
293
293
|
safety net before Run via `ensureSteelExportReady` (path only; idempotent, recompiles once). The
|
|
294
294
|
committed template carries a bare filename + a small example payload so the step is valid out of the box.
|
|
295
295
|
|
|
296
|
+
## Read an approved Workspace project's data (the `floless-workspace` seam) — VERIFIED, AWARE 0.87
|
|
297
|
+
|
|
298
|
+
A running `.flo` can read an **approved** Workspace project (its contract + versioned exports) via the
|
|
299
|
+
FloLess-owned, AWARE-generic REST agent **`floless-workspace`** (`read-approved` / `list-approved`).
|
|
300
|
+
AWARE stays extension-agnostic — it only sees a loopback REST agent. Three facts bite immediately;
|
|
301
|
+
full detail (output shape, authorization, server seams) in **`references/workspace-data.md`**:
|
|
302
|
+
|
|
303
|
+
- **REST output is `{ status, headers, body }` — NO `.result` wrapper.** Downstream reads
|
|
304
|
+
`{{ project.body.project.name }}`, `{{ project.status }}`, etc. (exec nodes wrap in `.result`; REST
|
|
305
|
+
agents do not).
|
|
306
|
+
- **A non-2xx read aborts the run under strict templating.** A `404`/`409` body has no
|
|
307
|
+
`project`/`version`/`contract`; minijinja errors on the undefined attribute access before the node
|
|
308
|
+
runs (`| default` doesn't save a mid-chain undefined; no `tojson`). So you **can't** reference
|
|
309
|
+
success-only fields and render an error card from one node.
|
|
310
|
+
- **Gate the branch** (AWARE has no conditional branch): an `inline` predicate node
|
|
311
|
+
`code: "e.status == 200"` between the read and the report passes-through on success or cleanly
|
|
312
|
+
`Gated`-stops on failure — the explicit non-2xx check. Shape: `project → gate → report`.
|
|
313
|
+
|
|
314
|
+
Let the user **pick** the project (never type an opaque id): flag the input
|
|
315
|
+
**`widget: workspace-project`** — the Set Inputs dialog then renders a themed approved-project picker
|
|
316
|
+
(by name, searchable) and stores the opaque id. Client-only hint, never sent to `aware`
|
|
317
|
+
(like `widget: file`); optional `workspaceApp:` pre-filters to one app. See `references/workspace-data.md`.
|
|
318
|
+
|
|
296
319
|
## How the UI surfaces map to AWARE state
|
|
297
320
|
|
|
298
321
|
- **Code tab** shows the node's real source: `node.config.code` (the exec C#), not lockfile
|
|
@@ -301,11 +324,14 @@ A node can **land an artifact on disk as part of the run** with the `_core/file`
|
|
|
301
324
|
(`highlightCSharp`) that reuses the demo's token classes (`kw`/`ty`/`st`/`cm` + `nu` for
|
|
302
325
|
numbers). No highlighting library — extend the scanner, don't add a dependency.
|
|
303
326
|
- **Inputs live on the input node** (the old above-canvas strip was removed). The input node
|
|
304
|
-
(`inputNodeId()` — first node
|
|
305
|
-
button (styled dialog, not `window.prompt`) and an
|
|
306
|
-
refreshed via `markSpecialNodes`). The report node carries a
|
|
307
|
-
are first-class buttons injected by `markSpecialNodes` in
|
|
308
|
-
still works as a shortcut.
|
|
327
|
+
(`inputNodeId()` — the first node templating `{{ inputs.x }}` **anywhere in its `config`**, scanned
|
|
328
|
+
recursively) carries a **"Set inputs ▸"** button (styled dialog, not `window.prompt`) and an
|
|
329
|
+
at-a-glance **value chip** ("phase 5", refreshed via `markSpecialNodes`). The report node carries a
|
|
330
|
+
**"View report ▸"** button. Both are first-class buttons injected by `markSpecialNodes` in
|
|
331
|
+
`web/aware.js`; double-click the node still works as a shortcut. (The scan is whole-config, not just
|
|
332
|
+
`config.args` — an exec node carries the input in `config.args`, but a REST/agent node carries it in
|
|
333
|
+
a plain config field, e.g. `floless-workspace`'s `project-id`; both must get the button, or the
|
|
334
|
+
workflow is unrunnable from the UI.)
|
|
309
335
|
- **One Run, single model** (the approved baseline has ONE `▶ Run workflow`; never add a second
|
|
310
336
|
run control). The header **`▶ Run workflow`** does the **REAL** run: `POST /api/run
|
|
311
337
|
{simulate:false, inputs}`. If the app has a report node (`reportNodeId()` — the exec terminal),
|
|
@@ -94,7 +94,8 @@ machine via a `self_test:true` watch fixture — no Tekla, no `--simulate`:
|
|
|
94
94
|
those header buttons moved into the ≡ menu in #149.)
|
|
95
95
|
- **The Playwright MCP browser is flaky/locked here** ("Browser is already in use…"). A **standalone
|
|
96
96
|
Node script is more reliable**: `playwright-core` resolves at
|
|
97
|
-
|
|
97
|
+
`$(npm root -g)/@playwright/cli/node_modules/playwright-core` — note `npm root -g` already ends in
|
|
98
|
+
`node_modules`, so do not append another;
|
|
98
99
|
the registry's default `chrome-headless-shell` is often missing, so pass an explicit
|
|
99
100
|
`executablePath` to an installed chromium build under
|
|
100
101
|
`%LOCALAPPDATA%/ms-playwright/chromium-<rev>/chrome-win64/chrome.exe` (1217/1208 seen). Have the
|
|
@@ -94,7 +94,7 @@ To test exec C# without the full app runtime, send it straight to the bridge ove
|
|
|
94
94
|
JSON-stdin contract:
|
|
95
95
|
|
|
96
96
|
```bash
|
|
97
|
-
BIN="
|
|
97
|
+
BIN="$HOME/.aware/bridges/aware-tekla.exe" # post-#148 persistent location (per-user AWARE home)
|
|
98
98
|
python -c "import json,io; print(json.dumps({'code': io.open('x.cs',encoding='utf-8').read(), 'args':{'phase':2}}))" \
|
|
99
99
|
| "$BIN" exec --version 2025.0 --json-stdin
|
|
100
100
|
```
|