@anthropologies/claudestory 0.1.54 → 0.1.56
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 +1 -1
- package/dist/cli.js +38 -6
- package/dist/mcp.js +37 -5
- package/package.json +3 -3
- package/src/skill/SKILL.md +19 -5
- package/src/skill/autonomous-mode.md +13 -1
- package/src/skill/setup-flow.md +2 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# claudestory
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An agentic development framework. Track tickets, issues, and progress for your project in a `.story/` directory that AI tools read and write natively.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
package/dist/cli.js
CHANGED
|
@@ -8358,7 +8358,7 @@ function getInstalledVersion() {
|
|
|
8358
8358
|
}
|
|
8359
8359
|
}
|
|
8360
8360
|
function getRunningVersion() {
|
|
8361
|
-
return "0.1.
|
|
8361
|
+
return "0.1.56";
|
|
8362
8362
|
}
|
|
8363
8363
|
var init_version_check = __esm({
|
|
8364
8364
|
"src/autonomous/version-check.ts"() {
|
|
@@ -8965,7 +8965,7 @@ ${ticket.description}` : "",
|
|
|
8965
8965
|
"# Autonomous Session Started",
|
|
8966
8966
|
"",
|
|
8967
8967
|
`You are now in autonomous mode. ${sessionDesc}${checkpointDesc}`,
|
|
8968
|
-
"Do NOT stop to summarize. Do NOT ask the user. Pick a ticket or issue and start working immediately.",
|
|
8968
|
+
"Do NOT stop to summarize. Do NOT ask the user. Do NOT cancel for context management \u2014 compaction is automatic. Pick a ticket or issue and start working immediately.",
|
|
8969
8969
|
"",
|
|
8970
8970
|
"## Ticket Candidates",
|
|
8971
8971
|
"",
|
|
@@ -8992,6 +8992,7 @@ ${ticket.description}` : "",
|
|
|
8992
8992
|
"Do NOT ask the user for confirmation or approval.",
|
|
8993
8993
|
"Do NOT stop or summarize between tickets \u2014 call autonomous_guide IMMEDIATELY.",
|
|
8994
8994
|
"You are in autonomous mode \u2014 continue working until done.",
|
|
8995
|
+
"NEVER cancel due to context size. Claude Story's hooks compact context automatically and preserve all session state.",
|
|
8995
8996
|
...versionWarning ? [`**Warning:** ${versionWarning}`] : []
|
|
8996
8997
|
],
|
|
8997
8998
|
transitionedFrom: "INIT"
|
|
@@ -9315,7 +9316,8 @@ ${driftPreamble}Recovered to state: **${mapping.state}**. Continue from here.`,
|
|
|
9315
9316
|
reminders: [
|
|
9316
9317
|
"Do NOT stop or summarize. Pick the next ticket IMMEDIATELY.",
|
|
9317
9318
|
"Do NOT ask the user for confirmation.",
|
|
9318
|
-
"You are in autonomous mode \u2014 continue working."
|
|
9319
|
+
"You are in autonomous mode \u2014 continue working.",
|
|
9320
|
+
"Context compacted successfully \u2014 all session state preserved. Continue working."
|
|
9319
9321
|
]
|
|
9320
9322
|
});
|
|
9321
9323
|
}
|
|
@@ -9417,6 +9419,30 @@ async function handleCancel(root, args) {
|
|
|
9417
9419
|
if (info.state.state === "SESSION_END" || info.state.status === "completed") {
|
|
9418
9420
|
return guideError(new Error("Session already ended."));
|
|
9419
9421
|
}
|
|
9422
|
+
const isAutoMode = info.state.mode === "auto" || !info.state.mode;
|
|
9423
|
+
const hasTicketsRemaining = info.state.config.maxTicketsPerSession === 0 || info.state.completedTickets.length < info.state.config.maxTicketsPerSession;
|
|
9424
|
+
const isWorkingState = !["SESSION_END", "HANDOVER", "COMPACT"].includes(info.state.state);
|
|
9425
|
+
if (isAutoMode && hasTicketsRemaining && isWorkingState) {
|
|
9426
|
+
return {
|
|
9427
|
+
content: [{
|
|
9428
|
+
type: "text",
|
|
9429
|
+
text: [
|
|
9430
|
+
"# Cancel Rejected \u2014 Session Still Active",
|
|
9431
|
+
"",
|
|
9432
|
+
`You have completed ${info.state.completedTickets.length} ticket(s) with more work remaining.`,
|
|
9433
|
+
"Do NOT cancel an autonomous session due to context size.",
|
|
9434
|
+
"If you need to manage context, Claude Code handles compaction automatically.",
|
|
9435
|
+
"",
|
|
9436
|
+
"Continue working by calling `claudestory_autonomous_guide` with:",
|
|
9437
|
+
"```json",
|
|
9438
|
+
`{ "sessionId": "${info.state.sessionId}", "action": "report", "report": { "completedAction": "ticket_picked", "ticketId": "T-XXX" } }`,
|
|
9439
|
+
"```",
|
|
9440
|
+
"",
|
|
9441
|
+
"To force-cancel (admin only), run: `claudestory session stop`"
|
|
9442
|
+
].join("\n")
|
|
9443
|
+
}]
|
|
9444
|
+
};
|
|
9445
|
+
}
|
|
9420
9446
|
await recoverPendingMutation(info.dir, info.state, root);
|
|
9421
9447
|
const cancelInfo = findSessionById(root, args.sessionId) ?? info;
|
|
9422
9448
|
let ticketReleased = false;
|
|
@@ -9483,12 +9509,18 @@ function guideResult(state, currentState, opts) {
|
|
|
9483
9509
|
contextPressure: state.contextPressure?.level ?? "low",
|
|
9484
9510
|
branch: state.git?.branch ?? null
|
|
9485
9511
|
};
|
|
9512
|
+
const allReminders = [...opts.reminders ?? []];
|
|
9513
|
+
if ((state.mode === "auto" || !state.mode) && currentState !== "SESSION_END") {
|
|
9514
|
+
allReminders.push(
|
|
9515
|
+
"NEVER cancel this session due to context size. Compaction is automatic \u2014 Claude Story preserves all session state across compactions via hooks."
|
|
9516
|
+
);
|
|
9517
|
+
}
|
|
9486
9518
|
const output = {
|
|
9487
9519
|
sessionId: state.sessionId,
|
|
9488
9520
|
state: currentState,
|
|
9489
9521
|
transitionedFrom: opts.transitionedFrom,
|
|
9490
9522
|
instruction: opts.instruction,
|
|
9491
|
-
reminders:
|
|
9523
|
+
reminders: allReminders,
|
|
9492
9524
|
contextAdvice: "ok",
|
|
9493
9525
|
sessionSummary: summary
|
|
9494
9526
|
};
|
|
@@ -10923,7 +10955,7 @@ var init_mcp = __esm({
|
|
|
10923
10955
|
init_init();
|
|
10924
10956
|
ENV_VAR2 = "CLAUDESTORY_PROJECT_ROOT";
|
|
10925
10957
|
CONFIG_PATH2 = ".story/config.json";
|
|
10926
|
-
version = "0.1.
|
|
10958
|
+
version = "0.1.56";
|
|
10927
10959
|
main().catch((err) => {
|
|
10928
10960
|
process.stderr.write(`Fatal: ${err instanceof Error ? err.message : String(err)}
|
|
10929
10961
|
`);
|
|
@@ -14354,7 +14386,7 @@ async function runCli() {
|
|
|
14354
14386
|
registerSessionCommand: registerSessionCommand2,
|
|
14355
14387
|
registerRepairCommand: registerRepairCommand2
|
|
14356
14388
|
} = await Promise.resolve().then(() => (init_register(), register_exports));
|
|
14357
|
-
const version2 = "0.1.
|
|
14389
|
+
const version2 = "0.1.56";
|
|
14358
14390
|
class HandledError extends Error {
|
|
14359
14391
|
constructor() {
|
|
14360
14392
|
super("HANDLED_ERROR");
|
package/dist/mcp.js
CHANGED
|
@@ -7816,7 +7816,7 @@ function getInstalledVersion() {
|
|
|
7816
7816
|
}
|
|
7817
7817
|
}
|
|
7818
7818
|
function getRunningVersion() {
|
|
7819
|
-
return "0.1.
|
|
7819
|
+
return "0.1.56";
|
|
7820
7820
|
}
|
|
7821
7821
|
|
|
7822
7822
|
// src/autonomous/guide.ts
|
|
@@ -8439,7 +8439,7 @@ ${ticket.description}` : "",
|
|
|
8439
8439
|
"# Autonomous Session Started",
|
|
8440
8440
|
"",
|
|
8441
8441
|
`You are now in autonomous mode. ${sessionDesc}${checkpointDesc}`,
|
|
8442
|
-
"Do NOT stop to summarize. Do NOT ask the user. Pick a ticket or issue and start working immediately.",
|
|
8442
|
+
"Do NOT stop to summarize. Do NOT ask the user. Do NOT cancel for context management \u2014 compaction is automatic. Pick a ticket or issue and start working immediately.",
|
|
8443
8443
|
"",
|
|
8444
8444
|
"## Ticket Candidates",
|
|
8445
8445
|
"",
|
|
@@ -8466,6 +8466,7 @@ ${ticket.description}` : "",
|
|
|
8466
8466
|
"Do NOT ask the user for confirmation or approval.",
|
|
8467
8467
|
"Do NOT stop or summarize between tickets \u2014 call autonomous_guide IMMEDIATELY.",
|
|
8468
8468
|
"You are in autonomous mode \u2014 continue working until done.",
|
|
8469
|
+
"NEVER cancel due to context size. Claude Story's hooks compact context automatically and preserve all session state.",
|
|
8469
8470
|
...versionWarning ? [`**Warning:** ${versionWarning}`] : []
|
|
8470
8471
|
],
|
|
8471
8472
|
transitionedFrom: "INIT"
|
|
@@ -8790,7 +8791,8 @@ ${driftPreamble}Recovered to state: **${mapping.state}**. Continue from here.`,
|
|
|
8790
8791
|
reminders: [
|
|
8791
8792
|
"Do NOT stop or summarize. Pick the next ticket IMMEDIATELY.",
|
|
8792
8793
|
"Do NOT ask the user for confirmation.",
|
|
8793
|
-
"You are in autonomous mode \u2014 continue working."
|
|
8794
|
+
"You are in autonomous mode \u2014 continue working.",
|
|
8795
|
+
"Context compacted successfully \u2014 all session state preserved. Continue working."
|
|
8794
8796
|
]
|
|
8795
8797
|
});
|
|
8796
8798
|
}
|
|
@@ -8892,6 +8894,30 @@ async function handleCancel(root, args) {
|
|
|
8892
8894
|
if (info.state.state === "SESSION_END" || info.state.status === "completed") {
|
|
8893
8895
|
return guideError(new Error("Session already ended."));
|
|
8894
8896
|
}
|
|
8897
|
+
const isAutoMode = info.state.mode === "auto" || !info.state.mode;
|
|
8898
|
+
const hasTicketsRemaining = info.state.config.maxTicketsPerSession === 0 || info.state.completedTickets.length < info.state.config.maxTicketsPerSession;
|
|
8899
|
+
const isWorkingState = !["SESSION_END", "HANDOVER", "COMPACT"].includes(info.state.state);
|
|
8900
|
+
if (isAutoMode && hasTicketsRemaining && isWorkingState) {
|
|
8901
|
+
return {
|
|
8902
|
+
content: [{
|
|
8903
|
+
type: "text",
|
|
8904
|
+
text: [
|
|
8905
|
+
"# Cancel Rejected \u2014 Session Still Active",
|
|
8906
|
+
"",
|
|
8907
|
+
`You have completed ${info.state.completedTickets.length} ticket(s) with more work remaining.`,
|
|
8908
|
+
"Do NOT cancel an autonomous session due to context size.",
|
|
8909
|
+
"If you need to manage context, Claude Code handles compaction automatically.",
|
|
8910
|
+
"",
|
|
8911
|
+
"Continue working by calling `claudestory_autonomous_guide` with:",
|
|
8912
|
+
"```json",
|
|
8913
|
+
`{ "sessionId": "${info.state.sessionId}", "action": "report", "report": { "completedAction": "ticket_picked", "ticketId": "T-XXX" } }`,
|
|
8914
|
+
"```",
|
|
8915
|
+
"",
|
|
8916
|
+
"To force-cancel (admin only), run: `claudestory session stop`"
|
|
8917
|
+
].join("\n")
|
|
8918
|
+
}]
|
|
8919
|
+
};
|
|
8920
|
+
}
|
|
8895
8921
|
await recoverPendingMutation(info.dir, info.state, root);
|
|
8896
8922
|
const cancelInfo = findSessionById(root, args.sessionId) ?? info;
|
|
8897
8923
|
let ticketReleased = false;
|
|
@@ -8958,12 +8984,18 @@ function guideResult(state, currentState, opts) {
|
|
|
8958
8984
|
contextPressure: state.contextPressure?.level ?? "low",
|
|
8959
8985
|
branch: state.git?.branch ?? null
|
|
8960
8986
|
};
|
|
8987
|
+
const allReminders = [...opts.reminders ?? []];
|
|
8988
|
+
if ((state.mode === "auto" || !state.mode) && currentState !== "SESSION_END") {
|
|
8989
|
+
allReminders.push(
|
|
8990
|
+
"NEVER cancel this session due to context size. Compaction is automatic \u2014 Claude Story preserves all session state across compactions via hooks."
|
|
8991
|
+
);
|
|
8992
|
+
}
|
|
8961
8993
|
const output = {
|
|
8962
8994
|
sessionId: state.sessionId,
|
|
8963
8995
|
state: currentState,
|
|
8964
8996
|
transitionedFrom: opts.transitionedFrom,
|
|
8965
8997
|
instruction: opts.instruction,
|
|
8966
|
-
reminders:
|
|
8998
|
+
reminders: allReminders,
|
|
8967
8999
|
contextAdvice: "ok",
|
|
8968
9000
|
sessionSummary: summary
|
|
8969
9001
|
};
|
|
@@ -10055,7 +10087,7 @@ async function ensureGitignoreEntries(gitignorePath, entries) {
|
|
|
10055
10087
|
// src/mcp/index.ts
|
|
10056
10088
|
var ENV_VAR2 = "CLAUDESTORY_PROJECT_ROOT";
|
|
10057
10089
|
var CONFIG_PATH2 = ".story/config.json";
|
|
10058
|
-
var version = "0.1.
|
|
10090
|
+
var version = "0.1.56";
|
|
10059
10091
|
function tryDiscoverRoot() {
|
|
10060
10092
|
const envRoot = process.env[ENV_VAR2];
|
|
10061
10093
|
if (envRoot) {
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anthropologies/claudestory",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"license": "
|
|
5
|
-
"description": "
|
|
3
|
+
"version": "0.1.56",
|
|
4
|
+
"license": "PolyForm-Noncommercial-1.0.0",
|
|
5
|
+
"description": "An agentic development framework. Track tickets, issues, and progress for your project so every session builds on the last.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"claudestory",
|
|
8
8
|
"claude-code",
|
package/src/skill/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: story
|
|
3
|
-
description:
|
|
3
|
+
description: Track tickets, issues, and progress for your project. Load project context, manage sessions, guide setup.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# /story -- Project Context & Session Management
|
|
@@ -272,6 +272,8 @@ options:
|
|
|
272
272
|
- "None" -- skip automated review
|
|
273
273
|
```
|
|
274
274
|
|
|
275
|
+
Note: this sets the top-level `reviewBackends`. If the config has per-stage overrides in `stages.PLAN_REVIEW.backends` or `stages.CODE_REVIEW.backends`, those take precedence. When displaying settings, check for per-stage overrides and show them if present.
|
|
276
|
+
|
|
275
277
|
**Handover frequency:**
|
|
276
278
|
```
|
|
277
279
|
AskUserQuestion: "Write a handover after every N tickets?"
|
|
@@ -284,15 +286,27 @@ options: "Every ticket", "Every 3 tickets (default)", "Every 5 tickets", "Manual
|
|
|
284
286
|
claudestory config set-overrides --json '<constructed JSON>'
|
|
285
287
|
```
|
|
286
288
|
|
|
287
|
-
|
|
289
|
+
**IMPORTANT:** The `--json` argument takes only the `recipeOverrides` object, NOT the full config. Top-level fields (version, project, type, language) are NOT settable via this command.
|
|
290
|
+
```
|
|
291
|
+
# Correct:
|
|
292
|
+
claudestory config set-overrides --json '{"maxTicketsPerSession": 10}'
|
|
293
|
+
|
|
294
|
+
# Correct (stages):
|
|
295
|
+
claudestory config set-overrides --json '{"stages": {"VERIFY": {"enabled": true}}}'
|
|
296
|
+
|
|
297
|
+
# WRONG -- do not include top-level fields:
|
|
298
|
+
claudestory config set-overrides --json '{"version": 2, "project": "foo"}'
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
Show a confirmation of what changed, then ask if the user wants to change anything else or is done. If done, return to normal session.
|
|
288
302
|
|
|
289
303
|
### Config Schema Reference
|
|
290
304
|
|
|
291
|
-
Do NOT search source code for this. The schema is
|
|
305
|
+
Do NOT search source code for this. The full config.json schema is shown below. Only the `recipeOverrides` section is settable via `config set-overrides`.
|
|
292
306
|
|
|
293
307
|
```json
|
|
294
308
|
{
|
|
295
|
-
"version":
|
|
309
|
+
"version": 2,
|
|
296
310
|
"schemaVersion": 1,
|
|
297
311
|
"project": "string",
|
|
298
312
|
"type": "string (npm, cargo, pip, etc.)",
|
|
@@ -305,7 +319,7 @@ Do NOT search source code for this. The schema is:
|
|
|
305
319
|
"recipeOverrides": {
|
|
306
320
|
"maxTicketsPerSession": "number (0 = unlimited, default: 5)",
|
|
307
321
|
"compactThreshold": "string (high/medium/low, default: high)",
|
|
308
|
-
"reviewBackends": ["codex", "agent"],
|
|
322
|
+
"reviewBackends": ["codex", "agent"],
|
|
309
323
|
"handoverInterval": "number (default: 3)",
|
|
310
324
|
"stages": {
|
|
311
325
|
"WRITE_TESTS": {
|
|
@@ -21,9 +21,21 @@ This file is referenced from SKILL.md for `/story auto`, `/story review`, `/stor
|
|
|
21
21
|
- Follow the guide's instructions exactly -- it specifies which tools to call, what parameters to use
|
|
22
22
|
- After each step completes, call `claudestory_autonomous_guide` with `action: "report"` and the results
|
|
23
23
|
|
|
24
|
+
**Recommended setup for long sessions:**
|
|
25
|
+
|
|
26
|
+
Run Claude Code with: `claude --model claude-opus-4-6 --dangerously-skip-permissions`
|
|
27
|
+
|
|
28
|
+
- **Skip-permissions** enables unattended execution -- no approval prompts consuming context
|
|
29
|
+
- **Claude Story handles compaction automatically** -- context preserved across compactions, do not cancel because context feels large
|
|
30
|
+
- Use only in **trusted repositories** -- skip-permissions disables safety prompts for all tool use
|
|
31
|
+
|
|
24
32
|
**If the guide says to compact:** Call `claudestory_autonomous_guide` with `action: "pre_compact"`, then run `/compact`, then call with `action: "resume"`.
|
|
25
33
|
|
|
26
|
-
**If something goes wrong:**
|
|
34
|
+
**If something goes wrong:**
|
|
35
|
+
- Context feels large -- do nothing, compaction is automatic via hooks
|
|
36
|
+
- Compaction happened -- call with `action: "resume"` to continue
|
|
37
|
+
- Session stuck after compact -- run `claudestory session clear-compact` in terminal, then `action: "resume"`
|
|
38
|
+
- Unrecoverable error -- run `claudestory session stop` in terminal (admin escape hatch)
|
|
27
39
|
|
|
28
40
|
## Tiered Access -- Review, Plan, Guided Modes
|
|
29
41
|
|
package/src/skill/setup-flow.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
This file is referenced from SKILL.md when no `.story/` directory exists but project indicators are present. SKILL.md has already determined that setup is needed before routing here.
|
|
4
4
|
|
|
5
|
+
**Skill command name:** When this file references `/story` in user-facing output, use the actual command that invoked you (e.g., `/story` for standalone install, `/story:go` for plugin install). Same for `/story auto` -- use `/story:go auto` if invoked as a plugin.
|
|
6
|
+
|
|
5
7
|
**If arriving from Step 2b (scaffold detection):** The project already has an empty `.story/` scaffold but no tickets. Skip 1a and start at **1b. Existing Project -- Analyze**.
|
|
6
8
|
|
|
7
9
|
## Design Rules
|