@pixel-point/toolcraft 0.0.14 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -2
- package/package.json +1 -1
- package/scripts/prepare-pack.mjs +2 -28
- package/src/cli-io.mjs +174 -0
- package/src/cli-package-manager-flow.test.mjs +206 -0
- package/src/cli.mjs +7 -495
- package/src/cli.test.mjs +34 -177
- package/src/create-command.mjs +152 -0
- package/src/create-options.mjs +194 -0
- package/src/generate-test-assertions.mjs +27 -0
- package/src/generate-test-doc-assertions.mjs +162 -0
- package/src/generate-test-file-assertions.mjs +251 -0
- package/src/generate-test-fs-utils.mjs +59 -0
- package/src/generate-test-integrity-assertions.mjs +30 -0
- package/src/generate-test-integrity-framework-assertions.mjs +222 -0
- package/src/generate-test-integrity-manifest-assertions.mjs +150 -0
- package/src/generate-test-integrity-ownership-assertions.mjs +127 -0
- package/src/generate-test-integrity-test-utils.mjs +102 -0
- package/src/generate-test-package-assertions.mjs +75 -0
- package/src/generate-test-product-fixture.mjs +84 -0
- package/src/generate-test-product-fixture.test.mjs +73 -0
- package/src/generate-test-standalone-assertions.mjs +209 -0
- package/src/generate-transactional.test.mjs +151 -0
- package/src/generate.mjs +182 -102
- package/src/generate.test.mjs +242 -338
- package/src/generated-integrity-manifest.mjs +127 -0
- package/src/generated-integrity-manifest.test.mjs +151 -0
- package/src/generated-source-policy.mjs +22 -0
- package/src/generated-source-policy.test.mjs +35 -0
- package/src/generated-target-policy.mjs +55 -0
- package/src/generation-transaction.mjs +135 -0
- package/src/generation-transaction.test.mjs +74 -0
- package/src/package-json.mjs +18 -1
- package/src/package-json.test.mjs +38 -5
- package/src/package-manager.mjs +2 -0
- package/src/package-manager.test.mjs +5 -1
- package/src/packaged-template-fallback.test.mjs +126 -0
- package/src/prepare-pack-templates.mjs +34 -0
- package/templates/runtime/contracts/component-contract-builders.ts +95 -0
- package/templates/runtime/contracts/component-contracts.choices.test.ts +293 -0
- package/templates/runtime/contracts/component-contracts.choices.ts +322 -0
- package/templates/runtime/contracts/component-contracts.inputs.test.ts +210 -0
- package/templates/runtime/contracts/component-contracts.inputs.ts +252 -0
- package/templates/runtime/contracts/component-contracts.media-custom.test.ts +116 -0
- package/templates/runtime/contracts/component-contracts.media-custom.ts +144 -0
- package/templates/runtime/contracts/component-contracts.runtime-acceptance.test.ts +229 -0
- package/templates/runtime/contracts/component-contracts.runtime-labels.test.ts +76 -0
- package/templates/runtime/contracts/component-contracts.runtime-panels.test.ts +135 -0
- package/templates/runtime/contracts/component-contracts.runtime-shell.test.ts +148 -0
- package/templates/runtime/contracts/component-contracts.runtime.ts +361 -0
- package/templates/runtime/contracts/component-contracts.test.ts +39 -1458
- package/templates/runtime/contracts/component-contracts.ts +44 -1505
- package/templates/runtime/contracts/component-contracts.visual.test.ts +316 -0
- package/templates/runtime/contracts/component-contracts.visual.ts +385 -0
- package/templates/runtime/contracts/contract-manifest.test.ts +64 -0
- package/templates/runtime/contracts/decision-contracts.test.ts +29 -4
- package/templates/runtime/contracts/decision-contracts.ts +38 -1
- package/templates/runtime/index.ts +1 -0
- package/templates/runtime/react/{runtime-public-api.test.tsx → app-shell/runtime-public-api.test.tsx} +29 -7
- package/templates/runtime/react/{settings-transfer.test.ts → app-shell/settings-transfer.test.ts} +4 -4
- package/templates/runtime/react/{settings-transfer.ts → app-shell/settings-transfer.ts} +3 -3
- package/templates/runtime/react/{toolbar-panel.test.tsx → app-shell/toolbar-panel.test.tsx} +2 -2
- package/templates/runtime/react/{toolbar-panel.tsx → app-shell/toolbar-panel.tsx} +3 -3
- package/templates/runtime/react/{toolcraft-app.integration.test.tsx → app-shell/toolcraft-app.integration.test.tsx} +6 -6
- package/templates/runtime/react/{toolcraft-app.test.tsx → app-shell/toolcraft-app.test.tsx} +3 -3
- package/templates/runtime/react/{toolcraft-app.tsx → app-shell/toolcraft-app.tsx} +11 -8
- package/templates/runtime/react/{toolcraft-root.test.tsx → app-shell/toolcraft-root.test.tsx} +1 -1
- package/templates/runtime/react/{toolcraft-root.tsx → app-shell/toolcraft-root.tsx} +5 -5
- package/templates/runtime/react/{use-toolcraft.ts → app-shell/use-toolcraft.ts} +1 -1
- package/templates/runtime/react/canvas/canvas-default-media-layer.tsx +81 -0
- package/templates/runtime/react/canvas/canvas-media-transform.ts +33 -0
- package/templates/runtime/react/canvas/canvas-shell-interactions.test.tsx +156 -0
- package/templates/runtime/react/canvas/canvas-shell-media-rendering.test.tsx +87 -0
- package/templates/runtime/react/canvas/canvas-shell-rendering.test.tsx +102 -0
- package/templates/runtime/react/canvas/canvas-shell-test-utils.tsx +108 -0
- package/templates/runtime/react/canvas/canvas-shell-upload.test.tsx +106 -0
- package/templates/runtime/react/canvas/canvas-shell.tsx +146 -0
- package/templates/runtime/react/canvas/canvas-upload-routing.ts +84 -0
- package/templates/runtime/react/{media-file.ts → canvas/media-file.ts} +1 -1
- package/templates/runtime/react/canvas/use-canvas-drop-import.ts +145 -0
- package/templates/runtime/react/canvas/use-canvas-viewport-interactions.ts +227 -0
- package/templates/runtime/react/controls-panel/__tests__/control-conditions.test.ts +89 -0
- package/templates/runtime/react/{controls-panel-filedrop-reorder.test.tsx → controls-panel/__tests__/controls-panel-filedrop-reorder.test.tsx} +4 -4
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.actions-layout.test.tsx +91 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.collection-actions.test.tsx +213 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.color-layout.test.tsx +366 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.color-picker-models.test.tsx +169 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.compound-layout.test.tsx +160 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.control-visibility.test.tsx +352 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.curves.test.tsx +226 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.floating-shell.test.tsx +13 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.font-picker.test.tsx +302 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.footer-actions.test.tsx +401 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.gradient-control.test.tsx +139 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.help-policy.test.tsx +103 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.image-picker.test.tsx +16 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.inline-layout.test.tsx +290 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.keyframes.test.tsx +175 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.media-upload-files.test.tsx +121 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.media-upload-image.test.tsx +363 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.media-upload-multi-image.test.tsx +105 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.range-slider-editing.test.tsx +149 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.section-shell.test.tsx +138 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.select-layout.test.tsx +148 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.setup-controls.test.tsx +189 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.slider-rendering.test.tsx +317 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.state-reset.test.tsx +137 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.structure.test.tsx +66 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.text-input.test.tsx +205 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.vector-interaction.test.tsx +388 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.vector-layout.test.tsx +155 -0
- package/templates/runtime/react/controls-panel/actions/controls-panel-actions.ts +172 -0
- package/templates/runtime/react/{control-conditions.ts → controls-panel/conditions/control-conditions.ts} +26 -3
- package/templates/runtime/react/{control-renderers.ts → controls-panel/control-renderers.ts} +2 -2
- package/templates/runtime/react/controls-panel/controls-panel.tsx +250 -0
- package/templates/runtime/react/controls-panel/keyframes/controls-panel-keyframes.tsx +265 -0
- package/templates/runtime/react/controls-panel/layout/controls-panel-collapse-storage.ts +131 -0
- package/templates/runtime/react/controls-panel/layout/controls-panel-help.tsx +132 -0
- package/templates/runtime/react/controls-panel/layout/controls-panel-inline-layout.tsx +311 -0
- package/templates/runtime/react/controls-panel/layout/controls-panel-layout.tsx +216 -0
- package/templates/runtime/react/controls-panel/layout/controls-panel-section.tsx +401 -0
- package/templates/runtime/react/controls-panel/renderers/controls-panel-action-renderer.tsx +137 -0
- package/templates/runtime/react/controls-panel/renderers/controls-panel-basic-renderers.tsx +421 -0
- package/templates/runtime/react/controls-panel/renderers/controls-panel-collection-renderer.tsx +286 -0
- package/templates/runtime/react/controls-panel/renderers/controls-panel-compound-renderers.tsx +366 -0
- package/templates/runtime/react/controls-panel/renderers/controls-panel-media-renderer.tsx +173 -0
- package/templates/runtime/react/controls-panel/renderers/controls-panel-renderer-registry.test.ts +23 -0
- package/templates/runtime/react/controls-panel/renderers/controls-panel-renderer-registry.ts +55 -0
- package/templates/runtime/react/controls-panel/renderers/controls-panel-settings-transfer-renderer.tsx +45 -0
- package/templates/runtime/react/controls-panel/testing/controls-panel-test-utils.tsx +300 -0
- package/templates/runtime/react/controls-panel/values/controls-panel-aspect-ratio-values.ts +94 -0
- package/templates/runtime/react/controls-panel/values/controls-panel-collection-values.ts +87 -0
- package/templates/runtime/react/controls-panel/values/controls-panel-color-values.ts +82 -0
- package/templates/runtime/react/controls-panel/values/controls-panel-font-values.ts +69 -0
- package/templates/runtime/react/controls-panel/values/controls-panel-spatial-values.ts +64 -0
- package/templates/runtime/react/controls-panel/values/controls-panel-value-labels.ts +93 -0
- package/templates/runtime/react/controls-panel/values/controls-panel-value-primitives.ts +30 -0
- package/templates/runtime/react/controls-panel/values/controls-panel-values.ts +7 -0
- package/templates/runtime/react/index.ts +13 -13
- package/templates/runtime/react/{layer-tree.ts → layers/layer-tree.ts} +1 -1
- package/templates/runtime/react/layers/layers-panel-drag-drop.test.tsx +190 -0
- package/templates/runtime/react/layers/layers-panel-editing.test.tsx +41 -0
- package/templates/runtime/react/layers/layers-panel-insert-targets.test.ts +87 -0
- package/templates/runtime/react/layers/layers-panel-insert-targets.ts +254 -0
- package/templates/runtime/react/layers/layers-panel-model.ts +15 -0
- package/templates/runtime/react/layers/layers-panel-rendering.test.tsx +43 -0
- package/templates/runtime/react/layers/layers-panel-reorder.ts +148 -0
- package/templates/runtime/react/layers/layers-panel-row.tsx +475 -0
- package/templates/runtime/react/layers/layers-panel-test-utils.tsx +135 -0
- package/templates/runtime/react/layers/layers-panel-visibility.test.tsx +126 -0
- package/templates/runtime/react/layers/layers-panel.tsx +349 -0
- package/templates/runtime/react/layers/use-layers-panel-drag-controller.ts +327 -0
- package/templates/runtime/react/{panel-host-types.ts → panel-host/panel-host-types.ts} +2 -2
- package/templates/runtime/react/{panel-host.test.tsx → panel-host/panel-host.test.tsx} +3 -3
- package/templates/runtime/react/{panel-host.tsx → panel-host/panel-host.tsx} +1 -1
- package/templates/runtime/react/timeline/timeline-easing-editor.tsx +409 -0
- package/templates/runtime/react/timeline/timeline-easing-geometry.ts +42 -0
- package/templates/runtime/react/timeline/timeline-easing-icons.tsx +135 -0
- package/templates/runtime/react/timeline/timeline-easing-model.test.ts +87 -0
- package/templates/runtime/react/timeline/timeline-easing-model.ts +271 -0
- package/templates/runtime/react/timeline/timeline-easing-popover-content.tsx +227 -0
- package/templates/runtime/react/timeline/timeline-easing-popover-layout.ts +69 -0
- package/templates/runtime/react/timeline/timeline-easing-popover.tsx +60 -0
- package/templates/runtime/react/timeline/timeline-event-targets.ts +19 -0
- package/templates/runtime/react/timeline/timeline-expanded-content.tsx +299 -0
- package/templates/runtime/react/timeline/timeline-icon-button.tsx +51 -0
- package/templates/runtime/react/timeline/timeline-keyframe-row.tsx +360 -0
- package/templates/runtime/react/timeline/timeline-keyframes.ts +23 -0
- package/templates/runtime/react/timeline/timeline-panel-floating-layout.test.tsx +328 -0
- package/templates/runtime/react/timeline/timeline-panel-header.tsx +404 -0
- package/templates/runtime/react/timeline/timeline-panel-keyframes.test.tsx +90 -0
- package/templates/runtime/react/timeline/timeline-panel-layout.ts +30 -0
- package/templates/runtime/react/timeline/timeline-panel-responsive-layout.ts +182 -0
- package/templates/runtime/react/timeline/timeline-panel-test-utils.tsx +88 -0
- package/templates/runtime/react/timeline/timeline-panel-transport.test.tsx +202 -0
- package/templates/runtime/react/timeline/timeline-panel-upload.test.tsx +53 -0
- package/templates/runtime/react/timeline/timeline-panel.tsx +449 -0
- package/templates/runtime/react/timeline/timeline-playback-hooks.ts +254 -0
- package/templates/runtime/schema/assembly-contract.ts +271 -0
- package/templates/runtime/schema/control-schema-normalization.ts +55 -0
- package/templates/runtime/schema/controls-panel-actions.ts +141 -0
- package/templates/runtime/schema/controls-panel-layout-groups.ts +144 -0
- package/templates/runtime/schema/controls-panel-normalization.ts +19 -0
- package/templates/runtime/schema/controls-panel-section-layout.ts +140 -0
- package/templates/runtime/schema/controls-panel-section-titles.ts +161 -0
- package/templates/runtime/schema/define-toolcraft-test-utils.ts +18 -0
- package/templates/runtime/schema/define-toolcraft.actions.test.ts +182 -0
- package/templates/runtime/schema/define-toolcraft.assembly.test.ts +246 -0
- package/templates/runtime/schema/define-toolcraft.canvas.test.ts +150 -0
- package/templates/runtime/schema/define-toolcraft.control-layout.test.ts +345 -0
- package/templates/runtime/schema/define-toolcraft.control-sections.test.ts +304 -0
- package/templates/runtime/schema/define-toolcraft.setup-canvas.test.ts +69 -0
- package/templates/runtime/schema/define-toolcraft.setup-persistence.test.ts +66 -0
- package/templates/runtime/schema/define-toolcraft.setup-render-scale-timeline.test.ts +116 -0
- package/templates/runtime/schema/define-toolcraft.setup-settings-transfer.test.ts +291 -0
- package/templates/runtime/schema/define-toolcraft.ts +24 -1449
- package/templates/runtime/schema/panels-schema-normalization.ts +49 -0
- package/templates/runtime/schema/runtime-section-titles.ts +1 -0
- package/templates/runtime/schema/runtime-setup-section.ts +282 -0
- package/templates/runtime/schema/schema-resolvers.ts +168 -0
- package/templates/runtime/schema/types.ts +17 -0
- package/templates/runtime/state/canvas-reducer.ts +106 -0
- package/templates/runtime/state/canvas-state.ts +209 -0
- package/templates/runtime/state/controls-reducer.ts +277 -0
- package/templates/runtime/state/history-patches.ts +174 -0
- package/templates/runtime/state/layer-state.ts +12 -0
- package/templates/runtime/state/layers-reducer.ts +318 -0
- package/templates/runtime/state/media-reducer.ts +283 -0
- package/templates/runtime/state/media-state.ts +105 -0
- package/templates/runtime/state/panels-reducer.ts +58 -0
- package/templates/runtime/state/persistence-merge.ts +53 -0
- package/templates/runtime/state/persistence-reader-canvas.ts +27 -0
- package/templates/runtime/state/persistence-reader-layers.ts +73 -0
- package/templates/runtime/state/persistence-reader-media.ts +82 -0
- package/templates/runtime/state/persistence-reader-panels.ts +56 -0
- package/templates/runtime/state/persistence-reader-primitives.ts +27 -0
- package/templates/runtime/state/persistence-reader-timeline.ts +145 -0
- package/templates/runtime/state/persistence-reader-values.ts +40 -0
- package/templates/runtime/state/persistence-readers.ts +72 -0
- package/templates/runtime/state/persistence-shared.ts +23 -0
- package/templates/runtime/state/persistence-snapshot.ts +57 -0
- package/templates/runtime/state/persistence.ts +16 -581
- package/templates/runtime/state/reducer-canvas-panels.test.ts +324 -0
- package/templates/runtime/state/reducer-controls.test.ts +158 -0
- package/templates/runtime/state/reducer-layers.test.ts +306 -0
- package/templates/runtime/state/reducer-media-import-sizing.test.ts +197 -0
- package/templates/runtime/state/reducer-media-reorder-history.test.ts +116 -0
- package/templates/runtime/state/reducer-media-reset.test.ts +249 -0
- package/templates/runtime/state/reducer-media-test-utils.ts +40 -0
- package/templates/runtime/state/reducer-media-transform.test.ts +52 -0
- package/templates/runtime/state/reducer-test-utils.ts +30 -0
- package/templates/runtime/state/reducer-timeline.test.ts +242 -0
- package/templates/runtime/state/reducer.ts +57 -1785
- package/templates/runtime/state/timeline-reducer.ts +412 -0
- package/templates/runtime/state/timeline-values.test.ts +45 -0
- package/templates/runtime/state/timeline-values.ts +45 -0
- package/templates/runtime/testing/performance-browser-policy.test.ts +81 -0
- package/templates/runtime/testing/performance-browser-policy.ts +102 -0
- package/templates/runtime/testing/performance-budget-validation.ts +84 -0
- package/templates/runtime/testing/performance-control-classification.test.ts +106 -0
- package/templates/runtime/testing/performance-control-classification.ts +101 -0
- package/templates/runtime/testing/performance-coverage-context.ts +44 -0
- package/templates/runtime/testing/performance-coverage-renderer-policy.ts +221 -0
- package/templates/runtime/testing/performance-coverage-scenario-policy.ts +147 -0
- package/templates/runtime/testing/performance-coverage-target-policy.ts +121 -0
- package/templates/runtime/testing/performance-coverage-validator.ts +34 -0
- package/templates/runtime/testing/performance-export-coverage.test.ts +234 -0
- package/templates/runtime/testing/performance-fixture-load-profile.test.ts +360 -0
- package/templates/runtime/testing/performance-fixture-media.test.ts +80 -0
- package/templates/runtime/testing/performance-fixture-stress.test.ts +314 -0
- package/templates/runtime/testing/performance-fixture-validation.ts +255 -0
- package/templates/runtime/testing/performance-fixture-values.ts +275 -0
- package/templates/runtime/testing/performance-fixture-workload.test.ts +140 -0
- package/templates/runtime/testing/performance-load-profile-validation.ts +467 -0
- package/templates/runtime/testing/performance-renderer-coverage.test.ts +325 -0
- package/templates/runtime/testing/performance-renderer-pipeline-coverage.test.ts +115 -0
- package/templates/runtime/testing/performance-renderer-pipeline-interactions.test.ts +201 -0
- package/templates/runtime/testing/performance-renderer-pipeline-passes.test.ts +247 -0
- package/templates/runtime/testing/performance-renderer-pipeline-validation.ts +360 -0
- package/templates/runtime/testing/performance-renderer-technique-validation.ts +329 -0
- package/templates/runtime/testing/performance-renderer-technique.test.ts +275 -0
- package/templates/runtime/testing/performance-renderer-validation.ts +2 -0
- package/templates/runtime/testing/performance-scenario-coverage.test.ts +303 -0
- package/templates/runtime/testing/performance-scenario-validation.ts +49 -0
- package/templates/runtime/testing/performance-schema-derived-workloads.test.ts +231 -0
- package/templates/runtime/testing/performance-schema-queries.ts +181 -0
- package/templates/runtime/testing/performance-test-fixtures/index.ts +4 -0
- package/templates/runtime/testing/performance-test-fixtures/renderer-pipelines.ts +322 -0
- package/templates/runtime/testing/performance-test-fixtures/scenarios.ts +172 -0
- package/templates/runtime/testing/performance-test-fixtures/schemas.ts +151 -0
- package/templates/runtime/testing/performance-test-fixtures/stress-fixtures.ts +133 -0
- package/templates/runtime/testing/performance-test-fixtures.ts +1 -0
- package/templates/runtime/testing/performance-types.ts +338 -0
- package/templates/runtime/testing/performance.ts +15 -2485
- package/templates/starter/AGENTS.md +41 -26
- package/templates/starter/LICENSE.md +18 -95
- package/templates/starter/NOTICE.md +3 -3
- package/templates/starter/docs/toolcraft/README.md +5 -5
- package/templates/starter/docs/toolcraft/acceptance-testing.md +36 -8
- package/templates/starter/docs/toolcraft/assembly-workflow.md +12 -15
- package/templates/starter/docs/toolcraft/component-rules.md +6 -2
- package/templates/starter/docs/toolcraft/core/layout.md +1 -0
- package/templates/starter/docs/toolcraft/core/performance.md +7 -4
- package/templates/starter/docs/toolcraft/core/runtime-boundary.md +11 -4
- package/templates/starter/docs/toolcraft/core/timeline-animation.md +1 -0
- package/templates/starter/docs/toolcraft/custom-controls.md +8 -1
- package/templates/starter/docs/toolcraft/decision-contract.md +26 -22
- package/templates/starter/docs/toolcraft/performance.md +42 -16
- package/templates/starter/docs/toolcraft/schema-reference.md +34 -23
- package/templates/starter/docs/toolcraft/workflow.md +25 -17
- package/templates/starter/e2e/app-browser-acceptance-evidence.spec.ts +111 -0
- package/templates/starter/e2e/app-browser-control-coverage.spec.ts +118 -0
- package/templates/starter/e2e/app-browser-performance-evidence.spec.ts +217 -0
- package/templates/starter/e2e/app-browser-performance-probe.spec.ts +322 -0
- package/templates/starter/e2e/app-browser-proof-session.spec.ts +196 -0
- package/templates/starter/e2e/app-browser-runtime-evidence.spec.ts +9 -0
- package/templates/starter/e2e/app-browser-runtime-provenance.spec.ts +240 -0
- package/templates/starter/e2e/app-browser-runtime-reporter.spec.ts +180 -0
- package/templates/starter/e2e/app-browser-runtime-requirements.spec.ts +310 -0
- package/templates/starter/e2e/app-browser-semantic-evidence.spec.ts +432 -0
- package/templates/starter/e2e/app-browser-shell.spec.ts +171 -0
- package/templates/starter/e2e/app-browser-timeline-layers-reference.spec.ts +70 -0
- package/templates/starter/e2e/app-performance.spec.ts +0 -491
- package/templates/starter/e2e/browser-acceptance-outcome-helpers.ts +97 -0
- package/templates/starter/e2e/browser-acceptance-transition-helpers.ts +74 -0
- package/templates/starter/e2e/browser-conditional-output-evidence-helpers.ts +230 -0
- package/templates/starter/e2e/browser-control-target-helpers.ts +109 -0
- package/templates/starter/e2e/browser-layer-evidence-helpers.ts +229 -0
- package/templates/starter/e2e/browser-proof-session.ts +392 -0
- package/templates/starter/e2e/browser-runtime-evidence-reporter.ts +136 -0
- package/templates/starter/e2e/browser-runtime-evidence-requirements.ts +290 -0
- package/templates/starter/e2e/browser-runtime-evidence.ts +27 -0
- package/templates/starter/e2e/browser-state-evidence-helpers.ts +205 -0
- package/templates/starter/e2e/browser-timeline-evidence-helpers.ts +319 -0
- package/templates/starter/e2e/canvas-handle-helpers.ts +86 -4
- package/templates/starter/e2e/export-artifact-helpers.ts +132 -0
- package/templates/starter/e2e/performance-budget-helpers.ts +159 -0
- package/templates/starter/e2e/performance-canvas-helpers.ts +123 -0
- package/templates/starter/e2e/performance-control-helpers.ts +3 -0
- package/templates/starter/e2e/performance-control-layout-helpers.ts +161 -0
- package/templates/starter/e2e/performance-fixture-helpers.ts +217 -0
- package/templates/starter/e2e/performance-frame-probe.ts +247 -0
- package/templates/starter/e2e/performance-helpers.ts +6 -854
- package/templates/starter/e2e/performance-interaction-measurement.ts +251 -0
- package/templates/starter/e2e/performance-measurement-evidence.ts +72 -0
- package/templates/starter/e2e/performance-output-action-helpers.spec.ts +43 -0
- package/templates/starter/e2e/performance-output-action-helpers.ts +109 -0
- package/templates/starter/e2e/performance-probe-helpers.ts +12 -0
- package/templates/starter/e2e/performance-render-scale-helpers.ts +55 -0
- package/templates/starter/e2e/performance-slider-helpers.ts +271 -0
- package/templates/starter/e2e/product-observable-helpers.ts +72 -17
- package/templates/starter/e2e/stable-outcome-helpers.ts +208 -0
- package/templates/starter/package.json +10 -5
- package/templates/starter/playwright.config.ts +5 -2
- package/templates/starter/scripts/check-ai-skills.mjs +14 -8
- package/templates/starter/scripts/check-ai-skills.test.mjs +64 -0
- package/templates/starter/scripts/check-toolcraft-code-health.mjs +108 -0
- package/templates/starter/scripts/check-toolcraft-code-health.test.mjs +213 -0
- package/templates/starter/scripts/check-toolcraft-docs.mjs +47 -34
- package/templates/starter/scripts/check-toolcraft-integrity.mjs +141 -144
- package/templates/starter/scripts/run-browser-performance.mjs +118 -0
- package/templates/starter/scripts/run-browser-performance.test.mjs +53 -0
- package/templates/starter/scripts/toolcraft-code-health-core.mjs +297 -0
- package/templates/starter/scripts/toolcraft-contract-doc-integrity.mjs +77 -0
- package/templates/starter/scripts/toolcraft-contract-doc-integrity.test.mjs +81 -0
- package/templates/starter/scripts/toolcraft-contract-manifest.json +113 -0
- package/templates/starter/scripts/toolcraft-contract-manifest.mjs +128 -0
- package/templates/starter/scripts/toolcraft-contract-manifest.test.mjs +72 -0
- package/templates/starter/scripts/toolcraft-integrity-manifest.mjs +172 -0
- package/templates/starter/scripts/toolcraft-integrity-policy.mjs +60 -0
- package/templates/starter/scripts/toolcraft-product-boundary-ast-utils.mjs +23 -0
- package/templates/starter/scripts/toolcraft-product-boundary-ast.mjs +264 -0
- package/templates/starter/scripts/toolcraft-product-boundary-test-fixtures.mjs +16 -0
- package/templates/starter/scripts/toolcraft-product-boundary.mjs +243 -0
- package/templates/starter/scripts/toolcraft-product-boundary.test.mjs +289 -0
- package/templates/starter/scripts/toolcraft-product-dependency-graph.mjs +176 -0
- package/templates/starter/scripts/toolcraft-product-dependency-graph.test.mjs +196 -0
- package/templates/starter/scripts/toolcraft-product-dependency-resolution.mjs +279 -0
- package/templates/starter/scripts/toolcraft-product-evidence-boundary-ast.mjs +91 -0
- package/templates/starter/scripts/toolcraft-product-evidence-boundary.test.mjs +138 -0
- package/templates/starter/scripts/toolcraft-product-style-boundary.mjs +219 -0
- package/templates/starter/scripts/toolcraft-source-inventory.d.mts +46 -0
- package/templates/starter/scripts/toolcraft-source-inventory.mjs +187 -0
- package/templates/starter/scripts/toolcraft-source-inventory.test.mjs +132 -0
- package/templates/starter/scripts/toolcraft-source-ownership.mjs +167 -0
- package/templates/starter/scripts/toolcraft-source-ownership.test.mjs +113 -0
- package/templates/starter/scripts/toolcraft-static-string.mjs +104 -0
- package/templates/starter/scripts/toolcraft-verification-inventory.mjs +123 -0
- package/templates/starter/scripts/toolcraft-verification-receipt.d.mts +19 -0
- package/templates/starter/scripts/toolcraft-verification-receipt.mjs +284 -0
- package/templates/starter/scripts/toolcraft-verification-receipt.test.mjs +282 -0
- package/templates/starter/scripts/toolcraft-vitest-runtime-contract.d.mts +32 -0
- package/templates/starter/scripts/toolcraft-vitest-runtime-contract.mjs +88 -0
- package/templates/starter/scripts/toolcraft-vitest-runtime-contract.test.mjs +87 -0
- package/templates/starter/scripts/toolcraft-vitest-runtime-evidence-reporter.mjs +109 -0
- package/templates/starter/scripts/toolcraft-vitest-runtime-evidence-reporter.test.mjs +111 -0
- package/templates/starter/scripts/toolcraft-workflow-routes.mjs +314 -0
- package/templates/starter/scripts/toolcraft-workflow-routes.test.mjs +204 -0
- package/templates/starter/src/app/acceptance/actions.ts +30 -0
- package/templates/starter/src/app/acceptance/animation-intent.ts +184 -0
- package/templates/starter/src/app/acceptance/canvas-handle-acceptance.ts +70 -0
- package/templates/starter/src/app/acceptance/color-bank-labels.ts +164 -0
- package/templates/starter/src/app/acceptance/conditions.ts +80 -0
- package/templates/starter/src/app/acceptance/control-acceptance-context.ts +70 -0
- package/templates/starter/src/app/acceptance/control-acceptance-coverage.ts +271 -0
- package/templates/starter/src/app/acceptance/control-acceptance-kind-rules.ts +149 -0
- package/templates/starter/src/app/acceptance/control-acceptance-policy.ts +189 -0
- package/templates/starter/src/app/acceptance/control-acceptance.ts +70 -0
- package/templates/starter/src/app/acceptance/control-component-rules.ts +277 -0
- package/templates/starter/src/app/acceptance/control-labels.ts +223 -0
- package/templates/starter/src/app/acceptance/control-layout-dependency-rules.ts +107 -0
- package/templates/starter/src/app/acceptance/control-layout-entity-rules.ts +104 -0
- package/templates/starter/src/app/acceptance/control-layout-model.ts +159 -0
- package/templates/starter/src/app/acceptance/control-layout-section-rules.ts +164 -0
- package/templates/starter/src/app/acceptance/control-layout.ts +45 -0
- package/templates/starter/src/app/acceptance/control-order.ts +123 -0
- package/templates/starter/src/app/acceptance/control-parts.ts +47 -0
- package/templates/starter/src/app/acceptance/control-section-inventory.ts +183 -0
- package/templates/starter/src/app/acceptance/controls.ts +27 -0
- package/templates/starter/src/app/acceptance/coverage.ts +81 -0
- package/templates/starter/src/app/acceptance/custom-controls.ts +140 -0
- package/templates/starter/src/app/acceptance/inline-layout.ts +192 -0
- package/templates/starter/src/app/acceptance/media-upload.ts +55 -0
- package/templates/starter/src/app/acceptance/output-background-rules.ts +135 -0
- package/templates/starter/src/app/acceptance/output-export-actions.test.ts +76 -0
- package/templates/starter/src/app/acceptance/output-export-actions.ts +34 -0
- package/templates/starter/src/app/acceptance/output-export-layout-rules.ts +46 -0
- package/templates/starter/src/app/acceptance/output-export-model.ts +146 -0
- package/templates/starter/src/app/acceptance/output-export.ts +45 -0
- package/templates/starter/src/app/acceptance/output-image-export-rules.ts +87 -0
- package/templates/starter/src/app/acceptance/reference-runtime-coverage.ts +96 -0
- package/templates/starter/src/app/acceptance/reference-runtime-feature-inventory.ts +171 -0
- package/templates/starter/src/app/acceptance/reference-runtime-study.ts +73 -0
- package/templates/starter/src/app/acceptance/reference-runtime-timeline.ts +291 -0
- package/templates/starter/src/app/acceptance/reference-runtime.ts +99 -0
- package/templates/starter/src/app/acceptance/runtime-coverage.ts +290 -0
- package/templates/starter/src/app/acceptance/runtime-setup.ts +117 -0
- package/templates/starter/src/app/acceptance/section-title-rules.ts +8 -0
- package/templates/starter/src/app/acceptance/sections.ts +6 -0
- package/templates/starter/src/app/acceptance/semantic.ts +63 -0
- package/templates/starter/src/app/acceptance/timeline-loop.ts +21 -0
- package/templates/starter/src/app/acceptance/types.ts +363 -0
- package/templates/starter/src/app/acceptance/validate-coverage.ts +217 -0
- package/templates/starter/src/app/acceptance/validation-pipeline.test.ts +56 -0
- package/templates/starter/src/app/acceptance/validation-pipeline.ts +60 -0
- package/templates/starter/src/app/acceptance/video-reference-study.ts +217 -0
- package/templates/starter/src/app/starter-acceptance-data.ts +21 -0
- package/templates/starter/src/app/starter-acceptance.animation-intent.test.ts +383 -0
- package/templates/starter/src/app/starter-acceptance.background-export.test.ts +349 -0
- package/templates/starter/src/app/starter-acceptance.base-coverage.test.ts +47 -0
- package/templates/starter/src/app/starter-acceptance.canvas-handles.test.ts +71 -0
- package/templates/starter/src/app/starter-acceptance.canvas-sizing.test.ts +199 -0
- package/templates/starter/src/app/starter-acceptance.compound-part-coverage.test.ts +244 -0
- package/templates/starter/src/app/starter-acceptance.contract-fixtures.ts +63 -0
- package/templates/starter/src/app/starter-acceptance.control-label-context.test.ts +172 -0
- package/templates/starter/src/app/starter-acceptance.control-labels.test.ts +387 -0
- package/templates/starter/src/app/starter-acceptance.control-naming-rules.test.ts +215 -0
- package/templates/starter/src/app/starter-acceptance.control-order.test.ts +274 -0
- package/templates/starter/src/app/starter-acceptance.control-state.test.ts +275 -0
- package/templates/starter/src/app/starter-acceptance.curves-rules.test.ts +184 -0
- package/templates/starter/src/app/starter-acceptance.custom-control-collections.test.ts +200 -0
- package/templates/starter/src/app/starter-acceptance.custom-control-coverage.test.ts +111 -0
- package/templates/starter/src/app/starter-acceptance.custom-control-fit-check.test.ts +135 -0
- package/templates/starter/src/app/starter-acceptance.custom-control-valid.test.ts +74 -0
- package/templates/starter/src/app/starter-acceptance.export-test-utils.ts +107 -0
- package/templates/starter/src/app/starter-acceptance.framework-boundary.test.ts +327 -0
- package/templates/starter/src/app/starter-acceptance.image-video-export-settings.test.ts +328 -0
- package/templates/starter/src/app/starter-acceptance.keyframes.test.ts +242 -0
- package/templates/starter/src/app/starter-acceptance.layers.test.ts +203 -0
- package/templates/starter/src/app/starter-acceptance.media-upload.fixtures.ts +110 -0
- package/templates/starter/src/app/starter-acceptance.media-upload.test.ts +153 -0
- package/templates/starter/src/app/starter-acceptance.output-export-rules.test.ts +97 -0
- package/templates/starter/src/app/starter-acceptance.persistence-coverage.test.ts +134 -0
- package/templates/starter/src/app/starter-acceptance.product-output-export.test.ts +202 -0
- package/templates/starter/src/app/starter-acceptance.product-readiness-rules.test.ts +14 -0
- package/templates/starter/src/app/starter-acceptance.product-readiness-test-utils.ts +25 -0
- package/templates/starter/src/app/starter-acceptance.product-readiness.test.ts +50 -0
- package/templates/starter/src/app/starter-acceptance.product-worklog.test.ts +27 -0
- package/templates/starter/src/app/starter-acceptance.range-slider-rules.test.ts +147 -0
- package/templates/starter/src/app/starter-acceptance.reference-custom-timeline.test.ts +197 -0
- package/templates/starter/src/app/starter-acceptance.reference-foundation.test.ts +304 -0
- package/templates/starter/src/app/starter-acceptance.reference-test-utils.ts +102 -0
- package/templates/starter/src/app/starter-acceptance.reference-timeline.test.ts +267 -0
- package/templates/starter/src/app/starter-acceptance.schema-test-utils.ts +116 -0
- package/templates/starter/src/app/starter-acceptance.section-cohesion.test.ts +373 -0
- package/templates/starter/src/app/starter-acceptance.section-dependencies.test.ts +260 -0
- package/templates/starter/src/app/starter-acceptance.section-titles.test.ts +180 -0
- package/templates/starter/src/app/starter-acceptance.setup-readiness.test.ts +205 -0
- package/templates/starter/src/app/starter-acceptance.slider-rules.test.ts +470 -0
- package/templates/starter/src/app/starter-acceptance.slider-unit-rules.test.ts +61 -0
- package/templates/starter/src/app/starter-acceptance.source-test-utils.ts +43 -0
- package/templates/starter/src/app/starter-acceptance.test-utils.ts +21 -0
- package/templates/starter/src/app/starter-acceptance.text-control-kind.test.ts +89 -0
- package/templates/starter/src/app/starter-acceptance.timeline-playback.test.ts +264 -0
- package/templates/starter/src/app/starter-acceptance.timeline-test-utils.ts +56 -0
- package/templates/starter/src/app/starter-acceptance.toggle-pair-layout.test.ts +200 -0
- package/templates/starter/src/app/starter-acceptance.toggle-parameter-layout.test.ts +277 -0
- package/templates/starter/src/app/starter-acceptance.ts +151 -4576
- package/templates/starter/src/app/starter-acceptance.video-export-test-utils.ts +37 -0
- package/templates/starter/src/app/starter-acceptance.video-reference-study.test.ts +262 -0
- package/templates/starter/src/app/starter-acceptance.worklog-test-utils.ts +428 -0
- package/templates/starter/src/app/starter-acceptance.worklog.test.ts +283 -0
- package/templates/starter/src/app/starter-automated-runtime-evidence.test.ts +34 -0
- package/templates/starter/src/app/starter-composition.tsx +7 -0
- package/templates/starter/src/app/starter-performance-test-utils.ts +275 -0
- package/templates/starter/src/app/starter-performance.budgets.test.ts +374 -0
- package/templates/starter/src/app/starter-performance.gates.test.ts +128 -0
- package/templates/starter/src/app/starter-performance.renderer-source.test.ts +136 -0
- package/templates/starter/src/app/starter-performance.renderer-technique.test.ts +291 -0
- package/templates/starter/src/app/starter-performance.scenarios.test.ts +355 -0
- package/templates/starter/src/app/test-evidence/browser-runtime-contract.test.ts +253 -0
- package/templates/starter/src/app/test-evidence/browser-runtime-contract.ts +243 -0
- package/templates/starter/src/routes/index.tsx +11 -2
- package/templates/starter/vite.config.ts +8 -0
- package/templates/ui/components/controls/color/color-control-types.ts +38 -0
- package/templates/ui/components/controls/color/color-control.tsx +19 -437
- package/templates/ui/components/controls/color/color-footer.tsx +272 -0
- package/templates/ui/components/controls/color/color-model-slider.tsx +271 -0
- package/templates/ui/components/controls/color/color-opacity-input.tsx +94 -0
- package/templates/ui/components/controls/color/color-surface.tsx +194 -0
- package/templates/ui/components/controls/color/color-value-control.tsx +159 -0
- package/templates/ui/components/controls/color/color-value-utils.ts +170 -0
- package/templates/ui/components/controls/color/index.ts +10 -3
- package/templates/ui/components/controls/color/palette-control-controller.ts +407 -0
- package/templates/ui/components/controls/color/palette-control-layout.ts +14 -0
- package/templates/ui/components/controls/color/palette-control-types.ts +50 -0
- package/templates/ui/components/controls/color/palette-control-view.tsx +174 -0
- package/templates/ui/components/controls/color/palette-control.tsx +6 -544
- package/templates/ui/components/controls/color/style-guide-color-picker-color-utils.ts +39 -0
- package/templates/ui/components/controls/color/style-guide-color-picker-controller.ts +370 -0
- package/templates/ui/components/controls/color/style-guide-color-picker-hue-handlers.ts +66 -0
- package/templates/ui/components/controls/color/style-guide-color-picker-interaction-state.ts +49 -0
- package/templates/ui/components/controls/color/style-guide-color-picker-interactions.ts +2 -2
- package/templates/ui/components/controls/color/style-guide-color-picker-model.ts +125 -0
- package/templates/ui/components/controls/color/style-guide-color-picker-parts.tsx +10 -707
- package/templates/ui/components/controls/color/style-guide-color-picker-surface-drag.ts +93 -0
- package/templates/ui/components/controls/color/style-guide-color-picker-surface-geometry.ts +114 -0
- package/templates/ui/components/controls/color/style-guide-color-picker-surface-preview.ts +45 -0
- package/templates/ui/components/controls/color/style-guide-color-picker-types.ts +84 -0
- package/templates/ui/components/controls/color/style-guide-color-picker-view.tsx +69 -0
- package/templates/ui/components/controls/color/style-guide-color-picker.tsx +6 -495
- package/templates/ui/components/controls/curves/curves-control.tsx +4 -3
- package/templates/ui/components/controls/file-drop/file-drop-control.tsx +39 -515
- package/templates/ui/components/controls/file-drop/file-drop-empty-state.tsx +35 -0
- package/templates/ui/components/controls/file-drop/file-drop-file-list.tsx +160 -0
- package/templates/ui/components/controls/file-drop/file-drop-image-grid.tsx +175 -0
- package/templates/ui/components/controls/file-drop/file-drop-model.tsx +170 -0
- package/templates/ui/components/controls/file-drop/file-drop-single-preview.tsx +63 -0
- package/templates/ui/components/controls/file-drop/file-drop-types.ts +48 -0
- package/templates/ui/components/controls/file-drop/index.ts +2 -2
- package/templates/ui/components/controls/font-picker/font-picker-control.tsx +133 -906
- package/templates/ui/components/controls/font-picker/font-picker-footer.tsx +116 -0
- package/templates/ui/components/controls/font-picker/font-picker-list.tsx +194 -0
- package/templates/ui/components/controls/font-picker/font-picker-popover-content.tsx +191 -0
- package/templates/ui/components/controls/font-picker/font-picker-value.ts +222 -0
- package/templates/ui/components/controls/font-picker/index.ts +4 -1
- package/templates/ui/components/controls/font-picker/use-font-picker-preview-pipeline.ts +163 -0
- package/templates/ui/components/controls/font-picker/use-font-picker-virtual-list.ts +293 -0
- package/templates/ui/components/controls/gradient/gradient-control-utils.ts +2 -25
- package/templates/ui/components/controls/gradient/gradient-control.tsx +4 -464
- package/templates/ui/components/controls/gradient/gradient-stops-controller.ts +332 -0
- package/templates/ui/components/controls/gradient/gradient-stops-track.tsx +159 -0
- package/templates/ui/components/controls/vector/vector-control-types.ts +26 -0
- package/templates/ui/components/controls/vector/vector-control.tsx +10 -486
- package/templates/ui/components/controls/vector/vector-pad-field.tsx +211 -0
- package/templates/ui/components/controls/vector/vector-pad-geometry.ts +61 -0
- package/templates/ui/components/controls/vector/vector-pad-parts.tsx +72 -0
- package/templates/ui/components/controls/vector/vector-pad-variants.ts +20 -0
- package/templates/ui/components/controls/vector/vector-size-field.tsx +104 -0
- package/templates/ui/components/controls/vector/vector-value.ts +46 -0
- package/templates/ui/components/primitives/slider/slider-discrete-state.ts +181 -0
- package/templates/ui/components/primitives/slider/slider-marker-policy.ts +52 -0
- package/templates/ui/components/primitives/slider/slider-pointer-dragging.ts +87 -0
- package/templates/ui/components/primitives/slider/slider-runtime.ts +109 -0
- package/templates/ui/components/primitives/slider/slider-types.ts +21 -0
- package/templates/ui/components/primitives/slider/slider.tsx +2 -403
- package/templates/runtime/react/canvas-shell.test.tsx +0 -554
- package/templates/runtime/react/canvas-shell.tsx +0 -585
- package/templates/runtime/react/controls-panel.test.tsx +0 -5446
- package/templates/runtime/react/controls-panel.tsx +0 -3220
- package/templates/runtime/react/layers-panel.test.tsx +0 -487
- package/templates/runtime/react/layers-panel.tsx +0 -1348
- package/templates/runtime/react/timeline-panel.test.tsx +0 -751
- package/templates/runtime/react/timeline-panel.tsx +0 -3078
- package/templates/runtime/schema/define-toolcraft.test.ts +0 -1742
- package/templates/runtime/state/reducer.test.ts +0 -1703
- package/templates/runtime/testing/performance.test.ts +0 -3081
- package/templates/starter/e2e/app-browser-acceptance.spec.ts +0 -785
- package/templates/starter/src/app/starter-acceptance.test.ts +0 -10068
- package/templates/starter/src/app/starter-performance.test.ts +0 -1583
- package/templates/ui/components/controls/color/style-guide-color-picker-logic.ts +0 -490
- /package/templates/runtime/react/{storage-key-migration.ts → app-shell/storage-key-migration.ts} +0 -0
- /package/templates/runtime/react/{theme-runtime.tsx → app-shell/theme-runtime.tsx} +0 -0
- /package/templates/runtime/react/{curve-geometry.test.ts → controls-panel/__tests__/curve-geometry.test.ts} +0 -0
- /package/templates/runtime/react/{panel-host-config.ts → panel-host/panel-host-config.ts} +0 -0
- /package/templates/runtime/react/{panel-host-geometry.test.ts → panel-host/panel-host-geometry.test.ts} +0 -0
- /package/templates/runtime/react/{panel-host-geometry.ts → panel-host/panel-host-geometry.ts} +0 -0
|
@@ -4,17 +4,21 @@ This is a standalone Toolcraft template app generated from the base starter.
|
|
|
4
4
|
|
|
5
5
|
## Required Preflight
|
|
6
6
|
|
|
7
|
-
Treat this `AGENTS.md` as the active project contract. Before planning or editing app code, runtime code, controls, canvas, panels, renderer, timeline, layers, export, or tests
|
|
7
|
+
Treat this `AGENTS.md` as the active project contract. Before planning or editing app code, runtime code, controls, canvas, panels, renderer, timeline, layers, export, or tests:
|
|
8
8
|
|
|
9
|
-
1. `docs/toolcraft/workflow.md`
|
|
9
|
+
1. Read `docs/toolcraft/workflow.md` in full.
|
|
10
|
+
2. Select every task route that matches the requested surface.
|
|
11
|
+
3. Read the selected routes' Plan phase before writing the spec or implementation plan.
|
|
12
|
+
4. Read their Implementation phase immediately before editing code.
|
|
13
|
+
5. Read their Verification phase before writing or running proof.
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
Process matching routes sequentially within the current phase and skip repeated documents already read in that phase. Open exactly one listed document per terminal or tool read, including documents from the same route and phase. Do not concatenate multiple documents, routes, or phases into one large output, and never continue from truncated output. Choose and record the verification tier before implementation. Do not edit implementation files until the Plan and Implementation preflight is complete.
|
|
12
16
|
|
|
13
17
|
## Quick Entry Contract
|
|
14
18
|
|
|
15
19
|
1. Build through `defineToolcraft` and `ToolcraftApp`.
|
|
16
20
|
2. Keep app state in Toolcraft runtime schema and commands.
|
|
17
|
-
3. Keep product output in `canvasContent`; never render app UI there. If upload/import is part of the source-material flow, do not invent canvas placeholder artwork, CTA copy, helper text, fake sample output, or preset source designs before real content exists.
|
|
21
|
+
3. Keep product output in `canvasContent`; never render app UI there. The signed host owns `ToolcraftApp`, bootstrap, routes, and global runtime styles; product code supplies only `ToolcraftAppComposition`. If upload/import is part of the source-material flow, do not invent canvas placeholder artwork, CTA copy, helper text, fake sample output, or preset source designs before real content exists.
|
|
18
22
|
4. Use built-in Toolcraft controls before custom controls.
|
|
19
23
|
5. Do not hand-compose runtime surfaces or render built-in control components directly in app code; use `ToolcraftApp`, schema controls, `canvasContent`, `controlRenderers`, `onPanelAction`, and runtime commands.
|
|
20
24
|
6. Before writing controls, make and export `starterControlSectionInventory`: each product controls section declares its title, product entity or workflow stage, targets, and grouping reason. Group by product meaning, not UI component type.
|
|
@@ -27,7 +31,7 @@ Then follow `workflow.md` to choose the required contract docs and verification
|
|
|
27
31
|
13. Generated apps follow the mandatory runtime Setup, canvas sizing, render scale, Timeline switch, Background, Image Export, Video Export, and sticky action rules in `docs/toolcraft/core/setup-export.md`. Do not duplicate or reinterpret those controls in app-authored sections.
|
|
28
32
|
14. Media uploads, image/file mode, source images, multi-upload sorting, default assets, and image transform actions follow `docs/toolcraft/core/media-upload.md`.
|
|
29
33
|
15. Keep `docs/toolcraft/agent-worklog.md` current with a decision trail, product decisions, explicit reference inputs, evidence, verification, and risks. Reference-runtime-clone apps also declare `referenceStudy` plus `referenceFeatureInventory` so every inspected reference feature has feature-level behavior evidence and maps to Toolcraft implementation and acceptance coverage.
|
|
30
|
-
16. Prove every visible entity through acceptance, browser, and performance coverage.
|
|
34
|
+
16. Prove every visible entity through acceptance, browser, and performance coverage. Browser acceptance and performance pass only when protected helpers emit matching runtime evidence after successful assertions; source-code spelling and acceptance prose are not outcome authority. Declare typed conditional-visibility and background-output coverage, then use their fixed protected browser recipes. Generic acceptance outcomes prove command side effects only; use the fixed media, persistence, viewport, compound-control, layer, and timeline semantic recipes for specialized evidence.
|
|
31
35
|
17. Performance workload, render scale, live slider responsiveness, GPU evaluation, and optimization evidence rules live in `docs/toolcraft/core/performance.md` plus `docs/toolcraft/performance.md`.
|
|
32
36
|
18. Custom renderer apps declare a Render Pipeline Inventory in typed `rendererPipeline`: render passes, cache keys, execution location, preview/export quality, and interaction invalidation.
|
|
33
37
|
19. Classify every implementation pass with a verification tier before editing. Use targeted checks for incremental edits and the full final gate only for final delivery, exports, or architecture/runtime/template changes.
|
|
@@ -36,11 +40,11 @@ Then follow `workflow.md` to choose the required contract docs and verification
|
|
|
36
40
|
|
|
37
41
|
The generated folder starts as a neutral Toolcraft shell: canvas upload plus toolbar. It intentionally does not include demo controls, prompt fields, layers, or timeline. Do not treat test fixtures or documentation examples as product requirements. Add controls, timeline, layers, sticky actions, persistence, and custom renderers only after the requested product or reference app requires them.
|
|
38
42
|
|
|
39
|
-
When the folder becomes a real product, update `src/app/app-acceptance.ts` from `appProductReadiness.mode: "starter"` to `mode: "product"` and fill `productName`, `productSummary`, and `requestedBehavior`. Renamed product folders are not allowed to keep neutral starter readiness.
|
|
43
|
+
When the folder becomes a real product, update `src/app/app-acceptance-data.ts` from `appProductReadiness.mode: "starter"` to `mode: "product"` and fill `productName`, `productSummary`, and `requestedBehavior`. Renamed product folders are not allowed to keep neutral starter readiness.
|
|
40
44
|
|
|
41
45
|
## License
|
|
42
46
|
|
|
43
|
-
This project includes Toolcraft source code
|
|
47
|
+
This project includes Toolcraft source code available under the MIT License in `LICENSE.md`. `NOTICE.md` explains that generated apps include Toolcraft runtime, starter, UI component, documentation, and template source code.
|
|
44
48
|
|
|
45
49
|
## Local Reference Docs
|
|
46
50
|
|
|
@@ -52,7 +56,7 @@ Use this `AGENTS.md` as the entry contract. Use local docs for detail; the app m
|
|
|
52
56
|
- `docs/toolcraft/decision-contract.md` — rule ids, levels, and enforcement expectations.
|
|
53
57
|
- `docs/toolcraft/schema-reference.md` — schema authoring rules for `src/app/app-schema.ts`.
|
|
54
58
|
- `docs/toolcraft/component-rules.md` — slider, segmented, color, upload, image picker, vector, layers, timeline, and footer action rules.
|
|
55
|
-
- `docs/toolcraft/acceptance-testing.md` — app entity matrix and browser acceptance for `src/app/app-acceptance.ts`.
|
|
59
|
+
- `docs/toolcraft/acceptance-testing.md` — app entity matrix and browser acceptance for `src/app/app-acceptance-data.ts`.
|
|
56
60
|
- `docs/toolcraft/performance.md` — performance roles, scenarios, and workload coverage for `src/app/app-performance.ts`.
|
|
57
61
|
- `docs/toolcraft/renderer-technique.md` — DOM, SVG, Canvas 2D, WebGL, and mixed renderer choices.
|
|
58
62
|
- `docs/toolcraft/agent-worklog.md` — implementation decision trail, evidence, verification, and remaining risks.
|
|
@@ -60,12 +64,18 @@ Use this `AGENTS.md` as the entry contract. Use local docs for detail; the app m
|
|
|
60
64
|
|
|
61
65
|
## Edit Surface
|
|
62
66
|
|
|
63
|
-
- Build the product
|
|
64
|
-
-
|
|
65
|
-
-
|
|
67
|
+
- Build the product through `src/app/app-composition.tsx`, `src/app/app-schema.ts`, and any focused product-owned modules imported by that composition. Product module location under `src` is unrestricted; the AST boundary and code-health inventory scan every product production module regardless of folder.
|
|
68
|
+
- Do not edit the signed framework bootstrap: `index.html`, `src/main.tsx`, `src/router.tsx`, `src/routes/index.tsx`, `src/routes/root.tsx`, or `src/styles.css`. The protected route owns the `ToolcraftApp` host and its `className`.
|
|
69
|
+
- Product styles use locally imported `*.module.css` files only. Every selector is anchored by a local class. A first-compound `:is()` or `:where()` is a valid local anchor only when every branch is locally anchored; `:not()` and `:has()` do not create an anchor. Do not add plain product CSS, CSS `@import`, package CSS imports, `:global`, bare/root selectors, sibling escapes, selectors that target Toolcraft host attributes, or global `<style>`/`CSSStyleSheet` injection.
|
|
70
|
+
- Product `import()` and `require()` specifiers are statically resolvable. Computed module loading is rejected in production and product tests. Production modules do not import product tests, test-support modules, or protected browser-evidence internals, directly or through product bridges; use the protected public acceptance/performance helpers instead of emitting reserved evidence.
|
|
71
|
+
- Product production modules form an acyclic dependency graph. Code health resolves relative imports, directory indexes, configured TypeScript aliases, and local package exports; type-only, external-package, test, and copied-framework edges are excluded. A failure reports the complete shortest cycle so ownership can be repaired instead of hidden behind a barrel or alias.
|
|
72
|
+
- Root Vite, Vitest, Playwright, and TypeScript verification configuration is signed platform code. Do not add alternate config files whose names resolve to those protected config families.
|
|
73
|
+
- Keep `src/app/app-acceptance-data.ts` aligned with every visible product entity.
|
|
74
|
+
- Do not edit `src/app/app-acceptance.ts`, `src/app/acceptance`, supplied `app-acceptance.*` meta-tests, or the generic browser acceptance harness. They are framework-owned files covered by the signed integrity manifest; add product-specific Vitest and Playwright tests in separate app-owned files.
|
|
66
75
|
- Keep `src/app/app-performance.ts` as app-specific performance matrix config only.
|
|
67
76
|
- Do not paste, restore, or duplicate runtime validators inside `src/app/app-performance.ts`.
|
|
68
|
-
- Do not edit `
|
|
77
|
+
- Do not edit the generated contract files under `docs/toolcraft` or the generated `LICENSE.md` and `NOTICE.md`; they are framework-owned and covered by the signed integrity manifest. `docs/toolcraft/agent-worklog.md` is the explicit editable exception for product decisions and verification evidence.
|
|
78
|
+
- Do not edit `src/toolcraft`. It is an immutable signed copy of the shared Toolcraft runtime; change the monorepo runtime and regenerate the app instead.
|
|
69
79
|
- Before final delivery, replace the starter worklog with `Mode: product`, add `Decision Trail` entries for significant implementation passes, and record concrete decisions for renderer, timeline, layers, controls, export, and performance. Each decision-trail iteration must name the user-visible result, source/reference checked, contract rules applied, rejected alternatives, and state/output mapping. `pnpm test` fails if the worklog is missing, lacks the decision trail, or still describes the neutral starter.
|
|
70
80
|
- `pnpm test` includes Toolcraft source integrity and local docs checks. If a desired control style is missing, fix the schema or regenerate from the upstream template/runtime; do not patch copied `src/toolcraft` files for one app.
|
|
71
81
|
|
|
@@ -73,6 +83,7 @@ Use this `AGENTS.md` as the entry contract. Use local docs for detail; the app m
|
|
|
73
83
|
|
|
74
84
|
These ids mirror `TOOLCRAFT_DECISION_CONTRACT` in `@/toolcraft/runtime`. Keep this list synced so standalone instructions do not drift from runtime validators.
|
|
75
85
|
|
|
86
|
+
[//]: # (toolcraft-contract:decision-rule-list:start)
|
|
76
87
|
- `runtime-shell-required`
|
|
77
88
|
- `canvas-no-app-ui`
|
|
78
89
|
- `canvas-surface-preserved`
|
|
@@ -84,21 +95,24 @@ These ids mirror `TOOLCRAFT_DECISION_CONTRACT` in `@/toolcraft/runtime`. Keep th
|
|
|
84
95
|
- `timeline-enabled-behavior`
|
|
85
96
|
- `controls-product-coverage`
|
|
86
97
|
- `output-export-required`
|
|
98
|
+
- `controls-section-inventory-required`
|
|
99
|
+
- `controls-component-layout-invariants`
|
|
87
100
|
- `controls-layout-heuristics`
|
|
88
101
|
- `renderer-technique-inventory`
|
|
89
|
-
- `video-reference-analysis`
|
|
90
102
|
- `reference-clone-source-of-truth`
|
|
103
|
+
- `video-reference-analysis`
|
|
91
104
|
- `acceptance-product-observable`
|
|
92
105
|
- `performance-coverage-levels`
|
|
93
106
|
- `persistence-policy-explicit`
|
|
94
107
|
- `workflow-required`
|
|
108
|
+
[//]: # (toolcraft-contract:decision-rule-list:end)
|
|
95
109
|
|
|
96
110
|
## Runtime Contract
|
|
97
111
|
|
|
98
112
|
- Use `defineToolcraft` from `@/toolcraft/runtime`.
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
113
|
+
- Export an `appComposition` satisfying `ToolcraftAppComposition` from `src/app/app-composition.tsx`.
|
|
114
|
+
- Keep product composition limited to `schema`, `canvasContent`, `controlRenderers`, `onPanelAction`, and `renderDefaultCanvasMedia`; host `className` and `style` are not product extension points.
|
|
115
|
+
- Do not import `ToolcraftApp`, low-level runtime surfaces, or built-in controls into product modules. The signed host renders the shell; product modules use schema controls and supported composition fields.
|
|
102
116
|
- Use `renderDefaultCanvasMedia={false}` when a custom renderer replaces the default media preview.
|
|
103
117
|
- Use `ToolcraftApp onPanelAction` for sticky footer product actions such as Generate, Apply, Export, Copy, or Download.
|
|
104
118
|
- Keep final app behavior in the schema and runtime command bus, not in isolated local control state.
|
|
@@ -107,19 +121,18 @@ These ids mirror `TOOLCRAFT_DECISION_CONTRACT` in `@/toolcraft/runtime`. Keep th
|
|
|
107
121
|
- Use schema `defaultValue` for every resettable control.
|
|
108
122
|
- Route editor-owned actions through runtime commands such as `controls.reset`, `media.import`, `media.delete`, `canvas.center`, `history.undo`, and `history.redo`.
|
|
109
123
|
|
|
110
|
-
##
|
|
124
|
+
## AI Workflow Skills And Local Fallback
|
|
111
125
|
|
|
112
|
-
|
|
126
|
+
The signed local `AGENTS.md` and `docs/toolcraft/*` files are the mandatory workflow authority. Use the named workflow skills when the environment provides them; they improve execution but are not a prerequisite for a standalone generated app to remain buildable and verifiable.
|
|
113
127
|
|
|
114
128
|
- Before writing or changing an app spec, use `brainstorming` to decide product behavior, canvas sizing mode, panels, media flow, controls, export/copy behavior, renderer technique, timeline/layer choice, and ambiguous requirements.
|
|
115
129
|
- Before editing code from an approved spec, use `writing-plans` to produce a deterministic implementation plan focused on app files, tests, build, and browser verification.
|
|
116
130
|
- Before fixing any broken control, failed test, build failure, visual mismatch, export issue, or runtime regression, use `systematic-debugging` to find the root cause first.
|
|
117
131
|
- When the prompt includes a Figma URL, use Figma MCP/design context before implementation. Read the actual node, layer, component, variable, and asset structure; screenshots are only for final visual QA, not the source of truth.
|
|
118
132
|
- After implementation, use the `browser` workflow or equivalent local browser verification to test the running app, not only typecheck/build output. The default browser gate is `pnpm test:browser`; it excludes every Playwright test whose name contains `browser perf:`, including performance audit and budget scenarios. `pnpm test:browser:perf` is reserved for full performance checkpoints.
|
|
119
|
-
- Run `pnpm ai:check` before app generation or major changes.
|
|
120
|
-
- If a
|
|
121
|
-
-
|
|
122
|
-
- Do not silently skip required workflow skills, and do not replace them with an ad hoc plan.
|
|
133
|
+
- Run `pnpm ai:check` before app generation or major changes. It enforces local code health, the product AST boundary, and external skill availability. With an explicit `--no-install` generation the AST pass reports that it is deferred; normal `pnpm test` and every final gate require installed dependencies and run the full boundary.
|
|
134
|
+
- If a workflow skill is missing and installation is available, install it and refresh the session. If installation is unavailable or the app was generated with `--no-skills`, continue through the equivalent signed local workflow instead of stopping or weakening verification.
|
|
135
|
+
- Do not silently ignore a missing workflow capability: follow the matching local requirement in this file and `docs/toolcraft/workflow.md`, and record the fallback in the implementation plan or worklog.
|
|
123
136
|
- The Toolcraft app contract overrides generic brainstorming approval and visual-companion rituals. If the user asks to build or port an app, that request is approval to produce the spec, plan, implementation, tests, build, and local run unless a product-critical ambiguity remains.
|
|
124
137
|
- Do not ask the user to confirm decisions already covered by this contract, the prompt, or the reference app. Record the decision in the spec and continue.
|
|
125
138
|
- Do not ask whether to enable a browser companion during brainstorming. Browser verification is mandatory after the app runs locally.
|
|
@@ -144,7 +157,7 @@ Choose the tier by blast radius, not by line count. If uncertain, move one tier
|
|
|
144
157
|
| Tier 1 — local control presentation | One control or panel visual state changes: spacing, hover, focus, disabled, marker visibility, label fit, or component variant display. Runtime state shape and product renderer are unchanged. | Targeted unit/component test plus one focused browser check for the affected control or panel. |
|
|
145
158
|
| Tier 2 — schema/product behavior | Controls, sections, defaults, persistence, panel actions, export actions, acceptance rows, or product behavior mapping changes. | `pnpm verify:quick` plus relevant browser acceptance. Run perf only when the changed control affects renderer workload or responsiveness. |
|
|
146
159
|
| Tier 3 — renderer/canvas/runtime feature | Custom renderer, animation loop, canvas sizing, upload/media, timeline, layers, toolbar, export bytes, WebGL/Canvas/SVG output, zoom, radar, history, heavy control behavior changes, or a post-generation iteration that touches renderer workload or viewport stability. | `pnpm verify:quick`, targeted browser acceptance, and targeted performance scenarios only for touched workload/viewport/export paths. |
|
|
147
|
-
| Tier 4 — final delivery/template architecture | Fresh generated app completion, folder export, commit-ready delivery, dependency changes, runtime/template/contract/CLI changes, broad refactors, or major post-generation iterations that rewrite renderer, canvas, animation, timeline/keyframes, layers, media, export, or control mapping. | Fresh folders run `pnpm install` once
|
|
160
|
+
| Tier 4 — final delivery/template architecture | Fresh generated app completion, folder export, commit-ready delivery, dependency changes, runtime/template/contract/CLI changes, broad refactors, or major post-generation iterations that rewrite renderer, canvas, animation, timeline/keyframes, layers, media, export, or control mapping. | Fresh folders run `pnpm install` once. For the first working product version, run the browser performance checkpoint first and record its current-source receipt, then run `pnpm verify:final`, then start `pnpm dev` to provide the local URL. |
|
|
148
161
|
|
|
149
162
|
Do not rerun `pnpm install` after every edit. Run it after fresh export, dependency changes, lockfile changes, or a missing package error.
|
|
150
163
|
|
|
@@ -154,22 +167,23 @@ Run a full performance checkpoint only when the first working version of an app
|
|
|
154
167
|
|
|
155
168
|
Feature loops after the first working version do not run the full performance suite by default. Renderer, canvas, animation, export, timeline, layers, `canvas.renderScale`, bug fixes, and performance-sensitive controls still need targeted functional/browser checks first, plus targeted performance scenarios only when they directly exercise the touched workload/viewport/export path. Record any skipped full performance run and reason in the verification note or worklog.
|
|
156
169
|
|
|
157
|
-
The first working product app version is not complete until `pnpm verify:
|
|
170
|
+
The first working product app version is not complete until `pnpm verify:perf` has produced a current-source structured receipt and `pnpm verify:final` has passed against that receipt. Agent-controlled browser checks remain useful for targeted diagnosis and visual verification, but terminal prose cannot mint the machine receipt. Worklog prose is context, not execution proof. After the first working version, a skipped full performance run is valid only through `pnpm verify:perf:record-exemption -- --tier=<0|1|2>`, backed by a prior passed receipt, for a post-first-working non-performance edit.
|
|
158
171
|
|
|
159
172
|
## Required Checks
|
|
160
173
|
|
|
161
174
|
For final delivery, run:
|
|
162
175
|
|
|
163
176
|
```bash
|
|
177
|
+
node scripts/check-toolcraft-integrity.mjs
|
|
164
178
|
pnpm verify:final
|
|
165
179
|
pnpm dev
|
|
166
180
|
```
|
|
167
181
|
|
|
168
|
-
For the first working product delivery, run
|
|
182
|
+
For the first working product delivery, run `pnpm verify:perf` before `pnpm verify:final`; its protected Playwright runner records the machine-verifiable receipt. Use the agent-controlled browser for targeted diagnosis and visual checks without treating it as a replacement receipt. The final gate rejects missing or stale receipts.
|
|
169
183
|
|
|
170
184
|
Use `pnpm install` before this final gate when the folder is fresh or dependencies changed.
|
|
171
185
|
|
|
172
|
-
`pnpm test` must include `node scripts/check-toolcraft-docs.mjs`, `node scripts/check-toolcraft-integrity.mjs`, and app tests. `pnpm verify:ui` / `pnpm test:browser` must run against the real app UI and product output but must not run any Playwright test whose name contains `browser perf:`. `pnpm verify:perf` / `pnpm test:browser:perf`
|
|
186
|
+
Run `node scripts/check-toolcraft-integrity.mjs` directly before the final gate; do not rely only on a package script to invoke it. `pnpm test` must also include `node scripts/check-toolcraft-docs.mjs`, `node scripts/check-toolcraft-integrity.mjs`, and app tests. `pnpm verify:ui` / `pnpm test:browser` must run against the real app UI and product output but must not run any Playwright test whose name contains `browser perf:`. `pnpm verify:perf` / `pnpm test:browser:perf` is the protected Playwright checkpoint for the two full-performance triggers; it must build and serve the current production bundle, then run the performance audit plus browser budget suite sequentially so budgets exclude dev-server transformation and unrelated parallel e2e noise.
|
|
173
187
|
|
|
174
188
|
Do not stop or kill existing local servers to free a port during a first start. `pnpm dev`, `pnpm preview`, and browser verification prefer port `3002`, but automatically move to the next free port only while assigning this app's first saved port. After a saved port exists, normal `pnpm dev` / `pnpm preview` uses that same port; if that port is already serving this app, report that existing URL instead of starting a duplicate. Use `TOOLCRAFT_PORT`, `TOOLCRAFT_DEV_PORT`, or `TOOLCRAFT_TEST_PORT` only to change the preferred starting port before a saved port exists. A dev/preview launch is successful only after the selected port serves this app's Toolcraft server identity endpoint plus the `toolcraft-app-title` marker from `index.html`; never report a URL just because some server is listening there. When deliberately restarting this app server, use `pnpm dev:restart` or `pnpm preview:restart`; restart mode reuses the previously saved app port, stops the listener on that exact port if it is still running, force-stops it if it does not release the port, starts on the same port again, and verifies the identity before saving/reporting the port.
|
|
175
189
|
|
|
@@ -193,4 +207,5 @@ The app is complete only when:
|
|
|
193
207
|
- performance checks cover workload and responsiveness for all relevant controls;
|
|
194
208
|
- detail-heavy or animated custom renderers pass real viewport drag and zoom stress checks;
|
|
195
209
|
- workload browser perf tests use the declared `stressFixture` value from `app-performance.ts`, and apply `workloadFixture` first whenever the scenario declares an independent heavy app baseline;
|
|
210
|
+
- bounded numeric workload ranges and hard limits are derived from schema; scenario values cannot redefine them, custom metrics cannot bypass them, many-item fixtures apply at least 10 real items, and degraded ceilings prove every exact 10 percent step with matching scenario/target identity;
|
|
196
211
|
- browser tests verify upload/clear, controls, canvas sizing, toolbar, timeline/layers when enabled, sticky actions, output dimensions, and viewport stability.
|
|
@@ -1,98 +1,21 @@
|
|
|
1
|
-
#
|
|
1
|
+
# MIT License
|
|
2
2
|
|
|
3
3
|
Copyright (c) 2026 Pixel Point
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
## 2. Generated Applications
|
|
24
|
-
|
|
25
|
-
A generated application may be modified, deployed, and used by the designer or
|
|
26
|
-
the designer's client as a custom client deliverable.
|
|
27
|
-
|
|
28
|
-
You may not sell, sublicense, redistribute, publish, or offer generated
|
|
29
|
-
applications as standalone products, stock templates, starter kits, theme packs,
|
|
30
|
-
marketplace items, or reusable application templates.
|
|
31
|
-
|
|
32
|
-
## 3. AI-Assisted Development
|
|
33
|
-
|
|
34
|
-
You may use AI coding assistants, AI agents, design assistants, large language
|
|
35
|
-
models, editors, IDE assistants, and similar tools to create, inspect, modify,
|
|
36
|
-
refactor, test, document, deploy, or maintain generated applications for any use
|
|
37
|
-
permitted by this license.
|
|
38
|
-
|
|
39
|
-
This includes tools such as Codex, Claude, ChatGPT, Cursor, and similar
|
|
40
|
-
assistants. Using those tools to work on Toolcraft projects or generated
|
|
41
|
-
applications does not, by itself, make your use a prohibited AI software, AI app
|
|
42
|
-
builder, AI design tool, code generation platform, or competing generator tool.
|
|
43
|
-
|
|
44
|
-
This section does not allow you to package, embed, host, or provide Toolcraft or
|
|
45
|
-
generated applications as part of a paid AI software product, AI app builder, AI
|
|
46
|
-
design tool, code generation platform, or competing generator service.
|
|
47
|
-
|
|
48
|
-
## 4. Prohibited Uses
|
|
49
|
-
|
|
50
|
-
You may not use Toolcraft, generated applications, or any Toolcraft runtime,
|
|
51
|
-
starter, UI, or template code as part of:
|
|
52
|
-
|
|
53
|
-
- paid AI software;
|
|
54
|
-
- AI app builders;
|
|
55
|
-
- AI design tools;
|
|
56
|
-
- website builders;
|
|
57
|
-
- app builders;
|
|
58
|
-
- design-to-code SaaS products;
|
|
59
|
-
- code generation platforms;
|
|
60
|
-
- template marketplaces;
|
|
61
|
-
- competing generator tools;
|
|
62
|
-
- any product or service whose primary purpose is to let third parties generate,
|
|
63
|
-
resell, or reuse applications based on Toolcraft.
|
|
64
|
-
|
|
65
|
-
These uses require a separate commercial license from Pixel Point.
|
|
66
|
-
|
|
67
|
-
## 5. No Hosted Generator or Resale Rights
|
|
68
|
-
|
|
69
|
-
You may not provide Toolcraft or substantially similar functionality to third
|
|
70
|
-
parties as a hosted service, API, plugin, marketplace product, or downloadable
|
|
71
|
-
generator without a separate commercial license.
|
|
72
|
-
|
|
73
|
-
## 6. No Trademark Rights
|
|
74
|
-
|
|
75
|
-
This license does not grant rights to use the Pixel Point or Toolcraft names,
|
|
76
|
-
logos, branding, or trademarks except to identify Toolcraft as the tool used to
|
|
77
|
-
create a project.
|
|
78
|
-
|
|
79
|
-
## 7. Ownership
|
|
80
|
-
|
|
81
|
-
You own the original design, content, configuration, and product-specific code
|
|
82
|
-
that you create.
|
|
83
|
-
|
|
84
|
-
Pixel Point retains ownership of Toolcraft, including the CLI, starter template,
|
|
85
|
-
runtime, UI components, documentation, and copied Toolcraft source code included
|
|
86
|
-
in generated applications.
|
|
87
|
-
|
|
88
|
-
## 8. Commercial Licensing
|
|
89
|
-
|
|
90
|
-
If your intended use is not allowed by this license, you must obtain a separate
|
|
91
|
-
commercial license before using Toolcraft for that purpose.
|
|
92
|
-
|
|
93
|
-
Contact: licensing@pixel-point.com
|
|
94
|
-
|
|
95
|
-
## 9. No Warranty
|
|
96
|
-
|
|
97
|
-
Toolcraft is provided "as is", without warranty of any kind. Pixel Point is not
|
|
98
|
-
liable for damages arising from use of Toolcraft or generated applications.
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
This application was generated with Toolcraft and includes Toolcraft runtime,
|
|
4
4
|
starter, UI component, documentation, and template source code.
|
|
5
5
|
|
|
6
|
-
Use of that Toolcraft code is governed by `LICENSE.md`.
|
|
7
|
-
content, configuration, and application code that you
|
|
8
|
-
|
|
6
|
+
Use of that Toolcraft code is governed by the MIT License in `LICENSE.md`.
|
|
7
|
+
Product-specific design, content, configuration, and application code that you
|
|
8
|
+
create remain yours.
|
|
@@ -8,7 +8,7 @@ The starter app itself is intentionally neutral. It should show the Toolcraft ca
|
|
|
8
8
|
|
|
9
9
|
## Core modules
|
|
10
10
|
|
|
11
|
-
`workflow.md` routes agents to these focused modules. Read
|
|
11
|
+
`workflow.md` routes agents to these focused modules by Plan, Implementation, and Verification phase. Read each selected route sequentially within the current phase, skip repeated modules already read in that phase, and never rely on truncated terminal output.
|
|
12
12
|
|
|
13
13
|
- `core/runtime-boundary.md` — Toolcraft shell, allowed extension points, canvas boundary, and generated-app source boundary.
|
|
14
14
|
- `core/setup-export.md` — required Setup, canvas sizing, render scale, Timeline switch, Background, Image Export, Video Export, and sticky export actions.
|
|
@@ -42,19 +42,19 @@ Every implementation pass must choose a verification tier before editing. Use th
|
|
|
42
42
|
| Tier 1 | One control or panel visual state | targeted test + focused browser check |
|
|
43
43
|
| Tier 2 | Schema, defaults, persistence, actions, product mapping | `pnpm verify:quick` + relevant browser acceptance |
|
|
44
44
|
| Tier 3 | Renderer, canvas, timeline, layers, upload, export, zoom, heavy controls, or a touched performance-sensitive path | `pnpm verify:quick` + targeted browser checks, plus targeted perf scenarios only for the touched path |
|
|
45
|
-
| Tier 4 | Final delivery, fresh export, runtime/template/contract changes, broad renderer/product rewrites | `pnpm verify:final`; for the first working product version
|
|
45
|
+
| Tier 4 | Final delivery, fresh export, runtime/template/contract changes, broad renderer/product rewrites | `pnpm verify:final`; for the first working product version run protected `pnpm verify:perf` first |
|
|
46
46
|
|
|
47
|
-
Run the full performance checkpoint only when the first working app version exists, or when the user explicitly asks to optimize performance, fix lag, remove jank, speed up animation, stabilize drag/zoom, or otherwise complains about performance.
|
|
47
|
+
Run the full performance checkpoint only when the first working app version exists, or when the user explicitly asks to optimize performance, fix lag, remove jank, speed up animation, stabilize drag/zoom, or otherwise complains about performance. Use the current AI agent's controlled browser for targeted diagnosis and visual checks. Only the protected `pnpm verify:perf` Playwright checkpoint records the passed receipt required by final delivery.
|
|
48
48
|
|
|
49
49
|
Performance fixtures use `loadProfile` for reasoned workload ceilings: test the product hard limit first, and only lower the guaranteed `smoothTarget` in 10 percent steps with failed-measurement and optimization evidence. Ranges above the smooth target must be treated as experimental, not silently guaranteed.
|
|
50
50
|
|
|
51
|
-
The first working product app version is not complete until `pnpm verify:
|
|
51
|
+
The first working product app version is not complete until `pnpm verify:perf` has recorded the protected Playwright checkpoint and `pnpm verify:final` has passed against that receipt. Agent-controlled browser checks can supplement diagnosis but cannot replace the receipt. Do not report final delivery when required checks are failed, incomplete, pending, blocked, or listed as skipped. After the first working version, a skipped full performance run is valid only when the worklog explicitly says the full performance checkpoint is not required for a post-first-working non-performance edit.
|
|
52
52
|
|
|
53
53
|
Fresh folders or dependency changes need `pnpm install` before verification. Final delivery still starts the local app after the gate:
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
|
+
pnpm verify:perf # required first-working performance checkpoint
|
|
56
57
|
pnpm verify:final
|
|
57
|
-
pnpm verify:perf # Playwright fallback when no agent browser is available or in CI/non-agent automation
|
|
58
58
|
pnpm dev
|
|
59
59
|
```
|
|
60
60
|
|
|
@@ -6,8 +6,8 @@ Every visible product entity must prove it works. A control is not accepted beca
|
|
|
6
6
|
|
|
7
7
|
## Required Files
|
|
8
8
|
|
|
9
|
-
- `src/app/app-acceptance.ts`
|
|
10
|
-
- `src/app
|
|
9
|
+
- `src/app/app-acceptance-data.ts`
|
|
10
|
+
- app-specific tests under `src/app` outside the reserved `app-acceptance.*` framework namespace
|
|
11
11
|
- `src/app/app-performance.ts`
|
|
12
12
|
- `src/app/app-performance.test.ts`
|
|
13
13
|
- `docs/toolcraft/agent-worklog.md`
|
|
@@ -16,7 +16,7 @@ Every visible product entity must prove it works. A control is not accepted beca
|
|
|
16
16
|
- `e2e/app-performance.spec.ts`
|
|
17
17
|
- `e2e/product-observable-helpers.ts`
|
|
18
18
|
|
|
19
|
-
`pnpm verify:final` must pass before final delivery. Incremental edits use the verification tier classifier from `assembly-workflow.md`: run targeted browser acceptance for the changed entity, and add a full browser performance checkpoint for the first working product version or an explicit performance complaint.
|
|
19
|
+
`pnpm verify:final` must pass before final delivery. Incremental edits use the verification tier classifier from `assembly-workflow.md`: run targeted browser acceptance for the changed entity, and add a full browser performance checkpoint for the first working product version or an explicit performance complaint. Run `pnpm verify:perf` before the final gate; its protected Playwright runner records the current-source machine receipt automatically. Agent-controlled browser checks remain useful for targeted diagnosis but cannot replace that receipt. `verify:final` rejects a missing or stale current-source receipt.
|
|
20
20
|
|
|
21
21
|
A full performance checkpoint is triggered only by the first working app version, or by a user request to optimize performance, fix lag, remove jank, speed up animation, stabilize drag/zoom, or otherwise investigate poor performance.
|
|
22
22
|
|
|
@@ -34,7 +34,7 @@ Product readiness also requires product surface: controls, layers, timeline, `ca
|
|
|
34
34
|
|
|
35
35
|
Product apps must update `docs/toolcraft/agent-worklog.md` before final delivery. The file records why the app chose its renderer, timeline mode, layer policy, control grouping, export behavior, and performance strategy.
|
|
36
36
|
|
|
37
|
-
The worklog must declare `Mode: product`. Every `Decision Trail` iteration must include `Request:`, `Task type:`, `User-visible result:`, `Source/reference checked:`, `Reference inputs:`, `Docs/contracts read:`, `Contract rules applied:`, `Decision:`, `Alternatives rejected:`, `State/output mapping:`, `Files changed:`, `Verification:`, `Skipped checks:`, and `Risks:`. `Reference inputs:` is the explicit inventory of prompt/reference assets for that pass: write `None` only when there were no external references, otherwise list the source apps, URLs, screenshots, videos, GIFs, screen recordings, contact sheets, extracted-frame folders, or media files used. `State/output mapping:` names how controls, commands, timeline, layers, media, or renderer state reaches the visible product or export. Each decision section (`Renderer`, `Timeline`, `Layers`, `Controls`, `Export`, `Performance`) must include `Decision:`, `Reason:`, and `Evidence:` entries. `Evidence` should name files, reference behavior, contract rules, browser checks, performance checks, or exact commands. `Performance` evidence must name the hard limit, smooth target, smooth target ratio, failed higher measurements, and attempted optimizations whenever a load profile lowers the smooth target below the hard limit. `Verification` must list concrete checks such as `pnpm verify:quick`, browser
|
|
37
|
+
The worklog must declare `Mode: product`. Every `Decision Trail` iteration must include `Request:`, `Task type:`, `User-visible result:`, `Source/reference checked:`, `Reference inputs:`, `Docs/contracts read:`, `Contract rules applied:`, `Decision:`, `Alternatives rejected:`, `State/output mapping:`, `Files changed:`, `Verification:`, `Skipped checks:`, and `Risks:`. `Reference inputs:` is the explicit inventory of prompt/reference assets for that pass: write `None` only when there were no external references, otherwise list the source apps, URLs, screenshots, videos, GIFs, screen recordings, contact sheets, extracted-frame folders, or media files used. `State/output mapping:` names how controls, commands, timeline, layers, media, or renderer state reaches the visible product or export. Each decision section (`Renderer`, `Timeline`, `Layers`, `Controls`, `Export`, `Performance`) must include `Decision:`, `Reason:`, and `Evidence:` entries. `Evidence` should name files, reference behavior, contract rules, browser checks, performance checks, or exact commands. `Performance` evidence must name the hard limit, smooth target, smooth target ratio, failed higher measurements, and attempted optimizations whenever a load profile lowers the smooth target below the hard limit. `Verification` must list concrete checks such as `pnpm verify:quick`, targeted agent-browser diagnosis, browser tests, and the automated `pnpm verify:perf` checkpoint. First working product delivery must record `pnpm verify:final` and `pnpm verify:perf` as passed. Failed, incomplete, pending, blocked, or skipped required checks make the app incomplete unless the full performance checkpoint is explicitly not required for a post-first-working non-performance edit. `Risks` must include either `Risk:` entries or `None:` with a reason.
|
|
38
38
|
|
|
39
39
|
The acceptance gate fails if the worklog is missing, still says `Mode: starter`, or lacks concrete decision evidence.
|
|
40
40
|
|
|
@@ -58,8 +58,21 @@ Each row should name:
|
|
|
58
58
|
- `canvasSizingCoverage: "fixed-output-size"` only for non-product/internal `fixed-output` fixtures.
|
|
59
59
|
- `canvasSizingCoverage: "intrinsic-media-size"` only for explicit media-viewer/source-native upload apps where imported media natural dimensions intentionally own `canvas.size`.
|
|
60
60
|
- `persistenceCoverage: "reload"` when schema `persistence.storage` is `"localStorage"`.
|
|
61
|
+
- `timelineLoopProof` on playback rows whose `timelinePlaybackCoverage` includes `"loop"`. It declares `direction: "forward-only"`, `reversePlayback: "forbidden"`, `seam: "first-last-match"`, and `durationChange: "reproved-after-edit"`; browser evidence still proves the real sampled frames.
|
|
61
62
|
|
|
62
|
-
The test gate rejects rows
|
|
63
|
+
The test gate rejects rows unless the real Vitest and Playwright runners select exactly one product-owned test with the declared name and that test finishes passed. A matching name in a comment, string, local fake runner, focused/skipped test, conditional branch, or uncalled registration function is not execution evidence.
|
|
64
|
+
|
|
65
|
+
The protected Vitest marker publishes the current automated requirements to the signed runner reporter, which evaluates actual selected test results instead of parsing test source. The signed full-test command fails when that marker is missing, duplicated, failed, invalid, or not framework-owned. User-visible browser behavior is proved at runtime: protected Playwright helpers attach versioned evidence after their assertion succeeds, and the signed reporter derives every required evidence id from `app-acceptance-data.ts`. A skipped/failed test, duplicate product test titles, a passed browser test without matching evidence, evidence from a failed retry, or a direct forged attachment fails its runner.
|
|
66
|
+
|
|
67
|
+
`src/app/app-acceptance.ts`, `src/app/acceptance`, supplied `app-acceptance.*` meta-tests, and the generic browser acceptance harness are framework-owned and covered by the signed integrity manifest. Edit only `app-acceptance-data.ts` for product rows/readiness/inventory/transfer intent. Add product-specific automated tests in separate app-owned files and add browser scenarios to `e2e/app-controls.spec.ts` or new app-owned specs.
|
|
68
|
+
|
|
69
|
+
The `e2e/app-browser-*` filename prefix is reserved for signed framework specs. Product browser tests use `app-controls.spec.ts` or a product-specific filename that does not start with `app-browser-`.
|
|
70
|
+
|
|
71
|
+
The local contract docs under `docs/toolcraft` are also signed framework-owned input to this workflow. Do not rewrite them inside a generated app. `docs/toolcraft/agent-worklog.md` remains product-owned so each implementation pass can record current decisions and evidence.
|
|
72
|
+
|
|
73
|
+
Framework meta-tests are product-invariant: their synthetic validator cases use protected neutral contract fixtures, never the editable app schema, product acceptance rows, transfer intent, or section inventory. Put exact product targets, defaults, option values, and product-specific expectations in separate app-owned tests. The product gates still read `app-schema.ts`, `app-acceptance-data.ts`, product test names, worklog evidence, and browser scenarios dynamically.
|
|
74
|
+
|
|
75
|
+
The same ownership split applies to performance: edit `app-performance.ts`, but do not edit supplied `app-performance.*` meta-tests or `app-performance-test-utils.ts`. They are framework-owned and validate the editable product matrix.
|
|
63
76
|
|
|
64
77
|
Slider and range slider rows must prove live behavior. Browser tests should drag the real thumb and assert the runtime value and product-level canvas observable update during the drag, not only after pointer release, blur, an Apply action, or a final commit. Performance-sensitive sliders still need this live acceptance; jank is handled through renderer optimization and targeted performance coverage, not by making the slider deferred by default.
|
|
65
78
|
|
|
@@ -124,6 +137,13 @@ Rows that use custom controls must include `customControlCoverage` and typed `bu
|
|
|
124
137
|
|
|
125
138
|
```ts
|
|
126
139
|
builtInFitCheck: {
|
|
140
|
+
capabilities: [
|
|
141
|
+
"collection",
|
|
142
|
+
"reorder",
|
|
143
|
+
"selection",
|
|
144
|
+
"commands",
|
|
145
|
+
"custom-value-model",
|
|
146
|
+
],
|
|
127
147
|
checkedBuiltIns: ["fileDrop", "collectionActions", "imagePicker"],
|
|
128
148
|
closestBuiltIn: "fileDrop",
|
|
129
149
|
whyInsufficient:
|
|
@@ -133,7 +153,7 @@ builtInFitCheck: {
|
|
|
133
153
|
}
|
|
134
154
|
```
|
|
135
155
|
|
|
136
|
-
The fit check names real checked built-ins, the closest built-in or `"none"`, why it is insufficient, and the product-observable evidence that proves the custom control works.
|
|
156
|
+
The fit check declares broad typed capabilities, names real checked built-ins, the closest built-in or `"none"`, why it is insufficient, and the product-observable evidence that proves the custom control works. At least one of `custom-interaction`, `custom-value-model`, or `custom-visualization` is required; collection/command chrome alone does not justify custom UI.
|
|
137
157
|
|
|
138
158
|
For collection-like custom controls, the fit check must include `collectionActions` and `actions`. Collection-like is decided from the runtime value model and workflow: arrays, `{ items: [...] }` objects, selected-item state, grow/shrink item sets, ordering, add, remove, delete, or reorder behavior. Acceptance should fail if the row compares only unrelated built-ins such as `vector` or `select` while the actual value model is a collection.
|
|
139
159
|
|
|
@@ -169,6 +189,8 @@ Local `actions` acceptance must click every visible action and prove the nearby
|
|
|
169
189
|
|
|
170
190
|
PNG export tests must prove runtime background behavior: changing the background color affects preview/export, turning `export.includeBackground` off hides the live preview product background and creates transparent PNG output, video export still keeps the background, turning Include on includes the current background color in PNG, and exported pixel dimensions are retina size, at least `state.canvas.size * 2`.
|
|
171
191
|
|
|
192
|
+
Hard acceptance semantics are typed, not inferred from English prose. Every `visibleWhen` acceptance row declares `visibilityCoverage` for both `hidden` and `visible`; the protected conditional-visibility recipe must remove the dependent target from the rendered panel and restore it through the same target-scoped gating control. The `export.includeBackground` row declares `backgroundOutputCoverage` for preview exclusion and transparent image alpha, plus preserved video background when the schema exposes video export. Its protected recipe verifies the preview transition, decodes a non-empty image artifact and checks background alpha, and inspects video background behavior when applicable. `expectedObservable` and `userAction` remain human-readable context and may use any language; matching words such as “hidden”, “PNG”, or “video” never satisfy these requirements by themselves.
|
|
193
|
+
|
|
172
194
|
Invalid final acceptance evidence:
|
|
173
195
|
|
|
174
196
|
- control exists;
|
|
@@ -193,7 +215,13 @@ Every browser test should prove:
|
|
|
193
215
|
- product output or command side effect changes;
|
|
194
216
|
- canvas zoom, offset, and output dimensions do not jump unexpectedly.
|
|
195
217
|
|
|
196
|
-
Acceptance rows with `product-output`, `rendered-pixels`, or `timeline-output` evidence
|
|
218
|
+
Acceptance rows with `product-output`, `rendered-pixels`, or `timeline-output` evidence use protected `expectToolcraftProductObservableToChange` with the row `id` as `requirementId`. The generic `expectToolcraftAcceptanceOutcome` is intentionally limited to `command-side-effect`; it cannot emit media, persistence, viewport, layer, timeline, or compound-control evidence. Use `expectToolcraftMediaLifecycle`, `expectToolcraftPersistenceState`, and `expectToolcraftViewportSideEffect` for those state semantics. These recipes require an exact expected outcome after the real action and a bounded stability window; persistence additionally requires a real reload, media requires changed item ids plus product-output semantics, and viewport requires changed offset/zoom while output dimensions stay stable. Generic changed-output proof first samples a stable pre-action baseline. If the product output is autonomous or animated, pause/fix its phase or observe a stable expected semantic result; the next unrelated animation frame is not action evidence. A transient or merely different value is not proof. `getToolcraftProductObservableSnapshot` may establish a baseline, but a snapshot read alone is not mutation evidence. Product tests must not import the internal attachment recorder or reserved evidence contract directly or through product-owned bridges.
|
|
219
|
+
|
|
220
|
+
Specialized state, layer, compound, and timeline recipes begin with `createToolcraftBrowserProofSession(page)`. Create observations with `session.observe(...)`, where the reader executes inside the current visible Toolcraft runtime root, and actions with `session.action(...)`; persistence uses `session.reload()` for the reload step. Raw callbacks, forged objects, stale pages, and observations/actions from different sessions are rejected before evidence is attached. This binds semantic evidence to the current app identity and browser DOM instead of allowing an in-memory object to impersonate product behavior.
|
|
221
|
+
|
|
222
|
+
Exported-byte rows use `expectToolcraftExportedArtifact`. The action produces a non-empty artifact and the verifier returns a typed inspection with positive integer `byteLength`; decoded `width`, `height`, and `frameCount` are positive integers, `durationMs` is positive and finite, and `mediaType`/`contentHash` are non-empty strings when present. Missing/empty artifacts, void callbacks, `{ ok: true }`, fractional or zero-byte observations, and fractional decoded dimensions cannot emit evidence. Clean-export checks for canvas handles compare decoded product semantics through `contentHash` plus media metadata, not raw encoded bytes or file size, because two valid encoders may produce different bytes for the same output.
|
|
223
|
+
|
|
224
|
+
Specialized metadata adds evidence for the same row: canvas handles prove drag and a separate clean-export test compares real exported artifacts with handles visible and hidden; segmented/discrete controls use their protected layout helpers; every declared compound-control part uses `expectToolcraftCompoundControlPartOutcome` and gets its own `row-id#part` evidence; layers use the fixed `expectToolcraftLayer*` recipes for selection, visibility, reorder, grouping, selected-layer controls, and media lifecycle; and reference parity uses `expectToolcraftReferenceParity` to compare the inspected result with the reference baseline. Playback uses the fixed `expectToolcraftTimeline*` recipes. Duration binds runtime duration and renderer cycle to the same expected value; scrub binds time to rendered output; pause/resume proves a stable paused window and resumed time/output; keyframes bind keyframe data, evaluated value, and output. Loop evidence requires normalized forward samples with exactly one end-to-start wrap, equal seam signatures, and the same proof again after changing duration. The reporter derives these requirements from acceptance plus schema; naming a helper in source or passing a desired evidence type to a generic helper is never proof.
|
|
197
225
|
|
|
198
226
|
Animated viewport tests must also prove that canvas drag, pan, pinch, zoom, and radar/center interactions suspend or coalesce non-essential animation preview work without changing the user's play/pause state. After the interaction, the renderer must resume from the correct timeline or autonomous time and keep canvas zoom/offset stable.
|
|
199
227
|
|
|
@@ -245,7 +273,7 @@ Component variants are acceptance requirements.
|
|
|
245
273
|
- Select, segmented, and image-picker controls should cover every visible option unless options come from separately tested runtime data.
|
|
246
274
|
- Custom controls must declare `customControlCoverage` and `builtInFitCheck`. Coverage proves the custom control is not a built-in replacement, uses kit chrome, keeps only necessary UI, writes through runtime state, and changes product output; the fit check proves which built-ins were considered and why the custom interaction is necessary.
|
|
247
275
|
|
|
248
|
-
Performance browser tests
|
|
276
|
+
Performance browser tests pass `scenarioId` to protected measurement/interaction helpers and await `expectToolcraftScenarioPerformanceBudget(..., appPerformance, scenarioId)`. Every mutating measurement supplies `observeOutcome`; generic change evidence first proves a stable baseline and then requires the product outcome to remain different through the stability window. Autonomous products use `expectedOutcome` with a stable semantic observation or measure at a deterministic fixed phase. Latency ends at that expected result, never at an incidental animation frame. Scalar fixtures provide both `applyValue` and `observeValue`; object fixtures provide both functions for every exact fixture key, and the observed value must equal the declared fixture before measurement. Measurement results are immutable and branded to one scenario, so another scenario or a mutable literal cannot satisfy the gate. The reporter requires matching measurement, budget, fixture, interaction/completion, and product-outcome evidence for each typed scenario. Do not hardcode budget numbers, toy values, or toy baseline app states; `app-performance.ts` is the single source of truth.
|
|
249
277
|
|
|
250
278
|
## Fixtures
|
|
251
279
|
|
|
@@ -13,24 +13,21 @@ Use:
|
|
|
13
13
|
|
|
14
14
|
## Runtime Path
|
|
15
15
|
|
|
16
|
-
Declare the product with `defineToolcraft
|
|
16
|
+
Declare the product with `defineToolcraft` and export its typed composition. The protected route renders `ToolcraftApp` and owns host-only props.
|
|
17
17
|
|
|
18
18
|
```tsx
|
|
19
|
-
import {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
export function AppHome() {
|
|
29
|
-
return <ToolcraftApp schema={appSchema} />;
|
|
30
|
-
}
|
|
19
|
+
import type { ToolcraftAppComposition } from "@/toolcraft/runtime/react";
|
|
20
|
+
|
|
21
|
+
import { appSchema } from "./app-schema";
|
|
22
|
+
|
|
23
|
+
export const appComposition = {
|
|
24
|
+
schema: appSchema,
|
|
25
|
+
} satisfies ToolcraftAppComposition;
|
|
31
26
|
```
|
|
32
27
|
|
|
33
|
-
|
|
28
|
+
Edit `src/app/app-composition.tsx`, not the signed route. Product composition may provide only `schema`, `canvasContent`, `controlRenderers`, `onPanelAction`, and `renderDefaultCanvasMedia`; the protected route owns `className` and other host layout. Do not compose `ToolcraftRoot`, `CanvasShell`, `ControlsPanel`, `LayersPanel`, `TimelinePanel`, or `ToolbarPanel` by hand. If a runtime surface has a performance or behavior issue, fix the shared runtime instead of replacing the surface locally.
|
|
29
|
+
|
|
30
|
+
Supporting product modules may be organized anywhere under `src`; there is no folder allowlist. The product boundary follows all product production files and rejects host/runtime surface imports, built-in control imports/re-exports, dynamic bypasses, and production dependencies on test/spec modules.
|
|
34
31
|
|
|
35
32
|
Allowed app extension points:
|
|
36
33
|
|
|
@@ -48,7 +45,7 @@ Do not render built-in controls such as `SliderControl`, `SelectControl`, `Color
|
|
|
48
45
|
|
|
49
46
|
The starter baseline is neutral: canvas/upload/toolbar shell only. Do not include demo controls, prompt fields, timeline, or layers until product behavior requires them.
|
|
50
47
|
|
|
51
|
-
Once the folder is a real product, switch `src/app/app-acceptance.ts` from neutral readiness to:
|
|
48
|
+
Once the folder is a real product, switch `src/app/app-acceptance-data.ts` from neutral readiness to:
|
|
52
49
|
|
|
53
50
|
```ts
|
|
54
51
|
export const appProductReadiness = {
|
|
@@ -14,6 +14,8 @@ Use `core/layout.md` for section dividers and compound-control divider rules. Co
|
|
|
14
14
|
|
|
15
15
|
Slider `step` means numeric snapping only. It does not make a slider visually discrete by itself.
|
|
16
16
|
|
|
17
|
+
Every slider declares `sliderValueKind: "continuous" | "discrete"`. This is product intent, not a visual alias: `variant: "discrete"` is valid only with `sliderValueKind: "discrete"`. Do not make validation depend on an English label or unit.
|
|
18
|
+
|
|
17
19
|
Classify every stepped slider as either `stepped continuous` or `visual discrete` in the spec and schema tests.
|
|
18
20
|
|
|
19
21
|
Use `variant: "discrete"` for semantic integer domains where markers help choose positions: counts, rows, columns, levels, bands, passes, points, tiles, segments, finite position choices, and finite animation-step controls such as flip depth, character count, glyph steps, or frame steps.
|
|
@@ -149,6 +151,8 @@ Use `curves` for editable remapping curves. First decide the curve variant by pr
|
|
|
149
151
|
|
|
150
152
|
Use `variant: "single"` for one standalone curve without channel tabs, such as acceleration, bend, easing, opacity response, depth response, mask response, threshold response, tone response, or another single mapping curve. Do not create a custom curve UI just to remove RGB tabs.
|
|
151
153
|
|
|
154
|
+
Every curve declares `curveIntent: "single-value-map" | "color-channels"`. `single-value-map` requires `variant: "single"`; `color-channels` uses the RGB/R/G/B composition. Labels and target names are explanatory only.
|
|
155
|
+
|
|
152
156
|
RGB Curves is the color-correction or channel-specific case. Use RGB/R/G/B tabs only when the product edits RGB channels, color correction, color grading, or channel curves. Do not force RGB/R/G/B tabs onto products that need only one response, bend, depth, or easing curve.
|
|
153
157
|
|
|
154
158
|
Single Curves is one labeled control and does not use internal dividers. RGB Curves is the compound variant because it contains channel tabs plus curve points, so it follows the compound divider rules when mixed with sibling controls.
|
|
@@ -164,11 +168,11 @@ Acceptance for curves should include an off-center control point near an edge so
|
|
|
164
168
|
|
|
165
169
|
## Text And Code
|
|
166
170
|
|
|
167
|
-
Use `text` for short single-line strings: button labels, canvas labels, names, small values, compact prompts, titles, captions, badges, and tokens.
|
|
171
|
+
Use `text` for short single-line strings: button labels, canvas labels, names, small values, compact prompts, titles, captions, badges, and tokens. Every `text` control declares `textValueKind: "single-line"`.
|
|
168
172
|
|
|
169
173
|
For `text`, separate content from settings. `commitMode` defaults to `"content"`: content strings such as prompts, names, titles, tokens, and short text update while the user types. Use `commitMode: "setting"` for text inputs that edit settings such as font size, numeric-like style values, dimensions, ids, or configuration fields; setting text commits on blur or Enter. Canvas width and Canvas height are runtime-owned editable-size fields and always commit on blur or Enter.
|
|
170
174
|
|
|
171
|
-
Use `code` / `CodeTextarea` as the base multiline content editor for any potentially long value: long prompts, multiline text, instructions, JSON, CSS, shader code, scripts, templates, or other structured text. It applies while typing, is capped at 12 visible lines, and long content scrolls inside the textarea instead of making the controls panel taller. Do not use it for short one-line button/canvas text such as `Glass`, `Submit`, `Title`, or `Badge`; use `text`.
|
|
175
|
+
Use `code` / `CodeTextarea` as the base multiline content editor for any potentially long value: long prompts, multiline text, instructions, JSON, CSS, shader code, scripts, templates, or other structured text. Every `code` control declares `textValueKind: "multiline" | "structured"`. It applies while typing, is capped at 12 visible lines, and long content scrolls inside the textarea instead of making the controls panel taller. Do not use it for short one-line button/canvas text such as `Glass`, `Submit`, `Title`, or `Badge`; use `text`. A short default does not change the typed intent. Do not name a section `Code` unless the product value is actually code.
|
|
172
176
|
|
|
173
177
|
## Labels
|
|
174
178
|
|
|
@@ -8,6 +8,7 @@ Read this module before changing sections, labels, helper icons, inline rows, di
|
|
|
8
8
|
- Before writing controls, export `starterControlSectionInventory`. Each product section declares title, product entity or workflow stage, targets, and grouping reason.
|
|
9
9
|
- Keep sections discrete. Two to seven product controls is the normal size.
|
|
10
10
|
- Split sections that grow past seven controls or mix several meanings.
|
|
11
|
+
- In a section larger than seven controls, every control declares `semanticGroup`. One tightly scoped product sub-entity/workflow shares one group; mixed groups are structural evidence that the section should split. Do not infer this from labels.
|
|
11
12
|
- Do not reuse the same section title for multiple sections.
|
|
12
13
|
- Bad titles: `Controls`, `Settings`, `Options`, `Sliders`, `Inputs`, `Buttons`, `Color`, `Colors`.
|
|
13
14
|
- Good titles name the edited thing: `Background`, `Object`, `Token Pattern`, `Motion`, `Tone Mapping`, `Export`.
|