@specship/specship-win32-arm64 0.15.0 → 0.16.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/activation/steering.d.ts +26 -0
- package/lib/dist/activation/steering.d.ts.map +1 -0
- package/lib/dist/activation/steering.js +79 -0
- package/lib/dist/activation/steering.js.map +1 -0
- package/lib/dist/bin/specship.js +78 -4
- package/lib/dist/bin/specship.js.map +1 -1
- package/lib/dist/extraction/specs/markdown-spec-extractor.d.ts +9 -7
- package/lib/dist/extraction/specs/markdown-spec-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/specs/markdown-spec-extractor.js +17 -10
- package/lib/dist/extraction/specs/markdown-spec-extractor.js.map +1 -1
- package/lib/dist/extraction/specs/spec-file-writeback.d.ts +37 -0
- package/lib/dist/extraction/specs/spec-file-writeback.d.ts.map +1 -0
- package/lib/dist/extraction/specs/spec-file-writeback.js +159 -0
- package/lib/dist/extraction/specs/spec-file-writeback.js.map +1 -0
- package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter-helpers.js +12 -1
- package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
- package/lib/dist/installer/index.d.ts +7 -0
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +7 -1
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/installer/targets/claude.d.ts +11 -2
- package/lib/dist/installer/targets/claude.d.ts.map +1 -1
- package/lib/dist/installer/targets/claude.js +83 -7
- package/lib/dist/installer/targets/claude.js.map +1 -1
- package/lib/dist/installer/targets/shared.d.ts +10 -2
- package/lib/dist/installer/targets/shared.d.ts.map +1 -1
- package/lib/dist/installer/targets/shared.js +22 -11
- package/lib/dist/installer/targets/shared.js.map +1 -1
- package/lib/dist/installer/targets/types.d.ts +10 -0
- package/lib/dist/installer/targets/types.d.ts.map +1 -1
- package/lib/dist/mcp/model-context.d.ts +51 -0
- package/lib/dist/mcp/model-context.d.ts.map +1 -0
- package/lib/dist/mcp/model-context.js +229 -0
- package/lib/dist/mcp/model-context.js.map +1 -0
- package/lib/dist/mcp/spec-tools.d.ts.map +1 -1
- package/lib/dist/mcp/spec-tools.js +44 -1
- package/lib/dist/mcp/spec-tools.js.map +1 -1
- package/lib/dist/mcp/tools.d.ts +21 -0
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +71 -5
- package/lib/dist/mcp/tools.js.map +1 -1
- package/lib/dist/resolution/spec-link-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/spec-link-resolver.js +42 -28
- package/lib/dist/resolution/spec-link-resolver.js.map +1 -1
- package/lib/dist/server/ingest/index.js +1 -1
- package/lib/dist/server/ingest/ingestor.js +24 -4
- package/lib/dist/server/routes/claude.js +31 -5
- package/lib/dist/server/routes/spec.js +13 -0
- package/lib/dist/server/routes/workflow.js +15 -1
- package/lib/dist/server/server.js +2 -2
- package/lib/dist/statusline/index.d.ts.map +1 -1
- package/lib/dist/statusline/index.js +6 -0
- package/lib/dist/statusline/index.js.map +1 -1
- package/lib/dist/statusline/paths.d.ts +2 -0
- package/lib/dist/statusline/paths.d.ts.map +1 -1
- package/lib/dist/statusline/paths.js +5 -0
- package/lib/dist/statusline/paths.js.map +1 -1
- package/lib/dist/types.d.ts +8 -3
- package/lib/dist/types.d.ts.map +1 -1
- package/lib/dist/ui/assets/index-CjjaftDw.js +50 -0
- package/lib/dist/ui/index.html +1 -1
- package/lib/dist/workflows/defaults/spec-implement.yaml +5 -0
- package/lib/dist/workflows/defaults/spec-verify.yaml +23 -9
- package/lib/dist/workflows/executor.d.ts +19 -0
- package/lib/dist/workflows/executor.d.ts.map +1 -1
- package/lib/dist/workflows/executor.js +131 -18
- package/lib/dist/workflows/executor.js.map +1 -1
- package/lib/dist/workflows/runners/bash.d.ts.map +1 -1
- package/lib/dist/workflows/runners/bash.js +14 -1
- package/lib/dist/workflows/runners/bash.js.map +1 -1
- package/lib/node_modules/.package-lock.json +1 -1
- package/lib/package.json +1 -1
- package/package.json +1 -1
- package/lib/dist/server/chat/classify.js +0 -130
- package/lib/dist/server/routes/chat-answer.js +0 -499
- package/lib/dist/server/routes/chat.js +0 -144
- package/lib/dist/ui/assets/index-CpBBlEO2.js +0 -51
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Retrieval steering nudge (STEER-HOOK-DOC).
|
|
3
|
+
*
|
|
4
|
+
* Coverage that the agent never exercises is worthless: dynamic-dispatch
|
|
5
|
+
* synthesizers repeatedly probe-validate but show "agent A/B null" because
|
|
6
|
+
* the agent reaches for Read/Grep before specship. The only channel that
|
|
7
|
+
* measurably fixed adoption was high-salience per-prompt steering
|
|
8
|
+
* (`--append-system-prompt`); low-salience channels (MCP initialize
|
|
9
|
+
* instructions, tool descriptions) failed across wording variants. This
|
|
10
|
+
* module is that channel, shipped as an installer-written `UserPromptSubmit`
|
|
11
|
+
* hook (REQ-STEER-001) whose command is `specship steer-nudge`.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* The one steering line injected per prompt. Kept short (~40 tokens) — it is
|
|
15
|
+
* added to EVERY prompt in an initialized project, so brevity is the cost
|
|
16
|
+
* ceiling. Wording is A/B-gated before default-on release (REQ-STEER-003).
|
|
17
|
+
*/
|
|
18
|
+
export declare const STEERING_TEXT: string;
|
|
19
|
+
/**
|
|
20
|
+
* Decide whether to emit the steering line (REQ-STEER-002): silent unless the
|
|
21
|
+
* project is initialized (`.specship/` exists at cwd), and silent when the
|
|
22
|
+
* user opted out via `SPECSHIP_NO_STEERING=1`. Uninitialized projects and
|
|
23
|
+
* opted-out users get zero prompt noise.
|
|
24
|
+
*/
|
|
25
|
+
export declare function buildSteeringNudge(cwd: string, env?: NodeJS.ProcessEnv): string | null;
|
|
26
|
+
//# sourceMappingURL=steering.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"steering.d.ts","sourceRoot":"","sources":["../../src/activation/steering.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH;;;;GAIG;AACH,eAAO,MAAM,aAAa,QAI0C,CAAC;AAErE;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,EACX,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,MAAM,GAAG,IAAI,CAQf"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Retrieval steering nudge (STEER-HOOK-DOC).
|
|
4
|
+
*
|
|
5
|
+
* Coverage that the agent never exercises is worthless: dynamic-dispatch
|
|
6
|
+
* synthesizers repeatedly probe-validate but show "agent A/B null" because
|
|
7
|
+
* the agent reaches for Read/Grep before specship. The only channel that
|
|
8
|
+
* measurably fixed adoption was high-salience per-prompt steering
|
|
9
|
+
* (`--append-system-prompt`); low-salience channels (MCP initialize
|
|
10
|
+
* instructions, tool descriptions) failed across wording variants. This
|
|
11
|
+
* module is that channel, shipped as an installer-written `UserPromptSubmit`
|
|
12
|
+
* hook (REQ-STEER-001) whose command is `specship steer-nudge`.
|
|
13
|
+
*/
|
|
14
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
17
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
18
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
19
|
+
}
|
|
20
|
+
Object.defineProperty(o, k2, desc);
|
|
21
|
+
}) : (function(o, m, k, k2) {
|
|
22
|
+
if (k2 === undefined) k2 = k;
|
|
23
|
+
o[k2] = m[k];
|
|
24
|
+
}));
|
|
25
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
26
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
27
|
+
}) : function(o, v) {
|
|
28
|
+
o["default"] = v;
|
|
29
|
+
});
|
|
30
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
31
|
+
var ownKeys = function(o) {
|
|
32
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
33
|
+
var ar = [];
|
|
34
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
35
|
+
return ar;
|
|
36
|
+
};
|
|
37
|
+
return ownKeys(o);
|
|
38
|
+
};
|
|
39
|
+
return function (mod) {
|
|
40
|
+
if (mod && mod.__esModule) return mod;
|
|
41
|
+
var result = {};
|
|
42
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
43
|
+
__setModuleDefault(result, mod);
|
|
44
|
+
return result;
|
|
45
|
+
};
|
|
46
|
+
})();
|
|
47
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
+
exports.STEERING_TEXT = void 0;
|
|
49
|
+
exports.buildSteeringNudge = buildSteeringNudge;
|
|
50
|
+
const fs = __importStar(require("fs"));
|
|
51
|
+
const path = __importStar(require("path"));
|
|
52
|
+
/**
|
|
53
|
+
* The one steering line injected per prompt. Kept short (~40 tokens) — it is
|
|
54
|
+
* added to EVERY prompt in an initialized project, so brevity is the cost
|
|
55
|
+
* ceiling. Wording is A/B-gated before default-on release (REQ-STEER-003).
|
|
56
|
+
*/
|
|
57
|
+
exports.STEERING_TEXT = 'This project has a SpecShip code-graph index. For structure/flow questions ' +
|
|
58
|
+
'("how does X work / reach Y", "who calls Z", architecture, impact), call ' +
|
|
59
|
+
'mcp__specship__specship_explore with the relevant symbol names FIRST — before ' +
|
|
60
|
+
'any Read/Grep — and treat the source it returns as already read.';
|
|
61
|
+
/**
|
|
62
|
+
* Decide whether to emit the steering line (REQ-STEER-002): silent unless the
|
|
63
|
+
* project is initialized (`.specship/` exists at cwd), and silent when the
|
|
64
|
+
* user opted out via `SPECSHIP_NO_STEERING=1`. Uninitialized projects and
|
|
65
|
+
* opted-out users get zero prompt noise.
|
|
66
|
+
*/
|
|
67
|
+
function buildSteeringNudge(cwd, env = process.env) {
|
|
68
|
+
if (env.SPECSHIP_NO_STEERING === '1')
|
|
69
|
+
return null;
|
|
70
|
+
try {
|
|
71
|
+
if (!fs.statSync(path.join(cwd, '.specship')).isDirectory())
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
return exports.STEERING_TEXT;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=steering.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"steering.js","sourceRoot":"","sources":["../../src/activation/steering.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBH,gDAWC;AA/BD,uCAAyB;AACzB,2CAA6B;AAE7B;;;;GAIG;AACU,QAAA,aAAa,GACxB,6EAA6E;IAC7E,2EAA2E;IAC3E,gFAAgF;IAChF,kEAAkE,CAAC;AAErE;;;;;GAKG;AACH,SAAgB,kBAAkB,CAChC,GAAW,EACX,MAAyB,OAAO,CAAC,GAAG;IAEpC,IAAI,GAAG,CAAC,oBAAoB,KAAK,GAAG;QAAE,OAAO,IAAI,CAAC;IAClD,IAAI,CAAC;QACH,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC,WAAW,EAAE;YAAE,OAAO,IAAI,CAAC;IAC3E,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,qBAAa,CAAC;AACvB,CAAC"}
|
package/lib/dist/bin/specship.js
CHANGED
|
@@ -2133,6 +2133,8 @@ function main() {
|
|
|
2133
2133
|
.option('-y, --yes', 'Non-interactive: defaults to --location=local, auto-allow on')
|
|
2134
2134
|
.option('--no-permissions', 'Skip writing the auto-allow permissions list')
|
|
2135
2135
|
.option('--sdd', 'Also install the spec-driven-development governance tier (spec/authoring/review/design commands + the spec-author nudge hook). Off by default — a plain install provisions only the retrieval tier.')
|
|
2136
|
+
.option('--with-jira', 'Enable the optional JIRA integration (talks to your Atlassian instance; off by default — the core install is 100% local)')
|
|
2137
|
+
.option('--with-designer', 'Enable the optional Designer integration (EXPERIMENTAL — drives claude.ai/design via a debug Chrome session and may break without notice; off by default)')
|
|
2136
2138
|
.option('--statusline', 'Wire the SpecShip status-line segment into Claude (skips the prompt; never overwrites an existing status line)')
|
|
2137
2139
|
.option('--skip-statusline', 'Do not add the status-line segment (skips the prompt)')
|
|
2138
2140
|
.option('--skip-index', 'Do not offer to index the current project (an explicit opt-out for automation)')
|
|
@@ -2182,6 +2184,8 @@ function main() {
|
|
|
2182
2184
|
location: opts.location,
|
|
2183
2185
|
autoAllow,
|
|
2184
2186
|
sdd: opts.sdd === true ? true : undefined,
|
|
2187
|
+
withJira: opts.withJira === true ? true : undefined,
|
|
2188
|
+
withDesigner: opts.withDesigner === true ? true : undefined,
|
|
2185
2189
|
statusLine,
|
|
2186
2190
|
yes: opts.yes,
|
|
2187
2191
|
});
|
|
@@ -2365,6 +2369,62 @@ function main() {
|
|
|
2365
2369
|
}
|
|
2366
2370
|
process.exit(0);
|
|
2367
2371
|
});
|
|
2372
|
+
/**
|
|
2373
|
+
* specship steer-nudge (STEER-HOOK-DOC)
|
|
2374
|
+
*
|
|
2375
|
+
* Internal UserPromptSubmit hook command: inject the one-line retrieval
|
|
2376
|
+
* steering nudge — the high-salience channel that measurably fixes
|
|
2377
|
+
* specship-tool adoption. Exits 0 with empty output when the project has no
|
|
2378
|
+
* `.specship/` index or `SPECSHIP_NO_STEERING=1` is set (REQ-STEER-002).
|
|
2379
|
+
*/
|
|
2380
|
+
program
|
|
2381
|
+
.command('steer-nudge')
|
|
2382
|
+
.description('Internal hook: steer flow/structure questions to specship_explore (UserPromptSubmit)')
|
|
2383
|
+
.action(async () => {
|
|
2384
|
+
// Prefer the hook payload's cwd (Claude Code sends it on stdin) so the
|
|
2385
|
+
// check targets the project the prompt belongs to, not wherever the hook
|
|
2386
|
+
// process happened to spawn.
|
|
2387
|
+
let cwd = process.cwd();
|
|
2388
|
+
let transcriptPath = null;
|
|
2389
|
+
const chunks = [];
|
|
2390
|
+
try {
|
|
2391
|
+
for await (const c of process.stdin)
|
|
2392
|
+
chunks.push(c);
|
|
2393
|
+
}
|
|
2394
|
+
catch { /* no stdin — fall back to process.cwd() */ }
|
|
2395
|
+
const raw = Buffer.concat(chunks).toString('utf-8').trim();
|
|
2396
|
+
if (raw) {
|
|
2397
|
+
try {
|
|
2398
|
+
const parsed = JSON.parse(raw);
|
|
2399
|
+
if (typeof parsed?.cwd === 'string' && parsed.cwd.length > 0)
|
|
2400
|
+
cwd = parsed.cwd;
|
|
2401
|
+
if (typeof parsed?.transcript_path === 'string' && parsed.transcript_path.length > 0) {
|
|
2402
|
+
transcriptPath = parsed.transcript_path;
|
|
2403
|
+
}
|
|
2404
|
+
}
|
|
2405
|
+
catch { /* not JSON — keep process.cwd() */ }
|
|
2406
|
+
}
|
|
2407
|
+
// Record the session's model from the transcript tail (MODCTX-DOC,
|
|
2408
|
+
// REQ-MODCTX-001.A4) — the primary detection channel, present on every
|
|
2409
|
+
// default install. Fires per prompt so mid-session /model switches
|
|
2410
|
+
// track; runs even when the steering text is suppressed, but only in
|
|
2411
|
+
// initialized projects. Best-effort: never fails the hook.
|
|
2412
|
+
if (transcriptPath && fs.existsSync(path.join(cwd, '.specship'))) {
|
|
2413
|
+
try {
|
|
2414
|
+
const { readModelFromTranscript, recordSessionModel } = await Promise.resolve().then(() => __importStar(require('../mcp/model-context')));
|
|
2415
|
+
const model = readModelFromTranscript(transcriptPath);
|
|
2416
|
+
if (model)
|
|
2417
|
+
recordSessionModel(cwd, model);
|
|
2418
|
+
}
|
|
2419
|
+
catch { /* telemetry must never break the hook */ }
|
|
2420
|
+
}
|
|
2421
|
+
const { buildSteeringNudge } = await Promise.resolve().then(() => __importStar(require('../activation/steering')));
|
|
2422
|
+
const additionalContext = buildSteeringNudge(cwd);
|
|
2423
|
+
if (additionalContext) {
|
|
2424
|
+
process.stdout.write(JSON.stringify({ hookSpecificOutput: { hookEventName: 'UserPromptSubmit', additionalContext } }) + '\n');
|
|
2425
|
+
}
|
|
2426
|
+
process.exit(0);
|
|
2427
|
+
});
|
|
2368
2428
|
/**
|
|
2369
2429
|
* specship uninstall
|
|
2370
2430
|
*
|
|
@@ -2698,7 +2758,7 @@ function main() {
|
|
|
2698
2758
|
});
|
|
2699
2759
|
program
|
|
2700
2760
|
.command('workflow <action> [arg]')
|
|
2701
|
-
.description('Workflow engine: list | run <name> | resume <runId> | cancel <runId> | approve <runId> | reject <runId> | runs')
|
|
2761
|
+
.description('Workflow engine: list | run <name> | resume <runId> | cancel <runId> | approve <runId> | reject <runId> | purge <runId> | runs')
|
|
2702
2762
|
.option('-i, --input <kv...>', 'workflow inputs as KEY=VALUE (repeatable)')
|
|
2703
2763
|
.option('--path <projectRoot>', 'project root (default: cwd)')
|
|
2704
2764
|
.option('--comment <text>', 'comment for approve/reject')
|
|
@@ -2889,9 +2949,23 @@ function main() {
|
|
|
2889
2949
|
error('workflow reject requires a runId');
|
|
2890
2950
|
process.exit(1);
|
|
2891
2951
|
}
|
|
2892
|
-
executor.reject(arg, options.reason);
|
|
2952
|
+
executor.reject(arg, options.reason ?? options.comment);
|
|
2953
|
+
// eslint-disable-next-line no-console
|
|
2954
|
+
console.log(`Run ${arg} rejected — parked with its worktree and artifacts intact.\n` +
|
|
2955
|
+
` Revise: specship workflow resume ${arg} (runs the gate's on_reject prompt with your feedback, then re-pauses for review)\n` +
|
|
2956
|
+
` Discard: specship workflow purge ${arg} (removes the worktree — the only way anything is deleted)`);
|
|
2957
|
+
break;
|
|
2958
|
+
}
|
|
2959
|
+
case 'purge': {
|
|
2960
|
+
if (!arg) {
|
|
2961
|
+
error('workflow purge requires a runId');
|
|
2962
|
+
process.exit(1);
|
|
2963
|
+
}
|
|
2964
|
+
const purged = executor.purge(arg);
|
|
2893
2965
|
// eslint-disable-next-line no-console
|
|
2894
|
-
console.log(
|
|
2966
|
+
console.log(purged.worktreeRemoved
|
|
2967
|
+
? `Run ${arg} purged — worktree removed (${purged.workingPath ?? 'path unknown'}). Artifacts and the run record are kept.`
|
|
2968
|
+
: `Run ${arg} had no worktree — nothing to remove. Artifacts and the run record are kept.`);
|
|
2895
2969
|
break;
|
|
2896
2970
|
}
|
|
2897
2971
|
case 'runs': {
|
|
@@ -2916,7 +2990,7 @@ function main() {
|
|
|
2916
2990
|
break;
|
|
2917
2991
|
}
|
|
2918
2992
|
default:
|
|
2919
|
-
error(`Unknown workflow action "${action}". Use: list | run | resume | cancel | approve | reject | runs`);
|
|
2993
|
+
error(`Unknown workflow action "${action}". Use: list | run | resume | cancel | approve | reject | purge | runs`);
|
|
2920
2994
|
process.exit(1);
|
|
2921
2995
|
}
|
|
2922
2996
|
}
|