@hybridlabor-api/aos 4.6.6 → 4.7.1
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/.agents/agents.md +9 -3
- package/.agents/nodes.json +7 -2
- package/.agents/state.schema.json +26 -1
- package/.agents/vendor-manifest.json +56 -0
- package/.agents/workflows/startcycle-graph.md +2 -2
- package/.claude/agents/architect.md +7 -2
- package/.claude/agents/security-reviewer.md +1 -1
- package/.claude/agents/techlead.md +2 -0
- package/.claude/hooks/memb-inject.mjs +257 -135
- package/.claude/hooks/trail-relay.mjs +18 -0
- package/.claude/settings.json +70 -0
- package/.claude/workflows/startcycle-dispatch.mjs +203 -17
- package/.opencode/agents/architect.md +7 -2
- package/.opencode/agents/techlead.md +2 -0
- package/.opencode/plugins/bdb-aos.js +75 -0
- package/THIRD_PARTY_NOTICES.md +57 -1
- package/bin/aos-doctor.mjs +366 -0
- package/bin/aos-store.mjs +167 -0
- package/bin/aos-uninstall.mjs +55 -1
- package/docs/AUDIT_BRIEF_ECC_STORE.md +122 -0
- package/docs/PLAN_AOS_STORE_PHASE1.md +190 -0
- package/docs/handover/agenttrail-for-ao.md +58 -0
- package/docs/handover/deja-for-ao.md +51 -0
- package/installer.js +182 -38
- package/lib/aos-archify-contract.mjs +277 -0
- package/lib/ecc-store-index.json +1 -0
- package/mcp_config.json +8 -0
- package/mcps/mcsc/README.md +24 -0
- package/mcps/mcsc/package-lock.json +1234 -0
- package/mcps/mcsc/package.json +14 -0
- package/mcps/mcsc/packages/core/bin/mcsc.js +162 -0
- package/mcps/mcsc/packages/core/rulebook.default.yaml +49 -0
- package/mcps/mcsc/packages/core/schema/rulebook.schema.json +56 -0
- package/mcps/mcsc/packages/core/src/adapters/agy.js +107 -0
- package/mcps/mcsc/packages/core/src/adapters/codex.js +179 -0
- package/mcps/mcsc/packages/core/src/adapters/native.js +14 -0
- package/mcps/mcsc/packages/core/src/adapters/opencode.js +183 -0
- package/mcps/mcsc/packages/core/src/adapters/types.js +21 -0
- package/mcps/mcsc/packages/core/src/capabilities/buildOfferTable.js +34 -0
- package/mcps/mcsc/packages/core/src/capabilities/registry.js +99 -0
- package/mcps/mcsc/packages/core/src/capabilities/types.js +24 -0
- package/mcps/mcsc/packages/core/src/detect/cache.js +47 -0
- package/mcps/mcsc/packages/core/src/detect/inventory.js +73 -0
- package/mcps/mcsc/packages/core/src/detect/probes.js +158 -0
- package/mcps/mcsc/packages/core/src/detect/types.js +26 -0
- package/mcps/mcsc/packages/core/src/rulebook/load.js +53 -0
- package/mcps/mcsc/packages/core/src/rulebook/resolve.js +227 -0
- package/mcps/mcsc/packages/core/src/rulebook/rulebook.types.js +89 -0
- package/mcps/mcsc/packages/core/src/trail.js +17 -0
- package/mcps/mcsc/packages/mcp/server.js +302 -0
- package/mcps/mcsc/server.js +2 -0
- package/package.json +8 -2
- package/scripts/build-ecc-store-index.mjs +147 -0
- package/skills/basic/bdbmediastorm/SKILL.md +1 -1
- package/skills/basic/godmode-ui-ux/SKILL.md +2 -2
- package/skills/basic/godmode-ui-ux/references/anti-slop-rules.md +44 -40
- package/skills/basic/godmode-ui-ux/references/taste-archetypes.md +49 -0
- package/skills/basic/startcycle/SKILL.md +7 -0
- package/skills/basic/startcycle-graph/SKILL.md +25 -0
- package/skills/basic/startcycle-graph-user/SKILL.md +3 -0
- package/skills/basic/teamwork-preview/SKILL.md +2 -0
- package/skills/bdbrainstorm/SKILL.md +1 -0
- package/skills/global_config/agenttrail/LICENSE +21 -0
- package/skills/global_config/agenttrail/SKILL.md +48 -0
- package/skills/global_config/agenttrail/bin/agenttrail.mjs +1113 -0
- package/skills/global_config/agenttrail/public/index.html +662 -0
- package/skills/global_config/aos-project-init/SKILL.md +25 -5
- package/skills/global_config/aos-setup/SKILL.md +34 -1
- package/skills/global_config/aos-setup/scripts/aos-doctor.mjs +115 -1
- package/skills/global_config/archify/LICENSE +22 -0
- package/skills/global_config/archify/SKILL.md +140 -0
- package/skills/global_config/archify/THIRD_PARTY_NOTICES.md +69 -0
- package/skills/global_config/archify/assets/JetBrainsMono-OFL.txt +93 -0
- package/skills/global_config/archify/assets/template.html +14937 -0
- package/skills/global_config/archify/bin/archify.mjs +2139 -0
- package/skills/global_config/archify/bin/open-artifact.mjs +86 -0
- package/skills/global_config/archify/bin/preview.mjs +653 -0
- package/skills/global_config/archify/bin/visual-check.mjs +829 -0
- package/skills/global_config/archify/brand-marks/README.md +31 -0
- package/skills/global_config/archify/brand-marks/catalog.json +131 -0
- package/skills/global_config/archify/delta/architecture-delta.mjs +1232 -0
- package/skills/global_config/archify/examples/agent-run.lifecycle.json +60 -0
- package/skills/global_config/archify/examples/agent-tool-call.workflow.json +94 -0
- package/skills/global_config/archify/examples/async-job-roundtrip.sequence.json +61 -0
- package/skills/global_config/archify/examples/brand-aware-delivery.architecture.json +47 -0
- package/skills/global_config/archify/examples/cache-miss-request.sequence.json +82 -0
- package/skills/global_config/archify/examples/checkout-platform.base.architecture.json +31 -0
- package/skills/global_config/archify/examples/checkout-platform.head.architecture.json +31 -0
- package/skills/global_config/archify/examples/dataflow-product-analytics.html +15048 -0
- package/skills/global_config/archify/examples/deployment-release.lifecycle.json +49 -0
- package/skills/global_config/archify/examples/event-stream.dataflow.json +57 -0
- package/skills/global_config/archify/examples/incident-response.workflow.json +64 -0
- package/skills/global_config/archify/examples/lifecycle-agent-run.html +14983 -0
- package/skills/global_config/archify/examples/product-analytics.dataflow.json +76 -0
- package/skills/global_config/archify/examples/production-deployment.architecture.json +71 -0
- package/skills/global_config/archify/examples/release-delivery.workflow.json +62 -0
- package/skills/global_config/archify/examples/sequence-cache-miss-request.html +15063 -0
- package/skills/global_config/archify/examples/web-app-rendered.html +15012 -0
- package/skills/global_config/archify/examples/web-app.architecture.json +46 -0
- package/skills/global_config/archify/examples/workflow-agent-tool-call-rendered.html +15054 -0
- package/skills/global_config/archify/migrations/workflow-v2.mjs +279 -0
- package/skills/global_config/archify/package.json +39 -0
- package/skills/global_config/archify/recipes/scenarios.mjs +391 -0
- package/skills/global_config/archify/references/authoring-contract.md +247 -0
- package/skills/global_config/archify/references/brand-marks.md +65 -0
- package/skills/global_config/archify/references/delivery-contract.md +138 -0
- package/skills/global_config/archify/references/viewer-runtime.md +45 -0
- package/skills/global_config/archify/renderers/architecture/grid.mjs +62 -0
- package/skills/global_config/archify/renderers/architecture/render-architecture.mjs +1078 -0
- package/skills/global_config/archify/renderers/dataflow/README.md +104 -0
- package/skills/global_config/archify/renderers/dataflow/render-dataflow.mjs +483 -0
- package/skills/global_config/archify/renderers/lifecycle/README.md +115 -0
- package/skills/global_config/archify/renderers/lifecycle/render-lifecycle.mjs +561 -0
- package/skills/global_config/archify/renderers/sequence/README.md +114 -0
- package/skills/global_config/archify/renderers/sequence/render-sequence.mjs +464 -0
- package/skills/global_config/archify/renderers/shared/brand-marks.mjs +563 -0
- package/skills/global_config/archify/renderers/shared/cli.mjs +218 -0
- package/skills/global_config/archify/renderers/shared/desktop-readability.mjs +26 -0
- package/skills/global_config/archify/renderers/shared/diagnostics.mjs +160 -0
- package/skills/global_config/archify/renderers/shared/engineering-profiles.mjs +157 -0
- package/skills/global_config/archify/renderers/shared/generated-brand-marks.mjs +2003 -0
- package/skills/global_config/archify/renderers/shared/generated-validators.mjs +13 -0
- package/skills/global_config/archify/renderers/shared/geometry.mjs +1423 -0
- package/skills/global_config/archify/renderers/shared/i18n.mjs +595 -0
- package/skills/global_config/archify/renderers/shared/layout-report.mjs +40 -0
- package/skills/global_config/archify/renderers/shared/legend.mjs +217 -0
- package/skills/global_config/archify/renderers/shared/output-path.mjs +340 -0
- package/skills/global_config/archify/renderers/shared/repository-evidence.mjs +239 -0
- package/skills/global_config/archify/renderers/shared/repository-location.mjs +58 -0
- package/skills/global_config/archify/renderers/shared/text-fit.mjs +49 -0
- package/skills/global_config/archify/renderers/shared/utils.mjs +232 -0
- package/skills/global_config/archify/renderers/shared/validator.mjs +86 -0
- package/skills/global_config/archify/renderers/workflow/README.md +223 -0
- package/skills/global_config/archify/renderers/workflow/render-workflow.mjs +35 -0
- package/skills/global_config/archify/renderers/workflow/workflow-compiler.mjs +4400 -0
- package/skills/global_config/archify/renderers/workflow/workflow-migration-geometry.mjs +144 -0
- package/skills/global_config/archify/schemas/README.md +211 -0
- package/skills/global_config/archify/schemas/architecture.schema.json +178 -0
- package/skills/global_config/archify/schemas/common.schema.json +115 -0
- package/skills/global_config/archify/schemas/dataflow.schema.json +243 -0
- package/skills/global_config/archify/schemas/lifecycle.schema.json +266 -0
- package/skills/global_config/archify/schemas/sequence.schema.json +223 -0
- package/skills/global_config/archify/schemas/workflow.schema.json +428 -0
- package/skills/global_config/archify/scripts/check-render-output.mjs +916 -0
- package/skills/global_config/archify/scripts/generate-brand-marks.mjs +141 -0
- package/skills/global_config/archify/scripts/generate-validators.mjs +66 -0
- package/skills/global_config/archify/scripts/render-examples.mjs +26 -0
- package/skills/global_config/archify/skill-release.json +10 -0
- package/skills/global_config/ask-tim/SKILL.md +10 -0
- package/skills/global_config/bdb-security-audit/SKILL.md +109 -0
- package/skills/global_config/bdb-security-audit/references/audit-checklists.md +172 -0
- package/skills/global_config/bdb-security-audit/references/skylos-guide.md +139 -0
- package/skills/global_config/bdb-security-audit/references/xalgorix-bridge.md +110 -0
- package/skills/global_config/bdbdesignpro/SKILL.md +4 -4
- package/skills/global_config/bdbdesignpro/references/bdb-motion-tokens.md +52 -31
- package/skills/global_config/bdbresilience/SKILL.md +10 -0
- package/skills/global_config/brag/SKILL.md +179 -0
- package/skills/global_config/brag/assets/music/README.md +20 -0
- package/skills/global_config/brag/assets/music/cues/happy-beats-business-moves-vol-1-by-ende-dot-app.music-cues.json +3846 -0
- package/skills/global_config/brag/assets/music/cues/happy-beats-business-moves-vol-1-by-ende-dot-app.music-cues.md +35 -0
- package/skills/global_config/brag/assets/music/cues/happy-beats-business-moves-vol-10-by-ende-dot-app.music-cues.json +1826 -0
- package/skills/global_config/brag/assets/music/cues/happy-beats-business-moves-vol-10-by-ende-dot-app.music-cues.md +35 -0
- package/skills/global_config/brag/assets/music/cues/happy-beats-business-moves-vol-11-by-ende-dot-app.music-cues.json +2266 -0
- package/skills/global_config/brag/assets/music/cues/happy-beats-business-moves-vol-11-by-ende-dot-app.music-cues.md +35 -0
- package/skills/global_config/brag/assets/music/cues/happy-beats-business-moves-vol-12-by-ende-dot-app.music-cues.json +2806 -0
- package/skills/global_config/brag/assets/music/cues/happy-beats-business-moves-vol-12-by-ende-dot-app.music-cues.md +35 -0
- package/skills/global_config/brag/assets/music/cues/happy-beats-business-moves-vol-9-by-ende-dot-app.music-cues.json +2796 -0
- package/skills/global_config/brag/assets/music/cues/happy-beats-business-moves-vol-9-by-ende-dot-app.music-cues.md +35 -0
- package/skills/global_config/brag/assets/music/happy-beats-business-moves-vol-1-by-ende-dot-app.mp3 +0 -0
- package/skills/global_config/brag/assets/music/happy-beats-business-moves-vol-10-by-ende-dot-app.mp3 +0 -0
- package/skills/global_config/brag/assets/music/happy-beats-business-moves-vol-11-by-ende-dot-app.mp3 +0 -0
- package/skills/global_config/brag/assets/music/happy-beats-business-moves-vol-12-by-ende-dot-app.mp3 +0 -0
- package/skills/global_config/brag/assets/music/happy-beats-business-moves-vol-9-by-ende-dot-app.mp3 +0 -0
- package/skills/global_config/brag/assets/sfx/casino/card-fan-1.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/card-fan-2.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/card-place-1.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/card-place-2.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/card-place-3.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/card-place-4.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/card-shove-1.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/card-shove-2.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/card-shove-3.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/card-shove-4.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/card-shuffle.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/card-slide-1.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/card-slide-2.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/card-slide-3.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/card-slide-4.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/card-slide-5.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/card-slide-6.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/card-slide-7.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/card-slide-8.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/cards-pack-open-1.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/cards-pack-open-2.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/chip-lay-1.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/chip-lay-2.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/chip-lay-3.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/chips-collide-1.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/chips-collide-2.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/chips-collide-3.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/chips-collide-4.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/chips-handle-1.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/chips-handle-2.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/chips-handle-3.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/chips-handle-4.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/chips-handle-6.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/chips-stack-1.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/chips-stack-2.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/chips-stack-3.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/chips-stack-4.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/chips-stack-5.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/chips-stack-6.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/dice-grab-1.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/dice-grab-2.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/dice-shake-1.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/dice-shake-2.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/dice-shake-3.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/dice-throw-1.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/dice-throw-2.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/dice-throw-3.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/die-throw-1.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/die-throw-2.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/die-throw-3.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/casino/die-throw-4.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/footstep_carpet_000.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/footstep_carpet_003.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/footstep_carpet_004.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/footstep_concrete_000.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/footstep_concrete_001.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/footstep_concrete_002.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/footstep_concrete_003.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/footstep_concrete_004.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/footstep_grass_000.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/footstep_grass_001.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/footstep_grass_002.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/footstep_grass_003.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/footstep_grass_004.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/footstep_snow_000.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/footstep_snow_001.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/footstep_snow_002.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/footstep_snow_003.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/footstep_snow_004.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/footstep_wood_000.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/footstep_wood_001.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/footstep_wood_002.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/footstep_wood_003.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/footstep_wood_004.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactBell_heavy_000.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactBell_heavy_003.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactBell_heavy_004.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactGeneric_light_000.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactGeneric_light_001.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactGeneric_light_002.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactGeneric_light_003.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactGeneric_light_004.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactGlass_heavy_002.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactGlass_light_001.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactGlass_light_002.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactGlass_light_003.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactGlass_medium_000.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactGlass_medium_002.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactGlass_medium_004.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactMetal_heavy_000.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactMetal_heavy_002.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactMetal_heavy_004.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactMetal_light_002.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactMetal_light_003.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactMetal_medium_000.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactMetal_medium_001.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactMetal_medium_002.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactMetal_medium_003.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactMetal_medium_004.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactMining_001.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPlank_medium_000.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPlank_medium_001.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPlank_medium_002.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPlank_medium_003.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPlank_medium_004.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPlate_heavy_000.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPlate_heavy_001.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPlate_heavy_002.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPlate_heavy_003.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPlate_heavy_004.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPlate_light_000.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPlate_light_001.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPlate_light_002.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPlate_light_003.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPlate_light_004.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPlate_medium_000.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPlate_medium_001.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPlate_medium_002.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPlate_medium_003.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPlate_medium_004.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPunch_heavy_000.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPunch_heavy_001.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPunch_heavy_002.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPunch_heavy_003.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPunch_heavy_004.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPunch_medium_000.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPunch_medium_001.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPunch_medium_002.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPunch_medium_003.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactPunch_medium_004.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactSoft_heavy_000.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactSoft_heavy_001.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactSoft_heavy_002.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactSoft_heavy_003.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactSoft_heavy_004.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactSoft_medium_000.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactSoft_medium_001.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactSoft_medium_002.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactSoft_medium_003.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactSoft_medium_004.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactTin_medium_000.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactTin_medium_001.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactTin_medium_002.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactTin_medium_003.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactTin_medium_004.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactWood_heavy_000.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactWood_heavy_001.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactWood_heavy_002.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactWood_heavy_003.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactWood_heavy_004.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactWood_light_000.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactWood_light_001.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactWood_light_002.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactWood_light_003.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactWood_light_004.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactWood_medium_000.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactWood_medium_001.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactWood_medium_002.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactWood_medium_003.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/impact/impactWood_medium_004.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/interface/bong_001.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/interface/click_001.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/interface/click_002.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/interface/click_003.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/interface/click_004.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/interface/click_005.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/interface/drop_001.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/interface/drop_002.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/interface/drop_003.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/interface/error_005.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/interface/error_006.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/interface/glitch_002.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/interface/glitch_004.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/interface/select_008.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/interface/switch_001.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/interface/switch_002.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/interface/switch_004.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/interface/switch_005.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/interface/switch_006.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/interface/switch_007.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-001.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-002.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-003.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-004.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-005.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-006.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-007.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-008.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-009.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-010.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-011.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-012.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-013.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-014.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-015.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-016.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-017.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-018.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-019.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-020.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-021.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-022.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-023.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-024.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-025.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-026.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-027.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-028.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-029.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-030.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-031.wav +0 -0
- package/skills/global_config/brag/assets/sfx/keyboard/keypress-032.wav +0 -0
- package/skills/global_config/brag/assets/sfx/sfx-analysis.json +15584 -0
- package/skills/global_config/brag/assets/sfx/sfx-analysis.md +75 -0
- package/skills/global_config/brag/assets/sfx/ui/click1.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/click2.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/click3.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/click4.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/click5.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/mouseclick1.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/rollover1.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/rollover2.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/rollover4.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/rollover5.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch1.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch10.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch11.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch12.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch13.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch14.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch15.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch16.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch17.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch18.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch19.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch2.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch20.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch21.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch22.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch23.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch24.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch25.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch26.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch27.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch28.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch29.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch3.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch30.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch31.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch32.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch33.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch34.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch35.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch36.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch37.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch38.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch4.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch5.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch6.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch7.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch8.ogg +0 -0
- package/skills/global_config/brag/assets/sfx/ui/switch9.ogg +0 -0
- package/skills/global_config/brag/references/audio.md +307 -0
- package/skills/global_config/brag/references/step-1-inspect.md +133 -0
- package/skills/global_config/brag/references/step-2-plan.md +234 -0
- package/skills/global_config/brag/references/step-3-compose.md +210 -0
- package/skills/global_config/brag/references/step-4-deliver.md +168 -0
- package/skills/global_config/brag/references/tones.md +231 -0
- package/skills/global_config/brag/scripts/analyze_music_cues.py +309 -0
- package/skills/global_config/brag/scripts/pyproject.toml +14 -0
- package/skills/global_config/brag/scripts/uv.lock +819 -0
- package/skills/global_config/deja-memory/SKILL.md +42 -0
- package/skills/global_config/editable-design/LICENSE +202 -0
- package/skills/global_config/editable-design/README.md +34 -0
- package/skills/global_config/editable-design/SKILL.md +630 -0
- package/skills/global_config/editable-design/THIRD_PARTY_NOTICES.md +10 -0
- package/skills/global_config/editable-design/agents/openai.yaml +4 -0
- package/skills/global_config/editable-design/assets/editor/layer-editor.css +262 -0
- package/skills/global_config/editable-design/assets/editor/layer-editor.js +1929 -0
- package/skills/global_config/editable-design/assets/poster-starter/README.md +92 -0
- package/skills/global_config/editable-design/assets/poster-starter/assets/.gitkeep +0 -0
- package/skills/global_config/editable-design/assets/poster-starter/index.html +91 -0
- package/skills/global_config/editable-design/assets/poster-starter/poster.json +6 -0
- package/skills/global_config/editable-design/assets/poster-starter/reference/.gitkeep +1 -0
- package/skills/global_config/editable-design/assets/replay/icons/assets.png +0 -0
- package/skills/global_config/editable-design/assets/replay/icons/html.png +0 -0
- package/skills/global_config/editable-design/assets/replay/icons/input.png +0 -0
- package/skills/global_config/editable-design/assets/replay/icons/layers.png +0 -0
- package/skills/global_config/editable-design/assets/replay/icons/plan.png +0 -0
- package/skills/global_config/editable-design/assets/replay/icons/reference.png +0 -0
- package/skills/global_config/editable-design/assets/replay/icons/review.png +0 -0
- package/skills/global_config/editable-design/assets/replay/index.html +59 -0
- package/skills/global_config/editable-design/assets/replay/replay-motion.js +410 -0
- package/skills/global_config/editable-design/assets/replay/replay.css +380 -0
- package/skills/global_config/editable-design/assets/replay/replay.js +374 -0
- package/skills/global_config/editable-design/font-kit/package-lock.json +115 -0
- package/skills/global_config/editable-design/font-kit/package.json +19 -0
- package/skills/global_config/editable-design/pack.sh +20 -0
- package/skills/global_config/editable-design/references/asset-architecture.md +72 -0
- package/skills/global_config/editable-design/references/editor-pitfalls.md +70 -0
- package/skills/global_config/editable-design/references/editor-runtime.md +131 -0
- package/skills/global_config/editable-design/references/font-system.md +89 -0
- package/skills/global_config/editable-design/references/imagery.md +145 -0
- package/skills/global_config/editable-design/references/layout-typography.md +116 -0
- package/skills/global_config/editable-design/references/replay-contract.md +169 -0
- package/skills/global_config/editable-design/scripts/_browser.mjs +247 -0
- package/skills/global_config/editable-design/scripts/bake.mjs +87 -0
- package/skills/global_config/editable-design/scripts/build-replay.mjs +316 -0
- package/skills/global_config/editable-design/scripts/check-contract.mjs +293 -0
- package/skills/global_config/editable-design/scripts/check-fonts.sh +252 -0
- package/skills/global_config/editable-design/scripts/check-poster.sh +70 -0
- package/skills/global_config/editable-design/scripts/doctor.sh +78 -0
- package/skills/global_config/editable-design/scripts/explode.mjs +115 -0
- package/skills/global_config/editable-design/scripts/font-kit.mjs +187 -0
- package/skills/global_config/editable-design/scripts/import-asset.sh +23 -0
- package/skills/global_config/editable-design/scripts/init-poster.sh +64 -0
- package/skills/global_config/editable-design/scripts/install-font-kit.sh +13 -0
- package/skills/global_config/editable-design/scripts/package-lock.json +334 -0
- package/skills/global_config/editable-design/scripts/package.json +14 -0
- package/skills/global_config/editable-design/scripts/remove-chroma-key.py +201 -0
- package/skills/global_config/editable-design/scripts/render-poster.sh +202 -0
- package/skills/global_config/editable-design/scripts/trace.sh +159 -0
- package/skills/global_config/editable-design/scripts/verify-replay.mjs +97 -0
- package/skills/global_config/editable-design/scripts/verify.mjs +782 -0
- package/skills/global_config/editable-design/scripts/wire-editor.mjs +104 -0
- package/skills/global_config/editable-design/tests/fixtures/small-explode/index.html +86 -0
- package/skills/global_config/mcsc/SKILL.md +60 -0
- package/skills/global_config/plan-canvas/SKILL.md +8 -0
- package/skills/global_config/plan-canvas/scripts/lib/plan-canvas/server.js +31 -6
- package/skills/global_config/plan-canvas/scripts/plan-canvas.js +4 -2
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# 已知陷阱清单
|
|
2
|
+
|
|
3
|
+
全部为实际踩到并修复的问题,编辑器外壳里已处理。**遇到偏差不为 0 或功能异常时
|
|
4
|
+
先查这里**,不要重写外壳。
|
|
5
|
+
|
|
6
|
+
## 固化阶段
|
|
7
|
+
|
|
8
|
+
| # | 陷阱 | 处理 |
|
|
9
|
+
|---|---|---|
|
|
10
|
+
| T1 | 边量边改导致后续元素上跳 | 严格两趟:先全量测量并缓存,再统一写入 |
|
|
11
|
+
| T2 | 图层抽走后容器塌陷。尤以 `bottom` 定位的容器为害:高度一塌,容器整体下移,容器内**未被抽走的**元素(如分隔线)跟着跑位 | 测量阶段一并记录所有「含图层的祖先容器」,在抽离前把 `width/height` 钉死 |
|
|
12
|
+
| T3 | `margin` 残留。文档流元素靠 `margin-top` 排版,转 absolute 后 margin 仍生效,元素在新坐标基础上再偏移 | 写入时统一 `margin:0` |
|
|
13
|
+
| T4 | 把 `transform` 一律清空虽能解决 `translateX(-50%)` 的重复偏移,却会抹掉邮戳、回形针、手写贴纸等设计旋转 | 分别保存未变换布局尺寸、computed transform 与 transform-origin;提升后重施矩阵,再用可见包围盒差值反算 `left/top` |
|
|
14
|
+
| T5 | `right` / `bottom` 定位的元素改 `left/top` 无效 | 写入 `left/top` 的同时把 `right/bottom` 置 `auto` |
|
|
15
|
+
| T6 | z-index 与上下文样式丢失。元素移出原容器后,`.dark-card .label` 等祖先选择器不再命中;模块底色、图片、未标分隔线和 copy 的绘制次序也可能翻转 | 提升前保存发生变化的 computed/pseudo 样式并最小化内联;按顶层 stacking 顺序分配 z 段,区分“容器自身是 surface”与“独立 surface 叶子”两种模块 |
|
|
16
|
+
| T7 | 宽度塌缩。文档流元素宽度由父容器给定,转 absolute 后塌成 `fit-content`,文字重新换行 | 写入测得的 `width` |
|
|
17
|
+
| T8 | 字体未加载完就测量,量到的是 fallback 字体的坐标,落盘后整个版面偏移 | 固化前 `await document.fonts.ready` |
|
|
18
|
+
| T9 | 图片未加载完就测量(高度为 0)。**加载失败也必须放行**,否则一张坏图卡死整个编辑器 | 等待所有 `img` 的 `load` 与 `error` |
|
|
19
|
+
| T10 | DOM 提升顺序反转。多个图层依次插入同一锚点后顺序会颠倒,绘制次序随之改变 | 每组维护滚动锚点,插入后把锚点更新为刚插入的元素 |
|
|
20
|
+
| T11 | 被抽空的容器仍会捕获 pointer 事件,挡住下方图层 | 锁尺寸时一并设 `pointer-events:none` |
|
|
21
|
+
|
|
22
|
+
## 交互阶段
|
|
23
|
+
|
|
24
|
+
| # | 陷阱 | 处理 |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| T12 | **`pointerdown` 里调 `preventDefault()` 会抑制后续 `click` / `dblclick`**(Pointer Events 规范:阻止默认行为会连带抑制兼容鼠标事件)。表现为双击完全无法进入文本编辑 | 不在 `pointerdown` 阻止默认行为;防止拖拽误选文字改为「移动超过阈值后再设 `user-select:none`」 |
|
|
27
|
+
| T13 | **`setPointerCapture` 会把后续 `click` / `dblclick` 的 `target` 重定向到捕获元素**。表现为双击图层内的子元素时 `e.target` 变成整个图层,找不到文本槽。若图层自身恰好就是文本槽则「碰巧能用」,极具误导性 | ① 指针捕获推迟到确认拖拽之后;② `dblclick` 不信任 `e.target`,改用 `document.elementFromPoint()` 重新命中 |
|
|
28
|
+
| T14 | 画布整体 `scale` 后屏幕位移与画布位移不等,不换算则拖拽明显不跟手 | `dx = (e.clientX - startX) / scale` |
|
|
29
|
+
| T15 | 文本编辑态下方向键同时移动光标和图层 | 编辑态的 keydown 在 capture 阶段 `stopPropagation()` |
|
|
30
|
+
| T16 | **中文输入法**:组字期间 Esc 是「取消候选词」、Enter 是「上屏」。不区分则用户打字打到一半就被踢出编辑态 | 按键处理第一行即 `if (e.isComposing \|\| e.keyCode === 229) return;` |
|
|
31
|
+
| T17 | 文本编辑粒度若取整个图层,多字号拼排结构会被破坏(如价格由 `.cup`/`.num`/`.yuan` 三个不同字号字色的 span 拼成,整块 `contenteditable` 时一个退格即崩) | 编辑单元下沉到**文本槽**:图层内部只承载文字的叶子节点;图文混排节点整体算一个槽;SVG 子树排除 |
|
|
32
|
+
| T18 | 从外部粘贴带格式内容会把 HTML 污染进海报 | `contenteditable="plaintext-only"` |
|
|
33
|
+
| T19 | 文字改长或字号变大后被固化宽度挤到换行;但用户手动缩窄文本框时又确实需要换行 | 默认提交时按需扩宽且**不主动收窄**;一旦用户使用宽度手柄,就标记为手动宽度,后续文字与字号编辑保留该宽度 |
|
|
34
|
+
| T23 | `documentElement` 上的 `data-hf-ready` 标记会被 `cloneNode` 带进导出物 | 导出时移除所有 `data-hf-*` 属性(含 `<html>` 自身) |
|
|
35
|
+
|
|
36
|
+
## 测试与环境
|
|
37
|
+
|
|
38
|
+
| # | 陷阱 | 处理 |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| T20 | **Puppeteer 的 `clickCount: 2` 不产生 `dblclick`**。它只设置参数、不真的按两次,`detail` 恒为 1,浏览器不合成双击。会误判成功能 bug | 手动发两轮 down/up,第二轮传 `clickCount: 2`,此时 `detail=2`、`dblclick` 正常派发 |
|
|
41
|
+
| T21 | headless Chrome 启动被用户已开着的实例干扰,报 `Timed out waiting for the WS endpoint URL` | 每次用全新的临时 `--user-data-dir`(顺带保证 localStorage 干净,草稿不干扰固化) |
|
|
42
|
+
| T22 | 断言「导出物无编辑器残留」时,注入的 **HTML 注释节点**不会被 `querySelectorAll` 删除 | 用 `TreeWalker(SHOW_COMMENT)` 一并清理(当前外壳改为动态创建 DOM,已不注入注释) |
|
|
43
|
+
| T24 | `document.fonts` 含**所有**声明的 `@font-face`,未被使用的(如仅作 fallback 列出的字体)一直是 `unloaded`,这是按需加载的正常行为 | 断言只用 `document.fonts.status === 'loaded'`,不要求每个 FontFace 都 loaded |
|
|
44
|
+
| T25 | Google Fonts 把中文字体切成上百个 `unicode-range` 分片,同一 family 下必然部分 loaded 部分 unloaded | 判断一个 family 是否真的没用上,要看「是否**没有任何**分片被加载」 |
|
|
45
|
+
| T26 | 契约检查里把图层的祖先容器误报成「漏标 `data-layer-id`」——容器本身没有 layer-id,但它只是包装 | 候选块需额外排除「内部含 `[data-layer-id]`」的元素 |
|
|
46
|
+
| T27 | 拆解视图开启后原画布被 `display:none`,此时再次下载拆解稿若现场读 `offsetWidth/Height` 会全部得到 0,导出空稿 | 进入拆解态前缓存每层几何;隐藏后导出使用缓存,不重新测量不可见画布 |
|
|
47
|
+
| T28 | 用随机数或直接动画 `left/top` 做拆解,会让每次录制位置不同、截图中途态漂移,并破坏确定性验收;系统“减少动态效果”下还可能卡在初始态 | 终态只由确定性 `left/top` 决定;动画仅叠加 Web Animations 的 `transform/opacity/filter`,结束后取消动画回到 CSS 终态;支持 `prefers-reduced-motion` 与 `?motion=0`,独立稿动画完成后才设置 ready 锚点 |
|
|
48
|
+
| T29 | 拆解舞台过宽会让扫描原稿骤缩;列数太少又会把组件挤成细小侧注 | 使用平衡舞台 `max(1.7×画布宽, 1.275×画布高)`;扫描原点保留编辑态高度至少约 68%,终态按组件数自动使用 2–5 列,并分别约束总览、背景和内容组件的缩放 |
|
|
49
|
+
| T30 | 先播放扫描、之后才创建拆解动画,会让图层在扫描期间提前闪到最终位置;扫描层若未纳入统一结束处理,也会残留遮罩或卡住 ready | 首帧即创建全部 WAAPI:利用 `delay + fill:both` 把图层钉在成稿位置,扫描尾段与散开重叠;扫描层置于独立高层且终帧透明,统一等待和取消;reduced-motion / `?motion=0` 直接跳到终态 |
|
|
50
|
+
| T31 | 只比较 `getBoundingClientRect()` 会把“坐标没变、底色/伪元素/图片/层级已丢”的稿件误判为零偏差 | A 类验收同时截取原稿与 baked 稿做像素比较;几何比较负责定位,像素比较负责视觉真值 |
|
|
51
|
+
| T32 | 海报画布用渐变纸张而 `background-color:transparent` 时,直接读 backgroundColor 会得到透明黑并把拆解舞台误判成黑色 | 优先读取不透明背景色;透明时解析 background-image 中的近不透明颜色,再回退页面底色/暖白 |
|
|
52
|
+
| T33 | 中央常驻完整成稿或大幅空背景,会让终态看起来没有真正拆开并制造无意义留白;继续钻取第二层又会产生过细采集 | 动画起点把组件叠回完整成稿;终态把完整总览、未标记背景和一级内容全部缩成画廊组件,中央不留固定基底,也不提供第二级叶子钻取 |
|
|
53
|
+
| T34 | 从 Grid/Flex 模块容器中直接删除非目标兄弟,会让目标卡自动补位;按原坐标裁切时卡片底色消失,只剩已提升的文字/图标 | 非目标模块改用 `visibility:hidden` 保留布局占位,随后再移除其叶子;不要删除决定轨道位置的兄弟包装 |
|
|
54
|
+
| T35 | FLIP 散开动画把整个模块从扫描原点移动到画廊时,模块说明标签也会随父项同步缩放,运动中变成遮住海报的巨型省略文字;即使停稳后全部常驻,也会重复模块内已有标题 | 模块标签默认隐藏;仅在舞台停稳且用户悬停/聚焦具体模块时淡入,离开即隐藏。名称仍保存在 `title` 中供发现,但不污染扫描动画或静止拆解稿 |
|
|
55
|
+
| T36 | 分组容器只包绝对定位叶子时自身宽高可能为 0,按容器盒裁切会把模块压成不可见细条;一级有效组件过少时画廊也显得空 | 分组盒无效或远小于成员联合边界时回退到成员几何并集;一级内容组件少于 5 个时,把分组内有文字且非 surface/image/icon/decoration 的叶子作为同级补充 tile,保持一级结构不增加钻取层级 |
|
|
56
|
+
| T37 | 把缩放手柄画在已整体 `scale()` 的画布内,会让点击区域随缩放变小;用图层伪元素又无法可靠接收独立的八向拖拽;可见角点若同时就是命中区,在高密度海报上仍很难点中 | 在未缩放舞台中维护独立选框:显示坐标乘 `scale`,指针位移除以 `scale`;手柄使用约 32px 的透明命中区包住 12px 可见标记;进入文字编辑或拆解视图时隐藏,导出时彻底移除 |
|
|
57
|
+
| T38 | 在真正拖动前尚未建立 pointer capture;此时若指针在画布外松开、窗口失焦或浏览器取消手势,`pointerup` 可能不到达画布,旧手势会保持 armed,鼠标回来后图层继续跟随 | 在 window capture 阶段兜底处理 `pointerup/pointercancel`,监听 `lostpointercapture`、窗口失焦和页面隐藏;`pointermove` 发现主键已松开就立即结束;`Esc` 取消并恢复本次手势,下一次 pointerdown 先终止任何残留手势 |
|
|
58
|
+
|
|
59
|
+
## 诊断偏差不为 0
|
|
60
|
+
|
|
61
|
+
`bake.mjs` 报偏差时,按可能性排序检查:
|
|
62
|
+
|
|
63
|
+
1. 契约未满足 —— 先跑 `check-contract.mjs`,十有八九是 `vw/vh/%` 或字体没等到
|
|
64
|
+
2. 上表 T1–T11 未覆盖的布局:`float`、`position:sticky`、伪元素撑开高度、
|
|
65
|
+
`writing-mode`、CSS `columns`、`subgrid`
|
|
66
|
+
3. 图层之间有重叠依赖(一个图层的位置由另一个图层的内容高度决定)
|
|
67
|
+
|
|
68
|
+
定位方法:`bake.mjs` 的输出逐图层列出了原始与固化后坐标,先看**哪些图层偏了、
|
|
69
|
+
偏移量是否相同**。同一容器内的图层偏移量一致,通常是 T2 容器塌陷;单个图层偏移
|
|
70
|
+
等于某个 margin 值,是 T3;旋转饰物的包围盒与角度不一致,是 T4。
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# Editor and exploded views
|
|
2
|
+
|
|
3
|
+
Read this when wiring, validating, baking, or diagnosing the bundled poster
|
|
4
|
+
editor. `poster-building` is the only required skill; no separate editor skill
|
|
5
|
+
or runtime is needed.
|
|
6
|
+
|
|
7
|
+
## Ownership and delivery
|
|
8
|
+
|
|
9
|
+
- `assets/editor/layer-editor.css` and `layer-editor.js` are the canonical
|
|
10
|
+
runtime. Do not rewrite them per poster.
|
|
11
|
+
- `scripts/init-poster.sh` copies that runtime into
|
|
12
|
+
`PROJECT/scripts/editor-assets/`.
|
|
13
|
+
- `PROJECT/scripts/wire-editor.mjs` copies the runtime beside `index.html` and
|
|
14
|
+
creates `editor.html` without modifying `index.html`.
|
|
15
|
+
- The finished project remains offline and self-contained. Editor controls never
|
|
16
|
+
enter the PNG because rendering always targets `index.html`.
|
|
17
|
+
|
|
18
|
+
## First use of validation tools
|
|
19
|
+
|
|
20
|
+
The browser-driven validation tools need `puppeteer-core`. Install it once in
|
|
21
|
+
the skill's `scripts/` directory:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm ci --prefix <poster-building-skill>/scripts
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The interactive `editor.html` itself needs no installation and no local server.
|
|
28
|
+
|
|
29
|
+
## Contract and wiring
|
|
30
|
+
|
|
31
|
+
Run the poster's normal static check first. For a browser-measured compatibility
|
|
32
|
+
preflight before the first render, then wire and verify from any directory with
|
|
33
|
+
absolute paths:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
node <poster-building-skill>/scripts/check-contract.mjs PROJECT/index.html
|
|
37
|
+
node PROJECT/scripts/wire-editor.mjs PROJECT/index.html
|
|
38
|
+
node <poster-building-skill>/scripts/verify.mjs PROJECT/index.html
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Fix every contract or verification failure before delivery. Do not patch the
|
|
42
|
+
editor runtime around a poster-specific violation. Verification compares both
|
|
43
|
+
layer geometry and rendered pixels: matching rectangles alone cannot detect a
|
|
44
|
+
lost card surface, contextual style, pseudo-element, blend, or paint order.
|
|
45
|
+
|
|
46
|
+
The poster authoring contract is defined in `SKILL.md`; this reference owns only
|
|
47
|
+
runtime wiring, verification, baking, and diagnosis.
|
|
48
|
+
|
|
49
|
+
## Standalone exploded view
|
|
50
|
+
|
|
51
|
+
`editor.html` already provides scan, one-level content spreading,
|
|
52
|
+
reverse-collapse, and download controls. Every poster also ships a standalone
|
|
53
|
+
`layers.html`. Groups appear as whole modules; ungrouped content appears as
|
|
54
|
+
individual units. If that produces fewer than five primary content units, the
|
|
55
|
+
gallery keeps those modules and additionally promotes their grouped text leaves
|
|
56
|
+
to companion units. This is a one-level density fallback, not a second-level
|
|
57
|
+
drilldown. The normal
|
|
58
|
+
`verify.mjs` run writes the verified file without another browser launch.
|
|
59
|
+
Use `explode.mjs` only to regenerate it separately while diagnosing a failure:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
node <poster-building-skill>/scripts/explode.mjs PROJECT/index.html
|
|
63
|
+
node <poster-building-skill>/scripts/explode.mjs PROJECT/index.html PROJECT/layers.html
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The exported view contains a small complete-composition overview, a small tile
|
|
67
|
+
for the unmarked paper/texture/fixed frame, whole content modules, and ungrouped
|
|
68
|
+
units. They spread into a 2–5 column component gallery with no
|
|
69
|
+
permanent central base. At the animation origin all tiles overlap at their
|
|
70
|
+
original coordinates, so the complete poster is reconstructed before it
|
|
71
|
+
separates. Text, images, and SVG remain DOM clones. The stage follows the
|
|
72
|
+
poster's actual paper or background tone, including dark hues, instead of
|
|
73
|
+
collapsing every dark poster to generic black. This preserves the intended
|
|
74
|
+
contrast of thin and low-opacity layers. In isolated content tiles only,
|
|
75
|
+
computed opacity below 0.55 receives a bounded presentation boost; the complete
|
|
76
|
+
overview remains visually faithful to the poster. It is a presentation artifact,
|
|
77
|
+
not a second editor.
|
|
78
|
+
Continue editing in `editor.html`.
|
|
79
|
+
|
|
80
|
+
The transition uses a scan beam followed by deterministic FLIP-style spreading.
|
|
81
|
+
Only `transform`, `opacity`, and `filter` animate; final `left` and `top` remain
|
|
82
|
+
deterministic. `prefers-reduced-motion` is respected, and `?motion=0` opens at a
|
|
83
|
+
stable end state for screenshots and automated review, with the replay-animation
|
|
84
|
+
control hidden because there is no motion to replay.
|
|
85
|
+
|
|
86
|
+
The settled view uses the center as part of the gallery. Column count depends
|
|
87
|
+
only on the effective component count after the small-gallery text fallback;
|
|
88
|
+
original horizontal position is a light placement preference, and visual weight
|
|
89
|
+
balances the columns. There is no second detailed collection pass.
|
|
90
|
+
|
|
91
|
+
## Optional offline bake
|
|
92
|
+
|
|
93
|
+
Use baking only when a stable, absolute-positioned source is useful for CI or
|
|
94
|
+
future editing:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
node <poster-building-skill>/scripts/bake.mjs PROJECT/index.html
|
|
98
|
+
node <poster-building-skill>/scripts/bake.mjs PROJECT/index.html --in-place
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
The in-place form overwrites the source, so use it only when that exact target
|
|
102
|
+
is intended and recoverable. Baking must not land when any layer drifts by more
|
|
103
|
+
than 1px.
|
|
104
|
+
|
|
105
|
+
## Editor scope
|
|
106
|
+
|
|
107
|
+
The editor supports dragging, alignment snapping, arrow-key nudging, eight-handle
|
|
108
|
+
resizing, plain-text editing, proportional font scaling, switching among
|
|
109
|
+
declared font stacks, delete, undo, local drafts, scan/explode/collapse, and
|
|
110
|
+
clean normal or exploded HTML downloads. Left and right handles change width,
|
|
111
|
+
top and bottom handles change height, and corners change both. A width set by a
|
|
112
|
+
handle remains fixed during later text or font-size edits so wrapping follows
|
|
113
|
+
the user's chosen box; resize state participates in undo, draft restore, reset,
|
|
114
|
+
position-CSS export, and clean HTML export.
|
|
115
|
+
|
|
116
|
+
Pointer gestures must always have an exit path. Releasing anywhere, pointer
|
|
117
|
+
cancellation, capture loss, window blur, or hiding the page ends the active
|
|
118
|
+
gesture. Pressing Escape during a drag or resize cancels that gesture and
|
|
119
|
+
restores its starting geometry; pressing Escape afterward clears selection.
|
|
120
|
+
|
|
121
|
+
It intentionally does not add arbitrary layers, import images, reorder the
|
|
122
|
+
stack, rotate, recolor, or expose full typography controls. It is for human
|
|
123
|
+
micro-adjustments after design, not for redesigning the poster.
|
|
124
|
+
|
|
125
|
+
The automation anchor is `html[data-hf-ready]`. The public API is
|
|
126
|
+
`window.__layerEditor`, including `fullHTML()`, `explodedHTML()`, `download()`,
|
|
127
|
+
`downloadExploded()`, `undo()`, `select()`, `scaleFont()`, `setFont()`,
|
|
128
|
+
`removeLayer()`, `setExploded()`, `layers()`, and `state`.
|
|
129
|
+
|
|
130
|
+
When validation reports drift or an interaction fails, read
|
|
131
|
+
[Editor pitfalls](editor-pitfalls.md) before changing the runtime.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Font system
|
|
2
|
+
|
|
3
|
+
Read this when typography carries the design, when the brief needs a distinctive
|
|
4
|
+
editorial voice, or when the visual editor needs more useful alternatives than
|
|
5
|
+
the platform defaults.
|
|
6
|
+
|
|
7
|
+
## Two different counts
|
|
8
|
+
|
|
9
|
+
The **active type system** and the **editable font palette** are not the same.
|
|
10
|
+
|
|
11
|
+
- A finished poster normally uses two or three families: one display voice, one
|
|
12
|
+
text voice, and optionally one utility or accent voice.
|
|
13
|
+
- The editor may expose three to five verified font variables so a user has
|
|
14
|
+
meaningful alternatives. Do not use every exposed family in the composition.
|
|
15
|
+
|
|
16
|
+
For a poster, cover, flyer, or campaign, declare at least three meaningfully
|
|
17
|
+
different selectable font roles unless the brief deliberately specifies a
|
|
18
|
+
single-family identity. A body sans, another nearly identical sans, and the
|
|
19
|
+
same sans at a different weight are not three roles.
|
|
20
|
+
|
|
21
|
+
## Curated self-hosted kit
|
|
22
|
+
|
|
23
|
+
The optional font kit uses versioned Fontsource packages and local WOFF2 files.
|
|
24
|
+
Install it once:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
scripts/install-font-kit.sh
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Inspect the available design roles:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
node scripts/font-kit.mjs list
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Add only the selected families to a poster. The command copies the required
|
|
37
|
+
WOFF2 files and license into `assets/fonts/`, injects local `@font-face` rules,
|
|
38
|
+
and exposes a `--font-kit-*` variable to the editor:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
node scripts/font-kit.mjs add editorial-serif index.html
|
|
42
|
+
node scripts/font-kit.mjs add clean-sans index.html
|
|
43
|
+
node scripts/font-kit.mjs add cjk-serif index.html
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Available roles:
|
|
47
|
+
|
|
48
|
+
| ID | Voice | Best use |
|
|
49
|
+
| --- | --- | --- |
|
|
50
|
+
| `editorial-serif` | Fraunces Variable | expressive editorial and cultural headlines |
|
|
51
|
+
| `luxury-serif` | Bodoni Moda Variable | fashion, beauty, luxury, magazine covers |
|
|
52
|
+
| `clean-sans` | Instrument Sans Variable | refined campaigns and editorial body copy |
|
|
53
|
+
| `geometric-sans` | Space Grotesk Variable | technology, information, contemporary labels |
|
|
54
|
+
| `condensed-sans` | Roboto Condensed Variable | dense layouts, deck lines, prices, utilities |
|
|
55
|
+
| `experimental-display` | Unbounded Variable | art, music, youth, experimental display |
|
|
56
|
+
| `cjk-sans` | Noto Sans SC Variable | Chinese body copy, campaigns, information design |
|
|
57
|
+
| `cjk-serif` | Noto Serif SC Variable | Chinese editorial, culture, literature, premium display |
|
|
58
|
+
| `cjk-calligraphy` | Ma Shan Zheng | short Chinese handwritten accents and titles |
|
|
59
|
+
| `cjk-display` | ZCOOL XiaoWei | distinctive Chinese editorial display titles |
|
|
60
|
+
|
|
61
|
+
Self-hosted fonts are preferred when reproducibility matters. System fonts may
|
|
62
|
+
still be used when their exact voice is appropriate and `check-fonts.sh`
|
|
63
|
+
confirms they are installed.
|
|
64
|
+
|
|
65
|
+
## Pairing by contrast
|
|
66
|
+
|
|
67
|
+
Choose pairs that differ in structure, not merely in weight:
|
|
68
|
+
|
|
69
|
+
- luxury campaign: `luxury-serif` + `clean-sans`
|
|
70
|
+
- editorial or culture: `editorial-serif` + `clean-sans`
|
|
71
|
+
- technical information: `geometric-sans` + `condensed-sans`
|
|
72
|
+
- Chinese editorial: `cjk-serif` + `cjk-sans`, optionally a Latin display face
|
|
73
|
+
- Chinese expressive poster: `cjk-display` or `cjk-calligraphy` for short display
|
|
74
|
+
copy, with `cjk-sans` or `cjk-serif` for everything longer
|
|
75
|
+
- experimental art: `experimental-display` + a quiet sans or serif
|
|
76
|
+
|
|
77
|
+
Do not set paragraphs in a display or calligraphic face. Do not use synthetic
|
|
78
|
+
bold or italics on CJK fonts that do not supply those styles. Mixed Chinese and
|
|
79
|
+
Latin display lines may use separate editable spans when the intended Latin
|
|
80
|
+
voice would otherwise disappear behind the CJK family.
|
|
81
|
+
|
|
82
|
+
## Shipping rules
|
|
83
|
+
|
|
84
|
+
- Use local relative font URLs only; never depend on Google Fonts or another
|
|
85
|
+
runtime network request.
|
|
86
|
+
- Copy only fonts selected for the current design.
|
|
87
|
+
- Keep each copied `LICENSE.txt` with its font files.
|
|
88
|
+
- Run `scripts/check-fonts.sh index.html` after font injection and before render.
|
|
89
|
+
- Wait for `document.fonts.ready` before measuring, baking, or capturing.
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Imagery
|
|
2
|
+
|
|
3
|
+
Read this before writing any shipping-asset prompt, and again when generated
|
|
4
|
+
artwork comes back wrong: lettering appeared in the image, the composition does
|
|
5
|
+
not match its slot, a band that should be empty has objects in it, a cutout has
|
|
6
|
+
a dirty matte, or the crop does not fit its planned region. [SKILL.md](../SKILL.md)
|
|
7
|
+
owns asset topology, count, batching, and import policy; this reference owns
|
|
8
|
+
prompt construction and returned-image diagnostics.
|
|
9
|
+
|
|
10
|
+
## Reserved space: describe appearance only
|
|
11
|
+
|
|
12
|
+
Work out which regions text will cover, then **describe those regions purely by
|
|
13
|
+
their physical properties**:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
WRONG: "leave clean dark negative space at the top for the headline"
|
|
17
|
+
RIGHT: "the top third is a continuous, low-detail, darker sky with no objects,
|
|
18
|
+
symbols, borders, or high-contrast marks in it"
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Measured: naming the occupant produced an artefact 10 times out of 10;
|
|
22
|
+
describing appearance only, 0 times out of 13.** Holds across two scenes and two
|
|
23
|
+
framing nouns.
|
|
24
|
+
|
|
25
|
+
The trigger phrases are "for the headline", "space for the logo", "room for the
|
|
26
|
+
price", "space for copy". Tell the model something goes there and it draws
|
|
27
|
+
something — sometimes real lettering, sometimes an empty oval or bar. The second
|
|
28
|
+
is just as harmful: your HTML text lands on it and both become unreadable.
|
|
29
|
+
|
|
30
|
+
Say what the region **is**: sky, a wall, blurred foliage, flat shadow, an even
|
|
31
|
+
wash of paper — and that it is empty and uniform.
|
|
32
|
+
|
|
33
|
+
## A stated proportion is an intent, not a contract
|
|
34
|
+
|
|
35
|
+
Naming a share of the frame gets you a region of roughly that kind, not a region
|
|
36
|
+
of that size. Measured across two backdrops from the same model: one asked for a
|
|
37
|
+
clean right-hand 16 percent and got 22 percent; the other asked for 34 percent and
|
|
38
|
+
got **11**. Over-delivery and under-delivery, same wording pattern, same backend.
|
|
39
|
+
|
|
40
|
+
So never lay out against the number you asked for. Either measure the generated
|
|
41
|
+
backdrop before writing any coordinates — scan it in horizontal or vertical strips
|
|
42
|
+
and find where the ink actually starts — or leave far more margin than the layout
|
|
43
|
+
needs and accept the wasted space. A layout that survives only because the margin
|
|
44
|
+
happened to be generous was saved by luck, not by planning.
|
|
45
|
+
|
|
46
|
+
## Band phrasing
|
|
47
|
+
|
|
48
|
+
Describe a full-bleed backdrop as horizontal bands, one sentence each, giving
|
|
49
|
+
four things: position and share of the height, the material, the brightness, and
|
|
50
|
+
the detail density.
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
The composition reads as three horizontal bands.
|
|
54
|
+
Top 35 percent: an unbroken, even, pale grey-white fog sky, completely smooth
|
|
55
|
+
and uniform, no clouds, no birds, no sun disc, no objects, no marks, and no
|
|
56
|
+
high-contrast detail anywhere in it.
|
|
57
|
+
Middle band, about 37 percent of the height: layered ridgelines of tea terraces
|
|
58
|
+
receding into mist, dark blue-green silhouettes, soft atmospheric perspective,
|
|
59
|
+
the strongest detail of the whole frame concentrated here.
|
|
60
|
+
Bottom 28 percent: a flat, even wash of low-lying pale mist, extremely low
|
|
61
|
+
texture, uniform brightness, empty.
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Two to four bands are both reasonable; let the layout decide. Bands that will
|
|
65
|
+
carry text need brightness well separated from the text colour. Bands that carry
|
|
66
|
+
no text are where the subject and the detail belong.
|
|
67
|
+
|
|
68
|
+
**Write the prompt in English even when the poster is in another language.**
|
|
69
|
+
Image models follow English more reliably and the prompt never appears in the
|
|
70
|
+
poster.
|
|
71
|
+
|
|
72
|
+
Note the difference between the "no clouds, no birds, no objects" above and a
|
|
73
|
+
negative instruction. Those clauses modify something already described
|
|
74
|
+
positively — they say how clean that fog sky is. "no text" modifies nothing.
|
|
75
|
+
|
|
76
|
+
## Negative instructions do not work
|
|
77
|
+
|
|
78
|
+
"no text, no lettering" has been measured to have no effect. Most current
|
|
79
|
+
image backends are not diffusion models: a diffusion model's negative prompt
|
|
80
|
+
genuinely subtracts a negative embedding inside CFG, whereas a multimodal model
|
|
81
|
+
generating an image has no such channel — the negation is just a few more tokens,
|
|
82
|
+
and models handle negation poorly to begin with.
|
|
83
|
+
|
|
84
|
+
Describing appearance is the mechanism that actually works.
|
|
85
|
+
|
|
86
|
+
## Size
|
|
87
|
+
|
|
88
|
+
**Use the size parameter when the tool has one; do not describe the frame in
|
|
89
|
+
prose.** A parameter is deterministic, prose is probabilistic.
|
|
90
|
+
|
|
91
|
+
- A full-bleed image gets the canvas proportions
|
|
92
|
+
- Slot artwork gets the slot's own dimensions
|
|
93
|
+
- If the tool only accepts an aspect ratio, give the ratio
|
|
94
|
+
- With no size control at all, the frame can only be implied in prose ("tall
|
|
95
|
+
vertical portrait composition"), and the same prompt may return 1408x768 one
|
|
96
|
+
time and 896x1200 the next. Expect to retry
|
|
97
|
+
|
|
98
|
+
When the returned image has the wrong proportions, crop it deliberately with
|
|
99
|
+
`object-fit` and `object-position`; never let it stretch. **Crop toward the bands
|
|
100
|
+
that carry no text** — keep the flat band the headline sits on and give up the
|
|
101
|
+
one nothing lands on.
|
|
102
|
+
|
|
103
|
+
## Transparent assets
|
|
104
|
+
|
|
105
|
+
Native transparency is an output control, not a visual prompt style. Follow the
|
|
106
|
+
active image-generation capability's transparency workflow. When the active
|
|
107
|
+
surface exposes a background parameter, pass `transparent` explicitly and use
|
|
108
|
+
PNG or WebP; do not rely on prompt wording alone. In the default Codex ImageGen
|
|
109
|
+
path, if no background parameter is exposed, ask for a genuinely transparent
|
|
110
|
+
background, never describe a checkerboard, preserve any returned alpha channel,
|
|
111
|
+
and treat the result as provisional until inspected.
|
|
112
|
+
|
|
113
|
+
Before importing a transparent asset, confirm that the file has an alpha channel
|
|
114
|
+
and that its empty corners are transparent. An RGB file that visibly contains a
|
|
115
|
+
checkerboard has baked pixels, not transparency. If the subject is correct but
|
|
116
|
+
the alpha check fails, do not spend another generation retry on the same subject:
|
|
117
|
+
use deterministic local alpha extraction when the edges permit it, or switch to
|
|
118
|
+
an explicitly authorized API/CLI path that can pass `background=transparent`.
|
|
119
|
+
|
|
120
|
+
Generate each independently movable cutout as its own file. One call containing
|
|
121
|
+
several separated subjects still returns one bitmap and does not create several
|
|
122
|
+
transparent assets.
|
|
123
|
+
|
|
124
|
+
Ask for a compact subject with room around it so it can be positioned and
|
|
125
|
+
cropped cleanly.
|
|
126
|
+
|
|
127
|
+
## Contrast where text sits over artwork
|
|
128
|
+
|
|
129
|
+
Use an explicit treatment sized to the text block: a solid panel, a scrim, or a
|
|
130
|
+
directional gradient. Do not count on the image being dark enough exactly where
|
|
131
|
+
you need it — change the scale and it no longer is.
|
|
132
|
+
|
|
133
|
+
Watch the edges of a scrim: the hard edge of a semi-transparent rectangle is
|
|
134
|
+
visible in the render. Either run it to the canvas edge or fade it out.
|
|
135
|
+
|
|
136
|
+
## Controllable and not
|
|
137
|
+
|
|
138
|
+
**Controllable**: the prose description, reference images (image-to-image and
|
|
139
|
+
local edits), cutouts, output size or ratio.
|
|
140
|
+
|
|
141
|
+
**Not controllable**: seed and reproducibility (the same prompt differs every
|
|
142
|
+
time; retrying is the only lever), negative prompts, or several independently
|
|
143
|
+
editable files from one built-in call.
|
|
144
|
+
|
|
145
|
+
Neither column depends on which image tool is behind it.
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Layout and typography
|
|
2
|
+
|
|
3
|
+
Read this before writing HTML when the layout is unclear, and again when the
|
|
4
|
+
render is "correct everywhere but does not look designed". The "Shape the poster"
|
|
5
|
+
section of [SKILL.md](../SKILL.md) is the entry point.
|
|
6
|
+
|
|
7
|
+
A poster is read from a distance, scanned once, and taken in a fixed order.
|
|
8
|
+
Everything below serves that.
|
|
9
|
+
|
|
10
|
+
## Layout
|
|
11
|
+
|
|
12
|
+
**Hierarchy is the whole job.** A viewer should absorb a poster in three passes:
|
|
13
|
+
the hook, then the claim, then the detail. Build that staircase with size,
|
|
14
|
+
weight, colour, and white space, and make the steps genuinely different. Two
|
|
15
|
+
elements of similar visual weight compete and both lose. Emphasising everything
|
|
16
|
+
emphasises nothing.
|
|
17
|
+
|
|
18
|
+
**White space is structure, not what is left over.** Generous, deliberate margins
|
|
19
|
+
and gutters are the line between a designed poster and a filled one.
|
|
20
|
+
|
|
21
|
+
**Align to a grid.** Fix the margins and columns first, then place everything on
|
|
22
|
+
them. Optical alignment beats an offset you typed from memory; an edge that is
|
|
23
|
+
almost aligned reads as a mistake.
|
|
24
|
+
|
|
25
|
+
**Control the palette by role, not count.** Define the field, text, accent, and
|
|
26
|
+
semantic roles first. A restrained poster may need very few colours; a brand,
|
|
27
|
+
reference-led, or information-dense poster may need more. Every colour must
|
|
28
|
+
have a compositional or semantic job.
|
|
29
|
+
|
|
30
|
+
**Commit to one direction** — editorial, luxury, brutalist, playful, technical.
|
|
31
|
+
Pick one and let it drive every decision. A poster hedging between two reads as
|
|
32
|
+
neither.
|
|
33
|
+
|
|
34
|
+
**Anti-patterns:**
|
|
35
|
+
|
|
36
|
+
- Centring everything by default
|
|
37
|
+
- Equal spacing between unrelated blocks, flattening the hierarchy
|
|
38
|
+
- Text straight over busy artwork with no contrast treatment
|
|
39
|
+
- Borders, badges, and rules filling space in place of real structure
|
|
40
|
+
- Drop shadows and gradients patching a weak layout
|
|
41
|
+
- Marketplace styling: starbursts, unmotivated diagonal ribbons, clip art
|
|
42
|
+
|
|
43
|
+
A poster should look considered at full size and still read structurally as a
|
|
44
|
+
thumbnail.
|
|
45
|
+
|
|
46
|
+
## Working with the backdrop
|
|
47
|
+
|
|
48
|
+
Once the full-bleed backdrop exists, you are not laying out on white paper — you
|
|
49
|
+
are laying out on that image's bands.
|
|
50
|
+
|
|
51
|
+
- Text blocks land on the **flat** bands; the subject and the detail keep their own
|
|
52
|
+
- Let the text margins breathe with the image's composition; do not run type
|
|
53
|
+
along the edge of the subject
|
|
54
|
+
- More than two levels of hierarchy inside one band wastes the flatness you
|
|
55
|
+
asked the band for
|
|
56
|
+
- If the backdrop changes, revisit the layout. The same coordinates rarely hold
|
|
57
|
+
on a different image
|
|
58
|
+
|
|
59
|
+
## Typography
|
|
60
|
+
|
|
61
|
+
Declare font stacks as custom properties on `:root` and reference them
|
|
62
|
+
throughout. Give every family a distinct job and valid script coverage. Add a
|
|
63
|
+
family when the brand, reference, script, or typographic contrast requires it,
|
|
64
|
+
not as decoration.
|
|
65
|
+
|
|
66
|
+
Do not confuse visual consistency with typographic sameness. A finished poster
|
|
67
|
+
usually activates two or three families, but its editor should expose three to
|
|
68
|
+
five verified and meaningfully different font roles when the format benefits
|
|
69
|
+
from later type changes. Read [Font system](font-system.md) for the curated local
|
|
70
|
+
font kit, pairing patterns, and shipping rules.
|
|
71
|
+
|
|
72
|
+
**Build a real size ramp.** display, headline, subhead, body, caption, each
|
|
73
|
+
clearly different from the last. A ramp with 10 percent steps reads as an error.
|
|
74
|
+
|
|
75
|
+
- Tighten tracking on large display type; open it slightly on small caps
|
|
76
|
+
- **A single-line block with `letter-spacing` needs `white-space: nowrap` or an
|
|
77
|
+
explicit width.** CSS adds the tracking after the last character too, so the
|
|
78
|
+
measured content width is a fraction wider than the glyphs need. Anything that
|
|
79
|
+
later writes that measured width back — an editor converting the layout to
|
|
80
|
+
absolute positioning, for instance — pushes the last character onto a second
|
|
81
|
+
line. The block's height doubles and nothing reports an error
|
|
82
|
+
- Line height: 1.1–1.2 for display, 1.5–1.7 for body
|
|
83
|
+
- Keep poster body copy to 20–40 characters per line
|
|
84
|
+
- Do not run text to the edge; respect the margins you set
|
|
85
|
+
- Nothing below 9px after rendering. Small type is still meant to be read
|
|
86
|
+
|
|
87
|
+
## CJK typography
|
|
88
|
+
|
|
89
|
+
- **Choose a family that genuinely covers the script.** A Latin-only family must
|
|
90
|
+
not set CJK text; use a CJK-capable family in that stack
|
|
91
|
+
- **No synthetic italics or synthetic bold.** Use a real weight, or another family
|
|
92
|
+
- **Weight is a choice of family, not only of `font-weight`.** Kai, running-script,
|
|
93
|
+
and handwriting faces are structurally thin and stay thin at any size, so a
|
|
94
|
+
headline set in one looks weightless however large. When a headline has to hold
|
|
95
|
+
the page, take the weight from the family itself
|
|
96
|
+
- **CJK display type tolerates tight tracking; body copy does not**
|
|
97
|
+
- **In mixed settings put the Latin family first in the stack**, otherwise digits
|
|
98
|
+
and roman characters inherit the CJK face's proportions
|
|
99
|
+
|
|
100
|
+
## Markup and CSS conventions
|
|
101
|
+
|
|
102
|
+
- **`* { box-sizing: border-box; }`**, always. `getBoundingClientRect()` reports
|
|
103
|
+
the visual width including padding; under content-box, anything that writes that
|
|
104
|
+
measured width back into `width` adds the padding a second time. A pill-shaped
|
|
105
|
+
tag with `padding: 20px 44px` grows 88px wider every round trip, and nothing
|
|
106
|
+
reports an error
|
|
107
|
+
- One file. CSS in a single `<style>` in the head. Zero external requests
|
|
108
|
+
- Palette and font stacks as `:root` custom properties, referenced throughout
|
|
109
|
+
- Layers absolutely positioned inside the canvas, so every coordinate is explicit
|
|
110
|
+
- Fixed px for every dimension, position, and gap that carries layout. No
|
|
111
|
+
vw/vh/vmin/vmax/%. Decorative values — gradient stops, radii, shadow spread,
|
|
112
|
+
texture `background-size` — are unrestricted
|
|
113
|
+
- Semantic class names describing the block's role on the poster
|
|
114
|
+
- Image paths relative to the poster file
|
|
115
|
+
- Never embed, print, or commit a key or credential
|
|
116
|
+
- **Do not write comments**
|