@pathmode/mcp-server 1.10.0 → 1.11.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/README.md CHANGED
@@ -94,7 +94,7 @@ Your implementation MUST satisfy ALL of these:
94
94
 
95
95
  ## Skill Pack for Claude Code
96
96
 
97
- The package also ships 7 Claude Code skills that auto-trigger based on what you ask — no slash commands required.
97
+ The package also ships 8 Claude Code skills that auto-trigger based on what you ask — no slash commands required.
98
98
 
99
99
  | Skill | Use when |
100
100
  |-------|----------|
@@ -163,7 +163,10 @@ Get your API key from **Settings > API Keys** in the [Pathmode app](https://path
163
163
  ### Local Mode (Offline)
164
164
 
165
165
  Local mode is the **default when no API key is configured**. It reads and writes `intent.md` in your
166
- project directory, and nothing leaves your machine. The plain block is a complete keyless setup:
166
+ project directory, and nothing leaves your machine. Local mode includes `check_intent_readiness`
167
+ the deterministic preflight that scores a spec against six calibrated gates and names the exact
168
+ blockers, with no model call (the same gate that runs at [preflight.pathmode.io](https://preflight.pathmode.io)).
169
+ The plain block is a complete keyless setup:
167
170
 
168
171
  ```json
169
172
  {
@@ -185,8 +185,25 @@ export interface ApiVerificationResult {
185
185
  category: string;
186
186
  status: string;
187
187
  reasoning: string;
188
+ basis?: 'artifact' | 'self_report' | 'none';
189
+ evidence?: {
190
+ path: string;
191
+ hunk?: string;
192
+ }[];
188
193
  }[];
189
194
  summary: string;
195
+ /** Whether the verdict was reached by reading a pull request or only the caller's own account. */
196
+ basis?: 'artifact' | 'self_report';
197
+ artifact?: {
198
+ kind: 'pr_diff' | 'self_report';
199
+ repo?: string;
200
+ prNumber?: number;
201
+ headSha?: string;
202
+ filesRead?: number;
203
+ filesOmitted?: number;
204
+ truncated?: boolean;
205
+ reason?: string;
206
+ };
190
207
  }
191
208
  export interface ApiEvidence {
192
209
  id: string;
@@ -316,5 +333,9 @@ export declare class PathmodeClient {
316
333
  linked: number;
317
334
  unlinked: number;
318
335
  }>;
319
- verifyImplementation(intentId: string, summary: string, codeChanges?: string): Promise<ApiVerificationResult>;
336
+ verifyImplementation(intentId: string, body: {
337
+ summary?: string;
338
+ prUrl?: string;
339
+ codeChanges?: string;
340
+ }): Promise<ApiVerificationResult>;
320
341
  }
@@ -1 +1 @@
1
- {"version":3,"file":"","sourceRoot":"","sources":["file:///Users/jannelammi/code/Pathmode/packages/mcp-server/src/api-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,MAAM,WAAW,cAAc;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,oBAAoB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;CAC1C;AAED,MAAM,WAAW,cAAc;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,SAAS;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,mFAAmF;IACnF,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,oBAAoB,EAAE,CAAC;IACjC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,KAAK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AE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,GACjE,OAAO,CAAC,qBAAqB,CAAC;CAQpC"}
package/dist/index.js CHANGED
@@ -33742,10 +33742,10 @@ class PathmodeClient {
33742
33742
  });
33743
33743
  return res.json();
33744
33744
  }
33745
- async verifyImplementation(intentId, summary, codeChanges) {
33745
+ async verifyImplementation(intentId, body) {
33746
33746
  const res = await this.fetch(`/intents/${intentId}/verify`, {
33747
33747
  method: 'POST',
33748
- body: JSON.stringify({ summary, codeChanges }),
33748
+ body: JSON.stringify(body),
33749
33749
  });
33750
33750
  return res.json();
33751
33751
  }
@@ -35003,6 +35003,230 @@ function mergePathmodeSection(existing, section) {
35003
35003
  }
35004
35004
 
35005
35005
 
35006
+ /***/ }),
35007
+
35008
+ /***/ 3079:
35009
+ /***/ ((__unused_webpack_module, exports) => {
35010
+
35011
+ "use strict";
35012
+
35013
+ /**
35014
+ * Deterministic intent readiness gate — the preflight.
35015
+ *
35016
+ * This is a PORT of the canonical gate in lib/intentReadiness.ts (the MCP package
35017
+ * cannot import app/lib code). Every regex and threshold below must stay
35018
+ * byte-identical to the source; lib/preflightReadinessParity.test.ts in the app
35019
+ * repo runs both implementations over the 98-item calibration corpus and the
35020
+ * Preflight demo specs, and fails CI on any divergence. Edit the app lib first,
35021
+ * then mirror the change here.
35022
+ *
35023
+ * Pure functions only: no I/O, no network, no model calls. The same spec gets
35024
+ * the same verdict every run — that determinism is the product claim on
35025
+ * https://preflight.pathmode.io, so keep it true.
35026
+ */
35027
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
35028
+ exports.READINESS_GATE_ORDER = exports.READINESS_BLOCKER_DESCRIPTIONS = void 0;
35029
+ exports.coerceText = coerceText;
35030
+ exports.asArray = asArray;
35031
+ exports.isTitleMeaningful = isTitleMeaningful;
35032
+ exports.isConstraintConcrete = isConstraintConcrete;
35033
+ exports.isVerificationCheckSubstantive = isVerificationCheckSubstantive;
35034
+ exports.isObjectiveSpecific = isObjectiveSpecific;
35035
+ exports.isOutcomeMeasurable = isOutcomeMeasurable;
35036
+ exports.computeReadinessVerdict = computeReadinessVerdict;
35037
+ exports.formatReadinessVerdict = formatReadinessVerdict;
35038
+ // ── Text/shape coercion (mirrors lib/intentReadiness coerceText/asArray) ───
35039
+ function coerceText(value) {
35040
+ if (typeof value === 'string')
35041
+ return value;
35042
+ if (value && typeof value === 'object') {
35043
+ const o = value;
35044
+ const cand = o.description ?? o.rule ?? o.text ?? o.name ?? o.scenario ?? o.title ?? o.value ?? o.label ?? o.content;
35045
+ if (typeof cand === 'string')
35046
+ return cand;
35047
+ }
35048
+ return '';
35049
+ }
35050
+ function asArray(value) {
35051
+ if (Array.isArray(value))
35052
+ return value;
35053
+ if (value === null || value === undefined)
35054
+ return [];
35055
+ return [value];
35056
+ }
35057
+ /** Mirrors lib/intentSpecHelpers.outcomeText: outcomes arrive as strings or { text }. */
35058
+ function outcomeText(o) {
35059
+ if (typeof o === 'string')
35060
+ return o;
35061
+ const t = o?.text;
35062
+ return typeof t === 'string' ? t : '';
35063
+ }
35064
+ const PLACEHOLDER_INTENT_TITLES = new Set(['new intent', 'untitled intent']);
35065
+ const TEMPLATE_PATTERNS = [
35066
+ /\[your category\]/i,
35067
+ /^template$/i,
35068
+ /^placeholder$/i,
35069
+ /^todo$/i,
35070
+ /^tbd$/i,
35071
+ ];
35072
+ function isLikelyPlaceholderText(value) {
35073
+ const text = coerceText(value).trim();
35074
+ if (!text)
35075
+ return false;
35076
+ if (text.length <= 2)
35077
+ return true;
35078
+ return TEMPLATE_PATTERNS.some((pattern) => pattern.test(text));
35079
+ }
35080
+ // ── The six calibrated gates ────────────────────────────────────────────────
35081
+ const GENERIC_TITLE_WORDS = new Set([
35082
+ 'new', 'my', 'our', 'the', 'a', 'an', 'this', 'that', 'some', 'more', 'better',
35083
+ 'intent', 'intents', 'feature', 'features', 'idea', 'ideas', 'spec', 'specs',
35084
+ 'draft', 'drafts', 'test', 'tests', 'todo', 'tbd', 'wip', 'stuff', 'thing', 'things',
35085
+ 'untitled', 'placeholder', 'misc', 'general', 'various', 'update', 'updates',
35086
+ 'improvement', 'improvements', 'improve', 'fix', 'fixes', 'change', 'changes',
35087
+ 'work', 'item', 'items', 'task', 'tasks',
35088
+ ]);
35089
+ function isTitleMeaningful(title) {
35090
+ const t = coerceText(title).trim();
35091
+ if (!t)
35092
+ return false;
35093
+ if (PLACEHOLDER_INTENT_TITLES.has(t.toLowerCase()))
35094
+ return false;
35095
+ if (TEMPLATE_PATTERNS.some((pattern) => pattern.test(t)))
35096
+ return false;
35097
+ const words = t.split(/\s+/).filter(Boolean);
35098
+ if (words.length < 2)
35099
+ return false;
35100
+ return words.some((w) => !GENERIC_TITLE_WORDS.has(w.toLowerCase().replace(/[^a-z0-9-]/gi, '')));
35101
+ }
35102
+ const CONSTRAINT_MARKER_RE = /\b(never|must|not|no|don'?t|cannot|can'?t|forbidden|prohibit\w*|avoid|without|only|at most|at least|within|under|below|above|max\w*|limit\w*|cap(?:ped|s)?|quota|budget|respect\w*|comply|complian\w*|conform\w*|keep|stays?|remains?|preserve\w*|maintain\w*|require[sd]?|always|read[- ]only|backward[- ]?compatib\w*|p\d{2})\b/i;
35103
+ function isConstraintConcrete(value) {
35104
+ const t = coerceText(value).trim();
35105
+ if (t.length < 8)
35106
+ return false;
35107
+ return CONSTRAINT_MARKER_RE.test(t) || t.length >= 40;
35108
+ }
35109
+ function isVerificationCheckSubstantive(description) {
35110
+ const t = coerceText(description).trim();
35111
+ if (isLikelyPlaceholderText(t))
35112
+ return false;
35113
+ return t.split(/\s+/).filter(Boolean).length >= 3;
35114
+ }
35115
+ const ACTOR_RE = /\b(users?|customers?|clients?|teams?|developers?|admins?|administrators?|visitors?|subscribers?|buyers?|sellers?|operators?|managers?|patients?|agents?|founders?|owners?|leads?|members?|employees?|hires?|applicants?|candidates?|players?|creators?|curators?|seekers?|parents?|students?|teachers?|shoppers?|merchants?|reviewers?|engineers?|designers?|marketers?|recruiters?|stakeholders?|people|staff)\b/i;
35116
+ const ACTOR_STRUCT_RE = /\b(enable|allow|let|help|give|empower|support)\s+[A-Za-z]|\bfor\s+[a-z]+\s+(to|who|so)\b|\b[A-Za-z]+['’]s\b|\b[A-Z][a-z]{2,}\s+(can'?t|cannot|can|could|should|needs?|wants?|struggles?|fails?|miss\w*|lose|loses)\b/;
35117
+ const PROBLEM_RE = /\b(can'?t|cannot|unable|struggl\w*|fail\w*|drop\w*|abandon\w*|miss\w*|los\w*|break\w*|broken|block\w*|confus\w*|delay\w*|bottleneck|stale|stuck|friction|painful|manual\w*|error\w*|slow|waste\w*|risk\w*)\b/i;
35118
+ const CAPABILITY_RE = /\b(enable|allow|let|help|give|empower|provide|support|lift|raise|reduce|cut|eliminat\w*|increase|decrease|improve|streamlin\w*|automat\w*|speed up|accelerat\w*|guarantee|ensure|deliver|complete|clear|maintain|achieve|unlock|simplif\w*|consolidat\w*|surface|track|measure|see|view|access|find|understand|know|preview|schedule|resume|inspect|reorder|publish|reconcile|bulk|able to|act on)\b/i;
35119
+ const VAGUE_MARKER_RE = /\b(best[- ]in[- ]class|world[- ]class|seamless\w*|cutting[- ]edge|delight\w*|intuitive|robust|holistic|synerg\w*|revolutioniz\w*|next[- ]gen\w*|frictionless|game[- ]chang\w*|state[- ]of[- ]the[- ]art|leverage|do more|happ(y|ier|iness)|smoother|polished|magical|amazing|wow)\b/i;
35120
+ function isObjectiveSpecific(objective) {
35121
+ const t = coerceText(objective).trim();
35122
+ if (t.length <= 35)
35123
+ return false;
35124
+ if (VAGUE_MARKER_RE.test(t) && !OUTCOME_NUMERIC_RE.test(t))
35125
+ return false;
35126
+ const hasActor = ACTOR_RE.test(t) || ACTOR_STRUCT_RE.test(t);
35127
+ const hasIntent = PROBLEM_RE.test(t) || CAPABILITY_RE.test(t);
35128
+ return hasActor && hasIntent;
35129
+ }
35130
+ const OUTCOME_NUMERIC_RE = /\d|%|≥|≤|>=|<=/;
35131
+ const OUTCOME_METRIC_RE = /\b(under|within|at least|no more than|fewer than|less than|more than|reach\w*|drop\w*|ris\w*|grow\w*|increas\w*|decreas\w*|reduc\w*|eliminat\w*|stays?\s+(under|below|above|within)|from\s+.+\s+to\s+|success rate|completion rate|conversion|retention|adoption|rate\b|score|benchmark|baseline|per\s+\w+|time[- ]to)\b/i;
35132
+ const OUTCOME_CAPABILITY_RE = /\b([a-z]+s?|they|anyone|everyone)\s+(can|could|sees?|views?|receives?|gets?|is able|are able|able to)\b/i;
35133
+ const OUTCOME_STATE_RE = /\b(no longer|without\s+\w+|is fully|are fully|displays?|shows?|appears?|visible|notified|confirmed|enabled|disabled|redirected|prevented|blocked|templated|automated|documented|exists?|persists?|never|always|produces?\s+no\b|results?\s+in\s+no\b|with\s+no\b|free of)\b/i;
35134
+ const OUTCOME_SUBJECTIVE_RE = /\b(amazing|delight\w*|happ(y|ier|iness)|satisf\w*|quality|love[ds]?|world[- ]class|best[- ]in[- ]class|seamless\w*|intuitive|polished|magical|wow|delightful|engaging|meaningful\w*)\b/i;
35135
+ function isOutcomeMeasurable(text) {
35136
+ const t = coerceText(text).trim();
35137
+ if (!t)
35138
+ return false;
35139
+ if (OUTCOME_SUBJECTIVE_RE.test(t))
35140
+ return false;
35141
+ return OUTCOME_NUMERIC_RE.test(t) || OUTCOME_METRIC_RE.test(t) || OUTCOME_CAPABILITY_RE.test(t) || OUTCOME_STATE_RE.test(t);
35142
+ }
35143
+ // ── Verdict ─────────────────────────────────────────────────────────────────
35144
+ exports.READINESS_BLOCKER_DESCRIPTIONS = {
35145
+ objective: 'Objective is too vague — name the actor and the concrete failure they hit today.',
35146
+ goal: 'Title is missing or generic — name the intent in a short, specific noun phrase.',
35147
+ outcomes: 'Outcomes are not all measurable — at least two-thirds need a testable or observable threshold.',
35148
+ constraints: 'No hard constraint — name at least one thing that must never happen.',
35149
+ edgeCases: 'No edge case with a defined expected behavior.',
35150
+ verification: 'No concrete verification — describe at least one check specific enough to run.',
35151
+ };
35152
+ /** Display order for the gate strip (title first, matching the Preflight page). */
35153
+ exports.READINESS_GATE_ORDER = ['goal', 'objective', 'outcomes', 'constraints', 'edgeCases', 'verification'];
35154
+ /** Blocker emission order — byte-identical to lib/intentReadiness computeReviewSignals. */
35155
+ const BLOCKER_ORDER = ['objective', 'goal', 'outcomes', 'constraints', 'edgeCases', 'verification'];
35156
+ /** Flatten a verification field (checks[] plus legacy buckets) into check descriptions. */
35157
+ function verificationDescriptions(verification) {
35158
+ if (!verification || typeof verification !== 'object')
35159
+ return [];
35160
+ const v = verification;
35161
+ const out = [];
35162
+ for (const c of asArray(v.checks)) {
35163
+ const d = coerceText(c).trim();
35164
+ if (d)
35165
+ out.push(d);
35166
+ }
35167
+ for (const bucket of ['manualChecks', 'unitTests', 'e2eTests']) {
35168
+ for (const c of asArray(v[bucket])) {
35169
+ const d = coerceText(c).trim();
35170
+ if (d)
35171
+ out.push(d);
35172
+ }
35173
+ }
35174
+ return out;
35175
+ }
35176
+ /**
35177
+ * The preflight: six deterministic gates over an intent spec. Mirrors
35178
+ * lib/intentReadiness.computeReviewSignals with conversationFirst semantics
35179
+ * (the legacy phase-engagement signal never gates the verdict here).
35180
+ */
35181
+ function computeReadinessVerdict(spec) {
35182
+ const nonEmptyOutcomes = asArray(spec.outcomes).map(o => outcomeText(o).trim()).filter(Boolean);
35183
+ const testableOutcomeCount = nonEmptyOutcomes.filter(isOutcomeMeasurable).length;
35184
+ const signals = {
35185
+ goal: isTitleMeaningful(typeof spec.title === 'string' ? spec.title : coerceText(spec.title)),
35186
+ objective: isObjectiveSpecific(typeof spec.objective === 'string' ? spec.objective : coerceText(spec.objective)),
35187
+ outcomes: nonEmptyOutcomes.length >= 2 && testableOutcomeCount / Math.max(nonEmptyOutcomes.length, 1) >= 0.66,
35188
+ constraints: asArray(spec.constraints).some(isConstraintConcrete),
35189
+ edgeCases: asArray(spec.edgeCases).some((ec) => {
35190
+ const e = ec;
35191
+ return coerceText(e?.scenario).trim().length > 0 && coerceText(e?.expectedBehavior).trim().length > 0;
35192
+ }),
35193
+ verification: verificationDescriptions(spec.verification).some(isVerificationCheckSubstantive),
35194
+ };
35195
+ const failingBlockers = BLOCKER_ORDER
35196
+ .filter(k => !signals[k])
35197
+ .map(k => exports.READINESS_BLOCKER_DESCRIPTIONS[k]);
35198
+ return { ready: failingBlockers.length === 0, signals, failingBlockers };
35199
+ }
35200
+ const GATE_LABELS = {
35201
+ goal: 'Title',
35202
+ objective: 'Objective',
35203
+ outcomes: 'Outcomes',
35204
+ constraints: 'Constraints',
35205
+ edgeCases: 'Edge cases',
35206
+ verification: 'Verification',
35207
+ };
35208
+ /** Human/agent-readable verdict block, stable enough to parse by line prefix. */
35209
+ function formatReadinessVerdict(verdict, specTitle) {
35210
+ const lines = [];
35211
+ const name = (specTitle || '').trim();
35212
+ if (verdict.ready) {
35213
+ lines.push(`✓ Preflight passed${name ? ` for "${name}"` : ''}. 6/6 checks. Ready to hand to an agent.`);
35214
+ }
35215
+ else {
35216
+ lines.push(`✗ Preflight failed${name ? ` for "${name}"` : ''}. ${verdict.failingBlockers.length}/6 checks blocking.`);
35217
+ for (const b of verdict.failingBlockers)
35218
+ lines.push(` ✗ ${b}`);
35219
+ }
35220
+ lines.push('');
35221
+ lines.push(exports.READINESS_GATE_ORDER.map(k => `${verdict.signals[k] ? '✓' : '·'} ${GATE_LABELS[k]}`).join(' '));
35222
+ if (!verdict.ready) {
35223
+ lines.push('');
35224
+ lines.push('Repair the failing fields (ask the user one targeted question per blocker), save with intent_save, and re-run check_intent_readiness. The verdict is deterministic: the same spec always gets the same result.');
35225
+ }
35226
+ return lines.join('\n');
35227
+ }
35228
+
35229
+
35006
35230
  /***/ }),
35007
35231
 
35008
35232
  /***/ 6137:
@@ -64931,7 +65155,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"$schema":"http://json-schema.org/dra
64931
65155
  /***/ ((module) => {
64932
65156
 
64933
65157
  "use strict";
64934
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@pathmode/mcp-server","version":"1.10.0","publishConfig":{"access":"public"},"mcpName":"io.github.pathmodeio/mcp-server","description":"Pathmode MCP Server — Build structured intent specs through Socratic AI conversation (zero-config), or connect to your Intent Layer for strategic context, dependency graphs, and implementation prompts.","main":"dist/index.js","bin":{"pathmode-mcp":"dist/index.js"},"files":["dist/","manifest.json","icon.svg","README.md","skills/"],"scripts":{"build":"rm -rf dist && ncc build src/index.ts -o dist","dev":"ts-node src/index.ts","prepublishOnly":"npm run build"},"keywords":["pathmode","mcp","model-context-protocol","claude-code","claude-code-skills","agent-skills","cursor","windsurf","intent-engineering","intent-compiler","ai-agents","product-development","dependency-graph","strategic-planning"],"author":"Pathmode","license":"MIT","type":"commonjs","engines":{"node":">=18.0.0"},"repository":{"type":"git","url":"git+https://github.com/pathmodeio/mcp-server.git","directory":"packages/mcp-server"},"homepage":"https://pathmode.io","dependencies":{"@modelcontextprotocol/sdk":"^1.12.1","gray-matter":"^4.0.3","zod":"^3.24.0"},"devDependencies":{"@types/node":"^25.1.0","@vercel/ncc":"^0.38.4","ts-node":"^10.9.2","typescript":"^5.9.3"}}');
65158
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@pathmode/mcp-server","version":"1.11.0","publishConfig":{"access":"public"},"mcpName":"io.github.pathmodeio/mcp-server","description":"Pathmode MCP Server — Build structured intent specs through Socratic AI conversation (zero-config), or connect to your Intent Layer for strategic context, dependency graphs, and implementation prompts.","main":"dist/index.js","bin":{"pathmode-mcp":"dist/index.js"},"files":["dist/","manifest.json","icon.svg","README.md","skills/"],"scripts":{"build":"rm -rf dist && ncc build src/index.ts -o dist","dev":"ts-node src/index.ts","prepublishOnly":"npm run build"},"keywords":["pathmode","mcp","model-context-protocol","claude-code","claude-code-skills","agent-skills","cursor","windsurf","intent-engineering","intent-compiler","ai-agents","product-development","dependency-graph","strategic-planning"],"author":"Pathmode","license":"MIT","type":"commonjs","engines":{"node":">=18.0.0"},"repository":{"type":"git","url":"git+https://github.com/pathmodeio/mcp-server.git","directory":"packages/mcp-server"},"homepage":"https://pathmode.io","dependencies":{"@modelcontextprotocol/sdk":"^1.12.1","gray-matter":"^4.0.3","zod":"^3.24.0"},"devDependencies":{"@types/node":"^25.1.0","@vercel/ncc":"^0.38.4","ts-node":"^10.9.2","typescript":"^5.9.3"}}');
64935
65159
 
64936
65160
  /***/ })
64937
65161
 
@@ -65027,6 +65251,7 @@ const path_1 = __nccwpck_require__(6928);
65027
65251
  const fs_1 = __nccwpck_require__(9896);
65028
65252
  const api_client_1 = __nccwpck_require__(7475);
65029
65253
  const local_reader_1 = __nccwpck_require__(3518);
65254
+ const readiness_1 = __nccwpck_require__(3079);
65030
65255
  const save_policy_1 = __nccwpck_require__(6137);
65031
65256
  const intent_compiler_1 = __nccwpck_require__(6488);
65032
65257
  const pathmode_section_1 = __nccwpck_require__(4681);
@@ -65895,24 +66120,56 @@ function startMcpServer() {
65895
66120
  });
65896
66121
  cloudOnly.registerTool('verify_implementation', {
65897
66122
  title: 'Verify Implementation',
65898
- description: 'AI-grade your implementation against the intent spec. Checks each outcome, constraint, constitution rule, and edge case. Returns pass/fail per item with reasoning and an overall score. Also logs the result as an implementation note.',
66123
+ description: 'Grade an implementation against the intent spec by reading the pull request. Pass prUrl and Pathmode fetches the diff itself and grades each outcome, constraint, constitution rule, edge case and verification check against what the code actually shows. Describing your own work instead is weaker evidence and the result says so. Returns pass/fail per item with reasoning, a score, and the basis the verdict rests on. Also logs the result as an implementation note.',
65899
66124
  inputSchema: {
65900
66125
  intentId: zod_1.z.string().describe('The intent ID to verify against'),
65901
- summary: zod_1.z.string().describe('Description of what was implemented and how'),
65902
- codeChanges: zod_1.z.string().optional().describe('Summary of code changes (file list, key modifications)'),
66126
+ prUrl: zod_1.z.string().optional().describe('Pull request URL (or owner/repo#123) containing the implementation. Strongly preferred: the diff is read from GitHub instead of taken on trust.'),
66127
+ summary: zod_1.z.string().optional().describe('What you implemented and how. Context for the grader, not evidence. Required only when there is no pull request to point at.'),
66128
+ codeChanges: zod_1.z.string().optional().describe('Deprecated, superseded by prUrl. A diff you paste about your own work is not independent evidence.'),
65903
66129
  },
65904
66130
  annotations: WRITE_OP,
65905
- }, async ({ intentId, summary, codeChanges }) => {
66131
+ }, async ({ intentId, prUrl, summary, codeChanges }) => {
65906
66132
  if (isLocalMode) {
65907
66133
  return { content: [{ type: 'text', text: 'Verification requires cloud mode.' }] };
65908
66134
  }
66135
+ if (!prUrl && !summary) {
66136
+ return { content: [{ type: 'text', text: 'Provide prUrl (preferred) or summary.' }] };
66137
+ }
65909
66138
  try {
65910
- const result = await requireCloudClient().verifyImplementation(intentId, summary, codeChanges);
65911
- let text = `Verification ${result.pass ? 'PASSED' : 'FAILED'} (score: ${result.score}/100)\n\n`;
66139
+ const result = await requireCloudClient().verifyImplementation(intentId, { summary, prUrl, codeChanges });
66140
+ let text = `Verification ${result.pass ? 'PASSED' : 'FAILED'} (score: ${result.score}/100)\n`;
66141
+ // Say what the verdict was actually based on. A run that could not read the code must not
66142
+ // read like one that did, or the score becomes a rubber stamp for a well-written summary.
66143
+ const a = result.artifact;
66144
+ if (a?.kind === 'pr_diff') {
66145
+ text += `Graded against ${a.repo}#${a.prNumber} at ${a.headSha?.slice(0, 8)}`
66146
+ + ` (${a.filesRead} file(s)${a.truncated ? `, ${a.filesOmitted} omitted for size` : ''})\n\n`;
66147
+ }
66148
+ else if (a) {
66149
+ text += `Graded on your own description, no code was read (${a.reason}).`
66150
+ + ` Pass a prUrl for a verdict grounded in the diff.\n\n`;
66151
+ }
66152
+ else {
66153
+ text += '\n';
66154
+ }
65912
66155
  text += `${result.summary}\n\n`;
65913
66156
  for (const r of result.results) {
65914
- const icon = r.status === 'pass' ? '[PASS]' : r.status === 'fail' ? '[FAIL]' : '[????]';
66157
+ const icon = r.status === 'pass' ? '[PASS]'
66158
+ : r.status === 'fail' ? '[FAIL]'
66159
+ : r.status === 'not_applicable' ? '[ -- ]'
66160
+ : '[????]';
65915
66161
  text += `${icon} [${r.category}] ${r.item}\n ${r.reasoning}\n`;
66162
+ // Citations are validated server-side against the diff; an item with none, on a run
66163
+ // that had a diff, says so rather than reading like an inspected verdict.
66164
+ if (r.status === 'not_applicable') {
66165
+ // An absence claim has nothing to cite, so a missing citation is not a gap here.
66166
+ }
66167
+ else if (r.evidence?.length) {
66168
+ text += ` cites: ${r.evidence.map(c => c.path).join(', ')}\n`;
66169
+ }
66170
+ else if (r.basis === 'none') {
66171
+ text += ` cites: nothing in the diff\n`;
66172
+ }
65916
66173
  }
65917
66174
  return { content: [{ type: 'text', text }] };
65918
66175
  }
@@ -66018,6 +66275,57 @@ function startMcpServer() {
66018
66275
  }],
66019
66276
  };
66020
66277
  });
66278
+ server.registerTool('check_intent_readiness', {
66279
+ title: 'Check Intent Readiness (Preflight)',
66280
+ description: 'Run the deterministic preflight on an intent spec before handing it to an implementation agent. Six calibrated checks — title, objective, outcomes, constraints, edge cases, verification — computed by pure functions: no model call, no network, the same spec always gets the same verdict. Pass a spec inline to check before saving, pass intentId to check a specific saved intent, or pass nothing to check the current intent. A failing verdict names the exact blockers; repair the fields and re-run. This is the gate that runs at preflight.pathmode.io.',
66281
+ inputSchema: {
66282
+ spec: zod_1.z.object(intentSpecSchema).optional().describe('Check this spec directly (before saving). When omitted, the current intent is checked instead.'),
66283
+ intentId: zod_1.z.string().optional().describe('Check a specific saved intent by id. Ignored when spec is passed.'),
66284
+ },
66285
+ annotations: READ_ONLY,
66286
+ }, async ({ spec, intentId }) => {
66287
+ let subject = spec;
66288
+ let sourceNote = 'inline spec';
66289
+ if (!subject) {
66290
+ if (isLocalMode) {
66291
+ const intents = (0, local_reader_1.readLocalIntents)();
66292
+ subject = intentId ? intents.find(i => i.id === intentId) : pickCurrentIntent(intents);
66293
+ sourceNote = intentId ? `local intent ${intentId}` : 'current local intent (intent.md)';
66294
+ if (!subject) {
66295
+ return {
66296
+ content: [{
66297
+ type: 'text',
66298
+ text: intentId
66299
+ ? `No local intent with id "${intentId}". Check intent.md or .pathmode/intents/.`
66300
+ : 'No intent found. Write one first (intent_save), or pass the spec inline to preflight it before saving.',
66301
+ }],
66302
+ };
66303
+ }
66304
+ }
66305
+ else {
66306
+ const cloud = requireCloudClient();
66307
+ const intents = await cloud.listIntents();
66308
+ subject = intentId ? intents.find((i) => i.id === intentId) : pickCurrentIntent(intents);
66309
+ sourceNote = intentId ? `intent ${intentId}` : 'current intent';
66310
+ if (!subject) {
66311
+ return {
66312
+ content: [{
66313
+ type: 'text',
66314
+ text: intentId ? `No intent with id "${intentId}" in this workspace.` : 'No intents found in workspace.',
66315
+ }],
66316
+ };
66317
+ }
66318
+ }
66319
+ }
66320
+ const verdict = (0, readiness_1.computeReadinessVerdict)(subject);
66321
+ const title = (0, readiness_1.coerceText)(subject.title);
66322
+ return {
66323
+ content: [{
66324
+ type: 'text',
66325
+ text: `${(0, readiness_1.formatReadinessVerdict)(verdict, title)}\n\nChecked: ${sourceNote}.`,
66326
+ }],
66327
+ };
66328
+ });
66021
66329
  server.tool('intent_save', 'Save an intent spec to intent.md in the project root. Called after building a spec through conversation. Re-saving the same intent bumps its version and preserves its status; it never silently replaces a different intent.', {
66022
66330
  spec: zod_1.z.object(intentSpecSchema),
66023
66331
  path: zod_1.z.string().optional().describe('File path relative to the project root. Must stay inside the project (absolute paths and ".." are rejected). Defaults to intent.md'),
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Deterministic intent readiness gate — the preflight.
3
+ *
4
+ * This is a PORT of the canonical gate in lib/intentReadiness.ts (the MCP package
5
+ * cannot import app/lib code). Every regex and threshold below must stay
6
+ * byte-identical to the source; lib/preflightReadinessParity.test.ts in the app
7
+ * repo runs both implementations over the 98-item calibration corpus and the
8
+ * Preflight demo specs, and fails CI on any divergence. Edit the app lib first,
9
+ * then mirror the change here.
10
+ *
11
+ * Pure functions only: no I/O, no network, no model calls. The same spec gets
12
+ * the same verdict every run — that determinism is the product claim on
13
+ * https://preflight.pathmode.io, so keep it true.
14
+ */
15
+ export declare function coerceText(value: unknown): string;
16
+ export declare function asArray<T>(value: T | T[] | null | undefined): T[];
17
+ export declare function isTitleMeaningful(title: string | null | undefined): boolean;
18
+ export declare function isConstraintConcrete(value: unknown): boolean;
19
+ export declare function isVerificationCheckSubstantive(description: string | null | undefined): boolean;
20
+ export declare function isObjectiveSpecific(objective: string | null | undefined): boolean;
21
+ export declare function isOutcomeMeasurable(text: string): boolean;
22
+ export declare const READINESS_BLOCKER_DESCRIPTIONS: Record<string, string>;
23
+ /** Display order for the gate strip (title first, matching the Preflight page). */
24
+ export declare const READINESS_GATE_ORDER: readonly ["goal", "objective", "outcomes", "constraints", "edgeCases", "verification"];
25
+ /** Loose spec shape: covers LocalIntent, cloud intent JSON, and hand-built specs. */
26
+ export interface ReadinessSpecInput {
27
+ title?: unknown;
28
+ objective?: unknown;
29
+ outcomes?: unknown;
30
+ constraints?: unknown;
31
+ edgeCases?: unknown;
32
+ verification?: unknown;
33
+ }
34
+ export interface ReadinessVerdict {
35
+ ready: boolean;
36
+ signals: Record<string, boolean>;
37
+ failingBlockers: string[];
38
+ }
39
+ /**
40
+ * The preflight: six deterministic gates over an intent spec. Mirrors
41
+ * lib/intentReadiness.computeReviewSignals with conversationFirst semantics
42
+ * (the legacy phase-engagement signal never gates the verdict here).
43
+ */
44
+ export declare function computeReadinessVerdict(spec: ReadinessSpecInput): ReadinessVerdict;
45
+ /** Human/agent-readable verdict block, stable enough to parse by line prefix. */
46
+ export declare function formatReadinessVerdict(verdict: ReadinessVerdict, specTitle?: string): string;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"","sourceRoot":"","sources":["file:///Users/jannelammi/code/Pathmode/packages/mcp-server/src/readiness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAQjD;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,IAAI,GAAG,SAAS,GAAG,CAAC,EAAE,CAIjE;AAo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"version": "1.10.0",
3
+ "version": "1.11.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/skills/README.md CHANGED
@@ -12,6 +12,7 @@ Listed in lifecycle order — most projects use them in roughly this sequence.
12
12
  |-------|----------|
13
13
  | `setup-pathmode-workflow` | First-time setup — capturing test commands, issue tracker, status conventions |
14
14
  | `compile-intent` | Building a structured spec for what to ship |
15
+ | `preflight` | Deterministic readiness verdict before an agent builds — six gates, exact blockers, no model call |
15
16
  | `verify-intent` | Designing the executable feedback loop for a spec (fastest check, manual fallback, shipped signal) |
16
17
  | `grill-intent` | Stress-testing an existing spec for weaknesses before code is written |
17
18
  | `split-intent-to-issues` | Breaking a spec into paste-ready Linear / Jira / GitHub Issues tickets |
@@ -0,0 +1,39 @@
1
+ ---
2
+ name: preflight
3
+ description: Run the deterministic readiness check on an intent spec before an agent builds against it. Six calibrated gates, computed by pure functions — no model judgment, same spec always gets the same verdict. Use before implementing an intent, before handing a spec to another agent, or whenever the user asks "is this spec ready?".
4
+ ---
5
+
6
+ <what-to-do>
7
+
8
+ Call the `check_intent_readiness` MCP tool (Pathmode). With no arguments it checks the current intent (`intent.md` in local mode, the active workspace intent in cloud mode). Pass `spec` inline to preflight a draft before saving it, or `intentId` for a specific saved intent.
9
+
10
+ Show the user the verdict block exactly as returned — the blocker strings are the calibrated gate output, do not paraphrase them.
11
+
12
+ If the verdict fails: repair, one blocker at a time. For each failing gate, ask the user ONE targeted question, and propose your best-guess answer from the spec and the codebase so they can correct rather than compose. Apply the agreed fix to the spec (`intent_save` in local mode), then re-run `check_intent_readiness`. Stop when the verdict passes or the user explicitly accepts a named gap.
13
+
14
+ If the verdict passes: say so and stop. Do not invent extra requirements beyond the six gates.
15
+
16
+ </what-to-do>
17
+
18
+ <supporting-info>
19
+
20
+ ## What the six gates check
21
+
22
+ 1. **Title** — a short, specific noun phrase, not a placeholder or generic label ("Bulk edit" passes; "New feature" fails).
23
+ 2. **Objective** — names an actor and a concrete problem or capability; rejects buzzword-dressed vagueness with no number.
24
+ 3. **Outcomes** — at least two, and at least two-thirds measurable: a threshold, an observable capability, or a concrete state change. "Users are happier" fails.
25
+ 4. **Constraints** — at least one violable statement, something an implementation could actually break ("Never double-charge on retry"). Bare adjectives fail.
26
+ 5. **Edge cases** — at least one scenario with a defined expected behavior.
27
+ 6. **Verification** — at least one check concrete enough to run without asking the author.
28
+
29
+ ## Why deterministic matters
30
+
31
+ The gate is pure functions over the spec text: no model call, no network. Re-running never changes the verdict unless the spec changed. That makes it a floor you can put in front of any implementation work — and it means a passing verdict is reproducible evidence, not an opinion. The same gate runs live at preflight.pathmode.io.
32
+
33
+ ## Division of labor with the other skills
34
+
35
+ - `preflight` — deterministic verdict: IS the spec ready? Cheap, run it first and often.
36
+ - `grill-intent` — adversarial model-driven review: is the spec WISE? Run it when preflight passes but the stakes are high.
37
+ - `compile-intent` — builds a spec from a vague problem. Preflight what it produces.
38
+
39
+ </supporting-info>