elliottshort/mosby/source-survey

Claude Code and agent skill by elliottshort/mosby

Trust tier 1
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Mosby phase P0. Use it whenever a job has architectural sources but `mosby status` does not show `p0_survey: pass`: surveying or inspecting plans, PDF sheets, DWG layers/layouts/viewports, deciding the PDF extraction route (layered_vector / flat_vector / raster), reading title blocks, scale bars and the sheet index, declaring north, measuring level datums from sections and elevations, binding printed dimension strings to vector ticks, inventorying elevation-only features (chimneys, bays, inserts, awnings, porches), and resolving conflicts between sheets with a precedence ladder and adopted defaults. Produces sources.json (hashes, sheet index, per-region scale, route, north), job.json north/levels/units with evidence, decisions.md (conflict register, feature inventory, non-blocking questions), evidence crops with sidecars, and the six p0 reports (pdf_probe, sheet_index, scale_check, north, datums, conflicts_resolved). Nothing in P0 touches Blender; run it before `mosby extract`.

Install

npx vskill@latest install elliottshort/mosby/source-survey

SKILL.md

The same SKILL.md was published earlier as elliottshort/mosby/source-survey.

Source survey (P0): read the drawings before anything is built

You are reading architectural drawings (PDF sheets, optionally a DWG) and writing down, with evidence, everything later phases consume: which file is which, which sheet is which, the scale of every drawing REGION, where north points, the vertical datums, the dimensions that will justify geometry, the exterior features plans do not show, and every place the sheets disagree.

Why this phase exists: the house run (119 iterations, 310 scripts, three rejected deliveries) lost ~50 minutes waiting for an answer on six sheet conflicts while building three throwaway scenes, discarded a whole first job traced from an off-sheet plan copy, was asked by the owner for a scale check after 55 iterations because no scale receipt existed, treated a fully layered vector PDF as a picture, and re-did the roof at iteration 98 because a section label had been bound to the wrong surface.

Each rule below names the failure class it prevents (catalogue ids in trailing comments; MA* ids are listed in reference.md).

Hooks own the mechanics: sources.json, status.json and reports/*.json are generated (hand edits are blocked and the message names the regenerating command), nothing may be written into sources/, and builds or Blender mutations are refused while p0_survey / p1_extraction are not passed. Do not route around them; change inputs and regenerate.

Inputs and outputs

You readYou produce
job.json (from mosby init), sources/*.pdf, sources/*.dwgsources.json (generated: file hashes, sheet index, regions with scale, route, north per sheet)
job.json: units, north, levels[] filled with evidence references
decisions.md: conflict register with adopted defaults, design choices, elevation-only feature inventory, non-blocking questions
brief.md: global decisions table rows (units, north, authoritative plan, datums)
evidence/*.png + sibling .json sidecar for every crop cited anywhere
reports/{pdf_probe,sheet_index,scale_check,north,datums,conflicts_resolved}.json; mosby status -> p0_survey: pass

Procedure (in this order; each step's output feeds the next)

0. Orient and fix the source manifest
  1. Run mosby status. If p0_survey passes and is not stale, you are in the wrong skill. <!-- FC-G05 -->
  2. mosby init hashed every source into job.json.sources[].sha256. Record for each file: producer, drawing date, revision/issue text from the title block, and whether two files are byte-identical or one supersedes another (same set, later revision). A superseded file is listed with role superseded and never read for values. <!-- FC-A03 FC-AM07 -->

Why: the house run restarted on a byte-identical DWG (~1 h lost) and only found out by hashing afterwards.

  1. If a PDF exists, read its sheet index (step 2) BEFORE choosing any DWG region; published sheets decide what is current. <!-- FC-A02 -->
1. PDF probe and the ROUTE decision
  1. Run mosby pdf probe <job> on every PDF, every page, before any other PDF work. Never write "the PDF has no usable text/geometry" unless the probe report says so. <!-- FC-A04 -->

Why: the run's survey saw text_chars = 0 and concluded "picture"; the file carried 352 optional-content layers (A-Wall, A-Door, A-Glaz ...) and 34,895 layered paths on the plan sheet, exact to ~1 mm against the DWG.

  1. The probe reports, per page: rotation, mediabox, text chars, fonts, path count, per-layer path counts (from OCGs and the per-path layer key, never get_layers()), empty-rect paths, XObject count, dash presence, drawings bbox vs page rect. Read it; those fields are the gotcha list that silently corrupted ad-hoc extraction (rotation 270 on all 17 pages; 9,103 zero-area rects; dashes exploded into pieces). Do not write your own PyMuPDF scripts in P0; use the mosby pdf <subcommand> tools. <!-- FC-A11 -->
  2. Decide the route per plan page from the probe counts and record it (sources.json.sheets[].route, written by mosby pdf sheets): <!-- FC-A04 -->
  • text_vector: text chars > 0 AND >= 1000 paths. Real text exists; transcription is not needed.
  • layered_vector: >= 1000 paths AND a layer name matching the wall regex (default (?i)^(a-?)?walls?$|wall|wand|mur|muro; configurable in plan_flags.yaml). Full geometric route: mosby pdf to-entities -> mosby extract in P1.
  • layered_unknown_names: >= 1000 paths, > 3 distinct layer names, no wall match. Print the per-layer table (paths, median segment length) and record a decision row mapping layers to wall/door/window before P1. <!-- FC-A13 -->
  • flat_vector (EXPERIMENTAL): >= 1000 paths, no layers. Heuristic pairing; plan_debug.png must be confirmed by vision in P1.
  • raster (EXPERIMENTAL): < 1000 paths or images only. Output is a proposal, never a measured fact; every number must still pass steps 3 and 7.
  1. Layer names arrive with xref prefixes (Short base|A-Wall, 30x42TITLESHEET|a-text); the tools normalise on split('|')[-1]. Title-block, border, stamp, text, dim, tag and hatch layers are excluded from geometry classification; layer 0 keeps dimension ticks only. Check the stripped-prefix table in the probe output for a page whose wall layer count differs from its siblings (2771 on pages 4/6/8 here is the healthy signal). <!-- FC-A13 -->
2. Sheet index and per-REGION scale
  1. Run mosby pdf sheets <job> to enumerate pages and their title-block crops; then read each title block by vision from a 600 dpi crop (mosby pdf crop, protocol in reference.md) and record: sheet id, title, kind (cover | site | floor_plan | rcp | roof_plan | elevation | section | wall_section | detail | schedule | other), level it depicts, stated scale(s), revision. <!-- FC-A02 -->
  2. Scale is a property of a REGION, not a page. Sheets mix scales (here: A1.2 foundation plan 1/4 in + details; A4.3-A4.6 wall sections 3/4 in with 3/8 in details; A3.1/A3.2 two elevation viewports per page). For each page list regions[] with kind, bbox in page points, nominal scale (in per ft), pt_to_in = (12 / scale_in_per_ft) / 72, and the dimension id that verifies it (step 3). One page may have several regions; one region has exactly one scale. <!-- FC-A03 FC-AM04 -->
  3. Flag a page whose size is not a standard sheet (42x30, 36x24, 30x42, 24x36, 24x18, 11x17 in within 0.25 in) as possibly_fit_to_page. It is a hint only; the dimension check in step 3 is the gate. <!-- FC-A03 -->
  4. mosby pdf sheets wrote reports/sheet_index.json; check it: every page has kind and title; every plan/elevation/section region has a scale. <!-- FC-A02 -->
3. Scale gate (before ANY geometry or transcription is trusted)
  1. For every plan level, pick at least two printed overall dimension strings on different axes. Run mosby pdf dims <job> on their regions: it binds each string to the two vector tick marks (or arrowheads/dots) it spans and reports vector_in vs parsed_in. <!-- FC-A06 -->
  2. Run mosby scale-check <job> -> reports/scale_check.json. Pass = |printed - measured| <= 0.5 in (12.7 mm) AND relative error <= 0.2 % for every string, measured between the geometry faces the extension lines bind to; wall-layer bbox is only a fallback and is flagged bbox_fallback. A failing check prints the implied scale (paper in per ft); fix the region scale, never the geometry. <!-- FC-A03 -->

Why: A-Wall bbox 1484.00 in = printed 123'-8" = DWG 1484.03 in (1.4 mm). The check existed in prose only, so the owner asked for a "renewed scale check" after 55 iterations.

  1. With a DWG present, mosby dwg export also yields every AcDbAlignedDimension/AcDbRotatedDimension with act_measurement and user_text: a free, exact printed-vs-measured table. Any row where user_text is not a number is an override; list it. <!-- FC-A03 -->
  2. Never rescale a plan to chase a sub-centimetre envelope difference: printed strings are rounded to the inch; 1-2 mm residuals are normal. <!-- FC-A03 FC-AM01 -->
4. Authoritative plan region and off-sheet material
  1. Plan geometry comes only from the published region: the PDF page whose title block reads FLOOR PLAN for that level (wall-layer bbox of that page), or the DWG paper-space viewport whose layout sheet is that plan. Never trace a model-space copy no sheet references, however complete it looks. <!-- FC-A02 -->

Why: the first job traced an unreferenced copy that "looked alike" (same L-shape, garage east) and lacked the theatre and the apartment; 32 minutes, 22 cameras, 4 phantom rooms, all discarded.

  1. Text, notes, tags and blocks that sit outside every published viewport/page region are not evidence. Record them as offsheet_note with status unpublished; they may suggest a design choice (C-xx row), never settle a conflict. <!-- FC-A02 FC-AM05 -->
  2. Region sanity: a plan region must be 6-60 m on both axes with >= 80 % of wall-layer paths inside. 49.65 x 35.52 m meant the title block was inside the region; 39.22 x 22.99 m was the house. <!-- FC-A13 -->
5. North
  1. For EVERY plan sheet (floor, roof, site) crop the north arrow at 300 dpi with the sheet id in the sidecar and read its direction on the sheet (up/down/left/right or degrees). Sheets disagree: here floor and roof plans point DOWN, the site plan points UP. <!-- FC-A10 -->
  2. Write job.json.north = {model_axis, azimuth_deg_from_plus_y, source: "<sheet> arrow points <dir>", crop, status: verified}. Model +Y stays drawing-up; north is an axis declaration (e.g. -Y), never a rotation applied to geometry. Elevations are named from this north, not from sheet layout. <!-- FC-A10 -->
  3. DWG: search block names matching (?i)north|narrow|n-arrow and record the insert rotation as corroboration. Run mosby survey north <job> --axis Y- --evidence <crop.png> --status verified --sheet <id> (spell the axis Y-/X+, a bare -Y is eaten by the argument parser) -> reports/north.json; it fails until the crop exists and the status is verified. <!-- FC-A10 -->

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/elliottshort/mosby/source-survey/badge)](https://verified-skill.com/skills/elliottshort/mosby/source-survey)

Something wrong with this skill or its page? Tell us.