@anthropologies/claudestory 0.1.7 → 0.1.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.
package/README.md CHANGED
@@ -95,10 +95,11 @@ The MCP server provides 19 tools for Claude Code integration. It imports the sam
95
95
  ### Setup with Claude Code
96
96
 
97
97
  ```bash
98
- claude mcp add claudestory -s user -- npx -y @anthropologies/claudestory --mcp
98
+ npm install -g @anthropologies/claudestory
99
+ claude mcp add claudestory -s user -- claudestory --mcp
99
100
  ```
100
101
 
101
- That's it. One command, global works in every project that has a `.story/` directory. No global install required. The MCP server auto-discovers the project root by walking up from the working directory.
102
+ Two commands: install globally, register as MCP server. Works in every project that has a `.story/` directory. The MCP server auto-discovers the project root by walking up from the working directory.
102
103
 
103
104
  ### MCP Tools
104
105
 
package/dist/cli.js CHANGED
@@ -3652,7 +3652,7 @@ var init_mcp = __esm({
3652
3652
  init_tools();
3653
3653
  ENV_VAR2 = "CLAUDESTORY_PROJECT_ROOT";
3654
3654
  CONFIG_PATH2 = ".story/config.json";
3655
- version = "0.1.7";
3655
+ version = "0.1.8";
3656
3656
  main().catch((err) => {
3657
3657
  process.stderr.write(`Fatal: ${err instanceof Error ? err.message : String(err)}
3658
3658
  `);
@@ -3662,7 +3662,8 @@ var init_mcp = __esm({
3662
3662
  });
3663
3663
 
3664
3664
  // src/core/init.ts
3665
- import { mkdir as mkdir3, stat as stat2 } from "fs/promises";
3665
+ import { mkdir as mkdir3, stat as stat2, writeFile as writeFile2 } from "fs/promises";
3666
+ import { existsSync as existsSync6 } from "fs";
3666
3667
  import { join as join9, resolve as resolve8 } from "path";
3667
3668
  async function initProject(root, options) {
3668
3669
  const absRoot = resolve8(root);
@@ -3689,6 +3690,13 @@ async function initProject(root, options) {
3689
3690
  await mkdir3(join9(wrapDir, "tickets"), { recursive: true });
3690
3691
  await mkdir3(join9(wrapDir, "issues"), { recursive: true });
3691
3692
  await mkdir3(join9(wrapDir, "handovers"), { recursive: true });
3693
+ const created = [
3694
+ ".story/config.json",
3695
+ ".story/roadmap.json",
3696
+ ".story/tickets/",
3697
+ ".story/issues/",
3698
+ ".story/handovers/"
3699
+ ];
3692
3700
  const today = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
3693
3701
  const config = {
3694
3702
  version: 2,
@@ -3719,6 +3727,13 @@ async function initProject(root, options) {
3719
3727
  };
3720
3728
  await writeConfig(config, absRoot);
3721
3729
  await writeRoadmap(roadmap, absRoot);
3730
+ const skillDir = join9(absRoot, ".claude", "skills", "prime");
3731
+ const skillPath = join9(skillDir, "SKILL.md");
3732
+ if (!existsSync6(skillPath)) {
3733
+ await mkdir3(skillDir, { recursive: true });
3734
+ await writeFile2(skillPath, PRIME_SKILL_CONTENT, "utf-8");
3735
+ created.push(".claude/skills/prime/SKILL.md");
3736
+ }
3722
3737
  const warnings = [];
3723
3738
  if (options.force && exists) {
3724
3739
  try {
@@ -3733,22 +3748,82 @@ async function initProject(root, options) {
3733
3748
  }
3734
3749
  return {
3735
3750
  root: absRoot,
3736
- created: [
3737
- ".story/config.json",
3738
- ".story/roadmap.json",
3739
- ".story/tickets/",
3740
- ".story/issues/",
3741
- ".story/handovers/"
3742
- ],
3751
+ created,
3743
3752
  warnings
3744
3753
  };
3745
3754
  }
3755
+ var PRIME_SKILL_CONTENT;
3746
3756
  var init_init = __esm({
3747
3757
  "src/core/init.ts"() {
3748
3758
  "use strict";
3749
3759
  init_esm_shims();
3750
3760
  init_project_loader();
3751
3761
  init_errors();
3762
+ PRIME_SKILL_CONTENT = `---
3763
+ name: prime
3764
+ description: Load full claudestory project context. Use at session start for any project with a .story/ directory.
3765
+ ---
3766
+
3767
+ # Prime: Load Project Context
3768
+
3769
+ Get full project context in one command for any project using claudestory.
3770
+
3771
+ ## Step 0: Check Setup
3772
+
3773
+ First, check if the claudestory MCP tools are available by looking for \`claudestory_status\` in your available tools.
3774
+
3775
+ **If MCP tools ARE available**, proceed to Step 1.
3776
+
3777
+ **If MCP tools are NOT available**, help the user set up:
3778
+
3779
+ 1. Check if the \`claudestory\` CLI is installed by running: \`claudestory --version\`
3780
+ 2. If NOT installed, tell the user:
3781
+ \`\`\`
3782
+ claudestory CLI not found. To set up:
3783
+ npm install -g @anthropologies/claudestory
3784
+ claude mcp add claudestory -s user -- claudestory --mcp
3785
+ Then restart Claude Code and run /prime again.
3786
+ \`\`\`
3787
+ 3. If CLI IS installed but MCP not registered, offer to register it for them.
3788
+ With user permission, run: \`claude mcp add claudestory -s user -- claudestory --mcp\`
3789
+ Tell the user to restart Claude Code and run /prime again.
3790
+
3791
+ **If MCP tools are unavailable and user doesn't want to set up**, fall back to CLI:
3792
+ - Run \`claudestory status\` via Bash
3793
+ - Run \`claudestory recap\` via Bash
3794
+ - Run \`claudestory handover latest\` via Bash
3795
+ - Then continue to Steps 4-6 below.
3796
+
3797
+ ## Step 1: Project Status
3798
+ Call the \`claudestory_status\` MCP tool.
3799
+
3800
+ ## Step 2: Session Recap
3801
+ Call the \`claudestory_recap\` MCP tool.
3802
+
3803
+ ## Step 3: Latest Handover
3804
+ Call the \`claudestory_handover_latest\` MCP tool.
3805
+
3806
+ ## Step 4: Development Rules
3807
+ Read \`RULES.md\` if it exists in the project root.
3808
+
3809
+ ## Step 5: Lessons Learned
3810
+ Read \`WORK_STRATEGIES.md\` if it exists in the project root.
3811
+
3812
+ ## Step 6: Recent Commits
3813
+ Run \`git log --oneline -10\`.
3814
+
3815
+ ## After Loading
3816
+
3817
+ Present a concise summary:
3818
+ - Project progress (X/Y tickets, current phase)
3819
+ - What changed since last snapshot
3820
+ - What the last session accomplished
3821
+ - Next ticket to work on
3822
+ - Any high-severity issues or blockers
3823
+ - Key process rules (if WORK_STRATEGIES.md exists)
3824
+
3825
+ Then ask: "What would you like to work on?"
3826
+ `;
3752
3827
  }
3753
3828
  });
3754
3829
 
@@ -5176,7 +5251,7 @@ async function runCli() {
5176
5251
  registerRecapCommand: registerRecapCommand2,
5177
5252
  registerExportCommand: registerExportCommand2
5178
5253
  } = await Promise.resolve().then(() => (init_register(), register_exports));
5179
- const version2 = "0.1.7";
5254
+ const version2 = "0.1.8";
5180
5255
  class HandledError extends Error {
5181
5256
  constructor() {
5182
5257
  super("HANDLED_ERROR");
package/dist/index.js CHANGED
@@ -1382,7 +1382,8 @@ function dfsBlocked(id, state, visited, inStack, findings) {
1382
1382
  }
1383
1383
 
1384
1384
  // src/core/init.ts
1385
- import { mkdir, stat as stat2 } from "fs/promises";
1385
+ import { mkdir, stat as stat2, writeFile as writeFile2 } from "fs/promises";
1386
+ import { existsSync as existsSync4 } from "fs";
1386
1387
  import { join as join4, resolve as resolve3 } from "path";
1387
1388
  async function initProject(root, options) {
1388
1389
  const absRoot = resolve3(root);
@@ -1409,6 +1410,13 @@ async function initProject(root, options) {
1409
1410
  await mkdir(join4(wrapDir, "tickets"), { recursive: true });
1410
1411
  await mkdir(join4(wrapDir, "issues"), { recursive: true });
1411
1412
  await mkdir(join4(wrapDir, "handovers"), { recursive: true });
1413
+ const created = [
1414
+ ".story/config.json",
1415
+ ".story/roadmap.json",
1416
+ ".story/tickets/",
1417
+ ".story/issues/",
1418
+ ".story/handovers/"
1419
+ ];
1412
1420
  const today = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
1413
1421
  const config = {
1414
1422
  version: 2,
@@ -1439,6 +1447,13 @@ async function initProject(root, options) {
1439
1447
  };
1440
1448
  await writeConfig(config, absRoot);
1441
1449
  await writeRoadmap(roadmap, absRoot);
1450
+ const skillDir = join4(absRoot, ".claude", "skills", "prime");
1451
+ const skillPath = join4(skillDir, "SKILL.md");
1452
+ if (!existsSync4(skillPath)) {
1453
+ await mkdir(skillDir, { recursive: true });
1454
+ await writeFile2(skillPath, PRIME_SKILL_CONTENT, "utf-8");
1455
+ created.push(".claude/skills/prime/SKILL.md");
1456
+ }
1442
1457
  const warnings = [];
1443
1458
  if (options.force && exists) {
1444
1459
  try {
@@ -1453,20 +1468,79 @@ async function initProject(root, options) {
1453
1468
  }
1454
1469
  return {
1455
1470
  root: absRoot,
1456
- created: [
1457
- ".story/config.json",
1458
- ".story/roadmap.json",
1459
- ".story/tickets/",
1460
- ".story/issues/",
1461
- ".story/handovers/"
1462
- ],
1471
+ created,
1463
1472
  warnings
1464
1473
  };
1465
1474
  }
1475
+ var PRIME_SKILL_CONTENT = `---
1476
+ name: prime
1477
+ description: Load full claudestory project context. Use at session start for any project with a .story/ directory.
1478
+ ---
1479
+
1480
+ # Prime: Load Project Context
1481
+
1482
+ Get full project context in one command for any project using claudestory.
1483
+
1484
+ ## Step 0: Check Setup
1485
+
1486
+ First, check if the claudestory MCP tools are available by looking for \`claudestory_status\` in your available tools.
1487
+
1488
+ **If MCP tools ARE available**, proceed to Step 1.
1489
+
1490
+ **If MCP tools are NOT available**, help the user set up:
1491
+
1492
+ 1. Check if the \`claudestory\` CLI is installed by running: \`claudestory --version\`
1493
+ 2. If NOT installed, tell the user:
1494
+ \`\`\`
1495
+ claudestory CLI not found. To set up:
1496
+ npm install -g @anthropologies/claudestory
1497
+ claude mcp add claudestory -s user -- claudestory --mcp
1498
+ Then restart Claude Code and run /prime again.
1499
+ \`\`\`
1500
+ 3. If CLI IS installed but MCP not registered, offer to register it for them.
1501
+ With user permission, run: \`claude mcp add claudestory -s user -- claudestory --mcp\`
1502
+ Tell the user to restart Claude Code and run /prime again.
1503
+
1504
+ **If MCP tools are unavailable and user doesn't want to set up**, fall back to CLI:
1505
+ - Run \`claudestory status\` via Bash
1506
+ - Run \`claudestory recap\` via Bash
1507
+ - Run \`claudestory handover latest\` via Bash
1508
+ - Then continue to Steps 4-6 below.
1509
+
1510
+ ## Step 1: Project Status
1511
+ Call the \`claudestory_status\` MCP tool.
1512
+
1513
+ ## Step 2: Session Recap
1514
+ Call the \`claudestory_recap\` MCP tool.
1515
+
1516
+ ## Step 3: Latest Handover
1517
+ Call the \`claudestory_handover_latest\` MCP tool.
1518
+
1519
+ ## Step 4: Development Rules
1520
+ Read \`RULES.md\` if it exists in the project root.
1521
+
1522
+ ## Step 5: Lessons Learned
1523
+ Read \`WORK_STRATEGIES.md\` if it exists in the project root.
1524
+
1525
+ ## Step 6: Recent Commits
1526
+ Run \`git log --oneline -10\`.
1527
+
1528
+ ## After Loading
1529
+
1530
+ Present a concise summary:
1531
+ - Project progress (X/Y tickets, current phase)
1532
+ - What changed since last snapshot
1533
+ - What the last session accomplished
1534
+ - Next ticket to work on
1535
+ - Any high-severity issues or blockers
1536
+ - Key process rules (if WORK_STRATEGIES.md exists)
1537
+
1538
+ Then ask: "What would you like to work on?"
1539
+ `;
1466
1540
 
1467
1541
  // src/core/snapshot.ts
1468
1542
  import { readdir as readdir3, readFile as readFile3, mkdir as mkdir2, unlink as unlink2 } from "fs/promises";
1469
- import { existsSync as existsSync4 } from "fs";
1543
+ import { existsSync as existsSync5 } from "fs";
1470
1544
  import { join as join5, resolve as resolve4 } from "path";
1471
1545
  import { z as z6 } from "zod";
1472
1546
  var LoadWarningSchema = z6.object({
@@ -1519,7 +1593,7 @@ async function saveSnapshot(root, loadResult) {
1519
1593
  }
1520
1594
  async function loadLatestSnapshot(root) {
1521
1595
  const snapshotsDir = join5(resolve4(root), ".story", "snapshots");
1522
- if (!existsSync4(snapshotsDir)) return null;
1596
+ if (!existsSync5(snapshotsDir)) return null;
1523
1597
  const files = await listSnapshotFiles(snapshotsDir);
1524
1598
  if (files.length === 0) return null;
1525
1599
  for (const filename of files) {
package/dist/mcp.js CHANGED
@@ -2491,7 +2491,7 @@ function registerAllTools(server, pinnedRoot) {
2491
2491
  // src/mcp/index.ts
2492
2492
  var ENV_VAR2 = "CLAUDESTORY_PROJECT_ROOT";
2493
2493
  var CONFIG_PATH2 = ".story/config.json";
2494
- var version = "0.1.7";
2494
+ var version = "0.1.8";
2495
2495
  function tryDiscoverRoot() {
2496
2496
  const envRoot = process.env[ENV_VAR2];
2497
2497
  if (envRoot) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anthropologies/claudestory",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {