{"_id":"@bpmsoftwaresolutions/app-lab","_rev":"5-cfa9c3d52b2f080568a13b1a509a19cb","name":"@bpmsoftwaresolutions/app-lab","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.0":{"name":"@bpmsoftwaresolutions/app-lab","version":"0.1.0","keywords":["app-lab","compiler","route-manifest","workspace","demo-factory"],"license":"MIT","_id":"@bpmsoftwaresolutions/app-lab@0.1.0","maintainers":[{"name":"bpmsoftwaresolutions","email":"sjones@bpmsoftwaresolutions.com"}],"homepage":"https://github.com/BPMSoftwareSolutions/app-lab#readme","bugs":{"url":"https://github.com/BPMSoftwareSolutions/app-lab/issues"},"bin":{"app-lab-serve":"src/orchestration/serve-app.js","app-lab-compile":"src/orchestration/compile-app.js","app-lab-extract":"src/orchestration/extract-app.js"},"dist":{"shasum":"282709bf36b4368ba281b509d73dfa0022b9c07b","tarball":"https://registry.npmjs.org/@bpmsoftwaresolutions/app-lab/-/app-lab-0.1.0.tgz","fileCount":37,"integrity":"sha512-/KiBFKJFkninyndg2lv3slSHqunlOv4gV++dpEK/5ISLDB5d0pHkHcVirC9kC41l2uznkJamlf010ZFHyrnuyg==","signatures":[{"sig":"MEYCIQCseHhybFsZgAFzFAjYNRfbFdnMtYHFAIaHB36Yfg9ykgIhAPbzKYdoquI795GUzcMnaza7FeWnbJeBptlNMvDDbG+H","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":98984},"engines":{"node":">=18.0.0"},"gitHead":"f50925a5d9875c93786fd442d9e5bb620fa814f7","scripts":{"serve:app":"node ./src/orchestration/serve-app.js","serve-demo":"node ./src/serve-demo.js","compile-cst":"node ./src/compile-cst.js","compile:app":"node ./src/orchestration/compile-app.js","extract:app":"node ./src/orchestration/extract-app.js","parse-sketch":"node ./src/parse-sketch.js","compile-routes":"node ./src/compile-routes.js","extract-sketches":"node ./src/extract-sketches.js","validate:contracts":"node ./src/validation/validate-contracts.js","update-tracker-status":"node ./src/update-tracker-status.js","build-route-data-index":"node ./src/build-route-data-index.js"},"_npmUser":{"name":"bpmsoftwaresolutions","email":"sjones@bpmsoftwaresolutions.com"},"repository":{"url":"git+https://github.com/BPMSoftwareSolutions/app-lab.git","type":"git"},"_npmVersion":"10.8.2","description":"Contract-driven app builder and demo factory: compile JSON component trees and route manifests into real apps and interactive HTML demos.","directories":{},"_nodeVersion":"20.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/app-lab_0.1.0_1773162066399_0.684370600127377","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@bpmsoftwaresolutions/app-lab","version":"0.1.1","keywords":["app-lab","compiler","route-manifest","workspace","demo-factory"],"license":"MIT","_id":"@bpmsoftwaresolutions/app-lab@0.1.1","maintainers":[{"name":"bpmsoftwaresolutions","email":"sjones@bpmsoftwaresolutions.com"}],"homepage":"https://github.com/BPMSoftwareSolutions/app-lab#readme","bugs":{"url":"https://github.com/BPMSoftwareSolutions/app-lab/issues"},"bin":{"app-lab-serve":"src/orchestration/serve-app.js","app-lab-compile":"src/orchestration/compile-app.js","app-lab-extract":"src/orchestration/extract-app.js","app-lab-init-workspace":"src/orchestration/init-workspace.js"},"dist":{"shasum":"1c5a77e57a41e4b7d36abf47354b69e2675b5da0","tarball":"https://registry.npmjs.org/@bpmsoftwaresolutions/app-lab/-/app-lab-0.1.1.tgz","fileCount":39,"integrity":"sha512-vUir1rbUsF7VL7MpOcLqGFycI3Txq73Pi71/h6QNrKjSw5z3pPfpNSuIFMILS3J6cj8mnFg2o/fahmeBI0ZntQ==","signatures":[{"sig":"MEQCIEKM75VkFx3GiOBXcKKl/csTxuDP2kVYHMxxnXha5PX/AiB0GnK+DqP/jqS4NjalijVU+SBdhKunhRoCZKIL/L9fYA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":134301},"engines":{"node":">=18.0.0"},"gitHead":"6d9fdfa978b0dcbbb90c671c83e4745b0b6714ca","scripts":{"serve:app":"node ./src/orchestration/serve-app.js","serve-demo":"node ./src/serve-demo.js","compile-cst":"node ./src/compile-cst.js","compile:app":"node ./src/orchestration/compile-app.js","extract:app":"node ./src/orchestration/extract-app.js","parse-sketch":"node ./src/parse-sketch.js","compile-routes":"node ./src/compile-routes.js","init:workspace":"node ./src/orchestration/init-workspace.js","extract-sketches":"node ./src/extract-sketches.js","validate:contracts":"node ./src/validation/validate-contracts.js","update-tracker-status":"node ./src/update-tracker-status.js","build-route-data-index":"node ./src/build-route-data-index.js"},"_npmUser":{"name":"bpmsoftwaresolutions","email":"sjones@bpmsoftwaresolutions.com"},"repository":{"url":"git+https://github.com/BPMSoftwareSolutions/app-lab.git","type":"git"},"_npmVersion":"10.8.2","description":"Contract-driven app builder and demo factory: compile JSON component trees and route manifests into real apps and interactive HTML demos.","directories":{},"_nodeVersion":"20.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/app-lab_0.1.1_1773163997803_0.048871734273052914","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@bpmsoftwaresolutions/app-lab","version":"0.1.2","keywords":["app-lab","compiler","route-manifest","workspace","demo-factory"],"license":"MIT","_id":"@bpmsoftwaresolutions/app-lab@0.1.2","maintainers":[{"name":"bpmsoftwaresolutions","email":"sjones@bpmsoftwaresolutions.com"}],"homepage":"https://github.com/BPMSoftwareSolutions/app-lab#readme","bugs":{"url":"https://github.com/BPMSoftwareSolutions/app-lab/issues"},"bin":{"app-lab-serve":"src/orchestration/serve-app.js","app-lab-compile":"src/orchestration/compile-app.js","app-lab-extract":"src/orchestration/extract-app.js","app-lab-init-workspace":"src/orchestration/init-workspace.js","app-lab-validate-workspace":"src/validation/validate-workspace-build.js"},"dist":{"shasum":"3838f937a8d09929ddeb915aa1e046981eb24867","tarball":"https://registry.npmjs.org/@bpmsoftwaresolutions/app-lab/-/app-lab-0.1.2.tgz","fileCount":40,"integrity":"sha512-lcj3E6zZ6oadjxlD5veSi51oNBQgSfEVtZPs1VPysc2y43mt3mlUgnXaDZWQlwjfFe26DyyKKFUdTee0AbN/nw==","signatures":[{"sig":"MEUCIQCzOmyW1wzK1WtUb8tgdDYVr8lvjAlX6EjfOBNX52EjMQIgGSAez2vShVSoe3XpHaidCPN8FJIJDiusiBVvWoF7H3Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":138637},"engines":{"node":">=18.0.0"},"gitHead":"9ed63b79c233437a4c8523e9826cede17addd91f","scripts":{"serve:app":"node ./src/orchestration/serve-app.js","serve-demo":"node ./src/serve-demo.js","compile-cst":"node ./src/compile-cst.js","compile:app":"node ./src/orchestration/compile-app.js","extract:app":"node ./src/orchestration/extract-app.js","parse-sketch":"node ./src/parse-sketch.js","compile-routes":"node ./src/compile-routes.js","init:workspace":"node ./src/orchestration/init-workspace.js","extract-sketches":"node ./src/extract-sketches.js","validate:contracts":"node ./src/validation/validate-contracts.js","validate:workspace":"node ./src/validation/validate-workspace-build.js","update-tracker-status":"node ./src/update-tracker-status.js","build-route-data-index":"node ./src/build-route-data-index.js"},"_npmUser":{"name":"bpmsoftwaresolutions","email":"sjones@bpmsoftwaresolutions.com"},"repository":{"url":"git+https://github.com/BPMSoftwareSolutions/app-lab.git","type":"git"},"_npmVersion":"10.8.2","description":"Contract-driven app builder and demo factory: compile JSON component trees and route manifests into real apps and interactive HTML demos.","directories":{},"_nodeVersion":"20.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/app-lab_0.1.2_1773165009587_0.5772306607631803","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@bpmsoftwaresolutions/app-lab","version":"0.1.3","keywords":["app-lab","compiler","route-manifest","workspace","demo-factory"],"license":"MIT","_id":"@bpmsoftwaresolutions/app-lab@0.1.3","maintainers":[{"name":"bpmsoftwaresolutions","email":"sjones@bpmsoftwaresolutions.com"}],"homepage":"https://github.com/BPMSoftwareSolutions/app-lab#readme","bugs":{"url":"https://github.com/BPMSoftwareSolutions/app-lab/issues"},"bin":{"app-lab-serve":"src/orchestration/serve-app.js","app-lab-compile":"src/orchestration/compile-app.js","app-lab-extract":"src/orchestration/extract-app.js","app-lab-init-workspace":"src/orchestration/init-workspace.js","app-lab-validate-workspace":"src/validation/validate-workspace-build.js"},"dist":{"shasum":"8cc0bc3ff9ae99278941f92bbf3a37610bb24359","tarball":"https://registry.npmjs.org/@bpmsoftwaresolutions/app-lab/-/app-lab-0.1.3.tgz","fileCount":40,"integrity":"sha512-ge2n1AwWqW1zCEkldazXGkhHvwpTgnrmykkResJJr7y77Fmlzv5e603CA4bYc/YhwPb4ixmitbmq42r8dEnRCA==","signatures":[{"sig":"MEUCIQCh4lwaMS44csOxpVFXTABQ3TEhOSfmAHAU6JWlkhC+0wIgDpi9rVYx8ApCrLP+DrSct1D3ER002OCPsSl8p/52C6s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":145770},"engines":{"node":">=18.0.0"},"gitHead":"9ed63b79c233437a4c8523e9826cede17addd91f","scripts":{"serve:app":"node ./src/orchestration/serve-app.js","serve-demo":"node ./src/serve-demo.js","compile-cst":"node ./src/compile-cst.js","compile:app":"node ./src/orchestration/compile-app.js","extract:app":"node ./src/orchestration/extract-app.js","parse-sketch":"node ./src/parse-sketch.js","compile-routes":"node ./src/compile-routes.js","init:workspace":"node ./src/orchestration/init-workspace.js","extract-sketches":"node ./src/extract-sketches.js","validate:contracts":"node ./src/validation/validate-contracts.js","validate:workspace":"node ./src/validation/validate-workspace-build.js","update-tracker-status":"node ./src/update-tracker-status.js","build-route-data-index":"node ./src/build-route-data-index.js"},"_npmUser":{"name":"bpmsoftwaresolutions","email":"sjones@bpmsoftwaresolutions.com"},"repository":{"url":"git+https://github.com/BPMSoftwareSolutions/app-lab.git","type":"git"},"_npmVersion":"10.8.2","description":"Contract-driven app builder and demo factory: compile JSON component trees and route manifests into real apps and interactive HTML demos.","directories":{},"_nodeVersion":"20.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/app-lab_0.1.3_1773166071092_0.6190364261891657","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@bpmsoftwaresolutions/app-lab","version":"0.1.4","description":"Contract-driven app builder and demo factory: compile JSON component trees and route manifests into real apps and interactive HTML demos.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/BPMSoftwareSolutions/app-lab.git"},"bugs":{"url":"https://github.com/BPMSoftwareSolutions/app-lab/issues"},"homepage":"https://github.com/BPMSoftwareSolutions/app-lab#readme","keywords":["app-lab","compiler","route-manifest","workspace","demo-factory"],"publishConfig":{"access":"public"},"engines":{"node":">=18.0.0"},"bin":{"app-lab-init-workspace":"src/orchestration/init-workspace.js","app-lab-compile":"src/orchestration/compile-app.js","app-lab-extract":"src/orchestration/extract-app.js","app-lab-serve":"src/orchestration/serve-app.js","app-lab-validate-workspace":"src/validation/validate-workspace-build.js"},"scripts":{"init:workspace":"node ./src/orchestration/init-workspace.js","validate:workspace":"node ./src/validation/validate-workspace-build.js","validate:contracts":"node ./src/validation/validate-contracts.js","extract:app":"node ./src/orchestration/extract-app.js","compile:app":"node ./src/orchestration/compile-app.js","serve:app":"node ./src/orchestration/serve-app.js","extract-sketches":"node ./src/extract-sketches.js","parse-sketch":"node ./src/parse-sketch.js","compile-cst":"node ./src/compile-cst.js","compile-routes":"node ./src/compile-routes.js","serve-demo":"node ./src/serve-demo.js","build-route-data-index":"node ./src/build-route-data-index.js","update-tracker-status":"node ./src/update-tracker-status.js"},"_id":"@bpmsoftwaresolutions/app-lab@0.1.4","gitHead":"df19f4e4c06b343a584b66af72e3e5e99591457f","_nodeVersion":"20.19.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-o9YT0jo0VBuWlLAsZ4MIOKIxBmkRlhWHpaqurFYPDcUelKX7CVhLugziLx3s3FLqM6sOpNWSS/RcqePkwELX8w==","shasum":"b7f2fd7edea5e998549795a99590d2ac79bcfd5f","tarball":"https://registry.npmjs.org/@bpmsoftwaresolutions/app-lab/-/app-lab-0.1.4.tgz","fileCount":40,"unpackedSize":151697,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICg8OPH6EB/tgQkLTAomwQxiDhtVvcn52/TcFbOs6iu0AiEAwuAILbOOdVWzNXAMZLi4hSByxX2ag2diyfGbsUdz6IU="}]},"_npmUser":{"name":"bpmsoftwaresolutions","email":"sjones@bpmsoftwaresolutions.com"},"directories":{},"maintainers":[{"name":"bpmsoftwaresolutions","email":"sjones@bpmsoftwaresolutions.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/app-lab_0.1.4_1773191759263_0.7357236197073436"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-10T17:01:06.280Z","modified":"2026-03-11T01:15:59.552Z","0.1.0":"2026-03-10T17:01:06.560Z","0.1.1":"2026-03-10T17:33:17.936Z","0.1.2":"2026-03-10T17:50:09.738Z","0.1.3":"2026-03-10T18:07:51.234Z","0.1.4":"2026-03-11T01:15:59.426Z"},"bugs":{"url":"https://github.com/BPMSoftwareSolutions/app-lab/issues"},"license":"MIT","homepage":"https://github.com/BPMSoftwareSolutions/app-lab#readme","keywords":["app-lab","compiler","route-manifest","workspace","demo-factory"],"repository":{"type":"git","url":"git+https://github.com/BPMSoftwareSolutions/app-lab.git"},"description":"Contract-driven app builder and demo factory: compile JSON component trees and route manifests into real apps and interactive HTML demos.","maintainers":[{"name":"bpmsoftwaresolutions","email":"sjones@bpmsoftwaresolutions.com"}],"readme":"# App Lab\r\n\r\nApp Lab is a contract-driven demo factory that turns semantic sketches into route-based HTML demos.\r\n\r\nThis repository is intentionally self-contained with strict layer separation:\r\n\r\n- system-layer assets at repo root\r\n- workspace-specific assets under `apps/*`\r\n\r\n## Structure For Clarity And Scale\r\n\r\n```text\r\napp-lab/\r\n\tsrc/                    # system-layer compiler pipeline\r\n\tcontracts/              # system-layer schemas, policies, manifests\r\n\tskills/                 # reusable workflow playbooks\r\n\tdocs/                   # system-layer architecture and operations docs\r\n\tapps/                   # workspace-specific assets only\r\n\t\tapp-manager/\r\n\t\tauthentication-flow/\r\n```\r\n\r\n## Boundary Contract\r\n\r\n### System Layer\r\n\r\n- `src/`\r\n- `contracts/`\r\n- `skills/`\r\n- `docs/`\r\n\r\nSystem code must remain generic and must not hardcode workspace details.\r\n\r\n### Workspace Layer\r\n\r\nEach app workspace under `apps/*` owns:\r\n\r\n- `sketches/`\r\n- `layout/`\r\n- `cst/`\r\n- `data/`\r\n- `html/`\r\n- `docs/`\r\n- `app.manifest.json`\r\n- `app/shell/` shell template and css fragments referenced by `entrypoints.workspaceShell`\r\n\r\n## Core Rules\r\n\r\n1. Root scripts operate by app input (`--app <app-id>`), not by hardcoded app names.\r\n2. Contracts are authoritative and version-checked.\r\n3. App-specific docs stay in `apps/<app>/docs/`.\r\n4. Generated artifacts stay local to each workspace.\r\n5. No fallback behavior that blends incompatible schema paths.\r\n6. `entrypoints.workspaceShell.template` is required for all compile modes.\r\n7. `entrypoints.workspaceShell.cssFragments` is required for `workspace-shell` mode.\r\n\r\n## Sketch Source Of Truth\r\n\r\nThe approved sketch markdown is the primary source of truth for implementation.\r\nClient-side AI assistants must produce sketches in this exact structure so extraction and compile steps remain deterministic.\r\n\r\nRequired shape:\r\n\r\n```text\r\n## <number>) <screen title>\r\n\r\n```text\r\n<ASCII screen>\r\n```\r\n```\r\n\r\nMinimal example:\r\n\r\n```text\r\n## 1) Workspace Grid / Fleet Overview\r\n\r\n```text\r\n+=================================================================================+\r\n| APPTURE APP MANAGER                                       [Refresh] [Filter v] |\r\n| Workspaces: 18  Running: 11  Stopped: 7  Host CPU: 62%  Host MEM: 71%          |\r\n+=================================================================================+\r\n| [RUNNING] system-dashboard  | [STOPPED] financial-dash  | [RUNNING] ops-observ |\r\n| workspace: apps/system-...  | workspace: apps/finan...  | workspace: apps/ops  |\r\n| version: 1.4.2  p95: 92ms   | version: 0.9.8  p95: --   | version: 2.1.0  p95: |\r\n| [Open] [Stop] [Details]     | [Open] [Start] [Details]  | [Open] [Stop] [Det]  |\r\n+=================================================================================+\r\n```\r\n```\r\n\r\nReference examples:\r\n\r\n- `apps/app-manager/docs/app-manager.md`\r\n- `apps/authentication-flow/docs/auth-demo.md`\r\n\r\nNon-negotiable sketch conventions:\r\n\r\n1. Numbered sections (`## 1) ...`, `## 2) ...`) are required.\r\n2. Each section must include exactly one fenced `text` block.\r\n3. Use explicit labels for statuses, metrics, and actions.\r\n4. Keep names stable across screens (`app`, `workspace`, `status`, `p95`, etc.).\r\n5. Include edge/error states in the sketch, not as separate prose.\r\n\r\n## Sketch Flexibility\r\n\r\nThe compiler is intentionally flexible about what kind of screen can be sketched, as long as the section + `text` block contract is respected.\r\n\r\nSupported archetypes include:\r\n\r\n1. Fleet dashboard with repeated cards.\r\n2. Split-pane grid + metadata drawer.\r\n3. Monitoring console with metrics + logs.\r\n4. Form-driven launch or workflow sequence.\r\n5. Baseline zone map for layout validation.\r\n\r\nExample: split-pane (grid + drawer)\r\n\r\n```text\r\n## 2) Workspace Grid with Metadata Drawer\r\n\r\n```text\r\n+=============================================================================================+\r\n| APPTURE APP MANAGER                                                                         |\r\n+=============================================================================================+\r\n| GRID                                                         | APP DETAILS                  |\r\n|--------------------------------------------------------------|------------------------------|\r\n| [RUNNING] system-dashboard  p95: 92ms  [Open] [Stop]        | app: system-dashboard        |\r\n| [STOPPED] financial-dash    p95: --    [Open] [Start]       | workspace: apps/system-...   |\r\n| [RUNNING] audit-console     p95: 49ms  [Open] [Stop]        | status: RUNNING              |\r\n|                                                              | routes: / /health /metrics   |\r\n|                                                              | [Restart] [Open Workspace]   |\r\n+=============================================================================================+\r\n```\r\n```\r\n\r\nExample: monitoring console\r\n\r\n```text\r\n## 3) Monitoring Screen for Selected App\r\n\r\n```text\r\n+==================================================================================================+\r\n| APP MONITOR :: system-dashboard                                   [Open] [Restart] [Stop] [Export] |\r\n+==================================================================================================+\r\n| Status: RUNNING  Health: OK  Port: 3000  Workspace: apps/system-dashboard                         |\r\n+-----------------------------------+------------------------------+----------------------------------+\r\n| PERFORMANCE                        | REQUESTS                     | SYSTEM IMPACT                    |\r\n| CPU 8%  MEM 412MB  THREADS 17      | req/min 340  p95 92ms        | host cpu 5.2%  log rate 184/min  |\r\n+-----------------------------------+------------------------------+----------------------------------+\r\n| 10:42:11 INFO server ready         | 10:42:15 WARN backlog=12     | 10:42:31 INFO recovery complete  |\r\n+==================================================================================================+\r\n```\r\n```\r\n\r\nExample: flow form\r\n\r\n```text\r\n## 4) Browser Launch Detached App Window Flow\r\n\r\n```text\r\n+---------------------------------------------------------------------------------------------+\r\n| Launch App in Separate Window                                                               |\r\n+---------------------------------------------------------------------------------------------+\r\n| App: system-dashboard   URL: http://localhost:3000   State: RUNNING                         |\r\n| (o) New browser window   ( ) New tab                                                        |\r\n| [x] Pass workspace context   [x] Emit launch audit event   [ ] Enable write-mode            |\r\n| [Cancel]                                                           [Launch Window]           |\r\n+---------------------------------------------------------------------------------------------+\r\n```\r\n```\r\n\r\nExample: canonical zone map\r\n\r\n```text\r\n## 5) Canonical Baseline Layout\r\n\r\n```text\r\n+================================================================================================+\r\n| header / fleet-summary                                                                         |\r\n+================================================================================================+\r\n| workspace-grid                                              | app-detail-drawer               |\r\n| workspace-grid                                              | app-detail-drawer               |\r\n+------------------------------------------------------------------------------------------------+\r\n| monitor-metrics                                             | host-impact                     |\r\n+------------------------------------------------------------------------------------------------+\r\n| log-sniffer                                                 | export-actions                  |\r\n+================================================================================================+\r\n```\r\n```\r\n\r\n## Ingestion Rules\r\n\r\nWhat the extractor/compiler needs from client AI output:\r\n\r\n1. Numbered route sections are mandatory.\r\n2. Exactly one fenced `text` block per section.\r\n3. Stable labels for repeated entities (`app`, `workspace`, `status`, `health`, `p95`, `actions`).\r\n4. Explicit state indicators (`RUNNING`, `STOPPED`, `DEGRADED`, `ERROR`) when stateful behavior exists.\r\n5. Action verbs rendered as bracketed controls (`[Open]`, `[Stop]`, `[Details]`, etc.).\r\n\r\nWhat can vary without breaking ingestion:\r\n\r\n1. Overall ASCII geometry.\r\n2. Number of cards/rows/panels.\r\n3. Whether the screen is dashboard-style, form-style, log-style, or topology-style.\r\n4. Depth of textual detail inside each panel.\r\n\r\n## Component Vocabulary For Client AI Sketches\r\n\r\nUse these ASCII patterns to express component intent clearly.\r\n\r\nInputs and form controls:\r\n\r\n```text\r\nText input:        [ Username: __________________________ ]\r\nPassword input:    [ Password: *********************** ]\r\nSearch input:      [ Search apps...____________________ ] [Go]\r\nTextarea:          [ Notes:\r\n\t\t\t\t\t| line 1\r\n\t\t\t\t\t| line 2\r\n\t\t\t\t\t]\r\nCheckbox:          [x] Include diagnostics   [ ] Enable write-mode\r\nRadio group:       (o) New window   ( ) New tab   ( ) Embedded pane\r\nSelect/dropdown:   [ Environment: dev v ]\r\nToggle:            [ ON ] Live Refresh\r\n```\r\n\r\nNavigation and actions:\r\n\r\n```text\r\nTabs:              [Overview] [Monitoring] [Launch] [Impact]\r\nPrimary action:    [ Launch Window ]\r\nSecondary action:  [Cancel] [Preview] [Export]\r\nChip/tag:          [runtime] [policy-strict] [signed-image]\r\nStatus badge:      [RUNNING] [STOPPED] [DEGRADED] [ERROR]\r\n```\r\n\r\nData display primitives:\r\n\r\n```text\r\nMetric row:        p95: 92ms   req/min: 340   err: 0.12%\r\nKey/value row:     workspace: apps/system-dashboard\r\nTable row:         | app-id | status | p95 | actions |\r\nBar meter:         CPU [##########......] 62%\r\nSparkline:         trend ▁▂▃▄▅▄▃▂\r\nLog line:          10:42:14 WARN backlog threshold=12\r\n```\r\n\r\nPanel composition example:\r\n\r\n```text\r\n+-----------------------------------------------------------------------------------+\r\n| Launch Configuration                                                               |\r\n| [ App: system-dashboard____________________ ] [ Environment: dev v ]              |\r\n| [x] Include diagnostics   [ ] Enable write-mode   (o) New window  ( ) New tab    |\r\n| [ Notes:                                                                          |\r\n|   | open detached window with telemetry ribbon                                    |\r\n| ]                                                                                 |\r\n| [Cancel]                                               [Preview] [Launch Window]  |\r\n+-----------------------------------------------------------------------------------+\r\n```\r\n\r\nComponent naming guidance:\r\n\r\n1. Keep repeated labels stable (`workspace`, `status`, `health`, `p95`, `actions`).\r\n2. Use bracketed controls for actions (`[Open]`, `[Stop]`, `[Details]`).\r\n3. Use `[x]/[ ]` for checkboxes and `(o)/( )` for radio choices.\r\n4. Keep state badges uppercase for deterministic parsing (`RUNNING`, `STOPPED`, `DEGRADED`, `ERROR`).\r\n\r\n## Tooling Entry Points\r\n\r\nRun all commands from this repo root.\r\n\r\n```bash\r\nnpm run validate:contracts\r\nnpm run extract:app -- --app app-manager\r\nnpm run compile:app -- --app app-manager\r\nnpm run serve:app -- --app app-manager --port 5090\r\n```\r\n\r\n### One-Command Workspace Bootstrap (From Sketch)\r\n\r\nUse this when a client AI assistant gives you a large sketch markdown file and you need a new workspace quickly.\r\n\r\n```bash\r\nnpm run init:workspace -- --app ops-control-center --sketch ./docs/prototypes/replit-test-app.md --title \"Ops Control Center\" --port 5092 --compile\r\n```\r\n\r\nWhat this command generates automatically:\r\n\r\n1. `apps/<app-id>/` workspace structure.\r\n2. `app.manifest.json` with compile/serve entrypoints.\r\n3. `docs/<app-id>.md` copied from the sketch source.\r\n4. `sketches/*.sketch.txt` extracted from numbered sections.\r\n5. `data/*.data.json` route payloads generated from sketches.\r\n6. `cst/<app-id>.routes.cst.json` and `cst/<app-id>.route-shell.json`.\r\n7. `layout/<app-id>.route.layout-tree.json` baseline layout.\r\n\r\nInstalled package usage (for Replit or other environments):\r\n\r\n```bash\r\napp-lab-init-workspace --app ops-control-center --sketch ./docs/prototypes/replit-test-app.md --title \"Ops Control Center\" --port 5092 --compile\r\napp-lab-serve --app ops-control-center --port 5092\r\n```\r\n\r\n### Replit No-Shortcut Mode\r\n\r\nIf an external AI assistant tries to hand-author HTML pages, enforce this command gate:\r\n\r\n```bash\r\nnpm run init:workspace -- --app <app-id> --sketch <sketch-md> --title \"<display-title>\" --port <port> --compile\r\nnpm run validate:workspace -- --app <app-id> --strict\r\nnpm run validate:contracts\r\nnpm run serve:app -- --app <app-id> --port <port>\r\n```\r\n\r\nThe `validate:workspace` command fails when generated HTML is missing, stale relative to source artifacts, or missing route markers.\r\nThis makes manual HTML shortcuts visible and blocks false completion.\r\nWhen reporting success from hosted environments (for example Replit), require a user-reachable preview URL.\r\n`http://localhost:<port>` by itself is not a valid completion URL unless the user is running locally and confirms localhost access.\r\n\r\nReusable agent contract:\r\n\r\n- `docs/REPLIT-AGENT-CONTRACT.md`\r\n\r\n### Workspace Runtime API (CST-Driven)\r\n\r\nCompiler output exposes generic compiled context, and workspace host runtime scripts may publish an app API:\r\n\r\n- `window.AppLabSystem`\r\n- `window.__APP_LAB_SYSTEM_API__`\r\n- `window.__APP_LAB_COMPILED_CONTEXT__`\r\n\r\nWorkspace-host runtime mode is mandatory. Each app manifest must define\r\n`entrypoints.appRuntime.bootstrapScript` and strict workspace validation enforces it.\r\n\r\nUse the workspace-owned API to access CST objects and route data without hard-coded HTML selectors.\r\n\r\nAvailable methods:\r\n\r\n- `getCst()`\r\n- `getComponents()`\r\n- `getRoutes()`\r\n- `getRoute(routeId)`\r\n- `getRouteData(routeId?)`\r\n- `getEmbeddings()`\r\n- `getEmbedding(key, routeId?)`\r\n- `queryByEmbedding(key, { routeId? })`\r\n- `queryOneByEmbedding(key, { routeId? })`\r\n- `goToRoute(routeId)`\r\n\r\nExample (script-side):\r\n\r\n```js\r\nconst api = window.AppLabSystem;\r\nconst routeData = api.getRouteData();\r\nconst actionButtons = api.queryByEmbedding(\"primaryActions\");\r\nconst timelineRows = api.queryByEmbedding(\"deployTimeline\", { routeId: \"release-monitor\" });\r\n```\r\n\r\nEmbeddings are defined in CST and can be scoped:\r\n\r\n- `cst.embeddings.shared`\r\n- `cst.embeddings.byRoute[routeId]`\r\n\r\nThis keeps selector knowledge in CST while scripts remain generic and contract-safe.\r\nCompiler modules remain app-agnostic and do not own `AppLabSystem` behavior.\r\n\r\nOptional `extract:app` overrides when needed:\r\n\r\n```bash\r\nnpm run extract:app -- --app app-manager --source ./apps/app-manager/docs/app-manager.md\r\nnpm run extract:app -- --app app-manager --indexTitle \"App Manager Sketch Index\"\r\n```\r\n\r\n## See Also\r\n\r\n- `docs/BOUNDARIES.md`\r\n- `apps/app-manager/app.manifest.json`\r\n- `apps/authentication-flow/app.manifest.json`\r\n","readmeFilename":"README.md"}