@pathmode/mcp-server 1.15.0 → 1.15.1
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 +198 -24
- package/dist/intent-compiler.d.ts +15 -0
- package/dist/intent-compiler.d.ts.map +1 -1
- package/dist/local-reader.d.ts +0 -5
- package/dist/local-reader.d.ts.map +1 -1
- package/dist/readiness.d.ts +9 -1
- package/dist/readiness.d.ts.map +1 -1
- package/manifest.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -34140,6 +34140,8 @@ exports.formatIntentMd = formatIntentMd;
|
|
|
34140
34140
|
exports.formatCursorRules = formatCursorRules;
|
|
34141
34141
|
exports.formatClaudeMdSection = formatClaudeMdSection;
|
|
34142
34142
|
exports.formatOutcomeRubric = formatOutcomeRubric;
|
|
34143
|
+
exports.spliceConfirmationsSection = spliceConfirmationsSection;
|
|
34144
|
+
exports.renderConfirmationsSection = renderConfirmationsSection;
|
|
34143
34145
|
// Verification check collection. Mirrors lib/verification in the main app — this package is
|
|
34144
34146
|
// standalone (own ncc build) and can't import it, so the type + adapter live here. `kind` is the
|
|
34145
34147
|
const crypto_1 = __nccwpck_require__(6982);
|
|
@@ -34895,6 +34897,62 @@ function formatOutcomeRubric(spec, opts = {}) {
|
|
|
34895
34897
|
doc.push('');
|
|
34896
34898
|
return doc.join('\n');
|
|
34897
34899
|
}
|
|
34900
|
+
/**
|
|
34901
|
+
* Splice a `## Confirmations` section into an existing intent.md WITHOUT regenerating the file.
|
|
34902
|
+
*
|
|
34903
|
+
* Regenerating through formatIntentMd is lossy by construction: LocalIntent is a projection, so
|
|
34904
|
+
* a round-trip drops unknown frontmatter keys, resets `version` and `status` to their defaults,
|
|
34905
|
+
* restamps `created`, and deletes any section the reader has no field for. Measured on a real
|
|
34906
|
+
* spec: status approved -> draft, version 7 -> 1, and `source`, `specVersion` and a `## Evidence`
|
|
34907
|
+
* section gone. A tool that records a judgment must not destroy the document it judges.
|
|
34908
|
+
*
|
|
34909
|
+
* So this is a text operation. It replaces an existing `## Confirmations` section in place, or
|
|
34910
|
+
* appends one at the end, and touches nothing else in the file.
|
|
34911
|
+
*/
|
|
34912
|
+
function spliceConfirmationsSection(original, section) {
|
|
34913
|
+
const lines = original.split('\n');
|
|
34914
|
+
const start = lines.findIndex(l => /^##\s+Confirmations\s*$/.test(l));
|
|
34915
|
+
if (start === -1) {
|
|
34916
|
+
const trimmed = original.replace(/\s*$/, '');
|
|
34917
|
+
return `${trimmed}\n\n${section.trim()}\n`;
|
|
34918
|
+
}
|
|
34919
|
+
// Run to the next `##`/`#` heading, so a later section survives untouched.
|
|
34920
|
+
let end = lines.length;
|
|
34921
|
+
for (let i = start + 1; i < lines.length; i++) {
|
|
34922
|
+
if (/^#{1,2}\s+/.test(lines[i])) {
|
|
34923
|
+
end = i;
|
|
34924
|
+
break;
|
|
34925
|
+
}
|
|
34926
|
+
}
|
|
34927
|
+
const before = lines.slice(0, start).join('\n').replace(/\s*$/, '');
|
|
34928
|
+
const after = lines.slice(end).join('\n').replace(/^\s*/, '');
|
|
34929
|
+
return `${before}\n\n${section.trim()}\n${after ? `\n${after}` : ''}`;
|
|
34930
|
+
}
|
|
34931
|
+
/** Render confirmation records as the `## Confirmations` section body. */
|
|
34932
|
+
function renderConfirmationsSection(records) {
|
|
34933
|
+
const emittable = records.filter((c) => {
|
|
34934
|
+
const dim = String(c.dimension ?? '').toLowerCase();
|
|
34935
|
+
const kind = String(c.kind ?? '').toLowerCase();
|
|
34936
|
+
const by = String(c.by ?? '').toLowerCase();
|
|
34937
|
+
return ['objective', 'outcomes'].includes(dim)
|
|
34938
|
+
&& ['confirmed', 'waived'].includes(kind)
|
|
34939
|
+
&& ['agent', 'human'].includes(by);
|
|
34940
|
+
});
|
|
34941
|
+
if (!emittable.length)
|
|
34942
|
+
return '';
|
|
34943
|
+
const out = ['## Confirmations'];
|
|
34944
|
+
for (const c of emittable) {
|
|
34945
|
+
out.push('');
|
|
34946
|
+
out.push(`**${String(c.dimension).toLowerCase()}** — ${String(c.kind).toLowerCase()} by ${String(c.by).toLowerCase()}`);
|
|
34947
|
+
for (const key of ['actor', 'problem', 'outcome', 'observable', 'reason', 'anchor', 'at']) {
|
|
34948
|
+
const v = c[key];
|
|
34949
|
+
if (typeof v !== 'string' || !v.trim())
|
|
34950
|
+
continue;
|
|
34951
|
+
out.push(`- ${key}: ${v.replace(/\s+/g, ' ').trim()}`);
|
|
34952
|
+
}
|
|
34953
|
+
}
|
|
34954
|
+
return out.join('\n');
|
|
34955
|
+
}
|
|
34898
34956
|
|
|
34899
34957
|
|
|
34900
34958
|
/***/ }),
|
|
@@ -35028,14 +35086,65 @@ function readIntentFile(filePath) {
|
|
|
35028
35086
|
* Exported so lib/intentMdParseParity.test.ts can hold the web paste-box parser
|
|
35029
35087
|
* (lib/intentMdParse.ts) to this implementation's behavior on gate-relevant fields.
|
|
35030
35088
|
*/
|
|
35089
|
+
/**
|
|
35090
|
+
* Sections win; frontmatter fills an absence. Mirrors lib/intentMdParse.preferSection.
|
|
35091
|
+
*
|
|
35092
|
+
* Local mode originally read only files that formatIntentMd wrote, which always carry body
|
|
35093
|
+
* sections, so the fallback never fired and was omitted. The preflight CLI broke that
|
|
35094
|
+
* assumption: it points this parser at hand-written files, including the frontmatter-only
|
|
35095
|
+
* shape the /intentspec starter and `pathmode validate` both bless. Without the fallback the
|
|
35096
|
+
* same CLI validated a spec's outcomes as schema-correct and then reported "nothing found"
|
|
35097
|
+
* for them, which is the false "you wrote nothing" this codebase has spent a research cycle
|
|
35098
|
+
* stamping out.
|
|
35099
|
+
*/
|
|
35100
|
+
function preferSection(fromSection, fromFrontmatter) {
|
|
35101
|
+
if (fromSection.length > 0)
|
|
35102
|
+
return fromSection;
|
|
35103
|
+
if (!Array.isArray(fromFrontmatter))
|
|
35104
|
+
return [];
|
|
35105
|
+
return fromFrontmatter
|
|
35106
|
+
.map((v) => (typeof v === 'string' ? v : coerceItemText(v)))
|
|
35107
|
+
.map((v) => v.trim())
|
|
35108
|
+
.filter(Boolean);
|
|
35109
|
+
}
|
|
35110
|
+
/** Coerce a structured frontmatter entry ({text}, {description}) to its text, else ''. */
|
|
35111
|
+
function coerceItemText(v) {
|
|
35112
|
+
if (!v || typeof v !== 'object')
|
|
35113
|
+
return '';
|
|
35114
|
+
const o = v;
|
|
35115
|
+
for (const key of ['text', 'description', 'title']) {
|
|
35116
|
+
if (typeof o[key] === 'string')
|
|
35117
|
+
return o[key];
|
|
35118
|
+
}
|
|
35119
|
+
return '';
|
|
35120
|
+
}
|
|
35121
|
+
/** Frontmatter edge cases in the schema's {scenario, expectedBehavior} shape. */
|
|
35122
|
+
function frontmatterEdgeCases(v) {
|
|
35123
|
+
if (!Array.isArray(v))
|
|
35124
|
+
return [];
|
|
35125
|
+
return v
|
|
35126
|
+
.map((e) => {
|
|
35127
|
+
const o = (e ?? {});
|
|
35128
|
+
return {
|
|
35129
|
+
scenario: typeof o.scenario === 'string' ? o.scenario.trim() : '',
|
|
35130
|
+
expectedBehavior: typeof o.expectedBehavior === 'string' ? o.expectedBehavior.trim()
|
|
35131
|
+
: typeof o.expected_behavior === 'string' ? o.expected_behavior.trim() : '',
|
|
35132
|
+
};
|
|
35133
|
+
})
|
|
35134
|
+
.filter((e) => e.scenario || e.expectedBehavior);
|
|
35135
|
+
}
|
|
35031
35136
|
function parseIntentMarkdown(content, fallbackId = 'intent') {
|
|
35032
35137
|
const { data, content: rawBody } = (0, gray_matter_1.default)(content);
|
|
35033
35138
|
const body = stripFencedBlocks(rawBody);
|
|
35034
35139
|
const sections = splitSections(body);
|
|
35035
35140
|
const parsedVerification = extractVerification(sections);
|
|
35036
|
-
|
|
35037
|
-
|
|
35038
|
-
|
|
35141
|
+
// The public schema allows verification as a flat string array; read it as manual checks
|
|
35142
|
+
// rather than silently producing {} (the same adapter normalizeSpecForReadiness applies).
|
|
35143
|
+
const frontmatterVerification = Array.isArray(data.verification)
|
|
35144
|
+
? { manualChecks: data.verification.map(v => typeof v === 'string' ? v : coerceItemText(v)).filter(Boolean) }
|
|
35145
|
+
: data.verification && typeof data.verification === 'object'
|
|
35146
|
+
? data.verification
|
|
35147
|
+
: null;
|
|
35039
35148
|
const verification = hasVerificationContent(parsedVerification)
|
|
35040
35149
|
? parsedVerification
|
|
35041
35150
|
: (frontmatterVerification || {});
|
|
@@ -35050,11 +35159,11 @@ function parseIntentMarkdown(content, fallbackId = 'intent') {
|
|
|
35050
35159
|
title: data.title || data.userGoal || extractTitle(body) || 'Untitled Intent',
|
|
35051
35160
|
stageName: data.stage || undefined,
|
|
35052
35161
|
severity: data.severity || undefined,
|
|
35053
|
-
outcomes: extractListSection(sections, 'Outcomes'),
|
|
35162
|
+
outcomes: preferSection(extractListSection(sections, 'Outcomes'), data.outcomes),
|
|
35054
35163
|
decisions: extractDecisions(sections),
|
|
35055
|
-
constraints: extractListSection(sections, 'Constraints'),
|
|
35056
|
-
edgeCases: extractEdgeCases(sections),
|
|
35057
|
-
healthMetrics: extractListSection(sections, 'Health Metrics'),
|
|
35164
|
+
constraints: preferSection(extractListSection(sections, 'Constraints'), data.constraints),
|
|
35165
|
+
edgeCases: (() => { const fromBody = extractEdgeCases(sections); return fromBody.length ? fromBody : frontmatterEdgeCases(data.edgeCases); })(),
|
|
35166
|
+
healthMetrics: preferSection(extractListSection(sections, 'Health Metrics'), data.healthMetrics),
|
|
35058
35167
|
scope: extractScope(sections) || undefined,
|
|
35059
35168
|
verification,
|
|
35060
35169
|
confirmations: extractConfirmations(sections),
|
|
@@ -35843,8 +35952,16 @@ function applyConfirmations(detail, digests, raw) {
|
|
|
35843
35952
|
rejected.push({ code: 'stale', dimension: dim });
|
|
35844
35953
|
continue;
|
|
35845
35954
|
}
|
|
35846
|
-
if (d && d.state !== 'pass')
|
|
35955
|
+
if (d && d.state !== 'pass') {
|
|
35847
35956
|
d.state = kind === 'waived' ? 'not_applicable' : 'pass';
|
|
35957
|
+
d.confirmedBy = by === 'human' ? 'human' : 'agent';
|
|
35958
|
+
// Assurance is never taken from the record: a file cannot vouch for itself. Anything
|
|
35959
|
+
// arriving without an authenticated boundary is local-unverified, and renders that way.
|
|
35960
|
+
d.assurance = coerceText(c.assurance).trim() === 'authenticated'
|
|
35961
|
+
? 'authenticated' : 'local-unverified';
|
|
35962
|
+
if (kind === 'waived')
|
|
35963
|
+
d.reason = coerceText(c.reason).trim();
|
|
35964
|
+
}
|
|
35848
35965
|
}
|
|
35849
35966
|
return rejected;
|
|
35850
35967
|
}
|
|
@@ -35954,11 +36071,19 @@ const FRONTMATTER_GATE_LABELS = {
|
|
|
35954
36071
|
*/
|
|
35955
36072
|
function formatReadinessFrontmatter(verdict) {
|
|
35956
36073
|
const total = exports.READINESS_GATE_ORDER.length;
|
|
35957
|
-
|
|
35958
|
-
|
|
35959
|
-
|
|
35960
|
-
const
|
|
35961
|
-
|
|
36074
|
+
// A confirmed dimension counts as passed; a WAIVED one never does (contract amendment D:
|
|
36075
|
+
// "passed 6/6 (1 waived)" launders an exception into the score). Waivers are counted
|
|
36076
|
+
// separately and named, and a spec with both product dimensions waived is not scored at all.
|
|
36077
|
+
const passed = exports.READINESS_GATE_ORDER.filter((k) => verdict.detail?.[k]?.state === 'pass' || verdict.signals[k]).length;
|
|
36078
|
+
const waived = exports.READINESS_GATE_ORDER.filter((k) => verdict.detail?.[k]?.state === 'not_applicable');
|
|
36079
|
+
const blocking = exports.READINESS_GATE_ORDER.filter((k) => !verdict.signals[k] && verdict.detail?.[k]?.state !== 'pass' && verdict.detail?.[k]?.state !== 'not_applicable').map((k) => FRONTMATTER_GATE_LABELS[k]);
|
|
36080
|
+
if (blocking.length)
|
|
36081
|
+
return `failed ${passed}/${total} — blocking: ${blocking.join(', ')}`;
|
|
36082
|
+
if (waived.length === 2)
|
|
36083
|
+
return 'product intent preflight not applicable to this change';
|
|
36084
|
+
if (waived.length)
|
|
36085
|
+
return `ready with exceptions: ${passed} passed, ${waived.length} waived (${waived.map(k => FRONTMATTER_GATE_LABELS[k]).join(', ')})`;
|
|
36086
|
+
return `passed ${passed}/${total}`;
|
|
35962
36087
|
}
|
|
35963
36088
|
/**
|
|
35964
36089
|
* The extra line an `unconfirmed` dimension earns: what was read, and an honest statement of
|
|
@@ -35979,21 +36104,50 @@ function truncateForQuote(text, max = 160) {
|
|
|
35979
36104
|
return flat.length <= max ? flat : `${flat.slice(0, max - 1)}…`;
|
|
35980
36105
|
}
|
|
35981
36106
|
/** Human/agent-readable verdict block, stable enough to parse by line prefix. */
|
|
35982
|
-
function formatReadinessVerdict(verdict, specTitle
|
|
36107
|
+
function formatReadinessVerdict(verdict, specTitle,
|
|
36108
|
+
/** Override the closing repair line. The default names MCP tools, which are wrong in a CLI
|
|
36109
|
+
* reading a repo that has never installed Pathmode. */
|
|
36110
|
+
repairHint) {
|
|
35983
36111
|
const lines = [];
|
|
35984
36112
|
const name = (specTitle || '').trim();
|
|
35985
|
-
|
|
35986
|
-
|
|
36113
|
+
// The RESOLVED state is what a reader acts on: `ready`/`signals` stay the pure lexical
|
|
36114
|
+
// verdict underneath, so what a spec earned stays distinguishable from what was vouched for,
|
|
36115
|
+
// but a confirmed dimension must stop being reported as a blocker or the whole confirmation
|
|
36116
|
+
// loop is invisible.
|
|
36117
|
+
const resolved = (k) => verdict.detail?.[k]?.state ?? (verdict.signals[k] ? 'pass' : 'absent');
|
|
36118
|
+
const stillBlocking = BLOCKER_ORDER.filter(k => !verdict.signals[k] && resolved(k) !== 'pass' && resolved(k) !== 'not_applicable');
|
|
36119
|
+
const waivedKeys = BLOCKER_ORDER.filter(k => resolved(k) === 'not_applicable');
|
|
36120
|
+
const vouched = BLOCKER_ORDER.filter(k => !verdict.signals[k] && resolved(k) === 'pass');
|
|
36121
|
+
if (!stillBlocking.length) {
|
|
36122
|
+
if (waivedKeys.length === 2) {
|
|
36123
|
+
lines.push(`– Product intent preflight not applicable to this change${name ? ` ("${name}")` : ''}.`);
|
|
36124
|
+
}
|
|
36125
|
+
else if (waivedKeys.length) {
|
|
36126
|
+
lines.push(`✓ Ready with exceptions${name ? ` for "${name}"` : ''}. ${6 - waivedKeys.length} passed, ${waivedKeys.length} waived.`);
|
|
36127
|
+
}
|
|
36128
|
+
else {
|
|
36129
|
+
lines.push(`✓ Preflight passed${name ? ` for "${name}"` : ''}. 6/6 checks. Ready to hand to an agent.`);
|
|
36130
|
+
}
|
|
36131
|
+
for (const k of vouched) {
|
|
36132
|
+
const d = verdict.detail?.[k];
|
|
36133
|
+
const who = d?.confirmedBy ?? 'agent';
|
|
36134
|
+
lines.push(` ✓ ${GATE_LABELS[k]} confirmed by ${who}${who === 'human' && d?.assurance !== 'authenticated' ? ' (unverified)' : ''}, not by the check`);
|
|
36135
|
+
}
|
|
36136
|
+
for (const k of waivedKeys) {
|
|
36137
|
+
const d = verdict.detail?.[k];
|
|
36138
|
+
const who = d?.confirmedBy ?? 'human';
|
|
36139
|
+
lines.push(` – ${GATE_LABELS[k]} waived by ${who}${who === 'human' && d?.assurance !== 'authenticated' ? ' (unverified)' : ''}: ${d?.reason || 'no reason recorded'}`);
|
|
36140
|
+
}
|
|
35987
36141
|
}
|
|
35988
36142
|
else {
|
|
35989
|
-
lines.push(`✗ Preflight failed${name ? ` for "${name}"` : ''}. ${
|
|
36143
|
+
lines.push(`✗ Preflight failed${name ? ` for "${name}"` : ''}. ${stillBlocking.length}/6 checks blocking.`);
|
|
35990
36144
|
// Blocker lines stay byte-identical and in order; an unconfirmed dimension gets an
|
|
35991
36145
|
// extra indented line quoting what was actually read. Without it the verdict says
|
|
35992
36146
|
// "name the actor" to an author who named one in words this vocabulary misses, which
|
|
35993
36147
|
// an audit of 80 real specs measured as the majority of these failures
|
|
35994
36148
|
// (docs/research/openspec-corpus-audit.md).
|
|
35995
36149
|
for (const key of BLOCKER_ORDER) {
|
|
35996
|
-
if (verdict.signals[key])
|
|
36150
|
+
if (verdict.signals[key] || resolved(key) === 'pass' || resolved(key) === 'not_applicable')
|
|
35997
36151
|
continue;
|
|
35998
36152
|
lines.push(` ✗ ${exports.READINESS_BLOCKER_DESCRIPTIONS[key]}`);
|
|
35999
36153
|
const d = verdict.detail?.[key];
|
|
@@ -36004,10 +36158,13 @@ function formatReadinessVerdict(verdict, specTitle) {
|
|
|
36004
36158
|
}
|
|
36005
36159
|
}
|
|
36006
36160
|
lines.push('');
|
|
36007
|
-
lines.push(exports.READINESS_GATE_ORDER.map(k =>
|
|
36008
|
-
|
|
36161
|
+
lines.push(exports.READINESS_GATE_ORDER.map(k => {
|
|
36162
|
+
const st = resolved(k);
|
|
36163
|
+
return `${st === 'pass' ? '✓' : st === 'not_applicable' ? '–' : st === 'unconfirmed' ? '?' : '·'} ${GATE_LABELS[k]}`;
|
|
36164
|
+
}).join(' '));
|
|
36165
|
+
if (stillBlocking.length) {
|
|
36009
36166
|
lines.push('');
|
|
36010
|
-
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.');
|
|
36167
|
+
lines.push(repairHint ?? '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.');
|
|
36011
36168
|
}
|
|
36012
36169
|
return lines.join('\n');
|
|
36013
36170
|
}
|
|
@@ -65941,7 +66098,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"$schema":"http://json-schema.org/dra
|
|
|
65941
66098
|
/***/ ((module) => {
|
|
65942
66099
|
|
|
65943
66100
|
"use strict";
|
|
65944
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@pathmode/mcp-server","version":"1.15.
|
|
66101
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@pathmode/mcp-server","version":"1.15.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"}}');
|
|
65945
66102
|
|
|
65946
66103
|
/***/ })
|
|
65947
66104
|
|
|
@@ -67359,12 +67516,23 @@ function startMcpServer() {
|
|
|
67359
67516
|
let sourceUrl;
|
|
67360
67517
|
let didNotTravel = [];
|
|
67361
67518
|
const writeSpecFile = (opts) => {
|
|
67362
|
-
|
|
67519
|
+
let content = (0, intent_compiler_1.formatIntentMd)({ ...fields, id: opts.canonicalId }, {
|
|
67363
67520
|
version, status, created,
|
|
67364
67521
|
readiness: (0, readiness_1.formatReadinessFrontmatter)(verdict),
|
|
67365
67522
|
specVersion: opts.specVersion,
|
|
67366
67523
|
source: opts.sourceUrl,
|
|
67367
67524
|
});
|
|
67525
|
+
// Carry existing confirmations across the rewrite. intent_save builds its content from
|
|
67526
|
+
// the incoming spec, which by design has no `confirmations` field (that absence is what
|
|
67527
|
+
// enforces M1: a confirmation cannot be minted in the write that authored the field).
|
|
67528
|
+
// Without this the very next save silently deletes every confirmation the file holds,
|
|
67529
|
+
// and the anchors would have caught nothing because the records would be gone.
|
|
67530
|
+
// Confirmations are re-validated on read, so a save that changed the field text simply
|
|
67531
|
+
// leaves them stale rather than wrongly live.
|
|
67532
|
+
const prior = (0, fs_1.existsSync)(filePath) ? (0, local_reader_1.readIntentFile)(filePath)?.confirmations ?? [] : [];
|
|
67533
|
+
if (prior.length) {
|
|
67534
|
+
content = (0, intent_compiler_1.spliceConfirmationsSection)(content, (0, intent_compiler_1.renderConfirmationsSection)(prior));
|
|
67535
|
+
}
|
|
67368
67536
|
(0, fs_1.writeFileSync)(filePath, content, 'utf-8');
|
|
67369
67537
|
};
|
|
67370
67538
|
if (isLocalMode) {
|
|
@@ -67511,7 +67679,13 @@ function startMcpServer() {
|
|
|
67511
67679
|
};
|
|
67512
67680
|
// One live record per dimension: a re-confirmation replaces rather than accumulates.
|
|
67513
67681
|
const kept = existing.confirmations.filter(c => c.dimension !== dimension);
|
|
67514
|
-
const
|
|
67682
|
+
const next = [...kept, record];
|
|
67683
|
+
// SPLICE, never regenerate. formatIntentMd round-trips through a lossy projection: it
|
|
67684
|
+
// would reset version and status to defaults, restamp created, and delete unknown
|
|
67685
|
+
// frontmatter keys and any section the reader has no field for. Recording a judgment
|
|
67686
|
+
// must not damage the document being judged.
|
|
67687
|
+
const original = (0, fs_1.readFileSync)(filePath, 'utf-8');
|
|
67688
|
+
const content = (0, intent_compiler_1.spliceConfirmationsSection)(original, (0, intent_compiler_1.renderConfirmationsSection)(next));
|
|
67515
67689
|
(0, fs_1.writeFileSync)(filePath, content, 'utf-8');
|
|
67516
67690
|
const after = (0, readiness_1.computeReadinessVerdict)({ ...existing, confirmations: [...kept, record] });
|
|
67517
67691
|
return {
|
|
@@ -137,3 +137,18 @@ export interface OutcomeRubricOptions {
|
|
|
137
137
|
* Docs: https://platform.claude.com/docs/en/managed-agents/define-outcomes
|
|
138
138
|
*/
|
|
139
139
|
export declare function formatOutcomeRubric(spec: IntentFields, opts?: OutcomeRubricOptions): string;
|
|
140
|
+
/**
|
|
141
|
+
* Splice a `## Confirmations` section into an existing intent.md WITHOUT regenerating the file.
|
|
142
|
+
*
|
|
143
|
+
* Regenerating through formatIntentMd is lossy by construction: LocalIntent is a projection, so
|
|
144
|
+
* a round-trip drops unknown frontmatter keys, resets `version` and `status` to their defaults,
|
|
145
|
+
* restamps `created`, and deletes any section the reader has no field for. Measured on a real
|
|
146
|
+
* spec: status approved -> draft, version 7 -> 1, and `source`, `specVersion` and a `## Evidence`
|
|
147
|
+
* section gone. A tool that records a judgment must not destroy the document it judges.
|
|
148
|
+
*
|
|
149
|
+
* So this is a text operation. It replaces an existing `## Confirmations` section in place, or
|
|
150
|
+
* appends one at the end, and touches nothing else in the file.
|
|
151
|
+
*/
|
|
152
|
+
export declare function spliceConfirmationsSection(original: string, section: string): string;
|
|
153
|
+
/** Render confirmation records as the `## Confirmations` section body. */
|
|
154
|
+
export declare function renderConfirmationsSection(records: Record<string, unknown>[]): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"","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;AAsDD,MAAM,WAAW,YAAY;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EA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AAoB,GAAG,MAAM,CA+IrF;AAOD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAwF5D;AAOD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CA4DhE;AAOD,MAAM,WAAW,oBAAoB;IACjC;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,0EAA0E;IAC1E,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AA2MD;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,GAAE,oBAAyB,GAAG,MAAM,CAmC/F;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAepF;AAED,0EAA0E;AAC1E,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,MAAM,CAqBrF"}
|
package/dist/local-reader.d.ts
CHANGED
|
@@ -105,9 +105,4 @@ export declare function readIntentMeta(filePath: string): LocalIntentMeta | null
|
|
|
105
105
|
* Parse a single intent.md file with YAML frontmatter.
|
|
106
106
|
*/
|
|
107
107
|
export declare function readIntentFile(filePath: string): LocalIntent | null;
|
|
108
|
-
/**
|
|
109
|
-
* Parse intent.md content (frontmatter + body) into a LocalIntent. Pure: no fs, no cwd.
|
|
110
|
-
* Exported so lib/intentMdParseParity.test.ts can hold the web paste-box parser
|
|
111
|
-
* (lib/intentMdParse.ts) to this implementation's behavior on gate-relevant fields.
|
|
112
|
-
*/
|
|
113
108
|
export declare function parseIntentMarkdown(content: string, fallbackId?: string): LocalIntent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"","sourceRoot":"","sources":["file:///Users/jannelammi/code/Pathmode/packages/mcp-server/src/local-reader.ts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|
+
{"version":3,"file":"","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,aAAa;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAC9B,MAAM,CAAC,EAAE,sBAAsB,EAAE,CAAC;IAClC,0EAA0E;IAC1E,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,kBAAkB,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,EAAE,CAAC,EAAE,MAAM,CAAC;CACf;AAuCD,MA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wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAUnE;AAoDD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,SAAW,GAAG,WAAW,CAuCvF"}
|
package/dist/readiness.d.ts
CHANGED
|
@@ -86,6 +86,11 @@ export interface DimensionDetail {
|
|
|
86
86
|
state: DimensionState;
|
|
87
87
|
/** What the reader actually read for this dimension, for quoting back. */
|
|
88
88
|
extracted?: string;
|
|
89
|
+
/** Set when a confirmation or waiver moved this dimension: who vouched, and how well we know it. */
|
|
90
|
+
confirmedBy?: 'agent' | 'human';
|
|
91
|
+
assurance?: 'authenticated' | 'local-unverified';
|
|
92
|
+
/** The waiver's stated reason, for rendering the exception rather than hiding it. */
|
|
93
|
+
reason?: string;
|
|
89
94
|
}
|
|
90
95
|
export interface ReadinessVerdict {
|
|
91
96
|
ready: boolean;
|
|
@@ -115,4 +120,7 @@ export declare function computeReadinessVerdict(spec: ReadinessSpecInput): Readi
|
|
|
115
120
|
*/
|
|
116
121
|
export declare function formatReadinessFrontmatter(verdict: ReadinessVerdict): string;
|
|
117
122
|
/** Human/agent-readable verdict block, stable enough to parse by line prefix. */
|
|
118
|
-
export declare function formatReadinessVerdict(verdict: ReadinessVerdict, specTitle?: string
|
|
123
|
+
export declare function formatReadinessVerdict(verdict: ReadinessVerdict, specTitle?: string,
|
|
124
|
+
/** Override the closing repair line. The default names MCP tools, which are wrong in a CLI
|
|
125
|
+
* reading a repo that has never installed Pathmode. */
|
|
126
|
+
repairHint?: string): string;
|
package/dist/readiness.d.ts.map
CHANGED
|
@@ -1 +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,OAA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;IAC1B,kFAAkF;IAClF,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACxC,yFAAyF;IACzF,qBAAqB,EAAE,oBAAoB,EAAE,CAAC;IAC9C;;;OAGG;IACH,cAAc,EAAE,OAAO,CAAC;CAC3B;AAoBD;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,kBAAkB,GAAG,gBAAgB,CAyDlF;AAqBD;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAe5E;AAsBD,iFAAiF;AACjF,wBAAgB,sBAAsB,CAClC,OAAO,EAAE,gBAAgB,EACzB,SAAS,CAAC,EAAE,MAAM;AAClB;wDACwD;AACxD,UAAU,CAAC,EAAE,MAAM,GACpB,MAAM,CAyDR"}
|
package/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"manifest_version": "0.3",
|
|
3
3
|
"name": "pathmode",
|
|
4
4
|
"display_name": "Pathmode",
|
|
5
|
-
"version": "1.15.
|
|
5
|
+
"version": "1.15.1",
|
|
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": {
|