Skip to content
ClearedStack

Platform · J.4 Component specifications

Moldloft specification

Design

Technical specification for the deterministic Moldloft worker that generates isolated MIT static tool repositories from clean-room JSON specs and stack templates.

J.4.133 min readLast revised November 2026

Status: Design. A specification. It describes how the component is meant to work, not something you can use on this site today. What the labels mean.

Registry entry · Stage 06

Generates a tool's repository from its specification and a fixed template.

Formerly
cs-06-build, then Jig
Namespace
cs-workers
Repository
moldloft
Container image
lazarette.clearedstack.svc.cluster.local:5000/moldloft
Depends on
Muster, Plainforge
Depended on by
Nothing else in the platform
Boundaries
  • Leases build specifications from Muster
  • Commits the generated repository to Plainforge

From the naming registry, which is the one place this component’s name is written down.

On this page
  1. Overview & Role
  2. Runtime & Resource Budget
  3. Interfaces & State Transitions
  4. Sub-Tools & Failure Modes
  5. Security & Clean-Room Boundaries
  6. Related pages

Overview & Role#

Moldloft (v0.1.0-draft) is the deterministic clean-room build worker in ClearedStack v3.1, replacing the original Stage 8 (Build). Implemented in the Moldloft repository under the MIT License, it reads sanitized JSON build specs and worked-example fixtures compiled by Waybill and generates isolated, MIT-licensed static tool repositories inside Plainforge.

Zero observation artifacts ever enter Moldloft, and zero AI models run during code generation. Every generated tool is pure static HTML, CSS, JavaScript, and bundled JSON reference tables that run entirely in browser memory with no backend server and no external CDN dependencies.

Runtime & Resource Budget#

Moldloft runs in the cs-workers Kubernetes namespace under the Standard (Workers) priority class.

AttributeValue
Worker ID / RepoMoldloft (moldloft)
Namespacecs-workers
Kind / Versionworker · v0.1.0-draft
RAM Budget30 MiB (always-on Go pod)
Runtime AI Calls0 (100% deterministic stack-templates/ code generation)
Local Spool/var/spool/cs (buffers generated repo metadata if Muster restarts)
Build & DeployBuilt with ko (no Docker) by Keelworks, signed with cosign in Lazarette, deployed by Shipkeeper via Server-Side Apply

Interfaces & State Transitions#

Moldloft leases work from Muster in the clearedstack namespace over ServiceAccount-authenticated HTTP (CONTRACT_VERSION=v1), draining urgent → normal → backfill priority lanes.

  • Inbound state: building (clean-room JSON build spec + worked-example fixtures emitted by Waybill, or regulatory drift re-builds routed back from Tidegauge).
  • Build handoff:
    1. Validates the clean-room JSON spec against CONTRACT_VERSION=v1.
    2. Selects the matching deterministic stack template under stack-templates/.
    3. Generates the isolated static tool repository (including LICENSE under MIT, bundled lookup tables, strict CSP headers default-src 'self'; connect-src 'self'; form-action 'none', regulatory citations, scope limits, and worked-example tests) and routes it to Plainforge (mirrored to GitHub on change, with zero container images pushed to GitHub).
    4. Hands off for Keelworks rootless BuildKit packaging and Shakedown 5-condition automated QA.
  • Outbound transitions:
    • Remains in building until Shakedown passes all five listing conditions and advances to live via Chartroom.
    • parked — Moved to parked if blocked by unresolved regulatory ambiguity.
    • needs_subtool — Fail-closed pause (E_NEEDS_SUBTOOL) when the spec requires an interaction pattern not supported by existing stack-templates/.

Sub-Tools & Failure Modes#

Code-generation patterns live inside Moldloft as deterministic stack templates under stack-templates/:

Sub-Tool (Stack Template)Best ForGenerated Inputs & Outputs
calculatorRate build-ups, interest math, statutory thresholdsNumeric rates or dates in; step-by-step math and cited totals out.
checklistSolicitation reviews, compliance preparationStructured yes/no items with regulatory citations and optional local browser state.
validatorChecking codes, tables, or local filesUser-supplied text or local files parsed in browser memory against bundled rules.
decision-treeEligibility, clause applicability, routingGuided branching questions leading to a deterministic, cited outcome.

Sanitized Failure Modes

Error CodeTriggerPlatform Behavior
E_NEEDS_SUBTOOLClean-room spec requires an interaction pattern unsupported by calculator, checklist, validator, or decision-tree.Fails closed to needs_subtool. Bellbuoy opens a deduplicated task in Moldloft on Plainforge; once a new template and fixture deploy, Muster auto-replays paused items.
E_PARSEClean-room spec fails contract validation or contains forbidden raw observation fields.Rejected at Muster / Moldloft before generation starts; fingerprinted error sent via Bellbuoy.
E_TIMEOUTTransient timeout reporting build completion to Muster.Buffered in /var/spool/cs and retried until acknowledged.

Security & Clean-Room Boundaries#

  • Absolute clean-room isolation: Muster enforces the shared contract boundary by rejecting any payload containing raw Sextant HTML, screenshots, or snapshots before Moldloft can lease it. Moldloft never accesses vendor sites or observation archives.
  • Synthetic fixtures only: Worked-example test fixtures must use hand-calculated official examples, boundary cases, and synthetic data. Real CUI, proprietary contractor rates, and non-public solicitation text are strictly forbidden.
  • Generated tool security: Every generated static tool enforces connect-src 'self', default-src 'self', form-action 'none', zero tracking/analytics, and offline execution.
  • Pod hardening & network policy: Runs non-root with dropped capabilities, read-only root filesystem (except /var/spool/cs), zero database credentials, and default-deny NetworkPolicy permitting only ServiceAccount HTTP to Muster (no direct access to Logbook, Plainforge, or Lazarette).

Found a mistake, or something that has gone out of date? Open an issue or write to [email protected]. This page is a text file you can read and correct: Source of this page.