pcl-mcp 0.1.4 → 0.2.3
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 +86 -13
- package/dist/bin/pcl.js +167 -23
- package/dist/bin/pcl.js.map +1 -1
- package/dist/src/server.js +19 -2
- package/dist/src/server.js.map +1 -1
- package/package.json +8 -2
package/README.md
CHANGED
|
@@ -4,6 +4,36 @@
|
|
|
4
4
|
|
|
5
5
|
Instead of re-explaining your personas, journeys, and architecture decisions every session, PCL serves them via MCP on demand. Any agent (Claude Code, Cursor, Windsurf) queries exactly what it needs, when it needs it.
|
|
6
6
|
|
|
7
|
+
## Quick Start
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install pcl-mcp
|
|
11
|
+
npx pcl init
|
|
12
|
+
# add MCP config (see Agent Configuration below), then start a new agent session
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Why PCL?
|
|
16
|
+
|
|
17
|
+
**Without PCL**, every coding session starts from scratch:
|
|
18
|
+
- Agents can't find your product docs unless you paste them into the prompt
|
|
19
|
+
- Context windows get bloated with irrelevant information
|
|
20
|
+
- You re-explain personas, business rules, and specs every single time
|
|
21
|
+
- No guardrails — agents make assumptions that violate your business rules
|
|
22
|
+
|
|
23
|
+
**With PCL**, agents load product knowledge on demand:
|
|
24
|
+
- Progressive disclosure — session start costs ~600 tokens (product summary + critical rules)
|
|
25
|
+
- Hybrid search (BM25 + semantic) finds the right context without you guiding it
|
|
26
|
+
- Live reindex on file save — edit a spec, agent sees it immediately
|
|
27
|
+
- Structured Zod schemas — agents get predictable, parseable frontmatter every time
|
|
28
|
+
|
|
29
|
+
### Concrete use case
|
|
30
|
+
|
|
31
|
+
You ask your agent: *"Build the checkout flow"*
|
|
32
|
+
|
|
33
|
+
**Without PCL:** You paste your billing rules doc, the persona file, the journey map, and the spec into the chat. 4,000 tokens before the agent writes a line of code. Next session, you do it again.
|
|
34
|
+
|
|
35
|
+
**With PCL:** The agent auto-loads critical billing rules at session start (~200 tokens). When it starts the checkout feature, it pulls the relevant persona, fetches the journey steps, and checks the spec's acceptance criteria — all on-demand, only what's needed. Every session, automatically.
|
|
36
|
+
|
|
7
37
|
## Stack
|
|
8
38
|
|
|
9
39
|
| Layer | Technology | Why |
|
|
@@ -16,14 +46,37 @@ Instead of re-explaining your personas, journeys, and architecture decisions eve
|
|
|
16
46
|
| Validation | Zod schemas | Agents rely on predictable frontmatter |
|
|
17
47
|
| File watching | Chokidar v4 | Live reindex on save |
|
|
18
48
|
|
|
49
|
+
## Prerequisites
|
|
50
|
+
|
|
51
|
+
- **Node.js >= 22** (required — PCL uses modern Node APIs)
|
|
52
|
+
|
|
19
53
|
## Install
|
|
20
54
|
|
|
21
55
|
```bash
|
|
22
56
|
npm install pcl-mcp
|
|
23
|
-
npx pcl init #
|
|
24
|
-
|
|
57
|
+
npx pcl init # creates ./product with templates
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Also available on GitHub Packages as `@michaelgorski/pcl-mcp`.
|
|
61
|
+
|
|
62
|
+
## Import existing docs
|
|
63
|
+
|
|
64
|
+
If you already have markdown documentation in your repo, PCL can scan, classify, and import it automatically:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npx pcl init --scan # scan + import existing docs, then scaffold remaining templates
|
|
68
|
+
npx pcl init --scan-only # scan + import only, skip template scaffolding
|
|
25
69
|
```
|
|
26
70
|
|
|
71
|
+
The scanner:
|
|
72
|
+
- Walks your repo for `.md` files (skips `node_modules`, `dist`, `.git`, etc.)
|
|
73
|
+
- Classifies each file by directory name, filename, frontmatter keys, and content patterns
|
|
74
|
+
- Transforms matching files into PCL format with proper frontmatter
|
|
75
|
+
- Copies them into the `product/` folder under the correct category
|
|
76
|
+
- Skips categories that already have imported files (no duplicate templates)
|
|
77
|
+
|
|
78
|
+
Supported classifications: **persona**, **journey**, **spec**, **decision**, **domain**, **product**
|
|
79
|
+
|
|
27
80
|
## Agent configuration
|
|
28
81
|
|
|
29
82
|
### Claude Code — `.claude/mcp.json`
|
|
@@ -48,6 +101,18 @@ npm run serve # start MCP server
|
|
|
48
101
|
}
|
|
49
102
|
```
|
|
50
103
|
|
|
104
|
+
### Windsurf — MCP config
|
|
105
|
+
```json
|
|
106
|
+
{
|
|
107
|
+
"mcpServers": {
|
|
108
|
+
"pcl": {
|
|
109
|
+
"command": "npx",
|
|
110
|
+
"args": ["pcl-mcp", "serve"]
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
51
116
|
## File structure
|
|
52
117
|
|
|
53
118
|
```
|
|
@@ -68,17 +133,25 @@ npm run serve # start MCP server
|
|
|
68
133
|
|
|
69
134
|
## Tools available to agents
|
|
70
135
|
|
|
71
|
-
| Tool |
|
|
72
|
-
|
|
73
|
-
| `pcl_product_summary` |
|
|
74
|
-
| `
|
|
75
|
-
| `
|
|
76
|
-
| `
|
|
77
|
-
| `
|
|
78
|
-
| `
|
|
79
|
-
| `pcl_list(type)` |
|
|
80
|
-
| `pcl_search(query)` |
|
|
81
|
-
| `pcl_related(id)` |
|
|
136
|
+
| Tool | Params | Description |
|
|
137
|
+
|---|---|---|
|
|
138
|
+
| `pcl_product_summary` | — | Load the product north-star document. Call at session start. |
|
|
139
|
+
| `pcl_get_persona(id)` | `id`: persona ID | Get a user persona by ID. Call before any user-facing feature. |
|
|
140
|
+
| `pcl_get_journey(id)` | `id`: journey ID | Get a user journey by ID including step-by-step detail. |
|
|
141
|
+
| `pcl_get_spec(id)` | `id`: spec ID | Get a feature spec by ID including acceptance criteria. |
|
|
142
|
+
| `pcl_get_decision(id)` | `id`: decision ID | Get an architecture decision record (ADR) by ID. |
|
|
143
|
+
| `pcl_get_domain(id)` | `id`: domain ID or `"*critical"` | Get domain rules by ID. Pass `"*critical"` to load all critical rules. |
|
|
144
|
+
| `pcl_list({ type })` | `type`: `"personas"` \| `"journeys"` \| `"specs"` \| `"decisions"` \| `"domain"` | List all files of a given type with IDs, titles, and summaries. |
|
|
145
|
+
| `pcl_search({ query })` | `query`, `mode?` (`"hybrid"` \| `"semantic"` \| `"keyword"`), `types?`, `top_k?` | Hybrid semantic + keyword search across all product files. |
|
|
146
|
+
| `pcl_related(id)` | `id`: source file ID, `top_k?` | Find files semantically related to a given file ID. |
|
|
147
|
+
|
|
148
|
+
## Prompts & Resources
|
|
149
|
+
|
|
150
|
+
In addition to tools, PCL exposes MCP prompts and resources:
|
|
151
|
+
|
|
152
|
+
**Prompt: `session-start`** — Returns a product summary + all critical domain rules. Agents can call this at the start of every coding session to orient themselves without loading every file.
|
|
153
|
+
|
|
154
|
+
**Resources: `pcl://files/{type}/{id}`** — Each indexed file is available as an MCP resource. Agents can browse and read individual files directly via the resource URI (e.g., `pcl://files/persona/example-user`).
|
|
82
155
|
|
|
83
156
|
## How hybrid search works
|
|
84
157
|
|
package/dist/bin/pcl.js
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// bin/pcl.ts
|
|
3
3
|
// CLI: pcl init | pcl serve | pcl status
|
|
4
|
-
import { mkdir, writeFile, readFile, access } from "node:fs/promises";
|
|
4
|
+
import { mkdir, writeFile, readFile, readdir, access } from "node:fs/promises";
|
|
5
5
|
import { join, resolve } from "node:path";
|
|
6
|
-
import { constants } from "node:fs";
|
|
6
|
+
import { constants, existsSync } from "node:fs";
|
|
7
|
+
import { createRequire } from "node:module";
|
|
8
|
+
const require = createRequire(import.meta.url);
|
|
9
|
+
const { version } = (() => {
|
|
10
|
+
try {
|
|
11
|
+
return require("../package.json");
|
|
12
|
+
}
|
|
13
|
+
catch {
|
|
14
|
+
return require("../../package.json");
|
|
15
|
+
}
|
|
16
|
+
})();
|
|
7
17
|
const cmd = process.argv[2];
|
|
8
18
|
const args = process.argv.slice(3);
|
|
9
19
|
const hasFlag = (flag) => args.includes(flag);
|
|
@@ -261,23 +271,38 @@ async function init() {
|
|
|
261
271
|
|
|
262
272
|
This project uses PCL for product knowledge. An MCP server is running (see mcp config).
|
|
263
273
|
|
|
274
|
+
**IMPORTANT:** PCL contains ALL product knowledge — personas, journeys, specs, decisions, and domain rules.
|
|
275
|
+
Read ALL categories thoroughly. Do not skip any folder or assume content is irrelevant.
|
|
276
|
+
|
|
264
277
|
### At the start of every coding session:
|
|
265
|
-
1. Call \`pcl_product_summary\` — orient yourself
|
|
278
|
+
1. Call \`pcl_product_summary\` — orient yourself with the product north star
|
|
266
279
|
2. Call \`pcl_get_domain("*critical")\` — load non-violable business rules
|
|
280
|
+
3. Call \`pcl_list({ type: "decisions" })\` — review architecture decisions
|
|
281
|
+
4. Call \`pcl_list({ type: "personas" })\` — know who you are building for
|
|
282
|
+
5. Call \`pcl_list({ type: "specs" })\` — see what features are defined
|
|
267
283
|
|
|
268
284
|
### Before working on any user-facing feature:
|
|
269
|
-
- Call \`
|
|
270
|
-
- Call \`
|
|
271
|
-
- Call \`
|
|
285
|
+
- Call \`pcl_get_persona(id)\` for EVERY relevant persona — read full detail
|
|
286
|
+
- Call \`pcl_get_journey(id)\` for the relevant user journey — follow every step
|
|
287
|
+
- Call \`pcl_get_spec(id)\` for the feature spec — check all acceptance criteria
|
|
288
|
+
- Call \`pcl_get_decision(id)\` for any architecture decision that affects the feature
|
|
289
|
+
|
|
290
|
+
### Before making any architectural or technical choice:
|
|
291
|
+
- Call \`pcl_list({ type: "decisions" })\` then \`pcl_get_decision(id)\` for relevant ADRs
|
|
292
|
+
- Call \`pcl_get_domain("*critical")\` if the change touches billing, auth, or data models
|
|
293
|
+
- Call \`pcl_search({ query: "your topic" })\` to find related product knowledge
|
|
272
294
|
|
|
273
|
-
### When
|
|
274
|
-
- Call \`pcl_search({ query: "your question
|
|
275
|
-
- Call \`
|
|
295
|
+
### When exploring or unsure:
|
|
296
|
+
- Call \`pcl_search({ query: "your question" })\` — hybrid semantic + keyword search
|
|
297
|
+
- Call \`pcl_related(id)\` — discover connected context
|
|
298
|
+
- Call \`pcl_list({ type: "domain" })\` then \`pcl_get_domain(id)\` — read ALL domain rules
|
|
276
299
|
|
|
277
300
|
### NEVER:
|
|
278
301
|
- Make assumptions about who the user is — always load the persona
|
|
279
|
-
-
|
|
302
|
+
- Skip loading decisions before making architectural choices
|
|
303
|
+
- Violate any rule in domain rules (critical or otherwise)
|
|
280
304
|
- Build features not covered by an accepted spec without asking first
|
|
305
|
+
- Assume you know the product context — always query PCL first
|
|
281
306
|
`;
|
|
282
307
|
try {
|
|
283
308
|
await access(claudeMd, constants.F_OK);
|
|
@@ -302,26 +327,123 @@ This project uses PCL for product knowledge. An MCP server is running (see mcp c
|
|
|
302
327
|
console.log(" 1. Edit product/product.md with your actual product details");
|
|
303
328
|
console.log(" 2. Rename and fill in the example persona, journey, and spec files");
|
|
304
329
|
console.log(" 3. Add your MCP server config (see README)");
|
|
305
|
-
console.log(" 4.
|
|
330
|
+
console.log(" 4. Start a new agent session — PCL loads automatically\n");
|
|
306
331
|
}
|
|
307
|
-
// ───
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
332
|
+
// ─── Status ──────────────────────────────────────────────────────────────────
|
|
333
|
+
/** Count .md files on disk per subdirectory (no DB needed) */
|
|
334
|
+
async function countDiskFiles(productDir) {
|
|
335
|
+
const counts = {
|
|
336
|
+
personas: 0, journeys: 0, specs: 0, decisions: 0, domain: 0,
|
|
337
|
+
};
|
|
338
|
+
const hasProduct = existsSync(join(productDir, "product.md"));
|
|
339
|
+
for (const dir of Object.keys(counts)) {
|
|
340
|
+
const dirPath = join(productDir, dir);
|
|
341
|
+
if (!existsSync(dirPath))
|
|
342
|
+
continue;
|
|
343
|
+
try {
|
|
344
|
+
const entries = await readdir(dirPath);
|
|
345
|
+
counts[dir] = entries.filter((e) => e.endsWith(".md") && !e.startsWith(".")).length;
|
|
346
|
+
}
|
|
347
|
+
catch { /* dir unreadable */ }
|
|
348
|
+
}
|
|
349
|
+
return { product: hasProduct, counts };
|
|
350
|
+
}
|
|
351
|
+
function resolveStatusDir() {
|
|
352
|
+
// Support --product-dir flag (same as serve)
|
|
353
|
+
const dirFlagIdx = args.indexOf("--product-dir");
|
|
354
|
+
if (dirFlagIdx !== -1 && args[dirFlagIdx + 1]) {
|
|
355
|
+
return resolve(args[dirFlagIdx + 1]);
|
|
356
|
+
}
|
|
357
|
+
const candidates = [
|
|
358
|
+
join(process.cwd(), "product"),
|
|
359
|
+
join(process.cwd(), ".product"),
|
|
360
|
+
];
|
|
361
|
+
return candidates.find((c) => existsSync(c)) ?? candidates[0];
|
|
362
|
+
}
|
|
363
|
+
async function status() {
|
|
364
|
+
const productDir = resolveStatusDir();
|
|
365
|
+
if (!existsSync(productDir)) {
|
|
366
|
+
console.log(`\nNo product directory found at ${productDir}`);
|
|
367
|
+
console.log(`Run 'pcl init' to scaffold the product folder.\n`);
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
// Always show disk file counts (works without server having run)
|
|
371
|
+
const disk = await countDiskFiles(productDir);
|
|
372
|
+
console.log("\nPCL Status");
|
|
373
|
+
console.log(` Product dir: ${productDir}`);
|
|
374
|
+
if (disk.product) {
|
|
375
|
+
console.log(` Product file: ✓ product.md`);
|
|
376
|
+
}
|
|
377
|
+
else {
|
|
378
|
+
console.log(` Product file: ✗ product.md not found`);
|
|
379
|
+
}
|
|
380
|
+
const typeMap = {
|
|
381
|
+
personas: "persona", journeys: "journey", specs: "spec",
|
|
382
|
+
decisions: "decision", domain: "domain",
|
|
383
|
+
};
|
|
384
|
+
// Check if DB exists (server has been run at least once)
|
|
385
|
+
const dbPath = join(productDir, ".pcl.db");
|
|
386
|
+
const hasDB = existsSync(dbPath);
|
|
387
|
+
let totalDisk = disk.product ? 1 : 0;
|
|
388
|
+
let totalIndexed = 0;
|
|
389
|
+
let totalEmbedded = 0;
|
|
390
|
+
// If DB exists, also show indexed/embedded counts
|
|
391
|
+
let dbData = null;
|
|
392
|
+
if (hasDB) {
|
|
393
|
+
const { openDB, closeDB, getProductFile, listByType } = await import("../src/db.js");
|
|
394
|
+
const db = openDB(productDir);
|
|
395
|
+
dbData = {};
|
|
396
|
+
const product = getProductFile(db);
|
|
397
|
+
if (product) {
|
|
398
|
+
totalIndexed++;
|
|
399
|
+
if (product.embedding.length > 0)
|
|
400
|
+
totalEmbedded++;
|
|
401
|
+
}
|
|
402
|
+
for (const [plural, type] of Object.entries(typeMap)) {
|
|
403
|
+
const files = listByType(db, type);
|
|
404
|
+
const embedded = files.filter((f) => f.embedding.length > 0).length;
|
|
405
|
+
dbData[plural] = { indexed: files.length, embedded };
|
|
406
|
+
totalIndexed += files.length;
|
|
407
|
+
totalEmbedded += embedded;
|
|
408
|
+
}
|
|
409
|
+
closeDB();
|
|
410
|
+
}
|
|
411
|
+
console.log("\n Files by type:");
|
|
412
|
+
for (const dir of Object.keys(disk.counts)) {
|
|
413
|
+
const onDisk = disk.counts[dir];
|
|
414
|
+
totalDisk += onDisk;
|
|
415
|
+
const label = dir.padEnd(12);
|
|
416
|
+
if (dbData && dbData[dir]) {
|
|
417
|
+
const { indexed, embedded } = dbData[dir];
|
|
418
|
+
console.log(` ${label} ${onDisk} on disk, ${indexed} indexed, ${embedded} embedded`);
|
|
419
|
+
}
|
|
420
|
+
else {
|
|
421
|
+
console.log(` ${label} ${onDisk} on disk`);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
if (dbData) {
|
|
425
|
+
console.log(`\n Total: ${totalDisk} on disk, ${totalIndexed} indexed, ${totalEmbedded} embedded`);
|
|
426
|
+
}
|
|
427
|
+
else {
|
|
428
|
+
console.log(`\n Total: ${totalDisk} on disk`);
|
|
429
|
+
console.log(`\n Note: No index found. Start the MCP server to index files and generate embeddings.`);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
// ─── Help text ───────────────────────────────────────────────────────────────
|
|
433
|
+
function printHelp() {
|
|
434
|
+
console.log(`
|
|
435
|
+
pcl — Product Context Layer CLI (v${version})
|
|
319
436
|
|
|
320
437
|
Commands:
|
|
321
438
|
init [dir] Scaffold /product folder with templates (default: ./product)
|
|
322
439
|
init --scan [dir] Scan repo for existing .md files, import, then scaffold remaining templates
|
|
323
440
|
init --scan-only [dir] Scan and import only, don't scaffold templates
|
|
324
441
|
serve Start the MCP server (reads --product-dir flag)
|
|
442
|
+
status Show file counts and embedding coverage (reads --product-dir flag)
|
|
443
|
+
|
|
444
|
+
Options:
|
|
445
|
+
--help, -h Show this help text
|
|
446
|
+
--version, -v Show version number
|
|
325
447
|
|
|
326
448
|
Examples:
|
|
327
449
|
npx pcl-mcp init
|
|
@@ -329,6 +451,28 @@ Examples:
|
|
|
329
451
|
npx pcl-mcp init --scan-only
|
|
330
452
|
npx pcl-mcp init ./my-product-docs
|
|
331
453
|
npx pcl-mcp serve --product-dir ./product
|
|
454
|
+
npx pcl-mcp status
|
|
332
455
|
`);
|
|
333
456
|
}
|
|
457
|
+
// ─── Router ───────────────────────────────────────────────────────────────────
|
|
458
|
+
switch (cmd) {
|
|
459
|
+
case "init":
|
|
460
|
+
init().catch(console.error);
|
|
461
|
+
break;
|
|
462
|
+
case "serve":
|
|
463
|
+
// Delegate to the server module
|
|
464
|
+
import("../src/server.js").catch(console.error);
|
|
465
|
+
break;
|
|
466
|
+
case "status":
|
|
467
|
+
status().catch(console.error);
|
|
468
|
+
break;
|
|
469
|
+
case "--version":
|
|
470
|
+
case "-v":
|
|
471
|
+
console.log(version);
|
|
472
|
+
break;
|
|
473
|
+
case "--help":
|
|
474
|
+
case "-h":
|
|
475
|
+
default:
|
|
476
|
+
printHelp();
|
|
477
|
+
}
|
|
334
478
|
//# sourceMappingURL=pcl.js.map
|
package/dist/bin/pcl.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pcl.js","sourceRoot":"","sources":["../../bin/pcl.ts"],"names":[],"mappings":";AACA,aAAa;AACb,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AAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAC5B,MAAM;IACR,KAAK,OAAO;QACV,gCAAgC;QAChC,MAAM,CAAC,kBAAkB,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAChD,MAAM;IACR,KAAK,QAAQ;QACX,MAAM,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAC9B,MAAM;IACR,KAAK,WAAW,CAAC;IACjB,KAAK,IAAI;QACP,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACrB,MAAM;IACR,KAAK,QAAQ,CAAC;IACd,KAAK,IAAI,CAAC;IACV;QACE,SAAS,EAAE,CAAC;AAChB,CAAC"}
|
package/dist/src/server.js
CHANGED
|
@@ -15,9 +15,19 @@ import { McpServer, ResourceTemplate } from "@modelcontextprotocol/sdk/server/mc
|
|
|
15
15
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
16
16
|
import { resolve, join } from "node:path";
|
|
17
17
|
import { existsSync } from "node:fs";
|
|
18
|
+
import { createRequire } from "node:module";
|
|
18
19
|
import { openDB, closeDB, getProductFile, getCritical, getFileById, listByType } from "./db.js";
|
|
19
|
-
import { fullIndex, startWatcher } from "./indexer.js";
|
|
20
|
+
import { fullIndex, startWatcher, backfillEmbeddings } from "./indexer.js";
|
|
20
21
|
import { handleTool, TOOL_SCHEMAS, renderFile } from "./tools.js";
|
|
22
|
+
const require = createRequire(import.meta.url);
|
|
23
|
+
const { version } = (() => {
|
|
24
|
+
try {
|
|
25
|
+
return require("../package.json");
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return require("../../package.json");
|
|
29
|
+
}
|
|
30
|
+
})();
|
|
21
31
|
// ─── Resolve product dir ───────────────────────────────────────────────────────
|
|
22
32
|
function resolveProductDir() {
|
|
23
33
|
const argIdx = process.argv.indexOf("--product-dir");
|
|
@@ -53,6 +63,13 @@ async function main() {
|
|
|
53
63
|
if (result.errors.length > 0) {
|
|
54
64
|
log(`Schema errors:\n ${result.errors.join("\n ")}`);
|
|
55
65
|
}
|
|
66
|
+
if (result.total === 0) {
|
|
67
|
+
log(`⚠ No product files found. Run 'pcl init' to scaffold the product folder.`);
|
|
68
|
+
}
|
|
69
|
+
// Backfill embeddings for files that failed embedding previously
|
|
70
|
+
const backfilled = await backfillEmbeddings(db);
|
|
71
|
+
if (backfilled > 0)
|
|
72
|
+
log(`Backfilled ${backfilled} embeddings`);
|
|
56
73
|
// Start file watcher for live updates
|
|
57
74
|
const stopWatcher = await startWatcher(db, productDir, (event, path) => {
|
|
58
75
|
log(`${event}: ${path}`);
|
|
@@ -60,7 +77,7 @@ async function main() {
|
|
|
60
77
|
// ─── MCP server ─────────────────────────────────────────────────────────────
|
|
61
78
|
const server = new McpServer({
|
|
62
79
|
name: "pcl-mcp",
|
|
63
|
-
version
|
|
80
|
+
version,
|
|
64
81
|
});
|
|
65
82
|
// ─── Tools ──────────────────────────────────────────────────────────────────
|
|
66
83
|
for (const [name, def] of Object.entries(TOOL_SCHEMAS)) {
|
package/dist/src/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":";AACA,gBAAgB;AAChB,mFAAmF;AACnF,EAAE;AACF,SAAS;AACT,gEAAgE;AAChE,kCAAkC;AAClC,EAAE;AACF,kCAAkC;AAClC,4FAA4F;AAC5F,EAAE;AACF,0BAA0B;AAC1B,iFAAiF;AAEjF,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,OAAO,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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pcl-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Product Context Layer — MCP server for AI-assisted product development",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/src/server.js",
|
|
@@ -19,7 +19,9 @@
|
|
|
19
19
|
"serve": "node dist/src/server.js",
|
|
20
20
|
"init": "tsx bin/pcl.ts init",
|
|
21
21
|
"typecheck": "tsc --noEmit",
|
|
22
|
-
"prepare": "tsc"
|
|
22
|
+
"prepare": "tsc",
|
|
23
|
+
"publish:npm": "npm publish --registry https://registry.npmjs.org",
|
|
24
|
+
"publish:github": "npm pkg set name='@michaelgorski/pcl-mcp' && npm publish --registry https://npm.pkg.github.com && npm pkg set name='pcl-mcp'"
|
|
23
25
|
},
|
|
24
26
|
"keywords": [
|
|
25
27
|
"mcp",
|
|
@@ -50,6 +52,10 @@
|
|
|
50
52
|
"tsx": "^4.19.0",
|
|
51
53
|
"typescript": "^5.8.0"
|
|
52
54
|
},
|
|
55
|
+
"publishConfig": {
|
|
56
|
+
"registry": "https://registry.npmjs.org",
|
|
57
|
+
"access": "public"
|
|
58
|
+
},
|
|
53
59
|
"engines": {
|
|
54
60
|
"node": ">=22.0.0"
|
|
55
61
|
}
|