From c0fce5adacd0a30c9744e6c2c430e33f7557e1e6 Mon Sep 17 00:00:00 2001 From: Stephen Frederick Date: Tue, 10 Nov 2026 12:10:37 -0500 Subject: [PATCH] Pare the README down for engineers and drop MOKE and hackathon docs Rewrite the README around what an AEC engineer does with the app: what it checks, running a review, limits, and where drawings go. Move the 0.2.2 upgrade notes to docs/upgrading.md. Remove the MOKE name from the docs, the fixture folder default, the unused vendored SKILL.md, and the key-unlock dialog. Delete the hackathon record and the manifest's hackathon block. Compatibility identifiers in code, migration 0014, and their tests keep the old strings so 0.2.2 data still opens. Co-Authored-By: Claude Opus 5.5 --- .gitignore | 6 +- .project-kit/manifest.json | 16 +- README.md | 250 ++++++------------ backend/review/code-index/README.md | 4 +- backend/review/code-index/provenance.json | 4 +- backend/review/prompts/README.md | 16 +- backend/review/prompts/assets/SKILL.md | 14 - backend/review/prompts/provenance.json | 6 - desktop/main.ts | 2 +- docs/README.md | 6 +- docs/architecture/review-packages.md | 2 +- docs/cloud-reviews.md | 63 ++--- docs/data.md | 24 +- docs/development.md | 6 +- docs/experiments/adaptive-meta-review.md | 5 +- docs/experiments/plumbing-segmentation.md | 2 +- docs/experiments/sam-drawing-expansion.md | 2 +- docs/experiments/sam-expanded-sets.md | 4 +- docs/experiments/segmentation-test.md | 2 +- docs/review-runtime.md | 2 +- docs/screenshots/README.md | 15 +- docs/upgrading.md | 17 ++ docs/validation/cloud-validation.md | 4 +- docs/validation/fast-initial-review.md | 2 +- docs/validation/hackathon-readiness.md | 29 -- .../sam/expanded/captured-locations.json | 26 +- experiments/sam/expanded/crops.json | 26 +- experiments/sam/expanded/expectations.json | 10 +- experiments/sam/plumbing-crops.json | 8 +- experiments/sam/symbols/crops.json | 4 +- scripts/test-review-agent.ts | 2 +- scripts/test-sam.ts | 2 +- tests/smoke/expanded-segmentation.test.ts | 2 +- 33 files changed, 213 insertions(+), 370 deletions(-) delete mode 100644 backend/review/prompts/assets/SKILL.md create mode 100644 docs/upgrading.md delete mode 100644 docs/validation/hackathon-readiness.md diff --git a/.gitignore b/.gitignore index 7a44ae59..66f63453 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,6 @@ coverage/ .project-kit/update.json design/reference/ -# Local hackathon drawing fixtures and their archive -/Moke-Hackathon-Drawings/ -/Moke-Hackathon-Drawings.zip +# Local drawing fixtures and their archive +/drawing-fixtures/ +/drawing-fixtures.zip diff --git a/.project-kit/manifest.json b/.project-kit/manifest.json index 7fab74c6..184d6624 100644 --- a/.project-kit/manifest.json +++ b/.project-kit/manifest.json @@ -84,11 +84,10 @@ "heroCase": "docs/fixtures/hero-case.md", "primaryDemoPlatform": "linux-x64", "promptInstructions": { - "version": "moke-packet-review-v10", + "version": "second-set-packet-review-v11", "source": "Author's private review-instruction repository at revision 8a0e2648738018631eaa6d24ee0b6ebaa239afb1", "provenance": "backend/review/prompts/provenance.json", "scope": "Whole supplied packet or selected discipline with explicit coverage, governing sources, findings and offline HTML report", - "legacyCountVersion": "moke-selected-coordination-v2", "systemPrompt": "Pi Durable conversation agent.instructions with full master, shared method and applicable discipline files", "findingStyle": { "instructions": "backend/review/prompts/finding-style.md", @@ -133,13 +132,6 @@ ] } }, - "hackathon": { - "sourcesCheckedOn": "2026-10-27", - "sources": [ - "https://cerebralvalley.ai/e/meta-ai-developer-hackathon/details", - "https://cerebralvalley.ai/e/meta-ai-developer-hackathon/waiver" - ] - }, "segmentationExperiment": { "entrypoint": "scripts/test-sam.ts", "cases": "experiments/sam/cases.json", @@ -147,7 +139,7 @@ "model": "sam-3.1", "parser": "@meta-sam/parser@0.1.0", "pdfRenderer": "Poppler pdftoppm, external test dependency", - "fixtureManifest": "Moke-Hackathon-Drawings/drawing-manifest.json", + "fixtureManifest": "drawing-fixtures/drawing-manifest.json", "artifactDirectory": ".local/sam", "plumbingStudy": { "documentation": "docs/experiments/plumbing-segmentation.md", @@ -155,7 +147,7 @@ "candidateCases": "experiments/sam/plumbing-cases.json", "refinementCases": "experiments/sam/plumbing-refinement-cases.json", "reconciliationEntrypoint": "scripts/reconcile-fixtures.ts", - "mokeInstructions": "backend/review/prompts/assets" + "reviewInstructions": "backend/review/prompts/assets" }, "sourcesCheckedOn": "2026-10-27", "sources": [ @@ -196,7 +188,7 @@ "additionalDisciplineSets": { "documentation": "docs/experiments/sam-expanded-sets.md", "recipes": "experiments/sam/expanded", - "fixtureManifest": "Moke-Hackathon-Drawings/expanded/drawing-manifest.json", + "fixtureManifest": "drawing-fixtures/expanded/drawing-manifest.json", "artifactDirectory": ".local/sam/iteration-5", "caseCount": 42, "cropCount": 18, diff --git a/README.md b/README.md index e390860a..99bebe25 100644 --- a/README.md +++ b/README.md @@ -1,194 +1,110 @@ # Second Set -Second Set is a desktop workbench for reviewing engineering drawing packets, built for -the Meta AI Developer Hackathon. Import the drawings and ask for a whole-set QA -pass or a discipline review. Second Set reads source images, follows its review -instructions, records findings and coverage, and produces an offline HTML report. -Follow-up requests can deepen the review while retaining earlier issue IDs. - -[Watch the narrated demo on YouTube](https://youtu.be/wl8wwq_Tlrw). Second Set was called -MOKE until November 9, 2026, so the demo and earlier records use that name. +Second Set is a desktop app that gives a drawing set a second review before +submittal. Import the PDFs and ask for a QA pass or a discipline review. Second +Set reads the sheets, lists what it finds with the evidence behind each finding, +and exports an HTML report you can share. ![Second Set's five-sheet review with 19 findings, coverage gaps, and findings navigation](docs/screenshots/workbench.png) -## The review workflow - -1. **Import the packet.** Create a project and import its PDFs. Start a review - without creating a count check or manually confirming every sheet first. -2. **Ask for the review.** For example, ask "Please run a quick QA pass on this - drawing set" or "Review the electrical design and supporting calculations." - Choose a model and reviewer, or let Auto route the request. A saved note does - not start inference. -3. **Follow the inspection.** Second Set inventories the supplied sheets, opens source - images and detail crops, and records the four review passes: document - completeness, code and agency requirements, coordination, and prior comments. - A Florida code index points each check to its code section, statute or rule. - Public-source lookup with PDF text and repeatable arithmetic support the - inspection. With a Meta key, SAM 3.1 segments drawn devices and fixtures for - counts and zooms into each finding's problem area. -4. **Review the findings and gaps.** Each issue identifies its location, evidence, - correction and supporting sources or calculations. Unreviewed sheets, - inaccessible governing text and missing project inputs remain visible. Mark - a finding valid, a false alarm, not applicable or a duplicate, with a reason; - follow-up questions in the same conversation read that decision. A firm - checklist in Review settings applies the firm's own checks to new reviews. -5. **Export the report.** The self-contained HTML includes findings, embedded - evidence, coverage, citation status, calculations and prior-comment tracking. - Its Completed checkboxes track the user's corrections separately from finding - status and reviewer-verified closure. Export a complete package to preserve - the source files and execution history as well. +## What it checks + +Each sheet gets four passes: document completeness, code and agency +requirements, coordination between disciplines, and follow-up on prior review +comments. Code findings cite the Florida code section, statute or rule they rely +on. + +A whole-set review covers general, building design, civil, structural, +mechanical, electrical, plumbing, fire alarm, fire sprinkler, fire protection and +life safety. You can also ask for one discipline. + +With a Meta key, SAM 3.1 locates drawn devices and fixtures so they can be +counted, and zooms into the area each finding is about. + +## Running a review + +1. **Create a project and import the PDFs.** You don't need to confirm sheets + or set up count checks first. +2. **Ask for the review.** Click **Initial Review** for a full first-submittal + review, or type a request such as "Run a quick QA pass on this drawing set" or + "Review the electrical design and supporting calculations." +3. **Work through the findings.** Each finding gives the sheet and location, the + evidence, the correction needed, and its code sources or calculations. Open a + finding to see the source drawing beside it. Mark it valid, a false alarm, + not applicable or a duplicate, and give a reason. Follow-up questions and + reviews in the same conversation take that decision into account. +4. **Export the report.** The report is a single HTML file with the findings, + evidence images, coverage, code citations, calculations and prior-comment + tracking. Use its Completed checkboxes to track corrections. ![A saved false-alarm decision beside the source drawing and SAM highlight](docs/screenshots/correction.png) -Revision reviews carry earlier findings into the revised sheets. The demo also -shows [a finding that remained open](https://youtu.be/wl8wwq_Tlrw?t=122) on a -13-sheet set reviewed on October 31. +When revised sheets arrive, import them and ask for a recheck. Earlier findings +keep their issue IDs, and a finding closes only after the review inspects the +revised sheet. + +To apply your firm's own checklist to new reviews, add it in Review settings. + +## Limits + +- Findings are model review results. They are not professional approval, and a + finished review does not replace your own check. +- The report lists any sheets that were not reviewed. Code text that could not be + opened, unknown code editions and missing project information show as + **Needs input**. +- A citation marked **Indexed** has a known section and link. Open the link to + confirm the wording. +- SAM highlights show where a symbol appears on the sheet. They do not measure + dimensions. + +## Where your drawings go -Drawn-to-schedule count comparisons remain available as specialized checks. -Reviewers accept their count inputs and coverage before deterministic comparison; -corrections and revision rechecks retain their history. The -[two-sheet count demonstration](docs/fixtures/hero-case.md) exercises a supported -issue, corrected false alarm, unchanged control and revision recheck. +Projects are stored on your computer. A review sends drawing images to the model +provider you choose: Meta, Baseten, OpenCode Go, or a custom endpoint you add. -A review report states what was actually inspected. Model findings are review -results, and a finished execution does not provide professional approval. -Regulatory findings need applicable governing sources; unavailable sources and -unknown editions remain Needs input. SAM geometry does not establish physical -dimensions. +The model offered through OpenCode Go, Muse Spark 1.3 Contributor, trains Meta's +models on your drawings. Don't connect OpenCode Go for drawings that can't be +shared. + +**Push to cloud** uploads your whole Second Set workspace, including every +project and its original PDFs, to a cloud sandbox. The review runs there, and the +results come back to your computer. It needs a one-time setup; see +[cloud reviews](docs/cloud-reviews.md). ## Install Download the installer for Windows, macOS (Apple silicon) or Linux from [GitHub Releases](https://github.com/Surfside-Software/second-set/releases/latest). -The installers are unsigned. macOS can block the first launch; allow it under -System Settings › Privacy & Security › Open Anyway. On Linux, make the AppImage -executable or install the `.deb`. Model reviews need a provider key; see -[inference setup](docs/inference.md). - -### Upgrading from MOKE 0.2.2 - -- Second Set installs as a new app beside MOKE and opens MOKE's projects from the same - data folder. Don't run both at once; uninstall MOKE when you're done with it. -- On macOS and Linux, keys saved in MOKE may not unlock. Enter them again in Review - settings or import them from the File menu; the keys that still unlock keep working. -- A review paused in MOKE can't resume. Start a new review; finished reviews and their - reports are unchanged. -- `MOKE_*` environment variables are now `SECOND_SET_*`, for example - `SECOND_SET_MODAL_CONFIG` and `SECOND_SET_SESSION_CREDENTIAL_FILE`. A saved Modal - configuration needs `appName` `second-set-reviews` and `imageName` - `second-set-review-engine:latest`, and each provider Secret needs the key - `SECOND_SET_API_KEY`; see [cloud reviews](docs/cloud-reviews.md). - -## How it works - -| Process | Owns | -| ------------------ | ---------------------------------------------------------------------------------------------- | -| SvelteKit renderer | Projects, conversations, findings, and source inspection | -| Electron | Windows, menus, file dialogs, protected credentials, and the trusted renderer bridge | -| Bun backend | Effect application services, SQLite, PDF workers, evidence, calculations, and review execution | - -Effect Schema contracts validate process messages. The renderer uses Effect RPC -over authorized Electron MessagePorts; Electron forwards application requests to -Bun over authenticated loopback HTTP. Database access and provider credentials -stay outside the renderer. - -Pi Durable journals the review and runs the full vendored review instructions. A -separate ledger records model and SAM intent before dispatch, preserving unknown -outcomes without automatic resends. Reviews have pause and cancel controls and an -optional call budget. The default packet review has no application call ceiling; -long conversations use Pi compaction. Complete packages export and restore the -database, original PDFs, rendered evidence and execution journals together. - -Projects run locally, but inference uses hosted Meta, Baseten or OpenCode Go APIs, -or a custom endpoint you add, and sends selected drawing evidence to that provider. **Push to cloud** transfers the complete -workspace for a new bounded review, streams progress, and automatically syncs results with local -ownership checks. See [cloud setup and limits](docs/cloud-reviews.md), -[the runtime decision](docs/review-runtime.md), and -[data and recovery](docs/data.md). - -## Development - -Install the Bun version pinned in [.bun-version](.bun-version), then run: +The installers are unsigned. If macOS blocks the first launch, open System +Settings › Privacy & Security and click Open Anyway. On Linux, make the AppImage +executable or install the `.deb`. -```sh -bun install --frozen-lockfile -bun run dev -``` +Reviews need a key from a model provider; [inference setup](docs/inference.md) +explains how to add one. Without a key you can still import drawings and run +manual count checks. -You can import drawings and use manual count checks without provider keys. -For model review, copy [.env.example](.env.example) to `.env` and set -`OPENCODE_API_KEY`, `MODEL_API_KEY` or `BASETEN_API_KEY`. With a Go key, reviews run -on Muse Spark 1.3 Contributor through OpenCode Go, and Meta's API is used only for -SAM and count checks. Contributor trains on your drawings, and Go refuses it until -a workspace owner allows that. Otherwise choose -Muse Spark, Muse Wonder or Baseten Muse Spark Open in the app. -Restart after changing credentials. See [inference setup](docs/inference.md) for -packaged-app credentials, model capabilities and optional review budgets. +If you used version 0.2.2, read the [upgrade notes](docs/upgrading.md) first. -Bun runs tools and the application backend. The packaged app includes the Bun -executable, PDF renderer, and native assets; users do not install Bun or Node. -Build installers with `bun run package:desktop`. See [desktop builds and releases](docs/deployment.md). +## For developers -## Verification +Install the Bun version pinned in [.bun-version](.bun-version), then run: ```sh -bun run verify # checks, smoke tests, builds, and Electron end-to-end tests -bun run test:packaged # after packaging, repeat the desktop flow against the packaged executable -bun run test:screenshots # offline fixture captures in test-results/ -``` - -Tests use real local databases, RPC, PDF workers, and Electron. Hosted-provider -boundaries use local transports; normal verification requires no keys and makes -no paid requests. Headless Linux needs an X display, for example -`xvfb-run -a bun run verify`. Install Poppler for the optional experiment smoke -tests; they skip explicitly when `pdftoppm` is unavailable. - -The README screenshots are frames from the narrated demo, showing actual review -results and saved decisions. The [screenshot source notes](docs/screenshots/README.md) -record the video and frame timestamps. [Development and testing](docs/development.md) -explains the suite layout, offline fixture captures, and toolchain. - -## Repository layout - -```text -src/ SvelteKit workbench and shared Effect Schema/RPC contracts -desktop/ Electron shell, preload, and backend connection -backend/ Application services, PDF workers, inference, and review storage -migrations/ Immutable SQLite migrations -tests/ Smoke tests, Electron end-to-end flows, and synthetic fixtures -scripts/ Development, build, packaged checks, and opt-in model experiments -docs/ Setup, architecture, screenshots, and validation evidence -experiments/ SAM recipes, captured proposals, and research evidence +bun install --frozen-lockfile +bun run dev # run the app from source +bun run verify # checks, tests, builds, and Electron end-to-end tests ``` -The [documentation index](docs/README.md) separates setup and architecture from -validation records and drawing experiments. The [workbench design notes](docs/design.md) -record the Forge design system, its adaptations, and third-party asset attribution. - -## Hackathon provenance - -This entry addresses **Build for Your World**. The application work in this -repository began on October 27, 2026. The [rules and evidence review](docs/validation/hackathon-readiness.md) -maps the public repository, Meta model integration, demo, and source attribution -to the participant guide checked on November 4. - -The review prompts and the owner's 2023 Florida Building Code plan-review -reference predate this entry. The code index tooling and -`florida-code-additions.md` were added during the hackathon; see the -[code index provenance](backend/review/code-index/README.md). -This repository implements a fresh application from the project-kit desktop starter, with drawing evidence, -corrections, and revision tracking built for the hackathon. It does not reuse the -earlier MOKE application. The project was renamed from MOKE to Second Set on -November 9, 2026, and no longer uses the MOKE name. Pi Durable provides agent execution as an MIT-licensed -dependency; the new work is the drawing-review application, evidence handling, -corrections, revision behavior and portable review execution. Prompt and -dependency provenance live in -[the project manifest](.project-kit/manifest.json) and -[the review prompt sources](backend/review/prompts/README.md). +For model reviews from source, copy [.env.example](.env.example) to `.env` and +add a provider key. The app is an Electron shell around a SvelteKit interface and +a bundled Bun backend, which owns the SQLite database, PDF processing and review +execution. [Development and testing](docs/development.md) covers the commands and +test suites, and the [documentation index](docs/README.md) lists the +architecture, release and validation records. ## License -Second Set is released under the [MIT License](LICENSE). Vendored code and third-party -assets keep their own licenses. The styles in `src/lib/forge.css` are adapted from -Uiverse Design's Forge and remain under its license; see +Second Set is released under the [MIT License](LICENSE). Vendored code and +third-party assets keep their own licenses. The styles in `src/lib/forge.css` are +adapted from Uiverse Design's Forge and remain under its license; see [the design notes](docs/design.md). diff --git a/backend/review/code-index/README.md b/backend/review/code-index/README.md index 1f57b0e5..65272363 100644 --- a/backend/review/code-index/README.md +++ b/backend/review/code-index/README.md @@ -6,8 +6,8 @@ one-line plan review note and a link. The index contains no copied code text. `assets/FBC_2023_plan_review_reference.md` is the owner's plan review reference for the 2023 Florida Building Code, 8th Edition, last modified 2026-07-09. It -predates the hackathon and is vendored unmodified; the formatter ignores it. -`assets/florida-code-additions.md` was written for this entry on 2026-10-30. It +predates this application and is vendored unmodified; the formatter ignores it. +`assets/florida-code-additions.md` was written for this application on 2026-10-30. It adds Florida Statutes, Florida Administrative Code rules, the Florida Fire Prevention Code adoption, the 9th Edition (2026) volumes and the 8th Edition supplements. `provenance.json` records both files' origin and SHA-256. diff --git a/backend/review/code-index/provenance.json b/backend/review/code-index/provenance.json index e048c792..8a436ecc 100644 --- a/backend/review/code-index/provenance.json +++ b/backend/review/code-index/provenance.json @@ -3,12 +3,12 @@ "files": [ { "path": "assets/FBC_2023_plan_review_reference.md", - "origin": "Owner-authored plan review reference, MOKE_Reviews/FBC_2023_plan_review_reference.md, last modified 2026-07-09. Predates the hackathon; vendored unmodified.", + "origin": "Owner-authored plan review reference, FBC_2023_plan_review_reference.md, last modified 2026-07-09. Predates this application; vendored unmodified.", "sha256": "35272ec32c8e906a7e0aa4293f85775b5d823b780a5d13cc87330745f00c272d" }, { "path": "assets/florida-code-additions.md", - "origin": "Written for this entry on 2026-10-30. Statute titles and facts checked against leg.state.fl.us, rule titles against flrules.org, and 9th Edition links against the ICC Digital Codes Florida page. 2026-11-02: 8th Edition section titles and Reserved status checked against the Eighth Edition tables of contents in ICC's PREFACE pages as returned by a search index, and against UpCodes; no ICC page was opened.", + "origin": "Written for this application on 2026-10-30. Statute titles and facts checked against leg.state.fl.us, rule titles against flrules.org, and 9th Edition links against the ICC Digital Codes Florida page. 2026-11-02: 8th Edition section titles and Reserved status checked against the Eighth Edition tables of contents in ICC's PREFACE pages as returned by a search index, and against UpCodes; no ICC page was opened.", "sha256": "ba60c14a0f33ff4d230840d2134c954eb6b5156f8dee2c537d82467fa228afae" } ] diff --git a/backend/review/prompts/README.md b/backend/review/prompts/README.md index 9bf4c2c3..e5e931f2 100644 --- a/backend/review/prompts/README.md +++ b/backend/review/prompts/README.md @@ -63,7 +63,7 @@ to one count finding or two sheets. The host registers tools for packet inventory, original-PDF pages and crops, Florida code search, public-source discovery and text retrieval, repeatable calculations, project configuration, findings, citations, coverage and -prior-comment tracking. Packet review version `moke-packet-review-v6` adds +prior-comment tracking. Packet review v6 adds `search_code`, which searches the [Florida code index](../code-index/README.md), and PDF text in `read_source`. SAM can provide geometric observations when Meta is configured, including when the chat @@ -107,14 +107,14 @@ inspection at the claimed location, an explicit source search and permit-stage basis. This is an evidence gate, not proof that model interpretation is correct; live acceptance still checks the visible source against the released finding. -Packet review `moke-packet-review-v5` adds two host-written blocks. One tells the +Packet review v5 adds two host-written blocks. One tells the model how to treat the reviewer's finding decisions in follow-ups. The other, present only when the firm saved a checklist, is the checklist text under the heading "Firm review checklist, revision N". It comes last, after the requested scope, so reviews with and without a checklist share the cached prefix. The upstream skill files are unchanged. -Packet review `moke-packet-review-v7` gives each parallel role and stage its own +Packet review v7 gives each parallel role and stage its own tool list. Coordinator setup has inventory, rendering, research, project and citation records, `ask_reviewer` and a new `finish_setup` tool; sheet reviewers lose `record_project` and report a different project fact in their notes. The @@ -122,11 +122,11 @@ coordinator's guidance describes setup's sheet and request limits, and `read_source` can reread a saved source by `sourceId`. See [docs/review-runtime.md](../../../docs/review-runtime.md#parallel-packet-reviews). -Packet review `moke-packet-review-v8` leaves quotes empty for unread ICC and Florida rule text, and notes empty except for project-specific facts. The host records the access limit required by REVIEW_METHOD.md. +Packet review v8 leaves quotes empty for unread ICC and Florida rule text, and notes empty except for project-specific facts. The host records the access limit required by REVIEW_METHOD.md. -Packet review `moke-packet-review-v9` tells every reviewer to log a citation when a finding rests on a code requirement or a sheet prints one, as REVIEW_METHOD.md requires. A real 46-sheet review on v8 recorded 3 citations in 698 calls, none from a sheet reviewer, because the sheet role never mentioned them. Search is now for when the section is unknown, since naming the document, edition and section gets the same link. See [the research note](../../../docs/validation/citation-links-real-set.md). +Packet review v9 tells every reviewer to log a citation when a finding rests on a code requirement or a sheet prints one, as REVIEW_METHOD.md requires. A real 46-sheet review on v8 recorded 3 citations in 698 calls, none from a sheet reviewer, because the sheet role never mentioned them. Search is now for when the section is unknown, since naming the document, edition and section gets the same link. See [the research note](../../../docs/validation/citation-links-real-set.md). -Packet review `moke-packet-review-v10` has models mark finding locations and crops with +Packet review v10 has models mark finding locations and crops with `imageBox`, a pixel box in an image they received, which the host converts to PDF points. Models had placed regions several lines away from the cited text when they converted pixels to points themselves. Revised sheets now receive the findings carried from the sheets they replace, @@ -136,8 +136,8 @@ of it, because full-sheet images are too coarse for small text. The prompt adds definitions and forbids test findings. Packet review `second-set-packet-review-v11` and count prompt -`second-set-selected-coordination-v3` change only the application's name, from MOKE to +`second-set-selected-coordination-v3` change only the application's name, to Second Set, in the opening line and the `search_code` description. Versions through v10 -shipped as `moke-packet-review-vN`; migration 0014 renamed saved records to +shipped under the earlier name; migration 0014 renamed saved records to `second-set-packet-review-vN`, and workers built before the rename still announce the older names. diff --git a/backend/review/prompts/assets/SKILL.md b/backend/review/prompts/assets/SKILL.md deleted file mode 100644 index 430aad25..00000000 --- a/backend/review/prompts/assets/SKILL.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -name: moke-review -description: Review Florida permit drawings and resubmittals with Moke's discipline instructions and produce an HTML comment report with completion checkboxes. ---- - -# Moke review - -Use Moke to review a current Florida permit packet before submittal or resubmittal, or to perform a requested discipline review. Base findings on the project's documents and governing sources. - -Read [the master review instructions](references/AGENTS.md) and [the shared review method](references/REVIEW_METHOD.md) first. Establish the project configuration, inventory the packet, and use the master's discipline table to route the requested scope. Read the discipline files linked there only for the scopes being reviewed. Preserve the separate Fire Alarm, Fire Sprinkler, Life Safety and Fire Protection responsibilities. - -Deliver the self-contained HTML report specified in the shared method, including evidence, coverage, source status, missing inputs and a selectable `Completed` checkbox for each actionable comment. Follow its completion-state persistence, print and release checks. User-selected completion remains separate from reviewer-verified closure. - -Keep drawings, project records, evidence and generated reports in the project workspace. These references contain the reusable review instructions. diff --git a/backend/review/prompts/provenance.json b/backend/review/prompts/provenance.json index e9cc3fc2..ac88524f 100644 --- a/backend/review/prompts/provenance.json +++ b/backend/review/prompts/provenance.json @@ -1,14 +1,8 @@ { "repository": "Author's private review-instruction repository", "revision": "8a0e2648738018631eaa6d24ee0b6ebaa239afb1", - "source": "moke-review", "promptVersion": "second-set-selected-coordination-v3", "files": [ - { - "path": "SKILL.md", - "source": "SKILL.md", - "sha256": "31a5fd53b28d936241a44abe517edfdaaafa32743df96af27e3d36656b287bb8" - }, { "path": "AGENTS.md", "source": "references/AGENTS.md", diff --git a/desktop/main.ts b/desktop/main.ts index 66f72545..4fdc5fbb 100644 --- a/desktop/main.ts +++ b/desktop/main.ts @@ -143,7 +143,7 @@ if (!app.requestSingleInstanceLock()) { ? "A saved provider connection can't be used" : "Secure credential storage is unavailable", detail: usable - ? `${messages} Reviews that need it stay unavailable until you enter the key again in Review settings or import it from the File menu.${locked ? " This can happen once after updating from MOKE 0.2.2 or earlier on macOS or Linux. Forget these keys deletes only the saved copies that can't be unlocked." : ""}` + ? `${messages} Reviews that need it stay unavailable until you enter the key again in Review settings or import it from the File menu.${locked ? " This can happen once after updating from version 0.2.2 or earlier on macOS or Linux. Forget these keys deletes only the saved copies that can't be unlocked." : ""}` : "Saved provider keys can't be read on this computer. Select a session-only credential configuration to run model reviews.", buttons: locked ? ["OK", "Forget these keys"] : ["OK"], defaultId: 0, diff --git a/docs/README.md b/docs/README.md index 2c3cba41..41f93eea 100644 --- a/docs/README.md +++ b/docs/README.md @@ -4,7 +4,8 @@ Start with [the Second Set README](../README.md) for the product, workflow, and ## Setup and development -- [Development and testing](development.md): commands, smoke/Electron suites, demo frames, and offline fixture captures. +- [Development and testing](development.md): commands, smoke/Electron suites, README screenshots, and offline fixture captures. +- [Upgrading from 0.2.2](upgrading.md): projects, saved keys, paused reviews, and renamed variables. - [Inference setup](inference.md): provider keys, canonical routes, and manual API checks. - [Cloud reviews](cloud-reviews.md): Push to cloud, operator setup, sandbox lifetimes, and recovery limits. - [Model reference](models.md): the Meta catalog and the Baseten hackathon endpoint. @@ -25,9 +26,6 @@ Start with [the Second Set README](../README.md) for the product, workflow, and ## Validation records -The [hackathon rules and repository evidence](validation/hackathon-readiness.md) -records the participant guide check and what this repository can verify. - These record specific live runs on the dates they state. They are not benchmarks for unseen drawings. Raw request and response receipts stayed in the ignored `.local/` directory of the machine that ran them; the `*-result.json` files here diff --git a/docs/architecture/review-packages.md b/docs/architecture/review-packages.md index a26a213b..4e2d9049 100644 --- a/docs/architecture/review-packages.md +++ b/docs/architecture/review-packages.md @@ -6,7 +6,7 @@ Primary demo target: Linux x64. The writer uses same-filesystem rename, director ## Package directory -Format name `second-set-review-package`, format version `1`, hash `sha256`, engine `review-pi-1.4.0-v1`. Packages exported before the rename from MOKE name `moke-review-package` and restore unchanged. The only scope this writer produces is `application` with scope label `whole-application`. That means the whole local application database plus the originals, renders, and closed Pi journals that database references. +Format name `second-set-review-package`, format version `1`, hash `sha256`, engine `review-pi-1.4.0-v1`. Packages exported by 0.2.2 and earlier use the earlier format name and restore unchanged. The only scope this writer produces is `application` with scope label `whole-application`. That means the whole local application database plus the originals, renders, and closed Pi journals that database references. ```text manifest.json diff --git a/docs/cloud-reviews.md b/docs/cloud-reviews.md index 18860dcb..b391cd79 100644 --- a/docs/cloud-reviews.md +++ b/docs/cloud-reviews.md @@ -172,8 +172,9 @@ authenticated NDJSON on the existing loopback endpoint, then Electron's trusted MessagePort to the renderer. The renderer does not hold Modal credentials or open a connection to a public sandbox endpoint. -For an active review the backend watches the worker folder, `/second-set`, or `/moke` -for a job dispatched to a protocol-5 worker, with Modal's filesystem watch API, filtering atomic updates of `progress.json`. These are wake-up hints, not +For an active review the backend watches the worker folder with Modal's filesystem watch +API and filters atomic updates of `progress.json`. The folder is `/second-set`, or the +earlier folder for a job dispatched to a protocol-5 worker. These are wake-up hints, not the source of truth. It reconciles on initial attachment and every ten seconds as well, covering missed events, unsupported watchers, and connection loss. The watcher is bounded to thirty seconds and reconnects; local iterator cleanup @@ -320,32 +321,6 @@ cloud review has run on it yet. The `second-set-reviews-meta-api`, `second-set-reviews-baseten-api` and `second-set-reviews-opencode-go-api` Secrets were created the same day and are reachable with `SECOND_SET_API_KEY`. -The last protocol-5 worker is `moke-review-engine:9f4e2fb67`, image -`im-01M6KD1KYF0PJZMCQJXBRPKRHX`, with packet prompt v10 and code index v3, in the -`moke-reviews` App. It reported the expected identity on 2026-11-04, and the -`moke-reviews-opencode-go-api` Secret was created the same day. - -The previous worker is `moke-review-engine:4cc8c03`, image -`im-01M6DBQX7M1HEP05AA68MHBW7R`, with packet prompt v8 and code index v2, kept for -rollback. On 2026-11-02 it passed -strict identity, migration-hash, PDF worker and blocked-network checks in a fresh -sandbox. One bounded cloud packet review of the authored schematic then ran on -Muse Spark 1.3, returned automatically and imported, with no sandbox left running. -Its citations to indexed ICC sections recorded no quote or access note, and the -statute it read came back verified. - -The previous image is `moke-review-engine:v0.2.0`, -`im-01M6D10NCS3MSF4WYCNCYJGYJS`, with packet prompt v7 and code index v1. A v0.2.0 -desktop fails the identity probe against `latest`, before any transfer, so it must -select that immutable tag in its private operator configuration. - -Protocol 3 was deployed from `d7ba4f874` as `moke-review-engine:d7ba4f874`, -image `im-01M630XTWWQWB3FM0K4NY8NR0D`. The image passed strict identity, -migration-hash and native PDF readiness checks. Its bounded live run verified -ownership fencing, backend close/reopen, RPC progress and automatic -verified-package return. Its single sent Meta request remained uncertain, with no -successful response receipt, and was not retried. - `cloud-reviews.test.ts` exercises persisted ownership, duplicate commands, ambiguous dispatch, stop failures, wrong job identity, required checkpoints, stale source versions, interrupted imports, corrupted ownership records, and @@ -357,12 +332,12 @@ accepting evidence. Existing execution tests cover provider and SAM admission. missing cache file, local reuse during result download, launch seeding, prune scoping and in-cloud copies after Send. -Protocol 4 is not deployed yet. A bounded live probe on 2026-10-30 (random bytes, +Before protocol 4 shipped, a bounded live probe on 2026-10-30 (random bytes, no drawings, secrets or model calls; test Volume and snapshot deleted, sandboxes terminated) confirmed the Volume behavior this design relies on: a v2 Volume mounted read-write accepts `copyFromLocal`, `sync` commits it, a read-only mount rejects writes, `listFiles` on a missing folder raises not-found, a mounted -`/moke` directory snapshot keeps its `input/` layout, and a running sandbox keeps +worker directory snapshot keeps its `input/` layout, and a running sandbox keeps its mount-time view until it reloads. Live validation is available with `bun scripts/validate-cloud.ts --live --calls 12` @@ -432,9 +407,9 @@ prompts, migrations or the code index change. Recovery only observes work already `dispatching` or `running`; it never redispatches or restarts a model. Earlier identities must still match the current -engine and instruction revision. Workers built before protocol 6 announce the MOKE-era -names they shipped with: count prompt `moke-selected-coordination-v2` and packet prompts -`moke-packet-review-v1` to `v10`. Protocols 2 to 4 omit the code index; earlier protocol-5 workers use index v1: +engine and instruction revision. Workers built before protocol 6 announce the +names they shipped with: count prompt v2 and packet prompts v1 to v10, listed in +`backend/cloud/progress.ts`. Protocols 2 to 4 omit the code index; earlier protocol-5 workers use index v1: | Receipt `workerProtocol` | Progress accepted while dispatched | | ----------------------------------------- | ------------------------------------------------------------------ | @@ -448,9 +423,10 @@ Receipts in every other phase accept only current progress. ### Protocol history -Each entry records what an upgrade required when it shipped, with the names in use then. +Each entry records what an upgrade required when it shipped. Prompt versions before +v11 are named by number; migration 0014 gave their saved records the `second-set-` prefix. -**Protocol 6** ships the rename from MOKE to Second Set. The worker keeps its files +**Protocol 6** ships the rename to Second Set. The worker keeps its files under `/second-set` and `/opt/second-set`, reads `SECOND_SET_CLOUD_PROVIDERS`, and expects each provider Secret's key as `SECOND_SET_API_KEY`. The defaults become the `second-set-reviews` App, `second-set-review-engine` image and @@ -459,15 +435,14 @@ expects each provider Secret's key as `SECOND_SET_API_KEY`. The defaults become which change only the application's name in model-facing text. Publish the image under the new App with `bun run modal:image` and create the renamed Secrets before sending; a protocol-5 image fails the identity probe. Jobs already sent to a protocol-5 worker are -still read from `/moke` and stay recoverable. Migration 0014 renames saved -`moke-packet-review-vN` and `moke-selected-coordination-v2` records to their -`second-set-` names. +still read from that worker's earlier folder and stay recoverable. Migration 0014 renames +saved packet and count prompt records to their `second-set-` names. **Protocol 4** adds the workspace cache: new receipts record the cache Volume and `workerProtocol: 4`, and the worker fills skipped files from `/cache` before restore. Publish a new worker image with `bun run modal:image` before sending protocol-4 reviews; a protocol-3 image fails the identity probe before transfer. -Packet prompt `moke-packet-review-v5` (finding decisions, the firm checklist and +Packet prompt v5 (finding decisions, the firm checklist and jurisdiction leads, with migration 0011) also needs a newly published image; a protocol-4 image built with v3 or v4 fails the probe. Jobs already sent to a v3 or v4 worker remain recoverable. @@ -477,23 +452,23 @@ normally. Unmarked receipts may recover protocol-2 or protocol-3 progress, and **Protocol 5** adds the Florida code index to the worker identity, the `search_code` tool and PDF text in `read_source`, with packet prompt -`moke-packet-review-v6`. Publish a new worker image with `bun run modal:image` +v6. Publish a new worker image with `bun run modal:image` before sending protocol-5 reviews; a protocol-4 image fails the identity probe before transfer. New receipts record `workerProtocol: 5`. Receipts already dispatched to protocol-4 workers stay readable and accept protocol-4 progress with packet prompts v3 to v5 only. -Packet prompt `moke-packet-review-v7` gives each parallel role and stage its own +Packet prompt v7 gives each parallel role and stage its own tool list and builds every sheet reviewer's opening from a saved setup snapshot. Publish a new worker image with `bun run modal:image` before sending v7 reviews; a v6 image fails the identity probe before transfer. Jobs already sent to a v6 worker stay readable. -Packet prompt `moke-packet-review-v8` removes access boilerplate and paraphrases of unread code text. It ships with `florida-code-index-v2` and requires a newly published worker image. Protocol remains 5; dispatched v6/v7 jobs with index v1 stay readable, but those identities cannot admit new work. +Packet prompt v8 removes access boilerplate and paraphrases of unread code text. It ships with `florida-code-index-v2` and requires a newly published worker image. Protocol remains 5; dispatched v6/v7 jobs with index v1 stay readable, but those identities cannot admit new work. -Packet prompt `moke-packet-review-v9` tells reviewers to log the citations their findings rest on and the ones sheets print. It ships with `florida-code-index-v3`, which marks Reserved sections and adds the real high-velocity masonry sections, and with a worker that keeps each sheet reviewer's citations apart and records a citation's source only when the review retrieved it. It requires a newly published worker image. Dispatched v8 jobs with index v2 stay readable. +Packet prompt v9 tells reviewers to log the citations their findings rest on and the ones sheets print. It ships with `florida-code-index-v3`, which marks Reserved sections and adds the real high-velocity masonry sections, and with a worker that keeps each sheet reviewer's citations apart and records a citation's source only when the review retrieved it. It requires a newly published worker image. Dispatched v8 jobs with index v2 stay readable. -Packet prompt `moke-packet-review-v10` adds image-box finding locations, carried findings on +Packet prompt v10 adds image-box finding locations, carried findings on revised sheets, the `Resolved` finding status and `withdraw_finding`. Publish a new worker image before sending v10 reviews; a v9 image fails the identity probe before transfer. Jobs already sent to a v9 worker stay readable. diff --git a/docs/data.md b/docs/data.md index dea3eb5f..6d3a36be 100644 --- a/docs/data.md +++ b/docs/data.md @@ -12,8 +12,9 @@ queries use Effect SQL with the Bun SQLite driver. The migration and backup code uses Bun's node:sqlite compatibility API so the existing backup format, migration hashes, and recovery behavior remain intact. No separate SQLite addon is required. -Releases through 0.2.2 shipped as `moke-meta-hackathon` and stored this directory -under that name. When the old folder holds app.sqlite and the Second Set folder +Releases through 0.2.2 shipped under an earlier name and stored this directory +under it; `legacyDataFolder` in +[desktop/data-directory.ts](../desktop/data-directory.ts) records it. When the old folder holds app.sqlite and the Second Set folder does not, Electron keeps using the old folder in place and moves or copies nothing. See [desktop/data-directory.ts](../desktop/data-directory.ts). An explicit `--user-data-dir` or `PROJECT_KIT_DATA_DIRECTORY` takes precedence. On Windows, @@ -117,18 +118,19 @@ The renderer version changes with the pinned PDF.js or canvas version. Rendering checks the original's hash on the exact bytes given to PDF.js; a replaced original fails and stores no image. -Migration 0014 follows the rename from MOKE to Second Set. Saved run prompt versions, +Migration 0014 follows the rename to Second Set. Saved run prompt versions, packet review and record payloads, command receipts and execution responses take the -`second-set-` instruction names, so `moke-packet-review-v10` reads +`second-set-` instruction names, so packet prompt v10 reads `second-set-packet-review-v10`. Provider attempts, tool results and SAM records are left byte for byte as the record of what was sent and returned. Renderer identities stay -unchanged: `moke-render-2` is hashed into every stored render's identity, and renaming it -would rasterize every sheet again for the same pixels. +unchanged: the renderer version string in +[render-identity.ts](../backend/documents/render-identity.ts) is hashed into every stored +render's identity, and renaming it would rasterize every sheet again for the same pixels. PDF.js removes an embedded image larger than its image limit from the page without an error. -Renderer `moke-render-1` used the 16-megapixel output limit there, so scanned schedules and +Renderer version 1 used the 16-megapixel output limit there, so scanned schedules and details above it rendered as blank paper; a 17.6-megapixel panel schedule on a sample sheet -was reported as missing. `moke-render-2` decodes embedded images up to 150 megapixels, enough +was reported as missing. Renderer version 2 decodes embedded images up to 150 megapixels, enough for a 24 x 36-inch sheet scanned at 400 ppi, and its new renderer version keeps earlier renders from being reused. With those images drawn, a full sheet can exceed the 1 MiB model image limit as PNG; images for the reasoning model and reports then go as JPEG at the same pixel size, so @@ -221,9 +223,9 @@ New cloud receipts record `workerProtocol: 6`, the only protocol admitted for ne work, with packet prompt `second-set-packet-review-v11`. Older receipts recover progress only for jobs already `dispatching` or `running`: unmarked receipts accept protocol 2 or 3, protocol-3 receipts accept protocol 3, protocol-4 receipts accept protocol 4 with -packet prompts v3 to v5, and protocol-5 receipts accept the MOKE-era protocol-5 workers, -read from `/moke`. A count fact restored from such a result keeps -`moke-selected-coordination-v2` until migration 0014 runs at the next launch. [Current admission and recovery](cloud-reviews.md#current-admission-and-recovery) +packet prompts v3 to v5, and protocol-5 receipts accept protocol-5 workers built before the rename, +read from their earlier worker folder. A count fact restored from such a result keeps +the count prompt v2 name until migration 0014 runs at the next launch. [Current admission and recovery](cloud-reviews.md#current-admission-and-recovery) lists the exact identities. Recovery changes no saved review content and never replays model work. Existing explicit sync pauses remain paused until **Retry sync**; ownership returns only through verified result diff --git a/docs/development.md b/docs/development.md index 06916e3a..a9912d49 100644 --- a/docs/development.md +++ b/docs/development.md @@ -78,9 +78,9 @@ provider availability or model accuracy. ## README screenshots -The README uses frames from the narrated demo. See -[screenshot sources](screenshots/README.md) for the source video, timestamps, and -extraction commands. These images show actual model reviews and saved decisions. +The README screenshots are captures of a real review workspace. See +[screenshot sources](screenshots/README.md) for how they were taken and how to +capture them again. These images show actual model reviews and saved decisions. ## Offline fixture captures diff --git a/docs/experiments/adaptive-meta-review.md b/docs/experiments/adaptive-meta-review.md index 78ef9106..946fc67e 100644 --- a/docs/experiments/adaptive-meta-review.md +++ b/docs/experiments/adaptive-meta-review.md @@ -1,7 +1,6 @@ # Adaptive Meta drawing review -The hackathon rubric assigns 25% to creative use of Meta AI tooling. This -experiment combines Muse Spark 1.3 reasoning, independent visual observations, +This experiment combines Muse Spark 1.3 reasoning, independent visual observations, and SAM 3.1 segmentation in an evidence-seeking electrical review. Muse chooses local tools through Meta's Responses API; the application executes them against the original PDF and returns new source images and mask feedback. @@ -26,7 +25,7 @@ Live runs use `MODEL_API_KEY`, `META_API_BASE_URL` (default ```sh bun run test:review-agent --live \ - --fixtures Moke-Hackathon-Drawings \ + --fixtures drawing-fixtures \ --manifest experiments/sam/symbols/crops.json \ --cases experiments/sam/adaptive-cases.json \ --case exam-development \ diff --git a/docs/experiments/plumbing-segmentation.md b/docs/experiments/plumbing-segmentation.md index a6c0c25a..6851a869 100644 --- a/docs/experiments/plumbing-segmentation.md +++ b/docs/experiments/plumbing-segmentation.md @@ -48,7 +48,7 @@ input hashes, raw responses, and PDF transforms apply. Render schedule evidence: ```sh pdftoppm -f 1 -l 1 -r 144 -x 1584 -y 24 -W 3000 -H 636 \ - -singlefile -png Moke-Hackathon-Drawings/pdfs/sample-c.pdf .local/c-schedule + -singlefile -png drawing-fixtures/pdfs/sample-c.pdf .local/c-schedule ``` Use the resulting SAM run directory to create the offline worksheet: diff --git a/docs/experiments/sam-drawing-expansion.md b/docs/experiments/sam-drawing-expansion.md index 45d0f265..d65dce8c 100644 --- a/docs/experiments/sam-drawing-expansion.md +++ b/docs/experiments/sam-drawing-expansion.md @@ -149,7 +149,7 @@ that reference PNG. Actual run-image hashes are saved with each result. ```sh bun run test:sam --live \ - --fixtures Moke-Hackathon-Drawings \ + --fixtures drawing-fixtures \ --manifest experiments/sam/symbols/crops.json \ --cases experiments/sam/symbols/holdout-cases.json \ --output .local/sam/symbol-replay diff --git a/docs/experiments/sam-expanded-sets.md b/docs/experiments/sam-expanded-sets.md index 34337f24..ef4ec218 100644 --- a/docs/experiments/sam-expanded-sets.md +++ b/docs/experiments/sam-expanded-sets.md @@ -4,7 +4,7 @@ This continues the [drawing expansion](sam-drawing-expansion.md) and [adaptive Meta review](adaptive-meta-review.md) using the additional fixture pack -at `Moke-Hackathon-Drawings/expanded/`. Its README inventories 37 anonymized +at `drawing-fixtures/expanded/`. Its README inventories 37 anonymized sheets from Samples D–J plus a hydraulic extract. The pack contains three new electrical styles, structural plans and connection details, civil grading, fire alarm, sprinklers and related coordination inputs. @@ -83,7 +83,7 @@ Preparation renders original PDF crops without inference: ```sh bun run test:sam \ - --fixtures Moke-Hackathon-Drawings/expanded \ + --fixtures drawing-fixtures/expanded \ --manifest experiments/sam/expanded/crops.json \ --cases experiments/sam/expanded/shape-cases.json ``` diff --git a/docs/experiments/segmentation-test.md b/docs/experiments/segmentation-test.md index 55e9888e..87dad15b 100644 --- a/docs/experiments/segmentation-test.md +++ b/docs/experiments/segmentation-test.md @@ -14,7 +14,7 @@ Install Poppler so `pdftoppm` is on `PATH`, for example `brew install poppler` o macOS or `sudo apt-get install poppler-utils` on Ubuntu. On Windows, install Poppler and add its `Library/bin` directory to `PATH`. -The local `Moke-Hackathon-Drawings/` pack must include `drawing-manifest.json` +The local `drawing-fixtures/` pack must include `drawing-manifest.json` and its `pdfs/` directory. These local fixtures remain excluded from Git. First prepare the requests without making model calls: diff --git a/docs/review-runtime.md b/docs/review-runtime.md index c0a70db3..1d386806 100644 --- a/docs/review-runtime.md +++ b/docs/review-runtime.md @@ -96,7 +96,7 @@ evidence: the current drawings and governing sources still establish every findi the saved revision correspondence. It updates each by id, or marks it `Resolved` after inspecting the revised sheet; only carried findings can become `Resolved`. - **Firm checklist.** Saved in Review settings and frozen into each review at start. Packet prompt - `moke-packet-review-v5` appends it after the requested scope, so reviews with and without a + v5 appends it after the requested scope, so reviews with and without a checklist share every cached token before it, and the coordinator and sheet reviewers receive the same text. A deviation is a Recommendation unless a verified governing source makes it a code, permit or agency finding. diff --git a/docs/screenshots/README.md b/docs/screenshots/README.md index da35de65..0bf84608 100644 --- a/docs/screenshots/README.md +++ b/docs/screenshots/README.md @@ -1,23 +1,16 @@ # Screenshot sources The README screenshots are captures of the application at 1600 × 900 and a 1.6 device -scale, which gives 2560 × 1440 frames like the narrated demo's. They were taken on -2026-11-09 from a copy of the workspace that recorded the demo, opened in a private -display with providers configured but never called. The capture adds no cropping or -content edits. One empty project in that copy, then named "MOKE Demo", was renamed -"Second Set Demo" before capture. - -[Watch the demo on YouTube](https://youtu.be/wl8wwq_Tlrw). The demo was recorded before the -rename, so it shows the MOKE name. +scale, which gives 2560 × 1440 frames. They were taken on 2026-11-09 from a copy of a +real review workspace, opened in a private display with providers configured but never +called. The capture adds no cropping or content edits. One empty project in that copy +was renamed before capture. | Image | Content | | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | | [workbench.png](workbench.png) | Five-sheet civil review with 19 findings, coverage gaps, and findings navigation | | [correction.png](correction.png) | Source evidence with a SAM highlight and a saved false-alarm decision explaining that identifying information was removed for the demo | -The demo's October 31 revision frame, from a 13-sheet set, is not in the workspace copy, -so the README links to that moment in the video instead. - ## Capture the screenshots `tests/e2e/readme-screenshots.spec.ts` opens the "Single Family Lot Drainage and Grading diff --git a/docs/upgrading.md b/docs/upgrading.md new file mode 100644 index 00000000..c95b3e14 --- /dev/null +++ b/docs/upgrading.md @@ -0,0 +1,17 @@ +# Upgrading from 0.2.2 + +Version 0.3.0 renamed the app to Second Set. If you used 0.2.2 or earlier: + +- Second Set installs as a new app beside the old one and opens its projects from + the same data folder. Don't run both at once; uninstall the old app when you're + done with it. +- On macOS and Linux, keys saved by the old app may not unlock. Enter them again in + Review settings or import them from the File menu; the keys that still unlock keep + working. +- A review paused in the old app can't resume. Start a new review; finished reviews + and their reports are unchanged. +- Environment variables now start with `SECOND_SET_`, for example + `SECOND_SET_MODAL_CONFIG` and `SECOND_SET_SESSION_CREDENTIAL_FILE`. A saved Modal + configuration needs `appName` `second-set-reviews` and `imageName` + `second-set-review-engine:latest`, and each provider Secret needs the key + `SECOND_SET_API_KEY`; see [cloud reviews](cloud-reviews.md). diff --git a/docs/validation/cloud-validation.md b/docs/validation/cloud-validation.md index 94724138..8eced92a 100644 --- a/docs/validation/cloud-validation.md +++ b/docs/validation/cloud-validation.md @@ -1,7 +1,7 @@ # Live cloud review validation Observed October 29, 2026 UTC (October 28 in New York), using Bun 1.4.4, -`modal@0.11.1`, the `moke-reviews` App, and `moke-review-engine:latest`. +`modal@0.11.1`, and the review App and engine image in use before the rename to Second Set. Only Second Set's authored two-sheet schematic was uploaded. No customer drawings were used. Account credentials were delivered privately and are excluded from the repository and worker image. @@ -52,7 +52,7 @@ case as **Partial results ready** instead of claiming the inspection finished. injection is scoped to the exact provider host. Sandbox-wide egress filtering is not claimed for this configuration. - Injection requires a named Secret. The application references - `moke-reviews-meta-api` or its configured app/provider equivalent. Creating the + `second-set-reviews-meta-api` or its configured app/provider equivalent. Creating the named Secret is an operator step; the application and workers use Bun. - SDK exec timeouts must be whole-second millisecond values. Transfer deadlines are rounded down before dispatch, and the worker contract rejects incompatible diff --git a/docs/validation/fast-initial-review.md b/docs/validation/fast-initial-review.md index 3c9c69fc..e6344b74 100644 --- a/docs/validation/fast-initial-review.md +++ b/docs/validation/fast-initial-review.md @@ -82,6 +82,6 @@ longer resend every retained image as base64 on each turn. ## Evidence Full-screen recordings (2560×1600) and screenshots are kept outside the repository in -`Downloads/Moke-fast-review-2026-10-30` on the test machine: `02` Brewery on Windows, +a downloads folder on the test machine, dated 2026-10-30: `02` Brewery on Windows, `04` Brewery in the cloud, `05` Civil on Windows, `08` Civil in the cloud. Run timelines and samples are in the ignored `.local/fast-review/`. diff --git a/docs/validation/hackathon-readiness.md b/docs/validation/hackathon-readiness.md deleted file mode 100644 index fb20026a..00000000 --- a/docs/validation/hackathon-readiness.md +++ /dev/null @@ -1,29 +0,0 @@ -# Hackathon rules and repository evidence - -Checked November 4, 2026 against the live -[participant guide](https://cerebralvalley.ai/e/meta-ai-developer-hackathon/details) -using Browser Control. This records repository evidence and verification limits; -it does not certify participant eligibility or guarantee a judging outcome. - -| Requirement | Repository evidence | -| ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Address a problem statement and incorporate Meta models | Second Set addresses Build for Your World through engineering drawing review. [Model routes](../../src/lib/review/models.ts) include Muse Spark, Muse Wonder, Muse Spark Open through Baseten, and Muse Spark 1.3 Contributor through OpenCode Go. [SAM evidence](../experiments/adaptive-meta-review.md) documents segmentation. | -| Public repository | GitHub reported `sc-frederick/moke-meta-hackathon`, now `Surfside-Software/second-set`, as public during this check. | -| Identify work built during the event | The application history starts October 27, 2026 at `0c5e8716c`. The [README](../../README.md#hackathon-provenance), [manifest](../../.project-kit/manifest.json), and [prompt provenance](../../backend/review/prompts/README.md) distinguish the new application from the project-kit starter, earlier Moke prompts, the pre-existing [2023 Florida code reference](../../backend/review/code-index/README.md), and dependencies. The code index tooling and additions were introduced in the October 30 implementation. | -| Respect code, data, and asset rights | The [MIT License](../../LICENSE), [design attribution](../design.md), and [Tabler license](../../src/lib/review/TABLER-LICENSE) document source attribution. The licensed Forge reference pack and local drawing fixture directory are excluded from tracked files. The [demo frames](../screenshots/README.md) retain the recorded footage and its labels. These checks do not independently establish ownership of every dependency or drawing. | -| Three-minute demo showing the new work | The local narrated demo cut used for the screenshots is 151.541 seconds. It shows the review results, source evidence, saved decisions, and a labeled earlier revision review. [Frame provenance](../screenshots/README.md) identifies its source and timestamps. | -| Baseten hackathon model identifier | The configured route uses `meta-models/muse-spark-open-1026`, as the guide requires for the supplied Baseten key. [Recorded validation](baseten-rate-limits.md) documents use of that route. | - -The open-weight bonus is judged separately and requires the infrastructure -partner to verify eligible model use. Supporting Muse Spark Open and recording -past runs are evidence, not a guarantee of bonus eligibility or current credit. - -## Submission checks outside this repository - -The guide gives a November 4, 2026 deadline of 9:00 PM Eastern Time, requires one -submission per team, limits teams to four participants, and requires everyone who -worked on the project to be listed. It also requires the submitted video link to -be accessible. This repository check does not verify the final platform -submission, roster, waiver acceptance, participant eligibility, or access to the -submitted video URL. The local demo duration does not establish that the same cut -is the one submitted. diff --git a/experiments/sam/expanded/captured-locations.json b/experiments/sam/expanded/captured-locations.json index fafd3bb1..253ef8ff 100644 --- a/experiments/sam/expanded/captured-locations.json +++ b/experiments/sam/expanded/captured-locations.json @@ -81,7 +81,7 @@ "crop": { "id": "audit-d-baths-small-room", "file": ".local/sam/iteration-5/electrical-audit/d-baths-small-room.png", - "pdf": "Moke-Hackathon-Drawings/expanded/pdfs/sample-d.pdf", + "pdf": "drawing-fixtures/expanded/pdfs/sample-d.pdf", "page": 11, "sheet": "E-2", "pdf_rect_points": [744, 600, 1008, 912], @@ -171,8 +171,8 @@ "family": "guided-live", "crop": { "id": "exp-e-lighting", - "file": "Moke-Hackathon-Drawings/expanded/sam-crops-300dpi/exp-e-lighting.png", - "pdf": "Moke-Hackathon-Drawings/expanded/pdfs/sample-e.pdf", + "file": "drawing-fixtures/expanded/sam-crops-300dpi/exp-e-lighting.png", + "pdf": "drawing-fixtures/expanded/pdfs/sample-e.pdf", "page": 5, "sheet": "E-2", "pdf_rect_points": [864, 714, 1296, 1146], @@ -262,8 +262,8 @@ "family": "guided-live", "crop": { "id": "exp-f-power", - "file": "Moke-Hackathon-Drawings/expanded/sam-crops-300dpi/exp-f-power.png", - "pdf": "Moke-Hackathon-Drawings/expanded/pdfs/sample-f.pdf", + "file": "drawing-fixtures/expanded/sam-crops-300dpi/exp-f-power.png", + "pdf": "drawing-fixtures/expanded/pdfs/sample-f.pdf", "page": 2, "sheet": "E100", "pdf_rect_points": [756, 204, 1188, 636], @@ -381,7 +381,7 @@ "crop": { "id": "audit-g-porch-supports", "file": ".local/sam/iteration-5/structural-audit/g-porch-supports.png", - "pdf": "Moke-Hackathon-Drawings/expanded/pdfs/sample-g.pdf", + "pdf": "drawing-fixtures/expanded/pdfs/sample-g.pdf", "page": 2, "sheet": "S-2", "pdf_rect_points": [432, 324, 960, 624], @@ -1493,7 +1493,7 @@ "crop": { "id": "audit-g-baseplate-holes", "file": ".local/sam/iteration-5/structural-audit/g-baseplate-context.png", - "pdf": "Moke-Hackathon-Drawings/expanded/pdfs/sample-g.pdf", + "pdf": "drawing-fixtures/expanded/pdfs/sample-g.pdf", "page": 3, "sheet": "S-3", "pdf_rect_points": [72, 1248.12, 576, 1650.24], @@ -1575,7 +1575,7 @@ "crop": { "id": "audit-g-baseplate-holes", "file": ".local/sam/iteration-5/structural-audit/g-baseplate-context.png", - "pdf": "Moke-Hackathon-Drawings/expanded/pdfs/sample-g.pdf", + "pdf": "drawing-fixtures/expanded/pdfs/sample-g.pdf", "page": 3, "sheet": "S-3", "pdf_rect_points": [72, 1248.12, 576, 1650.24], @@ -1602,7 +1602,7 @@ "crop": { "id": "audit-g-baseplate-holes", "file": ".local/sam/iteration-5/structural-audit/g-baseplate-context.png", - "pdf": "Moke-Hackathon-Drawings/expanded/pdfs/sample-g.pdf", + "pdf": "drawing-fixtures/expanded/pdfs/sample-g.pdf", "page": 3, "sheet": "S-3", "pdf_rect_points": [72, 1248.12, 576, 1650.24], @@ -1639,7 +1639,7 @@ "crop": { "id": "audit-g-porch-supports", "file": ".local/sam/iteration-5/structural-audit/g-porch-supports.png", - "pdf": "Moke-Hackathon-Drawings/expanded/pdfs/sample-g.pdf", + "pdf": "drawing-fixtures/expanded/pdfs/sample-g.pdf", "page": 2, "sheet": "S-2", "pdf_rect_points": [432, 324, 960, 624], @@ -1666,7 +1666,7 @@ "crop": { "id": "audit-h-diagonal-braces", "file": ".local/sam/iteration-5/structural-audit/h-roof-braces.png", - "pdf": "Moke-Hackathon-Drawings/expanded/pdfs/sample-h.pdf", + "pdf": "drawing-fixtures/expanded/pdfs/sample-h.pdf", "page": 1, "sheet": "S-1", "pdf_rect_points": [1080, 540, 1800, 1248], @@ -1692,7 +1692,7 @@ "family": "manual-live", "crop": { "id": "exp-e-lighting", - "file": "Moke-Hackathon-Drawings/expanded/sam-crops-300dpi/exp-e-lighting.png", + "file": "drawing-fixtures/expanded/sam-crops-300dpi/exp-e-lighting.png", "pdf": "pdfs/sample-e.pdf", "page": 5, "sheet": "E-2", @@ -1729,7 +1729,7 @@ "family": "manual-live", "crop": { "id": "exp-f-lighting", - "file": "Moke-Hackathon-Drawings/expanded/sam-crops-300dpi/exp-f-lighting.png", + "file": "drawing-fixtures/expanded/sam-crops-300dpi/exp-f-lighting.png", "pdf": "pdfs/sample-f.pdf", "page": 2, "sheet": "E100", diff --git a/experiments/sam/expanded/crops.json b/experiments/sam/expanded/crops.json index 4501265e..83076c21 100644 --- a/experiments/sam/expanded/crops.json +++ b/experiments/sam/expanded/crops.json @@ -2,7 +2,7 @@ "crops": [ { "id": "exp-d-lighting", - "file": "Moke-Hackathon-Drawings/expanded/sam-crops-300dpi/exp-d-lighting.png", + "file": "drawing-fixtures/expanded/sam-crops-300dpi/exp-d-lighting.png", "pdf": "pdfs/sample-d.pdf", "page": 11, "sheet": "E-2", @@ -19,7 +19,7 @@ }, { "id": "exp-d-power", - "file": "Moke-Hackathon-Drawings/expanded/sam-crops-300dpi/exp-d-power.png", + "file": "drawing-fixtures/expanded/sam-crops-300dpi/exp-d-power.png", "pdf": "pdfs/sample-d.pdf", "page": 12, "sheet": "E-3", @@ -36,7 +36,7 @@ }, { "id": "exp-e-lighting", - "file": "Moke-Hackathon-Drawings/expanded/sam-crops-300dpi/exp-e-lighting.png", + "file": "drawing-fixtures/expanded/sam-crops-300dpi/exp-e-lighting.png", "pdf": "pdfs/sample-e.pdf", "page": 5, "sheet": "E-2", @@ -53,7 +53,7 @@ }, { "id": "exp-e-power", - "file": "Moke-Hackathon-Drawings/expanded/sam-crops-300dpi/exp-e-power.png", + "file": "drawing-fixtures/expanded/sam-crops-300dpi/exp-e-power.png", "pdf": "pdfs/sample-e.pdf", "page": 6, "sheet": "E-3", @@ -70,7 +70,7 @@ }, { "id": "exp-f-power", - "file": "Moke-Hackathon-Drawings/expanded/sam-crops-300dpi/exp-f-power.png", + "file": "drawing-fixtures/expanded/sam-crops-300dpi/exp-f-power.png", "pdf": "pdfs/sample-f.pdf", "page": 2, "sheet": "E100", @@ -87,7 +87,7 @@ }, { "id": "exp-f-lighting", - "file": "Moke-Hackathon-Drawings/expanded/sam-crops-300dpi/exp-f-lighting.png", + "file": "drawing-fixtures/expanded/sam-crops-300dpi/exp-f-lighting.png", "pdf": "pdfs/sample-f.pdf", "page": 2, "sheet": "E100", @@ -104,7 +104,7 @@ }, { "id": "exp-g-foundation", - "file": "Moke-Hackathon-Drawings/expanded/sam-crops-300dpi/exp-g-foundation.png", + "file": "drawing-fixtures/expanded/sam-crops-300dpi/exp-g-foundation.png", "pdf": "pdfs/sample-g.pdf", "page": 2, "sheet": "S-2", @@ -121,7 +121,7 @@ }, { "id": "exp-g-footing-detail", - "file": "Moke-Hackathon-Drawings/expanded/sam-crops-300dpi/exp-g-footing-detail.png", + "file": "drawing-fixtures/expanded/sam-crops-300dpi/exp-g-footing-detail.png", "pdf": "pdfs/sample-g.pdf", "page": 3, "sheet": "S-3", @@ -138,7 +138,7 @@ }, { "id": "exp-h-trusses", - "file": "Moke-Hackathon-Drawings/expanded/sam-crops-300dpi/exp-h-trusses.png", + "file": "drawing-fixtures/expanded/sam-crops-300dpi/exp-h-trusses.png", "pdf": "pdfs/sample-h.pdf", "page": 1, "sheet": "S-1", @@ -155,7 +155,7 @@ }, { "id": "exp-i-grading", - "file": "Moke-Hackathon-Drawings/expanded/sam-crops-300dpi/exp-i-grading.png", + "file": "drawing-fixtures/expanded/sam-crops-300dpi/exp-i-grading.png", "pdf": "pdfs/sample-i.pdf", "page": 3, "sheet": "C-3", @@ -172,7 +172,7 @@ }, { "id": "exp-j-alarm", - "file": "Moke-Hackathon-Drawings/expanded/sam-crops-300dpi/exp-j-alarm.png", + "file": "drawing-fixtures/expanded/sam-crops-300dpi/exp-j-alarm.png", "pdf": "pdfs/sample-j.pdf", "page": 2, "sheet": "FA-2", @@ -189,7 +189,7 @@ }, { "id": "exp-e-sprinklers", - "file": "Moke-Hackathon-Drawings/expanded/sam-crops-300dpi/exp-e-sprinklers.png", + "file": "drawing-fixtures/expanded/sam-crops-300dpi/exp-e-sprinklers.png", "pdf": "pdfs/sample-e.pdf", "page": 8, "sheet": "SP-2", @@ -206,7 +206,7 @@ }, { "id": "exp-e-riser", - "file": "Moke-Hackathon-Drawings/expanded/sam-crops-300dpi/exp-e-riser.png", + "file": "drawing-fixtures/expanded/sam-crops-300dpi/exp-e-riser.png", "pdf": "pdfs/sample-e.pdf", "page": 9, "sheet": "SP-3", diff --git a/experiments/sam/expanded/expectations.json b/experiments/sam/expanded/expectations.json index a475d8d9..c99111ae 100644 --- a/experiments/sam/expanded/expectations.json +++ b/experiments/sam/expanded/expectations.json @@ -9,7 +9,7 @@ { "id": "j-maintenance", "cropId": "exp-j-alarm", - "sourceImage": "Moke-Hackathon-Drawings/expanded/sam-crops-300dpi/exp-j-alarm.png", + "sourceImage": "drawing-fixtures/expanded/sam-crops-300dpi/exp-j-alarm.png", "pdf": "pdfs/sample-j.pdf", "page": 2, "sheet": "FA-2", @@ -98,7 +98,7 @@ { "id": "f-tagged-lighting", "cropId": "exp-f-lighting", - "sourceImage": "Moke-Hackathon-Drawings/expanded/sam-crops-300dpi/exp-f-lighting.png", + "sourceImage": "drawing-fixtures/expanded/sam-crops-300dpi/exp-f-lighting.png", "pdf": "pdfs/sample-f.pdf", "page": 2, "sheet": "E100", @@ -212,7 +212,7 @@ { "id": "e-highbay-and-fan", "cropId": "exp-e-lighting", - "sourceImage": "Moke-Hackathon-Drawings/expanded/sam-crops-300dpi/exp-e-lighting.png", + "sourceImage": "drawing-fixtures/expanded/sam-crops-300dpi/exp-e-lighting.png", "pdf": "pdfs/sample-e.pdf", "page": 5, "sheet": "E-2", @@ -347,12 +347,12 @@ "sources": [ { "id": "sample-g", - "file": "Moke-Hackathon-Drawings/expanded/pdfs/sample-g.pdf", + "file": "drawing-fixtures/expanded/pdfs/sample-g.pdf", "sha256": "7e868ef915f63dbb34cef8931c28a38ab2c901fdd75ccd5e09b31a1f6aee2faa" }, { "id": "sample-h", - "file": "Moke-Hackathon-Drawings/expanded/pdfs/sample-h.pdf", + "file": "drawing-fixtures/expanded/pdfs/sample-h.pdf", "sha256": "7674e7bceced42e4c337ad8d1304d1b4e60e9e0d6637a9c11aae870b0796ba7e" } ], diff --git a/experiments/sam/plumbing-crops.json b/experiments/sam/plumbing-crops.json index 5ed645c9..90758b1e 100644 --- a/experiments/sam/plumbing-crops.json +++ b/experiments/sam/plumbing-crops.json @@ -15,7 +15,7 @@ "scale": 0.24, "offset_points": [252, 1350] }, - "purpose": "Moke plumbing plan versus fixture schedule experiment", + "purpose": "Plumbing plan versus fixture schedule experiment", "sha256": "cfab98a4b8a022cf6dac3cb311e6fb856a3dce45ebeb61d4925f1c5bc22e148d" }, { @@ -32,7 +32,7 @@ "scale": 0.24, "offset_points": [648, 888] }, - "purpose": "Moke plumbing plan versus fixture schedule experiment", + "purpose": "Plumbing plan versus fixture schedule experiment", "sha256": "16751ca1df574bfc6bbb92b9b39171e530700bd2c20e6ead0332bb12aa63417e" }, { @@ -49,7 +49,7 @@ "scale": 0.24, "offset_points": [1200, 540] }, - "purpose": "Moke plumbing plan versus fixture schedule experiment", + "purpose": "Plumbing plan versus fixture schedule experiment", "sha256": "879daf7338cdd7496669da89fc077176983c284e2166d22b0a711360fcccc1c0" }, { @@ -66,7 +66,7 @@ "scale": 0.24, "offset_points": [1728, 96] }, - "purpose": "Moke plumbing plan versus fixture schedule experiment", + "purpose": "Plumbing plan versus fixture schedule experiment", "sha256": "18521eca71bc2fe56caf90d1640dd3cf457dd81a3b91d9eebe27431e29f936ff" } ] diff --git a/experiments/sam/symbols/crops.json b/experiments/sam/symbols/crops.json index 3c0f18a2..060ae81b 100644 --- a/experiments/sam/symbols/crops.json +++ b/experiments/sam/symbols/crops.json @@ -291,7 +291,7 @@ }, { "id": "sam-01-a-m2-revision-1", - "file": "Moke-Hackathon-Drawings/sam-crops-300dpi/sam-01-a-m2-revision-1.png", + "file": "drawing-fixtures/sam-crops-300dpi/sam-01-a-m2-revision-1.png", "pdf": "pdfs/sample-a-revision-1.pdf", "page": 9, "sheet": "M-2", @@ -308,7 +308,7 @@ }, { "id": "sam-02-a-m2-baseline", - "file": "Moke-Hackathon-Drawings/sam-crops-300dpi/sam-02-a-m2-baseline.png", + "file": "drawing-fixtures/sam-crops-300dpi/sam-02-a-m2-baseline.png", "pdf": "pdfs/sample-a-baseline.pdf", "page": 9, "sheet": "M-2", diff --git a/scripts/test-review-agent.ts b/scripts/test-review-agent.ts index d6b0f403..3377ea86 100644 --- a/scripts/test-review-agent.ts +++ b/scripts/test-review-agent.ts @@ -29,7 +29,7 @@ const program = Effect.gen(function* () { options: { live: { type: "boolean", default: false }, help: { type: "boolean", default: false }, - fixtures: { type: "string", default: "Moke-Hackathon-Drawings" }, + fixtures: { type: "string", default: "drawing-fixtures" }, manifest: { type: "string", default: "experiments/sam/symbols/crops.json" }, cases: { type: "string", default: "experiments/sam/adaptive-cases.json" }, case: { type: "string", default: "exam-development" }, diff --git a/scripts/test-sam.ts b/scripts/test-sam.ts index 85126d65..a3d0dd10 100644 --- a/scripts/test-sam.ts +++ b/scripts/test-sam.ts @@ -13,7 +13,7 @@ const program = Effect.gen(function* () { options: { live: { type: "boolean", default: false }, help: { type: "boolean", default: false }, - fixtures: { type: "string", default: "Moke-Hackathon-Drawings" }, + fixtures: { type: "string", default: "drawing-fixtures" }, cases: { type: "string", default: "experiments/sam/cases.json" }, manifest: { type: "string" }, output: { type: "string", default: ".local/sam" }, diff --git a/tests/smoke/expanded-segmentation.test.ts b/tests/smoke/expanded-segmentation.test.ts index e840206c..0397d176 100644 --- a/tests/smoke/expanded-segmentation.test.ts +++ b/tests/smoke/expanded-segmentation.test.ts @@ -8,7 +8,7 @@ test("expanded discipline recipes preflight all prompts without PDFs or inferenc const root = resolve("experiments/sam/expanded"); const crops = await Effect.runPromise( - readCrops(resolve("Moke-Hackathon-Drawings/expanded"), resolve(root, "crops.json")), + readCrops(resolve("drawing-fixtures/expanded"), resolve(root, "crops.json")), ); const ids = new Set();