openplanr 3.2.0 → 3.3.0
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/CHANGELOG.md +21 -0
- package/dist/cli/commands/spec.d.ts +2 -1
- package/dist/cli/commands/spec.d.ts.map +1 -1
- package/dist/cli/commands/spec.js +45 -5
- package/dist/cli/commands/spec.js.map +1 -1
- package/dist/dashboard/.vite/manifest.json +1 -1
- package/dist/dashboard/assets/index-B_96uzCl.js +572 -0
- package/dist/dashboard/assets/index-B_96uzCl.js.map +1 -0
- package/dist/dashboard/dashboard-manifest.json +10 -10
- package/dist/dashboard/index.html +1 -1
- package/dist/services/claude-plugin-service.d.ts +5 -0
- package/dist/services/claude-plugin-service.d.ts.map +1 -1
- package/dist/services/claude-plugin-service.js +18 -2
- package/dist/services/claude-plugin-service.js.map +1 -1
- package/dist/services/codex-plugin-service.d.ts.map +1 -1
- package/dist/services/codex-plugin-service.js +11 -3
- package/dist/services/codex-plugin-service.js.map +1 -1
- package/dist/services/runtime-manager/codex-discovery.d.ts +1 -3
- package/dist/services/runtime-manager/codex-discovery.d.ts.map +1 -1
- package/dist/services/runtime-manager/codex-discovery.js +3 -16
- package/dist/services/runtime-manager/codex-discovery.js.map +1 -1
- package/dist/services/runtime-manager/doctor.d.ts +25 -0
- package/dist/services/runtime-manager/doctor.d.ts.map +1 -1
- package/dist/services/runtime-manager/doctor.js +480 -0
- package/dist/services/runtime-manager/doctor.js.map +1 -1
- package/dist/services/runtime-manager/errors.d.ts +12 -0
- package/dist/services/runtime-manager/errors.d.ts.map +1 -0
- package/dist/services/runtime-manager/errors.js +14 -0
- package/dist/services/runtime-manager/errors.js.map +1 -0
- package/dist/services/runtime-manager/global-state.d.ts +7 -0
- package/dist/services/runtime-manager/global-state.d.ts.map +1 -1
- package/dist/services/runtime-manager/global-state.js +116 -0
- package/dist/services/runtime-manager/global-state.js.map +1 -1
- package/dist/services/runtime-manager/host-version-probe.d.ts +8 -0
- package/dist/services/runtime-manager/host-version-probe.d.ts.map +1 -0
- package/dist/services/runtime-manager/host-version-probe.js +14 -0
- package/dist/services/runtime-manager/host-version-probe.js.map +1 -0
- package/dist/services/runtime-manager/install-plan.d.ts +25 -0
- package/dist/services/runtime-manager/install-plan.d.ts.map +1 -1
- package/dist/services/runtime-manager/install-plan.js +305 -0
- package/dist/services/runtime-manager/install-plan.js.map +1 -1
- package/dist/services/runtime-manager/inventory.d.ts +6 -0
- package/dist/services/runtime-manager/inventory.d.ts.map +1 -1
- package/dist/services/runtime-manager/inventory.js +16 -1
- package/dist/services/runtime-manager/inventory.js.map +1 -1
- package/dist/services/runtime-manager/legacy-adapters.d.ts +9 -0
- package/dist/services/runtime-manager/legacy-adapters.d.ts.map +1 -0
- package/dist/services/runtime-manager/legacy-adapters.js +187 -0
- package/dist/services/runtime-manager/legacy-adapters.js.map +1 -0
- package/dist/services/runtime-manager/paths.d.ts +18 -0
- package/dist/services/runtime-manager/paths.d.ts.map +1 -0
- package/dist/services/runtime-manager/paths.js +83 -0
- package/dist/services/runtime-manager/paths.js.map +1 -0
- package/dist/services/runtime-manager/runtime-package.d.ts +21 -0
- package/dist/services/runtime-manager/runtime-package.d.ts.map +1 -1
- package/dist/services/runtime-manager/runtime-package.js +77 -0
- package/dist/services/runtime-manager/runtime-package.js.map +1 -1
- package/dist/services/runtime-manager/storage.d.ts +47 -0
- package/dist/services/runtime-manager/storage.d.ts.map +1 -0
- package/dist/services/runtime-manager/storage.js +604 -0
- package/dist/services/runtime-manager/storage.js.map +1 -0
- package/dist/services/runtime-manager-service.d.ts +7 -17
- package/dist/services/runtime-manager-service.d.ts.map +1 -1
- package/dist/services/runtime-manager-service.js +32 -1695
- package/dist/services/runtime-manager-service.js.map +1 -1
- package/dist/services/ship-checks/contract.d.ts +13 -1
- package/dist/services/ship-checks/contract.d.ts.map +1 -1
- package/dist/services/ship-checks/contract.js +1 -1
- package/dist/services/ship-checks/contract.js.map +1 -1
- package/dist/services/ship-checks/coverage.d.ts +4 -0
- package/dist/services/ship-checks/coverage.d.ts.map +1 -0
- package/dist/services/ship-checks/coverage.js +113 -0
- package/dist/services/ship-checks/coverage.js.map +1 -0
- package/dist/services/ship-checks/discover.d.ts.map +1 -1
- package/dist/services/ship-checks/discover.js +3 -0
- package/dist/services/ship-checks/discover.js.map +1 -1
- package/dist/services/spec-service.d.ts +18 -0
- package/dist/services/spec-service.d.ts.map +1 -1
- package/dist/services/spec-service.js +174 -9
- package/dist/services/spec-service.js.map +1 -1
- package/dist/templates/spec/spec-shaped.md.hbs +1 -1
- package/dist/templates/spec/spec.md.hbs +2 -2
- package/docs/CLI.md +49 -2
- package/lib/host-packages/adapter-registry.json +5 -5
- package/lib/host-packages/capability-map.json +3 -3
- package/lib/host-packages/claude/.claude-plugin/marketplace.json +2 -2
- package/lib/host-packages/claude/openplanr/.claude-plugin/plugin.json +1 -1
- package/lib/host-packages/claude/openplanr/.openplanr-content.json +50 -46
- package/lib/host-packages/claude/openplanr/README.md +1 -1
- package/lib/host-packages/claude/openplanr/agents/planr-qa.md +5 -3
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-document.mjs +87 -2
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-handoff.mjs +1 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-share.mjs +1 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-shared-artifact-support-dependencies-design-support-protocol-contracts-3d9b1a86.mjs +102 -9
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-shared-protocol-contracts-b5f28f94.mjs +130 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design.mjs +271 -28
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/notices/THIRD_PARTY_NOTICES.txt +32 -32
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/03-protocol-contracts.js +77 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources.json +4 -4
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/package.json +4 -4
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/02-react.js +2 -2
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/09-react-dom-client-public-roots.js +5 -5
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-protocol-contracts.js +72 -2
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/13-design-review-experience.js +14 -7
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-canvas-engine.js +71 -34
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/21-design-studio.js +28 -14
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +12 -12
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +2 -2
- package/lib/host-packages/{cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.20.0 → claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0}/design-document.schema.json +131 -4
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0/design-review-bundle.schema.json +822 -0
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs +78 -1
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/design.mjs +30 -2
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +2 -2
- package/lib/host-packages/claude/openplanr/skills/design/references/design-system.md +17 -2
- package/lib/host-packages/claude/openplanr/skills/design/references/generation.md +60 -2
- package/lib/host-packages/claude/openplanr/skills/design/references/utilities.md +11 -1
- package/lib/host-packages/claude/openplanr/skills/design/schemas/design-document.schema.json +131 -4
- package/lib/host-packages/claude/openplanr/skills/design-loop/references/design-system.md +17 -2
- package/lib/host-packages/claude/openplanr/skills/design-loop/references/generation.md +60 -2
- package/lib/host-packages/claude/openplanr/skills/design-loop/references/utilities.md +11 -1
- package/lib/host-packages/claude/openplanr/skills/design-loop/schemas/design-document.schema.json +131 -4
- package/lib/host-packages/claude/openplanr/skills/design-review/references/design-system.md +17 -2
- package/lib/host-packages/claude/openplanr/skills/design-review/references/generation.md +60 -2
- package/lib/host-packages/claude/openplanr/skills/design-review/references/utilities.md +11 -1
- package/lib/host-packages/claude/openplanr/skills/design-review/schemas/design-document.schema.json +131 -4
- package/lib/host-packages/claude/openplanr/skills/investigate/SKILL.md +1 -1
- package/lib/host-packages/claude/openplanr/skills/plan/SKILL.md +21 -11
- package/lib/host-packages/claude/openplanr/skills/plan/schemas/design-document.schema.json +131 -4
- package/lib/host-packages/claude/openplanr/skills/ship/SKILL.md +31 -10
- package/lib/host-packages/claude/openplanr/skills/spec/SKILL.md +6 -0
- package/lib/host-packages/claude/openplanr/skills/spec/references/specification-contract.md +3 -1
- package/lib/host-packages/cursor/openplanr/.openplanr-content.json +48 -44
- package/lib/host-packages/cursor/openplanr/manifest.json +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/design-system.md +17 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/generation.md +60 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/utilities.md +11 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-design/schemas/design-document.schema.json +131 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/design-system.md +17 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/generation.md +60 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/utilities.md +11 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/schemas/design-document.schema.json +131 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/design-system.md +17 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/generation.md +60 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/utilities.md +11 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/schemas/design-document.schema.json +131 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-investigate.mdc +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-plan/schemas/design-document.schema.json +131 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-plan.mdc +21 -11
- package/lib/host-packages/cursor/openplanr/rules/planr-ship.mdc +31 -10
- package/lib/host-packages/cursor/openplanr/rules/planr-spec/references/specification-contract.md +3 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-spec.mdc +6 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-document.mjs +87 -2
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-handoff.mjs +1 -1
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-share.mjs +1 -1
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-shared-artifact-support-dependencies-design-support-protocol-contracts-3d9b1a86.mjs +102 -9
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-shared-protocol-contracts-b5f28f94.mjs +130 -1
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design.mjs +271 -28
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/notices/THIRD_PARTY_NOTICES.txt +32 -32
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/03-protocol-contracts.js +77 -1
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources.json +4 -4
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/package.json +4 -4
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/02-react.js +2 -2
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/09-react-dom-client-public-roots.js +5 -5
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-protocol-contracts.js +72 -2
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/13-design-review-experience.js +14 -7
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-canvas-engine.js +71 -34
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/21-design-studio.js +28 -14
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +12 -12
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +2 -2
- package/lib/host-packages/{openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.20.0 → cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0}/design-document.schema.json +131 -4
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0/design-review-bundle.schema.json +822 -0
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs +78 -1
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/design.mjs +30 -2
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +2 -2
- package/lib/host-packages/openai/.claude-plugin/marketplace.json +2 -2
- package/lib/host-packages/openai/openplanr/.codex-plugin/plugin.json +1 -1
- package/lib/host-packages/openai/openplanr/.openplanr-content.json +54 -50
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-document.mjs +87 -2
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-handoff.mjs +1 -1
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-share.mjs +1 -1
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-shared-artifact-support-dependencies-design-support-protocol-contracts-3d9b1a86.mjs +102 -9
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-shared-protocol-contracts-b5f28f94.mjs +130 -1
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design.mjs +271 -28
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/notices/THIRD_PARTY_NOTICES.txt +32 -32
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/03-protocol-contracts.js +77 -1
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources.json +4 -4
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/package.json +4 -4
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/02-react.js +2 -2
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/09-react-dom-client-public-roots.js +5 -5
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-protocol-contracts.js +72 -2
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/13-design-review-experience.js +14 -7
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-canvas-engine.js +71 -34
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/21-design-studio.js +28 -14
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +12 -12
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +2 -2
- package/lib/host-packages/{claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.20.0 → openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0}/design-document.schema.json +131 -4
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0/design-review-bundle.schema.json +822 -0
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs +78 -1
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/design.mjs +30 -2
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +2 -2
- package/lib/host-packages/openai/openplanr/skills/design/references/design-system.md +17 -2
- package/lib/host-packages/openai/openplanr/skills/design/references/generation.md +60 -2
- package/lib/host-packages/openai/openplanr/skills/design/references/utilities.md +11 -1
- package/lib/host-packages/openai/openplanr/skills/design/schemas/design-document.schema.json +131 -4
- package/lib/host-packages/openai/openplanr/skills/design-loop/references/design-system.md +17 -2
- package/lib/host-packages/openai/openplanr/skills/design-loop/references/generation.md +60 -2
- package/lib/host-packages/openai/openplanr/skills/design-loop/references/utilities.md +11 -1
- package/lib/host-packages/openai/openplanr/skills/design-loop/schemas/design-document.schema.json +131 -4
- package/lib/host-packages/openai/openplanr/skills/design-review/references/design-system.md +17 -2
- package/lib/host-packages/openai/openplanr/skills/design-review/references/generation.md +60 -2
- package/lib/host-packages/openai/openplanr/skills/design-review/references/utilities.md +11 -1
- package/lib/host-packages/openai/openplanr/skills/design-review/schemas/design-document.schema.json +131 -4
- package/lib/host-packages/openai/openplanr/skills/investigate/SKILL.md +1 -1
- package/lib/host-packages/openai/openplanr/skills/investigate/agents/openai.yaml +1 -1
- package/lib/host-packages/openai/openplanr/skills/investigate/openplanr.skill.json +1 -1
- package/lib/host-packages/openai/openplanr/skills/plan/SKILL.md +21 -11
- package/lib/host-packages/openai/openplanr/skills/plan/openplanr.skill.json +1 -1
- package/lib/host-packages/openai/openplanr/skills/plan/schemas/design-document.schema.json +131 -4
- package/lib/host-packages/openai/openplanr/skills/ship/SKILL.md +31 -10
- package/lib/host-packages/openai/openplanr/skills/ship/agents/openai.yaml +1 -1
- package/lib/host-packages/openai/openplanr/skills/ship/openplanr.skill.json +1 -1
- package/lib/host-packages/openai/openplanr/skills/spec/SKILL.md +6 -0
- package/lib/host-packages/openai/openplanr/skills/spec/openplanr.skill.json +1 -1
- package/lib/host-packages/openai/openplanr/skills/spec/references/specification-contract.md +3 -1
- package/lib/json-schema.mjs +4 -0
- package/package.json +12 -12
- package/dist/dashboard/assets/index-L8qtwqv6.js +0 -572
- package/dist/dashboard/assets/index-L8qtwqv6.js.map +0 -1
- /package/lib/host-packages/claude/openplanr/runtime/design/scripts/{design-runtime-support-6774fd3d5d02.mjs → design-runtime-support-25485dbf1cb2.mjs} +0 -0
- /package/lib/host-packages/cursor/openplanr/runtime/design/scripts/{design-runtime-support-6774fd3d5d02.mjs → design-runtime-support-25485dbf1cb2.mjs} +0 -0
- /package/lib/host-packages/openai/openplanr/runtime/design/scripts/{design-runtime-support-6774fd3d5d02.mjs → design-runtime-support-25485dbf1cb2.mjs} +0 -0
package/lib/host-packages/claude/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs
CHANGED
|
@@ -156,6 +156,7 @@ var VALIDATION_KEYWORDS = [
|
|
|
156
156
|
"maxContains",
|
|
157
157
|
"required",
|
|
158
158
|
"properties",
|
|
159
|
+
"propertyNames",
|
|
159
160
|
"additionalProperties",
|
|
160
161
|
"maxProperties",
|
|
161
162
|
"dependentRequired",
|
|
@@ -224,6 +225,7 @@ var KEYWORD_SHAPES = {
|
|
|
224
225
|
maxContains: ["a non-negative integer", isCount],
|
|
225
226
|
required: ["an array of unique strings", isUniqueStrings],
|
|
226
227
|
properties: ["an object of schemas", isSchemaMap],
|
|
228
|
+
propertyNames: ["a schema", isSchema],
|
|
227
229
|
additionalProperties: ["a schema", isSchema],
|
|
228
230
|
maxProperties: ["a non-negative integer", isCount],
|
|
229
231
|
dependentRequired: [
|
|
@@ -492,6 +494,8 @@ var validateNode = (value, schema6, path, errs, context) => {
|
|
|
492
494
|
}
|
|
493
495
|
const props = schema6.properties || {};
|
|
494
496
|
for (const [k, v] of Object.entries(value)) {
|
|
497
|
+
if (schema6.propertyNames !== void 0)
|
|
498
|
+
validateNode(k, schema6.propertyNames, `${path}.${k}`, errs, context);
|
|
495
499
|
if (Object.hasOwn(props, k)) evaluated.add(k);
|
|
496
500
|
else if (schema6.additionalProperties !== void 0) evaluated.add(k);
|
|
497
501
|
if (!Object.hasOwn(props, k)) {
|
|
@@ -4552,7 +4556,7 @@ var DESIGN_DOCUMENT_V1_SCHEMA = freeze({
|
|
|
4552
4556
|
}
|
|
4553
4557
|
}
|
|
4554
4558
|
});
|
|
4555
|
-
var
|
|
4559
|
+
var DESIGN_DOCUMENT_V120_SCHEMA = freeze({
|
|
4556
4560
|
...DESIGN_DOCUMENT_V1_SCHEMA,
|
|
4557
4561
|
$id: "https://openplanr.dev/schemas/v1.20.0/design-document.schema.json",
|
|
4558
4562
|
"x-openplanr-contract": { id: "design-document", version: "1.20.0" },
|
|
@@ -4611,6 +4615,78 @@ var DESIGN_DOCUMENT_SCHEMA = freeze({
|
|
|
4611
4615
|
coordinate: { type: "number", minimum: -1e7, maximum: 1e7 }
|
|
4612
4616
|
}
|
|
4613
4617
|
});
|
|
4618
|
+
var PROP_TOKEN_SCHEMA = {
|
|
4619
|
+
type: "string",
|
|
4620
|
+
minLength: 1,
|
|
4621
|
+
maxLength: 128,
|
|
4622
|
+
pattern: "^[a-z][a-z0-9-]*(?![\\s\\S])"
|
|
4623
|
+
};
|
|
4624
|
+
var propTokenPattern = new RegExp(PROP_TOKEN_SCHEMA.pattern, "u");
|
|
4625
|
+
var currentDocument = (
|
|
4626
|
+
/** @type {{ properties: Record<string, unknown>; [key: string]: unknown }} */
|
|
4627
|
+
structuredClone(DESIGN_DOCUMENT_V120_SCHEMA)
|
|
4628
|
+
);
|
|
4629
|
+
currentDocument.$id = "https://openplanr.dev/schemas/v1.22.0/design-document.schema.json";
|
|
4630
|
+
currentDocument["x-openplanr-contract"] = { id: "design-document", version: "1.22.0" };
|
|
4631
|
+
currentDocument.properties.schemaVersion = { enum: ["1.0.0", "1.1.0"] };
|
|
4632
|
+
var screenSchema = (
|
|
4633
|
+
/** @type {{ items: { properties: Record<string, unknown> } }} */
|
|
4634
|
+
currentDocument.properties.screens
|
|
4635
|
+
);
|
|
4636
|
+
screenSchema.items.properties.props = {
|
|
4637
|
+
type: "object",
|
|
4638
|
+
propertyNames: PROP_TOKEN_SCHEMA,
|
|
4639
|
+
additionalProperties: {
|
|
4640
|
+
oneOf: [
|
|
4641
|
+
{
|
|
4642
|
+
type: "object",
|
|
4643
|
+
additionalProperties: false,
|
|
4644
|
+
required: ["type", "options", "default"],
|
|
4645
|
+
properties: {
|
|
4646
|
+
type: { const: "enum" },
|
|
4647
|
+
options: {
|
|
4648
|
+
type: "array",
|
|
4649
|
+
minItems: 1,
|
|
4650
|
+
uniqueItems: true,
|
|
4651
|
+
items: PROP_TOKEN_SCHEMA
|
|
4652
|
+
},
|
|
4653
|
+
default: PROP_TOKEN_SCHEMA
|
|
4654
|
+
}
|
|
4655
|
+
},
|
|
4656
|
+
{
|
|
4657
|
+
type: "object",
|
|
4658
|
+
additionalProperties: false,
|
|
4659
|
+
required: ["type", "default"],
|
|
4660
|
+
properties: { type: { const: "boolean" }, default: { type: "boolean" } }
|
|
4661
|
+
}
|
|
4662
|
+
]
|
|
4663
|
+
}
|
|
4664
|
+
};
|
|
4665
|
+
var variantSchema = (
|
|
4666
|
+
/** @type {{ items: { properties: Record<string, unknown> } }} */
|
|
4667
|
+
currentDocument.properties.variants
|
|
4668
|
+
);
|
|
4669
|
+
variantSchema.items.properties.props = {
|
|
4670
|
+
type: "object",
|
|
4671
|
+
propertyNames: { $ref: "#/$defs/id" },
|
|
4672
|
+
additionalProperties: {
|
|
4673
|
+
type: "object",
|
|
4674
|
+
propertyNames: PROP_TOKEN_SCHEMA,
|
|
4675
|
+
additionalProperties: { anyOf: [PROP_TOKEN_SCHEMA, { type: "boolean" }] }
|
|
4676
|
+
}
|
|
4677
|
+
};
|
|
4678
|
+
currentDocument.allOf = [
|
|
4679
|
+
{
|
|
4680
|
+
if: { properties: { schemaVersion: { const: "1.1.0" } }, required: ["schemaVersion"] },
|
|
4681
|
+
else: {
|
|
4682
|
+
properties: {
|
|
4683
|
+
screens: { items: { not: { required: ["props"] } } },
|
|
4684
|
+
variants: { items: { not: { required: ["props"] } } }
|
|
4685
|
+
}
|
|
4686
|
+
}
|
|
4687
|
+
}
|
|
4688
|
+
];
|
|
4689
|
+
var DESIGN_DOCUMENT_SCHEMA = freeze(currentDocument);
|
|
4614
4690
|
|
|
4615
4691
|
// packages/protocol/src/workspace-contracts.mjs
|
|
4616
4692
|
var DESIGN_WORKSPACE_VERSION = "1.0.0";
|
|
@@ -5385,6 +5461,7 @@ export {
|
|
|
5385
5461
|
canonicalizeJson,
|
|
5386
5462
|
assertPlainData,
|
|
5387
5463
|
validateJson,
|
|
5464
|
+
DESIGN_DOCUMENT_V120_SCHEMA,
|
|
5388
5465
|
DESIGN_DOCUMENT_SCHEMA,
|
|
5389
5466
|
DESIGN_REVIEW_BUNDLE_SCHEMA,
|
|
5390
5467
|
LARGE_OBJECT_LIMITS
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
DESIGN_DOCUMENT_SCHEMA,
|
|
4
|
+
DESIGN_DOCUMENT_V120_SCHEMA,
|
|
4
5
|
DESIGN_REVIEW_BUNDLE_SCHEMA,
|
|
5
6
|
LARGE_OBJECT_LIMITS,
|
|
6
7
|
assertPlainData,
|
|
@@ -382,13 +383,40 @@ var currentDesign = (
|
|
|
382
383
|
);
|
|
383
384
|
for (const key of ["frames", "layout"])
|
|
384
385
|
currentDesign.properties[key] = /** @type {Record<string, unknown>} */
|
|
385
|
-
|
|
386
|
-
bundleCurrent.$defs = structuredClone(
|
|
386
|
+
DESIGN_DOCUMENT_V120_SCHEMA.properties[key];
|
|
387
|
+
bundleCurrent.$defs = structuredClone(DESIGN_DOCUMENT_V120_SCHEMA.$defs);
|
|
387
388
|
var currentEntries = (
|
|
388
389
|
/** @type {{ items: { properties: Record<string, unknown> } }} */
|
|
389
390
|
bundleCurrent.properties.entries
|
|
390
391
|
);
|
|
391
392
|
currentEntries.items.properties.height = { const: "auto" };
|
|
393
|
+
var bundleProps = (
|
|
394
|
+
/** @type {MutableSchema} */
|
|
395
|
+
structuredClone(bundleCurrent)
|
|
396
|
+
);
|
|
397
|
+
bundleProps.$id = "https://openplanr.dev/schemas/v1.22.0/design-review-bundle.schema.json";
|
|
398
|
+
bundleProps["x-openplanr-contract"] = { id: "design-review-bundle", version: "1.22.0" };
|
|
399
|
+
var propsDesign = (
|
|
400
|
+
/** @type {MutableSchema} */
|
|
401
|
+
bundleProps.properties.design
|
|
402
|
+
);
|
|
403
|
+
var authoredProperties = (
|
|
404
|
+
/** @type {Record<string, unknown>} */
|
|
405
|
+
DESIGN_DOCUMENT_SCHEMA.properties
|
|
406
|
+
);
|
|
407
|
+
propsDesign.properties.schemaVersion = authoredProperties.schemaVersion;
|
|
408
|
+
for (const key of ["screens", "variants"]) {
|
|
409
|
+
const projected = (
|
|
410
|
+
/** @type {{ items: { properties: Record<string, unknown> } }} */
|
|
411
|
+
propsDesign.properties[key]
|
|
412
|
+
);
|
|
413
|
+
const authored = (
|
|
414
|
+
/** @type {{ items: { properties: Record<string, unknown> } }} */
|
|
415
|
+
authoredProperties[key]
|
|
416
|
+
);
|
|
417
|
+
projected.items.properties.props = authored.items.properties.props;
|
|
418
|
+
}
|
|
419
|
+
propsDesign.allOf = structuredClone(DESIGN_DOCUMENT_SCHEMA.allOf);
|
|
392
420
|
var item = closed(
|
|
393
421
|
{
|
|
394
422
|
pinId: id,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openplanr/protocol",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Canonical OpenPlanr schemas, registries, typed errors, and portable contract validation",
|
|
6
6
|
"license": "MIT",
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
"devDependencies": {
|
|
154
154
|
"esbuild": "0.28.2",
|
|
155
155
|
"miniflare": "4.20260730.0",
|
|
156
|
-
"playwright": "1.64.
|
|
156
|
+
"playwright": "1.64.1",
|
|
157
157
|
"typescript": "6.0.2"
|
|
158
158
|
}
|
|
159
159
|
}
|
|
@@ -54,8 +54,23 @@ while authoring:
|
|
|
54
54
|
- at most two families and three weights each; one variable file can cover a
|
|
55
55
|
family's weights.
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
Snapshot with the bundled helper, run from the skill directory (see
|
|
58
|
+
[utilities.md](utilities.md)):
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
node scripts/design.mjs fonts fetch --family "Inter:400,600" --family "Source Serif 4:400" --dest <design>/source/assets/fonts
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
It is the one command to ask approval for. A host that allowlists network access by
|
|
65
|
+
domain needs `raw.githubusercontent.com`, `fonts.googleapis.com` and
|
|
66
|
+
`fonts.gstatic.com`. It enforces the rules above, verifies each
|
|
67
|
+
license from the Google Fonts catalog, writes `fonts.css`, and prints the files and
|
|
68
|
+
total bytes. Start the design stylesheet with `@import "assets/fonts/fonts.css";`
|
|
69
|
+
(relative to that stylesheet), then use the families by name. Nothing is fetched when
|
|
70
|
+
a design opens.
|
|
71
|
+
|
|
72
|
+
When the host denies network access, the command fails, or it refuses a license, use
|
|
73
|
+
the role's system stack and name that fallback in the return:
|
|
59
74
|
|
|
60
75
|
| Role | System stack |
|
|
61
76
|
| --- | --- |
|
|
@@ -10,7 +10,8 @@ Use a versioned `design-document.json` and the bundled schema exposed by the
|
|
|
10
10
|
local HTML/CSS/JavaScript, assets, screen order, responsive frames, interaction
|
|
11
11
|
flows, selected direction, brief provenance and design-system references. Inspect
|
|
12
12
|
the schema before creating the document; validate it before rendering. Use
|
|
13
|
-
`schemaVersion: "1.
|
|
13
|
+
`schemaVersion: "1.1.0"` for documents with screen or variant props. Documents without
|
|
14
|
+
props may keep `schemaVersion: "1.0.0"`.
|
|
14
15
|
|
|
15
16
|
Read [team-review.md](team-review.md) and author a sibling `review-context.json`
|
|
16
17
|
for every new design. Its welcome purpose and review questions belong to this
|
|
@@ -19,7 +20,9 @@ design, updating only what changed. Render it with the same revision as the
|
|
|
19
20
|
screens so the shared welcome and implementation guidance describe that revision.
|
|
20
21
|
|
|
21
22
|
Place source in a sibling `source/` directory. Shared CSS and components belong in
|
|
22
|
-
shared source
|
|
23
|
+
shared source. Distinct design directions may use disjoint directories; theme,
|
|
24
|
+
partial and state instances share a screen source through typed props. Preserve
|
|
25
|
+
IDs during evolution.
|
|
23
26
|
All document source paths are local and relative to its directory; import the
|
|
24
27
|
required asset snapshots rather than referring outside it or to remote resources.
|
|
25
28
|
Fonts are asset snapshots too; follow [design-system.md](design-system.md).
|
|
@@ -57,6 +60,61 @@ observable. If the requested deliverable is an architecture or decision diagram
|
|
|
57
60
|
rather than a product interface, route that content to the diagram workflow instead
|
|
58
61
|
of styling documentation as a product screen.
|
|
59
62
|
|
|
63
|
+
## Typed screen props
|
|
64
|
+
|
|
65
|
+
Declare reusable screen state in `screens[].props`. An enum declaration requires
|
|
66
|
+
`type: "enum"`, nonempty unique string `options`, and a `default` from those options.
|
|
67
|
+
A boolean declaration requires `type: "boolean"` and a boolean `default`. Prop names,
|
|
68
|
+
enum options and enum defaults must be lowercase tokens matching
|
|
69
|
+
`^[a-z][a-z0-9-]*$`, with at most 128 characters. Use `is-dark` and `dark-mode`,
|
|
70
|
+
for example; uppercase letters, spaces and underscores are invalid. Use props for
|
|
71
|
+
theme, partial content and state variants instead of copying HTML sources.
|
|
72
|
+
|
|
73
|
+
Set instance values in `variants[].props`, keyed first by screen ID and then prop
|
|
74
|
+
name. Omitted values use the screen defaults. For example:
|
|
75
|
+
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"schemaVersion": "1.1.0",
|
|
79
|
+
"screens": [
|
|
80
|
+
{
|
|
81
|
+
"id": "overview",
|
|
82
|
+
"title": "Overview",
|
|
83
|
+
"source": { "html": "source/overview.html" },
|
|
84
|
+
"props": {
|
|
85
|
+
"theme": { "type": "enum", "options": ["light", "dark"], "default": "light" },
|
|
86
|
+
"partial": { "type": "boolean", "default": false }
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"variants": [
|
|
91
|
+
{ "id": "light", "label": "Light", "status": "ready" },
|
|
92
|
+
{
|
|
93
|
+
"id": "dark",
|
|
94
|
+
"label": "Dark",
|
|
95
|
+
"status": "ready",
|
|
96
|
+
"props": { "overview": { "theme": "dark", "partial": true } }
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Each source with props needs exactly one explicit `<body>` screen root. The
|
|
103
|
+
renderer writes effective values onto that body as `data-prop-theme="dark"`,
|
|
104
|
+
`data-prop-partial="true"`, `prop-theme-dark` and `prop-partial-true`; false booleans
|
|
105
|
+
also receive an attribute and class. Names and values are written unchanged,
|
|
106
|
+
without case conversion or encoding. A prop named `is-dark` becomes
|
|
107
|
+
`data-prop-is-dark="true"` and `prop-is-dark-true`; scripts read it as
|
|
108
|
+
`document.body.dataset.propIsDark`. Branch CSS and local scripts on these values.
|
|
109
|
+
A `variants[].sources[screenId]` override still selects the source; props
|
|
110
|
+
apply to that selected source, otherwise to `screens[].source`. Board keys,
|
|
111
|
+
screen order, responsive frames and existing source overrides retain their roles.
|
|
112
|
+
|
|
113
|
+
Lint warns about copied screens only when their source files are byte-identical
|
|
114
|
+
after removing body `data-theme="light"` or `data-theme="dark"` attributes and
|
|
115
|
+
`theme-light` or `theme-dark` body classes. Other markup, styles, scripts and assets
|
|
116
|
+
must match. Use a shared source with a theme prop for those instances.
|
|
117
|
+
|
|
60
118
|
## Views
|
|
61
119
|
|
|
62
120
|
| View | Purpose | Required behavior |
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Run the linked design helper from the skill entrypoint relative to the skill's
|
|
4
4
|
directory. It contains deterministic operations and all required assets. It needs
|
|
5
|
-
Node.js 22.13 or later, with no global CLI
|
|
5
|
+
Node.js 22.13 or later, with no global CLI or provider credentials. Only `fonts fetch`
|
|
6
|
+
downloads anything, and only when run; nothing is fetched when a design opens.
|
|
6
7
|
Use `--help` to inspect the installed command interface before writing documents
|
|
7
8
|
or invoking operations; the installed contract is authoritative.
|
|
8
9
|
|
|
@@ -15,8 +16,17 @@ node scripts/design.mjs feedback <design-document.json> --action inspect --json
|
|
|
15
16
|
node scripts/design.mjs view-context <design-document.json> --json
|
|
16
17
|
node scripts/design.mjs studio <design-document.json> --action status --json
|
|
17
18
|
node scripts/design.mjs studio <design-document.json> --action stop --json
|
|
19
|
+
node scripts/design.mjs fonts fetch --family "<Name>:<weights>" [--family ...] --dest <design>/source/assets/fonts --json
|
|
18
20
|
```
|
|
19
21
|
|
|
22
|
+
`fonts fetch` snapshots at most two OFL or Apache families, three weights each, as
|
|
23
|
+
Latin `woff2` files with their license files and a local `fonts.css`. It needs network
|
|
24
|
+
access; ask the user to approve that one command. A host that allowlists domains needs
|
|
25
|
+
`raw.githubusercontent.com` (license check), `fonts.googleapis.com` (font CSS) and
|
|
26
|
+
`fonts.gstatic.com` (font files). It refuses an existing non-empty
|
|
27
|
+
`--dest` and leaves nothing behind when any request fails. See
|
|
28
|
+
[design-system.md](design-system.md) for the fallback.
|
|
29
|
+
|
|
20
30
|
Use `--view prototype` or `--view walkthrough` to select the initial presentation.
|
|
21
31
|
When an `openplanr` CLI is available, prefer its public `openplanr artifact` route for
|
|
22
32
|
opening the document; otherwise use this bundled script. Both compose the same
|
package/lib/host-packages/claude/openplanr/skills/design/schemas/design-document.schema.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://openplanr.dev/schemas/v1.
|
|
3
|
+
"$id": "https://openplanr.dev/schemas/v1.22.0/design-document.schema.json",
|
|
4
4
|
"x-openplanr-contract": {
|
|
5
5
|
"id": "design-document",
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.22.0"
|
|
7
7
|
},
|
|
8
8
|
"title": "OpenPlanr authored design document",
|
|
9
9
|
"type": "object",
|
|
@@ -26,7 +26,10 @@
|
|
|
26
26
|
"const": "openplanr-design-document"
|
|
27
27
|
},
|
|
28
28
|
"schemaVersion": {
|
|
29
|
-
"
|
|
29
|
+
"enum": [
|
|
30
|
+
"1.0.0",
|
|
31
|
+
"1.1.0"
|
|
32
|
+
]
|
|
30
33
|
},
|
|
31
34
|
"id": {
|
|
32
35
|
"$ref": "#/$defs/id"
|
|
@@ -158,6 +161,66 @@
|
|
|
158
161
|
},
|
|
159
162
|
"anchors": {
|
|
160
163
|
"$ref": "#/$defs/ids"
|
|
164
|
+
},
|
|
165
|
+
"props": {
|
|
166
|
+
"type": "object",
|
|
167
|
+
"propertyNames": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"minLength": 1,
|
|
170
|
+
"maxLength": 128,
|
|
171
|
+
"pattern": "^[a-z][a-z0-9-]*(?![\\s\\S])"
|
|
172
|
+
},
|
|
173
|
+
"additionalProperties": {
|
|
174
|
+
"oneOf": [
|
|
175
|
+
{
|
|
176
|
+
"type": "object",
|
|
177
|
+
"additionalProperties": false,
|
|
178
|
+
"required": [
|
|
179
|
+
"type",
|
|
180
|
+
"options",
|
|
181
|
+
"default"
|
|
182
|
+
],
|
|
183
|
+
"properties": {
|
|
184
|
+
"type": {
|
|
185
|
+
"const": "enum"
|
|
186
|
+
},
|
|
187
|
+
"options": {
|
|
188
|
+
"type": "array",
|
|
189
|
+
"minItems": 1,
|
|
190
|
+
"uniqueItems": true,
|
|
191
|
+
"items": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"minLength": 1,
|
|
194
|
+
"maxLength": 128,
|
|
195
|
+
"pattern": "^[a-z][a-z0-9-]*(?![\\s\\S])"
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"default": {
|
|
199
|
+
"type": "string",
|
|
200
|
+
"minLength": 1,
|
|
201
|
+
"maxLength": 128,
|
|
202
|
+
"pattern": "^[a-z][a-z0-9-]*(?![\\s\\S])"
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"type": "object",
|
|
208
|
+
"additionalProperties": false,
|
|
209
|
+
"required": [
|
|
210
|
+
"type",
|
|
211
|
+
"default"
|
|
212
|
+
],
|
|
213
|
+
"properties": {
|
|
214
|
+
"type": {
|
|
215
|
+
"const": "boolean"
|
|
216
|
+
},
|
|
217
|
+
"default": {
|
|
218
|
+
"type": "boolean"
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
]
|
|
223
|
+
}
|
|
161
224
|
}
|
|
162
225
|
}
|
|
163
226
|
}
|
|
@@ -232,6 +295,34 @@
|
|
|
232
295
|
"additionalProperties": {
|
|
233
296
|
"$ref": "#/$defs/source"
|
|
234
297
|
}
|
|
298
|
+
},
|
|
299
|
+
"props": {
|
|
300
|
+
"type": "object",
|
|
301
|
+
"propertyNames": {
|
|
302
|
+
"$ref": "#/$defs/id"
|
|
303
|
+
},
|
|
304
|
+
"additionalProperties": {
|
|
305
|
+
"type": "object",
|
|
306
|
+
"propertyNames": {
|
|
307
|
+
"type": "string",
|
|
308
|
+
"minLength": 1,
|
|
309
|
+
"maxLength": 128,
|
|
310
|
+
"pattern": "^[a-z][a-z0-9-]*(?![\\s\\S])"
|
|
311
|
+
},
|
|
312
|
+
"additionalProperties": {
|
|
313
|
+
"anyOf": [
|
|
314
|
+
{
|
|
315
|
+
"type": "string",
|
|
316
|
+
"minLength": 1,
|
|
317
|
+
"maxLength": 128,
|
|
318
|
+
"pattern": "^[a-z][a-z0-9-]*(?![\\s\\S])"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"type": "boolean"
|
|
322
|
+
}
|
|
323
|
+
]
|
|
324
|
+
}
|
|
325
|
+
}
|
|
235
326
|
}
|
|
236
327
|
},
|
|
237
328
|
"if": {
|
|
@@ -375,5 +466,41 @@
|
|
|
375
466
|
"minimum": -10000000,
|
|
376
467
|
"maximum": 10000000
|
|
377
468
|
}
|
|
378
|
-
}
|
|
469
|
+
},
|
|
470
|
+
"allOf": [
|
|
471
|
+
{
|
|
472
|
+
"if": {
|
|
473
|
+
"properties": {
|
|
474
|
+
"schemaVersion": {
|
|
475
|
+
"const": "1.1.0"
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
"required": [
|
|
479
|
+
"schemaVersion"
|
|
480
|
+
]
|
|
481
|
+
},
|
|
482
|
+
"else": {
|
|
483
|
+
"properties": {
|
|
484
|
+
"screens": {
|
|
485
|
+
"items": {
|
|
486
|
+
"not": {
|
|
487
|
+
"required": [
|
|
488
|
+
"props"
|
|
489
|
+
]
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
},
|
|
493
|
+
"variants": {
|
|
494
|
+
"items": {
|
|
495
|
+
"not": {
|
|
496
|
+
"required": [
|
|
497
|
+
"props"
|
|
498
|
+
]
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
]
|
|
379
506
|
}
|
|
@@ -54,8 +54,23 @@ while authoring:
|
|
|
54
54
|
- at most two families and three weights each; one variable file can cover a
|
|
55
55
|
family's weights.
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
Snapshot with the bundled helper, run from the skill directory (see
|
|
58
|
+
[utilities.md](utilities.md)):
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
node scripts/design.mjs fonts fetch --family "Inter:400,600" --family "Source Serif 4:400" --dest <design>/source/assets/fonts
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
It is the one command to ask approval for. A host that allowlists network access by
|
|
65
|
+
domain needs `raw.githubusercontent.com`, `fonts.googleapis.com` and
|
|
66
|
+
`fonts.gstatic.com`. It enforces the rules above, verifies each
|
|
67
|
+
license from the Google Fonts catalog, writes `fonts.css`, and prints the files and
|
|
68
|
+
total bytes. Start the design stylesheet with `@import "assets/fonts/fonts.css";`
|
|
69
|
+
(relative to that stylesheet), then use the families by name. Nothing is fetched when
|
|
70
|
+
a design opens.
|
|
71
|
+
|
|
72
|
+
When the host denies network access, the command fails, or it refuses a license, use
|
|
73
|
+
the role's system stack and name that fallback in the return:
|
|
59
74
|
|
|
60
75
|
| Role | System stack |
|
|
61
76
|
| --- | --- |
|
|
@@ -10,7 +10,8 @@ Use a versioned `design-document.json` and the bundled schema exposed by the
|
|
|
10
10
|
local HTML/CSS/JavaScript, assets, screen order, responsive frames, interaction
|
|
11
11
|
flows, selected direction, brief provenance and design-system references. Inspect
|
|
12
12
|
the schema before creating the document; validate it before rendering. Use
|
|
13
|
-
`schemaVersion: "1.
|
|
13
|
+
`schemaVersion: "1.1.0"` for documents with screen or variant props. Documents without
|
|
14
|
+
props may keep `schemaVersion: "1.0.0"`.
|
|
14
15
|
|
|
15
16
|
Read [team-review.md](team-review.md) and author a sibling `review-context.json`
|
|
16
17
|
for every new design. Its welcome purpose and review questions belong to this
|
|
@@ -19,7 +20,9 @@ design, updating only what changed. Render it with the same revision as the
|
|
|
19
20
|
screens so the shared welcome and implementation guidance describe that revision.
|
|
20
21
|
|
|
21
22
|
Place source in a sibling `source/` directory. Shared CSS and components belong in
|
|
22
|
-
shared source
|
|
23
|
+
shared source. Distinct design directions may use disjoint directories; theme,
|
|
24
|
+
partial and state instances share a screen source through typed props. Preserve
|
|
25
|
+
IDs during evolution.
|
|
23
26
|
All document source paths are local and relative to its directory; import the
|
|
24
27
|
required asset snapshots rather than referring outside it or to remote resources.
|
|
25
28
|
Fonts are asset snapshots too; follow [design-system.md](design-system.md).
|
|
@@ -57,6 +60,61 @@ observable. If the requested deliverable is an architecture or decision diagram
|
|
|
57
60
|
rather than a product interface, route that content to the diagram workflow instead
|
|
58
61
|
of styling documentation as a product screen.
|
|
59
62
|
|
|
63
|
+
## Typed screen props
|
|
64
|
+
|
|
65
|
+
Declare reusable screen state in `screens[].props`. An enum declaration requires
|
|
66
|
+
`type: "enum"`, nonempty unique string `options`, and a `default` from those options.
|
|
67
|
+
A boolean declaration requires `type: "boolean"` and a boolean `default`. Prop names,
|
|
68
|
+
enum options and enum defaults must be lowercase tokens matching
|
|
69
|
+
`^[a-z][a-z0-9-]*$`, with at most 128 characters. Use `is-dark` and `dark-mode`,
|
|
70
|
+
for example; uppercase letters, spaces and underscores are invalid. Use props for
|
|
71
|
+
theme, partial content and state variants instead of copying HTML sources.
|
|
72
|
+
|
|
73
|
+
Set instance values in `variants[].props`, keyed first by screen ID and then prop
|
|
74
|
+
name. Omitted values use the screen defaults. For example:
|
|
75
|
+
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"schemaVersion": "1.1.0",
|
|
79
|
+
"screens": [
|
|
80
|
+
{
|
|
81
|
+
"id": "overview",
|
|
82
|
+
"title": "Overview",
|
|
83
|
+
"source": { "html": "source/overview.html" },
|
|
84
|
+
"props": {
|
|
85
|
+
"theme": { "type": "enum", "options": ["light", "dark"], "default": "light" },
|
|
86
|
+
"partial": { "type": "boolean", "default": false }
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"variants": [
|
|
91
|
+
{ "id": "light", "label": "Light", "status": "ready" },
|
|
92
|
+
{
|
|
93
|
+
"id": "dark",
|
|
94
|
+
"label": "Dark",
|
|
95
|
+
"status": "ready",
|
|
96
|
+
"props": { "overview": { "theme": "dark", "partial": true } }
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Each source with props needs exactly one explicit `<body>` screen root. The
|
|
103
|
+
renderer writes effective values onto that body as `data-prop-theme="dark"`,
|
|
104
|
+
`data-prop-partial="true"`, `prop-theme-dark` and `prop-partial-true`; false booleans
|
|
105
|
+
also receive an attribute and class. Names and values are written unchanged,
|
|
106
|
+
without case conversion or encoding. A prop named `is-dark` becomes
|
|
107
|
+
`data-prop-is-dark="true"` and `prop-is-dark-true`; scripts read it as
|
|
108
|
+
`document.body.dataset.propIsDark`. Branch CSS and local scripts on these values.
|
|
109
|
+
A `variants[].sources[screenId]` override still selects the source; props
|
|
110
|
+
apply to that selected source, otherwise to `screens[].source`. Board keys,
|
|
111
|
+
screen order, responsive frames and existing source overrides retain their roles.
|
|
112
|
+
|
|
113
|
+
Lint warns about copied screens only when their source files are byte-identical
|
|
114
|
+
after removing body `data-theme="light"` or `data-theme="dark"` attributes and
|
|
115
|
+
`theme-light` or `theme-dark` body classes. Other markup, styles, scripts and assets
|
|
116
|
+
must match. Use a shared source with a theme prop for those instances.
|
|
117
|
+
|
|
60
118
|
## Views
|
|
61
119
|
|
|
62
120
|
| View | Purpose | Required behavior |
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Run the linked design helper from the skill entrypoint relative to the skill's
|
|
4
4
|
directory. It contains deterministic operations and all required assets. It needs
|
|
5
|
-
Node.js 22.13 or later, with no global CLI
|
|
5
|
+
Node.js 22.13 or later, with no global CLI or provider credentials. Only `fonts fetch`
|
|
6
|
+
downloads anything, and only when run; nothing is fetched when a design opens.
|
|
6
7
|
Use `--help` to inspect the installed command interface before writing documents
|
|
7
8
|
or invoking operations; the installed contract is authoritative.
|
|
8
9
|
|
|
@@ -15,8 +16,17 @@ node scripts/design.mjs feedback <design-document.json> --action inspect --json
|
|
|
15
16
|
node scripts/design.mjs view-context <design-document.json> --json
|
|
16
17
|
node scripts/design.mjs studio <design-document.json> --action status --json
|
|
17
18
|
node scripts/design.mjs studio <design-document.json> --action stop --json
|
|
19
|
+
node scripts/design.mjs fonts fetch --family "<Name>:<weights>" [--family ...] --dest <design>/source/assets/fonts --json
|
|
18
20
|
```
|
|
19
21
|
|
|
22
|
+
`fonts fetch` snapshots at most two OFL or Apache families, three weights each, as
|
|
23
|
+
Latin `woff2` files with their license files and a local `fonts.css`. It needs network
|
|
24
|
+
access; ask the user to approve that one command. A host that allowlists domains needs
|
|
25
|
+
`raw.githubusercontent.com` (license check), `fonts.googleapis.com` (font CSS) and
|
|
26
|
+
`fonts.gstatic.com` (font files). It refuses an existing non-empty
|
|
27
|
+
`--dest` and leaves nothing behind when any request fails. See
|
|
28
|
+
[design-system.md](design-system.md) for the fallback.
|
|
29
|
+
|
|
20
30
|
Use `--view prototype` or `--view walkthrough` to select the initial presentation.
|
|
21
31
|
When an `openplanr` CLI is available, prefer its public `openplanr artifact` route for
|
|
22
32
|
opening the document; otherwise use this bundled script. Both compose the same
|