@specship/specship-win32-arm64 0.11.8 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dist/bin/specship.js +141 -66
- package/lib/dist/bin/specship.js.map +1 -1
- package/lib/dist/commands/specship/check.md +5 -0
- package/lib/dist/commands/specship/spec.md +235 -15
- package/lib/dist/db/migrations.d.ts.map +1 -1
- package/lib/dist/db/migrations.js +1 -0
- package/lib/dist/db/migrations.js.map +1 -1
- package/lib/dist/enforce/enforce.d.ts +15 -0
- package/lib/dist/enforce/enforce.d.ts.map +1 -1
- package/lib/dist/enforce/enforce.js +43 -1
- package/lib/dist/enforce/enforce.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +6 -0
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js.map +1 -1
- package/lib/dist/index.d.ts +9 -1
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +53 -9
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +35 -0
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/installer/instructions-template.d.ts +2 -2
- package/lib/dist/installer/instructions-template.js +3 -3
- package/lib/dist/installer/targets/claude.d.ts +10 -0
- package/lib/dist/installer/targets/claude.d.ts.map +1 -1
- package/lib/dist/installer/targets/claude.js +33 -7
- package/lib/dist/installer/targets/claude.js.map +1 -1
- package/lib/dist/mcp/designer-tools.js +1 -1
- package/lib/dist/mcp/server-instructions.d.ts +1 -1
- package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
- package/lib/dist/mcp/server-instructions.js +1 -1
- package/lib/dist/mcp/spec-tools.d.ts +10 -0
- package/lib/dist/mcp/spec-tools.d.ts.map +1 -1
- package/lib/dist/mcp/spec-tools.js +228 -2
- package/lib/dist/mcp/spec-tools.js.map +1 -1
- package/lib/dist/mcp/tools.d.ts +12 -0
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +34 -1
- package/lib/dist/mcp/tools.js.map +1 -1
- package/lib/dist/reflect/index.d.ts +1 -1
- package/lib/dist/reflect/index.d.ts.map +1 -1
- package/lib/dist/reflect/index.js +2 -1
- package/lib/dist/reflect/index.js.map +1 -1
- package/lib/dist/reflect/miner.d.ts +8 -0
- package/lib/dist/reflect/miner.d.ts.map +1 -1
- package/lib/dist/reflect/miner.js +64 -36
- package/lib/dist/reflect/miner.js.map +1 -1
- package/lib/dist/resolution/brief-link-resolver.d.ts +20 -0
- package/lib/dist/resolution/brief-link-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/brief-link-resolver.js +65 -1
- package/lib/dist/resolution/brief-link-resolver.js.map +1 -1
- package/lib/dist/resolution/spec-link-resolver.d.ts +16 -2
- package/lib/dist/resolution/spec-link-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/spec-link-resolver.js +19 -1
- package/lib/dist/resolution/spec-link-resolver.js.map +1 -1
- package/lib/dist/server/cli.js +5 -49
- package/lib/dist/server/ingest/ingestor.js +17 -17
- package/lib/dist/server/ingest/pricing-backfill.js +55 -0
- package/lib/dist/server/ingest/pricing.js +3 -0
- package/lib/dist/server/ingest/project-paths.js +152 -0
- package/lib/dist/server/project-registry.js +15 -2
- package/lib/dist/server/routes/claude.js +47 -18
- package/lib/dist/server/routes/events.js +20 -1
- package/lib/dist/server/routes/projects.js +6 -3
- package/lib/dist/server/routes/spec.js +22 -2
- package/lib/dist/server/server.js +38 -4
- package/lib/dist/server/ssr/md.mjs +83 -0
- package/lib/dist/server/ssr/public/app.css +1 -0
- package/lib/dist/server/ssr/render.mjs +564 -0
- package/lib/dist/server/ssr/routes.js +73 -0
- package/lib/dist/server/static-handler.js +30 -0
- package/lib/dist/workflows/defaults/claude-design-implement.yaml +3 -3
- package/lib/dist/workflows/defaults/spec-implement.yaml +41 -9
- package/lib/node_modules/.package-lock.json +1 -1
- package/lib/package.json +3 -3
- package/package.json +1 -1
- package/lib/dist/commands/specship/design-implement.md +0 -84
- package/lib/dist/commands/specship/design-loop.md +0 -125
- package/lib/dist/commands/ss-behaviour.md +0 -116
- package/lib/dist/web/chunk-2AJCHB7P.js +0 -1
- package/lib/dist/web/chunk-2CPLUFCH.js +0 -2
- package/lib/dist/web/chunk-2I7L37NS.js +0 -1
- package/lib/dist/web/chunk-2IVSOVQZ.js +0 -1
- package/lib/dist/web/chunk-2NAWAJB5.js +0 -1
- package/lib/dist/web/chunk-2OJBIPE4.js +0 -1
- package/lib/dist/web/chunk-3E2WB6D5.js +0 -1
- package/lib/dist/web/chunk-3EBFYSCH.js +0 -2
- package/lib/dist/web/chunk-3QCQ4BXS.js +0 -1
- package/lib/dist/web/chunk-42XVAQ6I.js +0 -1
- package/lib/dist/web/chunk-4G7XU55L.js +0 -1
- package/lib/dist/web/chunk-4IMMPEYM.js +0 -1
- package/lib/dist/web/chunk-4TJQJPCZ.js +0 -1
- package/lib/dist/web/chunk-4WZIHTPC.js +0 -1
- package/lib/dist/web/chunk-4YVSYOSD.js +0 -1
- package/lib/dist/web/chunk-5BQIOYKW.js +0 -1
- package/lib/dist/web/chunk-5HGWHUJA.js +0 -1
- package/lib/dist/web/chunk-5NTGUSXJ.js +0 -1
- package/lib/dist/web/chunk-5Y244R4G.js +0 -1
- package/lib/dist/web/chunk-6RRDPT5Z.js +0 -1
- package/lib/dist/web/chunk-6VKB2ZWM.js +0 -1
- package/lib/dist/web/chunk-7656MA24.js +0 -1
- package/lib/dist/web/chunk-7DMFVTU4.js +0 -1
- package/lib/dist/web/chunk-7KWBINA7.js +0 -1
- package/lib/dist/web/chunk-7MUNFW56.js +0 -1
- package/lib/dist/web/chunk-7SMPKVEP.js +0 -1
- package/lib/dist/web/chunk-AZJVTPLU.js +0 -1
- package/lib/dist/web/chunk-AZUUBUEJ.js +0 -1
- package/lib/dist/web/chunk-BLBRMCN2.js +0 -1
- package/lib/dist/web/chunk-BMIAXD2V.js +0 -2
- package/lib/dist/web/chunk-BPCJLNBS.js +0 -47
- package/lib/dist/web/chunk-BUXWEHIY.js +0 -1
- package/lib/dist/web/chunk-CYXQILZI.js +0 -1
- package/lib/dist/web/chunk-DLQPZWSI.css +0 -1
- package/lib/dist/web/chunk-DOKZOFKM.js +0 -1
- package/lib/dist/web/chunk-DTWIJ3GJ.js +0 -1
- package/lib/dist/web/chunk-DYRFLPJA.js +0 -1
- package/lib/dist/web/chunk-E27QAKAB.js +0 -1
- package/lib/dist/web/chunk-E3J3CXR5.js +0 -1
- package/lib/dist/web/chunk-E73OX2P7.js +0 -1
- package/lib/dist/web/chunk-EAXRKDLV.js +0 -1
- package/lib/dist/web/chunk-EBKKDHYI.js +0 -1
- package/lib/dist/web/chunk-EE7V7Q5P.js +0 -1
- package/lib/dist/web/chunk-EKY2FUHU.js +0 -1
- package/lib/dist/web/chunk-EP6XOPXH.js +0 -1
- package/lib/dist/web/chunk-ESGDLJOJ.js +0 -1
- package/lib/dist/web/chunk-ETJG7NCY.js +0 -1
- package/lib/dist/web/chunk-EUUEFEDI.js +0 -1
- package/lib/dist/web/chunk-EXBUKHH2.js +0 -17
- package/lib/dist/web/chunk-F5TBUYDH.js +0 -1
- package/lib/dist/web/chunk-FC3R7YHR.js +0 -4
- package/lib/dist/web/chunk-FGNZDHTL.js +0 -11
- package/lib/dist/web/chunk-FIJW2UNJ.js +0 -1
- package/lib/dist/web/chunk-FMV5PXRC.js +0 -5
- package/lib/dist/web/chunk-G7RXFHYO.js +0 -1
- package/lib/dist/web/chunk-G7VZT5KB.js +0 -3
- package/lib/dist/web/chunk-GRZYXPSO.js +0 -7
- package/lib/dist/web/chunk-GYGPS3AN.js +0 -1
- package/lib/dist/web/chunk-H723TYYD.js +0 -2
- package/lib/dist/web/chunk-H7AF7YS4.js +0 -1
- package/lib/dist/web/chunk-HDZDQILN.js +0 -1
- package/lib/dist/web/chunk-HMK6UO6N.js +0 -1
- package/lib/dist/web/chunk-HSJNHNOH.js +0 -6
- package/lib/dist/web/chunk-IHEE5NYJ.js +0 -1
- package/lib/dist/web/chunk-IOB4JJT4.js +0 -1
- package/lib/dist/web/chunk-ISNEBICW.js +0 -1
- package/lib/dist/web/chunk-J2GZVLHH.js +0 -1
- package/lib/dist/web/chunk-JGDK6YKG.js +0 -1
- package/lib/dist/web/chunk-JLOJCDIY.js +0 -1
- package/lib/dist/web/chunk-JPSYO24K.js +0 -1
- package/lib/dist/web/chunk-JTFXTIPE.js +0 -903
- package/lib/dist/web/chunk-K7UD24Z4.js +0 -1
- package/lib/dist/web/chunk-KYSTCHAH.js +0 -1
- package/lib/dist/web/chunk-LB6JPLX2.js +0 -1
- package/lib/dist/web/chunk-LNSVDHCI.js +0 -1
- package/lib/dist/web/chunk-LVGIY3SO.js +0 -1
- package/lib/dist/web/chunk-LXLHIHEN.js +0 -1
- package/lib/dist/web/chunk-MNFTHCSJ.js +0 -1
- package/lib/dist/web/chunk-N6SS4G6S.js +0 -1
- package/lib/dist/web/chunk-NKPK3BR3.js +0 -1
- package/lib/dist/web/chunk-NTBJG6SJ.js +0 -1
- package/lib/dist/web/chunk-NUDB3Q2Y.js +0 -3
- package/lib/dist/web/chunk-OTQR5VFM.js +0 -1
- package/lib/dist/web/chunk-OXEF5E3E.js +0 -1
- package/lib/dist/web/chunk-P62EJGSF.js +0 -1
- package/lib/dist/web/chunk-PCW6R7OP.js +0 -1
- package/lib/dist/web/chunk-PGGJPDJG.js +0 -1
- package/lib/dist/web/chunk-POCVU4VK.js +0 -2
- package/lib/dist/web/chunk-PS6HRYQQ.js +0 -3
- package/lib/dist/web/chunk-PUYSJNJR.js +0 -1
- package/lib/dist/web/chunk-PZSU53SS.js +0 -1
- package/lib/dist/web/chunk-Q2RVFS45.js +0 -1
- package/lib/dist/web/chunk-Q7L6LLAK.js +0 -1
- package/lib/dist/web/chunk-QCMKJIWY.js +0 -1
- package/lib/dist/web/chunk-QH6CF3M3.js +0 -1
- package/lib/dist/web/chunk-QIZ65CGB.js +0 -1
- package/lib/dist/web/chunk-QPA2REUE.js +0 -1
- package/lib/dist/web/chunk-QQ5LD7PI.js +0 -1
- package/lib/dist/web/chunk-QR6L3KAC.js +0 -1
- package/lib/dist/web/chunk-R2DLK4HO.js +0 -1
- package/lib/dist/web/chunk-RD6TVPOT.js +0 -1
- package/lib/dist/web/chunk-RKY4EJYJ.js +0 -1
- package/lib/dist/web/chunk-RONYWVY7.js +0 -1
- package/lib/dist/web/chunk-RXKXYF2C.js +0 -1
- package/lib/dist/web/chunk-SQPYSOV6.js +0 -1
- package/lib/dist/web/chunk-SWKJRNYY.js +0 -1
- package/lib/dist/web/chunk-SYGIPC2P.js +0 -4
- package/lib/dist/web/chunk-T7AZ65JP.js +0 -1
- package/lib/dist/web/chunk-TCZDVOHD.js +0 -1
- package/lib/dist/web/chunk-TPTITA3V.js +0 -1
- package/lib/dist/web/chunk-TR335633.js +0 -1
- package/lib/dist/web/chunk-TWVVIWKO.js +0 -1
- package/lib/dist/web/chunk-U67LRNER.js +0 -1
- package/lib/dist/web/chunk-UR5KDXPX.js +0 -1
- package/lib/dist/web/chunk-UR6O2GEH.js +0 -1
- package/lib/dist/web/chunk-USVLLFVR.js +0 -1
- package/lib/dist/web/chunk-UTNMGWTP.js +0 -1
- package/lib/dist/web/chunk-V74ZPP4B.js +0 -1
- package/lib/dist/web/chunk-VECWMHJP.js +0 -1
- package/lib/dist/web/chunk-VUACT35R.js +0 -3
- package/lib/dist/web/chunk-VZI7H4SZ.js +0 -1
- package/lib/dist/web/chunk-WB6YHOD4.js +0 -1
- package/lib/dist/web/chunk-WBJ5VEB5.js +0 -1
- package/lib/dist/web/chunk-WBT64AWV.js +0 -1
- package/lib/dist/web/chunk-WFXJIXZE.js +0 -4
- package/lib/dist/web/chunk-WTGYRH3Z.js +0 -298
- package/lib/dist/web/chunk-WXTCVDTP.js +0 -1
- package/lib/dist/web/chunk-XAUQEKZX.js +0 -1
- package/lib/dist/web/chunk-XCDHWLVH.js +0 -1
- package/lib/dist/web/chunk-Y3H6FFUZ.js +0 -1
- package/lib/dist/web/chunk-Y4F5ULGJ.js +0 -1
- package/lib/dist/web/chunk-YEGKAAEE.js +0 -1
- package/lib/dist/web/chunk-YM2KU57F.js +0 -1
- package/lib/dist/web/chunk-YNYVOPWF.js +0 -1
- package/lib/dist/web/chunk-YRERBP6T.js +0 -1
- package/lib/dist/web/chunk-YV5LB22R.js +0 -1
- package/lib/dist/web/chunk-YWIRU745.js +0 -1
- package/lib/dist/web/chunk-YXYPTZ6E.js +0 -1
- package/lib/dist/web/chunk-ZLV4VCDG.js +0 -3
- package/lib/dist/web/chunk-ZTVI5KFF.js +0 -1
- package/lib/dist/web/favicon-16.png +0 -0
- package/lib/dist/web/favicon-180.png +0 -0
- package/lib/dist/web/favicon-32.png +0 -0
- package/lib/dist/web/favicon-512.png +0 -0
- package/lib/dist/web/favicon-small.svg +0 -15
- package/lib/dist/web/favicon.ico +0 -0
- package/lib/dist/web/favicon.svg +0 -20
- package/lib/dist/web/icon-192.png +0 -0
- package/lib/dist/web/icon-512.png +0 -0
- package/lib/dist/web/index.html +0 -146
- package/lib/dist/web/main-ESADRXN2.css +0 -1
- package/lib/dist/web/main-FY3HQ4PX.js +0 -1
- package/lib/dist/web/manifest.webmanifest +0 -15
- package/lib/dist/web/media/codicon-LN6W7LCM.ttf +0 -0
- package/lib/dist/web/styles-KSOPUVDA.css +0 -1
- package/lib/dist/web/sw.js +0 -69
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* }
|
|
15
15
|
* const hit = serveStatic(req.url);
|
|
16
16
|
* if (hit) { reply.type(hit.contentType).send(hit.body); return; }
|
|
17
|
+
* if (isAssetPath(req.url)) { reply.code(404).send({ error: 'not found' }); return; }
|
|
17
18
|
* reply.code(200).type('text/html').send(cachedIndex);
|
|
18
19
|
* });
|
|
19
20
|
*
|
|
@@ -44,6 +45,35 @@ const CT = {
|
|
|
44
45
|
'.txt': 'text/plain; charset=utf-8',
|
|
45
46
|
'.wasm': 'application/wasm',
|
|
46
47
|
};
|
|
48
|
+
/**
|
|
49
|
+
* Whether a URL path names a static asset (its final segment ends in a
|
|
50
|
+
* recognized asset extension). Used by the SPA fallback to answer a MISSING
|
|
51
|
+
* asset with 404 instead of index.html (REQ-OFFLINE-005): serving HTML at an
|
|
52
|
+
* asset URL poisons the browser's and the offline service worker's caches —
|
|
53
|
+
* a tab holding a stale build requests its old content-hashed bundle, gets
|
|
54
|
+
* the shell, and stores HTML under the bundle URL until site data is cleared.
|
|
55
|
+
*
|
|
56
|
+
* Only extensions from the content-type table count — client routes with
|
|
57
|
+
* dotted params (`/specs/REQ-OFFLINE-001.A1`) must keep the shell fallback.
|
|
58
|
+
*/
|
|
59
|
+
export function isAssetPath(urlPath) {
|
|
60
|
+
const qIdx = urlPath.indexOf('?');
|
|
61
|
+
const hIdx = urlPath.indexOf('#');
|
|
62
|
+
let clean = urlPath;
|
|
63
|
+
if (qIdx >= 0)
|
|
64
|
+
clean = clean.slice(0, qIdx);
|
|
65
|
+
if (hIdx >= 0)
|
|
66
|
+
clean = clean.slice(0, hIdx);
|
|
67
|
+
let decoded;
|
|
68
|
+
try {
|
|
69
|
+
decoded = decodeURIComponent(clean);
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
decoded = clean;
|
|
73
|
+
}
|
|
74
|
+
const ext = path.extname(decoded).toLowerCase();
|
|
75
|
+
return ext !== '' && ext in CT;
|
|
76
|
+
}
|
|
47
77
|
export function makeStaticHandler(rootDir) {
|
|
48
78
|
const absRoot = path.resolve(rootDir);
|
|
49
79
|
return function serveStatic(urlPath) {
|
|
@@ -11,10 +11,10 @@ worktree:
|
|
|
11
11
|
enabled: true
|
|
12
12
|
|
|
13
13
|
# Two entry shapes (provide exactly one source):
|
|
14
|
-
# - CONNECTOR_URL — a live claude.ai/design URL (the `/specship:design
|
|
15
|
-
#
|
|
14
|
+
# - CONNECTOR_URL — a live claude.ai/design URL (the `/specship:spec design <url>`
|
|
15
|
+
# import path). The snapshot node fetches it, preferring the `designer` MCP.
|
|
16
16
|
# - HANDOFF_DIR — a designer handoff bundle already on disk (the
|
|
17
|
-
# `/specship:design
|
|
17
|
+
# `/specship:spec design` taste loop, after the human-tasted loop + designer_handoff).
|
|
18
18
|
# The snapshot node reads files straight from the bundle — no fetch, no CDP.
|
|
19
19
|
# Optional inputs default to "" (see the CLI's declared-default handling), so a
|
|
20
20
|
# `$INPUT.X` reference to an omitted optional input resolves to "" rather than
|
|
@@ -102,14 +102,18 @@ nodes:
|
|
|
102
102
|
bash: |
|
|
103
103
|
# Run the project's test suite. The verify node's exit code drives
|
|
104
104
|
# the gating for the link node — non-zero halts the workflow.
|
|
105
|
+
# The VERIFY_RESULT marker is the machine-readable contract the link
|
|
106
|
+
# node routes on (REQ-IMPLINT-001.A1): a skipped run must never be
|
|
107
|
+
# mistaken for a passing one.
|
|
105
108
|
if [ -f package.json ]; then
|
|
106
|
-
npm test
|
|
109
|
+
if npm test; then echo "VERIFY_RESULT=ran-and-passed"; else echo "VERIFY_RESULT=ran-and-failed"; exit 1; fi
|
|
107
110
|
elif [ -f Cargo.toml ]; then
|
|
108
|
-
cargo test
|
|
111
|
+
if cargo test; then echo "VERIFY_RESULT=ran-and-passed"; else echo "VERIFY_RESULT=ran-and-failed"; exit 1; fi
|
|
109
112
|
elif [ -f pyproject.toml ] || [ -f requirements.txt ]; then
|
|
110
|
-
python -m pytest
|
|
113
|
+
if python -m pytest; then echo "VERIFY_RESULT=ran-and-passed"; else echo "VERIFY_RESULT=ran-and-failed"; exit 1; fi
|
|
111
114
|
else
|
|
112
|
-
echo "no recognised test framework;
|
|
115
|
+
echo "no recognised test framework; tests did NOT run"
|
|
116
|
+
echo "VERIFY_RESULT=skipped"
|
|
113
117
|
fi
|
|
114
118
|
|
|
115
119
|
- id: link
|
|
@@ -124,9 +128,15 @@ nodes:
|
|
|
124
128
|
Assert spec→code links for the changes made in the implement step.
|
|
125
129
|
For each symbol that implements $INPUT.SPEC_ID (or its child
|
|
126
130
|
requirements), call specship_link_assert with the spec_id, the
|
|
127
|
-
file path, and the qualified symbol name.
|
|
128
|
-
|
|
129
|
-
|
|
131
|
+
file path, and the qualified symbol name.
|
|
132
|
+
|
|
133
|
+
Then route on the VERIFY_RESULT marker in the test results below
|
|
134
|
+
(REQ-IMPLINT-001):
|
|
135
|
+
- VERIFY_RESULT=ran-and-passed → after each assert, call
|
|
136
|
+
specship_link_verify with result="pass".
|
|
137
|
+
- VERIFY_RESULT=skipped → do NOT call specship_link_verify at all;
|
|
138
|
+
the links stay in the `implemented` state. Tests that did not run
|
|
139
|
+
are never reported as passing.
|
|
130
140
|
|
|
131
141
|
Implementation diff summary:
|
|
132
142
|
$implement.output
|
|
@@ -135,16 +145,38 @@ nodes:
|
|
|
135
145
|
$verify.output
|
|
136
146
|
|
|
137
147
|
Output: a short list of "spec_id → file:symbol [verified|implemented]"
|
|
138
|
-
lines
|
|
148
|
+
lines, ending with one line stating whether verification ran or was
|
|
149
|
+
skipped.
|
|
150
|
+
|
|
151
|
+
- id: coverage
|
|
152
|
+
kind: prompt
|
|
153
|
+
depends_on: [link]
|
|
154
|
+
output_type: coverage_summary
|
|
155
|
+
allowed_tools:
|
|
156
|
+
- mcp__specship__specship_spec
|
|
157
|
+
prompt: |
|
|
158
|
+
Report acceptance-criteria test coverage for $INPUT.SPEC_ID
|
|
159
|
+
(REQ-IMPLINT-002). Call specship_spec with the spec_id, count its
|
|
160
|
+
acceptance criteria (the .A<N> children; if the spec has none,
|
|
161
|
+
treat the requirement itself as one criterion), and count how many
|
|
162
|
+
of them carry a `tests`-kind link.
|
|
163
|
+
|
|
164
|
+
Output exactly one or two lines:
|
|
165
|
+
- "N of M acceptance criteria for $INPUT.SPEC_ID have linked tests."
|
|
166
|
+
- If N < M, add: "Close the gap with /specship:spec behaviour
|
|
167
|
+
$INPUT.SPEC_ID."
|
|
139
168
|
|
|
140
169
|
- id: final_review
|
|
141
170
|
kind: approval
|
|
142
|
-
depends_on: [
|
|
171
|
+
depends_on: [coverage]
|
|
143
172
|
message: |
|
|
144
173
|
Implementation complete for $INPUT.SPEC_ID.
|
|
145
174
|
|
|
146
175
|
Links asserted:
|
|
147
176
|
$link.output
|
|
148
177
|
|
|
178
|
+
Acceptance-criteria test coverage:
|
|
179
|
+
$coverage.output
|
|
180
|
+
|
|
149
181
|
Approve to finalize the run (worktree is left for you to inspect
|
|
150
182
|
and merge), or reject to abandon.
|
package/lib/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@specship/specship",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Supercharge Claude Code with semantic code intelligence. 94% fewer tool calls • 77% faster exploration • 100% local.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"selectors.json"
|
|
19
19
|
],
|
|
20
20
|
"scripts": {
|
|
21
|
-
"build": "tsc && tsc -p src/designer/tsconfig.json && npm run copy-assets && npm run build:server &&
|
|
21
|
+
"build": "tsc && tsc -p src/designer/tsconfig.json && npm run copy-assets && npm run build:server && node -e \"require('fs').chmodSync('dist/bin/specship.js', 0o755)\"",
|
|
22
|
+
"build:core": "tsc && tsc -p src/designer/tsconfig.json && npm run copy-assets && node -e \"require('fs').chmodSync('dist/bin/specship.js', 0o755)\"",
|
|
22
23
|
"build:server": "node scripts/build-server-bundle.mjs",
|
|
23
|
-
"build:web": "node scripts/build-web-bundle.mjs",
|
|
24
24
|
"preuninstall": "node dist/bin/uninstall.js",
|
|
25
25
|
"copy-assets": "node -e \"const fs=require('fs');fs.mkdirSync('dist/db',{recursive:true});fs.copyFileSync('src/db/schema.sql','dist/db/schema.sql');fs.mkdirSync('dist/extraction/wasm',{recursive:true});fs.readdirSync('src/extraction/wasm').filter(f=>f.endsWith('.wasm')).forEach(f=>fs.copyFileSync('src/extraction/wasm/'+f,'dist/extraction/wasm/'+f));try{fs.mkdirSync('dist/workflows/defaults',{recursive:true});fs.readdirSync('src/workflows/defaults').filter(f=>/\\.ya?ml$/i.test(f)).forEach(f=>fs.copyFileSync('src/workflows/defaults/'+f,'dist/workflows/defaults/'+f))}catch(e){};['commands','agents','hooks','.claude-plugin'].forEach(d=>{try{fs.cpSync(d,'dist/'+d,{recursive:true})}catch(e){}})\"",
|
|
26
26
|
"dev": "tsc --watch",
|
package/package.json
CHANGED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Import a Claude Design (or Figma) file, snapshot it for zero-loss reference, draft a SpecShip spec, and hand off to /specship:spec implement.
|
|
3
|
-
argument-hint: <Claude-Design-URL> [SLUG]
|
|
4
|
-
allowed-tools: Read, Write, Edit, Bash, mcp__specship__specship_explore, mcp__specship__specship_search, mcp__specship__specship_node, mcp__specship__specship_spec, mcp__specship__specship_files
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# SpecShip Design → Spec → Implement: `$ARGUMENTS`
|
|
8
|
-
|
|
9
|
-
> **Already settled on a design?** This command imports it by URL. If you instead want to *run
|
|
10
|
-
> the taste loop first* — iterate variants with the human via the `designer` MCP and only then
|
|
11
|
-
> spec the chosen one — use **`/specship:design-loop`**, which drives the loop and hands the resulting
|
|
12
|
-
> bundle to this same workflow via its `HANDOFF_DIR` input.
|
|
13
|
-
|
|
14
|
-
Run the bundled `claude-design-implement` workflow against the Claude Design URL in `$ARGUMENTS`. The workflow:
|
|
15
|
-
|
|
16
|
-
1. **Snapshots** the design source byte-for-byte into `specs/<slug>/snapshot.html` (zero-loss fidelity layer).
|
|
17
|
-
2. **Records the import** in `specs/<slug>/source.md` (audit trail — URL, project ID, date, original prompt verbatim).
|
|
18
|
-
3. **Extracts design tokens** into `specs/<slug>/tokens.css`, mapped onto your project's existing token system where possible.
|
|
19
|
-
4. **Drafts a spec** at `specs/<slug>.md` covering behavioural contract, accessibility, responsive, interaction states, and data shape — **without** pixel values or hex colors (those stay in the snapshot + tokens).
|
|
20
|
-
5. **Pauses at an approval gate** for you to walk the `[needs review]` markers and gap-fill questions.
|
|
21
|
-
6. **Writes the spec** and `specship sync`s it into the graph.
|
|
22
|
-
7. **Hands off** with the next command: `/specship:spec implement <first REQ ID>`.
|
|
23
|
-
|
|
24
|
-
## How to invoke
|
|
25
|
-
|
|
26
|
-
Parse `$ARGUMENTS`. The first token must be a Claude Design URL of the form:
|
|
27
|
-
|
|
28
|
-
```
|
|
29
|
-
https://claude.ai/design/p/<project-id>/?file=<File+Name>.html
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Optional second token is the slug (kebab-case directory name). If omitted, derive from the `file=` query param (e.g. `Data+Flow.html` → `data-flow`).
|
|
33
|
-
|
|
34
|
-
Then run:
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
specship workflow run claude-design-implement \
|
|
38
|
-
--input CONNECTOR_URL="<URL>" \
|
|
39
|
-
--input FILE_LABEL="<File Name>" \
|
|
40
|
-
--input SLUG="<slug>"
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
(Add `--input OWNER="<team>"` and `--input PRIORITY="high|medium|low"` if you want them populated in the spec frontmatter; otherwise they're marked `[needs review]` and surfaced in the gap-fill step.)
|
|
44
|
-
|
|
45
|
-
## Why the four-file pattern
|
|
46
|
-
|
|
47
|
-
The workflow produces four files in `specs/<slug>/` rather than a single spec. This is deliberate:
|
|
48
|
-
|
|
49
|
-
| File | Role | Drift-tracked? |
|
|
50
|
-
|---|---|---|
|
|
51
|
-
| `snapshot.html` | Byte-for-byte design capture | No (frozen reference) |
|
|
52
|
-
| `source.md` | Import audit record | No (metadata) |
|
|
53
|
-
| `tokens.css` | Design tokens — CSS variables | No (reference data) |
|
|
54
|
-
| `specs/<slug>.md` | Contract: REQs, acceptance criteria | **Yes — drift gate on this** |
|
|
55
|
-
|
|
56
|
-
Specs that name pixel values flag drift on every theme tweak; specs that name token symbols (`MUST use --error`) survive token-value changes silently. The split keeps the drift queue meaningful.
|
|
57
|
-
|
|
58
|
-
## After the workflow finishes
|
|
59
|
-
|
|
60
|
-
You get a hand-off message listing the REQs. Run:
|
|
61
|
-
|
|
62
|
-
```
|
|
63
|
-
/specship:spec implement <REQ-XXX-001>
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
The implementation phase reads:
|
|
67
|
-
- `specs/<slug>.md` for what to build
|
|
68
|
-
- `specs/<slug>/snapshot.html` for how it should look
|
|
69
|
-
- `specs/<slug>/tokens.css` for which design tokens to wire up
|
|
70
|
-
|
|
71
|
-
This is what preserves visual fidelity — the snapshot is on disk and the implementer reads it directly. The spec layer enforces contract; the snapshot layer guarantees fidelity.
|
|
72
|
-
|
|
73
|
-
## When the designer iterates
|
|
74
|
-
|
|
75
|
-
Re-run `/specship:design-implement` with the same URL. The workflow re-snapshots, re-drafts, re-prompts for approval — keeping existing REQ IDs stable so any in-flight implementation work survives the iteration. `git diff` on the snapshot tells you exactly what changed visually; `git diff` on `specs/<slug>.md` tells you what changed contractually.
|
|
76
|
-
|
|
77
|
-
## Anti-patterns
|
|
78
|
-
|
|
79
|
-
- **Don't put hex codes in the spec.** Reference tokens by name. The values live in `tokens.css`.
|
|
80
|
-
- **Don't delete the snapshot after implementation.** It's the durable reference if the Claude Design URL ever goes 404.
|
|
81
|
-
- **Don't paraphrase the snapshot.** Save byte-for-byte. Summarising loses detail that the implementation step would otherwise have used.
|
|
82
|
-
- **Don't skip the approval gate.** The workflow's value is the gap-fill questions surfaced there — answering them is what closes the "no details lost" gap on the things a static design can't show (failure modes, real-time updates, keyboard order).
|
|
83
|
-
|
|
84
|
-
If `$ARGUMENTS` is empty or doesn't look like a Claude Design URL, ask the user for the URL before running the workflow.
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Run the full design→code loop — taste a claude.ai/design with the human via the designer MCP, then snapshot → spec → review → hand off to /specship:spec implement. Two human gates.
|
|
3
|
-
argument-hint: [intent — what you want to design]
|
|
4
|
-
allowed-tools: Read, Write, Edit, Bash, mcp__specship__designer_session, mcp__specship__designer_prompt, mcp__specship__designer_ask, mcp__specship__designer_list, mcp__specship__designer_snapshot, mcp__specship__designer_handoff, mcp__specship__specship_explore, mcp__specship__specship_search, mcp__specship__specship_node, mcp__specship__specship_spec, mcp__specship__specship_files
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# SpecShip Design Loop: `$ARGUMENTS`
|
|
8
|
-
|
|
9
|
-
One continuous pipeline: **intent → taste → design → handoff → spec → `/specship:spec implement`**.
|
|
10
|
-
You (the orchestrator) drive `claude.ai/design` through the `designer` MCP while the
|
|
11
|
-
**human tastes** the variants, then promote the chosen design into a SpecShip spec via the
|
|
12
|
-
bundled `claude-design-implement` workflow. Two human gates:
|
|
13
|
-
|
|
14
|
-
- **Gate 1 (aesthetic):** the human says *"that's it"* in the taste loop. Driven here, conversationally.
|
|
15
|
-
- **Gate 2 (contract):** the human walks the spec's `[needs review]` markers at the workflow's approval gate.
|
|
16
|
-
|
|
17
|
-
This is the deeper companion to `/specship:design-implement` — that command imports a design you've
|
|
18
|
-
*already* settled on (by URL); this one runs the taste loop first, then hands the resulting
|
|
19
|
-
bundle to the same workflow. `$ARGUMENTS` is the human's opening intent (optional).
|
|
20
|
-
|
|
21
|
-
## Preflight
|
|
22
|
-
|
|
23
|
-
1. **Designer runtime ready?** The designer tools are part of SpecShip's MCP now
|
|
24
|
-
(`mcp__specship__designer_*`), so they're always present. Probe the *runtime* with
|
|
25
|
-
`designer_session({ action: "status" })`: a clean status means you're ready. If it errors
|
|
26
|
-
with "CDP not up" or "Not signed in", the one-time Chrome setup hasn't run — tell the human to
|
|
27
|
-
run `designer setup` (creates the debug-Chrome profile + login) and stop. Do NOT fall back to a
|
|
28
|
-
blind fetch; the taste loop needs the live browser.
|
|
29
|
-
2. **SpecShip initialized?** `specship status` should succeed. If not, `specship init -i` first.
|
|
30
|
-
|
|
31
|
-
## Phase A — Taste loop (Gate 1)
|
|
32
|
-
|
|
33
|
-
Follow the **`designer-loop` skill** (`~/.claude/skills/designer-loop/SKILL.md`) — it is the
|
|
34
|
-
authority on this loop. The condensed version, if the skill isn't installed:
|
|
35
|
-
|
|
36
|
-
> The human is the designer; Claude Design has taste; you are translation + plumbing. Don't
|
|
37
|
-
> propose your own variants, don't interview about aesthetics — scope questions only.
|
|
38
|
-
|
|
39
|
-
1. **Read the room — capabilities drive the design.** Before relaying any intent, survey the
|
|
40
|
-
target repo for what it actually *does* and feed that into the prompt verbatim. Use
|
|
41
|
-
`specship_explore` / `specship_search` to pull: entities + their fields, operations /
|
|
42
|
-
endpoints, states (loading / empty / error / success), failure modes, hard constraints
|
|
43
|
-
(auth, rate limits), and existing design tokens. The human's intent tells Claude *how*; the
|
|
44
|
-
codebase tells it *what*. Transfer capability facts unabridged — summarizing is filtering.
|
|
45
|
-
2. **Create / resume the session.** `designer_session({ key: "<slug>", action: "create",
|
|
46
|
-
name: "<seed intent>", fidelity: "highfi" })`. Reuse a stable `key` derived from the intent
|
|
47
|
-
so parallel loops don't collide.
|
|
48
|
-
3. **Relay a minimal, faithful prompt.** `designer_prompt({ key, prompt })` — intent +
|
|
49
|
-
capability facts; let Claude's taste make the aesthetic calls. Ask for the variant shape you
|
|
50
|
-
want ("3 full-page files", "states as toggles") and lock any hard brand tokens explicitly.
|
|
51
|
-
4. **Hand the human the URL** returned in `url`. That live surface has working tweak sliders and
|
|
52
|
-
the variant switcher — it is the default taste path. Ask *"what do you think?"*, not
|
|
53
|
-
"accept or reject?".
|
|
54
|
-
5. **Interpret + iterate.** Translate each reaction into the next `designer_prompt` (or a cheap
|
|
55
|
-
`designer_ask` to consult Claude on a small adjustment). Repeat 3–4 until the human says
|
|
56
|
-
**"that's it."** Capture their final reaction verbatim — it goes in the record.
|
|
57
|
-
|
|
58
|
-
Stay in the loop until Gate 1 is explicitly passed. "Almost" is not "yes."
|
|
59
|
-
|
|
60
|
-
## Bridge — promote the chosen design
|
|
61
|
-
|
|
62
|
-
1. `designer_handoff({ key, openFile: "<chosen variant>.html" })`. This fetches the project
|
|
63
|
-
export zip into `./artifacts/<key>/handoff-<ts>/` — `project/*` (all variants + assets) plus
|
|
64
|
-
`decision-record.md` (the verbatim transcript + the human's final reaction). Note the
|
|
65
|
-
**absolute path** of that `handoff-<ts>/` directory and the **chosen variant filename**.
|
|
66
|
-
2. Derive `FILE_LABEL` (human label) and `SLUG` (kebab-case) from the chosen file / intent. If
|
|
67
|
-
the slug is ambiguous, ask the human — one scope question, not an interview.
|
|
68
|
-
|
|
69
|
-
## Phase B — Spec pipeline (Gate 2)
|
|
70
|
-
|
|
71
|
-
Run the bundled workflow against the bundle on disk (no re-fetch, no CDP):
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
specship workflow run claude-design-implement \
|
|
75
|
-
--input HANDOFF_DIR="<absolute path to handoff-<ts>/>" \
|
|
76
|
-
--input CHOSEN_FILE="<chosen variant>.html" \
|
|
77
|
-
--input FILE_LABEL="<File Label>" \
|
|
78
|
-
--input SLUG="<slug>" \
|
|
79
|
-
--json
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
(Add `--input OWNER="<team>"` / `--input PRIORITY="high|medium|low"` to populate frontmatter;
|
|
83
|
-
otherwise they default to empty and surface as `[needs review]`.)
|
|
84
|
-
|
|
85
|
-
The workflow runs headless to its approval gate, then **pauses** (status `paused`). It:
|
|
86
|
-
snapshots `project/<chosen>.html` byte-for-byte into `specs/<slug>/snapshot.html`, folds
|
|
87
|
-
`decision-record.md` into `specs/<slug>/source.md`, extracts `specs/<slug>/tokens.css`, and
|
|
88
|
-
drafts the spec.
|
|
89
|
-
|
|
90
|
-
**At the pause (Gate 2):** read the run's approval message / the drafted spec artifact, present
|
|
91
|
-
it to the human, and walk the `[needs review]` markers + gap-fill questions together. Then:
|
|
92
|
-
|
|
93
|
-
- **Approve:** `specship workflow approve <runId> --comment "<gap-fill answers>"` then
|
|
94
|
-
`specship workflow resume <runId>`. The answers are captured into the spec.
|
|
95
|
-
- **Needs changes:** collect the feedback and re-run the workflow (a reject cancels the run;
|
|
96
|
-
existing REQ IDs are preserved across re-imports, so in-flight work survives).
|
|
97
|
-
|
|
98
|
-
## Phase C — Hand off to implementation
|
|
99
|
-
|
|
100
|
-
When the workflow completes it prints the bridge message. Relay it to the human:
|
|
101
|
-
- the spec path `specs/<slug>.md` and its REQ IDs,
|
|
102
|
-
- the reference files (`snapshot.html`, `tokens.css`, `source.md`),
|
|
103
|
-
- the exact next step: **`/specship:spec implement <first REQ ID>`**.
|
|
104
|
-
|
|
105
|
-
Remind them: the implementer reads `snapshot.html` for visual fidelity — the spec is
|
|
106
|
-
contract-only.
|
|
107
|
-
|
|
108
|
-
## Anti-patterns
|
|
109
|
-
|
|
110
|
-
- **Skipping the capability survey.** Designing before reading what the repo *does* produces
|
|
111
|
-
designs that look good and don't fit. Phase A step 1 is load-bearing.
|
|
112
|
-
- **Proposing your own variants / interviewing about taste.** Claude Design proposes; you relay.
|
|
113
|
-
Scope questions only.
|
|
114
|
-
- **Auto-promoting.** Don't `designer_handoff` on every iteration — only once Gate 1 passes.
|
|
115
|
-
- **Re-fetching in the workflow.** Always pass `HANDOFF_DIR` (the bundle you just fetched), never
|
|
116
|
-
`CONNECTOR_URL` — that re-drives Chrome from a headless subprocess and is fragile. The URL path
|
|
117
|
-
is what `/specship:design-implement` is for.
|
|
118
|
-
- **Putting hex/pixels in the spec.** Reference tokens by name; values live in `tokens.css`.
|
|
119
|
-
- **Skipping Gate 2.** The gap-fill questions are where the static design's blind spots (failure
|
|
120
|
-
modes, real-time updates, keyboard order) get closed.
|
|
121
|
-
|
|
122
|
-
If `designer_session` errors with a CDP / sign-in problem, stop and route the human to
|
|
123
|
-
`designer setup` (debug-Chrome profile + login) — this command cannot run the taste loop without
|
|
124
|
-
the live browser. To import a design you've already settled on by URL, use
|
|
125
|
-
`/specship:design-implement <url>` instead.
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Author end-to-end tests for a requirement from its acceptance criteria — a Playwright UI test and/or a backend/batch API test per criterion — preview and confirm before writing, link each test to its .A<N> criterion, then run them and record pass/fail into the spec→test→verify chain.
|
|
3
|
-
argument-hint: <REQ-ID>
|
|
4
|
-
allowed-tools: Read, Edit, Write, Bash, mcp__specship__specship_spec, mcp__specship__specship_explore, mcp__specship__specship_search, mcp__specship__specship_node, mcp__specship__specship_link_assert, mcp__specship__specship_link_verify
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# SpecShip Behaviour: `$ARGUMENTS`
|
|
8
|
-
|
|
9
|
-
Turn a requirement's **acceptance criteria** into runnable **end-to-end tests** —
|
|
10
|
-
a Playwright UI journey and/or a backend/batch API test for each criterion — and
|
|
11
|
-
feed the results into the spec→test→verify chain that `specship check` gates on.
|
|
12
|
-
|
|
13
|
-
You author and run the tests; SpecShip supplies the flow map and records the
|
|
14
|
-
verification state; **the human gates the write**. This is distinct from
|
|
15
|
-
`/ss-implement` (which writes the *feature* code) — `/ss-behaviour` writes the
|
|
16
|
-
*tests* that prove the requirement behaves.
|
|
17
|
-
|
|
18
|
-
**Governing principle — propose, never auto-apply.** Test files reach disk ONLY
|
|
19
|
-
after explicit human confirmation (step 4). Running them afterwards is
|
|
20
|
-
non-destructive and proceeds automatically. If the human does not confirm, you
|
|
21
|
-
write **nothing**.
|
|
22
|
-
|
|
23
|
-
If `$ARGUMENTS` is empty, ask which requirement to test (or use `specship_spec`
|
|
24
|
-
with a `query` to find it).
|
|
25
|
-
|
|
26
|
-
## 1. Load the requirement + its criteria
|
|
27
|
-
|
|
28
|
-
Call `mcp__specship__specship_spec` with the `spec_id`. Read the requirement and
|
|
29
|
-
its **acceptance criteria** (the `.A<N>` children) — each criterion is one
|
|
30
|
-
behaviour to test (REQ-BEHAVIOUR-002.A1).
|
|
31
|
-
|
|
32
|
-
## 2. Get the behaviour surface
|
|
33
|
-
|
|
34
|
-
Call `mcp__specship__specship_spec` with the `spec_id` **and
|
|
35
|
-
`behaviour_surface: true`**. It returns the requirement's linked code plus the
|
|
36
|
-
surrounding routes / components / handlers, grouped into:
|
|
37
|
-
|
|
38
|
-
- a **UI tier** — Playwright targets, and
|
|
39
|
-
- a **backend / batch tier** — API / job test targets.
|
|
40
|
-
|
|
41
|
-
An empty UI tier means the project (or this requirement) has no UI surface — you
|
|
42
|
-
will author backend/batch tests only (REQ-BEHAVIOUR-002.A4). Use
|
|
43
|
-
`specship_explore` / `specship_node` on any surface element whose flow you need
|
|
44
|
-
to understand before writing the test.
|
|
45
|
-
|
|
46
|
-
## 3. Detect the project's test conventions
|
|
47
|
-
|
|
48
|
-
Before writing anything, ground in how this repo already tests, and **mirror it**
|
|
49
|
-
(REQ-BEHAVIOUR-002.A3) — never impose a stack:
|
|
50
|
-
|
|
51
|
-
- UI: look for a Playwright config / an `e2e/` dir and its file naming.
|
|
52
|
-
- Backend: find the runner in use (vitest / jest / pytest / go test / …) and the
|
|
53
|
-
test file layout.
|
|
54
|
-
|
|
55
|
-
Use `specship_explore` on existing test files (e.g. `*.spec.ts`, `*.test.*`,
|
|
56
|
-
`e2e/`) and read a couple to match their style, fixtures, and import paths.
|
|
57
|
-
|
|
58
|
-
## 4. Plan, preview, confirm — then write + link
|
|
59
|
-
|
|
60
|
-
For **each acceptance criterion**, plan the end-to-end test(s)
|
|
61
|
-
(REQ-BEHAVIOUR-002.A1 / A2):
|
|
62
|
-
|
|
63
|
-
- If the criterion touches a **UI flow** → a Playwright test exercising it.
|
|
64
|
-
- If it touches a **backend/batch path** → an API/batch test.
|
|
65
|
-
- If it touches **both** → one of each.
|
|
66
|
-
|
|
67
|
-
Each test's title and file must name the `.A<N>` criterion it covers, so a
|
|
68
|
-
failure is traceable to a criterion.
|
|
69
|
-
|
|
70
|
-
**Preview the exact test files** (path + full contents) you will create and ask
|
|
71
|
-
for explicit confirmation, offering `confirm` / `edit` / `cancel`
|
|
72
|
-
(REQ-BEHAVIOUR-003.A1). **Write nothing until confirmed.**
|
|
73
|
-
|
|
74
|
-
On confirmation:
|
|
75
|
-
1. Write the test files (mirroring the detected conventions). A re-run of
|
|
76
|
-
`/ss-behaviour` on the same requirement **refreshes** existing tests rather
|
|
77
|
-
than duplicating them (REQ-BEHAVIOUR-003.A3).
|
|
78
|
-
2. For each test, call `mcp__specship__specship_link_assert` with
|
|
79
|
-
`kind: "tests"`, targeting the **`.A<N>` criterion** it covers
|
|
80
|
-
(REQ-BEHAVIOUR-003.A2). Keep the returned `link_id` for step 5.
|
|
81
|
-
3. Run `specship sync` and confirm the criteria + links index cleanly
|
|
82
|
-
(REQ-BEHAVIOUR-003.A4).
|
|
83
|
-
|
|
84
|
-
## 5. Run the tests, record the outcome
|
|
85
|
-
|
|
86
|
-
Run the relevant suite(s) with the project's runner (via `Bash`), then record
|
|
87
|
-
each result through `mcp__specship__specship_link_verify` (REQ-BEHAVIOUR-004):
|
|
88
|
-
|
|
89
|
-
- a test that **runs and passes** → `result: "pass"` (link → `verified`),
|
|
90
|
-
- a test that **runs and fails** → `result: "fail"` with the failure in `reason`
|
|
91
|
-
(link → `broken`),
|
|
92
|
-
- a suite that **could not be executed** (missing dependency, no dev server,
|
|
93
|
-
wrong environment) → **report it as unrun and do NOT call link_verify** for
|
|
94
|
-
those tests — leaving the link state unchanged. A test that didn't run is never
|
|
95
|
-
recorded as `broken` (REQ-BEHAVIOUR-004.A2).
|
|
96
|
-
|
|
97
|
-
## 6. Hand off
|
|
98
|
-
|
|
99
|
-
Summarize: which criteria now have `verified` / `broken` / unrun tests, and the
|
|
100
|
-
behaviour-gate status. The links now feed `specship check`'s behaviour gate
|
|
101
|
-
unchanged (REQ-BEHAVIOUR-004.A3): a `broken` link fails the gate when behaviour
|
|
102
|
-
gating is on; a requirement with no `verified` test is reported as unverified.
|
|
103
|
-
For a failing behaviour, fix the feature with `/ss-implement`, then re-run
|
|
104
|
-
`/ss-behaviour` (or just re-run the test and `specship_link_verify`).
|
|
105
|
-
|
|
106
|
-
## Anti-patterns
|
|
107
|
-
|
|
108
|
-
- **Writing test files before confirmation** — the one hard rule (step 4).
|
|
109
|
-
- **Marking a test `broken` when it never ran** — that false-fails the CI gate
|
|
110
|
-
(step 5).
|
|
111
|
-
- **Imposing a test stack** the repo doesn't use — mirror the existing
|
|
112
|
-
conventions (step 3).
|
|
113
|
-
- **Writing feature code** — that's `/ss-implement`. `/ss-behaviour` writes
|
|
114
|
-
tests, runs them, and records the result.
|
|
115
|
-
- **Generating Playwright tests when there's no UI** — the UI tier will be empty;
|
|
116
|
-
author backend/batch tests only.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-Q7L6LLAK.js";var e={comments:{lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}],folding:{offSide:!0}},t={defaultToken:"",tokenPostfix:".pug",ignoreCase:!0,brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],keywords:["append","block","case","default","doctype","each","else","extends","for","if","in","include","mixin","typeof","unless","var","when"],tags:["a","abbr","acronym","address","area","article","aside","audio","b","base","basefont","bdi","bdo","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","keygen","kbd","label","li","link","map","mark","menu","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","tracks","tt","u","ul","video","wbr"],symbols:/[\+\-\*\%\&\|\!\=\/\.\,\:]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^(\s*)([a-zA-Z_-][\w-]*)/,{cases:{"$2@tags":{cases:{"@eos":["","tag"],"@default":["",{token:"tag",next:"@tag.$1"}]}},"$2@keywords":["",{token:"keyword.$2"}],"@default":["",""]}}],[/^(\s*)(#[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.id"],"@default":["",{token:"tag.id",next:"@tag.$1"}]}}],[/^(\s*)(\.[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.class"],"@default":["",{token:"tag.class",next:"@tag.$1"}]}}],[/^(\s*)(\|.*)$/,""],{include:"@whitespace"},[/[a-zA-Z_$][\w$]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":""}}],[/[{}()\[\]]/,"@brackets"],[/@symbols/,"delimiter"],[/\d+\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\d+/,"number"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],tag:[[/(\.)(\s*$)/,[{token:"delimiter",next:"@blockText.$S2."},""]],[/\s+/,{token:"",next:"@simpleText"}],[/#[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.id",next:"@pop"},"@default":"tag.id"}}],[/\.[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.class",next:"@pop"},"@default":"tag.class"}}],[/\(/,{token:"delimiter.parenthesis",next:"@attributeList"}]],simpleText:[[/[^#]+$/,{token:"",next:"@popall"}],[/[^#]+/,{token:""}],[/(#{)([^}]*)(})/,{cases:{"@eos":["interpolation.delimiter","interpolation",{token:"interpolation.delimiter",next:"@popall"}],"@default":["interpolation.delimiter","interpolation","interpolation.delimiter"]}}],[/#$/,{token:"",next:"@popall"}],[/#/,""]],attributeList:[[/\s+/,""],[/(\w+)(\s*=\s*)("|')/,["attribute.name","delimiter",{token:"attribute.value",next:"@value.$3"}]],[/\w+/,"attribute.name"],[/,/,{cases:{"@eos":{token:"attribute.delimiter",next:"@popall"},"@default":"attribute.delimiter"}}],[/\)$/,{token:"delimiter.parenthesis",next:"@popall"}],[/\)/,{token:"delimiter.parenthesis",next:"@pop"}]],whitespace:[[/^(\s*)(\/\/.*)$/,{token:"comment",next:"@blockText.$1.comment"}],[/[ \t\r\n]+/,""],[/<!--/,{token:"comment",next:"@comment"}]],blockText:[[/^\s+.*$/,{cases:{"($S2\\s+.*$)":{token:"$S3"},"@default":{token:"@rematch",next:"@popall"}}}],[/./,{token:"@rematch",next:"@popall"}]],comment:[[/[^<\-]+/,"comment.content"],[/-->/,{token:"comment",next:"@pop"}],[/<!--/,"comment.content.invalid"],[/[<\-]/,"comment.content"]],string:[[/[^\\"'#]+/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/@escapes/,{cases:{"@eos":{token:"string.escape",next:"@popall"},"@default":"string.escape"}}],[/\\./,{cases:{"@eos":{token:"string.escape.invalid",next:"@popall"},"@default":"string.escape.invalid"}}],[/(#{)([^}]*)(})/,["interpolation.delimiter","interpolation","interpolation.delimiter"]],[/#/,"string"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":{token:"string"}}}]],value:[[/[^\\"']+/,{cases:{"@eos":{token:"attribute.value",next:"@popall"},"@default":"attribute.value"}}],[/\\./,{cases:{"@eos":{token:"attribute.value",next:"@popall"},"@default":"attribute.value"}}],[/["']/,{cases:{"$#==$S2":{token:"attribute.value",next:"@pop"},"@default":{token:"attribute.value"}}}]]}};export{e as conf,t as language};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"./chunk-Q7L6LLAK.js";var n=e=>`\\b${e}\\b`,t="[_a-zA-Z]",o="[_a-zA-Z0-9]",i=n(`${t}${o}*`),r=["targetScope","resource","module","param","var","output","for","in","if","existing"],s=["true","false","null"],c="[ \\t\\r\\n]",a="[0-9]+",g={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'"},{open:"'''",close:"'''"}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:"'''",close:"'''",notIn:["string","comment"]}],autoCloseBefore:`:.,=}])'
|
|
2
|
-
`,indentationRules:{increaseIndentPattern:new RegExp("^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$"),decreaseIndentPattern:new RegExp("^((?!.*?\\/\\*).*\\*/)?\\s*[\\}\\]].*$")}},l={defaultToken:"",tokenPostfix:".bicep",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],symbols:/[=><!~?:&|+\-*/^%]+/,keywords:r,namedLiterals:s,escapes:"\\\\(u{[0-9A-Fa-f]+}|n|r|t|\\\\|'|\\${)",tokenizer:{root:[{include:"@expression"},{include:"@whitespace"}],stringVerbatim:[{regex:"(|'|'')[^']",action:{token:"string"}},{regex:"'''",action:{token:"string.quote",next:"@pop"}}],stringLiteral:[{regex:"\\${",action:{token:"delimiter.bracket",next:"@bracketCounting"}},{regex:"[^\\\\'$]+",action:{token:"string"}},{regex:"@escapes",action:{token:"string.escape"}},{regex:"\\\\.",action:{token:"string.escape.invalid"}},{regex:"'",action:{token:"string",next:"@pop"}}],bracketCounting:[{regex:"{",action:{token:"delimiter.bracket",next:"@bracketCounting"}},{regex:"}",action:{token:"delimiter.bracket",next:"@pop"}},{include:"expression"}],comment:[{regex:"[^\\*]+",action:{token:"comment"}},{regex:"\\*\\/",action:{token:"comment",next:"@pop"}},{regex:"[\\/*]",action:{token:"comment"}}],whitespace:[{regex:c},{regex:"\\/\\*",action:{token:"comment",next:"@comment"}},{regex:"\\/\\/.*$",action:{token:"comment"}}],expression:[{regex:"'''",action:{token:"string.quote",next:"@stringVerbatim"}},{regex:"'",action:{token:"string.quote",next:"@stringLiteral"}},{regex:a,action:{token:"number"}},{regex:i,action:{cases:{"@keywords":{token:"keyword"},"@namedLiterals":{token:"keyword"},"@default":{token:"identifier"}}}}]}};export{g as conf,l as language};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-Q7L6LLAK.js";var e={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},t={tokenPostfix:".tcl",specialFunctions:["set","unset","rename","variable","proc","coroutine","foreach","incr","append","lappend","linsert","lreplace"],mainFunctions:["if","then","elseif","else","case","switch","while","for","break","continue","return","package","namespace","catch","exit","eval","expr","uplevel","upvar"],builtinFunctions:["file","info","concat","join","lindex","list","llength","lrange","lsearch","lsort","split","array","parray","binary","format","regexp","regsub","scan","string","subst","dict","cd","clock","exec","glob","pid","pwd","close","eof","fblocked","fconfigure","fcopy","fileevent","flush","gets","open","puts","read","seek","socket","tell","interp","after","auto_execok","auto_load","auto_mkindex","auto_reset","bgerror","error","global","history","load","source","time","trace","unknown","unset","update","vwait","winfo","wm","bind","event","pack","place","grid","font","bell","clipboard","destroy","focus","grab","lower","option","raise","selection","send","tk","tkwait","tk_bisque","tk_focusNext","tk_focusPrev","tk_focusFollowsMouse","tk_popup","tk_setPalette"],symbols:/[=><!~?:&|+\-*\/\^%]+/,brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],escapes:/\\(?:[abfnrtv\\"'\[\]\{\};\$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,variables:/(?:\$+(?:(?:\:\:?)?[a-zA-Z_]\w*)+)/,tokenizer:{root:[[/[a-zA-Z_]\w*/,{cases:{"@specialFunctions":{token:"keyword.flow",next:"@specialFunc"},"@mainFunctions":"keyword","@builtinFunctions":"variable","@default":"operator.scss"}}],[/\s+\-+(?!\d|\.)\w*|{\*}/,"metatag"],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/@symbols/,"operator"],[/\$+(?:\:\:)?\{/,{token:"identifier",next:"@nestedVariable"}],[/@variables/,"type.identifier"],[/\.(?!\d|\.)[\w\-]*/,"operator.sql"],[/\d+(\.\d+)?/,"number"],[/\d+/,"number"],[/;/,"delimiter"],[/"/,{token:"string.quote",bracket:"@open",next:"@dstring"}],[/'/,{token:"string.quote",bracket:"@open",next:"@sstring"}]],dstring:[[/\[/,{token:"@brackets",next:"@nestedCall"}],[/\$+(?:\:\:)?\{/,{token:"identifier",next:"@nestedVariable"}],[/@variables/,"type.identifier"],[/[^\\$\[\]"]+/,"string"],[/@escapes/,"string.escape"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],sstring:[[/\[/,{token:"@brackets",next:"@nestedCall"}],[/\$+(?:\:\:)?\{/,{token:"identifier",next:"@nestedVariable"}],[/@variables/,"type.identifier"],[/[^\\$\[\]']+/,"string"],[/@escapes/,"string.escape"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/#.*\\$/,{token:"comment",next:"@newlineComment"}],[/#.*(?!\\)$/,"comment"]],newlineComment:[[/.*\\$/,"comment"],[/.*(?!\\)$/,{token:"comment",next:"@pop"}]],nestedVariable:[[/[^\{\}\$]+/,"type.identifier"],[/\}/,{token:"identifier",next:"@pop"}]],nestedCall:[[/\[/,{token:"@brackets",next:"@nestedCall"}],[/\]/,{token:"@brackets",next:"@pop"}],{include:"root"}],specialFunc:[[/"/,{token:"string",next:"@dstring"}],[/'/,{token:"string",next:"@sstring"}],[/\S+/,{token:"type",next:"@pop"}]]}};export{e as conf,t as language};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{E as n,I as p,R as l,W as s,X as y,lb as f}from"./chunk-SYGIPC2P.js";import{a as o,b as d}from"./chunk-Q7L6LLAK.js";var m="specship.theme",h=class i{destroyRef=p(l);pref=s(this.loadPref());effective=s("dark");constructor(){this.applyEffective();let e=window.matchMedia("(prefers-color-scheme: light)"),t=()=>{this.pref()==="system"&&this.applyEffective()};e.addEventListener("change",t),this.destroyRef.onDestroy(()=>e.removeEventListener("change",t)),y(()=>{let r=this.pref();try{localStorage.setItem(m,r)}catch{}this.applyEffective()})}setPref(e){this.pref.set(e)}toggle(){this.setPref(this.effective()==="dark"?"light":"dark")}loadPref(){try{let e=localStorage.getItem(m);if(e==="dark"||e==="light"||e==="system")return e}catch{}return"dark"}applyEffective(){let e=window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark",t=this.pref(),r=t==="system"?e:t;document.documentElement.setAttribute("data-theme",r),this.effective.set(r)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=n({token:i,factory:i.\u0275fac,providedIn:"root"})};var u="specship.notify.prefs",a={approval:!0,runDone:!0,drift:!0,reflect:!0},g=class i{permission=s("default");prefs=s(this.loadPrefs());supported=f(()=>this.permission()!=="unsupported");granted=f(()=>this.permission()==="granted");constructor(){if(typeof window>"u"||typeof Notification>"u"){this.permission.set("unsupported");return}this.permission.set(Notification.permission)}enabled(e){return this.prefs()[e]!==!1}toggle(e){let t=d(o({},this.prefs()),{[e]:!this.enabled(e)});this.prefs.set(t),this.savePrefs(t)}async requestPermission(){if(typeof Notification>"u"){this.permission.set("unsupported");return}try{let e=await Notification.requestPermission();this.permission.set(e)}catch{}}notify(e,t,r={}){if(!(this.permission()!=="granted"||!this.enabled(e))&&!(typeof Notification>"u"))try{let c=new Notification(t,{body:r.body,tag:r.tag});r.onClick&&(c.onclick=()=>{try{window.focus()}catch{}r.onClick(),c.close()})}catch{}}loadPrefs(){if(typeof localStorage>"u")return o({},a);try{let e=localStorage.getItem(u);return e?o(o({},a),JSON.parse(e)):o({},a)}catch{return o({},a)}}savePrefs(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(u,JSON.stringify(e))}catch{}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=n({token:i,factory:i.\u0275fac,providedIn:"root"})};export{h as a,g as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-Q7L6LLAK.js";var E={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["[","]"],["(",")"],["{","}"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]}]},T={defaultToken:"",tokenPostfix:".msdax",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"{",close:"}",token:"delimiter.brackets"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["VAR","RETURN","NOT","EVALUATE","DATATABLE","ORDER","BY","START","AT","DEFINE","MEASURE","ASC","DESC","IN","BOOLEAN","DOUBLE","INTEGER","DATETIME","CURRENCY","STRING"],functions:["CLOSINGBALANCEMONTH","CLOSINGBALANCEQUARTER","CLOSINGBALANCEYEAR","DATEADD","DATESBETWEEN","DATESINPERIOD","DATESMTD","DATESQTD","DATESYTD","ENDOFMONTH","ENDOFQUARTER","ENDOFYEAR","FIRSTDATE","FIRSTNONBLANK","LASTDATE","LASTNONBLANK","NEXTDAY","NEXTMONTH","NEXTQUARTER","NEXTYEAR","OPENINGBALANCEMONTH","OPENINGBALANCEQUARTER","OPENINGBALANCEYEAR","PARALLELPERIOD","PREVIOUSDAY","PREVIOUSMONTH","PREVIOUSQUARTER","PREVIOUSYEAR","SAMEPERIODLASTYEAR","STARTOFMONTH","STARTOFQUARTER","STARTOFYEAR","TOTALMTD","TOTALQTD","TOTALYTD","ADDCOLUMNS","ADDMISSINGITEMS","ALL","ALLEXCEPT","ALLNOBLANKROW","ALLSELECTED","CALCULATE","CALCULATETABLE","CALENDAR","CALENDARAUTO","CROSSFILTER","CROSSJOIN","CURRENTGROUP","DATATABLE","DETAILROWS","DISTINCT","EARLIER","EARLIEST","EXCEPT","FILTER","FILTERS","GENERATE","GENERATEALL","GROUPBY","IGNORE","INTERSECT","ISONORAFTER","KEEPFILTERS","LOOKUPVALUE","NATURALINNERJOIN","NATURALLEFTOUTERJOIN","RELATED","RELATEDTABLE","ROLLUP","ROLLUPADDISSUBTOTAL","ROLLUPGROUP","ROLLUPISSUBTOTAL","ROW","SAMPLE","SELECTCOLUMNS","SUBSTITUTEWITHINDEX","SUMMARIZE","SUMMARIZECOLUMNS","TOPN","TREATAS","UNION","USERELATIONSHIP","VALUES","SUM","SUMX","PATH","PATHCONTAINS","PATHITEM","PATHITEMREVERSE","PATHLENGTH","AVERAGE","AVERAGEA","AVERAGEX","COUNT","COUNTA","COUNTAX","COUNTBLANK","COUNTROWS","COUNTX","DISTINCTCOUNT","DIVIDE","GEOMEAN","GEOMEANX","MAX","MAXA","MAXX","MEDIAN","MEDIANX","MIN","MINA","MINX","PERCENTILE.EXC","PERCENTILE.INC","PERCENTILEX.EXC","PERCENTILEX.INC","PRODUCT","PRODUCTX","RANK.EQ","RANKX","STDEV.P","STDEV.S","STDEVX.P","STDEVX.S","VAR.P","VAR.S","VARX.P","VARX.S","XIRR","XNPV","DATE","DATEDIFF","DATEVALUE","DAY","EDATE","EOMONTH","HOUR","MINUTE","MONTH","NOW","SECOND","TIME","TIMEVALUE","TODAY","WEEKDAY","WEEKNUM","YEAR","YEARFRAC","CONTAINS","CONTAINSROW","CUSTOMDATA","ERROR","HASONEFILTER","HASONEVALUE","ISBLANK","ISCROSSFILTERED","ISEMPTY","ISERROR","ISEVEN","ISFILTERED","ISLOGICAL","ISNONTEXT","ISNUMBER","ISODD","ISSUBTOTAL","ISTEXT","USERNAME","USERPRINCIPALNAME","AND","FALSE","IF","IFERROR","NOT","OR","SWITCH","TRUE","ABS","ACOS","ACOSH","ACOT","ACOTH","ASIN","ASINH","ATAN","ATANH","BETA.DIST","BETA.INV","CEILING","CHISQ.DIST","CHISQ.DIST.RT","CHISQ.INV","CHISQ.INV.RT","COMBIN","COMBINA","CONFIDENCE.NORM","CONFIDENCE.T","COS","COSH","COT","COTH","CURRENCY","DEGREES","EVEN","EXP","EXPON.DIST","FACT","FLOOR","GCD","INT","ISO.CEILING","LCM","LN","LOG","LOG10","MOD","MROUND","ODD","PERMUT","PI","POISSON.DIST","POWER","QUOTIENT","RADIANS","RAND","RANDBETWEEN","ROUND","ROUNDDOWN","ROUNDUP","SIGN","SIN","SINH","SQRT","SQRTPI","TAN","TANH","TRUNC","BLANK","CONCATENATE","CONCATENATEX","EXACT","FIND","FIXED","FORMAT","LEFT","LEN","LOWER","MID","REPLACE","REPT","RIGHT","SEARCH","SUBSTITUTE","TRIM","UNICHAR","UNICODE","UPPER","VALUE"],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},[/[;,.]/,"delimiter"],[/[({})]/,"@brackets"],[/[a-z_][a-zA-Z0-9_]*/,{cases:{"@keywords":"keyword","@functions":"keyword","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/\/\/+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/N"/,{token:"string",next:"@string"}],[/"/,{token:"string",next:"@string"}]],string:[[/[^"]+/,"string"],[/""/,"string"],[/"/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/\[/,{token:"identifier.quote",next:"@bracketedIdentifier"}],[/'/,{token:"identifier.quote",next:"@quotedIdentifier"}]],bracketedIdentifier:[[/[^\]]+/,"identifier"],[/]]/,"identifier"],[/]/,{token:"identifier.quote",next:"@pop"}]],quotedIdentifier:[[/[^']+/,"identifier"],[/''/,"identifier"],[/'/,{token:"identifier.quote",next:"@pop"}]]}};export{E as conf,T as language};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-Q7L6LLAK.js";var o=e=>`\\b${e}\\b`,n=e=>`(?!${e})`,i="[_a-zA-Z]",r="[_a-zA-Z0-9]",t=o(`${i}${r}*`),s=o("[_a-zA-Z-0-9]+"),c=["import","model","scalar","namespace","op","interface","union","using","is","extends","enum","alias","return","void","if","else","projection","dec","extern","fn"],a=["true","false","null","unknown","never"],g="[ \\t\\r\\n]",l="[0-9]+",k={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"/**",close:" */",notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],indentationRules:{decreaseIndentPattern:new RegExp("^((?!.*?/\\*).*\\*/)?\\s*[\\}\\]].*$"),increaseIndentPattern:new RegExp("^((?!//).)*(\\{([^}\"'`/]*|(\\t|[ ])*//.*)|\\([^)\"'`/]*|\\[[^\\]\"'`/]*)$"),unIndentedLinePattern:new RegExp("^(\\t|[ ])*[ ]\\*[^/]*\\*/\\s*$|^(\\t|[ ])*[ ]\\*/\\s*$|^(\\t|[ ])*[ ]\\*([ ]([^\\*]|\\*(?!/))*)?$")}},x={defaultToken:"",tokenPostfix:".tsp",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],symbols:/[=:;<>]+/,keywords:c,namedLiterals:a,escapes:'\\\\(u{[0-9A-Fa-f]+}|n|r|t|\\\\|"|\\${)',tokenizer:{root:[{include:"@expression"},{include:"@whitespace"}],stringVerbatim:[{regex:'(|"|"")[^"]',action:{token:"string"}},{regex:`"""${n('"')}`,action:{token:"string",next:"@pop"}}],stringLiteral:[{regex:"\\${",action:{token:"delimiter.bracket",next:"@bracketCounting"}},{regex:'[^\\\\"$]+',action:{token:"string"}},{regex:"@escapes",action:{token:"string.escape"}},{regex:"\\\\.",action:{token:"string.escape.invalid"}},{regex:'"',action:{token:"string",next:"@pop"}}],bracketCounting:[{regex:"{",action:{token:"delimiter.bracket",next:"@bracketCounting"}},{regex:"}",action:{token:"delimiter.bracket",next:"@pop"}},{include:"@expression"}],comment:[{regex:"[^\\*]+",action:{token:"comment"}},{regex:"\\*\\/",action:{token:"comment",next:"@pop"}},{regex:"[\\/*]",action:{token:"comment"}}],whitespace:[{regex:g},{regex:"\\/\\*",action:{token:"comment",next:"@comment"}},{regex:"\\/\\/.*$",action:{token:"comment"}}],expression:[{regex:'"""',action:{token:"string",next:"@stringVerbatim"}},{regex:`"${n('""')}`,action:{token:"string",next:"@stringLiteral"}},{regex:l,action:{token:"number"}},{regex:t,action:{cases:{"@keywords":{token:"keyword"},"@namedLiterals":{token:"keyword"},"@default":{token:"identifier"}}}},{regex:`@${t}`,action:{token:"tag"}},{regex:`#${s}`,action:{token:"directive"}}]}};export{k as conf,x as language};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-Q7L6LLAK.js";var e={comments:{lineComment:"#",blockComment:["=begin","=end"]},brackets:[["(",")"],["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],indentationRules:{increaseIndentPattern:new RegExp(`^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|([^#]*\\sdo\\b)|([^#]*=\\s*(case|if|unless)))\\b([^#\\{;]|("|'|/).*\\4)*(#.*)?$`),decreaseIndentPattern:new RegExp("^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)")}},t={tokenPostfix:".ruby",keywords:["__LINE__","__ENCODING__","__FILE__","BEGIN","END","alias","and","begin","break","case","class","def","defined?","do","else","elsif","end","ensure","for","false","if","in","module","next","nil","not","or","redo","rescue","retry","return","self","super","then","true","undef","unless","until","when","while","yield"],keywordops:["::","..","...","?",":","=>"],builtins:["require","public","private","include","extend","attr_reader","protected","private_class_method","protected_class_method","new"],declarations:["module","class","def","case","do","begin","for","if","while","until","unless"],linedecls:["def","case","do","begin","for","if","while","until","unless"],operators:["^","&","|","<=>","==","===","!~","=~",">",">=","<","<=","<<",">>","+","-","*","/","%","**","~","+@","-@","[]","[]=","`","+=","-=","*=","**=","/=","^=","%=","<<=",">>=","&=","&&=","||=","|="],brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],symbols:/[=><!~?:&|+\-*\/\^%\.]+/,escape:/(?:[abefnrstv\\"'\n\r]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4})/,escapes:/\\(?:C\-(@escape|.)|c(@escape|.)|@escape)/,decpart:/\d(_?\d)*/,decimal:/0|@decpart/,delim:/[^a-zA-Z0-9\s\n\r]/,heredelim:/(?:\w+|'[^']*'|"[^"]*"|`[^`]*`)/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[AzZbBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})?/,tokenizer:{root:[[/^(\s*)([a-z_]\w*[!?=]?)/,["white",{cases:{"for|until|while":{token:"keyword.$2",next:"@dodecl.$2"},"@declarations":{token:"keyword.$2",next:"@root.$2"},end:{token:"keyword.$S2",next:"@pop"},"@keywords":"keyword","@builtins":"predefined","@default":"identifier"}}]],[/[a-z_]\w*[!?=]?/,{cases:{"if|unless|while|until":{token:"keyword.$0x",next:"@modifier.$0x"},for:{token:"keyword.$2",next:"@dodecl.$2"},"@linedecls":{token:"keyword.$0",next:"@root.$0"},end:{token:"keyword.$S2",next:"@pop"},"@keywords":"keyword","@builtins":"predefined","@default":"identifier"}}],[/[A-Z][\w]*[!?=]?/,"constructor.identifier"],[/\$[\w]*/,"global.constant"],[/@[\w]*/,"namespace.instance.identifier"],[/@@@[\w]*/,"namespace.class.identifier"],[/<<[-~](@heredelim).*/,{token:"string.heredoc.delimiter",next:"@heredoc.$1"}],[/[ \t\r\n]+<<(@heredelim).*/,{token:"string.heredoc.delimiter",next:"@heredoc.$1"}],[/^<<(@heredelim).*/,{token:"string.heredoc.delimiter",next:"@heredoc.$1"}],{include:"@whitespace"},[/"/,{token:"string.d.delim",next:'@dstring.d."'}],[/'/,{token:"string.sq.delim",next:"@sstring.sq"}],[/%([rsqxwW]|Q?)/,{token:"@rematch",next:"pstring"}],[/`/,{token:"string.x.delim",next:"@dstring.x.`"}],[/:(\w|[$@])\w*[!?=]?/,"string.s"],[/:"/,{token:"string.s.delim",next:'@dstring.s."'}],[/:'/,{token:"string.s.delim",next:"@sstring.s"}],[/\/(?=(\\\/|[^\/\n])+\/)/,{token:"regexp.delim",next:"@regexp"}],[/[{}()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@keywordops":"keyword","@operators":"operator","@default":""}}],[/[;,]/,"delimiter"],[/0[xX][0-9a-fA-F](_?[0-9a-fA-F])*/,"number.hex"],[/0[_oO][0-7](_?[0-7])*/,"number.octal"],[/0[bB][01](_?[01])*/,"number.binary"],[/0[dD]@decpart/,"number"],[/@decimal((\.@decpart)?([eE][\-+]?@decpart)?)/,{cases:{$1:"number.float","@default":"number"}}]],dodecl:[[/^/,{token:"",switchTo:"@root.$S2"}],[/[a-z_]\w*[!?=]?/,{cases:{end:{token:"keyword.$S2",next:"@pop"},do:{token:"keyword",switchTo:"@root.$S2"},"@linedecls":{token:"@rematch",switchTo:"@root.$S2"},"@keywords":"keyword","@builtins":"predefined","@default":"identifier"}}],{include:"@root"}],modifier:[[/^/,"","@pop"],[/[a-z_]\w*[!?=]?/,{cases:{end:{token:"keyword.$S2",next:"@pop"},"then|else|elsif|do":{token:"keyword",switchTo:"@root.$S2"},"@linedecls":{token:"@rematch",switchTo:"@root.$S2"},"@keywords":"keyword","@builtins":"predefined","@default":"identifier"}}],{include:"@root"}],sstring:[[/[^\\']+/,"string.$S2"],[/\\\\|\\'|\\$/,"string.$S2.escape"],[/\\./,"string.$S2.invalid"],[/'/,{token:"string.$S2.delim",next:"@pop"}]],dstring:[[/[^\\`"#]+/,"string.$S2"],[/#/,"string.$S2.escape","@interpolated"],[/\\$/,"string.$S2.escape"],[/@escapes/,"string.$S2.escape"],[/\\./,"string.$S2.escape.invalid"],[/[`"]/,{cases:{"$#==$S3":{token:"string.$S2.delim",next:"@pop"},"@default":"string.$S2"}}]],heredoc:[[/^(\s*)(@heredelim)$/,{cases:{"$2==$S2":["string.heredoc",{token:"string.heredoc.delimiter",next:"@pop"}],"@default":["string.heredoc","string.heredoc"]}}],[/.*/,"string.heredoc"]],interpolated:[[/\$\w*/,"global.constant","@pop"],[/@\w*/,"namespace.class.identifier","@pop"],[/@@@\w*/,"namespace.instance.identifier","@pop"],[/[{]/,{token:"string.escape.curly",switchTo:"@interpolated_compound"}],["","","@pop"]],interpolated_compound:[[/[}]/,{token:"string.escape.curly",next:"@pop"}],{include:"@root"}],pregexp:[{include:"@whitespace"},[/[^\(\{\[\\]/,{cases:{"$#==$S3":{token:"regexp.delim",next:"@pop"},"$#==$S2":{token:"regexp.delim",next:"@push"},"~[)}\\]]":"@brackets.regexp.escape.control","~@regexpctl":"regexp.escape.control","@default":"regexp"}}],{include:"@regexcontrol"}],regexp:[{include:"@regexcontrol"},[/[^\\\/]/,"regexp"],["/[ixmp]*",{token:"regexp.delim"},"@pop"]],regexcontrol:[[/(\{)(\d+(?:,\d*)?)(\})/,["@brackets.regexp.escape.control","regexp.escape.control","@brackets.regexp.escape.control"]],[/(\[)(\^?)/,["@brackets.regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?[:=!])/,["@brackets.regexp.escape.control","regexp.escape.control"]],[/\(\?#/,{token:"regexp.escape.control",next:"@regexpcomment"}],[/[()]/,"@brackets.regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/\\$/,"regexp.escape"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/#/,"regexp.escape","@interpolated"]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/\\$/,"regexp.escape"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,"@brackets.regexp.escape.control","@pop"]],regexpcomment:[[/[^)]+/,"comment"],[/\)/,{token:"regexp.escape.control",next:"@pop"}]],pstring:[[/%([qws])\(/,{token:"string.$1.delim",switchTo:"@qstring.$1.(.)"}],[/%([qws])\[/,{token:"string.$1.delim",switchTo:"@qstring.$1.[.]"}],[/%([qws])\{/,{token:"string.$1.delim",switchTo:"@qstring.$1.{.}"}],[/%([qws])</,{token:"string.$1.delim",switchTo:"@qstring.$1.<.>"}],[/%([qws])(@delim)/,{token:"string.$1.delim",switchTo:"@qstring.$1.$2.$2"}],[/%r\(/,{token:"regexp.delim",switchTo:"@pregexp.(.)"}],[/%r\[/,{token:"regexp.delim",switchTo:"@pregexp.[.]"}],[/%r\{/,{token:"regexp.delim",switchTo:"@pregexp.{.}"}],[/%r</,{token:"regexp.delim",switchTo:"@pregexp.<.>"}],[/%r(@delim)/,{token:"regexp.delim",switchTo:"@pregexp.$1.$1"}],[/%(x|W|Q?)\(/,{token:"string.$1.delim",switchTo:"@qqstring.$1.(.)"}],[/%(x|W|Q?)\[/,{token:"string.$1.delim",switchTo:"@qqstring.$1.[.]"}],[/%(x|W|Q?)\{/,{token:"string.$1.delim",switchTo:"@qqstring.$1.{.}"}],[/%(x|W|Q?)</,{token:"string.$1.delim",switchTo:"@qqstring.$1.<.>"}],[/%(x|W|Q?)(@delim)/,{token:"string.$1.delim",switchTo:"@qqstring.$1.$2.$2"}],[/%([rqwsxW]|Q?)./,{token:"invalid",next:"@pop"}],[/./,{token:"invalid",next:"@pop"}]],qstring:[[/\\$/,"string.$S2.escape"],[/\\./,"string.$S2.escape"],[/./,{cases:{"$#==$S4":{token:"string.$S2.delim",next:"@pop"},"$#==$S3":{token:"string.$S2.delim",next:"@push"},"@default":"string.$S2"}}]],qqstring:[[/#/,"string.$S2.escape","@interpolated"],{include:"@qstring"}],whitespace:[[/[ \t\r\n]+/,""],[/^\s*=begin\b/,"comment","@comment"],[/#.*$/,"comment"]],comment:[[/[^=]+/,"comment"],[/^\s*=begin\b/,"comment.invalid"],[/^\s*=end\b.*/,"comment","@pop"],[/[=]/,"comment"]]}};export{e as conf,t as language};
|