@anthropologies/claudestory 0.1.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 ADDED
@@ -0,0 +1,162 @@
1
+ # claudestory
2
+
3
+ Cross-session context persistence for AI coding assistants. Tracks tickets, issues, roadmap phases, blockers, and session handovers in a `.story/` directory that AI tools read and write natively.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g claudestory
9
+ ```
10
+
11
+ Requires Node.js 20+.
12
+
13
+ ## Quick Start
14
+
15
+ ```bash
16
+ # Initialize in your project
17
+ claudestory init --name "my-project"
18
+
19
+ # See project state
20
+ claudestory status
21
+
22
+ # What should I work on next?
23
+ claudestory ticket next
24
+
25
+ # Check for data integrity issues
26
+ claudestory validate
27
+ ```
28
+
29
+ ## CLI Commands
30
+
31
+ All commands support `--format json|md` (default: `md`).
32
+
33
+ ### Project
34
+
35
+ | Command | Description |
36
+ |---------|-------------|
37
+ | `claudestory init [--name] [--force]` | Scaffold `.story/` directory |
38
+ | `claudestory status` | Project summary with phase statuses |
39
+ | `claudestory validate` | Reference integrity + schema checks |
40
+
41
+ ### Phases
42
+
43
+ | Command | Description |
44
+ |---------|-------------|
45
+ | `claudestory phase list` | All phases with derived status |
46
+ | `claudestory phase current` | First non-complete phase |
47
+ | `claudestory phase tickets --phase <id>` | Leaf tickets for a phase |
48
+ | `claudestory phase create --id --name --label --description [--summary] --after/--at-start` | Create phase |
49
+ | `claudestory phase rename <id> [--name] [--label] [--description] [--summary]` | Update phase metadata |
50
+ | `claudestory phase move <id> --after/--at-start` | Reorder phase |
51
+ | `claudestory phase delete <id> [--reassign <target>]` | Delete phase |
52
+
53
+ ### Tickets
54
+
55
+ | Command | Description |
56
+ |---------|-------------|
57
+ | `claudestory ticket list [--status] [--phase] [--type]` | List leaf tickets |
58
+ | `claudestory ticket get <id>` | Ticket detail |
59
+ | `claudestory ticket next` | Highest-priority unblocked ticket |
60
+ | `claudestory ticket blocked` | All blocked tickets |
61
+ | `claudestory ticket create --title --type --phase [--description] [--blocked-by] [--parent-ticket]` | Create ticket |
62
+ | `claudestory ticket update <id> [--status] [--title] [--phase] [--order] ...` | Update ticket |
63
+ | `claudestory ticket delete <id> [--force]` | Delete ticket |
64
+
65
+ ### Issues
66
+
67
+ | Command | Description |
68
+ |---------|-------------|
69
+ | `claudestory issue list [--status] [--severity]` | List issues |
70
+ | `claudestory issue get <id>` | Issue detail |
71
+ | `claudestory issue create --title --severity --impact [--components] [--related-tickets] [--location]` | Create issue |
72
+ | `claudestory issue update <id> [--status] [--title] [--severity] ...` | Update issue |
73
+ | `claudestory issue delete <id>` | Delete issue |
74
+
75
+ ### Handovers
76
+
77
+ | Command | Description |
78
+ |---------|-------------|
79
+ | `claudestory handover list` | List handover filenames (newest first) |
80
+ | `claudestory handover latest` | Content of most recent handover |
81
+ | `claudestory handover get <filename>` | Content of specific handover |
82
+
83
+ ### Blockers
84
+
85
+ | Command | Description |
86
+ |---------|-------------|
87
+ | `claudestory blocker list` | List all blockers with dates |
88
+ | `claudestory blocker add --name [--note]` | Add a blocker |
89
+ | `claudestory blocker clear <name> [--note]` | Clear an active blocker |
90
+
91
+ ## MCP Server
92
+
93
+ The MCP server provides 15 read-only tools for Claude Code integration. It imports the same TypeScript modules as the CLI directly — no subprocess spawning.
94
+
95
+ ### Setup with Claude Code
96
+
97
+ ```bash
98
+ claude mcp add claudestory -- env CLAUDESTORY_PROJECT_ROOT=/path/to/your/project node /path/to/claudestory/dist/mcp.js
99
+ ```
100
+
101
+ Or if installed globally:
102
+
103
+ ```bash
104
+ claude mcp add claudestory -- env CLAUDESTORY_PROJECT_ROOT=/path/to/your/project claudestory-mcp
105
+ ```
106
+
107
+ Set `CLAUDESTORY_PROJECT_ROOT` to your project root (the directory containing `.story/`). This is strongly recommended for MCP since the server may launch from a tool-managed working directory.
108
+
109
+ ### MCP Tools
110
+
111
+ | Tool | Description |
112
+ |------|-------------|
113
+ | `claudestory_status` | Project summary |
114
+ | `claudestory_phase_list` | All phases with status |
115
+ | `claudestory_phase_current` | Current phase |
116
+ | `claudestory_phase_tickets` | Tickets for a phase |
117
+ | `claudestory_ticket_list` | List tickets (filterable) |
118
+ | `claudestory_ticket_get` | Get ticket by ID |
119
+ | `claudestory_ticket_next` | Priority ticket |
120
+ | `claudestory_ticket_blocked` | Blocked tickets |
121
+ | `claudestory_issue_list` | List issues (filterable) |
122
+ | `claudestory_issue_get` | Get issue by ID |
123
+ | `claudestory_handover_list` | List handovers |
124
+ | `claudestory_handover_latest` | Latest handover |
125
+ | `claudestory_handover_get` | Specific handover |
126
+ | `claudestory_blocker_list` | List blockers |
127
+ | `claudestory_validate` | Integrity checks |
128
+
129
+ ## Session Priming
130
+
131
+ Add a Claude Code hook to auto-inject project state at session start:
132
+
133
+ ```bash
134
+ #!/bin/bash
135
+ claudestory status --format md 2>/dev/null
136
+ ```
137
+
138
+ This gives the AI full project context from the first message.
139
+
140
+ ## Library Usage
141
+
142
+ ```typescript
143
+ import { loadProject, ProjectState } from "claudestory";
144
+
145
+ const { state, warnings } = await loadProject("/path/to/project");
146
+ console.log(state.tickets.length); // all tickets
147
+ console.log(state.phaseTickets("p1")); // tickets in phase p1
148
+ ```
149
+
150
+ ## Git Guidance
151
+
152
+ Commit your `.story/` directory. Add to `.gitignore`:
153
+
154
+ ```
155
+ .story/snapshots/
156
+ ```
157
+
158
+ Everything else in `.story/` should be tracked.
159
+
160
+ ## License
161
+
162
+ MIT
package/dist/cli.d.ts ADDED
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node