@pathmode/mcp-server 1.4.3 → 1.4.4
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 +1 -1
- package/dist/api-client.d.ts +26 -3
- package/dist/api-client.d.ts.map +1 -1
- package/dist/index.js +124 -37
- package/dist/intent-compiler.d.ts +9 -1
- package/dist/intent-compiler.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ No signup. No API key. Just add the MCP server and start talking.
|
|
|
6
6
|
|
|
7
7
|
## Intent Compiler
|
|
8
8
|
|
|
9
|
-
The Intent Compiler turns Claude Code into a Socratic product thinking partner. Describe a problem, paste a support ticket, or explain what's broken — Claude challenges vague thinking, asks pointed questions, and builds a structured spec.
|
|
9
|
+
The Intent Compiler turns Claude Code into a Socratic product thinking partner. Describe a problem, paste a support ticket, or explain what's broken — Claude challenges vague thinking, asks pointed questions, runs live quality checks on weak fields, and builds a structured spec.
|
|
10
10
|
|
|
11
11
|
```
|
|
12
12
|
> Help me write an intent spec for our checkout flow
|
package/dist/api-client.d.ts
CHANGED
|
@@ -7,6 +7,11 @@ export interface PathmodeConfig {
|
|
|
7
7
|
apiUrl: string;
|
|
8
8
|
workspaceId: string;
|
|
9
9
|
}
|
|
10
|
+
export interface ApiStructuredOutcome {
|
|
11
|
+
id: string;
|
|
12
|
+
text: string;
|
|
13
|
+
priority?: 'must' | 'should' | 'could';
|
|
14
|
+
}
|
|
10
15
|
export interface ApiIntent {
|
|
11
16
|
id: string;
|
|
12
17
|
workspaceId: string;
|
|
@@ -19,8 +24,12 @@ export interface ApiIntent {
|
|
|
19
24
|
objective: string;
|
|
20
25
|
problemSeverity?: string;
|
|
21
26
|
title: string;
|
|
22
|
-
outcomes:
|
|
27
|
+
outcomes: ApiStructuredOutcome[];
|
|
23
28
|
healthMetrics: string[];
|
|
29
|
+
scope?: {
|
|
30
|
+
inScope?: string[];
|
|
31
|
+
outOfScope?: string[];
|
|
32
|
+
};
|
|
24
33
|
strategicAlignment?: string;
|
|
25
34
|
alignmentNotes?: string;
|
|
26
35
|
context: Record<string, any>;
|
|
@@ -47,7 +56,10 @@ export interface CreateIntentInput {
|
|
|
47
56
|
title: string;
|
|
48
57
|
objective: string;
|
|
49
58
|
productId: string;
|
|
50
|
-
outcomes?: string
|
|
59
|
+
outcomes?: (string | {
|
|
60
|
+
text: string;
|
|
61
|
+
priority?: string;
|
|
62
|
+
})[];
|
|
51
63
|
constraints?: string[];
|
|
52
64
|
healthMetrics?: string[];
|
|
53
65
|
edgeCases?: {
|
|
@@ -60,11 +72,18 @@ export interface CreateIntentInput {
|
|
|
60
72
|
e2eTests?: string[];
|
|
61
73
|
};
|
|
62
74
|
problemSeverity?: string;
|
|
75
|
+
scope?: {
|
|
76
|
+
inScope?: string[];
|
|
77
|
+
outOfScope?: string[];
|
|
78
|
+
};
|
|
63
79
|
}
|
|
64
80
|
export interface UpdateIntentInput {
|
|
65
81
|
title?: string;
|
|
66
82
|
objective?: string;
|
|
67
|
-
outcomes?: string
|
|
83
|
+
outcomes?: (string | {
|
|
84
|
+
text: string;
|
|
85
|
+
priority?: string;
|
|
86
|
+
})[];
|
|
68
87
|
constraints?: string[];
|
|
69
88
|
healthMetrics?: string[];
|
|
70
89
|
edgeCases?: {
|
|
@@ -78,6 +97,10 @@ export interface UpdateIntentInput {
|
|
|
78
97
|
};
|
|
79
98
|
problemSeverity?: string;
|
|
80
99
|
evidenceAnchors?: Record<string, string[]>;
|
|
100
|
+
scope?: {
|
|
101
|
+
inScope?: string[];
|
|
102
|
+
outOfScope?: string[];
|
|
103
|
+
};
|
|
81
104
|
}
|
|
82
105
|
export interface EvidenceQuery {
|
|
83
106
|
productId?: string;
|
package/dist/api-client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"","sourceRoot":"","sources":["file:///Users/jannelammi/code/Pathmode/packages/mcp-server/src/api-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAAM,WAAW,cAAc;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACvB;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,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"","sourceRoot":"","sources":["file:///Users/jannelammi/code/Pathmode/packages/mcp-server/src/api-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,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,SAAS;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC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|
|
|
33700
33700
|
exports.formatIntentMd = formatIntentMd;
|
|
33701
33701
|
exports.formatCursorRules = formatCursorRules;
|
|
33702
33702
|
exports.formatClaudeMdSection = formatClaudeMdSection;
|
|
33703
|
+
/** Extract text from a string or structured outcome. */
|
|
33704
|
+
function getOutcomeText(o) {
|
|
33705
|
+
return typeof o === 'string' ? o : o.text;
|
|
33706
|
+
}
|
|
33707
|
+
/** Get priority label prefix for an outcome. */
|
|
33708
|
+
function getPriorityLabel(o) {
|
|
33709
|
+
if (typeof o === 'string' || !o.priority)
|
|
33710
|
+
return '';
|
|
33711
|
+
return `[${o.priority.toUpperCase()}] `;
|
|
33712
|
+
}
|
|
33713
|
+
function getLiveQualityCheckPromptBlock() {
|
|
33714
|
+
return `LIVE QUALITY CHECKS:
|
|
33715
|
+
- After EVERY meaningful user answer, silently update your current draft and run a quality pass before asking the next question.
|
|
33716
|
+
- Do NOT dump the full rubric every turn. Surface only the single most important failing check right now.
|
|
33717
|
+
- State the issue plainly, then ask ONE pointed follow-up question that resolves that weakness.
|
|
33718
|
+
|
|
33719
|
+
QUALITY RUBRIC:
|
|
33720
|
+
1. Objective quality
|
|
33721
|
+
- Reject vague words like "improve", "better", "enhance", "optimize", "streamline".
|
|
33722
|
+
- Reject objectives that are too broad, too short, or missing who is affected and why it matters.
|
|
33723
|
+
- If the same objective could describe five different projects, it is still vague.
|
|
33724
|
+
|
|
33725
|
+
2. Outcome quality
|
|
33726
|
+
- Outcomes must be observable state changes, not implementation steps or task lists.
|
|
33727
|
+
- Push back on outcomes like "add a dashboard", "build retry logic", "create a modal", "improve UX".
|
|
33728
|
+
- Prefer outcomes like "Users see retry guidance within 5 seconds of failure".
|
|
33729
|
+
|
|
33730
|
+
3. Testability
|
|
33731
|
+
- If an outcome cannot be checked by a test, metric, or concrete manual observation, it is not ready.
|
|
33732
|
+
- Push toward measurable language: percentages, timing thresholds, binary states, visible user actions, or explicit system behavior.
|
|
33733
|
+
|
|
33734
|
+
4. Objective/outcome consistency
|
|
33735
|
+
- Check whether the proposed outcomes actually prove the objective is solved.
|
|
33736
|
+
- Call out mismatches directly: "The objective is about speed, but the outcomes only mention clarity."
|
|
33737
|
+
|
|
33738
|
+
5. Edge-case coverage
|
|
33739
|
+
- Before the spec is ready, require at least one embarrassing failure mode, boundary condition, timeout, empty state, permission issue, or concurrency issue.
|
|
33740
|
+
|
|
33741
|
+
6. Verification quality
|
|
33742
|
+
- As soon as an outcome becomes clear, ask what evidence would prove it worked.
|
|
33743
|
+
- Verification can be a test, a metric, or a manual check, but it must be concrete.
|
|
33744
|
+
|
|
33745
|
+
EXAMPLES OF HOW TO SURFACE A FAILING CHECK:
|
|
33746
|
+
- "Quality check: the objective is still vague. It says improve, but not what breaks today."
|
|
33747
|
+
- "Quality check: that outcome is an implementation step, not a user-visible result."
|
|
33748
|
+
- "Quality check: your outcomes don't yet prove the problem is solved."
|
|
33749
|
+
- "Quality check: we still have no failure mode, so this spec is not ready yet."`;
|
|
33750
|
+
}
|
|
33703
33751
|
// ============================================================
|
|
33704
33752
|
// Compile Intent Prompt
|
|
33705
33753
|
// ============================================================
|
|
@@ -33708,47 +33756,44 @@ exports.formatClaudeMdSection = formatClaudeMdSection;
|
|
|
33708
33756
|
* Adapted from intentDesignerMachine.ts conversationFirstPreamble for terminal use.
|
|
33709
33757
|
*/
|
|
33710
33758
|
function getCompileIntentPrompt() {
|
|
33711
|
-
return `You are a sharp product thinking partner. Your job is to help the user build a structured intent spec through conversation — challenging their thinking until the intent is so clear it's almost obvious what to build.
|
|
33759
|
+
return `You are a sharp product thinking partner. Your job is to help the user build a structured intent spec through conversation — challenging their thinking until the intent is so clear it's almost obvious what to build. Your overarching goal is to actively prevent a spec from feeling complete before it is operationally sharp.
|
|
33712
33760
|
|
|
33713
33761
|
RULES:
|
|
33714
|
-
- Push back on vague language. If the user says "improve the experience", ask: "What specific moment is broken? What would the user see differently?"
|
|
33715
33762
|
- Ask ONE pointed question at a time. Never list 3 questions.
|
|
33716
|
-
- When the user gives a clear answer, propose how you'd write that as a spec field. Explain WHY you worded it that way.
|
|
33717
|
-
- Look for inconsistencies between what they say the problem is and what outcomes they propose.
|
|
33718
33763
|
- Be direct and concise. No pleasantries. No "Great question!" or "That's a good point!"
|
|
33719
|
-
-
|
|
33764
|
+
- Push back on vague language. If the user says "improve the experience", ask: "What specific moment is broken? What would the user see differently?"
|
|
33765
|
+
- CONTRADICTION DETECTION: Actively hunt for inconsistencies. Examples: "Your objective says speed, but your outcomes only mention visibility" or "You want no extra steps, but your constraint adds mandatory confirmation." Call them out bluntly.
|
|
33766
|
+
|
|
33767
|
+
${getLiveQualityCheckPromptBlock()}
|
|
33768
|
+
|
|
33769
|
+
EVIDENCE-FIRST GROUNDING:
|
|
33770
|
+
- 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.
|
|
33720
33771
|
|
|
33721
|
-
|
|
33722
|
-
-
|
|
33723
|
-
-
|
|
33724
|
-
|
|
33772
|
+
EARLIER VERIFICATION BACK-CHAINING:
|
|
33773
|
+
- Do not wait until the end to figure out verification.
|
|
33774
|
+
- The moment the user proposes an outcome, back-chain perfectly: "If we achieve that outcome, exactly how will we know it worked? What test or metric proves it?" Outcomes and verification must be paired immediately.
|
|
33775
|
+
|
|
33776
|
+
VISIBLE COMPLETENESS STATE:
|
|
33777
|
+
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.
|
|
33778
|
+
|
|
33779
|
+
STATUS:
|
|
33780
|
+
[ ] Objective clear enough (and backed by evidence)
|
|
33781
|
+
[ ] At least 2 testable outcomes
|
|
33782
|
+
[ ] At least 1 failure mode (edge case)
|
|
33783
|
+
[ ] Scope boundaries named (constraints / out of scope)
|
|
33784
|
+
[ ] Verification present or explicitly deferred
|
|
33725
33785
|
|
|
33726
33786
|
CONVERSATION FLOW (guidance, not rigid steps):
|
|
33727
|
-
1. **Problem** —
|
|
33728
|
-
2. **
|
|
33729
|
-
3. **Outcomes** — Observable
|
|
33730
|
-
4. **
|
|
33731
|
-
5. **
|
|
33732
|
-
|
|
33733
|
-
You are NOT bound by this order. Follow the user's thinking wherever it goes. If they start with edge cases, work backwards to the objective.
|
|
33734
|
-
|
|
33735
|
-
BUILDING THE SPEC:
|
|
33736
|
-
As the conversation progresses, keep a mental model of the spec fields:
|
|
33737
|
-
- **Title**: Short name for the intent (what is this?)
|
|
33738
|
-
- **Objective**: Why this matters — the problem and who has it
|
|
33739
|
-
- **Outcomes**: 2-5 observable, testable results (not activities)
|
|
33740
|
-
- **Constraints**: Hard limits the implementation must respect
|
|
33741
|
-
- **Edge Cases**: Scenario + expected behavior pairs
|
|
33742
|
-
- **Health Metrics**: What to monitor after shipping (optional)
|
|
33743
|
-
- **Verification**: How to confirm it actually works (optional)
|
|
33787
|
+
1. **Evidence & Problem** — Ground the intent in a real artifact. What's broken?
|
|
33788
|
+
2. **Objective** — What specific user outcome solves this pain? Make it concrete.
|
|
33789
|
+
3. **Outcomes & Verification** — Observable state changes. Instantly back-chain to verification.
|
|
33790
|
+
4. **Scope & Constraints** — What are the hard boundaries?
|
|
33791
|
+
5. **Edge Cases** — What's the worst way this could fail?
|
|
33744
33792
|
|
|
33745
33793
|
When you have enough clarity on ANY field, state it clearly:
|
|
33746
|
-
> **Proposed Objective**: "Reduce
|
|
33747
|
-
|
|
33748
|
-
Then ask if that captures it or needs refinement.
|
|
33794
|
+
> **Proposed Objective**: "Reduce checkout drop-off by 15% by showing upfront shipping costs."
|
|
33749
33795
|
|
|
33750
|
-
WHEN THE SPEC FEELS READY:
|
|
33751
|
-
Once you have at minimum a title, objective, and 2+ outcomes:
|
|
33796
|
+
WHEN THE SPEC FEELS READY AND ALL STATUS ITEMS ARE [X]:
|
|
33752
33797
|
1. Present the full spec as a summary for the user to review
|
|
33753
33798
|
2. Ask if they want to save it
|
|
33754
33799
|
3. When confirmed, call the \`intent_save\` tool with the complete spec
|
|
@@ -33756,6 +33801,8 @@ Once you have at minimum a title, objective, and 2+ outcomes:
|
|
|
33756
33801
|
5. Mention: "For dependency tracking, team collaboration, and governance, connect this to Pathmode at pathmode.io"
|
|
33757
33802
|
|
|
33758
33803
|
IMPORTANT:
|
|
33804
|
+
- Do not switch into passive note-taking. Use the quality checks continuously while the spec is still forming.
|
|
33805
|
+
- If a field fails a quality check, challenge it before moving on.
|
|
33759
33806
|
- The spec fields in \`intent_save\` must use this exact structure:
|
|
33760
33807
|
- title: string
|
|
33761
33808
|
- objective: string
|
|
@@ -33765,7 +33812,7 @@ IMPORTANT:
|
|
|
33765
33812
|
- healthMetrics: string[] (optional)
|
|
33766
33813
|
- verification: { manualChecks?: string[], unitTests?: string[], e2eTests?: string[] } (optional)
|
|
33767
33814
|
|
|
33768
|
-
Now,
|
|
33815
|
+
Now, start the conversation. If they haven't provided one yet, ask for the concrete evidence (quote, metric, or ticket) driving this work.`;
|
|
33769
33816
|
}
|
|
33770
33817
|
// ============================================================
|
|
33771
33818
|
// Format: intent.md
|
|
@@ -33801,7 +33848,21 @@ function formatIntentMd(spec) {
|
|
|
33801
33848
|
sections.push('');
|
|
33802
33849
|
sections.push('## Outcomes');
|
|
33803
33850
|
for (const outcome of spec.outcomes) {
|
|
33804
|
-
sections.push(`- [ ] ${outcome}`);
|
|
33851
|
+
sections.push(`- [ ] ${getPriorityLabel(outcome)}${getOutcomeText(outcome)}`);
|
|
33852
|
+
}
|
|
33853
|
+
}
|
|
33854
|
+
if (spec.scope?.inScope?.length || spec.scope?.outOfScope?.length) {
|
|
33855
|
+
sections.push('');
|
|
33856
|
+
sections.push('## Scope');
|
|
33857
|
+
if (spec.scope.inScope?.length) {
|
|
33858
|
+
sections.push('**In scope:**');
|
|
33859
|
+
for (const s of spec.scope.inScope)
|
|
33860
|
+
sections.push(`- ${s}`);
|
|
33861
|
+
}
|
|
33862
|
+
if (spec.scope.outOfScope?.length) {
|
|
33863
|
+
sections.push('**Out of scope:**');
|
|
33864
|
+
for (const s of spec.scope.outOfScope)
|
|
33865
|
+
sections.push(`- ${s}`);
|
|
33805
33866
|
}
|
|
33806
33867
|
}
|
|
33807
33868
|
if (spec.constraints?.length) {
|
|
@@ -33877,7 +33938,21 @@ function formatCursorRules(spec) {
|
|
|
33877
33938
|
sections.push('# SUCCESS OUTCOMES');
|
|
33878
33939
|
sections.push('Your implementation MUST satisfy ALL of these:');
|
|
33879
33940
|
for (const outcome of spec.outcomes) {
|
|
33880
|
-
sections.push(`- ${outcome}`);
|
|
33941
|
+
sections.push(`- ${getPriorityLabel(outcome)}${getOutcomeText(outcome)}`);
|
|
33942
|
+
}
|
|
33943
|
+
}
|
|
33944
|
+
if (spec.scope?.inScope?.length || spec.scope?.outOfScope?.length) {
|
|
33945
|
+
sections.push('');
|
|
33946
|
+
sections.push('# SCOPE');
|
|
33947
|
+
if (spec.scope.inScope?.length) {
|
|
33948
|
+
sections.push('IN SCOPE (you may modify):');
|
|
33949
|
+
for (const s of spec.scope.inScope)
|
|
33950
|
+
sections.push(`- ${s}`);
|
|
33951
|
+
}
|
|
33952
|
+
if (spec.scope.outOfScope?.length) {
|
|
33953
|
+
sections.push('OUT OF SCOPE (do NOT touch):');
|
|
33954
|
+
for (const s of spec.scope.outOfScope)
|
|
33955
|
+
sections.push(`- ${s}`);
|
|
33881
33956
|
}
|
|
33882
33957
|
}
|
|
33883
33958
|
if (spec.constraints?.length) {
|
|
@@ -33950,7 +34025,19 @@ function formatClaudeMdSection(spec) {
|
|
|
33950
34025
|
}
|
|
33951
34026
|
if (spec.outcomes?.length) {
|
|
33952
34027
|
sections.push('**Outcomes**:');
|
|
33953
|
-
sections.push(spec.outcomes.map(o => `- [ ] ${o}`).join('\n'));
|
|
34028
|
+
sections.push(spec.outcomes.map(o => `- [ ] ${getPriorityLabel(o)}${getOutcomeText(o)}`).join('\n'));
|
|
34029
|
+
}
|
|
34030
|
+
if (spec.scope?.inScope?.length || spec.scope?.outOfScope?.length) {
|
|
34031
|
+
const scopeParts = ['**Scope**:'];
|
|
34032
|
+
if (spec.scope?.inScope?.length) {
|
|
34033
|
+
scopeParts.push('In scope:');
|
|
34034
|
+
scopeParts.push(...spec.scope.inScope.map(s => `- ${s}`));
|
|
34035
|
+
}
|
|
34036
|
+
if (spec.scope?.outOfScope?.length) {
|
|
34037
|
+
scopeParts.push('Out of scope:');
|
|
34038
|
+
scopeParts.push(...spec.scope.outOfScope.map(s => `- ${s}`));
|
|
34039
|
+
}
|
|
34040
|
+
sections.push(scopeParts.join('\n'));
|
|
33954
34041
|
}
|
|
33955
34042
|
if (spec.constraints?.length) {
|
|
33956
34043
|
sections.push('**Constraints**:');
|
|
@@ -64144,7 +64231,7 @@ function startMcpServer() {
|
|
|
64144
64231
|
const intents = (0, local_reader_1.readLocalIntents)();
|
|
64145
64232
|
const q = query.toLowerCase();
|
|
64146
64233
|
const matches = intents.filter(i => {
|
|
64147
|
-
const text = [i.title, i.objective, ...i.outcomes, ...i.constraints].join(' ').toLowerCase();
|
|
64234
|
+
const text = [i.title, i.objective, ...i.outcomes.map((o) => typeof o === 'string' ? o : o.text), ...i.constraints].join(' ').toLowerCase();
|
|
64148
64235
|
return text.includes(q) && (!status || i.status === status);
|
|
64149
64236
|
});
|
|
64150
64237
|
return { content: [{ type: 'text', text: JSON.stringify({ results: matches, count: matches.length, query }, null, 2) }] };
|
|
@@ -64153,7 +64240,7 @@ function startMcpServer() {
|
|
|
64153
64240
|
const intents = await client.listIntents(status);
|
|
64154
64241
|
const q = query.toLowerCase();
|
|
64155
64242
|
const matches = intents.filter(i => {
|
|
64156
|
-
const text = [i.title, i.objective, ...(i.outcomes || []), ...(i.constraints || [])].join(' ').toLowerCase();
|
|
64243
|
+
const text = [i.title, i.objective, ...(i.outcomes || []).map((o) => typeof o === 'string' ? o : o.text), ...(i.constraints || [])].join(' ').toLowerCase();
|
|
64157
64244
|
return text.includes(q);
|
|
64158
64245
|
});
|
|
64159
64246
|
const results = matches.map(i => ({
|
|
@@ -12,13 +12,21 @@ export interface IntentFields {
|
|
|
12
12
|
id?: string;
|
|
13
13
|
title: string;
|
|
14
14
|
objective: string;
|
|
15
|
-
outcomes: string
|
|
15
|
+
outcomes: (string | {
|
|
16
|
+
id?: string;
|
|
17
|
+
text: string;
|
|
18
|
+
priority?: 'must' | 'should' | 'could';
|
|
19
|
+
})[];
|
|
16
20
|
constraints?: string[];
|
|
17
21
|
edgeCases?: {
|
|
18
22
|
scenario: string;
|
|
19
23
|
expectedBehavior: string;
|
|
20
24
|
}[];
|
|
21
25
|
healthMetrics?: string[];
|
|
26
|
+
scope?: {
|
|
27
|
+
inScope?: string[];
|
|
28
|
+
outOfScope?: string[];
|
|
29
|
+
};
|
|
22
30
|
verification?: {
|
|
23
31
|
manualChecks?: string[];
|
|
24
32
|
unitTests?: 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,YAAY;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;
|
|
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,YAAY;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,CAAC,MAAM,GAAG;QAAE,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAA;KAAE,CAAC,EAAE,CAAC;IAC7F,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,gBAAgB,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC7D,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,KAAK,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IACtD,YAAY,CAAC,EAAE;QACX,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;QACxB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;QACrB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;KACvB,CAAC;CACL;AAwDD;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CA0D/C;AAOD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CA+FzD;AAOD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAwF5D;AAOD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAsDhE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pathmode/mcp-server",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.4",
|
|
4
4
|
"mcpName": "io.github.pathmodeio/mcp-server",
|
|
5
5
|
"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.",
|
|
6
6
|
"main": "dist/index.js",
|