heyspex 0.2.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/bin/hs.mjs +163 -11
- package/dist/cli/hs-check.mjs +88 -46
- package/dist/cli/hs-claim.mjs +84 -39
- package/dist/cli/hs-connect.mjs +583 -129
- package/dist/cli/hs-defer.mjs +251 -30
- package/dist/cli/hs-dev.mjs +20 -8
- package/dist/cli/hs-env.mjs +62 -34
- package/dist/cli/hs-index-rebuild.mjs +288 -83
- package/dist/cli/hs-index-reconcile.mjs +397 -111
- package/dist/cli/hs-init.mjs +2143 -91
- package/dist/cli/hs-install.mjs +628 -106
- package/dist/cli/hs-join.mjs +686 -236
- package/dist/cli/hs-vault-pull.mjs +3189 -179
- package/dist/cli/hs-vault-push.mjs +6433 -0
- package/dist/cli/hs-vault.mjs +396 -178
- package/dist/cli/hs-workspace.mjs +289 -151
- package/dist/cli-templates/harness-commands/claude/hs-backfill.md +28 -28
- package/dist/cli-templates/harness-commands/claude/hs-capture.md +62 -62
- package/dist/cli-templates/harness-commands/claude/hs-defer.md +29 -29
- package/dist/cli-templates/harness-commands/claude/hs-ground.md +30 -28
- package/dist/cli-templates/harness-commands/claude/hs-next.md +29 -29
- package/dist/cli-templates/harness-commands/claude/hs-promote.md +70 -70
- package/dist/cli-templates/harness-commands/claude/hs-push.md +35 -35
- package/dist/cli-templates/harness-commands/claude/hs-qc.md +27 -27
- package/dist/cli-templates/harness-commands/claude/hs-resolve.md +23 -23
- package/dist/cli-templates/harness-commands/claude/hs-review.md +23 -23
- package/dist/cli-templates/harness-commands/claude/hs-view.md +28 -26
- package/dist/cli-templates/harness-commands/claude/kill-ports.md +32 -32
- package/dist/cli-templates/harness-commands/claude/prototype.md +91 -91
- package/dist/cli-templates/harness-commands/cursor/hs-backfill.md +22 -22
- package/dist/cli-templates/harness-commands/cursor/hs-capture.md +56 -56
- package/dist/cli-templates/harness-commands/cursor/hs-defer.md +23 -23
- package/dist/cli-templates/harness-commands/cursor/hs-ground.md +24 -22
- package/dist/cli-templates/harness-commands/cursor/hs-next.md +23 -23
- package/dist/cli-templates/harness-commands/cursor/hs-promote.md +64 -64
- package/dist/cli-templates/harness-commands/cursor/hs-push.md +29 -29
- package/dist/cli-templates/harness-commands/cursor/hs-qc.md +21 -21
- package/dist/cli-templates/harness-commands/cursor/hs-resolve.md +17 -17
- package/dist/cli-templates/harness-commands/cursor/hs-review.md +17 -17
- package/dist/cli-templates/harness-commands/cursor/hs-view.md +24 -22
- package/dist/cli-templates/harness-commands/cursor/kill-ports.md +26 -26
- package/dist/cli-templates/harness-commands/cursor/prototype.md +86 -86
- package/docs/copilot-plugin-install.md +162 -0
- package/docs/driving-heyspex-from-copilot.md +165 -0
- package/package.json +20 -2
- package/plugins/heyspex/.claude-plugin/plugin.json +12 -12
- package/plugins/heyspex/.cursor-plugin/plugin.json +15 -15
- package/plugins/heyspex/README.md +309 -0
- package/plugins/heyspex/bin/run-hook.mjs +20 -2
- package/plugins/heyspex/hooks/cursor-hooks.json +81 -0
- package/plugins/heyspex/hooks/hooks.json +94 -37
- package/scripts/claude-hooks/_intent-classifier-router.mjs +456 -410
- package/scripts/claude-hooks/_intent-classifier-semantic.mjs +5 -0
- package/scripts/claude-hooks/_run.mjs +316 -23
- package/scripts/claude-hooks/capture-execution-gate.mjs +51 -0
- package/scripts/claude-hooks/claim-liveness-shared.mjs +2 -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/inject-communication-style.mjs +20 -0
- package/scripts/claude-hooks/intent-classifier-trigger.mjs +279 -247
- package/scripts/claude-hooks/session-end.mjs +2 -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 +5 -1
- package/scripts/cursor-hooks/manifest.mjs +46 -0
- package/scripts/heyspex-mode.mjs +20 -0
- package/scripts/hs-mode.mjs +1 -1
- package/scripts/hs-view.mjs +180 -17
- package/scripts/install-claude-code-hooks.mjs +3 -1
- package/scripts/lib/console-url-resolver.mjs +3 -2
- package/scripts/lib/customer-kit.mjs +327 -10
- package/scripts/lib/dev-mode.mjs +7 -6
- package/scripts/lib/directive-obligations.mjs +349 -0
- package/scripts/lib/hook-dispositions.mjs +210 -0
- package/scripts/lib/hook-vault-header.mjs +30 -0
- package/scripts/lib/hs-source-branch.mjs +196 -0
- package/scripts/lib/hs-source-log.mjs +2 -1
- package/scripts/lib/hs-source-preflight.mjs +18 -4
- package/scripts/lib/hs-source-push.mjs +386 -356
- package/scripts/lib/window-placement.mjs +109 -0
- package/spexharness/src/adapters/claude-code.mjs +11 -3
- package/spexharness/src/adapters/copilot.mjs +236 -0
- package/spexharness/src/adapters/detect-harness.mjs +34 -0
- package/spexharness/src/gates/_shell-write-targets.mjs +77 -0
- package/spexharness/src/gates/deep-research-cost-gate.mjs +4 -3
- 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/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/intent-classifier.mjs +4 -2
- package/spexharness/src/intent-directive.mjs +626 -541
- package/spexharness/src/rule-table.mjs +31 -1
- package/vendor/heyspex-mcp/account-switch.mjs +6 -5
- package/vendor/heyspex-mcp/capture-buffer-patches.mjs +31 -3
- package/vendor/heyspex-mcp/capture-console-client.mjs +37 -2
- package/vendor/heyspex-mcp/capture-focus.mjs +26 -2
- package/vendor/heyspex-mcp/capture-outbox.mjs +10 -4
- package/vendor/heyspex-mcp/capture-sources.mjs +195 -0
- package/vendor/heyspex-mcp/capture-tools.mjs +56 -11
- package/vendor/heyspex-mcp/claim-tools.mjs +25 -2
- package/vendor/heyspex-mcp/cli-verbs.mjs +19 -21
- package/vendor/heyspex-mcp/cli.mjs +7 -1
- package/vendor/heyspex-mcp/close-branch-report.mjs +102 -0
- package/vendor/heyspex-mcp/cloud-vault-writes.mjs +197 -7
- package/vendor/heyspex-mcp/console-fetch.mjs +192 -28
- package/vendor/heyspex-mcp/console-transport.mjs +7 -1
- package/vendor/heyspex-mcp/credentials.mjs +9 -8
- package/vendor/heyspex-mcp/dev-tools.mjs +7 -0
- package/vendor/heyspex-mcp/filing-tools.mjs +35 -0
- package/vendor/heyspex-mcp/fleet-queue-tools.mjs +2 -1
- package/vendor/heyspex-mcp/folder-trust-store.mjs +2 -1
- package/vendor/heyspex-mcp/http-transport.mjs +2 -0
- package/vendor/heyspex-mcp/list-tools.mjs +1 -1
- package/vendor/heyspex-mcp/mcp-config.mjs +14 -1
- package/vendor/heyspex-mcp/memory-tools.mjs +523 -523
- package/vendor/heyspex-mcp/obligation-backstop.mjs +103 -0
- package/vendor/heyspex-mcp/occupied-keys.mjs +1 -0
- package/vendor/heyspex-mcp/on-deck-brief.mjs +19 -2
- package/vendor/heyspex-mcp/on-deck-scheduler.mjs +1708 -1708
- package/vendor/heyspex-mcp/plan-push.mjs +3 -2
- package/vendor/heyspex-mcp/preflight-gate.mjs +1 -0
- package/vendor/heyspex-mcp/procedure-handlers.mjs +327 -325
- package/vendor/heyspex-mcp/procedure-tools.mjs +1181 -1159
- package/vendor/heyspex-mcp/promote-capture.mjs +2 -0
- package/vendor/heyspex-mcp/promote-research.mjs +6 -0
- package/vendor/heyspex-mcp/read-path.mjs +162 -6
- package/vendor/heyspex-mcp/request-context.mjs +25 -1
- package/vendor/heyspex-mcp/research-handlers.mjs +6 -4
- package/vendor/heyspex-mcp/roadmap-default.mjs +70 -0
- package/vendor/heyspex-mcp/session-owner.mjs +3 -2
- package/vendor/heyspex-mcp/session-tools.mjs +10 -0
- package/vendor/heyspex-mcp/spec-edit-tools.mjs +8 -1
- package/vendor/heyspex-mcp/split-research.mjs +3 -0
- package/vendor/heyspex-mcp/submit-for-review.mjs +18 -1
- package/vendor/heyspex-mcp/summary-write-tools.mjs +5 -1
- package/vendor/heyspex-mcp/test-helpers.mjs +18 -3
- package/vendor/heyspex-mcp/tool-catalog.mjs +7 -1
- package/vendor/heyspex-mcp/tool-dispatch.mjs +18 -0
- package/vendor/heyspex-mcp/vault-io.mjs +720 -724
- package/vendor/heyspex-mcp/vault-resolve.mjs +197 -9
- package/vendor/heyspex-mcp/whoami.mjs +2 -1
- package/vendor/heyspex-mcp/write-outbox.mjs +512 -0
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Push an epic implementation plan into the HeySpex vault, optionally pinning it on deck in the same call. Native command (carries full $ARGUMENTS; the MCP prompt only gets the first token). Consolidates the former hs-push / hs-push-next split into one command + flag.
|
|
3
|
-
argument-hint: "[<epic name>] [--next] [--reason <focus reason>]"
|
|
4
|
-
allowed-tools: mcp__heyspex__heyspex_push_plan
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
> **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 prompts `/mcp__heyspex__hs-push` / `/mcp__heyspex__hs-push-next` can each carry at most a single token — never an epic name plus a `--next` flag plus a focus reason together. This **native project command** is the only IDE surface that receives full `$ARGUMENTS`. It also **consolidates** the old two-prompt split (`hs-push` vs `hs-push-next`) into one command: both ultimately call the same `heyspex_push_plan` tool with only `on_deck` differing, so there is no behavior lost by merging them here — just one flag instead of two command names.
|
|
8
|
-
|
|
9
|
-
## What to do
|
|
10
|
-
|
|
11
|
-
**1. Parse `$ARGUMENTS`:**
|
|
12
|
-
- `--next` (anywhere, case-insensitive) → `on_deck = true`. Absent → `on_deck = false` (file the epic without pinning focus).
|
|
13
|
-
- `--reason <text>` → `focus_reason` (only meaningful when `on_deck` is true; rest of that flag's value up to the next `--` flag or end of string).
|
|
14
|
-
- Remaining leading, non-flag text → an `epic_name` hint. Optional — if omitted, derive the title from the plan under discussion in chat.
|
|
15
|
-
|
|
16
|
-
**2. Gather the rest of the payload from the conversation** (a Cursor/proprietary `.plan.md` the user pasted or referenced, or a plan already discussed in chat):
|
|
17
|
-
- `summary` — required plain-language frontmatter summary (spec-summary-authoring contract).
|
|
18
|
-
- `plan_markdown` — epic body markdown (goal, phases, acceptance criteria).
|
|
19
|
-
- `milestone` — **required**: the parent `HS-MIL-*` wikilink. Ask the user if it isn't obvious from context; the tool call fails without it.
|
|
20
|
-
- `source_plan_paths` — any `.plan.md` file paths referenced (auto-detected from `plan_markdown` too).
|
|
21
|
-
- `kind` / `effort` / `tags` / `related` — optional scheduler/classification fields.
|
|
22
|
-
|
|
23
|
-
**3. Call** `heyspex_push_plan({ epic_name, summary, plan_markdown, milestone, on_deck, focus_reason?, source_plan_paths?, kind?, effort?, tags?, related? })`. This writes the epic **only** — `children: []`; tasks are never filed here, only later via `/hs-next` breakdown.
|
|
24
|
-
|
|
25
|
-
**4. After the call:**
|
|
26
|
-
- `on_deck: true` → the epic is set `in_progress`, `.heyspex/focus.yaml` is written, and a NEXT STEP block is added. Tell the user to run `/hs-next` next.
|
|
27
|
-
- `on_deck: false` → tell the user to re-run `/hs-push --next` (or `/hs-next <the new epic id>`) when ready to start work.
|
|
28
|
-
|
|
29
|
-
**5. Conflict handling:** if the tool returns a behavioral-conflict block against `related` specs and `on_deck` was requested, the write is blocked by default (no files written, no focus pinned). Surface the conflicts to the user — only pass `skip_conflict_check: true` on their explicit say-so, and note a `conflict_override` should be recorded afterward.
|
|
30
|
-
|
|
31
|
-
## Hard prohibitions
|
|
32
|
-
|
|
33
|
-
- **Never** file tasks here — epics only (`children: []`); tasks are just-in-time via `/hs-next` breakdown.
|
|
34
|
-
- **Never** silently bypass a conflict block — surface it and let the human decide.
|
|
35
|
-
- **Never** commit or push git.
|
|
1
|
+
---
|
|
2
|
+
description: Push an epic implementation plan into the HeySpex vault, optionally pinning it on deck in the same call. Native command (carries full $ARGUMENTS; the MCP prompt only gets the first token). Consolidates the former hs-push / hs-push-next split into one command + flag.
|
|
3
|
+
argument-hint: "[<epic name>] [--next] [--reason <focus reason>]"
|
|
4
|
+
allowed-tools: mcp__heyspex__heyspex_push_plan
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
> **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 prompts `/mcp__heyspex__hs-push` / `/mcp__heyspex__hs-push-next` can each carry at most a single token — never an epic name plus a `--next` flag plus a focus reason together. This **native project command** is the only IDE surface that receives full `$ARGUMENTS`. It also **consolidates** the old two-prompt split (`hs-push` vs `hs-push-next`) into one command: both ultimately call the same `heyspex_push_plan` tool with only `on_deck` differing, so there is no behavior lost by merging them here — just one flag instead of two command names.
|
|
8
|
+
|
|
9
|
+
## What to do
|
|
10
|
+
|
|
11
|
+
**1. Parse `$ARGUMENTS`:**
|
|
12
|
+
- `--next` (anywhere, case-insensitive) → `on_deck = true`. Absent → `on_deck = false` (file the epic without pinning focus).
|
|
13
|
+
- `--reason <text>` → `focus_reason` (only meaningful when `on_deck` is true; rest of that flag's value up to the next `--` flag or end of string).
|
|
14
|
+
- Remaining leading, non-flag text → an `epic_name` hint. Optional — if omitted, derive the title from the plan under discussion in chat.
|
|
15
|
+
|
|
16
|
+
**2. Gather the rest of the payload from the conversation** (a Cursor/proprietary `.plan.md` the user pasted or referenced, or a plan already discussed in chat):
|
|
17
|
+
- `summary` — required plain-language frontmatter summary (spec-summary-authoring contract).
|
|
18
|
+
- `plan_markdown` — epic body markdown (goal, phases, acceptance criteria).
|
|
19
|
+
- `milestone` — **required**: the parent `HS-MIL-*` wikilink. Ask the user if it isn't obvious from context; the tool call fails without it.
|
|
20
|
+
- `source_plan_paths` — any `.plan.md` file paths referenced (auto-detected from `plan_markdown` too).
|
|
21
|
+
- `kind` / `effort` / `tags` / `related` — optional scheduler/classification fields.
|
|
22
|
+
|
|
23
|
+
**3. Call** `heyspex_push_plan({ epic_name, summary, plan_markdown, milestone, on_deck, focus_reason?, source_plan_paths?, kind?, effort?, tags?, related? })`. This writes the epic **only** — `children: []`; tasks are never filed here, only later via `/hs-next` breakdown.
|
|
24
|
+
|
|
25
|
+
**4. After the call:**
|
|
26
|
+
- `on_deck: true` → the epic is set `in_progress`, `.heyspex/focus.yaml` is written, and a NEXT STEP block is added. Tell the user to run `/hs-next` next.
|
|
27
|
+
- `on_deck: false` → tell the user to re-run `/hs-push --next` (or `/hs-next <the new epic id>`) when ready to start work.
|
|
28
|
+
|
|
29
|
+
**5. Conflict handling:** if the tool returns a behavioral-conflict block against `related` specs and `on_deck` was requested, the write is blocked by default (no files written, no focus pinned). Surface the conflicts to the user — only pass `skip_conflict_check: true` on their explicit say-so, and note a `conflict_override` should be recorded afterward.
|
|
30
|
+
|
|
31
|
+
## Hard prohibitions
|
|
32
|
+
|
|
33
|
+
- **Never** file tasks here — epics only (`children: []`); tasks are just-in-time via `/hs-next` breakdown.
|
|
34
|
+
- **Never** silently bypass a conflict block — surface it and let the human decide.
|
|
35
|
+
- **Never** commit or push git.
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Post-plan QC gut-check — stress-test a drafted plan before executing it (the plan→execute gate). Reason through the gut-check questions, launch explorers to fill gaps, fold findings into the plan, then record Proof-of-Use.
|
|
3
|
-
argument-hint: "[--plan <path>] (defaults to the most recent plan)"
|
|
4
|
-
allowed-tools: Task, AskQuestion, mcp__heyspex__heyspex_plan_qc, mcp__heyspex__heyspex_ground_plan, mcp__heyspex__heyspex_plan_review, mcp__heyspex__heyspex_recall_memories, Read, Grep, Glob, WebSearch, WebFetch
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
> **Where this sits.** `/hs-ground` (pre-plan) → draft → `heyspex_plan_review` → **`/hs-qc`** → `ExitPlanMode`. Both plan-review + QC markers required ([[HS-R4OY]]).
|
|
8
|
-
|
|
9
|
-
## What to do
|
|
10
|
-
|
|
11
|
-
**0. Mandatory drift passes** — Axis A (as-built code) + Axis B (design supersession per [[drift-is-two-axes-as-built-and-design-supersession]]). Re-run `heyspex_plan_review`; read `axis_b_drift`. Do not trust parent epic AC over newer memory decisions.
|
|
12
|
-
|
|
13
|
-
**0b. When `axis_b_drift` is non-empty — ask the user before recording QC:**
|
|
14
|
-
|
|
15
|
-
Present each conflict. **Default (Recommended):** re-scope the plan (remove dead work). **Override:** user explicitly confirms proceed anyway → `heyspex_plan_qc({ axis_b_user_confirmed: true, axis_b_confirmation_note: "…" })`. Tool returns `QC_AXIS_B_DRIFT` until resolved or user-confirmed. **The override is currently broken** per [[HS-EP8E-C1L2-DIAG-heyspex-plan-qc-override-path-ignores-ax]] (reproduced twice) — until fixed, `HEYSPEX_PLAN_QC_GATE_OFF=1` is the only working escape, and its use should be reported to the owner.
|
|
16
|
-
|
|
17
|
-
**1. Run the gut-check (verbatim — the owner's standard).**
|
|
18
|
-
|
|
19
|
-
Wonderful work! Can you please do a quality check and a gut-check? … *(full questions unchanged)*
|
|
20
|
-
|
|
21
|
-
**2. Act on what you find.** Fold findings into the plan; re-run `heyspex_plan_review` if material.
|
|
22
|
-
|
|
23
|
-
**3. Record Proof-of-Use.** `heyspex_plan_qc` with substantive `findings_summary` including **`Axis B:`** line.
|
|
24
|
-
|
|
25
|
-
**4. Then `ExitPlanMode`.**
|
|
26
|
-
|
|
27
|
-
(Break-glass: `HEYSPEX_PLAN_QC_GATE_OFF=1`.)
|
|
1
|
+
---
|
|
2
|
+
description: Post-plan QC gut-check — stress-test a drafted plan before executing it (the plan→execute gate). Reason through the gut-check questions, launch explorers to fill gaps, fold findings into the plan, then record Proof-of-Use.
|
|
3
|
+
argument-hint: "[--plan <path>] (defaults to the most recent plan)"
|
|
4
|
+
allowed-tools: Task, AskQuestion, mcp__heyspex__heyspex_plan_qc, mcp__heyspex__heyspex_ground_plan, mcp__heyspex__heyspex_plan_review, mcp__heyspex__heyspex_recall_memories, Read, Grep, Glob, WebSearch, WebFetch
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
> **Where this sits.** `/hs-ground` (pre-plan) → draft → `heyspex_plan_review` → **`/hs-qc`** → `ExitPlanMode`. Both plan-review + QC markers required ([[HS-R4OY]]).
|
|
8
|
+
|
|
9
|
+
## What to do
|
|
10
|
+
|
|
11
|
+
**0. Mandatory drift passes** — Axis A (as-built code) + Axis B (design supersession per [[drift-is-two-axes-as-built-and-design-supersession]]). Re-run `heyspex_plan_review`; read `axis_b_drift`. Do not trust parent epic AC over newer memory decisions.
|
|
12
|
+
|
|
13
|
+
**0b. When `axis_b_drift` is non-empty — ask the user before recording QC:**
|
|
14
|
+
|
|
15
|
+
Present each conflict. **Default (Recommended):** re-scope the plan (remove dead work). **Override:** user explicitly confirms proceed anyway → `heyspex_plan_qc({ axis_b_user_confirmed: true, axis_b_confirmation_note: "…" })`. Tool returns `QC_AXIS_B_DRIFT` until resolved or user-confirmed. **The override is currently broken** per [[HS-EP8E-C1L2-DIAG-heyspex-plan-qc-override-path-ignores-ax]] (reproduced twice) — until fixed, `HEYSPEX_PLAN_QC_GATE_OFF=1` is the only working escape, and its use should be reported to the owner.
|
|
16
|
+
|
|
17
|
+
**1. Run the gut-check (verbatim — the owner's standard).**
|
|
18
|
+
|
|
19
|
+
Wonderful work! Can you please do a quality check and a gut-check? … *(full questions unchanged)*
|
|
20
|
+
|
|
21
|
+
**2. Act on what you find.** Fold findings into the plan; re-run `heyspex_plan_review` if material.
|
|
22
|
+
|
|
23
|
+
**3. Record Proof-of-Use.** `heyspex_plan_qc` with substantive `findings_summary` including **`Axis B:`** line.
|
|
24
|
+
|
|
25
|
+
**4. Then `ExitPlanMode`.**
|
|
26
|
+
|
|
27
|
+
(Break-glass: `HEYSPEX_PLAN_QC_GATE_OFF=1`.)
|
|
@@ -1,23 +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]].
|
|
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]].
|
|
@@ -1,23 +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).
|
|
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).
|
|
@@ -1,26 +1,28 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Open one console surface in a chromeless app-mode browser window (solo console gauge) —
|
|
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
|
|
16
|
-
- First token is a surface slug (`
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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.
|
|
@@ -1,32 +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.
|
|
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.
|
|
@@ -1,91 +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`
|
|
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`
|
|
@@ -7,25 +7,25 @@ description: Retroactively backfill completed work into the vault (creates epic
|
|
|
7
7
|
|
|
8
8
|
**Usage:** `/hs-backfill <epic name> [<one-line summary>]`
|
|
9
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.
|
|
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.
|