@pathmode/mcp-server 1.4.5 → 1.6.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 +23 -0
- package/dist/api-client.d.ts +18 -0
- package/dist/api-client.d.ts.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +521 -21
- package/dist/install-skills.d.ts +13 -0
- package/dist/install-skills.d.ts.map +1 -0
- package/dist/intent-compiler.d.ts +33 -0
- package/dist/intent-compiler.d.ts.map +1 -1
- package/manifest.json +2 -2
- package/package.json +5 -2
- package/skills/README.md +77 -0
- package/skills/compile-intent/SKILL.md +57 -0
- package/skills/grill-intent/SKILL.md +45 -0
- package/skills/handoff-intent/SKILL.md +51 -0
- package/skills/review-against-intent/SKILL.md +52 -0
- package/skills/setup-pathmode-workflow/SKILL.md +81 -0
- package/skills/split-intent-to-issues/SKILL.md +92 -0
- package/skills/verify-intent/SKILL.md +76 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pathmode MCP Install Skills Command
|
|
3
|
+
*
|
|
4
|
+
* Copies the bundled Claude Code skill pack into .claude/skills/
|
|
5
|
+
* (project-local, default) or ~/.claude/skills/ (global, with --global).
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* npx @pathmode/mcp-server install-skills
|
|
9
|
+
* npx @pathmode/mcp-server install-skills --global
|
|
10
|
+
* npx @pathmode/mcp-server install-skills --force
|
|
11
|
+
*/
|
|
12
|
+
export declare function isInstallSkillsCommand(argv?: string[]): boolean;
|
|
13
|
+
export declare function runInstallSkills(): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"","sourceRoot":"","sources":["file:///Users/jannelammi/code/Pathmode/packages/mcp-server/src/install-skills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAmBH,wBAAgB,sBAAsB,CAAC,IAAI,WAAe,GAAG,OAAO,CAEnE;AAoDD,wBAAsB,gBAAgB,kBAsGrC"}
|
|
@@ -32,6 +32,17 @@ export interface IntentFields {
|
|
|
32
32
|
unitTests?: string[];
|
|
33
33
|
e2eTests?: string[];
|
|
34
34
|
};
|
|
35
|
+
/** Repo-analysis context (cloud intents). Richer than the structured fields:
|
|
36
|
+
* risks are real edge cases, verificationSuggestions are sharp grader checks. */
|
|
37
|
+
implementationContext?: {
|
|
38
|
+
relevantAreas?: {
|
|
39
|
+
path: string;
|
|
40
|
+
reason: string;
|
|
41
|
+
}[];
|
|
42
|
+
currentBehavior?: string;
|
|
43
|
+
risks?: string[];
|
|
44
|
+
verificationSuggestions?: string[];
|
|
45
|
+
} | null;
|
|
35
46
|
}
|
|
36
47
|
/**
|
|
37
48
|
* Returns the system prompt that turns Claude into a Socratic intent interviewer.
|
|
@@ -54,3 +65,25 @@ export declare function formatCursorRules(spec: IntentFields): string;
|
|
|
54
65
|
* Adapted from lib/agentPromptGenerator.ts generateClaudeMdContent().
|
|
55
66
|
*/
|
|
56
67
|
export declare function formatClaudeMdSection(spec: IntentFields): string;
|
|
68
|
+
export interface OutcomeRubricOptions {
|
|
69
|
+
/**
|
|
70
|
+
* Workspace constitution rules. Rendered as cross-cutting "out of bounds"
|
|
71
|
+
* criteria the grader fails the artifact on if violated. Not present on the
|
|
72
|
+
* local IntentFields — supplied by the cloud export path.
|
|
73
|
+
*/
|
|
74
|
+
constitutionRules?: string[];
|
|
75
|
+
/** Suggested grade-and-revise loop cap. Outcomes default is 3, max 20. */
|
|
76
|
+
maxIterations?: number;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Generate a Claude Managed Agents "Outcomes" rubric document for an intent.
|
|
80
|
+
*
|
|
81
|
+
* Outcomes (`user.define_outcome`) takes two separate fields: a `description`
|
|
82
|
+
* the writer agent reads, and a `rubric` the independent grader reads. This
|
|
83
|
+
* exporter renders both — clearly separated so they paste straight into the API —
|
|
84
|
+
* turning the intent's outcomes, edge cases, constraints, constitution rules and
|
|
85
|
+
* verification into checkable, evidence-forcing grader criteria.
|
|
86
|
+
*
|
|
87
|
+
* Docs: https://platform.claude.com/docs/en/managed-agents/define-outcomes
|
|
88
|
+
*/
|
|
89
|
+
export declare function formatOutcomeRubric(spec: IntentFields, opts?: OutcomeRubricOptions): 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,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;
|
|
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;IACF;sFACkF;IAClF,qBAAqB,CAAC,EAAE;QACpB,aAAa,CAAC,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;QACnD,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QACjB,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC;KACtC,GAAG,IAAI,CAAC;CACZ;AAwDD;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CA2D/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;AAOD,MAAM,WAAW,oBAAoB;IACjC;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,0EAA0E;IAC1E,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AA6KD;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,GAAE,oBAAyB,GAAG,MAAM,CAuC/F"}
|
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.
|
|
5
|
+
"version": "1.5.0",
|
|
6
6
|
"description": "Build structured intent specs through Socratic AI conversation, or connect to your Intent Layer for strategic context and dependency graphs.",
|
|
7
7
|
"long_description": "Pathmode MCP Server includes the Intent Compiler — a zero-config Socratic conversation that helps you build structured intent specs (objectives, outcomes, constraints, edge cases) right in Claude Code. No signup needed. For teams, connect to your Pathmode workspace for dependency graph analysis (critical path, bottlenecks, cycles), workspace strategy context, and governance — so AI agents build the right thing, not just any thing.",
|
|
8
8
|
"author": {
|
|
@@ -65,4 +65,4 @@
|
|
|
65
65
|
},
|
|
66
66
|
"tools_generated": true,
|
|
67
67
|
"prompts_generated": true
|
|
68
|
-
}
|
|
68
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pathmode/mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"dist/",
|
|
15
15
|
"manifest.json",
|
|
16
16
|
"icon.svg",
|
|
17
|
-
"README.md"
|
|
17
|
+
"README.md",
|
|
18
|
+
"skills/"
|
|
18
19
|
],
|
|
19
20
|
"scripts": {
|
|
20
21
|
"build": "ncc build src/index.ts -o dist",
|
|
@@ -26,6 +27,8 @@
|
|
|
26
27
|
"mcp",
|
|
27
28
|
"model-context-protocol",
|
|
28
29
|
"claude-code",
|
|
30
|
+
"claude-code-skills",
|
|
31
|
+
"agent-skills",
|
|
29
32
|
"cursor",
|
|
30
33
|
"windsurf",
|
|
31
34
|
"intent-engineering",
|
package/skills/README.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Pathmode Skills for Claude Code
|
|
2
|
+
|
|
3
|
+
A skill pack that turns Claude Code into a product-intent-aware development partner.
|
|
4
|
+
|
|
5
|
+
These skills work with the [@pathmode/mcp-server](https://www.npmjs.com/package/@pathmode/mcp-server). They auto-trigger based on what you ask Claude — no slash commands required.
|
|
6
|
+
|
|
7
|
+
## Skills
|
|
8
|
+
|
|
9
|
+
Listed in lifecycle order — most projects use them in roughly this sequence.
|
|
10
|
+
|
|
11
|
+
| Skill | Use when |
|
|
12
|
+
|-------|----------|
|
|
13
|
+
| `setup-pathmode-workflow` | First-time setup — capturing test commands, issue tracker, status conventions |
|
|
14
|
+
| `compile-intent` | Building a structured spec for what to ship |
|
|
15
|
+
| `verify-intent` | Designing the executable feedback loop for a spec (fastest check, manual fallback, shipped signal) |
|
|
16
|
+
| `grill-intent` | Stress-testing an existing spec for weaknesses before code is written |
|
|
17
|
+
| `split-intent-to-issues` | Breaking a spec into paste-ready Linear / Jira / GitHub Issues tickets |
|
|
18
|
+
| `review-against-intent` | Checking code changes against the intent's outcomes and constraints |
|
|
19
|
+
| `handoff-intent` | Capturing decisions and discoveries at the end of a session |
|
|
20
|
+
|
|
21
|
+
## Install
|
|
22
|
+
|
|
23
|
+
1. Install the MCP server (adds `@pathmode/mcp-server` to your MCP config):
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx @pathmode/mcp-server@latest setup
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
2. Install the skills:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npx @pathmode/mcp-server install-skills # project-local (.claude/skills/)
|
|
33
|
+
npx @pathmode/mcp-server install-skills --global # global (~/.claude/skills/)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Pass `--force` to overwrite skills you've previously installed.
|
|
37
|
+
|
|
38
|
+
3. Restart Claude Code. The skills register at session start.
|
|
39
|
+
|
|
40
|
+
## What "auto-trigger" means
|
|
41
|
+
|
|
42
|
+
Skills have a `description` field Claude reads at session start. When you say "help me write a spec for the checkout flow," Claude matches your request against installed skill descriptions and runs the matching skill.
|
|
43
|
+
|
|
44
|
+
You don't need to remember `/compile-intent` — just talk in plain English.
|
|
45
|
+
|
|
46
|
+
## Skills + MCP
|
|
47
|
+
|
|
48
|
+
Each skill orchestrates calls to the @pathmode/mcp-server. The MCP server is the engine — 15+ tools, evidence handling, Socratic preamble, dependency graphs. The skills are the auto-trigger surface on top.
|
|
49
|
+
|
|
50
|
+
You can also invoke the underlying MCP prompts directly via slash commands:
|
|
51
|
+
|
|
52
|
+
- `/compile-intent` (also invoked by the `compile-intent` skill)
|
|
53
|
+
- `/implement-intent`
|
|
54
|
+
- `/review-risks`
|
|
55
|
+
- `/what-next`
|
|
56
|
+
|
|
57
|
+
Skills wrap these in a more discoverable form.
|
|
58
|
+
|
|
59
|
+
## Modes
|
|
60
|
+
|
|
61
|
+
- **Local mode** (no API key) — Reads and writes `intent.md` in the project root. Free, no signup, fully offline.
|
|
62
|
+
- **Team mode** (`PATHMODE_API_KEY` set) — Syncs intents to a Pathmode workspace. Adds evidence, dependency graphs, constitution rules, and cross-agent context. Get a key from [pathmode.io](https://pathmode.io).
|
|
63
|
+
|
|
64
|
+
Skills detect the mode at runtime and adapt — same skill names, more capability in team mode.
|
|
65
|
+
|
|
66
|
+
## Format
|
|
67
|
+
|
|
68
|
+
Each skill is a `SKILL.md` file with YAML frontmatter (`name`, `description`) and two sections:
|
|
69
|
+
|
|
70
|
+
- `<what-to-do>` — the imperative the agent follows
|
|
71
|
+
- `<supporting-info>` — context, examples, and rules
|
|
72
|
+
|
|
73
|
+
This matches the [mattpocock/skills](https://github.com/mattpocock/skills) format so the skills are legible to engineers already familiar with that pattern.
|
|
74
|
+
|
|
75
|
+
## License
|
|
76
|
+
|
|
77
|
+
MIT — see [LICENSE](../LICENSE) in the package root.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: compile-intent
|
|
3
|
+
description: Build a structured intent spec through Socratic conversation. Use when the user wants to define what to build, sharpen a vague idea into a testable spec, or capture product intent before writing code. Compiles to intent.md in the project root and (if an API key is set) syncs to a Pathmode workspace.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<what-to-do>
|
|
7
|
+
|
|
8
|
+
Invoke the `compile-intent` MCP prompt from the @pathmode/mcp-server. This starts a Socratic conversation that turns a vague problem into a structured intent spec.
|
|
9
|
+
|
|
10
|
+
For each question you ask, propose your best-guess answer based on the conversation so far. Don't make the user generate from a blank page.
|
|
11
|
+
|
|
12
|
+
When the spec is ready, call the `intent_save` MCP tool to write `intent.md` to the project root.
|
|
13
|
+
|
|
14
|
+
</what-to-do>
|
|
15
|
+
|
|
16
|
+
<supporting-info>
|
|
17
|
+
|
|
18
|
+
## Why Socratic, not template
|
|
19
|
+
|
|
20
|
+
The compile-intent prompt is interrogative on purpose. It pushes back on vague language, challenges unmeasurable outcomes, and forces concrete constraints before moving on. Specs written in one shot tend to be wishful; specs that survive grilling are agent-ready.
|
|
21
|
+
|
|
22
|
+
## Output shape
|
|
23
|
+
|
|
24
|
+
`intent.md` at the project root:
|
|
25
|
+
|
|
26
|
+
```markdown
|
|
27
|
+
---
|
|
28
|
+
id: "intent_..."
|
|
29
|
+
version: 1
|
|
30
|
+
status: "draft"
|
|
31
|
+
---
|
|
32
|
+
# [Title]
|
|
33
|
+
|
|
34
|
+
## Objective
|
|
35
|
+
[What needs to change and for whom]
|
|
36
|
+
|
|
37
|
+
## Outcomes
|
|
38
|
+
- [ ] [Observable state change, testable in under 5 minutes]
|
|
39
|
+
|
|
40
|
+
## Edge Cases
|
|
41
|
+
- **[Scenario]**: [Expected behavior]
|
|
42
|
+
|
|
43
|
+
## Constraints
|
|
44
|
+
- [Hard limit — what must never happen]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
If `PATHMODE_API_KEY` is set, the spec also syncs to the user's Pathmode workspace and becomes visible to other team members and other agents.
|
|
48
|
+
|
|
49
|
+
## Downstream skills
|
|
50
|
+
|
|
51
|
+
After compiling, these skills consume the spec:
|
|
52
|
+
|
|
53
|
+
- `grill-intent` — re-enter the Socratic loop to find weaknesses before code gets written
|
|
54
|
+
- `review-against-intent` — check code changes against outcomes and constraints
|
|
55
|
+
- `handoff-intent` — capture decisions and discoveries back to the spec at end of session
|
|
56
|
+
|
|
57
|
+
</supporting-info>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: grill-intent
|
|
3
|
+
description: Adversarial review of an existing intent spec. Walk the spec field-by-field and pressure-test the weakest claims before code gets written against them. Use when an intent feels "done" but the user wants to stress-test it, or before handing it to an implementation agent.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<what-to-do>
|
|
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.
|
|
9
|
+
|
|
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
|
+
|
|
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`.
|
|
13
|
+
|
|
14
|
+
Stop when all five dimensions below pass, or the user explicitly accepts a known weakness.
|
|
15
|
+
|
|
16
|
+
</what-to-do>
|
|
17
|
+
|
|
18
|
+
<supporting-info>
|
|
19
|
+
|
|
20
|
+
## The five dimensions
|
|
21
|
+
|
|
22
|
+
1. **Objective** — Does it name who is harmed? Is it specific enough to disqualify other interpretations?
|
|
23
|
+
2. **Outcomes** — Are they observable state changes, not activities? Could someone verify this in 5 minutes without asking the spec author?
|
|
24
|
+
3. **Edge cases** — Are they real edge cases, or restatements of the outcome failing?
|
|
25
|
+
4. **Constraints** — What must NEVER happen? An intent with zero constraints has no teeth.
|
|
26
|
+
5. **Contradictions** — Do any two fields imply opposite things?
|
|
27
|
+
|
|
28
|
+
## Stop conditions
|
|
29
|
+
|
|
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
|
|
32
|
+
- More than 6 turns without surfacing new issues — the spec is settled
|
|
33
|
+
|
|
34
|
+
## Difference from compile-intent
|
|
35
|
+
|
|
36
|
+
- `compile-intent` BUILDS a spec from a vague problem
|
|
37
|
+
- `grill-intent` BREAKS an existing spec to find weaknesses
|
|
38
|
+
|
|
39
|
+
Run grill before treating a spec as agent-ready. If you compile a spec and immediately hand it to an implementation agent, you're trusting your first draft — and first drafts are wishful.
|
|
40
|
+
|
|
41
|
+
## Codebase grounding
|
|
42
|
+
|
|
43
|
+
When proposing answers, look at the actual code. If the spec says "users see a spinner during payment" but the codebase has no spinner component on the payment path, that's a gap worth surfacing. The point isn't to be right — it's to be specific enough that the user can correct you.
|
|
44
|
+
|
|
45
|
+
</supporting-info>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: handoff-intent
|
|
3
|
+
description: Capture context at the end of an implementation session — decisions made, blockers hit, what's left. Use before ending a session or switching to a different intent. Ensures the next session (or the next person) doesn't lose context.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<what-to-do>
|
|
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.
|
|
9
|
+
|
|
10
|
+
Summarize the session in four buckets:
|
|
11
|
+
|
|
12
|
+
- What outcomes are now delivered
|
|
13
|
+
- What technical decisions were made (and WHY — the "why" is what matters)
|
|
14
|
+
- What was discovered that wasn't in the spec (new edge case, hidden constraint, surprising interaction)
|
|
15
|
+
- What's blocked, and on what
|
|
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.
|
|
18
|
+
|
|
19
|
+
If outcomes are delivered, propose calling `update_intent_status` with `shipped`. If the spec needs amendments based on what was learned, propose them.
|
|
20
|
+
|
|
21
|
+
</what-to-do>
|
|
22
|
+
|
|
23
|
+
<supporting-info>
|
|
24
|
+
|
|
25
|
+
## What good handoff notes look like
|
|
26
|
+
|
|
27
|
+
Bad: "Fixed the timeout bug."
|
|
28
|
+
|
|
29
|
+
Good: "Reduced payment timeout from 30s to 3s by switching from polling to webhook callbacks. Webhook requires Stripe whitelist for the staging IP — see ticket OPS-1234 for the IP request. Tradeoff accepted: webhooks are async, so the success page now needs to handle the pending state for ~2s while waiting for confirmation."
|
|
30
|
+
|
|
31
|
+
The "why" and the "what's still implicit" are the parts that disappear if you don't capture them.
|
|
32
|
+
|
|
33
|
+
## Status bumps
|
|
34
|
+
|
|
35
|
+
- `shipped` — code is merged AND the outcome is observable in production
|
|
36
|
+
- `verified` — the outcome metric has held for at least one full cycle (e.g., one week, one release)
|
|
37
|
+
|
|
38
|
+
Do NOT bump to `shipped` if outcomes are only partially delivered. Either leave the status and log the partial delivery as a note, or propose a spec amendment that scopes the outcome to what was actually shipped.
|
|
39
|
+
|
|
40
|
+
## Difference from a commit message
|
|
41
|
+
|
|
42
|
+
A commit message records what the code did.
|
|
43
|
+
A handoff note records what the engineer learned and decided.
|
|
44
|
+
|
|
45
|
+
Both matter. They live in different places. This skill writes to the intent layer; git keeps the code layer.
|
|
46
|
+
|
|
47
|
+
## What NOT to capture
|
|
48
|
+
|
|
49
|
+
Routine implementation details ("used a `for` loop instead of `map`") are not handoff material. Capture only what would surprise the next reader — non-obvious decisions, hidden constraints, accepted tradeoffs.
|
|
50
|
+
|
|
51
|
+
</supporting-info>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review-against-intent
|
|
3
|
+
description: Review code changes against the active intent's outcomes and constraints. Use after writing code meant to implement an intent, or when reviewing a PR to check it actually delivers on the spec. Anchors review to product intent, not generic code style.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<what-to-do>
|
|
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.
|
|
9
|
+
|
|
10
|
+
Identify the changed files using git diff against the base branch (or staged changes if no base specified).
|
|
11
|
+
|
|
12
|
+
For each outcome in the intent, check whether the changes actually deliver it — with specific file/line evidence. For each constraint, check whether the changes respect it. For each edge case, check whether it's handled.
|
|
13
|
+
|
|
14
|
+
Report:
|
|
15
|
+
- Outcomes delivered (with file/line evidence)
|
|
16
|
+
- Outcomes not yet delivered (and what's missing)
|
|
17
|
+
- Constraint violations (specific files/lines)
|
|
18
|
+
- Edge cases that look unhandled
|
|
19
|
+
|
|
20
|
+
Do NOT review for unrelated code style, formatting, or quality concerns. That's not this skill's job. Stay anchored to the intent.
|
|
21
|
+
|
|
22
|
+
</what-to-do>
|
|
23
|
+
|
|
24
|
+
<supporting-info>
|
|
25
|
+
|
|
26
|
+
## Why anchor to intent, not generic review
|
|
27
|
+
|
|
28
|
+
Most code review tools check correctness, style, or security. They cannot check whether the code does what it was MEANT to do, because they don't see the intent.
|
|
29
|
+
|
|
30
|
+
This skill bridges that gap. It treats the intent spec as a contract and the code change as the proposed satisfaction of that contract. A PR can pass every other check and still fail this one — because the intent it was supposed to deliver isn't actually delivered.
|
|
31
|
+
|
|
32
|
+
## What "delivers an outcome" looks like
|
|
33
|
+
|
|
34
|
+
For an outcome like "Payment completes in under 3 seconds (p95)":
|
|
35
|
+
|
|
36
|
+
- ✓ The payment code path has a measurable timeout under 3s
|
|
37
|
+
- ✓ There's a metric or test confirming p95 behavior
|
|
38
|
+
- ✓ Failure modes are handled (covers the constraint side)
|
|
39
|
+
|
|
40
|
+
A code change that adds a feature without a corresponding metric does NOT deliver this outcome. Surface that gap.
|
|
41
|
+
|
|
42
|
+
## Constraint violations
|
|
43
|
+
|
|
44
|
+
Constraints are hard limits — "PII must not survive a logout", "checkout must not block on network calls > 500ms", etc.
|
|
45
|
+
|
|
46
|
+
If a change introduces a constraint violation, treat it as a blocker. Be specific: name the constraint, name the file/line, explain how the change violates it.
|
|
47
|
+
|
|
48
|
+
## Logging gaps
|
|
49
|
+
|
|
50
|
+
When the review finds gaps, the user often wants to record what's not yet done so a future session can pick it up. Call `log_implementation_note` for each significant gap. Make the note self-contained — the next reader won't have this conversation's context.
|
|
51
|
+
|
|
52
|
+
</supporting-info>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: setup-pathmode-workflow
|
|
3
|
+
description: Interview the user about their development workflow and capture the answers as durable context. Use when starting a new project with Pathmode, onboarding a teammate to an existing project, or when intent specs feel disconnected from how the team actually ships. Output is workflow conventions the next agent session will read.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<what-to-do>
|
|
7
|
+
|
|
8
|
+
Walk the user through the workflow questions below. Ask ONE question at a time. For each question, propose your best-guess answer based on what you can see in the repo (package.json scripts, CI config, README, existing PRs). The user accepts or corrects.
|
|
9
|
+
|
|
10
|
+
Questions to cover (in order):
|
|
11
|
+
|
|
12
|
+
1. **Primary agent**: Which AI coding agent does the user primarily work with? (Claude Code, Cursor, Windsurf, Copilot, mixed)
|
|
13
|
+
2. **Issue tracker**: Where do tickets live? (Linear, Jira, GitHub Issues, none yet)
|
|
14
|
+
3. **Test command**: What does the user run to prove code works locally? (e.g., `npm test`, `pytest`, `pnpm vitest`)
|
|
15
|
+
4. **Build/typecheck command**: What does the user run to prove code compiles? (e.g., `npm run build`, `tsc --noEmit`)
|
|
16
|
+
5. **PR conventions**: How does code get reviewed before merge? (draft PR + review, trunk-based, solo)
|
|
17
|
+
6. **Status mapping**: What concrete event marks an intent as `shipped`? As `verified`? (merge to main, deploy to prod, metric hold for 1 week)
|
|
18
|
+
7. **Implementation note convention**: Where should agent decisions get captured? (Pathmode `log_implementation_note`, ADR file, commit messages, PR descriptions)
|
|
19
|
+
|
|
20
|
+
When all questions are answered, output a single self-contained block the user can paste into their `CLAUDE.md` file (or the equivalent for their agent). Format:
|
|
21
|
+
|
|
22
|
+
```markdown
|
|
23
|
+
## Pathmode Workflow Conventions
|
|
24
|
+
|
|
25
|
+
- Primary agent: [answer]
|
|
26
|
+
- Issue tracker: [answer]
|
|
27
|
+
- Test: `[command]`
|
|
28
|
+
- Typecheck/build: `[command]`
|
|
29
|
+
- PR conventions: [answer]
|
|
30
|
+
- Status mapping: shipped = [event]; verified = [event]
|
|
31
|
+
- Implementation notes: [convention]
|
|
32
|
+
```
|
|
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.
|
|
35
|
+
|
|
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
|
+
|
|
38
|
+
</what-to-do>
|
|
39
|
+
|
|
40
|
+
<supporting-info>
|
|
41
|
+
|
|
42
|
+
## Why these questions
|
|
43
|
+
|
|
44
|
+
Each question maps to a real friction point in agent-assisted development:
|
|
45
|
+
|
|
46
|
+
- **Primary agent** → tells Claude which other agents will read the same conventions (different agents have different config file conventions)
|
|
47
|
+
- **Issue tracker** → tells `split-intent-to-issues` where to format output for
|
|
48
|
+
- **Test command** → tells `review-against-intent` how to check that outcomes are actually delivered
|
|
49
|
+
- **Build/typecheck** → same; the fastest feedback loop is usually typecheck
|
|
50
|
+
- **PR conventions** → tells `handoff-intent` whether decisions go in PR descriptions or somewhere else
|
|
51
|
+
- **Status mapping** → tells `handoff-intent` when to propose `update_intent_status` to `shipped` vs `verified`
|
|
52
|
+
- **Implementation note convention** → tells every skill where decisions persist
|
|
53
|
+
|
|
54
|
+
Without these answers, every skill has to re-ask the same questions every session. Capturing them once makes downstream skills feel native.
|
|
55
|
+
|
|
56
|
+
## Inferring from the repo
|
|
57
|
+
|
|
58
|
+
Before asking, look at the repo:
|
|
59
|
+
|
|
60
|
+
- `package.json` `scripts` field → likely test/build/typecheck commands
|
|
61
|
+
- `.github/workflows/` → likely CI commands the team trusts
|
|
62
|
+
- `CONTRIBUTING.md`, `CODEOWNERS`, PR templates → PR conventions
|
|
63
|
+
- `.linear/`, `.jira/`, `.github/ISSUE_TEMPLATE/` → likely issue tracker
|
|
64
|
+
- Existing `CLAUDE.md`, `.cursorrules`, `.windsurfrules` → likely primary agent
|
|
65
|
+
|
|
66
|
+
For each inference, propose it as the best-guess answer ("Looks like you use Linear — there's a `.linear/` directory. Is that right, or are tickets actually in [other place]?").
|
|
67
|
+
|
|
68
|
+
## Mode behavior
|
|
69
|
+
|
|
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.
|
|
72
|
+
|
|
73
|
+
## What this skill does NOT do
|
|
74
|
+
|
|
75
|
+
- Does not write to `.pathmode/` or any repo subdirectory beyond `CLAUDE.md`
|
|
76
|
+
- Does not run npm install, set up CI, or modify the repo's tooling
|
|
77
|
+
- Does not connect to Linear/Jira/GitHub APIs — only captures the user's intent for which tracker they use
|
|
78
|
+
|
|
79
|
+
It is an interview, not an installer.
|
|
80
|
+
|
|
81
|
+
</supporting-info>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: split-intent-to-issues
|
|
3
|
+
description: Break an intent spec into 3-10 paste-ready tickets for Linear, Jira, or GitHub Issues. Use when a spec is ready to be worked on but it's too big for a single change, or when handing the spec to engineers who track work in tickets rather than reading intent specs. Each ticket links back to the outcome it delivers.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<what-to-do>
|
|
7
|
+
|
|
8
|
+
Load the active intent. If `PATHMODE_API_KEY` is set, call `get_current_intent`. Otherwise read `intent.md` from the project root.
|
|
9
|
+
|
|
10
|
+
Analyze the spec. The outcomes are the natural decomposition unit — each outcome typically maps to 1-3 tickets, depending on complexity.
|
|
11
|
+
|
|
12
|
+
For each outcome, propose tickets. A ticket has:
|
|
13
|
+
|
|
14
|
+
- **Title** — imperative verb phrase under 70 characters (e.g., "Add payment timeout monitoring", not "We should add a thing for timeouts")
|
|
15
|
+
- **Body** — 2-4 sentences: what changes, why, how to verify it works
|
|
16
|
+
- **Acceptance criteria** — concrete checklist linked to the outcome it delivers (copy from the spec, don't reword)
|
|
17
|
+
- **Outcome reference** — the outcome ID or text this ticket delivers
|
|
18
|
+
|
|
19
|
+
Output all tickets in a single block formatted for the user's tracker. Detect the tracker from these signals (in order):
|
|
20
|
+
|
|
21
|
+
1. If they ran `setup-pathmode-workflow`, use the answer captured there
|
|
22
|
+
2. If `.linear/`, `.jira/`, or `.github/ISSUE_TEMPLATE/` is present, use that
|
|
23
|
+
3. If `gh` CLI is available, default to GitHub Issues
|
|
24
|
+
4. Otherwise ask: Linear, Jira, GitHub Issues, or plain markdown?
|
|
25
|
+
|
|
26
|
+
For each tracker, output in its native format (markdown for Linear/Jira/GitHub all work; some teams have field conventions — surface them if found).
|
|
27
|
+
|
|
28
|
+
After the output, offer to create the issues automatically if `gh` (GitHub), `linear-cli`, or `jira-cli` is available. Do NOT create them without explicit confirmation.
|
|
29
|
+
|
|
30
|
+
</what-to-do>
|
|
31
|
+
|
|
32
|
+
<supporting-info>
|
|
33
|
+
|
|
34
|
+
## Why split by outcome, not by file
|
|
35
|
+
|
|
36
|
+
A common anti-pattern is splitting work by file or by component ("update PaymentForm.tsx", "update PaymentService.ts"). This produces tickets that are individually meaningless — they don't deliver an outcome by themselves.
|
|
37
|
+
|
|
38
|
+
Splitting by outcome means each ticket delivers something user-visible. The closing of the ticket proves an outcome moved from "draft" to "delivered." This is what makes the intent → ticket → code chain coherent.
|
|
39
|
+
|
|
40
|
+
## Sizing heuristic
|
|
41
|
+
|
|
42
|
+
- 1 outcome → 1 ticket if the work fits in ~1 day for one engineer
|
|
43
|
+
- 1 outcome → 2-3 tickets if it splits naturally (e.g., backend work + frontend work + observability)
|
|
44
|
+
- Multiple outcomes → 1 ticket only when they're trivially coupled (rare)
|
|
45
|
+
|
|
46
|
+
If a single outcome would need >3 tickets, that's a sign the outcome itself is too broad. Surface this back to the user: "This outcome is decomposing into 5 tickets — would it be cleaner to split the outcome into two before ticketing?"
|
|
47
|
+
|
|
48
|
+
## Output format
|
|
49
|
+
|
|
50
|
+
Default to a markdown block that works in all three trackers:
|
|
51
|
+
|
|
52
|
+
```markdown
|
|
53
|
+
### Ticket: [Title]
|
|
54
|
+
|
|
55
|
+
**Outcome:** [outcome text from spec]
|
|
56
|
+
|
|
57
|
+
[Body — what changes, why, how to verify]
|
|
58
|
+
|
|
59
|
+
**Acceptance:**
|
|
60
|
+
- [ ] [Criterion copied from outcome]
|
|
61
|
+
- [ ] [Test/check that proves the outcome]
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Repeat per ticket. The `---` separator makes it easy to paste a batch.
|
|
67
|
+
|
|
68
|
+
## Tracker-specific notes
|
|
69
|
+
|
|
70
|
+
- **Linear** — Title goes in the title field; body + acceptance go in the description. If the user has a parent-child convention, group all tickets under a parent labeled with the intent title.
|
|
71
|
+
- **Jira** — Same shape. If "Epic" is the parent convention, propose a parent Epic with the intent title.
|
|
72
|
+
- **GitHub Issues** — Use a tracking issue with checkbox links to child issues for visibility.
|
|
73
|
+
|
|
74
|
+
## CLI shortcut (if available)
|
|
75
|
+
|
|
76
|
+
If `gh` is installed and the repo is on GitHub, offer:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# After user confirms:
|
|
80
|
+
gh issue create --title "[Title]" --body "[body]" --label "intent:[intent-id]"
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
If `linear-cli` or `jira-cli` is available, propose the equivalent command. Always show the command and wait for explicit confirmation before running.
|
|
84
|
+
|
|
85
|
+
## What this skill does NOT do
|
|
86
|
+
|
|
87
|
+
- Does not auto-create issues without confirmation
|
|
88
|
+
- Does not estimate story points or set due dates (team-specific; out of scope)
|
|
89
|
+
- Does not assign tickets to people
|
|
90
|
+
- Does not invent acceptance criteria — they MUST come from the intent's outcomes; the chain only works if the link is preserved
|
|
91
|
+
|
|
92
|
+
</supporting-info>
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verify-intent
|
|
3
|
+
description: Design the executable feedback loop for an intent — fastest check, highest-confidence check, manual fallback, observable shipped signal, and what shouldn't regress. Use when an intent is drafted but its verification field is empty or just says "add tests." Turns the spec into a runnable contract instead of a document.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<what-to-do>
|
|
7
|
+
|
|
8
|
+
Load the active intent. If `PATHMODE_API_KEY` is set, call `get_current_intent`. Otherwise read `intent.md` from the project root.
|
|
9
|
+
|
|
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
|
+
|
|
12
|
+
The five dimensions:
|
|
13
|
+
|
|
14
|
+
1. **Fastest check** — What's the quickest signal that the code is broken? (typecheck, single unit test, lint rule)
|
|
15
|
+
2. **Highest-confidence check** — What's the most reliable signal it actually works? (e2e test, integration test, manual flow)
|
|
16
|
+
3. **Manual fallback** — If automation isn't available, what's the 30-second manual check? (curl command, screen recording flow, console query)
|
|
17
|
+
4. **Observable shipped signal** — Once deployed, what tells you it's working in production? (metric, log pattern, user behavior change)
|
|
18
|
+
5. **What must not regress** — What existing behavior would a fix here accidentally break? (named cases the user worries about)
|
|
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`.
|
|
21
|
+
|
|
22
|
+
When all five are answered, summarize the loop:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
Verification loop for this intent:
|
|
26
|
+
- Fastest: [command/check]
|
|
27
|
+
- Highest-confidence: [command/check]
|
|
28
|
+
- Manual fallback: [steps]
|
|
29
|
+
- Shipped signal: [metric/log]
|
|
30
|
+
- Must not regress: [named cases]
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
</what-to-do>
|
|
34
|
+
|
|
35
|
+
<supporting-info>
|
|
36
|
+
|
|
37
|
+
## Why five dimensions, not "tests"
|
|
38
|
+
|
|
39
|
+
A `verification` field that says "add tests" is a document, not a contract. It doesn't tell an implementation agent what to actually run, and it doesn't tell a reviewer what to check.
|
|
40
|
+
|
|
41
|
+
The five-dimension breakdown turns verification into something runnable:
|
|
42
|
+
|
|
43
|
+
- The agent knows the **fastest check** to run after every change → tight feedback loop
|
|
44
|
+
- The agent knows the **highest-confidence check** to run before declaring done → catches issues
|
|
45
|
+
- The user has a **manual fallback** when CI is broken or the test framework is mid-migration
|
|
46
|
+
- The team has a **shipped signal** to watch in production → closes the deploy-to-verify gap
|
|
47
|
+
- Everyone knows what **must not regress** → prevents the "fix that broke unrelated thing" pattern
|
|
48
|
+
|
|
49
|
+
## Concrete example
|
|
50
|
+
|
|
51
|
+
Intent: "Payment completes in under 3 seconds (p95)"
|
|
52
|
+
|
|
53
|
+
Bad verification: "Add a test for the payment timeout."
|
|
54
|
+
|
|
55
|
+
Good verification (five dimensions):
|
|
56
|
+
|
|
57
|
+
- Fastest check: `pnpm vitest run payment-timeout.test.ts` — 2s, runs locally on save
|
|
58
|
+
- Highest-confidence: `pnpm playwright test payment-flow.spec.ts` — 30s, hits the actual payment provider sandbox
|
|
59
|
+
- Manual fallback: Open `/checkout`, add a $1 item, complete payment, time the wall clock from "pay" click to confirmation screen
|
|
60
|
+
- Shipped signal: Datadog metric `checkout.payment.duration.p95` < 3000ms over 24h after deploy
|
|
61
|
+
- Must not regress: Refund flow (uses the same payment service); guest checkout (different code path that calls the same client)
|
|
62
|
+
|
|
63
|
+
The first version is a wish. The second version is a contract.
|
|
64
|
+
|
|
65
|
+
## Mode behavior
|
|
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.
|
|
69
|
+
|
|
70
|
+
## Pairing with other skills
|
|
71
|
+
|
|
72
|
+
- After `compile-intent` produces a spec, run `verify-intent` before treating the spec as agent-ready. A spec without a verification loop is not agent-ready.
|
|
73
|
+
- Before `handoff-intent`, check that the verification loop ran — if outcomes are claimed delivered but verification was never designed, that's a gap to surface.
|
|
74
|
+
- `review-against-intent` consumes the verification field to know what "delivered" means.
|
|
75
|
+
|
|
76
|
+
</supporting-info>
|