scrumrun 2.0.0 → 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 +22 -0
- package/CORE.md +11 -1
- package/DECISIONS.md +56 -0
- package/MIGRATION-1-to-2.md +11 -0
- package/README.md +14 -4
- package/SPEC.md +25 -8
- package/bin/scrumrun.js +119 -11
- package/docs/COMMANDS.md +4 -2
- package/docs/ENTITY-MODEL.md +1 -1
- package/docs/RELEASE-SCORECARD.md +43 -0
- package/docs/RELEASE.md +19 -12
- package/docs/SCHEMA.md +9 -0
- package/docs/TROUBLESHOOTING.md +12 -0
- package/lib/commands/manifest.js +11 -2
- package/lib/commands/render.js +3 -0
- package/lib/memory/index.js +70 -11
- package/lib/runtime/budgets.js +4 -0
- package/lib/runtime/canonical-snapshot.js +110 -0
- package/lib/runtime/context.js +5 -45
- package/lib/runtime/orchestrator.js +98 -65
- package/lib/runtime/policy-engine.js +184 -0
- package/lib/runtime/request-engine.js +28 -24
- package/lib/runtime/run-ledger.js +324 -0
- package/lib/v2/artifacts.js +21 -1
- package/lib/v2/conformance.js +58 -11
- package/lib/v2/migration.js +69 -9
- package/lib/v2/run-ledger-migration.js +240 -0
- package/lib/v2/schema.js +21 -1
- package/lib/v2/transaction.js +254 -0
- package/package.json +1 -1
- package/scripts/generate-contract-docs.js +11 -0
- package/templates/project/.scrumrun/guardrails.md +8 -0
- package/templates/project/.scrumrun/map.md +4 -3
- package/templates/project/.scrumrun/method.json +4 -1
- package/templates/project/.scrumrun/state.md +7 -14
- package/templates/shared/skills/scrumrun/SKILL.md +13 -3
|
@@ -37,6 +37,8 @@ Normal hot path:
|
|
|
37
37
|
|
|
38
38
|
Lean mode is a read policy, not an incomplete store. Generated files and `.scrumrun/.cache/` are never authoritative.
|
|
39
39
|
|
|
40
|
+
Generated state and semantic indexes use a metadata-watch fast path with a full content-hash fallback. Treat cache-schema mismatch as a request to rebuild the disposable projection, never as permission to rewrite canonical Markdown.
|
|
41
|
+
|
|
40
42
|
For a v1 project without canonical v2 artifacts, use the dual-layout reader conceptually and recommend `scrumrun migrate --to 2 --dry-run`. `update` may run that read-only preflight automatically, but only explicit `update --migrate` may apply it.
|
|
41
43
|
|
|
42
44
|
## Domain model
|
|
@@ -74,6 +76,8 @@ At intake:
|
|
|
74
76
|
5. recommend one route and at most two useful alternatives in guided mode;
|
|
75
77
|
6. ask one explicit approval question before execution; config may change presentation, never remove the gate.
|
|
76
78
|
|
|
79
|
+
Evaluate every active Guardrail into a structured `passed`, `blocked`, or `deferred` result. Report blocked results with the exact `GR-NNN` id and reason code. Keep deferred results visible and enforce them at the mutation, migration, review, or owner gate they identify; never describe a deferred check as passed.
|
|
80
|
+
|
|
77
81
|
Do not create canonical artifacts, change status, edit application code, or treat ambiguous acknowledgement as approval. Temporary context may exist only in ignored disposable cache.
|
|
78
82
|
|
|
79
83
|
## Approved execution
|
|
@@ -91,13 +95,17 @@ During execution:
|
|
|
91
95
|
2. preserve existing owner work and unrelated dirty files;
|
|
92
96
|
3. enforce guardrails before every material mutation;
|
|
93
97
|
4. validate in proportion to risk;
|
|
94
|
-
5. record exactly one
|
|
98
|
+
5. record exactly one structured `RUN-NNN-EVT-NNN` event per state transition, with RFC3339 time, actor, reason, and typed evidence;
|
|
95
99
|
6. run configured reviewers;
|
|
96
100
|
7. extract candidate learning only after validation;
|
|
97
101
|
8. complete the Run, then Task, and only then the Sprint when its whole batch is done.
|
|
98
102
|
|
|
99
103
|
Never overwrite a prior attempt. Never mark work complete because time/token budget ended.
|
|
100
104
|
|
|
105
|
+
Run is the sole operational-history authority. Task synchronizes current status without copying Run events. Validation, learning, completion, failure, block, and resume require a reason or structured evidence; completion also requires evidenced validation and learning. Early v2 prose Runs are migrated explicitly, with deterministic chains recovered and uncertain history represented as an evidenced snapshot.
|
|
106
|
+
|
|
107
|
+
Linked canonical writes use the ignored durable transaction journal. An interrupted prepared mutation rolls back before the next approved mutation; a committed journal is verified and finalized. Audit remains read-only and reports pending recovery. Use `doctor --recover` only when explicitly requested, and never overwrite bytes changed after interruption.
|
|
108
|
+
|
|
101
109
|
## Semantic memory
|
|
102
110
|
|
|
103
111
|
Canonical memory is Markdown:
|
|
@@ -118,6 +126,8 @@ Useful relations include `defined_in`, `depends_on`, `used_by`, `constrained_by`
|
|
|
118
126
|
`.scrumrun/guardrails.md` is the sole canonical project-policy artifact in v2. `golden-rules.md` is a v1 compatibility source only.
|
|
119
127
|
|
|
120
128
|
- Guardrails are mandatory, stable-id, append-preserving policies.
|
|
129
|
+
- Fresh v2 rules declare `Status`, `Enforcement`, `Scope`, and `Rule`; migrated prose may use deterministic enforcement inference until normalized.
|
|
130
|
+
- Duplicate ids, unknown enforcement, inactive-only policy, and configuration that weakens approval are conformance failures.
|
|
121
131
|
- Retire/supersede a rule; do not silently delete policy history.
|
|
122
132
|
- `config.md` stores preferences, never higher-priority safety policy.
|
|
123
133
|
- Never commit or print vault values.
|
|
@@ -136,7 +146,7 @@ scrumrun migrate --to 2 --rollback
|
|
|
136
146
|
|
|
137
147
|
Inside a v1 project, `npx scrumrun@latest update` runs a read-only preflight. `update --migrate` explicitly approves application of that verified plan and keeps rollback available.
|
|
138
148
|
|
|
139
|
-
Dry-run must not write project data. Apply requires a hashed inventory, byte-exact local backup, staged validation, atomic switch, mapping report, and idempotent replay. Incomplete hybrid trees reuse existing evidenced v2 relations rather than duplicating them;
|
|
149
|
+
Dry-run must not write project data. Apply requires a hashed inventory, byte-exact local backup, staged validation, atomic switch, mapping report, and idempotent replay. Incomplete hybrid trees reuse existing evidenced v2 relations rather than duplicating them; early v2 prose Runs upgrade to ledger schema 1 only through the same explicit apply gate. Legacy-only aggregates leave the active tree but remain byte-exact in the ignored backup. Ambiguous records are preserved as warnings or evidenced snapshots, never guessed. Vault content remains local and is never rendered. Rollback must refuse if it would erase post-migration changes.
|
|
140
150
|
|
|
141
151
|
## Command grammar
|
|
142
152
|
|
|
@@ -180,7 +190,7 @@ Review is read-only unless the user separately authorizes fixes.
|
|
|
180
190
|
- `init`: initialize ScrumRun without overwriting existing state silently.
|
|
181
191
|
- `update`: refresh integrations and preflight v1 read-only; apply only with explicit `--migrate`.
|
|
182
192
|
- `migrate`: invoke the explicit migration workflow.
|
|
183
|
-
- `doctor`: verify installed root command and skill content; `--strict` also requires a warning-free project artifact audit.
|
|
193
|
+
- `doctor`: verify installed root command and skill content; `--strict` also requires a warning-free project artifact audit, while explicit `--recover` resolves safe pending kernel transactions.
|
|
184
194
|
- `uninstall`: preview by default; delete only recognized ScrumRun files with explicit `--force`.
|
|
185
195
|
- `help`: show grammar or one focused topic.
|
|
186
196
|
|