scrumrun 1.5.2 → 2.0.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/CHANGELOG.md +42 -0
- package/CORE.md +224 -311
- package/DECISIONS.md +95 -11
- package/LICENSE +21 -0
- package/MIGRATION-1-to-2.md +109 -0
- package/README.md +137 -78
- package/SPEC.md +248 -257
- package/bin/claude-install.js +18 -132
- package/bin/scrumrun.js +1259 -174
- package/docs/COMMANDS.md +69 -0
- package/docs/ENTITY-MODEL.md +38 -0
- package/docs/RELEASE.md +44 -0
- package/docs/SCHEMA.md +80 -0
- package/docs/SEMANTIC-MEMORY.md +68 -0
- package/docs/TROUBLESHOOTING.md +66 -0
- package/lib/code-intel/adapter.js +20 -0
- package/lib/code-intel/javascript.js +199 -0
- package/lib/code-intel/learning.js +66 -0
- package/lib/code-intel/scanner.js +126 -0
- package/lib/commands/manifest.js +109 -0
- package/lib/commands/render.js +75 -0
- package/lib/memory/index.js +600 -0
- package/lib/memory/markdown.js +51 -0
- package/lib/memory/service.js +300 -0
- package/lib/runtime/budgets.js +19 -0
- package/lib/runtime/context.js +141 -0
- package/lib/runtime/orchestrator.js +270 -0
- package/lib/runtime/request-engine.js +128 -0
- package/lib/security/secrets.js +23 -0
- package/lib/v2/artifacts.js +343 -0
- package/lib/v2/conformance.js +167 -0
- package/lib/v2/migration.js +1161 -0
- package/lib/v2/project-store.js +44 -0
- package/lib/v2/schema.js +128 -0
- package/package.json +16 -6
- package/scripts/generate-contract-docs.js +113 -0
- package/templates/project/.scrumrun/config.md +4 -7
- package/templates/project/.scrumrun/guardrails.md +23 -0
- package/templates/project/.scrumrun/map.md +4 -16
- package/templates/project/.scrumrun/memory/decisions/.gitkeep +1 -0
- package/templates/project/.scrumrun/memory/dossiers/.gitkeep +1 -0
- package/templates/project/.scrumrun/memory/insights/.gitkeep +1 -0
- package/templates/project/.scrumrun/memory/knowledge/.gitkeep +1 -0
- package/templates/project/.scrumrun/method.json +4 -0
- package/templates/project/.scrumrun/project.md +6 -12
- package/templates/project/.scrumrun/runs/.gitkeep +1 -0
- package/templates/project/.scrumrun/sprints/.gitkeep +1 -0
- package/templates/project/.scrumrun/state.md +21 -0
- package/templates/project/.scrumrun/tasks/.gitkeep +1 -0
- package/templates/project/AGENTS.md +16 -49
- package/templates/project-lean/AGENTS.md +18 -0
- package/templates/shared/skills/scrumrun/SKILL.md +201 -0
- package/templates/codex/prompts/sc-agent.md +0 -14
- package/templates/codex/prompts/sc-backlog.md +0 -13
- package/templates/codex/prompts/sc-challenge.md +0 -57
- package/templates/codex/prompts/sc-config.md +0 -18
- package/templates/codex/prompts/sc-context.md +0 -24
- package/templates/codex/prompts/sc-decisions.md +0 -8
- package/templates/codex/prompts/sc-feature.md +0 -16
- package/templates/codex/prompts/sc-fix.md +0 -21
- package/templates/codex/prompts/sc-goal.md +0 -14
- package/templates/codex/prompts/sc-golden.md +0 -14
- package/templates/codex/prompts/sc-help.md +0 -12
- package/templates/codex/prompts/sc-init.md +0 -14
- package/templates/codex/prompts/sc-intake.md +0 -22
- package/templates/codex/prompts/sc-know.md +0 -75
- package/templates/codex/prompts/sc-map.md +0 -13
- package/templates/codex/prompts/sc-review.md +0 -13
- package/templates/codex/prompts/sc-sprint.md +0 -28
- package/templates/codex/prompts/sc-study.md +0 -23
- package/templates/codex/prompts/sc-uninstall.md +0 -14
- package/templates/codex/prompts/sc-update.md +0 -8
- package/templates/codex/prompts/sc-vault.md +0 -27
- package/templates/codex/skills/scrumrun/SKILL.md +0 -412
- package/templates/opencode/commands/sc-agent.md +0 -14
- package/templates/opencode/commands/sc-backlog.md +0 -13
- package/templates/opencode/commands/sc-challenge.md +0 -57
- package/templates/opencode/commands/sc-config.md +0 -18
- package/templates/opencode/commands/sc-context.md +0 -24
- package/templates/opencode/commands/sc-decisions.md +0 -8
- package/templates/opencode/commands/sc-feature.md +0 -16
- package/templates/opencode/commands/sc-fix.md +0 -21
- package/templates/opencode/commands/sc-goal.md +0 -14
- package/templates/opencode/commands/sc-golden.md +0 -14
- package/templates/opencode/commands/sc-help.md +0 -12
- package/templates/opencode/commands/sc-init.md +0 -14
- package/templates/opencode/commands/sc-intake.md +0 -22
- package/templates/opencode/commands/sc-know.md +0 -75
- package/templates/opencode/commands/sc-map.md +0 -13
- package/templates/opencode/commands/sc-review.md +0 -13
- package/templates/opencode/commands/sc-sprint.md +0 -28
- package/templates/opencode/commands/sc-study.md +0 -23
- package/templates/opencode/commands/sc-uninstall.md +0 -14
- package/templates/opencode/commands/sc-update.md +0 -8
- package/templates/opencode/commands/sc-vault.md +0 -27
- package/templates/opencode/skills/scrumrun/SKILL.md +0 -412
- package/templates/project/.scrumrun/agents.md +0 -36
- package/templates/project/.scrumrun/backlog.md +0 -7
- package/templates/project/.scrumrun/context.md +0 -61
- package/templates/project/.scrumrun/goals/main/decisions.md +0 -9
- package/templates/project/.scrumrun/goals/main/history.md +0 -51
- package/templates/project/.scrumrun/goals/main/sprint.md +0 -54
- package/templates/project/.scrumrun/golden-rules.md +0 -9
- package/templates/project/.scrumrun/knowledge.md +0 -15
- package/templates/project/.scrumrun/runbook.md +0 -101
- package/templates/project/.scrumrun/token-policy.md +0 -43
package/bin/claude-install.js
CHANGED
|
@@ -1,147 +1,33 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
2
3
|
|
|
3
|
-
const
|
|
4
|
-
const path = require("path");
|
|
5
|
-
const os = require("os");
|
|
4
|
+
const { spawnSync } = require("node:child_process");
|
|
5
|
+
const path = require("node:path");
|
|
6
6
|
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
const COMMANDS = [
|
|
11
|
-
"sc-help",
|
|
12
|
-
"sc-study",
|
|
13
|
-
"sc-init",
|
|
14
|
-
"sc-uninstall",
|
|
15
|
-
"sc-update",
|
|
16
|
-
"sc-vault",
|
|
17
|
-
"sc-know",
|
|
18
|
-
"sc-config",
|
|
19
|
-
"sc-golden",
|
|
20
|
-
"sc-map",
|
|
21
|
-
"sc-challenge",
|
|
22
|
-
"sc-goal",
|
|
23
|
-
"sc-backlog",
|
|
24
|
-
"sc-feature",
|
|
25
|
-
"sc-sprint",
|
|
26
|
-
"sc-fix",
|
|
27
|
-
"sc-agent",
|
|
28
|
-
"sc-review",
|
|
29
|
-
"sc-decisions"
|
|
30
|
-
];
|
|
7
|
+
const scrumrun = path.join(__dirname, "scrumrun.js");
|
|
8
|
+
const args = process.argv.slice(2);
|
|
9
|
+
const command = args[0];
|
|
31
10
|
|
|
32
|
-
|
|
11
|
+
if (!command || command === "--help" || command === "-h") {
|
|
33
12
|
console.log(`ScrumRun for Claude Code
|
|
34
13
|
|
|
35
14
|
Usage:
|
|
36
15
|
sr-claude install [--force]
|
|
37
16
|
sr-claude update
|
|
38
|
-
sr-claude doctor
|
|
17
|
+
sr-claude doctor [--compat]
|
|
39
18
|
|
|
40
|
-
|
|
41
|
-
npx --package=scrumrun@latest sr-claude install
|
|
42
|
-
npx --package=scrumrun@latest sr-claude update
|
|
43
|
-
npx --package=scrumrun@latest sr-claude doctor
|
|
19
|
+
This compatibility binary delegates to the manifest-driven ScrumRun CLI.
|
|
44
20
|
`);
|
|
21
|
+
process.exit(0);
|
|
45
22
|
}
|
|
46
23
|
|
|
47
|
-
|
|
48
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function copyFile(src, dest, { force = true, vars = {} } = {}) {
|
|
52
|
-
if (fs.existsSync(dest) && !force) {
|
|
53
|
-
return { status: "skipped", dest };
|
|
54
|
-
}
|
|
55
|
-
ensureDir(path.dirname(dest));
|
|
56
|
-
let content = fs.readFileSync(src, "utf8");
|
|
57
|
-
for (const [key, value] of Object.entries(vars)) {
|
|
58
|
-
content = content.split(`{{${key}}}`).join(value);
|
|
59
|
-
}
|
|
60
|
-
fs.writeFileSync(dest, content);
|
|
61
|
-
return { status: "written", dest };
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function copyDir(srcDir, destDir, options = {}) {
|
|
65
|
-
const results = [];
|
|
66
|
-
for (const entry of fs.readdirSync(srcDir, { withFileTypes: true })) {
|
|
67
|
-
const src = path.join(srcDir, entry.name);
|
|
68
|
-
const dest = path.join(destDir, entry.name);
|
|
69
|
-
if (entry.isDirectory()) {
|
|
70
|
-
results.push(...copyDir(src, dest, options));
|
|
71
|
-
} else {
|
|
72
|
-
results.push(copyFile(src, dest, options));
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
return results;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function printResults(title, results) {
|
|
79
|
-
console.log(`\n${title}`);
|
|
80
|
-
for (const result of results) {
|
|
81
|
-
const prefix = result.status === "skipped" ? "skip" : "write";
|
|
82
|
-
console.log(` ${prefix} ${result.dest}`);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
function cleanupLegacy(commandsDir, skillsDir) {
|
|
87
|
-
if (fs.existsSync(commandsDir)) {
|
|
88
|
-
for (const entry of fs.readdirSync(commandsDir, { withFileTypes: true })) {
|
|
89
|
-
if (!entry.isFile()) continue;
|
|
90
|
-
const name = entry.name;
|
|
91
|
-
const legacyPrefix = name.startsWith("srun-") || name.startsWith("asm-") || name.startsWith("sr-") || name.startsWith("scr-") || name.startsWith("src-") || name.startsWith("run-");
|
|
92
|
-
const oldConsolidated = /^scr-[a-z]+-[a-z]+\.md$/.test(name);
|
|
93
|
-
if (legacyPrefix || oldConsolidated) {
|
|
94
|
-
fs.rmSync(path.join(commandsDir, name), { force: true });
|
|
95
|
-
console.log(` rm legacy ${path.join(commandsDir, name)}`);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
const oldSkill = path.join(skillsDir, "ai-scrum");
|
|
100
|
-
if (fs.existsSync(oldSkill)) {
|
|
101
|
-
fs.rmSync(oldSkill, { recursive: true, force: true });
|
|
102
|
-
console.log(` rm legacy ${oldSkill}`);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function install(force) {
|
|
107
|
-
const home = os.homedir();
|
|
108
|
-
const commandsDir = path.join(home, ".claude", "commands");
|
|
109
|
-
cleanupLegacy(commandsDir, path.join(home, ".claude", "skills"));
|
|
110
|
-
const results = [
|
|
111
|
-
...copyDir(path.join(templates, "codex", "prompts"), commandsDir, { force }),
|
|
112
|
-
...copyDir(path.join(templates, "codex", "skills"), path.join(home, ".claude", "skills"), { force })
|
|
113
|
-
];
|
|
114
|
-
printResults("Claude ScrumRun installed", results);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
function doctor() {
|
|
118
|
-
const home = os.homedir();
|
|
119
|
-
const checks = COMMANDS.map((command) => [
|
|
120
|
-
command,
|
|
121
|
-
path.join(home, ".claude", "commands", `${command}.md`)
|
|
122
|
-
]);
|
|
123
|
-
checks.push(["scrumrun skill", path.join(home, ".claude", "skills", "scrumrun", "SKILL.md")]);
|
|
124
|
-
|
|
125
|
-
let ok = true;
|
|
126
|
-
for (const [label, file] of checks) {
|
|
127
|
-
const exists = fs.existsSync(file);
|
|
128
|
-
ok = ok && exists;
|
|
129
|
-
console.log(`${exists ? "ok " : "miss"} ${label}`);
|
|
130
|
-
}
|
|
131
|
-
process.exitCode = ok ? 0 : 1;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
const args = process.argv.slice(2);
|
|
135
|
-
const command = args[0];
|
|
136
|
-
|
|
137
|
-
if (!command || command === "--help" || command === "-h") {
|
|
138
|
-
usage();
|
|
139
|
-
} else if (command === "install" || command === "update") {
|
|
140
|
-
install(true);
|
|
141
|
-
} else if (command === "doctor") {
|
|
142
|
-
doctor();
|
|
143
|
-
} else {
|
|
24
|
+
if (!["install", "update", "doctor"].includes(command)) {
|
|
144
25
|
console.error(`Unknown command: ${command}`);
|
|
145
|
-
|
|
146
|
-
process.exitCode = 1;
|
|
26
|
+
process.exit(1);
|
|
147
27
|
}
|
|
28
|
+
|
|
29
|
+
const result = spawnSync(process.execPath, [scrumrun, "claude", command, ...args.slice(1)], {
|
|
30
|
+
stdio: "inherit"
|
|
31
|
+
});
|
|
32
|
+
if (result.error) throw result.error;
|
|
33
|
+
process.exitCode = result.status === null ? 1 : result.status;
|