@pathmode/mcp-server 1.16.1 → 1.17.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/dist/index.js CHANGED
@@ -34266,6 +34266,7 @@ ${getLiveQualityCheckPromptBlock()}
34266
34266
 
34267
34267
  EVIDENCE-FIRST GROUNDING:
34268
34268
  - Begin by asking for ONE concrete artifact: a direct user quote, a specific drop-off metric, a support ticket, or an observed failure. Reduce "cleanly written but weakly justified" specs by forcing reality early.
34269
+ - GREENFIELD EXCEPTION: a genuinely new project may have no artifact yet. Do not stall demanding one the user cannot possess. Take their belief, label it out loud as an assumption ("No user evidence exists yet, so this objective rests on an assumption: ..."), and ask what the cheapest real signal would validate it. An assumption stated as an assumption is honest grounding; an assumption dressed as evidence is not.
34269
34270
 
34270
34271
  EARLIER VERIFICATION BACK-CHAINING:
34271
34272
  - Do not wait until the end to figure out verification.
@@ -34275,7 +34276,7 @@ VISIBLE COMPLETENESS STATE:
34275
34276
  Once the conversation is underway, append a small checklist at the bottom of your messages to keep the state explicit. Do not mark an item complete until it genuinely meets a high quality bar.
34276
34277
 
34277
34278
  STATUS:
34278
- [ ] Objective clear enough (and backed by evidence)
34279
+ [ ] Objective clear enough (backed by evidence, or by an assumption labeled as one)
34279
34280
  [ ] At least 2 testable outcomes
34280
34281
  [ ] At least 1 failure mode (edge case)
34281
34282
  [ ] Scope boundaries named (constraints / out of scope)
@@ -34312,7 +34313,7 @@ IMPORTANT:
34312
34313
  - scope: { inScope?: string[], outOfScope?: string[] } (optional)
34313
34314
  - verification: { checks?: { kind: 'fastest'|'shipped-signal'|'regression-guard'|'manual'|'test', description: string }[] } (optional) — verification is a feedback loop, not just tests: a fastest check (quickest signal it works), a shipped-signal (observable production signal it landed), a regression-guard (what must not break), plus manual/test as needed. Legacy { manualChecks?, unitTests?, e2eTests? } string arrays are still accepted.
34314
34315
 
34315
- Now, start the conversation. If they haven't provided one yet, ask for the concrete evidence (quote, metric, or ticket) driving this work.`;
34316
+ Now, start the conversation. If they haven't provided one yet, ask for the concrete evidence (quote, metric, or ticket) driving this work — or, when none can exist yet (greenfield), name the driving assumption out loud and proceed with it labeled.`;
34316
34317
  }
34317
34318
  // ============================================================
34318
34319
  // Format: intent.md
@@ -35007,6 +35008,7 @@ exports.readLocalIntents = readLocalIntents;
35007
35008
  exports.readIntentMeta = readIntentMeta;
35008
35009
  exports.readIntentFile = readIntentFile;
35009
35010
  exports.parseIntentMarkdown = parseIntentMarkdown;
35011
+ exports.stripHtmlComments = stripHtmlComments;
35010
35012
  const fs_1 = __importDefault(__nccwpck_require__(9896));
35011
35013
  const path_1 = __importDefault(__nccwpck_require__(6928));
35012
35014
  const gray_matter_1 = __importDefault(__nccwpck_require__(9599));
@@ -35162,7 +35164,7 @@ function frontmatterEdgeCases(v) {
35162
35164
  }
35163
35165
  function parseIntentMarkdown(content, fallbackId = 'intent') {
35164
35166
  const { data, content: rawBody } = (0, gray_matter_1.default)(content);
35165
- const body = stripFencedBlocks(rawBody);
35167
+ const body = stripHtmlComments(stripFencedBlocks(rawBody));
35166
35168
  const sections = splitSections(body);
35167
35169
  const parsedVerification = extractVerification(sections);
35168
35170
  // The public schema allows verification as a flat string array; read it as manual checks
@@ -35245,6 +35247,28 @@ function stripFencedBlocks(body) {
35245
35247
  }
35246
35248
  return out.join('\n');
35247
35249
  }
35250
+ /**
35251
+ * Remove HTML comments before any structural parsing. Template scaffolds ship guidance inside
35252
+ * `<!-- ... -->`, and it is invisible when the markdown renders, so a reader that treats it as
35253
+ * content is reading something the author never wrote.
35254
+ *
35255
+ * Found by running the published preflight over an untouched `pathmode-intent` scaffold: the
35256
+ * Objective section held only a comment explaining what an objective is, that comment named "a
35257
+ * role, a team, an operator, an agent", and those actor words carried it past
35258
+ * `isObjectiveSpecific`. The scaffold reported a PASSING objective nobody had written. A first-run
35259
+ * verdict that praises an empty template is worse than one that blocks, because it is confidently
35260
+ * wrong at exactly the moment a new user is deciding whether to trust the tool at all.
35261
+ *
35262
+ * Applied AFTER `stripFencedBlocks`, so a `<!--` appearing as example content inside a fence is
35263
+ * already gone and cannot open a comment that eats real prose. An unterminated comment swallows
35264
+ * the rest of the document, matching both the fence rule above and what a markdown renderer does:
35265
+ * the parser reads what the author sees.
35266
+ */
35267
+ function stripHtmlComments(body) {
35268
+ const withoutClosed = body.replace(/<!--[\s\S]*?-->/g, '');
35269
+ const dangling = withoutClosed.indexOf('<!--');
35270
+ return dangling === -1 ? withoutClosed : withoutClosed.slice(0, dangling);
35271
+ }
35248
35272
  function splitSections(body) {
35249
35273
  const sections = new Map();
35250
35274
  let current = null;
@@ -35323,8 +35347,11 @@ function extractEdgeCases(sections) {
35323
35347
  cases.push({ scenario: match[1], expectedBehavior: match[2] });
35324
35348
  continue;
35325
35349
  }
35326
- // Pattern: scenario expected behavior
35327
- const arrowMatch = clean.match(/^(.+?)\s*[→:]\s*(.+)$/);
35350
+ // Pattern: scenario -> expected behavior. ASCII `->` was added 2026-08-30 when the
35351
+ // published normalization corpus caught this parser and the IntentSpec reference
35352
+ // disagreeing: the reference took `->`, this took `→` and `:`. Accepting all three is
35353
+ // the widening that makes the spec true rather than aspirational (SPEC.md section 2).
35354
+ const arrowMatch = clean.match(/^(.+?)\s*(?:->|→|:)\s*(.+)$/);
35328
35355
  if (arrowMatch) {
35329
35356
  cases.push({ scenario: arrowMatch[1].trim(), expectedBehavior: arrowMatch[2].trim() });
35330
35357
  }
@@ -67240,7 +67267,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"$schema":"http://json-schema.org/dra
67240
67267
  /***/ ((module) => {
67241
67268
 
67242
67269
  "use strict";
67243
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@pathmode/mcp-server","version":"1.16.1","publishConfig":{"access":"public"},"mcpName":"io.github.pathmodeio/mcp-server","description":"Deterministic intent preflight before your agent builds: six calibrated gates, keyless, no model call. Draft and sharpen specs in conversation, or connect a Pathmode workspace to sync intent and evidence across a team.","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"},"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"}}');
67270
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@pathmode/mcp-server","version":"1.17.0","publishConfig":{"access":"public"},"mcpName":"io.github.pathmodeio/mcp-server","description":"Deterministic intent preflight before your agent builds: six calibrated gates, keyless, no model call. Draft and sharpen specs in conversation, or connect a Pathmode workspace to sync intent and evidence across a team.","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"},"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"}}');
67244
67271
 
67245
67272
  /***/ })
67246
67273
 
@@ -67413,7 +67440,7 @@ function startMcpServer() {
67413
67440
  'A failing verdict names the exact blockers; repair them one targeted question at a time. Never block work on a failing verdict. ' +
67414
67441
  'To sync with a shared Pathmode workspace later, run: npx @pathmode/mcp-server setup pm_live_xxx';
67415
67442
  const CLOUD_MODE_INSTRUCTIONS = 'Pathmode is connected to a workspace (cloud mode). ' +
67416
- 'First move: call check_intent_readiness on the current intent before implementation starts; a failing verdict names the exact blockers to repair. ' +
67443
+ 'First move: call check_intent_readiness before implementation starts. With no arguments it prefers this repo\'s intent.md and falls back to the workspace current intent only when no repo-bound file exists; a failing verdict names the exact blockers to repair. ' +
67417
67444
  'If tools fail with API error (401), the configured key is invalid: re-run npx @pathmode/mcp-server setup with a fresh key from your workspace settings at https://pathmode.io, ' +
67418
67445
  'or remove PATHMODE_API_KEY and restart to fall back to free keyless local mode (specs live in intent.md, no account needed).';
67419
67446
  const server = new mcp_js_1.McpServer({
@@ -68098,7 +68125,7 @@ function startMcpServer() {
68098
68125
  for (const item of result.verificationChecklist) {
68099
68126
  responseText += `\n [ ] [${item.category}] ${item.text}`;
68100
68127
  }
68101
- responseText += `\n\nThese items should be verified. Use log_implementation_note to record verification results.`;
68128
+ responseText += `\n\nThese items should be verified. Record measurable results with record_outcome_measurement; use log_implementation_note for narrative results (the newest notes reach the next agent's prompt).`;
68102
68129
  }
68103
68130
  return {
68104
68131
  content: [{
@@ -68109,7 +68136,7 @@ function startMcpServer() {
68109
68136
  });
68110
68137
  cloudOnly.registerTool('log_implementation_note', {
68111
68138
  title: 'Log Implementation Note',
68112
- description: 'Record a technical decision or implementation note for an intent. Use this to document why you chose a specific approach.',
68139
+ description: 'Record a technical decision or implementation note for an intent the handoff to the next session. The newest 10 notes render into the next agent\'s execution prompt ("What Previous Sessions Handed Over"), so write each note self-contained and consolidate related points rather than logging many fragments.',
68113
68140
  inputSchema: {
68114
68141
  intentId: zod_1.z.string().describe('The intent ID to attach the note to'),
68115
68142
  note: zod_1.z.string().describe('The implementation note or technical decision'),
@@ -68566,9 +68593,9 @@ function startMcpServer() {
68566
68593
  }
68567
68594
  server.registerTool('check_intent_readiness', {
68568
68595
  title: 'Check Intent Readiness (Preflight)',
68569
- 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.',
68596
+ 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 prefer the repo-bound intent.md and fall back to the workspace current intent only when that file is absent. A failing verdict names the exact blockers; repair the fields and re-run. This is the gate that runs at preflight.pathmode.io.',
68570
68597
  inputSchema: {
68571
- spec: zod_1.z.object(intentSpecSchema).optional().describe('Check this spec directly (before saving). When omitted, the current intent is checked instead.'),
68598
+ spec: zod_1.z.object(intentSpecSchema).optional().describe('Check this spec directly (before saving). When omitted, prefer the repo-bound intent.md; in cloud mode, fall back to the workspace current intent only when that file is absent.'),
68572
68599
  intentId: zod_1.z.string().optional().describe('Check a specific saved intent by id. Ignored when spec is passed.'),
68573
68600
  },
68574
68601
  annotations: READ_ONLY,
@@ -68576,10 +68603,19 @@ function startMcpServer() {
68576
68603
  let subject = spec;
68577
68604
  let sourceNote = 'inline spec';
68578
68605
  if (!subject) {
68579
- if (isLocalMode) {
68606
+ // A root intent.md is bound to this working tree. In connected mode the workspace
68607
+ // "current" intent is only a heuristic, so it must not outrank the repo binding.
68608
+ // An explicit different id still wins: the caller deliberately selected another
68609
+ // saved intent rather than asking us to infer the current one.
68610
+ const repoIntent = (0, local_reader_1.readIntentFile)((0, path_1.resolve)(process.cwd(), 'intent.md'));
68611
+ if (repoIntent && (!intentId || repoIntent.id === intentId)) {
68612
+ subject = repoIntent;
68613
+ sourceNote = 'repo-bound intent.md';
68614
+ }
68615
+ else if (isLocalMode) {
68580
68616
  const intents = (0, local_reader_1.readLocalIntents)();
68581
68617
  subject = intentId ? intents.find(i => i.id === intentId) : pickCurrentIntent(intents);
68582
- sourceNote = intentId ? `local intent ${intentId}` : 'current local intent (intent.md)';
68618
+ sourceNote = intentId ? `local intent ${intentId}` : 'current local intent';
68583
68619
  if (!subject) {
68584
68620
  return {
68585
68621
  content: [{
@@ -1 +1 @@
1
- {"version":3,"file":"intent-compiler.d.ts","sourceRoot":"","sources":["file:///Users/jannelammi/code/Pathmode/packages/mcp-server/src/intent-compiler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,MAAM,WAAW,cAAc;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAOD,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,QAAQ,GAAG,gBAAgB,GAAG,kBAAkB,GAAG,MAAM,CAAC;AAC1G,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AACxE,MAAM,WAAW,iBAAiB;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,qBAAqB,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAYD,sGAAsG;AACtG,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,YAAY,CAAC,cAAc,CAAC,GAAG,iBAAiB,EAAE,CAwBzF;AAiBD,MAAM,WAAW,YAAY;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,SAA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GAAG,MAAM,CAqBrF;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,uBAAuB,GAC7B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;CAAE,GAC7C;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,mBAAmB,GAAG,eAAe,GAAG,cAAc,CAAA;CAAE,CAAC;AAElF,wBAAgB,uBAAuB,CAAC,IAAI,EAAE;IAC1C,IAAI,EAAE,MAAM,MAAM,CAAC;IACnB,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,iFAAiF;IACjF,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IAClC,eAAe,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;CAC/D,GAAG,uBAAuB,CA0B1B"}
1
+ {"version":3,"file":"intent-compiler.d.ts","sourceRoot":"","sources":["file:///Users/jannelammi/code/Pathmode/packages/mcp-server/src/intent-compiler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,MAAM,WAAW,cAAc;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAOD,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,QAAQ,GAAG,gBAAgB,GAAG,kBAAkB,GAAG,MAAM,CAAC;AAC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A0B1B"}
@@ -106,4 +106,22 @@ export declare function readIntentMeta(filePath: string): LocalIntentMeta | null
106
106
  */
107
107
  export declare function readIntentFile(filePath: string): LocalIntent | null;
108
108
  export declare function parseIntentMarkdown(content: string, fallbackId?: string): LocalIntent;
109
+ /**
110
+ * Remove HTML comments before any structural parsing. Template scaffolds ship guidance inside
111
+ * `<!-- ... -->`, and it is invisible when the markdown renders, so a reader that treats it as
112
+ * content is reading something the author never wrote.
113
+ *
114
+ * Found by running the published preflight over an untouched `pathmode-intent` scaffold: the
115
+ * Objective section held only a comment explaining what an objective is, that comment named "a
116
+ * role, a team, an operator, an agent", and those actor words carried it past
117
+ * `isObjectiveSpecific`. The scaffold reported a PASSING objective nobody had written. A first-run
118
+ * verdict that praises an empty template is worse than one that blocks, because it is confidently
119
+ * wrong at exactly the moment a new user is deciding whether to trust the tool at all.
120
+ *
121
+ * Applied AFTER `stripFencedBlocks`, so a `<!--` appearing as example content inside a fence is
122
+ * already gone and cannot open a comment that eats real prose. An unterminated comment swallows
123
+ * the rest of the document, matching both the fence rule above and what a markdown renderer does:
124
+ * the parser reads what the author sees.
125
+ */
126
+ export declare function stripHtmlComments(body: string): string;
109
127
  //# sourceMappingURL=local-reader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"local-reader.d.ts","sourceRoot":"","sources":["file:///Users/jannelammi/code/Pathmode/packages/mcp-server/src/local-reader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,QAAQ,GAAG,gBAAgB,GAAG,kBAAkB,GAAG,MAAM,CAAC;AAE1G,MAAM,WAAW,sBAAsB;IACnC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wGAAwG;AACxG,MAAM,WAAW,aA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AAE,CAAC;IACtB,SAAS,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,gBAAgB,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC5D,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IACtD,YAAY,EAAE,iBAAiB,CAAC;IAChC,0EAA0E;IAC1E,aAAa,EAAE,iBAAiB,EAAE,CAAC;IACnC,MAAM,EAAE,OAAO,CAAC;CACnB;AAED,gFAAgF;AAChF,MAAM,WAAW,eAAe;IAC5B,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;6EACyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAID;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,WAAW,EAAE,CAmBhD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAevE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAUnE;AAoDD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,SAAW,GAAG,WAAW,CAuCvF"}
1
+ {"version":3,"file":"local-reader.d.ts","sourceRoot":"","sources":["file:///Users/jannelammi/code/Pathmode/packages/mcp-server/src/local-reader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,QAAQ,GAAG,gBAAgB,GAAG,kBAAkB,GAAG,MAAM,CAAC;AAE1G,MAAM,WAAW,sBAAsB;IACnC,IAAI,EAAE,qBAAqB,CAAC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@ -2,7 +2,7 @@
2
2
  "manifest_version": "0.3",
3
3
  "name": "pathmode",
4
4
  "display_name": "Pathmode",
5
- "version": "1.16.1",
5
+ "version": "1.17.0",
6
6
  "description": "Deterministic preflight for the intent you hand to a coding agent: six calibrated gates, the exact blockers named, no model call, no key needed.",
7
7
  "long_description": "Pathmode MCP Server runs a deterministic preflight before your coding agent builds: check_intent_readiness scores an intent spec against six calibrated gates (title, objective, outcomes, constraints, edge cases, verification) and names the exact blockers, with no model call and no account. Keyless local mode works out of the box; specs live in intent.md in your repo, plain markdown you own, and skills for drafting, pressure-testing, and handing off intent ride along. Connect a Pathmode workspace with an API key to sync intent and evidence across a team, analyze dependency graphs, and verify pull requests against the outcomes you agreed to.",
8
8
  "author": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pathmode/mcp-server",
3
- "version": "1.16.1",
3
+ "version": "1.17.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -5,11 +5,11 @@ description: Adversarial review of an existing intent spec. Walk the spec field-
5
5
 
6
6
  <what-to-do>
7
7
 
8
- Load the active intent. If a `PATHMODE_API_KEY` is set, call `get_current_intent` (Pathmode MCP). Otherwise read `intent.md` from the project root.
8
+ Load the active intent from `intent.md` in the project root first. That file is bound to this repository and remains the content authority even when `PATHMODE_API_KEY` is set. Only call `get_current_intent` when no local file exists. If the file carries a cloud id, use that id for any team-only note call below.
9
9
 
10
10
  Walk the spec field-by-field — objective, outcomes, edge cases, constraints. For each field, find the weakest claim and pressure-test it. Ask ONE pointed question at a time. For each question, propose your best-guess answer based on the spec and the codebase.
11
11
 
12
- When a weakness is confirmed, edit the spec. In team mode, call `log_implementation_note` to record the change. In local mode, write back to `intent.md`.
12
+ When a weakness is confirmed, edit the spec itself — not a note about it. Write the change back to `intent.md` and save with `intent_save` (it preserves the file's identity and syncs in team mode; use `update_intent` only when no local file exists). Then, in team mode, call `log_implementation_note` to record WHY the change was made: the note reaches the next agent's prompt, the spec carries the change.
13
13
 
14
14
  Stop when all five dimensions below pass, or the user explicitly accepts a known weakness.
15
15
 
@@ -28,7 +28,7 @@ Stop when all five dimensions below pass, or the user explicitly accepts a known
28
28
  ## Stop conditions
29
29
 
30
30
  - All five dimensions pass — the spec is agent-ready
31
- - The user explicitly accepts a known weakness — record it with `log_implementation_note` so it's visible to future agents
31
+ - The user explicitly accepts a known weakness — record that acceptance as a decision in the spec with `intent_save`; when a cloud id is available, one consolidated `log_implementation_note` may preserve rationale that does not fit the decision field
32
32
  - More than 6 turns without surfacing new issues — the spec is settled
33
33
 
34
34
  ## Difference from compile-intent
@@ -5,7 +5,7 @@ description: Capture context at the end of an implementation session — decisio
5
5
 
6
6
  <what-to-do>
7
7
 
8
- Load the active intent. If `PATHMODE_API_KEY` is set, call `get_current_intent` (Pathmode MCP). Otherwise read `intent.md` from the project root.
8
+ Load the active intent. Read `intent.md` from the project root first — the file is bound to this repository, which makes it the authority on what this session was working under. If `PATHMODE_API_KEY` is set and the file's frontmatter carries a cloud id, use that id for team-only calls below. Do not let `get_current_intent` choose the intent for you when a local file exists — "current" is a workspace heuristic, not a repo binding. Only fall back to `get_current_intent` when no local file exists.
9
9
 
10
10
  Summarize the session in four buckets:
11
11
 
@@ -14,7 +14,10 @@ Summarize the session in four buckets:
14
14
  - What was discovered that wasn't in the spec (new edge case, hidden constraint, surprising interaction)
15
15
  - What's blocked, and on what
16
16
 
17
- For each decision and discovery, call `log_implementation_note` with a self-contained summary. Assume the next reader has none of this conversation's context.
17
+ Persist the handoff according to what actually exists:
18
+
19
+ - **Cloud id available** — call `log_implementation_note` once with a self-contained summary of the material decisions, discoveries, and blockers. Assume the next reader has none of this conversation's context. The newest 10 notes render into the next agent's execution prompt as "What Previous Sessions Handed Over", so one substantial note preserves continuity without pushing older handoffs out of the window.
20
+ - **Local/keyless only** — do not call `log_implementation_note`; there is no local note store. Fold durable learning into the spec with `intent_save`: settled choices into `decisions`, discovered current behavior into `implementationContext`, and genuine new boundaries into `constraints` or `edgeCases`. Keep transient blockers and the session summary in your response or PR description.
18
21
 
19
22
  If the work is going out as a pull request, name the intent where the merge can find it: branch `intent/<intent-id>`, or `pathmode:<intent-id>` anywhere in the PR body. Without that reference the merge cannot connect the code to the spec, and the whole delivery loop stays dark.
20
23
 
@@ -5,11 +5,11 @@ description: Run the deterministic readiness check on an intent spec before an a
5
5
 
6
6
  <what-to-do>
7
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.
8
+ Call the `check_intent_readiness` MCP tool (Pathmode). With no arguments it prefers `intent.md` in the project root in both local and connected modes; only when that repo-bound file is absent does connected mode fall back to the workspace current intent. Pass `spec` inline to preflight a draft before saving it, or `intentId` when the user deliberately selects a different saved intent.
9
9
 
10
10
  Show the user the verdict block exactly as returned — the blocker strings are the calibrated gate output, do not paraphrase them.
11
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`. When you read the codebase to propose an answer, keep what you learned: pass it to `intent_save` as `implementationContext` (or `record_implementation_context` in cloud mode) instead of discarding it. It does not affect the verdict, and it saves the implementing agent from rediscovering what you just read. Stop when the verdict passes or the user explicitly accepts a named gap.
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 same authority you loaded: when `intent.md` exists, call `intent_save` (it also syncs in connected mode); only use `update_intent` when no local file exists. Then re-run `check_intent_readiness`. When you read the codebase to propose an answer, keep what you learned: pass it to `intent_save` as `implementationContext`, or call `record_implementation_context` for a cloud-only intent. It does not affect the verdict, and it saves the implementing agent from rediscovering what you just read. Stop when the verdict passes or the user explicitly accepts a named gap.
13
13
 
14
14
  If the verdict passes: say so and stop. Do not invent extra requirements beyond the six gates.
15
15
 
@@ -5,7 +5,7 @@ description: Review code changes against the active intent's outcomes and constr
5
5
 
6
6
  <what-to-do>
7
7
 
8
- Load the active intent. If `PATHMODE_API_KEY` is set, call `get_current_intent` (Pathmode MCP). Otherwise read `intent.md` from the project root.
8
+ Load the active intent. Read `intent.md` from the project root first — the file is bound to this repository, which makes it the authority on what governs this diff. If `PATHMODE_API_KEY` is set and the file's frontmatter carries a cloud id, also fetch that intent's execution bundle (`get_agent_prompt` with the id) to pick up what the file cannot hold: open findings, handoff notes, authorization state. Do not let `get_current_intent` choose the intent for you when a local file exists — "current" is a workspace heuristic, not a repo binding. Only with no local file at all, fall back to `get_current_intent`.
9
9
 
10
10
  Identify the changed files using git diff against the base branch (or staged changes if no base specified).
11
11
 
@@ -31,7 +31,7 @@ When all questions are answered, output a single self-contained block the user c
31
31
  - Implementation notes: [convention]
32
32
  ```
33
33
 
34
- If `PATHMODE_API_KEY` is set, ALSO call `log_implementation_note` against a workspace-level convention record (the user's current intent if any, otherwise the first intent in the workspace) so other team members and other agents inherit the conventions.
34
+ If `PATHMODE_API_KEY` is set, ALSO call `log_implementation_note` on the user's current intent (if any, otherwise the first intent in the workspace) so the conventions show in the Pathmode audit trail. Be honest about reach: that note rides only that one intent's future prompts — there is no workspace-level convention record yet. `CLAUDE.md` is what every agent session actually inherits, which is why the paste step above is the one that matters.
35
35
 
36
36
  Do NOT write to a `.pathmode/` directory in the repo. The canonical conventions live in `CLAUDE.md` (visible to every agent session) and in the Pathmode workspace (visible to PMs). The repo is a consumer of intent, not where intent fossilizes.
37
37
 
@@ -68,7 +68,7 @@ For each inference, propose it as the best-guess answer ("Looks like you use Lin
68
68
  ## Mode behavior
69
69
 
70
70
  - **Local mode (no API key)** — Output goes to `CLAUDE.md` only. The user paste-edits it themselves. The skill does not write files.
71
- - **Team mode (`PATHMODE_API_KEY` set)** — Same `CLAUDE.md` output, PLUS a `log_implementation_note` call so the conventions are visible in the Pathmode workspace.
71
+ - **Team mode (`PATHMODE_API_KEY` set)** — Same `CLAUDE.md` output, PLUS a `log_implementation_note` call so the conventions are visible in the Pathmode workspace (on that one intent; `CLAUDE.md` remains the surface every session inherits).
72
72
 
73
73
  ## What this skill does NOT do
74
74
 
@@ -5,7 +5,7 @@ description: Break an intent spec into 3-10 paste-ready tickets for Linear, Jira
5
5
 
6
6
  <what-to-do>
7
7
 
8
- Load the active intent. If `PATHMODE_API_KEY` is set, call `get_current_intent`. Otherwise read `intent.md` from the project root.
8
+ Load the active intent from `intent.md` in the project root first. That file is bound to this repository and remains the content authority even when `PATHMODE_API_KEY` is set. Only call `get_current_intent` when no local file exists.
9
9
 
10
10
  Analyze the spec. The outcomes are the natural decomposition unit — each outcome typically maps to 1-3 tickets, depending on complexity.
11
11
 
@@ -5,7 +5,7 @@ description: Design the executable feedback loop for an intent — fastest check
5
5
 
6
6
  <what-to-do>
7
7
 
8
- Load the active intent. If `PATHMODE_API_KEY` is set, call `get_current_intent`. Otherwise read `intent.md` from the project root.
8
+ Load the active intent from `intent.md` in the project root first. That file is bound to this repository and remains the content authority even when `PATHMODE_API_KEY` is set. Only call `get_current_intent` when no local file exists.
9
9
 
10
10
  Walk the user through the five verification dimensions below. Ask ONE question at a time. For each question, propose your best-guess answer based on the intent's outcomes and what's visible in the codebase (existing tests, observability hooks, CI config).
11
11
 
@@ -17,7 +17,7 @@ The five dimensions:
17
17
  4. **Observable shipped signal** — Once deployed, what tells you it's working in production? (metric, log pattern, user behavior change)
18
18
  5. **What must not regress** — What existing behavior would a fix here accidentally break? (named cases the user worries about)
19
19
 
20
- For each answer, capture it. In team mode, call `log_implementation_note` with the dimension and answer (e.g., `verification:fastest_check: npm run typecheck`). In local mode, append to the `## Verification` section of `intent.md`.
20
+ Hold the five answers until the loop is complete; do not spend five tool calls logging fragments. Then write them once to the structured `verification.checks` collection: `fastest`, `test` (the highest-confidence check), `manual`, `shipped-signal`, and `regression-guard`. When `intent.md` exists, call `intent_save` with the full updated spec (it writes the file and also syncs in connected mode). Only use `update_intent` when no local file exists. In team mode, add one consolidated `log_implementation_note` only when the session produced rationale or a tradeoff that the structured checks do not carry.
21
21
 
22
22
  When all five are answered, summarize the loop:
23
23
 
@@ -64,8 +64,8 @@ The first version is a wish. The second version is a contract.
64
64
 
65
65
  ## Mode behavior
66
66
 
67
- - **Team mode** — Each answer becomes a `log_implementation_note` keyed by dimension. When the verification schema lands in the spec model (planned), these notes will migrate to a structured `verification` field. Until then, notes are the durable store.
68
- - **Local mode** — Answers append to `## Verification` in `intent.md` as a markdown section. Simple, no schema dependency.
67
+ - **Repo-bound intent (local or connected)** — Write all five answers to `verification.checks` with one `intent_save`. The rendered `## Verification` section is the file projection of those structured checks.
68
+ - **Cloud-only intent** — Write all five answers with one `update_intent` call. `log_implementation_note` is for session narrative, not for a field that already exists.
69
69
 
70
70
  ## Pairing with other skills
71
71