heyspex 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +14 -0
- package/README.md +21 -0
- package/bin/hs.mjs +1089 -104
- package/bin/spexcode.mjs +262 -0
- package/dev-factory/engine/worktree.mjs +740 -0
- package/dev-factory/lib/code-repo-root.mjs +67 -0
- package/dev-factory/lib/context-budget.mjs +84 -0
- package/dev-factory/lib/epic-detect.mjs +190 -0
- package/dev-factory/lib/fleet-queue-file.mjs +846 -0
- package/dev-factory/lib/fleet-queue.mjs +426 -0
- package/dev-factory/lib/fleet-state.mjs +14 -18
- package/dev-factory/lib/model-catalog.mjs +338 -0
- package/dev-factory/lib/seat-context.mjs +199 -0
- package/dev-factory/lib/spec-io.mjs +93 -0
- package/dev-factory/lib/sufficiency-score.mjs +8 -2
- package/dev-factory/lib/worktree-allocator.mjs +744 -0
- package/dev-factory/model-catalog.json +222 -0
- package/dist/cli/hs-check.mjs +1127 -103
- package/dist/cli/hs-claim.mjs +981 -63
- package/dist/cli/hs-connect.mjs +10059 -1729
- package/dist/cli/hs-defer.mjs +5507 -3072
- package/dist/cli/hs-dev.mjs +576 -0
- package/dist/cli/hs-env.mjs +416 -302
- package/dist/cli/hs-index-rebuild.mjs +7334 -0
- package/dist/cli/hs-index-reconcile.mjs +8138 -0
- package/dist/cli/hs-init.mjs +2840 -149
- package/dist/cli/hs-install.mjs +7214 -594
- package/dist/cli/hs-join.mjs +10640 -2421
- package/dist/cli/hs-vault-pull.mjs +8157 -6370
- package/dist/cli/hs-vault-push.mjs +6433 -0
- package/dist/cli/hs-vault.mjs +4029 -1555
- package/dist/cli/hs-workspace.mjs +2702 -538
- package/dist/cli-templates/customer-vault/specs/entity-model.md +594 -601
- package/dist/cli-templates/customer-vault/specs/protocols/canonical-frontmatter-templates.md +110 -177
- package/dist/cli-templates/customer-vault/specs/protocols/destructive-action-checklist.md +122 -0
- package/dist/cli-templates/customer-vault/specs/protocols/memory-protocol.md +13 -15
- package/dist/cli-templates/customer-vault/specs/protocols/session-close-protocol.md +91 -0
- package/dist/cli-templates/customer-vault/specs/protocols/spec-hierarchy.md +150 -168
- package/dist/cli-templates/customer-vault/specs/protocols/spec-summary-authoring.md +83 -0
- package/dist/cli-templates/harness-commands/claude/hs-auto.md +36 -0
- package/dist/cli-templates/harness-commands/claude/hs-backfill.md +28 -0
- package/dist/cli-templates/harness-commands/claude/hs-capture.md +62 -0
- package/dist/cli-templates/harness-commands/claude/hs-defer.md +29 -0
- package/dist/cli-templates/harness-commands/claude/hs-dev.md +20 -0
- package/dist/cli-templates/harness-commands/claude/hs-doctor.md +32 -0
- package/dist/cli-templates/harness-commands/claude/hs-ground.md +30 -0
- package/dist/cli-templates/harness-commands/claude/hs-handoff.md +33 -0
- package/dist/cli-templates/harness-commands/claude/hs-log.md +27 -0
- package/dist/cli-templates/harness-commands/claude/hs-next.md +29 -0
- package/dist/cli-templates/harness-commands/claude/hs-promote.md +70 -0
- package/dist/cli-templates/harness-commands/claude/hs-push.md +35 -0
- package/dist/cli-templates/harness-commands/claude/hs-qc.md +27 -0
- package/dist/cli-templates/harness-commands/claude/hs-res.md +63 -0
- package/dist/cli-templates/harness-commands/claude/hs-resolve.md +23 -0
- package/dist/cli-templates/harness-commands/claude/hs-review.md +23 -0
- package/dist/cli-templates/harness-commands/claude/hs-view.md +28 -0
- package/dist/cli-templates/harness-commands/claude/kill-ports.md +32 -0
- package/dist/cli-templates/harness-commands/claude/prototype.md +91 -0
- package/dist/cli-templates/harness-commands/cursor/hs-auto.md +40 -0
- package/dist/cli-templates/harness-commands/cursor/hs-backfill.md +31 -0
- package/dist/cli-templates/harness-commands/cursor/hs-capture.md +65 -0
- package/dist/cli-templates/harness-commands/cursor/hs-defer.md +32 -0
- package/dist/cli-templates/harness-commands/cursor/hs-dev.md +24 -0
- package/dist/cli-templates/harness-commands/cursor/hs-doctor.md +36 -0
- package/dist/cli-templates/harness-commands/cursor/hs-ground.md +33 -0
- package/dist/cli-templates/harness-commands/cursor/hs-handoff.md +37 -0
- package/dist/cli-templates/harness-commands/cursor/hs-log.md +31 -0
- package/dist/cli-templates/harness-commands/cursor/hs-next.md +32 -0
- package/dist/cli-templates/harness-commands/cursor/hs-promote.md +73 -0
- package/dist/cli-templates/harness-commands/cursor/hs-push.md +38 -0
- package/dist/cli-templates/harness-commands/cursor/hs-qc.md +30 -0
- package/dist/cli-templates/harness-commands/cursor/hs-res.md +67 -0
- package/dist/cli-templates/harness-commands/cursor/hs-resolve.md +26 -0
- package/dist/cli-templates/harness-commands/cursor/hs-review.md +26 -0
- package/dist/cli-templates/harness-commands/cursor/hs-view.md +32 -0
- package/dist/cli-templates/harness-commands/cursor/kill-ports.md +35 -0
- package/dist/cli-templates/harness-commands/cursor/prototype.md +95 -0
- package/docs/copilot-plugin-install.md +162 -0
- package/docs/driving-heyspex-from-copilot.md +165 -0
- package/docs/mcp-client-config.md +259 -6
- package/package.json +249 -124
- package/plugins/heyspex/.claude-plugin/plugin.json +12 -0
- package/plugins/heyspex/.cursor-plugin/plugin.json +15 -0
- package/plugins/heyspex/.mcp.json +12 -0
- package/plugins/heyspex/README.md +309 -0
- package/plugins/heyspex/bin/launch-mcp.mjs +95 -0
- package/plugins/heyspex/bin/run-hook.mjs +80 -0
- package/plugins/heyspex/hooks/cursor-hooks.json +308 -0
- package/plugins/heyspex/hooks/hooks.json +418 -0
- package/plugins/heyspex/mcp.json +13 -0
- package/scripts/check-mcp-freshness.mjs +17 -9
- package/scripts/claude-hooks/_env-vault-events.mjs +68 -0
- package/scripts/claude-hooks/_guardrail-events.mjs +96 -0
- package/scripts/claude-hooks/_guardrail-loader.mjs +494 -0
- package/scripts/claude-hooks/_intent-classifier-router.mjs +456 -0
- package/scripts/claude-hooks/_intent-classifier-semantic.mjs +356 -0
- package/scripts/claude-hooks/_run.mjs +413 -0
- package/scripts/claude-hooks/_transcript-text.mjs +60 -0
- package/scripts/claude-hooks/_vault-retrieval.mjs +322 -0
- package/scripts/claude-hooks/agent-spawn-delegation-gate.mjs +133 -0
- package/scripts/claude-hooks/capture-execution-gate.mjs +51 -0
- package/scripts/claude-hooks/capture-workflow-gate.mjs +11 -0
- package/scripts/claude-hooks/check-auto-memory-budget.mjs +396 -0
- package/scripts/claude-hooks/check-claude-md-budget.mjs +327 -0
- package/scripts/claude-hooks/check-mcp-freshness-hook.mjs +14 -0
- package/scripts/claude-hooks/claim-before-code-gate.mjs +11 -0
- package/scripts/claude-hooks/claim-liveness-shared.mjs +577 -0
- package/scripts/claude-hooks/close-terminal-on-ship.mjs +64 -0
- package/scripts/claude-hooks/coo-denylist-gate.mjs +11 -0
- package/scripts/claude-hooks/coo-guard-check.mjs +11 -0
- package/scripts/claude-hooks/deep-research-cost-gate.mjs +11 -0
- package/scripts/claude-hooks/dev-server-task-reminder.mjs +15 -0
- package/scripts/claude-hooks/diagnose-capture-reminder.mjs +11 -0
- package/scripts/claude-hooks/directive-obligation-gate.mjs +11 -0
- package/scripts/claude-hooks/emit-claim-status.mjs +41 -0
- package/scripts/claude-hooks/enforce-session-sequence.mjs +11 -0
- package/scripts/claude-hooks/enforce-vault-naming.mjs +11 -0
- package/scripts/claude-hooks/env-vault-guard.mjs +11 -0
- package/scripts/claude-hooks/epic-milestone-phrasing-gate.mjs +11 -0
- package/scripts/claude-hooks/git-identity-guard.mjs +11 -0
- package/scripts/claude-hooks/git-reflog-audit.mjs +15 -0
- package/scripts/claude-hooks/git-stash-gate.mjs +11 -0
- package/scripts/claude-hooks/guard-auto-memory-writes.mjs +137 -0
- package/scripts/claude-hooks/id-display-format-gate.mjs +11 -0
- package/scripts/claude-hooks/inject-communication-style.mjs +86 -0
- package/scripts/claude-hooks/inject-coo-seat.mjs +78 -0
- package/scripts/claude-hooks/inject-dev-server-awareness.mjs +11 -0
- package/scripts/claude-hooks/inject-doctrine.mjs +13 -0
- package/scripts/claude-hooks/inject-vault-context.mjs +14 -0
- package/scripts/claude-hooks/intent-classifier-trigger.mjs +279 -0
- package/scripts/claude-hooks/log-session-activity.mjs +341 -0
- package/scripts/claude-hooks/naughty-list-gate.mjs +11 -0
- package/scripts/claude-hooks/notify-status-flip.mjs +72 -0
- package/scripts/claude-hooks/plan-exit-ingest-gate.mjs +170 -0
- package/scripts/claude-hooks/plan-ingest-close-reminder.mjs +66 -0
- package/scripts/claude-hooks/plan-review-gate.mjs +11 -0
- package/scripts/claude-hooks/preflight-reminder.mjs +262 -0
- package/scripts/claude-hooks/protected-action-intent.mjs +221 -0
- package/scripts/claude-hooks/research-method-guard.mjs +398 -0
- package/scripts/claude-hooks/research-protocol-gate.mjs +11 -0
- package/scripts/claude-hooks/session-end.mjs +451 -0
- package/scripts/claude-hooks/settings-write-gate.mjs +11 -0
- package/scripts/claude-hooks/settlement-check-gate.mjs +39 -0
- package/scripts/claude-hooks/status-flip-detect.mjs +17 -0
- package/scripts/claude-hooks/terminal-close-shared.mjs +426 -0
- package/scripts/claude-hooks/terminal-close-watcher.mjs +122 -0
- package/scripts/claude-hooks/vault-mirror-catchup.mjs +11 -0
- package/scripts/claude-hooks/vault-write-tier-guard.mjs +11 -0
- package/scripts/claude-hooks/wip-checkpoint.mjs +302 -0
- package/scripts/cursor-hooks/manifest.mjs +281 -0
- package/scripts/dev-server-status.mjs +34 -13
- package/scripts/dev-server-stop.mjs +313 -0
- package/scripts/heyspex-mode.mjs +288 -0
- package/scripts/hs-auto-resolve.mjs +240 -0
- package/scripts/hs-auto-source.mjs +398 -0
- package/scripts/hs-auto.mjs +134 -0
- package/scripts/hs-capture-cli.mjs +326 -0
- package/scripts/hs-classifier.mjs +136 -0
- package/scripts/hs-companion.mjs +88 -0
- package/scripts/hs-gateway.mjs +115 -0
- package/scripts/hs-mode.mjs +125 -0
- package/scripts/hs-next.mjs +441 -0
- package/scripts/hs-settings.mjs +338 -0
- package/scripts/hs-view.mjs +496 -0
- package/scripts/hs-worktree.mjs +201 -0
- package/scripts/install-claude-code-hooks.mjs +272 -0
- package/scripts/install-cursor-hooks.mjs +471 -0
- package/scripts/lib/agent-env-markers.mjs +38 -0
- package/scripts/lib/console-url-resolver.mjs +199 -61
- package/scripts/lib/customer-kit.mjs +1203 -0
- package/scripts/lib/dev-mode.mjs +249 -32
- package/scripts/lib/directive-obligations.mjs +349 -0
- package/scripts/lib/heyspex-home.mjs +72 -0
- package/scripts/lib/hook-dispositions.mjs +210 -0
- package/scripts/lib/hook-vault-header.mjs +30 -0
- package/scripts/lib/hs-command.mjs +277 -0
- package/scripts/lib/hs-companion-settings.mjs +472 -0
- package/scripts/lib/hs-source-branch.mjs +196 -0
- package/scripts/lib/hs-source-commit.mjs +59 -5
- package/scripts/lib/hs-source-identity.mjs +526 -0
- package/scripts/lib/hs-source-log.mjs +13 -22
- package/scripts/lib/hs-source-preflight.mjs +18 -4
- package/scripts/lib/hs-source-push.mjs +386 -307
- package/scripts/lib/hs-worktree-args.mjs +115 -0
- package/scripts/lib/shared-path-helpers.mjs +134 -0
- package/scripts/lib/standalone-doctor.mjs +540 -3
- package/scripts/lib/subagent-git-lock.mjs +109 -0
- package/scripts/lib/template-pin.mjs +34 -0
- package/scripts/lib/window-placement.mjs +109 -0
- package/scripts/provenance-lib.mjs +91 -0
- package/scripts/stamp-provenance-on-edit.mjs +222 -0
- package/scripts/wip-ledger-health.mjs +653 -0
- package/spexharness/doctrine/baseline/SPEXCODE-DOCTRINE.baseline.json +29 -0
- package/spexharness/src/adapters/audit.mjs +197 -0
- package/spexharness/src/adapters/claude-code.mjs +449 -0
- package/spexharness/src/adapters/copilot.mjs +236 -0
- package/spexharness/src/adapters/detect-harness.mjs +34 -0
- package/spexharness/src/chat/tui/ansi.mjs +448 -0
- package/spexharness/src/chat/tui/palette.mjs +22 -0
- package/spexharness/src/chat/tui/select.mjs +208 -0
- package/spexharness/src/config-root.mjs +54 -0
- package/spexharness/src/context-budget.mjs +141 -0
- package/spexharness/src/dev-server-control.mjs +389 -0
- package/spexharness/src/doctrine/behaviour.mjs +371 -0
- package/spexharness/src/doctrine/corpus.mjs +733 -0
- package/spexharness/src/doctrine/inject.mjs +338 -0
- package/spexharness/src/doctrine/merge.mjs +184 -0
- package/spexharness/src/doctrine/sources.mjs +252 -0
- package/spexharness/src/doctrine/synthesize.mjs +401 -0
- package/spexharness/src/doctrine/vault-source.mjs +574 -0
- package/spexharness/src/doctrine/writer.mjs +176 -0
- package/spexharness/src/events.mjs +84 -0
- package/spexharness/src/gates/_shell-write-targets.mjs +77 -0
- package/spexharness/src/gates/capture-workflow-gate.mjs +202 -0
- package/spexharness/src/gates/claim-before-code-gate.decide.mjs +33 -0
- package/spexharness/src/gates/claim-before-code-gate.mjs +129 -0
- package/spexharness/src/gates/deep-research-cost-gate.mjs +275 -0
- package/spexharness/src/gates/diagnose-capture-reminder.mjs +112 -0
- package/spexharness/src/gates/directive-obligation-gate.decide.mjs +132 -0
- package/spexharness/src/gates/directive-obligation-gate.mjs +183 -0
- package/spexharness/src/gates/enforce-session-sequence.mjs +895 -0
- package/spexharness/src/gates/enforce-vault-naming.mjs +215 -0
- package/spexharness/src/gates/epic-milestone-phrasing-gate.mjs +233 -0
- package/spexharness/src/gates/git-identity-guard.decide.mjs +436 -0
- package/spexharness/src/gates/git-identity-guard.mjs +61 -0
- package/spexharness/src/gates/git-reflog-audit.mjs +151 -0
- package/spexharness/src/gates/git-stash-gate.decide.mjs +361 -0
- package/spexharness/src/gates/git-stash-gate.mjs +159 -0
- package/spexharness/src/gates/id-display-format-gate.mjs +190 -0
- package/spexharness/src/gates/inject-doctrine-gate.mjs +89 -0
- package/spexharness/src/gates/inject-vault-context.mjs +239 -0
- package/spexharness/src/gates/naughty-list-gate.mjs +213 -0
- package/spexharness/src/gates/plan-review-gate.mjs +233 -0
- package/spexharness/src/gates/preflight-reminder-gate.mjs +265 -0
- package/spexharness/src/gates/research-protocol-gate.mjs +175 -0
- package/spexharness/src/gates/settings-write-gate.decide.mjs +96 -0
- package/spexharness/src/gates/settings-write-gate.mjs +104 -0
- package/spexharness/src/gates/vault-mirror-catchup.mjs +124 -0
- package/spexharness/src/gates/vault-write-tier-guard.decide.mjs +125 -0
- package/spexharness/src/gates/vault-write-tier-guard.mjs +42 -0
- package/spexharness/src/git-reflog-audit.mjs +294 -0
- package/spexharness/src/intent-classifier.mjs +196 -0
- package/spexharness/src/intent-directive.mjs +626 -0
- package/spexharness/src/profile/learn.mjs +551 -0
- package/spexharness/src/profile/proposals.mjs +357 -0
- package/spexharness/src/profile/vault-inclusion.mjs +386 -0
- package/spexharness/src/redact.mjs +151 -0
- package/spexharness/src/rule-table.mjs +849 -0
- package/spexharness/src/seat-context.mjs +122 -0
- package/spexharness/src/session-bootstrap.mjs +512 -0
- package/spexharness/src/session-record.mjs +815 -0
- package/spexharness/src/token-inventory.mjs +207 -0
- package/vendor/heyspex-mcp/account-switch.mjs +96 -0
- package/vendor/heyspex-mcp/alignment-gate.mjs +315 -1
- package/vendor/heyspex-mcp/blocker-resolver.mjs +37 -2
- package/vendor/heyspex-mcp/breakdown-ladder.mjs +119 -4
- package/vendor/heyspex-mcp/breakdown-source.mjs +271 -0
- package/vendor/heyspex-mcp/breakdown-writer.mjs +23 -3
- package/vendor/heyspex-mcp/capture-buffer-patches.mjs +77 -8
- package/vendor/heyspex-mcp/capture-channel.mjs +55 -5
- package/vendor/heyspex-mcp/capture-console-client.mjs +117 -3
- package/vendor/heyspex-mcp/capture-focus.mjs +1061 -31
- package/vendor/heyspex-mcp/capture-outbox.mjs +15 -5
- package/vendor/heyspex-mcp/capture-sources.mjs +195 -0
- package/vendor/heyspex-mcp/capture-tools.mjs +1264 -0
- package/vendor/heyspex-mcp/claim-tools.mjs +1147 -0
- package/vendor/heyspex-mcp/cli-verbs.mjs +2074 -0
- package/vendor/heyspex-mcp/cli.mjs +207 -15524
- package/vendor/heyspex-mcp/close-branch-report.mjs +102 -0
- package/vendor/heyspex-mcp/cloud-tool-surface.mjs +128 -0
- package/vendor/heyspex-mcp/cloud-vault-writes.mjs +602 -0
- package/vendor/heyspex-mcp/config-seed.yaml +15 -0
- package/vendor/heyspex-mcp/config-settings.mjs +290 -7
- package/vendor/heyspex-mcp/console-fetch.mjs +822 -17
- package/vendor/heyspex-mcp/console-transport.mjs +172 -0
- package/vendor/heyspex-mcp/credentials.mjs +585 -0
- package/vendor/heyspex-mcp/defer-spec.mjs +44 -4
- package/vendor/heyspex-mcp/deferred-reclaim.mjs +29 -3
- package/vendor/heyspex-mcp/design-handlers.mjs +31 -0
- package/vendor/heyspex-mcp/design-tools.mjs +4 -1
- package/vendor/heyspex-mcp/dev-factory-bridge.mjs +4 -4
- package/vendor/heyspex-mcp/dev-mode-core.mjs +45 -0
- package/vendor/heyspex-mcp/dev-tools.mjs +131 -0
- package/vendor/heyspex-mcp/diagnose-handlers.mjs +54 -0
- package/vendor/heyspex-mcp/events-tools.mjs +207 -0
- package/vendor/heyspex-mcp/filing-tools.mjs +723 -0
- package/vendor/heyspex-mcp/fleet-handlers.mjs +37 -0
- package/vendor/heyspex-mcp/fleet-queue-tools.mjs +71 -15
- package/vendor/heyspex-mcp/focus-tools.mjs +190 -0
- package/vendor/heyspex-mcp/folder-trust-store.mjs +60 -0
- package/vendor/heyspex-mcp/http-transport.mjs +302 -0
- package/vendor/heyspex-mcp/list-tools.mjs +257 -0
- package/vendor/heyspex-mcp/login-handoff.mjs +15 -1
- package/vendor/heyspex-mcp/mcp-config.mjs +107 -0
- package/vendor/heyspex-mcp/memory-tools.mjs +523 -0
- package/vendor/heyspex-mcp/mvp-mode.mjs +53 -6
- package/vendor/heyspex-mcp/obligation-backstop.mjs +103 -0
- package/vendor/heyspex-mcp/occupied-keys.mjs +142 -0
- package/vendor/heyspex-mcp/on-deck-brief.mjs +3377 -0
- package/vendor/heyspex-mcp/on-deck-scheduler.mjs +1708 -0
- package/vendor/heyspex-mcp/package-root.mjs +32 -0
- package/vendor/heyspex-mcp/peer-presence.mjs +8 -1
- package/vendor/heyspex-mcp/plan-ground.mjs +621 -652
- package/vendor/heyspex-mcp/plan-push.mjs +908 -22
- package/vendor/heyspex-mcp/plan-review.mjs +124 -30
- package/vendor/heyspex-mcp/preflight-gate.mjs +0 -0
- package/vendor/heyspex-mcp/procedure-handlers.mjs +327 -0
- package/vendor/heyspex-mcp/procedure-tools.mjs +1181 -970
- package/vendor/heyspex-mcp/promote-capture.mjs +388 -69
- package/vendor/heyspex-mcp/promote-diagnose.mjs +74 -0
- package/vendor/heyspex-mcp/promote-research-to-diagnose.mjs +9 -2
- package/vendor/heyspex-mcp/promote-research.mjs +666 -53
- package/vendor/heyspex-mcp/promotion-helpers.mjs +251 -0
- package/vendor/heyspex-mcp/prompts.mjs +1460 -0
- package/vendor/heyspex-mcp/read-path.mjs +191 -15
- package/vendor/heyspex-mcp/receipt-shape.mjs +146 -0
- package/vendor/heyspex-mcp/recipe-handlers.mjs +117 -0
- package/vendor/heyspex-mcp/regen-tasks.mjs +210 -3
- package/vendor/heyspex-mcp/register-spec.mjs +266 -54
- package/vendor/heyspex-mcp/request-context.mjs +83 -0
- package/vendor/heyspex-mcp/research-focus.mjs +207 -4
- package/vendor/heyspex-mcp/research-handlers.mjs +625 -0
- package/vendor/heyspex-mcp/research-tools.mjs +4 -4
- package/vendor/heyspex-mcp/response-budget.mjs +348 -0
- package/vendor/heyspex-mcp/review-focus.mjs +25 -1
- package/vendor/heyspex-mcp/roadmap-default.mjs +70 -0
- package/vendor/heyspex-mcp/search-specs.mjs +280 -0
- package/vendor/heyspex-mcp/seat-block-ledger.mjs +113 -0
- package/vendor/heyspex-mcp/seat-identity.mjs +2 -6
- package/vendor/heyspex-mcp/session-owner.mjs +109 -0
- package/vendor/heyspex-mcp/session-tools.mjs +162 -0
- package/vendor/heyspex-mcp/settings-registry.mjs +232 -0
- package/vendor/heyspex-mcp/settings-tools.mjs +85 -12
- package/vendor/heyspex-mcp/spec-edit-tools.mjs +453 -0
- package/vendor/heyspex-mcp/spec-id-lib.mjs +93 -17
- package/vendor/heyspex-mcp/split-research.mjs +304 -56
- package/vendor/heyspex-mcp/stdio-rpc.mjs +22 -0
- package/vendor/heyspex-mcp/submit-for-review.mjs +150 -7
- package/vendor/heyspex-mcp/summary-contract.mjs +105 -0
- package/vendor/heyspex-mcp/summary-write-tools.mjs +228 -0
- package/vendor/heyspex-mcp/symptom-query.mjs +146 -0
- package/vendor/heyspex-mcp/test-helpers.mjs +123 -1
- package/vendor/heyspex-mcp/tool-catalog.mjs +2819 -0
- package/vendor/heyspex-mcp/tool-dispatch.mjs +657 -0
- package/vendor/heyspex-mcp/tool-helpers.mjs +325 -0
- package/vendor/heyspex-mcp/validate-linkage.mjs +414 -27
- package/vendor/heyspex-mcp/vault-io.mjs +720 -0
- package/vendor/heyspex-mcp/vault-less-endpoints.mjs +52 -0
- package/vendor/heyspex-mcp/vault-resolve.mjs +554 -68
- package/vendor/heyspex-mcp/verify-reproduction.mjs +270 -30
- package/vendor/heyspex-mcp/whoami.mjs +92 -0
- package/vendor/heyspex-mcp/write-outbox.mjs +512 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Confidence-ladder research method's entrypoint — SpexCrawl via the Companion (search/gather) is PRIMARY + DeepSeek (synthesis); self-hosted Firecrawl is an AUTOMATIC fallback (no permission needed, owner ruling 2026-08-22), zero Claude/Anthropic involvement.
|
|
3
|
+
argument-hint: "[research question/topic]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Research (`/hs-res`)
|
|
7
|
+
|
|
8
|
+
> Parity: `.commandcode/skills/hs-res/SKILL.md` · `.cursor/skills/hs-res/SKILL.md` · `.agents/skills/hs-res/SKILL.md`
|
|
9
|
+
|
|
10
|
+
## What to do
|
|
11
|
+
|
|
12
|
+
1. **Take the question.** `$ARGUMENTS` is the research question/topic. If empty, load the
|
|
13
|
+
console doc-toolbar Promote pin via `heyspex_active_research`
|
|
14
|
+
(`.heyspex/research-focus.yaml` → `source_idea_id`, `scope`, `spec_path`) and read the source
|
|
15
|
+
capture body as the question. Either way, restate the scope and confirm with the user.
|
|
16
|
+
|
|
17
|
+
2. **Gather via SpexCrawl (the Companion) — the PRIMARY method** (owner ruling 2026-08-14,
|
|
18
|
+
[[spexcrawl-through-the-companion-is-the]]: "Companion > SpexCrawl is now default method
|
|
19
|
+
for research"). Decompose into a few independent search angles, then per angle:
|
|
20
|
+
`node dev-factory/spexcrawl/spexcrawl-cli.mjs search "<query>" --json` — one call
|
|
21
|
+
searches AND returns the cleaned pages of the top results. Specific extra URLs:
|
|
22
|
+
`node dev-factory/spexcrawl/spexcrawl-cli.mjs scrape "<url>" --json`.
|
|
23
|
+
Prerequisites: the Companion running and paired to the console. LAN mode
|
|
24
|
+
(`npm run console:log:lan`) is needed ONLY when the Companion runs on a DIFFERENT
|
|
25
|
+
machine than the console — since HS-V9WH the Companion polls loopback consoles too
|
|
26
|
+
([[a-queue-is-dead-if-its-only-consumer]]: the LAN line was a bug workaround
|
|
27
|
+
misdocumented as a requirement). When missing, the CLI exits 3 with
|
|
28
|
+
`SPEXCRAWL_UNAVAILABLE` naming the fix; a silent hang means the Companion is not
|
|
29
|
+
running or not polling this console.
|
|
30
|
+
|
|
31
|
+
**Fallback — self-hosted Firecrawl, AUTOMATIC, no permission needed (owner ruling
|
|
32
|
+
2026-08-22).** When the SpexCrawl path malfunctions, times out, hits a gate, or is otherwise
|
|
33
|
+
unavailable, fall back immediately: `node dev-factory/spexcrawl/firecrawl-cli.mjs
|
|
34
|
+
search "<query>" --json` and `node dev-factory/spexcrawl/firecrawl-cli.mjs scrape
|
|
35
|
+
"<url>" --json`. May run on any fleet machine (coffee-geek, basement-geek, spec-ops) —
|
|
36
|
+
prefer other reachable machines over the one the orchestrating session runs on; check
|
|
37
|
+
`docker info`, start Docker/the stack if needed, poll the real endpoint for readiness before
|
|
38
|
+
use. If this task's changed/claimed files are SpexCrawl-related, skip SpexCrawl entirely and
|
|
39
|
+
go straight to Firecrawl. Hosted `api.firecrawl.dev` credits are unchanged — still
|
|
40
|
+
ask-before-spend every time. Full contract: `.commandcode/skills/hs-res/SKILL.md`.
|
|
41
|
+
|
|
42
|
+
3. **Assemble a numbered sources block** (`[S1]`, `[S2]`, …) from the gathered
|
|
43
|
+
`{title, url, snippet, markdown}` results, write it plus the question and cite-only
|
|
44
|
+
instructions to a temp prompt file.
|
|
45
|
+
|
|
46
|
+
4. **Synthesize via DeepSeek** —
|
|
47
|
+
`node dev-factory/spexcrawl/synthesize-cli.mjs --prompt-file <path> --json`
|
|
48
|
+
(defaults `--max-tokens` to 32000 and auto-escalates ×3 up to a 96000 ceiling if DeepSeek's
|
|
49
|
+
default-on "thinking" mode burns the whole budget on reasoning — never pass a lower
|
|
50
|
+
`--max-tokens` yourself; the CLI self-heals this failure mode. Exhausted escalation exits 3
|
|
51
|
+
with `SYNTHESIZE_UNAVAILABLE`).
|
|
52
|
+
|
|
53
|
+
5. **Save** via `heyspex_save_research` (or `heyspex_complete_research` under the console pin
|
|
54
|
+
pipeline), with `sources` populated from the gathered URLs.
|
|
55
|
+
|
|
56
|
+
**Never fall back** to `deep-research`/`deep-research-quick|medium|thorough`, the
|
|
57
|
+
`Workflow({ scriptPath: '.claude/workflows/deep-research-*.js' })` launch, or native
|
|
58
|
+
`WebSearch`/`WebFetch` for this method. Self-hosted Firecrawl fallback is automatic (no
|
|
59
|
+
permission needed, 2026-08-22 ruling); hosted `api.firecrawl.dev` credits still need the
|
|
60
|
+
user's explicit per-run permission, every time. If a CLI reports unavailable
|
|
61
|
+
(`SPEXCRAWL_UNAVAILABLE` / `FIRECRAWL_UNAVAILABLE` / `SYNTHESIZE_UNAVAILABLE`, exit 3),
|
|
62
|
+
**stop** and tell the user — never silently substitute another backend. Full method,
|
|
63
|
+
escalation rule, and hard prohibitions: `.commandcode/skills/hs-res/SKILL.md`.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Pull the top open item from the HeySpex Resolution lane (conflicts, dangling refs, cycles, prerequisites, validation/stale-index) with a fix brief. Replaces the old conflict-only prompt.
|
|
3
|
+
argument-hint: "[HS-XXXX-EPIC | <item-key> | --ignore-focus]"
|
|
4
|
+
allowed-tools: mcp__heyspex__heyspex_next_resolution
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Invoke the `mcp__heyspex__heyspex_next_resolution` MCP tool to fetch the top open resolution item from the HeySpex vault, then paste the returned `prompt_markdown` verbatim so the user can act on the fix brief.
|
|
8
|
+
|
|
9
|
+
Argument parsing for `$ARGUMENTS` (all optional; if empty, call the tool with no parameters):
|
|
10
|
+
|
|
11
|
+
- A token containing `:` (e.g. `dangling_ref:hs-epic-x:hs-task-y`) → pass as `item_key` (fetch that specific item's brief; bypasses the focus pin).
|
|
12
|
+
- A bare spec id matching `HS-EPIC-*` / `HS-TASK-*` / `HS-MIL-*` / `HS-*-*` → pass as `scope` (deck-aware: restrict detection to that spec so its gating prerequisite/conflicts surface). This is what the On-Deck `resolve_command: /hs-resolve <epic-id>` passes.
|
|
13
|
+
- `--ignore-focus` → set `ignore_focus: true` (skip the Neon resolution focus pin; lead with the top-ranked open item).
|
|
14
|
+
|
|
15
|
+
Resolution precedence (built into the tool — do not re-implement): `item_key` → `scope`/`ignore_focus` (top-ranked of the open list) → the Neon focus pin (server-applied) → top-ranked open item. Items are ordered with **gating** and **errors first** (`orderResolutionItems`).
|
|
16
|
+
|
|
17
|
+
After the tool returns, output the `prompt_markdown` field as-is, then on a final line state the source: `_Source: {source} · {item.kind} · {item.key}_`. Do not summarize, paraphrase, or start executing actions from the brief without the user's go-ahead.
|
|
18
|
+
|
|
19
|
+
This is the surviving `/hs-resolve` (the legacy conflict-only prompt that errored **"Not an Epic"** on a milestone has been retired — the resolver is item-centric and never type-checks the target). Authority from the brief's resolution menu: **Re-scan / clear** is agent-autonomous; **Switch to this**, **Defer**, **edge removal**, and **override** require explicit user confirmation. `stale_index` items expose **only** re-scan/clear — never an edge-mutating action.
|
|
20
|
+
|
|
21
|
+
Detection is HTTP-only (the tool reads the console aggregator — the one detection path — it does not re-detect). If the tool errors with `CONSOLE_UNREACHABLE`, tell the user to **start the console dev server (port 3000, or run `hs server status` to see which port it actually bound)** — this only happens on a dev machine; SaaS console is always up. On `CONSOLE_TIMEOUT`, suggest retrying shortly (the server may be cold-compiling). On `ITEM_NOT_FOUND`, the `item_key` is not in the open set — list items with `/hs-resolve` (no args).
|
|
22
|
+
|
|
23
|
+
This skill does NOT claim or build anything; it presents the fix brief. Sibling skills: `/hs-next` (build pipeline), `/hs-review` (review pipeline), `/hs-resolve` (this — resolution lane). See [[HS-0EJ6-RMCP-EPIC-hs-resolve-mcp-tool-and-skill]] and [[HS-I8FM-RSRF-EPIC-resolution-surface-api-and-pin]].
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Pull the next review-ready spec from the HeySpex review queue (review-focus.yaml → manifest traversal of `status: in_review` with HS-REV companion → folder scan).
|
|
3
|
+
argument-hint: "[HS-XXXX-TASK | HS-XXXX-EPIC] [--ignore-focus]"
|
|
4
|
+
allowed-tools: mcp__heyspex__heyspex_next_review
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Invoke the `mcp__heyspex__heyspex_next_review` MCP tool to fetch the next review-ready spec from the HeySpex vault, then paste the returned `prompt_markdown` verbatim so the user (reviewer) can walk acceptance against the parent spec + HS-REV companion.
|
|
8
|
+
|
|
9
|
+
Argument parsing for `$ARGUMENTS` (all optional; if `$ARGUMENTS` is empty, call the tool with no parameters):
|
|
10
|
+
|
|
11
|
+
- A bare token matching `HS-TASK-*` / `HS-EPIC-*` / `HS-*-*` → pass as `spec_id`.
|
|
12
|
+
- A bare token matching `HS-ROADMAP-*` → pass as `roadmap_id`.
|
|
13
|
+
- `--ignore-focus` → set `ignore_focus: true`.
|
|
14
|
+
|
|
15
|
+
Resolution precedence (built into the tool, do not re-implement here): `args.spec_id` → `.heyspex/review-focus.yaml` pin → manifest traversal for `status: in_review` specs with an `HS-REV-<suffix>-*.md` companion → folder scan as fallback. Sorted by `updated:` ascending (oldest first).
|
|
16
|
+
|
|
17
|
+
After the tool returns, output the `prompt_markdown` field as-is, then on a final line state the source: `_Source: {source_kind} · {spec_id} · phase {phase_id} · age {age_in_review_days}d_`. Do not summarize, paraphrase, or start executing the returned prompt.
|
|
18
|
+
|
|
19
|
+
This skill does NOT claim the spec. Reviewing is a human-in-loop activity by design (CLAUDE.md §Session Completion); the reviewer walks the four sections of the HS-REV companion (`## Acceptance verification`, `## Reviewer notes`, `## Memory candidates`, `## Decision: close or reopen`) and decides pass/reopen. Memory candidates are scored against the four-axis rubric (non-derivability / reusability / surprise-cost / concreteness, 0–3 each, threshold ≥ 7/12) — the prompt body includes the rubric and the conflict-check instruction.
|
|
20
|
+
|
|
21
|
+
If the tool errors with `NO_REVIEW_READY`, tell the user the review queue is empty (no specs at `status: in_review` with an HS-REV companion) and suggest checking `specs/reviews/` for stale companions or filing the missing review doc. If `SPEC_NOT_IN_REVIEW`, surface the spec's actual status so the user can pick the right `/hs-review HS-XXXX` target. If `NO_REVIEW_DOC`, the parent spec is `in_review` but has no `HS-REV-<suffix>-*.md` companion — point the user at CLAUDE.md §Session Completion §3 for the four-section template.
|
|
22
|
+
|
|
23
|
+
Cross-reference: [[HS-XRO1-RVDC-TASK-heyspex-review-on-deck-mcp-and-hs-review]] (spec), [[HS-UKD6-CLR4-RES-close-out-review-screen-jtbd-architecture]] §J17 (downstream Review surface that will call this tool from the "Copy `/hs-review`" affordance).
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Open one console surface in a chromeless app-mode browser window (solo console gauge) — the inspector's Pipeline tab first; follows the focus pin when no doc id is given. Thin wrapper over `hs view`.
|
|
3
|
+
argument-hint: "[surface] [doc id] [--width N] [--height N] [--browser edge|chrome]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# HeySpex solo-surface viewer (`/hs-view`)
|
|
7
|
+
|
|
8
|
+
> Parity: `.commandcode/skills/hs-view/SKILL.md` · `.cursor/skills/hs-view/SKILL.md` · `.agents/skills/hs-view/SKILL.md`
|
|
9
|
+
|
|
10
|
+
Optional macro over the one core ([[capability-three-faces-no-per-capability-slash]]): shell to `hs view`, never reimplement it. Design: [[HS-RU2R-I87U-RES-solo-surface-cli-launcher-single]].
|
|
11
|
+
|
|
12
|
+
## What to do
|
|
13
|
+
|
|
14
|
+
1. **Resolve `$ARGUMENTS` by smart first-token detection** — grammar is positional, token-identical with the CLI:
|
|
15
|
+
- First token is not a surface slug → it is the doc id, in any form (`hlfj`, `hs-hlfj`, `HS-HLFJ`, a full basename); opens the inspector on its Pipeline tab. Pass it through as typed — the CLI normalises it.
|
|
16
|
+
- First token is a surface slug (`inspector`, `docs`, `whats-next`, `captures`, `session-log`, `settings`) → second token, if present, is the doc id (anchors `inspector` and `docs` only).
|
|
17
|
+
- `pipeline` is accepted but is not its own window: it is the inspector on its Pipeline tab.
|
|
18
|
+
- `docs` opens two panes: the doc beside the inspector on its Pipeline tab.
|
|
19
|
+
- No arguments → the inspector on its Pipeline tab, anchored on the focus pin (live-follow).
|
|
20
|
+
- Pass `--width` / `--height` / `--browser edge|chrome` through unchanged.
|
|
21
|
+
2. **Run it yourself** from the repo root:
|
|
22
|
+
```bash
|
|
23
|
+
node bin/hs.mjs view [<surface>] [<doc-id>] [flags]
|
|
24
|
+
```
|
|
25
|
+
3. The verb probes ground-truth dev-server status first — if the console is down, relay its message and offer `npm run dev` (don't start the server unprompted).
|
|
26
|
+
4. Relay the one-line result (URL + window size); closing the window closes it, re-running reopens it.
|
|
27
|
+
|
|
28
|
+
Never hand-build `msedge --app=…` invocations — the CLI verb owns server probing, URL resolution, and browser mechanics.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Kill every process listening on a TCP port in the range 3000–5999 (clears stuck dev servers).
|
|
3
|
+
argument-hint: "(no arguments)"
|
|
4
|
+
allowed-tools: PowerShell
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**Always use the PowerShell tool for this command — never the Bash tool.** Bash routes to a POSIX shell in this environment and the PowerShell syntax below will fail there.
|
|
8
|
+
|
|
9
|
+
Kill all processes that are **listening** on TCP ports in the range **3000–5999** inclusive. This clears orphaned dev servers (Next.js, console, companion bridges, etc.) that are holding ports.
|
|
10
|
+
|
|
11
|
+
Run this single command via the **PowerShell** tool. It discovers the listening connections in range, reports each `port → pid (process name)` it is about to kill, then force-kills the unique owning PIDs and confirms:
|
|
12
|
+
|
|
13
|
+
```powershell
|
|
14
|
+
$conns = Get-NetTCPConnection -State Listen -ErrorAction SilentlyContinue |
|
|
15
|
+
Where-Object { $_.LocalPort -ge 3000 -and $_.LocalPort -le 5999 }
|
|
16
|
+
if (-not $conns) { Write-Output 'No listeners on ports 3000-5999. Nothing to kill.'; return }
|
|
17
|
+
$pids = $conns | Select-Object -ExpandProperty OwningProcess -Unique
|
|
18
|
+
foreach ($c in $conns) {
|
|
19
|
+
$p = Get-Process -Id $c.OwningProcess -ErrorAction SilentlyContinue
|
|
20
|
+
$name = if ($p) { $p.ProcessName } else { '?' }
|
|
21
|
+
Write-Output ("port {0,-5} -> pid {1} ({2})" -f $c.LocalPort, $c.OwningProcess, $name)
|
|
22
|
+
}
|
|
23
|
+
foreach ($procId in $pids) {
|
|
24
|
+
try { Stop-Process -Id $procId -Force -ErrorAction Stop; Write-Output ("killed pid {0}" -f $procId) }
|
|
25
|
+
catch { Write-Output ("could not kill pid {0}: {1}" -f $procId, $_.Exception.Message) }
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Notes:
|
|
30
|
+
- Only TCP **listeners** are targeted, so client/outbound connections in that range are left alone.
|
|
31
|
+
- If `Stop-Process` fails on a PID (e.g. a Windows system process like `svchost`, which needs admin and shouldn't be killed anyway, or a process that already exited), report the `Access is denied` / error and continue with the rest — do not abort the whole run.
|
|
32
|
+
- After running, briefly summarize how many ports were freed.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Build an HTML/frontend prototype for the HeySpex Console. Files MUST land in spex-console/public/design-previews/<slug>-v<N>[-<variant>].html with a sibling .meta.json that validates against specs/schemas/prototype-meta.schema.json. Use this any time the user asks to "build a prototype", "mock up a UI", or invokes /frontend-design in this repo.
|
|
3
|
+
argument-hint: "<slug> [--from-spec HS-XXXX] [--bump] [--variant <name>]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
This skill is the **implementation** of `specs/protocols/prototype-lifecycle-protocol.md`. The protocol is the SSOT — when they conflict, the protocol wins and this skill is the bug. Fetch it with `heyspex_get_procedure({ name: "prototype-lifecycle-protocol" })` when you need the full rules.
|
|
7
|
+
|
|
8
|
+
It applies to:
|
|
9
|
+
|
|
10
|
+
- explicit `/prototype` invocation
|
|
11
|
+
- any natural-language "build me an HTML prototype / mock / preview / canvas" ask
|
|
12
|
+
- `/frontend-design` invocations in this repo (the plugin builds the artifact; this skill governs placement)
|
|
13
|
+
|
|
14
|
+
## The contract — no exceptions
|
|
15
|
+
|
|
16
|
+
**Required output paths** (both files, same commit):
|
|
17
|
+
|
|
18
|
+
1. `spex-console/public/design-previews/<slug>-v<N>[-<variant>].html` — the self-contained prototype.
|
|
19
|
+
2. `spex-console/public/design-previews/<slug>-v<N>[-<variant>].meta.json` — the sidecar.
|
|
20
|
+
|
|
21
|
+
Anything outside this folder — including a stray top-level `prototypes/` directory — is **invisible** to the console. The route at `spex-console/src/app/api/ui-design/prototypes/route.ts` reads this folder flat (no recursion, no nested folders). A prototype that doesn't show up in the Prototypes surface does not exist for the user.
|
|
22
|
+
|
|
23
|
+
## Naming
|
|
24
|
+
|
|
25
|
+
- **`<slug>`** (lineage slug) — kebab-case, describes the surface (`capture-canvas`, `shipped-surface`, `review-inbox`). May contain hyphens. **Match an existing lineage if you're iterating on a known surface** — grep `spex-console/public/design-previews/` before inventing a new slug.
|
|
26
|
+
- **`-v<N>`** — version, starts at `-v1`. **Bump rather than overwrite.** The console groups versions into a lineage with full history. If `--bump`, increment from the highest existing `-v<N>` for that slug.
|
|
27
|
+
- **`-<variant>`** (optional) — sibling variant within a version (e.g. `-v2-alt`, `-v2-minimal`, `-v2-terminal`). May contain hyphens. The console nests variants under their parent version and shows a `+N variants at vK` chip on the lineage card. Variants are for "A/B explorations of the same version", not new lineages.
|
|
28
|
+
- **No `index.html`, no nested folders, no dated filenames.** Just `<slug>-v<N>[-<variant>].html`.
|
|
29
|
+
|
|
30
|
+
## meta.json schema
|
|
31
|
+
|
|
32
|
+
Validate against `specs/schemas/prototype-meta.schema.json`. Required: `title` + `status`. Always set `surface_area` and 1–4 `tags` on new sidecars (the console's filter rail depends on them — leaving them empty makes the prototype harder to find).
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"title": "Human-readable name (e.g. 'Capture canvas v2')",
|
|
37
|
+
"description": "One-paragraph summary: what it demonstrates, key interactions, aesthetic direction, technical notes. The console hides this on the card and shows it in the drawer Notes tab — write for that context.",
|
|
38
|
+
"status": "draft",
|
|
39
|
+
"surface_area": "capture | on-deck | preloader | shell | review | roadmap | other",
|
|
40
|
+
"tags": ["kebab-case", "1-to-4"],
|
|
41
|
+
"updated_at": "2026-06-03T18:17:00.000Z",
|
|
42
|
+
"design_doc": "specs/ui/<slug>-design.md (optional but required for promotion to accepted)",
|
|
43
|
+
"linked_specs": [
|
|
44
|
+
"HS-XXXX-CAP-...",
|
|
45
|
+
"HS-XXXX-EPIC-..."
|
|
46
|
+
],
|
|
47
|
+
"parent": "<slug>-v<N-1>.html (optional, when this iterates on a prior version)",
|
|
48
|
+
"embeds": ["other-prototype-slug (optional)"]
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
- **`status` MUST be `"draft"` at create time.** Promotion to `"accepted"` runs through the console's `/api/ui-design/prototypes/<slug>/promote` route and requires both a linked `design_doc` AND a review entry under `specs/reviews/`. The skill does not write `accepted` — refuse if the user asks. (`"archived"` is for superseded versions; usually set later, not at create time.)
|
|
53
|
+
- **Compute `updated_at` as `new Date().toISOString()`** at write time.
|
|
54
|
+
- **`linked_specs`** accepts vault basenames (no `.md` extension) and `HS-*` IDs. Always include the capture/epic/task the prototype embodies. Pull from `--from-spec` if provided. Never invent IDs.
|
|
55
|
+
- Reference siblings in this folder for examples — `shipped-surface-v1.meta.json` (thorough) or `on-deck-v2.meta.json` (minimal).
|
|
56
|
+
|
|
57
|
+
## Workflow
|
|
58
|
+
|
|
59
|
+
When this skill is invoked or matched:
|
|
60
|
+
|
|
61
|
+
1. **Resolve lineage slug.** Match an existing slug if iterating on a known surface; otherwise pick a new kebab-case slug.
|
|
62
|
+
2. **Resolve version.** Default `-v1`. If a file with the same slug already exists, default to bumping to the next integer; honour explicit `--bump`. **Never silently overwrite** — if the target file exists and `--bump` was not passed, surface the conflict and ask.
|
|
63
|
+
3. **Resolve variant.** `--variant <name>` produces `<slug>-v<N>-<name>.html`. Without it, you produce the base variant.
|
|
64
|
+
4. **Pull source spec context.** If `--from-spec HS-XXXX` is passed or the user references a spec, Read it first so the prototype reflects real content, not invented filler.
|
|
65
|
+
5. **Aesthetic.** Defer to the user's brief (e.g. "Claude-in-PowerShell terminal aesthetic" overrides defaults). Otherwise honour console design-system tokens — fetch via `heyspex_design_*` MCP tools, do not grep `spex-console/DESIGN.md`. Recall UI memories first: `heyspex_recall_memories({ tags: ["ui", "console", "design-system"] })`.
|
|
66
|
+
6. **Decide `surface_area` and `tags`.** Pick `surface_area` from the enum based on what the prototype shows. Pick 1–4 lowercase kebab-case `tags` covering the dominant patterns (e.g. `empty-state`, `dark-mode`, `keyboard-nav`).
|
|
67
|
+
7. **Write both files in the same commit.** HTML at `spex-console/public/design-previews/<slug>-v<N>[-<variant>].html`, sidecar at the matching `.meta.json` path. Single self-contained HTML file (inline CSS/JS).
|
|
68
|
+
8. **Validate the sidecar shape** against the schema before saving. Required: `title` + `status`. `status` MUST be `"draft"`. `tags` MUST match `^[a-z0-9-]+$`. `surface_area` MUST be in the enum. `linked_specs[]` items MUST match `^HS-[A-Z0-9]+-` (family keys contain digits, e.g. `HS-9HVY-CAP`). Fix and re-write if any fail.
|
|
69
|
+
9. **Confirm.** After writing, report the gallery URL (`/design-previews/<slug>-v<N>[-<variant>].html`). The console's UI-Design → Prototypes surface picks it up via `/api/ui-design/prototypes` and groups it into the matching lineage automatically.
|
|
70
|
+
|
|
71
|
+
## Anti-patterns — do not do these
|
|
72
|
+
|
|
73
|
+
- Do **not** create a new `prototypes/` folder at the repo root.
|
|
74
|
+
- Do **not** nest as `<slug>/index.html`.
|
|
75
|
+
- Do **not** overwrite an existing `<slug>-v<N>[-<variant>].html` — bump or use a new variant.
|
|
76
|
+
- Do **not** ship without a sibling sidecar.
|
|
77
|
+
- Do **not** write `status: "accepted"` from this skill — promotion runs through the console's `/promote` route only.
|
|
78
|
+
- Do **not** invent linked specs. Only reference `HS-*` IDs that exist in the vault.
|
|
79
|
+
- Do **not** leave `surface_area` and `tags` empty on new sidecars — the console's filter rail depends on them.
|
|
80
|
+
- Do **not** Read `spex-console/DESIGN.md` for token lookups; use `heyspex_design_get_token` / `heyspex_design_get_pattern` MCP tools.
|
|
81
|
+
|
|
82
|
+
## Reference
|
|
83
|
+
|
|
84
|
+
- **Protocol (SSOT):** `specs/protocols/prototype-lifecycle-protocol.md` — fetch with `heyspex_get_procedure({ name: "prototype-lifecycle-protocol" })`
|
|
85
|
+
- **Schema (SSOT):** `specs/schemas/prototype-meta.schema.json`
|
|
86
|
+
- **Discovery route:** `spex-console/src/app/api/ui-design/prototypes/route.ts`
|
|
87
|
+
- **Surface component:** `spex-console/src/components/surfaces/ui-design-surface.tsx`
|
|
88
|
+
- **Lineage parser:** `spex-console/src/lib/prototype-lineage.ts`
|
|
89
|
+
- **Folder:** `spex-console/public/design-previews/`
|
|
90
|
+
- **Thorough sidecar example:** `shipped-surface-v1.meta.json`
|
|
91
|
+
- **Minimal sidecar example:** `on-deck-v2.meta.json`
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hs-auto
|
|
3
|
+
description: Autonomous COO — route a filename or spec into dev-factory (pre-flight + dispatch).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- Generated by scripts/sync-skills.mjs from .claude/commands/hs-auto.md — do not edit by hand. Run `npm run skills:sync`. -->
|
|
7
|
+
|
|
8
|
+
**Usage:** `/hs-auto [filename]`
|
|
9
|
+
|
|
10
|
+
# Autonomous COO mode (`/hs-auto`)
|
|
11
|
+
|
|
12
|
+
> Parity: `.commandcode/skills/hs-auto/SKILL.md` · `.cursor/skills/hs-auto/SKILL.md` · `.agents/skills/hs-auto/SKILL.md`
|
|
13
|
+
|
|
14
|
+
## What to do
|
|
15
|
+
|
|
16
|
+
1. **Parse `$ARGUMENTS`** — optional `filename` (spec id, spec `.md` path, or source file path). Bare token only; no flags required. **All prose before/after the command is the COO brief** (scope, slice, constraints) — not permission to implement in this session.
|
|
17
|
+
|
|
18
|
+
2. **Resolve** — one shell call:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
node bin/hs.mjs auto [FILENAME] --json
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
3. On `error`, report and **stop**. (`source_plan` is **not** an error — proceed to step 5.)
|
|
25
|
+
|
|
26
|
+
4. Run **pre-flight** commands from the `preflight` array in the JSON.
|
|
27
|
+
|
|
28
|
+
5. Branch on `mode` (follow `coo_contract` in JSON when present):
|
|
29
|
+
- `source_plan` → diagnose/research with no dispatchable work yet: file remediation epic (no milestone required) → fleet decompose → file tasks with `target:` → re-resolve same source id → `dispatch`
|
|
30
|
+
- `discover` → `discover_command`
|
|
31
|
+
- `breakdown` → `breakdown_command` (review before filing)
|
|
32
|
+
- `dispatch` → `dispatch_command`
|
|
33
|
+
|
|
34
|
+
6. Summarize results for the user (spec, target, gate, checkpoint).
|
|
35
|
+
|
|
36
|
+
## COO contract
|
|
37
|
+
|
|
38
|
+
**Do not write product code in this session** when `/hs-auto` was invoked. Delegate to the local fleet first. Follow fleet rules in `.commandcode/skills/hs-auto/SKILL.md` (Night Action builder ban, budget caps, bias constraint). Implement yourself only if the fleet gate fails after retries.
|
|
39
|
+
|
|
40
|
+
Diagnose (`HS-…-DIAG-…`) and research (`HS-…-RES-…`) specs use the same source pipeline as capture/research in Phase 1 — they are planning inputs until a remediation epic + tasks with `target:` exist.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hs-backfill
|
|
3
|
+
description: Retroactively backfill completed work into the vault (creates epic + child tasks at status:in_review, with an auto-generated review doc). Native command (carries full $ARGUMENTS; the MCP prompt only gets the first token).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- Generated by scripts/sync-skills.mjs from .claude/commands/hs-backfill.md — do not edit by hand. Run `npm run skills:sync`. -->
|
|
7
|
+
|
|
8
|
+
**Usage:** `/hs-backfill <epic name> [<one-line summary>]`
|
|
9
|
+
|
|
10
|
+
> **Platform asymmetry — read this, it is load-bearing.** Claude Code delivers only the **first whitespace token** of an MCP prompt's argument (GitHub [#14210](https://github.com/anthropics/claude-code/issues/14210), closed *not planned*), so the namespaced MCP prompt `/hs-backfill` can carry at most a single token — never a title plus a summary. This **native project command** is the only IDE surface that receives full `$ARGUMENTS`.
|
|
11
|
+
|
|
12
|
+
## What to do
|
|
13
|
+
|
|
14
|
+
**1. Parse `$ARGUMENTS`:** leading text up to the first sentence break / newline → `epic_name` (required — ask if missing). Remainder of the string → a `summary` hint; the tool still requires a full plain-language `summary` per spec-summary-authoring, so expand/refine a terse arg using the conversation.
|
|
15
|
+
|
|
16
|
+
**2. Gather from the conversation and/or `git log`/`git diff`:**
|
|
17
|
+
- `plan_markdown` — what was actually done + which acceptance criteria were met.
|
|
18
|
+
- `children` — each completed task as `{ name, summary }` (summary required per child).
|
|
19
|
+
- `files_changed` — paths touched.
|
|
20
|
+
- `kind` / `effort` / `tags` / `related` — optional classification.
|
|
21
|
+
|
|
22
|
+
**3. Call** `heyspex_backfill_epic({ epic_name, summary, plan_markdown, children, files_changed, kind?, effort?, tags?, related? })`. All resulting specs land at `status: in_review` with an auto-generated review doc. This is for work done **outside** the normal `/hs-next` flow — never a substitute for it going forward.
|
|
23
|
+
|
|
24
|
+
**4. Roadmap registration** defaults to `HS-ROADMAP-PRODUCT` phase `P0` (Review column) unless the call passes `skip_roadmap_registration: true`.
|
|
25
|
+
|
|
26
|
+
**5. Report** the created epic id + task ids, and remind the user this does not commit or push — they still need to do that themselves.
|
|
27
|
+
|
|
28
|
+
## Hard prohibitions
|
|
29
|
+
|
|
30
|
+
- **Never** use this for work that hasn't actually happened — it documents DONE work retroactively; `/hs-push` is for planning work not yet started.
|
|
31
|
+
- **Never** commit or push git.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hs-capture
|
|
3
|
+
description: Fast brain-offload capture — open/resume a capture, or route a named capture straight to promote. Native command (carries full $ARGUMENTS; the MCP prompt only gets the first token).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- Generated by scripts/sync-skills.mjs from .claude/commands/hs-capture.md — do not edit by hand. Run `npm run skills:sync`. -->
|
|
7
|
+
|
|
8
|
+
**Usage:** `/hs-capture [HS-CAP-XXXX | HS-IDEA-XXXX] [promote]`
|
|
9
|
+
|
|
10
|
+
> **Platform asymmetry — read this, it is load-bearing.** Claude Code delivers only the **first whitespace token** of an MCP prompt's argument (GitHub [#14210](https://github.com/anthropics/claude-code/issues/14210), closed *not planned*), so the namespaced MCP prompt `/hs-capture` can carry **at most a single capture id** — never an intent word. This **native project command** is the only IDE surface that receives full `$ARGUMENTS`/`$1 $2`, so it is the only place `HS-CAP-1234 promote to research` can be parsed. The two surfaces are intentionally **not** identical; do not try to "make them match" — they cannot. Diagnosis + code anchors: [[HS-UIYC-34KP-RES-hs-capture-arg-routing-capture-id-and-pr]]. Owning epic: [[HS-7IOM-QKEF-EPIC-hs-capture-command-parity-resume-aware-s]].
|
|
11
|
+
|
|
12
|
+
## What to do
|
|
13
|
+
|
|
14
|
+
**1. Parse `$ARGUMENTS`** (both optional, order within the string is: id first, then intent words):
|
|
15
|
+
- Leading token matching `HS-(CAP|IDEA|DRAFT)-[A-Z0-9-]{3,}` (case-insensitive) → `capture_id`. `DRAFT` is tolerated here for a stray/manual `HS-DRAFT-*` id (e.g. pasted by hand) — the auto-launch bridge ([[HS-I6NU]]) resolves every companion draft to a real `HS-CAP-*` id before ever invoking this command, so a `DRAFT` id should not normally reach here.
|
|
16
|
+
- Remaining words containing `promote` (case-insensitive) → **promote intent**.
|
|
17
|
+
- Neither → the no-arg path.
|
|
18
|
+
|
|
19
|
+
If the capture tools are not already available in this session, call `heyspex_load_tools` first so `heyspex_active_capture` / `heyspex_promote_capture` / `heyspex_promote_capture_to_diagnose` are callable.
|
|
20
|
+
|
|
21
|
+
**2. Route on what you parsed:**
|
|
22
|
+
|
|
23
|
+
- **`capture_id` + promote intent** → route **straight to the promote exit**, bypassing the capture loop (do not run capture or ground=expand). Follow `/hs-promote`'s **§A. Capture → research** section verbatim (same tools, same two-phase confirm rule, same bug-fix→diagnose branch) — do **not** re-derive or fork that logic here; this command and `/hs-promote` share one promote implementation, this is just a second entrypoint into it.
|
|
24
|
+
|
|
25
|
+
- **`capture_id`, no promote** → **attach/resume that exact capture**: call `heyspex_active_capture({ spec_id: capture_id })`. The server honors the explicit id (resolves that capture DB-first, disk fallback) and, when it already has a Core Idea + Summary, returns it as a **resume**. Then follow the beats below. A non-existent id returns a clear "no such capture" error — surface it; **never** silently start a fresh capture under a near-miss id.
|
|
26
|
+
|
|
27
|
+
- **No arguments** → call `heyspex_active_capture({})`. It attaches to the capture on deck, or auto-creates a fresh `HS-CAP-*` when none is pinned. Then follow the beats below.
|
|
28
|
+
|
|
29
|
+
**3. Run the beats** (the capture protocol — source of truth is `.cursor/skills/hs-capture/SKILL.md` and the MCP prompt markdown; do not re-derive them). Grounding and expanding are the **same act** — three beats, not four:
|
|
30
|
+
|
|
31
|
+
| # | Action | Confirm? |
|
|
32
|
+
|---|--------|----------|
|
|
33
|
+
| 1 | **Capture** — every turn (including the user's answers to your questions), call `heyspex_update_capture` with `user_quote` = verbatim text. If Core Idea is empty, also pass `core_idea` + `summary` in the same call. | No |
|
|
34
|
+
| 2 | **Ground = Expand + sufficiency check** — chat-only, peer-level grounding (technical co-founder). The grounding output IS the Expanded Concept: write it to `agent_expansion` via `heyspex_update_capture` in the same pass, automatically. No offer, no user confirmation. Every `heyspex_update_capture` response carries a `sufficiency` verdict (the same scorer `heyspex_promote_capture` runs) — while it fails, elicit the listed missing elements (`example` / `done_when` / a considered `kind`) from the user and write them in this same pass. | No |
|
|
35
|
+
| 3 | **Promote** — the only exit, **gated**: only offered once the sufficiency verdict passes AND the owner has confirmed satisfaction with the enhanced capture. `heyspex_promote_capture` (research), or `heyspex_promote_capture_to_diagnose` for `kind: bug-fix`. The promote-time gate stays as defense-in-depth. **`heyspex_promote_capture` creates an outline, not a finished hand-off** — the response's `research_still_stub`/`next_step` fields say so when the research doc still has unfilled `_TBD — fill in this section._` placeholders; run `/hs-res` against it before `heyspex_promote_research` (which refuses stubs with `RESEARCH_STILL_STUB` as a backstop). | Yes |
|
|
36
|
+
|
|
37
|
+
After beat 2, the two choices depend on the sufficiency verdict ([[HS-X8GS-T9T6-EPIC-capture-sufficiency-gate-grounding-time]]):
|
|
38
|
+
- **Verdict fails** → present **iterate** and **enhance to readiness** (elicit the missing elements; never invent content to pass the gate). Do **not** present "promote to research" as a live option — an explicit owner instruction to promote anyway still wins.
|
|
39
|
+
- **Verdict passes** → show the enhanced capture and ask if the owner is satisfied with it; on that yes, present exactly two choices: **promote to research** (or promote-to-diagnose for `kind: bug-fix`) or **iterate**. A promote call is spent only after the owner's confirmation (confirm-before-offer + confirm-before-spend).
|
|
40
|
+
|
|
41
|
+
Never present "do you want to expand" as a choice — expansion already happened.
|
|
42
|
+
|
|
43
|
+
**Open-the-doc offer (agent captures only, owner ruling 2026-08-11):** Companion / Chrome-extension captures auto-open the solo window; agent captures must **not**. When `heyspex_update_capture` returns `offer_open_viewer` (first materialization) — or the first time the capture doc exists on disk — print that offer verbatim alongside promote/iterate (or right after the first "captured" ack):
|
|
44
|
+
|
|
45
|
+
> Want to see `HS-…-CAP`? Say **yes** / **open** / **show** and I'll open the doc.
|
|
46
|
+
|
|
47
|
+
On `yes` / `open` / `show`, immediately run `node bin/hs.mjs view docs <spec_id>` from the repo root. Do not ask twice, do not open unprompted, do not nag on later iterates.
|
|
48
|
+
|
|
49
|
+
**Iterate is the default continuation (owner ruling 2026-07-12).** While the capture sits at that choice, the user's next prose that isn't an explicit "promote" or "discard" IS the iterate move — even when it reads like a new idea or a work order ("please add …"), and even though the user never says "iterate". Append it to the SAME capture: `heyspex_update_capture` with the **explicit `spec_id`** of the capture in flow (never no-arg `heyspex_active_capture({})`, which can mint a fresh capture), re-ground into `agent_expansion`, and re-present the two choices. Only open a new capture when the prose is clearly a separate idea with no thread back — say so in one line first.
|
|
50
|
+
|
|
51
|
+
**Kind suggestion (during beat 2, HS-RZQO):** when the content signals a non-default kind — bug/error/broken/regression language → `bug-fix`; a bare URL/link-only body → `clip`; a pointer to a doc/resource → `reference`; an open question → `question` — offer it in the same reply ("this reads like a bug-fix capture — reclassify?") and on the user's yes pass `kind` in the next `heyspex_update_capture` call. Suggest once, never auto-apply, never nag.
|
|
52
|
+
|
|
53
|
+
**Model routing & thread split/spawn (owner ruling 2026-08-11):** settings at `.heyspex/config.yaml` → `agent_behaviors.capture_on_idea.{default_model, model_switch_mode, thread_split_mode}`; full table in `capture-guardrails.md` §"Capture model routing & thread split/spawn" and `.cursor/skills/hs-capture/SKILL.md`. On a first/only-turn capture, offer or silently delegate a model switch per `model_switch_mode` (`ask`\|`silent_delegate`\|`off`) — never a live silent switch, that's not possible. When new mid-thread prose isn't a continuation, judge whether it benefits from this thread's context: benefits → split (`Agent(subagent_type:"fork")` on a new capture id); doesn't → spawn (fresh `Agent()`); genuinely unsure and `thread_split_mode: ask` → `AskUserQuestion` with exactly those two options.
|
|
54
|
+
|
|
55
|
+
On a **resume** (capture already has Core Idea + Summary), skip re-capturing: greet with what's already there and offer the two resume moves — **iterate** (refine with new verbatim input) or **promote**. Expansion is automatic during grounding, not a menu item — there is **no** separate `/hs-expand` command or skill.
|
|
56
|
+
|
|
57
|
+
## Hard prohibitions
|
|
58
|
+
|
|
59
|
+
- **Never** offer to file epics, tasks, or implementation plans — promote-to-research (or promote-to-diagnose) is the only exit.
|
|
60
|
+
- **Never** implement the captured idea straight from the capture — its only road to code is promote-to-research → `/hs-promote <research-id>` + `/hs-next <resulting-id> [front]`. Milestone/epic/task filing is never skipped; front mode (handheld/assisted/autonomous) controls supervision, never whether that filing happens. The old permission-gated direct-implementation bypass is retired (research-capture-protocol §"From research to code — always through milestone/epic/task (no bypass)").
|
|
61
|
+
- **Never** ask the user whether to expand — Ground=Expand auto-writes `agent_expansion` every time, with no confirmation gate.
|
|
62
|
+
- **Never** auto-open a browser / solo window for an agent-originated capture — offer once (`yes`/`open`/`show`) and only then run `hs view docs <id>`.
|
|
63
|
+
- **Never** alter words inside a `## Notes` quote (format-wrapping is fine; word substitution is not).
|
|
64
|
+
- **Never** create a `type: research` doc without beat-3 (or promote-intent) confirmation.
|
|
65
|
+
- **Never** commit or push.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hs-defer
|
|
3
|
+
description: Defer remaining work on the claimed task — file a split child with handoff envelope and route it on-deck for the next agent.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- Generated by scripts/sync-skills.mjs from .claude/commands/hs-defer.md — do not edit by hand. Run `npm run skills:sync`. -->
|
|
7
|
+
|
|
8
|
+
**Usage:** `/hs-defer [HS-XXXX-TASK] (optional — defaults to the task you are working)`
|
|
9
|
+
|
|
10
|
+
> **SaaS-safety note:** orchestration lives in `vendor/heyspex-mcp/cli.mjs` (`heyspex_defer_spec` → `POST /api/specs/:id/defer`). Do not re-implement the defer write path here.
|
|
11
|
+
|
|
12
|
+
## What to do
|
|
13
|
+
|
|
14
|
+
When the user sends `/hs-defer` (optionally with a bare `HS-TASK-*` id):
|
|
15
|
+
|
|
16
|
+
1. **Identify the parent task** — the optional arg, else the spec you currently hold a claim on.
|
|
17
|
+
|
|
18
|
+
2. **Author the handoff envelope** from session context (do not ask the user to paste a handoff prompt):
|
|
19
|
+
- `reason` — why you are deferring (context budget, blocked, lane hand-off, …)
|
|
20
|
+
- `summary_done` — verified work completed this session
|
|
21
|
+
- `remaining` — actionable items for whoever picks it up
|
|
22
|
+
- `success_criteria` — how the reviewer knows the deferred work is done
|
|
23
|
+
|
|
24
|
+
3. **Call** `heyspex_defer_spec` with `{ spec_id, reason, summary_done, remaining, success_criteria }` plus optional `parent_status` (`in_review` default, or `in_progress` when the parent is not independently reviewable), `effort`, `child_name`.
|
|
25
|
+
|
|
26
|
+
4. **Tell the user** the returned `child_id` and that they can open a fresh window and run `/hs-next` to continue. The tool pins the child on-deck, releases the parent claim, and records WIP on the epic.
|
|
27
|
+
|
|
28
|
+
## Not this command
|
|
29
|
+
|
|
30
|
+
- `hs defer` / `hs undefer` — time-shifts a spec via `defer_until` ([[HS-ZZBN]]), not delegation split-child defer.
|
|
31
|
+
|
|
32
|
+
Cross-reference: [[HS-MS3T-1U0Z-TASK-hs-defer-mcp-tool-and-slash-command]], [[HS-DTL1-CX5K-CAP-task-split-handoff-when-context-runs-low]], [[HS-HXE2-YQ5A-EPIC-delegation-defer-work-from-one-agent-to]].
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hs-dev
|
|
3
|
+
description: Show or switch the HeySpex dev/prod mode and dev-mode reliance (local vs cloud) — which console, read tier, and write mode everything points at.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- Generated by scripts/sync-skills.mjs from .claude/commands/hs-dev.md — do not edit by hand. Run `npm run skills:sync`. -->
|
|
7
|
+
|
|
8
|
+
**Usage:** `/hs-dev [mode:local|mode:cloud|mode:prod]`
|
|
9
|
+
|
|
10
|
+
# HeySpex dev/prod mode (`/hs-dev`)
|
|
11
|
+
|
|
12
|
+
> Parity: `.commandcode/skills/hs-dev/SKILL.md` · `.cursor/skills/hs-dev/SKILL.md` · `.agents/skills/hs-dev/SKILL.md`
|
|
13
|
+
|
|
14
|
+
Admin/dev-only. Empty `$ARGUMENTS` → status; `mode:local` / `mode:cloud` / `mode:prod` (or bare `local|cloud|prod`) → switch. `mode:local`/`mode:cloud` imply dev mode with that reliance.
|
|
15
|
+
|
|
16
|
+
## What to do
|
|
17
|
+
|
|
18
|
+
1. **Call the MCP tool** (primary): `heyspex_dev_mode({ action: "get" })` for status, or `heyspex_dev_mode({ action: "set", mode: "<target>" })` to switch. Fallback when the `heyspex_*` tools are missing: `node bin/hs.mjs dev [mode:<target>]`.
|
|
19
|
+
2. **Report** the resolved mode / reliance / console URL / read tier / write mode WITH the source of each value. Flag a stale local override (`localOverride.staleAgainstCloud`) explicitly — `~/.heyspex/dev-mode.json` wins over the cloud setting on this machine.
|
|
20
|
+
3. On a switch, confirm what was written (`~/.heyspex/dev-mode.json`, `console_url` in `~/.heyspex/credentials.yaml`) and whether the cloud admin setting updated; an unreachable console never blocks the local switch — relay `cloud.error` plainly.
|
|
21
|
+
|
|
22
|
+
Semantics: `prod` and `dev+cloud` → cloud console (app.heyspex.com), Neon reads, cloud writes; `dev+local` → localhost:3000, disk reads, local writes.
|
|
23
|
+
|
|
24
|
+
Full method: `.commandcode/skills/hs-dev/SKILL.md`.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hs-doctor
|
|
3
|
+
description: Diagnose + repair the HeySpex install surfaces (MCP, hooks, skills, git hooks, deps) — the fallback when heyspex_* MCP tools are missing or broken.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- Generated by scripts/sync-skills.mjs from .claude/commands/hs-doctor.md — do not edit by hand. Run `npm run skills:sync`. -->
|
|
7
|
+
|
|
8
|
+
**Usage:** `/hs-doctor (no arguments)`
|
|
9
|
+
|
|
10
|
+
# HeySpex doctor (`/hs-doctor`)
|
|
11
|
+
|
|
12
|
+
> Parity: `.commandcode/skills/hs-doctor/SKILL.md` · `.cursor/skills/hs-doctor/SKILL.md` · `.agents/skills/hs-doctor/SKILL.md`
|
|
13
|
+
|
|
14
|
+
Works even when the `heyspex` MCP server is down — it shells out to the in-repo doctor script, no MCP tools required. **Run the commands yourself.**
|
|
15
|
+
|
|
16
|
+
## What to do
|
|
17
|
+
|
|
18
|
+
1. **Diagnose (read-only)** — parse per-surface status:
|
|
19
|
+
```bash
|
|
20
|
+
node scripts/heyspex-doctor.mjs --json
|
|
21
|
+
```
|
|
22
|
+
(Same as `npm run doctor` / `hs doctor --json`.) Result: `{ mode, ok, results: [{ id, label, status, detail, fix, human }] }` — `status` ∈ `ok | warn | fail`.
|
|
23
|
+
|
|
24
|
+
2. **Repair the fixable gaps** — if any surface is `fail` (or a `warn` you want cleared) with a `fix` array:
|
|
25
|
+
```bash
|
|
26
|
+
node scripts/heyspex-doctor.mjs --fix
|
|
27
|
+
```
|
|
28
|
+
(Same as `npm run setup` / `hs doctor --fix`.) Idempotent. **Do not run while the spex-console dev server is live** — check `hs server status` first.
|
|
29
|
+
|
|
30
|
+
3. **Hand un-fixable items to the human** — surfaces with a `human` field and no `fix` need a person: `deps` → `npm install`; `console-env` → copy `.env.example` to `.env.local` + fill `DATABASE_URL`/Clerk keys (ask owner); `node`/`git` → install the tool. Report each verbatim.
|
|
31
|
+
|
|
32
|
+
4. **Reconnect for MCP** — if any `mcp-*` surface or `node_modules` was just fixed, the `heyspex_*` tools won't appear until the session restarts (Claude Code reads MCP once at startup). Tell the human to reconnect, then confirm `/mcp` + `/hs-next`.
|
|
33
|
+
|
|
34
|
+
5. **Report** a short table: surface · status · fixed-or-needs-you, blockers first, then the reconnect reminder.
|
|
35
|
+
|
|
36
|
+
Full method: `.commandcode/skills/hs-doctor/SKILL.md`.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hs-ground
|
|
3
|
+
description: Pre-plan grounding — a single bounded (~2k-token) report (Scope · Relevant specs · Relevant code · Graph hints · Conflicts · Gaps) assembled from the vault via lexical retrieval. You are the reranker; do not re-read the vault.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- Generated by scripts/sync-skills.mjs from .claude/commands/hs-ground.md — do not edit by hand. Run `npm run skills:sync`. -->
|
|
7
|
+
|
|
8
|
+
**Usage:** `/hs-ground [topic words] [--summary <text>] [--areas a,b] [--tags x,y] [--max-tokens N]`
|
|
9
|
+
|
|
10
|
+
> **Thin trigger.** Retrieval, scoring, conflict detection, caps, and report assembly all live in the MCP server (`vendor/heyspex-mcp/plan-ground.mjs`, `report:true` path). Do not re-implement grounding logic here, and do not turn the report into a vault-reading scaffold — that is the exact failure this command replaces ([[hs-ground-as-built-mcp-failure-modes]], [[HS-BZTV-G7R2-EPIC-hs-ground-three-tier-grounding-report]]).
|
|
11
|
+
|
|
12
|
+
## What to do
|
|
13
|
+
|
|
14
|
+
1. **Parse `$ARGUMENTS`** (topic is required — the bare words are the topic):
|
|
15
|
+
- free text → `topic` (and reuse as `summary` if no `--summary`)
|
|
16
|
+
- `--summary <text>` → `summary`
|
|
17
|
+
- `--areas a,b` → `areas` (subset of: console, companion, mcp, vault, indexer)
|
|
18
|
+
- `--tags x,y` → `tags`
|
|
19
|
+
- `--max-tokens N` → `max_tokens` (default 2000)
|
|
20
|
+
|
|
21
|
+
2. **Call** `heyspex_ground_plan` with **`report: true`** plus the parsed args (and `check_conflicts: true`). The tool returns the bounded report as markdown directly.
|
|
22
|
+
|
|
23
|
+
3. **Output the returned report verbatim.** It is already capped and cited. Then **stop and act on it** — do **NOT** open the discovered specs, run broad `rg`, or read whole files. The report's "Relevant specs" list is a wide lexical-recall window and **you are the reranker**: open *only* the one or two specs you judge directly relevant to the task, if any.
|
|
24
|
+
|
|
25
|
+
4. **If the footer / report shows blocking conflicts** (`conflicts: N (BLOCKING …)`), resolve them via `/hs-resolve` before treating any conflicted spec as authoritative; re-run `/hs-ground` after resolution.
|
|
26
|
+
|
|
27
|
+
5. **Heed the Conflicts caveat.** The conflict detector is claim-level and blind to design-supersession / identifier drift — for substrate/decision questions, check the design-vs-decision axis yourself ([[drift-is-two-axes-as-built-and-design-supersession]]).
|
|
28
|
+
|
|
29
|
+
6. *(Optional)* If the task needs durable context, call `heyspex_recall_memories` with the report's `recall_memories_hint` tags — once, `limit: 10`.
|
|
30
|
+
|
|
31
|
+
Sibling skills: `/hs-next` (build pipeline), `/hs-resolve` (resolution lane), `/hs-review` (review pipeline). Hand off a grounded plan to `/hs-push`.
|
|
32
|
+
|
|
33
|
+
7. **When grounding a capture on deck, record it** (HS-KNJ8). Once the report is read and you have judged what is already built / already decided / the owner's own working reference / the residual delta, run `node scripts/record-grounding.mjs --capture <HS-CAP-id> --built "..." --decided "..." --reference "..." --delta "..."`. It writes `.heyspex/research-grounding.json` (the shape the deep-research gate reads) and marks the capture expanded. Until it runs, the capture-execution gate refuses research gathers, paid-model synthesis and routing-edit sub-agents for that capture.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hs-handoff
|
|
3
|
+
description: Chat-surface form of `hs handoff` — resolves a short-code lane and resumes the spec it names, or (no code) runs close-out and hands back a fresh code + launch command.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- Generated by scripts/sync-skills.mjs from .claude/commands/hs-handoff.md — do not edit by hand. Run `npm run skills:sync`. -->
|
|
7
|
+
|
|
8
|
+
**Usage:** `/hs-handoff [<CODE>]`
|
|
9
|
+
|
|
10
|
+
# HeySpex handoff (`/hs-handoff`)
|
|
11
|
+
|
|
12
|
+
> Parity: `.commandcode/skills/hs-handoff/SKILL.md` · `.cursor/skills/hs-handoff/SKILL.md` · `.agents/skills/hs-handoff/SKILL.md`
|
|
13
|
+
|
|
14
|
+
Chat harnesses intercept `/hs` before the agent sees it and split on the space in `/hs handoff <CODE>`, so the terminal-only CLI form is unreachable from chat. This command is that fix, one word — same contract, no new engine code. `hs handoff`, `heyspex_record_wip`, and `hs export-events` already exist.
|
|
15
|
+
|
|
16
|
+
Full contract: [[handoff-request-contract-close-out]] (vault decision) and `docs/admin/workflow/handoff.md`. Follow them; don't restate or reinvent them.
|
|
17
|
+
|
|
18
|
+
## What to do
|
|
19
|
+
|
|
20
|
+
1. **Parse `$ARGUMENTS`.** First token is a bare, non-flag string → resume flow, code = it. Empty → create flow.
|
|
21
|
+
|
|
22
|
+
2. **Resume flow (`$ARGUMENTS` = `<CODE>`):**
|
|
23
|
+
```bash
|
|
24
|
+
hs handoff load --lane <CODE>
|
|
25
|
+
```
|
|
26
|
+
Spelled-out `load --lane` form, NOT the bare shorthand — as of [[HS-RVKN]] (owner ruling 2026-09-01) `hs handoff <CODE>` LAUNCHES a new terminal session by default, and this command's resume flow must stay a read inside the current chat session.
|
|
27
|
+
- **Hit**: prints `lane <CODE> · spec <ID> · phase <label> · <time>`. Show that to the human, then continue from it the standard way — run `/hs-next <ID>` (same steps as that command: call `heyspex_next_on_deck`, print `user_prompt_markdown` verbatim, decode `agent_dispatch` on the reply). The human already asked for the handoff; don't ask again before pulling the brief.
|
|
28
|
+
- **Miss** (`(no current handoff context)`): the lane is empty or expired — say so, then ask which spec to resume instead of guessing.
|
|
29
|
+
|
|
30
|
+
3. **Create flow (no code)** — owner-locked contract, verbatim, do not invent steps or reorder them:
|
|
31
|
+
1. Close out first, automatically: `heyspex_record_wip` per worked epic, change-log rows + HS-REV companion at the review grain, `heyspex_release_spec` on open claims, then `hs export-events`. Skip silently anything already current.
|
|
32
|
+
2. Do NOT pick a code — it is MINTED. Owner ruling 2026-09-01: keys are minted, never invented (a hand-picked one once landed as `FLEET`).
|
|
33
|
+
3. Record the lane, minting the code in the same call: `hs handoff record --new-code --spec <next-target> --phase "<label>" --link <worked-epic-id...> --blocker "<open items, one line>"`. It prints `Handoff code: <CODE>` — that is the code you hand back.
|
|
34
|
+
4. Hand the human both forms, always: `/hs-handoff <CODE>` and `cd C:\dev-projects\heyspex-specs && claude "/hs-next <next-spec-id>"`.
|
|
35
|
+
5. Never treat the session as over — the human decides whether to continue here or launch the next one.
|
|
36
|
+
|
|
37
|
+
Full method: `.commandcode/skills/hs-handoff/SKILL.md`.
|