RED5SORCERY DATA SCULPTOR

PRODUCT BACKLOG PRD

Revision BL — Reconciliation Cleanup / Pre-QA Candidate

Day 045 — 22 September 2026

Free. Fast. Private. PRETTY. Data work you can explain.

What We Are Building — and Why

Data Sculptor is a local-first analytical tool for office analysts. It turns explicit Work Orders into deterministic, visible, explainable data work while keeping analytical authority with the human.

Why it exists: much analyst anxiety is forensic rather than mathematical. The difficult questions are often whether a file was read completely, whether the source changed, whether an identifier was reinterpreted, whether a failed operation created partial output, whether the work can be reproduced, and whether the analyst can explain later what actually happened.

Data Sculptor shifts that systems burden into the product. Bounded-memory processing, encoding validation, deterministic parsing, row identity, provenance, receipts, visible artifacts, and explainable refusals should be handled underneath a calm working surface rather than exported to the analyst as infrastructure work.

Suitcase → Work Order → Governed Run → Visible Evidence
Design creed — “Data work you can explain.”
I know what I asked the computer to do.
I know what it actually did.
I know what happened when it couldn’t do it.
And I can show somebody else.

Purpose before machinery. This front-door statement explains the human problem and product intent. The numbered requirements below remain the authoritative contract for scope, lifecycle, implementation, and acceptance.

How to Read This PRD / Current Build Dashboard

HTML is the working master. The SCOPE field on each requirement is the sole authority for build allocation. Dashboard counts, summaries, and indexes are derived convenience views. A PDF should be treated as a frozen snapshot, not the live backlog.

STATUS is independent lifecycle metadata. BUILD remains blank until accepted implementation. When a requirement reaches QA APPROVED, REVIEWED BY records the independent reviewer (Claude today).

UNDER REVIEWCandidate is still being specified or challenged.
QA APPROVEDIndependent adversarial requirement review has passed; not yet frozen.
FROZEN FOR BUILDT has accepted the requirement into the active development contract.
DEFERREDValid backlog item deliberately postponed.
REJECTEDDeliberately declined; retained with rationale so the decision is not lost.
BUILT & ACCEPTEDImplementation, evidence, independent QA, and human acceptance are complete.

Color is a scanning aid only. The written STATUS label is authoritative. Current WASM-002 candidates remain UNDER REVIEW in this revision unless and until review evidence changes them.

RED5SORCERY DATA SCULPTOR

PRODUCT BACKLOG PRD

Revision BL — Reconciliation Cleanup / Pre-QA Candidate

Day 045 - 22 September 2026

Free. Fast. Private. PRETTY. Data work you can explain.

Documentation is a primary interface. Human analytical authority remains final.

REVISION BL is a reconciliation cleanup of the current WASM-002 contract before independent adversarial QA. It introduces no new requirement, feature family, artifact class, or scope allocation. Current explanatory/dashboard text is aligned with the authoritative numbered requirements: WASM-002 executes one saved Work Order without Work Order chaining; the storage identity/class/collision decisions already resolved by numbered requirements are no longer described as open freeze items; Brand Manifest serialization remains deferred rather than implied as TOML; deferred white-label text no longer assigns Brand-Manifest substitution proof to WASM-002; and the storage status summary is expressed as the current contract rather than as a Revision BG snapshot. Historical revision records remain unchanged as decision history.

How to Read This PRD / Current Build Dashboard

This page is the front door to the master backlog. It shows what the fields mean, how requirement status moves, and what the current WASM-002 candidate build contains. The SCOPE field attached to each individual requirement is authoritative. This dashboard is a derived convenience view; if it ever disagrees with a requirement's SCOPE field, the requirement wins and the dashboard must be regenerated.

Read any requirement in three fields

FieldQuestion it answersHow to read it
SCOPEWhere is this intended to be built?WASM-002 means it belongs to the current candidate build slice.
BUILDWhich accepted build actually delivered it?A dash means not yet accepted. WASM-002 is written here only after verified acceptance.
STATUSWhere is it in the decision/build lifecycle?Orange review; green Claude-approved; purple frozen; blue deferred; red rejected; black built.
Lifecycle status colors - text label is authoritative; color is a visual cueLifecycle status colors - text label is authoritative; color is a visual cueLifecycle status colors - text label is authoritative; color is a visual cueLifecycle status colors - text label is authoritative; color is a visual cue
UNDER REVIEWCandidate is still being specified/challenged.QA APPROVEDClaude has reviewed and approved the requirement; not yet frozen.
FROZEN FOR BUILDT has accepted it into the frozen development contract.DEFERREDValid backlog item deliberately postponed.
REJECTEDConsidered and rejected; retained with the decision record.BUILT & ACCEPTEDImplemented, verified, independently QA'd, and accepted; BUILD is populated.

Example now: SCOPE: WASM-002 STATUS: UNDER REVIEW BUILD: -

Typical path: orange UNDER REVIEW -> green QA APPROVED -> purple FROZEN FOR BUILD by T -> black BUILT & ACCEPTED after implementation, verification, independent QA, retained evidence, and human acceptance. A candidate may instead move to blue DEFERRED or red REJECTED. Red items stay in the PRD so the decision is not forgotten.

Fast navigation: search for "SCOPE: WASM-002" to scan the current candidate build. Search for a STATUS label to scan lifecycle state. The historical W002- prefix in an ID does not determine current scope.

Current build candidate: WASM-002

Status: DRAFT / NOT FROZEN. All current SCOPE: WASM-002 requirements remain orange UNDER REVIEW in Revision BL; this revision does not presume Claude approval or T freeze. Purpose: establish the trusted path from a validated visible Suitcase and immutable saved Work Order to certified source bytes, governed materialization, visible evidence, and Help-backed refusals in the browser/WASM product.

AreaWASM-002 candidate scope at a glance
Source certificationStrict whole-file UTF-8 certification; ASCII-first fast path; strict non-ASCII validation; certification bound to exact source identity.
Materialization & visible storageOne bounded structural pass for multiple columns; permanent 1..N row identity; deterministic row alignment; Data Sculptor-controlled persistence stays visible in the flat Suitcase under the reserved __DS__ governed namespace and semantic artifact classes.
Legacy conversionWindows-1252 compatibility/conversion is an explicit separate governed operation, never a silent analytical fallback.
Diagnostics, Help & PRETTYCanonical diagnostic events governed by a validated UTF-8 diagnostics.json registry with stable diagnostic IDs, fixed severity/phase/behavior/next-action semantics, and per-diagnostic required/optional fact keys; one validated three-voice Help catalog authored as help_messages.json and embedded into the released HTML at build time; build-time cross-validation between diagnostic registry and Help placeholders; no runtime catalog fetch or adjacent catalog file; placeholder Casual / Office Speak / Technical copy is sufficient in WASM-002 to prove lookup, interpolation, switching, and coverage; persistent in-workspace Help / Diagnostic Surface; durable self-contained HLP HTML using the canonical built-in Red5Sorcery/Data Sculptor presentation; negative boundary facts; fixed disclosure policy; HLP identity and lineage. Configurable Brand Manifest and white-label implementation are deferred to a future build. Final production Help prose is a later content milestone.
Shared architectureOne shared semantic core suitable for WASM and later native CLI reuse; presentation/branding remains separated from analytical semantics; future white-label generation is enabled without semantic forks.
Work Order orchestrationWASM-002 executes one saved immutable Work Order as one top-level request. Work Order chaining/composition is deferred; recognized composition syntax must refuse before analytical execution. Multi-column materialization inside one Work Order remains allowed.
Execution contractAnalytical intent is expressed in Work Order text; executable Work Orders declare SUITCASE: .; ordinary paths are Suitcase-relative; WIP is editable/non-executable and WKO is saved/immutable/runnable; WASM-002 does not execute Work Order composition; analytical execution is sequential and exposes no parallelism controls.
Browser front endSuitcase-first writable-folder gate proven by a retained governed CER HTML validation certificate; full-width visible Suitcase Directory; read-only aliases backed by immutable governed MAP artifacts; alias create/change/clear occurs through Work Orders; one Work Order editor that can create drafts or load saved immutable WKO artifacts; only saved Work Orders can Run; editing a loaded saved Work Order creates a new draft; read-only Execution Output; Help Engine for all user-facing Help/refusal guidance; no point-and-click analytical source/column selection and no second command prompt. Presentation themes are Modern Dark and Modern Light only; theme selection cannot change analytical or diagnostic meaning. Custom presentation is deferred to V1-BACKLOG / a future build not yet numbered.

Explicitly not in WASM-002 right now

0/1 filter masks, filter combination/reuse, and filter-driven build/export are V1-BACKLOG. PRETTY Tables, Rich Footnotes, and Supporting Context are V1-BACKLOG. RQSM cloaking capacity, carrier packaging, and recovery are V1-BACKLOG and are deliberately separate from WASM-002. The explicit FINGERPRINT archival/continuity/handoff operation and its governed LCK Suitcase Lock output are also V1-BACKLOG; ordinary WASM-002 Work Order save, certification, materialization, Store inheritance, INVENTORY, and alias maintenance do not automatically hash files or create/refresh LCK artifacts. Configurable Brand Manifest implementation—including BRD serialization, parsing, selection/lifecycle, custom-brand provenance/fingerprinting, alternate-brand substitution, invalid-manifest behavior, and white-label packaging—and Custom browser presentation are also V1-BACKLOG for a future build whose number is not yet assigned. Hosted white-label configuration, payments, customer administration, and post-launch outreach are later or explicitly out of this build.

Completion rule: candidate requirements move through review and freeze before implementation. The WASM-002 slice is complete only when its frozen requirements and acceptance gates are black BUILT & ACCEPTED with retained evidence, independent QA, populated BUILD metadata, and human acceptance. Deferred and rejected items do not become obligations merely because they remain visible in this master PRD.

1. Product Backlog Governance

This document is the master product backlog and product contract record for Data Sculptor. It may contain current build requirements, later V1 work, post-V1 intentions, product principles, and documentary/method requirements. An active implementation unit such as WASM-002 freezes only the requirements explicitly allocated to that build when its development contract is accepted.

PB-GOV-001

Master backlog is broader than one build

N/A

The Product Backlog PRD may continue to capture product truth and future requirements while an accepted build slice is frozen. Adding backlog material does not silently change an active development contract.

PB-GOV-002

Requirement identity is independent of build allocation

N/A

Existing requirement IDs remain stable so historical references, evidence, QA records, and Suitcase artifacts do not break. A requirement ID must not be renumbered merely because its implementation moves to a different build unit.

PB-GOV-003

Every normative requirement carries build metadata

N/A

Each normative requirement shall expose SCOPE, STATUS, and BUILD metadata. SCOPE states current build allocation or role. STATUS records the independent decision/build lifecycle. BUILD remains blank until accepted implementation is achieved, then records the build unit in which the requirement was first accepted.

PB-GOV-004

Build flag is evidence-bounded

N/A

BUILD must not be populated merely because code exists or an experiment succeeded. The field records accepted implementation under the project's verification discipline.

PB-GOV-005

SCOPE is the sole allocation authority

N/A

The SCOPE metadata attached to an individual normative requirement is the sole authoritative statement of its current build allocation. If a dashboard, index, legacy scope declaration, or narrative summary disagrees, the requirement's SCOPE field governs and the derived view is defective.

PB-GOV-006

Dashboards and scope indexes are derived views

N/A

Dashboards, at-a-glance tables, and scope indexes summarize requirement metadata; they do not create or override scope. They must be reconciled or regenerated from the authoritative requirement fields whenever the backlog changes.

PB-GOV-007

STATUS is independent lifecycle metadata

N/A

STATUS records where an implementable backlog requirement sits in the decision/build lifecycle and must not simply duplicate SCOPE. The governed lifecycle labels are UNDER REVIEW, QA APPROVED, FROZEN FOR BUILD, DEFERRED, REJECTED, and BUILT & ACCEPTED. PRODUCT and RECORD entries may use N/A because they are not implementation lifecycle items.

PB-GOV-008

Review, freeze, and build are distinct evidence boundaries

N/A

QA APPROVED means the requirement has passed Claude's adversarial requirement review; it does not freeze the requirement. FROZEN means T has accepted the requirement into the active development contract. BUILT requires accepted implementation evidence, independent QA, and human acceptance; when STATUS becomes BUILT, BUILD must identify the accepted delivery unit.

PB-GOV-009

Deferred and rejected ideas remain visible

N/A

DEFERRED preserves a valid idea for later work. REJECTED preserves an idea that was considered and deliberately declined. Rejected items are not deleted from the backlog record; the requirement text or adjacent decision record should preserve enough rationale to prevent the same decision from being unknowingly relitigated.

PB-GOV-010

Color never carries meaning alone

N/A

The written STATUS label is authoritative. Orange, green, purple, blue, red, and black are visual scanning aids only; every rendered or extracted form of this PRD must remain understandable without color.

SCOPE and BUILD legend

SCOPE valueMeaningBUILD field
WASM-002Allocated to the current WASM-002 implementation slice, subject to freeze.Set to WASM-002 only after accepted implementation.
V1-BACKLOGRequired or intended for V1, but outside the current WASM-002 slice.Set to the later build unit that delivers it.
PRODUCTCross-cutting product definition/principle; not itself one runtime build.N/A unless a later implementation requirement is derived.
POST-V1Explicitly after V1.Set to the post-V1 build/release unit when delivered.
RECORDMethodological or documentary record rather than product runtime.N/A.
OUT-WASM-002Not allocated to WASM-002. STATUS distinguishes a deferred later item from a deliberately rejected idea.Blank until separately scheduled and accepted; N/A for a rejected historical decision record.

Current WASM-002 allocation summary

Revision BC preserves the current WASM-002 analytical center of gravity, keeps RQSM and explicit archival FINGERPRINT/LCK generation in V1-BACKLOG, and reconciles the Work Order syntax/Suitcase-relative contract, WIP/WKO lifecycle, sequential-execution rule, three-theme presentation contract, frozen diagnostic-ID grammar, Receipt-backed Flight Recorder history, and SCR-to-COL all-or-refuse publication sequence; the WASM-002 summary below remains a derived view of requirement SCOPE metadata: strict UTF-8 certification; source identity binding; one-pass multi-column materialization; row-aligned output; separate Windows-1252 conversion; canonical diagnostics; three-voice Help parity; durable branded HTML Help; Brand Manifest/provenance; shared semantic-core architecture; a Suitcase-first, Work-Order-driven browser front end with read-only execution output; read-only displayed aliases backed by immutable Work-Order-governed MAP history; and storage rules that keep generated artifacts deterministic, visible, and auditable. Disk-first filtering masks and later build/export remain deferred V1 backlog items.

2. Visible Persistence Contract

PB-STOR-001

Suitcase is the complete Data Sculptor-controlled persistence surface

UNDER REVIEW

Every persistent project or analytical artifact intentionally created by Data Sculptor must be written into the visible, user-controlled Suitcase. Data Sculptor must not intentionally persist user data, analytical state, scratch state, logs, recovery state, or project metadata in hidden AppData-style locations or browser-private persistence such as OPFS. Incidental browser/OS runtime caches outside Data Sculptor control are explicitly outside this contract.

PB-STOR-002

No Data Sculptor-created subfolders

UNDER REVIEW

Data Sculptor does not create scratch/cache subfolders inside the Suitcase. Logical organization is expressed by the flat filename grammar, open metadata, Store Map/Index, and human-facing aliases.

PB-STOR-003

Scratch work remains visible and attributable

DEFERRED

Scratch or provisional artifacts use governed visible names inside the reserved __DS__ namespace. The governed Scratch / Structural Support class is SCR, yielding the physical family __DS__SCR__... under the canonical identity grammar.

Scratch artifacts must remain attributable to purpose/source, bounded in growth, and safe to identify after interruption. This requirement remains deferred only with respect to later scratch-producing operations; the SCR class allocation itself is already frozen for WASM-002.

Storage Engine Namespace — current WASM-002 design contract

Current design status. The visible flat Suitcase remains the persistence surface under PB-STOR-001 and PB-STOR-002. The numbered namespace requirements below are authoritative for WASM-002. The ordinary immutable identity grammar, current semantic class registry, canonical UTC/UUID rendering, and collision-retry behavior have been resolved by later numbered requirements and are not reopened by this explanatory section. Class-specific serialization remains governed by each artifact contract.

__DS__ is the Data Sculptor governed namespace. The prefix is not a synonym for “temporary,” “scratch,” or “created automatically by the engine.” It means that the artifact is intentionally created, governed, or interpreted by Data Sculptor under an explicit contract. A human-authored Work Order can therefore belong to the namespace just as a generated Receipt or Help Report can.

The namespace is semantic before it is physical. The class answers “what is this artifact?”; the extension answers “how is this artifact serialized?” A future Brand Manifest remains the BRD semantic class regardless of whatever serialization is later frozen for it. WASM-002 does not freeze BRD serialization. HTML, CSV, BIN, TXT, and future BRD formats are serialization formats, not semantic artifact classes.

Filename layerMeaningWASM-002 contract
NamespaceIdentifies participation in the Data Sculptor governed namespace.__DS__
Artifact classExact three-uppercase-letter semantic role.CCC drawn from the governed registry below
UTCCreation time for an ordinary immutable governed artifact.YYYYMMDDTHHMMSSmmmZ, UTC, millisecond precision; exactly three millisecond digits
UUIDUnique physical identity token.Canonical lowercase hyphenated UUID v4
ExtensionPhysical serialization / file format.Governed by the artifact contract; serialization is not semantic class

Ordinary immutable grammar: __DS__CCC__YYYYMMDDTHHMMSSmmmZ__<uuid-v4>.<extension>. The fixed token order is namespace → class → UTC → UUID → extension. Within one class, lexical ordering of unequal canonical UTC tokens is chronological; UUID is identity/uniqueness only and never a chronology tie-breaker. Source, run, lineage, hash, parent, supersession, and other relationship facts are not added as ordinary filename tokens; they belong in governed metadata.

WASM-002 semantic artifact-class registry

Registry status: the class tokens and meanings below are the resolved WASM-002 design contract. Requirement lifecycle remains UNDER REVIEW until independent QA and T's build freeze. A later class addition or semantic reassignment requires an explicit PRD revision; an existing class token must not be silently repurposed.
ClassMeaningNotes
WKOWork OrderGoverned human-readable instruction artifact; may be human-authored and still belong to the Data Sculptor namespace.
RCPReceiptDurable record of what Data Sculptor actually executed and what happened.
DGNDiagnostic EventMachine-readable canonical diagnostic truth / evidence record.
HLPHelp ReportDurable human-facing rendering of governed diagnostic truth, including the HTML support-handoff artifact.
CERCertification EvidenceSource-certification result bound to exact source identity.
CVTConverted SourceNew source artifact created by an explicit governed conversion operation; never a rename of the analyst's original source.
RIDRow IdentityPermanent governed row-identity artifact used to preserve alignment.
COLMaterialized ColumnMaterialized source or derived analytical column governed by the store.
MAPStore / Artifact MapOpen map from physical artifacts to logical meaning and lineage.
SCRScratch / Structural SupportVisible bounded working/support artifact; never hidden cache state.
RCVRecovery ArtifactDeliberately retained interrupted-run or recovery information.
BRDBrand ManifestGoverned brand artifact reserved by the product contract; configurable Brand Manifest implementation and serialization are deferred to V1-BACKLOG / a future build.
PB-STOR-004

__DS__ is the reserved Data Sculptor governed namespace

UNDER REVIEW

Every artifact that Data Sculptor creates or intentionally interprets as one of its governed artifacts must use the exact visible prefix __DS__. The prefix identifies participation in the Data Sculptor namespace; it does not imply that the artifact is temporary, scratch-only, or automatically generated.

PB-STOR-005

External inputs retain their identity; Data Sculptor derivatives enter the namespace

UNDER REVIEW

An analyst or external source file must not be renamed into __DS__ merely because Data Sculptor reads, fingerprints, certifies, or references it. If Data Sculptor creates a new governed derivative—such as an explicit converted source—the new artifact enters the __DS__ namespace under its semantic class.

PB-STOR-006

The governed semantic artifact-class registry is explicit and stable

UNDER REVIEW

The token immediately following __DS__ must be an exact three-uppercase-letter semantic artifact class. The governed class tokens currently reserved by this PRD are:

ClassMeaning
WKOWork Order
RCPReceipt
DGNDiagnostic Event
HLPHelp Report
CERCertification Evidence
CVTConverted Source
RIDRow Identity
COLMaterialized Column
MAPStore / Artifact Map
INVSuitcase Inventory Snapshot
SCRScratch / Structural Support
RCVRecovery Artifact
BRDBrand Manifest
LCKSuitcase Lock — reserved for the explicit later-V1 FINGERPRINT workflow; not emitted or maintained by ordinary WASM-002

The class states semantic role rather than serialization format. WIP is not an artifact class; it is the editable non-executable Work Order lifecycle state. The Flight Recorder defined by W002-STOR-012 is a derived chronological view of governed RCP artifacts and is not an additional semantic artifact class. LCK is reserved by Revision BC for the deferred explicit FINGERPRINT workflow governed under PB-OPS-010 and is not an ordinary WASM-002 output. Existing class tokens must not be silently reassigned to different meanings. A new class requires an explicit PRD revision.

PB-STOR-007

Serialization is orthogonal to artifact class

UNDER REVIEW

Filename extensions such as .toml, .html, .csv, .bin, and .txt describe physical serialization only and must not be used as semantic artifact classes. A governed HLP serialized as .html remains an HLP, and a governed WKO serialized as .txt remains a WKO. Any future BRD serialization must obey the same class-versus-format separation, but its format is not frozen by WASM-002.

PB-STOR-008

Namespace and class do not confer authority by themselves

UNDER REVIEW

Renaming an arbitrary file to resemble a __DS__ artifact must not make it authoritative. Before treating a governed artifact as valid, Data Sculptor must validate the applicable filename grammar plus the content, provenance, fingerprint, lineage, or other evidence required by that artifact's contract.

PB-STOR-009

Unknown future Data Sculptor classes are preserved and reported

UNDER REVIEW

If a current Data Sculptor version encounters a syntactically valid __DS__ artifact whose semantic class it does not understand, it must leave the artifact untouched and report the unknown/reserved class rather than delete, rewrite, or silently reinterpret it.

PB-STOR-010

Namespace and class casing are canonical and exact

UNDER REVIEW

Data Sculptor-generated names must use exact uppercase __DS__ and exact uppercase three-letter class tokens. Data Sculptor must not silently normalize variant namespace/class spellings into canonical governed artifacts. This rule applies even on case-insensitive filesystems.

PB-STOR-011

Generated identity collisions regenerate the UUID and never overwrite

UNDER REVIEW

Data Sculptor must never overwrite, rename, truncate, or mutate an existing artifact merely because a newly generated governed filename collides with it.

For an ordinary immutable artifact using the governed UTC+UUID identity grammar, Data Sculptor must keep the originally established canonical UTC millisecond creation timestamp, generate a new canonical lowercase hyphenated UUID v4, reconstruct the candidate filename, and try creation again. Collision retry must not advance or falsify the artifact creation timestamp merely to obtain a different sort position.

This retry may repeat until an unused valid identity is obtained. If UUID generation fails, the host cannot safely test/create the target, or another filesystem error prevents safe allocation, creation must refuse through the canonical diagnostic path rather than risk overwrite. Collision retry changes only the not-yet-created artifact's UUID. UUID is never used as a chronology field.

PB-STOR-012

Names route; governed contents and provenance prove

UNDER REVIEW

The filename must help humans and Data Sculptor identify the artifact's intended semantic role and route it to the correct validator. The artifact's governed content, lineage, receipt, fingerprint, provenance, and other required evidence establish what is actually true.

PB-STOR-015

Visible __DS__ artifacts are system files for inspection, not user-maintained state

N/A

Data Sculptor documentation and Help must tell users that __DS__ files are Data Sculptor system artifacts. Users may inspect, audit, copy, and understand them, but should not manually edit, rename, or delete them.

The Suitcase remains user-controlled, so Data Sculptor does not claim operating-system-level write protection or tamper prevention. External changes are outside the governed mutation workflow and must not be silently represented as Data Sculptor-authored state. Governed changes should occur through Work Orders and other documented Data Sculptor workflows.

Visibility is for sovereignty and auditability, not for requiring users to maintain system state by hand. Ordinary use does not continuously hash or surveil the Suitcase merely to detect external changes.

PB-STOR-013

Ordinary immutable governed artifacts use class → UTC millisecond → UUID v4 identity order

UNDER REVIEW

The exact default filename grammar for an ordinary immutable Data Sculptor-governed artifact is:

__DS__CCC__YYYYMMDDTHHMMSSmmmZ__<uuid-v4>.<extension>

CCC is the governed semantic artifact class. YYYYMMDDTHHMMSSmmmZ is the artifact's governed UTC creation/publication timestamp at millisecond precision: four-digit year, two-digit month/day/hour/minute/second, exactly three millisecond digits, and literal T/Z. <uuid-v4> is a canonical lowercase hyphenated UUID v4. The extension is governed by the artifact's serialization contract.

The token order is normative: namespace, semantic class, UTC timestamp, UUID, extension. UTC precedes UUID for every ordinary immutable class. Canonical UTC tokens with different values sort chronologically within the same class. UUID provides uniqueness and physical identity only; it must not be interpreted as a chronology tie-breaker when two artifacts share the same timestamp.

When one governed all-or-refuse Store-state publication transaction creates multiple new analytical state artifacts, Data Sculptor establishes one canonical UTC millisecond publication-transaction timestamp before final identity allocation and uses that same UTC token for every newly published RID, COL, and MAP artifact created by that transaction. Each artifact receives its own UUID. Thus a first Store materialization gives the new RID, every newly materialized COL, and the successor MAP one shared transaction UTC; a later materialization gives only its newly created COL artifacts and successor MAP the new transaction UTC while the inherited RID and inherited COL artifacts retain their earlier identities; governed RID recovery gives the replacement RID and recovery successor MAP one shared recovery-transaction UTC while surviving inherited COL artifacts retain their earlier identities.

The shared transaction UTC is not the Work Order's authoring timestamp and does not require the Receipt filename UTC to match. RCP remains governed by W002-RCP-002 and carries its own receipt creation/publication timestamp. A shared transaction UTC expresses common publication membership, but MAP binding—not timestamp equality—remains authoritative for Store membership/current state.

Source identity, source filename, run identity, parent identity, lineage, hashes, aliases, supersession, column identity, and other relationships must not be appended as ordinary identity tokens merely to make the filename descriptive; those facts belong in governed metadata and provenance.

PB-STOR-014

Store-state publication transactions share UTC but never UUID identity

UNDER REVIEW

Within one all-or-refuse Store-state publication transaction, every newly created RID, COL, and MAP final identity must carry the exact same canonical UTC millisecond transaction token and a distinct canonical UUID v4. UUID collision retry under PB-STOR-011 changes only the affected not-yet-created artifact UUID; it must not advance or alter the shared transaction UTC.

Artifacts merely inherited or referenced by the transaction are not renamed, retimestamped, or assigned replacement UUIDs. A valid MAP may therefore bind artifacts created under several earlier transaction timestamps. Timestamp equality is evidence that artifacts were newly published by the same transaction; timestamp inequality is not evidence that artifacts belong to different Stores.

3. Disk-First Long-Division Operations

This section records the operating model originally envisioned for Data Sculptor: meaningful analytical intermediate results are persisted as visible files instead of disappearing inside an opaque in-memory pipeline. The model is deliberately long division: show the intermediate work, preserve it, and let later operations reuse it.

PB-OPS-001

Permanent row identity after materialization

UNDER REVIEW

Each logical Store has exactly one visible, deterministic RID artifact representing 1..N in governed logical CSV-record order. The header is excluded. Physical line count is not row identity: embedded newlines inside quoted fields remain inside one logical record.

The RID is created when the first successful materialization establishes the Store and remains stable for the life of that Store. Every same-Store materialized or later aligned result column must contain exactly N data records in the same RID order. Multiple Stores may coexist in one Suitcase, and their RID values are unrelated; the meaningful row identity is therefore the pair (Store, RID).

PB-OPS-002

Materialized columns preserve facts and alignment

UNDER REVIEW

Materialized columns preserve governed values in permanent row alignment. Materialization stores facts for reuse; it does not decide which rows are analytically interesting.

PB-OPS-003

Filter operation creates an aligned two-valued Boolean selection column

DEFERRED

A filter evaluates its governed proposition for every RID in the current Store row universe and writes a new aligned Boolean selection column. Its analyst-facing logical meaning is strictly two-valued: FALSE when the row does not satisfy the governed condition and TRUE when it does.

The canonical physical row token is 0 for FALSE and 1 for TRUE. The selection column contains exactly one such token for every Store RID, in RID order. The source/materialized fact columns are not destructively rewritten, removed, reordered, or shrunk merely because a filter is evaluated.

PB-OPS-003.1

V1 Boolean selection columns have no third state

DEFERRED

A governed filter/selection result in V1 must serialize each aligned row as exactly 0 or 1. Blank values, NULL, UNKNOWN, NA, textual TRUE/FALSE, integers other than 0 or 1, and any third logical state are not valid row values for the canonical Boolean selection result.

If a future filter expression cannot deterministically resolve a row to FALSE or TRUE under the then-governed expression and missing-value semantics, the operation must refuse rather than silently invent, coerce, or serialize a third state. This requirement freezes the Boolean result domain, not the full filter-expression language.

PB-OPS-004

Boolean selection columns are reusable and immutable

DEFERRED

A later filter creates another aligned two-valued 0/1 Boolean selection column rather than mutating an earlier filter result. Governed logical combinations such as AND, OR, and NOT create new selection artifacts under the same Store-RID alignment and strict 0/1 result rules.

Earlier selection columns remain inspectable evidence of the propositions that were evaluated at that point in the analytical work.

PB-OPS-005

Filtering alone does not create a new row universe

DEFERRED

Creating an aligned Boolean selection column preserves the original N rows, order, and row identity; it therefore remains within the same logical Store. The result has exactly N Boolean data records in RID order, each physically represented as 0 or 1.

This requirement supersedes the earlier interpretation that filtering itself necessarily creates a new row universe. A later governed build/export operation may use the Boolean column to construct a reduced output row set, but that later operation is distinct from filtering.

PB-OPS-006

Build/export is a separate operation

DEFERRED

After a selection column exists, the analyst explicitly chooses the materialized columns and the selection mask to build/export a new CSV or store. Only this later row-reducing materialization creates a new row universe and logical store identity.

PB-OPS-007

Execution surface is separate from storage semantics

DEFERRED

DS-STEPS, DS-SQL, and DS-PIPE may express the same governed filter/build operations through different human-facing syntax. The deterministic engine semantics and intermediate artifacts remain the same regardless of expression surface.

PB-OPS-008

Intermediate files are part of explainability

DEFERRED

Permanent row identity, materialized columns, selection masks, receipts, and later outputs remain visible Suitcase artifacts. The analytical working is preserved so the analyst can inspect, reuse, compare, and explain intermediate decisions.

PB-OPS-009

Disk-first operations remain bounded-memory

DEFERRED

Operations shall stream or otherwise process bounded windows so row count and file size do not require proportional RAM growth. Reuse of already-materialized columns and masks is preferred over reconstructing analytical state when equivalent governed artifacts are available.

Long-division principle: the product may add an explicit analytical step when that step leaves behind durable, inspectable evidence. The optimization target is not the fewest visible steps; it is the fewest unexplained leaps.

PB-OPS-010

FINGERPRINT is an explicit V1 archival, continuity, and handoff verification operation

DEFERRED

FINGERPRINT is a deferred V1 Work Order operation for situations where an analyst deliberately needs durable exact-byte evidence, including closing out work when a source may change unexpectedly, returning to a Store in a later session, archiving a project, validating a copied project, or handing work to another analyst.

The operation is read-only with respect to its target files. It performs an explicit full-byte scan only for files deliberately targeted by the FINGERPRINT request and publishes governed LCK Suitcase Lock evidence. It must not be invoked implicitly by Work Order save, UTF-8 certification, ordinary materialization, Store inheritance, INVENTORY, alias maintenance, or another analytical operation merely because fingerprint evidence might later be useful.

Help may recommend FINGERPRINT as the stronger best-practice option when exact cross-session byte continuity matters, while also warning that large files require a complete additional read and may take noticeable time. Revision BC fixes the LCK evidence class and base filename,sha256 CSV contract; exact Work Order syntax, target-set selection, comparison/report workflow, and project-wide archival UX remain deferred to the later V1 build.

PB-OPS-010.1

FINGERPRINT publishes an immutable LCK Suitcase Lock artifact

DEFERRED

A successful explicit FINGERPRINT operation publishes one new governed CSV artifact whose physical filename is:

__DS__LCK__YYYYMMDDTHHMMSSmmmZ__<uuid-v4>.csv

LCK is visible in the flat Suitcase, immutable after publication, and versioned by the ordinary governed class → UTC → UUID identity rules. A later FINGERPRINT operation publishes a new LCK rather than overwriting an earlier one.

PB-OPS-010.2

LCK CSV schema is exactly filename,sha256

DEFERRED

The canonical Suitcase Lock is a deterministic UTF-8 CSV whose exact two-field header is:

filename,sha256

Each regular file visible in the flat Suitcase root at LCK publication time appears exactly once. filename is the exact visible filename. sha256 contains the governed SHA-256 previously established for that filename by explicit FINGERPRINT evidence, or is the empty string when no governed SHA-256 is known. A blank value means unknown / not fingerprinted, not failure.

The LCK may include its own filename with a blank sha256; an artifact cannot carry a trustworthy SHA-256 of its own final bytes inside those same bytes.

PB-OPS-010.3

LCK generation is explicit only and never an ordinary side effect

DEFERRED

Saving a WKO, publishing a WKO MAP, materializing RID or COL artifacts, publishing a Store MAP, recovering RID, creating Receipts, running INVENTORY, changing aliases, validating UTF-8, or other ordinary WASM-002 work must not create, refresh, or silently verify an LCK.

LCK publication occurs only through the explicit FINGERPRINT workflow or another future operation that is separately and explicitly specified to do so. Data Sculptor must not continuously hash the Suitcase in the background.

PB-OPS-010.4

Successor LCK files may carry forward earlier known hashes without pretending to reverify them

DEFERRED

When an explicit later FINGERPRINT operation publishes a successor LCK, previously established SHA-256 values for still-visible filenames may be copied forward from the prior current LCK without re-reading those files. A newly visible filename has a blank sha256 unless the current FINGERPRINT request actually scans it. A file explicitly targeted by the current request receives the SHA-256 computed from its current exact bytes.

Carrying a prior digest forward means expected / previously established identity; it must not be described as a fresh verification performed by the current run.

PB-OPS-010.5

LCK is visible integrity evidence, not operating-system tamper prevention or continuous monitoring

DEFERRED

The Suitcase remains user-controlled, and a user can physically edit, delete, rename, or replace an LCK or any other file using external tools. Data Sculptor must not represent LCK as cryptographically self-authenticating, tamper-proof, write-protected, or continuously monitored.

LCK preserves visible expected byte identities established by explicit FINGERPRINT work. A mismatch is only known when an explicit or otherwise governed verification actually reads and compares bytes; ordinary use does not continuously perform that check.

4. Carried-Forward Product Backlog Requirements

The following material is carried forward from Revision Q with stable requirement IDs. Revision R added SCOPE and BUILD metadata; Revision S added the front-door build dashboard; Revision U carried forward the independent lifecycle STATUS and single-source SCOPE governance and made this standalone HTML document the working master. Revision V added the narrow WASM-002 browser front-end / console requirement set and embedded the Day 042 prototype source as design evidence. Revision W formalizes the dedicated Help / Diagnostic Surface, the projection-versus-authority boundary, and the durable HTML support-handoff report. SCOPE remains the single allocation authority, and legacy scope lists remain historical/derived records rather than a second source of truth.

This section records the collaboration model that has emerged during Data Sculptor development. It is intentionally descriptive at this stage. Proper WASM-002 implementation and QA requirements will be written separately. The purpose here is to preserve the working method, role boundaries, and Council behavior that are shaping the product before those ideas are flattened into a later retrospective.

Council principle - differentiated responsibility, not duplicated commentary The Council is not intended to be four assistants performing the same review from different windows. Its value comes from persistent, differentiated roles, different failure sensitivities, and involvement at different stages of the work. The same evidence may therefore produce different useful questions depending on who is reading it.

T - product authority and final acceptance T remains the accountable human, product owner, pilot in command, and final acceptance authority. The Council may propose, challenge, explain, implement, test, and communicate, but it does not displace human analytical or product authority. Decisions become Data Sculptor decisions when T accepts them.

Spock - lead architecture and implementation collaborator Spock works with T on product architecture, engineering contracts, implementation sequencing, PLDD checkpoints, evidence interpretation, and continuity across the Suitcase. The role is not merely code generation: it includes turning product intent into explicit, testable structure while keeping claims bounded by observed evidence.

Claude - PRD collaborator, then independent adversarial QA Claude participates earlier in PRD construction so tensions can be identified before freeze. When the document becomes a freeze candidate, Claude changes hats and reviews the written requirements against evidence. Knowing why a requirement exists must not allow the reviewer to mentally repair an underspecified requirement. In Claude's formulation, sympathy is a failure mode of an informed reviewer.

Gemini - Help Engine VP and human-understanding collaborator Gemini participates where the product must explain itself to humans: Help, diagnostic presentation, terminology, communication, and the boundary between technical truth and understandable wording. The governing idea is Different voice. Same truth. Help may vary language and depth; it must not vary the established facts, evidence, severity, provenance, refusal reason, or safe next action.

How We Work - One Human + Specialized AI Council

Role timing is part of the method Specialization is not only about expertise; it is also about when a Council member enters the work. Claude should see enough of PRD construction to understand intent, but formal adversarial review begins only when a freeze candidate exists. Gemini should help shape Help contracts while they are being written, not merely polish wording after implementation. Spock and T carry the architecture forward continuously. These timing differences are deliberate.

Shared context is a first-class collaboration need The Council can only operate coherently when members know enough about one another's work to understand current decisions. The Suitcase, diaries, PRD, evidence records, and explicit handoffs reduce hidden context gaps. A Council member noticing that another member's contribution is missing from their context is itself useful evidence that continuity needs attention.

Independent viewpoints should identify tensions, not silently resolve them During collaborative drafting, Council members should surface collisions, missing concepts, premature freezes, unclear terminology, and competing architectural assumptions without silently inventing the missing requirement. The human and Council can then decide deliberately. During later QA, the reviewer should state where a requirement is sound or underspecified rather than rewriting it into something easier to pass.

Diary entries preserve role-specific state Council diaries are not decorative project journals. They preserve contemporaneous perspectives: what each member thinks was learned, what remains unresolved, what that role is trying to protect, and how confidence changed over time.

For major new flights or phases, beginning with short role-specific diary entries can make the team's starting state explicit before new design work changes it.

The Council is part of the build history, not a substitute for product evidence Agreement among Council members does not prove that Data Sculptor works for its intended analyst. Technical acceptance still requires evidence, and product fit eventually requires real users with real files. The Council strengthens the quality of questions, requirements, implementation, verification, explanation, and record keeping; it cannot manufacture external validation.

Working method

One accountable human. Specialized AI collaborators. Explicit evidence. Persistent roles. Independent verification. Human acceptance.

How We Work - One Human + Specialized AI Council - continued

Historical significance

At this stage the Council roles are no longer only labels assigned in advance. They are becoming observable through behavior: architecture, QA, Help, communication, and product authority are producing different kinds of contribution.

That evolution should remain visible in the project record and later in The Decision to Build, without overstating what the method has proven beyond this project.

This section records the development method that has emerged during Data Sculptor construction. It is descriptive and methodological, not a WASM-002 runtime feature or an implementation acceptance gate. Proper WASM-002 engineering requirements, in-scope deliverables, and explicit deferrals will still be written separately. The purpose here is to preserve the method before later requirements depend on it.

PLDD-001

Definition

N/A

Paired Long-Division Development (PLDD) is a human-AI development method that divides difficult software work into bounded, inspectable bricks. For each brick, the next action is made explicit, the human executes or authorizes the action, durable evidence is captured, the evidence is inspected and explained, and only then is the next brick chosen.

PLDD-002

Canonical working cycle

N/A

Define one bounded brick -> state the intended change or command explicitly -> execute it -> capture durable evidence

-> inspect the evidence -> explain what happened -> accept, reject, or adjust -> choose the next brick. A session may

contain many bricks, but progression should remain evidence-gated rather than assumption-gated.

PLDD-003

Human judgment plus AI throughput

N/A

The AI collaborator may reason, draft code, propose commands, interpret output, identify risks, and maintain continuity. The accountable human controls progression, observes execution, decides whether evidence is sufficient, and accepts or rejects consequential changes. PLDD is therefore paired work, not delegated autonomous development.

PLDD-004

Shell-first origin and inspectability

N/A

PLDD grew out of the decision to work shell-first in PowerShell rather than inside an IDE. Explicit commands and command output could be piped into durable TXT evidence, reviewed by both human and AI, placed into the Suitcase, and revisited later. Shell-first is the current Data Sculptor practice and the historical origin of PLDD; the deeper invariant is inspectability and durable evidence, not loyalty to one shell or toolchain.

How We Work - Paired Long-Division Development (PLDD)

PLDD-005

Deliberate progression and human acceptance

N/A

PLDD uses explicit decisions, bounded changes, retained evidence, and human acceptance as its control model. Progression remains inspectable and evidence-gated: a consequential step is accepted, rejected, or adjusted by the accountable human before the project advances. The method treats apparent success as an observation to inspect, not as automatic authority to continue.

PLDD makes progression explicit, inspectable, and evidence-gated.

PLDD-006

Durable evidence separates experiment from acceptance

N/A

A promising output, benchmark, browser observation, or experimental implementation does not become accepted product behavior merely because it worked once. PLDD requires the project to preserve what was run, what was observed, what was not run, and what claim the evidence actually supports. The Day 040 WASM-001b closeout is an example of this discipline: experimental success, shared-engine proof, and formal acceptance remained distinct claims.

PLDD-007

Relationship to TDD, QA, and the Suitcase

N/A

PLDD does not replace tests, code review, adversarial QA, or product acceptance. It structures the path between them. Tests provide executable checks; the Suitcase preserves continuity and evidence; the Council provides differentiated reasoning; independent QA challenges frozen requirements and code; the human retains final authority. PLDD supplies the bounded step-and-evidence rhythm connecting those responsibilities.

PLDD-009

WASM-002 scope boundary

N/A

PLDD belongs in this document because it explains how WASM-002 will be specified and built, but it must not blur product scope. End users are not required to use PLDD. WASM-002 does not need to ship a PLDD interface, shell, IDE, diary system, or Council implementation merely because this section exists. Future normative development and QA requirements may reference evidence discipline, checkpointing, reproducibility, or review gates where appropriate; runtime requirements remain separate.

PLDD-010

Future documentation and study

N/A

The method may later be documented independently, compared with other human-AI development practices, and described in post-V1 articles or The Decision to Build. Any such account should remain grounded in the contemporaneous project record and should distinguish observed project behavior from broader claims not yet tested.

Method principle

One bounded step. One observable result. One retained piece of evidence. Then decide what comes next.

How We Work - Paired Long-Division Development (PLDD) - continued

PLDD-008

Observable method, not yet a universal claim

N/A

PLDD is treated as real because it has a repeatable structure and observable consequences inside Data Sculptor development: unsupported leaps are slowed, experiments remain distinguishable from accepted behavior, command output becomes auditable evidence, and another collaborator can reconstruct why the project advanced. This draft does not claim that PLDD has been scientifically validated, that it is superior for every software project, or that benefits observed here automatically generalize elsewhere.

Glossary and Canonical Terms

This glossary comes before the detailed PRD so that implementation, PLDD checkpoints, Help writing, adversarial QA, and LLM-assisted work begin from the same vocabulary. Where these definitions are narrower than ordinary software-industry usage, the Data Sculptor definition governs this PRD.

Vision statements explain the intended human and architectural outcome of a subsystem. They guide design and review; they become acceptance obligations only when a numbered requirement explicitly invokes them.

W002-GLOSS-001

Red5Sorcery Data Sculptor

N/A

A local-first, deterministic analytical system for office analysts who need to work with ordinary and occasionally multi-gigabyte data while preserving privacy, inspectability, reproducibility, and human analytical authority. Data Sculptor is not intended to be a general-purpose programming environment.

Vision: An analyst should be able to do serious data work on an ordinary computer, understand what the system did, keep the complete analytical record locally, and explain the result to another human or an LLM without relying on hidden state.

W002-GLOSS-001.1

The primary public product is browser/WASM-first; a standalone native CLI host may reuse

N/A

the same proven semantic core.

W002-GLOSS-001.2

The durable project boundary is ordinary, open, inspectable artifacts rather than proprietary

N/A

server state.

W002-GLOSS-002

Documentation as a Primary User Interface

N/A

The design principle that Data Sculptor documentation, canonical terms, Work Order grammar, Help semantics, storage rules, artifact maps, and examples are not secondary reference material. They are a first-class interface through which humans and LLM collaborators understand and operate the product.

Vision: A competent LLM should be able to help a person use Data Sculptor by reading the same explicit documentation a person can read, without reverse-engineering a hidden GUI or inventing semantics.

W002-GLOSS-002.1

A product behavior that matters to execution or interpretation must not depend solely on

N/A

undocumented visual state.

W002-GLOSS-002.2

An LLM may explain documented behavior, draft valid Work Orders, and help a human

N/A

navigate artifacts; the deterministic engine remains authoritative for parsing, validation, execution, and results.

W002-GLOSS-002.3

Referenceable requirement IDs and stable terms are part of the UI because they let humans

N/A

and AI collaborators point to the same rule without inference.

W002-GLOSS-003

Human Analytical Authority

N/A

The governing principle that the human remains responsible for analytical intent, interpretation, acceptance, and consequential choices. Data Sculptor and an LLM collaborator may execute, explain, verify, and propose; they do not silently substitute their own analytical intent for the human's.

W002-GLOSS-004

Deterministic Engine

N/A

The shared analytical implementation whose governed behavior is defined by explicit inputs, frozen semantics, and bounded state rather than probabilistic runtime interpretation. Identical governed inputs and settings must produce identical governed analytical results and canonical output bytes, except for fields explicitly defined as run-specific.

W002-GLOSS-005

Local-First

N/A

The product property that analytical source data, transformation work, durable artifacts, Help reports, and verification evidence are designed to remain on the user's machine unless the human deliberately exports or shares them. Core analytical operation does not require a proprietary backend.

The durable analytical project boundary: a user-controlled local project folder containing source material, Data Sculptor Core artifacts, analyst-owned files, documentation, mapping, receipts, history, and evidence. The Suitcase is intended to remain understandable outside a running Data Sculptor session.

Vision: The application may disappear. The analytical project should still make sense.

W002-GLOSS-007

Flat Project Folder

N/A

The storage assumption that a Data Sculptor project may live in one ordinary directory rather than requiring a semantic hierarchy of per-store subfolders. Logical relationships are expressed in open metadata and documentation, not by directory nesting.

W002-GLOSS-008

Core Artifact

N/A

A file created and governed by Data Sculptor Core under the reserved physical namespace and storage contract. Core artifacts have canonical physical identity and documented logical meaning.

W002-GLOSS-009

Analyst-Owned File

N/A

A source, note, methodology document, dictionary, spreadsheet, or other project file owned by the analyst rather than by Data Sculptor Core. Data Sculptor does not rename such a file merely to bring it into the project.

W002-GLOSS-010

Reserved Core Namespace

N/A

The protected on-disk namespace used by Data Sculptor Core to distinguish governed Core artifacts from analyst-owned files and third-party artifacts in the flat project folder.

W002-GLOSS-010.1

N/A

The reserved Core prefix is exactly __DS__.

W002-GLOSS-010.2

N/A

Analyst-owned files and third-party artifacts must not impersonate the unqualified Core namespace.

W002-GLOSS-011

Artifact Class

N/A

A fixed-width three-character base-26 classification token in a Core artifact filename. Each position uses one uppercase ASCII letter A through Z, giving the physical range AAA through ZZZ and 17,576 possible class values. Its purpose is to place related artifact families in a predictable lexical order while leaving substantial namespace room for future growth.

W002-GLOSS-011.1

N/A

The three-character width and uppercase A-through-Z alphabet are architectural. Earlier numeric class examples are superseded by the current base-26 class contract.

W002-GLOSS-011.2

N/A

Exact class assignments and reserved class ranges remain PRD freeze items unless explicitly frozen elsewhere.

W002-GLOSS-011.3

N/A

Classes should be allocated sparsely enough that related future classes can be introduced without renumbering historical artifacts.

W002-GLOSS-012

Physical Artifact Identity

N/A

The mechanically stable identity carried by a Data Sculptor Core filename and associated provenance. It identifies the exact artifact instance and is deliberately separate from the analyst's friendly store name, column label, or explanatory alias.

W002-GLOSS-013

Logical Identity

N/A

The human and analytical meaning of an artifact: which store, column, source, operation, row universe, run, or diagnostic it represents. Logical identity is recorded in open metadata and documentation rather than encoded as variable human prose in the physical filename.

W002-GLOSS-014

Store

N/A

A logical table or row universe with stable row identity, governed columns, provenance, and a human-facing name or alias. A Store is a relationship among artifacts; it is not a folder.

For WASM-002, the exact physical rid_filename is the stable physical anchor of Store identity. The Store's current human-facing alias, Store-establishing source filename, RID binding, RID alias, and materialized-column mappings are recorded together in one immutable governed Store MAP snapshot.

W002-GLOSS-015

Row Universe

N/A

The governed set and order of rows that belong to a logical store. An operation that changes which rows exist or their governed identity creates a new row universe and therefore a new logical store identity unless a later frozen rule explicitly says otherwise.

W002-GLOSS-016

Row Identity

N/A

The stable governed 1-based identity used to keep columns aligned within one Store row universe. Each Store owns exactly one immutable RID artifact whose data records are the canonical sequence 1..N in accepted logical source-record order. RID values are Store-local rather than Suitcase-global, so RID 42 in one Store has no relationship to RID 42 in another Store unless a later governed operation explicitly establishes one.

W002-GLOSS-017

Source Identity

N/A

The governed identity/context used to say which analyst-owned source a run refers to. In WASM-002, certification-to-materialization safety is run-local and is satisfied by retaining the same selected source instance across both stages.

Across separate sessions, filename, alias, Store MAP lineage, byte length, or last-modified metadata may help orient or investigate a source but do not by themselves prove byte identity. WASM-002 therefore does not claim durable cross-session source equality unless separate explicit integrity evidence exists. When exact cross-run byte identity is required, it must be established by explicit evidence such as the later V1 FINGERPRINT operation rather than inferred from ordinary source-reference metadata.

W002-GLOSS-017.1

N/A

If the source presented to a later governed stage differs from the source identity established earlier, that later stage must refuse rather than assume continuity.

W002-GLOSS-018

Source Binding

N/A

The governed relationship between a Work Order's source reference and the source actually used by an operation. For WASM-002 analytical execution, source binding includes deterministic pre-run resolution and retention of one selected source instance across UTF-8 certification and materialization without mid-run re-resolution.

Source binding is distinct from a cryptographic fingerprint. A binding establishes which source the run used; a fingerprint can establish exact byte equality for later archival or handoff verification.

W002-GLOSS-019

Store Map

N/A

The complete machine-readable mapping truth for a Project Suitcase. It records physical artifact identity, logical store/column identity, source binding, run/materialization identity, row counts, hashes, status, lineage, and other frozen provenance fields.

W002-GLOSS-020

Store Index

N/A

The persistent human-facing HTML orientation layer over the Store Map and related evidence. It presents friendly names and aliases, groups related materializations, links Work Orders, Help, history, receipts, and data artifacts, and remains useful after Data Sculptor exits.

Vision: A person should navigate the analytical project by meaning, while the engine and an LLM can still resolve every friendly label to exact machine identity.

W002-GLOSS-021

Alias

N/A

A governed human-facing reference that orients an analyst to a Data Sculptor object without changing physical identity. In WASM-002, one Store MAP may carry a Store alias, an RID alias, and materialized-COL aliases while preserving the immutable governed filenames of the RID, COL, and MAP artifacts.

Changing an alias must not rename or rewrite the underlying physical artifact. Alias state is persisted in immutable governed Store MAP snapshots. The exact standalone alias-maintenance syntax remains governed separately.

W002-GLOSS-022

Canonical Core Filename Grammar

N/A

The default forward physical naming model for ordinary immutable Data Sculptor Core artifacts is __DS__<CLASS>__YYYYMMDDTHHMMSSmmmZ__<UUID-v4>.<ext>.

CLASS is exactly three uppercase ASCII letters A through Z. The UTC token is fixed-width, UTC-only, and millisecond precision with exactly three millisecond digits. The UUID is canonical lowercase hyphenated UUID v4. The normative order is namespace → class → UTC → UUID → extension. UUID expresses identity/uniqueness and never chronology.

W002-GLOSS-022.1

N/A

Human-readable store and column names are intentionally excluded from Core physical filenames.

W002-GLOSS-022.2

N/A

Each governed artifact type has a canonical filename shape and total filename length; variable human prose must not change that length.

W002-GLOSS-022.3

N/A

If one future class permits more than one representation, each class/representation pair must still have a frozen canonical filename length.

W002-GLOSS-023

UUID

N/A

The fixed-width globally unique artifact-identity token used within the Core filename envelope. UUID identity is not integrity evidence. A physical-name collision is treated as a creation conflict and never authorizes overwrite.

W002-GLOSS-024

UTC Token

N/A

The fixed-width canonical UTC chronology token carried in the Core filename envelope. Its exact frozen textual representation and per-class timestamp semantics are storage-contract freeze items.

W002-GLOSS-025

SHA-256 / Integrity Evidence

N/A

A cryptographic digest used to verify exact artifact bytes. SHA-256 answers whether bytes match expected evidence; it is not the general physical identity mechanism for a Core artifact.

W002-GLOSS-026

Current State

N/A

The presently authoritative project orientation or configuration state as determined by frozen selection rules. Current state must be discoverable without deleting the historical artifacts that preceded it.

W002-GLOSS-027

Historical State

N/A

Previously recorded project facts that remain true about what happened, even when a newer Store Map, Store Index, configuration, Work Order, or artifact supersedes them for current orientation.

W002-GLOSS-028

Flight Recorder

N/A

The logical chronological history formed from governed RCP Receipt artifacts produced by actual Run invocations of saved immutable WKO Work Orders. It is a derived view, not a separately persisted artifact or semantic artifact class. The underlying Receipts are the authoritative historical evidence.

W002-GLOSS-029

Work Order

N/A

A human-readable, non-executable UTF-8 instruction artifact describing a governed Data Sculptor operation or an ordered orchestration of other saved Work Orders, together with explicit inputs, parameters, requested outputs, and governed references. A Work Order expresses what the human is asking Data Sculptor to do; composition does not turn the Work Order into arbitrary executable code or permit hidden implementation logic.

W002-GLOSS-029.1

A Work Order is parsed deterministically and validated before execution.

N/A
W002-GLOSS-029.2

A correctly named Work Order is eligible for execution; filename validity alone never makes

N/A

arbitrary text executable authority.

W002-GLOSS-029.3

The Work Order is preserved as evidence of user intent and execution context.

N/A
W002-GLOSS-030

Receipt

N/A

A durable execution record that states what Data Sculptor was asked to do, what it actually did, governed source/output identities and encodings, relevant row and byte counts, resulting artifacts, warnings/errors, hashes where required, and execution timing/provenance fields. The Work Order records requested intent; the receipt records governed execution and result.

W002-GLOSS-031

Canonical Diagnostic Event

N/A

The structured stable representation of a governed warning or failure before human-facing wording is applied. It is the source of truth consumed by the Help Engine and carries stable diagnostic identity, structured facts, severity/classification, phase, continue/refuse behavior, and safe next-action metadata when applicable.

W002-GLOSS-032

Help Engine

N/A

Data Sculptor's governed explanation layer. The Help Engine receives canonical diagnostic truth from the shared engine and renders that same truth for people through supported Help voices, concise live messages, and durable Help artifacts. It does not decide what happened, alter severity, change evidence, or determine analytical behavior.

Vision: A person should not have to decode an unexplained error code or search the internet to understand what Data Sculptor observed and what they can safely do next. The same truth should be explainable at different levels of technical language without changing its meaning.

W002-GLOSS-032.1

Changing Help voice may change wording and technical depth but must not change

N/A

diagnostic identity, evidence, severity, provenance, refusal/continue behavior, or safe next steps.

W002-GLOSS-032.2

A durable Help report is an evidence artifact derived from the same canonical diagnostic

N/A

event used by the live message.

W002-GLOSS-033

PRETTY Engine

N/A

Data Sculptor's governed human-facing rendering layer. PRETTY turns already-established analytical, diagnostic, provenance, and report content into consistent, accessible, branded artifacts using the canonical Brand Manifest. PRETTY controls presentation, not truth.

Vision: Data work that is rigorous underneath should also be clear, attractive, inspectable, portable, and recognizable to the person reading it. Presentation should be generated systematically from governed content and governed brand elements rather than scattered formatting code.

W002-GLOSS-033.1

PRETTY must not reinterpret analytical values or diagnostic meaning.

N/A
W002-GLOSS-033.2

PRETTY may apply governed typography, layout, color, logo, and other approved

N/A

presentation tokens.

W002-GLOSS-033.3

Durable PRETTY HTML is intended to remain self-contained and readable without a network

N/A

connection or live Brand Manifest.

W002-GLOSS-034

Brand Manifest

N/A

The single governed source of reusable brand identity consumed by PRETTY. It may define approved names, labels, colors, SVG logo assets, typography/fallback declarations, and other frozen presentation tokens. A Brand Manifest may change presentation but must not change analytical semantics or diagnostic truth.

W002-GLOSS-035

UTF-8

N/A

A variable-length Unicode encoding that represents Unicode scalar values using one to four bytes. ASCII code points U+0000 through U+007F are represented by the identical single byte values 0x00 through 0x7F. In WASM-002, UTF-8 certified means that the complete governed source passed strict whole-file certification for the bound source identity.

W002-GLOSS-036

ASCII

N/A

The 7-bit character repertoire represented by byte values 0x00 through 0x7F. Every ASCII byte is already a valid one-byte UTF-8 encoding with exactly the same byte value. This identity is the correctness basis for the ASCII-first certification fast path.

W002-GLOSS-037

Windows-1252

N/A

A single-byte encoding historically common in Windows applications. Bytes 0x00 through 0x7F have ASCII meanings. Bytes 0xA0 through 0xFF map to corresponding Unicode code points U+00A0 through U+00FF.

The 0x80 through 0x9F range contains 32 byte positions: 27 assigned mappings and five undefined positions.

W002-GLOSS-037.1

Windows-1252 compatibility means that the supported deterministic converter can map the

N/A

bytes under frozen rules; it does not prove the historical source encoding.

W002-GLOSS-037.2

The undefined positions are 0x81, 0x8D, 0x8F, 0x90, and 0x9D. The converter must refuse

N/A

rather than guess unless a later frozen rule explicitly changes this. Byte Windows-1252 mapping Unicode UTF-8 bytes 0x80 EURO SIGN U+20AC E2 82 AC 0x81 UNDEFINED - - Byte Windows-1252 mapping Unicode UTF-8 bytes 0x82 SINGLE LOW-9 QUOTATION MARK U+201A E2 80 9A 0x83 LATIN SMALL LETTER F WITH HOOK U+0192 C6 92 0x84 DOUBLE LOW-9 QUOTATION MARK U+201E E2 80 9E 0x85 HORIZONTAL ELLIPSIS U+2026 E2 80 A6 0x86 DAGGER U+2020 E2 80 A0 0x87 DOUBLE DAGGER U+2021 E2 80 A1 0x88 MODIFIER LETTER CIRCUMFLEX ACCENT U+02C6 CB 86 0x89 PER MILLE SIGN U+2030 E2 80 B0 0x8A LATIN CAPITAL LETTER S WITH CARON U+0160 C5 A0 0x8B SINGLE LEFT-POINTING ANGLE QUOTATION MARK U+2039 E2 80 B9 0x8C LATIN CAPITAL LIGATURE OE U+0152 C5 92 0x8D UNDEFINED - - 0x8E LATIN CAPITAL LETTER Z WITH CARON U+017D C5 BD 0x8F UNDEFINED - - 0x90 UNDEFINED - - 0x91 LEFT SINGLE QUOTATION MARK U+2018 E2 80 98 0x92 RIGHT SINGLE QUOTATION MARK U+2019 E2 80 99 0x93 LEFT DOUBLE QUOTATION MARK U+201C E2 80 9C 0x94 RIGHT DOUBLE QUOTATION MARK U+201D E2 80 9D 0x95 BULLET U+2022 E2 80 A2 0x96 EN DASH U+2013 E2 80 93 0x97 EM DASH U+2014 E2 80 94 0x98 SMALL TILDE U+02DC CB 9C 0x99 TRADE MARK SIGN U+2122 E2 84 A2 0x9A LATIN SMALL LETTER S WITH CARON U+0161 C5 A1 0x9B SINGLE RIGHT-POINTING ANGLE QUOTATION MARK U+203A E2 80 BA 0x9C LATIN SMALL LIGATURE OE U+0153 C5 93 0x9D UNDEFINED - - 0x9E LATIN SMALL LETTER Z WITH CARON U+017E C5 BE 0x9F LATIN CAPITAL LETTER Y WITH DIAERESIS U+0178 C5 B8 Example: Windows-1252 byte 0x80 represents U+20AC EURO SIGN. UTF-8 encodes that same character as E2 82 AC.

The character can be the same while the byte representation is different.

W002-GLOSS-038

UTF-8 Certification

N/A

The governed Stage 1 operation that scans the complete bound source and determines whether every source byte forms valid strict UTF-8 under the WASM-002 rules. Certification is an encoding-validity decision, not CSV parsing and not analytical materialization.

W002-GLOSS-039

Materialization

N/A

The governed creation of Data Sculptor analytical output artifacts from selected source content under already-established source invariants. In the WASM-002 CSV path, materialization occurs only after UTF-8 certification and structural CSV parsing requirements are satisfied.

W002-GLOSS-040

Bounded Window

N/A

A finite source or output buffer whose maximum size is governed independently of total file size. Bounded windows allow multi-gigabyte sources to be processed without allocating memory proportional to the entire source.

W002-GLOSS-041

Chunk / Window Invariance

N/A

The requirement that permitted changes in bounded input/output window size or boundary placement must not change governed analytical meaning, UTF-8 validity, first invalid byte location, CSV interpretation, row identity, or canonical output bytes.

W002-GLOSS-042

Windows-1252 Conversion Work Order

N/A

The separate explicitly user-authorized transformation that converts a source compatible with Data Sculptor's frozen Windows-1252 rules into a new UTF-8 artifact. It is not an automatic fallback inside an analytical Work Order; the original source remains unchanged.

W002-GLOSS-043

White-Label Data Sculptor Edition

N/A

A future distribution that applies an organization-specific governed Brand Manifest and approved packaging while retaining the shared analytical core and semantics. White-label presentation must not create a customer-specific analytical fork.

W002-GLOSS-044

Paired Long-Division Development (PLDD)

N/A

The project's shell-first development method: one bounded implementation or verification step at a time, explicit command output, durable TXT evidence, inspection before advancement, and independent adversarial QA at important freeze points. PLDD is a development method, not a runtime product dependency.

W002-GLOSS-045

Evidence Artifact

N/A

A durable file that records a governed observation, measurement, hash, validation result, diagnostic, receipt, benchmark, or other fact used to support implementation or acceptance decisions. Evidence must remain distinguishable from interpretation or marketing prose.

Glossary and Canonical Terms (continued)

The following language terms extend the front-loaded glossary. They establish semantic roles and vocabulary only; they do not freeze final punctuation or complete grammar.

W002-GLOSS-046

Analytical Language

N/A

The single Data Sculptor semantic language: one governed operation model, one set of invariants, and one deterministic engine. Multiple human expressions may describe the same analytical meaning.

W002-GLOSS-047

Language Surface

N/A

A governed human-facing way of stating analytical intent or verification intent. DS-STEPS, DS-SQL, DS-PIPE, and DS-VERIFY are language surfaces, but they do not all have the same role.

W002-GLOSS-048

Expression

N/A

A user-facing representation of a Data Sculptor analytical command. DS-STEPS, DS-SQL, and DS-PIPE are alternative transformation expressions: the representation may change while the governed meaning must not.

W002-GLOSS-049

Command

N/A

The governed analytical instruction Data Sculptor understands after parsing and validation. A human expression is not executed as free-form prose; it must resolve deterministically to a valid command under the shared semantics.

W002-GLOSS-050

Canonical Operation Model

N/A

The shared internal semantic representation to which equivalent DS-STEPS, DS-SQL, and DS-PIPE transformations resolve before execution. Expression is a human-interface choice, not a source of analytical divergence.

W002-GLOSS-050.1

Equivalent supported expressions must resolve to the same governed operation and must not create

N/A

different analytical results merely because their surface syntax differs.

Glossary and Canonical Terms (continued)

W002-GLOSS-051

DS-STEPS

N/A

The native readable Data Sculptor transformation expression: plain, explicit, stepwise analytical procedure intended to be legible to an office analyst, reviewer, or LLM collaborator. DS-STEPS is not a reduced beginner mode.

W002-GLOSS-051.1

Inside the operations Data Sculptor supports, DS-STEPS must not have less analytical power

N/A

merely because it is easier to read.

W002-GLOSS-052

DS-SQL

N/A

The relational transformation expression for analysts who already think in SQL. It is an on-ramp to Data Sculptor semantics, not a separate SQL execution engine with competing analytical behavior.

W002-GLOSS-053

DS-PIPE

N/A

The compact compositional transformation expression for analysts who think in pipelines, including shell and dplyr/tidyverse traditions. It expresses the same governed transformation semantics by a sequential pipeline form.

W002-GLOSS-054

DS-VERIFY

N/A

The first-class Data Sculptor verification surface for stating propositions about data and evaluating them deterministically. DS-VERIFY produces truths and evidence rather than transformed replacement datasets.

W002-GLOSS-054.1

DS-VERIFY observes and reports. It does not filter, repair, recode, transform, or mutate the source it

N/A

is judging.

W002-GLOSS-055

Transformation

N/A

A governed analytical operation whose purpose is to derive, select, combine, summarize, calculate, or materialize data under Data Sculptor semantics. DS-STEPS, DS-SQL, and DS-PIPE are transformation expressions.

W002-GLOSS-056

Verification

N/A

A governed evaluation of a proposition about data whose result is truth plus evidence. Verification may report witnesses, counterexamples, counts, bindings, or set relationships, but it does not change the source data in order to answer the question.

Glossary and Canonical Terms

(continued) The following terms preserve the V1 statistics and visualization boundary and extend the glossary with the PRETTY Table handoff model. They establish canonical vocabulary before detailed implementation requirements.

W002-GLOSS-057

Descriptive Statistics

N/A

Governed numerical and categorical summaries used to understand what is present in data without performing inferential hypothesis testing or broader statistical modelling. In V1, descriptive statistics support inspection, data-quality understanding, and analytical orientation.

W002-GLOSS-058

Inferential Statistics

N/A

Statistical procedures whose purpose is to estimate, test, or model beyond direct description of the observed data, including hypothesis-testing workflows and broader statistical modelling. The current product boundary defers inferential statistics to V2.

W002-GLOSS-059

Quick Viz

N/A

The deliberately small V1 visualization surface used to help an analyst think about governed, analysis-ready data. Quick Viz is exploratory and diagnostic rather than a presentation platform. It is limited to five static chart types: histogram, box plot, bar chart, line chart, and scatter plot.

W002-GLOSS-060

Quick Viz Artifact

N/A

A static portable chart produced by Quick Viz, rendered or saved as SVG or PNG and suitable for clean printing to PDF. It is evidence and analytical orientation, not a dashboard or presentation-grade visualization product.

W002-GLOSS-061

PRETTY Table

N/A

A polished tabular handoff rendered from already-finalized analytical results. PRETTY may improve titles, spacing, headings, widths, notes, footnotes, and other governed presentation details, but it must not recalculate descriptive statistics, transform values, or alter analytical meaning.

W002-GLOSS-062

Rich Footnote

N/A

A governed human-facing note attached to a PRETTY Table or one specific PRETTY Table cell. A Rich Footnote can communicate source, method, caveat, interpretation boundary, or a human label for deeper Supporting Context. It is presentation of governed context, not a hidden analytical transformation.

W002-GLOSS-063

Supporting Context

N/A

A deliberately curated office artifact that explains, qualifies, references, or provides useful background for a PRETTY Table or one specific PRETTY Table cell. Supporting Context is not a generic project attachment bucket. Every governed Supporting Context artifact must have an explicit context anchor.

Glossary and Canonical Terms

(continued)

W002-GLOSS-064

Context Anchor

N/A

The governed relationship that binds a Rich Footnote or Supporting Context artifact to either a PRETTY Table as a whole or to one specific logical cell in that table. The exact serialized anchor grammar remains a freeze item, but the relationship must survive presentation changes and must not depend on human memory.

W002-GLOSS-065

Handoff Integrity

N/A

The property that a final analytical artifact carries enough governed source, method, caveat, provenance, and contextual meaning for a recipient to understand and review the result responsibly. Correct upstream calculation is necessary but not sufficient if the final handoff loses material context.

W002-GLOSS-066

PRETTY Delivery Package

N/A

A portable handoff consisting of a PRETTY Table and any governed Supporting Context artifacts intentionally materialized with it. Physical files retain their Core identity; human-facing aliases, footnote labels, and context relationships provide orientation without renaming historical artifacts.

Canonical PRETTY relationship

Finalized analytical result -> PRETTY Table -> Rich Footnote -> optional Supporting Context

artifact. The table shows familiar professional presentation. The governed model underneath preserves the exact table/cell anchor, artifact identity, provenance, and optional link to deeper evidence.

No anchor, no Supporting Context. END OF GLOSSARY

Glossary and Canonical Terms

(continued - open source and commercial white-label enablement) These terms clarify the relationship between the open-source product, organization-specific branding, and a future Red5Sorcery paid build service. They do not make the future hosted service a V1 implementation obligation.

W002-GLOSS-067

Open-Source Distribution

N/A

A Data Sculptor distribution whose complete applicable source code is available under the project's governing open-source license. Open source describes the software distribution and rights model; it does not require Red5Sorcery to provide every convenience service without charge. The exact license remains a separate freeze decision.

W002-GLOSS-068

Hosted White-Label Configurator

N/A

A future Red5Sorcery-operated browser/WASM application that lets an organization provide governed branding choices, preview a branded Data Sculptor edition, purchase automated generation, and receive a complete customized source distribution. The configurator changes the brand package, not the analytical engine.

W002-GLOSS-069

Branded Source Distribution

N/A

The complete source-code package for an organization-specific Data Sculptor edition, including its governed Brand Manifest, supplied brand assets, source/build provenance, applicable notices, and the instructions required to build or host the edition independently.

W002-GLOSS-070

Self-Hosting Package

N/A

The customer-facing delivery package that contains enough source, configuration, instructions, provenance, and optional prebuilt static WASM artifacts for the customer to deploy the branded edition on infrastructure of its own choosing without an ongoing runtime dependency on Red5Sorcery.

W002-GLOSS-071

Commercial Service Boundary

N/A

The distinction between the open-source software and Red5Sorcery's paid automation. The customer pays for convenient configuration, validation, generation, packaging, and delivery; the payment is not a gate that converts the analytical core into proprietary software or creates a customer-specific analytical fork.

Canonical formulation: Change the brand package, not the engine. A customer may choose to perform the permitted white-label work manually under the governing open-source license. The future Red5Sorcery service exists to make that work faster, safer, and easier to deploy.

Introduction - What Data Sculptor Is and Why It Exists Red5Sorcery Data Sculptor is being built for the office analyst: the person who works with CSVs, spreadsheets, reports, administrative data, surveys, extracts, and public data, and who may occasionally receive a file measured in gigabytes rather than megabytes. The product assumes that this person deserves serious analytical capability without being forced into a programming environment, a cloud warehouse, or an opaque proprietary backend.

The product promise is simple: Free. Fast. Private. PRETTY. The engineering interpretation is stricter: local processing, deterministic semantics, bounded memory, durable open artifacts, explicit evidence, inspectable storage, and human analytical authority. The user should be able to see what happened, explain what happened, and retain the complete analytical record.

W002-INTRO-001

Target user and problem

N/A

rather than a general-purpose programming environment.

W002-INTRO-001.1

The design must remain practical on ordinary low-end hardware and a small screen.

N/A
W002-INTRO-001.2

Occasional multi-gigabyte CSV sources are a first-class use case, not an exceptional failure

N/A

mode.

W002-INTRO-001.3

The system must favor explainability and bounded resource use over hidden convenience.

N/A
W002-INTRO-002

Browser-first shared core

N/A

WASM-002 is designed browser/WASM-first. The Rust semantic core is proven under browser constraints before a standalone native CLI host is built around the same frozen semantics.

W002-INTRO-003

Documentation is a primary UI

N/A

Data Sculptor must be documented so that a human or an LLM collaborator can understand its concepts, operations, artifacts, errors, storage model, and invariants without reverse-engineering hidden application state.

W002-INTRO-003.1

Referenceable requirement IDs, canonical glossary terms, examples, Store Map fields, Help

N/A

codes, and Work Order grammar are user-interface surfaces.

W002-INTRO-003.2

An LLM may help draft or explain a Work Order but must not silently invent missing

N/A

execution semantics.

W002-INTRO-003.3

The deterministic engine, not the LLM, is authoritative for validation, execution, evidence,

N/A

and results.

W002-INTRO-004

Human analytical authority

N/A

Data Sculptor must preserve a clear boundary between human intent, deterministic engine execution, AI assistance, and human interpretation. The software exists to strengthen analytical agency rather than replace it.

W002-INTRO-005

Durable project over transient application state

N/A

The Project Suitcase and its open artifacts are the durable analytical record. A project should remain understandable after Data Sculptor exits and should not depend on one machine path, one AI provider, or one Red5Sorcery service.

W002-INTRO-006

One semantics model, multiple expressions and hosts

N/A

Browser and future native hosts must reuse the same governed semantic core. Surface differences in file authorization, status display, or invocation must not create competing analytical meanings.

Orientation principle: An LLM should help the human understand the documented system; it should not become the undocumented system.

WASM-002 is designed primarily for office analysts who need reliable data manipulation, descriptive understanding, and verification

Product Promise and Public Principle

The public language is compact. The engineering obligations underneath it are not. Free. Fast. Private. PRETTY. FREE The core product is intended to remain open source and accessible. Browser/WASM delivery should make serious analytical work easy to obtain and try without requiring a proprietary Red5Sorcery backend simply to execute the analytical tool. Paid services may automate optional convenience, packaging, or support; they do not redefine the core as closed software.

FAST Responsiveness is a product requirement. Deterministic, inspectable, resource-disciplined software must still respect the analyst's time. Bounded memory, streaming execution, selective work, reusable buffers, measured performance, and evidence-based optimization are part of product quality, not afterthoughts.

PRIVATE Core analytical work is local-first. Analysts should not need to upload source data to a remote model, proprietary analytics service, or Red5Sorcery backend in order to prepare, transform, verify, summarize, or understand it. Deliberate sharing remains under human control.

PRETTY Data Sculptor accepts responsibility for the handoff. PRETTY means clear hierarchy, readable tables, governed branding, rich footnotes, provenance, caveats, Supporting Context, and office-ready artifacts. PRETTY must never manufacture confidence or alter analytical truth; presentation comes after governed content.

Data work you can explain. This is the deeper product principle beneath the four-word promise. Explainability must be built into the analytical record rather than generated afterward as plausible prose. A human should be able to identify the source, understand the requested operation, inspect the transformation or verification semantics, locate the evidence and receipt, resolve physical artifacts to logical meaning, and explain material caveats and context to another person.

An LLM may help the human read, draft, navigate, translate documented expressions, and explain that explicit record. The LLM is not the missing record and is not authoritative for execution truth.

Product rationale — what we are building and why

Rationale, not independent scope authority. The numbered Product Promise, WASM-002, Help, PRETTY, storage, and provenance requirements govern. This discussion records the human problem those requirements are intended to solve so later implementation does not preserve the mechanics while losing the purpose.

Much analyst anxiety is forensic rather than mathematical. The difficult question is often not how to calculate a median or standard deviation. It is whether the file was read completely, whether the source changed, whether an identifier was reinterpreted, whether today's extract is the same one used six weeks ago, whether a failed operation created partial output, whether the work can be reproduced, and whether the analyst can explain the result later to another person. Data Sculptor is designed around reducing that uncertainty with visible, inspectable evidence.

Data Sculptor shifts the systems burden away from the analyst. The analyst should not need to become an ad-hoc systems administrator or data-engineering specialist merely to work safely with a large local file. Bounded-memory streaming, chunk-boundary correctness, encoding validation, deterministic parsing, permanent row identity, provenance, receipts, and artifact integrity are responsibilities of the product. The analyst's working model should remain calm and declarative: Source → Work Order → Governed Run → Visible Evidence.

The product should absorb sophistication rather than expose it. Sophisticated engineering is valuable when it makes the analyst's work simpler, safer, and easier to defend. Data Sculptor should carry complexity underneath the interaction instead of requiring the user to understand WASM memory, parser edge cases, runtime environments, hidden caches, or cloud infrastructure in order to trust an ordinary analytical operation. Human analytical authority remains final; the software's job is to make the machinery beneath that judgment less mysterious and less fragile.

Failure is part of the analytical record. When Data Sculptor cannot proceed, the failure should not collapse into an opaque exception, disappearing toast, or vague paraphrase. The system should preserve the governed diagnostic event, explain the boundary that was reached, state relevant facts about what did and did not happen, preserve the source, identify a safe next action where one exists, and allow the analyst to hand durable evidence to IT or another analyst. Explainable failure is therefore part of explainable data work.

Visible evidence supports professional agency. Local-first execution, explicit Work Orders, visible Suitcase artifacts, deterministic outputs, receipts, Help reports, and provenance are intended to let the analyst remain the person who understands and owns the work rather than the person who must ask a black box what it probably did. Data Sculptor should make it possible to move from intent to evidence without requiring blind faith in hidden application state.

Design creed — a plain-language test for “Data work you can explain.”
I know what I asked the computer to do.
I know what it actually did.
I know what happened when it couldn't do it.
And I can show somebody else.

This creed is a design test rather than a substitute for requirements. New features should strengthen those four statements. A feature that makes any one of them materially harder to answer should be treated as a warning that convenience, automation, or abstraction may be weakening explainability.

W002-PROMISE-001

Product promise must map to architecture

N/A

The PRD must not use Free, Fast, Private, or PRETTY as decorative slogans. Each word must correspond to explicit architectural responsibilities, scope decisions, and acceptance evidence.

W002-PROMISE-002

Explainability is systemic

N/A

Data work you can explain must be supported by explicit Work Orders, documented semantics, deterministic execution, Store Map/Index orientation, receipts, verification evidence, Help, provenance, and PRETTY handoff artifacts rather than by undocumented application state.

W002-PROMISE-003

No conflict between promises

N/A

A performance optimization, hosted convenience service, branding option, or presentation feature must not silently weaken privacy, analytical determinism, open-source inspectability, or human analytical authority.

Working formulation: Free gets Data Sculptor to the analyst. Fast keeps it out of the analyst's way. Private keeps the data under the analyst's control. PRETTY helps the work survive the handoff. Data work you can explain ties the complete analytical path together.

Analytical Language Surfaces - Skeleton Architecture

This section records the WASM-002 language architecture at skeleton level. It establishes semantic roles, parity obligations, and the verification boundary. It does not freeze complete grammar, punctuation, capitalization, or full operation coverage.

One analytical semantics. Three transformation expressions. One verification surface. Surface Primary role Architectural intent DS-STEPS Readable transformation Plain, explicit, stepwise expression of governed analytical work.

DS-SQL Relational transformation SQL-oriented expression of the same governed analytical work. DS-PIPE Compositional transformation Compact sequential pipeline expression of the same governed analytical work.

DS-VERIFY Truth evaluation and evidence Declarative propositions about data; observe and report rather than mutate.

W002-LANG-001

One semantics, three transformation expressions

DEFERRED

DS-STEPS, DS-SQL, and DS-PIPE must express one Data Sculptor analytical semantics. Equivalent supported expressions must parse and validate into the same canonical operation model before deterministic execution.

W002-LANG-001.1

Changing among DS-STEPS, DS-SQL, and DS-PIPE must not change governed analytical meaning,

DEFERRED

row selection, values, ordering, output semantics, or evidence.

W002-LANG-001.2

The three transformation expressions must not form a power hierarchy. Readability or familiarity must

DEFERRED

not silently reduce analytical capability inside the supported Data Sculptor operation set.

W002-LANG-002

DS-STEPS role

DEFERRED

DS-STEPS is the native readable expression. Its design target is analytical procedure that can be read later by an office analyst, reviewer, or LLM collaborator without requiring a general-purpose programming mindset.

W002-LANG-003

DS-SQL role

DEFERRED

DS-SQL is the relational expression for analysts trained in SQL/query thinking. It must map to Data Sculptor semantics rather than establish a competing SQL-specific execution model.

W002-LANG-004

DS-PIPE role

DEFERRED

DS-PIPE is the compact pipeline expression for analysts comfortable with shell or dplyr/tidyverse-style sequential transformation. It must map to the same canonical operations as the other transformation expressions.

Analytical Language Surfaces - Skeleton Architecture

(continued)

W002-LANG-005

Canonical operation model and expression equivalence

DEFERRED

The deterministic engine must execute governed operations, not surface-specific interpretations. Parsers for DS-STEPS, DS-SQL, and DS-PIPE may differ, but equivalent supported expressions must converge before execution.

W002-LANG-005.1

Expression translation or UI switching must not require an LLM to reinterpret analytical intent at

DEFERRED

runtime.

W002-LANG-005.2

Acceptance work for a later frozen grammar should include semantic-equivalence cases across the

DEFERRED

three expressions.

W002-LANG-006

DS-VERIFY role

DEFERRED

DS-VERIFY is a first-class verification surface for stating propositions about data and evaluating them deterministically. Its intended domain includes uniqueness, required values, ranges and domains, membership, set relationships, cardinality, existence, implication, and structural invariants.

W002-LANG-007

Observe and report; never mutate

DEFERRED

DS-VERIFY must not change the data it is judging. A verification run may create verification artifacts, but those artifacts are reports about the governed source, not transformed replacements for it.

W002-LANG-008

Truth and evidence output

DEFERRED

The canonical DS-VERIFY result is a human-facing record of evaluated propositions and their outcomes. It should support proposition identity, TRUE/FALSE outcome, scope, counts, evidence summaries, and where applicable witnesses, counterexamples, or bindings. The durable canonical presentation is a PRETTY HTML report; a formatted XLSX companion may be supported for office workflows.

W002-LANG-009

Documentation and LLM assistance boundary

DEFERRED

All four surfaces must be documented sufficiently that an LLM collaborator can explain their role, draft candidate Work Orders, help translate equivalent transformations among DS-STEPS, DS-SQL, and DS-PIPE, and explain DS-VERIFY propositions to the human. The LLM does not establish runtime semantics: deterministic parsers, validators, and the shared engine remain authoritative.

W002-LANG-010

WASM-002 freezes only the bounded DS-STEPS materialization subset

DEFERRED

The complete future grammar of DS-STEPS, DS-SQL, DS-PIPE, and DS-VERIFY remains V1 language-design work. Exact syntax, punctuation, complete operation coverage, grammar edge cases, and cross-expression translation acceptance remain deferred unless a numbered WASM-002 requirement explicitly freezes a smaller surface.

Revision AL explicitly brings only the DS-STEPS materialization subset in W002-STEPS-001 through W002-STEPS-009 into WASM-002. That subset must not be read as a complete DS-STEPS language specification.

Descriptive Statistics - V1 Skeleton Architecture

This section records the V1/V2 statistics boundary at skeleton level. It carries forward the Day 020 decision that V1 includes a bounded descriptive core, while inferential statistics and broader modelling are deferred to V2. It does not yet freeze every formula, missing-data rule, numerical algorithm, or descriptive measure.

V1 prepares, understands, verifies, and presents the data. V2 adds inferential statistical analysis.

W002-STAT-001

V1 statistics boundary

DEFERRED

WASM-002 shall preserve descriptive statistics as a V1 capability and shall not silently expand the V1 Core into an inferential statistics or general statistical-modelling package.

W002-STAT-001.1

Hypothesis-testing workflows, ANOVA-family procedures, regression inference, and broader

DEFERRED

statistical modelling remain V2 territory unless a later explicit product decision changes the boundary.

W002-STAT-001.2

The architecture may prepare clean numerical foundations for future V2 work, but V1 must not carry

DEFERRED

speculative inferential complexity merely because it may be useful later.

W002-STAT-002

Purpose of the descriptive core

DEFERRED

The descriptive core exists to help an analyst answer direct questions about the observed data: how many observations are present, what values are typical, how variable values are, how values are distributed, and whether obvious data-quality problems are visible.

W002-STAT-003

Descriptive measure families

DEFERRED

The V1 descriptive design shall support a bounded set of clearly descriptive measure families. Candidate families inherited from earlier research include counts; central tendency; spread; position; distribution shape; and categorical or ordinal frequencies.

W002-STAT-003.1

Counts include total N, valid N, and missing N.

DEFERRED
W002-STAT-003.2

Central tendency includes mean, median, and mode.

DEFERRED
W002-STAT-003.3

Spread may include sum, minimum, maximum, range, variance, and standard deviation.

DEFERRED
W002-STAT-003.4

Position may include percentiles, quartiles, and interquartile range.

DEFERRED
W002-STAT-003.5

Shape may include skewness and kurtosis as descriptive diagnostics.

DEFERRED
W002-STAT-003.6

Frequencies may include counts, percentages, valid percentages, and cumulative percentages for

DEFERRED

categorical or ordinal variables.

W002-STAT-004

Grouping and accounting

DEFERRED

Descriptive summaries should be available globally or by explicit governed grouping variables where the operation semantics support grouping. The exact N used for a result must be explicit so missingness cannot be hidden inside a summary.

W002-STAT-005

Finalized results before PRETTY

DEFERRED

The statistics engine computes governed descriptive results. PRETTY renders finalized tables and related human-facing artifacts without recalculating the statistics.

W002-STAT-006

Dedicated statistics freeze remains required

DEFERRED

Because the Day 020 V1/V2 boundary superseded the earlier Day 019 inferential V1 direction, this skeleton does not automatically carry every earlier candidate statistic into V1. Exact formulas, missing-data rules, defaults, tolerances, and any ambiguous measures must be frozen in dedicated statistics requirements and regression-tested against trusted references.

Quick Viz - V1 Skeleton Architecture

Quick Viz exists to help the analyst think before presenting. It is a deliberately small, static analytical aid for seeing distributions, outliers, relationships, category differences, and trends. Visualization may reveal what the data needs next; the resulting transformation still belongs upstream in Data Sculptor.

Chart type Thinking purpose Histogram Distribution shape, skew, and unusual values. Box plot Spread, medians, outliers, and group comparison.

Bar chart Frequencies, proportions, and category or group summaries. Line chart Ordered conditions, repeated observations, and time or trend patterns.

Scatter plot Relationships between two numeric variables and visual checks of form or unusual observations.

W002-VIZ-001

Exactly five V1 chart types

DEFERRED

Quick Viz is limited to histogram, box plot, bar chart, line chart, and scatter plot. Additional chart families are outside the V1 Quick Viz boundary unless a later explicit product decision expands it.

W002-VIZ-002

Static, not interactive

DEFERRED

Quick Viz output is static. V1 does not include hover, zoom, pan, tooltips, dashboard controls, calculated fields inside the chart layer, or interactive filtering.

W002-VIZ-003

Analytical aid, not presentation layer

DEFERRED

Quick Viz is diagnostic and exploratory. It must not grow into PRETTY Viz or a presentation-formatting system. The analyst should not have to design the chart.

W002-VIZ-004

Strong governed defaults

DEFERRED

Quick Viz shall use restrained built-in defaults aligned with the Data Sculptor visual language. Chart generation should be deterministic for governed inputs and settings.

W002-VIZ-005

Portable artifacts

DEFERRED

Quick Viz charts shall be renderable or saveable as SVG or PNG and should print cleanly to PDF. The artifact should remain understandable outside a running Data Sculptor session.

W002-VIZ-006

Explore visually; transform explicitly

DEFERRED

If a chart reveals that filtering, grouping, bucketing, recoding, aggregation, calculated columns, rates, joins, pivots, or reshaping are needed, the analyst returns to DS-STEPS, DS-SQL, or DS-PIPE, performs the governed transformation, materializes or verifies the result, and visualizes again.

W002-VIZ-007

Presentation handoff remains downstream

DEFERRED

When analytical meaning is settled, regular CSV and PRETTY tabular outputs carry the finalized data into dedicated presentation or visualization tools. Quick Viz does not make those downstream tools authoritative for analytical transformations.

PRETTY Tables, Rich Footnotes, and Supporting Context -

V1 Skeleton Architecture

PRETTY Tables are the V1 office-handoff surface for finalized tabular results. They exist because analytical work is not finished merely when a number is correct; the recipient must also be able to understand the source, method, caveats, and evidence that travel with the number.

Be right. Make it understandable. Make it usable. Make it credible. Make it easy for the next person to act on. Layer Responsibility Finalized analytical result Governed values and semantics established before PRETTY.

PRETTY Table Professional XLSX handoff: titles, labels, widths, hierarchy, notes, and governed presentation. Rich Footnote Concise table- or cell-level source, method, caveat, or context label.

Supporting Context Optional deeper evidence tied to the table or one specific logical cell.

W002-PT-001

PRETTY Tables are a first-class V1 handoff surface

DEFERRED

Data Sculptor V1 shall be able to render finalized analytical tables into review-ready office artifacts without moving analytical logic into the presentation layer.

W002-PT-002

Finalized values before rendering

DEFERRED

The PRETTY Table renderer must consume already-established governed values. PRETTY may format, label, order presentation sections, and render notes, but it must not recalculate statistics, silently change values, or perform hidden analytical transformations.

W002-PT-003

Rich Footnotes

DEFERRED

PRETTY Tables shall support professional Rich Footnotes at table level and cell level. The visible footnote text should read like ordinary professional reporting language rather than expose internal Data Sculptor terminology.

W002-PT-003.1

Source

DEFERRED

A Rich Footnote may explain where a value or table came from and provide a human-readable path back to evidence.

W002-PT-003.2

Method

DEFERRED

A Rich Footnote may explain material transformations, calculations, population choices, joins, exclusions, or other governed analytical decisions.

W002-PT-003.3

Caveat

DEFERRED

A Rich Footnote may state limitations, suppression, uncertainty, scope boundaries, or interpretation risks that a recipient should not overclaim.

W002-PT-003.4

Supporting Context label

DEFERRED

A Rich Footnote may carry a human-facing label and optional link to deeper governed Supporting Context.

W002-PT-004

Two valid context anchors

DEFERRED

A Supporting Context artifact must be anchored either to the PRETTY Table as a whole or to one specific logical cell. Generic unanchored attachments are not part of the feature.

PRETTY Tables, Rich Footnotes, and Supporting Context

(continued)

W002-PT-005

Cell anchoring must survive presentation

DEFERRED

A cell-level context relationship must bind to a governed logical table/cell identity. A rendered spreadsheet address such as D7 may be recorded for convenience, but it must not be the only identity if layout or formatting can move the cell. The exact anchor serialization remains a freeze item.

W002-PT-006

Clickable local context

DEFERRED

When a Rich Footnote has Supporting Context, the rendered PRETTY Table should provide a relative local link from the human-facing footnote label to the governed Supporting Context artifact where the target format supports it. The recipient should be able to open the deeper evidence without a network service.

W002-PT-007

Identity-first physical storage

DEFERRED

When Data Sculptor materializes or copies Supporting Context into the Project Suitcase, the resulting Core artifact must receive governed physical identity under the current __DS__<CLASS>__<UTC>__<UUID>.<ext> model. Friendly labels such as "Reporting cutoff decision" belong in open metadata and the HTML orientation layer, not in variable-length Core filenames.

W002-PT-007.1

Original remains unchanged

DEFERRED

Materializing Supporting Context must not rename or mutate the analyst-owned source file from which it came.

W002-PT-008

Flat-folder portability

DEFERRED

Supporting Context must not require a hidden semantic subfolder. Governed context artifacts may live beside the PRETTY Table in the flat Project Suitcase, while the Store Map, Store Index, receipt, and PRETTY model preserve exact relationships and aliases.

W002-PT-009

Earlier packaging mechanics are historical, not automatically normative

DEFERRED

The Day 010 semantic decisions - curated context, table/cell anchors, professional labels, and portable links - are carried forward. Earlier candidate mechanics such as Base64-embedding an internal ZIP in TOML and friendly physical attachment filenames are not adopted automatically because the forward storage architecture now separates physical identity from human meaning.

W002-PT-010

Candidate V1 curation limits require freeze review

DEFERRED

Earlier design work proposed a maximum of five Supporting Context files and 2 MB combined uncompressed size per governing PRETTY/TOML specification. Revision J preserves those values as candidate V1 limits for adversarial review; they are not frozen by this draft.

W002-PT-010.1

Candidate office-file allowlist

DEFERRED

Earlier design work proposed .docx, .xlsx, .pptx, .txt, .pdf, .jpg, and .jpeg as familiar office formats, while excluding macro-enabled Office files, executables, scripts, nested archives, and developer-oriented formats. The final V1 allowlist remains a freeze item.

W002-PT-011

Handoff integrity

DEFERRED

A PRETTY Table should carry enough governed context that a recipient can understand not only what the values are, but where they came from, what shaped them, what qualifies them, and where deeper evidence can be found.

W002-PT-012

Scope guardrail

DEFERRED

Supporting Context is curated analytical context, not a document repository. No anchor means no attachment, and PRETTY must not become a general file-management system.

Storage Model and Physical Naming Architecture

WASM-002 assumes that a Data Sculptor project can live in one flat, user-controlled folder. The storage model therefore separates physical identity from human meaning. Physical filenames are rigid, short, fixed-shape system identifiers. Friendly store names, aliases, lineage, source relationships, and explanatory context live in the Store Map, Store Index, Work Orders, receipts, Help artifacts, and history.

Storage mantra: Physical identity in the filename. Human meaning in open metadata. Integrity in evidence. History in the Receipt-backed Flight Recorder. Authority with the human.

W002-STOR-001

Flat Project Suitcase

UNDER REVIEW

The durable WASM-002 project model must not require semantic per-store subfolders. A logical store is represented by governed relationships among artifacts and metadata inside a flat project folder.

W002-STOR-001.1

The flat model must remain usable through ordinary filesystem tools.

UNDER REVIEW
W002-STOR-001.2

Native and browser hosts must use the same logical storage semantics even when their

UNDER REVIEW

filesystem APIs differ.

W002-STOR-001.3

Folder placement must not be treated as the authoritative meaning of an artifact.

UNDER REVIEW
W002-STOR-002

Reserved Core namespace and sorting

UNDER REVIEW

Every Data Sculptor Core-managed artifact must use the reserved __DS__ prefix. The prefix is deliberately visually distinctive and mechanically simple so Core artifacts cluster together under ordinary filename sorting in a mixed flat folder.

W002-STOR-003

Three-character base-26 artifact class

UNDER REVIEW

The class token must be exactly three uppercase ASCII letters A through Z, giving the fixed physical range AAA through ZZZ, and must immediately follow the reserved namespace within the frozen filename grammar.

W002-STOR-003.1

The three-character alphabetic class rule supersedes every earlier numeric class example.

UNDER REVIEW
W002-STOR-003.2

Class ordering is positional base-26 using the alphabet A through Z: AAA, AAB, AAC, ... AAZ,

UNDER REVIEW

ABA, ... ZZZ. Ordinary lexical filename sorting therefore preserves the governed class order.

W002-STOR-003.3

The namespace contains 26 cubed, or 17,576, possible class values while preserving one

UNDER REVIEW

fixed-width token.

W002-STOR-003.4

Unallocated class tokens remain unassigned until explicitly allocated

UNDER REVIEW

WASM-002 does not reserve semantic meaning by numeric interval, lexical neighborhood, or implied class range. Any syntactically possible three-letter token that is not listed in the governed registry is unassigned for this build.

A future artifact class may be allocated only by explicit PRD revision. Existing class meanings must never be shifted, renumbered, or reassigned merely to make room for later families.

W002-STOR-003.5

The WASM-002 artifact-class table is frozen by the governed registry

UNDER REVIEW

The exact WASM-002 artifact-class table is the registry in PB-STOR-006. It is no longer a separate open storage freeze item. No additional reserved class ranges are defined by WASM-002.

Independent adversarial review must verify that every WASM-002-generated governed artifact uses one listed class with the frozen meaning, that WIP remains a lifecycle state rather than a class, and that unknown/unallocated classes are preserved and reported under PB-STOR-009 rather than silently interpreted.

W002-STOR-004

Canonical Core filename envelope

UNDER REVIEW

The default Core physical naming model for immutable governed artifacts is __DS__<CLASS>__<UTC>__<UUID>.<ext>. CLASS, UTC, and UUID are governed identity tokens. Human semantic labels are excluded from the physical identity envelope. A separately frozen artifact contract may define a well-known current-state singleton filename when that artifact must be updated in place and discovered by a stable name.

W002-STOR-005

Canonical filename shape and fixed token lengths

UNDER REVIEW

Every governed Core artifact type must have a canonical filename shape and total filename length so that a parser, browser host, native host, QA tool, or LLM can recognize malformed physical identity without interpreting variable human language.

Under the Revision AH default immutable grammar, the canonical UTC token YYYYMMDDTHHMMSSmmmZ is exactly 19 ASCII characters and the canonical lowercase hyphenated UUID v4 token is exactly 36 ASCII characters. Class precedes UTC and UTC precedes UUID.

W002-STOR-005.1

If an artifact class has exactly one governed representation, all filenames in that class have

UNDER REVIEW

one frozen total length.

W002-STOR-005.2

If a future class permits more than one representation, each class/representation pair must

UNDER REVIEW

still have a frozen total length.

W002-STOR-005.3

Friendly store names, column names, aliases, and operation descriptions must never stretch

UNDER REVIEW

or shorten a Core physical filename.

W002-STOR-006

Physical identity versus integrity

UNDER REVIEW

UUID identifies the governed artifact instance. SHA-256 records or verifies the exact bytes. The system must not overload one field to serve both identity and integrity.

W002-STOR-007

Collision handling

UNDER REVIEW

Physical filename collisions are expected to be rare but must be handled explicitly. Data Sculptor must never silently overwrite an existing governed artifact because a generated physical name already exists.

W002-STOR-007.1

Before durable creation, the host must check whether the target physical name already

UNDER REVIEW

exists.

W002-STOR-007.2

On a UUID collision, the existing artifact is preserved and a fresh UUID is generated under the

UNDER REVIEW

same relevant UTC/class context unless a later frozen rule requires a different deterministic response.

W002-STOR-007.3

Collision handling must be visible in the run Receipt/evidence when it occurs

UNDER REVIEW

If governed identity allocation encounters one or more filename collisions before successfully allocating a non-colliding UUID identity, the canonical run Receipt must record that a collision retry occurred and the number of retries when the run reaches receipt publication.

If identity allocation ultimately refuses, the refusal Receipt and diagnostic evidence must preserve the collision-failure fact without overwriting or mutating any pre-existing artifact.

W002-STOR-008

Analyst-owned files remain analyst-owned

UNDER REVIEW

Source files and analyst documents may retain their original filenames. Data Sculptor must not rename every input merely to fit the governed __DS__ namespace.

For an ordinary WASM-002 analytical run, continuity between certification and materialization is established by the run-local source-binding contract, not by pretending a mutable source filename is permanent byte identity. Durable cross-run exact-byte verification requires separately governed integrity evidence such as the later V1 FINGERPRINT operation.

W002-STOR-009

Store Map as machine truth

UNDER REVIEW

The Store Map must provide the machine-readable relationship between governed physical artifacts and their logical meaning, including the fields required by the frozen schema for store identity, column identity, source reference/binding, run/materialization identity, row counts, status, lineage, supersession, and related provenance.

Cryptographic hashes are recorded when a requirement or explicit operation actually produces them; the Store Map contract must not imply that every source or artifact is automatically hashed during ordinary WASM-002 execution.

W002-STOR-010

Store Index and aliases as human orientation

UNDER REVIEW

The Store Index must provide a persistent HTML orientation layer over Store Map truth and related evidence. It may display friendly aliases and meaningful groupings while preserving exact links to physical identity.

W002-STOR-010.1

WASM-002 MAP artifacts are unified Store MAP snapshots

UNDER REVIEW

For WASM-002, the governed MAP artifact is the single Store metadata snapshot. It records the Store's human-facing alias, Store-establishing source filename, exact RID artifact binding, RID alias, and the complete current materialized-column mappings and aliases governed by W002-STOR-019 through W002-STOR-019.12.

WASM-002 must not create a second hidden or separately named Store-metadata file merely to bind the Store to its RID or aliases. The visible immutable __DS__MAP__...csv artifact is the authoritative governed Store MAP for this build.

W002-STOR-010.2

Changing a friendly alias must not change physical identity, hashes, lineage, or historical

UNDER REVIEW

provenance.

W002-STOR-010.3

The Store Index should normally speak in human vocabulary while retaining exact physical

UNDER REVIEW

identity where diagnostically useful.

W002-STOR-010.4

The Store Index is static durable HTML, not a daemon, localhost service, or required cloud

UNDER REVIEW

dashboard.

W002-STOR-011

Store, row-universe, and future Boolean-selection-column rule

UNDER REVIEW

Same-row derived columns and later aligned Boolean selection/filter columns remain within the same logical Store when row identity, row order, and cardinality are preserved. A future filter that evaluates every existing RID and writes one aligned two-valued Boolean result per RID does not by itself create a new row universe or a new logical Store. The canonical future selection tokens are 0 for FALSE and 1 for TRUE under PB-OPS-003 and PB-OPS-003.1.

A new row universe is created only when a later governed operation actually changes which rows exist or their order—for example by building/exporting only selected rows, deduplicating rows, or otherwise materializing a different row set. Such an operation creates a new logical Store identity under the frozen row-identity contract.

Filtering remains deferred from executable WASM-002 scope; this requirement freezes only the Store/RID compatibility rule that later filtering will rely upon.

W002-STOR-012

Current orientation and history are different truths

UNDER REVIEW

Current Store orientation is represented by the applicable immutable MAP snapshot, while execution history is preserved by immutable RCP Receipts. For WASM-002, the Flight Recorder is the logical chronological view of published canonical RCP artifacts from actual Run invocations of saved immutable WKO Work Orders. It is not separately persisted and has no separate artifact class. Successful and refused runs contribute when Receipt publication succeeds; Receipt-publication failure is governed by W002-RCP-010 and must not be silently reconstructed as original evidence. Any Flight Recorder presentation is derived and regenerable from the authoritative Receipts.

W002-STOR-013

Open representations

UNDER REVIEW

Durable project artifacts should use documented open formats such as CSV, HTML, TXT, TOML, or other explicitly governed representations so that the Suitcase remains inspectable and portable outside Data Sculptor.

W002-STOR-014

LLM-readable storage grammar

UNDER REVIEW

The storage grammar, class table, Store Map schema, current-state selection rule, and alias semantics must be documented publicly enough that an LLM collaborator can distinguish physical identity, logical meaning, integrity evidence, current state, and history without guessing.

W002-STOR-015

WASM-002 storage freeze status

UNDER REVIEW

The current WASM-002 storage design preserves the resolved semantic artifact-class registry, canonical UTC millisecond rendering, class → UTC → UUID token order, UUID rendering/version, default immutable identity grammar, collision retry behavior, immutable Store-MAP versioning, Store-aware automatic MAP inheritance, complete-snapshot semantics, the exact nine-column Store MAP schema, deterministic Store/RID/COL alias defaults, rematerialization alias continuity, deterministic Store-MAP CSV serialization, Store-MAP eligibility/publication validation, materialization-coupled AS alias semantics, standalone alias creation/replacement using UPDATE ALIASES, explicit alias clearing with CLEAR ... ALIAS, deterministic default restoration with RESET ... ALIAS, exact historical Store-MAP selection using MAP "<exact Store MAP filename>", canonical one-column COL serialization, the all-or-refuse materialization publication boundary, SCR-to-final-class host rename promotion, complete-set validation before promotion, new-Store RID-first promotion, inherited-RID reuse for ordinary existing-Store work, deterministic COL promotion, successor-MAP construction/validation as SCR, successor-MAP rename last as the Store-state commit point, rollback/recovery treatment for uncommitted promoted artifacts, the canonical RID CSV contract, explicit governed RECOVER RID syntax and recovery semantics, recovery-aware Store-lineage continuity, shared publication-transaction UTC semantics for newly created RID/COL/MAP artifacts, the canonical automatic TXT Receipt contract including exact WKO lineage and RID-recovery facts, the Receipt-backed Flight Recorder, the governed HTML Suitcase Validation Certificate, the Work Order alias/comment contract plus WKO-MAP alias-registry profile, and the LCK reservation for explicit later-V1 FINGERPRINT evidence without automatic hashing in ordinary WASM-002.

The Help-report provenance boundary is now resolved: WASM-002 records governed HLP identity and lineage but does not automatically SHA-256 HLP bytes or create/refresh LCK evidence; exact-byte HLP integrity remains the later explicit FINGERPRINT/LCK workflow. Future branded Receipt rendering/Brand-Manifest integration remains outside the WASM-002 TXT-only Receipt contract. Persistent Work Order description storage, standalone alias creation/replacement, alias clearing/reset, explicit historical Store-MAP selection syntax, and HLP fingerprint provenance are no longer open storage items.

WASM-002 Canonical Run Receipts

A Work Order is the durable record of analyst authorization. A Receipt is the durable record of the governed execution attempt. WASM-002 therefore creates a small deterministic TXT sidecar after every actual Run invocation of a saved WKO, whether the run succeeds or refuses. Receipt generation is engine infrastructure and is never a Work Order instruction.

W002-RCP-001

Every actual Run invocation of a saved WKO automatically produces one Receipt attempt

UNDER REVIEW

When the analyst invokes Run on a saved immutable WKO, Data Sculptor must automatically create one governed run-receipt attempt for that invocation. The Work Order must not require a RECEIPT, SAVE RECEIPT, or equivalent clause.

An editable unsaved WIP is non-executable under the Work Order lifecycle contract and therefore cannot produce an execution Receipt. A saved WKO that is invoked and then refuses during validation or execution still has an execution outcome and must receive a refusal Receipt when receipt publication succeeds.

W002-RCP-002

The canonical WASM-002 Receipt is a governed TXT artifact with its own creation timestamp

UNDER REVIEW

The physical Receipt filename is:

__DS__RCP__YYYYMMDDTHHMMSSmmmZ__<uuid-v4>.txt

The UTC token belongs to the Receipt artifact itself and represents the Receipt's governed creation/publication time under the canonical artifact-identity rules. It must not be copied from the authorizing WKO's filename merely to make the two filenames share a timestamp.

The file is written visibly in the flat Suitcase under the governed RCP artifact class. Data Sculptor chooses the governed filename; the analyst does not supply it.

W002-RCP-003

WASM-002 Receipts are TXT-only and independent of presentation state

UNDER REVIEW

For WASM-002, the canonical run Receipt is always plain TXT. Browser theme, built-in HTML presentation, Help voice, or other presentation state must not change whether the run Receipt is emitted as TXT or alter its governed facts.

WASM-002 must not emit an HTML Receipt as an alternative to the canonical TXT Receipt. Configurable Brand Manifest behavior is deferred to a future build.

W002-RCP-004

Future branded HTML Receipts must render the same canonical receipt facts

DEFERRED

A later product revision may permit a valid governed branding definition, including a future TOML serialization if adopted, to render the canonical Receipt facts as branded self-contained HTML. Such rendering is presentation only.

The HTML representation must not change, omit, reinterpret, weaken, or invent analytical facts relative to the canonical receipt-fact model. The exact future switch between TXT and branded HTML, whether both are retained, the TOML/Brand Manifest serialization, and HTML rendering details are outside the WASM-002 freeze.

W002-RCP-005

Canonical Receipt TXT serialization is deterministic

UNDER REVIEW

The WASM-002 Receipt is UTF-8 without BOM and uses LF (0x0A) line endings. It is a deterministic line-oriented KEY: VALUE document with a frozen core-key order followed by operation-specific fact sections in deterministic order.

Enumerated values use the exact uppercase tokens frozen by the applicable requirement. Non-negative integers use ungrouped ASCII base-10 digits. Text values must be escaped or quoted by one deterministic receipt-text rule so embedded delimiter-like characters cannot make a Receipt ambiguous. The exact escaping rule may be implemented as a small shared serializer but must be acceptance-tested byte-for-byte.

W002-RCP-006

Every Receipt records the fixed core execution facts and exact WKO lineage

UNDER REVIEW

Every canonical WASM-002 Receipt must contain, in frozen core order, at least:

  • RECEIPT_VERSION;
  • RECEIPT_FILENAME;
  • WORK_ORDER_FILENAME — the exact physical immutable WKO identity invoked, including that WKO artifact's own governed timestamp and UUID;
  • OPERATION — the governed top-level operation requested by that WKO;
  • RUN_STARTED_UTC and RUN_FINISHED_UTC in canonical UTC millisecond form;
  • RESULT — at minimum SUCCESS or REFUSED;
  • DIAGNOSTIC_ID — canonical diagnostic identity for refusal, or an explicit none token for an ordinary successful run;
  • IDENTITY_COLLISION_RETRIES — zero when no governed-filename collision retry occurred; and
  • CREATED_ARTIFACT_COUNT followed by the exact governed physical filenames of artifacts successfully published by the run, excluding the Receipt itself.

The exact WORK_ORDER_FILENAME is the authoritative WKO→RCP lineage link. Receipt/WKO filename timestamps are not required to match and ordinarily represent different artifact-creation events. One immutable WKO may therefore be run multiple times, with each run publishing a distinct RCP carrying its own Receipt timestamp and run timestamps while pointing back to the same exact WORK_ORDER_FILENAME.

The Receipt must not claim an artifact was successfully published merely because a candidate filename was allocated or partial bytes were written.

W002-RCP-007

Materialization Receipts record Store, RID, Stage 1, Stage 2, and output facts

UNDER REVIEW

For a WASM-002 MATERIALIZE run, the Receipt must additionally record the exact source filename, inherited Store MAP filename or explicit none for a newly established Store, exact RID filename, RID_ACTION as CREATED or REUSED, Stage 1 UTF-8 outcome, exact certified source-byte count when Stage 1 reached completion, Stage 1 elapsed time, Stage 2 accepted logical row count when available, Stage 2 elapsed time when Stage 2 ran, requested/resolved selected-column count, the exact physical COL filenames successfully published in resolved KEEP order, and the successor Store MAP filename when successfully published.

A refusal Receipt records only facts that actually became known before refusal. It must use explicit not-run/not-available tokens rather than fabricate later-stage counts, timings, or artifact identities.

W002-RCP-008

Other WASM-002 operations add deterministic operation-specific Receipt facts

UNDER REVIEW

The same canonical RCP mechanism applies to other executable WASM-002 Work Orders, including INVENTORY, governed source conversion, and RECOVER RID. Each operation adds its required deterministic fact section without changing the fixed core Receipt meaning.

For INVENTORY this includes the resulting INV artifact identity and captured entry count when successful. For source conversion this includes the governed source-encoding terminology, materialized UTF-8 encoding, bounded/streaming fact, and resulting converted-source identity when successful, preserving the existing conversion requirements. RID recovery adds the exact deterministic facts frozen in W002-RCP-011.

W002-RCP-009

Receipt truth is execution evidence, not presentation authority

UNDER REVIEW

The Receipt records what Data Sculptor actually attempted, observed, refused, and successfully published. It must not reinterpret the analyst's WKO, replace the Store MAP, or become a second analytical command surface.

The WKO remains the durable authorization record; Store MAP/RID/COL artifacts remain the governed analytical state; diagnostic events remain the refusal/help truth; the Receipt cross-references those facts as the durable run ledger. The body of published canonical RCP artifacts is the authoritative evidence substrate for the Flight Recorder logical view defined in W002-STOR-012.

W002-RCP-010

Receipt-publication failure is itself a governed evidence failure

UNDER REVIEW

Data Sculptor must never claim that a durable Receipt exists until the RCP file has been successfully written and closed in the Suitcase. If host or filesystem failure prevents Receipt publication, the browser must surface a canonical diagnostic through the Help Engine stating that receipt evidence could not be persisted.

A receipt-publication failure does not retroactively falsify analytical artifacts that were already successfully committed under their own publication contracts, but the user-facing run summary must clearly distinguish analytical outcome from receipt-persistence failure. Data Sculptor must not invent, backdate, or silently reconstruct a Receipt and present it as the original run artifact.

W002-RCP-011

RID recovery Receipts preserve the damaged-to-replacement RID evidence chain

UNDER REVIEW

For a RECOVER RID run, the canonical Receipt must additionally record, when known: the exact requested Store alias; exact recovery-base MAP filename; exact damaged/missing RID filename named by that MAP; the reason recovery was eligible; the deterministic recovered row count N; the exact current COL filenames whose validated common cardinality established N; RID_ACTION: RECOVERED on success; the exact replacement RID filename when successfully promoted; and the exact recovery successor MAP filename when successfully committed.

The Receipt must make clear that the replacement RID preserves logical values 1..N while using a new physical artifact identity. It must not claim successful RID recovery unless the successor MAP commit point completed. A refused recovery records only facts actually established before refusal and uses the canonical diagnostic ID for the refusal.

W002-RCP-ACC-001

Successful materialization Receipt and WKO-lineage acceptance

UNDER REVIEW

A Store-establishing materialization fixture must run one saved WKO, publish exactly one canonical TXT RCP, and prove that the Receipt identifies the exact WKO through WORK_ORDER_FILENAME, source, RID_ACTION: CREATED, new RID, Stage 1 result/bytes/time, Stage 2 row count/time, all requested COL artifacts in resolved KEEP order, successor Store MAP, published-artifact count, timestamps, and RESULT: SUCCESS. The RCP filename UTC must represent the Receipt artifact's own creation/publication event and must not be required to equal the WKO filename UTC.

The same immutable WKO must then be executable again in an appropriate fixture, producing a second distinct RCP with its own Receipt/run timestamps while both Receipts contain the same exact WORK_ORDER_FILENAME. A later same-Store materialization fixture must additionally prove RID_ACTION: REUSED and the original RID filename.

The Store-establishing fixture must also prove that the newly created RID, every newly created COL, and the successor MAP carry one identical publication-transaction UTC token while each has a distinct UUID; the RCP filename UTC remains its own Receipt publication timestamp and is not required to equal that analytical transaction UTC. A later same-Store materialization must prove that newly created COLs and its successor MAP share the later transaction UTC while the inherited RID retains its original timestamp/UUID.

W002-RCP-ACC-002

Refusal Receipt acceptance

UNDER REVIEW

A saved WKO that is actually Run and deterministically refuses before Stage 2 must still produce one canonical TXT Receipt when receipt publication is available. The Receipt must identify RESULT: REFUSED, the exact diagnostic ID, the stage facts actually reached, explicit not-run/not-available values for later facts, and zero successfully published analytical artifacts when that is the true fixture outcome.

An unsaved WIP must be proven unable to Run and therefore must not create an execution Receipt.

W002-RCP-ACC-003

Receipt TXT is invariant to presentation state in WASM-002

UNDER REVIEW

The same governed run must be exercised under materially different permitted browser presentation states. In each case the run Receipt must remain an RCP TXT artifact governed by the same receipt serialization and facts. Presentation must not convert it to HTML or alter execution truth in WASM-002.

This acceptance gate does not require a configurable Brand Manifest; that capability is deferred.

WASM-002 Store RID Spine

The RID artifact is the permanent row spine of a Store. It exists so later aligned columns can be reasoned about, reused, combined, filtered, enriched, and eventually assembled into deliverables without repeatedly rebuilding or renumbering the underlying row universe. Revision AO freezes only the row-identity contract required by WASM-002; later filtering, calculated-column, join, and BUILD CSV operations may rely on this contract without being pulled into WASM-002 scope merely by this section.

W002-RID-001

A Suitcase may contain multiple Stores and each current Store state binds exactly one RID

UNDER REVIEW

The Suitcase is a workspace and may contain zero, one, or multiple logical Stores. Every committed Store state binds exactly one governed current RID artifact. RID values are unique only within their Store row universe; they are not Suitcase-global identifiers.

Ordinary same-row-universe work reuses that RID unchanged. A governed RID recovery under W002-RID-009/W002-RID-010 may replace a missing or invalid physical RID with a new immutable RID artifact while preserving the same logical row-identity sequence 1..N. Historical damaged/replaced RID artifacts may therefore remain visible as evidence even though exactly one RID is current in the successor MAP.

The stable logical row reference is conceptually (Store recovery lineage, RID value); the current physical RID identity is the exact rid_filename bound by the authoritative MAP.

W002-RID-002

The Store RID is generated automatically once, normally reused, and replaced only by governed recovery

UNDER REVIEW

When the first successful materialization establishes a new Store, Data Sculptor must automatically generate that Store's initial RID artifact as part of the same Stage 2 operation and the same all-or-refuse publication boundary. The analyst does not separately request ordinary RID generation.

During that first Store-establishing materialization, the canonical RID byte stream is written first as a visible governed SCR candidate while the requested materialized columns are likewise written as SCR candidates. The new RID candidate and all requested COL candidates must reach EOF, reconcile to the same accepted Store row count N, and pass their required final validation before any candidate is promoted.

After complete-set validation, Data Sculptor allocates the final RID identity using the materialization transaction UTC shared under PB-STOR-013/PB-STOR-014 plus a RID-specific UUID, and promotes the RID candidate first by host rename from its SCR filename to the final RID filename. The RID bytes must not change during promotion. Requested COL candidates are promoted only after RID promotion succeeds. If later promotion or successor-MAP publication prevents transaction commit, the newly promoted RID is not committed Store state merely because an RID-looking file exists; it must be rolled back out of the RID namespace where safely possible or retained as attributable recovery evidence under the materialization failure contract.

If the first Work Order materializes one source column, the successfully committed Store publishes exactly one RID plus that requested COL and the other governed evidence required by the materialization contract. If the first Work Order materializes multiple source columns, the transaction still commits exactly one RID plus the requested COL artifacts.

Later ordinary materializations or other same-row-universe operations that preserve row cardinality and order must reuse the existing RID unchanged. They must not create a new RID candidate, regenerate, replace, renumber, or silently supersede the inherited RID. The sole WASM-002 exception is an explicit governed RECOVER RID Work Order satisfying W002-RID-009/W002-RID-010.

W002-RID-003

RID physical identity uses the governed RID filename grammar

UNDER REVIEW

The physical RID filename must be:

__DS__RID__YYYYMMDDTHHMMSSmmmZ__<uuid-v4>.csv

The filename contains governed physical identity only. A Store name or friendly analyst alias must not be inserted into, substituted for, or used to rename this immutable physical RID filename.

W002-RID-004

RID is a canonical one-column CSV containing the exact sequence 1 through N

UNDER REVIEW

The RID artifact must serialize as a canonical one-column CSV with:

  • exactly one UTF-8 BOM at byte zero;
  • the literal first logical record RID;
  • LF (0x0A) record terminators on every supported host;
  • one data record for each Store row, in order, containing the unquoted unsigned base-10 integer row identity;
  • the exact sequence 1, 2, ... N, with no zero, negative values, signs, thousands separators, locale formatting, decimal points, exponent notation, or leading zeroes; and
  • a final LF after the Nth RID data record.

Because every RID value contains ASCII digits only, quoting is neither required nor permitted in the canonical RID artifact.

W002-RID-005

RID cardinality and order define same-Store column alignment

UNDER REVIEW

If a Store RID contains N data records, every governed column claimed to be aligned to that Store must contain exactly N data records in the same RID order. Data Sculptor must not describe a shorter, longer, reordered, duplicated, or row-shifted column as aligned to that Store.

This invariant applies to materialized source columns in WASM-002 and is the stable contract that later calculated, Boolean-selection, verification, or left-join enrichment columns may rely upon.

W002-RID-006

A different row universe requires a different Store and a new RID

UNDER REVIEW

An operation that changes which rows exist or changes their governed order does not mutate the existing Store RID. It establishes a different row universe and therefore requires a new logical Store identity and a new RID artifact beginning again at 1 for that new Store.

Filtering that is represented only as a same-length aligned Boolean/selection column does not itself change the row universe; building a new reduced/reordered row set later would.

W002-RID-007

The Store MAP gives RID a friendly alias without changing RID identity

UNDER REVIEW

The physical RID artifact remains identified by its immutable governed filename and semantic RID class. Every valid Store MAP records that exact rid_filename and one current human-facing rid_alias.

Changing the RID alias must not rename, rewrite, regenerate, or alter the meaning of the RID artifact. The same Store MAP also records the Store alias and materialized-column aliases, so the analyst-facing names and the physical Store spine remain explicitly connected in one visible governed artifact.

W002-RID-008

Ordinary RID generation is implicit Store infrastructure; RID recovery is explicit

UNDER REVIEW

WASM-002 materialization Work Orders specify the analyst's requested source columns and aliases. They must not require or expose a separate instruction such as RID, ROW INDEX, GENERATE RID, or an equivalent switch to create the Store row spine.

Initial RID generation for a new Store is mandatory engine behavior implied by successful MATERIALIZE. WASM-002 must not provide an option to disable it. Conversely, when ordinary materialization extends an existing Store, the engine must recognize and reuse that Store's existing RID rather than interpreting the absence of RID syntax as a request to create another one.

Governed recovery is intentionally different: when an existing RID is missing or invalid, the analyst must explicitly authorize reconstruction with the canonical RECOVER RID FOR STORE "<StoreAlias>" Work Order form. Recovery never occurs silently as a side effect of MATERIALIZE.

W002-RID-009

RECOVER RID reconstructs only a provably recoverable current Store row spine

UNDER REVIEW

The canonical RID-recovery operation is a governed exceptional repair of physical RID representation, not ordinary materialization and not creation of a new logical row universe. The analyst must target one Store through the canonical DS-STEPS syntax in W002-STEPS-010.

Recovery may proceed only when Data Sculptor can deterministically identify one recovery-base MAP for the requested Store and establish that the defect requiring recovery is the MAP-bound RID: the referenced RID is missing, unreadable, or fails canonical RID validation. The recovery-base MAP itself must remain structurally valid apart from that RID-binding failure, and every COL artifact bound by that MAP must be present, readable, canonically valid, and agree on exactly one data-row count N in the existing governed row order.

The common COL cardinality N is the deterministic recovery evidence for reconstructing canonical RID values 1..N. If no unique target Store/recovery-base MAP can be resolved, if no trustworthy N can be established, if current bound COL artifacts disagree on N, or if any additional Store-state corruption prevents proving the existing row axis, Data Sculptor must refuse. It must never guess N, infer missing rows, reorder data, or use RID recovery to repair unrelated COL/MAP damage.

W002-RID-010

RID recovery publishes a new immutable RID and one successor MAP without overwriting history

UNDER REVIEW

A successful RECOVER RID run must never overwrite, rename in place, or silently repair the damaged RID artifact. Data Sculptor writes canonical 1..N RID bytes under a governed SCR candidate, closes/reopens/validates the candidate completely, then promotes it by host rename to a new immutable RID identity.

The replacement RID and the recovery successor MAP use the same new canonical recovery-transaction UTC timestamp under PB-STOR-013/PB-STOR-014 and distinct UUIDs. Existing valid COL artifacts referenced by the recovery-base MAP retain their original filenames, timestamps, UUIDs, bytes, source metadata, and aliases.

After RID promotion, Data Sculptor constructs a complete successor MAP as SCR that preserves the recovery-base Store alias, Store source filename, RID alias, complete COL mapping set, and COL physical identities while replacing only the Store's bound rid_filename with the newly recovered RID. The MAP candidate must close, reopen, and pass full recovery-aware MAP validation; only then may it be renamed into its final MAP identity. That SCR-to-MAP rename is the recovery commit point.

If recovery fails before MAP commit, the prior published MAP remains historical evidence of the degraded Store state and no replacement RID becomes current merely by existing under an RID filename. Newly created recovery artifacts must be rolled back where safely possible or retained visibly as attributable SCR/RCV evidence.

W002-RID-ACC-001

Canonical RID byte serialization acceptance

UNDER REVIEW

An acceptance fixture with N=5 must prove exact governed bytes equivalent to UTF-8 BOM followed by:

RID
1
2
3
4
5

with LF terminators only and a final LF. The same fixture repeated under different permitted source-window boundaries must produce byte-identical RID content apart from the governed physical filename allocated to the artifact.

W002-RID-ACC-002

Multiple Stores in one Suitcase retain independent RID spines

UNDER REVIEW

An acceptance fixture must establish at least two Stores with different row counts in the same Suitcase and prove that each Store publishes and retains exactly one distinct governed RID artifact. RID values may overlap numerically across Stores without collision because the Store identity disambiguates them.

W002-RID-ACC-003

Later same-Store materialization reuses rather than regenerates RID

UNDER REVIEW

An acceptance fixture must establish a Store with an initial materialization, record the physical RID identity and exact RID bytes, then perform a later permitted materialization that adds at least one aligned COL without changing the row universe. The later run must reference and reuse the original RID artifact; no replacement RID may be published and the original RID bytes must remain unchanged.

W002-RID-ACC-004

Implicit RID generation acceptance for single- and multi-column first materialization

UNDER REVIEW

Acceptance must execute two Store-establishing Work Orders that contain no RID or row-index syntax: one requesting exactly one source column and one requesting multiple source columns. Each successfully committed run must publish exactly one governed RID artifact regardless of the number of requested COL artifacts.

The fixture must prove that RID creation occurs during the same Stage 2 source-record traversal that establishes the Store row count rather than by requiring a second source pass solely to construct RID. The RID row count must reconcile exactly with every requested COL row count and the final accepted Store N.

Before complete-set validation, the RID bytes must exist only as a governed SCR candidate. Acceptance must prove that the RID candidate is promoted by host rename only after the complete RID/COL candidate set validates, that RID promotion precedes COL promotion, and that the resulting RID is not considered committed Store membership until the successor MAP is successfully promoted and binds that exact RID filename.

W002-RID-ACC-005

RID recovery reconstructs the same row axis and commits only through a successor MAP

UNDER REVIEW

An acceptance fixture must establish a Store, retain at least two valid current COL artifacts, then make the current MAP-bound RID missing or canonically invalid while leaving the recovery-base MAP and bound COLs otherwise valid. Running a saved Work Order containing RECOVER RID FOR STORE "<alias>" must prove that Data Sculptor derives one common N from all current bound COLs, reconstructs exact canonical RID bytes 1..N under SCR, promotes a new RID without overwriting the damaged RID, and publishes exactly one successor MAP last.

The replacement RID and successor MAP must carry the same new canonical recovery-transaction UTC token and distinct UUIDs. Existing valid COL filenames, timestamps, UUIDs, bytes, source metadata, and aliases must remain unchanged. The successor MAP must bind the replacement RID and the existing COL set; the previous MAP remains immutable historical evidence.

Additional fixtures must prove refusal when Store alias resolution is missing/ambiguous, when current bound COLs disagree on N, when any required current COL is missing/invalid, and when the RID is healthy so recovery is not warranted. A promotion/MAP-publication failure fixture must prove that no replacement RID becomes current without successful successor-MAP commit.

WASM-002 Suitcase Inventory Snapshot

WASM-002 includes a lightweight explicit inventory operation for ordinary analyst continuity. It records visible file metadata for the authorized flat Suitcase without reading the contents of those files. The inventory is evidence of what filenames and host-reported metadata were visible at one moment; it is deliberately not a cryptographic claim that file bytes are unchanged.

Two assurance levels remain distinct. INVENTORY is the quick metadata-level operation frozen here. Whole-file or whole-Suitcase SHA-256 fingerprinting is a heavier byte-reading operation and is not silently performed by INVENTORY. The later explicit FINGERPRINT workflow may publish immutable LCK Suitcase Lock evidence; INVENTORY does not create, refresh, or verify LCK. Help must explain the distinction.
W002-INV-001

INVENTORY is an explicit standalone WASM-002 Work Order operation

UNDER REVIEW

The canonical WASM-002 form is:

SUITCASE: .
INVENTORY

INVENTORY reads the authorized Suitcase directory metadata and creates one governed Suitcase Inventory Snapshot. It is read-only with respect to pre-existing Suitcase files. In WASM-002, an INVENTORY Work Order must not also request materialization, conversion, fingerprinting, another analytical operation, or another Work Order invocation.

W002-INV-002

Suitcase Inventory uses the governed INV artifact class and canonical filename grammar

UNDER REVIEW

A successful inventory produces exactly one visible flat TXT artifact whose physical filename is:

__DS__INV__YYYYMMDDTHHMMSSmmmZ__<uuid-v4>.txt

The UTC and UUID tokens follow the existing governed artifact-identity rules. Data Sculptor must not create an inventory subfolder, hidden cache copy, or alternate private persistence.

W002-INV-003

The lightweight inventory records filename, exact byte length, and last-modified metadata

UNDER REVIEW

For every regular file present in the authorized flat Suitcase root at snapshot time, the inventory must record:

  • the exact visible filename;
  • the exact byte length reported by the host file object; and
  • the host/browser-reported last-modified value rendered in the canonical UTC millisecond form when available.

WASM-002 must not claim access to a true file-creation timestamp. It must not infer, fabricate, or substitute a creation time from the last-modified value. If usable last-modified metadata is unavailable, the inventory must represent that fact explicitly rather than invent a timestamp.

W002-INV-004

INVENTORY does not read file contents or compute content hashes

UNDER REVIEW

The lightweight inventory must be produced from directory enumeration and file metadata only. Data Sculptor must not open and stream the contents of each listed file merely to create the inventory, and it must not compute SHA-256 or another content fingerprint as an implicit side effect.

Its cost should therefore scale primarily with the number of directory entries and metadata calls, not with the aggregate byte size of the files. A 7 GB CSV and a 7 KB CSV each contribute one metadata entry rather than requiring their contents to be read.

W002-INV-005

Inventory scope is the authorized flat Suitcase root

UNDER REVIEW

WASM-002 inventories regular files in the directory denoted by SUITCASE: .. Data Sculptor does not recursively inventory user-created subdirectories in this build. If a directory entry is encountered, the inventory may identify that a directory is present, but it must not imply that nested contents were inspected or included.

This rule preserves the WASM-002 flat-Suitcase storage model while avoiding hidden recursive filesystem traversal.

W002-INV-006

Inventory serialization is deterministic, branded, UTF-8 TXT

UNDER REVIEW

The INV artifact must be a human-readable Red5Sorcery Data Sculptor TXT document encoded as UTF-8 with LF line endings. It must identify the inventory format version, capture UTC, generating WKO physical identity, Suitcase declaration, entry count, and the per-file metadata fields governed by W002-INV-003.

File entries must be serialized in deterministic ascending exact-filename UTF-8 byte order. The filename representation must be unambiguous even when a filename contains whitespace or delimiter-like characters. Equivalent Suitcase metadata under the same serialization rules must therefore produce equivalent ordered inventory content apart from governed run/artifact identity and capture timestamp fields.

W002-INV-007

The current inventory describes the pre-publication Suitcase state and excludes itself

UNDER REVIEW

Data Sculptor must enumerate and fix the inventory snapshot before publishing the new INV artifact. The INV artifact being created is therefore not one of its own listed entries. Any older INV artifact that already existed at snapshot time is an ordinary Suitcase file and is included like any other file.

This pre-publication rule prevents recursive self-reference while preserving an accurate snapshot of the state that existed immediately before the new inventory evidence was added.

W002-INV-008

Help describes INVENTORY as a quick continuity aid, not byte-level proof

UNDER REVIEW

Help must explain that an INV snapshot is useful for ordinary closeout and later orientation: it can reveal additions, removals, renames, size changes, or last-modified changes when snapshots or current metadata are compared. For an unexpected cross-session source problem, Help may direct the analyst to the relevant source entry in an earlier INV and ask whether its filename, exact byte length, or last-modified metadata differs.

Help must also state that unchanged filename/size/last-modified metadata does not prove that file contents or row order are identical. When stronger assurance is warranted because files may change unexpectedly, Help may recommend the explicit later/deeper content-fingerprinting workflow; INVENTORY itself must never imply forensic or cryptographic assurance.

W002-INV-ACC-001

Large-file inventory acceptance proves metadata-only behavior

UNDER REVIEW

An acceptance fixture must place at least one multi-gigabyte file plus several small files in the authorized Suitcase, execute INVENTORY, and prove that the resulting INV records the correct filename, exact byte length, and last-modified metadata without reading the multi-gigabyte file contents.

Evidence must demonstrate that inventory runtime and memory do not scale with the aggregate bytes of the listed files in the way a fingerprinting pass would.

W002-INV-ACC-002

Inventory snapshot membership and self-exclusion acceptance

UNDER REVIEW

An acceptance fixture must include ordinary analyst files, existing governed __DS__ artifacts, and at least one older INV artifact. The new inventory must include every qualifying pre-existing root file in deterministic order, include the older INV, and exclude only the newly generated INV because it did not exist in the fixed pre-publication snapshot.

Adding an unrelated PDF or ZIP before a later inventory must appear as an added inventory entry and must not be treated as an analytical error.

W002-INV-ACC-003

Inventory does not overclaim unchanged contents

UNDER REVIEW

Acceptance documentation and Help fixtures must demonstrate the limitation of metadata-only continuity. A case in which a file's bytes are changed while the observed filename, byte length, and last-modified metadata are preserved or restored must not be described as detectable by INVENTORY alone.

The product must direct the analyst toward stronger explicit fingerprint evidence when byte-level assurance is required.

W002-STOR-016

Work Order filenames use the governed immutable identity grammar

UNDER REVIEW

When Data Sculptor saves a new Work Order as a WKO, it shall assign the physical TXT filename. The analyst chooses the validated Suitcase but is not asked to choose or edit the WKO filename.

The exact WKO filename shape is __DS__WKO__YYYYMMDDTHHMMSSmmmZ__<uuid-v4>.txt, using UTC at millisecond precision with exactly three millisecond digits and a canonical lowercase hyphenated UUID v4. UTC precedes UUID. If the generated name collides with an existing artifact, PB-STOR-011 governs UUID regeneration and safe retry. The saved WKO thereafter retains that physical identity and remains immutable under W002-STOR-017.

W002-STOR-017

Saved Work Orders are immutable artifacts

UNDER REVIEW

After a Work Order TXT artifact is saved, Data Sculptor shall not edit, overwrite, or rename that saved Work Order in place. Changing analytical instructions requires saving a new Work Order artifact with a new governed physical identity.

W002-STOR-018

Work Order alias is immutable WKO content and governed MAP metadata

UNDER REVIEW

A human-facing Work Order name is optional immutable Work Order content, not separately editable browser metadata. The canonical declaration is WORK ORDER AS "<alias>" under W002-STEPS-001.1. If present, the quoted alias must be non-empty UTF-8 text and may contain spaces and ordinary phrase punctuation subject to the governed string-literal rules.

After the WKO TXT artifact is saved, Data Sculptor shall not edit the alias in place. Changing the alias, analytical instructions, or comments means creating and saving a new immutable WKO with a new governed physical identity. The physical WKO filename/UUID remains execution identity; the alias is human-facing metadata for display and future governed name resolution.

The browser must not maintain a separate mutable Description field or hidden description store. The alias declared by the WKO is also represented in the current governed WKO MAP under W002-STOR-018.1 through W002-STOR-018.4.

W002-STOR-018.1

The existing MAP class includes a distinct WKO alias-registry profile

UNDER REVIEW

Revision BB does not add a new semantic artifact class. The existing MAP class has two explicitly distinguished governed profiles:

  • Store MAP — the existing exact nine-column Store/RID/COL snapshot governed by W002-STOR-019 through W002-STOR-019.12;
  • WKO MAP — a complete immutable snapshot that maps saved Work Order aliases to exact immutable WKO filenames.

Profile classification is determined by the exact CSV header before profile-specific validation. A valid WKO MAP must never be treated as an eligible Store MAP, and a Store MAP must never be treated as a WKO alias registry. Both remain visible flat-Suitcase MAP artifacts under the canonical immutable filename grammar.

W002-STOR-018.2

WKO MAP schema and serialization are exact and deterministic

UNDER REVIEW

The canonical WKO MAP is UTF-8 CSV without BOM, using LF record termination, with exactly this two-field header:

wko_alias,wko_filename

Each row identifies one current visible saved WKO. wko_filename is the exact governed physical WKO filename. wko_alias is the exact alias declared by that WKO's optional WORK ORDER AS clause, or the empty string when no alias is declared.

Rows are written deterministically by ascending UTF-8 byte order of wko_filename. Duplicate wko_filename rows are invalid. Standard governed CSV quoting applies. A non-empty wko_alias must be unique within the current WKO MAP; Data Sculptor must refuse a new save that would make two current WKO rows share the same non-empty alias rather than silently disambiguating or suffixing the alias.

W002-STOR-018.3

Saving a WKO and publishing its WKO MAP binding is one governed save transaction

UNDER REVIEW

Saving a new immutable WKO begins from the newest valid WKO MAP in the Suitcase, or an empty WKO registry if none exists. Data Sculptor validates the draft, including its optional Work Order alias and comment syntax, and checks non-empty alias uniqueness before commit.

The WKO is persisted as a new immutable governed WKO artifact and the complete successor WKO MAP is constructed under SCR, closed, reopened, and validated against the exact WKO-MAP schema and referenced visible WKO files. The successor WKO MAP is promoted to MAP last; that successful MAP promotion is the alias-registry commit point for the save transaction. The WKO and successor WKO MAP created by one successful save transaction use one shared canonical transaction UTC while retaining distinct UUIDs.

If successor WKO-MAP validation or publication fails, the save must not be represented as a successfully committed alias-registry update. Data Sculptor must roll back the new WKO out of committed WKO state where safely possible or retain attributable SCR/RCV recovery evidence and report the failure through Help.

W002-STOR-018.4

The newest valid WKO MAP is the current governed Work Order alias registry

UNDER REVIEW

Among valid WKO MAP artifacts, the one with the greatest canonical UTC millisecond timestamp is the current WKO alias registry. If two or more valid WKO MAPs share the greatest timestamp, current-registry selection must refuse rather than break the tie by UUID, discovery order, filesystem modified time, or directory order.

The browser may use the current WKO MAP to show human-facing Work Order aliases while keeping exact physical WKO filenames visible/inspectable. Future Work Order composition may use the same registry to resolve a non-empty alias to exactly one immutable WKO artifact. Revision BB does not pull the deferred Work Order invocation/orchestration grammar into WASM-002; it establishes the governed alias registry that later composition can depend on.

W002-STOR-019

Store state is preserved as visible immutable MAP history

UNDER REVIEW

Each valid WASM-002 MAP is one complete immutable Store snapshot in the same flat Suitcase. Store state is not stored in hidden browser persistence and is not represented by a mutable well-known singleton.

Each successful Store-establishing materialization or later governed Store-metadata/materialized-column update publishes a new immutable MAP under the canonical __DS__MAP__YYYYMMDDTHHMMSSmmmZ__<uuid-v4>.csv identity grammar. Earlier MAP artifacts remain visible history and are not overwritten or deleted merely because a newer Store state is created.

W002-STOR-019.1

A Work Order may explicitly select at most one Store MAP

UNDER REVIEW

Each governed Work Order may explicitly identify at most one valid immutable Store MAP as its Store/inheritance base. If more than one MAP is explicitly specified, Data Sculptor must refuse before Store resolution, alias resolution, materialization, or mutation.

An explicitly named valid MAP binds the run to exactly the Store identified by that MAP's rid_filename and overrides automatic Store-MAP discovery even when newer MAPs for that Store or other Stores exist.

W002-STOR-019.2

Without an explicit MAP, materialization performs Store-aware MAP inheritance

UNDER REVIEW

If a materializing Work Order does not explicitly identify a MAP, Data Sculptor must compare the exact Work Order SOURCE filename with store_source_filename in valid Store MAPs.

  • If no eligible Store lineage exists for that exact source filename, the materialization establishes a new Store with a new RID and first Store MAP.
  • If exactly one eligible Store lineage exists, Data Sculptor uses that Store's valid MAP with the greatest canonical UTC millisecond timestamp as the inheritance base.
  • If more than one distinct Store lineage is eligible for the same exact source filename, automatic inheritance must refuse rather than guess which Store the analyst intended. The analyst must explicitly select one valid MAP.

Store lineages are distinguished by their exact immutable rid_filename. If two or more valid MAPs for the one selected Store share the greatest canonical UTC millisecond timestamp, automatic inheritance must refuse rather than infer chronology from UUID, directory order, filesystem modified time, or discovery order.

Assurance boundary: exact source-filename matching in this rule is a Store-routing/orientation mechanism, not proof that an analyst-owned source has identical bytes or row order across separate sessions. Ordinary WASM-002 materialization must not silently represent that filename equality as cryptographic continuity.

W002-STOR-019.3

Any valid historical Store MAP may be selected explicitly with MAP "<filename>"

UNDER REVIEW

A governed Store-aware Work Order may explicitly identify any one valid immutable Store MAP present in the Suitcase, including an older snapshot when newer MAPs for that Store also exist. The canonical clause is:

MAP "__DS__MAP__YYYYMMDDTHHMMSSmmmZ__<uuid-v4>.csv"

The quoted value must be the exact physical filename of one valid Store MAP. A WKO-alias MAP profile, missing file, malformed MAP, or other MAP profile is invalid for this clause. Data Sculptor must use exactly the named Store MAP rather than silently substituting a later one.

For materialization, SOURCE "..." remains required to identify the source file being read; an optional MAP "..." clause overrides automatic Store-MAP inheritance and supplies the exact Store-state base. The named Store MAP must be compatible with the materialization source under the existing source/Store rules or validation must refuse. For an alias-only UPDATE ALIASES Work Order, MAP "..." may itself be the Store-state selector and no source-data read is required.

Once selected, the exact MAP identity, Store RID binding, Store alias, RID alias, and materialized-column mapping state remain fixed for the governed run. The MAP filename is execution input, not a friendly alias.

W002-STOR-019.4

Store MAPs are complete snapshots, not delta logs

UNDER REVIEW

Each valid Store MAP represents one complete usable Store metadata and materialized-column mapping state for that version. It must not require replaying a chain of earlier MAP files merely to reconstruct the Store's current RID binding, aliases, or materialized-column mappings.

A newer MAP created from an inherited older MAP contains the complete resulting Store snapshot after applying the governed Work Order's successful changes.

W002-STOR-019.5

Materialization, RID recovery, or governed Store metadata mutation emits one successor MAP

UNDER REVIEW

When a governed Work Order materializes one or more columns, performs governed RID recovery, and/or later requests governed Store/RID/COL alias changes, Data Sculptor begins from the applicable governed Store-state base. Ordinary materialization uses the explicitly selected MAP or Store-aware automatic inheritance under W002-STOR-019.2. A new Store begins from newly established Store/RID metadata plus an empty materialized-column mapping set before requested materialization is applied. RID recovery uses the recovery-base MAP resolved under W002-RID-009.

All successful updates in that Work Order are applied to one in-memory complete Store snapshot. The complete deterministic successor-MAP bytes must first be written under a governed SCR candidate identity, closed successfully, reopened, and fully validated while still an SCR candidate. Only a complete validated candidate may be promoted by host rename into one new immutable MAP artifact.

The inherited/recovery-base MAP remains unchanged. The successful SCR-to-MAP rename is the Store-state commit point. A failed run must not create a valid successor MAP; a malformed, incomplete, or unpromoted MAP candidate remains SCR/RCV evidence rather than Store state.

W002-STOR-019.6

Store MAP CSV schema is exactly nine columns

UNDER REVIEW

The canonical WASM-002 Store MAP is a CSV whose header row is exactly:

store_alias,store_source_filename,rid_filename,rid_alias,source_filename,source_column_number,source_header,alias,column_filename

Each data row describes one current logical materialized-column mapping while repeating the same Store-level metadata in the first four fields:

  • store_alias — current human-facing Store name;
  • store_source_filename — exact visible Suitcase filename whose logical data-record order established the Store RID universe;
  • rid_filename — exact immutable governed RID artifact filename that physically anchors this Store;
  • rid_alias — current human-facing RID name;
  • source_filename — exact visible source filename from which this mapped COL was materialized;
  • source_column_number — 1-based source-column ordinal;
  • source_header — exact decoded CSV header value after governed parsing;
  • alias — current human-facing COL name; and
  • column_filename — exact physical governed COL artifact filename represented by the row.

The logical source-column key for COL alias continuity remains the exact triple (source_filename, source_column_number, source_header). The Store is physically identified by the repeated exact rid_filename, not by the mutable store_alias.

W002-STOR-019.7

Source headers become default COL aliases on first materialization

UNDER REVIEW

When a logical source column is materialized and its exact logical key does not already exist in the inherited Store MAP, its default COL alias is its exact source_header. If that default would be empty or would violate governed alias-uniqueness/shadowing rules, Data Sculptor must not invent a suffix or alternate name. The Work Order must supply an explicit valid alias for that column before a valid successor MAP can be published.

If the same Work Order supplies an explicit alias for a newly materialized column, the explicit governed alias overrides the default header alias.

For a previously materialized COL, RESET COL "<reference>" ALIAS restores this same deterministic default: the exact recorded source_header. If that header is empty or the restored value would violate alias uniqueness/shadowing rules in the successor Store MAP, RESET must refuse rather than invent a substitute.

W002-STOR-019.8

Ordinary rematerialization preserves Store metadata, inherited RID, and inherited COL alias

UNDER REVIEW

If a newly materialized column's exact logical key already exists in the inherited Store MAP, Data Sculptor must preserve that row's current COL alias unless the Work Order explicitly changes it. The successor MAP replaces only that logical row's column_filename with the newly created physical COL artifact filename.

Ordinary rematerialization must preserve the inherited Store's exact store_source_filename and rid_filename. It must not silently create a different Store, replace the Store RID, revert a user-facing Store/RID alias, or revert a COL alias to its source header. The only WASM-002 operation permitted to replace rid_filename while preserving the same logical row universe is explicit governed RID recovery under W002-RID-009/W002-RID-010.

W002-STOR-019.9

Store MAP serialization is deterministic UTF-8 CSV

UNDER REVIEW

Store MAP CSV files are encoded as UTF-8 without BOM and use LF (0x0A) record termination. The exact nine-field header in W002-STOR-019.6 is written once as the first row. Fields use standard CSV quoting semantics: a field containing comma, double quote, CR, or LF is enclosed in double quotes, and embedded double quotes are doubled. No locale-dependent formatting is permitted.

Every data row in one MAP must contain byte-for-byte identical values for store_alias, store_source_filename, rid_filename, and rid_alias. Mapping rows are written deterministically by ascending UTF-8 byte order of source_filename, then ascending numeric source_column_number, then ascending UTF-8 byte order of source_header. Two rows with the same logical source-column key are invalid.

W002-STOR-019.10

Only a complete validated Store MAP is eligible for inheritance

UNDER REVIEW

A canonical MAP filename alone does not make a file an eligible Store MAP. To participate in automatic or explicit inheritance, the artifact must be readable as complete UTF-8, have the exact nine-column schema, parse deterministically, satisfy Store-level consistency and mapping-key/alias constraints, reference one valid visible governed RID filename, and reference valid visible governed COL filenames for its mapped rows.

For successor publication, Data Sculptor constructs the complete deterministic MAP CSV under a governed SCR candidate identity after the required RID/COL physical promotions have succeeded. The candidate is closed successfully, reopened, and validated for bytes, schema, Store-level consistency, aliases, RID binding, COL bindings, deterministic row order, and all other MAP eligibility rules while it remains SCR.

Only after that validation succeeds may Data Sculptor allocate the final timestamp+UUID MAP identity and promote the candidate by host rename into the canonical __DS__MAP__YYYYMMDDTHHMMSSmmmZ__<uuid-v4>.csv namespace. The successful rename is the publication/commit point. If validation or rename fails, no successor MAP becomes eligible/current; the candidate remains or is retained as attributable SCR/RCV evidence. Store-aware automatic selection therefore continues to use the greatest earlier valid MAP in the same Store lineage, if one exists, while Help reports the failed candidate/publication rather than silently treating it as current state.

W002-STOR-019.11

The MAP-bound RID filename is the current physical Store identity anchor, with governed recovery continuity

UNDER REVIEW

For WASM-002, Data Sculptor does not allocate a second permanent Store UUID in addition to governed RID/MAP evidence. Under ordinary operation, the exact governed rid_filename created when the Store is established is the stable physical anchor used to distinguish that Store's MAP lineage from other Stores in the same Suitcase, and ordinary successor MAPs repeat it exactly.

Governed RID recovery is the sole exception. When W002-RID-009/W002-RID-010 proves that the current physical RID is missing or invalid but the same logical row axis 1..N is recoverable, the recovery successor MAP may bind a new RID filename while preserving the Store's logical continuity, aliases, source identity, existing COL mappings, and row order. The recovery Receipt records the old-to-new RID transition. This replacement does not assert that a different row universe was created.

Within any one MAP, every row must repeat the same exact current rid_filename; disagreement is invalid. Outside an explicit proven recovery transition, a different RID filename denotes a different Store row universe and must not be silently treated as same-Store continuation.

W002-STOR-019.12

First Store MAP has deterministic Store and RID aliases

UNDER REVIEW

When the first successful materialization establishes a Store, its first Store MAP must initialize store_alias to the exact store_source_filename and rid_alias to the literal RID.

Those are the deterministic Store and RID default aliases. A later alias-only Work Order may replace them with STORE AS "<alias>" and RID AS "<alias>", clear them with CLEAR STORE ALIAS / CLEAR RID ALIAS, or restore these defaults with RESET STORE ALIAS / RESET RID ALIAS under W002-WKO-012.1 through W002-WKO-012.6. None of those operations changes store_source_filename, rid_filename, RID bytes, COL bytes, or prior MAP history.

W002-STOR-020

Store, RID, and COL aliases remain human-facing metadata separate from physical identity

UNDER REVIEW

Aliases are governed human-facing metadata. Creating, changing, clearing, or replacing an alias must not rename or rewrite the underlying artifact. Within one Store MAP, every non-empty COL alias and the non-empty rid_alias must be unambiguous within the row-addressable artifact alias namespace and must not silently shadow another visible physical filename or alias under the applicable filename-comparison rules.

The store_alias names the Store as a whole and is separate from the field/COL alias namespace. Alias mutation occurs through a governed Work Order, not through an editable GUI field. Exact cross-Store Store-alias uniqueness and future selection-by-Store-alias syntax remain outside this freeze.

W002-STOR-021

Work Order resolution binds one exact Store MAP and physical targets

UNDER REVIEW

A saved Work Order may refer to governed materialized columns by exact physical filename or by a unique COL alias from one selected Store MAP. The canonical explicit Store-MAP selector is MAP "<exact Store MAP filename>" under W002-STOR-019.3 and W002-WKO-012.3. If that clause is present and valid, exactly that Store snapshot is used. Otherwise Data Sculptor applies the Store-aware source-qualified selection rule in W002-STOR-019.2.

Before execution, Data Sculptor must record the exact physical Store MAP identity when one is used, bind the run to its exact rid_filename, and resolve aliases deterministically to physical COL artifacts. The selected Store MAP must remain fixed for the run even if a newer MAP is created during that same run. This protects Store/selection continuity but does not by itself claim that bytes stored under an analyst-owned source filename are cryptographically identical across different runs.

W002-STOR-022

Suitcase validation is proven by one retained governed CER HTML certificate

UNDER REVIEW

A selected directory becomes a validated Suitcase only when Data Sculptor successfully creates, completely writes, and closes one governed CER HTML Suitcase Validation Certificate in that directory. The certificate itself is the validation artifact and remains visible in the flat Suitcase as durable evidence.

No validation-only delete or rename is required. Failure to create, completely write, or close the certificate means the directory has not passed Suitcase validation and analytical execution remains locked.

W002-STOR-022.1

Suitcase Validation Certificate physical identity

UNDER REVIEW

The exact certificate filename is __DS__CER__YYYYMMDDTHHMMSSmmmZ__<uuid-v4>.html, using the canonical UTC millisecond token and canonical lowercase hyphenated UUID v4. Data Sculptor chooses the filename; the analyst does not supply or edit it.

Successful create/write/close of this canonical governed HTML filename is the WASM-002 supported-host folder filename/path compatibility test. Data Sculptor does not maintain a product-level table of operating-system numeric path maxima and must not truncate, abbreviate, hash-shorten, or otherwise mutate a governed filename to fit a host path limitation. If the certificate cannot be created under its canonical name, the selected directory does not pass validation.

W002-STOR-022.2

Suitcase Validation Certificate semantic content

UNDER REVIEW

The brandable HTML certificate must visibly contain, at minimum:

SUITCASE VALIDATION CERTIFICATE
RESULT: PASS
SUITCASE: .
UTC: <canonical certificate UTC>
UUID: <certificate UUID>
ARTIFACT: <full governed certificate filename>
TEST: CREATE_WRITE_CLOSE

It must state that Data Sculptor successfully created, completely wrote, and closed this governed HTML certificate in the selected Suitcase. It must state that this establishes that the selected directory was writable by Data Sculptor at the recorded UTC and accepted the governed artifact filename used for the certificate.

It must also state that the certificate does not certify available disk capacity, guarantee success of future analytical operations, or certify later SCR-to-final-class publication/rename operations. The semantic record uses SUITCASE: . and must not persist an absolute machine-specific path merely to prove validation.

W002-STOR-022.3

Suitcase Validation Certificate uses the canonical built-in presentation in WASM-002

UNDER REVIEW

The certificate is a human-facing HTML CER artifact and uses the canonical built-in Red5Sorcery/Data Sculptor presentation in WASM-002. Presentation must never change RESULT, SUITCASE, UTC, UUID, artifact identity, TEST, validation meaning, or limitation facts.

Configurable Brand Manifest application to CER artifacts is deferred to V1-BACKLOG / a future build and is not required for WASM-002 Suitcase validation.

1. Source Certification and Column Materialization Architecture

The WASM-002 analytical path is a two-stage governed pipeline. Stage 1 establishes a strict whole-source UTF-8 invariant.

Stage 2 performs CSV structural parsing and materializes one or more requested columns under that already-established invariant.

WASM-002 source processing architecture SOURCE CSV Original source remains unchanged STRICT WHOLE-FILE UTF-8 CERTIFICATION Bounded windows; exact byte accounting PASS UTF-8 CERTIFIED SOURCE STATE Certification bound to source identity CSV STRUCTURAL PARSER Encoding is not re-decided here MATERIALIZE REQUESTED COLUMNS One bounded pass; multiple selected columns CANONICAL DATA SCULPTOR OUTPUTS Deterministic artifacts + receipt/evidence FAIL STOP CURRENT ANALYTICAL TASK No fallback decoder; no materialization ENCODING DIAGNOSTIC Report failure facts to Help Engine WINDOWS-1252 COMPATIBILITY CHECK Can supported converter map all bytes?

COMPATIBLE NOT COMPATIBLE HELP MAY SUGGEST Separate conversion task HELP REPORTS No safe conversion suggestion SEPARATE CONVERSION WORK ORDER Creates new UTF-8 artifact; source untouched Figure 1. The normal analytical path stops on UTF-8 failure. Windows-1252 conversion is a separate Work Order, never an automatic fallback inside materialization.

W002-ENC-001

Strict whole-file UTF-8 certification

UNDER REVIEW

Before WASM-002 performs analytical CSV materialization, it must certify the complete selected source as valid UTF-8 using bounded processing.

W002-ENC-001.1

Certification must examine the entire source, not merely a prefix, sample, BOM, or first analytical window.

UNDER REVIEW
W002-ENC-001.2

UTF-8 validity must be determined across chunk boundaries, including incomplete multi-byte sequences that

UNDER REVIEW

span adjacent input windows.

W002-ENC-001.3

A UTF-8 BOM, when present, is parsing metadata and must not be treated as proof that the remainder of the

UNDER REVIEW

source is valid UTF-8.

W002-ENC-001.4

Certification must preserve exact source-byte accounting.

UNDER REVIEW
W002-ENC-001.5

Certification must operate within the governed WASM memory budget.

UNDER REVIEW
W002-ENC-001.6

Certification must produce deterministic PASS or FAIL for the same source bytes under the same frozen rules.

UNDER REVIEW
W002-ENC-002

UTF-8 certification is a hard analytical gate

UNDER REVIEW

The WASM-002 analytical/materialization path must proceed only after successful UTF-8 certification.

W002-ENC-002.1

If UTF-8 certification fails, the current analytical Work Order must stop.

UNDER REVIEW
W002-ENC-002.2

The analytical engine must not silently switch to another decoder.

UNDER REVIEW
W002-ENC-002.3

The analytical engine must not continue materialization under an inferred or guessed source encoding.

UNDER REVIEW
W002-ENC-002.4

No Windows-1252 transcoding may occur as an implicit sub-step of the failed analytical Work Order.

UNDER REVIEW
W002-ENC-003

Certification and materialization share one run-local selected source

UNDER REVIEW

For a governed WASM-002 analytical run, the browser host must resolve the Work Order source reference once and retain the same selected source instance across Stage 1 UTF-8 certification and Stage 2 materialization.

The purpose of this binding is to prevent Stage 2 from accidentally consuming a different source than the one Stage 1 certified. It is a run-local continuity guarantee, not a claim of durable cryptographic identity across separate runs.

W002-ENC-003.1

Stage 2 must not re-resolve or substitute the source

UNDER REVIEW

After Stage 1 begins, Stage 2 must not reacquire the analytical source by re-reading an alias mapping, re-resolving a filename/path, opening a newly selected browser file, or otherwise substituting another source instance. Stage 2 consumes the source instance already bound to the governed run.

W002-ENC-003.2

Filename, alias, path, or byte length alone is not durable byte identity

UNDER REVIEW

Filename equality, alias equality, path equality, timestamps, or exact byte length may be useful provenance facts but must not be presented as cryptographic proof that source bytes are identical across separate runs. WASM-002 makes no such automatic cross-run exact-byte claim.

W002-ENC-003.3

Ordinary WASM-002 source binding does not require automatic SHA-256

UNDER REVIEW

UTF-8 certification and ordinary column materialization must not automatically compute SHA-256 merely to establish WASM-002 source binding. The source-binding requirement is satisfied by preserving the same run-local selected source instance across the two stages.

This rule does not prohibit SHA-256 where another explicit WASM-002 requirement governs integrity for a specific generated artifact. It applies to automatic hashing of ordinary analytical source data.

W002-ENC-003.4

Loss of run-local source continuity causes refusal

UNDER REVIEW

If the browser host cannot preserve the selected source instance from certification into materialization, or the source becomes unavailable before Stage 2 can consume it, the analytical run must refuse before materialization rather than silently reselect, substitute, or infer another source.

W002-ENC-004

ASCII-first inline UTF-8 certification algorithm

UNDER REVIEW

WASM-002 must use an ASCII-first, strict inline UTF-8 certification algorithm or an equivalent implementation that preserves the same single-forward-scan semantics, bounded state, deterministic validity result, exact error location, and performance intent established by WASM-001b.

W002-ENC-004.1

The certifier must process the source in bounded windows and must not allocate memory proportional to

UNDER REVIEW

source-file size.

W002-ENC-004.2

The 4 MiB window used in WASM-001b is a proven reference point, not a frozen WASM-002 production

UNDER REVIEW

constant. Window size may be changed only if semantics and byte-identical certification outcomes remain invariant.

W002-ENC-004.3

At the beginning of each window, any incomplete UTF-8 sequence carried from the preceding window must be

UNDER REVIEW

resolved before the remaining bytes are treated as independent input.

W002-ENC-004.4

When there is no pending cross-window sequence, consecutive bytes below 0x80 must be recognized as

UNDER REVIEW

ASCII and certified directly because ASCII is a complete subset of UTF-8.

W002-ENC-004.5

An all-ASCII window with no pending cross-window sequence must be certifiable without submitting the same

UNDER REVIEW

bytes to a second general UTF-8 decoder pass.

W002-ENC-004.6

When a byte at or above 0x80 is encountered, the certifier must validate the UTF-8 sequence inline, then

UNDER REVIEW

resume the ASCII-fast scan after the valid sequence.

W002-ENC-004.7

The implementation must not require collecting all non-ASCII bytes, all non-ASCII runs, or all non-ASCII

UNDER REVIEW

offsets for later validation.

W002-ENC-004.8

The implementation must not require a separate general-purpose string-decoder call for each non-ASCII

UNDER REVIEW

sequence. An equivalent low-overhead strict validator is acceptable if it preserves the same governed result and bounded-state behavior.

W002-ENC-004.9

Cross-window state must be bounded to the information required for at most one incomplete UTF-8 sequence.

UNDER REVIEW

No more than three source bytes may need to remain pending between windows, or an equivalent smaller state representation may be used.

W002-ENC-004.10

On the first invalid UTF-8 sequence, certification must stop and report the exact absolute source-byte offset

UNDER REVIEW

required by the frozen error contract. The certifier need not read the remainder of an already-invalid source.

W002-ENC-004.11

At EOF, certification may return PASS only if every source byte has been consumed under the strict UTF-8

UNDER REVIEW

rules and no incomplete sequence remains pending.

W002-ENC-004.12

A UTF-8 BOM at absolute source offset zero may be recognized as BOM metadata after its bytes are

UNDER REVIEW

validated, but the remaining source must still undergo complete certification.

W002-ENC-004.13

The certifier must not perform CSV delimiter, quote, header, row, or analytical interpretation. Certification

UNDER REVIEW

answers only whether the complete source byte stream is valid UTF-8 under the frozen rules.

W002-ENC-004.14

Certification results must be independent of window boundaries. Splitting the same valid or invalid source at

UNDER REVIEW

different bounded window sizes must not change PASS/FAIL or the first invalid absolute byte offset.

W002-ENC-004.15

The certifier must expose enough measured counters for acceptance evidence to reconcile source bytes

UNDER REVIEW

read, windows/pushes processed, non-ASCII sequences encountered when counted, final pending state, and stop reason without requiring those counters to alter certification semantics.

W002-ENC-005

Strict UTF-8 byte-sequence rules

UNDER REVIEW

The inline validator must implement strict modern UTF-8 validity, excluding overlong forms, UTF-16 surrogate code points, values above U+10FFFF, invalid lead bytes, invalid continuation bytes, and truncated sequences.

W002-ENC-005.1

Single-byte ASCII is 0x00 through 0x7F.

UNDER REVIEW
W002-ENC-005.2

Two-byte sequences must begin with 0xC2 through 0xDF and be followed by exactly one continuation byte

UNDER REVIEW

0x80 through 0xBF.

W002-ENC-005.3

Three-byte sequences beginning with 0xE0 must use a second byte 0xA0 through 0xBF and a third byte 0x80

UNDER REVIEW

through 0xBF, preventing overlong encodings.

W002-ENC-005.4

Three-byte sequences beginning with 0xE1 through 0xEC or 0xEE through 0xEF must use two continuation

UNDER REVIEW

bytes 0x80 through 0xBF.

W002-ENC-005.5

Three-byte sequences beginning with 0xED must use a second byte 0x80 through 0x9F and a third byte 0x80

UNDER REVIEW

through 0xBF, excluding UTF-16 surrogate halves.

W002-ENC-005.6

Four-byte sequences beginning with 0xF0 must use a second byte 0x90 through 0xBF followed by two

UNDER REVIEW

continuation bytes 0x80 through 0xBF, preventing overlong encodings.

W002-ENC-005.7

Four-byte sequences beginning with 0xF1 through 0xF3 must use three continuation bytes 0x80 through

UNDER REVIEW

0xBF.

W002-ENC-005.8

Four-byte sequences beginning with 0xF4 must use a second byte 0x80 through 0x8F followed by two

UNDER REVIEW

continuation bytes 0x80 through 0xBF, preventing code points above U+10FFFF.

W002-ENC-005.9

Bytes 0x80 through 0xBF are invalid when encountered as lead bytes.

UNDER REVIEW
W002-ENC-005.10

Bytes 0xC0 and 0xC1 are invalid lead bytes because they can only introduce overlong encodings.

UNDER REVIEW
W002-ENC-005.11

Bytes 0xF5 through 0xFF are invalid UTF-8 lead bytes.

UNDER REVIEW

ASCII-first inline UTF-8 certification algorithm READ NEXT BOUNDED WINDOW Reference evidence used 4 MiB windows RESOLVE PENDING CROSS-WINDOW STATE At most one incomplete UTF-8 sequence ASCII FAST SCAN Advance cheaply while every byte < 0x80 ASCII RUN Already valid UTF-8 RESUME SCAN Same window BYTE >= 0x80 Validate sequence inline STRICT UTF-8 Lead + continuation range rules VALID END OF WINDOW?

Persist only bounded carry state MORE SOURCE? Yes: read next window; No: finish EOF + NO PENDING STATE UTF-8 PASS INVALID OR TRUNCATED UTF-8 FAIL No full-file allocation. No collection of all non-ASCII bytes. No per-sequence general string decode required.

Figure 2. The WASM-001b-derived fast path certifies ASCII directly, validates only non-ASCII sequences inline, and carries only bounded state across windows.

W002-ENC-006

Measured evidence inherited from WASM-001b

UNDER REVIEW

The following measurements are non-normative evidence explaining why WASM-002 begins with the ASCII-first inline algorithm. They are not WASM-002 acceptance results and must not be represented as such.

EVID-W001B-UTF8-001 On the 7,250,808,204-byte Statistics Canada source, the Day 039 distribution experiment observed 659,103 non-ASCII bytes, approximately 0.009090063% of the file, across 329,551 non-ASCII runs/sequences; the maximum observed non-ASCII run was three bytes.

EVID-W001B-UTF8-002 The Day 039 non-ASCII-only experiment submitted only 659,103 bytes to strict UTF-8 validation and completed in 12.664716 seconds at 545.998 MiB/s; it proved the source valid but still incurred 329,551 strict validation calls.

EVID-W001B-UTF8-003 A 1 GiB A/B test showed that reducing validated bytes alone was not enough: the selective per-run strategy submitted 115,839 bytes in 57,919 strict calls but took 503.7536 ms, while the baseline submitted 113,246,208 bytes in 27 strict calls and took 411.3590 ms. This supported removing per-run general-validator call overhead rather than merely shrinking EVID-W001B-UTF8-004 The final native inline scan certified all 7,250,808,204 bytes in 10.377870 seconds at 666.313 MiB/s, observed 329,551 non-ASCII sequences and 659,103 non-ASCII bytes, and made zero std::str::from_utf8 calls.

EVID-W001B-UTF8-005 The same inline design was exercised in Microsoft Edge/WASM with 4 MiB transfers: the valid 7,250,808,204-byte source completed with 1,729 pushes, UTF8_VALID=true, and EOF_ALL_BYTES_VALID. That experimental run took 30.5858 seconds including file I/O, JS-to-WASM copy, and WASM validation.

EVID-W001B-UTF8-006 A full-size deliberately invalid Edge/WASM fixture stopped early after 2,936,012,800 bytes and 700 pushes with UTF8_VALID=false and STOP_REASON=INVALID_UTF8_SEQUENCE rather than reading to EOF.

EVID-W001B-UTF8-007 WASM-001b also retained malformed UTF-8 fixtures for stray legacy bytes, truncated sequences, lone continuation bytes, overlong encodings, UTF-16 surrogate halves, and 0xFE/0xFF invalid bytes. WASM-002 should reuse or regenerate equivalent acceptance fixtures with known invalid offsets.

W002-MAT-001

Stage 2 consumes the source instance certified by Stage 1

UNDER REVIEW

The structural CSV parser and materializer operate under the explicit invariant that the same run-local selected source instance has already passed governed whole-file UTF-8 certification. Stage 2 must not independently re-resolve the analytical source.

Stage 1 establishes encoding validity. Stage 2 establishes CSV structure, row identity, selected values, and governed outputs.

W002-MAT-001.1

Stage 2 must not independently re-decide the source encoding.

UNDER REVIEW
W002-MAT-001.2

Stage 2 must not contain an automatic Windows-1252 fallback.

UNDER REVIEW
W002-MAT-001.3

Stage 2 may perform only those byte/character checks required for correct CSV structural parsing and frozen

UNDER REVIEW

analytical semantics.

W002-MAT-001.4

Any implementation shortcut that would weaken the certified-source invariant must be treated as a PRD

UNDER REVIEW

change, not an optimization.

W002-MAT-001.5

Stage 2 restarts at byte offset zero of the same certified source instance

UNDER REVIEW

After Stage 1 returns PASS, Stage 2 must begin its structural pass from absolute source byte offset zero using the same run-local selected source instance. Rewinding/re-reading the existing source handle is permitted; performing a new filename, alias, path, picker, or directory resolution is not.

If the host cannot re-read that same selected source instance for Stage 2, the Work Order must refuse under the run-local source-continuity contract.

W002-MAT-001.6

Stage 2 consumes an offset-zero UTF-8 BOM as metadata before header parsing

UNDER REVIEW

If the certified source begins with the UTF-8 BOM bytes EF BB BF, Stage 2 must consume those three bytes before parsing the first CSV header field. They must not become part of the first source header or selected value.

The BOM is recognized only at absolute source offset zero. The fact that Stage 1 already saw the BOM does not permit Stage 2 to skip or reinterpret arbitrary later bytes.

W002-MAT-001.7

Stage 2 parses the header once and then continues directly into the data-record scan

UNDER REVIEW

Within the Stage 2 forward source scan, Data Sculptor must parse the complete first logical CSV record as the source header, construct ordered header metadata including exact decoded header text and 1-based source ordinal, resolve and validate all Work Order selectors/aliases, and then continue from the first data record without restarting the source.

Header resolution therefore does not add a third whole-file pass. A header-only valid CSV yields a zero-row materialization; a source with no valid header record refuses.

W002-MAT-001.8

Stage 2 relies on Stage 1 UTF-8 validity rather than revalidating the file

UNDER REVIEW

Stage 2 must not run a second whole-file UTF-8 certification algorithm over the source. It may inspect bytes and decoded field content only as required for CSV structure, header/selector semantics, governed field-size limits, output serialization, and diagnostics.

Any implementation that reintroduces redundant whole-source UTF-8 validation into Stage 2 is a measurable architectural regression unless separately justified and accepted.

W002-MAT-002

One-pass multi-column materialization

UNDER REVIEW

A valid Work Order may request multiple source columns for materialization during the same bounded structural pass. For WASM-002 DS-STEPS, the requested set is expressed by one KEEP block containing one or more HEADER and/or COLUMN selectors under W002-STEPS-001 through W002-STEPS-004.

W002-MAT-002.1

Requested columns must be resolved and validated before data-row materialization begins

UNDER REVIEW

Every HEADER and COLUMN selector in the governed KEEP block must resolve to exactly one source column before any data-row materialization begins. Missing headers, ambiguous duplicate-header matches, invalid/out-of-range ordinals, duplicate resolved selections, invalid aliases, and successor-MAP alias collisions must refuse before the structural data-row pass.

W002-MAT-002.2

All selected columns are emitted from one forward data-record scan

UNDER REVIEW

After header/selector resolution, Stage 2 must traverse the source data records once regardless of whether the Work Order selects one column or many. The engine must not perform one complete source rescan per requested column.

During that scan, every source field is interpreted structurally, but only the fields required by the resolved selection set are materialized into governed COL outputs.

W002-MAT-002.3

One 1-based logical row ordinal aligns every selected output

UNDER REVIEW

The header is not a data row. The first accepted logical data record is row identity 1, the next is 2, and so on through N. The row counter advances exactly once per accepted logical CSV data record, not per physical line. Every selected COL produced by the run must contain exactly one logical data record for each accepted source data row and therefore exactly N data records in the same governed order. A multiline quoted field remains part of one logical record and must not advance row identity merely because it contains physical newline bytes.

When the run establishes a new Store, this 1..N sequence is published as that Store's one governed RID artifact. When the run extends an existing Store without changing its row universe, the existing RID is reused and must not be regenerated or renumbered.

W002-MAT-002.4

Selected-column writer order follows resolved KEEP order

UNDER REVIEW

Before the data-record scan begins, the validated selection set is placed in the same order in which its selectors appear in the governed KEEP block. That resolved order governs writer creation, per-row selected-field dispatch, progress/receipt presentation, deterministic backpressure-drain priority, and candidate COL identity allocation.

The Store MAP's own CSV mapping-row ordering remains governed separately by W002-STOR-019.9 and must not be confused with Work Order selection order.

W002-MAT-002.5

Multiple active COL outputs use bounded staging and explicit backpressure

UNDER REVIEW

Each active materialized-column writer, or an equivalent shared multiplexed output structure, must have bounded staging capacity. The aggregate kernel-owned staging state for all active writers must remain inside the governed WASM memory budget and must not grow with source row count or total output size.

If a required output writer cannot accept additional canonical bytes without exceeding its governed staging capacity, source consumption must pause while pending output is drained/written. When more than one writer requires service, drain priority follows resolved KEEP order. After sufficient space is available, parsing resumes from the same structural state.

The exact tuned staging-buffer size is an implementation/benchmark constant rather than an analytical semantic constant; changing it must not change output bytes, row identity, selection results, or diagnostics for the same governed input.

W002-MAT-002.6

Partial output sets are never published as a successful materialization

UNDER REVIEW

All requested materialized-column outputs begin as visible governed SCR candidates, not COL artifacts. On first materialization of a new Store, the automatically generated RID likewise begins as a governed SCR candidate. A materialization transaction may begin promotion only when every required RID/COL candidate reaches EOF successfully, all selected outputs reconcile to the same accepted data-row count N, and all required candidate finalization/validation succeeds.

For a new Store, Data Sculptor establishes one publication-transaction UTC under PB-STOR-013/PB-STOR-014, allocates the final RID identity using that UTC plus a RID-specific UUID, and promotes the validated RID candidate first by host rename from its SCR filename to a valid governed RID filename. For an existing Store, the inherited RID is reused unchanged and no RID candidate/promotion occurs. After the required RID state is established, Data Sculptor promotes each requested COL candidate by host rename from SCR to a valid governed COL filename using that same transaction UTC plus a distinct COL-specific UUID, in deterministic resolved KEEP order.

If RID or COL promotion fails, Data Sculptor must refuse the run and roll any newly promoted RID/COL names back out of their final namespaces where safely possible. Candidate or rollback bytes that cannot be safely restored or removed must be retained visibly as attributable SCR/RCV recovery evidence. The existence of an unreferenced RID- or COL-looking file after interruption does not by itself make that artifact committed Store state.

After all required RID/COL promotions succeed, Data Sculptor constructs the complete successor MAP under a governed SCR candidate identity using the exact final RID/COL filenames, closes it successfully, reopens it, and validates it completely while it remains SCR. Only then may the MAP candidate be renamed into its final governed MAP identity using the same transaction UTC plus its own MAP UUID. The successful SCR-to-MAP rename is the materialization commit point.

Until that commit point, the prior valid MAP remains authoritative for an existing Store; for a new Store, no committed Store state exists yet. If MAP validation or MAP rename fails, Data Sculptor must refuse and roll the newly promoted RID/COL set back out of the final namespaces where safely possible; otherwise affected bytes remain attributable recovery evidence and are not committed Store membership. Governed Store membership/current state is established by a valid MAP binding, not by a final-class filename or timestamp equality alone.

Revision BB preserves the Revision AY staging/promotion mechanics and Revision AZ shared transaction-UTC rule for newly published RID/COL/MAP artifacts. Selected-folder support for the canonical governed filename/path form is established by the Suitcase Validation Certificate under W002-STOR-022 through W002-STOR-022.3 rather than by a frozen numeric host path-length table. Operation-specific host rename or publication failure remains a governed refusal under this requirement and is not pre-certified by Suitcase validation.

W002-MAT-002.7

Successful materialization publishes one complete Store MAP

UNDER REVIEW

A successful governed materialization that creates one or more COL artifacts must also publish exactly one new complete immutable Store MAP under W002-STOR-019 through W002-STOR-019.12. For a new Store, that MAP binds the automatically generated and promoted RID to the Store metadata and all newly materialized COL mappings. For an existing Store, it preserves the inherited RID binding and complete prior Store state while applying the successful materialization updates.

All required RID/COL SCR candidates must complete and validate before promotion begins. On a new Store, RID promotion occurs first; on an existing Store, the inherited RID is reused unchanged. All requested COL promotions must then succeed before successor-MAP candidate construction begins.

The complete successor MAP is written as SCR, closed, reopened, and fully validated before entering the MAP namespace. Its final host rename from SCR to the governed MAP filename occurs last and is the materialization commit point.

The materialization run is not reported as successfully committed until that MAP rename succeeds. If MAP candidate validation or MAP rename fails after RID/COL promotion, the run must refuse and the newly promoted artifacts must be rolled back out of their final namespaces where safely possible or retained as attributable recovery evidence. The prior valid MAP remains authoritative for an existing Store; no committed Store is established for a first materialization without a valid successor MAP.

W002-MAT-002.8

Stage 2 enforces deterministic source-record shape

UNDER REVIEW

The parsed header establishes the expected source field count. Every nonblank logical data record must contain exactly that many fields after CSV parsing. A nonblank ragged record with fewer or more fields must refuse rather than pad, truncate, or shift later values.

An explicit empty field is valid data and preserves its ordinal. A bare blank logical data record occurring outside a quoted field must refuse and must not be silently skipped or converted into one empty field. A physical blank line inside a valid quoted multiline field is field content, not a blank record.

W002-MAT-002.9

Unselected field contents are not retained

UNDER REVIEW

Stage 2 must parse every field sufficiently to preserve CSV structure, field count, row boundaries, and governed safety checks, but it must not retain complete contents for unselected fields after those bytes are no longer structurally needed.

The engine must not materialize a complete source row, complete table, or complete unselected column in memory merely to emit selected columns. Selected-field content may use bounded accumulation required by the frozen field-size/output rules.

W002-MAT-002.10

Individual decoded CSV fields are limited to 16 MiB

UNDER REVIEW

WASM-002 carries forward the established Data Sculptor field-buffer safety boundary: an individual CSV field may contain at most 16 MiB (16,777,216 bytes) of decoded UTF-8 field content. This is an engineering safety limit, not a semantic statement about CSV or an Excel cell limit.

The limit must be enforced incrementally for header and data fields. The parser must not first accumulate an arbitrarily large field and then check it. If a field would exceed the limit, the run must refuse without truncating, repairing, discarding the remainder, or finalizing the candidate materialization.

For an unselected field, Data Sculptor may count decoded field bytes without retaining the field value; the safety limit still applies so malformed unterminated fields cannot turn the structural scan into unbounded growth.

W002-MAT-002.11

Materialized COL artifacts use canonical one-column UTF-8 CSV serialization

UNDER REVIEW

Each finalized materialized COL artifact is a one-column CSV. It begins with exactly one UTF-8 BOM (EF BB BF) and uses LF (0x0A) as the record terminator on every supported host.

The first logical record contains the exact decoded source header text for that physical source column; an alias assigned with AS lives in the governed MAP and does not rewrite the physical COL header. A deliberately empty source header is serialized as one explicit empty header field rather than as absence of a header record.

Header and data fields use deterministic minimal CSV quoting: quote when the field contains comma, double quote, CR, or LF; double embedded double quotes; otherwise write the field without quotes. Embedded CR/LF that belong to a quoted field remain field content. For a one-column data record whose decoded value is the empty string, serialize the value explicitly as "" so the row cannot be confused with a bare blank logical record.

For fixed source bytes and fixed governed semantics, changing input/output window boundaries must not change the finalized COL bytes.

W002-MAT-003

Stage 2 processes the source through bounded reusable windows

UNDER REVIEW

Structural materialization must process the certified source through bounded reusable input windows compatible with browser/WASM memory constraints. Source size and row count must not require proportional WASM memory growth.

W002-MAT-003.1

The 4 MiB WASM-001b window is a proven reference point, not a frozen production constant

UNDER REVIEW

The 4 MiB source window used successfully during the WASM-001b browser experiments is an evidence-backed starting/reference size. WASM-002 may tune the production input-window size using benchmark evidence, provided the governed memory budget and all window-invariance requirements remain satisfied.

W002-MAT-003.2

Changing source-window size or boundary placement must not change results

UNDER REVIEW

For the same certified source and Work Order, permitted changes in bounded Stage 2 input-window size or boundary placement must not change CSV interpretation, resolved headers/ordinals, accepted row count, row identity, aliases, canonical COL bytes, successor MAP contents apart from newly allocated physical identities/timestamps, or the first deterministic refusal condition.

W002-MAT-003.3

CSV structure must survive arbitrary input-window boundaries

UNDER REVIEW

Input-window boundaries may occur between ordinary field bytes, delimiter bytes, quote/escaped-quote pairs, CR/LF record-ending bytes, inside quoted multiline fields, and inside already-certified multi-byte UTF-8 sequences. The Stage 2 parser must preserve equivalent structural meaning across those boundaries.

W002-MAT-003.4

Cross-window parser state is small and explicit

UNDER REVIEW

Stage 2 may carry only the bounded state needed to continue the current logical CSV parse, including the current logical row ordinal, current field ordinal, quoted/unquoted state, escaped-quote/quote-transition state as required by the parser, pending CR/LF state, decoded-field byte count, resolved selected-field dispatch metadata, and bounded selected-field/output staging.

The parser must not retain previous complete rows or source windows merely because a CSV record crosses a window boundary.

W002-MAT-003.5

Input-window and output-drain sizes are independent implementation controls

UNDER REVIEW

The source read window, WASM transfer window where applicable, selected-field accumulator bound, and output-drain window are separate controls. One must not be silently treated as the maximum for another merely because an earlier prototype used the same numeric value.

Any tuning must preserve the Stage 2 memory, backpressure, byte, and window-invariance contracts.

W002-MAT-003.6

Stage 2 uses direct structural parsing rather than a required structural sidecar

UNDER REVIEW

The WASM-002 baseline performs its Stage 2 work directly from the certified source stream. It must not require a precomputed comma/quote/newline position map, binary structural index, hidden cache, or OPFS sidecar before materialization can proceed.

The previously discussed structural-sidecar comparison remains a separate future experiment and must not be introduced into WASM-002 as an unmeasured dependency.

W002-MAT-003.7

The Stage 2 algorithm is browser-first shared Rust core behavior

UNDER REVIEW

The structural parser, row-count semantics, selector dispatch, canonical field serialization, and bounded output-state machine defined by Stage 2 belong in the shared Rust semantic core proven through the browser/WASM path first. A later native CLI host must call the same governed core rather than reimplementing competing materialization semantics.

2. Isolated Windows-1252 to UTF-8 Conversion Task

W002-CONV-001

Conversion is a separate governed operation

UNDER REVIEW

Windows-1252-to-UTF-8 conversion must be implemented as a distinct Work Order operation, separate from UTF-8 certification and separate from analytical materialization.

W002-CONV-001.1

A failed analytical Work Order must not automatically invoke conversion.

UNDER REVIEW
W002-CONV-001.2

The user must explicitly choose or submit the separate conversion task.

UNDER REVIEW
W002-CONV-001.3

The original source file must remain unchanged.

UNDER REVIEW
W002-CONV-001.4

Successful conversion must create a new UTF-8 artifact with its own governed identity and receipt/evidence.

UNDER REVIEW
W002-CONV-002

Windows-1252 compatibility assessment

UNDER REVIEW

After strict UTF-8 certification fails, Data Sculptor may assess whether the source bytes are compatible with the specific Windows-1252 conversion rules supported by the product.

W002-CONV-002.1

Compatibility means that the supported deterministic converter can map the observed source bytes under

UNDER REVIEW

the frozen Windows-1252 rules.

W002-CONV-002.2

Compatibility must not be described as proof that Windows-1252 was historically or authoritatively the file's

UNDER REVIEW

original encoding.

W002-CONV-002.3

Bytes undefined by the frozen Windows-1252 mapping must cause the compatibility assessment or

UNDER REVIEW

conversion task to refuse rather than guess.

W002-CONV-002.4

At minimum, the PRD must explicitly address Windows-1252 undefined byte values 0x81, 0x8D, 0x8F, 0x90,

UNDER REVIEW

and 0x9D.

W002-CONV-002.5

The compatibility check must itself be bounded and deterministic.

UNDER REVIEW
W002-CONV-003

Help suggestion after failed UTF-8 certification

UNDER REVIEW

When UTF-8 certification fails and the bytes are compatible with Data Sculptor's supported Windows-1252 conversion rules, the Help Engine may suggest the separate conversion Work Order.

W002-CONV-003.1

The suggestion must state that the current analytical task has stopped.

UNDER REVIEW
W002-CONV-003.2

The suggestion must state that the original source has not been changed.

UNDER REVIEW
W002-CONV-003.3

The suggestion must describe the source as compatible with the supported Windows-1252 converter, not

UNDER REVIEW

definitively identified as Windows-1252.

W002-CONV-003.4

The suggestion must make clear that conversion is a separate user-authorized task.

UNDER REVIEW
W002-CONV-003.5

If the bytes are not compatible with the supported converter, Help must not recommend Windows-1252

UNDER REVIEW

conversion as though it were safe.

W002-CONV-004

Canonical conversion output

UNDER REVIEW

A successful Windows-1252 conversion task must produce canonical UTF-8 output suitable for later submission to the normal UTF-8 certification and materialization path.

W002-CONV-004.1

The converted artifact must itself be certifiable as UTF-8.

UNDER REVIEW
W002-CONV-004.2

The conversion Receipt identifies the governed source encoding

UNDER REVIEW

The canonical RCP for a successful governed Windows-1252-compatible conversion must identify SOURCE_ENCODING=WINDOWS-1252-COMPATIBLE or the exact equivalent terminology frozen by the conversion contract. That operation-specific fact is carried within the canonical TXT Receipt governed by W002-RCP-001 through W002-RCP-010.

W002-CONV-004.3

The conversion Receipt identifies the materialized UTF-8 encoding

UNDER REVIEW

The canonical RCP for successful conversion must identify MATERIALIZED_ENCODING=UTF-8.

W002-CONV-004.4

The conversion Receipt identifies bounded streaming transcoding

UNDER REVIEW

The canonical RCP for successful conversion must identify that transcoding was performed under the governed bounded/streaming conversion contract.

W002-CONV-004.5

No analytical column materialization occurs as part of this conversion operation.

UNDER REVIEW

3. Help Engine - First-Class Product Surface

Design rationale — why Help is part of the workspace

Rationale, not independent scope authority. The numbered W002-HELP-* and W002-UI-* requirements below govern. This discussion records the problem those requirements are intended to solve so later implementation does not preserve the words while losing the design purpose.

The operational problem is lossy problem reporting. Conventional analytical software often turns a refusal into a transient dialog, screenshot, copied error string, or half-remembered paraphrase. By the time the problem reaches IT or another analyst, the original execution phase, exact evidence, offsets, Work Order context, and boundary facts may be missing. Data Sculptor should preserve the diagnostic record instead of asking a human to reconstruct it.

The live Help pane and the saved Help report are renderings, not truth. The canonical diagnostic event emitted by the governed engine is authoritative. The browser Help / Diagnostic Surface is a transient projection of that event inside the working context. The saved HTML Help Report is a durable projection of the same event for retention and handoff. Neither UI state nor prose may override, repair, soften, or invent the underlying diagnostic facts.

Co-presence prevents modal amnesia. A governed refusal should remain visible beside the Work Order, execution stages, source/Suitcase context, and generated artifacts that explain how the user arrived there. Application-controlled modal dialogs that hide those surfaces would sever the cognitive link between intent, observed evidence, refusal, and safe next action. The dedicated Help / Diagnostic Surface therefore occupies persistent workspace real estate rather than appearing only as a transient popup.

Different voice, same truth. Casual, Office Speak, and Technical renderings may vary vocabulary, sentence structure, notation, pedagogical depth, and how much supporting explanation they show. They may not change the canonical diagnostic identity, severity, evidence, refusal/continue decision, provenance, or safe next action. A voice may format the same byte offset differently; it may not replace exact evidence with a weaker claim.

WASM-002 proves the wiring, not the finished prose library. The governed engine emits a stable diagnostic ID plus structured facts. The Help layer resolves that ID through one validated catalog containing Casual, Office Speak, and Technical templates. The development source is help_messages.json; the build validates it and embeds the validated catalog directly into the released Data Sculptor HTML, so runtime Help does not depend on a network request or adjacent catalog file. During WASM-002 the catalog may use unmistakable mechanically generated placeholder text whose purpose is to prove lookup, interpolation, switching, coverage, and semantic parity. The complete authored Help corpus is a later content milestone and must not become a prerequisite for accepting the WASM-002 execution architecture.

The saved report is a support-handoff artifact. The user must be able to create a styled, self-contained HTML document that stands on its own outside Data Sculptor and can be retained in the Suitcase, attached to an IT ticket, emailed to another analyst, or opened on an offline workstation. The report is designed for two audiences in one file: a readable explanation for the analyst or manager and a structured facts section for technical staff. When relevant, it records the canonical execution-boundary facts source_modified_by_data_sculptor, materialization_started, analytical_outputs_published, and store_state_committed directly from governed execution state.

Self-contained does not mean pixel-identical or immutable. The report must have no runtime dependency on Data Sculptor, a network connection, remote fonts, external stylesheets, or any external presentation resource. System font substitution and ordinary browser differences are acceptable so long as meaning, hierarchy, evidence, and accessibility are preserved. An HTML file on disk can be edited by a person. WASM-002 therefore gives the HLP an immutable governed identity and explicit lineage but does not automatically SHA-256 the report or create/refresh an LCK. The final HLP bytes remain eligible for exact-byte evidence later through the explicit FINGERPRINT/LCK workflow.

Support handoff must not become a data-egress path. WASM-002 uses a fixed disclosure allowlist rather than generating broad context and attempting to redact it afterward. A Help Report may carry the exact source filename, relevant column/header/ordinal and bounded execution evidence, governed artifact filenames, and only the minimum executable Work Order clause(s) needed to explain the diagnostic. It does not automatically include source rows or values, absolute local paths, unrelated columns, the complete Work Order, Work Order comments, unrelated Suitcase contents, browser/environment internals, or raw ungoverned stack traces. Every HLP visibly states the disclosure boundary it applied.

ComponentNatureRole and authority
Canonical Diagnostic EventShared-core governed stateAuthoritative truth. Stable diagnostic identity plus structured facts, evidence, severity/classification, execution decision, provenance, and safe next action.
Help / Diagnostic SurfaceTransient workspace projectionImmediate explanation. Persistent co-present viewport into the event; supports voice switching and remediation without becoming a second source of truth.
HTML Help ReportDurable Suitcase artifactPortable evidence / support handoff. Self-contained human-readable explanation and structured technical facts rendered from the same canonical event.
W002-HELP-001

Canonical diagnostic truth

UNDER REVIEW

Every governed user-visible failure or warning produced by WASM-002 must originate as a canonical diagnostic event. A diagnostic event must have a stable identity and structured facts independent of its final wording.

W002-HELP-001.1

Canonical diagnostic IDs use the frozen DS-<DOMAIN>-<NNN> grammar

UNDER REVIEW

Every canonical diagnostic event must carry one stable identifier using the exact form DS-<DOMAIN>-<NNN>.

DOMAIN is exactly three uppercase ASCII letters A through Z. NNN is exactly three decimal digits, zero-padded, in the range 001 through 999. Examples include DS-ENC-001, DS-WKO-001, DS-STO-001, DS-MAT-001, and DS-HLP-001.

A diagnostic ID is permanent after allocation and must never be reused for a different diagnostic meaning. Severity, host, build/release, source filename, path, UUID, byte offset, row/column number, count, timestamp, occurrence ID, and other run-specific facts must not be encoded into the diagnostic ID; those values belong in structured diagnostic fields. The identifier is the canonical lookup key used by the Help message catalog.

W002-HELP-001.2

Diagnostic severity uses one exact token set

UNDER REVIEW

Every canonical diagnostic event must carry exactly one severity token: INFO, WARNING, or ERROR.

Severity classifies the condition for human and machine interpretation. It does not itself determine whether execution continues or refuses; that authority is carried separately by the canonical behavior field.

W002-HELP-001.3

Diagnostic phase uses a stable uppercase token

UNDER REVIEW

Every canonical diagnostic event must identify the governed operation or phase using an uppercase ASCII snake-case token matching [A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*.

Examples include WORK_ORDER_VALIDATION, SOURCE_CERTIFICATION, MATERIALIZATION, STORE_PUBLICATION, and HELP_REPORT. These examples do not constitute a closed global phase list; the fixed phase for each allocated diagnostic is declared by that diagnostic's registry entry.

W002-HELP-001.4

Structured diagnostic facts are declared per diagnostic

UNDER REVIEW

The canonical event carries diagnostic-specific evidence in a structured facts object. Fact keys use lowercase ASCII snake case matching [a-z][a-z0-9]*(?:_[a-z0-9]+)*.

Each diagnostic registry entry declares disjoint required_facts and optional_facts sets. Every required fact must be present when that diagnostic is emitted; an optional fact may be absent when it is not available or not applicable. An emitted fact key that is not declared for that diagnostic is invalid.

Absence is semantically distinct from a value: a missing fact must never be silently interpreted as false, zero, an empty string, or another default. This rule includes the canonical Boolean boundary facts governed by W002-HELP-004.11.

W002-HELP-001.5

Execution behavior is explicitly CONTINUE or REFUSE

UNDER REVIEW

Every canonical diagnostic event must carry exactly one execution-behavior token: CONTINUE or REFUSE.

This field is the governed continue/refuse decision for the event. Help wording, severity, UI color, or presentation must not independently weaken, strengthen, or reinterpret it.

W002-HELP-001.6

Safe next action uses a stable token rather than Help prose

UNDER REVIEW

Every canonical diagnostic event must carry a next_action token using uppercase ASCII snake case matching [A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*. NONE is the canonical value when no safe governed next action applies.

The token expresses stable machine-readable intent; Casual, Office Speak, and Technical wording for that action belongs to the Help layer. Run-specific values such as timestamps, paths, UUIDs, byte offsets, filenames, counts, or occurrence IDs remain structured facts and do not change the diagnostic identity or fixed next-action meaning.

W002-HELP-001.7

The governed engine emits the diagnostic semantic core, not voice-authored prose

UNDER REVIEW

The shared Rust/WASM diagnostic path must provide the canonical semantic core required by Help: diagnostic_id, severity, phase, behavior, facts, and next_action. The fixed values and permitted fact-key sets for an allocated diagnostic are governed by diagnostics.json.

Casual, Office Speak, and Technical prose belongs to the Help rendering layer rather than being duplicated as authored message sets inside the governed engine. Host/build/occurrence metadata may be carried by surrounding governed execution evidence, but it must not redefine the diagnostic semantic core.

W002-HELP-001.8

diagnostics.json is the canonical WASM-002 diagnostic registry build resource

UNDER REVIEW

The human-inspectable development/build source for the WASM-002 diagnostic registry is exactly diagnostics.json, encoded as UTF-8 without BOM. It is Data Sculptor product/build content, not a Suitcase artifact; it must not use the __DS__ namespace, consume an artifact-class token, or be copied into an analyst's Suitcase merely because Data Sculptor runs.

The top-level JSON object has exactly two fields: registry_version and diagnostics. registry_version is the string "1". diagnostics is an array written in ascending UTF-8 byte order of diagnostic_id.

Each diagnostic entry has exactly seven fields: diagnostic_id, severity, phase, behavior, next_action, required_facts, and optional_facts. Diagnostic IDs must be unique and satisfy W002-HELP-001.1. Severity, phase, behavior, and next-action values must satisfy W002-HELP-001.2 through W002-HELP-001.6. required_facts and optional_facts are arrays of canonical fact-key strings sorted in ascending UTF-8 byte order; keys must be unique within each array and the two arrays must be disjoint.

{
  "registry_version": "1",
  "diagnostics": [
    {
      "diagnostic_id": "DS-ENC-001",
      "severity": "ERROR",
      "phase": "SOURCE_CERTIFICATION",
      "behavior": "REFUSE",
      "next_action": "CONVERT_SOURCE_TO_UTF8",
      "required_facts": ["byte_offset", "source_filename"],
      "optional_facts": ["analytical_outputs_published", "materialization_started", "source_modified_by_data_sculptor", "store_state_committed"]
    }
  ]
}

The PRD does not need to enumerate every allocated WASM-002 diagnostic row. The complete registry delivered with the build is retained acceptance evidence. A diagnostic ID becomes permanent once allocated and must not later be reused for a different meaning.

Build validation must fail on malformed JSON; extra/missing entry fields; duplicate or noncanonical diagnostic IDs; invalid fixed tokens; unsorted, duplicate, overlapping, or invalid fact-key declarations; engine diagnostic definitions whose fixed semantics disagree with the registry; engine diagnostic definitions absent from the registry; Help-catalog IDs absent from the registry; or Help placeholders that name facts not declared as required or optional by the matching diagnostic.

W002-HELP-002

Three-voice parity

UNDER REVIEW

The Help Engine must support the three established Data Sculptor help voices. All three renderings must preserve the same diagnostic truth. Voice selection may change wording, sentence structure, degree of technical detail, and explanatory style.

W002-HELP-002.1

Voice selection must not change diagnostic identity.

UNDER REVIEW
W002-HELP-002.2

Voice selection must not change severity.

UNDER REVIEW
W002-HELP-002.3

Voice selection must not change counts or evidence.

UNDER REVIEW
W002-HELP-002.4

Voice selection must not change whether execution continues or refuses.

UNDER REVIEW
W002-HELP-002.5

Voice selection must not change safe/unsafe action boundaries.

UNDER REVIEW
W002-HELP-002.6

Voice selection must not change provenance.

UNDER REVIEW
W002-HELP-002.7

Voice selection must not change the meaning of the recommended next step.

UNDER REVIEW

Tests must assert parity on the canonical event and structured facts, not brittle equality of prose.

W002-HELP-002.8

One validated Help message catalog is the source of truth for all three voices

UNDER REVIEW

The Help layer resolves a canonical diagnostic ID through one validated catalog that associates that ID with Casual, Office Speak, and Technical templates. The human-maintained development source is exactly help_messages.json, encoded as UTF-8 without BOM.

help_messages.json is a Data Sculptor product/build resource, not a Suitcase artifact. It must not use the __DS__ governed artifact namespace, consume a semantic artifact-class token, or be copied into an analyst's Suitcase merely because Data Sculptor runs. Run-specific structured facts remain authoritative in the canonical diagnostic event and are supplied separately to the selected template. The three voices must not be maintained as unrelated message stores.

W002-HELP-002.9

WASM-002 may use mechanically generated placeholder voice text to prove Help wiring

UNDER REVIEW

WASM-002 acceptance does not require the complete production Help corpus. Every diagnostic ID exercised by the WASM-002 Help acceptance set must resolve to one catalog entry, but its Casual, Office Speak, and Technical strings may be unmistakable placeholders. Placeholder entries may be generated mechanically from the validated diagnostics.json registry; no production prose authorship is required.

Acceptance must prove correct diagnostic-ID lookup, selected-voice resolution, structured-fact interpolation where a placeholder is used, voice switching, catalog coverage for the exercised acceptance diagnostics, and semantic parity across voices. Final authored Help wording, examples, editorial polishing, and production-corpus quality are deferred to a later Help-content milestone.

W002-HELP-002.10

help_messages.json has one deterministic WASM-002 source schema

UNDER REVIEW

The top-level JSON object has exactly two fields: catalog_version and messages. catalog_version is the string "1". messages is an array written in ascending UTF-8 byte order of diagnostic_id.

Each message entry has exactly four fields: diagnostic_id, casual, office_speak, and technical. diagnostic_id must satisfy the canonical DS-<DOMAIN>-<NNN> grammar and must be unique in the catalog. Each voice field is a JSON string.

A voice string may contain zero or more structured-fact placeholders using the exact form {fact_name}. Each catalog diagnostic_id must exist in the validated diagnostics.json registry, and each referenced placeholder must be declared in that diagnostic's required_facts or optional_facts. Duplicate IDs, missing voice fields, null voice values, malformed JSON, noncanonical or unregistered diagnostic IDs, or undeclared fact placeholders make catalog validation fail.

WASM-002 therefore does not require one global exhaustive fact-name table in the PRD. Fact-key authority is per diagnostic: the validated registry declares which fact names are legal for each stable diagnostic meaning.

{
  "catalog_version": "1",
  "messages": [
    {
      "diagnostic_id": "DS-ENC-001",
      "casual": "[CASUAL PLACEHOLDER] {source_filename}",
      "office_speak": "[OFFICE PLACEHOLDER] {source_filename}",
      "technical": "[TECHNICAL PLACEHOLDER] {source_filename} {byte_offset}"
    }
  ]
}

Later Help-content revisions may extend or version this schema only through an explicit PRD revision.

W002-HELP-002.11

The validated Help catalog is embedded into the released HTML build

UNDER REVIEW

Before a WASM-002 browser build is accepted, the build must parse and validate help_messages.json, then serialize the validated catalog directly into the Data Sculptor HTML itself as one non-executable application/json payload with the exact element ID ds-help-catalog.

The embedded JSON must be HTML-safe so catalog text cannot terminate the containing script element; at minimum, literal less-than characters in JSON string content must be escaped during embedding. The browser Help layer reads only this embedded payload at runtime. It must not fetch a Help catalog from the network, the filesystem, the Suitcase, or an adjacent deployment file.

Missing or malformed embedded catalog JSON, or a build whose embedded catalog does not correspond to the validated build input, is a build-validation failure. The released HTML therefore remains one offline portable front door for Help-catalog lookup rather than an HTML shell that depends on a companion Help file.

W002-HELP-003

Message and report outputs

UNDER REVIEW

The Help Engine must support both live and durable help surfaces.

W002-HELP-003.1

The Help Engine must support a concise human-facing message suitable for the live browser surface.

UNDER REVIEW

The concise message is rendered in the dedicated browser Help / Diagnostic Surface when that surface is present; it is not required to be a modal or transient notification.

W002-HELP-003.2

The Help Engine must support a durable branded HTML Help report suitable for saving with the Work Order,

UNDER REVIEW

receipt, and output artifacts. The short message and the HTML report must resolve from the same canonical diagnostic event.

W002-HELP-004

HTML Help report content

UNDER REVIEW

A saved Help report must be able to include the following elements when relevant.

W002-HELP-004.1

Product and brand identity.

UNDER REVIEW
W002-HELP-004.2

Plain-language summary.

UNDER REVIEW
W002-HELP-004.3

Stable diagnostic ID.

UNDER REVIEW
W002-HELP-004.4

What Data Sculptor observed.

UNDER REVIEW
W002-HELP-004.5

Evidence and structured facts.

UNDER REVIEW
W002-HELP-004.6

What the user can safely do next.

UNDER REVIEW
W002-HELP-004.7

Source/Work-Order context is governed by the HLP disclosure allowlist.

UNDER REVIEW

The report may include only source and Work Order context permitted by W002-HELP-010. Absolute local paths, entire Work Orders, Work Order comments, source rows/values, unrelated columns, and unrelated Suitcase contents are not automatically eligible merely because they are available to the running application.

W002-HELP-004.8

Report-generation metadata preserves HLP identity and lineage.

UNDER REVIEW

The report must carry its own governed HLP filename and generation UTC together with the diagnostic identity and applicable originating execution lineage. The exact HLP provenance contract is governed by W002-HELP-009.

W002-HELP-004.9

Selected Help voice and its human-facing explanation.

UNDER REVIEW
W002-HELP-004.10

A clearly labelled structured-facts block derived from the canonical diagnostic event.

UNDER REVIEW
W002-HELP-004.11

Four canonical Boolean facts describe the WASM-002 execution boundary.

UNDER REVIEW

When the governed diagnostic context can determine the execution boundary, the canonical fact names are exactly:

source_modified_by_data_sculptor
materialization_started
analytical_outputs_published
store_state_committed

Each present value is a JSON/structured Boolean true or false, never the strings "TRUE" or "FALSE". source_modified_by_data_sculptor states only whether Data Sculptor modified the analyst-owned source in place; it must not imply knowledge that no external process or analyst changed the source between sessions. materialization_started records whether the governed analytical materialization phase began. analytical_outputs_published records whether governed analytical outputs were successfully published for user use; transient SCR candidates or abandoned/uncommitted debris do not make this fact true. store_state_committed records whether the successor Store MAP commit point was crossed.

A missing fact must never be interpreted as false. If a required boundary fact is unavailable, the diagnostic/report must represent that absence as unavailable rather than silently substituting a Boolean value.

W002-HELP-004.12

Governed Work Order lineage sufficient to establish user intent.

UNDER REVIEW

Included lineage must obey the disclosure boundary defined for Help reports and must not automatically expand into source-data disclosure.

W002-HELP-005

Deterministic rendering

UNDER REVIEW

Given the same canonical diagnostic event, selected voice, PRETTY rules, and built-in presentation version, Help rendering must be deterministic except for explicitly permitted run-specific fields.

A future configurable Brand Manifest may add another governed presentation input, but is not part of the WASM-002 rendering contract.

W002-HELP-006

Host parity

UNDER REVIEW

The Help Engine must be designed for use by the browser host and the later native CLI host without changing diagnostic semantics. Host-specific presentation may differ, but the canonical diagnostic event and governed meaning must remain shared.

W002-HELP-007

Help surfaces are projections, not diagnostic authority

UNDER REVIEW

The live Help / Diagnostic Surface and the saved HTML Help Report must render from the canonical diagnostic event. Neither surface may independently create, reinterpret, weaken, suppress, or override governed diagnostic truth.

W002-HELP-008

HTML Help Report is a governed support-handoff artifact

UNDER REVIEW

The user must be able to generate a styled, self-contained HTML Help Report from a governed diagnostic event for retention, IT/support handoff, or communication to another analyst.

The report must support two audiences in one document: a human-readable explanation using the selected Help voice and a clearly inspectable structured-facts section that preserves the technical evidence required to understand the event.

W002-HELP-008.1

The report preserves the canonical execution-boundary facts, including relevant negative facts.

UNDER REVIEW

When relevant to the diagnostic, the report must render the governed values of source_modified_by_data_sculptor, materialization_started, analytical_outputs_published, and store_state_committed. These values originate from governed execution state rather than reassuring prose invented by the renderer. A missing/unavailable fact is not rendered as false.

W002-HELP-008.2

The report preserves only the Work Order lineage needed to explain the diagnostic.

UNDER REVIEW

The report must identify the originating WKO physical filename when one applies and may include only the minimum executable Work Order clause or clauses needed to establish the governed operation, user intent, and trigger for the diagnostic. It must not automatically embed the entire Work Order or Work Order comments. All such context remains subject to the fixed disclosure boundary in W002-HELP-010.

W002-HELP-009

WASM-002 establishes HLP identity, lineage, and one canonical embedded provenance payload.

UNDER REVIEW

A durable generated Help Report is an immutable governed HLP artifact whose physical filename is:

__DS__HLP__YYYYMMDDTHHMMSSmmmZ__<uuid-v4>.html

The UTC token is the HLP's own governed generation/publication time. The report is the final self-contained HTML artifact using the canonical built-in Red5Sorcery/Data Sculptor presentation; no unstyled intermediate is the canonical HLP.

Every HLP must expose a visible deterministic Provenance section and exactly one embedded non-executable application/json payload whose element ID is exactly ds-hlp-provenance. For schema version "1", the JSON top-level object contains exactly these ten fields:

{
  "schema_version": "1",
  "hlp_filename": "__DS__HLP__20260922T191500123Z__<uuid-v4>.html",
  "hlp_generation_utc": "20260922T191500123Z",
  "diagnostic_id": "DS-ENC-001",
  "originating_wko_filename": "__DS__WKO__...txt",
  "originating_rcp_filename": null,
  "selected_help_voice": "technical",
  "presentation_id": "red5sorcery-data-sculptor",
  "presentation_version": "1",
  "data_sculptor_build": "WASM-002"
}

hlp_generation_utc must use the canonical fixed-width millisecond UTC form YYYYMMDDTHHMMSSmmmZ. selected_help_voice is exactly one of casual, office_speak, or technical, matching the Help catalog keys. For WASM-002 the built-in presentation identity is exactly red5sorcery-data-sculptor and its presentation version is exactly "1".

If no originating WKO or RCP relationship exists, the corresponding machine-readable value must be JSON null; empty strings and invented lineage are forbidden. The visible Provenance section must render the same absence as NOT APPLICABLE. The visible and machine-readable provenance must otherwise express the same governed facts; a mismatch is an HLP-generation failure and must not be silently tolerated.

The embedded JSON must be HTML-safe so provenance text cannot terminate the containing script element; at minimum literal less-than characters in JSON string content must be escaped during embedding. The provenance payload remains subject to W002-HELP-010 and must not introduce source rows, source values, absolute local paths, arbitrary Work Order content, or other context excluded by the fixed HLP disclosure policy.

WASM-002 does not automatically compute or embed a SHA-256 of the HLP, and saving an HLP must not create, refresh, or verify an LCK. The final HLP bytes remain eligible for exact-byte integrity evidence under the later explicit FINGERPRINT/LCK workflow. Configurable Brand Manifest provenance remains deferred to V1-BACKLOG / a future build.

W002-HELP-010

Help Report disclosure uses one fixed WASM-002 allowlist.

UNDER REVIEW

Generating a Help Report must not silently become a data-export path. WASM-002 therefore uses one deterministic allowlist rather than collecting broad context and attempting to redact it afterward. There are no disclosure checkboxes, permissive export modes, or per-report overrides in WASM-002.

Always eligible when present and applicable: diagnostic ID; severity/classification; governed operation/phase; continue/refuse decision; safe next action; selected Help voice; HLP identity and generation UTC; relevant governed artifact filenames; and the four canonical boundary facts from W002-HELP-004.11.

Eligible only when necessary to explain the diagnostic: the exact source filename but not an absolute OS path; relevant source column header and/or 1-based column number; byte offset, row/count, or byte-length evidence; Store/RID/COL/MAP/WKO physical filenames; and only the minimum executable Work Order clause or clauses needed to establish intent and the diagnostic trigger.

Never included automatically: source rows; source field values or arbitrary data samples; absolute local paths; unrelated column names; the complete Work Order; Work Order comments; unrelated Suitcase contents; browser/environment internals not governed as diagnostic evidence; or raw ungoverned stack traces.

Every generated HLP must contain a visible Disclosure section stating, at minimum: Source rows included: NO; Source values included: NO; Absolute local paths included: NO; Work Order comments included: NO; and Work Order excerpt: RELEVANT EXECUTABLE CLAUSES ONLY. The renderer must not weaken these declarations when the underlying policy has not changed.

W002-HELP-011

Help owns the cross-session source-continuity edge-case explanation

UNDER REVIEW

When an unexpected analytical result, row-alignment concern, or support question raises the possibility that an analyst-owned source changed between sessions, Data Sculptor-controlled guidance must flow through the Help Engine. Help must not imply that the engine monitored or cryptographically protected the source when it did not.

The explanation must distinguish ordinary analyst-controlled workflow from stronger optional evidence. It may ask whether the analyst edited, replaced, sorted, re-exported, synchronized, copied over, or otherwise changed the source after the Store was established.

W002-HELP-011.1

Help presents continuity evidence in explicit assurance levels

UNDER REVIEW

For a suspected cross-session source change, Help must distinguish at least these evidence levels:

  • No continuity evidence: state that cross-session byte continuity cannot be independently verified from filename/Store metadata alone.
  • INVENTORY available: use filename, exact byte length, and last-modified metadata as lightweight clues; changed metadata may indicate that the source changed, while unchanged metadata must not be presented as proof of unchanged bytes.
  • Explicit fingerprint evidence available: exact-byte SHA-256 evidence may establish whether the compared file bytes match or differ under the later governed FINGERPRINT workflow.

Help must not collapse these levels into one generic statement of certainty.

W002-HELP-011.2

WASM-002 does not impose automatic cross-session hashing or Suitcase surveillance

UNDER REVIEW

Ordinary WASM-002 materialization and Store inheritance must not automatically SHA-256 the source, recursively fingerprint the Suitcase, or maintain hidden whole-Suitcase surveillance merely to guard against the possibility that an analyst-owned file changed between sessions.

This is an intentional product boundary for the lone-office-analyst model. The product assumes the analyst normally controls the Suitcase, provides lightweight explicit INVENTORY evidence in WASM-002, preserves a later explicit FINGERPRINT path for stronger assurance, and relies on Help to explain unusual cross-session continuity questions proportionately.

WASM-002 must not create, refresh, or silently verify an LCK Suitcase Lock as a side effect of Work Order save, materialization, Store inheritance, INVENTORY, alias maintenance, or ordinary project use. LCK publication belongs to the explicit later-V1 FINGERPRINT workflow.

4. PRETTY Engine - First-Class Rendering Surface

W002-PRETTY-001

Separation of truth and presentation

UNDER REVIEW

The PRETTY Engine must not decide analytical truth or reinterpret diagnostic meaning. It receives governed content and renders it into human-facing artifacts.

WASM-002 conceptual boundary: ENGINE TRUTH -> HELP / REPORT CONTENT -> PRETTY ENGINE -> BUILT-IN DATA SCULPTOR PRESENTATION -> ARTIFACT.

A future build may replace the built-in presentation source with a governed Brand Manifest without changing the analytical or diagnostic truth supplied to PRETTY.

W002-PRETTY-002

Shared renderer path

UNDER REVIEW

The PRETTY Engine must provide a common rendering path for Data Sculptor artifacts that require governed human presentation, including at minimum the WASM-002 Help HTML report. WASM-002 uses the canonical built-in Red5Sorcery/Data Sculptor presentation. The architecture must permit the same path to accept a configurable Brand Manifest in a future build without changing analytical semantics.

The architecture must also permit later reuse for branded Receipt HTML, verification reports, tables, Quick Viz, and other PRETTY outputs. WASM-002 canonical run Receipts themselves remain TXT-only under W002-RCP-003.

W002-PRETTY-003

Self-contained HTML

UNDER REVIEW

Durable HTML artifacts produced by PRETTY must be self-contained for ordinary viewing after generation. Self-containment requires semantic and functional portability, not pixel-identical rendering across operating systems or browsers; ordinary system-font substitution and browser rendering differences are acceptable when meaning, evidence, hierarchy, and accessibility remain intact.

W002-PRETTY-003.1

A saved artifact must not require a network connection.

UNDER REVIEW
W002-PRETTY-003.2

A saved artifact must not require an external stylesheet.

UNDER REVIEW
W002-PRETTY-003.3

A saved artifact must not require a remote font.

UNDER REVIEW
W002-PRETTY-003.4

A saved artifact must not require a separately located logo file.

UNDER REVIEW
W002-PRETTY-003.5

A saved artifact must not require external presentation resources.

UNDER REVIEW

Required CSS, SVG, and other built-in presentation assets needed for ordinary viewing must be embedded or otherwise resolved into the generated artifact at creation time.

Future configurable Brand Manifest inputs, when implemented, must preserve this self-contained output rule.

W002-PRETTY-004

Accessibility and inspectability

UNDER REVIEW

PRETTY HTML must remain ordinary inspectable HTML. Presentation must not obscure the text, evidence, diagnostic code, provenance, or next-step guidance. The rendered artifact must remain usable without JavaScript when JavaScript is not required for its content.

5. Canonical Brand Manifest

Revision BH scope decision: configurable Brand Manifest implementation is deferred to V1-BACKLOG / a future build not yet numbered. The requirements below preserve the intended product contract without making BRD serialization, loading, validation, selection, provenance, or substitution a WASM-002 acceptance obligation.
W002-BRAND-001

One governed brand source

DEFERRED

PRETTY must read reusable brand elements from one canonical Brand Manifest rather than hard-coding brand constants separately across renderers.

The exact serialization format is not frozen by this draft. The selected format must be local, deterministic, UTF-8, straightforward for Rust and browser code to parse, and easy to inspect and version.

W002-BRAND-002

Manifest content

DEFERRED

The Brand Manifest must be able to define at least the following governed elements.

W002-BRAND-002.1

Brand identifier.

DEFERRED
W002-BRAND-002.2

Brand version.

DEFERRED
W002-BRAND-002.3

Product name.

DEFERRED
W002-BRAND-002.4

Organization/company name.

DEFERRED
W002-BRAND-002.5

Approved tagline or product-label fields.

DEFERRED
W002-BRAND-002.6

Named color tokens.

DEFERRED
W002-BRAND-002.7

SVG logo assets or SVG logo variants.

DEFERRED
W002-BRAND-002.8

Typography/fallback declarations needed by PRETTY.

DEFERRED
W002-BRAND-002.9

Other reusable visual tokens explicitly approved by the PRD.

DEFERRED

4. PRETTY Engine - PRETTY Tables and Contextual

Handoff The following requirements extend the first-class PRETTY rendering surface with the V1 PRETTY Table handoff model. They do not change the separation of truth and presentation established by W002-PRETTY-001.

W002-PRETTY-005

PRETTY Table renderer

DEFERRED

The PRETTY Engine must be able to render a finalized governed tabular result into a review-ready XLSX artifact without recalculating or reinterpretating analytical values.

W002-PRETTY-005.1

DEFERRED

The rendered workbook may apply governed titles, headings, widths, panes, number formats, hierarchy, notes, and other presentation details defined by the PRETTY contract and Brand Manifest.

W002-PRETTY-005.2

DEFERRED

Any value written to the primary governed result table must correspond to an already-established analytical result or an explicitly governed presentation-only representation of that result.

W002-PRETTY-006

Rich Footnote model

DEFERRED

The PRETTY model must support table-level and cell-level Rich Footnotes with stable human-facing labels. Rich Footnotes may carry source, method, caveat, or Supporting Context semantics without exposing internal field names in the visible workbook.

W002-PRETTY-006.1

DEFERRED

A Rich Footnote may exist without Supporting Context when the note itself is sufficient.

W002-PRETTY-006.2

DEFERRED

A Rich Footnote with Supporting Context must preserve the exact governed relationship to that context artifact.

W002-PRETTY-007

Supporting Context anchor contract

DEFERRED

Each governed Supporting Context artifact must have exactly one explicit anchor: either the PRETTY Table as a whole or one specific logical cell in that PRETTY Table. The system must refuse creation of orphaned Supporting Context.

W002-PRETTY-007.1

DEFERRED

The exact serialized cell-anchor representation is a freeze item, but it must remain deterministic, inspectable, and robust to presentation-only layout changes.

W002-PRETTY-008

Governed context artifact identity

DEFERRED

A Supporting Context file copied or materialized by Data Sculptor must receive its own Core artifact identity, provenance, and integrity evidence. The Store Map or equivalent governed mapping must preserve the relationship among the source, PRETTY Table, Rich Footnote, context anchor, and physical context artifact.

W002-PRETTY-009

Portable relative linking

DEFERRED

Where the output format supports local hyperlinks, a PRETTY Table should use relative links to materialized Supporting Context so that moving the whole Project Suitcase or delivery package does not require a network service or absolute machine path.

4. PRETTY Engine - PRETTY Tables and Contextual

Handoff (continued)

W002-PRETTY-010

Handoff integrity

DEFERRED

PRETTY must preserve enough governed source, method, caveat, and context information for a recipient to review the final artifact responsibly. Handoff integrity is presentation of existing truth and provenance; it must not create new analytical claims.

W002-PRETTY-011

Context curation

DEFERRED

Supporting Context must remain deliberately bounded. Exact V1 count, size, and allowlist limits require freeze review; the feature must not become general document storage.

W002-PRETTY-012

Identity and alias separation

DEFERRED

Human-facing footnote labels and context aliases may change presentation without renaming historical Core artifacts or invalidating provenance. The exact physical identity remains authoritative underneath the alias.

W002-PRETTY-ACC-001

Value preservation

DEFERRED

Given a finalized governed result and a PRETTY Table Work Order/configuration, the rendered table must preserve all governed result values exactly except for explicitly frozen display-only formatting.

W002-PRETTY-ACC-002

Cell-level context round trip

DEFERRED

A fixture with one cell-level Rich Footnote and one Supporting Context artifact must render a visible footnote marker/label, preserve the exact logical cell anchor, and resolve the local context target after materialization.

W002-PRETTY-ACC-003

Table-level context round trip

DEFERRED

A fixture with table-level Supporting Context must preserve that table-wide anchor and expose the human-facing context through the governed PRETTY presentation without pretending it belongs to one cell.

W002-PRETTY-ACC-004

Orphan refusal

DEFERRED

A Supporting Context request with neither a table anchor nor a valid cell anchor must refuse deterministically and emit a governed diagnostic event suitable for Help.

W002-PRETTY-ACC-005

Flat-folder portability

DEFERRED

A PRETTY delivery fixture moved as one intact folder must retain valid relative context links and mapping relationships without a network dependency.

W002-PRETTY-ACC-006

Alias stability

DEFERRED

Changing a human-facing table, cell, footnote, or context alias must not change the physical identity or integrity evidence of an existing governed context artifact.

W002-PRETTY-ACC-007

Unsupported or over-limit context

DEFERRED

Once V1 curation limits and the file-type allowlist are frozen, violations must refuse deterministically and explain the safe next action through the Help Engine.

Renderers must request named brand elements. They must not independently own copies of canonical brand values.

W002-BRAND-003

Embedded SVG

DEFERRED

The Brand Manifest must support local SVG logo data in a form that PRETTY can embed into self-contained HTML output without a network fetch or external asset dependency.

W002-BRAND-004

Brand provenance

DEFERRED

Generated PRETTY artifacts must record enough brand provenance to identify the brand definition used to create them. At minimum the design must support the following fields.

W002-BRAND-004.1

BRAND_ID.

DEFERRED
W002-BRAND-004.2

BRAND_VERSION.

DEFERRED
W002-BRAND-004.3

A cryptographic fingerprint of the canonical Brand Manifest, preferably SHA-256.

DEFERRED

The exact metadata representation will be frozen in the full PRD.

W002-BRAND-005

Invalid manifest behavior

DEFERRED

A missing, malformed, incomplete, or semantically invalid Brand Manifest must produce a deterministic governed failure. PRETTY must not silently substitute arbitrary colors, logos, or product identity.

The PRD may later define a deliberate built-in emergency/default brand only if that behavior is explicit and testable.

6. White-Label Architecture Boundary

Revision BH scope decision: white-label/configurable-brand implementation is deferred to V1-BACKLOG / a future build not yet numbered. WASM-002 retains only the general truth/presentation separation needed so later branding can be added without changing analytical semantics.
W002-WL-001

Brand substitution must not alter semantics

DEFERRED

A future configurable-brand build must preserve strict separation between analytical semantics and brand presentation so that an organization-specific Brand Manifest can change presentation without changing the shared Rust analytical core or the meaning of Help diagnostics.

No future build number is assigned by this requirement.

W002-WL-001.1

A Brand Manifest may change logos.

DEFERRED
W002-WL-001.2

A Brand Manifest may change colors.

DEFERRED
W002-WL-001.3

A Brand Manifest may change typography choices.

DEFERRED
W002-WL-001.4

A Brand Manifest may change product/company labels.

DEFERRED
W002-WL-001.5

A Brand Manifest may change approved presentation tokens.

DEFERRED
W002-WL-001.6

A Brand Manifest must not change Work Order semantics.

DEFERRED
W002-WL-001.7

A Brand Manifest must not change analytical operations.

DEFERRED
W002-WL-001.8

A Brand Manifest must not change encoding rules.

DEFERRED
W002-WL-001.9

A Brand Manifest must not change parser behavior.

DEFERRED
W002-WL-001.10

A Brand Manifest must not change storage semantics.

DEFERRED
W002-WL-001.11

A Brand Manifest must not change diagnostic identity.

DEFERRED
W002-WL-001.12

A Brand Manifest must not change severity or refusal behavior.

DEFERRED
W002-WL-001.13

A Brand Manifest must not change evidence.

DEFERRED
W002-WL-001.14

A Brand Manifest must not change row counts, values, hashes, or other analytical results.

DEFERRED
W002-WL-002

Future commercial path, not prototype scope

DEFERRED

The Brand Manifest architecture must permit future paid or white-label Data Sculptor distributions without requiring a fork of the analytical engine.

W002-WL-002.1

Commercial packaging is outside WASM-002 prototype scope unless separately added to the frozen PRD.

DEFERRED
W002-WL-002.2

Licensing is outside WASM-002 prototype scope unless separately added to the frozen PRD.

DEFERRED
W002-WL-002.3

Customer administration is outside WASM-002 prototype scope unless separately added to the frozen PRD.

DEFERRED
W002-WL-002.4

Entitlement is outside WASM-002 prototype scope unless separately added to the frozen PRD.

DEFERRED
W002-WL-002.5

Remote brand delivery is outside WASM-002 prototype scope unless separately added to the frozen PRD.

DEFERRED
W002-WL-002.6

Customer-specific support services and configurable-brand substitution proof are deferred

DEFERRED

Customer-specific support services are POST-V1. A future configurable-brand build may prove that presentation can change through governed brand data while analytical behavior remains unchanged; WASM-002 has no such acceptance obligation.

7. Minimum WASM-002 Acceptance Slice for These Surfaces

W002-ENC-ACC-001

UTF-8 certification pass

UNDER REVIEW

A valid multi-gigabyte UTF-8 fixture must complete whole-source certification with exact byte accounting under bounded memory.

W002-ENC-ACC-002

UTF-8 certification fail

UNDER REVIEW

A fixture containing an invalid UTF-8 sequence, including a sequence that crosses an input-window boundary, must fail deterministically and must not begin analytical materialization.

W002-ENC-ACC-003

Run-local source substitution refusal

UNDER REVIEW

An acceptance fixture must attempt to present Stage 2 with a different source instance/reference than the one retained from Stage 1. The run must refuse before materialization rather than accept the substitute merely because filename, alias, path, or byte length appears compatible.

W002-ENC-ACC-004

ASCII-only fast path

UNDER REVIEW

An all-ASCII fixture must certify successfully without invoking non-ASCII sequence validation and must produce exact byte accounting.

W002-ENC-ACC-005

Valid non-ASCII sequence matrix

UNDER REVIEW

Acceptance must cover valid two-byte, three-byte, and four-byte UTF-8 sequences, including sequences placed at window boundaries and split at every legal boundary position.

W002-ENC-ACC-006

Strict invalid-sequence matrix

UNDER REVIEW

Acceptance must reject at known exact offsets: lone continuation bytes, truncated sequences, overlong encodings, UTF-16 surrogate encodings, invalid lead bytes 0xC0/0xC1, values introduced by 0xF5-0xFF, and code points above U+10FFFF.

W002-ENC-ACC-007

Late invalidity

UNDER REVIEW

A source that is ASCII/valid UTF-8 until near EOF and becomes invalid late in the file must fail at the first invalid absolute offset; bounded-prefix success must not be treated as whole-file certification.

W002-ENC-ACC-008

Window-size invariance

UNDER REVIEW

The same fixture matrix must return the same PASS/FAIL and first invalid absolute offset across at least two materially different bounded window sizes.

W002-ENC-ACC-009

EOF pending-state refusal

UNDER REVIEW

EOF with an incomplete UTF-8 sequence must fail deterministically and report the governed offset; no replacement character may be inserted.

W002-ENC-ACC-010

BOM behavior

UNDER REVIEW

A UTF-8 BOM at offset zero must be accepted as metadata while the remainder of the source is still fully certified; a BOM must not mask later invalid UTF-8.

W002-MAT-ACC-001

Multi-column one-pass Stage 2 materialization

UNDER REVIEW

Using a valid UTF-8 source and a Work Order requesting at least four source columns through a mixture of HEADER and COLUMN selectors, acceptance must prove that Stage 1 completes first, Stage 2 restarts at byte zero of the same run-local source instance, parses the header once, resolves all selectors before the first data row, and reads the source data records only once while producing all requested columns.

Evidence must reconcile total source bytes read by Stage 2, logical data-row count N, per-COL data-record count N, selector-to-source ordinal/header resolution, resolved KEEP order, and the resulting successor MAP. A one-column rerun of the same source/column must produce the same canonical physical column bytes as that column produced inside the multi-column run, apart from governed artifact identity.

W002-MAT-ACC-002

Automatic Store MAP creation, inheritance, and rematerialization continuity

UNDER REVIEW

An acceptance fixture must materialize four previously unseen source columns in one Store-establishing Work Order and prove that one successor Store MAP is created with four mapping rows. Every row must repeat identical Store-level fields, bind the newly created RID filename, default store_alias to the exact Store-establishing source filename, default rid_alias to RID, and default each COL alias to its exact source header.

A later Work Order using the same exact SOURCE without explicitly naming a MAP must inherit that Store's unique newest valid MAP, preserve the Store/RID metadata and four prior mappings, add a fifth default COL alias, and publish one new complete Store MAP. A later rematerialization of one earlier logical column must preserve its inherited COL alias while updating its column_filename. An explicit older MAP selection must instead use that historical Store state. Equal-latest-timestamp ambiguity, malformed-newer-MAP fallback within the same Store lineage, no-eligible-Store creation, and multi-eligible-Store refusal must also be exercised.

W002-MAT-ACC-002.1

Exact nine-column Store MAP serialization acceptance

UNDER REVIEW

An acceptance fixture must validate the exact Store MAP header store_alias,store_source_filename,rid_filename,rid_alias,source_filename,source_column_number,source_header,alias,column_filename, UTF-8 without BOM, LF line endings, deterministic mapping-row order, standard governed CSV quoting, and byte-for-byte repetition of the first four Store-level fields on every mapping row.

The fixture must prove that a MAP with inconsistent repeated Store-level metadata, a missing or invalid RID filename, a duplicate logical source-column key, or a non-nine-column schema is ineligible for inheritance.

W002-MAT-ACC-002.2

Multiple Stores in one Suitcase remain distinct through RID-anchored MAP lineages

UNDER REVIEW

An acceptance fixture must establish at least two Stores from different source files in the same Suitcase. Their Store MAP lineages must contain different immutable rid_filename values, and automatic inheritance for each source must choose only that source's eligible Store lineage.

Changing a human-facing store_alias or rid_alias in a later governed MAP must not change the Store's rid_filename, RID bytes, or lineage identity.

W002-MAT-ACC-002.3

WKO MAP profile and alias-registry publication acceptance

UNDER REVIEW

An acceptance fixture must save at least three immutable WKO artifacts: one with a multi-word alias, one without a WORK ORDER AS clause, and one with an alias containing punctuation permitted by the governed string rules. The committed WKO MAP must have exactly the header wko_alias,wko_filename, UTF-8 without BOM, LF endings, one row per current WKO, deterministic filename ordering, correct governed CSV quoting, and exact physical WKO references.

The fixture must prove that a WKO MAP cannot be treated as a Store MAP; duplicate physical WKO rows are invalid; a duplicate non-empty WKO alias is refused before commit; and an equal-latest-timestamp WKO-MAP ambiguity refuses current-registry selection.

W002-MAT-ACC-002.4

WORK ORDER AS and # comment lexical acceptance

UNDER REVIEW

An acceptance fixture must prove that WORK ORDER AS "Prepare monthly crime data" is parsed as the immutable WKO alias, that whole-line and trailing # comments are ignored semantically, and that # inside double-quoted strings remains ordinary string content.

The fixture must also prove that saved WKO bytes preserve comments exactly, that changing only a comment or Work Order alias requires a new WKO physical identity, and that no standalone browser Description value is required to reopen or display the governed alias.

W002-MAT-ACC-003

Stage 2 structural window-invariance matrix

UNDER REVIEW

Acceptance fixtures must force input boundaries at structurally difficult positions including before/after delimiters, before/after opening and closing quotes, between doubled quote bytes, between CR and LF, inside quoted multiline field content, at empty fields, and inside already-certified multi-byte UTF-8 sequences.

Across permitted window sizes and boundary placements, the logical row count, selected values, canonical COL bytes, first refusal location/condition, and resolved mapping semantics must remain invariant.

W002-MAT-ACC-004

Canonical one-column COL serialization acceptance

UNDER REVIEW

Golden-byte fixtures must cover ordinary ASCII, non-ASCII UTF-8, commas, embedded double quotes, CR, LF, CRLF inside quoted values, explicit empty data values, empty source headers, and header-only zero-row input.

Acceptance must prove one UTF-8 BOM at file start, LF record termination independent of host platform, deterministic minimal quoting, doubled embedded quotes, "" for an empty one-column data value, no accidental inclusion of the source BOM in the first header, and byte-identical round-trip semantics through the Data Sculptor CSV reader.

W002-MAT-ACC-005

Field-limit, ragged-record, blank-record, and failure-publication acceptance

UNDER REVIEW

Acceptance must include decoded field sizes exactly 16 MiB and 16 MiB + 1 byte, malformed runaway quoted-field cases, nonblank records with too few and too many fields, a bare blank logical data record, explicit empty fields, and a physical blank line inside a valid quoted multiline field.

The first invalid case must refuse without truncation or silent repair.

Publication evidence must additionally exercise both a new-Store multi-column materialization and a later existing-Store materialization. For the new Store, RID and COL outputs must remain governed SCR until the complete candidate set validates; the RID must then promote first, requested COLs must promote in deterministic KEEP order, the successor MAP must be written/closed/reopened/validated while still SCR, and its final SCR-to-MAP rename must occur last. For the existing Store, the inherited RID must remain byte-for-byte and filename-identical with no new RID candidate.

Forced failure cases must cover: failure before any promotion; RID-promotion failure; failure during COL promotion after RID and at least one COL have promoted; MAP-candidate write/close/reopen/validation failure; MAP final-rename failure; and interruption after physical RID/COL promotion but before MAP commit. Each case must prove rollback where safely possible or attributable SCR/RCV recovery evidence otherwise, must prove that unreferenced final-class-looking RID/COL files are not treated as committed Store membership, and must prove that the prior valid MAP remains authoritative for an existing Store or that no committed Store exists for an uncommitted first materialization.

W002-MAT-ACC-006

Large-source browser materialization evidence

UNDER REVIEW

WASM-002 acceptance must include a browser run against the established Statistics Canada scale source or an equivalently retained scale fixture, recording source bytes, Stage 1 time, Stage 2 time, total time, selected-column count, logical row count, bytes written per COL, peak/bounded memory observations, output fingerprints, and browser/platform details.

The retained Day 039 evidence established that Microsoft Edge could stream the 7,250,808,204-byte source through a small Rust/WASM materializer and materialize 29,014,718 VALUE data rows in practical time. Revision AM treats that result as engineering evidence and a comparison baseline, not as proof that WASM-002 is already implemented or as a frozen wall-time threshold.

6A. Future Commercial White-Label Service -

Architecture Enablement This section records the intended future business/service direction that V1 must enable without implementing it. The hosted service is not part of the WASM-002 V1 delivery scope.

W002-WL-003

Open source and paid automation coexist

DEFERRED

Data Sculptor is intended to remain open source. A customer may perform permitted branding and building work manually under the governing license. Red5Sorcery may sell a hosted service that automates the same governed branding workflow. The customer pays for convenience, configuration, validation, generation, packaging, and delivery - not for permission to inspect the analytical source code.

W002-WL-003.1

License remains governing authority

DEFERRED

The exact open-source license and any trademark/brand-use rules must be frozen separately. The hosted service must describe customer rights consistently with that governing license and must not imply proprietary rights that the license does not create.

W002-WL-004

Hosted WASM configurator

DEFERRED

The intended future Red5Sorcery service is a browser/WASM application through which a customer can configure organization-specific Data Sculptor branding using the same canonical Brand Manifest architecture defined for the product.

W002-WL-004.1

Governed customer choices

DEFERRED

The configurator may expose approved brand inputs such as organization/product labels, logos, color tokens, typography choices, and other presentation tokens supported by the Brand Manifest. It must not expose controls that alter analytical semantics, parser behavior, encoding rules, storage semantics, diagnostic truth, or evidence.

W002-WL-004.2

Preview actual product surfaces

DEFERRED

Where practical, the configurator should preview the application shell and representative governed artifacts such as Help, PRETTY Tables, receipts, Store Index pages, and DS-VERIFY reports using the same Brand Manifest interpretation that the generated edition will consume.

W002-WL-004.3

Current payment intent - Stripe

DEFERRED

The current commercial intent is to use Stripe for payment before the customer receives the generated edition. Payment security, webhook/confirmation mechanics, tax handling, customer records, refunds, and operational controls belong to a future hosted-service PRD rather than this WASM-002 V1 specification.

W002-WL-004.4

Analytical data is not part of the transaction

DEFERRED

The hosted branding/payment workflow must not require customers to upload analytical source datasets merely to customize or purchase a branded edition. Brand assets and commercial transaction data are a distinct service concern from Data Sculptor analytical data.

Customer path

CUSTOMIZE -> PREVIEW -> PAY -> GENERATE -> DOWNLOAD SOURCE -> SELF-HOST

The future service should make the easy path obvious while preserving the same architecture available to a technically capable customer who chooses to do the work manually.

6A. Future Commercial White-Label Service

(continued - generated source distribution and self-hosting)

W002-WL-005

Complete branded source delivery

DEFERRED

After successful purchase, the service must be capable of delivering a complete branded source distribution rather than only a proprietary hosted skin or opaque binary. The exact delivery format belongs to the future service PRD, but the architecture must support independent customer custody.

W002-WL-005.1

Source tree

DEFERRED

The delivery must include the complete applicable source tree for the generated branded edition.

W002-WL-005.2

Brand definition

DEFERRED

The delivery must include the canonical Brand Manifest and the approved customer-supplied or generated brand assets needed to reproduce the edition.

W002-WL-005.3

Build instructions

DEFERRED

The delivery must include instructions sufficient for a technically competent customer to rebuild the edition from source using the supported toolchain.

W002-WL-005.4

Hosting instructions

DEFERRED

The delivery must include clear instructions for hosting the generated browser/WASM application on customer-selected static or otherwise supported infrastructure.

W002-WL-005.5

Provenance

DEFERRED

The delivery must identify the upstream Data Sculptor release/source revision used, the Brand Manifest version/fingerprint, and other governed build provenance needed to understand what was generated.

W002-WL-005.6

License and notices

DEFERRED

The delivery must carry the applicable open-source license, notices, attribution, and any other files required by the selected license or incorporated components.

W002-WL-005.7

Optional ready-to-host build

DEFERRED

The service may also include validated ready-to-host static WASM/web artifacts as a convenience, but those artifacts must not substitute for the promised source distribution.

W002-WL-006

No continuing proprietary runtime dependency

DEFERRED

A generated branded edition must be able to continue operating after download without requiring an active Red5Sorcery subscription, branding API, or payment-service connection merely to preserve its organization-specific branding or execute the analytical core.

W002-WL-006.1

Customer control after delivery

DEFERRED

Subject to the governing open-source license and any separately governed trademark rules, the customer must be able to host, rebuild, maintain, and further modify its delivered source without using the hosted configurator again.

W002-WL-007

Future-build white-label enablement test

DEFERRED

A future configurable-brand build must keep brand presentation sufficiently separated from the Rust analytical core that a materially different branded edition can be created by changing governed brand/configuration assets and build metadata rather than modifying analytical semantics.

Commercial principle: Do it yourself under the open-source license, or pay Red5Sorcery to build and package the edition for you. Either way, the finished analytical edition must remain explainable and independently hostable.

The build number for this capability is deliberately not assigned here.

W002-CONV-ACC-001

Separate Windows-1252 conversion

UNDER REVIEW

A non-UTF-8 fixture compatible with the supported Windows-1252 converter must cause the analytical task to stop, permit a Help suggestion, and succeed only when the separate conversion Work Order is explicitly run.

W002-CONV-ACC-002

Undefined Windows-1252 byte refusal

UNDER REVIEW

A fixture containing a byte undefined by the frozen Windows-1252 mapping must not be silently converted.

W002-HP-ACC-001

Canonical diagnostic event

UNDER REVIEW

At least one real governed WASM-002 failure path must emit a canonical diagnostic event with stable code and structured facts.

W002-HP-ACC-002

Three-voice rendering parity

UNDER REVIEW

That same event must be renderable in all three established Help voices. Automated checks must demonstrate invariant diagnostic truth across the three outputs.

W002-HP-ACC-003

Saved branded HTML Help report

UNDER REVIEW

At least one complete branded HTML Help report must be generated and saved locally from that real event.

W002-HP-ACC-004

Offline durability

UNDER REVIEW

The saved HTML report must remain readable with its canonical built-in Red5Sorcery/Data Sculptor presentation when opened without network access and without access to Data Sculptor or any external presentation resource.

W002-HP-ACC-005

Brand provenance

DEFERRED

The generated report must carry Brand Manifest provenance sufficient to identify the brand definition used to produce it.

W002-HP-ACC-006

Presentation-only brand substitution

DEFERRED

Using a second test Brand Manifest must visibly change approved presentation elements while leaving the canonical diagnostic event and governed behavior unchanged.

W002-HP-ACC-007

Invalid Brand Manifest refusal

DEFERRED

An invalid Brand Manifest must fail deterministically without silently substituting ungoverned branding.

W002-HP-ACC-008

Support-handoff report acceptance

UNDER REVIEW

From a real governed refusal, Data Sculptor must generate one styled HTML Help Report that opens in an ordinary browser without Data Sculptor or network access and contains both a selected-voice explanation and the canonical structured facts needed by a technical reviewer.

W002-HP-ACC-009

Canonical boundary-fact acceptance

UNDER REVIEW

An early-refusal fixture that stops before analytical materialization must demonstrate the exact four Boolean fact names from W002-HELP-004.11 and, when those are the true governed facts, values equivalent to:

source_modified_by_data_sculptor = false
materialization_started = false
analytical_outputs_published = false
store_state_committed = false

Acceptance must also prove that the renderer does not coerce an unavailable/missing boundary fact to false, and that temporary SCR candidates or uncommitted debris do not make analytical_outputs_published true.

W002-HP-ACC-010

HLP provenance payload and no-automatic-hash acceptance

UNDER REVIEW

Acceptance evidence must generate a final HLP using the built-in Red5Sorcery/Data Sculptor presentation and verify its governed __DS__HLP__YYYYMMDDTHHMMSSmmmZ__<uuid-v4>.html identity, its visible Provenance section, and exactly one embedded application/json payload with element ID ds-hlp-provenance.

The embedded payload must contain exactly the schema-version-1 fields governed by W002-HELP-009 and must verify the same HLP filename/generation UTC, diagnostic ID, WKO/RCP lineage where applicable, selected Help voice, built-in presentation identifier red5sorcery-data-sculptor, built-in presentation version "1", and Data Sculptor build. When WKO or RCP lineage does not apply, the JSON value must be null and the visible report must state NOT APPLICABLE.

Acceptance must prove that the visible Provenance section and machine-readable payload agree; missing, duplicate, malformed, mismatched, non-HTML-safe, or disclosure-violating provenance must not be accepted. The same acceptance must prove that ordinary HLP generation does not compute or embed an HLP SHA-256 and does not create, refresh, or verify an LCK. Exact-byte HLP integrity is exercised only by the later explicit FINGERPRINT/LCK workflow outside WASM-002.

W002-HP-ACC-011

Fixed support-handoff disclosure acceptance

UNDER REVIEW

An acceptance fixture must generate an HLP whose diagnostic requires a source filename, one relevant column, bounded execution evidence, and a small executable Work Order excerpt. The report must include those permitted facts while excluding source rows/values, absolute local paths, unrelated columns, the complete Work Order, Work Order comments, unrelated Suitcase contents, and raw ungoverned stack traces.

The fixture must verify the visible Disclosure section contains the frozen NO/RELEVANT-EXECUTABLE-CLAUSES declarations from W002-HELP-010. WASM-002 must expose no control that changes this fixed disclosure policy.

W002-HP-ACC-012

Cross-session source-continuity Help acceptance

UNDER REVIEW

An acceptance fixture must present Help with a suspected cross-session source-change scenario and verify that the explanation asks whether the source may have been edited/replaced/sorted/re-exported/synchronized, distinguishes no evidence from INVENTORY metadata evidence and stronger explicit fingerprint evidence, and never claims that unchanged filename or unchanged INVENTORY metadata proves byte identity.

A no-evidence fixture must state that continuity cannot be independently verified. An INVENTORY fixture with changed source byte length or last-modified metadata must describe the difference as evidence that the source may have changed, not as a cryptographic conclusion. The fixture must also confirm that ordinary WASM-002 materialization did not automatically hash the source as part of this edge-case protection.

W002-HP-ACC-013

Diagnostic-registry and Help cross-validation acceptance

UNDER REVIEW

WASM-002 acceptance must retain the validated diagnostics.json used by the accepted build and verify its exact version-1 schema, canonical sort order, unique permanent IDs, fixed-token grammars, and disjoint required/optional fact declarations.

At least one real governed diagnostic fixture must prove that the emitted semantic core matches the matching registry entry and that all required facts are present while no undeclared fact key is emitted. Negative build-validation fixtures must prove deterministic failure for malformed/duplicate registry entries, an engine diagnostic definition absent from the registry, fixed semantic disagreement, a missing required fact, an undeclared emitted fact, a Help-catalog diagnostic ID absent from the registry, and a Help placeholder not declared for its matching diagnostic.

Work Order Composition — Deferred Beyond WASM-002

Reusable composition remains part of the Data Sculptor direction, but WASM-002 deliberately proves one saved immutable Work Order as one top-level executable request. A WASM-002 WKO must not invoke another WKO. The earlier nested-composition design is retained below as V1-BACKLOG material so future work can resume without losing the decisions already explored.

WASM-002 scope cut. RUN, nested Work Order expansion, cycle handling, child-refusal propagation, and invocation-chain provenance are deferred. If composition syntax appears in a WASM-002 Work Order, validation refuses before governed execution and Help explains that Work Order composition is not available in this build.
W002-WKO-001

Saved Work Orders may invoke other saved Work Orders

DEFERRED

A saved immutable Work Order may contain governed instructions that invoke one or more other saved immutable Work Orders. An invoked Work Order may itself invoke further saved Work Orders. This capability is deterministic Work Order composition/orchestration and must not introduce arbitrary executable code, hidden scripting semantics, or a second execution engine.

W002-WKO-002

Named Work Order references resolve through the governed WKO MAP to exact immutable WKO artifacts

DEFERRED

A human-facing Work Order alias used by a future invocation must resolve deterministically through the current valid WKO MAP to exactly one saved immutable WKO artifact before that target may execute. A transient draft is never a valid invocation target. A missing alias, blank alias, ambiguous registry state, missing physical WKO, or otherwise unsafe resolution must refuse rather than guess.

The descriptive alias never becomes execution identity merely because it is visible; successful resolution binds the invocation to the exact immutable wko_filename. Revision BB establishes the alias declaration and WKO-MAP registry in WASM-002, but the actual Work Order invocation/orchestration grammar remains deferred under this V1-BACKLOG requirement.

W002-WKO-003

Invocation order and nested expansion are deterministic

DEFERRED

When a Work Order invokes multiple saved Work Orders, Data Sculptor must execute them in the explicit governed order stated by the caller. A nested Work Order invocation executes at its governed call position before execution returns to the caller's next instruction. Identical saved Work Orders, name-resolution state, inputs, and settings must therefore produce the same invocation order.

W002-WKO-004

Recursive Work Order cycles are refused

DEFERRED

Data Sculptor must detect and refuse a reachable Work Order invocation cycle, including direct self-invocation and indirect cycles such as A → B → A. The engine must not recurse indefinitely or silently truncate the cycle. Any maximum nesting depth, total invocation count, or related resource bound beyond cycle prevention remains an explicit freeze item and must be governed rather than implicit.

W002-WKO-005

Invoked Work Order refusal is visible and stops the composed run by default

DEFERRED

If an invoked Work Order refuses or fails under governed execution, the calling composed run must not silently skip that failure and continue as though the child succeeded. The refusal must remain visible through canonical diagnostics and Execution Output, and later caller instructions must not execute unless a future explicit, separately frozen error-handling construct defines otherwise.

W002-WKO-006

Receipts preserve the exact physical Work Order invocation chain

DEFERRED

The governed execution record must identify the root saved Work Order and every invoked saved Work Order by exact physical WKO identity, not only by the human-facing name used at call time. The record must preserve enough information to reconstruct name resolution, parent/child relationship, deterministic invocation order, and outcome for each Work Order in the composed run. Human-facing names may aid orientation but do not replace immutable execution identity or required integrity evidence.

W002-WKO-007

Work Order syntax is the analytical contract

UNDER REVIEW

If a value, reference, option, or instruction changes what Data Sculptor analytically does, that intent must be represented in the governed Work Order text or in a separately governed artifact explicitly referenced by the Work Order. Browser permission, directory selection, UI focus, a highlighted file, an alias display, or another GUI gesture must not silently become analytical intent.

The browser may authorize resources, edit text, validate, save, run, display evidence, and provide Help. Authorization to access a resource is not authorization to use that resource analytically.

W002-WKO-008

Every executable Work Order explicitly declares its Suitcase

UNDER REVIEW

For WASM-002, every executable saved Work Order must contain the exact portable declaration SUITCASE: .. The dot means the filesystem directory that physically contains the saved WKO artifact being executed. A Work Order lacking this declaration must not be treated as an executable WASM-002 Work Order.

The declaration is analytical/execution syntax, not a substitute for browser filesystem permission. The host must still possess valid access to the directory before execution can proceed.

W002-WKO-009

Ordinary Work Order file references are Suitcase-relative

UNDER REVIEW

Unless another numbered requirement explicitly governs a different reference mechanism, file references in an executable WASM-002 Work Order resolve relative to the declared Suitcase. A portable Work Order must not depend on an absolute machine-specific path to identify ordinary Suitcase files.

Resolution must be deterministic in browser and later native hosts. Moving an intact Suitcase to another permitted filesystem location must not change the logical meaning of the Work Order solely because the parent machine path changed.

W002-WKO-010

WIP and WKO are distinct Work Order lifecycle states

UNDER REVIEW

WIP is the editable, non-executable Work Order state. WKO is the saved, validated, immutable Work Order artifact that may become a Run target. Validation establishes that a Work Order is structurally eligible to run; it does not guarantee that runtime conditions will succeed.

Loading a WKO for inspection does not make it mutable. If its instruction text is changed, the editor must treat the edited text as a new WIP derived from the original WKO. The original WKO bytes and physical identity remain unchanged, and the derived WIP cannot Run until saved as a new WKO.

W002-WKO-011

Saved Work Order composition uses the governed RUN operation

DEFERRED

Invocation of another saved immutable Work Order is expressed through the governed RUN operation. RUN is orchestration inside the Work Order language; it is not arbitrary scripting, shell execution, or a second execution engine.

The exact punctuation and argument grammar following the RUN keyword remain a bounded syntax freeze item. Whatever syntax is selected must preserve the already-governed rules for exact immutable target resolution, deterministic nested order, cycle refusal, child-refusal propagation, and receipt provenance.

W002-WKO-013

WASM-002 executes one saved Work Order without Work Order chaining

UNDER REVIEW

For WASM-002, one saved immutable WKO is one top-level executable request. It must not invoke, include, chain, or execute another WKO. The governed RUN composition operation and equivalent nested-orchestration constructs are not executable in WASM-002.

If a saved WKO contains composition syntax, validation must refuse before analytical execution begins. The canonical diagnostic and Help path must explain that Work Order composition is deferred rather than treating the syntax as arbitrary text, silently ignoring it, or partially executing surrounding instructions.

This scope cut does not prohibit one Work Order from selecting and materializing multiple columns in the single Stage 2 operation defined by WASM-002.

W002-WKO-012

Materialization COL alias assignment uses AS; standalone alias maintenance uses UPDATE ALIASES

UNDER REVIEW

Within the WASM-002 DS-STEPS materialization form, an analyst assigns or changes the alias of a selected materialized COL with the optional same-line clause AS "alias" under W002-STEPS-005. This syntax is part of the governed Work Order and is not a GUI gesture. A single KEEP block may therefore assign aliases to multiple selected columns in one governed materialization.

Automatic source-header COL aliases and inherited rematerialization aliases are resolved first; explicit AS clauses then determine requested successor COL aliases before complete Store-MAP validation and publication.

Revision BD freezes alias-only creation/replacement with UPDATE ALIASES and explicit historical Store-MAP selection with MAP "<exact Store MAP filename>". Revision BE completes the bounded alias lifecycle with explicit CLEAR ... ALIAS and RESET ... ALIAS forms under W002-WKO-012.5 through W002-WKO-012.6. Empty-string AS "" is not the clearing syntax.

W002-WKO-012.1

Canonical standalone alias-maintenance Work Order uses UPDATE ALIASES

UNDER REVIEW

The canonical alias-only Store metadata form is:

SUITCASE: .
WORK ORDER AS "Rename crime store"
SOURCE "35100178.csv"
STORE AS "Crime Statistics"
UPDATE ALIASES

UPDATE ALIASES is the explicit commitment verb for an alias-only Work Order. The Work Order must identify exactly one Store-state base using either SOURCE "..." for ordinary Store-aware current-state selection or MAP "..." for exact Store-MAP selection. At least one supported alias mutation clause must appear before UPDATE ALIASES.

An alias-only Work Order must not contain KEEP, MATERIALIZE, RECOVER RID, INVENTORY, conversion, Work Order composition, or another analytical commitment verb. Alias maintenance changes governed human-facing metadata only.

W002-WKO-012.2

STORE AS, RID AS, and COL ... AS are the canonical alias-replacement clauses

UNDER REVIEW

Within an alias-only UPDATE ALIASES Work Order, the canonical mutation clauses are:

STORE AS "Crime Statistics"
RID AS "Row Number"
COL "Crime Rate" AS "Police-Reported Crime Rate"

STORE AS "..." replaces the selected Store snapshot's store_alias. RID AS "..." replaces its rid_alias. COL "<reference>" AS "..." replaces the alias of exactly one existing mapped COL.

The COL reference resolves under W002-STOR-021: it may be the exact physical column_filename or one unique current COL alias from the selected Store MAP. Missing, ambiguous, non-COL, or conflicting resolution must refuse rather than guess. One Work Order may update the Store alias, RID alias, and multiple distinct COL aliases together, provided the complete successor state satisfies all existing alias uniqueness/shadowing rules.

W002-WKO-012.3

MAP "<filename>" is the exact historical Store-MAP selector

UNDER REVIEW

The canonical explicit Store-MAP selection clause is:

MAP "__DS__MAP__20260920T184512347Z__<uuid-v4>.csv"

The value is always the exact physical filename of one valid immutable Store MAP. It is not a Store alias, WKO alias, timestamp shorthand, UUID-only selector, or "latest" expression. When present, it overrides automatic Store-MAP inheritance for that governed run and binds the run to exactly the named Store snapshot.

For alias-only maintenance, the Work Order uses either SOURCE "..." or MAP "..." as its Store-state selector, not both. For materialization, SOURCE "..." remains mandatory and an optional MAP "..." supplies the exact historical/current Store-state base. Validation must refuse an incompatible source/MAP pairing or a MAP that is not a valid Store-MAP profile.

W002-WKO-012.4

Alias-only execution publishes one complete successor Store MAP and no rewritten data artifacts

UNDER REVIEW

A successful UPDATE ALIASES operation begins from the selected complete Store MAP, applies only the requested alias replacements in memory, validates the complete resulting Store state, writes the successor MAP under governed SCR, closes and reopens it, validates it fully, and promotes it to a new immutable MAP last. That successful promotion is the alias-update commit point.

The operation must preserve the selected Store's physical RID and COL filenames and bytes, source-column keys, row order, cardinality, and lineage except for the human-facing alias fields explicitly changed by the Work Order. It must not reread source data rows merely to change aliases, must not create RID/COL artifacts, and must not rewrite or delete the inherited MAP. The prior MAP remains visible historical state.

If validation or MAP publication fails, no successor alias state becomes current. The failure is reported through the governed diagnostic/Help path and any incomplete candidate remains subject to the existing SCR/RCV recovery rules.

W002-WKO-ACC-007

Standalone Store/RID/COL alias maintenance acceptance

UNDER REVIEW

Acceptance must establish a Store with one RID and at least three materialized COLs, then execute an alias-only Work Order that changes the Store alias, RID alias, and at least two COL aliases in one UPDATE ALIASES operation. One COL must be targeted by its unique current alias and another by its exact physical COL filename.

The fixture must prove that exactly one complete successor Store MAP becomes current; prior MAP, RID, and COL artifacts remain byte-for-byte unchanged; no source-data row read is required; no new RID/COL artifact is published; and the successor MAP contains exactly the requested aliases while preserving all physical bindings and logical source-column keys. Missing/ambiguous COL references and successor alias collisions must refuse without publishing a successor MAP.

W002-WKO-ACC-008

Explicit historical Store-MAP selection acceptance

UNDER REVIEW

Acceptance must create at least two valid Store MAP snapshots for one Store, then prove that a Work Order containing MAP "<older exact Store MAP filename>" binds to that exact older snapshot even though a newer valid MAP exists.

An alias-only fixture must publish its successor from the explicitly named older base rather than from the newer automatic current state. A materialization fixture must retain mandatory SOURCE "..." while using the explicit MAP as its Store-state base. The tests must also prove refusal for a missing MAP, malformed MAP, WKO-MAP profile supplied as Store MAP, and source/MAP incompatibility. No implementation may substitute the newest MAP after an explicit MAP clause has validated.

W002-WKO-012.5

CLEAR ... ALIAS deliberately removes a human-facing alias

UNDER REVIEW

Within an alias-only UPDATE ALIASES Work Order, the canonical clearing forms are:

CLEAR STORE ALIAS
CLEAR RID ALIAS
CLEAR COL "<reference>" ALIAS

CLEAR deliberately stores the empty string in the corresponding alias field of the successor Store MAP. It does not restore a default alias. An empty-string replacement such as STORE AS "", RID AS "", or COL "..." AS "" is not the canonical clearing form and must be rejected by the bounded WASM-002 grammar.

For CLEAR COL, <reference> resolves against the selected pre-mutation Store MAP by exact physical column_filename or one unique current COL alias under W002-STOR-021. All COL references in one UPDATE ALIASES Work Order are resolved before any mutation is applied so clause order cannot change target identity. Missing, ambiguous, duplicate-target, or non-COL references must refuse. Clearing an alias never renames, rewrites, or deletes the underlying RID/COL artifact and never changes physical identity.

W002-WKO-012.6

RESET ... ALIAS restores the deterministic default alias

UNDER REVIEW

Within an alias-only UPDATE ALIASES Work Order, the canonical reset forms are:

RESET STORE ALIAS
RESET RID ALIAS
RESET COL "<reference>" ALIAS

RESET STORE ALIAS restores the exact store_source_filename. RESET RID ALIAS restores the literal RID. RESET COL "<reference>" ALIAS restores that mapped COL's exact recorded source_header. RESET is therefore distinct from CLEAR.

The restored value must pass the same governed alias validity, uniqueness, and shadowing rules as any explicit alias. If a COL's recorded source_header is empty or the deterministic default would conflict in the complete successor Store MAP, RESET must refuse rather than invent a suffix, alternate spelling, or substitute. AS, CLEAR, and RESET mutations may coexist in one Work Order when they target distinct alias fields; duplicate mutation of the same alias field in one Work Order must refuse. A successful operation publishes exactly one complete successor Store MAP under the existing UPDATE ALIASES commit contract.

WASM-002 DS-STEPS Materialization Grammar

W002-STEPS-001

Canonical WASM-002 DS-STEPS materialization form

UNDER REVIEW

The canonical WASM-002 materialization Work Order form is:

# Optional human comment
SUITCASE: .
WORK ORDER AS "Prepare monthly crime data"
SOURCE "crime.csv"

KEEP
  HEADER "REF_DATE" AS "Year"      # reporting year
  HEADER "GEO"
  COLUMN 7 AS "Crime Rate"

MATERIALIZE

SUITCASE: . is governed by W002-WKO-008. WORK ORDER AS "..." is the optional immutable human-facing WKO alias governed by W002-STEPS-001.1. SOURCE "..." names the Suitcase-relative source. KEEP introduces one or more column selectors. Each selector is either HEADER "..." or COLUMN n and may optionally end with AS "...". MATERIALIZE is the explicit commitment verb.

# comments are governed by W002-STEPS-001.2. No RID/row-index clause appears in the Work Order. If this materialization establishes a new Store, the engine automatically generates exactly one RID artifact under W002-RID-002 and W002-RID-008. If it extends an existing Store, the existing RID is reused.

This requirement freezes the keyword structure and selector forms shown above. Other complete-language lexical features remain outside this bounded syntax freeze unless separately specified.

W002-STEPS-001.1

WORK ORDER AS declares the immutable human-facing Work Order alias

UNDER REVIEW

An executable or saved WASM-002 Work Order may contain at most one optional top-level clause:

WORK ORDER AS "<alias>"

In the canonical form it appears after SUITCASE: . and before SOURCE. The quoted alias may contain spaces and ordinary UTF-8 phrase text. If the clause is present, the decoded alias must not be empty. It affects display and governed alias resolution only; it does not replace the WKO filename/UUID as physical execution identity.

The alias is stored in the immutable WKO bytes and is published into the current WKO MAP when the WKO save transaction commits. Changing the alias therefore requires saving a new WKO.

W002-STEPS-001.2

# introduces a DS-STEPS line comment outside double-quoted strings

UNDER REVIEW

Outside a double-quoted string, the first # on a line begins a comment that continues through the line's LF terminator. Whole-line comments and trailing comments are permitted. Comment text has no execution semantics and is ignored by the DS-STEPS parser after lexical recognition.

A # inside a double-quoted string is ordinary string content and does not begin a comment; for example WORK ORDER AS "Analysis #3" and HEADER "CATEGORY #" preserve the hash character. WASM-002 defines no block-comment syntax.

Comments are preserved byte-for-byte in the saved immutable WKO TXT. Editing, adding, or removing a comment changes the WKO bytes and therefore requires saving a new WKO artifact even though analytical semantics may remain unchanged.

W002-STEPS-002

HEADER selects by exact decoded source-header value

UNDER REVIEW

HEADER "name" resolves against the exact decoded header values established for the certified source. A selector that matches no source header must refuse. If the same header text occurs in more than one source column, the header selector is ambiguous and must refuse rather than choose by position, discovery order, or another heuristic.

An analyst can disambiguate duplicate header text with the 1-based COLUMN n selector.

W002-STEPS-003

COLUMN selects by 1-based source ordinal

UNDER REVIEW

COLUMN n identifies the source column by 1-based ordinal position. COLUMN 1 is the first source column. Zero, negative values, non-integers, and ordinals greater than the source width must refuse.

Ordinal selection does not suppress source metadata: Data Sculptor must still resolve and record the selected column's actual decoded source header in the successor MAP.

W002-STEPS-004

HEADER and COLUMN selectors may be mixed but may not select one source column twice

UNDER REVIEW

One KEEP block may contain any supported mixture of HEADER and COLUMN selectors. Selector order expresses the analyst's requested selection order for the governed operation.

After resolution, two or more selectors that identify the same physical source column constitute a duplicate selection and must refuse before materialization. Data Sculptor must not materialize the same source column twice merely because it was named once by header and once by ordinal.

W002-STEPS-005

AS assigns the resulting materialized-column alias

UNDER REVIEW

The optional clause AS "alias" belongs to the immediately preceding HEADER or COLUMN selector and expresses an intentional human-facing alias assignment in the governed Work Order.

For a logical source column not present in the inherited MAP, omission of AS uses the exact source header as the default alias. For a logical source column already present in the inherited MAP, omission of AS preserves the inherited alias. An explicit AS overrides either default for the successor MAP.

W002-STEPS-006

The complete successor MAP must contain unique aliases

UNDER REVIEW

After inheritance, selector resolution, default-alias application, rematerialization continuity, and all explicit AS clauses are applied, every alias in the complete successor MAP must identify exactly one logical materialized column.

If two different logical columns would have the same alias, including a collision with an inherited mapping, validation must refuse unless the Work Order has explicitly resolved the conflict through supported governed syntax. Data Sculptor must not invent suffixes such as Year_2, use last-write-wins behavior, or silently shadow an existing alias.

W002-STEPS-007

MATERIALIZE commits the resolved KEEP set to the governed structural pass

UNDER REVIEW

MATERIALIZE is the explicit commitment verb for this WASM-002 DS-STEPS form. The KEEP selectors express which source columns belong in the operation; they do not themselves authorize data-row materialization.

Before the bounded structural pass begins, the source, all selectors, actual source ordinals/headers, requested aliases, inherited alias state, and resulting alias uniqueness must be resolved and validated. Successful multi-column execution then follows the one-pass materialization contract.

W002-STEPS-008

The Store MAP records resolved truth rather than selector spelling

UNDER REVIEW

The successor Store MAP must record the fully resolved materialization result using the frozen nine-column schema store_alias,store_source_filename,rid_filename,rid_alias,source_filename,source_column_number,source_header,alias,column_filename, regardless of whether the analyst selected a column with HEADER or COLUMN.

For example, COLUMN 7 AS "Crime Rate" records the Store-level metadata, source ordinal 7, the actual decoded header found at column 7, alias Crime Rate, and the newly generated physical COL filename. DS-STEPS expresses intent; the Store MAP persists the resolved durable mapping truth.

W002-STEPS-009

DS-STEPS materialization syntax acceptance

UNDER REVIEW

Acceptance must cover: one column selected by exact header; one column selected by 1-based ordinal; mixed header/ordinal selectors in one KEEP block; multiple columns materialized in one governed structural pass; AS alias assignment; default header aliasing; inherited-alias preservation on rematerialization; explicit alias replacement on rematerialization; duplicate-header ambiguity refusal; invalid ordinal refusal; duplicate resolved-column refusal; and duplicate successor-alias refusal.

Acceptance must also prove that the generated successor MAP records the same resolved source filename, source ordinal, actual source header, resulting alias, and physical COL identity whether a column was selected by header or by ordinal.

For a new Store, both the single-column and multi-column materialization fixtures must contain no RID/row-index instruction yet must automatically publish exactly one RID artifact. For a later permitted same-Store materialization, the fixture must likewise contain no RID instruction and must reuse the original RID without publishing another.

W002-STEPS-010

Canonical DS-STEPS RID recovery form uses RECOVER RID FOR STORE

UNDER REVIEW

The canonical WASM-002 RID-recovery Work Order form is:

SUITCASE: .
RECOVER RID FOR STORE "Sales"

RECOVER is the explicit governed recovery verb. RID identifies the physical Store row spine being reconstructed. FOR STORE "..." supplies the exact human-facing Store alias to resolve. The Store alias is a selector, not physical identity and not a filename.

Resolution must identify exactly one recoverable Store/recovery-base MAP under W002-RID-009. Missing or ambiguous Store alias resolution must refuse rather than guess. This bounded WASM-002 form operates on the current degraded Store state only; it does not add historical-MAP recovery syntax. The operation contains no SOURCE, KEEP, or MATERIALIZE clause because it reconstructs the existing canonical RID axis from surviving governed Store evidence rather than creating or rematerializing analytical columns.

Composable Work Order Acceptance Gates

W002-WKO-ACC-001

Nested saved-Work-Order composition acceptance

DEFERRED

An acceptance fixture must execute a saved root Work Order that invokes at least one named saved Work Order which itself invokes another saved Work Order. Evidence must show each human-facing reference resolving to one exact immutable WKO artifact, deterministic nested order, read-only Execution Output that makes the chain understandable, and a receipt/provenance record containing the exact physical Work Order identities that actually ran.

W002-WKO-ACC-002

Invocation-cycle refusal acceptance

DEFERRED

An acceptance fixture containing a reachable invocation cycle such as A → B → A must refuse deterministically rather than recurse or silently truncate the chain. The canonical diagnostic and Help path must identify the cycle sufficiently for the analyst to correct it, and no instructions positioned after the detected failing invocation may be presented as successfully executed.

W002-WKO-ACC-003

Suitcase-relative Work Order portability acceptance

UNDER REVIEW

An acceptance fixture must execute a saved WKO containing SUITCASE: . and ordinary Suitcase-relative file references, then move the intact fixture Suitcase to a different permitted parent path and execute the same saved WKO again. Resolution must identify the same logical Suitcase files without editing the WKO to insert the new absolute machine path.

W002-WKO-ACC-004

WIP/WKO lifecycle acceptance

UNDER REVIEW

Acceptance evidence must show that an editable WIP cannot Run; saving a valid WIP produces a distinct immutable WKO Run target; loading that WKO and changing instruction text creates a new non-runnable WIP; and the original WKO bytes, filename, identity, and provenance remain unchanged.

W002-WKO-ACC-005

Store MAP inheritance, historical override, and immutable snapshot acceptance

UNDER REVIEW

An acceptance fixture must execute a saved Store-establishing Work Order containing multiple COL alias assignments when no eligible Store MAP exists and prove that exactly one new immutable complete Store MAP is created while the GUI supplies no alias-edit gesture and target artifacts remain unchanged.

A later Work Order with the same exact source and no explicit MAP must inherit that Store's unique newest valid MAP automatically. Another Work Order must explicitly select an older valid MAP even though newer MAPs for that Store exist and prove that Store/RID binding, alias resolution, and inheritance use exactly the named historical MAP instead. A fixture specifying more than one MAP must refuse. A fixture with two otherwise eligible MAPs for the selected Store sharing the greatest UTC millisecond timestamp must refuse automatic inheritance rather than use UUID as chronology.

W002-WKO-ACC-006

Work Order chaining refusal acceptance

UNDER REVIEW

An acceptance fixture must submit a structurally saved WKO containing a RUN or other recognized Work Order-invocation construct and prove that WASM-002 refuses it during validation before Stage 1, Stage 2, conversion, inventory, or other governed execution begins.

The diagnostic/Help output must identify composition as deferred functionality. A separate multi-column MATERIALIZE fixture must still succeed, proving that multiple selected columns inside one Work Order are not misclassified as Work Order chaining.

WASM-002 Browser Front-End / Console Requirements

This section turns the Day 044 browser interaction prototype into candidate WASM-002 requirements. The intent is deliberately narrow: expose the minimum browser workbench needed to authorize a visible Suitcase, author and save immutable Work Orders, run only saved Work Orders through the shared engine, inspect visible files and aliases, observe read-only execution output, and receive governed Help. The Work Order is the governed command/mutation surface; the browser is the authorization, inventory, read-only alias presentation, observation, diagnostic, and Help surface; the shared Rust core remains authoritative for governed execution.

The front end must make the build understandable without pretending that deferred V1 features already exist. The reference prototype is included below because the interaction design itself is useful evidence, but it is not permitted to become an undocumented second contract.

W002-UI-001

One explicit Work Order command surface

UNDER REVIEW

The WASM-002 browser front end shall use the Work Order editor as the single human command-entry surface for governed execution. It shall not expose a second interactive command prompt or point-and-click analytical path that can become an independent source of analytical intent.

The editable draft may be syntax-highlighted, validated, and saved, but it is not itself executable authority. Governed Run operates only on a selected saved Work Order TXT artifact.

W002-UI-002

Front end presents and authorizes; shared Rust core decides

UNDER REVIEW

The browser front end may authorize files, edit and validate Work Orders, invoke the shared engine, display governed state, render diagnostics, and present generated artifacts. It must not independently decide analytical truth, silently reinterpret a Work Order, or implement a competing semantic path.

Where front-end presentation and shared-core semantics disagree, the shared governed semantics and frozen requirements are authoritative.

W002-UI-003

Visible Suitcase and governed run context

UNDER REVIEW

The WASM-002 browser surface shall make the currently validated Suitcase visible and shall expose the visible files in that folder. Source and requested-column context become governed execution state only when a saved Work Order resolves them; the UI must not imply that directory presence alone means a source has been selected, scanned, certified, or materialized.

W002-UI-004

Certification gate is visible and blocking

UNDER REVIEW

The front end shall visibly represent strict whole-file UTF-8 certification as a required stage before analytical materialization. A certification refusal must stop the current analytical Work Order, prevent later materialization stages from being presented as successful, and provide the canonical diagnostic / Help path.

W002-UI-005

One-pass multi-column materialization is represented truthfully

UNDER REVIEW

When a valid Work Order requests multiple source columns, the front end shall represent them as one governed multi-column materialization request through one bounded structural CSV pass, not as unrelated per-column scans when the frozen engine contract performs one pass.

Requested columns must be validated before data-row materialization begins, consistent with the materialization requirements.

W002-UI-006

Visible Suitcase Directory is the artifact orientation surface

UNDER REVIEW

After Suitcase validation, the browser shall present a human-readable directory view of the visible files in the selected Suitcase, including physical filename, editable human alias where applicable, file type, and size. Governed artifacts created by a run shall appear in that same visible inventory after refresh or update.

The directory is an orientation and metadata surface over the real flat Suitcase. It is not a hidden browser cache, a second persistence system, or an analytical command surface.

W002-UI-007

All user-facing Help flows through the Help Engine

UNDER REVIEW

All Data Sculptor-controlled user-facing Help messages, warnings, refusals, explanations, validation guidance, and safe-next-action messages shall be produced through the Help Engine from governed facts or canonical diagnostic events. Individual UI controls must not maintain an independent competing stock of semantic Help text.

Help voice may change wording and depth but must not change diagnostic identity, evidence, severity, refusal/continue behavior, provenance, or safe next action. Durable Help Reports derive from the same governed truth.

W002-UI-008

Legacy encoding conversion remains a separate operation

UNDER REVIEW

If UTF-8 certification fails and the bytes are eligible for the separately governed Windows-1252 compatibility/conversion path, the front end may explain or help draft that separate conversion Work Order. It must not silently reinterpret the failed analytical Work Order as Windows-1252 and continue materialization.

W002-UI-009

Front-end branding is presentation-only

UNDER REVIEW

The WASM-002 browser front end shall use the canonical built-in Red5Sorcery/Data Sculptor branding and approved presentation tokens without changing analytical or diagnostic meaning. The current Red5Sorcery identity treatment, including the red “5”, remains the active WASM-002 design direction.

Configurable Brand Manifest loading, validation, selection, and substitution are deferred to V1-BACKLOG / a future build whose number is not yet assigned.

W002-UI-010

WASM-002 front end must not preview deferred analytical features as available controls

UNDER REVIEW

The WASM-002 front end shall stop at the capabilities allocated to the WASM-002 build slice. It shall not present filtering, grouping, sorting, Quick Viz, PRETTY Tables, DS-VERIFY, or later filter-driven build/export workflows as executable WASM-002 controls unless their individual requirement SCOPE is deliberately changed and frozen.

W002-UI-011

Keyboard-operable, small-screen browser shell

UNDER REVIEW

The required WASM-002 front-end interactions shall remain operable from a keyboard and usable on the project's canonical small-screen baseline. Visible labels must carry meaning without relying on color alone. Exact shortcut assignments are presentation details unless separately frozen.

W002-UI-012

Reference prototype is evidence, not a shadow specification

UNDER REVIEW

The Day 043 HTML prototype embedded below is retained as concrete design evidence for the WASM-002 browser workbench. Its layout, simulated analytical execution, illustrative Work Order grammar, current aliases, demo shortcuts, artifact examples, and other unfrozen literals do not become normative merely because they appear in the prototype.

If the embedded prototype conflicts with a numbered requirement, the numbered requirement governs and the prototype must be revised.

W002-UI-013

Dedicated persistent Help / Diagnostic Surface

UNDER REVIEW

The primary WASM-002 workspace must reserve a dedicated Help / Diagnostic Surface with stable layout presence. When a governed diagnostic is active, the analyst must be able to view its explanation without losing sight of the Work Order and the execution/source context required to understand it.

The persistent surface is a viewport into canonical diagnostic truth; it is not a second state authority.

W002-UI-014

Governed analytical refusals are not modal- or toast-only interactions

UNDER REVIEW

An application-controlled modal dialog must not be the primary presentation of a governed analytical refusal when it would obscure the Work Order or execution context. A transient toast or timed notification must not be the sole carrier of governed diagnostic truth.

Browser- or operating-system-controlled permission/security dialogs are outside this requirement because Data Sculptor does not control their presentation.

W002-UI-015

Idle Help state remains semantically quiet

UNDER REVIEW

When no canonical diagnostic is active, the Help / Diagnostic Surface should communicate only restrained readiness/idle state rather than becoming a general dashboard for unrelated metrics, checkpoints, or project status. Exact wording such as “No active diagnostic. Ready.” is presentation detail unless separately frozen.

W002-UI-016

Help surface exposes a direct saved-report action

UNDER REVIEW

From an active governed diagnostic, the browser Help / Diagnostic Surface must provide an explicit action to generate the durable HTML Help Report. The generated report must become a visible Suitcase artifact governed by the Help, PRETTY, Brand, persistence, and provenance requirements.

W002-UI-017

Writable Suitcase validation is the first interaction gate

UNDER REVIEW

Before Data Sculptor enables Work Order saving, governed Run, or analytical processing, the analyst must choose one Suitcase folder and Data Sculptor must validate that folder by successfully creating, completely writing, and closing one governed HTML Suitcase Validation Certificate under W002-STOR-022 through W002-STOR-022.3. Permission state or directory enumeration alone is not sufficient to pass the gate.

The successful certificate remains visibly in the Suitcase as durable evidence. Validation does not require deleting or renaming the certificate. Until the certificate write/close succeeds, the analytical workspace remains locked except for Help and Suitcase selection.

Browser- or operating-system-controlled refusal of protected directories is outside Data Sculptor presentation control and must be explained through the Help Engine when the host can observe the refusal.

W002-UI-018

Suitcase Directory enumerates visible files before analytical work

UNDER REVIEW

Immediately after Suitcase validation, Data Sculptor shall enumerate the visible files available through the authorized directory handle and show them in the Suitcase Directory. No source, header, column, certification, or materialization state shall be inferred merely from the existence of those files.

W002-UI-019

Directory inventory and displayed aliases must not become point-and-click analytical intent

UNDER REVIEW

The Suitcase Directory may expose file inventory and read-only human-facing metadata such as aliases, but it shall not provide alias-edit controls, “Use as source,” column-pick, materialize, filter, or equivalent governed-action controls.

Source files, requested columns, alias mutations, and analytical operations are stated in saved Work Orders and resolved by the governed engine.

W002-UI-020

Saved Work Orders are the only Run targets

UNDER REVIEW

The Work Order editor may create a new draft or load a saved Work Order TXT artifact from the validated Suitcase. A loaded saved Work Order is an immutable Run target and may be inspected or run directly. If the analyst changes its instruction text, the editor must transition to a new draft derived from that saved Work Order; the draft is not runnable until it is saved as a new immutable Work Order with a new governed physical identity. The original saved Work Order remains unchanged.

W002-UI-021

User chooses the Suitcase; Data Sculptor chooses generated filenames

UNDER REVIEW

For Work Orders, materialized columns, Help Reports, receipts, maps, and other Data Sculptor-generated artifacts, the analyst chooses or has already chosen the validated Suitcase folder. The browser shall not require the analyst to supply an output filename for those governed artifacts.

W002-UI-022

Execution Output is read-only observation, never command input

UNDER REVIEW

The browser shall provide a read-only Execution Output surface that reports which saved Work Order was run, how its source and governed aliases resolved, which execution stages occurred, what was refused, and which governed artifacts were created or assigned. For WASM-002 it does not display a nested Work Order invocation chain because Work Order composition is deferred.

The surface shall not accept commands, analytical text, or cursor-driven execution input.

W002-UI-023

The browser has no separate Work Order Description field

UNDER REVIEW

The browser must not expose a standalone editable Description field for a saved or draft Work Order. Human-facing Work Order naming is authored in DS-STEPS with optional WORK ORDER AS "..." inside the Work Order itself.

The Saved Work Order chooser and Suitcase Directory may display the current governed WKO alias from the newest valid WKO MAP, with the exact physical WKO filename still available/visible so human meaning and physical identity remain distinct. Editing a loaded saved WKO—including changing its alias or comments—creates a derived draft that must be saved as a new immutable WKO before it can Run.

W002-UI-024

Suitcase Directory aliases are read-only views of governed MAP profiles

UNDER REVIEW

Alias displays in the Suitcase Directory are observation-only. Store, RID, and materialized-COL aliases are read from eligible Store MAP state. Saved Work Order aliases are read from the newest valid WKO MAP. The browser may aggregate those governed sources into one human-facing directory view while keeping exact physical filenames available for inspection.

The GUI must not expose an input, inline editor, context action, or other non-Work-Order path that directly mutates governed aliases. Store/RID/COL alias mutation remains Work-Order-governed. WKO aliases are authored inside immutable WKO text with WORK ORDER AS and enter the WKO alias registry only through a successful save transaction.

W002-UI-025

The browser has exactly two governed built-in presentation themes

UNDER REVIEW

The WASM-002 browser presentation contract exposes exactly two governed theme choices: Modern Dark and Modern Light. Custom presentation is deferred to V1-BACKLOG / a future build not yet numbered. A Terminal theme is not part of the WASM-002/V1 browser contract and must not be exposed as a governed theme choice.

Theme selection is presentation-only. It must not change Work Order semantics, source resolution, diagnostic identity or facts, continue/refuse decisions, analytical values, Receipt truth, or other governed execution meaning.

The selected browser theme does not control durable HLP or CER presentation in WASM-002. Those governed HTML artifacts use the canonical built-in Red5Sorcery/Data Sculptor presentation regardless of whether the live browser is using Modern Dark or Modern Light.

WASM-002 Front-End Acceptance Gates

W002-UI-ACC-001

Single-command-surface and saved-run-target acceptance

UNDER REVIEW

The acceptance check must show one Work Order editor that can hold either a new draft or a loaded saved Work Order and no second independent prompt, command-entry cursor, point-and-click source selector, or point-and-click column selector. A governed Run must read a loaded/selected saved Work Order TXT artifact. Editing the instruction text of a loaded saved Work Order must transition the editor to a new draft state that cannot Run until saved as a new immutable Work Order.

W002-UI-ACC-002

Certification-refusal gating acceptance

UNDER REVIEW

Using a source fixture that fails strict UTF-8 certification, the browser must show certification failure, leave later analytical stages unaccepted, produce no materialized analytical outputs, preserve the source unchanged, and expose the canonical Help path.

W002-UI-ACC-003

Multi-column path acceptance

UNDER REVIEW

Using a valid UTF-8 source and a Work Order requesting at least two source columns, the browser must show successful certification followed by one governed structural materialization pass and then expose the resulting visible Suitcase artifacts required by the build contract.

W002-UI-ACC-004

Diagnostic/Help parity acceptance

UNDER REVIEW

For at least one real WASM-002 refusal path, the live message, each supported Help voice, and the durable HTML Help report must resolve from the same canonical diagnostic event and preserve the governed facts, severity, provenance, refusal behavior, and safe next action.

W002-UI-ACC-005

Visible-persistence and Suitcase-directory acceptance

UNDER REVIEW

A completed governed browser run must be auditable from the visible Suitcase artifacts required by the build contract, and newly created governed artifacts must become visible through the Suitcase Directory. Acceptance evidence must show that Data Sculptor did not intentionally persist project or analytical state in browser-private storage as a substitute for those artifacts.

W002-UI-ACC-006

Scope-surface acceptance

UNDER REVIEW

The frozen WASM-002 browser build must not expose executable controls for requirements whose current SCOPE remains V1-BACKLOG, POST-V1, OUT-WASM-002, or otherwise outside the frozen WASM-002 build slice.

W002-UI-ACC-007

Small-screen and keyboard acceptance

UNDER REVIEW

On the canonical low-end Windows laptop and its small display, the required browser controls, Work Order editor, governed-stage status, artifact/result surface, and diagnostic/Help surface must remain reachable and usable without requiring an IDE or developer tools. The required interaction path must be completable by keyboard.

W002-UI-ACC-008

Persistent diagnostic co-presence acceptance

UNDER REVIEW

Triggering a real governed refusal must leave the Work Order and relevant execution/source context available while the diagnostic is visible in the dedicated Help surface. The refusal must not depend on an application-controlled modal dialog or transient toast as its sole presentation.

W002-UI-ACC-009

Idle-state discipline acceptance

UNDER REVIEW

With no active diagnostic, the dedicated Help surface must remain present but semantically quiet and must not aggregate unrelated project/dashboard state as a substitute for its diagnostic purpose.

W002-UI-ACC-010

Saved-report action acceptance

UNDER REVIEW

From a displayed real diagnostic event, the user must be able to invoke the Help-report action and obtain the corresponding durable HTML Help Report as a visible governed artifact without manually copying the diagnostic text or reconstructing the event.

W002-UI-ACC-011

Suitcase-first gate acceptance

UNDER REVIEW

With no Suitcase validated, Work Order saving, governed Run, and analytical processing controls must be unavailable. After the analyst selects a writable test folder, Data Sculptor must create one retained governed certificate whose filename matches __DS__CER__YYYYMMDDTHHMMSSmmmZ__<uuid-v4>.html, completely write and close it, and expose it in the visible Suitcase Directory. The certificate must contain the semantic fields and limitation statements required by W002-STOR-022.2.

Only after that certificate operation succeeds may the workspace unlock. A failure to create, completely write, or close the certificate must leave the workspace locked and surface the canonical diagnostic/Help path. Acceptance must not depend on a hard-coded operating-system path-length number, deletion of the certificate, or a validation-only rename.

W002-UI-ACC-012

Directory-is-inventory acceptance

UNDER REVIEW

After Suitcase validation, the visible directory must list a mixed fixture set including at least one CSV and one non-CSV file with their physical names, types, and sizes. The directory must expose no “Use as source,” column-pick, or materialize action that bypasses the Work Order.

W002-UI-ACC-013

Generated Work Order identity and immutability acceptance

UNDER REVIEW

Saving a valid draft must create a new TXT artifact whose physical name matches the frozen Work Order filename contract and must not open a filename-entry Save As path. Editing the draft and saving again must create a different Work Order identity; the first saved TXT bytes and filename must remain unchanged.

W002-UI-ACC-014

Work-Order-only source and column selection acceptance

UNDER REVIEW

Using a Suitcase containing multiple candidate files and a CSV with multiple headers, the analyst must be able to request the source and materialized column solely through a saved Work Order. Acceptance must show that the browser performs no separate point-and-click source or column selection.

W002-UI-ACC-015

Read-only Execution Output acceptance

UNDER REVIEW

The execution surface must display the selected saved Work Order, source resolution, relevant stage/refusal facts, and resulting artifact identity while accepting no command input. Keyboard focus in the execution surface must not create a second execution path.

W002-UI-ACC-016

Store-MAP snapshot persistence and read-only directory acceptance

UNDER REVIEW

Creating or changing governed alias/Store metadata through a saved Work Order must create one new immutable complete Store MAP in the same flat Suitcase while preserving earlier MAPs and leaving target artifact bytes and physical filenames unchanged.

After a governed run that creates a new MAP, refreshing/reopening the Suitcase may display Store, RID, and COL aliases from the MAP associated with the user's current governed context, but the directory must remain read-only and must not independently choose or mutate Store/MAP authority for execution.

W002-UI-ACC-017

Store-aware MAP selection, historical override, and anti-rebinding acceptance

UNDER REVIEW

A saved materializing Work Order that does not explicitly name a MAP must use exact SOURCE matching against store_source_filename. A fixture with exactly one eligible Store lineage must inherit that Store's unique newest valid MAP and record both the MAP identity and bound rid_filename in execution evidence. A fixture with no eligible Store lineage must establish a new Store. A fixture with more than one eligible Store lineage for the same source must refuse automatic selection.

Another fixture must prove that explicitly naming an older valid MAP overrides the newer default for that same Store. More than one explicitly named MAP must refuse. An equal-greatest-timestamp ambiguity within the selected Store lineage must refuse automatic selection. Once an inherited Store MAP has been selected for a run, creation of a newer MAP during execution must not silently rebind that in-progress run.

W002-UI-ACC-018

Help-Engine-only messaging acceptance

UNDER REVIEW

For representative Suitcase validation, Work Order validation, source-resolution, and analytical refusal cases, user-facing guidance must be traceable to the Help Engine/canonical diagnostic path. Acceptance must show no competing ad hoc semantic refusal text generated independently by individual analytical controls.

W002-UI-ACC-019

Work Order description metadata acceptance

UNDER REVIEW

Editing the human-facing description of a saved Work Order must change the description view while leaving the Work Order TXT bytes, physical filename, UUID, and governed historical identity unchanged.

W002-UI-ACC-020

Theme semantic-invariance acceptance

UNDER REVIEW

The same saved Work Order and governed diagnostic fixture must be exercised under Modern Dark and Modern Light. Acceptance evidence must show identical Work Order resolution, diagnostic ID and structured facts, continue/refuse decision, and analytical result/provenance across both themes, with only governed live-browser presentation differences.

The browser must expose no Custom or Terminal governed theme choice in WASM-002. Acceptance must also verify that switching between Modern Dark and Modern Light does not change the canonical built-in presentation of a generated HLP or CER.

Embedded Day 043 Reference Prototype — exact HTML source

Evidence status: non-normative Day 043 interaction prototype. Numbered requirements above govern. The exact source below is embedded so the PRD preserves the concrete current browser artifact that motivates these requirements rather than merely describing it after the fact.

Prototype file: Data_Sculptor_WASM002_Front_End_Prototype.html
SHA-256: 23E08FEB1E201094729C56F4D1579FD4055DD61144ADBE5AE6AACEF7D65F58CE
Companion file: open the interactive prototype

Show exact embedded prototype HTML (73,224 bytes)
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Data Sculptor — WASM-002 Front-End Prototype</title>
<meta name="description" content="Day 044 WASM-002 browser front-end design prototype for Red5Sorcery Data Sculptor." />
<style>
  :root{
    color-scheme:dark;
    --bg:#0a0f16;--bg2:#0d1420;--panel:#111a28;--panel2:#0f1723;
    --ink:#edf2f7;--muted:#9aa9ba;--soft:#c8d5e4;--line:#2a394b;--line2:#3a4d63;
    --accent:#9fbddd;--accent2:#6e8faf;--accent3:#c7d8ea;--red:#b94a50;--red2:#e07a80;
    --amber:#c8aa68;--green:#88b8a3;--shadow:0 16px 46px rgba(0,0,0,.22);
    --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;
    --sans:Inter,Segoe UI,Arial,sans-serif;
  }
  *{box-sizing:border-box}
  html{background:var(--bg);scroll-behavior:smooth}
  body{margin:0;background:linear-gradient(180deg,#0a0f16 0%,#0d1420 100%);color:var(--ink);font-family:var(--sans);font-size:17px;line-height:1.55;min-height:100vh}
  button,textarea,select,input{font:inherit} button{color:inherit}
  a{color:var(--accent3);text-underline-offset:3px}
  a:focus-visible,button:focus-visible,textarea:focus-visible,select:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
  .shell{max-width:1580px;margin:0 auto;padding:18px 22px 34px}
  .topline{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;flex-wrap:wrap;padding:8px 0 14px;border-bottom:1px solid var(--line2)}
  .brand{font-family:var(--mono);font-size:13px;letter-spacing:.12em;text-transform:uppercase;color:var(--soft)}
  .brand strong{color:var(--ink);font-weight:700}.brand .brand-five{color:var(--red2)}
  .head-right{display:flex;gap:12px;align-items:center;flex-wrap:wrap;font-family:var(--mono);font-size:12.5px;color:var(--muted)}
  .pill{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line2);border-radius:999px;padding:5px 10px;white-space:nowrap}
  .dot{width:8px;height:8px;border-radius:50%;background:var(--accent)}.pill.warn .dot{background:var(--amber)}.pill.err .dot{background:var(--red2)}
  .prd-link{border:1px solid var(--line2);padding:5px 10px;text-decoration:none}.prd-link:hover{border-color:var(--accent);background:rgba(159,189,221,.06)}
  .notice{margin:14px 0 0;padding:10px 12px;border-left:3px solid var(--amber);background:rgba(200,170,104,.07);font-family:var(--mono);font-size:13px;color:var(--soft)}
  .notice strong{color:var(--amber)}
  .creed{margin-top:10px;font-family:var(--mono);font-size:12.5px;color:var(--muted);text-align:right}.creed strong{color:var(--accent3)}

  .context{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:1px;background:var(--line);border:1px solid var(--line);margin-top:14px;box-shadow:var(--shadow)}
  .ctx{background:var(--panel2);padding:13px 15px;min-width:0}.k{font-family:var(--mono);font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);margin-bottom:5px}
  .v{font-family:var(--mono);font-size:14px;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.v.ok{color:var(--accent3)}.v.wait{color:var(--amber)}.v.err{color:var(--red2)}

  .grid-top{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;margin-top:16px;align-items:stretch}
  .span-2{grid-column:1/-1}
  .stack{display:grid;gap:16px;align-content:start}
  .grid-top > .stack{height:100%}.grid-top > .stack > .panel{height:100%;display:flex;flex-direction:column}.grid-top > .stack > .panel > .panel-body{flex:1;display:flex;flex-direction:column}
  .panel{background:linear-gradient(180deg,var(--panel) 0%,#0e1621 100%);border:1px solid var(--line2);box-shadow:var(--shadow);min-width:0}
  .panel-head{display:flex;justify-content:space-between;gap:10px;align-items:center;flex-wrap:wrap;padding:13px 15px;border-bottom:1px solid var(--line);background:rgba(255,255,255,.012)}
  .panel-title{font-family:var(--mono);font-size:13px;letter-spacing:.11em;text-transform:uppercase;color:var(--soft)}
  .panel-note{font-family:var(--mono);font-size:12px;color:var(--muted)}.panel-body{padding:15px}
  .term-btn{appearance:none;border:0;background:transparent;color:var(--accent3);padding:7px 0;cursor:pointer;font-family:var(--mono);font-size:14px}
  .term-btn:hover{text-decoration:underline}.term-btn.red{color:var(--red2)}.term-btn.muted{color:var(--muted)}.term-btn:disabled{color:#566372;cursor:not-allowed;text-decoration:none}
  .primary-btn{appearance:none;border:1px solid #6388ad;background:rgba(110,143,175,.15);color:var(--accent3);padding:11px 14px;cursor:pointer;font-family:var(--mono);font-size:14px}
  .primary-btn:hover{background:rgba(110,143,175,.24)}.primary-btn:disabled{border-color:var(--line);background:transparent;color:#566372;cursor:not-allowed}
  .actions{display:flex;gap:8px 14px;flex-wrap:wrap;padding-top:11px;align-items:center}.action-spacer{flex:1}
  .statusline{margin-top:12px;border-top:1px solid var(--line);padding-top:11px;font-family:var(--mono);font-size:13px;color:var(--muted);min-height:2.2em}.statusline strong{color:var(--accent3)}
  .field-label{display:block;font-family:var(--mono);font-size:11.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:0 0 6px}
  .text-input{width:100%;background:#091019;border:1px solid var(--line2);color:var(--ink);padding:10px 11px;font-family:var(--sans);font-size:15px}
  .readonly-input{width:100%;background:#0b121c;border:1px solid var(--line);color:var(--soft);padding:8px 10px;font-family:var(--mono);font-size:13px}

  .suitcase-gate{border:1px solid var(--amber);background:linear-gradient(180deg,rgba(200,170,104,.08),rgba(200,170,104,.025));box-shadow:var(--shadow)}
  .suitcase-gate.ready{border-color:#5b806f;background:linear-gradient(180deg,rgba(136,184,163,.09),rgba(136,184,163,.025))}
  .gate-body{padding:14px}
  .gate-grid{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center}
  .gate-kicker{font-family:var(--mono);font-size:11.5px;letter-spacing:.11em;text-transform:uppercase;color:var(--amber);margin-bottom:5px}.suitcase-gate.ready .gate-kicker{color:var(--green)}
  .gate-title{font-family:var(--mono);font-size:17px;font-weight:700;color:var(--ink);margin-bottom:5px}
  .gate-copy{font-size:15px;color:var(--muted);max-width:72ch}
  .gate-status{margin-top:12px;padding:10px 12px;border:1px solid rgba(200,170,104,.36);background:#0b121c;font-family:var(--mono);font-size:13px;color:var(--amber)}.suitcase-gate.ready .gate-status{border-color:rgba(136,184,163,.38);color:var(--green)}
  .gate-lock-note{margin-top:9px;font-family:var(--mono);font-size:12px;color:var(--muted)}
  .gate-location{margin-top:10px;border:1px solid var(--line2);background:#0b121c;padding:10px 11px;display:grid;gap:7px}
  .gate-location-row{display:grid;grid-template-columns:190px minmax(0,1fr);gap:10px;align-items:start}
  .gate-location-label{font-family:var(--mono);font-size:11.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
  .gate-location-value{font-family:var(--mono);font-size:13px;color:var(--ink);overflow-wrap:anywhere}
  .gate-location-note{padding-top:8px;border-top:1px solid var(--line);font-size:13px;line-height:1.55;color:var(--muted)}
  .locked-copy{opacity:.58}

  .table-wrap{overflow:auto;border:1px solid var(--line)}
  table{border-collapse:collapse;width:100%;min-width:620px;font-size:14px}
  th{font-family:var(--mono);font-size:11.5px;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);font-weight:500;text-align:left;background:#0b121c;padding:9px 10px;border-bottom:1px solid var(--line2)}
  td{padding:9px 10px;border-bottom:1px solid var(--line);vertical-align:middle}tbody tr:last-child td{border-bottom:0}
  tbody tr.selectable{cursor:pointer}tbody tr.selectable:hover{background:rgba(159,189,221,.05)}tbody tr.selected{background:rgba(110,143,175,.14)}
  .radio-cell{width:38px}.alias-name{font-family:var(--mono);color:var(--soft);font-weight:700}.filename{font-family:var(--mono);font-size:13px;color:var(--accent3);word-break:break-all}
  .tiny-badge{display:inline-flex;border:1px solid var(--line2);padding:3px 7px;font-family:var(--mono);font-size:10.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);white-space:nowrap}.tiny-badge.lock{color:var(--accent3);border-color:#48667e}.tiny-badge.sim{color:var(--amber);border-color:#6c5d38}
  .table-note{margin-top:9px;font-family:var(--mono);font-size:12px;color:var(--muted)}
  .files-wrap{max-height:330px;overflow:auto;border:1px solid var(--line)}
  .file-kind{font-family:var(--mono);font-size:12px;color:var(--muted)}
  .file-size{font-family:var(--mono);font-size:12px;color:var(--soft);white-space:nowrap}
  .source-mark{color:var(--green);font-family:var(--mono);font-size:12px;white-space:nowrap}
  .alias-display{display:inline-block;max-width:100%;font-family:var(--mono);font-size:13px;color:var(--accent3);word-break:break-word}
  .alias-display.empty{color:#62758a}
  .terminal-output{margin:0;min-height:260px;max-height:440px;overflow:auto;background:#070c12;border:1px solid var(--line);padding:14px 15px;color:var(--soft);font-family:var(--mono);font-size:14px;line-height:1.65;white-space:pre-wrap;word-break:break-word}
  .grid-top > .stack:last-of-type .terminal-output{flex:1;min-height:100%;max-height:none}
  .terminal-output .term-ok{color:var(--green)}
  .terminal-output .term-warn{color:var(--amber)}
  .terminal-output .term-err{color:var(--red2)}

  .workorder-load{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end;margin-bottom:13px}
  .workorder-load .field-label{margin-bottom:5px}.workorder-select{width:100%;background:#091019;border:1px solid var(--line2);color:var(--ink);padding:9px 10px;font-family:var(--mono);font-size:13px}.workorder-select:disabled{color:var(--muted);background:#0b121c;cursor:not-allowed}
  .editor-wrap{position:relative;min-height:230px}.editor-highlight,#workOrder{position:absolute;inset:0;margin:0;padding:14px 15px;border:1px solid var(--line);background:#091019;white-space:pre-wrap;overflow:auto;tab-size:2;line-height:1.62;min-height:230px;font-family:var(--mono);font-size:14px}
  .editor-highlight{display:none}#workOrder{resize:vertical;color:var(--accent3);caret-color:#ffffff;outline:none;z-index:2;background:#091019}#workOrder::placeholder{color:#71849a}#workOrder::selection{background:rgba(159,189,221,.30);color:#ffffff}#workOrder:focus{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent) inset}
  .tok-key{color:var(--accent3);font-weight:700}.tok-value{color:#d7e3ee}.tok-comment{color:#71849a}.tok-op{color:var(--amber);font-weight:700}

  .saved-list{display:grid;gap:9px}.saved-empty{font-family:var(--mono);font-size:13px;color:var(--muted);padding:8px 0}.saved-row{border:1px solid var(--line);background:#0b121c;padding:10px;display:grid;grid-template-columns:30px 1fr auto;gap:9px;align-items:start}.saved-row.selected{border-color:var(--accent2);background:rgba(110,143,175,.08)}
  .saved-select{margin-top:7px}.saved-main{min-width:0}.saved-description{width:100%;background:#091019;border:1px solid var(--line2);color:var(--ink);padding:9px 10px;font-size:14px}.saved-file{margin-top:6px;font-family:var(--mono);font-size:12px;color:var(--accent3);word-break:break-all}.saved-meta{font-family:var(--mono);font-size:11px;color:var(--muted);white-space:nowrap;padding-top:6px}.saved-note{font-family:var(--mono);font-size:11.5px;color:var(--muted);margin-top:4px}

  .path{display:grid;gap:10px}.stage{border:1px solid var(--line);background:#0b121c;padding:11px 12px;display:grid;grid-template-columns:1fr auto;gap:10px;align-items:start}.stage-title{font-weight:700;font-size:15px;margin-bottom:3px}.stage-desc{font-size:13px;color:var(--muted)}.stage-state{font-family:var(--mono);font-size:11px;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);border:1px solid var(--line2);padding:3px 6px;white-space:nowrap}.stage.active{border-color:var(--accent2);background:rgba(110,143,175,.09)}.stage.active .stage-state{color:var(--accent3);border-color:var(--accent2)}.stage.pass{border-color:#48667e;background:rgba(110,143,175,.08)}.stage.pass .stage-state{color:var(--accent3)}.stage.fail{border-color:var(--red);background:rgba(185,74,80,.08)}.stage.fail .stage-state{color:var(--red2);border-color:var(--red)}

  .lower{display:grid;grid-template-columns:1fr;gap:16px;margin-top:16px}.empty{font-family:var(--mono);font-size:13px;color:var(--muted);padding:8px 0}
  .pretty-branding,.data-dictionary{margin-top:16px}
  .pretty-toml-editor{width:100%;min-height:240px;resize:vertical;background:#091019;border:1px solid var(--line);color:var(--accent3);caret-color:#fff;padding:14px 15px;font-family:var(--mono);font-size:14px;line-height:1.62;tab-size:2}
  .pretty-toml-editor::placeholder{color:#71849a}.pretty-toml-editor::selection{background:rgba(159,189,221,.30);color:#fff}.pretty-toml-editor:focus{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent);outline:none}
  .diag{min-height:180px}.diag-summary{font-family:var(--mono);font-size:14px;white-space:pre-wrap;color:var(--soft)}.diag-summary .sev{color:var(--red2);font-weight:700}.diag-summary .help{color:var(--accent3);font-weight:700}.diag-summary .info{color:var(--green);font-weight:700}.diag-grid{margin-top:12px;display:grid;grid-template-columns:150px 1fr;gap:6px 12px;font-family:var(--mono);font-size:13px}.diag-grid dt{color:var(--muted)}.diag-grid dd{margin:0;color:var(--soft);word-break:break-word}.diag-actions{display:flex;gap:14px;flex-wrap:wrap;margin-top:13px;padding-top:10px;border-top:1px solid var(--line)}.voice-select{background:#0a111b;color:var(--ink);border:1px solid var(--line2);padding:7px 9px;font-family:var(--mono);font-size:13px}

  .scope-strip{margin-top:16px;border:1px solid var(--line2);background:#0b121c;padding:12px 14px;display:grid;grid-template-columns:1fr auto;gap:14px;align-items:start}.scope-text{font-size:12.5px;color:var(--muted);max-width:110ch}.scope-text strong{color:var(--soft)}.scope-tags{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.tag{font-family:var(--mono);font-size:10px;letter-spacing:.05em;text-transform:uppercase;border:1px solid var(--line2);padding:4px 7px;color:var(--muted)}.tag.in{color:var(--accent3);border-color:#48667e}.tag.out{color:#a58f91;border-color:#5c3d42}
  .footer{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-top:13px;padding-top:12px;border-top:1px solid var(--line);font-family:var(--mono);font-size:12px;color:var(--muted)}
  .hidden-file{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}

  @media(max-width:1180px){.context{grid-template-columns:repeat(3,1fr)}.grid-top,.lower{grid-template-columns:1fr}}
  @media(max-width:720px){.shell{padding:12px}.gate-grid{grid-template-columns:1fr}.context{grid-template-columns:1fr}.editor-wrap,.editor-highlight,#workOrder{min-height:300px}.diag-grid{grid-template-columns:1fr}.stage{grid-template-columns:1fr}.stage-state{grid-column:1;justify-self:start}.saved-row{grid-template-columns:26px 1fr}.saved-meta{grid-column:2}.scope-strip{grid-template-columns:1fr}.scope-tags{justify-content:flex-start}}
</style>
</head>
<body>
<main class="shell" aria-label="Data Sculptor WASM-002 front-end design prototype">
  <header class="topline">
    <div>
      <div class="brand"><strong>Red<span class="brand-five">5</span>Sorcery</strong> / Data Sculptor / WASM-002</div>
      <div class="brand" style="margin-top:5px;color:var(--muted)">Browser front-end design prototype · Day 044</div>
    </div>
    <div class="head-right">
      <span class="pill warn"><span class="dot"></span>DRAFT / NOT FROZEN</span>
      <span class="pill"><span class="dot"></span>LOCAL-FIRST INTERACTION PROTOTYPE</span>
      <a class="prd-link" href="Red5Sorcery_Data_Sculptor_Product_Backlog_PRD.html">[P] Product Backlog PRD</a>
    </div>
  </header>

  <div class="notice"><strong>DESIGN PROTOTYPE.</strong> Rust/WASM execution is not connected. Column materialization is simulated.</div>
  <div class="creed"><strong>The human names the meaning. Data Sculptor names the file.</strong></div>

  <section class="context" aria-label="Current project context">
    <div class="ctx"><div class="k">Suitcase</div><div class="v wait" id="ctxSuitcase">NOT AUTHORIZED</div></div>
    <div class="ctx"><div class="k">Source</div><div class="v wait" id="ctxSource">LOCKED UNTIL SUITCASE VALIDATES</div></div>
    <div class="ctx"><div class="k">Detected headers</div><div class="v wait" id="ctxHeaders">LOCKED</div></div>
    <div class="ctx"><div class="k">Selected column</div><div class="v wait" id="ctxColumn">NONE</div></div>
    <div class="ctx"><div class="k">Run target</div><div class="v wait" id="ctxRunTarget">NO SAVED WORK ORDER SELECTED</div></div>
    <div class="ctx"><div class="k">Persistence rule</div><div class="v ok">VISIBLE FLAT SUITCASE · GENERATED FILENAMES</div></div>
  </section>

  <section class="grid-top">
    <article class="suitcase-gate span-2" id="suitcaseGate" aria-labelledby="suitcase-gate-title">
      <div class="gate-body">
        <div class="gate-grid">
          <div>
            <div class="gate-kicker">Required first · Suitcase gate</div>
            <div class="gate-title" id="suitcase-gate-title">Validate where Data Sculptor work belongs</div>
            <div class="gate-copy">Choose one writable Suitcase folder to begin.</div>
          </div>
          <button class="primary-btn" id="suitcaseBtn" type="button">Choose &amp; validate Suitcase</button>
        </div>
        <div class="gate-status" id="suitcaseGateStatus">NOT VALIDATED · workspace controls are locked</div>
      </div>
    </article>

    <article class="panel span-2" aria-labelledby="files-title">
      <div class="panel-head">
        <div id="files-title" class="panel-title">Suitcase directory</div>
        <div class="panel-note">Column aliases display only · latest valid MAP is display default · Work Order may bind history</div>
        <button class="term-btn" id="refreshFilesBtn" type="button" disabled>[R] Refresh</button>
      </div>
      <div class="panel-body">
        <div class="files-wrap">
          <table aria-label="Directory listing for the selected Suitcase">
            <thead><tr><th>File</th><th>Alias</th><th>Type</th><th>Size</th></tr></thead>
            <tbody id="suitcaseFilesBody"><tr><td colspan="4" class="saved-empty">Validate a Suitcase to see its directory.</td></tr></tbody>
          </table>
        </div>
      </div>
    </article>

    <div class="stack">
      <article class="panel" aria-labelledby="wo-title">
        <div class="panel-head"><div id="wo-title" class="panel-title">Work Order — new draft</div><div class="panel-note" id="woModeNote">Saved TXT = immutable</div></div>
        <div class="panel-body">
          <div class="workorder-load" aria-label="Load a saved Work Order into the editor">
            <div>
              <label class="field-label" for="savedWorkOrderSelect">Saved Work Order</label>
              <select id="savedWorkOrderSelect" class="workorder-select" disabled>
                <option value="">No saved Work Orders available</option>
              </select>
            </div>
            <button class="term-btn" id="loadWorkOrderBtn" type="button" disabled>[L] Load</button>
          </div>
          <div class="editor-wrap">
            <pre id="highlight" class="editor-highlight" aria-hidden="true"></pre>
            <textarea id="workOrder" aria-label="WASM-002 Work Order editor" spellcheck="false" disabled># Human-facing Work Order name and comments live in the WKO itself
SUITCASE: .
WORK ORDER AS "Prepare monthly crime data"
SOURCE "35100178.csv"

KEEP
  HEADER "REF_DATE" AS "Year"
  HEADER "GEO"
  COLUMN 7 AS "Crime Rate"

MATERIALIZE</textarea>
          </div>
          <div class="actions" aria-label="Work Order actions">
            <button class="primary-btn" id="saveWorkOrderBtn" type="button" disabled>Save NEW Work Order TXT</button>
            <button class="term-btn" id="validateBtn" type="button" disabled>[V] Validate draft</button>
            <button class="term-btn" id="runBtn" type="button" disabled>[R] Run loaded saved Work Order</button>
            <button class="term-btn" id="helpBtn" type="button">[H] Help</button>
          </div>
          <div class="statusline" id="draftState">Draft locked · validate a Suitcase first.</div>
        </div>
      </article>
    </div>

    <div class="stack">
      <article class="panel" aria-labelledby="path-title">
        <div class="panel-head"><div id="path-title" class="panel-title">Execution output</div><div class="panel-note">Read-only · no command prompt</div></div>
        <div class="panel-body">
          <pre class="terminal-output" id="executionOutput" aria-live="polite">EXECUTION OUTPUT · READY
Waiting for a saved Work Order.</pre>
        </div>
      </article>
    </div>
  </section>

  <section class="lower">
    <article class="panel" aria-labelledby="diag-title">
      <div class="panel-head">
        <div id="diag-title" class="panel-title">Help Engine</div>
        <div style="display:flex;gap:8px;align-items:center"><label for="voice" class="panel-note">voice</label><select id="voice" class="voice-select" aria-label="Help voice"><option value="casual">Casual</option><option value="office" selected>Office Speak</option><option value="technical">Technical</option></select></div>
      </div>
      <div class="panel-body diag">
        <div id="diagArea" class="diag-summary"><span class="help">HELP ENGINE · READY</span></div>
        <div id="diagActions" class="diag-actions" hidden>
          <button class="term-btn" id="fullHelpBtn" type="button">[H] Full Help</button>
          <button class="term-btn" id="saveHelpBtn" type="button">[S] Save HTML Help Report to Suitcase</button>
        </div>
      </div>
    </article>
  </section>

  <section class="pretty-branding" aria-label="PRETTY Branding TOML editor">
    <article class="panel" aria-labelledby="pretty-brand-title">
      <div class="panel-head">
        <div id="pretty-brand-title" class="panel-title">PRETTY Branding TOML</div>
        <div class="panel-note">Saved only · not applied yet</div>
      </div>
      <div class="panel-body">
        <textarea id="prettyBrandToml" class="pretty-toml-editor" aria-label="PRETTY Branding TOML draft" spellcheck="false" disabled placeholder="# PRETTY Branding TOML
# Saved to the Suitcase only; no branding is applied yet."></textarea>
        <div class="actions">
          <button class="primary-btn" id="savePrettyBrandBtn" type="button" disabled>Save NEW Branding TOML</button>
        </div>
        <div class="statusline" id="prettyBrandState">Editor locked · validate a Suitcase first.</div>
      </div>
    </article>
  </section>

  <section class="data-dictionary" aria-label="User Data Dictionary TOML editor">
    <article class="panel" aria-labelledby="data-dictionary-title">
      <div class="panel-head">
        <div id="data-dictionary-title" class="panel-title">User Data Dictionary TOML</div>
        <div class="panel-note">Saved only · not applied yet</div>
      </div>
      <div class="panel-body">
        <textarea id="dataDictionaryToml" class="pretty-toml-editor" aria-label="User Data Dictionary TOML draft" spellcheck="false" disabled placeholder="# User Data Dictionary TOML
# Saved to the Suitcase only; no dictionary behavior is applied yet."></textarea>
        <div class="actions">
          <button class="primary-btn" id="saveDataDictionaryBtn" type="button" disabled>Save NEW Data Dictionary TOML</button>
        </div>
        <div class="statusline" id="dataDictionaryState">Editor locked · validate a Suitcase first.</div>
      </div>
    </article>
  </section>

  <section class="scope-strip" aria-label="Prototype scope boundary">
    <div class="scope-text"><strong>WASM-002 prototype:</strong> Suitcase → Work Order → Run → Evidence.</div>
    <div class="scope-tags"><span class="tag in">Storage Engine</span><span class="tag in">Help Engine</span><span class="tag out">Prototype only</span></div>
  </section>

  <footer class="footer"><span>Ctrl+Shift+S Save · Ctrl+Enter Run · F1 Help · Esc Clear Help</span><span>Prototype only · PRD remains authoritative</span></footer>
</main>

<script>
(() => {
  const workOrder=document.getElementById('workOrder');
  const highlight=document.getElementById('highlight');
  const woTitle=document.getElementById('wo-title');
  const woModeNote=document.getElementById('woModeNote');
  const draftState=document.getElementById('draftState');
  const suitcaseFilesBody=document.getElementById('suitcaseFilesBody');
  const refreshFilesBtn=document.getElementById('refreshFilesBtn');
  const diagArea=document.getElementById('diagArea');
  const diagActions=document.getElementById('diagActions');
  const voice=document.getElementById('voice');
  const ctxSuitcase=document.getElementById('ctxSuitcase');
  const ctxSource=document.getElementById('ctxSource');
  const ctxHeaders=document.getElementById('ctxHeaders');
  const ctxColumn=document.getElementById('ctxColumn');
  const ctxRunTarget=document.getElementById('ctxRunTarget');
  const suitcaseGate=document.getElementById('suitcaseGate');
  const suitcaseGateStatus=document.getElementById('suitcaseGateStatus');
  const saveWorkOrderBtn=document.getElementById('saveWorkOrderBtn');
  const validateBtn=document.getElementById('validateBtn');
  const runBtn=document.getElementById('runBtn');
  const savedWorkOrderSelect=document.getElementById('savedWorkOrderSelect');
  const loadWorkOrderBtn=document.getElementById('loadWorkOrderBtn');
  const executionOutput=document.getElementById('executionOutput');
  const prettyBrandToml=document.getElementById('prettyBrandToml');
  const savePrettyBrandBtn=document.getElementById('savePrettyBrandBtn');
  const prettyBrandState=document.getElementById('prettyBrandState');
  const dataDictionaryToml=document.getElementById('dataDictionaryToml');
  const saveDataDictionaryBtn=document.getElementById('saveDataDictionaryBtn');
  const dataDictionaryState=document.getElementById('dataDictionaryState');

  let suitcaseHandle=null;
  let suitcaseValidated=false;
  let sourceFile=null;
  let suitcaseFiles=[];
  let headers=[];
  let selectedHeader=null;
  let materialized=[];
  let selectedWorkOrderName=null;
  let workOrderMode='new'; // new | saved | derived
  let loadedSavedWorkOrderName=null;
  let aliases=new Map(); // physical filename -> human-facing alias
  const ALIAS_MAP_RE=/^__DS__MAP__(\d{8}T\d{9}Z)__([0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})\.csv$/;
  let activeAliasMapFilename=null;
  let currentDiagnostic=null;

  const esc=s=>String(s??'').replace(/[&<>"']/g,c=>({'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#39;'}[c]));
  const nowLabel=()=>new Date().toLocaleString([], {hour12:false});

  // Governed artifact identity helpers. Keep these browser-side helpers small, deterministic
  // in shape, and dependency-free so the same contract can later be owned by the Rust
  // Storage Engine without changing the visible filename semantics.
  function utcStamp(at=new Date()){
    return at.toISOString().replace(/[-:.]/g,'');
  }

  function uuidV4(){
    const c=globalThis.crypto;
    if(!c) throw new Error('Secure Web Crypto API is unavailable; cannot generate a governed artifact identity.');
    if(typeof c.randomUUID==='function') return c.randomUUID();
    if(typeof c.getRandomValues!=='function') throw new Error('Secure random UUID generation is unavailable in this browser context.');

    const bytes=new Uint8Array(16);
    c.getRandomValues(bytes);
    bytes[6]=(bytes[6]&0x0f)|0x40; // RFC 4122 / UUID v4 version bits
    bytes[8]=(bytes[8]&0x3f)|0x80; // RFC 4122 variant bits
    const hex=[...bytes].map(b=>b.toString(16).padStart(2,'0'));
    return `${hex.slice(0,4).join('')}-${hex.slice(4,6).join('')}-${hex.slice(6,8).join('')}-${hex.slice(8,10).join('')}-${hex.slice(10,16).join('')}`;
  }

  function makeFilename(cls,ext,{at=new Date(),uuid=uuidV4()}={}){
    const artifactClass=String(cls||'').trim().toUpperCase();
    const extension=String(ext||'').trim().toLowerCase();
    if(!/^[A-Z0-9]+$/.test(artifactClass)) throw new Error(`Invalid governed artifact class: ${cls}`);
    if(!/^[a-z0-9]+$/.test(extension)) throw new Error(`Invalid governed artifact extension: ${ext}`);
    return `__DS__${artifactClass}__${utcStamp(at)}__${uuid}.${extension}`;
  }

  function highlightLine(line){
    if(line.trim().startsWith('#')) return `<span class="tok-comment">${esc(line)}</span>`;
    const m=line.match(/^(\s*)([A-Z_]+)(\s*:\s*)(.*)$/);
    if(m){const op=m[2]==='OPERATION'?' tok-op':'';return `${esc(m[1])}<span class="tok-key${op}">${esc(m[2])}</span>${esc(m[3])}<span class="tok-value">${esc(m[4])}</span>`}
    return `<span class="tok-value">${esc(line)}</span>`;
  }
  function renderHighlight(){highlight.innerHTML=workOrder.value.split('\n').map(highlightLine).join('\n')+'\n';highlight.scrollTop=workOrder.scrollTop;highlight.scrollLeft=workOrder.scrollLeft}

  function setExecution(lines){executionOutput.textContent=Array.isArray(lines)?lines.join('\n'):String(lines||'');executionOutput.scrollTop=executionOutput.scrollHeight}
  function appendExecution(line=''){executionOutput.textContent+=(executionOutput.textContent?'\n':'')+line;executionOutput.scrollTop=executionOutput.scrollHeight}
  function resetExecution(){setExecution(['EXECUTION OUTPUT · READY','Waiting for a saved Work Order.'])}

  function wording(d,v){
    if(v==='casual') return `${d.observed} ${d.next}`;
    if(v==='technical') return `${d.phase}: ${d.observed} Safe next action: ${d.next}`;
    return `${d.observed} ${d.next}`;
  }
  function emitHelp(d){
    currentDiagnostic=d;
    const cls=d.severity==='ERROR'?'sev':(d.severity==='INFO'?'info':'help');
    diagArea.innerHTML=`<span class="${cls}">${esc(d.severity)} · ${esc(d.code)}</span>\n${esc(wording(d,voice.value))}<dl class="diag-grid"><dt>Source</dt><dd>Help Engine</dd><dt>Phase</dt><dd>${esc(d.phase)}</dd><dt>Canonical facts</dt><dd>${esc(JSON.stringify(d.facts||{},null,2))}</dd><dt>Safe next action</dt><dd>${esc(d.next)}</dd></dl>`;
    diagActions.hidden=false;
  }
  function clearHelp(){currentDiagnostic=null;diagArea.innerHTML='<span class="help">HELP ENGINE · READY</span>';diagActions.hidden=true}

  function requireSuitcase(phase){
    if(suitcaseValidated&&suitcaseHandle)return true;
    emitHelp({code:'PROTOTYPE-SUITCASE-GATE',severity:'ERROR',phase,observed:'The Suitcase gate has not been satisfied. Data Sculptor will not begin analytical work until a writable Suitcase is validated.',next:'Choose and validate the Suitcase folder first. Data Sculptor will test write access without asking you to name an artifact.',facts:{suitcase_validated:false,gate_required_first:true,user_chooses_folder:true,user_chooses_artifact_filename:false}});
    return false;
  }
  function isSavedWorkOrderName(name){
    return /^__DS__WKO__/i.test(String(name||'')) && /\.txt$/i.test(String(name||''));
  }

  function updateSavedWorkOrderPicker(){
    if(!savedWorkOrderSelect||!loadWorkOrderBtn)return;
    const saved=suitcaseFiles.filter(item=>isSavedWorkOrderName(item.name));
    const previous=savedWorkOrderSelect.value;
    if(!suitcaseValidated){
      savedWorkOrderSelect.innerHTML='<option value="">Validate a Suitcase first</option>';
      savedWorkOrderSelect.disabled=true;loadWorkOrderBtn.disabled=true;return;
    }
    if(!saved.length){
      savedWorkOrderSelect.innerHTML='<option value="">No saved Work Orders in this Suitcase</option>';
      savedWorkOrderSelect.disabled=true;loadWorkOrderBtn.disabled=true;return;
    }
    savedWorkOrderSelect.innerHTML='<option value="">Choose a saved Work Order (alias or filename)…</option>'+saved.map(item=>`<option value="${esc(item.name)}">${esc(item.name)}</option>`).join('');
    savedWorkOrderSelect.disabled=false;
    const preferred=(workOrderMode==='saved'&&selectedWorkOrderName)?selectedWorkOrderName:(loadedSavedWorkOrderName||previous);
    if(preferred&&saved.some(item=>item.name===preferred))savedWorkOrderSelect.value=preferred;
    loadWorkOrderBtn.disabled=!savedWorkOrderSelect.value;
  }

  async function loadWorkOrderFromPicker(){
    if(!requireSuitcase('WORK ORDER LOAD'))return;
    const name=savedWorkOrderSelect.value;
    if(!name){emitHelp({code:'PROTOTYPE-WO-LOAD-NONE',severity:'HELP',phase:'WORK ORDER LOAD',observed:'No saved Work Order is selected in the Work Order editor.',next:'Choose a saved WKO TXT from the list, then load it.',facts:{saved_work_order_selected:false}});return}
    const item=suitcaseFiles.find(x=>x.name===name&&isSavedWorkOrderName(x.name));
    if(!item){emitHelp({code:'PROTOTYPE-WO-LOAD-MISSING',severity:'ERROR',phase:'WORK ORDER LOAD',observed:'The selected saved Work Order is no longer visible in the Suitcase.',next:'Refresh the Suitcase directory and choose it again.',facts:{filename:name}});return}
    await loadSavedWorkOrder(item);
  }

  function updateWorkOrderUi(){
    const locked=!suitcaseValidated;
    if(locked){
      woTitle.textContent='Work Order — new draft';
      woModeNote.textContent='Only saved TXT can run';
      draftState.textContent='Draft locked · validate a Suitcase first.';
      runBtn.disabled=true;
      return;
    }
    if(workOrderMode==='saved' && selectedWorkOrderName){
      woTitle.textContent='Work Order — saved / immutable';
      woModeNote.textContent='Saved TXT · runnable';
      draftState.textContent=`Loaded saved Work Order: ${selectedWorkOrderName} · original TXT is immutable. Edit instructions to create a new draft.`;
      runBtn.disabled=false;
      runBtn.textContent='[R] Run loaded saved Work Order';
      return;
    }
    if(workOrderMode==='derived'){
      woTitle.textContent='Work Order — new draft from saved Work Order';
      woModeNote.textContent='Draft · save before run';
      draftState.textContent=`Derived draft: editable · ${loadedSavedWorkOrderName||'the original saved Work Order'} remains unchanged. Saving creates a new WKO TXT.`;
      runBtn.disabled=true;
      runBtn.textContent='[R] Run loaded saved Work Order';
      return;
    }
    woTitle.textContent='Work Order — new draft';
    woModeNote.textContent='Only saved TXT can run';
    draftState.textContent='Draft state: editable · saving creates a new immutable TXT artifact; it never overwrites a saved Work Order.';
    runBtn.disabled=true;
    runBtn.textContent='[R] Run loaded saved Work Order';
  }

  function updateRunTarget(){
    if(workOrderMode==='saved' && selectedWorkOrderName){
      ctxRunTarget.textContent=selectedWorkOrderName;ctxRunTarget.className='v ok';
    }else{
      ctxRunTarget.textContent='NO SAVED WORK ORDER LOADED';ctxRunTarget.className='v wait';
    }
    updateWorkOrderUi();
  }

  async function loadSavedWorkOrder(item){
    if(!requireSuitcase('WORK ORDER LOAD'))return;
    if(!item||!item.handle||!isSavedWorkOrderName(item.name))return;
    try{
      const file=item.file||await item.handle.getFile();
      const text=await file.text();
      workOrder.value=text;
      selectedWorkOrderName=item.name;
      loadedSavedWorkOrderName=item.name;
      workOrderMode='saved';
      renderHighlight();
      updateRunTarget();
      updateSavedWorkOrderPicker();
      workOrder.focus();
      emitHelp({code:'PROTOTYPE-WO-LOADED',severity:'INFO',phase:'WORK ORDER LOAD',observed:`Saved Work Order ${item.name} was loaded into the Work Order editor.`,next:'Run it as saved, or edit the instructions to create a new derived draft. The original TXT will not be overwritten.',facts:{filename:item.name,loaded_from_suitcase:true,original_immutable:true,double_click_load:true,execution_requires_saved_work_order:true}});
    }catch(err){
      emitHelp({code:'PROTOTYPE-WO-LOAD-FAILED',severity:'ERROR',phase:'WORK ORDER LOAD',observed:`The saved Work Order ${item.name} could not be loaded.`,next:'Refresh the Suitcase directory and try again.',facts:{filename:item.name,error:String(err)}});
    }
  }

  function updateWorkspaceGate(){
    const locked=!suitcaseValidated;
    refreshFilesBtn.disabled=locked;
    workOrder.disabled=locked;
    saveWorkOrderBtn.disabled=locked;
    validateBtn.disabled=locked;
    runBtn.disabled=true;
    prettyBrandToml.disabled=locked;
    savePrettyBrandBtn.disabled=locked;
    prettyBrandState.textContent=locked?'Editor locked · validate a Suitcase first.':'Editable · saved TOML is retained in the Suitcase but is not parsed or applied yet.';
    dataDictionaryToml.disabled=locked;
    saveDataDictionaryBtn.disabled=locked;
    dataDictionaryState.textContent=locked?'Editor locked · validate a Suitcase first.':'Editable · saved TOML is retained in the Suitcase but is not parsed or applied yet.';
    if(locked){
      suitcaseGate.classList.remove('ready');
      suitcaseGateStatus.textContent='NOT VALIDATED · workspace controls are locked';
      suitcaseBtn.textContent='Choose & validate Suitcase';
      ctxSource.textContent='LOCKED UNTIL SUITCASE VALIDATES';ctxSource.className='v wait';
      ctxHeaders.textContent='LOCKED';ctxHeaders.className='v wait';
      suitcaseFiles=[];renderSuitcaseFiles();
      updateWorkOrderUi();
    }else{
      suitcaseGate.classList.add('ready');
      suitcaseGateStatus.textContent=`VALIDATED · selected folder: ${suitcaseHandle.name} · workspace unlocked`;
      suitcaseBtn.textContent='Change & revalidate Suitcase';
      if(!sourceFile){
        ctxSource.textContent='AWAITING WORK ORDER';ctxSource.className='v wait';
        ctxHeaders.textContent='AWAITING RUN';ctxHeaders.className='v wait';
      }else{
        ctxSource.textContent=sourceFile.name;ctxSource.className='v ok';
        ctxHeaders.textContent=`${headers.length} DETECTED`;ctxHeaders.className='v ok';
      }
      updateWorkOrderUi();
    }
    renderHeaders();
    updateSavedWorkOrderPicker();
  }

  function renderHeaders(){
    if(!sourceFile){
      if(suitcaseValidated){ctxHeaders.textContent='AWAITING RUN';ctxHeaders.className='v wait'}
      return;
    }
    ctxHeaders.textContent=`${headers.length} DETECTED`;ctxHeaders.className='v ok';
  }

  function renderMappings(){
    // Physical artifacts are shown in the Suitcase directory; no separate mapping panel.
  }

  function parseCsvLine(line){
    const out=[];let field='',quoted=false;
    for(let i=0;i<line.length;i++){
      const ch=line[i];
      if(quoted){
        if(ch==='"'){if(line[i+1]==='"'){field+='"';i++}else quoted=false}
        else field+=ch;
      }else{
        if(ch==='"')quoted=true;
        else if(ch===','){out.push(field);field=''}
        else field+=ch;
      }
    }
    out.push(field);return out;
  }

  function aliasMapIdentity(name){
    const m=ALIAS_MAP_RE.exec(String(name||''));
    return m?{timestamp:m[1],uuid:m[2]}:null;
  }

  // Alias state is read-only in the browser directory. Governed Work Orders own alias mutation.
  // Revision AK: display aliases from the canonical five-column materialized-column MAP.
  async function loadAliasMapFromSuitcase(){
    aliases=new Map();
    activeAliasMapFilename=null;
    if(!suitcaseHandle)return;
    const expectedHeader=['source_filename','source_column_number','source_header','alias','column_filename'];
    const candidates=[];
    for(const item of suitcaseFiles){
      const ident=aliasMapIdentity(item.name);
      if(!ident)continue;
      try{
        const file=item.file||await item.handle.getFile();
        const text=await file.text();
        if(text.charCodeAt(0)===0xFEFF)continue; // canonical MAP is UTF-8 without BOM
        const lines=text.split(/\n/).filter((line,i,arr)=>!(i===arr.length-1&&line===''));
        if(!lines.length)continue;
        const header=parseCsvLine(lines[0].replace(/\r$/,'')).map(x=>String(x??''));
        if(header.length!==expectedHeader.length||header.some((v,i)=>v!==expectedHeader[i]))continue;
        const rows=[];
        const keys=new Set();
        let valid=true;
        for(let i=1;i<lines.length;i++){
          const row=parseCsvLine(lines[i].replace(/\r$/,''));
          if(row.length!==5){valid=false;break}
          const [sourceFilename,columnNumberText,sourceHeader,alias,columnFilename]=row;
          const columnNumber=Number(columnNumberText);
          const key=`${sourceFilename}\u0000${columnNumberText}\u0000${sourceHeader}`;
          if(!sourceFilename||!Number.isInteger(columnNumber)||columnNumber<1||!alias||!columnFilename||keys.has(key)){valid=false;break}
          const target=suitcaseFiles.find(x=>x.name===columnFilename);
          if(!target||!/^__DS__COL__\d{8}T\d{9}Z__[0-9a-f-]{36}\.[a-z0-9]+$/.test(columnFilename)){valid=false;break}
          keys.add(key);
          rows.push({sourceFilename,columnNumber,sourceHeader,alias,columnFilename});
        }
        if(valid)candidates.push({item,ident,rows});
      }catch(err){
        emitHelp({code:'PROTOTYPE-ALIAS-MAP-READ-FAILED',severity:'ERROR',phase:'ALIAS MAP',observed:`Candidate alias MAP ${item.name} could not be read.`,next:'Inspect the MAP artifact or explicitly name a valid historical MAP in the governed Work Order once that syntax is frozen.',facts:{mapping_file:item.name,error:String(err)}});
      }
    }
    if(!candidates.length)return;
    candidates.sort((a,b)=>b.ident.timestamp.localeCompare(a.ident.timestamp));
    const newestStamp=candidates[0].ident.timestamp;
    const newest=candidates.filter(x=>x.ident.timestamp===newestStamp);
    if(newest.length!==1){
      emitHelp({code:'PROTOTYPE-ALIAS-MAP-AMBIGUOUS-LATEST',severity:'ERROR',phase:'ALIAS MAP',observed:`${newest.length} valid alias MAP artifacts share the latest UTC millisecond timestamp ${newestStamp}.`,next:'Do not infer chronology from UUID. Explicitly identify the MAP to use in the governed Work Order.',facts:{latest_timestamp:newestStamp,candidate_maps:newest.map(x=>x.item.name),uuid_is_not_chronology:true}});
      return;
    }
    const chosen=newest[0];
    activeAliasMapFilename=chosen.item.name;
    for(const row of chosen.rows)aliases.set(row.columnFilename,row.alias);
  }

  function aliasKey(value){return String(value??'').trim().toLocaleLowerCase()}

  function resolveSuitcaseFile(reference){
    const token=String(reference??'').trim();
    const physical=suitcaseFiles.find(x=>x.name===token);
    if(physical)return {item:physical,via:'filename',reference:token};
    const match=suitcaseFiles.find(x=>aliasKey(aliases.get(x.name)||'')===aliasKey(token)&&token);
    return match?{item:match,via:'alias',reference:token}:null;
  }

  function formatBytes(n){
    if(!Number.isFinite(n))return '—';
    const units=['B','KiB','MiB','GiB','TiB'];let v=n,i=0;
    while(v>=1024&&i<units.length-1){v/=1024;i++}
    const d=i===0?0:(v>=100?0:(v>=10?1:2));
    return `${v.toFixed(d)} ${units[i]}`;
  }

  function mimeForSuitcaseFile(name,reportedType=''){
    if(reportedType)return reportedType;
    const ext=(String(name).toLowerCase().split('.').pop()||'');
    const mime={
      txt:'text/plain',toml:'text/plain',csv:'text/csv',json:'application/json',xml:'application/xml',
      html:'text/html',htm:'text/html',css:'text/css',js:'text/javascript',md:'text/markdown',
      png:'image/png',jpg:'image/jpeg',jpeg:'image/jpeg',gif:'image/gif',webp:'image/webp',svg:'image/svg+xml',bmp:'image/bmp',
      pdf:'application/pdf',
      mp3:'audio/mpeg',m4a:'audio/mp4',wav:'audio/wav',ogg:'audio/ogg',
      mp4:'video/mp4',webm:'video/webm',mov:'video/quicktime',
      zip:'application/zip',
      docx:'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
      xlsx:'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
      pptx:'application/vnd.openxmlformats-officedocument.presentationml.presentation'
    };
    return mime[ext]||'application/octet-stream';
  }

  async function openSuitcaseFile(item){
    if(!item||!item.handle)return;
    // Open the tab synchronously from the double-click so Chromium treats this as
    // a direct user action rather than a scripted pop-up after asynchronous I/O.
    const viewer=window.open('about:blank','_blank');
    if(!viewer){
      emitHelp({code:'PROTOTYPE-FILE-OPEN-BLOCKED',severity:'ERROR',phase:'SUITCASE DIRECTORY',observed:`The browser blocked the new tab for ${item.name}.`,next:'Allow pop-ups for this local prototype and double-click the file again.',facts:{filename:item.name,double_click_open:true,file_executed:false}});
      return;
    }
    try{
      // The opened artifact must not be able to navigate back into the prototype
      // through window.opener. Double-click is inspection/opening only, never execution.
      try{viewer.opener=null}catch{}
      try{
        viewer.document.title=`Opening ${item.name}`;
        viewer.document.body.style.cssText='margin:24px;background:#0b1018;color:#dce9f7;font:14px ui-monospace,Consolas,monospace';
        viewer.document.body.textContent=`Opening ${item.name}…`;
      }catch{}
      const file=item.file||await item.handle.getFile();
      const mime=mimeForSuitcaseFile(item.name,file.type);
      const blob=(file.type===mime||!mime)?file:file.slice(0,file.size,mime);
      const url=URL.createObjectURL(blob);
      viewer.location.replace(url);
      // Give the new tab ample time to load/read the Blob URL, including large files.
      setTimeout(()=>URL.revokeObjectURL(url),60*60*1000);
    }catch(err){
      try{viewer.close()}catch{}
      emitHelp({code:'PROTOTYPE-FILE-OPEN-FAILED',severity:'ERROR',phase:'SUITCASE DIRECTORY',observed:`Data Sculptor could not open ${item.name}.`,next:'Refresh the Suitcase directory and try again. Browser-supported formats open in a new tab; unsupported formats follow the browser’s normal file handling.',facts:{filename:item.name,error:String(err),double_click_open:true,file_executed:false}});
    }
  }

  function renderSuitcaseFiles(){
    if(!suitcaseValidated||!suitcaseHandle){
      suitcaseFilesBody.innerHTML='<tr><td colspan="4" class="saved-empty">Validate a Suitcase to see its files.</td></tr>';updateSavedWorkOrderPicker();return;
    }
    if(!suitcaseFiles.length){
      suitcaseFilesBody.innerHTML='<tr><td colspan="4" class="saved-empty">This Suitcase is empty.</td></tr>';updateSavedWorkOrderPicker();return;
    }
    suitcaseFilesBody.innerHTML=suitcaseFiles.map(item=>{
      const lower=item.name.toLowerCase();
      const csv=lower.endsWith('.csv');
      const type=csv?'CSV':(lower.endsWith('.txt')?'TXT':(lower.endsWith('.html')||lower.endsWith('.htm')?'HTML':(lower.includes('.')?lower.split('.').pop().toUpperCase():'FILE')));
      const aliasMap=Boolean(aliasMapIdentity(item.name));
      const activeAliasMap=item.name===activeAliasMapFilename;
      const alias=aliases.get(item.name)||'';
      const aliasCell=aliasMap
        ? `<span class="tiny-badge lock">${activeAliasMap?'ACTIVE ALIAS MAP':'MAP HISTORY'}</span>`
        : (alias
          ? `<span class="alias-display" title="Alias assigned through governed Work Order">${esc(alias)}</span>`
          : '<span class="alias-display empty" title="No alias assigned · assign aliases through a governed Work Order">—</span>');
      const openTitle=isSavedWorkOrderName(item.name)?`Double-click to load ${item.name} into the Work Order editor`:`Double-click to open ${item.name}`;
      return `<tr class="file-entry" data-open-file="${esc(item.name)}" title="${esc(openTitle)}"><td class="filename">${esc(item.name)}</td><td>${aliasCell}</td><td class="file-kind">${esc(type)}</td><td class="file-size">${esc(formatBytes(item.size))}</td></tr>`;
    }).join('');
    suitcaseFilesBody.querySelectorAll('tr[data-open-file]').forEach(row=>{
      row.addEventListener('dblclick',e=>{
        if(e.target.closest('input,button,select,textarea,a'))return;
        const item=suitcaseFiles.find(x=>x.name===row.dataset.openFile);
        if(!item)return;
        if(isSavedWorkOrderName(item.name))loadSavedWorkOrder(item);
        else openSuitcaseFile(item);
      });
    });
    updateSavedWorkOrderPicker();
  }


  async function refreshSuitcaseFilesFromSuitcase(){
    if(!suitcaseHandle){suitcaseFiles=[];renderSuitcaseFiles();return}
    const found=[];
    try{
      for await(const [name,handle] of suitcaseHandle.entries()){
        if(handle.kind!=='file')continue;
        try{
          const f=await handle.getFile();
          found.push({name,handle,file:f,size:f.size,lastModified:f.lastModified});
        }catch{
          found.push({name,handle,file:null,size:NaN,lastModified:0});
        }
      }
    }catch(err){
      emitHelp({code:'PROTOTYPE-SUITCASE-LIST-FAILED',severity:'ERROR',phase:'SUITCASE DIRECTORY',observed:'Data Sculptor could not enumerate the selected Suitcase directory.',next:'Revalidate the Suitcase and try Refresh.',facts:{error:String(err)}});
    }
    found.sort((a,b)=>a.name.localeCompare(b.name,undefined,{numeric:true,sensitivity:'base'}));
    suitcaseFiles=found;
    await loadAliasMapFromSuitcase();
    if(workOrderMode==='saved' && selectedWorkOrderName && !suitcaseFiles.some(x=>x.name===selectedWorkOrderName)){
      loadedSavedWorkOrderName=selectedWorkOrderName;
      selectedWorkOrderName=null;
      workOrderMode='derived';
      updateRunTarget();
    }
    renderSuitcaseFiles();
  }

  async function authorizeSuitcase(){
    if(!window.showDirectoryPicker){
      suitcaseValidated=false;updateWorkspaceGate();
      ctxSuitcase.textContent='DIRECTORY API UNAVAILABLE';ctxSuitcase.className='v err';
      emitHelp({code:'PROTOTYPE-SUITCASE-API-UNAVAILABLE',severity:'ERROR',phase:'SUITCASE VALIDATION',observed:'This browser context does not expose the directory picker needed to validate a Suitcase without a Save As filename dialog.',next:'Open the prototype in a current Chromium-based browser context that supports the File System Access API.',facts:{directory_picker:false,no_filename_prompt_required:true,gate_required_first:true}});return;
    }
    try{
      const candidate=await window.showDirectoryPicker({mode:'readwrite'});
      let permission='granted';
      if(candidate.queryPermission)permission=await candidate.queryPermission({mode:'readwrite'});
      if(permission!=='granted'&&candidate.requestPermission)permission=await candidate.requestPermission({mode:'readwrite'});
      if(permission!=='granted')throw new Error('Read/write permission was not granted for the selected folder.');

      const probe=`__DS_SCR_SUITCASE_VALIDATION__${utcStamp()}__${uuidV4()}.tmp`;
      let probeCreated=false;
      try{
        const h=await candidate.getFileHandle(probe,{create:true});probeCreated=true;
        const w=await h.createWritable();await w.write('Red5Sorcery Data Sculptor Suitcase validation probe.\n');await w.close();
        await candidate.removeEntry(probe);probeCreated=false;
      }catch(err){
        if(probeCreated){try{await candidate.removeEntry(probe)}catch{}}
        throw new Error(`Suitcase write/delete validation failed: ${err&&err.message?err.message:String(err)}`);
      }

      suitcaseHandle=candidate;suitcaseValidated=true;
      sourceFile=null;headers=[];selectedHeader=null;materialized=[];
      selectedWorkOrderName=null;loadedSavedWorkOrderName=null;workOrderMode='new';aliases=new Map();
      ctxSource.textContent='AWAITING WORK ORDER';ctxSource.className='v wait';
      ctxHeaders.textContent='AWAITING RUN';ctxHeaders.className='v wait';
      ctxColumn.textContent='NONE';ctxColumn.className='v wait';
      updateRunTarget();renderHeaders();renderMappings();resetExecution();
      ctxSuitcase.textContent=`${suitcaseHandle.name} · VALIDATED`;ctxSuitcase.className='v ok';
      ctxSuitcase.title='Selected Suitcase folder name. The browser does not expose the full Windows absolute path to this page.';
      updateWorkspaceGate();
      await refreshSuitcaseFilesFromSuitcase();
      emitHelp({code:'PROTOTYPE-SUITCASE-VALIDATED',severity:'INFO',phase:'SUITCASE VALIDATION',observed:`Suitcase folder “${suitcaseHandle.name}” passed the writable-folder validation gate. Its visible files are now listed in the Suitcase directory.`,next:'Author and save a Work Order. The Work Order names the source and requested column.',facts:{suitcase_folder_name:suitcaseHandle.name,absolute_path_exposed:false,suitcase_validated:true,suitcase_file_count:suitcaseFiles.length,source_selected:false,headers_scanned:false,write_probe_pass:true,probe_removed:true,flat_artifacts:true,no_subfolder_created:true,user_chooses_filename:false}})
    }catch(err){
      if(err&&err.name==='AbortError')return;
      suitcaseHandle=null;suitcaseValidated=false;updateWorkspaceGate();ctxSuitcase.textContent='VALIDATION FAILED';ctxSuitcase.className='v err';
      emitHelp({code:'PROTOTYPE-SUITCASE-VALIDATION-FAILED',severity:'ERROR',phase:'SUITCASE VALIDATION',observed:'The selected folder did not pass the Suitcase validation gate.',next:'Choose a writable folder and validate again. No analytical work is enabled until the gate passes.',facts:{suitcase_validated:false,error:String(err),gate_required_first:true}})
    }
  }

  async function parseFirstCsvRecord(file){
    const text=await file.slice(0,1024*1024).text();
    let fields=[],field='',quoted=false;
    for(let i=0;i<text.length;i++){
      const ch=text[i];
      if(quoted){if(ch==='"'){if(text[i+1]==='"'){field+='"';i++}else quoted=false}else field+=ch}
      else{if(ch==='"')quoted=true;else if(ch===','){fields.push(field);field=''}else if(ch==='\n'||ch==='\r'){fields.push(field);break}else field+=ch}
    }
    return fields.map((x,i)=>x.replace(/^\uFEFF/,'').trim()||`Column_${i+1}`)
  }


  async function writeTextToSuitcase(filename,text,mime='text/plain'){
    if(!suitcaseHandle) throw new Error('Suitcase not authorized');
    const handle=await suitcaseHandle.getFileHandle(filename,{create:true});
    const writable=await handle.createWritable();await writable.write(new Blob([text],{type:mime+';charset=utf-8'}));await writable.close();return handle
  }

  function stripDsComment(raw){
    let quoted=false;
    for(let i=0;i<raw.length;i++){
      const ch=raw[i];
      if(ch==='"') quoted=!quoted;
      else if(ch==='#'&&!quoted) return raw.slice(0,i);
    }
    return raw;
  }

  function parseWorkOrder(text){
    const lines=text.replace(/\r\n?/g,'\n').split('\n');
    let suitcase=false,source='',inKeep=false,materialize=false,workOrderAlias=null;
    const selectors=[],problems=[];
    for(const raw of lines){
      const line=stripDsComment(raw).trim();
      if(!line)continue;
      if(/^SUITCASE:\s*\.\s*$/i.test(line)){suitcase=true;continue}
      let m=line.match(/^WORK\s+ORDER\s+AS\s+"([^"]*)"\s*$/i);
      if(m){if(workOrderAlias!==null)problems.push('WORK ORDER AS may appear at most once.');else workOrderAlias=m[1];continue}
      m=line.match(/^SOURCE\s+"([^"]*)"\s*$/i);
      if(m){source=m[1];continue}
      if(/^KEEP\s*$/i.test(line)){inKeep=true;continue}
      if(/^MATERIALIZE\s*$/i.test(line)){materialize=true;inKeep=false;continue}
      if(inKeep){
        m=line.match(/^HEADER\s+"([^"]*)"(?:\s+AS\s+"([^"]*)")?\s*$/i);
        if(m){selectors.push({kind:'HEADER',value:m[1],alias:m[2]??null});continue}
        m=line.match(/^COLUMN\s+([+-]?\d+)(?:\s+AS\s+"([^"]*)")?\s*$/i);
        if(m){selectors.push({kind:'COLUMN',value:Number(m[1]),alias:m[2]??null});continue}
      }
      problems.push(`Unrecognized line: ${line}`);
    }
    if(!suitcase)problems.push('SUITCASE: . is missing.');
    if(workOrderAlias!==null&&!workOrderAlias.length)problems.push('WORK ORDER AS alias must not be empty.');
    if(!source)problems.push('SOURCE "..." is missing.');
    if(!selectors.length)problems.push('KEEP must contain at least one HEADER or COLUMN selector.');
    if(!materialize)problems.push('MATERIALIZE is missing.');
    for(const s of selectors){
      if(s.kind==='COLUMN'&&(!Number.isInteger(s.value)||s.value<1))problems.push(`Invalid 1-based COLUMN ordinal: ${s.value}`);
      if(s.alias!==null&&!s.alias.length)problems.push('AS alias must not be empty.');
    }
    return {suitcase,workOrderAlias,source,selectors,materialize,problems};
  }

  function validateWorkOrder(text){
    if(!requireSuitcase('WORK ORDER VALIDATION'))return false;
    if(!text.trim()){emitHelp({code:'PROTOTYPE-WO-VALIDATION-FAILED',severity:'ERROR',phase:'WORK ORDER VALIDATION',observed:'Draft is empty.',next:'Enter a DS-STEPS materialization Work Order and validate again.',facts:{problems:['Draft is empty.']}});return false}
    const spec=parseWorkOrder(text);
    if(spec.problems.length){emitHelp({code:'PROTOTYPE-WO-VALIDATION-FAILED',severity:'ERROR',phase:'WORK ORDER VALIDATION',observed:spec.problems.join(' '),next:'Correct the draft and validate again.',facts:{problems:spec.problems}});return false}
    emitHelp({code:'PROTOTYPE-WO-VALIDATION-PASS',severity:'INFO',phase:'WORK ORDER VALIDATION',observed:'The draft satisfies the Revision BB bounded DS-STEPS materialization shape.',next:'Save it as a new immutable Work Order TXT when you are ready. Runtime source/header/alias resolution occurs when the saved Work Order is run.',facts:{prototype_validation_only:true,revision:'BB',work_order_alias:spec.workOrderAlias,selectors:spec.selectors.length}});
    return true
  }

  async function saveNewWorkOrder(){
    if(!requireSuitcase('WORK ORDER SAVE'))return;
    const text=workOrder.value;if(!validateWorkOrder(text))return;
    const filename=makeFilename('WKO','txt');
    try{
      await writeTextToSuitcase(filename,text,'text/plain');
      selectedWorkOrderName=filename;loadedSavedWorkOrderName=filename;workOrderMode='saved';
      await refreshSuitcaseFilesFromSuitcase();
      updateRunTarget();
      emitHelp({code:'PROTOTYPE-WO-SAVED',severity:'INFO',phase:'WORK ORDER SAVE',observed:`A new immutable Work Order was saved as ${filename} and is now loaded in the Work Order editor.`,next:'Run the saved Work Order, or edit its instructions to create a new derived draft. The saved TXT will not be overwritten.',facts:{filename,suitcase:suitcaseHandle.name,user_chose_filename:false,work_order_editable_after_save:false,work_order_alias:parseWorkOrder(text).workOrderAlias,work_order_alias_in_wko:true,loaded_as_run_target:true}})
    }catch(err){emitHelp({code:'PROTOTYPE-WO-SAVE-FAILED',severity:'ERROR',phase:'WORK ORDER SAVE',observed:'The Work Order TXT could not be written to the authorized Suitcase.',next:'Check folder permission and try saving again.',facts:{error:String(err)}})}
  }


  async function runSelected(){
    if(!requireSuitcase('RUN'))return;
    if(workOrderMode!=='saved'||!selectedWorkOrderName){emitHelp({code:'PROTOTYPE-RUN-NO-SAVED-WO',severity:'ERROR',phase:'RUN',observed:'No saved Work Order is loaded as the Run target.',next:'Save the current draft, or double-click a saved WKO TXT in the Suitcase directory to load it.',facts:{saved_run_target:false,transient_editor_is_run_target:false}});return}
    const item=suitcaseFiles.find(x=>x.name===selectedWorkOrderName);if(!item){emitHelp({code:'PROTOTYPE-RUN-WO-MISSING',severity:'ERROR',phase:'RUN',observed:'The loaded saved Work Order is no longer visible in the Suitcase.',next:'Refresh the Suitcase directory and load a saved Work Order again.',facts:{filename:selectedWorkOrderName}});return}
    let text='';try{text=await (await item.handle.getFile()).text()}catch(err){emitHelp({code:'PROTOTYPE-RUN-WO-READ-FAILED',severity:'ERROR',phase:'RUN',observed:'The loaded saved Work Order could not be read from the Suitcase.',next:'Re-authorize the Suitcase or double-click another saved Work Order in the directory.',facts:{filename:selectedWorkOrderName,error:String(err)}});return}
    if(!validateWorkOrder(text))return;
    const spec=parseWorkOrder(text);
    setExecution([`> RUN ${selectedWorkOrderName}`,'WORK ORDER VALIDATED','Operation: MATERIALIZE',`Source requested: ${spec.source}`,`KEEP selectors: ${spec.selectors.map(s=>s.kind+' '+s.value+(s.alias!==null?' AS '+s.alias:'')).join(' | ')}`]);

    const sourceResolution=resolveSuitcaseFile(spec.source);
    if(!sourceResolution){
      appendExecution('REFUSED · source alias or filename not found in Suitcase');
      sourceFile=null;headers=[];selectedHeader=null;ctxSource.textContent='SOURCE NOT FOUND';ctxSource.className='v err';ctxHeaders.textContent='NOT SCANNED';ctxHeaders.className='v wait';ctxColumn.textContent='NONE';ctxColumn.className='v wait';renderHeaders();
      emitHelp({code:'PROTOTYPE-SOURCE-NOT-FOUND',severity:'ERROR',phase:'RUN',observed:`Source “${spec.source}” did not resolve to a Suitcase filename or alias.`,next:'Correct the SOURCE line in a new Work Order, or assign the intended alias through a governed Work Order.',facts:{source_requested:spec.source,suitcase:suitcaseHandle.name,mapping_file:activeAliasMapFilename}});return;
    }
    const sourceItem=sourceResolution.item;
    if(!sourceItem.name.toLowerCase().endsWith('.csv')){
      appendExecution('REFUSED · resolved SOURCE is not a CSV file');
      emitHelp({code:'PROTOTYPE-SOURCE-NOT-CSV',severity:'ERROR',phase:'RUN',observed:`Source “${spec.source}” resolves to ${sourceItem.name}, which is not a CSV file.`,next:'Create and save a new Work Order naming a CSV filename or CSV alias.',facts:{source_requested:spec.source,resolved_filename:sourceItem.name,resolved_via:sourceResolution.via}});return;
    }

    try{
      const f=sourceItem.file || await sourceItem.handle.getFile();
      sourceFile=f;ctxSource.textContent=(aliases.get(f.name)||f.name);ctxSource.className='v ok';
      appendExecution(sourceResolution.via==='alias'?`Source alias resolved: ${spec.source} → ${f.name}`:`Source filename resolved: ${f.name}`);
      appendExecution(`Source found: ${f.name} (${formatBytes(f.size)})`);
      appendExecution('Reading header…');
      headers=await parseFirstCsvRecord(f);
      appendExecution(`${headers.length} columns detected`);
      const resolvedSelections=[];
      const seenOrdinals=new Set();
      const requestedAliases=new Set();
      for(const sel of spec.selectors){
        let ordinal=0,header='';
        if(sel.kind==='HEADER'){
          const matches=[];for(let i=0;i<headers.length;i++)if(headers[i]===sel.value)matches.push(i+1);
          if(matches.length!==1){
            appendExecution(`REFUSED · HEADER "${sel.value}" matched ${matches.length} columns`);
            emitHelp({code:'PROTOTYPE-COLUMN-HEADER-AMBIGUOUS',severity:'ERROR',phase:'RUN',observed:`HEADER "${sel.value}" matched ${matches.length} source columns.`,next:'Use an exact unique HEADER or a 1-based COLUMN ordinal.',facts:{source:f.name,header:sel.value,matches}});
            return;
          }
          ordinal=matches[0];header=headers[ordinal-1];
        }else{
          ordinal=sel.value;
          if(ordinal<1||ordinal>headers.length){
            appendExecution(`REFUSED · COLUMN ${ordinal} is outside 1..${headers.length}`);
            emitHelp({code:'PROTOTYPE-COLUMN-ORDINAL-OUT-OF-RANGE',severity:'ERROR',phase:'RUN',observed:`COLUMN ${ordinal} is outside the source width.`,next:`Use a COLUMN ordinal from 1 through ${headers.length}.`,facts:{source:f.name,ordinal,source_width:headers.length}});
            return;
          }
          header=headers[ordinal-1];
        }
        if(seenOrdinals.has(ordinal)){
          appendExecution(`REFUSED · source column ${ordinal} selected more than once`);
          emitHelp({code:'PROTOTYPE-COLUMN-DUPLICATE-SELECTION',severity:'ERROR',phase:'RUN',observed:`Source column ${ordinal} was selected more than once.`,next:'Keep only one selector for each source column.',facts:{source:f.name,ordinal,header}});
          return;
        }
        seenOrdinals.add(ordinal);
        const priorAlias=[...aliases.entries()].find(([fn,a])=>a&&fn&&a);
        const alias=sel.alias!==null?sel.alias:header; // interaction prototype does not reconstruct logical-key inheritance
        if(requestedAliases.has(alias)){
          appendExecution(`REFUSED · duplicate resulting alias: ${alias}`);
          emitHelp({code:'PROTOTYPE-ALIAS-DUPLICATE',severity:'ERROR',phase:'RUN',observed:`Two selected columns would use alias "${alias}".`,next:'Assign unique aliases with AS in a new Work Order.',facts:{alias}});
          return;
        }
        requestedAliases.add(alias);
        resolvedSelections.push({ordinal,header,alias});
      }
      selectedHeader=resolvedSelections.length===1?resolvedSelections[0].header:`${resolvedSelections.length} columns`;
      ctxColumn.textContent=resolvedSelections.map(x=>x.alias).join(', ');ctxColumn.className='v ok';renderHeaders();
      for(const x of resolvedSelections)appendExecution(`Resolved: COLUMN ${x.ordinal} · HEADER "${x.header}" · ALIAS "${x.alias}"`);
      appendExecution('Whole-source certification: SIMULATED');
      const created=[];
      for(const x of resolvedSelections){
        const filename=makeFilename('COL','csv');
        materialized.push({alias:x.alias,filename});
        created.push({ordinal:x.ordinal,header:x.header,alias:x.alias,filename});
        appendExecution(`Storage Engine filename: ${filename} ← ${x.alias}`);
      }
      renderMappings();
      appendExecution('Materialization: SIMULATED · Rust/WASM engine not connected');
      appendExecution('MAP successor: SIMULATED · Revision AL resolved mapping semantics');
      appendExecution('COMPLETE · interaction prototype');
      emitHelp({code:'PROTOTYPE-RUN-SIMULATION',severity:'INFO',phase:'RUN',observed:`The saved Work Order resolved ${resolvedSelections.length} KEEP selector(s) against ${f.name}.`,next:'Treat the execution output as interaction evidence only; no Rust/WASM analytical execution occurs in this HTML prototype.',facts:{run_target:selectedWorkOrderName,source_reference:spec.source,resolved_source_filename:f.name,resolved_via:sourceResolution.via,selections:created,alias_mapping_file:activeAliasMapFilename,revision:'AL',transient_editor_is_run_target:false,real_wasm_execution:false,user_clicked_source:false,user_clicked_column:false}});
    }catch(err){
      appendExecution(`FAILED · ${String(err)}`);
      emitHelp({code:'PROTOTYPE-RUN-FAILED',severity:'ERROR',phase:'RUN',observed:'The prototype could not resolve the Work Order against the selected Suitcase.',next:'Review the Help facts and create a corrected Work Order if needed.',facts:{error:String(err),run_target:selectedWorkOrderName}});
    }
  }

  async function savePrettyBrandToml(){
    if(!requireSuitcase('PRETTY BRANDING SAVE'))return;
    const text=prettyBrandToml.value;
    if(!text.trim()){
      emitHelp({code:'PROTOTYPE-PRETTY-BRAND-EMPTY',severity:'ERROR',phase:'PRETTY BRANDING SAVE',observed:'No PRETTY Branding TOML content has been entered.',next:'Enter TOML text before saving.',facts:{artifact_class:'BRD',format:'TOML',parsed:false,applied:false}});
      return;
    }
    const filename=makeFilename('BRD','toml');
    const payload=text.endsWith('\n')?text:text+'\n';
    try{
      await writeTextToSuitcase(filename,payload,'application/toml');
      await refreshSuitcaseFilesFromSuitcase();
      prettyBrandState.innerHTML=`Saved as <strong>${esc(filename)}</strong> · not applied`;
      emitHelp({code:'PROTOTYPE-PRETTY-BRAND-SAVED',severity:'INFO',phase:'PRETTY BRANDING SAVE',observed:`PRETTY Branding TOML was saved as ${filename}.`,next:'No branding behavior changes in this prototype. The TOML remains a visible Suitcase artifact for later PRETTY work.',facts:{filename,artifact_class:'BRD',format:'TOML',parsed:false,applied:false,user_chose_filename:false,suitcase:suitcaseHandle.name}});
    }catch(err){
      emitHelp({code:'PROTOTYPE-PRETTY-BRAND-SAVE-FAILED',severity:'ERROR',phase:'PRETTY BRANDING SAVE',observed:'The PRETTY Branding TOML file could not be written to the authorized Suitcase.',next:'Check Suitcase write permission and try again.',facts:{error:String(err),artifact_class:'BRD',format:'TOML',applied:false}});
    }
  }

  async function saveDataDictionaryToml(){
    if(!requireSuitcase('DATA DICTIONARY SAVE'))return;
    const text=dataDictionaryToml.value;
    if(!text.trim()){
      emitHelp({code:'PROTOTYPE-DATA-DICTIONARY-EMPTY',severity:'ERROR',phase:'DATA DICTIONARY SAVE',observed:'No User Data Dictionary TOML content has been entered.',next:'Enter TOML text before saving.',facts:{artifact_class:'DDC',format:'TOML',parsed:false,applied:false}});
      return;
    }
    const filename=makeFilename('DDC','toml');
    const payload=text.endsWith('\n')?text:text+'\n';
    try{
      await writeTextToSuitcase(filename,payload,'application/toml');
      await refreshSuitcaseFilesFromSuitcase();
      dataDictionaryState.innerHTML=`Saved as <strong>${esc(filename)}</strong> · not applied`;
      emitHelp({code:'PROTOTYPE-DATA-DICTIONARY-SAVED',severity:'INFO',phase:'DATA DICTIONARY SAVE',observed:`User Data Dictionary TOML was saved as ${filename}.`,next:'No dictionary behavior changes in this prototype. The TOML remains a visible Suitcase artifact for later data-dictionary work.',facts:{filename,artifact_class:'DDC',format:'TOML',parsed:false,applied:false,user_chose_filename:false,suitcase:suitcaseHandle.name}});
    }catch(err){
      emitHelp({code:'PROTOTYPE-DATA-DICTIONARY-SAVE-FAILED',severity:'ERROR',phase:'DATA DICTIONARY SAVE',observed:'The User Data Dictionary TOML file could not be written to the authorized Suitcase.',next:'Check Suitcase write permission and try again.',facts:{error:String(err),artifact_class:'DDC',format:'TOML',applied:false}});
    }
  }

  async function saveHelpReport(){
    if(!currentDiagnostic)return;if(!requireSuitcase('HELP REPORT SAVE'))return
    const d=currentDiagnostic;const filename=makeFilename('HLP','html');
    const html=`<!doctype html><html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>${esc(d.code)} — Data Sculptor Help</title><style>body{font-family:system-ui,sans-serif;max-width:900px;margin:40px auto;padding:0 24px;color:#172033;background:#f7f9fc}h1{margin-bottom:4px}.meta{color:#667085}.box{background:white;border:1px solid #d9e1ea;border-left:6px solid #9fb7d5;padding:18px;margin:18px 0}pre{white-space:pre-wrap;overflow:auto;background:#eef2f6;padding:12px}</style><h1>Red5Sorcery Data Sculptor</h1><p class="meta">WASM-002 Help Engine report · design prototype</p><div class="box"><h2>${esc(d.severity)} · ${esc(d.code)}</h2><p><strong>Phase:</strong> ${esc(d.phase)}</p><p>${esc(wording(d,'office'))}</p></div><div class="box"><h2>Canonical facts</h2><pre>${esc(JSON.stringify(d.facts||{},null,2))}</pre></div><div class="box"><h2>Safe next action</h2><p>${esc(d.next)}</p></div>`;
    try{await writeTextToSuitcase(filename,html,'text/html');await refreshSuitcaseFilesFromSuitcase();emitHelp({code:'PROTOTYPE-HELP-REPORT-SAVED',severity:'INFO',phase:'HELP REPORT SAVE',observed:`The Help Engine report was saved as ${filename} in the authorized Suitcase.`,next:'The report is a visible portable artifact. Its final governed class/token shape remains a PRD freeze item.',facts:{filename,user_chose_filename:false,suitcase:suitcaseHandle.name}})}catch(err){emitHelp({code:'PROTOTYPE-HELP-REPORT-SAVE-FAILED',severity:'ERROR',phase:'HELP REPORT SAVE',observed:'The Help Report could not be written.',next:'Check Suitcase permission and try again.',facts:{error:String(err)}})}
  }

  function fullHelp(){if(!currentDiagnostic)return;const d=currentDiagnostic;diagArea.innerHTML=`<span class="${d.severity==='ERROR'?'sev':(d.severity==='INFO'?'info':'help')}">${esc(d.severity)} · ${esc(d.code)} · FULL HELP</span><div style="margin-top:12px"><strong style="color:var(--accent3)">Casual</strong><br>${esc(wording(d,'casual'))}</div><div style="margin-top:12px"><strong style="color:var(--accent3)">Office Speak</strong><br>${esc(wording(d,'office'))}</div><div style="margin-top:12px"><strong style="color:var(--accent3)">Technical</strong><br>${esc(wording(d,'technical'))}</div><dl class="diag-grid"><dt>Canonical facts</dt><dd>${esc(JSON.stringify(d.facts||{},null,2))}</dd><dt>Phase</dt><dd>${esc(d.phase)}</dd></dl>`}
  function genericHelp(){emitHelp({code:'PROTOTYPE-HELP',severity:'HELP',phase:'WORKSPACE',observed:'Data Sculptor follows a governed sequence: validate the Suitcase, author and save a Work Order, then run that saved artifact.',next:suitcaseValidated?'Author and save a new Work Order, or choose a saved WKO TXT in the Work Order editor and load it. Double-clicking the same WKO in the Suitcase directory also loads it.':'Choose and validate the Suitcase.',facts:{prototype:true,storage_engine_surface:true,help_engine_surface:true,saved_work_orders_immutable:true,work_order_editor_loads_saved_files:true,alias_editable_in_gui:false,alias_assignment_surface:'WORK ORDER + MATERIALIZATION DEFAULTS',alias_mapping_file:activeAliasMapFilename}})}

  workOrder.addEventListener('input',()=>{
    if(workOrderMode==='saved'){
      loadedSavedWorkOrderName=selectedWorkOrderName;
      selectedWorkOrderName=null;
      workOrderMode='derived';
      updateRunTarget();
      updateSavedWorkOrderPicker();
      emitHelp({code:'PROTOTYPE-WO-DERIVED-DRAFT',severity:'INFO',phase:'WORK ORDER EDIT',observed:`The loaded saved Work Order remains immutable. The editor now contains a new draft derived from ${loadedSavedWorkOrderName}.`,next:'Validate and save this draft to create a new immutable Work Order TXT before running it.',facts:{source_work_order:loadedSavedWorkOrderName,source_rewritten:false,new_draft:true,run_requires_save:true}});
    }
    renderHighlight();
  });
  workOrder.addEventListener('scroll',renderHighlight);
  voice.addEventListener('change',()=>{if(currentDiagnostic)emitHelp(currentDiagnostic)});
  document.getElementById('suitcaseBtn').addEventListener('click',authorizeSuitcase);
  refreshFilesBtn.addEventListener('click',refreshSuitcaseFilesFromSuitcase);
  savedWorkOrderSelect.addEventListener('change',()=>{loadWorkOrderBtn.disabled=!savedWorkOrderSelect.value});
  loadWorkOrderBtn.addEventListener('click',loadWorkOrderFromPicker);
  document.getElementById('saveWorkOrderBtn').addEventListener('click',saveNewWorkOrder);
  document.getElementById('validateBtn').addEventListener('click',()=>validateWorkOrder(workOrder.value));
  document.getElementById('runBtn').addEventListener('click',runSelected);
  document.getElementById('helpBtn').addEventListener('click',genericHelp);
  document.getElementById('fullHelpBtn').addEventListener('click',fullHelp);
  document.getElementById('saveHelpBtn').addEventListener('click',saveHelpReport);
  savePrettyBrandBtn.addEventListener('click',savePrettyBrandToml);
  saveDataDictionaryBtn.addEventListener('click',saveDataDictionaryToml);
  document.addEventListener('keydown',e=>{if(e.key==='F1'){e.preventDefault();genericHelp()}if(e.key==='Escape'){clearHelp()}if((e.ctrlKey||e.metaKey)&&e.shiftKey&&e.key.toLowerCase()==='s'){e.preventDefault();saveNewWorkOrder()}if((e.ctrlKey||e.metaKey)&&e.key==='Enter'){e.preventDefault();runSelected()}});

  renderMappings();renderHighlight();updateRunTarget();updateSavedWorkOrderPicker();resetExecution();updateWorkspaceGate();emitHelp({code:'PROTOTYPE-SUITCASE-FIRST',severity:'HELP',phase:'SESSION START',observed:'A Suitcase is required before work begins.',next:'Choose and validate a Suitcase.',facts:{gate_required_first:true,suitcase_validated:false,workspace_locked:true,user_chooses_folder:true,user_chooses_artifact_filename:false}});
})();
</script>
</body>
</html>

RQSM Cloaking Capacity & Recovery Requirements

Revision AC adds RQSM as a separately scoped V1-BACKLOG feature. These requirements are not part of WASM-002. They capture the 21 September 2026 design note for deterministic capacity planning, cloaking, package construction, and recovery. The note is a requirements/algorithm contract; it does not yet freeze the PRNG, framing format, global permutation implementation, or final Work Order grammar.

Two deterministic layers. The Anchor Pixel of the carrier assigned slice N seeds the reversible global permutation of the complete logical Base64 stream before slicing. Each carrier's own Anchor Pixel independently seeds pseudo-random placement of that carrier's header and shuffled payload inside its RGBA least-significant-bit positions.

Algorithm overview

StageGoverned behavior
Capacity preflightExact ZIP bytes → exact Base64 bytes → per-carrier net 35%-ceiling capacity → required carrier count or inverse maximum ZIP size. No files are modified.
CLOAKZIP → streaming Base64 → bounded-memory global permutation → ordered shuffled slices → deterministic per-image RGBA-LSB placement → carrier-bundle ZIP + Author Note sidecar.
DECLOAKcarrier headers/slices → validate complete set → assemble slice order → derive global seed from slice N Anchor Pixel → inverse global permutation → streaming Base64 decode → recovered ZIP.
Security boundaryMissing required carriers block complete deterministic ZIP reconstruction, but RQSM is not encryption and surviving carriers may still disclose shuffled payload data.
RQSM-001

RQSM supports deterministic capacity preflight in both directions

UNDER REVIEW

Before cloaking, a Data Sculptor Work Order must be able to answer both planning questions deterministically: (1) given one ZIP byte length and carrier dimensions, how many qualifying PNG carriers are required; and (2) given a carrier count and dimensions, or an actual mixed-dimension carrier set, what is the largest ZIP that can be cloaked. Capacity planning is a read-only operation and must not modify the ZIP or carrier images.

RQSM-002

The source object is one specific ZIP archive

UNDER REVIEW

One RQSM cloaking operation acts on one explicitly identified ZIP archive in the Suitcase. Capacity mathematics and later cloaking must use that ZIP's exact byte length rather than a rounded filesystem display size.

RQSM-003

Base64 payload length is exact and deterministic

UNDER REVIEW

The logical cloaking payload is the Base64 representation of the source ZIP. Exact payload length is:

Base64Bytes = 4 × ceil(ZipBytes / 3)

The implementation must not substitute an approximate 33% expansion estimate where exact capacity is required.

RQSM-004

Capacity results are shown in Execution Output and may be saved as PRETTY HTML

UNDER REVIEW

RQSM capacity preflight must print its result to the Execution Output and may save the same decision as a PRETTY HTML report. The report must state that the capacity operation itself did not modify the source ZIP or carrier PNGs.

RQSM-005

Source ZIP size is hard-capped at 100,000,000 bytes

UNDER REVIEW

RQSM must reject a source ZIP larger than exactly 100,000,000 bytes before cloaking begins. The limit applies to ZIP-file bytes on disk before Base64 conversion. Base64 expansion is processing/payload overhead and does not count against the 100 MB eligibility limit.

RQSM-006

Recovered ZIP size is subject to the same 100,000,000-byte ceiling

UNDER REVIEW

DECLOAK is subject to the same archive-size ceiling. Streaming reconstruction must stop safely and fail rather than produce or present a recovered ZIP larger than 100,000,000 bytes.

RQSM-007

RQSM is bounded-memory with respect to ZIP size and carrier count

UNDER REVIEW

RQSM must not materialize the complete ZIP-derived Base64 text or the complete carrier set in RAM. Cloaking must stream/chunk ZIP bytes through Base64 encoding, a bounded-memory global-permutation stage, and carrier output. Recovery must perform the inverse sequence incrementally.

RQSM-008

Peak working memory is bounded primarily by one active carrier plus fixed buffers

UNDER REVIEW

Peak working memory must not grow in proportion to source ZIP byte length or carrier count. The target bound is one active carrier image plus fixed-size streaming/permutation buffers. The 100 MB archive ceiling is not a RAM budget.

RQSM-009

The complete logical Base64 stream is globally permuted before slicing

UNDER REVIEW

The logical processing order is:

ZIP → Base64 → global deterministic permutation → shuffled slices → per-image deterministic LSB placement

The global permutation occurs before carrier slicing and is separate from each image's local pseudo-random LSB placement.

RQSM-010

The global permutation seed comes from the Anchor Pixel of slice N

UNDER REVIEW

The carrier designated to become the final slice, slice N, supplies the global shuffle seed from its reserved unchanged Anchor Pixel. The final carrier must be designated before the global permutation executes so those RGBA values are available without mutating the carrier.

RQSM-011

The final carrier is defined by slice identity, never by filename or enumeration order

UNDER REVIEW

The final carrier is the PNG assigned embedded slice number N. It is not the last filename, ZIP member, directory entry, timestamp, or filesystem enumeration result. Recovery finds slice N from embedded metadata.

RQSM-012

The global permutation is deterministic, bijective, reversible, and version-governed

UNDER REVIEW

Every Base64 position must appear exactly once in the shuffled stream with no duplication or omission. The same seed and algorithm/version must reproduce the exact inverse permutation. The exact permutation algorithm and versioning contract remain implementation freeze items.

RQSM-013

The global permutation itself must be bounded-memory

UNDER REVIEW

RQSM must not build or shuffle the entire Base64 payload in RAM. The implementation must use a deterministic seekable/external-scratch or equivalent bounded-memory permutation design that preserves the same logical permutation contract.

RQSM-014

Global permutation changes position only, not payload length or carrier ceiling

UNDER REVIEW

The global permutation must not change Base64 payload length, the number of logical payload bytes, or the 35% per-carrier utilization ceiling. It changes only which original Base64 positions ultimately reside in each slice.

RQSM-015

Carrier payload uses RGBA least-significant bits with a fixed 35% ceiling

UNDER REVIEW

PNG carriers use one least-significant-bit position across the four channels R, G, B, and A. RQSM must never use more than 35% of eligible LSB positions. The 35% ceiling is a product requirement, not an optimization hint, and must not be exceeded merely to reduce carrier count.

RQSM-016

One Anchor Pixel is excluded from capacity and the capacity formulas are fixed

UNDER REVIEW

Each carrier reserves exactly one Anchor Pixel that is unavailable for payload or framing. For dimensions Width × Height:

EligibleLSBPositions = (Width × Height - 1) × 4
UsableBits = floor(EligibleLSBPositions × 0.35)
UsableBytesBeforeFraming = floor(UsableBits / 8)

RQSM-017

Carrier PNGs may have different dimensions

UNDER REVIEW

All carriers in a set do not need the same width and height. RQSM calculates each carrier's capacity independently and may sum net capacities across a mixed-dimension set.

RQSM-018

Header and framing overhead is subtracted before payload planning

UNDER REVIEW

Any bytes required by the embedded carrier header/framing, including slice metadata and the optional slice-1 Author Note, must be deducted from that carrier's gross capacity before calculating net Base64 payload capacity. Production capacity answers use net capacity, not gross capacity.

RQSM-019

Required-carrier count uses exact Base64 length and net payload capacity

UNDER REVIEW

For equal-dimension hypothetical carriers after framing is frozen:

RequiredPNGs = ceil(Base64Bytes / NetPayloadBytesPerPNG)

For actual mixed carriers, RQSM sums each carrier's independently calculated net capacity rather than pretending slices are equal sized.

RQSM-020

Preflight reports Required, Found, and Shortfall for Suitcase carriers

UNDER REVIEW

When evaluating qualifying PNGs already present in the Suitcase, RQSM should report the required carrier count or required total payload capacity, the qualifying capacity actually found, and any count/capacity shortfall before cloaking begins.

RQSM-021

Inverse capacity planning derives the largest source ZIP that fits

UNDER REVIEW

Given net Base64 carrier capacity C, the maximum exact source ZIP size is the largest Z satisfying 4 × ceil(Z / 3) ≤ C, additionally capped at 100,000,000 bytes. Equivalently for integer capacity planning: MaxZipBytes = min(100000000, 3 × floor(C / 4)). This planning operation must not modify carriers.

RQSM-022

Capacity mathematics is orientation-invariant

UNDER REVIEW

Swapping width and height must not change carrier capacity or normalized Anchor Pixel number. A 1920 × 1080 carrier and a 1080 × 1920 carrier are capacity-equivalent because the pixel count is the same and the normalized Anchor Pixel uses min(W,H)^2.

RQSM-023

Cloaking preserves the source PNG geometry and displayed orientation

UNDER REVIEW

Orientation invariance applies only to mathematics. Cloaking must preserve each carrier's actual width, height, and orientation exactly and must not rotate, transpose, flip, crop, resize, or geometrically normalize the image. PNG metadata that materially controls displayed orientation must also be preserved. Intended visual changes are limited to selected RGBA least-significant bits.

RQSM-024

Anchor Pixel calculation uses a normalized aspect ratio of at least one

UNDER REVIEW

For each carrier:

AspectRatio = max(Width / Height, Height / Width)
AnchorPixelNumber = floor((Height × Width) / AspectRatio)

The equivalent integer form is AnchorPixelNumber = min(Width, Height)^2.

RQSM-025

Anchor Pixel numbering and immutability are explicit

UNDER REVIEW

AnchorPixelNumber is 1-based; zero-based implementations use index AnchorPixelNumber - 1. The Anchor Pixel is excluded from the candidate LSB pool, and its R, G, B, and A channel values must never be overwritten by payload, framing, header metadata, or Author Note data.

RQSM-026

Carrier-local seed is the Anchor Pixel RGBA value in unambiguous form

UNDER REVIEW

The deterministic carrier seed is conceptually R_anchor || G_anchor || B_anchor || A_anchor. The representation must be unambiguous, such as fixed-width channel encoding or direct packing of the four 8-bit values. Variable-width decimal concatenation is not permitted.

RQSM-027

Per-image LSB placement is deterministic pseudo-random and non-repeating

UNDER REVIEW

Each carrier's Anchor Pixel seed drives a deterministic pseudo-random placement sequence over eligible R, G, B, and A LSB positions. A selected position must not be reused within that carrier, and only enough positions are selected to store its framing plus assigned shuffled Base64 slice.

RQSM-028

Extraction reconstructs carrier-local placement without filename or original-carrier dependency

UNDER REVIEW

Given the cloaked PNG alone, extraction must be able to derive the unchanged Anchor Pixel, regenerate the same seed and placement sequence, bootstrap the embedded framing/header, and extract the assigned slice. Recovery must not depend on the carrier filename, filesystem timestamp, directory order, or an untouched copy of the original carrier. The exact framing bootstrap layout remains an implementation freeze item.

RQSM-029

One canonical UTC millisecond package timestamp is generated once and embedded in every carrier header

UNDER REVIEW

A cloaking operation generates one package creation timestamp at its beginning using the product-wide canonical UTC representation YYYYMMDDTHHMMSSmmmZ.

The timestamp is UTC-only, fixed-width, and millisecond precision with exactly three millisecond digits, including 000. The exact same serialized value is embedded in every carrier header in the set and is reused unchanged for carrier-set grouping, the output carrier-bundle ZIP filename, and the matching Author Note sidecar filename. No per-image package timestamp is generated.

RQSM-030

Every carrier header carries the minimum reconstruction metadata

UNDER REVIEW

Embedded framing/header data must provide at least the shared package UTC timestamp serialized exactly as YYYYMMDDTHHMMSSmmmZ, slice number, total slice count, exact payload length for that carrier, and a slice integrity value.

The exact framing encoding, byte cost, checksum/hash choice, and whether an additional package identifier accompanies the timestamp remain implementation freeze items. The timestamp's precision and serialization do not remain open.

RQSM-031

The optional Author Note is 1–100 characters and is embedded only in slice 1

UNDER REVIEW

The user may supply an optional Author Note of 1 to 100 characters. When present, it is embedded only in the header of the first carrier in reconstruction order, slice 1. It is not duplicated into every carrier. The exact absent/present header representation remains to be frozen.

RQSM-032

Recovery validates the complete carrier set before ZIP reconstruction

UNDER REVIEW

Recovery groups candidate carriers by the exact embedded canonical package timestamp YYYYMMDDTHHMMSSmmmZ, determines the expected total slice count, and verifies that every required slice number is present exactly once.

Missing slices, duplicate numbers, timestamp disagreement, framing failures, and integrity failures are reported before reconstruction proceeds.

RQSM-033

Recovery order is slice assembly, inverse global permutation, then Base64 decode

UNDER REVIEW

Valid shuffled slices are logically assembled in embedded slice-number order. RQSM then finds slice N, derives the global seed from its unchanged Anchor Pixel, applies the exact inverse global permutation, and only then streams the restored Base64 sequence through Base64 decoding to reconstruct the ZIP.

RQSM-034

Any missing required carrier prevents complete ZIP reconstruction

UNDER REVIEW

If even one required carrier is absent or invalid, RQSM must not declare the original ZIP recovered and normal reconstruction must not be attempted. If slice N is missing, the carrier set also lacks the global permutation seed. A canonical refusal may report: Expected slices: 12; Found: 11; Missing: 7; Duplicates: none; Reconstruction: NOT ATTEMPTED.

RQSM-035

RQSM must not claim cryptographic confidentiality

UNDER REVIEW

A missing carrier prevents complete deterministic reconstruction of the original ZIP, but surviving carriers are not guaranteed to be useless. They still contain extractable shuffled payload data. RQSM cloaking is not encryption, and the product must not claim an all-or-nothing confidentiality guarantee.

RQSM-036

Completed cloaked carriers are packaged in a canonical timestamp-only ZIP

UNDER REVIEW

After successful cloaking, all cloaked carrier PNGs are packaged into one output ZIP whose filename contains only the shared canonical UTC package timestamp plus .zip.

The exact filename shape is YYYYMMDDTHHMMSSmmmZ.zip; for example, 20260921T191345287Z.zip. This deliberately minimal external package name does not add a __DS__ namespace, artifact class, UUID, source archive name, or descriptive RQSM/cloaking label.

RQSM-037

Cloaked carriers preserve their original filenames by default

UNDER REVIEW

Each cloaked PNG keeps its original carrier filename by default. RQSM must not rename carriers to expose the canonical package timestamp, slice number, total slice count, the RQSM name, the word cloaked, or the source ZIP name.

Carrier filenames are convenience labels only; a carrier may be renamed later without preventing recovery if its PNG content remains intact.

RQSM-038

Every completed cloak operation creates a matching Author Note sidecar

UNDER REVIEW

The external text sidecar is named Author_Note_YYYYMMDDTHHMMSSmmmZ.txt using the exact same canonical package timestamp as the carrier-bundle ZIP; for example, Author_Note_20260921T191345287Z.txt.

It records the optional Author Note, the exact carrier-bundle ZIP filename, and the actual output filename of every PNG contained in that ZIP. The sidecar remains outside the carrier-bundle ZIP.

RQSM-039

The sidecar carries mandatory distribution and encryption guidance

UNDER REVIEW

Every Author Note sidecar must advise users seeking stronger protection not to keep the complete cloaked carrier set in one physical or digital location, explain that distributing carriers reduces single-location compromise risk, state that incomplete possession is not a cryptographic confidentiality guarantee, and state explicitly that RQSM cloaking is not encryption and that sensitive material should be encrypted separately when cryptographic confidentiality is required. Because it enumerates the package and carriers, the sidecar itself is sensitive package metadata and need not accompany every distributed carrier.

RQSM-040

Carrier-filename collisions are resolved deterministically

UNDER REVIEW

If two selected source carriers would have the same filename inside the output ZIP, RQSM must resolve the collision deterministically without exposing slice order or RQSM metadata unnecessarily. The exact collision-renaming algorithm remains an implementation freeze item.

RQSM-041

Capacity output exposes the complete human-auditable calculation

UNDER REVIEW

At minimum, the Execution Output / PRETTY HTML result must report the ZIP filename or identifier; exact ZIP byte length and PASS/FAIL against the 100 MB hard limit; exact Base64 length; requested or qualifying PNG dimensions; eligible LSB positions after reserving the Anchor Pixel; the 35% ceiling; framing/header overhead once frozen; net payload capacity; required carrier count, mixed-set total capacity, or inverse maximum ZIP size as applicable; qualifying carriers found in the Suitcase and any shortfall; and a statement that capacity planning does not modify the ZIP or PNG files.

RQSM-042

Algorithm, framing, grammar, and serialization details remain explicit freeze items

UNDER REVIEW

Revision AI does not freeze the deterministic per-image PRNG; global permutation algorithm/inverse/versioning; carrier slice-order assignment rule; exact RGBA-to-seed representation; framing/header encoding and byte cost; package-identity choice beyond the shared canonical timestamp; slice-integrity algorithm; framing bootstrap location; Work Order command grammar; duplicate-filename collision algorithm; sidecar text layout; absent/present Author Note header representation; or an optional per-carrier maximum dimension/file-size rule.

UTC timestamp precision/serialization is no longer a freeze item: wherever RQSM serializes or names its package UTC timestamp, the canonical representation is YYYYMMDDTHHMMSSmmmZ. The remaining implementation-design decisions must be frozen without changing the RQSM invariants above.

Worked planning example — 40,000,000-byte ZIP with 1024 × 1536 carriers

Illustrative calculation, not final framing capacity. This example uses gross capacity before final per-image header/framing overhead is frozen.
Input / calculationResult
ZIP size40,000,000 bytes
Base64 payload53,333,336 bytes
Carrier dimensions1024 × 1536
Pixels per carrier1,572,864
Anchor Pixels reserved1 per carrier
Eligible RGBA LSB positions6,291,452 bits
35% usable ceiling2,202,008 bits
Gross payload per carrier275,251 bytes
Gross required carriers194 PNGs
Gross spare capacity across 19465,358 bytes

Provisional planning answer: 194 PNG images before header/framing overhead. Production planning uses net payload capacity. In this example, 194 carriers remain sufficient only if aggregate framing overhead does not exceed the 65,358-byte gross spare margin.

Illustrative Work Order fields only: ACTION = CALCULATE_CARRIER_REQUIREMENT; SOURCE_ZIP_SIZE_BYTES = 40000000; CARRIER_FORMAT = PNG; CARRIER_WIDTH_PX = 1024; CARRIER_HEIGHT_PX = 1536; LSB_CHANNELS = RGBA; MAX_LSB_UTILIZATION_PERCENT = 35; OUTPUT = EXECUTION_WINDOW, HTML. Exact syntax remains unfrozen.

Worked inverse-planning example — three 1920 × 1080 carriers

Orientation-invariant calculation. The same gross answer applies to three 1080 × 1920 carriers; the actual PNG orientation is still preserved during cloaking.
Input / calculationResult
Carrier count3 PNGs
Carrier dimensions1920 × 1080 (or 1080 × 1920)
Pixels per carrier2,073,600
Anchor Pixels reserved1 per carrier
Eligible RGBA LSB positions8,294,396 bits
35% usable ceiling2,903,038 bits
Gross payload per carrier362,879 Base64 bytes
Gross Base64 capacity, three carriers1,088,637 bytes
Gross maximum source ZIP816,477 bytes

Provisional inverse answer: 816,477 ZIP bytes before framing/header overhead. Production planning subtracts all required embedded framing overhead before converting Base64 capacity back to maximum ZIP bytes.

Illustrative Work Order fields only: ACTION = CALCULATE_MAXIMUM_ZIP_SIZE; CARRIER_COUNT = 3; CARRIER_FORMAT = PNG; CARRIER_WIDTH_PX = 1920; CARRIER_HEIGHT_PX = 1080; LSB_CHANNELS = RGBA; MAX_LSB_UTILIZATION_PERCENT = 35; OUTPUT = EXECUTION_WINDOW, HTML. Exact syntax remains unfrozen.

Revision AC RQSM freeze checklist

Still to freezeInvariant already established
Per-image deterministic PRNG and versionCarrier-local placement is deterministic from the unchanged Anchor Pixel RGBA seed and never reuses an eligible LSB position.
Global permutation algorithm, inverse, and versionThe permutation is deterministic, bijective, reversible, seeded by slice N's Anchor Pixel, and bounded-memory.
Carrier slice-order assignmentSlice N is designated before permutation and is defined by embedded slice identity, not filename/order.
Exact RGBA seed representationR-G-B-A order is unambiguous; variable-width decimal concatenation is not allowed.
Framing/header layout and byte costShared package timestamp, slice number, total count, payload length, integrity field, and optional slice-1 Author Note are carried in embedded framing.
Package identity and integrity algorithmThe shared UTC timestamp is mandatory in every carrier; an additional package identifier and exact checksum/hash remain open.
Framing bootstrap locationExtraction must bootstrap deterministically from the cloaked carrier itself.
Work Order grammarBoth planning directions, CLOAK, and recovery semantics are governed; exact command words remain open.
UTC timestamp precision/serializationOne exact value is generated once and reused in all carrier headers, the carrier-bundle ZIP name, and sidecar name.
Duplicate-filename collision ruleOriginal filenames are preserved by default; collisions are resolved deterministically without relying on filename semantics for recovery.
Sidecar layout / absent Author Note encodingRequired sidecar contents and advisory are fixed; exact text serialization remains open.
Optional per-carrier dimension/file-size ceilingOverall memory is bounded by source size/carrier count; whether to impose a one-image ceiling remains open.

9. Legacy Scope Index - Historical / Derived

Revision T authority rule: W002-SCOPE-* entries are retained for historical citation and decision continuity. They are not an independent scope authority. Current build allocation is defined only by the SCOPE metadata attached to the underlying normative requirements; the dashboard and this legacy index are derived views.

W002-SCOPE-001

Historical WASM-002 scope summary (legacy record)

N/A

WASM-002 must establish the source-certification/materialization and Help/PRETTY/Brand architecture without turning the prototype into a complete encoding laboratory, documentation system, theming system, or commercial packaging system.

W002-SCOPE-001.1

In scope: strict whole-file UTF-8 certification.

N/A
W002-SCOPE-001.2

In scope: ASCII-first inline UTF-8 fast path and strict sequence validation.

N/A
W002-SCOPE-001.3

In scope: certification-to-source identity binding.

N/A
W002-SCOPE-001.4

In scope: one-pass multi-column materialization.

N/A
W002-SCOPE-001.5

In scope: separate Windows-1252 compatibility assessment and conversion Work Order.

N/A
W002-SCOPE-001.6

In scope: canonical diagnostic event foundation.

N/A
W002-SCOPE-001.7

In scope: three-voice parity mechanism.

N/A
W002-SCOPE-001.8

In scope: one real Help path.

N/A
W002-SCOPE-001.9

In scope: durable branded HTML Help output.

N/A
W002-SCOPE-001.10

In scope: one canonical Brand Manifest.

N/A
W002-SCOPE-001.11

In scope: embedded/local brand assets.

N/A
W002-SCOPE-001.12

In scope: brand provenance.

N/A
W002-SCOPE-001.13

In scope: proof of presentation-only brand substitution.

N/A
W002-SCOPE-002

Historical exclusions and later-work decisions (legacy record)

N/A
W002-SCOPE-002.1

Out of scope: automatic guessing among arbitrary legacy encodings.

REJECTED
W002-SCOPE-002.2

Out of scope: silent fallback from failed UTF-8 analytical execution into Windows-1252 decoding.

REJECTED
W002-SCOPE-002.3

Out of scope: exhaustive conversion support for encodings other than those explicitly frozen.

DEFERRED
W002-SCOPE-002.4

Out of scope: collection of all non-ASCII bytes merely to postpone UTF-8 validation.

REJECTED
W002-SCOPE-002.5

Out of scope: exhaustive Help text for every possible error.

DEFERRED
W002-SCOPE-002.6

Out of scope: a visual theme editor.

DEFERRED
W002-SCOPE-002.7

Out of scope: customer account management.

DEFERRED
W002-SCOPE-002.8

Out of scope: licensing/entitlement enforcement.

DEFERRED
W002-SCOPE-002.9

Out of scope: hosted brand distribution.

DEFERRED
W002-SCOPE-002.10

Out of scope: arbitrary user-written HTML/CSS execution.

REJECTED
W002-SCOPE-002.11

Out of scope: runtime LLM generation of diagnostic truth.

REJECTED
W002-SCOPE-002.12

Out of scope: separate customer forks of the analytical engine.

REJECTED

9. Architectural Principles

W002-ARCH-001

Certification interprets nothing analytically

UNDER REVIEW

The certification stage establishes source-encoding validity and evidence; it does not perform analytical materialization.

W002-ARCH-002

Materialization assumes nothing about encoding

UNDER REVIEW

Materialization proceeds only under the governed UTF-8-certified-source invariant and does not guess or silently change source encoding.

W002-ARCH-003

Conversion is a separate transformation

UNDER REVIEW

Windows-1252-to-UTF-8 conversion is an explicit user-authorized operation producing a new artifact, not a hidden fallback.

W002-ARCH-004

The fast path preserves strictness

UNDER REVIEW

ASCII-first acceleration is an optimization of strict UTF-8 certification, not a relaxation of validity rules. Every non-ASCII sequence remains subject to strict validation and EOF remains authoritative.

W002-ARCH-005

Help is first-class

UNDER REVIEW

The shared engine emits governed diagnostic truth; the Help Engine owns governed explanation.

W002-ARCH-006

PRETTY is first-class

UNDER REVIEW

The PRETTY Engine owns deterministic human-facing rendering.

W002-ARCH-007

Branding is governed data

DEFERRED

The Brand Manifest owns reusable visual identity and must not alter analytical semantics.

W002-ARCH-008

One shared semantic core

UNDER REVIEW

The WASM-first implementation must remain suitable for later use by a standalone native CLI host without creating a permanent second semantic engine.

8. Legacy Scope Index - Revision J Addendum

These entries preserve the Revision J historical scope record for citation continuity. Their current allocation is represented by the SCOPE fields on the underlying PRETTY Table and Supporting Context requirements, not by this index.

W002-SCOPE-001.14

N/A

In scope: PRETTY Tables rendered from finalized governed tabular results.

W002-SCOPE-001.15

N/A

In scope: table-level and cell-level Rich Footnotes.

W002-SCOPE-001.16

N/A

In scope: curated Supporting Context anchored to a PRETTY Table or one specific logical cell.

W002-SCOPE-001.17

N/A

In scope: portable local context links, identity-first context artifacts, and human-facing aliases/orientation.

W002-SCOPE-001.18

N/A

In scope: handoff-integrity evidence sufficient to preserve source, method, caveat, provenance, and deeper-context relationships without changing analytical truth.

W002-SCOPE-002.13

REJECTED

Out of scope: a generic Project Suitcase attachment bucket or document repository.

W002-SCOPE-002.14

DEFERRED

Out of scope: executable, script, macro-enabled, or nested-archive Supporting Context unless a later frozen security review explicitly adds a safe format.

W002-SCOPE-002.15

REJECTED

Out of scope: using PRETTY footnotes or Supporting Context to perform hidden calculations, transformations, or data repair.

W002-ARCH-009

Handoff integrity is first-class

DEFERRED

The engine protects analytical correctness; PRETTY protects comprehension. Final artifacts must preserve material context without altering the truth they present.

W002-ARCH-010

Context must be anchored

DEFERRED

Curated Supporting Context exists only in relation to a governed PRETTY Table or one governed logical cell. No anchor means no Supporting Context artifact.

8. Legacy Scope Index - Revision K Addendum

These entries preserve the Revision K historical scope record for citation continuity. Current allocation is represented by the SCOPE fields on the underlying branding and white-label requirements, not by this index.

W002-SCOPE-001.19

In scope: white-label enablement

N/A

In scope for WASM-002 architecture: a canonical Brand Manifest and presentation separation sufficient to support future automated organization-specific branding without an analytical-core fork.

W002-SCOPE-001.20

In scope: open-source source-distribution compatibility

N/A

In scope for architecture: generated editions must remain compatible with complete source delivery and independent customer rebuilding/self-hosting under the eventual governing open-source license.

W002-SCOPE-002.16

Out of scope: hosted configurator implementation

DEFERRED

Out of scope for WASM-002 V1: building or operating the customer-facing hosted white-label configurator.

W002-SCOPE-002.17

Out of scope: Stripe integration

DEFERRED

Out of scope for WASM-002 V1: Stripe checkout, payment confirmation, tax/refund operations, customer billing records, or related hosted-commerce machinery.

W002-SCOPE-002.18

Out of scope: automated source-package delivery service

DEFERRED

Out of scope for WASM-002 V1: the production service that generates, validates, stores, and delivers customer-specific source/build packages after payment.

W002-SCOPE-002.19

Out of scope: hosted customer administration

DEFERRED

Out of scope for WASM-002 V1: customer accounts, organization administration, purchase history, entitlement dashboards, support portals, or ongoing managed hosting.

W002-ARCH-011

Open source and commercial service are separate layers

UNDER REVIEW

The open-source analytical product and Red5Sorcery's optional paid automation must remain architecturally distinguishable. A paid service may save work; it must not become a hidden prerequisite for executing or understanding the delivered analytical software.

W002-ARCH-012

White-label automation must be declarative

DEFERRED

Future white-label generation should operate through governed Brand Manifest/configuration inputs and reproducible build steps rather than hand-editing analytical source or maintaining customer-specific semantic forks.

W002-ARCH-013

Customer independence after generation

DEFERRED

A future branded source distribution should remain usable, buildable, hostable, and understandable after leaving the Red5Sorcery service boundary.

W002-ARCH-014

WASM-002 and V1 analytical execution are sequential

UNDER REVIEW

WASM-002 must execute governed analytical operations sequentially and predictably. The product must not expose worker-count, thread-count, task-parallelism, or similar tuning controls, and it must not silently introduce a parallel analytical execution mode whose ordering or resource use changes the governed semantics.

Sequential execution does not require inefficient repeated scans. One bounded structural source pass may process multiple requested columns together, and implementation may use ordinary low-level/runtime mechanisms that do not create user-visible analytical concurrency or change deterministic operation order. Any future analytical parallelism requires a separate measured experiment and explicit PRD decision.

10. Post-V1 Release and Rust Community Outreach - Revision L

Addendum This section records a post-launch community and release intention. It does not expand the WASM-002 implementation leg and does not become a V1 acceptance gate merely by appearing in this PRD.

W002-REL-001

Public V1 source repository

DEFERRED

After V1 launch, Red5Sorcery intends to make the Data Sculptor repository publicly available with the complete applicable source code under the governing open-source license, together with sufficient build and hosting instructions for an independent user to inspect, build, and host the released edition.

W002-REL-001.1

Release evidence should travel with the code

DEFERRED

Where practical, the public release should point to release notes, architecture documentation, reproducible benchmark evidence, and other records that let readers distinguish demonstrated behavior from product aspiration.

W002-REL-002

Direct outreach to This Week in Rust

DEFERRED

Once the V1 repository and release evidence are public, Red5Sorcery should contact This Week in Rust directly through its current submission or contact channel rather than relying only on passive discovery.

W002-REL-002.1

Verify current submission instructions at outreach time

DEFERRED

Because publication and submission processes can change, the team must verify the then-current This Week in Rust submission/contact instructions immediately before outreach rather than freezing a transient URL or process into WASM-002.

W002-REL-002.2

Engineering-first submission package

DEFERRED

The outreach should foreground the Rust engineering story and link to the public repository, V1 release, technical write-up, build/hosting documentation, reproducible performance evidence where publishable, and a live browser build when one is publicly available.

W002-REL-002.3

Evidence-bounded claims

DEFERRED

The submission must not turn prototype observations into V1 claims. Statements about multi-gigabyte CSV processing, browser/WASM performance, bounded memory, deterministic output, modest-hardware execution, or shared-core reuse must be limited to the evidence actually established by the launched V1 artifacts and acceptance record.

W002-REL-003

Outreach does not create a runtime dependency

DEFERRED

Community publication, publicity, repository hosting, and third-party coverage must not become prerequisites for using, rebuilding, hosting, or understanding a delivered Data Sculptor edition.

W002-SCOPE-002.20

Out of scope for WASM-002 acceptance: post-launch publicity

DEFERRED

This Week in Rust outreach, press/community pitching, launch promotion, and external editorial coverage are post-V1 release activities. They are not WASM-002 functional acceptance criteria and must not delay a technically accepted V1 solely because external coverage has not occurred.

Release principle: Here is the code. Here is the evidence. Try it yourself.

11. Project Origin and Documentary Integrity - Revision M Addendum This section records product-origin and historical-record principles. It does not create a runtime behavior, implementation obligation, or V1 acceptance gate merely by appearing in this PRD. Its purpose is to preserve why Data Sculptor exists and to prevent later storytelling from simplifying a documented, non-linear engineering history.

W002-HIST-001

Day 001 origin

N/A

Data Sculptor began with a practical human idea: build the data tool T wished he had, and document how it was built. The project was not initiated as a staged portfolio exercise for hiring managers, a pre-written launch narrative, or a retrospective case study. Hiring, publication, community attention, and commercial opportunities may become consequences of the work; they are not the origin of the work.

W002-HIST-002

Contemporaneous record from Day 001

N/A

The project should preserve the fact that its history was recorded while the work was happening. Internal diaries, Suitcase manifests, Work Orders, PRDs, benchmark evidence, Council notes, QA records, and other durable artifacts form the internal record. Public LinkedIn posts, YouTube diaries, After Hours material, and other public communications form a parallel public record of what the project chose to say at particular moments.

W002-HIST-003

The history is non-linear

N/A

Data Sculptor must not later be rewritten as a clean sequence of problem, plan, implementation, and success. The documented path includes questions, experiments, surprises, disagreements, measurements, detours, rejected ideas, revisions, later reinterpretation, and decisions that only became important after subsequent work. A later account may explain those connections, but it should not manufacture inevitability that the contemporaneous record does not support.

W002-HIST-004

WASM-001b to WASM-002 was a real course correction

N/A

The WASM-001b course correction should be represented as it happened. WASM-001b was pursued seriously. Browser streaming, experimental materialization, performance, encoding, and boundary behavior produced useful evidence. The project distinguished what the browser had demonstrated from what the shared Data Sculptor engine had demonstrated, refused to claim acceptance that had not been run, and changed architectural direction when the evidence and product design justified doing so. The pivot was not staged for publicity, hiring, or a later book.

11. Project Origin and Documentary Integrity - continued

W002-HIST-005

Internal and public records are complementary, not interchangeable

N/A

The Suitcase and internal evidence can contain technical detail, uncertainty, failed paths, and reasoning that did not appear in public at the time. Public posts and video diaries show what was emphasized, understood, or considered appropriate to say publicly at that moment. Future histories may use both records, but should preserve their different purposes rather than forcing them into one retrospectively uniform narrative.

W002-HIST-006

Storytelling must distinguish evidence from retrospective understanding

N/A

A later article, talk, case study, or book may explain why a decision became important and may connect events that were not obviously connected when they occurred. It must still distinguish contemporaneous evidence from later interpretation. The project record should make it possible for a reader to see what was known, claimed, uncertain, or unresolved at the time.

W002-HIST-007

Intended outward sequence

N/A

The intended sequence is to build and launch V1 first, with the public repository becoming available at V1 rather than before it. After V1, Red5Sorcery may publish dedicated engineering and design articles about the journey and its evidence. The longer-form book The Decision to Build may follow as the multi-voice record of how the product, method, architecture, and Council developed. No detailed pre-V1 engineering article or pre-V1 public repository is required or intended by this record.

Documentary principle

The project was real before it became useful as a story. Build the product, preserve the evidence, and let later storytelling remain accountable to the record.

Revision V Decision Record

Revision V preserves the standalone HTML Product Backlog PRD as the working master and adds the candidate WASM-002 browser front-end / console requirement set derived from the Day 042 prototype. The prototype is embedded verbatim as design evidence and linked as a companion interactive HTML file. The numbered W002-UI-* and W002-UI-ACC-* requirements govern; illustrative prototype literals remain unfrozen. This revision does not freeze the new requirements and does not claim implementation.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionV - Draft / Not Frozen
Date19 September 2026 (Day 042)
Previous baselineProduct Backlog PRD Revision U
Major changesNarrow WASM-002 browser front-end / console requirements; single Work Order command surface; visible certification/materialization stages; visible Suitcase artifact orientation; diagnostic/Help UI requirements; explicit scope boundary; embedded exact Day 042 prototype source and fingerprint.
WASM-002 scope effectAdds candidate browser front-end requirements and acceptance gates to SCOPE: WASM-002. Existing candidate requirements remain under review; nothing is frozen by Revision V.

Revision W Decision Record

Revision W formalizes the Help / Diagnostic Surface as part of the WASM-002 interaction architecture and explains the design rationale behind it. It defines the canonical diagnostic event as authority, the live pane as a transient co-present projection, and the styled HTML Help Report as a durable support-handoff artifact. It also adds anti-modal/toast requirements, idle-state discipline, two-audience report content, relevant negative boundary facts, Work Order lineage, offline portability, tamper-evident fingerprinting, and a disclosure boundary that prevents Help from becoming a silent source-data export path. This revision does not freeze the new requirements and does not claim implementation.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionW - Draft / Not Frozen
Date19 September 2026 (Day 042)
Previous baselineProduct Backlog PRD Revision V
Major changesHelp/Diagnostic design rationale; projection-versus-authority boundary; persistent dedicated Help surface; no modal/toast-only governed refusals; quiet idle state; direct Save HTML Help Report action; support-handoff report content; negative boundary facts; Work Order lineage; offline portability; integrity fingerprinting; bounded disclosure/privacy; new Help and UI acceptance gates.
WASM-002 scope effectAdds candidate Help/Diagnostic and support-handoff requirements and acceptance gates to SCOPE: WASM-002. Existing candidate requirements remain under review; nothing is frozen by Revision W.

Revision X Decision Record

Revision X preserves Revision W's Help / Diagnostic architecture and adds a product-level rationale explaining what Data Sculptor is being built to do for analysts and why. It records the project's working observation that much analyst anxiety is forensic rather than mathematical; defines the intended burden shift in which the product absorbs systems complexity instead of exporting it to the analyst; treats explainable failure as part of the analytical record; and records a four-line design creed beneath “Data work you can explain.” The new material is rationale, not a substitute for numbered requirements, and it does not freeze, approve, or claim implementation of any under-review WASM-002 requirement.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionX - Draft / Not Frozen
Date19 September 2026 (Day 042)
Previous baselineProduct Backlog PRD Revision W
Major changesProduct rationale describing forensic uncertainty in analyst work; systems-burden transfer from analyst to product; Source → Work Order → Governed Run → Visible Evidence mental model; sophistication absorbed by the product rather than exposed to the user; explainable failure as part of the analytical record; visible evidence and professional agency; four-line design creed beneath “Data work you can explain.”
WASM-002 scope effectNo new build allocation and no lifecycle promotion. Existing SCOPE and STATUS metadata remain authoritative. The added text explains the purpose behind existing product and WASM-002 requirements.

Revision Y Decision Record

Revision Y preserves Revision X’s product rationale and moves a concise “What We Are Building — and Why” statement to the front of the PRD, immediately beneath the title, date, and public product promise. The change makes purpose precede backlog machinery: a new reader first sees what Data Sculptor is, the forensic uncertainty it is intended to reduce, the systems burden the product is intended to absorb, the Source → Work Order → Governed Run → Visible Evidence working model, and the four-line design creed. The longer rationale remains in the Product Promise section. This is a document-orientation change only; it does not create, freeze, approve, reject, or claim implementation of any requirement.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionY - Draft / Not Frozen
Date19 September 2026 (Day 042)
Previous baselineProduct Backlog PRD Revision X
Major changesAdded a front-door “What We Are Building — and Why” section before the dashboard/governance material; surfaced the analyst problem, burden shift, Source → Work Order → Governed Run → Visible Evidence mental model, and four-line design creed at first reading; retained the fuller rationale in the Product Promise section.
WASM-002 scope effectNo new build allocation and no lifecycle promotion. Existing SCOPE, STATUS, BUILD, and requirement IDs remain authoritative and unchanged.

Revision Z Decision Record

Revision Z defines the candidate Storage Engine namespace contract for the visible flat Suitcase. It establishes __DS__ as the exact reserved Data Sculptor governed namespace; distinguishes external source files from Data Sculptor-governed derivatives; requires a fixed-width three-uppercase-letter semantic artifact class; keeps serialization formats such as TOML, HTML, CSV, BIN, and TXT orthogonal to semantic meaning; records the current working artifact-class registry; requires preservation of unknown future classes; prohibits silent casing normalization and silent collision overwrite; and states the governing rule that names route while contents and provenance prove. The exact identity-token grammar remains an explicit freeze item. The revision also corrects the carried-forward scratch naming example from the obsolete _DS_SCR_ form to the current conceptual __DS__SCR__... family.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionZ - Draft / Not Frozen
Date19 September 2026 (Day 042)
Previous baselineProduct Backlog PRD Revision Y
Major changesReserved __DS__ namespace; semantic three-letter artifact classes; external-source boundary; serialization/class separation including TOML manifests; candidate class registry; prefix/class validation boundary; unknown-class preservation; canonical casing; collision safety; names-route/content-proves rule; explicit identity-grammar freeze items.
WASM-002 scope effectAdds candidate storage namespace requirements PB-STOR-004 through PB-STOR-013 to SCOPE: WASM-002. Existing requirements remain otherwise unchanged in lifecycle status; nothing is frozen or claimed implemented by Revision Z.

Revision AA Decision Record

Revision AA reconciles the Day 043 browser interaction prototype with the authoritative WASM-002 contract. The revision moves the browser workbench away from a GUI-rich analytical surface and toward a Suitcase-first, Work-Order-driven model: a writable Suitcase must be validated before work begins; the Suitcase Directory is the visible physical inventory; aliases are editable metadata persisted in a governed mapping artifact; analytical source and column choices are expressed only in saved Work Orders; saved Work Orders are immutable and Data Sculptor assigns their governed filenames; the Execution Output is read-only; and Help Engine output is the sole Data Sculptor-controlled user-facing Help/refusal path. Revision AA also recorded the then-candidate Work Order filename shape __DS__WKO__<UTC>__<UUID>.txt, the Day 043 alias-map singleton __DS__MAP__ALIASES.csv, deterministic alias resolution, and anti-rebinding requirements. The singleton alias-map model is historical and is superseded by Revision AH. The new and revised requirements remain UNDER REVIEW; this revision does not freeze or claim implementation.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionAA - Draft / Not Frozen
Date20 September 2026 (Day 043)
Previous baselineProduct Backlog PRD Revision Z
Major changesSuitcase-first validation gate; full-width visible Suitcase Directory; directory-as-inventory rather than analytical command surface; saved-Work-Order-only execution; immutable Work Order TXT artifacts; Data Sculptor-generated filenames; candidate WKO UTC+UUID filename shape; editable descriptions separated from physical identity; read-only Execution Output; editable file aliases; visible alias mapping artifact; deterministic alias resolution and anti-rebinding; all user-facing Help/refusal guidance through the Help Engine; exact Day 043 prototype source and fingerprint embedded as design evidence.
WASM-002 scope effectAdds and revises candidate storage/browser requirements and acceptance gates within SCOPE: WASM-002. Existing lifecycle states remain unchanged; nothing is frozen or claimed implemented by Revision AA.

Revision AB Decision Record

Revision AB defines composable saved Work Orders as a candidate WASM-002 capability. A saved immutable Work Order may invoke other named saved immutable Work Orders, including nested composition. Human-facing invocation names must resolve deterministically to exact physical WKO artifacts; drafts cannot be invocation targets; execution order is explicit and deterministic; cycles refuse; child refusal stops the composed run by default; and receipts preserve the complete exact physical invocation chain. The revision also reconciles the current Work Order editor behavior: a saved Work Order may be loaded into the editor for inspection or Run, while changing its instruction text creates a new non-runnable draft that must be saved as a new immutable WKO artifact before execution. The exact composition grammar remains a freeze item. The embedded Day 043 prototype source and fingerprint are refreshed as non-normative design evidence. All new and revised requirements remain UNDER REVIEW; Revision AB does not freeze or claim implementation.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionAB - Draft / Not Frozen
Date20 September 2026 (Day 043)
Previous baselineProduct Backlog PRD Revision AA
Major changesComposable saved Work Orders; named invocation resolved to exact immutable WKO identity; nested deterministic execution order; cycle refusal; default child-refusal propagation; complete Work Order invocation provenance in receipts; Work Order editor loads saved immutable WKO artifacts and converts edits into new drafts; refreshed exact Day 043 prototype source/fingerprint.
WASM-002 scope effectAdds W002-WKO-001 through W002-WKO-006 and W002-WKO-ACC-001 through W002-WKO-ACC-002 to SCOPE: WASM-002, and revises relevant Work Order/UI wording. Existing lifecycle states remain unchanged; nothing is frozen or claimed implemented by Revision AB.

Revision AC Decision Record

Revision AC preserves Revision AB and adds the RQSM cloaking-capacity and recovery contract captured on Day 044. RQSM is allocated to V1-BACKLOG, not WASM-002. The revision adds exact two-direction capacity preflight; exact Base64 sizing; a 100,000,000-byte source/recovered ZIP ceiling; bounded-memory processing; a deterministic reversible global permutation seeded from the final carrier's Anchor Pixel; independent deterministic per-image RGBA-LSB placement; a fixed 35% carrier-utilization ceiling; mixed carrier dimensions; orientation-invariant capacity math with strict source-orientation preservation; shared UTC package identity in every carrier header; explicit slice ordering and integrity metadata; complete-set reconstruction rules; timestamp-only carrier-bundle ZIP output; original carrier-filename preservation; the external Author Note sidecar and mandatory security advisory; inverse capacity planning; PRETTY HTML reporting; two worked examples; and a bounded list of implementation details that remain to be frozen. Revision AC does not freeze the PRNG, permutation algorithm, framing format, Work Order grammar, timestamp serialization, filename-collision algorithm, or other explicitly open implementation details, and it does not claim implementation.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionAC - Draft / Not Frozen
Date21 September 2026 (Day 044)
Previous baselineProduct Backlog PRD Revision AB
Major changesRQSM-001 through RQSM-042; exact ZIP/Base64 capacity algorithms; 100 MB archive ceiling; bounded-memory CLOAK/DECLOAK; global and per-carrier Anchor Pixel seeding; 35% RGBA-LSB capacity ceiling; mixed-dimension and orientation rules; embedded package/slice metadata; complete-set recovery; Author Note/package/sidecar naming and security advisory; inverse planning; worked examples; explicit implementation freeze checklist.
WASM-002 scope effectNone. RQSM requirements are SCOPE: V1-BACKLOG. Existing WASM-002 requirements and lifecycle states are unchanged by Revision AC.

Revision AD Decision Record

Revision AD preserves Revision AC and finalizes the candidate WASM-002 Help diagnostic-ID and voice-wiring boundary. Canonical diagnostics retain stable IDs and structured facts independently of prose. The shared Rust/WASM diagnostic path owns identity and evidence; the Help layer owns human-facing rendering. One governed message catalog keyed by diagnostic ID contains Casual, Office Speak, and Technical entries. WASM-002 may use unmistakable placeholder text to prove ID lookup, voice selection, structured-parameter availability, and semantic parity; the complete production Help corpus is deferred to a later content milestone. The exact diagnostic-ID grammar, message-catalog filename, serialization, schema, and final editorial content remain implementation/content freeze items. All affected requirements remain UNDER REVIEW in Revision AD.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionAD - Draft / Not Frozen
Date21 September 2026 (Day 044)
Previous baselineProduct Backlog PRD Revision AC
Major changesClarifies W002-HELP-001.1; adds W002-HELP-001.7, W002-HELP-002.8, and W002-HELP-002.9; establishes stable diagnostic IDs as Help lookup keys; separates engine diagnostic facts from voice-authored prose; establishes one three-voice message catalog as source of truth; allows placeholder voice text for WASM-002 acceptance; defers final Help copy to a later content milestone.
WASM-002 scope effectHelp Engine wiring remains in WASM-002. The build must prove canonical diagnostic ID/facts → message-catalog lookup → Casual / Office Speak / Technical rendering. Final production Help prose is explicitly not required for WASM-002 acceptance.

Revision AE Decision Record

Revision AE reconciles previously agreed Day 043 design decisions into numbered WASM-002 requirements and freezes the diagnostic-ID grammar. The authoritative execution surface remains syntax-first: analytical intent lives in Work Order text, every executable WKO declares SUITCASE: ., ordinary file references are Suitcase-relative, WIP is editable/non-executable, WKO is saved/immutable/runnable, and Work Order composition uses the governed RUN operation. V1 analytical execution is sequential and exposes no parallelism controls. Browser presentation has exactly Modern Dark, Modern Light, and Custom themes; Terminal is not a governed V1 theme. Canonical diagnostic IDs now use the exact permanent form DS-<DOMAIN>-<NNN>, with a three-uppercase-letter domain and zero-padded 001–999 numeric code. Run-specific facts remain structured fields. The exact RUN punctuation/argument grammar and other unrelated storage/schema freeze items remain open. All affected requirements remain UNDER REVIEW pending independent adversarial QA and T's explicit freeze.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionAE - Draft / Not Frozen
Date21 September 2026 (Day 044)
Previous baselineProduct Backlog PRD Revision AD
Major changesAdded W002-WKO-007 through W002-WKO-011 and W002-WKO-ACC-003 through W002-WKO-ACC-004; added W002-ARCH-014; added W002-UI-025 and W002-UI-ACC-020; froze W002-HELP-001.1 diagnostic IDs as DS-<DOMAIN>-<NNN>; reconciled the current WASM-002 dashboard and allocation summary.
WASM-002 scope effectNo feature-family expansion beyond previously agreed WASM-002 intent. Revision AE converts already-made design decisions into explicit testable requirements and removes those items from the unresolved-design list. RQSM remains V1-BACKLOG and outside WASM-002.

Revision AF Decision Record

Revision AF resolves the current WASM-002 governed-artifact identity contract. The existing semantic class registry is adopted explicitly: WKO, RCP, DGN, HLP, CER, CVT, RID, COL, MAP, SCR, RCV, and BRD retain the meanings stated in PB-STOR-006; WIP remains a Work Order lifecycle state rather than an artifact class. At Revision AF, ordinary immutable governed artifacts used __DS__CCC__YYYYMMDDTHHMMSSZ__<uuid-v4>.<extension>, with UTC at second precision and canonical lowercase hyphenated UUID v4. Revision AH supersedes that precision with canonical UTC milliseconds while preserving class → UTC → UUID ordering. Lineage and other relationships remain governed metadata rather than descriptive filename tokens. On a generated-name collision, Data Sculptor preserves the original creation timestamp, generates a new UUID v4, and retries without overwriting or changing the existing artifact. Explicit current-state singleton names remain permitted only where separately governed. Revision AF narrows the storage freeze list accordingly and does not claim implementation or promote lifecycle status.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionAF - Draft / Not Frozen
Date21 September 2026 (Day 044)
Previous baselineProduct Backlog PRD Revision AE
Major changesResolved PB-STOR-006 class registry; resolved PB-STOR-011 collision handling; resolved PB-STOR-013 immutable filename grammar; narrowed W002-STOR-015 open storage items; finalized W002-STOR-016 WKO filename form; updated storage explanatory tables.
WASM-002 scope effectNo new feature family. Revision AF converts existing storage identity candidates into explicit testable design requirements while leaving unrelated Store Map, row-identity serialization, source-binding, commit/update, and schema details open.

Revision AG Decision Record

Revision AG closes the WASM-002 analytical-source binding mechanism as a run-local continuity contract rather than an automatic cryptographic fingerprint. The Work Order source reference is resolved once for a governed run; the browser host retains the same selected source instance through whole-file UTF-8 certification and subsequent materialization; and Stage 2 may not re-resolve by alias, filename, path, or a new chooser selection. Loss of continuity causes refusal. Ordinary source certification and materialization do not automatically compute SHA-256 and make no durable cross-run exact-byte claim. The explicit FINGERPRINT operation is added to V1-BACKLOG for archival continuity, project return, copied-project verification, and analyst handoff. Its later minimum evidence includes exact byte length and SHA-256 from an explicit read-only full-byte scan. This source-data decision does not remove other WASM-002 integrity-fingerprint requirements explicitly governing generated Help, Brand, or other artifacts.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionAG - Draft / Not Frozen
Date21 September 2026 (Day 044)
Previous baselineProduct Backlog PRD Revision AF
Major changesResolved W002-ENC-003 through W002-ENC-003.4 as run-local same-source-instance binding; updated materialization, storage, glossary, and acceptance wording; removed source-binding mechanism from the open storage list; added deferred PB-OPS-010 FINGERPRINT for archival/handoff exact-byte verification.
WASM-002 scope effectReduces WASM-002 burden: no automatic source-data SHA-256 is required for certification or materialization. Run-local source continuity remains required. Explicit source-data fingerprinting moves to V1-BACKLOG.

Revision AH Decision Record

Revision AH freezes the default ordinary immutable filename timestamp at UTC millisecond precision and makes the filename token order explicitly universal: semantic class precedes creation UTC, which precedes UUID. The exact timestamp token is YYYYMMDDTHHMMSSmmmZ, with exactly three millisecond digits; UUID remains uniqueness/identity and is never chronology. Revision AH also replaces the earlier mutable alias-map singleton with immutable timestamp+UUID MAP history. Alias create/change/clear is a governed WASM-002 Work Order capability; the browser displays aliases read-only. Alias authority is explicit: a Work Order may use zero or one MAP, may deliberately select an older MAP, and never merges multiple MAPs. The exact alias command spelling and final alias-MAP CSV schema remain open freeze items.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionAH - Draft / Not Frozen
Date21 September 2026 (Day 044)
Previous baselineProduct Backlog PRD Revision AG
Major changesChanged canonical UTC token from second to millisecond precision; made class → UTC → UUID ordering explicit; prohibited UUID chronology; updated WKO filename grammar; replaced alias singleton with immutable MAP history; added latest-MAP and equal-timestamp refusal rules; added explicit historical-MAP binding; made alias mutation Work-Order-only; updated browser acceptance gates and embedded Day 044 prototype.
WASM-002 scope effectAdds explicit WASM-002 alias-mutation/version-selection tests while reducing GUI authority. Requirement lifecycle remains UNDER REVIEW pending independent QA and T freeze.

Revision AI Decision Record

Revision AI reconciles the V1-BACKLOG RQSM feature with the product-wide UTC timestamp contract established in Revision AH. RQSM now uses the exact fixed-width UTC millisecond token YYYYMMDDTHHMMSSmmmZ wherever its shared package timestamp is serialized or named: carrier headers, carrier-set grouping, the timestamp-only carrier-bundle ZIP, and the Author Note sidecar. The external RQSM bundle deliberately remains timestamp-only rather than adopting the ordinary __DS__CCC__UTC__UUID governed-artifact grammar. UTC precision/serialization is removed from RQSM-042's remaining freeze items. No RQSM algorithm, capacity, cloaking, recovery, integrity, or carrier-filename semantics are otherwise changed.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionAI - Draft / Not Frozen
Date21 September 2026 (Day 044)
Previous baselineProduct Backlog PRD Revision AH
Major changesApplied YYYYMMDDTHHMMSSmmmZ to RQSM shared package timestamps; updated carrier-header, recovery-grouping, bundle-ZIP, carrier-filename wording, and Author Note requirements; removed UTC precision/serialization from RQSM open freeze items.
WASM-002 scope effectNone. RQSM remains V1-BACKLOG. This is a cross-feature consistency reconciliation only.

Revision AJ Decision Record

Revision AJ replaces automatic newest-alias-MAP selection with explicit Work Order authority. A Work Order may select zero or one alias MAP and never more than one. No MAP means no inherited Suitcase alias namespace; one MAP means exactly that immutable version is used even when newer MAPs exist. Older MAPs remain valid reproducibility inputs. A Work Order may define multiple alias mutations; Data Sculptor applies them to the selected MAP's complete snapshot (or an empty namespace), validates the full result, and on success emits exactly one new complete immutable MAP. MAPs are complete snapshots rather than replay-only deltas. Multiple MAP selection refuses. Exact command spelling and final CSV schema remain open.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionAJ - Draft / Not Frozen
Date21 September 2026 (Day 044)
Previous baselineProduct Backlog PRD Revision AI
Major changesRemoved automatic latest-MAP semantics; froze zero-or-one explicit MAP selection; allowed deliberate use of older MAPs; defined no-MAP as empty inherited namespace; defined complete-snapshot MAP semantics; allowed multiple alias mutations per Work Order; defined one-successor-MAP output per mutation Work Order; updated acceptance and anti-rebinding requirements.
WASM-002 scope effectClarifies and strengthens the existing WASM-002 alias feature without adding GUI authority. Lifecycle remains UNDER REVIEW pending independent QA and T freeze.

Revision AK Decision Record

Revision AK closes the WASM-002 materialized-column alias MAP CSV contract. Successful materialization automatically creates one new complete immutable MAP. An explicit valid historical MAP named in the Work Order overrides default inheritance; otherwise Data Sculptor inherits the unique newest valid MAP by canonical UTC millisecond timestamp, or starts empty when none exists. Equal-latest timestamps refuse because UUID is not chronology. The exact CSV header is source_filename,source_column_number,source_header,alias,column_filename. Source headers supply default aliases for newly materialized logical columns; rematerialization preserves the inherited alias for the same exact source filename/1-based column number/header triple and advances the physical COL filename. MAP serialization is deterministic UTF-8 without BOM using LF and governed CSV quoting. Only a fully written, reopened, parsed, semantically valid MAP is eligible for inheritance; malformed newer MAP-looking artifacts remain visible evidence and do not displace the greatest earlier valid MAP. Exact Work Order command spelling remains open.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionAK - Draft / Not Frozen
Date21 September 2026 (Day 044)
Previous baselineProduct Backlog PRD Revision AJ
Major changesRestored automatic newest-valid-MAP continuity when no MAP is explicitly named; froze the five-column column-alias MAP schema; made source headers default aliases; preserved aliases across rematerialization; froze deterministic CSV encoding/order; defined complete validated MAP publication/eligibility; added automatic MAP materialization acceptance.
WASM-002 scope effectCloses the MAP CSV behavior/schema issue for materialized COL artifacts. Broader non-COL aliasing and exact Work Order alias syntax are not silently added.

Revision AL Decision Record

Revision AL freezes the bounded DS-STEPS materialization syntax required by WASM-002. The canonical sequence is SUITCASE: ., quoted SOURCE, a KEEP block, one or more HEADER "..." and/or 1-based COLUMN n selectors optionally followed by AS "...", and the explicit commitment verb MATERIALIZE. Exact-header selection refuses on no match or duplicate-header ambiguity; ordinal selection refuses outside 1..source-width. Header and ordinal selectors may be mixed, but duplicate resolution to the same source column refuses. AS assigns the materialized-column alias; without AS, new columns use the source header and rematerialized columns preserve the inherited alias. The complete successor MAP must remain alias-unique and Data Sculptor never auto-suffixes collisions. The MAP stores fully resolved source filename, ordinal, actual header, resulting alias, and physical COL identity. The complete future DS-STEPS grammar, exotic string escaping, standalone alias-only maintenance/reset syntax, and explicit historical-MAP selection clause remain open outside this bounded freeze.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionAL - Draft / Not Frozen
Date21 September 2026 (Day 044)
Previous baselineProduct Backlog PRD Revision AK
Major changesFroze the WASM-002 DS-STEPS materialization form; added exact HEADER and 1-based COLUMN selectors; allowed mixed selectors; froze same-line AS alias assignment; defined ambiguity/range/duplicate-selection/duplicate-alias refusals; bound MATERIALIZE to the validated KEEP set; required MAP persistence of fully resolved selector truth.
WASM-002 scope effectAdds only the bounded language surface needed to exercise the already-defined certification, materialization, COL persistence, and alias-MAP engine. It does not freeze the complete future DS-STEPS language.

Revision AM Decision Record

Revision AM brings the Stage 2 structural materialization algorithm up to the implementation specificity already present for Stage 1. Stage 2 restarts from byte zero of the same certified run-local source, strips only an offset-zero UTF-8 BOM before header parsing, parses the header once, resolves the complete KEEP set, and then performs one forward data-record scan for all requested columns. The revision freezes logical-row 1..N alignment, strict record-shape behavior, bounded parser/output state, explicit multi-writer backpressure, unselected-field discard, the 16 MiB decoded-field safety limit, canonical one-column COL CSV bytes, and an all-or-refuse publication boundary. It also records the 4 MiB window as an evidence-backed reference rather than a constant, keeps structural sidecars out of WASM-002, and requires browser-scale evidence against the retained Statistics Canada workload. Exact RID physical serialization and host-specific safe-publication mechanics remain separate freeze items.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionAM - Draft / Not Frozen
Date21 September 2026 (Day 044)
Previous baselineProduct Backlog PRD Revision AL
Major changesSpecified Stage 2 restart/BOM/header sequence; one forward data scan for all selected columns; bounded cross-window parser state; 1..N logical row semantics; strict ragged/blank-record behavior; unselected-field discard; 16 MiB field safety limit; bounded multi-output backpressure; canonical COL serialization; partial-failure publication boundary; window-invariance and scale acceptance.
WASM-002 scope effectCloses the principal algorithmic gap at the center of WASM-002 without adding a structural sidecar, hidden cache, third source pass, or redundant whole-file UTF-8 validation.

Revision AN Decision Record

Revision AN adds the lightweight metadata-only Suitcase Inventory Work Order and makes the single-Work-Order WASM-002 scope explicit. The new INV artifact class uses the canonical governed filename grammar and produces a branded UTF-8 TXT snapshot of exact root filenames, byte lengths, and host/browser last-modified metadata. INVENTORY does not read file contents, hash files, invent creation times, recurse through subdirectories, or claim cryptographic assurance; it records the pre-publication Suitcase state and excludes the newly created INV itself while including earlier INV files already present. Help positions the operation as a quick ordinary continuity/closeout aid and distinguishes it from future/deeper fingerprinting. Revision AN also moves nested Work Order composition, RUN, cycle handling, and invocation-chain requirements out of WASM-002 into V1-BACKLOG while preserving those requirements for later work.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionAN - Draft / Not Frozen
Date21 September 2026 (Day 044)
Previous baselineProduct Backlog PRD Revision AM
Major changesAdded INV artifact class; exact INVENTORY Work Order form; canonical INV filename; metadata-only filename/byte-length/last-modified snapshot; deterministic TXT serialization; pre-publication self-exclusion; Help assurance boundary; inventory acceptance fixtures; deferred Work Order chaining/RUN/nested composition; added explicit single-WKO WASM-002 refusal requirement and acceptance.
WASM-002 scope effectAdds one lightweight closeout/continuity operation without adding content hashing or recursive filesystem scanning, while reducing orchestration scope so WASM-002 proves one saved Work Order at a time.

Revision AO Decision Record

Revision AO freezes the Store RID spine as a WASM-002 requirement. A Suitcase may contain multiple Stores; each Store owns exactly one immutable RID artifact. The RID is created with the first successful Store-establishing materialization, contains the canonical logical row sequence 1..N, and is reused unchanged by later same-row-universe operations. The physical filename is __DS__RID__YYYYMMDDTHHMMSSmmmZ__<uuid-v4>.csv. The canonical RID CSV uses one UTF-8 BOM, literal header RID, LF terminators, and unquoted unsigned decimal row identities 1..N with no leading zeroes. Every aligned same-Store column must have exactly N records in the same order. A changed row universe creates a new Store and new RID. The Store/MAP layer may expose a friendly RID alias while the immutable physical filename and RID semantics remain unchanged; the exact broader Store-Map serialization for that alias/binding remains open.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionAO - Draft / Not Frozen
Date21 September 2026 (Day 044)
Previous baselineProduct Backlog PRD Revision AN
Major changesFroze one RID per Store; multiple Stores per Suitcase; RID creation/reuse lifetime; canonical RID filename and CSV bytes; Store-local RID identity; exact same-Store N-row alignment invariant; new-Store rule when row universe changes; analyst-facing RID alias without physical rename; RID acceptance fixtures.
WASM-002 scope effectTurns RID from a partially specified row-ordinal concept into a first-class visible Store artifact required by the WASM-002 materialization path, without pulling later filter/join/BUILD CSV operations into this build.

Revision AP Decision Record

Revision AP freezes automatic RID generation as implicit Store infrastructure in WASM-002. The analyst's materialization Work Order names only the source columns and optional aliases they want. A successful first materialization that establishes a Store automatically emits exactly one RID artifact during the same Stage 2 operation: one requested COL still yields one RID; multiple requested COLs still yield only one RID. No RID/ROW INDEX command is required or permitted, and WASM-002 provides no switch to disable the Store RID. Later same-Store materialization reuses the existing RID. This keeps row identity mandatory and deterministic while keeping Work Orders focused on analyst-authored analytical intent.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionAP - Draft / Not Frozen
Date21 September 2026 (Day 044)
Previous baselineProduct Backlog PRD Revision AO
Major changesMade RID generation implicit and mandatory for new-Store materialization; prohibited separate RID/ROW INDEX Work Order syntax and disable switches; clarified one-RID behavior for both single- and multi-column first materialization; required same-pass RID generation without a second source read solely for RID; strengthened DS-STEPS and acceptance coverage.
WASM-002 scope effectClarifies existing Store infrastructure behavior without adding a new analyst-facing operation.

Revision AQ Decision Record

Revision AQ freezes the V1 filter result domain as a strict two-valued Boolean column aligned to a Store's existing RID spine. FALSE is physically represented by 0; TRUE by 1. Every selection column is total over the Store row universe and therefore contains exactly N Boolean results in RID order when the Store has N RIDs. No blank/NULL/UNKNOWN/NA or textual TRUE/FALSE value is permitted as a canonical selection-row token, and an unresolved future filter condition must refuse rather than emit a third state. Filtering itself remains V1-BACKLOG functionality; this revision captures the representation now because the WASM-002 RID contract is its required substrate.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionAQ - Draft / Not Frozen
Date21 September 2026 (Day 044)
Previous baselineProduct Backlog PRD Revision AP
Major changesFroze future selection/filter results as strict Boolean FALSE/TRUE with canonical physical tokens 0/1; required exactly one Boolean result per RID; prohibited third-state selection values in V1; required refusal rather than silent third-state coercion; preserved filtering as deferred V1-BACKLOG rather than executable WASM-002 functionality.
WASM-002 scope effectNo new executable filter operation. WASM-002 retains the RID/Store substrate and now states the compatibility rule later Boolean selection columns must follow.

Revision AR Decision Record

Revision AR makes the existing governed MAP artifact the unified Store MAP for WASM-002. No second Store-metadata artifact is introduced. One immutable MAP snapshot represents exactly one Store and records its Store alias, Store-establishing source filename, exact RID binding, RID alias, and complete current materialized-COL mappings. The exact schema expands from the earlier five-column COL-alias form to nine columns: store_alias,store_source_filename,rid_filename,rid_alias,source_filename,source_column_number,source_header,alias,column_filename. The immutable RID filename is the physical Store identity anchor; Store and RID aliases are mutable human-facing metadata only. Automatic inheritance is now source-qualified and Store-aware, allowing multiple Stores in one Suitcase without a global newest-MAP ambiguity.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionAR - Draft / Not Frozen
Date21 September 2026 (Day 044)
Previous baselineProduct Backlog PRD Revision AQ
Major changesUnified Store metadata and materialized-column alias state in the existing MAP artifact; froze the exact nine-column Store MAP schema; made RID filename the physical Store identity anchor; added deterministic initial Store/RID aliases; made automatic MAP inheritance source-qualified and Store-aware; preserved explicit historical MAP selection; reconciled materialization, DS-STEPS, UI, and acceptance requirements with the unified Store MAP.
WASM-002 scope effectResolves the previously open broader Store-MAP schema without introducing a new artifact class or hidden metadata surface.

Revision AS Decision Record

Revision AS closes the cross-session source-continuity edge case by freezing the assurance boundary rather than adding hidden protection machinery. Same-filename Store inheritance remains useful routing, but it is not represented as proof that source bytes or row order are unchanged across sessions. The Help Engine owns unexpected-source-change investigation and asks whether the source may have been edited, replaced, sorted, re-exported, synchronized, or otherwise changed. INVENTORY provides lightweight filename/byte-length/last-modified clues; unchanged metadata is not byte-level proof. Explicit SHA-256 FINGERPRINT remains the deferred stronger V1 workflow and is documented as an optional best practice when exact continuity matters. If neither evidence type exists, Help states that cross-session byte continuity cannot be independently verified. WASM-002 does not add automatic source hashing or whole-Suitcase surveillance.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionAS - Draft / Not Frozen
Date21 September 2026 (Day 044)
Previous baselineProduct Backlog PRD Revision AR
Major changesFroze cross-session source-continuity assurance boundary; clarified same-filename Store routing is not byte proof; added Help diagnostic guidance and evidence levels; strengthened INVENTORY limitation language; framed deferred FINGERPRINT as the stronger optional closeout/continuity best practice; explicitly prohibited automatic cross-session SHA-256 and hidden Suitcase surveillance in ordinary WASM-002.
WASM-002 scope effectCloses the edge case through Help and explicit evidence boundaries without adding a new mandatory analytical pass or changing Stage 1/Stage 2 materialization semantics.

Revision AT Decision Record

Revision AT freezes the canonical WASM-002 Receipt as an automatically generated governed TXT sidecar for every actual Run invocation of a saved WKO. WKO is authorization; RCP is execution evidence. Successful and refused runs both receive Receipts when publication succeeds, while unsaved WIP cannot Run and produces none. The physical form is __DS__RCP__YYYYMMDDTHHMMSSmmmZ__<uuid-v4>.txt, UTF-8 without BOM, LF, deterministic line-oriented facts. Receipts carry a fixed core execution block plus operation-specific facts; materialization Receipts record source, Store MAP, RID action, Stage 1/Stage 2 facts, created COLs, and successor MAP. WASM-002 stays TXT-only regardless of Brand Manifest availability. A later branded HTML Receipt may present the same canonical facts, but branding is presentation-only and that future switch is deferred. Receipt-write failure is surfaced through Help and must not be misrepresented as successful evidence persistence.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionAT - Draft / Not Frozen
Date21 September 2026 (Day 044)
Previous baselineProduct Backlog PRD Revision AS
Major changesFroze automatic one-RCP-per-Run receipt behavior; canonical TXT filename and serialization; success/refusal receipts; fixed core receipt facts; materialization and operation-specific receipt facts; TXT-only WASM-002 behavior regardless of branding; future same-facts branded HTML principle; receipt-publication failure handling; receipt acceptance fixtures.
WASM-002 scope effectAdds the durable run ledger required to explain what each saved Work Order actually did without adding branded Receipt rendering to this build.

Revision AU Decision Record

Revision AU clarifies that governed artifact timestamps describe their own artifact-creation/publication events rather than lineage by timestamp reuse. A saved WKO keeps the UTC embedded when that immutable instruction artifact was created. Each RCP receives its own later UTC when that Receipt artifact is published. The exact lineage link is the WORK_ORDER_FILENAME field inside the Receipt, supplemented by the run start/finish timestamps. Re-running one immutable WKO therefore produces multiple distinct Receipts with truthful execution timing while preserving unambiguous reference to the same authorizing WKO.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionAU - Draft / Not Frozen
Date21 September 2026 (Day 044)
Previous baselineProduct Backlog PRD Revision AT
Major changesClarified artifact-own timestamp semantics for WKO and RCP filenames; made WORK_ORDER_FILENAME the authoritative WKO→RCP lineage link; explicitly supported multiple Receipts for repeated execution of one immutable WKO; added acceptance coverage proving distinct Receipt timestamps with identical WKO lineage.
WASM-002 scope effectNo new feature; removes ambiguity in the Receipt identity/lineage contract.

Revision AV Decision Record

Revision AV reconciles stale class-allocation language with the explicit WASM-002 semantic artifact registry. The registry in PB-STOR-006 is the frozen current class table: WKO, RCP, DGN, HLP, CER, CVT, RID, COL, MAP, INV, SCR, RCV, and BRD. SCR is no longer described as a candidate. WASM-002 defines no reserved class ranges; all other syntactically valid three-letter tokens remain unassigned until a future explicit PRD revision allocates them. Existing class meanings cannot be reassigned. Unknown future classes remain preserve-and-report. The Help Report class is explicitly HLP, leaving only fingerprint-placement/provenance serialization open.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionAV - Draft / Not Frozen
Date21 September 2026 (Day 044)
Previous baselineProduct Backlog PRD Revision AU
Major changesClosed stale “final class table remains open” wording; froze PB-STOR-006 as the current exact class table; removed implied reserved class ranges; confirmed SCR as governed; confirmed HLP for Help Reports; preserved future class allocation only by explicit PRD revision.
WASM-002 scope effectNo new feature or class; contradiction cleanup and storage-contract clarification only.

Revision AW Decision Record

Revision AW closes the Flight Recorder representation/class ambiguity by defining the Flight Recorder as the logical chronological history formed from governed RCP Receipt artifacts produced by actual Run invocations of saved immutable WKO Work Orders. The underlying Receipts are the historical evidence; a Flight Recorder presentation is derived and regenerable, not a separately persisted artifact. Successful and refused execution outcomes contribute when Receipt publication succeeds. Unsaved WIP cannot Run and therefore contributes no execution Receipt. Receipt-publication failure remains governed by W002-RCP-010 and cannot be silently reconstructed as original evidence. No new artifact class is allocated; the Revision AV registry remains unchanged.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionAW - Draft / Not Frozen
Date22 September 2026 (Day 045)
Previous baselineProduct Backlog PRD Revision AV
Major changesDefined the Flight Recorder as a derived chronological view of canonical RCP Receipts; explicitly rejected a separate persisted Flight Recorder artifact/class; tied successful and refused Run outcomes to Flight Recorder history through the existing Receipt contract; preserved Receipt-publication failure semantics; reconciled glossary, storage, artifact registry, and Receipt wording.
WASM-002 scope effectNo new executable feature or artifact class; closes a storage/evidence ambiguity by reusing the already-governed RCP execution ledger.

Revision AX Decision Record

Revision AX resolves the materialized-column staging/promotion mechanism inside the existing all-or-refuse publication boundary. Requested materialized outputs are first persisted as visible governed SCR candidates. No candidate is promoted while any requested column remains incomplete or unvalidated. After the complete requested set reaches EOF, reconciles to the same accepted row count, and passes finalization/validation, Data Sculptor promotes each candidate by host rename from its SCR filename to a governed COL filename. Promotion failure triggers refusal and rollback of already-promoted new COL names where safely possible; otherwise affected bytes remain attributable SCR/RCV recovery evidence and are not committed current COLs. The successor Store MAP is published last and is the commit point. If MAP publication/validation fails, the newly promoted COL set is likewise rolled back out of the COL namespace where safely possible, and the prior valid MAP remains authoritative. The target COL identities continue to obey the already-governed filename, timestamp, UUID, collision, and serialization rules.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionAX - Draft / Not Frozen
Date22 September 2026 (Day 045)
Previous baselineProduct Backlog PRD Revision AW
Major changesResolved visible SCR staging for requested materialized columns; froze complete-set validation before promotion; froze SCR-to-COL host rename as the promotion operation; required rollback/recovery evidence on promotion failure; froze successor MAP publication last as the materialization commit point; strengthened failure-publication acceptance evidence.
WASM-002 scope effectNo new requirement ID or artifact class. Narrows the remaining safe-publication freeze work to supported-host filename/path limits and non-COL publication mechanics such as newly-created RID and MAP temporary publication.

Revision AY Decision Record

Revision AY closes the newly-created-RID and successor-MAP publication mechanics left open by Revision AX. On first Store materialization, the RID and all requested COL outputs are written as visible governed SCR candidates during the same bounded Stage 2 traversal. Promotion cannot begin until the entire candidate set reaches EOF, reconciles to one accepted row count N, and passes final validation. The new RID is promoted first by host rename, requested COLs are then promoted in deterministic KEEP order, and the complete successor MAP is constructed under SCR using the exact final RID/COL filenames. The MAP candidate must close successfully, reopen, and pass full MAP eligibility validation while still SCR. Only then is its final timestamp+UUID MAP identity allocated and the candidate renamed into the MAP namespace. That final MAP rename is the Store-state/materialization commit point. Existing Stores reuse their inherited RID unchanged. Interruption or failure before MAP commit leaves no new committed Store state: newly promoted RID/COL artifacts must be rolled back where safely possible or retained as attributable recovery evidence, and final-class-looking files not bound by a valid MAP do not establish Store membership/current state.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionAY - Draft / Not Frozen
Date22 September 2026 (Day 045)
Previous baselineProduct Backlog PRD Revision AX
Major changesResolved first-Store RID staging as SCR; froze complete-set validation before RID/COL promotion; froze RID-first promotion for a new Store and inherited-RID reuse for existing Stores; froze successor MAP construction/close/reopen/validation while still SCR; froze final SCR-to-MAP rename as the commit point; defined unreferenced promoted RID/COL files as uncommitted recovery/orphan evidence rather than Store membership; strengthened transaction-failure acceptance coverage.
WASM-002 scope effectNo new requirement ID or artifact class. Closes the remaining RID/MAP safe-publication mechanics and narrows unresolved host storage work to filename/path limits plus separately listed metadata/help/alias details.

Revision AZ Decision Record

Revision AZ closes the governed RID-recovery path and reconciles artifact timestamps with all-or-refuse publication transactions. Ordinary RID creation remains implicit under MATERIALIZE; the exceptional repair path is explicit DS-STEPS RECOVER RID FOR STORE "<StoreAlias>". Recovery is allowed only when one recovery-base MAP can be resolved, its bound RID is missing/invalid, the MAP and all bound COL artifacts are otherwise valid, and every bound COL proves the same data-row count N. Data Sculptor reconstructs canonical 1..N under SCR, never overwrites the damaged RID, promotes a new immutable RID, preserves surviving COL identities, and commits one successor MAP last. The replacement RID and recovery MAP share one transaction UTC and distinct UUIDs. The same shared-transaction-UTC rule now governs newly published RID/COL/MAP sets from ordinary materialization; inherited artifacts keep their prior identities and the Receipt keeps its own publication timestamp. The existing rule that rid_filename anchors Store physical identity is narrowed only for this proven recovery transition, whose Receipt preserves the old-to-new RID evidence chain.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionAZ - Draft / Not Frozen
Date22 September 2026 (Day 045)
Previous baselineProduct Backlog PRD Revision AY
Major changesAdded canonical RECOVER RID DS-STEPS syntax; froze recovery eligibility/refusal evidence; froze non-overwriting RID reconstruction and successor-MAP commit; reconciled recovered-RID continuity with the MAP/RID Store identity model; froze one shared publication-transaction UTC across newly created RID/COL/MAP artifacts with distinct UUIDs; added deterministic RID-recovery Receipt facts and acceptance coverage.
WASM-002 scope effectAdds explicit requirements for RID recovery and transaction timestamp behavior; no new artifact class and no MAP-schema column is added. Existing valid COL artifacts may be rebound unchanged by a recovery successor MAP.

Revision BA Decision Record

Revision BA closes the supported-host filename/path validation question by replacing abstract operating-system length arithmetic with a real retained governed write. A selected folder becomes a validated Suitcase only after Data Sculptor successfully creates, completely writes, and closes one canonical CER HTML Suitcase Validation Certificate named __DS__CER__YYYYMMDDTHHMMSSmmmZ__<uuid-v4>.html. The certificate remains visible as durable evidence; validation does not require a disposable probe, delete, or rename. Its semantic fields are fixed around RESULT: PASS, SUITCASE: ., certificate UTC/UUID/filename, and TEST: CREATE_WRITE_CLOSE, together with an explicit statement of what was and was not proven. The HTML presentation is brandable without allowing branding to alter the validation facts. This closes numeric host path-length limits as a WASM-002 freeze item while leaving later operation-specific rename/publication failures governed by their existing refusal and recovery rules.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionBA - Draft / Not Frozen
Date22 September 2026 (Day 045)
Previous baselineProduct Backlog PRD Revision AZ
Major changesAdded retained brandable CER HTML Suitcase Validation Certificate; canonical certificate filename and semantic fields; create/write/close validity gate; explicit limitations; certificate-specific branding rule; removed numeric supported-host filename/path limits from the unresolved storage freeze list; reconciled the browser Suitcase gate and materialization publication boundary.
WASM-002 scope effectAdds W002-STOR-022 through W002-STOR-022.3 and revises W002-STOR-015, W002-UI-017, W002-UI-ACC-011, and W002-MAT-002.6. No new artifact class is added; the existing CER class is used.

Revision BB Decision Record

Revision BB closes the Work Order description/alias representation issue and adds DS-STEPS comments. The browser no longer owns a standalone mutable Description field. A human-facing Work Order name is authored inside immutable WKO text with optional WORK ORDER AS "<alias>"; changing that alias, any instruction, or any preserved comment requires a new WKO physical identity. Outside quoted strings, # starts a line comment through LF; inside quoted strings it remains ordinary content. Comments are semantically inert but remain part of immutable WKO bytes.

To make Work Order aliases visible and later resolvable without adding a new artifact class or changing the nine-column Store-MAP schema, Revision BB defines a second explicit profile of the existing MAP class: the WKO MAP. Its exact deterministic CSV schema is wko_alias,wko_filename, it is a complete immutable snapshot rather than a delta log, and its newest unambiguous valid instance is the current governed WKO alias registry. A WKO MAP is never eligible as a Store MAP. Saving a new WKO publishes its successor WKO MAP last as the alias-registry commit point; the WKO and MAP share one save-transaction UTC and distinct UUIDs. The future invocation grammar remains deferred, but later named invocation can resolve through this governed registry to exact immutable WKO filenames.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionBB - Draft / Not Frozen
Date22 September 2026 (Day 045)
Previous baselineProduct Backlog PRD Revision BA
Major changesRemoved standalone mutable Work Order Description concept; added optional WORK ORDER AS immutable WKO alias; added # whole-line/trailing comments outside quoted strings; added complete two-column WKO-MAP alias-registry profile using existing MAP class; froze deterministic WKO-MAP selection/serialization and save-transaction publication semantics; reconciled UI/prototype and future named-invocation dependency.
WASM-002 scope effectRevises W002-STOR-015, W002-STOR-018, W002-STEPS-001, W002-UI-023, W002-UI-024 and adds W002-STOR-018.1 through .4, W002-STEPS-001.1 through .2, and W002-MAT-ACC-002.3 through .4. No new artifact class is added and the existing nine-column Store-MAP schema remains unchanged.

Revision BC Decision Record

Revision BC separates ordinary analytical work from deliberate cryptographic closeout. It adds LCK — Suitcase Lock — as a governed three-letter artifact class reserved for the deferred explicit V1 FINGERPRINT workflow. The canonical LCK filename is __DS__LCK__YYYYMMDDTHHMMSSmmmZ__<uuid-v4>.csv, and its base CSV schema is exactly filename,sha256. A blank hash means no governed SHA-256 is known for that filename. LCK artifacts are immutable/versioned; later explicit FINGERPRINT work publishes a successor LCK rather than rewriting history.

Revision BC explicitly rejects continuous fingerprinting. Saving a WKO, publishing WKO or Store MAP state, materializing RID/COL artifacts, RID recovery, INVENTORY, alias maintenance, UTF-8 certification, and ordinary project use do not create, refresh, or silently verify LCK files. A later FINGERPRINT operation hashes only deliberately targeted files. Successor LCK files may carry forward earlier known hashes without re-reading those files, but carry-forward must never be described as fresh verification.

Revision BC also clarifies the human-control boundary for visible system artifacts. __DS__ files stay ordinary visible Suitcase files so analysts can inspect, audit, copy, and understand Data Sculptor state. Documentation and Help tell users not to manually edit, rename, or delete them. Because the Suitcase is user-controlled, Data Sculptor does not claim OS-level write protection, cryptographic self-authentication of LCK, tamper-proofing, or continuous surveillance. Governed changes occur through Work Orders and documented product workflows.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionBC - Draft / Not Frozen
Date22 September 2026 (Day 045)
Previous baselineProduct Backlog PRD Revision BB
Major changesAdded reserved LCK Suitcase Lock artifact class; froze canonical LCK filename and two-column filename,sha256 base schema; defined blank SHA as unknown/not fingerprinted; made LCK immutable/versioned; prohibited automatic LCK generation, refresh, verification, or background Suitcase hashing during ordinary work; defined copy-forward semantics for previously established hashes; documented visible __DS__ files as inspectable system artifacts that users should not manually edit, rename, or delete.
WASM-002 scope effectNo new automatic hashing workload is added to WASM-002. LCK generation remains V1-BACKLOG under explicit FINGERPRINT. Revision BC updates the shared class registry and user/system-file documentation, and strengthens the existing WASM-002 no-automatic-hashing boundary.

Revision BD Decision Record

Revision BD freezes the bounded DS-STEPS syntax for standalone Store/RID/COL alias creation or replacement. Alias-only Work Orders use UPDATE ALIASES as the commitment verb, with STORE AS "...", RID AS "...", and COL "<reference>" AS "..." as the canonical replacement clauses. Alias-only execution mutates no source, RID, or COL bytes; it publishes one complete successor Store MAP and leaves the inherited MAP as visible history.

Revision BD also freezes explicit historical Store-MAP selection as MAP "<exact Store MAP filename>". In alias-only work the analyst selects the Store state with either SOURCE "..." or MAP "...". In materialization, SOURCE "..." remains mandatory and an optional exact MAP clause supplies the Store-state base. A valid explicit MAP selection is fixed for the run and must never be silently replaced by a newer MAP. The clause accepts only the exact filename of a valid Store-MAP profile.

Revision BD deliberately does not freeze alias clearing/reset syntax. Creation and replacement are now closed; clearing an alias to a default/empty state remains a separate WASM-002 decision so the PRD does not invent CLEAR, DEFAULT, empty-string, or equivalent semantics without explicit review.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionBD - Draft / Not Frozen
Date22 September 2026 (Day 045)
Previous baselineProduct Backlog PRD Revision BC
Major changesFroze UPDATE ALIASES; STORE AS, RID AS, and existing-COL ... AS replacement syntax; froze exact MAP "<filename>" historical Store-MAP selection; defined SOURCE-vs-MAP targeting rules for alias-only work and SOURCE+optional-MAP behavior for materialization; preserved immutable complete-snapshot publication; added alias and historical-MAP acceptance coverage.
WASM-002 scope effectCloses standalone alias creation/replacement and historical Store-MAP selector syntax without adding a data transformation. Alias clearing/reset syntax remains UNDER REVIEW.

Revision BE Decision Record

Revision BE closes the remaining WASM-002 alias clearing/reset decision. Alias-only Work Orders continue to use UPDATE ALIASES. The canonical clearing forms are CLEAR STORE ALIAS, CLEAR RID ALIAS, and CLEAR COL "<reference>" ALIAS; CLEAR deliberately writes an empty alias field to the successor Store MAP and does not mean “restore default.” Empty-string AS "" is not the clearing grammar.

The canonical reset forms are RESET STORE ALIAS, RESET RID ALIAS, and RESET COL "<reference>" ALIAS. RESET restores the deterministic default already defined by the Store model: exact store_source_filename for Store, literal RID for RID, and exact recorded source_header for a COL. Reset remains subject to the normal alias-validity, uniqueness, and shadowing rules; empty/conflicting COL-header defaults refuse rather than being auto-repaired. COL references are resolved against the selected pre-mutation Store MAP before mutations are applied, preventing clause-order-dependent identity.

Clear, reset, and explicit AS replacements remain metadata-only operations. They do not rewrite source, RID, or COL bytes and commit by publishing one complete successor Store MAP under the existing immutable SCR-to-MAP contract.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionBE - Draft / Not Frozen
Date22 September 2026 (Day 045)
Previous baselineProduct Backlog PRD Revision BD
Major changesFroze CLEAR ... ALIAS as explicit empty-alias semantics; froze RESET ... ALIAS as deterministic default restoration; defined Store/RID/COL reset defaults; rejected empty-string AS "" as clearing syntax; froze pre-mutation COL-reference resolution and duplicate-target refusal; preserved one-successor-MAP metadata-only commit behavior.
WASM-002 scope effectAdds two requirements to close the alias lifecycle. Alias creation/replacement, clearing, reset, and exact historical Store-MAP selection now have bounded canonical syntax; Help-report fingerprint provenance and later Brand/Receipt integration remain separate open storage details.

Revision BF Decision Record

Revision BF freezes the WASM-002 Help-catalog physical/build contract without pulling production Help writing into the build. The editable development source is exactly help_messages.json, UTF-8 without BOM, with one deterministic versioned JSON schema containing the Casual, Office Speak, and Technical templates for canonical diagnostic IDs. It is application/build content rather than a Suitcase artifact, so it receives no __DS__ filename or semantic artifact class.

The build parses and validates that source and embeds the validated catalog directly into the released Data Sculptor HTML as a non-executable application/json payload identified by ds-help-catalog. Runtime Help performs no network fetch and requires no adjacent catalog file. The embedding must be HTML-safe, and a missing, malformed, or non-corresponding embedded catalog is a build-validation failure.

Revision BF does not require authored production Help prose. Placeholder entries may be generated mechanically for the WASM-002 diagnostic coverage under test. Their purpose is to prove diagnostic-ID lookup, fact interpolation, voice switching, catalog coverage, and semantic parity. Production wording remains a later Help-content milestone.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionBF - Draft / Not Frozen
Date22 September 2026 (Day 045)
Previous baselineProduct Backlog PRD Revision BE
Major changesFroze help_messages.json as the UTF-8 development source; froze the version-1 JSON schema and placeholder reference form; required build-time validation; froze direct non-executable embedding into the released HTML as ds-help-catalog; prohibited runtime catalog fetch/adjacent-file dependency; kept production Help authorship deferred.
WASM-002 scope effectAdds two requirements to close the Help-catalog physical/build boundary. WASM-002 proves Help wiring with placeholder content; it does not require the final Help corpus.

Revision BG Decision Record

Revision BG closes the remaining WASM-002 Help evidence/disclosure/provenance decisions accepted on Day 045. Canonical execution-boundary truth now uses the exact Boolean fact names source_modified_by_data_sculptor, materialization_started, analytical_outputs_published, and store_state_committed; missing/unavailable facts may not be silently coerced to false.

Portable HLP support-handoff reports now use a fixed disclosure allowlist. They may carry only governed facts needed to explain the diagnostic, including bounded source/column evidence and the minimum relevant executable Work Order clauses. They do not automatically export source rows/values, absolute paths, complete Work Orders, Work Order comments, unrelated Suitcase contents, or raw ungoverned stack traces, and every HLP visibly states the disclosure boundary applied.

The HLP provenance contract is also closed for WASM-002. The final branded self-contained HTML report uses governed HLP identity, records its diagnostic/WKO/RCP/voice/brand/build lineage as applicable, and does not automatically hash itself or create/refresh an LCK. Exact-byte HLP integrity remains available later only through the explicit FINGERPRINT/LCK workflow.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionBG - Draft / Not Frozen
Date22 September 2026 (Day 045)
Previous baselineProduct Backlog PRD Revision BF
Major changesFroze four canonical Boolean Help boundary facts; froze fixed HLP disclosure allowlist and visible disclosure declarations; froze canonical HLP HTML identity and lineage; replaced automatic HLP fingerprint acceptance with explicit no-automatic-hash behavior and later FINGERPRINT/LCK eligibility; reconciled Help acceptance and storage-open-item wording.
WASM-002 scope effectNo new feature family. Revision BG converts already-agreed Help/report edge contracts into deterministic testable requirements while preserving deferred exact-byte FINGERPRINT/LCK work and deferred production Help prose.

Revision BH Decision Record

Revision BH narrows WASM-002 by deferring configurable Brand Manifest and white-label implementation to V1-BACKLOG / a future build whose number is not yet assigned. This is a scope deferral, not a rejection of the architecture. The BRD semantic class and Brand Manifest/white-label product requirements remain in the master backlog for later implementation.

WASM-002 keeps PRETTY's separation of governed truth from presentation and keeps the self-contained HTML HLP. For this build, HLP and CER human-facing HTML use the canonical built-in Red5Sorcery/Data Sculptor presentation. HLP provenance records a built-in presentation identifier/version rather than requiring Brand Manifest provenance. Configurable BRD serialization, parsing, lifecycle/selection, custom-brand provenance or hashing, alternate-brand substitution, invalid-manifest behavior, and white-label acceptance are not WASM-002 gates.

This revision also reconciles dependent WASM-002 wording for Receipt presentation invariance, Help determinism, PRETTY self-containment, front-end branding, and the Custom theme so none of those requirements silently reintroduces Brand Manifest implementation into WASM-002.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionBH - Draft / Not Frozen
Date22 September 2026 (Day 045)
Previous baselineProduct Backlog PRD Revision BG
Major changesDeferred configurable Brand Manifest and white-label implementation to V1-BACKLOG / future build; retained PRETTY and built-in Data Sculptor HLP presentation in WASM-002; changed HLP provenance from Brand Manifest identity/version to built-in presentation identity/version; reconciled dependent CER, Receipt, Help, PRETTY, UI, and acceptance wording.
WASM-002 scope effectScope reduction only. No future build number is assigned. WASM-002 no longer requires BRD serialization/selection, Brand Manifest parsing or validation, alternate-brand substitution, Brand Manifest provenance/fingerprinting, or white-label implementation.

Revision BI Decision Record

Revision BI closes the WASM-002 canonical diagnostic-registry contract. The PRD keeps permanent diagnostic-ID grammar in the numbered requirements but does not grow into a hand-maintained table of every diagnostic allocation. Instead, the accepted build carries one human-inspectable UTF-8 build resource, diagnostics.json, whose version-1 schema declares each stable diagnostic ID together with its fixed severity, phase, continue/refuse behavior, safe next-action token, and required/optional fact keys.

The canonical event semantic core is now explicit: diagnostic_id; severity using INFO, WARNING, or ERROR; uppercase ASCII snake-case phase; behavior using CONTINUE or REFUSE; diagnostic-specific facts using lowercase ASCII snake-case keys with missing distinct from false/zero/empty; and uppercase ASCII snake-case next_action with NONE when no safe governed next action applies. Severity and execution behavior are deliberately separate.

Revision BI also binds help_messages.json directly to the validated diagnostic registry: Help IDs must be registered and template placeholders may name only fact keys declared for that diagnostic. Build/acceptance validation must reject malformed or duplicate registry content, unregistered engine diagnostics, semantic disagreement, invalid required/optional fact declarations, missing required facts, undeclared emitted facts, unregistered Help IDs, or undeclared Help placeholders.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionBI - Draft / Not Frozen
Date22 September 2026 (Day 045)
Previous baselineProduct Backlog PRD Revision BH
Major changesFroze canonical severity/phase/behavior/next-action/fact-key semantics; added exact diagnostics.json version-1 build-resource schema; made fact-key authority per diagnostic rather than a global PRD vocabulary; cross-bound help_messages.json IDs/placeholders to the registry; added diagnostic-registry/build-validation acceptance evidence.
WASM-002 scope effectNo new feature family. Revision BI turns the already-required canonical diagnostic event into a finite, inspectable, testable build contract without requiring final production Help prose or enumerating every diagnostic allocation in the PRD.

Revision BJ Decision Record

Revision BJ closes the WASM-002 HLP machine-readable provenance shape without creating a separate provenance artifact. Every final self-contained HLP carries exactly one non-executable application/json payload with exact element ID ds-hlp-provenance. Version 1 has ten exact top-level fields covering schema version, HLP identity/time, diagnostic identity, optional WKO/RCP lineage, selected Help voice, built-in presentation identity/version, and Data Sculptor build.

WKO/RCP lineage that does not exist is represented as JSON null and as NOT APPLICABLE in the visible Provenance section. The machine-readable and visible provenance must agree. The built-in WASM-002 presentation is identified as red5sorcery-data-sculptor, version "1"; the selected Help voice uses the exact catalog tokens casual, office_speak, or technical. Embedded provenance must be HTML-safe and remains bounded by the fixed HLP disclosure policy.

Revision BJ does not introduce automatic HLP hashing, a provenance sidecar, or LCK maintenance. The exact final HLP bytes remain eligible for the later explicit FINGERPRINT/LCK workflow. The HLP acceptance gate is reconciled from stale Brand Manifest wording to the built-in presentation identity/version required by Revision BH.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionBJ - Draft / Not Frozen
Date22 September 2026 (Day 045)
Previous baselineProduct Backlog PRD Revision BI
Major changesFroze the exact embedded ds-hlp-provenance JSON structure; froze schema version "1" and its ten fields; froze null/NOT APPLICABLE lineage semantics; froze built-in presentation ID/version and exact Help-voice tokens; required visible/machine-readable provenance parity and HTML-safe embedding; reconciled HLP acceptance wording after Brand Manifest deferral.
WASM-002 scope effectNo new feature family and no new artifact class. Revision BJ closes the representation of already-required HLP provenance inside the existing self-contained HLP and preserves deferred FINGERPRINT/LCK integrity work.

Revision BK Decision Record

Revision BK closes the WASM-002 Custom-theme ambiguity created when configurable Brand Manifest implementation was deferred. The current browser presentation surface is now exactly Modern Dark and Modern Light. Custom presentation is preserved in V1-BACKLOG / a future build whose number is not yet assigned; no miniature Custom-theme subsystem is introduced solely for WASM-002.

Theme selection remains presentation-only and may not change Work Order semantics, source resolution, canonical diagnostic identity or facts, continue/refuse behavior, analytical values, Receipt truth, or provenance. Durable HLP and CER HTML do not inherit the live browser theme in WASM-002; they continue to use the canonical built-in Red5Sorcery/Data Sculptor presentation.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionBK - Draft / Not Frozen
Date22 September 2026 (Day 045)
Previous baselineProduct Backlog PRD Revision BJ
Major changesReduced the WASM-002 governed browser themes from Modern Dark / Modern Light / Custom to Modern Dark / Modern Light; deferred Custom presentation to V1-BACKLOG / a future build; updated theme semantic-invariance acceptance; froze the rule that live browser theme selection does not control durable HLP/CER presentation.
WASM-002 scope effectScope reduction only. No future build number is assigned and no new presentation subsystem is added.

Revision BL Decision Record

Revision BL performs a current-state reconciliation cleanup before independent adversarial QA. It introduces no new requirement, feature family, artifact class, or scope allocation. The current dashboard is aligned with W002-WKO-013 so WASM-002 is described as one saved immutable Work Order per top-level request with Work Order composition deferred and refused before analytical execution. The storage namespace explanatory note is aligned with the later resolved identity grammar, class registry, UTC/UUID rendering, and collision-retry requirements rather than continuing to describe them as open freeze items.

Revision BL also removes stale implications that Brand Manifest serialization is TOML in the current build, including the current PB-STOR-007 example and BRD registry note; reconciles W002-WL-002.6 so deferred white-label/configurable-brand substitution proof is no longer assigned to WASM-002; updates W002-STOR-015 from a Revision BG snapshot phrase to a current-contract statement; and restores the missing UNDER REVIEW data-status metadata on W002-WKO-012.5 and W002-WKO-012.6 so dashboard/status filtering remains complete. Historical revision records are intentionally preserved unchanged because they document earlier decisions and superseded states.

DocumentRed5Sorcery Data Sculptor Product Backlog PRD
RevisionBL - Draft / Not Frozen
Date22 September 2026 (Day 045)
Previous baselineProduct Backlog PRD Revision BK
Major changesReconciled current dashboard Work Order orchestration with no-chaining scope; closed stale storage explanatory “open freeze item” wording; removed implied TOML BRD serialization from current WASM-002 text and PB-STOR-007; corrected deferred white-label responsibility; refreshed storage-status wording to current-contract language; repaired two missing requirement data-status attributes.
WASM-002 scope effectNone. Reconciliation/documentation cleanup only; numbered requirement count and build allocation are unchanged.
No requirements match the current filters.