heyspex 0.2.5 → 0.2.6

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.
Files changed (44) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/bin/hs.mjs +281 -30
  3. package/dev-factory/lib/dispatch-guard.mjs +75 -0
  4. package/dev-factory/lib/runner-path.mjs +51 -0
  5. package/dev-factory/spexcrawl/spexcrawl-cli.mjs +734 -0
  6. package/dist/cli/hs-connect.mjs +20 -1
  7. package/dist/cli/hs-defer.mjs +3802 -3744
  8. package/dist/cli/hs-events.mjs +1296 -0
  9. package/dist/cli/hs-export-events.mjs +1252 -0
  10. package/dist/cli/hs-handoff.mjs +2576 -0
  11. package/dist/cli/hs-index-rebuild.mjs +209 -36
  12. package/dist/cli/hs-index-reconcile.mjs +212 -39
  13. package/dist/cli/hs-init.mjs +20 -1
  14. package/dist/cli/hs-install.mjs +20 -1
  15. package/dist/cli/hs-join.mjs +20 -1
  16. package/dist/cli/hs-next-launch.mjs +2698 -0
  17. package/dist/cli/hs-pin.mjs +1336 -0
  18. package/dist/cli/hs-prereq.mjs +1380 -0
  19. package/dist/cli/hs-revalidate.mjs +3257 -0
  20. package/dist/cli/hs-spawn.mjs +12377 -0
  21. package/dist/cli/hs-test.mjs +1046 -0
  22. package/dist/cli/hs-trash.mjs +362 -0
  23. package/dist/cli/hs-trust.mjs +197 -0
  24. package/dist/cli/hs-vault-pull.mjs +214 -41
  25. package/dist/cli/hs-vault-push.mjs +212 -39
  26. package/dist/cli-templates/harness-commands/claude/hs-res.md +71 -63
  27. package/dist/cli-templates/harness-commands/cursor/hs-res.md +66 -58
  28. package/docs/copilot-plugin-install.md +2 -2
  29. package/package.json +261 -257
  30. package/plugins/heyspex/.claude-plugin/plugin.json +1 -1
  31. package/plugins/heyspex/.cursor-plugin/plugin.json +1 -1
  32. package/scripts/claude-hooks/wip-checkpoint.mjs +17 -2
  33. package/scripts/claude-statusline/statusline-command.mjs +287 -27
  34. package/scripts/hs-companion.mjs +8 -0
  35. package/scripts/install-claude-code-hooks.mjs +104 -3
  36. package/scripts/install-copilot-hooks.mjs +21 -1
  37. package/scripts/install-cursor-hooks.mjs +4 -3
  38. package/scripts/lib/capture-execution-guard.mjs +221 -0
  39. package/scripts/lib/customer-kit.mjs +48 -0
  40. package/scripts/lib/hs-companion-settings.mjs +25 -0
  41. package/scripts/record-grounding.mjs +38 -0
  42. package/vendor/heyspex-mcp/http-transport.mjs +1 -1
  43. package/vendor/heyspex-mcp/test-helpers.mjs +37 -23
  44. package/bin/postinstall.mjs +0 -88
package/package.json CHANGED
@@ -1,257 +1,261 @@
1
- {
2
- "name": "heyspex",
3
- "version": "0.2.5",
4
- "description": "HeySpex CLI + MCP server — connect Claude Code, Cursor, and any MCP client to your HeySpex spec vault",
5
- "keywords": [
6
- "heyspex",
7
- "mcp",
8
- "model-context-protocol",
9
- "claude-code",
10
- "cursor",
11
- "spec-driven-development",
12
- "agents"
13
- ],
14
- "type": "module",
15
- "license": "MIT",
16
- "repository": {
17
- "type": "git",
18
- "url": "git+https://github.com/pwhermanson/workflow-protocol.git"
19
- },
20
- "engines": {
21
- "node": ">=20.0.0 <25.0.0"
22
- },
23
- "workspaces": [
24
- "spex-console",
25
- "pm-control-center",
26
- "companion/extension"
27
- ],
28
- "bin": {
29
- "hs": "bin/hs.mjs",
30
- "heyspex": "bin/hs.mjs",
31
- "heyspex-mcp": "vendor/heyspex-mcp/cli.mjs",
32
- "spexcode": "bin/spexcode.mjs"
33
- },
34
- "exports": {
35
- "./package.json": "./package.json",
36
- "./console-url-resolver": "./scripts/lib/console-url-resolver.mjs"
37
- },
38
- "files": [
39
- "bin/hs.mjs",
40
- "bin/postinstall.mjs",
41
- "bin/hs-vault-binding.mjs",
42
- "vendor/heyspex-mcp/**/*.mjs",
43
- "!vendor/heyspex-mcp/**/*.test.mjs",
44
- "vendor/heyspex-mcp/config-seed.yaml",
45
- "scripts/check-mcp-freshness.mjs",
46
- "scripts/gateway-skills-lib.mjs",
47
- "scripts/vault-id-lib.mjs",
48
- "scripts/lib/console-url-resolver.mjs",
49
- "scripts/lib/window-placement.mjs",
50
- "scripts/lib/hs-link.mjs",
51
- "scripts/lib/hook-vault-header.mjs",
52
- "scripts/lib/dev-mode.mjs",
53
- "scripts/lib/directive-obligations.mjs",
54
- "scripts/lib/hs-command.mjs",
55
- "scripts/lib/shared-path-helpers.mjs",
56
- "scripts/claude-statusline/statusline-command.mjs",
57
- "scripts/claude-statusline/fonts/HeySpexIcons.ttf",
58
- "scripts/dev-server-status.mjs",
59
- "scripts/lib/hs-source-*.mjs",
60
- "scripts/lib/agent-env-markers.mjs",
61
- "!scripts/lib/hs-source-*.test.mjs",
62
- "scripts/lib/standalone-doctor.mjs",
63
- "dev-factory/lib/fleet-readiness.mjs",
64
- "dev-factory/lib/fleet-state.mjs",
65
- "dev-factory/lib/code-repo-root.mjs",
66
- "dev-factory/lib/sufficiency-score.mjs",
67
- "dev-factory/lib/model-catalog.mjs",
68
- "dev-factory/model-catalog.json",
69
- "docs/mcp-client-config.md",
70
- "docs/copilot-plugin-install.md",
71
- "docs/driving-heyspex-from-copilot.md",
72
- "plugins/heyspex/README.md",
73
- "dist/cli/*.mjs",
74
- "dist/cli-templates/**",
75
- "LICENSE",
76
- "scripts/install-claude-code-hooks.mjs",
77
- "scripts/install-cursor-hooks.mjs",
78
- "scripts/install-copilot-hooks.mjs",
79
- "scripts/copilot-statusline.mjs",
80
- "scripts/lib/customer-kit.mjs",
81
- "scripts/lib/copilot-cli.mjs",
82
- "scripts/lib/hook-dispositions.mjs",
83
- "scripts/lib/template-pin.mjs",
84
- "scripts/cursor-hooks/manifest.mjs",
85
- "scripts/dev-server-stop.mjs",
86
- "scripts/wip-ledger-health.mjs",
87
- "scripts/hs-worktree.mjs",
88
- "scripts/lib/hs-worktree-args.mjs",
89
- "dev-factory/lib/worktree-allocator.mjs",
90
- "dev-factory/engine/worktree.mjs",
91
- "scripts/hs-view.mjs",
92
- "scripts/hs-capture-cli.mjs",
93
- "scripts/lib/heyspex-home.mjs",
94
- "scripts/hs-companion.mjs",
95
- "scripts/lib/hs-companion-settings.mjs",
96
- "scripts/hs-next.mjs",
97
- "scripts/hs-mode.mjs",
98
- "scripts/heyspex-mode.mjs",
99
- "scripts/hs-gateway.mjs",
100
- "scripts/hs-settings.mjs",
101
- "scripts/hs-classifier.mjs",
102
- "scripts/hs-auto.mjs",
103
- "scripts/hs-auto-resolve.mjs",
104
- "scripts/hs-auto-source.mjs",
105
- "dev-factory/lib/spec-io.mjs",
106
- "dev-factory/lib/epic-detect.mjs",
107
- "plugins/heyspex/bin/launch-mcp.mjs",
108
- "plugins/heyspex/bin/run-hook.mjs",
109
- "plugins/heyspex/.claude-plugin/plugin.json",
110
- ".claude-plugin/marketplace.json",
111
- "plugins/heyspex/.mcp.json",
112
- "plugins/heyspex/.cursor-plugin/plugin.json",
113
- "plugins/heyspex/mcp.json",
114
- "plugins/heyspex/assets/*",
115
- "plugins/heyspex/hooks/*.json",
116
- "scripts/claude-hooks/*.mjs",
117
- "!scripts/claude-hooks/*.test.mjs",
118
- "!scripts/claude-hooks/*.smoke.mjs",
119
- "!scripts/claude-hooks/*.fixtures.mjs",
120
- "!scripts/claude-hooks/*.measure.mjs",
121
- "scripts/stamp-provenance-on-edit.mjs",
122
- "scripts/provenance-lib.mjs",
123
- "scripts/lib/subagent-git-lock.mjs",
124
- "dev-factory/lib/seat-context.mjs",
125
- "dev-factory/lib/context-budget.mjs",
126
- "dev-factory/lib/fleet-queue.mjs",
127
- "dev-factory/lib/fleet-queue-file.mjs",
128
- "spexharness/src/adapters/*.mjs",
129
- "spexharness/src/gates/capture-workflow-gate.mjs",
130
- "spexharness/src/gates/claim-before-code-gate.decide.mjs",
131
- "spexharness/src/gates/claim-before-code-gate.mjs",
132
- "spexharness/src/gates/directive-obligation-gate.decide.mjs",
133
- "spexharness/src/gates/directive-obligation-gate.mjs",
134
- "spexharness/src/gates/deep-research-cost-gate.mjs",
135
- "spexharness/src/gates/enforce-session-sequence.mjs",
136
- "spexharness/src/gates/enforce-vault-naming.mjs",
137
- "spexharness/src/gates/epic-milestone-phrasing-gate.mjs",
138
- "spexharness/src/gates/diagnose-capture-reminder.mjs",
139
- "spexharness/src/gates/git-identity-guard.decide.mjs",
140
- "spexharness/src/gates/git-identity-guard.mjs",
141
- "spexharness/src/gates/_shell-write-targets.mjs",
142
- "spexharness/src/gates/vault-write-tier-guard.decide.mjs",
143
- "spexharness/src/gates/vault-write-tier-guard.mjs",
144
- "spexharness/src/gates/vault-mirror-catchup.mjs",
145
- "spexharness/src/gates/vault-mirror-catchup.runner.mjs",
146
- "spexharness/src/gates/git-reflog-audit.mjs",
147
- "spexharness/src/gates/git-stash-gate.decide.mjs",
148
- "spexharness/src/gates/git-stash-gate.mjs",
149
- "spexharness/src/gates/id-display-format-gate.mjs",
150
- "spexharness/src/gates/inject-doctrine-gate.mjs",
151
- "spexharness/src/gates/inject-vault-context.mjs",
152
- "spexharness/src/gates/naughty-list-gate.mjs",
153
- "spexharness/src/gates/plan-review-gate.mjs",
154
- "spexharness/src/gates/preflight-reminder-gate.mjs",
155
- "spexharness/src/gates/research-protocol-gate.mjs",
156
- "spexharness/src/gates/settings-write-gate.decide.mjs",
157
- "spexharness/src/gates/settings-write-gate.mjs",
158
- "spexharness/src/profile/*.mjs",
159
- "spexharness/src/doctrine/*.mjs",
160
- "spexharness/doctrine/baseline/SPEXCODE-DOCTRINE.baseline.json",
161
- "spexharness/src/chat/tui/ansi.mjs",
162
- "spexharness/src/chat/tui/palette.mjs",
163
- "spexharness/src/chat/tui/select.mjs",
164
- "spexharness/src/config-root.mjs",
165
- "spexharness/src/context-budget.mjs",
166
- "spexharness/src/dev-server-control.mjs",
167
- "spexharness/src/events.mjs",
168
- "spexharness/src/git-reflog-audit.mjs",
169
- "spexharness/src/intent-classifier.mjs",
170
- "spexharness/src/intent-directive.mjs",
171
- "spexharness/src/redact.mjs",
172
- "spexharness/src/rule-table.mjs",
173
- "spexharness/src/seat-context.mjs",
174
- "spexharness/src/session-bootstrap.mjs",
175
- "spexharness/src/session-record.mjs",
176
- "spexharness/src/token-inventory.mjs",
177
- "!spexharness/**/*.test.mjs"
178
- ],
179
- "dependencies": {
180
- "js-yaml": ">=3.13.0 <5.0.0"
181
- },
182
- "devDependencies": {
183
- "esbuild": "^0.24.2"
184
- },
185
- "scripts": {
186
- "prepack": "node scripts/sync-skills.mjs && node scripts/build-cli-bundle.mjs && node scripts/prepack-closure-gate.mjs",
187
- "build:cli": "node scripts/build-cli-bundle.mjs",
188
- "postinstall": "node bin/postinstall.mjs",
189
- "setup": "node scripts/heyspex-doctor.mjs --fix",
190
- "doctor": "node scripts/heyspex-doctor.mjs",
191
- "heyspex:on": "node scripts/hs-mode.mjs on",
192
- "heyspex:off": "node scripts/hs-mode.mjs off",
193
- "heyspex:status": "node scripts/hs-mode.mjs status",
194
- "commandcode:install": "node scripts/install-commandcode.mjs",
195
- "commandcode:check": "node scripts/install-commandcode.mjs --check",
196
- "commandcode:uninstall": "node scripts/install-commandcode.mjs --uninstall",
197
- "seats:sync": "node scripts/sync-seat-context.mjs",
198
- "seats:check": "node scripts/sync-seat-context.mjs --check",
199
- "skills:sync": "node scripts/sync-skills.mjs",
200
- "skills:check": "node scripts/sync-skills.mjs --check",
201
- "pm:dashboard": "node bin/cli.mjs dashboard",
202
- "pm:control-center": "node bin/cli.mjs control-center",
203
- "pm:parallel-check": "node bin/cli.mjs parallel-check",
204
- "validate:vault-ids": "node scripts/validate-vault-ids.mjs --require-family",
205
- "validate:vault-naming": "node scripts/validate-vault-naming.mjs",
206
- "validate:vault-blockers": "node scripts/validate-vault-blockers.mjs",
207
- "validate:vault-frontmatter": "node scripts/validate-vault-frontmatter.mjs",
208
- "validate:vault-encoding": "node scripts/fix-mojibake.mjs --check",
209
- "fix:vault-encoding": "node scripts/fix-mojibake.mjs --apply",
210
- "validate:review-backlinks": "node scripts/validate-review-backlinks.mjs",
211
- "build:procedure-catalog": "node scripts/build-procedure-catalog.mjs",
212
- "validate:procedure-catalog": "node scripts/build-procedure-catalog.mjs --check",
213
- "build:guardrails": "node scripts/build-guardrails.mjs",
214
- "validate:guardrails": "node scripts/build-guardrails.mjs --check",
215
- "compile:agents": "node scripts/compile-agents.mjs",
216
- "validate:agents": "node scripts/compile-agents.mjs --check",
217
- "build:vault-index": "node scripts/build-vault-index.mjs",
218
- "validate:vault-index": "node scripts/build-vault-index.mjs --check",
219
- "check:retired-names": "node scripts/check-retired-names.mjs",
220
- "check:model-ids": "node scripts/check-model-ids.mjs",
221
- "check:shared-helpers": "node scripts/check-shared-helpers.mjs",
222
- "check:no-process-exit": "node scripts/check-no-process-exit.mjs",
223
- "check:epic-milestone-phrasing": "node scripts/check-epic-milestone-phrasing.mjs",
224
- "smoke:cli-help": "node scripts/smoke-cli-help.mjs",
225
- "commit": "node scripts/human-commit.mjs",
226
- "commit:owner": "node scripts/owner-commit.mjs",
227
- "hooks:install": "node scripts/install-git-hooks.mjs",
228
- "hooks:install-claude": "node scripts/install-claude-code-hooks.mjs",
229
- "hooks:check-claude": "node scripts/install-claude-code-hooks.mjs --check",
230
- "hooks:install-cursor": "node scripts/install-cursor-hooks.mjs",
231
- "hooks:check-cursor": "node scripts/install-cursor-hooks.mjs --check",
232
- "hooks:write-github": "node scripts/lib/customer-kit.mjs --write-github-hooks",
233
- "hooks:check-github": "node scripts/lib/customer-kit.mjs --check-github-hooks",
234
- "hooks:smoke-cursor": "node scripts/cursor-hooks/_run.smoke.mjs",
235
- "companion": "pwsh -NoProfile -ExecutionPolicy Bypass -File companion/start.ps1 -Action start",
236
- "companion:stop": "pwsh -NoProfile -ExecutionPolicy Bypass -File companion/start.ps1 -Action stop",
237
- "companion:status": "pwsh -NoProfile -ExecutionPolicy Bypass -File companion/start.ps1 -Action status",
238
- "spexcompanion": "pwsh -NoProfile -ExecutionPolicy Bypass -File companion/start.ps1 -Action start",
239
- "spexcompanion:stop": "pwsh -NoProfile -ExecutionPolicy Bypass -File companion/start.ps1 -Action stop",
240
- "spexcompanion:status": "pwsh -NoProfile -ExecutionPolicy Bypass -File companion/start.ps1 -Action status",
241
- "console": "npm run dev -w spex-console",
242
- "console:log": "pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/run-console-devlog.ps1",
243
- "console:log:lan": "pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/run-console-devlog.ps1 -Lan",
244
- "console:stop": "node scripts/dev-server-stop.mjs",
245
- "console:status": "node scripts/dev-server-status.mjs",
246
- "//test": "`npm test` is an ALIAS for `test:all` (scripts/run-all-tests.mjs) - the repo-health sweep over all four suites. It is deliberately NOT wired into CI or any git/Claude hook: .github/workflows/ci.yml runs `npm test --workspace spex-console`, which is a different script and is unaffected.",
247
- "test": "npm run test:all",
248
- "test:all": "node scripts/run-all-tests.mjs",
249
- "test:mcp": "node --test vendor/heyspex-mcp/*.test.mjs scripts/lib/*.test.mjs dev-factory/lib/*.test.mjs dev-factory/watch-dev-log.test.mjs",
250
- "test:harness": "node --test spexharness/**/*.test.mjs",
251
- "verify:package": "node scripts/verify-mcp-package.mjs",
252
- "smoke:packed-install": "node scripts/packed-install.smoke.mjs",
253
- "verify:onboarding": "node scripts/verify-onboarding-scenario.mjs --fake",
254
- "sweep": "node scripts/sweep.mjs"
255
- },
256
- "//files": "PUBLISHED SURFACE - every entry is verified by `node scripts/verify-mcp-package.mjs`. It must cover the STATIC import closure of vendor/heyspex-mcp/cli.mjs, plus (since [[HS-LGG2-WW9R-TASK-ship-the-hook-runtime-in-the-npm]]) the customer hook kit: scripts/claude-hooks/_run.mjs, every HOOK_SCOPES customer hook (scripts/lib/customer-kit.mjs) and their static closure under spexharness/src, dev-factory/lib and scripts/ - the hookTargets check names any file that falls out - plus the run-time data files in customer-kit.mjs CUSTOMER_HOOK_DATA (only the baseline edition of SpexCode Doctrine, never the learned spexharness/doctrine/SPEXCODE-DOCTRINE.json; [[HS-A2PO-WW9R-TASK-owner-ruling-does-inject-doctrine-ship]]) - and nothing else. SpexFleet internals (dev-factory/router.mjs, cloud-clients.mjs, cost-tracker.mjs, spexcrawl/) are deliberately absent - research-tools.mjs reaches them through the lazy dev-factory-bridge.mjs. Do not add a path here without re-running the verifier; npm publish is a one-way door ([[HS-ZJSP-0JNK-TASK-ship-the-heyspex-mcp-server-as-an]] / [[HS-8DET-0JNK-TASK-confirm-the-open-core-boundary-and]]). `dist/cli/*.mjs` + `dist/cli-templates/**` are a SEPARATE published surface (`hs-init`, `hs-install`, `hs-claim`, `hs-check`, `hs-env`, `hs-connect`, `hs-join`, `hs-vault`, `hs-workspace`, `hs-defer`, `hs-vault-pull`, `hs-vault-push`, `hs-dev`, `hs-index-rebuild`, `hs-index-reconcile` bundled by `scripts/build-cli-bundle.mjs`'s `ENTRIES` array, regenerated fresh every `prepack` - `dist/` itself stays git-ignored) - see that script's doc comment for the entry scope decision and [[HS-JOQX-0JNK-TASK-published-package-runs-hs-init-and-hs]]."
257
- }
1
+ {
2
+ "name": "heyspex",
3
+ "version": "0.2.6",
4
+ "description": "HeySpex CLI + MCP server — connect Claude Code, Cursor, and any MCP client to your HeySpex spec vault",
5
+ "keywords": [
6
+ "heyspex",
7
+ "mcp",
8
+ "model-context-protocol",
9
+ "claude-code",
10
+ "cursor",
11
+ "spec-driven-development",
12
+ "agents"
13
+ ],
14
+ "type": "module",
15
+ "license": "MIT",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/pwhermanson/workflow-protocol.git"
19
+ },
20
+ "engines": {
21
+ "node": ">=20.0.0 <25.0.0"
22
+ },
23
+ "workspaces": [
24
+ "spex-console",
25
+ "pm-control-center",
26
+ "companion/extension"
27
+ ],
28
+ "bin": {
29
+ "hs": "bin/hs.mjs",
30
+ "heyspex": "bin/hs.mjs",
31
+ "heyspex-mcp": "vendor/heyspex-mcp/cli.mjs",
32
+ "spexcode": "bin/spexcode.mjs"
33
+ },
34
+ "exports": {
35
+ "./package.json": "./package.json",
36
+ "./console-url-resolver": "./scripts/lib/console-url-resolver.mjs"
37
+ },
38
+ "files": [
39
+ "bin/hs.mjs",
40
+ "bin/hs-vault-binding.mjs",
41
+ "vendor/heyspex-mcp/**/*.mjs",
42
+ "!vendor/heyspex-mcp/**/*.test.mjs",
43
+ "vendor/heyspex-mcp/config-seed.yaml",
44
+ "scripts/check-mcp-freshness.mjs",
45
+ "scripts/gateway-skills-lib.mjs",
46
+ "scripts/vault-id-lib.mjs",
47
+ "scripts/lib/console-url-resolver.mjs",
48
+ "scripts/lib/window-placement.mjs",
49
+ "scripts/lib/hs-link.mjs",
50
+ "scripts/lib/hook-vault-header.mjs",
51
+ "scripts/lib/dev-mode.mjs",
52
+ "scripts/lib/directive-obligations.mjs",
53
+ "scripts/lib/hs-command.mjs",
54
+ "scripts/lib/shared-path-helpers.mjs",
55
+ "scripts/claude-statusline/statusline-command.mjs",
56
+ "scripts/claude-statusline/fonts/HeySpexIcons.ttf",
57
+ "scripts/dev-server-status.mjs",
58
+ "scripts/lib/hs-source-*.mjs",
59
+ "scripts/lib/agent-env-markers.mjs",
60
+ "!scripts/lib/hs-source-*.test.mjs",
61
+ "scripts/lib/standalone-doctor.mjs",
62
+ "dev-factory/lib/fleet-readiness.mjs",
63
+ "dev-factory/lib/fleet-state.mjs",
64
+ "dev-factory/lib/code-repo-root.mjs",
65
+ "dev-factory/lib/sufficiency-score.mjs",
66
+ "dev-factory/lib/model-catalog.mjs",
67
+ "dev-factory/model-catalog.json",
68
+ "dev-factory/spexcrawl/spexcrawl-cli.mjs",
69
+ "docs/mcp-client-config.md",
70
+ "docs/copilot-plugin-install.md",
71
+ "docs/driving-heyspex-from-copilot.md",
72
+ "plugins/heyspex/README.md",
73
+ "dist/cli/*.mjs",
74
+ "dist/cli-templates/**",
75
+ "LICENSE",
76
+ "scripts/install-claude-code-hooks.mjs",
77
+ "scripts/install-cursor-hooks.mjs",
78
+ "scripts/install-copilot-hooks.mjs",
79
+ "scripts/copilot-statusline.mjs",
80
+ "scripts/lib/customer-kit.mjs",
81
+ "scripts/lib/copilot-cli.mjs",
82
+ "scripts/lib/hook-dispositions.mjs",
83
+ "scripts/lib/template-pin.mjs",
84
+ "scripts/cursor-hooks/manifest.mjs",
85
+ "scripts/dev-server-stop.mjs",
86
+ "scripts/wip-ledger-health.mjs",
87
+ "scripts/hs-worktree.mjs",
88
+ "scripts/lib/hs-worktree-args.mjs",
89
+ "dev-factory/lib/worktree-allocator.mjs",
90
+ "dev-factory/engine/worktree.mjs",
91
+ "dev-factory/lib/runner-path.mjs",
92
+ "dev-factory/lib/dispatch-guard.mjs",
93
+ "scripts/hs-view.mjs",
94
+ "scripts/hs-capture-cli.mjs",
95
+ "scripts/record-grounding.mjs",
96
+ "scripts/lib/capture-execution-guard.mjs",
97
+ "scripts/lib/heyspex-home.mjs",
98
+ "scripts/hs-companion.mjs",
99
+ "scripts/lib/hs-companion-settings.mjs",
100
+ "scripts/hs-next.mjs",
101
+ "scripts/hs-mode.mjs",
102
+ "scripts/heyspex-mode.mjs",
103
+ "scripts/hs-gateway.mjs",
104
+ "scripts/hs-settings.mjs",
105
+ "scripts/hs-classifier.mjs",
106
+ "scripts/hs-auto.mjs",
107
+ "scripts/hs-auto-resolve.mjs",
108
+ "scripts/hs-auto-source.mjs",
109
+ "dev-factory/lib/spec-io.mjs",
110
+ "dev-factory/lib/epic-detect.mjs",
111
+ "plugins/heyspex/bin/launch-mcp.mjs",
112
+ "plugins/heyspex/bin/run-hook.mjs",
113
+ "plugins/heyspex/.claude-plugin/plugin.json",
114
+ ".claude-plugin/marketplace.json",
115
+ "plugins/heyspex/.mcp.json",
116
+ "plugins/heyspex/.cursor-plugin/plugin.json",
117
+ "plugins/heyspex/mcp.json",
118
+ "plugins/heyspex/assets/*",
119
+ "plugins/heyspex/hooks/*.json",
120
+ "scripts/claude-hooks/*.mjs",
121
+ "!scripts/claude-hooks/*.test.mjs",
122
+ "!scripts/claude-hooks/*.smoke.mjs",
123
+ "!scripts/claude-hooks/*.fixtures.mjs",
124
+ "!scripts/claude-hooks/*.measure.mjs",
125
+ "scripts/stamp-provenance-on-edit.mjs",
126
+ "scripts/provenance-lib.mjs",
127
+ "scripts/lib/subagent-git-lock.mjs",
128
+ "dev-factory/lib/seat-context.mjs",
129
+ "dev-factory/lib/context-budget.mjs",
130
+ "dev-factory/lib/fleet-queue.mjs",
131
+ "dev-factory/lib/fleet-queue-file.mjs",
132
+ "spexharness/src/adapters/*.mjs",
133
+ "spexharness/src/gates/capture-workflow-gate.mjs",
134
+ "spexharness/src/gates/claim-before-code-gate.decide.mjs",
135
+ "spexharness/src/gates/claim-before-code-gate.mjs",
136
+ "spexharness/src/gates/directive-obligation-gate.decide.mjs",
137
+ "spexharness/src/gates/directive-obligation-gate.mjs",
138
+ "spexharness/src/gates/deep-research-cost-gate.mjs",
139
+ "spexharness/src/gates/enforce-session-sequence.mjs",
140
+ "spexharness/src/gates/enforce-vault-naming.mjs",
141
+ "spexharness/src/gates/epic-milestone-phrasing-gate.mjs",
142
+ "spexharness/src/gates/diagnose-capture-reminder.mjs",
143
+ "spexharness/src/gates/git-identity-guard.decide.mjs",
144
+ "spexharness/src/gates/git-identity-guard.mjs",
145
+ "spexharness/src/gates/_shell-write-targets.mjs",
146
+ "spexharness/src/gates/vault-write-tier-guard.decide.mjs",
147
+ "spexharness/src/gates/vault-write-tier-guard.mjs",
148
+ "spexharness/src/gates/vault-mirror-catchup.mjs",
149
+ "spexharness/src/gates/vault-mirror-catchup.runner.mjs",
150
+ "spexharness/src/gates/git-reflog-audit.mjs",
151
+ "spexharness/src/gates/git-stash-gate.decide.mjs",
152
+ "spexharness/src/gates/git-stash-gate.mjs",
153
+ "spexharness/src/gates/id-display-format-gate.mjs",
154
+ "spexharness/src/gates/inject-doctrine-gate.mjs",
155
+ "spexharness/src/gates/inject-vault-context.mjs",
156
+ "spexharness/src/gates/naughty-list-gate.mjs",
157
+ "spexharness/src/gates/plan-review-gate.mjs",
158
+ "spexharness/src/gates/preflight-reminder-gate.mjs",
159
+ "spexharness/src/gates/research-protocol-gate.mjs",
160
+ "spexharness/src/gates/settings-write-gate.decide.mjs",
161
+ "spexharness/src/gates/settings-write-gate.mjs",
162
+ "spexharness/src/profile/*.mjs",
163
+ "spexharness/src/doctrine/*.mjs",
164
+ "spexharness/doctrine/baseline/SPEXCODE-DOCTRINE.baseline.json",
165
+ "spexharness/src/chat/tui/ansi.mjs",
166
+ "spexharness/src/chat/tui/palette.mjs",
167
+ "spexharness/src/chat/tui/select.mjs",
168
+ "spexharness/src/config-root.mjs",
169
+ "spexharness/src/context-budget.mjs",
170
+ "spexharness/src/dev-server-control.mjs",
171
+ "spexharness/src/events.mjs",
172
+ "spexharness/src/git-reflog-audit.mjs",
173
+ "spexharness/src/intent-classifier.mjs",
174
+ "spexharness/src/intent-directive.mjs",
175
+ "spexharness/src/redact.mjs",
176
+ "spexharness/src/rule-table.mjs",
177
+ "spexharness/src/seat-context.mjs",
178
+ "spexharness/src/session-bootstrap.mjs",
179
+ "spexharness/src/session-record.mjs",
180
+ "spexharness/src/token-inventory.mjs",
181
+ "!spexharness/**/*.test.mjs"
182
+ ],
183
+ "dependencies": {
184
+ "js-yaml": ">=3.13.0 <5.0.0"
185
+ },
186
+ "devDependencies": {
187
+ "esbuild": "^0.24.2"
188
+ },
189
+ "scripts": {
190
+ "prepack": "node scripts/sync-skills.mjs && node scripts/build-cli-bundle.mjs && node scripts/prepack-closure-gate.mjs && node scripts/pack-manifest.mjs strip",
191
+ "postpack": "node scripts/pack-manifest.mjs restore",
192
+ "build:cli": "node scripts/build-cli-bundle.mjs",
193
+ "setup": "node scripts/heyspex-doctor.mjs --fix",
194
+ "doctor": "node scripts/heyspex-doctor.mjs",
195
+ "heyspex:on": "node scripts/hs-mode.mjs on",
196
+ "heyspex:off": "node scripts/hs-mode.mjs off",
197
+ "heyspex:status": "node scripts/hs-mode.mjs status",
198
+ "commandcode:install": "node scripts/install-commandcode.mjs",
199
+ "commandcode:check": "node scripts/install-commandcode.mjs --check",
200
+ "commandcode:uninstall": "node scripts/install-commandcode.mjs --uninstall",
201
+ "seats:sync": "node scripts/sync-seat-context.mjs",
202
+ "seats:check": "node scripts/sync-seat-context.mjs --check",
203
+ "skills:sync": "node scripts/sync-skills.mjs",
204
+ "skills:check": "node scripts/sync-skills.mjs --check",
205
+ "pm:dashboard": "node bin/cli.mjs dashboard",
206
+ "pm:control-center": "node bin/cli.mjs control-center",
207
+ "pm:parallel-check": "node bin/cli.mjs parallel-check",
208
+ "validate:vault-ids": "node scripts/validate-vault-ids.mjs --require-family",
209
+ "validate:vault-naming": "node scripts/validate-vault-naming.mjs",
210
+ "validate:vault-blockers": "node scripts/validate-vault-blockers.mjs",
211
+ "validate:vault-frontmatter": "node scripts/validate-vault-frontmatter.mjs",
212
+ "validate:vault-encoding": "node scripts/fix-mojibake.mjs --check",
213
+ "fix:vault-encoding": "node scripts/fix-mojibake.mjs --apply",
214
+ "validate:review-backlinks": "node scripts/validate-review-backlinks.mjs",
215
+ "build:procedure-catalog": "node scripts/build-procedure-catalog.mjs",
216
+ "validate:procedure-catalog": "node scripts/build-procedure-catalog.mjs --check",
217
+ "build:guardrails": "node scripts/build-guardrails.mjs",
218
+ "validate:guardrails": "node scripts/build-guardrails.mjs --check",
219
+ "compile:agents": "node scripts/compile-agents.mjs",
220
+ "validate:agents": "node scripts/compile-agents.mjs --check",
221
+ "build:vault-index": "node scripts/build-vault-index.mjs",
222
+ "validate:vault-index": "node scripts/build-vault-index.mjs --check",
223
+ "check:retired-names": "node scripts/check-retired-names.mjs",
224
+ "check:model-ids": "node scripts/check-model-ids.mjs",
225
+ "check:shared-helpers": "node scripts/check-shared-helpers.mjs",
226
+ "check:no-process-exit": "node scripts/check-no-process-exit.mjs",
227
+ "check:epic-milestone-phrasing": "node scripts/check-epic-milestone-phrasing.mjs",
228
+ "smoke:cli-help": "node scripts/smoke-cli-help.mjs",
229
+ "commit": "node scripts/human-commit.mjs",
230
+ "commit:owner": "node scripts/owner-commit.mjs",
231
+ "hooks:install": "node scripts/install-git-hooks.mjs",
232
+ "hooks:install-claude": "node scripts/install-claude-code-hooks.mjs",
233
+ "hooks:check-claude": "node scripts/install-claude-code-hooks.mjs --check",
234
+ "hooks:install-cursor": "node scripts/install-cursor-hooks.mjs",
235
+ "hooks:check-cursor": "node scripts/install-cursor-hooks.mjs --check",
236
+ "hooks:write-github": "node scripts/lib/customer-kit.mjs --write-github-hooks",
237
+ "hooks:check-github": "node scripts/lib/customer-kit.mjs --check-github-hooks",
238
+ "hooks:smoke-cursor": "node scripts/cursor-hooks/_run.smoke.mjs",
239
+ "companion": "pwsh -NoProfile -ExecutionPolicy Bypass -File companion/start.ps1 -Action start",
240
+ "companion:stop": "pwsh -NoProfile -ExecutionPolicy Bypass -File companion/start.ps1 -Action stop",
241
+ "companion:status": "pwsh -NoProfile -ExecutionPolicy Bypass -File companion/start.ps1 -Action status",
242
+ "spexcompanion": "pwsh -NoProfile -ExecutionPolicy Bypass -File companion/start.ps1 -Action start",
243
+ "spexcompanion:stop": "pwsh -NoProfile -ExecutionPolicy Bypass -File companion/start.ps1 -Action stop",
244
+ "spexcompanion:status": "pwsh -NoProfile -ExecutionPolicy Bypass -File companion/start.ps1 -Action status",
245
+ "console": "npm run dev -w spex-console",
246
+ "console:log": "pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/run-console-devlog.ps1",
247
+ "console:log:lan": "pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/run-console-devlog.ps1 -Lan",
248
+ "console:stop": "node scripts/dev-server-stop.mjs",
249
+ "console:status": "node scripts/dev-server-status.mjs",
250
+ "//test": "`npm test` is an ALIAS for `test:all` (scripts/run-all-tests.mjs) - the repo-health sweep over all four suites. It is deliberately NOT wired into CI or any git/Claude hook: .github/workflows/ci.yml runs `npm test --workspace spex-console`, which is a different script and is unaffected.",
251
+ "test": "npm run test:all",
252
+ "test:all": "node scripts/run-all-tests.mjs",
253
+ "test:mcp": "node --test vendor/heyspex-mcp/*.test.mjs scripts/lib/*.test.mjs dev-factory/lib/*.test.mjs dev-factory/watch-dev-log.test.mjs",
254
+ "test:harness": "node --test spexharness/**/*.test.mjs",
255
+ "verify:package": "node scripts/verify-mcp-package.mjs",
256
+ "smoke:packed-install": "node scripts/packed-install.smoke.mjs",
257
+ "verify:onboarding": "node scripts/verify-onboarding-scenario.mjs --fake",
258
+ "sweep": "node scripts/sweep.mjs"
259
+ },
260
+ "//files": "PUBLISHED SURFACE - every entry is verified by `node scripts/verify-mcp-package.mjs`. It must cover the STATIC import closure of vendor/heyspex-mcp/cli.mjs, plus (since [[HS-LGG2-WW9R-TASK-ship-the-hook-runtime-in-the-npm]]) the customer hook kit: scripts/claude-hooks/_run.mjs, every HOOK_SCOPES customer hook (scripts/lib/customer-kit.mjs) and their static closure under spexharness/src, dev-factory/lib and scripts/ - the hookTargets check names any file that falls out - plus the run-time data files in customer-kit.mjs CUSTOMER_HOOK_DATA (only the baseline edition of SpexCode Doctrine, never the learned spexharness/doctrine/SPEXCODE-DOCTRINE.json; [[HS-A2PO-WW9R-TASK-owner-ruling-does-inject-doctrine-ship]]) - and nothing else. SpexFleet internals (dev-factory/router.mjs, cloud-clients.mjs, cost-tracker.mjs, spexcrawl/) are deliberately absent - research-tools.mjs reaches them through the lazy dev-factory-bridge.mjs. Do not add a path here without re-running the verifier; npm publish is a one-way door ([[HS-ZJSP-0JNK-TASK-ship-the-heyspex-mcp-server-as-an]] / [[HS-8DET-0JNK-TASK-confirm-the-open-core-boundary-and]]). `dist/cli/*.mjs` + `dist/cli-templates/**` are a SEPARATE published surface (`hs-init`, `hs-install`, `hs-claim`, `hs-check`, `hs-env`, `hs-connect`, `hs-join`, `hs-vault`, `hs-workspace`, `hs-defer`, `hs-vault-pull`, `hs-vault-push`, `hs-dev`, `hs-index-rebuild`, `hs-index-reconcile`, `hs-handoff`, `hs-pin`, `hs-events`, `hs-export-events`, `hs-prereq`, `hs-trash`, `hs-trust`, `hs-next-launch`, `hs-revalidate`, `hs-test`, `hs-spawn` bundled by `scripts/build-cli-bundle.mjs`'s `ENTRIES` array, regenerated fresh every `prepack` - `dist/` itself stays git-ignored) - see that script's doc comment for the entry scope decision and [[HS-JOQX-0JNK-TASK-published-package-runs-hs-init-and-hs]]."
261
+ }
@@ -2,7 +2,7 @@
2
2
  "name": "heyspex",
3
3
  "displayName": "HeySpex",
4
4
  "icon": "./assets/heyspex-glyph-256.png",
5
- "description": "HeySpex vault integration for Claude Code and GitHub Copilot CLI (Claude-format plugin, installed from the same marketplace): MCP server (spec vault tools + hs-* prompts) and lifecycle hooks. Prototype packaging per HS-QTBK — additive; the project-level .mcp.json/settings.json wiring remains the live source of truth until cutover.",
5
+ "description": "SpexCode plugin (for Claude Code), also loaded by GitHub Copilot CLI (Claude-format plugin, installed from the same marketplace): HeySpex vault integration — MCP server (spec vault tools + hs-* prompts) and lifecycle hooks. Prototype packaging per HS-QTBK — additive; the project-level .mcp.json/settings.json wiring remains the live source of truth until cutover.",
6
6
  "author": {
7
7
  "name": "pwher",
8
8
  "email": "paul@monstergrowth.com"
@@ -3,7 +3,7 @@
3
3
  "displayName": "HeySpex",
4
4
  "version": "0.1.0",
5
5
  "logo": "assets/heyspex-glyph.svg",
6
- "description": "HeySpex vault integration for Cursor: MCP server (spec vault tools + hs-* workflows) and the full lifecycle hook set. Prototype packaging — additive; the project-level .cursor/mcp.json and .cursor/hooks.json wiring remains the live source of truth until cutover.",
6
+ "description": "Cursor build of the SpexCode plugin (for Claude Code): HeySpex vault integration for Cursor — MCP server (spec vault tools + hs-* workflows) and the full lifecycle hook set. Prototype packaging — additive; the project-level .cursor/mcp.json and .cursor/hooks.json wiring remains the live source of truth until cutover.",
7
7
  "author": {
8
8
  "name": "pwher",
9
9
  "email": "paul@monstergrowth.com"
@@ -49,6 +49,7 @@ import fs from 'node:fs';
49
49
  import path from 'node:path';
50
50
  import { fileURLToPath } from 'node:url';
51
51
  import { getActiveConfig, isResolvedVault } from '../../vendor/heyspex-mcp/vault-resolve.mjs';
52
+ import { parseSpecId } from '../../vendor/heyspex-mcp/spec-id-lib.mjs';
52
53
  import { hookVaultHeaders } from '../lib/hook-vault-header.mjs';
53
54
  import { resolveConsoleUrl as resolveConsoleUrlShared } from '../lib/console-url-resolver.mjs';
54
55
  import { readCredentialsMcpToken, resolveDevMode } from '../lib/dev-mode.mjs';
@@ -105,9 +106,23 @@ function ledgerRoots() {
105
106
  // HS-EPIC-BUD-PROTECT under vault id `vault-test`). Real ids are server-minted
106
107
  // file keys; a SessionStart preview must never present one of these as the
107
108
  // prior session's hand-off.
108
- const FIXTURE_ID_RE = /^HS-EPIC-(?:FILLER-\d+|OLD\d+|BUD-[A-Z0-9-]+|CLAIMED-BUD|TRIGGER(?:-[A-Z0-9-]+)?)$/;
109
+ // Parsed through the sanctioned id parser (spec-id-lib parseSpecId), never a
110
+ // hand-rolled type-first regex ([[HS-MIL-KY1F]]): only legacy type-first EPIC
111
+ // ids whose family token is one of the known fixture families qualify.
112
+ const FIXTURE_EPIC_FAMILIES = {
113
+ FILLER: (slug) => /^\d+$/.test(slug), // HS-EPIC-FILLER-07
114
+ BUD: (slug) => slug !== '', // HS-EPIC-BUD-PROTECT
115
+ CLAIMED: (slug) => slug === 'BUD', // HS-EPIC-CLAIMED-BUD
116
+ TRIGGER: () => true, // HS-EPIC-TRIGGER, HS-EPIC-TRIGGER-X
117
+ };
109
118
  function isFixtureLedgerEntry(epicId) {
110
- return typeof epicId === 'string' && FIXTURE_ID_RE.test(epicId);
119
+ if (typeof epicId !== 'string') return false;
120
+ const parsed = parseSpecId(epicId);
121
+ if (!parsed || parsed.ordering !== 'type-first' || parsed.typeLabel !== 'EPIC') return false;
122
+ const { familyKey, titleSlug } = parsed;
123
+ if (/^OLD\d+$/.test(familyKey)) return titleSlug === ''; // HS-EPIC-OLD34
124
+ const rule = FIXTURE_EPIC_FAMILIES[familyKey];
125
+ return rule ? rule(titleSlug) : false;
111
126
  }
112
127
 
113
128
  async function readStdinJson() {