@maledorak/lore-mcp 1.0.7 → 1.0.8

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.
Files changed (2) hide show
  1. package/bin/lore-mcp.js +23 -9
  2. package/package.json +1 -1
package/bin/lore-mcp.js CHANGED
@@ -120,7 +120,7 @@ function findTask(loreDir, taskId) {
120
120
  const tasksDir = join(loreDir, '1-tasks');
121
121
  const taskNum = taskId.replace(/^0+/, '') || '0';
122
122
 
123
- for (const statusDir of ['active', 'blocked', 'archive']) {
123
+ for (const statusDir of ['active', 'blocked', 'archive', 'backlog']) {
124
124
  const statusPath = join(tasksDir, statusDir);
125
125
  if (!existsSync(statusPath)) continue;
126
126
 
@@ -268,7 +268,7 @@ function parseTasks(loreDir) {
268
268
  const tasks = new Map();
269
269
  const tasksBase = join(loreDir, '1-tasks');
270
270
 
271
- for (const subdir of ['active', 'blocked', 'archive']) {
271
+ for (const subdir of ['active', 'blocked', 'archive', 'backlog']) {
272
272
  const subdirPath = join(tasksBase, subdir);
273
273
  if (!existsSync(subdirPath)) continue;
274
274
 
@@ -307,6 +307,7 @@ function parseTasks(loreDir) {
307
307
  let status = meta.status || 'active';
308
308
  if (subdir === 'archive') status = 'completed';
309
309
  else if (subdir === 'blocked') status = 'blocked';
310
+ else if (subdir === 'backlog') status = 'backlog';
310
311
 
311
312
  tasks.set(String(meta.id || taskId), {
312
313
  id: String(meta.id || taskId),
@@ -378,6 +379,7 @@ function generateMermaid(tasks, adrs) {
378
379
  const completed = [...tasks.values()].filter(t => t.status === 'completed');
379
380
  const active = [...tasks.values()].filter(t => t.status === 'active');
380
381
  const blocked = [...tasks.values()].filter(t => t.status === 'blocked');
382
+ const backlog = [...tasks.values()].filter(t => t.status === 'backlog');
381
383
 
382
384
  if (completed.length > 0) {
383
385
  lines.push(' subgraph Completed');
@@ -406,6 +408,15 @@ function generateMermaid(tasks, adrs) {
406
408
  lines.push(' end');
407
409
  }
408
410
 
411
+ if (backlog.length > 0) {
412
+ lines.push(' subgraph Backlog');
413
+ for (const t of backlog.sort((a, b) => a.id.localeCompare(b.id))) {
414
+ const shortTitle = t.title.length > 25 ? t.title.slice(0, 25) + '...' : t.title;
415
+ lines.push(` T${t.id}["${t.id}: ${shortTitle}"]`);
416
+ }
417
+ lines.push(' end');
418
+ }
419
+
409
420
  if (adrs.size > 0) {
410
421
  lines.push(' subgraph ADRs');
411
422
  for (const a of [...adrs.values()].sort((a, b) => a.id.localeCompare(b.id))) {
@@ -443,7 +454,7 @@ function generateStatusTable(tasks, blocks) {
443
454
  '|:---|:------|:-----|:-------|:-----------|:-------|:-----|',
444
455
  ];
445
456
 
446
- const statusOrder = { active: 0, blocked: 1, completed: 2 };
457
+ const statusOrder = { active: 0, blocked: 1, backlog: 2, completed: 3 };
447
458
  const sortedTasks = [...tasks.values()].sort((a, b) => {
448
459
  const orderDiff = (statusOrder[a.status] ?? 4) - (statusOrder[b.status] ?? 4);
449
460
  return orderDiff !== 0 ? orderDiff : a.id.localeCompare(b.id);
@@ -519,9 +530,10 @@ function generateNext(tasks, blocks, ready) {
519
530
 
520
531
  const activeCount = [...tasks.values()].filter(t => t.status === 'active').length;
521
532
  const blockedCount = [...tasks.values()].filter(t => t.status === 'blocked').length;
533
+ const backlogCount = [...tasks.values()].filter(t => t.status === 'backlog').length;
522
534
  const completedCount = [...tasks.values()].filter(t => t.status === 'completed').length;
523
535
 
524
- lines.push(`**Active:** ${activeCount} | **Blocked:** ${blockedCount} | **Completed:** ${completedCount}`);
536
+ lines.push(`**Active:** ${activeCount} | **Blocked:** ${blockedCount} | **Backlog:** ${backlogCount} | **Completed:** ${completedCount}`);
525
537
  lines.push('');
526
538
 
527
539
  if (ready.length > 0) {
@@ -581,15 +593,16 @@ Quick reference for task dependencies, status, and ADR relationships.`);
581
593
 
582
594
  const activeCount = [...tasks.values()].filter(t => t.status === 'active').length;
583
595
  const blockedCount = [...tasks.values()].filter(t => t.status === 'blocked').length;
596
+ const backlogCount = [...tasks.values()].filter(t => t.status === 'backlog').length;
584
597
  const completedCount = [...tasks.values()].filter(t => t.status === 'completed').length;
585
598
  const adrCount = adrs.size;
586
599
 
587
600
  sections.push(`
588
601
  ## Quick Stats
589
602
 
590
- | Active | Blocked | Completed | ADRs |
591
- |:------:|:-------:|:---------:|:----:|
592
- | ${activeCount} | ${blockedCount} | ${completedCount} | ${adrCount} |`);
603
+ | Active | Blocked | Backlog | Completed | ADRs |
604
+ |:------:|:-------:|:-------:|:---------:|:----:|
605
+ | ${activeCount} | ${blockedCount} | ${backlogCount} | ${completedCount} | ${adrCount} |`);
593
606
 
594
607
  if (ready.length > 0) {
595
608
  sections.push('\n## Ready to Start\n\nThese tasks have no blockers (or all blockers completed):\n');
@@ -619,6 +632,7 @@ Quick reference for task dependencies, status, and ADR relationships.`);
619
632
  **Task Status:**
620
633
  - \`active\` — Work can proceed
621
634
  - \`blocked\` — Waiting on dependencies
635
+ - \`backlog\` — Planned but not yet started
622
636
  - \`completed\` — Done, in archive
623
637
 
624
638
  **Graph Arrows:**
@@ -626,7 +640,7 @@ Quick reference for task dependencies, status, and ADR relationships.`);
626
640
  - \`ADR -.-> Task\` — ADR informs Task
627
641
  `);
628
642
 
629
- return { readme: sections.join('\n'), next: nextContent, stats: { activeCount, blockedCount, completedCount, adrCount } };
643
+ return { readme: sections.join('\n'), next: nextContent, stats: { activeCount, blockedCount, backlogCount, completedCount, adrCount } };
630
644
  }
631
645
 
632
646
  function runGenerateIndex(loreDir) {
@@ -821,7 +835,7 @@ server.registerTool(
821
835
  'Generated:',
822
836
  ...result.generated.map(p => `- ${p}`),
823
837
  '',
824
- `Stats: ${result.stats.activeCount} active, ${result.stats.blockedCount} blocked, ${result.stats.completedCount} completed, ${result.stats.adrCount} ADRs`,
838
+ `Stats: ${result.stats.activeCount} active, ${result.stats.blockedCount} blocked, ${result.stats.backlogCount} backlog, ${result.stats.completedCount} completed, ${result.stats.adrCount} ADRs`,
825
839
  ];
826
840
 
827
841
  return { content: [{ type: 'text', text: lines.join('\n') }] };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maledorak/lore-mcp",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "MCP server for lore framework - AI-readable project memory with task/ADR/wiki management",
5
5
  "bin": {
6
6
  "lore-mcp": "./bin/lore-mcp.js"