@anthropologies/claudestory 0.1.9 → 0.1.11
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/dist/cli.js +649 -160
- package/dist/index.d.ts +24 -16
- package/dist/index.js +29 -12
- package/dist/mcp.js +729 -61
- package/package.json +13 -1
- package/src/skill/SKILL.md +130 -2
- package/src/skill/reference.md +15 -6
package/package.json
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anthropologies/claudestory",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
|
+
"license": "UNLICENSED",
|
|
5
|
+
"description": "Cross-session context persistence for AI coding projects. Tracks tickets, issues, roadmap, and handovers so every session builds on the last.",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"claudestory",
|
|
8
|
+
"claude-code",
|
|
9
|
+
"ai-development",
|
|
10
|
+
"session-continuity",
|
|
11
|
+
"project-management",
|
|
12
|
+
"mcp",
|
|
13
|
+
"cli",
|
|
14
|
+
"agentic-development"
|
|
15
|
+
],
|
|
4
16
|
"type": "module",
|
|
5
17
|
"exports": {
|
|
6
18
|
".": {
|
package/src/skill/SKILL.md
CHANGED
|
@@ -52,8 +52,136 @@ Check if the claudestory MCP tools are available by looking for `claudestory_sta
|
|
|
52
52
|
## Step 1: Check Project
|
|
53
53
|
|
|
54
54
|
- If `.story/` exists in the current working directory (or a parent) → proceed to Step 2
|
|
55
|
-
- If no `.story/` but
|
|
56
|
-
- If
|
|
55
|
+
- If no `.story/` but project indicators exist (code, manifest, .git) → run the **AI-Assisted Setup Flow** below
|
|
56
|
+
- If no `.story/` and no project indicators → explain what claudestory is and suggest navigating to a project
|
|
57
|
+
|
|
58
|
+
### AI-Assisted Setup Flow
|
|
59
|
+
|
|
60
|
+
This flow creates a meaningful `.story/` project instead of empty scaffolding. Claude analyzes the project, proposes structure, and creates everything via MCP tools.
|
|
61
|
+
|
|
62
|
+
#### 1a. Detect Project Type
|
|
63
|
+
|
|
64
|
+
Check for project indicators to determine if this is an **existing project** or a **new/empty project**:
|
|
65
|
+
|
|
66
|
+
- `package.json` → npm/node (read `name`, `description`, check for `typescript` dep)
|
|
67
|
+
- `Cargo.toml` → Rust
|
|
68
|
+
- `go.mod` → Go
|
|
69
|
+
- `pyproject.toml` / `requirements.txt` → Python
|
|
70
|
+
- `*.xcodeproj` / `Package.swift` → Swift/macOS
|
|
71
|
+
- `*.sln` / `*.csproj` → C#/.NET
|
|
72
|
+
- `Gemfile` → Ruby
|
|
73
|
+
- `build.gradle.kts` / `build.gradle` → Android/Kotlin/Java (or Spring Boot)
|
|
74
|
+
- `pubspec.yaml` → Flutter/Dart
|
|
75
|
+
- `angular.json` → Angular
|
|
76
|
+
- `svelte.config.js` → SvelteKit
|
|
77
|
+
- `.git/` → has version history
|
|
78
|
+
|
|
79
|
+
If none found (empty or near-empty directory) → skip to **1c. New Project Interview**.
|
|
80
|
+
|
|
81
|
+
#### 1b. Existing Project — Analyze
|
|
82
|
+
|
|
83
|
+
Before diving into analysis, briefly introduce claudestory to the user:
|
|
84
|
+
|
|
85
|
+
"Claude Story tracks your project's roadmap, tickets, issues, and session handovers in a `.story/` directory. Every Claude Code session starts by reading this context, so you never re-explain your project from scratch. Sessions build on each other: decisions, blockers, and lessons carry forward automatically. I'll analyze your project and propose a structure. You can adjust everything before I create anything."
|
|
86
|
+
|
|
87
|
+
Keep it to 3-4 sentences. Not a sales pitch, just enough that the user knows what they're opting into and that they're in control.
|
|
88
|
+
|
|
89
|
+
Read these files to understand the project (skip any that don't exist, skip files > 50KB):
|
|
90
|
+
|
|
91
|
+
1. **README.md** — project description, goals, feature list, roadmap/TODO sections
|
|
92
|
+
2. **Package manifest** — project name, dependencies, scripts
|
|
93
|
+
3. **CLAUDE.md** — existing project spec (if any)
|
|
94
|
+
4. **Top-level directory listing** — identify major components (src/, test/, docs/, etc.)
|
|
95
|
+
5. **Git summary** — `git log --oneline -20` for recent work patterns
|
|
96
|
+
6. **GitHub issues (ask user first)** — `gh issue list --limit 30 --state open --json number,title,labels,body,createdAt`. If gh fails (auth, rate limit, no remote), skip cleanly and note "GitHub import skipped: [reason]"
|
|
97
|
+
|
|
98
|
+
**Framework-specific deep scan** — after detecting the project type in 1a, scan deeper into framework conventions to understand architecture:
|
|
99
|
+
|
|
100
|
+
- **Next.js / Nuxt:** Check `app/` vs `pages/` routing, scan `app/api/` or `pages/api/` for API routes, read `next.config.*` / `nuxt.config.*`, check for middleware.
|
|
101
|
+
- **Express / Fastify / Koa:** Scan for route files (`routes/`, `src/routes/`), look for `router.get/post` patterns, identify service/controller layers.
|
|
102
|
+
- **NestJS:** Read `nest-cli.json`, scan `src/` for `*.module.ts`, check for controllers and services.
|
|
103
|
+
- **React (CRA / Vite) / Vue / Svelte:** Check `src/components/` structure, look for state management imports (redux, zustand, pinia), identify routing setup.
|
|
104
|
+
- **Angular:** Read `angular.json`, scan `src/app/` for modules and components, check for services and guards.
|
|
105
|
+
- **Django / FastAPI / Flask:** Check for `manage.py`, scan for app directories or router files, look at models and migrations.
|
|
106
|
+
- **Spring Boot:** Check `pom.xml` or `build.gradle` for Spring deps, scan `src/main/java` for controller/service/repository layers.
|
|
107
|
+
- **Rust:** Check `Cargo.toml` for workspace members, scan for `mod.rs` / `lib.rs` structure, identify crate types.
|
|
108
|
+
- **Swift / Xcode:** Check `.xcodeproj` or `Package.swift`, identify SwiftUI vs UIKit, scan for targets.
|
|
109
|
+
- **Android (Kotlin/Java):** Check `build.gradle.kts`, scan `app/src/main/` for activity/fragment/composable structure, check `AndroidManifest.xml`, identify Compose vs XML layouts.
|
|
110
|
+
- **Flutter / Dart:** Check `pubspec.yaml`, scan `lib/` for feature folders (models/, screens/, widgets/, services/), check for state management imports (provider, riverpod, bloc).
|
|
111
|
+
- **Go:** Check `go.mod`, scan for `cmd/` and `internal/`/`pkg/`, check for `Makefile`.
|
|
112
|
+
- **Monorepo:** If `packages/`, `apps/`, or workspace config detected, list each package with its purpose before proposing phases.
|
|
113
|
+
- **Other:** Scan `src/` two levels deep and identify dominant patterns (MVC, service layers, feature folders).
|
|
114
|
+
|
|
115
|
+
**Derive project metadata:**
|
|
116
|
+
- **name**: from package manifest `name` field, or directory name
|
|
117
|
+
- **type**: from package manager (npm, cargo, pip, etc.)
|
|
118
|
+
- **language**: from file extensions and manifest
|
|
119
|
+
|
|
120
|
+
**Assess project stage** from the data — don't use fixed thresholds. A project with 3 commits and a half-written README is greenfield. A project with 500+ commits, test suites, and release tags is mature. A project with 200 commits and active PRs is active development. Use your judgment.
|
|
121
|
+
|
|
122
|
+
**Propose 3-7 phases** reflecting the project's actual development trajectory. Examples:
|
|
123
|
+
- Library: setup → core-api → documentation → testing → publishing
|
|
124
|
+
- App: mvp → auth → data-layer → ui-polish → deployment
|
|
125
|
+
- Mid-development project: capture completed work as early phases, then plan forward
|
|
126
|
+
|
|
127
|
+
**Propose initial tickets** per active phase (2-5 each), based on:
|
|
128
|
+
- README TODOs or roadmap sections (treat as hints, not ground truth)
|
|
129
|
+
- GitHub issues if imported — infer from label semantics: bug/defect labels → issues, enhancement/feature labels → tickets
|
|
130
|
+
- Obvious gaps (missing tests, no CI, no docs, etc.)
|
|
131
|
+
- If more than 30 GitHub issues exist, note "Showing 30 of N. Additional issues can be imported later."
|
|
132
|
+
|
|
133
|
+
**Important:** Only mark phases complete if explicitly confirmed by user or docs — do NOT infer completion from git history alone.
|
|
134
|
+
|
|
135
|
+
#### 1c. New Project — Interview
|
|
136
|
+
|
|
137
|
+
Ask the user:
|
|
138
|
+
1. "What are you building?" — project name and purpose
|
|
139
|
+
2. "What's the tech stack?" — language, framework, project type
|
|
140
|
+
3. "What are the major milestones?" — helps define phases
|
|
141
|
+
4. "What's the first thing to build?" — seeds the first ticket
|
|
142
|
+
|
|
143
|
+
Propose phases and initial tickets from the answers.
|
|
144
|
+
|
|
145
|
+
#### 1d. Present Proposal
|
|
146
|
+
|
|
147
|
+
Show the user a structured proposal (table format, not raw JSON):
|
|
148
|
+
- **Project:** name, type, language
|
|
149
|
+
- **Phases** (table: id, name, description)
|
|
150
|
+
- **Tickets per phase** (title, type, status)
|
|
151
|
+
- **Issues** (if GitHub import was used)
|
|
152
|
+
|
|
153
|
+
Before asking for approval, briefly explain what they're looking at:
|
|
154
|
+
|
|
155
|
+
"**How this works:** Phases are milestones in your project's development. They track progress from setup to shipping. Tickets are specific work items within each phase. After setup, typing `/story` at the start of any Claude Code session loads this context automatically. Claude will know your project's state, what was done last session, and what to work on next."
|
|
156
|
+
|
|
157
|
+
Then ask for approval with clear interaction guidance:
|
|
158
|
+
|
|
159
|
+
"Does this look right? You can:
|
|
160
|
+
- Adjust any phase (rename, reorder, add, remove)
|
|
161
|
+
- Change tickets (add, remove, rephrase, move between phases)
|
|
162
|
+
- Mark phases as complete or in-progress
|
|
163
|
+
- Split or merge phases
|
|
164
|
+
|
|
165
|
+
I'll iterate until you're happy, then create everything."
|
|
166
|
+
|
|
167
|
+
#### 1e. Execute on Approval
|
|
168
|
+
|
|
169
|
+
1. Call `claudestory_init` with name, type, language — after this, all MCP tools become available dynamically
|
|
170
|
+
2. Call `claudestory_phase_create` for each phase — first phase with `atStart: true`, subsequent with `after: <previous-phase-id>`
|
|
171
|
+
3. Call `claudestory_ticket_create` for each ticket
|
|
172
|
+
4. Call `claudestory_issue_create` for each imported GitHub issue
|
|
173
|
+
5. Call `claudestory_ticket_update` to mark already-complete tickets as `complete`
|
|
174
|
+
6. Call `claudestory_snapshot` to save initial baseline
|
|
175
|
+
|
|
176
|
+
#### 1f. Post-Setup
|
|
177
|
+
|
|
178
|
+
After creation completes:
|
|
179
|
+
- Confirm what was created (e.g., "Created 5 phases, 12 tickets, and 3 issues")
|
|
180
|
+
- Check if `.gitignore` includes `.story/snapshots/` (warn if missing — snapshots should not be committed)
|
|
181
|
+
- Suggest creating `CLAUDE.md` if it doesn't exist (project spec for AI sessions)
|
|
182
|
+
- Suggest creating `RULES.md` if it doesn't exist (development constraints)
|
|
183
|
+
- Write an initial handover documenting the setup decisions
|
|
184
|
+
- Proceed to Step 2 (Load Context) to show the new project state
|
|
57
185
|
|
|
58
186
|
## Step 2: Load Context (Default /story Behavior)
|
|
59
187
|
|
package/src/skill/reference.md
CHANGED
|
@@ -55,7 +55,7 @@ claudestory ticket create --title <t> --type <type> [--phase <p>] [--description
|
|
|
55
55
|
Update a ticket
|
|
56
56
|
|
|
57
57
|
```
|
|
58
|
-
claudestory ticket update <id> [--status <s>] [--title <t>] [--phase <p>] [--order <n>] [--description <d>] [--blocked-by <ids>] [--parent-ticket <id>] [--format json|md]
|
|
58
|
+
claudestory ticket update <id> [--status <s>] [--title <t>] [--type <type>] [--phase <p>] [--order <n>] [--description <d>] [--blocked-by <ids>] [--parent-ticket <id>] [--format json|md]
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
### ticket delete
|
|
@@ -83,14 +83,14 @@ claudestory issue get <id> [--format json|md]
|
|
|
83
83
|
Create a new issue
|
|
84
84
|
|
|
85
85
|
```
|
|
86
|
-
claudestory issue create --title <t> --severity <s> --impact <i> [--components <c>] [--related-tickets <ids>] [--location <locs>] [--format json|md]
|
|
86
|
+
claudestory issue create --title <t> --severity <s> --impact <i> [--components <c>] [--related-tickets <ids>] [--location <locs>] [--phase <p>] [--format json|md]
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
### issue update
|
|
90
90
|
Update an issue
|
|
91
91
|
|
|
92
92
|
```
|
|
93
|
-
claudestory issue update <id> [--status <s>] [--title <t>] [--severity <sev>] [--impact <i>] [--resolution <r>] [--components <c>] [--related-tickets <ids>] [--location <locs>] [--format json|md]
|
|
93
|
+
claudestory issue update <id> [--status <s>] [--title <t>] [--severity <sev>] [--impact <i>] [--resolution <r>] [--components <c>] [--related-tickets <ids>] [--location <locs>] [--order <n>] [--phase <p>] [--format json|md]
|
|
94
94
|
```
|
|
95
95
|
|
|
96
96
|
### issue delete
|
|
@@ -275,6 +275,13 @@ Print CLI command and MCP tool reference
|
|
|
275
275
|
claudestory reference [--format json|md]
|
|
276
276
|
```
|
|
277
277
|
|
|
278
|
+
### selftest
|
|
279
|
+
Run integration smoke test — create/update/delete cycle across all entity types
|
|
280
|
+
|
|
281
|
+
```
|
|
282
|
+
claudestory selftest [--format json|md]
|
|
283
|
+
```
|
|
284
|
+
|
|
278
285
|
### setup-skill
|
|
279
286
|
Install the /story skill globally for Claude Code
|
|
280
287
|
|
|
@@ -292,7 +299,7 @@ claudestory setup-skill
|
|
|
292
299
|
- **claudestory_ticket_get** (id) — Get a ticket by ID
|
|
293
300
|
- **claudestory_ticket_next** (count?) — Highest-priority unblocked ticket(s)
|
|
294
301
|
- **claudestory_ticket_blocked** — All blocked tickets with dependencies
|
|
295
|
-
- **claudestory_issue_list** (status?, severity?) — List issues with optional filters
|
|
302
|
+
- **claudestory_issue_list** (status?, severity?, component?) — List issues with optional filters
|
|
296
303
|
- **claudestory_issue_get** (id) — Get an issue by ID
|
|
297
304
|
- **claudestory_handover_list** — List handover filenames (newest first)
|
|
298
305
|
- **claudestory_handover_latest** — Content of most recent handover
|
|
@@ -309,9 +316,11 @@ claudestory setup-skill
|
|
|
309
316
|
- **claudestory_note_create** (content, title?, tags?) — Create note
|
|
310
317
|
- **claudestory_note_update** (id, content?, title?, tags?, status?) — Update note
|
|
311
318
|
- **claudestory_ticket_create** (title, type, phase?, description?, blockedBy?, parentTicket?) — Create ticket
|
|
312
|
-
- **claudestory_ticket_update** (id, status?, title?, order?, description?, phase?, parentTicket?) — Update ticket
|
|
319
|
+
- **claudestory_ticket_update** (id, status?, title?, type?, order?, description?, phase?, parentTicket?, blockedBy?) — Update ticket
|
|
313
320
|
- **claudestory_issue_create** (title, severity, impact, components?, relatedTickets?, location?, phase?) — Create issue
|
|
314
|
-
- **claudestory_issue_update** (id, status?, title?, severity?, impact?, resolution?, components?, relatedTickets?, location?) — Update issue
|
|
321
|
+
- **claudestory_issue_update** (id, status?, title?, severity?, impact?, resolution?, components?, relatedTickets?, location?, order?, phase?) — Update issue
|
|
322
|
+
- **claudestory_phase_create** (id, name, label, description, summary?, after?, atStart?) — Create phase in roadmap
|
|
323
|
+
- **claudestory_selftest** — Integration smoke test — create/update/delete cycle
|
|
315
324
|
|
|
316
325
|
## Common Workflows
|
|
317
326
|
|