scrumrun 1.5.2 → 2.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/CHANGELOG.md +64 -0
- package/CORE.md +231 -308
- package/DECISIONS.md +151 -11
- package/LICENSE +21 -0
- package/MIGRATION-1-to-2.md +120 -0
- package/README.md +147 -78
- package/SPEC.md +259 -251
- package/bin/claude-install.js +18 -132
- package/bin/scrumrun.js +1367 -174
- package/docs/COMMANDS.md +71 -0
- package/docs/ENTITY-MODEL.md +38 -0
- package/docs/RELEASE-SCORECARD.md +43 -0
- package/docs/RELEASE.md +51 -0
- package/docs/SCHEMA.md +89 -0
- package/docs/SEMANTIC-MEMORY.md +68 -0
- package/docs/TROUBLESHOOTING.md +78 -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 +118 -0
- package/lib/commands/render.js +78 -0
- package/lib/memory/index.js +659 -0
- package/lib/memory/markdown.js +51 -0
- package/lib/memory/service.js +300 -0
- package/lib/runtime/budgets.js +23 -0
- package/lib/runtime/canonical-snapshot.js +110 -0
- package/lib/runtime/context.js +101 -0
- package/lib/runtime/orchestrator.js +303 -0
- package/lib/runtime/policy-engine.js +184 -0
- package/lib/runtime/request-engine.js +132 -0
- package/lib/runtime/run-ledger.js +324 -0
- package/lib/security/secrets.js +23 -0
- package/lib/v2/artifacts.js +363 -0
- package/lib/v2/conformance.js +214 -0
- package/lib/v2/migration.js +1221 -0
- package/lib/v2/project-store.js +44 -0
- package/lib/v2/run-ledger-migration.js +240 -0
- package/lib/v2/schema.js +148 -0
- package/lib/v2/transaction.js +254 -0
- package/package.json +16 -6
- package/scripts/generate-contract-docs.js +124 -0
- package/templates/project/.scrumrun/config.md +4 -7
- package/templates/project/.scrumrun/guardrails.md +31 -0
- package/templates/project/.scrumrun/map.md +5 -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 +7 -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 +14 -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 +211 -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/README.md
CHANGED
|
@@ -1,138 +1,207 @@
|
|
|
1
1
|
# ScrumRun
|
|
2
2
|
|
|
3
|
-
> A
|
|
4
|
-
> Sprints, decisions, invariants, history — auditable and portable across agents.
|
|
3
|
+
> A simple, fast, evidence-driven Agile runtime for AI coding agents.
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
ScrumRun gives an agent a small command surface and a precise project memory: what should be done, how each attempt happened, which decisions constrain the code, and why the architecture exists in its current form.
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
**Package:** `2.1.0` · **Method target:** `2.0.0` · **Runtime:** Node.js `>=22.13.0` · **License:** MIT
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
## The model
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
```text
|
|
12
|
+
Feature = why the initiative matters
|
|
13
|
+
Task = what atomic work must be done
|
|
14
|
+
Sprint = when Tasks are grouped as a timebox/batch
|
|
15
|
+
Run = how one concrete attempt happened
|
|
16
|
+
Memory = what the project learned and why
|
|
17
|
+
```
|
|
13
18
|
|
|
14
|
-
```
|
|
15
|
-
|
|
19
|
+
```text
|
|
20
|
+
FEAT-003
|
|
21
|
+
└── TASK-018
|
|
22
|
+
├── executed_by → RUN-044
|
|
23
|
+
├── included_in → SPRINT-012
|
|
24
|
+
├── constrained_by → DEC-018
|
|
25
|
+
└── generated → INS-041
|
|
16
26
|
```
|
|
17
27
|
|
|
18
|
-
|
|
28
|
+
A Task does not need a Sprint. A retry creates a new Run. A fix is a Task with `type: fix`; backlog is a view of backlog Tasks.
|
|
19
29
|
|
|
20
|
-
|
|
30
|
+
See [`docs/SCHEMA.md`](docs/SCHEMA.md) for the generated executable contract and [`docs/ENTITY-MODEL.md`](docs/ENTITY-MODEL.md) for the conceptual guide.
|
|
21
31
|
|
|
22
|
-
|
|
32
|
+
## Install
|
|
23
33
|
|
|
24
34
|
```bash
|
|
25
|
-
npx scrumrun@latest
|
|
35
|
+
npx scrumrun@latest install
|
|
36
|
+
npx scrumrun@latest init
|
|
26
37
|
```
|
|
27
38
|
|
|
28
|
-
|
|
39
|
+
`install` adds the client integration; `init` creates the project tree. Initialization is local by default: `.scrumrun/` and the generated agent hint are added to `.git/info/exclude`. Use `--shared` when the team wants to commit the project memory.
|
|
29
40
|
|
|
30
|
-
|
|
41
|
+
ScrumRun installs one canonical agent command:
|
|
31
42
|
|
|
32
|
-
```
|
|
33
|
-
|
|
43
|
+
```text
|
|
44
|
+
/sc <noun> <subject> <action> [args]
|
|
34
45
|
```
|
|
35
46
|
|
|
36
|
-
|
|
47
|
+
The five nouns are `plan`, `knowledge`, `rules`, `review`, and `config`.
|
|
37
48
|
|
|
38
|
-
##
|
|
49
|
+
## Daily flow
|
|
39
50
|
|
|
40
|
-
|
|
51
|
+
Natural language is the normal entry point:
|
|
41
52
|
|
|
53
|
+
```text
|
|
54
|
+
Move calculateFinalPrice to checkout.
|
|
55
|
+
Fix duplicate charges after refresh.
|
|
56
|
+
Study why pricing depends on TaxCalculator.
|
|
42
57
|
```
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
58
|
+
|
|
59
|
+
ScrumRun runs a read-only pipeline before asking for approval:
|
|
60
|
+
|
|
61
|
+
```text
|
|
62
|
+
RECEIVED → CONTEXTUALIZING → POLICY → RISK → CLASSIFICATION
|
|
63
|
+
→ PLANNING → AWAITING_APPROVAL
|
|
47
64
|
```
|
|
48
65
|
|
|
49
|
-
|
|
66
|
+
Explicit approval atomically creates a Task and a Run. Execution then follows:
|
|
50
67
|
|
|
51
|
-
|
|
68
|
+
```text
|
|
69
|
+
EXECUTING → VALIDATING → LEARNING → COMPLETED | FAILED | BLOCKED
|
|
70
|
+
```
|
|
52
71
|
|
|
53
|
-
|
|
72
|
+
Nothing canonical is persisted before approval. Failed retries remain available as separate Runs.
|
|
54
73
|
|
|
55
|
-
|
|
74
|
+
Each Run contains a machine-validated event ledger. Events have stable ids such as `RUN-044-EVT-003`, RFC3339 timestamps, actors, reasons, and typed evidence for commands, tests, files, reviews, decisions, insights, and risks. Run is the only operational history; Task keeps its approved scope and synchronized current status without duplicating those events. Completion is rejected when validation or learning evidence is missing.
|
|
56
75
|
|
|
57
|
-
|
|
76
|
+
Linked Task/Run writes use a durable ignored transaction journal. Captured failures roll back immediately; interrupted operations are recovered byte-exactly on retry or through explicit `doctor --recover`. Read-only audit reports pending recovery and never repairs state silently.
|
|
58
77
|
|
|
59
|
-
|
|
60
|
-
- **Main goal** — the primary plan, its sprints, decisions, and history.
|
|
61
|
-
- **Feature lanes** — isolated planning that does not pollute the main goal.
|
|
78
|
+
## Semantic project memory
|
|
62
79
|
|
|
63
|
-
|
|
80
|
+
Canonical memory is human-readable Markdown:
|
|
64
81
|
|
|
65
|
-
|
|
82
|
+
- `K-NNN` — reviewed facts;
|
|
83
|
+
- `DEC-NNN` — normative decisions;
|
|
84
|
+
- `INS-NNN` — contextual rationale, constraints, warnings, and trade-offs;
|
|
85
|
+
- `DOS-NNN` — curated topic/module dossiers.
|
|
66
86
|
|
|
67
|
-
|
|
87
|
+
The agent can answer questions such as:
|
|
68
88
|
|
|
69
|
-
|
|
89
|
+
- Why is this function in this module?
|
|
90
|
+
- Which Decision constrains it?
|
|
91
|
+
- Who depends on it?
|
|
92
|
+
- Which test protects it?
|
|
93
|
+
- What is likely to break if it changes?
|
|
70
94
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
95
|
+
AI extraction creates candidates only. Confirmation requires resolvable evidence. Stale and invalidated memory is labeled; rejected/deprecated/invalidated records are excluded from active truth by default.
|
|
96
|
+
|
|
97
|
+
The fast graph/search layer is `.scrumrun/.cache/semantic-index.sqlite`. It is ignored and disposable: deleting it never deletes knowledge. Unchanged queries use a metadata-only freshness check; metadata drift falls back to complete content fingerprints before rebuilding. Cache-schema upgrades force one safe disposable rebuild. The current JavaScript/TypeScript adapter derives qualified symbols plus `defined_in`, `depends_on`, `used_by`, and `protected_by` relations.
|
|
98
|
+
|
|
99
|
+
`map.md` is shown only when its source fingerprint matches the current semantic index. A fresh placeholder or stale map is rejected with an explicit rebuild instruction instead of being presented as project truth.
|
|
100
|
+
|
|
101
|
+
## Migrating an ongoing v1 project
|
|
102
|
+
|
|
103
|
+
Update the client integrations and automatically run a read-only migration preflight:
|
|
78
104
|
|
|
79
|
-
|
|
105
|
+
```bash
|
|
106
|
+
npx scrumrun@latest update
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
This shows the source inventory, proposed mappings, and blockers without changing project data. Apply only the verified plan with:
|
|
80
110
|
|
|
111
|
+
```bash
|
|
112
|
+
npx scrumrun@latest update --migrate
|
|
81
113
|
```
|
|
82
|
-
|
|
83
|
-
|
|
114
|
+
|
|
115
|
+
The standalone workflow remains available:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
npx scrumrun@latest migrate --to 2 --dry-run
|
|
119
|
+
npx scrumrun@latest migrate --to 2 --apply
|
|
120
|
+
npx scrumrun@latest migrate --to 2 --rollback
|
|
84
121
|
```
|
|
85
122
|
|
|
86
|
-
|
|
123
|
+
Migration uses content hashes, a byte-exact ignored backup, staging validation, an atomic directory switch, a source-to-destination report, idempotent replay, and rollback protection. It also recognizes incomplete hybrid v1/v2 trees, reuses already-linked canonical work, and normalizes only deterministic schema aliases. Early v2 Run prose is preflighted and upgraded to the structured ledger by the same explicit `update --migrate` gate; ambiguous paths become evidenced snapshots instead of invented transitions. Legacy-only files leave the active tree but remain byte-exact in the ignored backup; vault contents remain local. Ambiguous history remains an explicit warning, and the migrator never invents a Sprint or Run.
|
|
87
124
|
|
|
88
|
-
|
|
125
|
+
After migration or an integration update, verify both installed assets and project state:
|
|
89
126
|
|
|
90
|
-
|
|
127
|
+
```bash
|
|
128
|
+
npx scrumrun@latest doctor codex --strict
|
|
129
|
+
```
|
|
91
130
|
|
|
92
|
-
|
|
131
|
+
`doctor` compares managed prompt/skill contents with the package, so an obsolete installation is reported as `stale` rather than `ok` merely because the file exists.
|
|
132
|
+
|
|
133
|
+
## Canonical tree
|
|
134
|
+
|
|
135
|
+
```text
|
|
136
|
+
.scrumrun/
|
|
137
|
+
core.md
|
|
138
|
+
guardrails.md
|
|
139
|
+
config.md
|
|
140
|
+
project.md
|
|
141
|
+
method.json
|
|
142
|
+
state.md # generated
|
|
143
|
+
map.md # generated
|
|
144
|
+
features/FEAT-NNN.md
|
|
145
|
+
tasks/TASK-NNN.md
|
|
146
|
+
sprints/SPRINT-NNN.md
|
|
147
|
+
runs/RUN-NNN.md
|
|
148
|
+
reviews/REV-NNN.md
|
|
149
|
+
memory/
|
|
150
|
+
knowledge/K-NNN.md
|
|
151
|
+
decisions/DEC-NNN.md
|
|
152
|
+
insights/INS-NNN.md
|
|
153
|
+
dossiers/DOS-NNN.md
|
|
154
|
+
.cache/semantic-index.sqlite # generated, ignored
|
|
155
|
+
vault.local.md # optional, ignored, never indexed
|
|
156
|
+
```
|
|
93
157
|
|
|
94
|
-
|
|
95
|
-
|---|---|---|---|
|
|
96
|
-
| Claude Code | ✓ | ✓ | ✓ |
|
|
97
|
-
| Codex | ✓ | — | ✓ |
|
|
98
|
-
| OpenCode | ✓ | — | ✓ |
|
|
99
|
-
| Any markdown-capable agent | — | — | ✓ |
|
|
158
|
+
`guardrails.md` is canonical project policy. Active `GR-NNN` rules are evaluated into explicit `passed`, `blocked`, or `deferred` results; blocks identify the exact Guardrail and deferred checks stay visible for their execution-time gate. `config.md` contains preferences and cannot weaken policy. Duplicate/unknown Guardrails, disabled approval, and unsafe read-only paths fail conformance. `state.md`, `map.md`, context packages, and SQLite are generated navigation aids, never authority. `state.md` carries the same source fingerprint used by intake, an RFC3339 generation time, and a watch fingerprint for fast verified staleness checks.
|
|
100
159
|
|
|
101
|
-
|
|
160
|
+
## Useful commands
|
|
102
161
|
|
|
103
|
-
|
|
162
|
+
```bash
|
|
163
|
+
# inspect the grammar
|
|
164
|
+
npx scrumrun@latest commands
|
|
104
165
|
|
|
105
|
-
|
|
166
|
+
# plan without writes, then approve the emitted token
|
|
167
|
+
npx scrumrun@latest sc plan intake "Fix pricing rounding"
|
|
168
|
+
npx scrumrun@latest sc plan intake --approve <token>
|
|
106
169
|
|
|
107
|
-
|
|
170
|
+
# verify canonical policy and all twenty executable invariants
|
|
171
|
+
npx scrumrun@latest sc review artifact --run
|
|
108
172
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
173
|
+
# memory lifecycle
|
|
174
|
+
npx scrumrun@latest sc knowledge insight --propose "Pricing stays in backend" --evidence src/pricing.ts
|
|
175
|
+
npx scrumrun@latest sc knowledge insight --confirm INS-001
|
|
176
|
+
npx scrumrun@latest sc knowledge study calculateFinalPrice
|
|
112
177
|
|
|
113
|
-
|
|
178
|
+
# rebuild or inspect the derived graph
|
|
179
|
+
npx scrumrun@latest sc knowledge map --build
|
|
180
|
+
npx scrumrun@latest sc knowledge map --show
|
|
181
|
+
```
|
|
114
182
|
|
|
115
|
-
|
|
183
|
+
The command manifest in `lib/commands/manifest.js` generates help and compatibility adapters, preventing client grammar drift.
|
|
116
184
|
|
|
117
|
-
##
|
|
185
|
+
## Documentation
|
|
118
186
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
-
|
|
125
|
-
-
|
|
126
|
-
- 🚧 Portability matrix + conformance test suite
|
|
127
|
-
- 🚧 Landing page at [`scrumrun.dev`](https://scrumrun.dev)
|
|
187
|
+
| File | Purpose |
|
|
188
|
+
|---|---|
|
|
189
|
+
| [`CORE.md`](./CORE.md) | Operational runtime guide for agents. |
|
|
190
|
+
| [`SPEC.md`](./SPEC.md) | Normative 2.0 state machines, invariants, and conformance rules. |
|
|
191
|
+
| [`DECISIONS.md`](./DECISIONS.md) | Architectural decisions and trade-offs. |
|
|
192
|
+
| `MIGRATION-1-to-2.md` | Upgrade, verification, rollback, and recovery guide. |
|
|
193
|
+
| [`docs/RELEASE-SCORECARD.md`](docs/RELEASE-SCORECARD.md) | Evidence-backed local readiness scores and residual release risks. |
|
|
128
194
|
|
|
129
|
-
|
|
195
|
+
ScrumRun remains client-independent: any agent that reads Markdown can follow `CORE.md`; Codex, Claude Code, and OpenCode integrations are accelerators.
|
|
130
196
|
|
|
131
|
-
##
|
|
197
|
+
## Development
|
|
132
198
|
|
|
133
|
-
|
|
199
|
+
```bash
|
|
200
|
+
npm test
|
|
201
|
+
npm pack --dry-run
|
|
202
|
+
```
|
|
134
203
|
|
|
135
|
-
|
|
204
|
+
The release gates cover artifact/state conformance, read-only intake, migration failure recovery, semantic cache equivalence, code graph behavior, vault exclusion, and CLI compatibility.
|
|
136
205
|
|
|
137
206
|
## License
|
|
138
207
|
|