@anthropologies/claudestory 0.1.30 → 0.1.32
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 +29 -4
- package/dist/mcp.js +22 -3
- package/package.json +1 -1
- package/src/skill/SKILL.md +8 -0
- package/src/skill/reference.md +6 -0
package/dist/cli.js
CHANGED
|
@@ -7158,6 +7158,19 @@ var init_finalize = __esm({
|
|
|
7158
7158
|
};
|
|
7159
7159
|
}
|
|
7160
7160
|
async handleStage(ctx, report) {
|
|
7161
|
+
const checkpoint = ctx.state.finalizeCheckpoint;
|
|
7162
|
+
if (checkpoint === "staged" || checkpoint === "staged_override") {
|
|
7163
|
+
return {
|
|
7164
|
+
action: "retry",
|
|
7165
|
+
instruction: [
|
|
7166
|
+
"Files staged. Now run pre-commit checks.",
|
|
7167
|
+
"",
|
|
7168
|
+
'Run any pre-commit hooks or linting, then call me with completedAction: "precommit_passed".',
|
|
7169
|
+
'If pre-commit fails, fix the issues, re-stage, and call me with completedAction: "files_staged" again.'
|
|
7170
|
+
].join("\n"),
|
|
7171
|
+
reminders: ["Verify staged set is intact after pre-commit hooks."]
|
|
7172
|
+
};
|
|
7173
|
+
}
|
|
7161
7174
|
const stagedResult = await gitDiffCachedNames(ctx.root);
|
|
7162
7175
|
if (!stagedResult.ok || stagedResult.data.length === 0) {
|
|
7163
7176
|
const headResult = await gitHead(ctx.root);
|
|
@@ -7182,7 +7195,10 @@ var init_finalize = __esm({
|
|
|
7182
7195
|
const baselineUntracked = ctx.state.git.baseline?.untrackedPaths ?? [];
|
|
7183
7196
|
let overlapOverridden = false;
|
|
7184
7197
|
if (baselineUntracked.length > 0) {
|
|
7185
|
-
const
|
|
7198
|
+
const sessionTicketPath = ctx.state.ticket?.id ? `.story/tickets/${ctx.state.ticket.id}.json` : null;
|
|
7199
|
+
const overlap = stagedResult.data.filter(
|
|
7200
|
+
(f) => baselineUntracked.includes(f) && f !== sessionTicketPath
|
|
7201
|
+
);
|
|
7186
7202
|
if (overlap.length > 0) {
|
|
7187
7203
|
if (report.overrideOverlap) {
|
|
7188
7204
|
overlapOverridden = true;
|
|
@@ -7231,7 +7247,10 @@ var init_finalize = __esm({
|
|
|
7231
7247
|
if (checkpoint !== "staged_override") {
|
|
7232
7248
|
const baselineUntracked = ctx.state.git.baseline?.untrackedPaths ?? [];
|
|
7233
7249
|
if (baselineUntracked.length > 0) {
|
|
7234
|
-
const
|
|
7250
|
+
const sessionTicketPath = ctx.state.ticket?.id ? `.story/tickets/${ctx.state.ticket.id}.json` : null;
|
|
7251
|
+
const overlap = stagedResult.data.filter(
|
|
7252
|
+
(f) => baselineUntracked.includes(f) && f !== sessionTicketPath
|
|
7253
|
+
);
|
|
7235
7254
|
if (overlap.length > 0) {
|
|
7236
7255
|
ctx.writeState({ finalizeCheckpoint: null });
|
|
7237
7256
|
return { action: "retry", instruction: `Pre-commit hooks staged pre-existing untracked files: ${overlap.join(", ")}. Unstage them and re-stage, then call with completedAction: "files_staged".` };
|
|
@@ -10239,7 +10258,7 @@ var init_mcp = __esm({
|
|
|
10239
10258
|
init_init();
|
|
10240
10259
|
ENV_VAR2 = "CLAUDESTORY_PROJECT_ROOT";
|
|
10241
10260
|
CONFIG_PATH2 = ".story/config.json";
|
|
10242
|
-
version = "0.1.
|
|
10261
|
+
version = "0.1.32";
|
|
10243
10262
|
main().catch((err) => {
|
|
10244
10263
|
process.stderr.write(`Fatal: ${err instanceof Error ? err.message : String(err)}
|
|
10245
10264
|
`);
|
|
@@ -10733,6 +10752,12 @@ var init_reference = __esm({
|
|
|
10733
10752
|
{ name: "claudestory_issue_create", description: "Create issue", params: ["title", "severity", "impact", "components?", "relatedTickets?", "location?", "phase?"] },
|
|
10734
10753
|
{ name: "claudestory_issue_update", description: "Update issue", params: ["id", "status?", "title?", "severity?", "impact?", "resolution?", "components?", "relatedTickets?", "location?", "order?", "phase?"] },
|
|
10735
10754
|
{ name: "claudestory_phase_create", description: "Create phase in roadmap", params: ["id", "name", "label", "description", "summary?", "after?", "atStart?"] },
|
|
10755
|
+
{ name: "claudestory_lesson_list", description: "List lessons", params: ["status?", "tag?", "source?"] },
|
|
10756
|
+
{ name: "claudestory_lesson_get", description: "Get lesson by ID", params: ["id"] },
|
|
10757
|
+
{ name: "claudestory_lesson_digest", description: "Ranked digest of active lessons for context loading" },
|
|
10758
|
+
{ name: "claudestory_lesson_create", description: "Create lesson", params: ["title", "content", "context", "source", "tags?", "supersedes?"] },
|
|
10759
|
+
{ name: "claudestory_lesson_update", description: "Update lesson", params: ["id", "title?", "content?", "context?", "tags?", "status?", "supersedes?"] },
|
|
10760
|
+
{ name: "claudestory_lesson_reinforce", description: "Reinforce lesson \u2014 increment count and update lastValidated", params: ["id"] },
|
|
10736
10761
|
{ name: "claudestory_selftest", description: "Integration smoke test \u2014 create/update/delete cycle" }
|
|
10737
10762
|
];
|
|
10738
10763
|
}
|
|
@@ -13517,7 +13542,7 @@ async function runCli() {
|
|
|
13517
13542
|
registerConfigCommand: registerConfigCommand2,
|
|
13518
13543
|
registerSessionCommand: registerSessionCommand2
|
|
13519
13544
|
} = await Promise.resolve().then(() => (init_register(), register_exports));
|
|
13520
|
-
const version2 = "0.1.
|
|
13545
|
+
const version2 = "0.1.32";
|
|
13521
13546
|
class HandledError extends Error {
|
|
13522
13547
|
constructor() {
|
|
13523
13548
|
super("HANDLED_ERROR");
|
package/dist/mcp.js
CHANGED
|
@@ -6678,6 +6678,19 @@ var FinalizeStage = class {
|
|
|
6678
6678
|
};
|
|
6679
6679
|
}
|
|
6680
6680
|
async handleStage(ctx, report) {
|
|
6681
|
+
const checkpoint = ctx.state.finalizeCheckpoint;
|
|
6682
|
+
if (checkpoint === "staged" || checkpoint === "staged_override") {
|
|
6683
|
+
return {
|
|
6684
|
+
action: "retry",
|
|
6685
|
+
instruction: [
|
|
6686
|
+
"Files staged. Now run pre-commit checks.",
|
|
6687
|
+
"",
|
|
6688
|
+
'Run any pre-commit hooks or linting, then call me with completedAction: "precommit_passed".',
|
|
6689
|
+
'If pre-commit fails, fix the issues, re-stage, and call me with completedAction: "files_staged" again.'
|
|
6690
|
+
].join("\n"),
|
|
6691
|
+
reminders: ["Verify staged set is intact after pre-commit hooks."]
|
|
6692
|
+
};
|
|
6693
|
+
}
|
|
6681
6694
|
const stagedResult = await gitDiffCachedNames(ctx.root);
|
|
6682
6695
|
if (!stagedResult.ok || stagedResult.data.length === 0) {
|
|
6683
6696
|
const headResult = await gitHead(ctx.root);
|
|
@@ -6702,7 +6715,10 @@ var FinalizeStage = class {
|
|
|
6702
6715
|
const baselineUntracked = ctx.state.git.baseline?.untrackedPaths ?? [];
|
|
6703
6716
|
let overlapOverridden = false;
|
|
6704
6717
|
if (baselineUntracked.length > 0) {
|
|
6705
|
-
const
|
|
6718
|
+
const sessionTicketPath = ctx.state.ticket?.id ? `.story/tickets/${ctx.state.ticket.id}.json` : null;
|
|
6719
|
+
const overlap = stagedResult.data.filter(
|
|
6720
|
+
(f) => baselineUntracked.includes(f) && f !== sessionTicketPath
|
|
6721
|
+
);
|
|
6706
6722
|
if (overlap.length > 0) {
|
|
6707
6723
|
if (report.overrideOverlap) {
|
|
6708
6724
|
overlapOverridden = true;
|
|
@@ -6751,7 +6767,10 @@ var FinalizeStage = class {
|
|
|
6751
6767
|
if (checkpoint !== "staged_override") {
|
|
6752
6768
|
const baselineUntracked = ctx.state.git.baseline?.untrackedPaths ?? [];
|
|
6753
6769
|
if (baselineUntracked.length > 0) {
|
|
6754
|
-
const
|
|
6770
|
+
const sessionTicketPath = ctx.state.ticket?.id ? `.story/tickets/${ctx.state.ticket.id}.json` : null;
|
|
6771
|
+
const overlap = stagedResult.data.filter(
|
|
6772
|
+
(f) => baselineUntracked.includes(f) && f !== sessionTicketPath
|
|
6773
|
+
);
|
|
6755
6774
|
if (overlap.length > 0) {
|
|
6756
6775
|
ctx.writeState({ finalizeCheckpoint: null });
|
|
6757
6776
|
return { action: "retry", instruction: `Pre-commit hooks staged pre-existing untracked files: ${overlap.join(", ")}. Unstage them and re-stage, then call with completedAction: "files_staged".` };
|
|
@@ -9395,7 +9414,7 @@ async function ensureGitignoreEntries(gitignorePath, entries) {
|
|
|
9395
9414
|
// src/mcp/index.ts
|
|
9396
9415
|
var ENV_VAR2 = "CLAUDESTORY_PROJECT_ROOT";
|
|
9397
9416
|
var CONFIG_PATH2 = ".story/config.json";
|
|
9398
|
-
var version = "0.1.
|
|
9417
|
+
var version = "0.1.32";
|
|
9399
9418
|
function tryDiscoverRoot() {
|
|
9400
9419
|
const envRoot = process.env[ENV_VAR2];
|
|
9401
9420
|
if (envRoot) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anthropologies/claudestory",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.32",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "Cross-session context persistence for AI coding projects. Tracks tickets, issues, roadmap, and handovers so every session builds on the last.",
|
|
6
6
|
"keywords": [
|
package/src/skill/SKILL.md
CHANGED
|
@@ -232,6 +232,14 @@ Then ask: **"What would you like to work on?"**
|
|
|
232
232
|
|
|
233
233
|
Before writing a handover at the end of a session, run `claudestory snapshot` first. This ensures the next session's recap can show what changed. If `setup-skill` has been run, a PreCompact hook auto-takes snapshots before context compaction.
|
|
234
234
|
|
|
235
|
+
**Lessons** capture non-obvious process learnings that should carry forward across sessions. At the end of a significant session, review what you learned and create lessons via `claudestory_lesson_create` for:
|
|
236
|
+
- Patterns that worked (or failed) and why
|
|
237
|
+
- Architecture decisions with non-obvious rationale
|
|
238
|
+
- Tool/framework quirks discovered during implementation
|
|
239
|
+
- Process improvements (review workflows, testing strategies)
|
|
240
|
+
|
|
241
|
+
Don't duplicate what's already in the handover — lessons are structured, tagged, and ranked. Handovers are narrative. Use `claudestory_lesson_digest` to check existing lessons before creating duplicates. Use `claudestory_lesson_reinforce` when an existing lesson proves true again.
|
|
242
|
+
|
|
235
243
|
## Ticket and Issue Discipline
|
|
236
244
|
|
|
237
245
|
**Tickets** are planned work — features, tasks, refactors. They represent intentional, scoped commitments.
|
package/src/skill/reference.md
CHANGED
|
@@ -320,6 +320,12 @@ claudestory setup-skill
|
|
|
320
320
|
- **claudestory_issue_create** (title, severity, impact, components?, relatedTickets?, location?, phase?) — Create issue
|
|
321
321
|
- **claudestory_issue_update** (id, status?, title?, severity?, impact?, resolution?, components?, relatedTickets?, location?, order?, phase?) — Update issue
|
|
322
322
|
- **claudestory_phase_create** (id, name, label, description, summary?, after?, atStart?) — Create phase in roadmap
|
|
323
|
+
- **claudestory_lesson_list** (status?, tag?, source?) — List lessons
|
|
324
|
+
- **claudestory_lesson_get** (id) — Get lesson by ID
|
|
325
|
+
- **claudestory_lesson_digest** — Ranked digest of active lessons for context loading
|
|
326
|
+
- **claudestory_lesson_create** (title, content, context, source, tags?, supersedes?) — Create lesson
|
|
327
|
+
- **claudestory_lesson_update** (id, title?, content?, context?, tags?, status?, supersedes?) — Update lesson
|
|
328
|
+
- **claudestory_lesson_reinforce** (id) — Reinforce lesson — increment count and update lastValidated
|
|
323
329
|
- **claudestory_selftest** — Integration smoke test — create/update/delete cycle
|
|
324
330
|
|
|
325
331
|
## Common Workflows
|