monomind 2.5.0 → 2.5.2
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/package.json +2 -1
- package/packages/@monomind/cli/.claude/agents/design/design-monodesign.md +6 -6
- package/packages/@monomind/cli/.claude/commands/mastermind/_repeat.md +4 -4
- package/packages/@monomind/cli/.claude/commands/mastermind/approvev1.md +4 -4
- package/packages/@monomind/cli/.claude/commands/mastermind/architect.md +6 -6
- package/packages/@monomind/cli/.claude/commands/mastermind/autodev.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/brain.md +2 -2
- package/packages/@monomind/cli/.claude/commands/mastermind/build.md +6 -6
- package/packages/@monomind/cli/.claude/commands/mastermind/code-review.md +2 -2
- package/packages/@monomind/cli/.claude/commands/mastermind/content.md +6 -6
- package/packages/@monomind/cli/.claude/commands/mastermind/createorg.md +4 -4
- package/packages/@monomind/cli/.claude/commands/mastermind/createtask.md +3 -3
- package/packages/@monomind/cli/.claude/commands/mastermind/debug.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/design.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/do.md +2 -2
- package/packages/@monomind/cli/.claude/commands/mastermind/execute.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/finance.md +6 -6
- package/packages/@monomind/cli/.claude/commands/mastermind/finish.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/idea.md +6 -6
- package/packages/@monomind/cli/.claude/commands/mastermind/ideate.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/improve.md +6 -6
- package/packages/@monomind/cli/.claude/commands/mastermind/marketing.md +6 -6
- package/packages/@monomind/cli/.claude/commands/mastermind/master.md +54 -54
- package/packages/@monomind/cli/.claude/commands/mastermind/ops.md +6 -6
- package/packages/@monomind/cli/.claude/commands/mastermind/orgs.md +2 -2
- package/packages/@monomind/cli/.claude/commands/mastermind/orgstatus.md +2 -2
- package/packages/@monomind/cli/.claude/commands/mastermind/plan.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/receive-review.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/release.md +6 -6
- package/packages/@monomind/cli/.claude/commands/mastermind/research.md +6 -6
- package/packages/@monomind/cli/.claude/commands/mastermind/review.md +6 -6
- package/packages/@monomind/cli/.claude/commands/mastermind/runorg.md +4 -4
- package/packages/@monomind/cli/.claude/commands/mastermind/runorgv1.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/sales.md +6 -6
- package/packages/@monomind/cli/.claude/commands/mastermind/skill-builder.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/stoporg.md +3 -3
- package/packages/@monomind/cli/.claude/commands/mastermind/taskdev.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/tdd.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/techport.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/verify.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/worktree.md +5 -5
- package/packages/@monomind/cli/.claude/helpers/control-start.cjs +30 -0
- package/packages/@monomind/cli/.claude/helpers/utils/monograph.cjs +44 -12
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/access.md → mastermind-access/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/activity.md → mastermind-activity/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/adapter-manager.md → mastermind-adapter-manager/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/adapters.md → mastermind-adapters/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/agent-detail.md → mastermind-agent-detail/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/agents.md → mastermind-agents/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/approval-detail.md → mastermind-approval-detail/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/approvev1.md → mastermind-approvev1/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/architect.md → mastermind-architect/SKILL.md} +7 -7
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/autodev.md → mastermind-autodev/SKILL.md} +10 -10
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/backup.md → mastermind-backup/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/bootstrap.md → mastermind-bootstrap/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/budgets.md → mastermind-budgets/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/build.md → mastermind-build/SKILL.md} +5 -5
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/companies.md → mastermind-companies/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/content.md → mastermind-content/SKILL.md} +5 -5
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/costs.md → mastermind-costs/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/createorg.md → mastermind-createorg/SKILL.md} +3 -3
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/debug.md → mastermind-debug/SKILL.md} +4 -4
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/_delegation.md → mastermind-delegation/SKILL.md} +1 -1
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/design.md → mastermind-design/SKILL.md} +9 -9
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/diagnose.md → mastermind-diagnose/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/env.md → mastermind-env/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/environments.md → mastermind-environments/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/execute.md → mastermind-execute/SKILL.md} +10 -10
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/export.md → mastermind-export/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/finance.md → mastermind-finance/SKILL.md} +5 -5
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/goal-detail.md → mastermind-goal-detail/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/goals.md → mastermind-goals/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/heartbeatv1.md → mastermind-heartbeatv1/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/idea.md → mastermind-idea/SKILL.md} +7 -7
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/import.md → mastermind-import/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/inbox.md → mastermind-inbox/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/instance.md → mastermind-instance/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/instance-settings.md → mastermind-instance-settings/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/invite-landing.md → mastermind-invite-landing/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/invites.md → mastermind-invites/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/issue-detail.md → mastermind-issue-detail/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/issues.md → mastermind-issues/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/join-queue.md → mastermind-join-queue/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/liveness.md → mastermind-liveness/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/marketing.md → mastermind-marketing/SKILL.md} +8 -8
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/memory.md → mastermind-memory/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/monitor.md → mastermind-monitor/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/my-issues.md → mastermind-my-issues/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/new-agent.md → mastermind-new-agent/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/ops.md → mastermind-ops/SKILL.md} +5 -5
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/org-chart.md → mastermind-org-chart/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/org-settings.md → mastermind-org-settings/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/orgs.md → mastermind-orgs/SKILL.md} +1 -1
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/orgstatus.md → mastermind-orgstatus/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/plan.md → mastermind-plan/SKILL.md} +7 -7
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/plan-to-tasks.md → mastermind-plan-to-tasks/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/plugin-manager.md → mastermind-plugin-manager/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/plugin-settings.md → mastermind-plugin-settings/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/plugins.md → mastermind-plugins/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/profile.md → mastermind-profile/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/project-detail.md → mastermind-project-detail/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/project-workspace.md → mastermind-project-workspace/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/projects.md → mastermind-projects/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/_protocol.md → mastermind-protocol/SKILL.md} +3 -3
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/release.md → mastermind-release/SKILL.md} +5 -5
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/_repeat.md → mastermind-repeat/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/research.md → mastermind-research/SKILL.md} +5 -5
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/review.md → mastermind-review/SKILL.md} +5 -5
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/routine-detail.md → mastermind-routine-detail/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/routines.md → mastermind-routines/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/runorgv1.md → mastermind-runorgv1/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/sales.md → mastermind-sales/SKILL.md} +5 -5
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/search.md → mastermind-search/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/secrets.md → mastermind-secrets/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/skill-builder.md → mastermind-skill-builder/SKILL.md} +16 -14
- package/packages/@monomind/cli/.claude/skills/mastermind-skills/{skills.md → SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/stoporg.md → mastermind-stoporg/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/taskdev.md → mastermind-taskdev/SKILL.md} +6 -6
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills → mastermind-taskdev}/implementer-prompt.md +1 -1
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/tasks.md → mastermind-tasks/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/tdd.md → mastermind-tdd/SKILL.md} +4 -4
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/techport.md → mastermind-techport/SKILL.md} +5 -5
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/threads.md → mastermind-threads/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/tree-control.md → mastermind-tree-control/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/verify.md → mastermind-verify/SKILL.md} +1 -1
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/wiki.md → mastermind-wiki/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/workspace-detail.md → mastermind-workspace-detail/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/{mastermind-skills/workspaces.md → mastermind-workspaces/SKILL.md} +2 -2
- package/packages/@monomind/cli/.claude/skills/monodesign/SKILL.md +114 -190
- package/packages/@monomind/cli/.claude/skills/monodesign/adapt.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/agents/monodesign-asset-producer.md +4 -4
- package/packages/@monomind/cli/.claude/skills/monodesign/agents/monodesign-manual-edit-applier.md +103 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/audit.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/craft.md +2 -2
- package/packages/@monomind/cli/.claude/skills/monodesign/critique.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/init.md +30 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/layout.md +36 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/live.md +19 -44
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/adapt.md +122 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/adapt.native.md +58 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/android.md +40 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/animate.md +39 -11
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/antipatterns-catalog.md +22 -16
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/audit.md +5 -3
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/audit.native.md +139 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/bolder.md +71 -64
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/brand.md +12 -18
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/clarify.md +114 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/codex.md +4 -6
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/colorize.md +108 -5
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/craft.md +70 -143
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/critique.md +635 -68
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/delight.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/distill.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/document.md +24 -22
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/extract.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/hooks.md +22 -29
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/init.md +221 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/interaction-design.md +0 -6
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/ios.md +45 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/layout.md +57 -13
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/live.md +159 -63
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/overdrive.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/personas.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/polish.md +16 -8
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/pre-delivery-checklist.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/product.md +1 -3
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/quieter.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/shape.md +27 -13
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/teach.md +6 -152
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/typeset.md +180 -3
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/command-metadata.json +94 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/context-signals.mjs +227 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/context.mjs +1062 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/critique-storage.mjs +243 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detect-csp.mjs +199 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detect.mjs +34 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/browser/injected/index.mjs +1938 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/cli/main.mjs +322 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/design-system.mjs +815 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/detect-antipatterns-browser.js +5246 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/detect-antipatterns.mjs +51 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/engines/browser/detect-url.mjs +260 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/engines/browser/drivers.mjs +259 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/engines/regex/detect-text.mjs +574 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/engines/static-html/css-cascade.mjs +1016 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/engines/static-html/detect-html.mjs +235 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/engines/visual/screenshot-contrast.mjs +199 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/findings.mjs +13 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/node/file-system.mjs +199 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/profile/profiler.mjs +167 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/registry/antipatterns.mjs +515 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/rules/checks.mjs +2704 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/shared/color.mjs +125 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/shared/constants.mjs +102 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/shared/fonts.mjs +31 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/shared/inline-ignores.mjs +149 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/detector/shared/page.mjs +8 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/hook-admin.mjs +662 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/hook-before-edit.mjs +517 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/hook-lib.mjs +1777 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/hook.mjs +62 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/lib/design-parser.mjs +843 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/lib/is-generated.mjs +70 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/lib/monodesign-config.mjs +641 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/lib/monodesign-paths.mjs +130 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/lib/provider.mjs +5 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/lib/target-args.mjs +43 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/browser-script-parts.mjs +51 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/completion.mjs +20 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/event-validation.mjs +138 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/insert-ui.mjs +459 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/manual-apply.mjs +940 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/manual-edit-routes.mjs +358 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/manual-edits-buffer.mjs +153 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/session-store.mjs +290 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/svelte-component.mjs +827 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/sveltekit-adapter.mjs +275 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/ui-core.mjs +181 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live/vocabulary.mjs +37 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-accept.mjs +813 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-browser-dom.js +147 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-browser-session.js +124 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-browser.js +11241 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-commit-manual-edits.mjs +1242 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-complete.mjs +76 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-copy-edit-agent.mjs +684 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-discard-manual-edits.mjs +52 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-inject.mjs +584 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-insert.mjs +273 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-manual-edit-evidence.mjs +364 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-poll.mjs +385 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-resume.mjs +95 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-server.mjs +1138 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-status.mjs +62 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-target.mjs +31 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live-wrap.mjs +895 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/live.mjs +298 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/modern-screenshot.umd.js +15 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/palette.mjs +634 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/scripts/pin.mjs +222 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/teach.md +7 -58
- package/packages/@monomind/cli/dist/src/commands/design-detect.d.ts +7 -1
- package/packages/@monomind/cli/dist/src/commands/design-detect.js +70 -38
- package/packages/@monomind/cli/dist/src/commands/design-palette.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/design-palette.js +3 -3
- package/packages/@monomind/cli/dist/src/commands/doc.js +72 -15
- package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.d.ts +4 -0
- package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.js +23 -0
- package/packages/@monomind/cli/dist/src/commands/doctor.js +3 -3
- package/packages/@monomind/cli/dist/src/commands/org.js +109 -9
- package/packages/@monomind/cli/dist/src/init/executor.js +14 -3
- package/packages/@monomind/cli/dist/src/knowledge/document-pipeline.d.ts +2 -0
- package/packages/@monomind/cli/dist/src/knowledge/document-pipeline.js +1 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/knowledge-tools.js +38 -7
- package/packages/@monomind/cli/dist/src/mcp-tools/memory-tools.d.ts +8 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/memory-tools.js +193 -31
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.d.ts +33 -0
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.js +169 -18
- package/packages/@monomind/cli/dist/src/memory/memory-kg.d.ts +185 -0
- package/packages/@monomind/cli/dist/src/memory/memory-kg.js +449 -0
- package/packages/@monomind/cli/dist/src/memory/query-router.d.ts +44 -0
- package/packages/@monomind/cli/dist/src/memory/query-router.js +113 -0
- package/packages/@monomind/cli/dist/src/orgrt/daemon.d.ts +18 -0
- package/packages/@monomind/cli/dist/src/orgrt/daemon.js +249 -12
- package/packages/@monomind/cli/dist/src/orgrt/migrate.js +7 -0
- package/packages/@monomind/cli/dist/src/orgrt/policy.js +7 -0
- package/packages/@monomind/cli/dist/src/orgrt/session.d.ts +24 -1
- package/packages/@monomind/cli/dist/src/orgrt/session.js +18 -3
- package/packages/@monomind/cli/dist/src/orgrt/templates.d.ts +1 -0
- package/packages/@monomind/cli/dist/src/orgrt/templates.js +9 -4
- package/packages/@monomind/cli/dist/src/orgrt/types.d.ts +15 -0
- package/packages/@monomind/cli/dist/src/orgrt/types.js +2 -0
- package/packages/@monomind/cli/dist/src/ui/dashboard.html +154 -6
- package/packages/@monomind/cli/dist/src/ui/orgs.html +24 -0
- package/packages/@monomind/cli/dist/src/ui/server.mjs +211 -13
- package/packages/@monomind/cli/package.json +6 -4
- /package/packages/@monomind/cli/.claude/skills/{mastermind-skills/_agent-select.md → mastermind-agent-select/SKILL.md} +0 -0
- /package/packages/@monomind/cli/.claude/skills/{mastermind-skills/finish.md → mastermind-finish/SKILL.md} +0 -0
- /package/packages/@monomind/cli/.claude/skills/{mastermind-skills/_intake.md → mastermind-intake/SKILL.md} +0 -0
- /package/packages/@monomind/cli/.claude/skills/{mastermind-skills → mastermind-marketing}/references/copywriting-frameworks.md +0 -0
- /package/packages/@monomind/cli/.claude/skills/{mastermind-skills → mastermind-marketing}/references/persuasion-psychology.md +0 -0
- /package/packages/@monomind/cli/.claude/skills/{mastermind-skills/monotask.md → mastermind-monotask/SKILL.md} +0 -0
- /package/packages/@monomind/cli/.claude/skills/{mastermind-skills/receive-review.md → mastermind-receive-review/SKILL.md} +0 -0
- /package/packages/@monomind/cli/.claude/skills/{mastermind-skills/runorg.md → mastermind-runorg/SKILL.md} +0 -0
- /package/packages/@monomind/cli/.claude/skills/{mastermind-skills → mastermind-taskdev}/code-quality-reviewer-prompt.md +0 -0
- /package/packages/@monomind/cli/.claude/skills/{mastermind-skills → mastermind-taskdev}/final-reviewer-prompt.md +0 -0
- /package/packages/@monomind/cli/.claude/skills/{mastermind-skills → mastermind-taskdev}/spec-reviewer-prompt.md +0 -0
- /package/packages/@monomind/cli/.claude/skills/{mastermind-skills/worktree.md → mastermind-worktree/SKILL.md} +0 -0
|
@@ -8,59 +8,76 @@ A running dev server with hot module replacement (Vite, Next.js, Bun, etc.), OR
|
|
|
8
8
|
|
|
9
9
|
Execute in order. No step skipped, no step reordered.
|
|
10
10
|
|
|
11
|
-
1. `live.mjs`: boot.
|
|
12
|
-
2.
|
|
11
|
+
1. `live.mjs`: boot. If the request names or implies a file, route, or app inside a monorepo, infer the concrete path and run `node .claude/skills/monodesign/scripts/live.mjs --target <path>` instead; then run the rest of this live session from the returned `projectRoot`.
|
|
12
|
+
2. Open the app URL that serves `pageFile` (infer from `package.json`, docs, terminal output, or an open tab). Never use `serverPort`; it's the helper, not the app. **Cursor:** `browser_navigate` to that URL before polling; do not skip. **Other harnesses:** use the available browser tool; if the URL is uncertain, ask the user once.
|
|
13
13
|
3. Poll loop with the default long timeout (600000 ms). After every event or `--reply`, run `live-poll.mjs` again immediately. Never pass a short `--timeout=`.
|
|
14
|
+
|
|
15
|
+
The global bar **Monodesign mark** dims and shows a pulsing amber dot when no agent is long-polling `/poll`. Hover the mark for the hint; restart `live-poll.mjs` to reconnect.
|
|
14
16
|
4. On `generate`: read screenshot if present; load the action's reference; plan three distinct directions; write all variants in one edit; `--reply done`; poll again.
|
|
15
|
-
5. On `
|
|
16
|
-
6.
|
|
17
|
-
7.
|
|
17
|
+
5. On `steer`: read the message and `pageUrl`; do the work (page edits, navigation help, or a short reply in the `--reply` message); `--reply steer_done`; poll again. No pickup ack. The Steer bar unlocks when `steer_done` arrives over SSE.
|
|
18
|
+
6. On `accept` / `discard`: the poll script runs `live-accept.mjs`, acknowledges the delivered event, and prints `_completionAck`. Plain accepts/discards are terminal immediately; carbonize accepts remain recoverable until you finish cleanup, run `live-complete.mjs --id EVENT_ID`, and only then poll again.
|
|
19
|
+
7. If interrupted, run `live-status.mjs` or `live-resume.mjs` before guessing. The durable journal replays unacknowledged work after helper restart.
|
|
20
|
+
8. On `exit`: run the cleanup at the bottom.
|
|
18
21
|
|
|
19
22
|
Harness policy:
|
|
20
23
|
- **Claude Code**: run the poll as a **background task** (no short timeout). The harness notifies you when it completes, so the main conversation stays free. Do not block the shell.
|
|
21
|
-
- **Cursor**: run
|
|
24
|
+
- **Cursor**: run **one-shot** poll in a **background terminal** with notify on `"type":"(steer|generate|accept|discard|exit)"`. After each event the poll exits; handle it, `--reply`, then start `live-poll.mjs` again. Do **not** use `--stream` on Cursor: incremental stdout notify is slower in practice than exit-based notify (~5s vs sub-second in testing).
|
|
22
25
|
- **Codex**: run the poll in the **foreground** (blocking shell; not a background task, not a subagent). Codex background exec sessions do not reliably surface poll stdout back into the conversation at the moment events arrive, so a "fire-and-forget" background poll will stall live mode.
|
|
23
|
-
- **Other harnesses**: foreground unless you know stdout reliably returns to this session.
|
|
26
|
+
- **Other harnesses**: one-shot foreground unless you know stdout reliably returns to this session when a shell exits.
|
|
24
27
|
|
|
25
28
|
Chat is overhead. No recap, no tutorial output, no pasting PRODUCT / DESIGN bodies. Spend tokens on tools and edits; on failure, one or two short sentences.
|
|
26
29
|
|
|
27
30
|
## Start
|
|
28
31
|
|
|
29
32
|
```bash
|
|
30
|
-
|
|
33
|
+
node .claude/skills/monodesign/scripts/live.mjs
|
|
31
34
|
```
|
|
32
35
|
|
|
33
|
-
Output JSON: `{ ok, serverPort, serverToken, pageFiles, hasProduct, product, productPath, hasDesign, design, designPath
|
|
36
|
+
Output JSON: `{ ok, serverPort, serverToken, pageFiles, hasProduct, product, productPath, hasDesign, design, designPath }`. `pageFiles` is the list of HTML entries the live script was injected into. Keep PRODUCT.md and DESIGN.md in mind for variant generation; **DESIGN.md wins on visual decisions; PRODUCT.md wins on strategic/voice decisions.** When DESIGN.md is missing, identity is **not** absent; extract it from CSS variables, computed styles, and sibling components on the page (see Step 4 Phase A). Identity preservation is the default; departure from existing identity requires an explicit trigger from PRODUCT.md anti-references or the user's freeform prompt.
|
|
34
37
|
|
|
35
|
-
`serverPort` and `serverToken` belong to the small **
|
|
38
|
+
`serverPort` and `serverToken` belong to the small **Monodesign live helper** HTTP server (serves `/live.js`, SSE, and `/poll`). That port is **not** your dev server and is usually not the URL you open to view the app. The browser page is whatever origin serves one of the `pageFiles` entries (Vite / Next / Bun / tunnel / LAN hostname).
|
|
36
39
|
|
|
37
40
|
If output is `{ ok: false, error: "config_missing" | "config_invalid", path }`, this project hasn't been configured for live mode (or its config is stale). See **First-time setup** at the bottom.
|
|
38
41
|
|
|
39
42
|
## Poll loop
|
|
40
43
|
|
|
44
|
+
**Default (portable, all harnesses):**
|
|
45
|
+
|
|
41
46
|
```
|
|
42
47
|
LOOP:
|
|
43
|
-
|
|
48
|
+
node .claude/skills/monodesign/scripts/live-poll.mjs # default long timeout; no --timeout=
|
|
44
49
|
Read JSON; dispatch on "type"
|
|
45
50
|
|
|
46
51
|
"generate" → Handle Generate; reply done; LOOP
|
|
52
|
+
"steer" → Handle Steer; reply steer_done; LOOP
|
|
47
53
|
"accept" → Handle Accept; complete carbonize cleanup if required; LOOP
|
|
48
54
|
"discard" → Handle Discard; LOOP
|
|
49
55
|
"prefetch" → Handle Prefetch; LOOP
|
|
56
|
+
"manual_edit_apply" → Handle Manual Edit Apply; reply done|partial|error; LOOP
|
|
50
57
|
"timeout" → LOOP
|
|
51
58
|
"exit" → break → Cleanup
|
|
52
59
|
```
|
|
53
60
|
|
|
61
|
+
**Stream mode (experimental, not for Cursor):**
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
node .claude/skills/monodesign/scripts/live-poll.mjs --stream # stays running; one JSON line per event
|
|
65
|
+
Handle event; run --reply in a separate command
|
|
66
|
+
Repeat until "exit" line → Cleanup
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Stream keeps one process alive and waits for `--reply` ack before polling again. Useful only when the harness reads incremental stdout reliably and quickly. **Cursor is not one of those:** background pattern notify on a long-running shell was ~5s to pick up events vs sub-second for one-shot exit notify. Default to one-shot everywhere unless you have measured otherwise.
|
|
70
|
+
|
|
54
71
|
## Recovery commands
|
|
55
72
|
|
|
56
|
-
The live helper persists an append-only journal under `.
|
|
73
|
+
The live helper persists an append-only journal under `.monodesign/live/sessions/`. Browser checkpoints are advisory but durable; the journal is canonical. This is local durable recovery state, not project source.
|
|
57
74
|
|
|
58
75
|
Use these commands when the chat was interrupted, polling was missed, the helper restarted, or the browser reloaded:
|
|
59
76
|
|
|
60
77
|
```bash
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
78
|
+
node .claude/skills/monodesign/scripts/live-status.mjs
|
|
79
|
+
node .claude/skills/monodesign/scripts/live-resume.mjs --id SESSION_ID
|
|
80
|
+
node .claude/skills/monodesign/scripts/live-complete.mjs --id SESSION_ID
|
|
64
81
|
```
|
|
65
82
|
|
|
66
83
|
- `live-status.mjs` prints connected helper state, active durable sessions, and queued pending events. It works even when the helper is down by reading the journal directly.
|
|
@@ -71,9 +88,34 @@ Server restart rule: start `live-server.mjs` again, then poll. Startup requeues
|
|
|
71
88
|
|
|
72
89
|
## Handle `generate`
|
|
73
90
|
|
|
74
|
-
|
|
91
|
+
**Replace mode** (default): `{id, action, freeformPrompt?, count, pageUrl, element, screenshotPath?, comments?, strokes?}`.
|
|
92
|
+
|
|
93
|
+
**Insert mode** (`event.mode === "insert"`): `{id, mode: "insert", count, pageUrl, insert: { position, anchor }, placeholder: { width, height }, freeformPrompt?, screenshotPath?, comments?, strokes?}`. No `action`. Requires a non-empty `freeformPrompt` **or** annotations. Screenshot is sent only when annotations exist (same rule as replace). Use `placeholder` dimensions as a soft size hint for net-new content.
|
|
94
|
+
|
|
95
|
+
Speed matters; the user is watching a spinner. Minimize tool calls by using the wrap/insert helper and writing all variants in a single edit.
|
|
75
96
|
|
|
76
|
-
|
|
97
|
+
### Insert mode branch
|
|
98
|
+
|
|
99
|
+
When `event.mode === "insert"`:
|
|
100
|
+
|
|
101
|
+
1. Read the screenshot if `event.screenshotPath` is present (annotations only).
|
|
102
|
+
2. Run the insert helper instead of wrap:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
node .claude/skills/monodesign/scripts/live-insert.mjs --id EVENT_ID --count EVENT_COUNT --position after \
|
|
106
|
+
--element-id "ANCHOR_ID" --classes "class1,class2" --tag "section" --text "ANCHOR_TEXT"
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
- `--position` ← `event.insert.position` (`before` | `after`)
|
|
110
|
+
- Anchor flags ← `event.insert.anchor` (same mapping as wrap: id, classes, tag, text)
|
|
111
|
+
|
|
112
|
+
The scaffold has **no** `data-monodesign-variant="original"`. Variants are net-new HTML+CSS inserted at `insertLine`. Load `brand.md` or `product.md` (freeform only, no action sub-command). Write all variants in one edit, then `--reply done`.
|
|
113
|
+
|
|
114
|
+
For Svelte/SvelteKit targets, `live-insert.mjs` returns `previewMode: "svelte-component"` with `mode: "insert"`, `file` pointing at a temporary `node_modules/.monodesign-live/<id>/manifest.json`, `componentDir` pointing at the variant component files, and `sourceFile` pointing at the real `.svelte` route. Write each inserted variant as a real Svelte component (`v1.svelte`, `v2.svelte`, …) under `componentDir`. Insert variants must be non-empty net-new content with a single top-level root, no `data-monodesign-*` attributes, and CSS in each component's `<style>` block. Do **not** edit the route source during generation; the browser mounts the temporary component before/after the live anchor while the user cycles variants. On Accept, `live-accept.mjs` inserts the selected component markup into `sourceFile` immediately and deletes the temp session after the source write succeeds.
|
|
115
|
+
|
|
116
|
+
For non-Svelte targets, on accept/discard, `live-accept.mjs` removes the wrapper block; the anchor element is untouched.
|
|
117
|
+
|
|
118
|
+
### Replace mode (default)
|
|
77
119
|
|
|
78
120
|
### 1. Read the screenshot (if present)
|
|
79
121
|
|
|
@@ -93,7 +135,7 @@ Reading annotations precisely:
|
|
|
93
135
|
### 2. Wrap the element
|
|
94
136
|
|
|
95
137
|
```bash
|
|
96
|
-
|
|
138
|
+
node .claude/skills/monodesign/scripts/live-wrap.mjs --id EVENT_ID --count EVENT_COUNT --element-id "ELEMENT_ID" --classes "class1,class2" --tag "div" --text "TEXT_SNIPPET"
|
|
97
139
|
```
|
|
98
140
|
|
|
99
141
|
Flag mapping. Keep them separate, don't collapse into `--query`:
|
|
@@ -109,10 +151,29 @@ If `--text` matches multiple candidates equally well, wrap exits with `{ error:
|
|
|
109
151
|
|
|
110
152
|
Output on success: `{ file, insertLine, commentSyntax, styleMode, styleTag, cssSelectorPrefixExamples, cssAuthoring }`.
|
|
111
153
|
|
|
154
|
+
For Svelte/SvelteKit targets, `live-wrap.mjs` returns `previewMode: "svelte-component"` with `file` pointing at a temporary `node_modules/.monodesign-live/<id>/manifest.json`, `componentDir` pointing at the variant component files, and `sourceFile` pointing at the real `.svelte` route. Write each variant as a real Svelte component (`v1.svelte`, `v2.svelte`, …) under `componentDir`; use the `propContract` prop names for dynamic text (`{propName}`), not literal snapshot strings. Put variant CSS in each component's `<style>` block with semantic class selectors (no `@scope`, no `data-monodesign-*`). Reply with `--file` set to the manifest path; the browser dynamically imports and mounts the compiled components so Svelte HMR does not reset page state while the user cycles variants. On Accept, `live-accept.mjs` inlines the accepted component back into `sourceFile` immediately after source promotion succeeds.
|
|
155
|
+
|
|
156
|
+
**Params on the Svelte component path go in a sidecar, never as an attribute.** Svelte parses `{` inside an attribute value as the start of an expression, so a `data-monodesign-params='[{…}]'` attribute on a component element fails to compile (`Expected token }`). Declare params for this path in `componentDir/params.json`, keyed by variant number, using the exact param schema from section 7:
|
|
157
|
+
|
|
158
|
+
```json
|
|
159
|
+
{
|
|
160
|
+
"1": [
|
|
161
|
+
{"id":"density","kind":"steps","default":"snug","label":"Density","options":[
|
|
162
|
+
{"value":"airy","label":"Airy"},{"value":"snug","label":"Snug"},{"value":"packed","label":"Packed"}
|
|
163
|
+
]}
|
|
164
|
+
],
|
|
165
|
+
"2": [
|
|
166
|
+
{"id":"accent","kind":"range","min":0,"max":1,"step":0.05,"default":0.5,"label":"Accent"}
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Author the component `<style>` against `var(--p-<id>, default)` for `range`/`toggle` and `[data-p-<id>="…"]` for `steps`; wrap those selectors in `:global(...)` so the knob values the runtime sets on the mounted root reach your rules. The browser reads `params.json`, docks the panel, and drives `--p-*` / `data-p-*` on the mounted component exactly as it does for the HTML/JSX path.
|
|
172
|
+
|
|
112
173
|
`styleMode` controls how preview CSS must be authored. Treat it as a detected capability mode, not a framework guess:
|
|
113
174
|
|
|
114
|
-
- `scoped`: use `@scope ([data-
|
|
115
|
-
- `astro-global-prefixed`: use explicit `[data-
|
|
175
|
+
- `scoped`: use `@scope ([data-monodesign-variant="N"])` rules.
|
|
176
|
+
- `astro-global-prefixed`: use explicit `[data-monodesign-variant="N"]` selector prefixes and the exact `styleTag` returned by the tool.
|
|
116
177
|
|
|
117
178
|
Use `cssAuthoring` as the source of truth for the current file. It includes the exact `styleTag`, selector strategy, selector examples, requirements, and forbidden patterns. Do not apply a framework-specific exception unless the returned `styleMode` / `cssAuthoring.mode` says to.
|
|
118
179
|
|
|
@@ -126,7 +187,7 @@ All three carry `fallback: "agent-driven"`. Follow **Handle fallback** below.
|
|
|
126
187
|
|
|
127
188
|
### 3. Load the action's reference
|
|
128
189
|
|
|
129
|
-
If `event.action` is `
|
|
190
|
+
If `event.action` is `monodesign` (the default freeform action), use SKILL.md's shared laws plus the loaded register reference (`brand.md` or `product.md`). Do not load a sub-command reference. **Freeform is not a pass to skip parameters:** you still follow the composition budget and the freeform bias in **§7 Parameters** below. Sub-command files list MUST-have signature knobs; freeform has no such file, so sizing knobs from surface weight and primary axes is entirely on you.
|
|
130
191
|
|
|
131
192
|
Any other `event.action` (`bolder`, `quieter`, `distill`, `polish`, `typeset`, `colorize`, `layout`, `adapt`, `animate`, `delight`, `overdrive`): Read `reference/<action>.md` before planning. Each sub-command encodes a specific discipline; skipping its reference produces generic output. Those files may require specific params; layer them on top of the §7 budget, not instead of it.
|
|
132
193
|
|
|
@@ -240,16 +301,16 @@ Use the `cssAuthoring` object returned by `live-wrap.mjs` to author the temporar
|
|
|
240
301
|
|
|
241
302
|
```html
|
|
242
303
|
<!-- Variants: insert below this line -->
|
|
243
|
-
<style data-
|
|
304
|
+
<style data-monodesign-css="SESSION_ID">
|
|
244
305
|
/* rules matching cssAuthoring.rulePattern */
|
|
245
306
|
</style>
|
|
246
|
-
<div data-
|
|
307
|
+
<div data-monodesign-variant="1">
|
|
247
308
|
<!-- variant 1: full element replacement (single top-level element) -->
|
|
248
309
|
</div>
|
|
249
|
-
<div data-
|
|
310
|
+
<div data-monodesign-variant="2" style="display: none">
|
|
250
311
|
<!-- variant 2: full element replacement -->
|
|
251
312
|
</div>
|
|
252
|
-
<div data-
|
|
313
|
+
<div data-monodesign-variant="3" style="display: none">
|
|
253
314
|
<!-- variant 3: full element replacement -->
|
|
254
315
|
</div>
|
|
255
316
|
```
|
|
@@ -260,24 +321,24 @@ The first variant has no `display: none` (visible by default). All others do. If
|
|
|
260
321
|
|
|
261
322
|
One edit, all variants; the browser's MutationObserver picks everything up in one pass.
|
|
262
323
|
|
|
263
|
-
For `styleMode: "scoped"`, author every `:scope` rule with a descendant combinator. The `@scope` boundary is the **variant wrapper `<div data-
|
|
324
|
+
For `styleMode: "scoped"`, author every `:scope` rule with a descendant combinator. The `@scope` boundary is the **variant wrapper `<div data-monodesign-variant="N">`**, not the element you're designing. A bare `:scope { background: cream; }` styles the wrapper, not the inner replacement, so the cream lands on a `display: contents` shell while the actual element keeps page defaults. Always step in: `:scope > .card`, `:scope > section`, `:scope .hero-title`, etc. The fake test agent's CSS in `tests/live-e2e/agent.mjs` is a faithful template; every scoped rule starts `:scope > ...`.
|
|
264
325
|
|
|
265
|
-
**JSX / TSX target files.** Wrap `<style>` content in a template literal so the CSS `{` / `}` aren't parsed as JSX expressions, and use `className=` / `style={{…}}` on every variant element. Keep `data-
|
|
326
|
+
**JSX / TSX target files.** Wrap `<style>` content in a template literal so the CSS `{` / `}` aren't parsed as JSX expressions, and use `className=` / `style={{…}}` on every variant element. Keep `data-monodesign-*` attributes as-is; they're plain strings:
|
|
266
327
|
|
|
267
328
|
```tsx
|
|
268
|
-
<style data-
|
|
269
|
-
@scope ([data-
|
|
270
|
-
@scope ([data-
|
|
329
|
+
<style data-monodesign-css="SESSION_ID">{`
|
|
330
|
+
@scope ([data-monodesign-variant="1"]) { ... }
|
|
331
|
+
@scope ([data-monodesign-variant="2"]) { ... }
|
|
271
332
|
`}</style>
|
|
272
|
-
<div data-
|
|
333
|
+
<div data-monodesign-variant="1">
|
|
273
334
|
{/* variant 1 */}
|
|
274
335
|
</div>
|
|
275
|
-
<div data-
|
|
336
|
+
<div data-monodesign-variant="2" style={{ display: 'none' }}>
|
|
276
337
|
{/* variant 2 */}
|
|
277
338
|
</div>
|
|
278
339
|
```
|
|
279
340
|
|
|
280
|
-
The wrap script already gives you a single-rooted JSX wrapper: a `<div data-
|
|
341
|
+
The wrap script already gives you a single-rooted JSX wrapper: a `<div data-monodesign-variants="…">` outer element with the marker comments tucked inside. Drop the variants block above into the "Variants: insert below this line" comment and the source stays valid TSX.
|
|
281
342
|
|
|
282
343
|
### 7. Parameters (composition-sized, 0–4 per variant)
|
|
283
344
|
|
|
@@ -287,7 +348,7 @@ Each variant can expose **coarse** knobs alongside the full HTML/CSS replacement
|
|
|
287
348
|
|
|
288
349
|
**When to add.** As soon as the variant’s scoped CSS has a meaningful continuous or stepped axis: density, color amount, type scale, motion intensity, column weight, and so on. If you can imagine the user muttering “a bit tighter” or “a touch more accent” **without** wanting a full regeneration, wire that axis. **Not** micro-margins or one-off nudges; those are not parameters.
|
|
289
350
|
|
|
290
|
-
**Freeform (`action` is `
|
|
351
|
+
**Freeform (`action` is `monodesign`) bias.** You did not load a sub-command reference, so you must **choose** signature axes yourself. Match the budget table: for a hero or large composition, that means **2–3 axes per variant**, not 1. Prefer knobs that sit on the dimensions where your three variants actually differ (if density varies, expose it as a `steps` knob; if color commitment varies, expose it as a `range`). A hero that ships with **0** params is almost always a mistake, not a judgment call. A hero with exactly **1** param is underweight unless the design is genuinely a fixed-point comparison. Start from the budget table, not from zero.
|
|
291
352
|
|
|
292
353
|
**Budget scales with the element's visual weight, not token budget.** Knobs need real estate to read as tunable; three sliders on a single control are noise.
|
|
293
354
|
|
|
@@ -300,10 +361,10 @@ Each variant can expose **coarse** knobs alongside the full HTML/CSS replacement
|
|
|
300
361
|
|
|
301
362
|
**Hard cap per variant**: at most **four** parameters so the panel stays legible; rare fifth only if the reference explicitly allows it.
|
|
302
363
|
|
|
303
|
-
**How to declare.** Put a JSON manifest on the variant wrapper
|
|
364
|
+
**How to declare.** Put a JSON manifest on the variant wrapper (HTML/JSX path). **On the Svelte `svelte-component` path, do not use this attribute** (Svelte can't compile `{` inside an attribute value). Declare params in `componentDir/params.json` keyed by variant number instead (see the Svelte component paragraph in the wrap section). The param schema below is identical for both paths.
|
|
304
365
|
|
|
305
366
|
```html
|
|
306
|
-
<div data-
|
|
367
|
+
<div data-monodesign-variant="1" data-monodesign-params='[
|
|
307
368
|
{"id":"color-amount","kind":"range","min":0,"max":1,"step":0.05,"default":0.5,"label":"Color amount"},
|
|
308
369
|
{"id":"density","kind":"steps","default":"snug","label":"Density","options":[
|
|
309
370
|
{"value":"airy","label":"Airy"},
|
|
@@ -322,14 +383,14 @@ Each variant can expose **coarse** knobs alongside the full HTML/CSS replacement
|
|
|
322
383
|
- `steps`: segmented radio. Drives a data attribute `data-p-<id>` on the variant wrapper. Author CSS with `:scope[data-p-density="airy"] .grid { ... }`. Fields: `options` (array of `{value, label}`), `default` (string), `label`.
|
|
323
384
|
- `toggle`: on/off switch. Drives BOTH a CSS var (`--p-<id>: 0|1`) and a data attribute (present when on, absent when off). Use whichever is more convenient. Fields: `default` (boolean), `label`.
|
|
324
385
|
|
|
325
|
-
**Signature params per action.** For named sub-commands, read that action’s `reference/<action>.md` for one or two **MUST** params (e.g. `layout` → `density`). Those are non-negotiable when the design can express them. **Freeform has no file-level MUST**; the **Freeform (`
|
|
386
|
+
**Signature params per action.** For named sub-commands, read that action’s `reference/<action>.md` for one or two **MUST** params (e.g. `layout` → `density`). Those are non-negotiable when the design can express them. **Freeform has no file-level MUST**; the **Freeform (`monodesign`) bias** in this section is the stand-in. If the user’s action is both stylized and sub-command (e.g. `colorize`), the sub-command’s MUST list takes precedence for its axes; still respect the **Hard cap** and add no redundant duplicate knobs.
|
|
326
387
|
|
|
327
388
|
**Reset on variant switch.** User dials density on v1, flips to v2, v2 starts at v2's declared defaults. Known limitation; preservation across variants may land later.
|
|
328
389
|
|
|
329
390
|
**On accept**, the browser sends the user's current values in the accept event. `live-accept.mjs` writes them as a sibling comment:
|
|
330
391
|
|
|
331
392
|
```html
|
|
332
|
-
<!--
|
|
393
|
+
<!-- monodesign-param-values SESSION_ID: {"color-amount":0.7,"density":"packed"} -->
|
|
333
394
|
```
|
|
334
395
|
|
|
335
396
|
The carbonize cleanup step (see below) reads that comment and bakes the chosen values into the final CSS. For `steps`/`toggle` attribute selectors: keep only the branch matching the chosen value, drop the others, collapse `:scope[data-p-density="packed"] .grid` to a semantic class rule. For `range` vars: either substitute the literal or keep the var with the chosen value as its new default.
|
|
@@ -337,7 +398,7 @@ The carbonize cleanup step (see below) reads that comment and bakes the chosen v
|
|
|
337
398
|
### 8. Signal done
|
|
338
399
|
|
|
339
400
|
```bash
|
|
340
|
-
|
|
401
|
+
node .claude/skills/monodesign/scripts/live-poll.mjs --reply EVENT_ID done --file RELATIVE_PATH
|
|
341
402
|
```
|
|
342
403
|
|
|
343
404
|
`RELATIVE_PATH` is relative to project root (`public/index.html`, `src/App.tsx`, etc.); the browser fetches source directly if the dev server lacks HMR.
|
|
@@ -349,7 +410,7 @@ Then run `live-poll.mjs` again immediately.
|
|
|
349
410
|
If wrap or generation fails after the browser has flipped to GENERATING (e.g. wrap landed on the wrong source branch and you've already reverted it, or generation hit an unrecoverable error), tell the **browser** so its bar resets to PICKING:
|
|
350
411
|
|
|
351
412
|
```bash
|
|
352
|
-
|
|
413
|
+
node .claude/skills/monodesign/scripts/live-poll.mjs --reply EVENT_ID error "Short reason"
|
|
353
414
|
```
|
|
354
415
|
|
|
355
416
|
Don't run `live-accept --discard` for this; that's a pure file mutator, the browser doesn't see it, and the bar gets stuck on the GENERATING dots forever (the user has to refresh). `--discard` is only correct when the **browser** initiated the discard (user clicked ✕ during CYCLING) and the agent is just running source-side cleanup the browser already triggered.
|
|
@@ -364,7 +425,7 @@ The goal is the same: give the user three variants to choose from AND persist th
|
|
|
364
425
|
|
|
365
426
|
Use the error payload:
|
|
366
427
|
|
|
367
|
-
- `element_not_in_source` with `generatedMatch: "public/docs/foo.html"`: the served HTML is generated. Find the generator (
|
|
428
|
+
- `element_not_in_source` with `generatedMatch: "public/docs/foo.html"`: the served HTML is generated. Find the generator (grep for writers of that path, e.g. `scripts/build-sub-pages.js`, an Astro/Next template) and locate the template or partial that emits this element.
|
|
368
429
|
- `element_not_found`: the element is runtime-injected. Look for the component that renders it (React/Vue/Svelte), the JS that assembles it, or the data source that feeds it.
|
|
369
430
|
- `file_is_generated` with `file: "..."`: user pointed at a generated file explicitly. Same resolution as `element_not_in_source`.
|
|
370
431
|
|
|
@@ -374,7 +435,7 @@ Read the candidate source until you're confident where a change to the element w
|
|
|
374
435
|
|
|
375
436
|
The browser bar is waiting for variants. Even without a wrapper in source, you still need to show something:
|
|
376
437
|
|
|
377
|
-
1. Manually write the wrapper scaffold into the **served** file (the one the browser actually loaded). Use the same structure `live-wrap.mjs` produces; `<!--
|
|
438
|
+
1. Manually write the wrapper scaffold into the **served** file (the one the browser actually loaded). Use the same structure `live-wrap.mjs` produces; `<!-- monodesign-variants-start ID --><div data-monodesign-variants="ID" data-monodesign-variant-count="3" style="display: contents">…</div><!-- end -->`.
|
|
378
439
|
2. Insert your three variant divs inside it, same shape as the deterministic path.
|
|
379
440
|
3. Signal done with `--reply EVENT_ID done --file <served file>`. The browser's no-HMR fallback will fetch and inject.
|
|
380
441
|
|
|
@@ -398,6 +459,7 @@ Remove the wrapper you inserted in Step 2. Nothing else to do.
|
|
|
398
459
|
|
|
399
460
|
Event: `{id, variantId, _acceptResult, _completionAck}`. The poll script already ran `live-accept.mjs` to handle the file operation deterministically, then acknowledged event delivery to the helper. The browser DOM is already updated.
|
|
400
461
|
|
|
462
|
+
- The accept event includes `pageUrl`; the poll script must forward it to `live-accept.mjs --page-url PAGE_URL` so accept-time cleanup only scrubs staged copy edits for the current page.
|
|
401
463
|
- `_completionAck.ok !== true`: do not poll yet. Run `live-status.mjs` / `live-resume.mjs`, complete the cleanup manually if needed, then run `live-complete.mjs --id EVENT_ID`.
|
|
402
464
|
- `_acceptResult.handled: true` and `carbonize: false`: nothing to do. Poll again.
|
|
403
465
|
- `_acceptResult.handled: true` and `carbonize: true`: **post-accept cleanup is required before the next poll.** See the "Required after accept (carbonize)" section below. The `event._acceptResult.todo` field, `_completionAck.requiresComplete`, and a stderr banner all point at this required follow-up; none are decorative. After cleanup, run `live-complete.mjs --id EVENT_ID`, then poll again.
|
|
@@ -406,15 +468,15 @@ Event: `{id, variantId, _acceptResult, _completionAck}`. The poll script already
|
|
|
406
468
|
|
|
407
469
|
### Required after accept (carbonize)
|
|
408
470
|
|
|
409
|
-
When `_acceptResult.carbonize === true`, the accepted variant was stitched into source with helper markers and inline CSS so the browser can render it immediately with no visual gap. That stitch-in is **temporary**. The agent must rewrite it into permanent form before doing anything else. Skipping this leaves dead `@scope` rules for unaccepted variants, a pointless `data-
|
|
471
|
+
When `_acceptResult.carbonize === true`, the accepted variant was stitched into source with helper markers and inline CSS so the browser can render it immediately with no visual gap. That stitch-in is **temporary**. The agent must rewrite it into permanent form before doing anything else. Skipping this leaves dead `@scope` rules for unaccepted variants, a pointless `data-monodesign-variant` wrapper, and `monodesign-carbonize-start/end` comment noise in the source file; all of which accumulate across sessions.
|
|
410
472
|
|
|
411
473
|
Do these five steps in the current thread, synchronously, before the next poll. Do not poll again until the file is clean.
|
|
412
474
|
|
|
413
|
-
1. **Locate the carbonize block** in the source file (`_acceptResult.file`). It's bracketed by `<!--
|
|
475
|
+
1. **Locate the carbonize block** in the source file (`_acceptResult.file`). It's bracketed by `<!-- monodesign-carbonize-start SESSION_ID -->` and `<!-- monodesign-carbonize-end SESSION_ID -->` and contains a `<style data-monodesign-css="SESSION_ID">` element. If the variant declared parameters, an `<!-- monodesign-param-values SESSION_ID: {...} -->` comment sits alongside the style tag with the user's chosen values; read it first; it drives steps 3 and 4 below.
|
|
414
476
|
2. **Move the CSS rules** into the project's real stylesheet. Which stylesheet depends on the project (e.g. `site/styles/workflow.css` for an Astro project, or the component's co-located CSS file for a Vite/Next project; pick whichever already owns styling for the surrounding element).
|
|
415
|
-
3. **Bake in parameter values while rewriting selectors.** For `@scope ([data-
|
|
416
|
-
4. **Unwrap the accepted content.** Delete the `<div data-
|
|
417
|
-
5. **Delete the inline `<style>` block, the `<!--
|
|
477
|
+
3. **Bake in parameter values while rewriting selectors.** For `@scope ([data-monodesign-variant="N"])` wrappers: retarget to real, semantic classes on the accepted HTML (`.why-visual--v2 .v2-label { … }`). For `:scope[data-p-<id>="VALUE"]` selectors: keep only the branch matching the chosen value from the param-values comment; drop the others (they're dead after accept). For `var(--p-<id>, DEFAULT)` in the CSS: either substitute the literal value, or if the param is still useful as a knob going forward, leave the var and update its initial declaration to the chosen value.
|
|
478
|
+
4. **Unwrap the accepted content.** Delete the inner `<div data-monodesign-variant="N" style="display: contents">` that wraps it. On JSX/TSX, also delete the outer `<div data-monodesign-carbonize="SESSION_ID" style={{ display: 'contents' }}>` wrapper if present (accept adds it so ternary/`return` slots keep a single root). Drop `data-monodesign-params` and any `data-p-*` attributes; those are live-mode plumbing, not source.
|
|
479
|
+
5. **Delete the inline `<style>` block, the `<!-- monodesign-param-values -->` comment if present, and both `<!-- monodesign-carbonize-start/end -->` markers.** Also drop any `@scope` rules for variants other than the accepted one; those are dead code now.
|
|
418
480
|
|
|
419
481
|
After the file is clean, run `live-complete.mjs --id SESSION_ID`, verify it reports `phase: "completed"`, then poll again.
|
|
420
482
|
|
|
@@ -424,6 +486,28 @@ A background agent may be used for the rewrite, but the current thread is respon
|
|
|
424
486
|
|
|
425
487
|
Event: `{id, _acceptResult, _completionAck}`. The poll script already restored the original, removed all variant markers, and acknowledged `discarded` durable completion. Nothing to do unless `_completionAck.ok !== true`; in that case run `live-complete.mjs --id EVENT_ID --discarded`, then poll again.
|
|
426
488
|
|
|
489
|
+
## Handle `steer`
|
|
490
|
+
|
|
491
|
+
Event: `{id, message, pageUrl}`. The user typed or spoke into the global bar **Steer** control: page-level direction without picking an element or launching variant generation.
|
|
492
|
+
|
|
493
|
+
The mic button uses the browser **Web Speech API** (MVP): click to start, speak, stop automatically when the utterance ends, then the transcript submits as a steer event. Click again while listening to cancel without submitting.
|
|
494
|
+
|
|
495
|
+
This is lighter than `generate`: no screenshot, no element context, no variant cycling. Read `message` and inspect the live page or project files as needed, then either make edits or answer in prose.
|
|
496
|
+
|
|
497
|
+
When finished:
|
|
498
|
+
|
|
499
|
+
```bash
|
|
500
|
+
node .claude/skills/monodesign/scripts/live-poll.mjs --reply EVENT_ID steer_done ["Optional short note for a browser toast"]
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
On failure:
|
|
504
|
+
|
|
505
|
+
```bash
|
|
506
|
+
node .claude/skills/monodesign/scripts/live-poll.mjs --reply EVENT_ID error "Short reason"
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
Then poll again immediately. Do not send a separate "picked up" reply. The Steer bar stays locked until `steer_done` or `error` arrives over SSE.
|
|
510
|
+
|
|
427
511
|
## Handle `prefetch`
|
|
428
512
|
|
|
429
513
|
Event: `{pageUrl}`. The browser fires this the first time the user selects an element on a given route, as a latency shortcut; it signals the user is likely about to Go on a page you haven't read yet.
|
|
@@ -437,6 +521,18 @@ Read the file into context, then poll again. No `--reply`: this is speculative p
|
|
|
437
521
|
|
|
438
522
|
Dedupe is the browser's job (one prefetch per unique pathname per session); trust it. If the same file shows up twice from different routes mapping to the same file, the second Read is cached anyway.
|
|
439
523
|
|
|
524
|
+
## Handle `manual_edit_apply`
|
|
525
|
+
|
|
526
|
+
Event: `{id, pageUrl, batch: {entries}, evidencePath?, chunk?, repair?, deadlineMs}`.
|
|
527
|
+
|
|
528
|
+
The user already clicked Apply. Do not ask what to do, discard, or redirect to Go. The parent live thread keeps the foreground poll loop and sends the final `/poll --reply --data`.
|
|
529
|
+
|
|
530
|
+
When native subagents are available, delegate source edits to `monodesign_manual_edit_applier` / `monodesign-manual-edit-applier`. Pass cwd, scripts path, event id, page URL, chunk/deadline, `batch`, `evidencePath`, and the canonical JSON result schema. The subagent must not poll or reply. If unavailable, apply inline with the same contract.
|
|
531
|
+
|
|
532
|
+
If `repair` is present, the previous Apply changed source but final validation failed. Fix the current source and return the same canonical JSON result; do not roll files back yourself. The browser will ask the user before any rollback.
|
|
533
|
+
|
|
534
|
+
After source edits finish, reply exactly once with `node .claude/skills/monodesign/scripts/live-poll.mjs --reply EVENT_ID done --data '{"status":"done","appliedEntryIds":["8hexid"],"failed":[],"files":["src/page.html"],"notes":[]}'`. Use `status:"partial"` or `status:"error"` with `failed[]` when not every entry applied. Then poll again. Never reply without the event id; `--reply done --file ...` is invalid for manual Apply.
|
|
535
|
+
|
|
440
536
|
## Exit
|
|
441
537
|
|
|
442
538
|
The user can stop live mode by:
|
|
@@ -449,18 +545,18 @@ When the poll returns `exit`, proceed to cleanup. If the poll is still running a
|
|
|
449
545
|
## Cleanup
|
|
450
546
|
|
|
451
547
|
```bash
|
|
452
|
-
|
|
548
|
+
node .claude/skills/monodesign/scripts/live-server.mjs stop
|
|
453
549
|
```
|
|
454
550
|
|
|
455
|
-
Stops the HTTP server and runs `live-inject.mjs --remove` to strip `localhost:…/live.js` from the HTML entry. To stop the server but keep the inject tag (for a quick restart), use `stop --keep-inject`. `.
|
|
551
|
+
Stops the HTTP server and runs `live-inject.mjs --remove` to strip `localhost:…/live.js` from the HTML entry. To stop the server but keep the inject tag (for a quick restart), use `stop --keep-inject`. `.monodesign/live/config.json` persists as project config for future sessions.
|
|
456
552
|
|
|
457
553
|
Then:
|
|
458
|
-
- Remove any leftover variant wrappers (search for `
|
|
459
|
-
- Remove any leftover carbonize blocks (search for `
|
|
554
|
+
- Remove any leftover variant wrappers (search for `monodesign-variants-start` markers).
|
|
555
|
+
- Remove any leftover carbonize blocks (search for `monodesign-carbonize-start` markers).
|
|
460
556
|
|
|
461
557
|
## First-time setup (config missing or invalid)
|
|
462
558
|
|
|
463
|
-
If `live.mjs` outputs `{ ok: false, error: "config_missing" | "config_invalid", path }`, write the live config at the reported path. By default this is `.
|
|
559
|
+
If `live.mjs` outputs `{ ok: false, error: "config_missing" | "config_invalid", path }`, write the live config at the reported path. By default this is `.monodesign/live/config.json`.
|
|
464
560
|
|
|
465
561
|
Schema:
|
|
466
562
|
|
|
@@ -535,12 +631,12 @@ If `config.cspChecked === true`, skip this entire section. You already asked thi
|
|
|
535
631
|
Otherwise, run the detection helper:
|
|
536
632
|
|
|
537
633
|
```bash
|
|
538
|
-
|
|
634
|
+
node .claude/skills/monodesign/scripts/detect-csp.mjs
|
|
539
635
|
```
|
|
540
636
|
|
|
541
637
|
Output: `{ shape, signals }` where `shape` is one of `append-arrays`, `append-string`, `middleware`, `meta-tag`, or `null`. The shape is named by *patch mechanism*, so one template covers many frameworks.
|
|
542
638
|
|
|
543
|
-
- **`null`**: no CSP; skip to writing `.
|
|
639
|
+
- **`null`**: no CSP; skip to writing `.monodesign/live/config.json` with `cspChecked: true`.
|
|
544
640
|
- **`append-arrays`**: CSP defined as structured directive arrays. Auto-patchable. See *append-arrays* below. Covers:
|
|
545
641
|
- Monorepo helpers with `additionalScriptSrc` / `additionalConnectSrc` options (Next.js + shared config package)
|
|
546
642
|
- SvelteKit `kit.csp.directives`
|
|
@@ -574,12 +670,12 @@ CSP expressed as structured directive arrays. Patch mechanism: declare a dev-onl
|
|
|
574
670
|
**Declare near the top of the file that holds the CSP arrays:**
|
|
575
671
|
|
|
576
672
|
```ts
|
|
577
|
-
// Dev-only allowance so
|
|
578
|
-
const
|
|
673
|
+
// Dev-only allowance so monodesign live mode can load. Guarded by NODE_ENV.
|
|
674
|
+
const __monodesignLiveDev =
|
|
579
675
|
process.env.NODE_ENV === "development" ? ["http://localhost:8400"] : [];
|
|
580
676
|
```
|
|
581
677
|
|
|
582
|
-
**Append `...
|
|
678
|
+
**Append `...__monodesignLiveDev` to the script-src and connect-src directive arrays.** Per-framework specifics:
|
|
583
679
|
|
|
584
680
|
- **Next.js + monorepo helper**: edit the *app's* `next.config.*` (not the shared helper), appending to `additionalScriptSrc` and `additionalConnectSrc` passed into `createBaseNextConfig` (or equivalent). Keeps the shared package clean.
|
|
585
681
|
- **SvelteKit**: edit `svelte.config.js`, appending to `kit.csp.directives['script-src']` and `kit.csp.directives['connect-src']`.
|
|
@@ -589,21 +685,21 @@ Reference outputs:
|
|
|
589
685
|
- `tests/framework-fixtures/nextjs-turborepo/expected-after-patch.ts` (Next.js)
|
|
590
686
|
- `tests/framework-fixtures/sveltekit-csp/expected-after-patch.js` (SvelteKit)
|
|
591
687
|
|
|
592
|
-
Idempotency: if `
|
|
688
|
+
Idempotency: if `__monodesignLiveDev` already exists in the file, the patch is already applied; skip asking and just mark `cspChecked: true`.
|
|
593
689
|
|
|
594
690
|
#### append-string
|
|
595
691
|
|
|
596
692
|
CSP built as a literal value string. Two-point patch: declare a dev-only string near the top, interpolate it into the CSP at the `script-src` and `connect-src` directives.
|
|
597
693
|
|
|
598
694
|
```ts
|
|
599
|
-
// Dev-only allowance so
|
|
600
|
-
const
|
|
695
|
+
// Dev-only allowance so monodesign live mode can load.
|
|
696
|
+
const __monodesignLiveDev =
|
|
601
697
|
process.env.NODE_ENV === "development" ? " http://localhost:8400" : "";
|
|
602
698
|
```
|
|
603
699
|
|
|
604
700
|
Then in the CSP value string:
|
|
605
|
-
- `script-src 'self' 'unsafe-inline'` → `` `script-src 'self' 'unsafe-inline'${
|
|
606
|
-
- `connect-src 'self'` → `` `connect-src 'self'${
|
|
701
|
+
- `script-src 'self' 'unsafe-inline'` → `` `script-src 'self' 'unsafe-inline'${__monodesignLiveDev}` ``
|
|
702
|
+
- `connect-src 'self'` → `` `connect-src 'self'${__monodesignLiveDev}` ``
|
|
607
703
|
|
|
608
704
|
(Leading space on the dev string so it concatenates cleanly into the existing value. Convert the literal CSP directives into template strings as part of the edit if they aren't already.)
|
|
609
705
|
|
|
@@ -617,6 +713,6 @@ Reference outputs:
|
|
|
617
713
|
|
|
618
714
|
### Troubleshooting
|
|
619
715
|
|
|
620
|
-
If a user says "no" to the CSP patch at setup time and later complains that live doesn't work: their dev CSP blocks `http://localhost:8400`. Fix: delete `cspChecked` from `.
|
|
716
|
+
If a user says "no" to the CSP patch at setup time and later complains that live doesn't work: their dev CSP blocks `http://localhost:8400`. Fix: delete `cspChecked` from `.monodesign/live/config.json` and re-run `live.mjs`: setup will ask again.
|
|
621
717
|
|
|
622
718
|
Then re-run `live.mjs`.
|
|
@@ -14,7 +14,7 @@ Push an interface past conventional limits. This isn't just about visual effects
|
|
|
14
14
|
This command has the highest potential to misfire. Do NOT jump straight into implementation. You MUST:
|
|
15
15
|
|
|
16
16
|
1. **Think through 2-3 different directions**: consider different techniques, levels of ambition, and aesthetic approaches. For each direction, briefly describe what the result would look and feel like.
|
|
17
|
-
2. **
|
|
17
|
+
2. **STOP and call the AskUserQuestion tool to clarify.** to present these directions and get the user's pick before writing any code. Explain trade-offs (browser support, performance cost, complexity).
|
|
18
18
|
3. Only proceed with the direction the user confirms.
|
|
19
19
|
|
|
20
20
|
Skipping this step risks building something embarrassing that needs to be thrown away.
|
|
@@ -160,7 +160,7 @@ Choose personas based on the interface type:
|
|
|
160
160
|
|
|
161
161
|
## Project-Specific Personas
|
|
162
162
|
|
|
163
|
-
If `PRODUCT.md and DESIGN.md` contains a `## Design Context` section (generated by `
|
|
163
|
+
If `PRODUCT.md and DESIGN.md` contains a `## Design Context` section (generated by `monodesign init`), derive 1–2 additional personas from the audience and brand information:
|
|
164
164
|
|
|
165
165
|
1. Read the target audience description
|
|
166
166
|
2. Identify the primary user archetype not covered by the 5 predefined personas
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Perform a meticulous final pass to catch all the small details that separate good work from great work. The difference between shipped and polished.
|
|
4
4
|
|
|
5
|
+
Detector and automated QA output are defect evidence only. A clean script result is never proof that the design is strong; gather browser evidence and inspect the real interaction path.
|
|
6
|
+
|
|
5
7
|
## Design System Discovery
|
|
6
8
|
|
|
7
9
|
Aligning the feature to the design system is **not optional**. Polish without alignment is decoration on top of drift, and it makes the next person's job harder. Discovery comes before any other polish work.
|
|
@@ -33,7 +35,14 @@ Understand the current state and goals before touching anything:
|
|
|
33
35
|
- Loading and transition smoothness
|
|
34
36
|
- Information architecture and flow drift (does this feature reveal complexity the way neighboring features do?)
|
|
35
37
|
|
|
36
|
-
4. **
|
|
38
|
+
4. **Pull in any prior critique** (optional signal): If `/monodesign critique` has been run on the same target, its priority issues are a useful prior for what to address first. Resolve the target to a file path or URL, then:
|
|
39
|
+
```bash
|
|
40
|
+
slug=$(node .claude/skills/monodesign/scripts/critique-storage.mjs slug "<resolved>")
|
|
41
|
+
node .claude/skills/monodesign/scripts/critique-storage.mjs latest "$slug"
|
|
42
|
+
```
|
|
43
|
+
Exit 0 with body = found; fold the P0/P1 items into your polish list and mention the snapshot path so the user sees what you read. Exit 2 = no snapshot, continue without it. The critique is one input among many. Do your own pass either way.
|
|
44
|
+
|
|
45
|
+
5. **Triage cosmetic vs functional**: Classify each issue as **cosmetic** (looks off, doesn't impede the user) or **functional** (breaks, blocks, or confuses the experience). When polish time is tight, functional issues ship first; cosmetic ones can land in a follow-up. Quality should be consistent; never perfect one corner while leaving another rough.
|
|
37
46
|
|
|
38
47
|
**CRITICAL**: Polish is the last step, not the first. Don't polish work that's not functionally complete.
|
|
39
48
|
|
|
@@ -82,7 +91,6 @@ Visual polish on a misshapen flow is wasted work. Match the *shape* of the exper
|
|
|
82
91
|
- **Theme consistency**: Works in all theme variants
|
|
83
92
|
- **Color meaning**: Same colors mean same things throughout
|
|
84
93
|
- **Accessible focus**: Focus indicators visible with sufficient contrast
|
|
85
|
-
- **Tinted neutrals**: No pure gray or pure black; add subtle color tint (0.01 chroma)
|
|
86
94
|
- **Gray on color**: Never put gray text on colored backgrounds; use a shade of that color or transparency
|
|
87
95
|
|
|
88
96
|
### Interaction States
|
|
@@ -216,11 +224,12 @@ Sweat the details. Zoom in until the alignment is right and the spacing reads as
|
|
|
216
224
|
|
|
217
225
|
Before marking as done:
|
|
218
226
|
|
|
219
|
-
- **Use it yourself**: Actually interact with the feature
|
|
220
|
-
- **Test on real devices**: Not just browser DevTools
|
|
221
|
-
- **Ask someone else to review**: Fresh eyes catch things
|
|
222
|
-
- **Compare to design**: Match intended design
|
|
223
|
-
- **Check all states**: Don't just test happy path
|
|
227
|
+
- **Use it yourself**: Actually interact with the feature.
|
|
228
|
+
- **Test on real devices**: Not just browser DevTools.
|
|
229
|
+
- **Ask someone else to review**: Fresh eyes catch things.
|
|
230
|
+
- **Compare to design**: Match intended design.
|
|
231
|
+
- **Check all states**: Don't just test happy path.
|
|
232
|
+
- **Treat automation carefully**: Run detector or QA commands when they are available and relevant, fix their defects, but never cite a clean result as proof that the work is polished.
|
|
224
233
|
|
|
225
234
|
## Clean Up
|
|
226
235
|
|
|
@@ -230,4 +239,3 @@ After polishing, ensure code quality:
|
|
|
230
239
|
- **Remove orphaned code**: Delete unused styles, components, or files made obsolete by polish.
|
|
231
240
|
- **Consolidate tokens**: If you introduced new values, check whether they should be tokens.
|
|
232
241
|
- **Verify DRYness**: Look for duplication introduced during polishing and consolidate.
|
|
233
|
-
|
package/packages/@monomind/cli/.claude/skills/monodesign/reference/pre-delivery-checklist.md
CHANGED
|
@@ -85,7 +85,7 @@ For the full rule explanations behind each item, see `ux-rules.md`.
|
|
|
85
85
|
|
|
86
86
|
## Design Antipatterns (Quick Sweep)
|
|
87
87
|
|
|
88
|
-
Run `
|
|
88
|
+
Run `monomind design detect` or manually check:
|
|
89
89
|
|
|
90
90
|
- [ ] No `border-left: Npx solid [color]` as a stripe on cards (`side-tab`)
|
|
91
91
|
- [ ] No `background-clip: text` gradient text (`gradient-text`)
|
|
@@ -10,7 +10,6 @@ Product UI's failure mode isn't flatness, it's strangeness without purpose: over
|
|
|
10
10
|
|
|
11
11
|
## Typography
|
|
12
12
|
|
|
13
|
-
- **System fonts are legitimate.** `-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif` gives you native feel on every platform. Inter is the common cross-platform default for a reason.
|
|
14
13
|
- **One family is often right.** Product UIs don't need display/body pairing. A well-tuned sans carries headings, buttons, labels, body, data.
|
|
15
14
|
- **Fixed rem scale, not fluid.** Clamp-sized headings don't serve product UI. Users view at consistent DPI, and a fluid h1 that shrinks in a sidebar looks worse, not better.
|
|
16
15
|
- **Tighter scale ratio.** 1.125–1.2 between steps is typical. More type elements here than on brand surfaces; exaggerated contrast creates noise.
|
|
@@ -26,8 +25,6 @@ Product defaults to Restrained. A single surface can earn Committed (a dashboard
|
|
|
26
25
|
|
|
27
26
|
## Layout
|
|
28
27
|
|
|
29
|
-
- Predictable grids. Consistency IS an affordance; users navigate faster when the structure is expected.
|
|
30
|
-
- Familiar patterns are features. Standard navigation (top bar, side nav), breadcrumbs, tabs, and form layouts have established user expectations. Don't reinvent for flavor.
|
|
31
28
|
- Responsive behavior is structural (collapse sidebar, responsive table, breakpoint-driven columns), not fluid typography.
|
|
32
29
|
|
|
33
30
|
## Components
|
|
@@ -51,6 +48,7 @@ Every interactive component has: default, hover, focus, active, disabled, loadin
|
|
|
51
48
|
- Display fonts in UI labels, buttons, data.
|
|
52
49
|
- Reinventing standard affordances for flavor (custom scrollbars, weird form controls, non-standard modals).
|
|
53
50
|
- Heavy color or full-saturation accents on inactive states.
|
|
51
|
+
- Modal as first thought. Modals are usually laziness. Exhaust inline / progressive alternatives first.
|
|
54
52
|
|
|
55
53
|
## Product permissions
|
|
56
54
|
|