@launchsecure/launch-kit 0.0.29 → 0.0.30
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/dist/beacon/beacon.mjs +2759 -1246
- package/dist/beacon/beacon.mjs.map +1 -1
- package/dist/beacon/beacon.umd.js +710 -95
- package/dist/beacon/beacon.umd.js.map +1 -1
- package/dist/beacon/types/core.d.ts +14 -0
- package/dist/beacon/types/core.d.ts.map +1 -0
- package/dist/beacon/types/ctx.d.ts +14 -0
- package/dist/beacon/types/ctx.d.ts.map +1 -0
- package/dist/beacon/types/element.d.ts +16 -48
- package/dist/beacon/types/element.d.ts.map +1 -1
- package/dist/beacon/types/index.d.ts +5 -4
- package/dist/beacon/types/index.d.ts.map +1 -1
- package/dist/beacon/types/internal/annotation-cache.d.ts +10 -0
- package/dist/beacon/types/internal/annotation-cache.d.ts.map +1 -0
- package/dist/beacon/types/internal/element-capture.d.ts +19 -0
- package/dist/beacon/types/internal/element-capture.d.ts.map +1 -0
- package/dist/beacon/types/internal/event-buffer.d.ts +16 -0
- package/dist/beacon/types/internal/event-buffer.d.ts.map +1 -0
- package/dist/beacon/types/internal/framework-detect.d.ts +6 -0
- package/dist/beacon/types/internal/framework-detect.d.ts.map +1 -0
- package/dist/beacon/types/internal/markers.d.ts +17 -0
- package/dist/beacon/types/internal/markers.d.ts.map +1 -0
- package/dist/beacon/types/internal/monitor/capture-dom.d.ts +14 -0
- package/dist/beacon/types/internal/monitor/capture-dom.d.ts.map +1 -0
- package/dist/beacon/types/internal/monitor/capture-network.d.ts +12 -0
- package/dist/beacon/types/internal/monitor/capture-network.d.ts.map +1 -0
- package/dist/beacon/types/internal/monitor/overlay.d.ts +16 -0
- package/dist/beacon/types/internal/monitor/overlay.d.ts.map +1 -0
- package/dist/beacon/types/internal/monitor/session.d.ts +41 -0
- package/dist/beacon/types/internal/monitor/session.d.ts.map +1 -0
- package/dist/beacon/types/{monitor → internal/monitor}/transport.d.ts +3 -3
- package/dist/beacon/types/internal/monitor/transport.d.ts.map +1 -0
- package/dist/beacon/types/{monitor/types.d.ts → internal/monitor/wire.d.ts} +69 -27
- package/dist/beacon/types/internal/monitor/wire.d.ts.map +1 -0
- package/dist/beacon/types/{ui → internal}/pick-mode-overlay.d.ts +4 -5
- package/dist/beacon/types/internal/pick-mode-overlay.d.ts.map +1 -0
- package/dist/beacon/types/{capture → internal}/picker.d.ts +0 -1
- package/dist/beacon/types/internal/picker.d.ts.map +1 -0
- package/dist/beacon/types/{ui → internal}/pin-popover.d.ts +1 -1
- package/dist/beacon/types/internal/pin-popover.d.ts.map +1 -0
- package/dist/beacon/types/{capture → internal}/screenshot.d.ts +1 -0
- package/dist/beacon/types/internal/screenshot.d.ts.map +1 -0
- package/dist/beacon/types/internal/selector.d.ts.map +1 -0
- package/dist/beacon/types/plugins/domEle.d.ts +14 -0
- package/dist/beacon/types/plugins/domEle.d.ts.map +1 -0
- package/dist/beacon/types/plugins/domSS.d.ts +8 -0
- package/dist/beacon/types/plugins/domSS.d.ts.map +1 -0
- package/dist/beacon/types/plugins/errors.d.ts +3 -0
- package/dist/beacon/types/plugins/errors.d.ts.map +1 -0
- package/dist/beacon/types/plugins/index.d.ts +8 -0
- package/dist/beacon/types/plugins/index.d.ts.map +1 -0
- package/dist/beacon/types/plugins/liveMonitor.d.ts +14 -0
- package/dist/beacon/types/plugins/liveMonitor.d.ts.map +1 -0
- package/dist/beacon/types/plugins/metadata.d.ts +3 -0
- package/dist/beacon/types/plugins/metadata.d.ts.map +1 -0
- package/dist/beacon/types/registry.d.ts +33 -0
- package/dist/beacon/types/registry.d.ts.map +1 -0
- package/dist/beacon/types/styles.d.ts +8 -0
- package/dist/beacon/types/styles.d.ts.map +1 -0
- package/dist/beacon/types/transport.d.ts +3 -0
- package/dist/beacon/types/transport.d.ts.map +1 -0
- package/dist/beacon/types/types.d.ts +152 -68
- package/dist/beacon/types/types.d.ts.map +1 -1
- package/dist/beacon/types/ui/dialog.d.ts +53 -0
- package/dist/beacon/types/ui/dialog.d.ts.map +1 -0
- package/dist/beacon/types/ui/form.d.ts +7 -0
- package/dist/beacon/types/ui/form.d.ts.map +1 -0
- package/dist/beacon/types/ui/overlay.d.ts +6 -0
- package/dist/beacon/types/ui/overlay.d.ts.map +1 -0
- package/dist/deck-client/assets/{_baseUniq-W2JQDmje.js → _baseUniq-DCt2IMRR.js} +1 -1
- package/dist/deck-client/assets/{arc-DIBWAId9.js → arc-h-ifqmNR.js} +1 -1
- package/dist/deck-client/assets/{architectureDiagram-Q4EWVU46-CAIRMvJK.js → architectureDiagram-Q4EWVU46-C9dITSPv.js} +1 -1
- package/dist/deck-client/assets/{blockDiagram-DXYQGD6D-BeNaNiOi.js → blockDiagram-DXYQGD6D-BHuJT34t.js} +1 -1
- package/dist/deck-client/assets/{c4Diagram-AHTNJAMY-B9Ozi62h.js → c4Diagram-AHTNJAMY-CpvMGtDG.js} +1 -1
- package/dist/deck-client/assets/channel-2PZVMiXf.js +1 -0
- package/dist/deck-client/assets/{chunk-4BX2VUAB-D7AZ47dt.js → chunk-4BX2VUAB-B6md1VIm.js} +1 -1
- package/dist/deck-client/assets/{chunk-4TB4RGXK-DnVnNPcI.js → chunk-4TB4RGXK-BmEnX8ik.js} +1 -1
- package/dist/deck-client/assets/{chunk-55IACEB6-UKYs-YNd.js → chunk-55IACEB6-BZPUyZAZ.js} +1 -1
- package/dist/deck-client/assets/{chunk-EDXVE4YY-D43b-SKn.js → chunk-EDXVE4YY-BWwNUK-l.js} +1 -1
- package/dist/deck-client/assets/{chunk-FMBD7UC4-QzBAoyyW.js → chunk-FMBD7UC4-o7gSppGI.js} +1 -1
- package/dist/deck-client/assets/{chunk-OYMX7WX6-Cjif4r6W.js → chunk-OYMX7WX6-C4KoTL5p.js} +1 -1
- package/dist/deck-client/assets/{chunk-QZHKN3VN-CqLDirEI.js → chunk-QZHKN3VN-jkf68sDs.js} +1 -1
- package/dist/deck-client/assets/{chunk-YZCP3GAM-_FQvmMs4.js → chunk-YZCP3GAM-Cd4yBE7o.js} +1 -1
- package/dist/deck-client/assets/classDiagram-6PBFFD2Q-Bt8xBAof.js +1 -0
- package/dist/deck-client/assets/classDiagram-v2-HSJHXN6E-Bt8xBAof.js +1 -0
- package/dist/deck-client/assets/clone-BHQryoDl.js +1 -0
- package/dist/deck-client/assets/{cose-bilkent-S5V4N54A-rfrocesE.js → cose-bilkent-S5V4N54A-DeGFUgAV.js} +1 -1
- package/dist/deck-client/assets/{dagre-KV5264BT-Bv_7DJat.js → dagre-KV5264BT-ekcYJuUV.js} +1 -1
- package/dist/deck-client/assets/{diagram-5BDNPKRD-4F1414G5.js → diagram-5BDNPKRD-YHPk4rV2.js} +1 -1
- package/dist/deck-client/assets/{diagram-G4DWMVQ6-C4-Pszqm.js → diagram-G4DWMVQ6-DM-JCd_B.js} +1 -1
- package/dist/deck-client/assets/{diagram-MMDJMWI5-B647TIx9.js → diagram-MMDJMWI5-l5FK1ybk.js} +1 -1
- package/dist/deck-client/assets/{diagram-TYMM5635-BFAqpezd.js → diagram-TYMM5635-CIN4_1-j.js} +1 -1
- package/dist/deck-client/assets/{erDiagram-SMLLAGMA-BfBfrJOC.js → erDiagram-SMLLAGMA-MyinSkEl.js} +1 -1
- package/dist/deck-client/assets/{flowDiagram-DWJPFMVM-DX9YAYes.js → flowDiagram-DWJPFMVM-Dk8nn42x.js} +1 -1
- package/dist/deck-client/assets/{ganttDiagram-T4ZO3ILL-DCuiy7wF.js → ganttDiagram-T4ZO3ILL-BU1ihicu.js} +1 -1
- package/dist/deck-client/assets/{gitGraphDiagram-UUTBAWPF-CGp1IXUh.js → gitGraphDiagram-UUTBAWPF-BjsTL13C.js} +1 -1
- package/dist/deck-client/assets/{graph-B7g8aoxv.js → graph-DJmh-xi7.js} +1 -1
- package/dist/deck-client/assets/{index-Dg1r-WSN.js → index-KsShfCV-.js} +3 -3
- package/dist/deck-client/assets/{infoDiagram-42DDH7IO-L3fahMkF.js → infoDiagram-42DDH7IO-Dxvy_RB4.js} +1 -1
- package/dist/deck-client/assets/{ishikawaDiagram-UXIWVN3A-aS_EjWBZ.js → ishikawaDiagram-UXIWVN3A-DPOaNF1l.js} +1 -1
- package/dist/deck-client/assets/{journeyDiagram-VCZTEJTY-djTSQZF9.js → journeyDiagram-VCZTEJTY-DMew3K5c.js} +1 -1
- package/dist/deck-client/assets/{kanban-definition-6JOO6SKY-CcTHo4CM.js → kanban-definition-6JOO6SKY-csciJFuk.js} +1 -1
- package/dist/deck-client/assets/{layout-mEJiadb7.js → layout-Dg4yyms2.js} +1 -1
- package/dist/deck-client/assets/{linear-XgTKqyRu.js → linear-BA3zU6gq.js} +1 -1
- package/dist/deck-client/assets/{min-Ct9jZdpd.js → min-lz-Ird-p.js} +1 -1
- package/dist/deck-client/assets/{mindmap-definition-QFDTVHPH-BaFxCGNU.js → mindmap-definition-QFDTVHPH-CCEN8OQV.js} +1 -1
- package/dist/deck-client/assets/{pieDiagram-DEJITSTG-CIbYYjtw.js → pieDiagram-DEJITSTG-DM6n1HY7.js} +1 -1
- package/dist/deck-client/assets/{quadrantDiagram-34T5L4WZ-D9EtCOvh.js → quadrantDiagram-34T5L4WZ-_ULoR66n.js} +1 -1
- package/dist/deck-client/assets/{requirementDiagram-MS252O5E-xeni9eVG.js → requirementDiagram-MS252O5E-BuwJs7Tn.js} +1 -1
- package/dist/deck-client/assets/{sankeyDiagram-XADWPNL6-LYeknz9h.js → sankeyDiagram-XADWPNL6-BEsuzkW4.js} +1 -1
- package/dist/deck-client/assets/{sequenceDiagram-FGHM5R23-RDbsKFZf.js → sequenceDiagram-FGHM5R23-CP2H0YWf.js} +1 -1
- package/dist/deck-client/assets/{stateDiagram-FHFEXIEX-BH1Zjglk.js → stateDiagram-FHFEXIEX-B5Gw_NNL.js} +1 -1
- package/dist/deck-client/assets/stateDiagram-v2-QKLJ7IA2-4T4wMDXr.js +1 -0
- package/dist/deck-client/assets/{timeline-definition-GMOUNBTQ-IFXxKptt.js → timeline-definition-GMOUNBTQ-DsoYydQa.js} +1 -1
- package/dist/deck-client/assets/{vennDiagram-DHZGUBPP-D-sLkQs9.js → vennDiagram-DHZGUBPP-Dz8JT_ob.js} +1 -1
- package/dist/deck-client/assets/wardley-RL74JXVD-DGHQ_Ijv.js +162 -0
- package/dist/deck-client/assets/{wardleyDiagram-NUSXRM2D-BTjjuDU3.js → wardleyDiagram-NUSXRM2D-DN1LJMB1.js} +1 -1
- package/dist/deck-client/assets/{xychartDiagram-5P7HB3ND-AYbv92n-.js → xychartDiagram-5P7HB3ND-nb0oSfrQ.js} +1 -1
- package/dist/deck-client/index.html +1 -1
- package/dist/server/beacon-monitor-entry.js +548 -6
- package/dist/server/chart-serve.js +917 -248
- package/dist/server/cli.js +1368 -374
- package/dist/server/council-entry.js +0 -0
- package/dist/server/fb-wizard.js +0 -0
- package/dist/server/graph-mcp-entry.js +1326 -322
- package/dist/server/init-entry.js +16 -11
- package/dist/server/orbit-entry.js +135 -7
- package/dist/server/parse-worker-entry.js +918 -247
- package/package.json +22 -22
- package/scaffolds/ls-marketplace/plugins/kit/skills/beacon-array.md +107 -0
- package/scaffolds/ls-marketplace/plugins/kit/skills/beacon-clear.md +94 -0
- package/scaffolds/ls-marketplace/plugins/kit/skills/beacon-pulse.md +82 -0
- package/scaffolds/ls-marketplace/plugins/kit/skills/beacon-scan.md +66 -0
- package/scaffolds/ls-marketplace/plugins/kit/skills/blast-radius.md +101 -0
- package/scaffolds/ls-marketplace/plugins/kit/skills/brief.md +112 -0
- package/scaffolds/ls-marketplace/plugins/kit/skills/course.md +84 -0
- package/scaffolds/ls-marketplace/plugins/kit/skills/debug.md +92 -0
- package/scaffolds/ls-marketplace/plugins/kit/skills/deploy-check.md +160 -0
- package/scaffolds/ls-marketplace/plugins/kit/skills/diagram.md +134 -0
- package/scaffolds/ls-marketplace/plugins/kit/skills/orbit.md +87 -0
- package/scaffolds/ls-marketplace/plugins/kit/skills/prototype.md +90 -0
- package/scaffolds/ls-marketplace/plugins/kit/skills/recall.md +83 -0
- package/scaffolds/ls-marketplace/plugins/kit/{commands → skills}/show-mcp-status.md +4 -4
- package/scaffolds/ls-marketplace/plugins/kit/skills/wireframe.md +70 -0
- package/scaffolds/migrate-safety/scripts/migrate-with-backup.sh +0 -0
- package/scaffolds/recall-hook/scripts/ensure-recall.sh +0 -0
- package/scaffolds/statusline/statusline-mcp.sh +21 -9
- package/dist/beacon/types/capture/element.d.ts +0 -3
- package/dist/beacon/types/capture/element.d.ts.map +0 -1
- package/dist/beacon/types/capture/events.d.ts +0 -20
- package/dist/beacon/types/capture/events.d.ts.map +0 -1
- package/dist/beacon/types/capture/framework.d.ts +0 -3
- package/dist/beacon/types/capture/framework.d.ts.map +0 -1
- package/dist/beacon/types/capture/metadata.d.ts +0 -3
- package/dist/beacon/types/capture/metadata.d.ts.map +0 -1
- package/dist/beacon/types/capture/overlay.d.ts +0 -7
- package/dist/beacon/types/capture/overlay.d.ts.map +0 -1
- package/dist/beacon/types/capture/picker.d.ts.map +0 -1
- package/dist/beacon/types/capture/screenshot.d.ts.map +0 -1
- package/dist/beacon/types/capture/selector.d.ts.map +0 -1
- package/dist/beacon/types/monitor/dom.d.ts +0 -13
- package/dist/beacon/types/monitor/dom.d.ts.map +0 -1
- package/dist/beacon/types/monitor/index.d.ts +0 -19
- package/dist/beacon/types/monitor/index.d.ts.map +0 -1
- package/dist/beacon/types/monitor/network.d.ts +0 -12
- package/dist/beacon/types/monitor/network.d.ts.map +0 -1
- package/dist/beacon/types/monitor/transport.d.ts.map +0 -1
- package/dist/beacon/types/monitor/types.d.ts.map +0 -1
- package/dist/beacon/types/transport/submit.d.ts +0 -3
- package/dist/beacon/types/transport/submit.d.ts.map +0 -1
- package/dist/beacon/types/ui/button.d.ts +0 -2
- package/dist/beacon/types/ui/button.d.ts.map +0 -1
- package/dist/beacon/types/ui/drawer.d.ts +0 -33
- package/dist/beacon/types/ui/drawer.d.ts.map +0 -1
- package/dist/beacon/types/ui/icons.d.ts +0 -9
- package/dist/beacon/types/ui/icons.d.ts.map +0 -1
- package/dist/beacon/types/ui/monitor-panel.d.ts +0 -19
- package/dist/beacon/types/ui/monitor-panel.d.ts.map +0 -1
- package/dist/beacon/types/ui/pick-mode-overlay.d.ts.map +0 -1
- package/dist/beacon/types/ui/pin-popover.d.ts.map +0 -1
- package/dist/deck-client/assets/channel-CRdozqbp.js +0 -1
- package/dist/deck-client/assets/classDiagram-6PBFFD2Q-lIZMp57W.js +0 -1
- package/dist/deck-client/assets/classDiagram-v2-HSJHXN6E-lIZMp57W.js +0 -1
- package/dist/deck-client/assets/clone-BtWeSTyJ.js +0 -1
- package/dist/deck-client/assets/stateDiagram-v2-QKLJ7IA2-BrV78NDR.js +0 -1
- package/dist/deck-client/assets/wardley-RL74JXVD-C010F8l4.js +0 -162
- package/scaffolds/ls-marketplace/plugins/kit/commands/beacon-array.md +0 -92
- package/scaffolds/ls-marketplace/plugins/kit/commands/beacon-clear.md +0 -68
- package/scaffolds/ls-marketplace/plugins/kit/commands/beacon-pulse.md +0 -80
- package/scaffolds/ls-marketplace/plugins/kit/commands/beacon-scan.md +0 -62
- /package/dist/beacon/types/{capture → internal}/selector.d.ts +0 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Show the currently active LaunchSecure course (server profile) and list the others available in .launch-secure.cred.config. Surfaces which serverUrl/org/project this Claude session is talking to so the user doesn't post local LS comms to prod, or vice versa. Read-only by default; switch is opt-in.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /kit:course
|
|
6
|
+
|
|
7
|
+
A "course" is a named LaunchSecure destination — `serverUrl + PAT + orgSlug + projectSlug` — stored under `profiles` in `.launch-secure.cred.config`. The active course drives every MCP call and every `npx launch-pod` invocation. This skill answers two questions: *which course am I on right now*, and *what others are available* — without changing anything unless explicitly told to.
|
|
8
|
+
|
|
9
|
+
Parse `$ARGUMENTS` — first token is the subcommand:
|
|
10
|
+
|
|
11
|
+
- (empty) or **status** — one-line: which course is active.
|
|
12
|
+
- **list** — table of every course, active marked with `★`.
|
|
13
|
+
- **switch <name>** — change the active course (rewrites `.launch-secure.cred.config` AND `.mcp.json`'s launch-secure URL). Asks for confirmation.
|
|
14
|
+
- **diff** — show the deltas between two courses (`--a=<name> --b=<name>`).
|
|
15
|
+
|
|
16
|
+
Examples:
|
|
17
|
+
- `/kit:course` → "active: prod (acme/launchsecure-v2 @ launchsecure-v2.vercel.app)"
|
|
18
|
+
- `/kit:course list` → table
|
|
19
|
+
- `/kit:course switch local`
|
|
20
|
+
- `/kit:course diff --a=local --b=prod`
|
|
21
|
+
|
|
22
|
+
## Preflight
|
|
23
|
+
|
|
24
|
+
Confirm `.launch-secure.cred.config` exists in the cwd (or in the nearest parent up to 3 levels — `cred-shape.ts`'s lookup convention). If missing, tell the user: `"No .launch-secure.cred.config here. Run \`npx @launchsecure/launch-kit init\` first."`
|
|
25
|
+
|
|
26
|
+
Read the cred file directly (it's gitignored, lives at the repo root, JSON shape with `active` + `profiles`). Never call out to launch-course CLI from inside the skill for read operations — read the file. Use `launch-course` (Bash) only for `switch` (it owns the MCP rewrite invariant).
|
|
27
|
+
|
|
28
|
+
## Per-subcommand behavior
|
|
29
|
+
|
|
30
|
+
### status (default)
|
|
31
|
+
|
|
32
|
+
Read the cred file. Print one line:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
active: <name> (<orgSlug>/<projectSlug> @ <serverUrl>)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
If the file is in legacy flat shape (single profile at the top), say so explicitly: `"active: (legacy single-profile shape — no name; first multi-profile op auto-migrates)"`.
|
|
39
|
+
|
|
40
|
+
### list
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
courses (3):
|
|
44
|
+
name serverUrl org/project
|
|
45
|
+
★ prod https://launchsecure-v2.vercel.app acme/launchsecure-v2
|
|
46
|
+
staging https://staging.launchsecure-v2.app acme/launchsecure-v2
|
|
47
|
+
local http://localhost:3000 acme/launchsecure-v2
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Sort: active first, then alphabetical. Column-align with monospace.
|
|
51
|
+
|
|
52
|
+
### switch
|
|
53
|
+
|
|
54
|
+
1. Sanity-check `<name>` exists in `profiles`. If not, list available names and stop.
|
|
55
|
+
2. Print the BEFORE → AFTER one-liner:
|
|
56
|
+
```
|
|
57
|
+
switching: prod (acme/launchsecure-v2 @ launchsecure-v2.vercel.app)
|
|
58
|
+
→ local (acme/launchsecure-v2 @ localhost:3000)
|
|
59
|
+
```
|
|
60
|
+
3. Ask: `"Continue? (yes / no)"` — wait for `yes`. Per project memory, destructive/sticky changes require explicit confirmation.
|
|
61
|
+
4. On `yes`, run `npx launch-course set <name>` via Bash. This rewrites both `.launch-secure.cred.config` (active pointer) AND `.mcp.json` (the launch-secure URL). Surface the CLI output verbatim.
|
|
62
|
+
5. After switch, remind: `"Restart Claude Code to pick up the new MCP URL (or use \`/mcp reload\` if available)."`
|
|
63
|
+
|
|
64
|
+
### diff
|
|
65
|
+
|
|
66
|
+
Resolve `--a` and `--b` from `profiles`. Print a compact diff:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
local → prod
|
|
70
|
+
serverUrl http://localhost:3000 → https://launchsecure-v2.vercel.app
|
|
71
|
+
org acme → acme
|
|
72
|
+
project launchsecure-v2 → launchsecure-v2
|
|
73
|
+
pat sha256:abc1…ef → sha256:def0…12
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
PAT values are hashed (sha256 first 8 of each, last 2 — purely for the user to confirm they differ; never print full PATs). Same row for unchanged values.
|
|
77
|
+
|
|
78
|
+
## Constraints
|
|
79
|
+
|
|
80
|
+
- **Read-only by default.** Only `switch` writes; status/list/diff never mutate.
|
|
81
|
+
- **Switch requires confirmation.** Per project memory, never destructive without `yes`.
|
|
82
|
+
- **No PAT exfiltration.** Never print the full PAT value; show short hashes for diff identification only.
|
|
83
|
+
- **Don't bypass launch-course CLI.** The `switch` MCP-rewrite logic is its responsibility — call the CLI; don't reimplement the .mcp.json mutation inside the skill (drift risk).
|
|
84
|
+
- **Surface the active course on every run.** Even on `list`/`diff`, the first or last line shows which course is active so the user is never confused about session scope.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Investigate a bug, error message, or unexpected behavior using launch-chart first (structural + variable queries), falling back to grep/Read only when the chart can't answer. When the chart gap is the reason for the fallback, files a feedback comment to LaunchSecure so the gap is monitored and fixed.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /kit:debug
|
|
6
|
+
|
|
7
|
+
A guided investigation workflow that defaults to chart-MCP queries and only reaches for grep/Read when the chart can't answer — and when that happens, files a one-line feedback comment in LS so the gap doesn't go unnoticed.
|
|
8
|
+
|
|
9
|
+
Parse `$ARGUMENTS`:
|
|
10
|
+
- **symptom** (required) — the error message, broken behavior, or question to investigate. Quoted is fine: `/kit:debug "tags don't render on the work-item drawer"`.
|
|
11
|
+
- **--start=<node>** — start the investigation from a specific file/function/table id (skip the search step).
|
|
12
|
+
- **--layer=<id>** — scope chart queries to one layer (ui / api / db / static).
|
|
13
|
+
- **--no-grep-fallback** — refuse the grep fallback entirely (strict MCP-only).
|
|
14
|
+
|
|
15
|
+
Examples:
|
|
16
|
+
- `/kit:debug tags don't render on the work-item drawer`
|
|
17
|
+
- `/kit:debug "TypeError: Cannot read property 'status' of undefined" --layer=ui`
|
|
18
|
+
- `/kit:debug --start=src/server/comms/build-feed.ts`
|
|
19
|
+
|
|
20
|
+
## Investigation loop
|
|
21
|
+
|
|
22
|
+
Run this loop until the user has enough to act, OR until a fallback was filed (then surface the fallback):
|
|
23
|
+
|
|
24
|
+
### Step 1 — locate the entry point
|
|
25
|
+
|
|
26
|
+
If `--start` was given, jump to step 2. Otherwise, use chart to find candidate nodes:
|
|
27
|
+
|
|
28
|
+
1. Extract key terms from the symptom (component name, identifier, error class). Skip noise words.
|
|
29
|
+
2. Call `mcp__launch-chart__read_graph(search: <term>, type: <best-guess-type>, layer: <layer?>)`. If `type` is uncertain, omit it and filter the response by relevance.
|
|
30
|
+
3. If `read_graph` returns 0 candidates, broaden: try without `type`, then without `layer`. Surface the top 3 candidates to the user as ranked options; if the user can pick, jump to step 2 with their pick.
|
|
31
|
+
|
|
32
|
+
**Chart-gap detection (entry-point search):**
|
|
33
|
+
- If `read_graph` returns 0 candidates AND a quick `grep` confirms the term exists somewhere in source → file a chart-gap report per the protocol below, then proceed via the grep fallback for this query only.
|
|
34
|
+
- If `detect_project_stack` lists a layer (e.g. `api`) but `read_graph(layer:"api")` returns 0 nodes → file a chart-gap report (parser misconfig).
|
|
35
|
+
|
|
36
|
+
### Step 2 — understand the node
|
|
37
|
+
|
|
38
|
+
Once the entry point is known, query its structure and behavior:
|
|
39
|
+
|
|
40
|
+
- **Structural** — `mcp__launch-chart__read_graph(node_id: <id>, hops: 1, include_edges: true)` for what it renders/imports and what depends on it.
|
|
41
|
+
- **Variable / state** — `mcp__launch-chart__inspect_node(node_id: <id>, fields: ["stateVars"])` or `(filter: <key-term>)` for what state it holds, what conditions exist. Per project CLAUDE.md, ALWAYS start with `fields` or `filter` to keep the response small.
|
|
42
|
+
|
|
43
|
+
Compose a hypothesis from these two reads. Example: "WorkItemDrawer fetches tags via `useWorkItemTags`, which calls `GET /api/work-items/:id/tags` — let's see what that returns."
|
|
44
|
+
|
|
45
|
+
### Step 3 — follow the trail
|
|
46
|
+
|
|
47
|
+
Walk the dependency edges toward the suspected cause (API endpoint, DB table, util fn, etc.). At each hop, use `read_graph(node_id, hops:1)` to find the next link. When you hit a leaf or run out of edges, narrate the chain back to the user with file:line refs from the node ids.
|
|
48
|
+
|
|
49
|
+
### Step 4 — propose, don't fix
|
|
50
|
+
|
|
51
|
+
End with a one-paragraph diagnosis + 2-3 candidate causes ranked by likelihood. Do NOT propose an edit unless the user asks for one — debug is investigation, not implementation. Suggest the next move: "Want me to read the route handler and confirm?" or "Want `/kit:diagram sequence`-ing the call chain?"
|
|
52
|
+
|
|
53
|
+
## Grep fallback
|
|
54
|
+
|
|
55
|
+
Only enter this path when:
|
|
56
|
+
- the chart returned no results AND a chart-gap report was filed, OR
|
|
57
|
+
- the symptom is about a non-TS asset (CSS string, env var, JSON value, comment) — the chart doesn't model these and the gap is expected.
|
|
58
|
+
|
|
59
|
+
Then use `grep`/`Read` directly. Always tell the user explicitly: `"Chart returned nothing — falling back to grep (filed gap report id: …)"` or `"Symptom is in CSS/JSON, which chart doesn't model — using grep directly (no gap report needed)."`
|
|
60
|
+
|
|
61
|
+
## Chart-gap protocol (shared)
|
|
62
|
+
|
|
63
|
+
When the chart MCP returns less than the symptom suggests it should, file ONE feedback comment in the project's Comm Hub via `mcp__launch-secure__communication_write` (cloud LS by default):
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
resource_type: "feedback"
|
|
67
|
+
title: "launch-chart gap: <one-line>"
|
|
68
|
+
body: |
|
|
69
|
+
Skill: /kit:debug
|
|
70
|
+
Symptom: <one-line symptom>
|
|
71
|
+
Tool: read_graph(search="…", layer="…", type="…")
|
|
72
|
+
Returned: 0 nodes
|
|
73
|
+
Cross-check: grep "<term>" matched <N> files (sample: <path1>, <path2>)
|
|
74
|
+
Project stack: <detect_project_stack one-liner>
|
|
75
|
+
fields:
|
|
76
|
+
severity: "low"
|
|
77
|
+
source: "kit-skill"
|
|
78
|
+
skill: "debug"
|
|
79
|
+
tool: "read_graph"
|
|
80
|
+
args: { search, layer, type }
|
|
81
|
+
response_summary: { nodes_count: 0, grep_hit_count }
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Then continue with the grep fallback for THIS query. Don't file again in the same invocation.
|
|
85
|
+
|
|
86
|
+
## Constraints
|
|
87
|
+
|
|
88
|
+
- **Chart-first.** Default to MCP queries; grep only when the chart cannot answer.
|
|
89
|
+
- **One gap report per invocation.** Don't spam comments.
|
|
90
|
+
- **No implementation.** This skill diagnoses; it does not edit. If the user wants the fix, they invoke `/fix:*` or hand the diagnosis back to you in chat.
|
|
91
|
+
- **Cite by node id.** Every claim links to a chart node id (file:line via `inspect_node` lines) so the user can verify.
|
|
92
|
+
- **Surface the fallback verbatim.** When grep is used, the message that grep was used (and why) must appear in the output — silent fallback hides the gap.
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Production-readiness check for the current branch — typecheck, lint, build, prisma drift, migration safety, env coverage, and recent LS comms. Read-only; reports a punch list of go/no-go signals before a deploy or merge to a deploy-tracked branch. Does NOT deploy.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /kit:deploy-check
|
|
6
|
+
|
|
7
|
+
Audit the current branch for production readiness. Bundles every signal a human would manually check before clicking "deploy" or merging to a deploy-tracked branch (per project convention: `master`). Reports a punch list with ✓ / ⚠ / ✗ per check and a single go/no-go verdict.
|
|
8
|
+
|
|
9
|
+
Parse `$ARGUMENTS`:
|
|
10
|
+
- (empty) — full check on the current branch vs `master` (or repo's default).
|
|
11
|
+
- **--target=<branch>** — compare against a different deploy-tracked branch.
|
|
12
|
+
- **--skip=<check,…>** — comma-separated checks to skip (e.g. `--skip=lint,build`). Use sparingly; surface skipped checks in the report.
|
|
13
|
+
- **--quick** — skip the build (the slowest check). Still runs typecheck, lint, prisma, env, comms.
|
|
14
|
+
- **--json** — emit a machine-readable report (per check: ok, detail, durationMs).
|
|
15
|
+
|
|
16
|
+
Examples:
|
|
17
|
+
- `/kit:deploy-check`
|
|
18
|
+
- `/kit:deploy-check --quick`
|
|
19
|
+
- `/kit:deploy-check --skip=lint`
|
|
20
|
+
- `/kit:deploy-check --target=staging-mirror --json`
|
|
21
|
+
|
|
22
|
+
## Preflight
|
|
23
|
+
|
|
24
|
+
1. Confirm cwd is a git repo (`git rev-parse --is-inside-work-tree`).
|
|
25
|
+
2. Resolve the target branch — `--target=` if given, else default branch (`git symbolic-ref refs/remotes/origin/HEAD --short` → strip `origin/`; fall back to `master`).
|
|
26
|
+
3. Print the scope upfront: `"deploy-check: <current-branch> → <target-branch>"`. The user should never wonder which comparison this is.
|
|
27
|
+
4. Stash check — if `git status --porcelain` shows uncommitted changes, surface this as a `⚠ uncommitted changes in working tree` row at the top of the report. Don't refuse; some workflows want the check to include uncommitted work.
|
|
28
|
+
|
|
29
|
+
## Checks
|
|
30
|
+
|
|
31
|
+
Run every check in PARALLEL when possible (typecheck/lint/build are independent and slow). Each check returns `{ name, status: "ok"|"warn"|"fail", detail: <one-line>, artifact?: <path or url> }`.
|
|
32
|
+
|
|
33
|
+
### 1. branch_freshness
|
|
34
|
+
|
|
35
|
+
How far behind the target branch is the current branch?
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
git fetch --quiet origin
|
|
39
|
+
git rev-list --left-right --count <target>...HEAD
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
- ✓ `0 commits behind target` → fresh
|
|
43
|
+
- ⚠ `1–10 behind`
|
|
44
|
+
- ✗ `>10 behind` → suggest `git merge origin/<target>` or rebase
|
|
45
|
+
|
|
46
|
+
### 2. typecheck
|
|
47
|
+
|
|
48
|
+
`npx tsc --noEmit` (or the project's `npm run typecheck` if defined in `package.json` scripts — prefer the script).
|
|
49
|
+
|
|
50
|
+
- ✓ `0 errors`
|
|
51
|
+
- ✗ `<N> errors` (sample first 3 file:line:message)
|
|
52
|
+
|
|
53
|
+
### 3. lint
|
|
54
|
+
|
|
55
|
+
`npm run lint` if defined in `package.json` scripts; else skip with a `⚠ no lint script defined` row.
|
|
56
|
+
|
|
57
|
+
- ✓ `0 errors`
|
|
58
|
+
- ⚠ `<N> warnings`
|
|
59
|
+
- ✗ `<N> errors`
|
|
60
|
+
|
|
61
|
+
### 4. build
|
|
62
|
+
|
|
63
|
+
`npm run build` (uses the project's actual build pipeline so the check matches what Vercel/CI would do). Skip if `--quick` or `--skip=build`.
|
|
64
|
+
|
|
65
|
+
- ✓ `built in <durationMs>ms`
|
|
66
|
+
- ✗ `build failed` (last 20 lines of stderr as artifact)
|
|
67
|
+
|
|
68
|
+
Note: this runs the full prod build including prisma generate + migrate deploy. Make sure `DATABASE_URL` is set to a *safe* dev DB before running. If `DATABASE_URL` looks production-y (matches `vercel.app`, `neon.tech`, `rds.amazonaws.com`, etc.), refuse the build step and surface `⚠ build skipped — DATABASE_URL looks production-y (<host>); re-run with a dev DB or pass --skip=build`.
|
|
69
|
+
|
|
70
|
+
### 5. prisma_drift
|
|
71
|
+
|
|
72
|
+
Schema vs migrations consistency:
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
npx prisma migrate diff --from-schema-datasource prisma/schema.prisma --to-migrations prisma/migrations --shadow-database-url <DEV_SHADOW_URL>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The project authors migrations by hand (CLAUDE.md: never `prisma db push` or `migrate dev`). So this diff should be EMPTY — any non-empty result means a model field was added without a corresponding hand-written migration.
|
|
79
|
+
|
|
80
|
+
- ✓ `schema matches migrations`
|
|
81
|
+
- ✗ `<N> drift detected` — surface the diff body as an artifact; suggest authoring a migration per the project's hand-written SQL convention.
|
|
82
|
+
|
|
83
|
+
If no `DEV_SHADOW_URL` is available, skip this check with `⚠ prisma_drift skipped — no shadow DB URL` and recommend setting one in `.env.local`.
|
|
84
|
+
|
|
85
|
+
### 6. migration_safety
|
|
86
|
+
|
|
87
|
+
Recent migrations on the branch — look at every migration file added since divergence from target:
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
git diff --name-only <target>...HEAD -- prisma/migrations/
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
For each new migration, scan the SQL for risk patterns (per project CLAUDE.md migration safety rules):
|
|
94
|
+
|
|
95
|
+
- ✓ no destructive ops (`DROP COLUMN`, `DROP TABLE`, `ALTER COLUMN ... DROP`, `DELETE FROM` without `WHERE` matching backup) found.
|
|
96
|
+
- ⚠ destructive ops present BUT a sidecar `CREATE TABLE _backup_*` exists in the same file AND an orphan-check (`RAISE EXCEPTION ... orphans remain`) is present.
|
|
97
|
+
- ✗ destructive ops without backup OR without orphan-check OR mixing expand+contract in a single migration.
|
|
98
|
+
|
|
99
|
+
Each failure cites the exact migration filename + line numbers.
|
|
100
|
+
|
|
101
|
+
### 7. env_coverage
|
|
102
|
+
|
|
103
|
+
Compare `.env.example` (or `.env.testing` if it exists) keys against `process.env.*` references in the new code since divergence:
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
git diff <target>...HEAD -- '*.ts' '*.tsx' | grep -oE 'process\.env\.[A-Z_][A-Z0-9_]+'
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
- ✓ every referenced env var is documented in `.env.example`
|
|
110
|
+
- ⚠ `<N> new env vars used but missing from .env.example` (list them)
|
|
111
|
+
- ✗ N/A (always a warn, never a hard fail — env docs are advisory)
|
|
112
|
+
|
|
113
|
+
### 8. recent_comms (LS Comm Hub)
|
|
114
|
+
|
|
115
|
+
Pull the last 10 comments tagged `release` or `daily_update` via `mcp__launch-secure__communication_read` and surface a one-line: `"<N> release/standup comments in last 7 days — latest: <title> (<author>, <age>)"`. This is informational — it helps the user know if a release note was already drafted or if the team flagged something to ship.
|
|
116
|
+
|
|
117
|
+
Skip with a `⚠ launch-secure MCP not wired` row if the MCP isn't available; don't fail the whole check.
|
|
118
|
+
|
|
119
|
+
### 9. recall_health
|
|
120
|
+
|
|
121
|
+
`mcp__launch-recall__recall_status` — ensures the shadow-git backup is alive so a rollback path exists if the deploy goes sideways. Informational only.
|
|
122
|
+
|
|
123
|
+
- ✓ `recall alive — last snap <X ago>`
|
|
124
|
+
- ⚠ `recall dead — restart before deploy (\`/kit:recall doctor\` for detail)`
|
|
125
|
+
|
|
126
|
+
## Report
|
|
127
|
+
|
|
128
|
+
Render a punch list (plain text, monospace; not markdown table):
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
deploy-check: implementation → master
|
|
132
|
+
|
|
133
|
+
✓ branch_freshness 0 commits behind master
|
|
134
|
+
✓ typecheck 0 errors (3.2s)
|
|
135
|
+
⚠ lint 12 warnings (no errors)
|
|
136
|
+
✓ build built in 47s
|
|
137
|
+
✓ prisma_drift schema matches migrations
|
|
138
|
+
✗ migration_safety 1 destructive op without backup
|
|
139
|
+
→ prisma/migrations/2026_05_25_drop_legacy_thread/migration.sql:14 (DROP COLUMN legacyThreadId, no _backup_* sidecar)
|
|
140
|
+
⚠ env_coverage 2 new env vars missing from .env.example: FEED_BACKEND_URL, FEED_TIMEOUT_MS
|
|
141
|
+
✓ recent_comms 1 release comment in last 7 days — "Comm Hub channels rollout" (prajyot, 2d ago)
|
|
142
|
+
✓ recall_health alive — last snap 4m ago
|
|
143
|
+
|
|
144
|
+
verdict: NO-GO — 1 hard fail (migration_safety).
|
|
145
|
+
next: author a backup table + orphan check in the listed migration, then re-run /kit:deploy-check.
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Verdict rules:
|
|
149
|
+
- Any ✗ → NO-GO with the failing check(s) listed.
|
|
150
|
+
- All ✓ + ⚠ only → GO WITH CAVEATS, list the warnings.
|
|
151
|
+
- All ✓ → GO.
|
|
152
|
+
|
|
153
|
+
## Constraints
|
|
154
|
+
|
|
155
|
+
- **Read-only.** Never deploy, never push, never auto-fix.
|
|
156
|
+
- **Parallel checks.** Run independent checks concurrently (Bash run_in_background) — sequential bloats the wait time past usefulness.
|
|
157
|
+
- **No silent skips.** Every skipped check appears in the report with a reason.
|
|
158
|
+
- **DB-safe.** Refuse to run `build` against a production-looking DATABASE_URL — the build runs `prisma migrate deploy` against it.
|
|
159
|
+
- **Honest about scope.** This check is what a human would do manually; it is NOT a guarantee. Surface false-negatives readers: `"This check doesn't run e2e tests, doesn't validate runtime config, doesn't sniff for secrets in commits — those are separate skills."`
|
|
160
|
+
- **Use launch-chart only for nice-to-have context (e.g. blast radius of a migration), not for the gate.** The gate is git+npm+prisma+MCP-LS; chart is optional.
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Render a Mermaid diagram (flowchart, sequence, ERD, state, gantt) via launch-deck. For ERDs, auto-derives tables and relations from launch-chart's db layer so the diagram matches the real schema. Files a chart-gap feedback comment to LS if the db layer is missing or empty.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /kit:diagram
|
|
6
|
+
|
|
7
|
+
Push a Mermaid diagram to launch-deck. Five flavors:
|
|
8
|
+
|
|
9
|
+
- **flowchart** — boxes-and-arrows for any process
|
|
10
|
+
- **sequence** — request/response timing between actors
|
|
11
|
+
- **erd** — entity-relationship diagram. Auto-pulled from chart `db` layer unless the user provides their own DSL.
|
|
12
|
+
- **state** — state machine
|
|
13
|
+
- **gantt** — timeline
|
|
14
|
+
|
|
15
|
+
Parse `$ARGUMENTS`:
|
|
16
|
+
- **kind** (required) — `flowchart` | `sequence` | `erd` | `state` | `gantt`. If absent, ask.
|
|
17
|
+
- **subject** (required for non-erd) — what to diagram, e.g. "user login flow" or "OAuth handshake".
|
|
18
|
+
- **--scope=<filter>** — for ERDs, limit to one module or table set (e.g. `--scope=auth` or `--scope=User,Org,Membership`). Default: all tables.
|
|
19
|
+
- **--session=<id>** — deck session name. Default `diagram-<kind>-<subject-slug>`.
|
|
20
|
+
- **--dsl=<raw-mermaid>** — bypass auto-generation; push the user's DSL verbatim.
|
|
21
|
+
- **--feedback** — push in feedback mode and await response.
|
|
22
|
+
|
|
23
|
+
Examples:
|
|
24
|
+
- `/kit:diagram flowchart user login flow`
|
|
25
|
+
- `/kit:diagram sequence OAuth handshake between client, gateway, idp`
|
|
26
|
+
- `/kit:diagram erd --scope=work-items`
|
|
27
|
+
- `/kit:diagram erd` → full project ERD
|
|
28
|
+
- `/kit:diagram state work-item lifecycle: backlog → todo → in-progress → done`
|
|
29
|
+
|
|
30
|
+
## Preflight
|
|
31
|
+
|
|
32
|
+
1. Confirm `mcp__launch-deck__server_status` is running; start if not.
|
|
33
|
+
2. For `erd`: confirm `mcp__launch-chart__chart_server_status` is up, then call `mcp__launch-chart__detect_project_stack` and check `db` is in the layers list.
|
|
34
|
+
|
|
35
|
+
## Build the DSL
|
|
36
|
+
|
|
37
|
+
### flowchart / sequence / state / gantt
|
|
38
|
+
|
|
39
|
+
Translate the subject into Mermaid DSL based on what the user described. For sequence, infer actors from the subject (client/server/db are common defaults). Add concise labels — don't overload with prose.
|
|
40
|
+
|
|
41
|
+
Example flowchart skeleton:
|
|
42
|
+
|
|
43
|
+
```mermaid
|
|
44
|
+
flowchart TD
|
|
45
|
+
Start([User opens app]) --> Auth{Session valid?}
|
|
46
|
+
Auth -- yes --> Home[Home]
|
|
47
|
+
Auth -- no --> Login[Login form]
|
|
48
|
+
Login -- success --> Home
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
If the user passed `--dsl=…`, skip generation — use their DSL.
|
|
52
|
+
|
|
53
|
+
### erd
|
|
54
|
+
|
|
55
|
+
Query the db layer to derive entities and edges:
|
|
56
|
+
|
|
57
|
+
1. `mcp__launch-chart__read_graph(layer: "db", type: "table"[, module: <scope>])` — gets every table node.
|
|
58
|
+
2. For each table, `mcp__launch-chart__inspect_node(node_id: <id>, fields: ["columns", "relations"])` to get fields and FK relations.
|
|
59
|
+
3. Render Mermaid `erDiagram` DSL:
|
|
60
|
+
|
|
61
|
+
```mermaid
|
|
62
|
+
erDiagram
|
|
63
|
+
USER ||--o{ WORK_ITEM : owns
|
|
64
|
+
USER {
|
|
65
|
+
string id PK
|
|
66
|
+
string email
|
|
67
|
+
datetime createdAt
|
|
68
|
+
}
|
|
69
|
+
WORK_ITEM {
|
|
70
|
+
string id PK
|
|
71
|
+
string userId FK
|
|
72
|
+
string title
|
|
73
|
+
enum type
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Rules:
|
|
78
|
+
- Use `||--o{` for 1:N FK relations, `}o--o{` for many-to-many join tables.
|
|
79
|
+
- Include PK + FK markers; include enum/scalar type for the first ~8 columns per table; truncate the rest with a `… (N more)` comment.
|
|
80
|
+
- Cap at 25 tables to keep the diagram readable. If the project has more than 25 in scope, ask the user to narrow with `--scope=`.
|
|
81
|
+
|
|
82
|
+
**Chart-gap detection** — file a feedback comment per the protocol below before stopping if:
|
|
83
|
+
- the db layer is missing from `detect_project_stack`
|
|
84
|
+
- `read_graph(layer: "db")` returns 0 nodes
|
|
85
|
+
- the chart shows tables but `inspect_node` returns no `columns` (parser misconfiguration)
|
|
86
|
+
|
|
87
|
+
## Push to deck
|
|
88
|
+
|
|
89
|
+
Call `mcp__launch-deck__deck` with:
|
|
90
|
+
- `session: <session>`
|
|
91
|
+
- `mode: "show"` or `"feedback"` (+ `prompt: "Does this match the schema you expected?"` for ERDs)
|
|
92
|
+
- `blocks: [{ type: "mermaid", label: <kind>-<subject>, content: <mermaid-dsl> }]`
|
|
93
|
+
|
|
94
|
+
If `--feedback`, call `await_feedback` and surface the response.
|
|
95
|
+
|
|
96
|
+
## Output
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
diagram pushed — deck session "<session>" — http://localhost:52829/?session=<session>
|
|
100
|
+
kind: <kind>
|
|
101
|
+
nodes: <N> edges: <M>
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
For ERDs add `tables: <N> relations: <M> scope: <scope or "all">`.
|
|
105
|
+
|
|
106
|
+
## Chart-gap protocol (shared)
|
|
107
|
+
|
|
108
|
+
When the chart MCP returns less data than expected (db layer missing, 0 tables, empty columns), file ONE feedback comment in the project's Comm Hub via `mcp__launch-secure__communication_write` (cloud LS, not local) before stopping:
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
resource_type: "feedback"
|
|
112
|
+
title: "launch-chart gap: <one-line>"
|
|
113
|
+
body: |
|
|
114
|
+
Skill: /kit:diagram
|
|
115
|
+
Tool: read_graph(layer="db", …) / inspect_node(...)
|
|
116
|
+
Returned: <tables_count> tables, <relations_count> relations
|
|
117
|
+
Expected: db layer present per detect_project_stack
|
|
118
|
+
Project stack: <one-line summary>
|
|
119
|
+
fields:
|
|
120
|
+
severity: "low"
|
|
121
|
+
source: "kit-skill"
|
|
122
|
+
skill: "diagram"
|
|
123
|
+
tool: "read_graph"
|
|
124
|
+
response_summary: { layer, tables_count, error }
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Then fall back: render a `flowchart` placeholder explaining "DB layer not available — re-run `npx launch-chart generate_graph` then retry" instead of the ERD.
|
|
128
|
+
|
|
129
|
+
## Constraints
|
|
130
|
+
|
|
131
|
+
- **MCP-first for ERDs.** Never grep `prisma/schema.prisma` to build the DSL — the chart has the parsed model.
|
|
132
|
+
- **Cap entities at 25.** Past that, Mermaid wraps unreadably; ask the user to narrow scope.
|
|
133
|
+
- **Mermaid only.** This skill does not draw raster images — Mermaid DSL is the deliverable.
|
|
134
|
+
- **One block per push.**
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Create an isolated worktree, run pre-merge gates, or merge an orbit into its target — using launch-orbit MCP tools with launch-chart layer detection in the pre-flight. Encodes the project's orbit standards (database fork by profile, gate enforcement, post-merge cleanup) so every orbit gets created and merged the same way.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /kit:orbit
|
|
6
|
+
|
|
7
|
+
Drive a launch-orbit worktree through its lifecycle: create → work → check_mergeable → merge → drop. Wraps the MCP tools with sensible defaults and a layer-aware pre-flight so the operator doesn't forget the project's conventions.
|
|
8
|
+
|
|
9
|
+
Parse `$ARGUMENTS` — first token is the subcommand:
|
|
10
|
+
|
|
11
|
+
- **create <branch>** — `[--base=<ref>] [--profile=<name>]` — fork resources per `orbit.json`, return path + envFile.
|
|
12
|
+
- **list** — list every orbit registered on this machine.
|
|
13
|
+
- **switch <branch>** — print the path/env for an existing orbit (no shell mutation).
|
|
14
|
+
- **doctor** — surface registry inconsistencies.
|
|
15
|
+
- **check <branch> --target=<target-branch>** — run pre-merge gates WITHOUT merging.
|
|
16
|
+
- **merge <branch> --target=<target-branch>** — `[--cleanup=full|none] [--skip-gate=<id>,…]` — run gates + merge.
|
|
17
|
+
- **drop <branch>** — `[--no-backup]` — tear down (backup, drop DB, remove worktree, deregister).
|
|
18
|
+
|
|
19
|
+
Examples:
|
|
20
|
+
- `/kit:orbit create feat-channel-rename --profile=fe`
|
|
21
|
+
- `/kit:orbit check feat-channel-rename --target=implementation`
|
|
22
|
+
- `/kit:orbit merge feat-channel-rename --target=implementation`
|
|
23
|
+
- `/kit:orbit doctor`
|
|
24
|
+
|
|
25
|
+
## Preflight (runs on create / check / merge)
|
|
26
|
+
|
|
27
|
+
1. Confirm `mcp__launch-orbit__orbit_doctor` returns no critical inconsistencies for THIS project. If it does, surface them and stop — the operator probably wants `/kit:orbit drop <stale-branch>` first.
|
|
28
|
+
2. Confirm `orbit.json` exists at the repo root. If missing, tell the user to add one (point at the orbit docs) and stop.
|
|
29
|
+
3. Run `mcp__launch-chart__detect_project_stack` and print the detected layers as part of the pre-flight log. This is the project's "what's in scope" surface — surface it before any branch op so the operator sees if the chart misses a layer that orbit.json's gates reference (e.g. orbit.json's build-lint gate runs against the api layer but chart doesn't see api).
|
|
30
|
+
4. For **merge**: confirm `--target=` is set. Default is NOT `master` — explicit target only.
|
|
31
|
+
|
|
32
|
+
## Per-subcommand behavior
|
|
33
|
+
|
|
34
|
+
### create
|
|
35
|
+
|
|
36
|
+
1. `mcp__launch-orbit__orbit_create` with `branch`, `baseRef` (if `--base`), `profile` (if `--profile`).
|
|
37
|
+
2. On success, surface the returned `nextAction` (`cd <path>`) verbatim and the `envFile` path. Don't auto-cd — the operator's shell is theirs to drive.
|
|
38
|
+
3. Remind: in the new worktree, `npx launch-kit refresh` will rewire MCPs against the worktree's `.launch-secure.cred.config` symlink if needed.
|
|
39
|
+
|
|
40
|
+
### list
|
|
41
|
+
|
|
42
|
+
`mcp__launch-orbit__orbit_list` → one row per orbit: `slug branch age path resources`.
|
|
43
|
+
|
|
44
|
+
### switch
|
|
45
|
+
|
|
46
|
+
`mcp__launch-orbit__orbit_switch(branch)` → print `cd <path>` + `envFile`. Don't run cd.
|
|
47
|
+
|
|
48
|
+
### doctor
|
|
49
|
+
|
|
50
|
+
`mcp__launch-orbit__orbit_doctor` → list every issue with a one-line fix (e.g. `orphan-registration` → `/kit:orbit drop <branch>`).
|
|
51
|
+
|
|
52
|
+
### check
|
|
53
|
+
|
|
54
|
+
`mcp__launch-orbit__orbit_check_mergeable(branch, target)` → render the gate report:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
orbit feat-channel-rename → implementation
|
|
58
|
+
✓ builtin/mergeability (no textual conflicts)
|
|
59
|
+
✗ builtin/build-lint (tsc: 3 errors, see <artifact>)
|
|
60
|
+
✓ launchsecure/migration-safety (no destructive migrations)
|
|
61
|
+
|
|
62
|
+
result: BLOCKED — fix build-lint then retry.
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### merge
|
|
66
|
+
|
|
67
|
+
1. Run `check` first (same report). If `passed: false`, stop with the report — don't attempt the merge.
|
|
68
|
+
2. If `passed: true`, call `mcp__launch-orbit__orbit_merge(branch, target, cleanup, skipGates)` and surface the result.
|
|
69
|
+
3. Default `cleanup: "full"` (orbit is dropped post-merge after pg_dump). The operator must pass `--cleanup=none` to keep the orbit around.
|
|
70
|
+
4. After a successful merge, recommend `/kit:standup` to surface the change in the next standup, and `/kit:diagram` if it touched the schema.
|
|
71
|
+
|
|
72
|
+
### drop
|
|
73
|
+
|
|
74
|
+
`mcp__launch-orbit__orbit_drop(branch, backup: !args.noBackup)` → idempotent. Surface `backups[]` paths.
|
|
75
|
+
|
|
76
|
+
## Conventions encoded here
|
|
77
|
+
|
|
78
|
+
- **No bare `--target=master`.** Default merge target is `implementation` per project CLAUDE.md ("implementation branch is parent for all impl branches"). If the operator types `--target=master`, double-check by asking once.
|
|
79
|
+
- **No `--skip-gate` without a reason in the next message.** Surface a banner: `"Skipping gates: <ids>. Reason?"` — let the operator answer in chat; do NOT proceed silently.
|
|
80
|
+
- **Always run `check` before `merge`.** The skill enforces this — even if the operator runs `merge` directly, the skill runs `check` first.
|
|
81
|
+
- **Layer awareness.** Pre-flight always prints `detect_project_stack` layers so the operator sees parity (or absence) between chart layers and orbit gate scope.
|
|
82
|
+
|
|
83
|
+
## Constraints
|
|
84
|
+
|
|
85
|
+
- **MCP-first.** Never shell out to `git worktree`, `git merge`, `pg_dump` directly — orbit's tools own these.
|
|
86
|
+
- **Idempotent.** All subcommands are safe to retry. Drop especially — it handles partial-state gracefully.
|
|
87
|
+
- **Surface, don't hide.** If a gate fails, print the artifact path; if the doctor finds inconsistency, print the exact slug.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Generate a working HTML/JS prototype page and push it to launch-deck for click-through review. Use to validate behavior — flow, transitions, interactions — before any framework code is touched. Calls deck's rich-html block with framework=raw; supports CDN scripts, animations, real DOM events.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /kit:prototype
|
|
6
|
+
|
|
7
|
+
Build a self-contained, interactive HTML page (HTML + CSS + JS, optional CDN scripts) and push it to launch-deck. Unlike `/kit:wireframe`, this is a *working* prototype: the user can click, type, navigate fake routes, see transitions — the goal is to test behavior cheaply.
|
|
8
|
+
|
|
9
|
+
Parse `$ARGUMENTS`:
|
|
10
|
+
- **description** (required) — what the prototype should demonstrate, e.g. "drag-to-reorder kanban with optimistic update and rollback on error".
|
|
11
|
+
- **--session=<id>** — deck session name. Default `proto-<slugified-description-first-3-words>`.
|
|
12
|
+
- **--feedback** — push in `feedback` mode with `prompt: "Did this match the interaction you had in mind?"` and call `await_feedback`.
|
|
13
|
+
- **--cdn=tailwind|alpine|htmx|react|vue|none** — comma-separated CDN(s) to include. Default `tailwind` for styling. `none` for pure handwritten CSS.
|
|
14
|
+
- **--theme=light|dark** — only when the prototype demands one mode (e.g. a dark-mode-only design).
|
|
15
|
+
|
|
16
|
+
Examples:
|
|
17
|
+
- `/kit:prototype drag-to-reorder kanban with optimistic update`
|
|
18
|
+
- `/kit:prototype keyboard shortcut palette with fuzzy search --cdn=tailwind,alpine`
|
|
19
|
+
- `/kit:prototype landing page hero with parallax scroll --feedback`
|
|
20
|
+
|
|
21
|
+
## Preflight
|
|
22
|
+
|
|
23
|
+
1. Confirm `mcp__launch-deck__server_status` is running. Start if not.
|
|
24
|
+
2. If the description references real entities/pages in this repo, run `mcp__launch-chart__read_graph(search: <hint>)` to pull the shape — so the prototype mirrors actual data field names. Optional; skip on first iteration to keep the loop fast.
|
|
25
|
+
|
|
26
|
+
## Build the page
|
|
27
|
+
|
|
28
|
+
Generate a complete `<!DOCTYPE html>` document. Layout:
|
|
29
|
+
|
|
30
|
+
```html
|
|
31
|
+
<!DOCTYPE html>
|
|
32
|
+
<html lang="en">
|
|
33
|
+
<head>
|
|
34
|
+
<meta charset="utf-8">
|
|
35
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
36
|
+
<title><short title></title>
|
|
37
|
+
<!-- CDNs (per --cdn flag) -->
|
|
38
|
+
<script src="https://cdn.tailwindcss.com"></script>
|
|
39
|
+
<script defer src="https://unpkg.com/alpinejs"></script>
|
|
40
|
+
<style>
|
|
41
|
+
/* page-specific styles */
|
|
42
|
+
</style>
|
|
43
|
+
</head>
|
|
44
|
+
<body class="…">
|
|
45
|
+
<!-- the prototype -->
|
|
46
|
+
<script>
|
|
47
|
+
// event handlers, state, fake data
|
|
48
|
+
</script>
|
|
49
|
+
</body>
|
|
50
|
+
</html>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
CDN catalog (use only what's requested):
|
|
54
|
+
- **tailwind** — `<script src="https://cdn.tailwindcss.com"></script>`
|
|
55
|
+
- **alpine** — `<script defer src="https://unpkg.com/alpinejs"></script>` for `x-data` reactivity
|
|
56
|
+
- **htmx** — `<script src="https://unpkg.com/htmx.org"></script>` for fake server swaps
|
|
57
|
+
- **react** — `<script crossorigin src="https://unpkg.com/react/umd/react.production.min.js"></script>` + `react-dom` + Babel CDN if JSX
|
|
58
|
+
- **vue** — `<script src="https://unpkg.com/vue@3/dist/vue.global.prod.js"></script>`
|
|
59
|
+
|
|
60
|
+
Design rules:
|
|
61
|
+
- **Fake the backend.** Use in-memory arrays, `setTimeout` to simulate latency, `Math.random() < 0.1` to simulate intermittent failures (for testing rollback flows).
|
|
62
|
+
- **No real PII or secrets.** Use placeholder names ("Ada", "Lin", "Mehmet"), placeholder copy, never a real user from this project.
|
|
63
|
+
- **Show the interaction explicitly.** If the prototype's point is drag-to-reorder, make the drag affordance OBVIOUS (cursor change, hover scale, snap line). If the point is optimistic update + rollback, force a visible failure within ~5 clicks so the reviewer experiences it.
|
|
64
|
+
- **One screen unless the user asks for multi-screen.** Multi-screen prototypes use a fake router (`window.history.pushState` + a click handler) — don't pull in `react-router`.
|
|
65
|
+
|
|
66
|
+
## Push to deck
|
|
67
|
+
|
|
68
|
+
Call `mcp__launch-deck__deck` with:
|
|
69
|
+
- `session: <session>`
|
|
70
|
+
- `mode: "show"` or `"feedback"` (+ `prompt`)
|
|
71
|
+
- `blocks: [{ type: "rich-html", framework: "raw", label: <short-title>, content: <full-doctype-html>, theme: <theme?> }]`
|
|
72
|
+
|
|
73
|
+
`framework: "raw"` means the deck does NOT wrap your content — what you ship IS the page. That's why the full `<!DOCTYPE html>` doctype is required.
|
|
74
|
+
|
|
75
|
+
If `--feedback`, call `mcp__launch-deck__await_feedback` afterward and surface the response.
|
|
76
|
+
|
|
77
|
+
## Output
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
prototype pushed — deck session "<session>" — http://localhost:52829/?session=<session>
|
|
81
|
+
size: <N> KB markup, <M> CDN scripts, <K> inline event handlers
|
|
82
|
+
demonstrates: <one-line>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Constraints
|
|
86
|
+
|
|
87
|
+
- **Self-contained.** No external API calls, no auth flows, no real LS endpoints. Everything in one HTML file.
|
|
88
|
+
- **One block per push.** Multi-block prototypes belong as separate sessions.
|
|
89
|
+
- **Iterate via re-push.** Same `--session` overwrites — that's the loop. Don't accumulate prototype-v2, prototype-v3 sessions.
|
|
90
|
+
- **No production-ready output.** If the user is happy with the prototype and wants to "turn it into the real thing," that's a separate `/fe:*` workflow — this skill is throw-away to validate behavior.
|