scrumrun 2.1.0 → 2.1.1
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 +23 -0
- package/CORE.md +6 -2
- package/MIGRATION-1-to-2.md +2 -2
- package/README.md +12 -4
- package/SPEC.md +5 -2
- package/bin/scrumrun.js +56 -0
- package/docs/COMMANDS.md +6 -2
- package/docs/RELEASE-SCORECARD.md +11 -11
- package/docs/RELEASE.md +7 -7
- package/docs/SCHEMA.md +3 -1
- package/docs/SEMANTIC-MEMORY.md +1 -1
- package/docs/TROUBLESHOOTING.md +1 -1
- package/lib/commands/manifest.js +4 -1
- package/lib/commands/render.js +1 -0
- package/lib/memory/index.js +135 -34
- package/lib/memory/service.js +3 -0
- package/lib/runtime/mutation-gateway.js +434 -0
- package/lib/runtime/orchestrator.js +35 -3
- package/lib/runtime/policy-engine.js +85 -2
- package/lib/runtime/request-engine.js +4 -0
- package/lib/runtime/review-service.js +92 -0
- package/lib/runtime/run-ledger.js +228 -6
- package/lib/runtime/workspace-state.js +146 -0
- package/lib/security/secrets.js +15 -1
- package/lib/v2/artifacts.js +3 -0
- package/lib/v2/conformance.js +20 -1
- package/lib/v2/migration.js +6 -2
- package/lib/v2/run-ledger-migration.js +30 -2
- package/lib/v2/schema.js +10 -3
- package/package.json +1 -1
- package/templates/project/.scrumrun/method.json +4 -1
- package/templates/project/AGENTS.md +2 -1
- package/templates/project-lean/AGENTS.md +3 -1
- package/templates/shared/skills/scrumrun/SKILL.md +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,29 @@ All notable changes follow Semantic Versioning.
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
### Security
|
|
8
|
+
|
|
9
|
+
- Added fail-closed, 15-minute, path-scoped Mutation Gateway permits with policy/workspace binding, before/after hashes, read-only and symlink checks, new-secret detection, and append-only Run evidence.
|
|
10
|
+
- Deferred Guardrails now become persisted Run obligations; unresolved obligations, policy drift, workspace bypass, and pending canonical transactions block completion.
|
|
11
|
+
- Fresh and explicitly migrated projects require structured `Status`, `Enforcement`, `Scope`, and `Rule` fields and advertise Guardrail, obligation, and Mutation Gateway schemas in `method.json`.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Project conformance now covers 21 executable invariants and detects active Run mutation bypasses.
|
|
16
|
+
|
|
17
|
+
## 2.1.1 - 2026-07-22
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- Semantic indexing now detects whether the current `node:sqlite` build provides FTS5 instead of assuming the optional module exists.
|
|
22
|
+
- Node.js 22.13 uses a deterministic, parameterized lexical fallback for artifact and code search while runtimes with FTS5 retain BM25 retrieval.
|
|
23
|
+
- Semantic cache schema 4 records the selected search backend and safely rebuilds an FTS5 cache when it is opened by a runtime without FTS5.
|
|
24
|
+
|
|
25
|
+
### Validation
|
|
26
|
+
|
|
27
|
+
- Added explicit automatic-backend and forced-fallback tests, including multi-token matching, code-symbol retrieval, cache metadata, and absence of FTS virtual tables.
|
|
28
|
+
- The complete 143-test suite passes in the exact `node:22.13.0` runtime that exposed the release regression.
|
|
29
|
+
|
|
7
30
|
## 2.1.0 - 2026-07-22
|
|
8
31
|
|
|
9
32
|
### Added
|
package/CORE.md
CHANGED
|
@@ -150,7 +150,7 @@ Intake must:
|
|
|
150
150
|
|
|
151
151
|
Policy evaluation is structured per active `GR-NNN`: `passed`, `blocked`, or `deferred`. A block must cite the exact Guardrail id and reason code. Deferred checks must be visible in the plan and re-evaluated at their named execution boundary; they are never silently counted as passed. Invalid/duplicate Guardrails or configuration that weakens approval block conformance and intake.
|
|
152
152
|
|
|
153
|
-
Before approval, do not create canonical files, update status, edit application code, or retain request content outside ignored disposable context cache. Ambiguous acknowledgement is not approval.
|
|
153
|
+
Before approval, do not create canonical files, update status, edit application code, or retain request content outside ignored disposable context cache. The approval token binds both canonical context and the workspace fingerprint; drift in either requires a new intake. Ambiguous acknowledgement is not approval.
|
|
154
154
|
|
|
155
155
|
## Execution lifecycle
|
|
156
156
|
|
|
@@ -174,6 +174,9 @@ Rules:
|
|
|
174
174
|
- validation, learning, completion, failure, block, and resume require a reason or evidence;
|
|
175
175
|
- validation must match the risk and acceptance criteria;
|
|
176
176
|
- configured reviews run before completion;
|
|
177
|
+
- every deferred policy result is persisted as a Run Guardrail obligation;
|
|
178
|
+
- before changing application/source files, issue a short-lived path-scoped mutation permit and record the verified before/after hashes in the Run;
|
|
179
|
+
- unrecorded workspace drift, policy drift, out-of-scope paths, unsafe symlinks, new secret-like content, or unresolved obligations block validation/completion;
|
|
177
180
|
- learning proposes memory candidates after validation and never auto-confirms AI inference;
|
|
178
181
|
- complete a Sprint only when all its included Tasks meet the Sprint exit gate;
|
|
179
182
|
- do not mark work complete merely because time or token budget ended.
|
|
@@ -248,7 +251,7 @@ Legacy sprint plan entries normally become Tasks. History attempts become Runs w
|
|
|
248
251
|
- `task --add|--list|--show|--run|--audit|--cancel|--retry`
|
|
249
252
|
- `sprint --add|--list|--show|--start|--complete|--block`
|
|
250
253
|
- `feature --add|--list|--show|--activate|--complete`
|
|
251
|
-
- `run --list|--show|--validate|--learn|--complete|--resume|--fail|--block`
|
|
254
|
+
- `run --list|--show|--authorize-mutation|--record-mutation|--satisfy-guardrail|--validate|--learn|--complete|--resume|--fail|--block`
|
|
252
255
|
- `intake <request>`
|
|
253
256
|
- `challenge <question>`
|
|
254
257
|
|
|
@@ -293,6 +296,7 @@ Review is read-only unless fixes are separately authorized. Report findings by s
|
|
|
293
296
|
- No execution without explicit valid approval.
|
|
294
297
|
- Guardrails cannot be bypassed; they may only be superseded/retired with history.
|
|
295
298
|
- Active Guardrails produce explicit passed/blocked/deferred evaluations; blocks cite stable ids and deferred checks remain visible until their execution gate.
|
|
299
|
+
- Material mutations require path-scoped permits and append-only hash evidence; completion fails closed on policy/workspace drift or unresolved obligations.
|
|
296
300
|
- Task is atomic; Sprint is grouping; Run is an attempt.
|
|
297
301
|
- Retries preserve prior Runs.
|
|
298
302
|
- History is append-only.
|
package/MIGRATION-1-to-2.md
CHANGED
|
@@ -34,14 +34,14 @@ npx scrumrun@latest update --migrate
|
|
|
34
34
|
|
|
35
35
|
### Early v2 Run upgrade
|
|
36
36
|
|
|
37
|
-
Projects created by
|
|
37
|
+
Projects created by earlier 2.x builds may contain prose-based Run transitions or inferred Guardrail fields. The same ongoing-project commands detect this layout without writes and, after explicit `--migrate`, upgrade the Run ledger and security schemas:
|
|
38
38
|
|
|
39
39
|
```text
|
|
40
40
|
.scrumrun/.migration/run-ledger-v1/manifest.json
|
|
41
41
|
.scrumrun/.migration/run-ledger-v1/backup/runs/RUN-NNN.md
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
Every changed Run and `method.json` is hashed and backed up byte-exactly. Proven transition chains become ordered `RUN-NNN-EVT-NNN` events. When only the recorded status is provable, migration emits one evidenced `snapshot`; it does not invent the missing path. Replay is idempotent, an interrupted apply restores prepared sources, and rollback refuses when a
|
|
44
|
+
Every changed Run, `guardrails.md`, and `method.json` is hashed and backed up byte-exactly. Inferred legacy Guardrail fields become explicit without deleting the original prose. Proven transition chains become ordered `RUN-NNN-EVT-NNN` events. When only the recorded status is provable, migration emits one evidenced `snapshot`; it does not invent the missing path. Existing terminal Runs remain historical; new/retried Runs bind policy obligations and the Mutation Gateway. Replay is idempotent, an interrupted apply restores prepared sources, and rollback refuses when a changed artifact moved after migration.
|
|
45
45
|
|
|
46
46
|
## Standalone flow
|
|
47
47
|
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
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.
|
|
6
6
|
|
|
7
|
-
**Package:** `2.1.
|
|
7
|
+
**Package:** `2.1.1` · **Method target:** `2.0.0` · **Runtime:** Node.js `>=22.13.0` · **License:** MIT
|
|
8
8
|
|
|
9
9
|
## The model
|
|
10
10
|
|
|
@@ -94,7 +94,7 @@ The agent can answer questions such as:
|
|
|
94
94
|
|
|
95
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
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.
|
|
97
|
+
The fast graph/search layer is `.scrumrun/.cache/semantic-index.sqlite`. It is ignored and disposable: deleting it never deletes knowledge. The index selects FTS5/BM25 when the current Node.js SQLite build provides it and otherwise uses a deterministic, parameterized lexical fallback; both backends preserve bounded graph retrieval without changing canonical Markdown. 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
98
|
|
|
99
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
100
|
|
|
@@ -157,6 +157,8 @@ npx scrumrun@latest doctor codex --strict
|
|
|
157
157
|
|
|
158
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.
|
|
159
159
|
|
|
160
|
+
Approved Runs persist every deferred result as an append-only obligation and bind the exact policy plus workspace baseline. Material source edits use a 15-minute, path-scoped Mutation Gateway permit. Recording verifies before/after hashes, owner/read-only scope, symlinks, new secret-like content, and workspace drift. Validation and completion fail closed when edits bypass that chain or obligations remain unresolved.
|
|
161
|
+
|
|
160
162
|
## Useful commands
|
|
161
163
|
|
|
162
164
|
```bash
|
|
@@ -167,8 +169,14 @@ npx scrumrun@latest commands
|
|
|
167
169
|
npx scrumrun@latest sc plan intake "Fix pricing rounding"
|
|
168
170
|
npx scrumrun@latest sc plan intake --approve <token>
|
|
169
171
|
|
|
170
|
-
#
|
|
172
|
+
# authorize and record a material source mutation
|
|
173
|
+
npx scrumrun@latest sc plan run --authorize-mutation RUN-001 --path src/pricing.ts
|
|
174
|
+
npx scrumrun@latest sc plan run --record-mutation RUN-001 --permit MUT-... --note "Pricing change recorded"
|
|
175
|
+
|
|
176
|
+
# record an audit-derived Review, then resolve a persisted completion gate
|
|
171
177
|
npx scrumrun@latest sc review artifact --run
|
|
178
|
+
npx scrumrun@latest sc review artifact --record --task TASK-001 --run RUN-001 --evidence "npm test: passed"
|
|
179
|
+
npx scrumrun@latest sc plan run --satisfy-guardrail RUN-001 --guardrail GR-003 --review REV-001
|
|
172
180
|
|
|
173
181
|
# memory lifecycle
|
|
174
182
|
npx scrumrun@latest sc knowledge insight --propose "Pricing stays in backend" --evidence src/pricing.ts
|
|
@@ -180,7 +188,7 @@ npx scrumrun@latest sc knowledge map --build
|
|
|
180
188
|
npx scrumrun@latest sc knowledge map --show
|
|
181
189
|
```
|
|
182
190
|
|
|
183
|
-
The command manifest in `lib/commands/manifest.js` generates help and compatibility adapters, preventing client grammar drift.
|
|
191
|
+
The command manifest in `lib/commands/manifest.js` generates help and compatibility adapters, preventing client grammar drift. A recorded artifact Review cannot self-declare success: ScrumRun reruns the audit and derives the `REV-NNN` verdict from the result.
|
|
184
192
|
|
|
185
193
|
## Documentation
|
|
186
194
|
|
package/SPEC.md
CHANGED
|
@@ -196,10 +196,12 @@ RECEIVED
|
|
|
196
196
|
→ COMPLETED | FAILED | BLOCKED
|
|
197
197
|
```
|
|
198
198
|
|
|
199
|
-
Everything through `AWAITING_APPROVAL` is read-only. It may exist in process memory or ignored cache only. A valid approval token binds the normalized request, policy result, classification, risk, issuance time,
|
|
199
|
+
Everything through `AWAITING_APPROVAL` is read-only. It may exist in process memory or ignored cache only. A valid approval token binds the normalized request, policy result, classification, risk, issuance time, canonical context fingerprint, and complete workspace fingerprint. Canonical or source drift after planning invalidates approval.
|
|
200
200
|
|
|
201
201
|
Approval atomically creates one Task and its first Run. If either write fails, neither may remain. Project changes after planning invalidate the token. Reusing a successfully consumed token is idempotent.
|
|
202
202
|
|
|
203
|
+
The approved Run binds the exact Guardrail-policy fingerprint and a canonical workspace baseline. Every post-approval `deferred` check becomes an append-only Guardrail obligation. A material source mutation requires a short-lived, path-scoped permit issued from that baseline; recording it verifies before/after hashes, policy freshness, path scope, read-only boundaries, symlink safety, and newly introduced secret-like content. Unrecorded workspace drift fails closed. A Run cannot complete while an obligation is unresolved or the workspace differs from its last recorded mutation.
|
|
204
|
+
|
|
203
205
|
Run transitions synchronously update the linked Task and append exactly one structured event to the Run ledger. Validation, learning, completion, failure, block, and resume transitions require a reason or typed evidence. Task status changes without receiving a duplicate narrative history. Multi-file mutations use a durable local transaction journal: `prepared` operations roll back byte-exactly after failure/interruption, while `committed` journals are verified and finalized. Ordinary audit is read-only and reports pending recovery; `doctor --recover` or retrying the approved mutation performs recovery explicitly. Entering `learning` may extract structured candidates from the Run, but extraction failure never blocks Run progress.
|
|
204
206
|
|
|
205
207
|
## 6. Policy and precedence
|
|
@@ -303,6 +305,7 @@ Legacy sprint entries become Tasks. History entries become Runs only with an evi
|
|
|
303
305
|
- **I-18** Partial/interrupted writes, conflicting overwrites, unsafe paths, and symlink traversal fail or recover without corrupting canonical state or overwriting later owner work.
|
|
304
306
|
- **I-19** Code intelligence is derived, adapter-based, fingerprinted, and cannot silently confirm memory.
|
|
305
307
|
- **I-20** Post-validation learning proposes candidates and never blocks Task/Run completion.
|
|
308
|
+
- **I-21** Material mutations are policy-bound, path-scoped, hash-verified, append-only, and fail closed on bypass; unresolved Guardrail obligations block completion.
|
|
306
309
|
|
|
307
310
|
## 11. Command grammar
|
|
308
311
|
|
|
@@ -320,7 +323,7 @@ Unknown syntax fails deterministically and never guesses a mutation.
|
|
|
320
323
|
|
|
321
324
|
An implementation may claim ScrumRun method 2.0.0 only when it:
|
|
322
325
|
|
|
323
|
-
1. passes positive and negative tests for I-01 through I-
|
|
326
|
+
1. passes positive and negative tests for I-01 through I-21;
|
|
324
327
|
2. enforces every exposed state machine and schema;
|
|
325
328
|
3. proves read-only intake and dry-run migration through full-tree fingerprints;
|
|
326
329
|
4. proves migration failure recovery, rollback safety, and vault exclusion;
|
package/bin/scrumrun.js
CHANGED
|
@@ -20,6 +20,8 @@ const { aliases: COMMAND_ALIASES, resolveAlias, resolveRoute } = require(path.jo
|
|
|
20
20
|
const { renderCommandHelp, renderCompatibilityPrompt, renderRootPrompt } = require(path.join(root, "lib", "commands", "render"));
|
|
21
21
|
const { planRequest } = require(path.join(root, "lib", "runtime", "request-engine"));
|
|
22
22
|
const { approveRequest, refreshState, retryTask, transitionRun } = require(path.join(root, "lib", "runtime", "orchestrator"));
|
|
23
|
+
const { authorizeMutation, recordMutation, satisfyGuardrail } = require(path.join(root, "lib", "runtime", "mutation-gateway"));
|
|
24
|
+
const { recordArtifactReview } = require(path.join(root, "lib", "runtime", "review-service"));
|
|
23
25
|
const { createMemory, listMemory, showMemory, transitionMemory } = require(path.join(root, "lib", "memory", "service"));
|
|
24
26
|
const { indexPath, indexStatus, mapStatus, queryIndex, rebuildIndex, writeMap } = require(path.join(root, "lib", "memory", "index"));
|
|
25
27
|
const { auditProject } = require(path.join(root, "lib", "v2", "conformance"));
|
|
@@ -1236,6 +1238,19 @@ function runTransitionOptions(args) {
|
|
|
1236
1238
|
return { note: note || noteParts.join(" ").trim() || null, evidence, actor, occurredAt };
|
|
1237
1239
|
}
|
|
1238
1240
|
|
|
1241
|
+
function removeOptionPairs(args, names) {
|
|
1242
|
+
const hidden = new Set(names);
|
|
1243
|
+
const next = [];
|
|
1244
|
+
for (let index = 0; index < args.length; index++) {
|
|
1245
|
+
if (hidden.has(args[index])) {
|
|
1246
|
+
index++;
|
|
1247
|
+
continue;
|
|
1248
|
+
}
|
|
1249
|
+
next.push(args[index]);
|
|
1250
|
+
}
|
|
1251
|
+
return next;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1239
1254
|
function printMemoryArtifact(artifact) {
|
|
1240
1255
|
if (!artifact) return false;
|
|
1241
1256
|
console.log(readIfExists(artifact.file));
|
|
@@ -1373,6 +1388,33 @@ function executeRootRoute(route) {
|
|
|
1373
1388
|
return;
|
|
1374
1389
|
}
|
|
1375
1390
|
if (noun === "plan" && subject === "run") {
|
|
1391
|
+
if (routeArgs[0] === "--authorize-mutation") {
|
|
1392
|
+
const paths = optionValues(routeArgs.slice(2), "--path");
|
|
1393
|
+
const result = authorizeMutation(process.cwd(), routeArgs[1], paths);
|
|
1394
|
+
console.log(`Authorized ${result.permit} for ${result.run} until ${result.expiresAt}.`);
|
|
1395
|
+
console.log(`Paths: ${result.paths.join(", ")}`);
|
|
1396
|
+
return;
|
|
1397
|
+
}
|
|
1398
|
+
if (routeArgs[0] === "--record-mutation") {
|
|
1399
|
+
const permit = optionValue(routeArgs.slice(2), "--permit");
|
|
1400
|
+
if (!permit) throw new Error("--record-mutation requires --permit MUT-id.");
|
|
1401
|
+
const parsed = runTransitionOptions(removeOptionPairs(routeArgs, ["--permit"]));
|
|
1402
|
+
const result = recordMutation(process.cwd(), routeArgs[1], permit, parsed);
|
|
1403
|
+
refreshState(projectFile());
|
|
1404
|
+
console.log(`Recorded ${result.mutation} for ${result.run.id}: ${result.changes.length} verified change(s).`);
|
|
1405
|
+
return;
|
|
1406
|
+
}
|
|
1407
|
+
if (routeArgs[0] === "--satisfy-guardrail") {
|
|
1408
|
+
const guardrail = optionValue(routeArgs.slice(2), "--guardrail");
|
|
1409
|
+
if (!guardrail) throw new Error("--satisfy-guardrail requires --guardrail GR-NNN.");
|
|
1410
|
+
const migration = optionValues(routeArgs.slice(2), "--migration").map((ref) => ({ kind: "migration", ref }));
|
|
1411
|
+
const parsed = runTransitionOptions(removeOptionPairs(routeArgs, ["--guardrail", "--migration"]));
|
|
1412
|
+
parsed.evidence.push(...migration);
|
|
1413
|
+
const result = satisfyGuardrail(process.cwd(), routeArgs[1], guardrail, parsed);
|
|
1414
|
+
refreshState(projectFile());
|
|
1415
|
+
console.log(`${result.run.id}: ${result.guardrail} ${result.status}.`);
|
|
1416
|
+
return;
|
|
1417
|
+
}
|
|
1376
1418
|
const transitions = {
|
|
1377
1419
|
"--validate": "validating",
|
|
1378
1420
|
"--learn": "learning",
|
|
@@ -1403,6 +1445,20 @@ function executeRootRoute(route) {
|
|
|
1403
1445
|
if (!audit.passed) process.exitCode = 1;
|
|
1404
1446
|
return;
|
|
1405
1447
|
}
|
|
1448
|
+
if (noun === "review" && subject === "artifact" && routeArgs[0] === "--record") {
|
|
1449
|
+
const task = optionValue(routeArgs.slice(1), "--task");
|
|
1450
|
+
if (!task) throw new Error("--record requires --task TASK-NNN.");
|
|
1451
|
+
const result = recordArtifactReview(process.cwd(), {
|
|
1452
|
+
task,
|
|
1453
|
+
run: optionValue(routeArgs.slice(1), "--run"),
|
|
1454
|
+
title: optionValue(routeArgs.slice(1), "--title"),
|
|
1455
|
+
evidence: optionValues(routeArgs.slice(1), "--evidence")
|
|
1456
|
+
});
|
|
1457
|
+
refreshState(projectFile());
|
|
1458
|
+
console.log(`${result.review.record.id}: ${result.review.record.status}; ${result.audit.invariants} invariants; ${result.audit.findings.length} finding(s).`);
|
|
1459
|
+
if (!result.audit.passed) process.exitCode = 1;
|
|
1460
|
+
return;
|
|
1461
|
+
}
|
|
1406
1462
|
if (noun === "config" && subject === "migrate") return runMigration(routeArgs);
|
|
1407
1463
|
if (noun === "config" && subject === "doctor") {
|
|
1408
1464
|
const target = ["all", "codex", "opencode", "claude"].includes(routeArgs[0]) ? routeArgs[0] : "all";
|
package/docs/COMMANDS.md
CHANGED
|
@@ -17,10 +17,13 @@ Use `/sc` inside a supported AI client. The equivalent CLI form is `npx scrumrun
|
|
|
17
17
|
/sc plan sprint --add|--list|--show|--start|--complete|--block
|
|
18
18
|
/sc plan feature --add|--list|--show|--activate|--complete
|
|
19
19
|
/sc plan run --list|--show|--validate|--learn|--complete|--resume|--fail|--block [--note] [typed evidence flags]
|
|
20
|
+
/sc plan run --authorize-mutation RUN-NNN --path <relative-path> [--path ...]
|
|
21
|
+
/sc plan run --record-mutation RUN-NNN --permit MUT-id [--note] [--actor]
|
|
22
|
+
/sc plan run --satisfy-guardrail RUN-NNN --guardrail GR-NNN [typed evidence flags]
|
|
20
23
|
/sc plan challenge <question>
|
|
21
24
|
```
|
|
22
25
|
|
|
23
|
-
CLI-native: intake/approval, Task/Run list/show, Task retry, and Run transitions. A retry requires a failed, blocked, or partial Task and creates a new Run.
|
|
26
|
+
CLI-native: intake/approval, Task/Run list/show, Task retry, Mutation Gateway actions, Guardrail satisfaction, and Run transitions. A retry requires a failed, blocked, or partial Task and creates a new Run. Mutation permits expire after 15 minutes, authorize explicit relative paths only, and must be recorded immediately after the edit.
|
|
24
27
|
|
|
25
28
|
## Knowledge
|
|
26
29
|
|
|
@@ -46,11 +49,12 @@ Creation options include `--title`, `--content`, repeated `--evidence`, repeated
|
|
|
46
49
|
/sc rules reviewer --add|--list|--show|--run
|
|
47
50
|
/sc review code --run
|
|
48
51
|
/sc review artifact --run
|
|
52
|
+
/sc review artifact --record --task TASK-NNN [--run RUN-NNN] [--title "..."] [--evidence "..."]
|
|
49
53
|
/sc review migration --run
|
|
50
54
|
/sc review release --run
|
|
51
55
|
```
|
|
52
56
|
|
|
53
|
-
`review artifact --run` is
|
|
57
|
+
`review artifact --run` is read-only and returns a machine-readable 21-invariant project audit. `--record` reruns that audit and persists its exact pass/fail result as a canonical `REV-NNN`; supplied evidence is additive and cannot turn a failed audit into a pass. Other review routes require repository reasoning and remain read-only unless fixes receive separate approval.
|
|
54
58
|
|
|
55
59
|
## Config and lifecycle
|
|
56
60
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
# ScrumRun 2.1.
|
|
1
|
+
# ScrumRun 2.1.1 Local Release Scorecard
|
|
2
2
|
|
|
3
|
-
Date: 2026-07-22
|
|
4
|
-
Package: `2.1.
|
|
5
|
-
Method contract: `2.0.0`
|
|
6
|
-
Scope: local implementation and package readiness; external registry/tag/release verification remains owner-gated.
|
|
3
|
+
- Date: 2026-07-22
|
|
4
|
+
- Package: `2.1.1`
|
|
5
|
+
- Method contract: `2.0.0`
|
|
6
|
+
- Scope: local implementation and package readiness; external registry/tag/release verification remains owner-gated.
|
|
7
7
|
|
|
8
8
|
## Scoring rule
|
|
9
9
|
|
|
@@ -16,17 +16,17 @@ A score of 9.5 or higher requires a single documented contract, machine enforcem
|
|
|
16
16
|
| Artifact kernel | 9.7 | One executable schema, safe-path checks, lossless frontmatter transitions, conflict refusal, fsync atomic writes, and durable multi-file transactions with failure injection. |
|
|
17
17
|
| Run history and audit | 9.8 | Stable ordered event ids, RFC3339 timestamps, typed evidence, state reconstruction, completion gates, retry preservation, explicit early-v2 migration, and byte-exact rollback. |
|
|
18
18
|
| Real conformance | 9.7 | Twenty normative invariants point to executable tests; clean-project audit, malformed artifacts, secrets, symlinks, migration interruption, transaction interruption, and cache corruption are exercised. |
|
|
19
|
-
| Local state and retrieval | 9.
|
|
20
|
-
| Overall operation | 9.
|
|
19
|
+
| Local state and retrieval | 9.7 | Intake/state share one canonical fingerprint; state/map/SQLite expose staleness; metadata fast path falls back to full content hashes; cache schema mismatch rebuilds once; FTS5 capability is detected and a deterministic parameterized fallback preserves Node 22.13 retrieval. |
|
|
20
|
+
| Overall operation | 9.7 | Read-only intake, explicit approval, atomic Task/Run creation, Policy Engine ids, migration preflight/apply/rollback, package E2E, installed-asset doctor, exact Node 22.13 regression coverage, Node 22/24/26 CI definition, and release budgets. |
|
|
21
21
|
|
|
22
|
-
Minimum local score: **9.
|
|
22
|
+
Minimum local score: **9.7/10**.
|
|
23
23
|
|
|
24
24
|
## Release evidence
|
|
25
25
|
|
|
26
26
|
- Full suite: `npm test`.
|
|
27
27
|
- Performance suite: `npm run benchmark`.
|
|
28
28
|
- Contract drift: `scripts/generate-contract-docs.js --check` runs before tests.
|
|
29
|
-
- Project conformance: `/sc review artifact --run`, twenty invariants, zero findings at the release checkpoint.
|
|
29
|
+
- Project conformance: `/sc review artifact --run`, twenty-one invariants, zero findings at the release checkpoint.
|
|
30
30
|
- Installed integration: `doctor codex --strict`, exact prompt/skill hashes and zero project findings.
|
|
31
31
|
- Package boundary: `npm pack --dry-run --json`, explicit file inventory, no repository-local `.scrumrun/`, tests, vault, backup, migration state, or cache.
|
|
32
32
|
- Tarball E2E: install, v2 memory, ongoing v1 migration, rollback, doctor, and uninstall run from the packed package in the test suite.
|
|
@@ -35,9 +35,9 @@ The exact final tarball checksum belongs in the owner-gated release Review/Run a
|
|
|
35
35
|
|
|
36
36
|
## Residual risks and gates
|
|
37
37
|
|
|
38
|
-
- Registry smoke, npm dist-tags, `v2.1.
|
|
38
|
+
- Registry smoke, npm dist-tags, `v2.1.1` tag, push, and GitHub release are not proven by local tests and require explicit owner authorization.
|
|
39
39
|
- The built-in code-intelligence adapter currently covers JavaScript/TypeScript; other languages require replaceable adapters.
|
|
40
|
-
- Remote Node 22/24/26 CI must pass on the release commit
|
|
40
|
+
- Remote Node 22/24/26 CI must pass on the release commit; the exact Node 22.13 container passes locally but does not replace the external gate.
|
|
41
41
|
- Semantic retrieval is intentionally lexical/structural rather than a probabilistic embedding system; confirmed Markdown evidence remains the authority.
|
|
42
42
|
|
|
43
43
|
These are bounded release or extension risks, not hidden correctness claims. A failed external gate stops promotion and results in a new immutable SemVer; it never rewrites an existing npm version.
|
package/docs/RELEASE.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Publication is owner-gated. Tests, packaging, local commits, and release metadata preparation do not authorize npm publication, git push, tags, GitHub releases, or dist-tag changes.
|
|
4
4
|
|
|
5
|
-
The npm package/CLI follows SemVer independently from the ScrumRun method contract. For this release, package `2.1.
|
|
5
|
+
The npm package/CLI follows SemVer independently from the ScrumRun method contract. For this release, package `2.1.1` implements method `2.0.0`. Published packages `2.0.0` and `2.1.0` are immutable and must never be overwritten or reused.
|
|
6
6
|
|
|
7
7
|
## Local release gate
|
|
8
8
|
|
|
@@ -14,13 +14,13 @@ npm pack --dry-run
|
|
|
14
14
|
npx scrumrun@latest sc review artifact --run # in a clean v2 fixture/current package equivalent
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
Confirm package contents exclude repository-local `.scrumrun/` state, caches, migration records, backups, vaults, tests, and secrets. The `.scrumrun/` directory inside project templates is expected. Confirm package metadata, README, changelog, tarball filename, checksum, and Git tag agree on `2.1.
|
|
17
|
+
Confirm package contents exclude repository-local `.scrumrun/` state, caches, migration records, backups, vaults, tests, and secrets. The `.scrumrun/` directory inside project templates is expected. Confirm package metadata, README, changelog, tarball filename, checksum, and Git tag agree on `2.1.1`; SPEC, CORE, artifact frontmatter, migration, and installed skill continue to declare method `2.0.0`.
|
|
18
18
|
|
|
19
19
|
Record the local evidence and residual risks against [`RELEASE-SCORECARD.md`](./RELEASE-SCORECARD.md). Scores describe local readiness only and never replace registry smoke or owner approval.
|
|
20
20
|
|
|
21
21
|
## Optional registry candidate (separate owner approval required)
|
|
22
22
|
|
|
23
|
-
1. Set a new unpublished prerelease such as `2.1.
|
|
23
|
+
1. Set a new unpublished prerelease such as `2.1.1-rc.1` and create a reviewed commit.
|
|
24
24
|
2. `npm pack`; record tarball SHA-256/integrity.
|
|
25
25
|
3. Publish to `next`, never `latest`:
|
|
26
26
|
|
|
@@ -36,16 +36,16 @@ An RC is immutable. Fixes create `rc.2`, `rc.3`, and so on. Skipping an RC does
|
|
|
36
36
|
|
|
37
37
|
## Final release (new owner approval required)
|
|
38
38
|
|
|
39
|
-
1. Set `2.1.
|
|
39
|
+
1. Set `2.1.1`, rerun every local gate, inspect the exact tarball, and create the final local metadata commit.
|
|
40
40
|
2. Stop and request explicit owner authorization for each external boundary.
|
|
41
|
-
3. Publish npm `2.1.
|
|
41
|
+
3. Publish npm `2.1.1` to `next` using the reviewed tarball/source commit (`npm publish --tag next`); never publish from a changed worktree and do not move `latest` yet.
|
|
42
42
|
4. Install the registry artifact in a clean fixture and run init, intake/approval, Run lifecycle, memory query, v1 migration apply/rollback, doctor, and uninstall.
|
|
43
|
-
5. Only after registry smoke passes, create/push tag `v2.1.
|
|
43
|
+
5. Only after registry smoke passes, create/push tag `v2.1.1`, promote/verify `latest` with an explicit dist-tag command, and create the GitHub release from `CHANGELOG.md` with the migration guide and checksum.
|
|
44
44
|
6. Verify npm metadata, dist-tags, Git tag/commit, GitHub release, README, and checksums all agree.
|
|
45
45
|
|
|
46
46
|
## Recovery
|
|
47
47
|
|
|
48
48
|
- RC defect: publish another RC; keep `latest` unchanged.
|
|
49
|
-
- Final package defect before `latest`: do not promote; publish a new patch after correction because `2.1.
|
|
49
|
+
- Final package defect before `latest`: do not promote; publish a new patch after correction because `2.1.1` cannot be replaced.
|
|
50
50
|
- Defect after `latest`: assess deprecation vs immediate patch; never overwrite/unpublish without explicit owner decision and current npm-policy review.
|
|
51
51
|
- Migration issue: stop promotion, preserve registry artifact/checksum, use the documented rollback fixture, and publish a corrected version.
|
package/docs/SCHEMA.md
CHANGED
|
@@ -47,6 +47,8 @@ Task is the atomic unit. A Task may have zero or one Sprint. A Task may have man
|
|
|
47
47
|
|---|---|---|---|---|
|
|
48
48
|
| `attempt` | run | required | positive integer | monotonic execution-attempt number within one Task |
|
|
49
49
|
| `ledger` | run | optional | integer 1 | canonical Run event-ledger schema; required for newly authored Runs |
|
|
50
|
+
| `guardrails` | run | optional | integer 1 | append-only Guardrail obligation schema |
|
|
51
|
+
| `workspace` | run | optional | integer 1 | workspace mutation-gateway schema |
|
|
50
52
|
|
|
51
53
|
Native creation uses the declared initial statuses. Migration may restore a historical non-initial status only with provenance and validation.
|
|
52
54
|
|
|
@@ -54,7 +56,7 @@ Native creation uses the declared initial statuses. Migration may restore a hist
|
|
|
54
56
|
|
|
55
57
|
Newly authored Runs use `ledger: 1`. Their `## Events` section contains append-only JSON event blocks with stable ids in the form `RUN-NNN-EVT-NNN`.
|
|
56
58
|
|
|
57
|
-
Every event requires `schema`, `id`, contiguous `sequence`, RFC3339 `occurred_at`, `timestamp_precision`, `actor`, `from`, `to`, `reason`, and structured `evidence`. Event types are `transition`, `snapshot`. Evidence kinds are `approval`, `command`, `test`, `file`, `review`, `decision`, `insight`, `risk`, `note`, `migration`, `legacy`.
|
|
59
|
+
Every event requires `schema`, `id`, contiguous `sequence`, RFC3339 `occurred_at`, `timestamp_precision`, `actor`, `from`, `to`, `reason`, and structured `evidence`. Event types are `transition`, `snapshot`, `guardrail`, `mutation`. Evidence kinds are `approval`, `command`, `test`, `file`, `review`, `decision`, `insight`, `risk`, `note`, `migration`, `legacy`, `guardrail`, `mutation`.
|
|
58
60
|
|
|
59
61
|
A native ledger begins with `created → executing`; an evidenced migration `snapshot` may establish one historical baseline without inventing missing transitions. Event order, transition legality, final status, updated date, and completion evidence are machine-validated. Run owns the event history; Task stores its intended scope and synchronized current status without copying Run events.
|
|
60
62
|
|
package/docs/SEMANTIC-MEMORY.md
CHANGED
|
@@ -65,4 +65,4 @@ npx scrumrun@latest sc knowledge study calculateFinalPrice
|
|
|
65
65
|
npx scrumrun@latest sc knowledge context --clear
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
SQLite is ignored and disposable. Queries default to 10 records/40 relations and hard-cap at 100/100. Match type, truth state, warnings, relation counts, and evidence are returned so recommendations remain explainable.
|
|
68
|
+
SQLite is ignored and disposable. The derived index records its search backend: FTS5/BM25 is selected when the current Node.js SQLite build supports it; otherwise ScrumRun uses deterministic parameterized token matching over the same artifact, code, and relation tables. Queries default to 10 records/40 relations and hard-cap at 100/100. Match type, truth state, warnings, relation counts, and evidence are returned so recommendations remain explainable.
|
package/docs/TROUBLESHOOTING.md
CHANGED
|
@@ -71,7 +71,7 @@ Use `doctor --compat` only while validating one-cycle v1 adapters.
|
|
|
71
71
|
|
|
72
72
|
## Node.js is unsupported
|
|
73
73
|
|
|
74
|
-
ScrumRun 2.0 requires Node.js `>=22.13.0` because semantic indexing uses native `node:sqlite`. Upgrade Node, then rerun doctor.
|
|
74
|
+
ScrumRun 2.0 requires Node.js `>=22.13.0` because semantic indexing uses native `node:sqlite`. FTS5/BM25 is used when the runtime provides it; Node builds without FTS5 use the deterministic lexical fallback. Upgrade Node, then rerun doctor.
|
|
75
75
|
|
|
76
76
|
## Safe uninstall
|
|
77
77
|
|
package/lib/commands/manifest.js
CHANGED
|
@@ -12,6 +12,9 @@ const nouns = Object.freeze({
|
|
|
12
12
|
run: [
|
|
13
13
|
"--list",
|
|
14
14
|
"--show",
|
|
15
|
+
"--authorize-mutation <RUN-NNN> --path <relative-path>",
|
|
16
|
+
"--record-mutation <RUN-NNN> --permit <MUT-id> [--note] [--actor]",
|
|
17
|
+
"--satisfy-guardrail <RUN-NNN> --guardrail <GR-NNN> [--note] [--evidence] [--review] [--migration] [--actor]",
|
|
15
18
|
"--validate [--note] [--evidence] [--command] [--test] [--file] [--review] [--actor] [--at]",
|
|
16
19
|
"--learn [--note] [--evidence] [--decision] [--insight] [--file] [--actor] [--at]",
|
|
17
20
|
"--complete [--note] [--evidence] [--review] [--test] [--file] [--actor] [--at]",
|
|
@@ -47,7 +50,7 @@ const nouns = Object.freeze({
|
|
|
47
50
|
description: "run scoped evidence-based quality gates",
|
|
48
51
|
subjects: {
|
|
49
52
|
code: ["--run"],
|
|
50
|
-
artifact: ["--run"],
|
|
53
|
+
artifact: ["--run", "--record --task <TASK-NNN> [--run <RUN-NNN>] [--title] [--evidence]"],
|
|
51
54
|
migration: ["--run"],
|
|
52
55
|
release: ["--run"]
|
|
53
56
|
}
|
package/lib/commands/render.js
CHANGED
|
@@ -35,6 +35,7 @@ ${grammarLines().join("\n")}
|
|
|
35
35
|
- Linked Task/Run writes use a durable recovery journal; audit reports pending recovery and never repairs without explicit authorization.
|
|
36
36
|
- \`guardrails.md\` is canonical project policy; \`golden-rules.md\` is v1 compatibility only.
|
|
37
37
|
- Evaluate active Guardrails as \`passed\`, \`blocked\`, or \`deferred\`; cite exact \`GR-NNN\` ids and keep deferred execution gates visible.
|
|
38
|
+
- Persist deferred checks as Run obligations. Every material source edit requires a short-lived path-scoped Mutation Gateway permit and immediate hash recording; policy/workspace drift or unresolved obligations block completion.
|
|
38
39
|
- Knowledge/Decision/Insight records require evidence; AI-proposed Insights remain \`candidate\` until confirmed.
|
|
39
40
|
- Never print vault values or write before approval.
|
|
40
41
|
- Unknown nouns, subjects, actions, ids, or ambiguous approval must produce a deterministic explanation, never a guessed mutation.
|