hoomanjs 1.46.0 → 1.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -18
- package/dist/acp/acp-agent.d.ts +42 -0
- package/dist/acp/acp-agent.js +336 -47
- package/dist/acp/acp-agent.js.map +1 -1
- package/dist/acp/approvals.js +11 -10
- package/dist/acp/approvals.js.map +1 -1
- package/dist/acp/browser.d.ts +9 -0
- package/dist/acp/browser.js +23 -0
- package/dist/acp/browser.js.map +1 -0
- package/dist/acp/meta/vscode.d.ts +8 -7
- package/dist/acp/meta/vscode.js +10 -11
- package/dist/acp/meta/vscode.js.map +1 -1
- package/dist/acp/session-config.d.ts +2 -2
- package/dist/acp/session-config.js +24 -20
- package/dist/acp/session-config.js.map +1 -1
- package/dist/acp/sessions/store.d.ts +3 -3
- package/dist/acp/utils/tool-kind.js +8 -6
- package/dist/acp/utils/tool-kind.js.map +1 -1
- package/dist/chat/app.js +91 -11
- package/dist/chat/app.js.map +1 -1
- package/dist/chat/approvals.js +3 -0
- package/dist/chat/approvals.js.map +1 -1
- package/dist/chat/components/ApprovalPrompt.js +15 -25
- package/dist/chat/components/ApprovalPrompt.js.map +1 -1
- package/dist/chat/components/BackgroundJobsPanel.d.ts +10 -0
- package/dist/chat/components/BackgroundJobsPanel.js +15 -0
- package/dist/chat/components/BackgroundJobsPanel.js.map +1 -0
- package/dist/chat/components/BottomChrome.d.ts +6 -1
- package/dist/chat/components/BottomChrome.js +3 -2
- package/dist/chat/components/BottomChrome.js.map +1 -1
- package/dist/chat/components/ChromePicker.d.ts +7 -2
- package/dist/chat/components/ChromePicker.js +18 -2
- package/dist/chat/components/ChromePicker.js.map +1 -1
- package/dist/chat/components/Composer.js +3 -2
- package/dist/chat/components/Composer.js.map +1 -1
- package/dist/chat/components/DownloadPanel.js +2 -1
- package/dist/chat/components/DownloadPanel.js.map +1 -1
- package/dist/chat/components/EmptyChatBanner.js +2 -1
- package/dist/chat/components/EmptyChatBanner.js.map +1 -1
- package/dist/chat/components/PromptInput.js +2 -1
- package/dist/chat/components/PromptInput.js.map +1 -1
- package/dist/chat/components/QuestionPrompt.js +5 -4
- package/dist/chat/components/QuestionPrompt.js.map +1 -1
- package/dist/chat/components/QueuedPrompts.js +3 -2
- package/dist/chat/components/QueuedPrompts.js.map +1 -1
- package/dist/chat/components/ReasoningStrip.js +2 -1
- package/dist/chat/components/ReasoningStrip.js.map +1 -1
- package/dist/chat/components/RetryEvent.js +2 -1
- package/dist/chat/components/RetryEvent.js.map +1 -1
- package/dist/chat/components/SelectPicker.js +2 -1
- package/dist/chat/components/SelectPicker.js.map +1 -1
- package/dist/chat/components/ShellToolEvent.d.ts +12 -0
- package/dist/chat/components/ShellToolEvent.js +94 -0
- package/dist/chat/components/ShellToolEvent.js.map +1 -0
- package/dist/chat/components/SlashCommands.js +2 -1
- package/dist/chat/components/SlashCommands.js.map +1 -1
- package/dist/chat/components/Spinner.js +2 -1
- package/dist/chat/components/Spinner.js.map +1 -1
- package/dist/chat/components/StatusBar.js +19 -15
- package/dist/chat/components/StatusBar.js.map +1 -1
- package/dist/chat/components/ThinkingStatus.js +2 -1
- package/dist/chat/components/ThinkingStatus.js.map +1 -1
- package/dist/chat/components/ThoughtEvent.js +2 -1
- package/dist/chat/components/ThoughtEvent.js.map +1 -1
- package/dist/chat/components/TodoPanel.js +2 -1
- package/dist/chat/components/TodoPanel.js.map +1 -1
- package/dist/chat/components/ToolEvent.d.ts +2 -1
- package/dist/chat/components/ToolEvent.js +9 -2
- package/dist/chat/components/ToolEvent.js.map +1 -1
- package/dist/chat/components/ToolEventFileResult.js +8 -7
- package/dist/chat/components/ToolEventFileResult.js.map +1 -1
- package/dist/chat/components/Transcript.d.ts +4 -2
- package/dist/chat/components/Transcript.js +4 -4
- package/dist/chat/components/Transcript.js.map +1 -1
- package/dist/chat/components/markdown/BlockRenderer.js +3 -2
- package/dist/chat/components/markdown/BlockRenderer.js.map +1 -1
- package/dist/chat/components/markdown/CodeBlock.js +3 -2
- package/dist/chat/components/markdown/CodeBlock.js.map +1 -1
- package/dist/chat/components/markdown/InlineRenderer.js +6 -5
- package/dist/chat/components/markdown/InlineRenderer.js.map +1 -1
- package/dist/chat/components/shared.js +7 -6
- package/dist/chat/components/shared.js.map +1 -1
- package/dist/chat/types.d.ts +7 -0
- package/dist/cli.js +162 -44
- package/dist/cli.js.map +1 -1
- package/dist/configure/app.js +46 -29
- package/dist/configure/app.js.map +1 -1
- package/dist/configure/components/BusyScreen.js +2 -1
- package/dist/configure/components/BusyScreen.js.map +1 -1
- package/dist/configure/components/MenuScreen.js +3 -2
- package/dist/configure/components/MenuScreen.js.map +1 -1
- package/dist/configure/components/PromptForm.js +2 -1
- package/dist/configure/components/PromptForm.js.map +1 -1
- package/dist/configure/components/SelectMenuItem.js +4 -3
- package/dist/configure/components/SelectMenuItem.js.map +1 -1
- package/dist/configure/utils.js +4 -3
- package/dist/configure/utils.js.map +1 -1
- package/dist/core/agent/default-retry-strategy.js +46 -12
- package/dist/core/agent/default-retry-strategy.js.map +1 -1
- package/dist/core/agent/gitignore-guard-plugin.js +17 -2
- package/dist/core/agent/gitignore-guard-plugin.js.map +1 -1
- package/dist/core/agent/index.js +38 -7
- package/dist/core/agent/index.js.map +1 -1
- package/dist/core/approvals/allowlist.js +1 -0
- package/dist/core/approvals/allowlist.js.map +1 -1
- package/dist/core/approvals/intervention.d.ts +10 -2
- package/dist/core/approvals/intervention.js +46 -8
- package/dist/core/approvals/intervention.js.map +1 -1
- package/dist/core/config.d.ts +9 -2
- package/dist/core/config.js +8 -4
- package/dist/core/config.js.map +1 -1
- package/dist/core/index.d.ts +2 -2
- package/dist/core/mcp/oauth/service.js +2 -2
- package/dist/core/mcp/oauth/service.js.map +1 -1
- package/dist/core/models/bedrock.js +6 -0
- package/dist/core/models/bedrock.js.map +1 -1
- package/dist/core/models/groq.js +34 -14
- package/dist/core/models/groq.js.map +1 -1
- package/dist/core/models/minimax.js +1 -1
- package/dist/core/models/minimax.js.map +1 -1
- package/dist/core/models/types.d.ts +10 -2
- package/dist/core/models/types.js +1 -0
- package/dist/core/models/types.js.map +1 -1
- package/dist/core/modes/definitions.d.ts +4 -2
- package/dist/core/modes/definitions.js +77 -9
- package/dist/core/modes/definitions.js.map +1 -1
- package/dist/core/modes/index.d.ts +1 -1
- package/dist/core/modes/index.js +1 -1
- package/dist/core/modes/index.js.map +1 -1
- package/dist/core/modes/registry.js +4 -9
- package/dist/core/modes/registry.js.map +1 -1
- package/dist/core/modes/schema.d.ts +1 -1
- package/dist/core/modes/schema.js +1 -1
- package/dist/core/modes/schema.js.map +1 -1
- package/dist/core/prompts/agents/{review.md → code-review.md} +2 -2
- package/dist/core/prompts/agents/design-review.md +35 -0
- package/dist/core/prompts/agents/{test-investigator.md → quality-analyst.md} +2 -2
- package/dist/core/prompts/modes/agent.md +2 -0
- package/dist/core/prompts/modes/ask.md +2 -2
- package/dist/core/prompts/modes/design.md +37 -0
- package/dist/core/prompts/modes/plan.md +5 -5
- package/dist/core/prompts/{runtime.js → runtime/agents.js} +2 -2
- package/dist/core/prompts/runtime/agents.js.map +1 -0
- package/dist/core/prompts/runtime/design.d.ts +11 -0
- package/dist/core/prompts/runtime/design.js +78 -0
- package/dist/core/prompts/runtime/design.js.map +1 -0
- package/dist/core/prompts/{session-mode-appendix.js → session-mode.js} +1 -1
- package/dist/core/prompts/session-mode.js.map +1 -0
- package/dist/core/prompts/static/ask-user.md +3 -2
- package/dist/core/prompts/static/fetch.md +2 -1
- package/dist/core/prompts/static/filesystem.md +2 -1
- package/dist/core/prompts/static/shell.md +21 -1
- package/dist/core/prompts/static/subagents.md +2 -1
- package/dist/core/prompts/static/switch-mode.md +10 -0
- package/dist/core/prompts/system.d.ts +1 -0
- package/dist/core/prompts/system.js +11 -3
- package/dist/core/prompts/system.js.map +1 -1
- package/dist/core/shell/index.d.ts +7 -0
- package/dist/core/shell/index.js +6 -0
- package/dist/core/shell/index.js.map +1 -0
- package/dist/core/shell/manager.d.ts +23 -0
- package/dist/core/shell/manager.js +604 -0
- package/dist/core/shell/manager.js.map +1 -0
- package/dist/core/shell/output-buffer.d.ts +30 -0
- package/dist/core/shell/output-buffer.js +116 -0
- package/dist/core/shell/output-buffer.js.map +1 -0
- package/dist/core/shell/registry.d.ts +5 -0
- package/dist/core/shell/registry.js +24 -0
- package/dist/core/shell/registry.js.map +1 -0
- package/dist/core/{tools/shell.d.ts → shell/terminal-backend.d.ts} +20 -18
- package/dist/core/shell/terminal-backend.js +18 -0
- package/dist/core/shell/terminal-backend.js.map +1 -0
- package/dist/core/shell/tools.d.ts +41 -0
- package/dist/core/{tools/shell.js → shell/tools.js} +186 -11
- package/dist/core/shell/tools.js.map +1 -0
- package/dist/core/shell/types.d.ts +95 -0
- package/dist/core/shell/types.js +2 -0
- package/dist/core/shell/types.js.map +1 -0
- package/dist/core/skills/built-in/hooman-config/SKILL.md +30 -35
- package/dist/core/skills/built-in/hooman-config/search.md +5 -3
- package/dist/core/skills/built-in/hooman-design/SKILL.md +97 -0
- package/dist/core/skills/built-in/hooman-design/assets/article-shell.html +87 -0
- package/dist/core/skills/built-in/hooman-design/assets/auth-shell.html +143 -0
- package/dist/core/skills/built-in/hooman-design/assets/business-card-shell.html +112 -0
- package/dist/core/skills/built-in/hooman-design/assets/contact-shell.html +181 -0
- package/dist/core/skills/built-in/hooman-design/assets/dashboard-shell.html +90 -0
- package/dist/core/skills/built-in/hooman-design/assets/data-table-shell.html +114 -0
- package/dist/core/skills/built-in/hooman-design/assets/deck-shell.html +187 -0
- package/dist/core/skills/built-in/hooman-design/assets/dialog-shell.html +98 -0
- package/dist/core/skills/built-in/hooman-design/assets/email-shell.html +101 -0
- package/dist/core/skills/built-in/hooman-design/assets/empty-state-shell.html +92 -0
- package/dist/core/skills/built-in/hooman-design/assets/flyer-shell.html +168 -0
- package/dist/core/skills/built-in/hooman-design/assets/invite-shell.html +167 -0
- package/dist/core/skills/built-in/hooman-design/assets/landing-shell.html +184 -0
- package/dist/core/skills/built-in/hooman-design/assets/mobile-frame-shell.html +109 -0
- package/dist/core/skills/built-in/hooman-design/assets/newsletter-shell.html +141 -0
- package/dist/core/skills/built-in/hooman-design/assets/onboarding-shell.html +131 -0
- package/dist/core/skills/built-in/hooman-design/assets/pricing-shell.html +160 -0
- package/dist/core/skills/built-in/hooman-design/assets/prototype-shell.html +83 -0
- package/dist/core/skills/built-in/hooman-design/assets/resume-shell.html +228 -0
- package/dist/core/skills/built-in/hooman-design/assets/settings-shell.html +196 -0
- package/dist/core/skills/built-in/hooman-design/assets/tokens/botanical-calm.css +34 -0
- package/dist/core/skills/built-in/hooman-design/assets/tokens/copper-ledger.css +34 -0
- package/dist/core/skills/built-in/hooman-design/assets/tokens/editorial-ink.css +34 -0
- package/dist/core/skills/built-in/hooman-design/assets/tokens/fintech-clear.css +34 -0
- package/dist/core/skills/built-in/hooman-design/assets/tokens/harbor-navy.css +35 -0
- package/dist/core/skills/built-in/hooman-design/assets/tokens/midnight-editorial.css +34 -0
- package/dist/core/skills/built-in/hooman-design/assets/tokens/night-console.css +34 -0
- package/dist/core/skills/built-in/hooman-design/assets/tokens/paper-mono.css +35 -0
- package/dist/core/skills/built-in/hooman-design/assets/tokens/signal-mono.css +34 -0
- package/dist/core/skills/built-in/hooman-design/assets/tokens/soft-product.css +34 -0
- package/dist/core/skills/built-in/hooman-design/assets/tokens/swiss-grid.css +34 -0
- package/dist/core/skills/built-in/hooman-design/assets/tokens/warm-atelier.css +34 -0
- package/dist/core/skills/built-in/hooman-design/assets/waitlist-shell.html +139 -0
- package/dist/core/skills/built-in/hooman-design/craft/accessibility-baseline.md +32 -0
- package/dist/core/skills/built-in/hooman-design/craft/anti-ai-slop.md +27 -0
- package/dist/core/skills/built-in/hooman-design/craft/color-surfaces.md +45 -0
- package/dist/core/skills/built-in/hooman-design/craft/data-viz.md +24 -0
- package/dist/core/skills/built-in/hooman-design/craft/deck-slides.md +46 -0
- package/dist/core/skills/built-in/hooman-design/craft/forms-validation.md +35 -0
- package/dist/core/skills/built-in/hooman-design/craft/iconography.md +19 -0
- package/dist/core/skills/built-in/hooman-design/craft/layout-overflow.md +31 -0
- package/dist/core/skills/built-in/hooman-design/craft/motion.md +41 -0
- package/dist/core/skills/built-in/hooman-design/craft/print.md +37 -0
- package/dist/core/skills/built-in/hooman-design/craft/responsive.md +30 -0
- package/dist/core/skills/built-in/hooman-design/craft/spacing-density.md +46 -0
- package/dist/core/skills/built-in/hooman-design/craft/state-coverage.md +21 -0
- package/dist/core/skills/built-in/hooman-design/craft/typography.md +73 -0
- package/dist/core/skills/built-in/hooman-design/directions.md +115 -0
- package/dist/core/skills/built-in/hooman-design/references/artifact-layout.md +15 -0
- package/dist/core/skills/built-in/hooman-design/references/export.md +47 -0
- package/dist/core/skills/built-in/hooman-design/references/workflow.md +80 -0
- package/dist/core/skills/built-in/hooman-mcp/SKILL.md +2 -2
- package/dist/core/state/llm-modality.d.ts +13 -0
- package/dist/core/state/llm-modality.js +19 -0
- package/dist/core/state/llm-modality.js.map +1 -0
- package/dist/core/state/plan.d.ts +1 -1
- package/dist/core/state/plan.js +1 -1
- package/dist/core/state/shell-jobs.d.ts +9 -0
- package/dist/core/state/shell-jobs.js +20 -0
- package/dist/core/state/shell-jobs.js.map +1 -0
- package/dist/core/state/tool-approvals.d.ts +12 -9
- package/dist/core/state/tool-approvals.js +94 -52
- package/dist/core/state/tool-approvals.js.map +1 -1
- package/dist/core/state/turn-boundaries.d.ts +33 -0
- package/dist/core/state/turn-boundaries.js +49 -0
- package/dist/core/state/turn-boundaries.js.map +1 -0
- package/dist/core/subagents/index.d.ts +1 -1
- package/dist/core/subagents/index.js +1 -1
- package/dist/core/subagents/registry.js +15 -6
- package/dist/core/subagents/registry.js.map +1 -1
- package/dist/core/subagents/tool.d.ts +8 -2
- package/dist/core/subagents/tool.js +93 -44
- package/dist/core/subagents/tool.js.map +1 -1
- package/dist/core/theme.d.ts +14 -0
- package/dist/core/theme.js +14 -0
- package/dist/core/theme.js.map +1 -0
- package/dist/core/tools/ask-user.d.ts +1 -1
- package/dist/core/tools/ask-user.js +1 -1
- package/dist/core/tools/export.d.ts +8 -0
- package/dist/core/tools/export.js +202 -0
- package/dist/core/tools/export.js.map +1 -0
- package/dist/core/tools/fetch.d.ts +2 -0
- package/dist/core/tools/fetch.js +92 -55
- package/dist/core/tools/fetch.js.map +1 -1
- package/dist/core/tools/filesystem.d.ts +2 -1
- package/dist/core/tools/filesystem.js +38 -4
- package/dist/core/tools/filesystem.js.map +1 -1
- package/dist/core/tools/index.d.ts +3 -2
- package/dist/core/tools/index.js +3 -2
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/preview.d.ts +10 -0
- package/dist/core/tools/preview.js +147 -0
- package/dist/core/tools/preview.js.map +1 -0
- package/dist/core/tools/switch-mode.d.ts +6 -0
- package/dist/core/tools/switch-mode.js +188 -0
- package/dist/core/tools/switch-mode.js.map +1 -0
- package/dist/core/tools/web-search.js +176 -0
- package/dist/core/tools/web-search.js.map +1 -1
- package/dist/core/utils/browser.d.ts +8 -1
- package/dist/core/utils/browser.js +17 -1
- package/dist/core/utils/browser.js.map +1 -1
- package/dist/core/utils/export-design.d.ts +40 -0
- package/dist/core/utils/export-design.js +188 -0
- package/dist/core/utils/export-design.js.map +1 -0
- package/dist/core/utils/export-figma.d.ts +17 -0
- package/dist/core/utils/export-figma.js +189 -0
- package/dist/core/utils/export-figma.js.map +1 -0
- package/dist/core/utils/export-sketch.d.ts +11 -0
- package/dist/core/utils/export-sketch.js +456 -0
- package/dist/core/utils/export-sketch.js.map +1 -0
- package/dist/core/utils/fig-archive.d.ts +47 -0
- package/dist/core/utils/fig-archive.js +181 -0
- package/dist/core/utils/fig-archive.js.map +1 -0
- package/dist/core/utils/metadata.d.ts +30 -0
- package/dist/core/utils/metadata.js +122 -0
- package/dist/core/utils/metadata.js.map +1 -1
- package/dist/core/utils/models-prefetch.d.ts +53 -0
- package/dist/core/utils/models-prefetch.js +469 -0
- package/dist/core/utils/models-prefetch.js.map +1 -0
- package/dist/core/utils/onboarding-config.d.ts +48 -0
- package/dist/core/utils/onboarding-config.js +373 -0
- package/dist/core/utils/onboarding-config.js.map +1 -0
- package/dist/core/utils/paths.d.ts +9 -7
- package/dist/core/utils/paths.js +12 -10
- package/dist/core/utils/paths.js.map +1 -1
- package/dist/core/utils/preview-server.d.ts +20 -0
- package/dist/core/utils/preview-server.js +212 -0
- package/dist/core/utils/preview-server.js.map +1 -0
- package/dist/core/utils/search-probe.d.ts +19 -0
- package/dist/core/utils/search-probe.js +165 -0
- package/dist/core/utils/search-probe.js.map +1 -0
- package/dist/core/utils/seeds/empty-slides.deck +0 -0
- package/dist/core/utils/url-safety.d.ts +2 -0
- package/dist/core/utils/url-safety.js +47 -0
- package/dist/core/utils/url-safety.js.map +1 -0
- package/dist/core/utils/zstd.d.ts +6 -0
- package/dist/core/utils/zstd.js +39 -0
- package/dist/core/utils/zstd.js.map +1 -0
- package/dist/exec/approvals.js +5 -5
- package/dist/exec/approvals.js.map +1 -1
- package/dist/index.d.ts +11 -5
- package/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/dist/onboarding/app.d.ts +5 -0
- package/dist/onboarding/app.js +255 -0
- package/dist/onboarding/app.js.map +1 -0
- package/dist/onboarding/index.d.ts +5 -0
- package/dist/onboarding/index.js +27 -0
- package/dist/onboarding/index.js.map +1 -0
- package/package.json +16 -3
- package/dist/core/prompts/runtime.js.map +0 -1
- package/dist/core/prompts/session-mode-appendix.js.map +0 -1
- package/dist/core/prompts/static/planning.md +0 -3
- package/dist/core/tools/plan.d.ts +0 -5
- package/dist/core/tools/plan.js +0 -150
- package/dist/core/tools/plan.js.map +0 -1
- package/dist/core/tools/shell.js.map +0 -1
- /package/dist/core/prompts/{runtime.d.ts → runtime/agents.d.ts} +0 -0
- /package/dist/core/prompts/{session-mode-appendix.d.ts → session-mode.d.ts} +0 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Spacing and density craft rules
|
|
2
|
+
|
|
3
|
+
Spacing is a system, not one-off margins.
|
|
4
|
+
|
|
5
|
+
## Scale
|
|
6
|
+
|
|
7
|
+
Prefer a 4 px base. Expose tokens in `:root`:
|
|
8
|
+
|
|
9
|
+
| Token | Default | Use |
|
|
10
|
+
| ----------- | ------- | ----------------------------- |
|
|
11
|
+
| `--space-1` | 4px | Hairline tweaks |
|
|
12
|
+
| `--space-2` | 8px | Icon gaps, compact stacks |
|
|
13
|
+
| `--space-3` | 12px | Related control groups |
|
|
14
|
+
| `--space-4` | 16px | Default component padding |
|
|
15
|
+
| `--space-5` | 24px | Section padding (compact) |
|
|
16
|
+
| `--space-6` | 32px | Section padding (comfortable) |
|
|
17
|
+
| `--space-7` | 48px | Major section breaks |
|
|
18
|
+
| `--space-8` | 64px | Hero / slide outer padding |
|
|
19
|
+
|
|
20
|
+
## Density postures
|
|
21
|
+
|
|
22
|
+
| Posture | When | Notes |
|
|
23
|
+
| --------------- | --------------------------- | --------------------------------------------------- |
|
|
24
|
+
| **Comfortable** | Marketing, editorial, decks | Larger type, `--space-6`+ section gaps |
|
|
25
|
+
| **Standard** | Product UI, settings | `--space-4` / `--space-5` |
|
|
26
|
+
| **Dense** | Tables, consoles, ops | `--space-2` / `--space-3`; never starve hit targets |
|
|
27
|
+
|
|
28
|
+
Pick one posture per artifact. Do not mix hero-airy with table-cramped in the same view without a clear region boundary.
|
|
29
|
+
|
|
30
|
+
## Stacking
|
|
31
|
+
|
|
32
|
+
- Vertical rhythm: consistent gap between siblings (`gap` on flex/grid > random margins)
|
|
33
|
+
- Related items closer than unrelated (proximity)
|
|
34
|
+
- Separate regions with space **or** a hairline — not both stacked heavily
|
|
35
|
+
|
|
36
|
+
## Cards and lists
|
|
37
|
+
|
|
38
|
+
- Internal padding ≥ `--space-4` on all sides unless dense table cells
|
|
39
|
+
- Gap between cards ≥ internal padding (avoid “tile wallpaper”)
|
|
40
|
+
- List rows: align baselines; meta column must not collide with primary text
|
|
41
|
+
|
|
42
|
+
## Anti-patterns
|
|
43
|
+
|
|
44
|
+
- `margin: 10px 15px 8px 12px` snowflake values
|
|
45
|
+
- Huge hero padding + cramped footer on the same slide
|
|
46
|
+
- Nested cards each adding full padding until content is a postage stamp
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# State coverage craft rules
|
|
2
|
+
|
|
3
|
+
Every interactive surface that fetches or accepts data must render these states.
|
|
4
|
+
|
|
5
|
+
| State | Must contain |
|
|
6
|
+
| ------------- | ------------------------------------------------------------------- |
|
|
7
|
+
| **Loading** | Skeleton/spinner + long-wait fallback |
|
|
8
|
+
| **Empty** | Headline, explanation, primary CTA |
|
|
9
|
+
| **Error** | Plain-language cause, recovery action, preserved input |
|
|
10
|
+
| **Populated** | The primary designed case |
|
|
11
|
+
| **Edge** | Long strings, missing optionals, dense data — layout must not break |
|
|
12
|
+
|
|
13
|
+
## Forms
|
|
14
|
+
|
|
15
|
+
- Validate on blur (not first keystroke)
|
|
16
|
+
- Untouched / dirty-valid / submitted-pending states
|
|
17
|
+
- Lock submit while pending; never wipe user input on error
|
|
18
|
+
|
|
19
|
+
## Check
|
|
20
|
+
|
|
21
|
+
Before shipping, mentally walk each list, table, card, form, and panel through all five states. Missing empty/error is the most common silent AI-UI failure.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Typography craft rules
|
|
2
|
+
|
|
3
|
+
`DESIGN.md` / directions choose fonts; this file governs behavior.
|
|
4
|
+
|
|
5
|
+
## Prefer Google Fonts (webfonts)
|
|
6
|
+
|
|
7
|
+
For HTML artifacts that will export to **Sketch** (and for consistent preview across machines), load display/body faces from [Google Fonts](https://fonts.google.com/) instead of relying on system-only stacks:
|
|
8
|
+
|
|
9
|
+
```html
|
|
10
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
11
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
12
|
+
<link
|
|
13
|
+
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Source+Serif+4:opsz,wght@8..60,600;8..60,700&display=swap"
|
|
14
|
+
rel="stylesheet"
|
|
15
|
+
/>
|
|
16
|
+
<style>
|
|
17
|
+
:root {
|
|
18
|
+
--font-display: "Source Serif 4", Georgia, ui-serif, serif;
|
|
19
|
+
--font-body: Inter, system-ui, sans-serif;
|
|
20
|
+
}
|
|
21
|
+
</style>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Why:
|
|
25
|
+
|
|
26
|
+
- Preview and Playwright measure use the same faces
|
|
27
|
+
- `export_design` `format: "sketch"` **embeds** document `@font-face` / Google Fonts TTFs into the `.sketch` (`fontReferences`) so collaborators see correct type without installing fonts
|
|
28
|
+
- System fonts (Georgia, SF Pro, …) are **not** scraped from disk — keep them only as fallbacks after a webfont
|
|
29
|
+
|
|
30
|
+
Rules:
|
|
31
|
+
|
|
32
|
+
- Max 2 families; load only weights you use (400/600/700 typical)
|
|
33
|
+
- Self-host under `assets/fonts/` is fine if you ship `@font-face` with `.ttf` / `.otf` (WOFF2 alone will not embed in Sketch)
|
|
34
|
+
- Do not invent proprietary font names without a real `@font-face` or Google link
|
|
35
|
+
|
|
36
|
+
## Type scale
|
|
37
|
+
|
|
38
|
+
Use a multiplicative scale (1.2–1.25). Cap at 6–8 sizes.
|
|
39
|
+
|
|
40
|
+
| Role | Range |
|
|
41
|
+
| ------- | -------- |
|
|
42
|
+
| Display | 48–72 px |
|
|
43
|
+
| H1 | 32–48 px |
|
|
44
|
+
| H2 | 24–32 px |
|
|
45
|
+
| H3 | 20–24 px |
|
|
46
|
+
| Body | 15–18 px |
|
|
47
|
+
| Small | 13–14 px |
|
|
48
|
+
| Caption | 11–12 px |
|
|
49
|
+
|
|
50
|
+
## Line height
|
|
51
|
+
|
|
52
|
+
| Text size | Line height |
|
|
53
|
+
| --------------------- | ----------- |
|
|
54
|
+
| Display / H1 (≥32 px) | `1.0`–`1.2` |
|
|
55
|
+
| Body (15–18 px) | `1.5`–`1.6` |
|
|
56
|
+
| Small (≤14 px) | `1.5` |
|
|
57
|
+
|
|
58
|
+
## Letter-spacing
|
|
59
|
+
|
|
60
|
+
| Context | Letter-spacing |
|
|
61
|
+
| ------------------- | ------------------------------- |
|
|
62
|
+
| Body 14–18 px | `0` |
|
|
63
|
+
| Small 11–13 px | `0.01em`–`0.02em` |
|
|
64
|
+
| UI labels / buttons | `0.02em` |
|
|
65
|
+
| **ALL CAPS** | **`0.06em`–`0.1em` (required)** |
|
|
66
|
+
| Headings 32 px+ | `-0.01em`–`-0.02em` |
|
|
67
|
+
| Display 48 px+ | `-0.02em`–`-0.03em` |
|
|
68
|
+
|
|
69
|
+
## Pairing
|
|
70
|
+
|
|
71
|
+
- Max 2 typefaces per artifact
|
|
72
|
+
- Do not set body below 15 px for long reading
|
|
73
|
+
- Prefer `clamp()` for display on responsive prototypes
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Directions (when no DESIGN.md)
|
|
2
|
+
|
|
3
|
+
Pick **one** direction and stick to it for the artifact — but only after the user chooses it via `ask_user` (see `references/workflow.md` phase 4). When ranking options, offer the **5 best-fit** ids for the brief (recommended first) plus **Other / custom**. State the chosen id in chat. Do not invent an indigo-on-white theme outside these packs.
|
|
4
|
+
|
|
5
|
+
Copy matching tokens from `assets/tokens/<id>.css` into the artifact `:root`.
|
|
6
|
+
|
|
7
|
+
**Fonts:** Prefer [Google Fonts](https://fonts.google.com/) for `--font-display` / `--font-body` (see `craft/typography.md`) so preview, measure, and Sketch embed share the same faces. Keep Georgia / system-ui only as fallbacks after a webfont link.
|
|
8
|
+
|
|
9
|
+
## `editorial-ink`
|
|
10
|
+
|
|
11
|
+
- Posture: calm editorial product marketing
|
|
12
|
+
- Surfaces: near-white `#f7f5f2`, ink `#1a1a1a`
|
|
13
|
+
- Accent: deep teal `#0f6b6b` (max 2 visible uses per screen)
|
|
14
|
+
- Display: Georgia / `ui-serif`; body: system UI sans
|
|
15
|
+
- Avoid: gradients, purple accents, emoji icons
|
|
16
|
+
- Good shells: `landing-shell`, `prototype-shell`, `email-shell`, `invite-shell`, `resume-shell`
|
|
17
|
+
|
|
18
|
+
## `swiss-grid`
|
|
19
|
+
|
|
20
|
+
- Posture: dense, precise, high-contrast utility
|
|
21
|
+
- Surfaces: pure white `#ffffff`, black `#0a0a0a`
|
|
22
|
+
- Accent: signal red `#c8102e`
|
|
23
|
+
- Type: Inter / system sans only; tight tracking on caps (`0.08em`)
|
|
24
|
+
- Avoid: soft shadows, rounded mega-cards, decorative blobs
|
|
25
|
+
- Good shells: `settings-shell`, `pricing-shell`, `deck-shell` (light variant)
|
|
26
|
+
|
|
27
|
+
## `night-console`
|
|
28
|
+
|
|
29
|
+
- Posture: dark operational / dashboard
|
|
30
|
+
- Surfaces: `#0d1117`, elevated `#161b22`
|
|
31
|
+
- Accent: `#58a6ff`; success `#3fb950`; warning `#d29922`
|
|
32
|
+
- Type: system UI sans; monospace for metrics
|
|
33
|
+
- Avoid: neon purple, glassmorphism stacks, fake sparklines
|
|
34
|
+
- Good shells: `dashboard-shell`, `deck-shell` (default dark)
|
|
35
|
+
|
|
36
|
+
## `warm-atelier`
|
|
37
|
+
|
|
38
|
+
- Posture: craft / studio / portfolio
|
|
39
|
+
- Surfaces: warm paper `#f4efe6`, charcoal `#2c241b`
|
|
40
|
+
- Accent: burnt orange `#c45c26`
|
|
41
|
+
- Display: serif; body: humanist sans
|
|
42
|
+
- Avoid: cool gray chrome, stock Unsplash heroes
|
|
43
|
+
- Good shells: `landing-shell`, `prototype-shell`, `flyer-shell`, `invite-shell`
|
|
44
|
+
|
|
45
|
+
## `fintech-clear`
|
|
46
|
+
|
|
47
|
+
- Posture: trustworthy finance / B2B SaaS
|
|
48
|
+
- Surfaces: `#f8fafc`, `#ffffff`, border `#e2e8f0`
|
|
49
|
+
- Accent: `#0f766e` (teal); text `#0f172a`
|
|
50
|
+
- Type: system sans; generous body leading `1.55`
|
|
51
|
+
- Avoid: crypto neon, indigo Tailwind defaults, invented ROI metrics
|
|
52
|
+
- Good shells: `pricing-shell`, `auth-shell`, `contact-shell`, `settings-shell`
|
|
53
|
+
|
|
54
|
+
## `signal-mono`
|
|
55
|
+
|
|
56
|
+
- Posture: brutalist / launch / manifesto
|
|
57
|
+
- Surfaces: `#111111`, type `#fafafa`, rules `#333333`
|
|
58
|
+
- Accent: single electric `#ffe600` (one use per view)
|
|
59
|
+
- Type: condensed system sans or IBM Plex Sans; heavy weight on display
|
|
60
|
+
- Avoid: soft radii, pastels, illustration filler
|
|
61
|
+
- Good shells: `landing-shell`, `deck-shell`, `flyer-shell`, `business-card-shell`
|
|
62
|
+
|
|
63
|
+
## `soft-product`
|
|
64
|
+
|
|
65
|
+
- Posture: friendly consumer / productivity app
|
|
66
|
+
- Surfaces: `#fafafa`, cards `#ffffff`, border `#ececec`
|
|
67
|
+
- Accent: `#2563eb` only if brand requires blue — prefer a brand-specific hue from the brief; never default indigo stack
|
|
68
|
+
- Type: system UI sans; slightly larger body (16–17 px)
|
|
69
|
+
- Avoid: skeuomorphism, heavy gradients, emoji icon grids
|
|
70
|
+
- Good shells: `auth-shell`, `newsletter-shell`, `waitlist-shell`, `settings-shell`, `dashboard-shell` (lighten tokens)
|
|
71
|
+
|
|
72
|
+
## `harbor-navy`
|
|
73
|
+
|
|
74
|
+
- Posture: institutional / classic B2B / professional services
|
|
75
|
+
- Surfaces: cool gray `#f3f5f8`, ink `#0b1f33`
|
|
76
|
+
- Accent: deep navy `#1e3a5f` (sparse; prefer type hierarchy over color)
|
|
77
|
+
- Display: serif for titles; body: system sans
|
|
78
|
+
- Avoid: neon accents, playful illustration, soft-product blues
|
|
79
|
+
- Good shells: `landing-shell`, `pricing-shell`, `article-shell`, `resume-shell`, `business-card-shell`
|
|
80
|
+
|
|
81
|
+
## `paper-mono`
|
|
82
|
+
|
|
83
|
+
- Posture: print / CV / quiet documentation
|
|
84
|
+
- Surfaces: stone `#f5f5f4`, paper white, ink `#171717`
|
|
85
|
+
- Accent: ink itself (near-monochrome; status colors only when needed)
|
|
86
|
+
- Display: transitional serif; body: system sans; tight small type OK
|
|
87
|
+
- Avoid: colored hero washes, large radii, decorative shadows
|
|
88
|
+
- Good shells: `resume-shell`, `article-shell`, `email-shell`, `flyer-shell`
|
|
89
|
+
|
|
90
|
+
## `botanical-calm`
|
|
91
|
+
|
|
92
|
+
- Posture: wellness / nature / quiet consumer product
|
|
93
|
+
- Surfaces: sage wash `#f4f6f1`, soft paper `#fbfcf8`
|
|
94
|
+
- Accent: leaf green `#3f6b4e` (max 2 uses per screen)
|
|
95
|
+
- Display: serif; body: system sans; generous leading
|
|
96
|
+
- Avoid: neon fitness gradients, emoji icon grids, purple wellness clichés
|
|
97
|
+
- Good shells: `landing-shell`, `onboarding-shell`, `newsletter-shell`, `invite-shell`
|
|
98
|
+
|
|
99
|
+
## `midnight-editorial`
|
|
100
|
+
|
|
101
|
+
- Posture: dark magazine / portfolio / cultural brand
|
|
102
|
+
- Surfaces: near-black `#121212`, warm paper ink `#f3efe6`
|
|
103
|
+
- Accent: copper `#d4a574` (one strong moment per view)
|
|
104
|
+
- Display: Georgia / serif; body: system sans
|
|
105
|
+
- Avoid: neon cyberpunk, glassmorphism, signal-yellow
|
|
106
|
+
- Good shells: `landing-shell`, `article-shell`, `deck-shell`, `business-card-shell`
|
|
107
|
+
|
|
108
|
+
## `copper-ledger`
|
|
109
|
+
|
|
110
|
+
- Posture: warm utility / docs / ops with craft feel
|
|
111
|
+
- Surfaces: warm gray `#f7f3ee`, paper `#fffdf9`
|
|
112
|
+
- Accent: saddle copper `#8b4513`
|
|
113
|
+
- Type: system sans throughout; monospace for IDs / codes
|
|
114
|
+
- Avoid: cool slate-only chrome, fintech teal defaults, soft blue CTAs
|
|
115
|
+
- Good shells: `settings-shell`, `data-table-shell`, `dashboard-shell`, `article-shell`
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Artifact layout
|
|
2
|
+
|
|
3
|
+
Write design artifacts only under:
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
.hooman/design/<slug>/
|
|
7
|
+
index.html # required entry
|
|
8
|
+
assets/ # optional images, fonts, copied tokens
|
|
9
|
+
reviews/ # screenshots from export_design format:images (visual QA)
|
|
10
|
+
export/ # optional PDF / PPTX / screenshot-backed .fig / .deck / .sketch
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
- `<slug>` is kebab-case from the brief (reuse the same slug when refining).
|
|
14
|
+
- Do not invent parallel trees outside `.hooman/design/<slug>/`.
|
|
15
|
+
- Delivery exports (`pdf` / `images-to-pdf` / `pptx` / `figma` / `figma-deck` / `sketch`) land under `export/` by default.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Export
|
|
2
|
+
|
|
3
|
+
Use the built-in tool (do not hand-roll PDF/PPTX/Figma/Sketch with shell):
|
|
4
|
+
|
|
5
|
+
- `export_design` with `format`:
|
|
6
|
+
- `images` — page screenshots under `reviews/` by default (visual QA; then `launch_subagent` with `kind: "design-review"`)
|
|
7
|
+
- `pdf` — Chromium print PDF under `export/`
|
|
8
|
+
- `images-to-pdf` — screenshot pages stitched into a PDF under `export/`
|
|
9
|
+
- `pptx` — screenshot-backed PPTX under `export/`
|
|
10
|
+
- `figma` — screenshot-backed Figma Design `.fig` under `export/` (one image frame per page)
|
|
11
|
+
- `figma-deck` — screenshot-backed Figma Slides `.deck` under `export/` (one image slide per page)
|
|
12
|
+
- `sketch` — screenshot-backed Sketch `.sketch` under `export/` (one image artboard per page)
|
|
13
|
+
|
|
14
|
+
## Gate: visual QA + human go-ahead first
|
|
15
|
+
|
|
16
|
+
Do **not** call delivery formats (`pdf` / `images-to-pdf` / `pptx` / `figma` / `figma-deck` / `sketch`) until:
|
|
17
|
+
|
|
18
|
+
1. `export_design` with `format: "images"` has written current `reviews/` shots, and
|
|
19
|
+
2. `launch_subagent` with `kind: "design-review"` has run with those shot paths (binary reads), and
|
|
20
|
+
3. Must-fix is empty — or you hit the 2–3 round cap and will report remaining Must-fix to the user, and
|
|
21
|
+
4. The user has accepted the live preview (or explicitly asked to export anyway) and chosen a delivery format via `ask_user` (see `workflow.md` phases 7–8).
|
|
22
|
+
|
|
23
|
+
Keep `preview_design` running until after delivery export, then `stop_design_preview`.
|
|
24
|
+
|
|
25
|
+
Capturing screenshots and then delivering without review is a process failure.
|
|
26
|
+
|
|
27
|
+
## When
|
|
28
|
+
|
|
29
|
+
- User asks for PDF/PPTX, Figma (`.fig` / `.deck`), Sketch (`.sketch`), or
|
|
30
|
+
- Delivering a deck / printable one-pager / design-tool handoff as the deliverable
|
|
31
|
+
- **and** the gate above is satisfied
|
|
32
|
+
|
|
33
|
+
## Deck convention
|
|
34
|
+
|
|
35
|
+
Mark each slide root with `data-slide` so export paginates correctly:
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<section data-slide>...</section>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Without `data-slide`, export treats the document as a long page (PDF multipage / single PPTX slide or paginated viewports). For `figma` / `figma-deck` / `sketch` / `pptx`, each `[data-slide]` becomes one screenshot page/slide/frame/artboard.
|
|
42
|
+
|
|
43
|
+
## Notes
|
|
44
|
+
|
|
45
|
+
- First PDF/PPTX/`images` / Figma / Sketch export may need Playwright Chromium (`npx playwright install chromium`).
|
|
46
|
+
- `pptx`, `images-to-pdf`, `images`, `figma`, `figma-deck`, and `sketch` are all **screenshot-backed** (visual fidelity). They are not native editable layer trees — open them in the target app as flat image frames/slides/artboards, like a PPTX built from screenshots.
|
|
47
|
+
- Prefer `figma-deck` for `[data-slide]` decks when the handoff is Figma Slides; prefer `figma` for multi-frame Design files; prefer `sketch` when the handoff is Sketch; prefer `pptx` for PowerPoint.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Design workflow (strict)
|
|
2
|
+
|
|
3
|
+
Follow these phases **in order** for every new brief. Do not skip ahead to writing HTML. Use `ask_user` for each decision (one question per call). Users can always type a free-form answer; still offer concrete choices.
|
|
4
|
+
|
|
5
|
+
## Phase 0 — Activate
|
|
6
|
+
|
|
7
|
+
If `hooman-design` is not active, activate it before any design write.
|
|
8
|
+
|
|
9
|
+
## Phase 1 — Intake (what they already have)
|
|
10
|
+
|
|
11
|
+
Ask what starting material they have. Recommended options (adapt labels; keep ≤6):
|
|
12
|
+
|
|
13
|
+
1. Brand / `DESIGN.md` notes only
|
|
14
|
+
2. Nothing — start fresh from a template
|
|
15
|
+
3. Reference images / screenshots to recreate in HTML
|
|
16
|
+
4. Mix / other (I'll describe)
|
|
17
|
+
|
|
18
|
+
**`DESIGN.md`:** If a `DESIGN.md` is already injected in the system prompt, say so and do **not** ask whether one exists — ask only whether to honor it as-is or override for this artifact. If none is injected, include an option or follow-up to capture brand tokens / write guidance into the brief (do not invent a parallel brand file unless the user asks).
|
|
19
|
+
|
|
20
|
+
## Phase 2 — Clarify the brief
|
|
21
|
+
|
|
22
|
+
Ask focused follow-ups until you can name: audience, surface (landing / deck / dashboard / form / …), must-have sections or slides, tone, and hard constraints (print size, dark-only, no stock photos, …). Prefer 1–3 `ask_user` rounds over guessing. Do **not** write HTML until this is clear enough to pick a shell.
|
|
23
|
+
|
|
24
|
+
## Phase 3 — Template (shell)
|
|
25
|
+
|
|
26
|
+
From the shells table in `SKILL.md`, pick the **5 best-fit** shells for this brief (recommended first). Offer them via `ask_user` plus a 6th option: **Other / custom (I'll describe)**.
|
|
27
|
+
|
|
28
|
+
Read the chosen shell HTML under `assets/` before building. Only invent structure from scratch when they choose Other / custom.
|
|
29
|
+
|
|
30
|
+
## Phase 4 — Color theme (direction)
|
|
31
|
+
|
|
32
|
+
- If `DESIGN.md` is in force: skip picking a library direction; bind to those tokens.
|
|
33
|
+
- Otherwise: from `directions.md`, offer the **5 best-fit** direction ids (recommended first) plus **Other / custom (I'll describe)**. Copy matching `assets/tokens/<id>.css` into the artifact `:root` when they pick a library direction.
|
|
34
|
+
|
|
35
|
+
State the chosen shell + direction (or DESIGN.md) in chat in one short line, then build.
|
|
36
|
+
|
|
37
|
+
## Phase 5 — Build
|
|
38
|
+
|
|
39
|
+
Write only under `.hooman/design/<slug>/` (`index.html` + optional `assets/`). Prefer the shell + tokens.
|
|
40
|
+
|
|
41
|
+
## Phase 6 — Preview + internal visual QA
|
|
42
|
+
|
|
43
|
+
After the first meaningful HTML write (and after each Must-fix round):
|
|
44
|
+
|
|
45
|
+
1. `preview_design` on the entry (keep this running — do **not** stop yet)
|
|
46
|
+
2. `export_design` `format: "images"`
|
|
47
|
+
3. `launch_subagent` `kind: "design-review"` (binary-read every shot)
|
|
48
|
+
4. Fix Must-fix → re-capture → re-review (max 2–3 rounds)
|
|
49
|
+
|
|
50
|
+
Do **not** call delivery export formats until Must-fix is empty or you hit the round cap and report remaining issues honestly.
|
|
51
|
+
|
|
52
|
+
## Phase 7 — Human review
|
|
53
|
+
|
|
54
|
+
When internal QA is clear (or capped), **ask the user** to look at the live preview and give feedback. Options like: Looks good — export / Needs changes (I'll describe) / Start over.
|
|
55
|
+
|
|
56
|
+
Iterate Phases 5–7 on feedback. Keep the preview open across iterations (hot reload).
|
|
57
|
+
|
|
58
|
+
## Phase 8 — Export format
|
|
59
|
+
|
|
60
|
+
Only after the user confirms the design is good enough, ask which delivery format(s) they want. Offer the best-fit set for the surface, e.g.:
|
|
61
|
+
|
|
62
|
+
1. Figma Design (`.fig`) — screenshot-backed
|
|
63
|
+
2. Figma Slides (`.deck`) — prefer for `[data-slide]` decks; screenshot-backed
|
|
64
|
+
3. Sketch (`.sketch`) — screenshot-backed
|
|
65
|
+
4. PDF
|
|
66
|
+
5. PowerPoint (`.pptx`)
|
|
67
|
+
6. Other / multiple (I'll describe)
|
|
68
|
+
|
|
69
|
+
Then call `export_design` with the chosen delivery `format`(s). See `export.md`.
|
|
70
|
+
|
|
71
|
+
## Phase 9 — Stop preview
|
|
72
|
+
|
|
73
|
+
Call `stop_design_preview` with the same HTML path **only after** delivery export finishes (or the user explicitly declines export / ends the session without exporting). Never stop preview before export when the user asked to ship a file.
|
|
74
|
+
|
|
75
|
+
## Shortcuts that are forbidden
|
|
76
|
+
|
|
77
|
+
- Writing HTML before intake + clarify + template (+ theme when no DESIGN.md)
|
|
78
|
+
- Auto-picking a direction without asking when no DESIGN.md applies
|
|
79
|
+
- Capturing screenshots then exporting / finishing without `launch_subagent` (`kind: "design-review"`)
|
|
80
|
+
- Stopping preview before delivery export when export was requested
|
|
@@ -90,11 +90,11 @@ hooman mcp logout <server> --scope all # Clear discovery, client registration, a
|
|
|
90
90
|
hooman mcp logout <server> --scope client # Clear only the registered OAuth client
|
|
91
91
|
hooman mcp logout <server> --scope tokens # Clear only the stored access/refresh tokens
|
|
92
92
|
hooman mcp logout <server> --scope discovery # Clear only cached OAuth server metadata
|
|
93
|
-
hooman mcp
|
|
93
|
+
hooman mcp status # Show OAuth status for all configured MCP servers
|
|
94
94
|
```
|
|
95
95
|
|
|
96
96
|
- `<server>` must match a key under `mcpServers` in `mcp.json`.
|
|
97
97
|
- `hooman mcp auth` starts the OAuth flow (opening a local callback server as needed) and stores credentials in `~/.hooman/mcp-oauth.json`.
|
|
98
98
|
- `hooman mcp logout` clears stored OAuth state without touching `mcp.json`; use it before re-authenticating with different credentials or when decommissioning a server.
|
|
99
|
-
- `hooman mcp
|
|
99
|
+
- `hooman mcp status` reports each server's OAuth state (e.g. authenticated, expired, not authenticated) without making network calls to the server itself beyond what's needed to read stored state.
|
|
100
100
|
- These commands operate on the home config (`~/.hooman/mcp.json`) only, not repo-local `.hooman/mcp.json` overlays.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ResolvedLlmInputModality } from "../utils/model-metadata.js";
|
|
2
|
+
/** Strands appState key for the active LLM's resolved input modalities. */
|
|
3
|
+
export declare const LLM_MODALITY_STATE_KEY = "hooman.llmModality";
|
|
4
|
+
type AppStateLike = {
|
|
5
|
+
get(key: string): unknown;
|
|
6
|
+
set(key: string, value: unknown): void;
|
|
7
|
+
};
|
|
8
|
+
type AgentLike = {
|
|
9
|
+
appState: AppStateLike;
|
|
10
|
+
};
|
|
11
|
+
export declare function getLlmModality(agent: AgentLike | undefined): ResolvedLlmInputModality | null;
|
|
12
|
+
export declare function setLlmModality(agent: AgentLike, modality: ResolvedLlmInputModality | null | undefined): void;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Strands appState key for the active LLM's resolved input modalities. */
|
|
2
|
+
export const LLM_MODALITY_STATE_KEY = "hooman.llmModality";
|
|
3
|
+
function isModality(value) {
|
|
4
|
+
return (typeof value === "object" &&
|
|
5
|
+
value !== null &&
|
|
6
|
+
!Array.isArray(value) &&
|
|
7
|
+
typeof value.text === "boolean");
|
|
8
|
+
}
|
|
9
|
+
export function getLlmModality(agent) {
|
|
10
|
+
if (!agent) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
const raw = agent.appState.get(LLM_MODALITY_STATE_KEY);
|
|
14
|
+
return isModality(raw) ? raw : null;
|
|
15
|
+
}
|
|
16
|
+
export function setLlmModality(agent, modality) {
|
|
17
|
+
agent.appState.set(LLM_MODALITY_STATE_KEY, modality ?? null);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=llm-modality.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm-modality.js","sourceRoot":"","sources":["../../../src/core/state/llm-modality.ts"],"names":[],"mappings":"AAEA,2EAA2E;AAC3E,MAAM,CAAC,MAAM,sBAAsB,GAAG,oBAAoB,CAAC;AAW3D,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QACrB,OAAQ,KAA4B,CAAC,IAAI,KAAK,SAAS,CACxD,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,cAAc,CAC5B,KAA4B;IAE5B,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,GAAG,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;IACvD,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,cAAc,CAC5B,KAAgB,EAChB,QAAqD;IAErD,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,sBAAsB,EAAE,QAAQ,IAAI,IAAI,CAAC,CAAC;AAC/D,CAAC"}
|
|
@@ -3,7 +3,7 @@ export declare const PLAN_ENTER_REASON_STATE_KEY = "hooman.enterReason";
|
|
|
3
3
|
export declare const PLAN_ENTERED_AT_STATE_KEY = "hooman.enteredAt";
|
|
4
4
|
/**
|
|
5
5
|
* Last plan file used in this session. Survives {@link clearPlanState} so a
|
|
6
|
-
* later `
|
|
6
|
+
* later `switch_mode` into plan can reopen the same document instead of minting a new
|
|
7
7
|
* one. Only cleared when a fresh plan is explicitly requested.
|
|
8
8
|
*/
|
|
9
9
|
export declare const PLAN_LAST_FILE_STATE_KEY = "hooman.lastPlanFile";
|
package/dist/core/state/plan.js
CHANGED
|
@@ -3,7 +3,7 @@ export const PLAN_ENTER_REASON_STATE_KEY = "hooman.enterReason";
|
|
|
3
3
|
export const PLAN_ENTERED_AT_STATE_KEY = "hooman.enteredAt";
|
|
4
4
|
/**
|
|
5
5
|
* Last plan file used in this session. Survives {@link clearPlanState} so a
|
|
6
|
-
* later `
|
|
6
|
+
* later `switch_mode` into plan can reopen the same document instead of minting a new
|
|
7
7
|
* one. Only cleared when a fresh plan is explicitly requested.
|
|
8
8
|
*/
|
|
9
9
|
export const PLAN_LAST_FILE_STATE_KEY = "hooman.lastPlanFile";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ShellJobInfo } from "../shell/types.js";
|
|
2
|
+
export type ShellJobViewState = {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
jobs: ShellJobInfo[];
|
|
5
|
+
active: number;
|
|
6
|
+
};
|
|
7
|
+
type AgentLike = object;
|
|
8
|
+
export declare function getShellJobViewState(agent: AgentLike): ShellJobViewState;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { peekShellJobManager } from "../shell/registry.js";
|
|
2
|
+
const ACTIVE = new Set([
|
|
3
|
+
"starting",
|
|
4
|
+
"running",
|
|
5
|
+
"ready",
|
|
6
|
+
]);
|
|
7
|
+
export function getShellJobViewState(agent) {
|
|
8
|
+
const manager = peekShellJobManager(agent);
|
|
9
|
+
if (!manager) {
|
|
10
|
+
return { visible: false, jobs: [], active: 0 };
|
|
11
|
+
}
|
|
12
|
+
const jobs = manager.list();
|
|
13
|
+
const activeJobs = jobs.filter((j) => ACTIVE.has(j.status));
|
|
14
|
+
return {
|
|
15
|
+
visible: activeJobs.length > 0,
|
|
16
|
+
jobs: activeJobs,
|
|
17
|
+
active: activeJobs.length,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=shell-jobs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-jobs.js","sourceRoot":"","sources":["../../../src/core/state/shell-jobs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAQ3D,MAAM,MAAM,GAAgC,IAAI,GAAG,CAAC;IAClD,UAAU;IACV,SAAS;IACT,OAAO;CACR,CAAC,CAAC;AAIH,MAAM,UAAU,oBAAoB,CAAC,KAAgB;IACnD,MAAM,OAAO,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAC3C,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;IACjD,CAAC;IACD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAC5B,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IAC5D,OAAO;QACL,OAAO,EAAE,UAAU,CAAC,MAAM,GAAG,CAAC;QAC9B,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE,UAAU,CAAC,MAAM;KAC1B,CAAC;AACJ,CAAC"}
|
|
@@ -6,21 +6,24 @@ type AppStateLike = {
|
|
|
6
6
|
type AgentLike = {
|
|
7
7
|
appState: AppStateLike;
|
|
8
8
|
};
|
|
9
|
-
|
|
10
|
-
export declare const
|
|
9
|
+
/** Session mode switch; always requires explicit approval (never yolo / always-allow). */
|
|
10
|
+
export declare const SWITCH_MODE_TOOL = "switch_mode";
|
|
11
11
|
export declare const INTERNAL_ALWAYS_ALLOWED: Set<string>;
|
|
12
12
|
/**
|
|
13
|
-
* In
|
|
14
|
-
* under the
|
|
15
|
-
*
|
|
13
|
+
* In plan mode, reject `write_file` / `edit_file` unless the destination path
|
|
14
|
+
* is under the plans directory, and reject `fetch` with `save_as` entirely.
|
|
15
|
+
* Runs before any “always allow” grant.
|
|
16
16
|
*/
|
|
17
17
|
export declare function planModeWriteEditRejectionMessage(agent: AgentLike, toolName: string, toolInput: unknown): string | null;
|
|
18
18
|
/**
|
|
19
19
|
* Implicit, always-on allow for filesystem tools whose targets stay inside
|
|
20
|
-
* trusted roots: reads under attachments or
|
|
21
|
-
* under the session cwd in ask/plan
|
|
22
|
-
* plans directory
|
|
23
|
-
*
|
|
20
|
+
* trusted roots: reads under attachments, plans, or bundled skills in every
|
|
21
|
+
* mode, plus reads under the session cwd in ask/plan/design; writes/edits under
|
|
22
|
+
* the plans directory in every mode, and under `.hooman/design/` in design mode.
|
|
23
|
+
* Design tools (`preview_design`, `stop_design_preview`, `export_design`) are
|
|
24
|
+
* also auto-allowed when `path` is under `.hooman/design/`. Persistent "always
|
|
25
|
+
* allow" grants are handled separately by the on-disk {@link Allowlist}
|
|
26
|
+
* (see `../approvals/allowlist.ts`).
|
|
24
27
|
*/
|
|
25
28
|
export declare function isImplicitlyAllowed(toolName: string, toolInput?: unknown, mode?: SessionMode): boolean;
|
|
26
29
|
export declare function isToolVisible(mode: SessionMode, toolName: string, options?: {
|