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/CORE.md
CHANGED
|
@@ -1,381 +1,304 @@
|
|
|
1
|
-
# ScrumRun Core
|
|
1
|
+
# ScrumRun Core 2.0
|
|
2
2
|
|
|
3
|
-
ScrumRun is a portable
|
|
3
|
+
ScrumRun is a portable, evidence-driven Agile runtime for AI agents. It makes intended work, execution attempts, decisions, and project learning explicit without turning the project into a ceremony engine.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Method version: `2.0.0`
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## One command
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
The canonical command is:
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
1. `.scrumrun/core.md`
|
|
16
|
-
2. `.scrumrun/golden-rules.md`
|
|
17
|
-
3. `.scrumrun/config.md`
|
|
18
|
-
4. `.scrumrun/token-policy.md`
|
|
19
|
-
5. `.scrumrun/context.md`
|
|
20
|
-
6. `.scrumrun/map.md`
|
|
21
|
-
7. `.scrumrun/project.md`
|
|
22
|
-
8. `.scrumrun/knowledge.md`
|
|
23
|
-
9. `.scrumrun/runbook.md`
|
|
24
|
-
10. `.scrumrun/backlog.md`
|
|
25
|
-
11. `.scrumrun/goals/main/sprint.md`
|
|
26
|
-
12. `.scrumrun/features/*/feature.md`
|
|
27
|
-
13. `.scrumrun/features/*/sprint.md`
|
|
28
|
-
14. `.scrumrun/agents.md`
|
|
29
|
-
15. `.scrumrun/goals/main/history.md`
|
|
30
|
-
16. `.scrumrun/goals/main/decisions.md`
|
|
31
|
-
17. `.scrumrun/features/*/history.md`
|
|
32
|
-
18. `.scrumrun/features/*/decisions.md`
|
|
33
|
-
|
|
34
|
-
Golden rules have the highest priority. If a golden rule conflicts with any other instruction, the golden rule wins.
|
|
35
|
-
|
|
36
|
-
Only approved knowledge is planning truth. Pending knowledge is unverified context. Rejected knowledge must not be used except to avoid repeating a known bad assumption.
|
|
37
|
-
|
|
38
|
-
`context.md` is a token-saving snapshot, not canonical truth. Use it to decide what to read next, then verify against canonical ScrumRun files and source code before planning, editing, reviewing, or marking work done.
|
|
39
|
-
|
|
40
|
-
If the current AI client does not support slash commands, do not invent a different workflow. Use the command equivalents in this file.
|
|
41
|
-
|
|
42
|
-
If this file was loaded from `AGENTS.md`, treat it as the active project methodology.
|
|
43
|
-
|
|
44
|
-
If the user asks for work without mentioning ScrumRun, still follow ScrumRun because the project was initialized with it.
|
|
11
|
+
```text
|
|
12
|
+
/sc <noun> <subject> <action> [args]
|
|
13
|
+
```
|
|
45
14
|
|
|
46
|
-
|
|
15
|
+
The five nouns are:
|
|
47
16
|
|
|
48
|
-
|
|
17
|
+
- `plan` — Features, Tasks, Sprints, Runs, intake, and challenge;
|
|
18
|
+
- `knowledge` — facts, Decisions, Insights, dossiers, context, map, study, and vault;
|
|
19
|
+
- `rules` — guardrails and reviewers;
|
|
20
|
+
- `review` — code, artifact, migration, and release gates;
|
|
21
|
+
- `config` — project preferences, lifecycle, migration, doctor, and help.
|
|
49
22
|
|
|
50
|
-
|
|
23
|
+
Incomplete syntax lists only valid next tokens. Unknown syntax never guesses or mutates.
|
|
51
24
|
|
|
52
|
-
|
|
53
|
-
2. inspect the minimum canonical context and relevant history needed for a reliable classification;
|
|
54
|
-
3. classify the request as a quick task, knowledge/discovery, main sprint, corrective fix, backlog candidate, isolated feature lane, or reject/defer;
|
|
55
|
-
4. explain the recommended route, important risks and unknowns, plus no more than two useful alternatives;
|
|
56
|
-
5. ask for approval according to `.scrumrun/config.md`;
|
|
57
|
-
6. invoke the chosen workflow only after approval.
|
|
25
|
+
The command manifest at `lib/commands/manifest.js` generates client prompts, compatibility adapters, help, and grammar tests. Fresh v2 integrations install only `/sc`. A v1 upgrade may install generated compatibility adapters for one release cycle.
|
|
58
26
|
|
|
59
|
-
|
|
27
|
+
## Entity model
|
|
60
28
|
|
|
61
|
-
|
|
29
|
+
The exact machine contract is `lib/v2/schema.js`; `docs/SCHEMA.md` is its generated human-readable form. This guide explains how to operate that contract and must not redefine its status sets or cardinalities.
|
|
62
30
|
|
|
63
31
|
```text
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
32
|
+
FEAT-003
|
|
33
|
+
└── TASK-018
|
|
34
|
+
├── executed_by → RUN-044
|
|
35
|
+
├── included_in → SPRINT-012
|
|
36
|
+
├── constrained_by → DEC-018
|
|
37
|
+
└── generated → INS-041
|
|
67
38
|
```
|
|
68
39
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
## Command Grammar
|
|
76
|
-
|
|
77
|
-
Commands use one canonical verb for the same semantic action:
|
|
40
|
+
- Feature (`FEAT-NNN`) is the long-lived initiative: why the work matters.
|
|
41
|
+
- Task (`TASK-NNN`) is the atomic intended change: what must be done.
|
|
42
|
+
- Sprint (`SPRINT-NNN`) is a real timebox or delivery batch: when related Tasks are grouped.
|
|
43
|
+
- Run (`RUN-NNN`) is one concrete execution attempt: how a Task actually happened.
|
|
44
|
+
- Review (`REV-NNN`) records a scoped quality gate.
|
|
45
|
+
- Memory records what the project knows and why: Knowledge (`K-NNN`), Decision (`DEC-NNN`), Insight (`INS-NNN`), and Dossier (`DOS-NNN`).
|
|
78
46
|
|
|
79
|
-
|
|
80
|
-
- `--set`: define or replace a singleton value, such as the main goal or language;
|
|
81
|
-
- `--update`: change an existing resource without replacing its identity;
|
|
82
|
-
- `--remove`: delete an existing resource;
|
|
83
|
-
- `--list`: list multiple resources;
|
|
84
|
-
- `--show`: display one resource or the current state;
|
|
85
|
-
- `--run`: execute approved work;
|
|
86
|
-
- `--audit`: verify completed or current work;
|
|
87
|
-
- `--approve` / `--reject`: resolve a pending proposal.
|
|
47
|
+
A Task may exist without a Sprint. A retry creates a new Run and never overwrites the previous attempt. A fix is a Task with `type: fix`; backlog is a generated view of Tasks with `status: backlog`.
|
|
88
48
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
## Project Layout
|
|
49
|
+
## Canonical project tree
|
|
92
50
|
|
|
93
51
|
```text
|
|
94
52
|
AGENTS.md
|
|
95
53
|
.scrumrun/
|
|
96
54
|
core.md
|
|
55
|
+
guardrails.md
|
|
97
56
|
config.md
|
|
98
|
-
token-policy.md
|
|
99
|
-
context.md
|
|
100
|
-
golden-rules.md
|
|
101
|
-
map.md
|
|
102
|
-
agents.md
|
|
103
|
-
runbook.md
|
|
104
57
|
project.md
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
decisions.md
|
|
58
|
+
state.md # generated, not authoritative
|
|
59
|
+
map.md # generated, not authoritative
|
|
60
|
+
method.json
|
|
61
|
+
tasks/
|
|
62
|
+
TASK-NNN.md
|
|
63
|
+
sprints/
|
|
64
|
+
SPRINT-NNN.md
|
|
113
65
|
features/
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
66
|
+
FEAT-NNN.md
|
|
67
|
+
runs/
|
|
68
|
+
RUN-NNN.md
|
|
69
|
+
memory/
|
|
70
|
+
knowledge/
|
|
71
|
+
K-NNN.md
|
|
72
|
+
decisions/
|
|
73
|
+
DEC-NNN.md
|
|
74
|
+
insights/
|
|
75
|
+
INS-NNN.md
|
|
76
|
+
dossiers/
|
|
77
|
+
DOS-NNN.md
|
|
119
78
|
reviews/
|
|
79
|
+
REV-NNN.md
|
|
80
|
+
.cache/ # ignored and disposable
|
|
81
|
+
semantic-index.sqlite
|
|
82
|
+
contexts/
|
|
120
83
|
```
|
|
121
84
|
|
|
122
|
-
|
|
85
|
+
Canonical truth is Markdown. SQLite/cache data stores only rebuildable indexes, symbol projections, relations, and bounded context packages. Deleting `.cache/` must never delete authored truth.
|
|
123
86
|
|
|
124
|
-
-
|
|
125
|
-
- Never modify read-only source paths.
|
|
126
|
-
- Never commit real secrets.
|
|
127
|
-
- Never print `.scrumrun/vault.local.md` values in normal summaries, history, knowledge, backlog, reviews, commits, or logs.
|
|
128
|
-
- Runtime values must come from environment/config, not hardcoded strings.
|
|
129
|
-
- Keep main goal history and feature lane history separate.
|
|
130
|
-
- Before running a sprint, check the relevant history file.
|
|
131
|
-
- If a sprint is completed, partial, or blocked, stop and ask whether to audit, resume, fix, rerun, or move on.
|
|
87
|
+
`state.md` and the semantic index use two-tier freshness checks. Matching path/stat watch fingerprints avoid rereading unchanged sources; any metadata drift falls back to complete content hashing. A cache schema mismatch rebuilds the disposable index once. Watch metadata is only an optimization and never authority.
|
|
132
88
|
|
|
133
|
-
|
|
89
|
+
`vault.local.md`, migration backups, and caches are local-only. Their values never appear in logs, history, reviews, memory, reports, commits, or normal responses.
|
|
134
90
|
|
|
135
|
-
|
|
91
|
+
## Authority and read policy
|
|
136
92
|
|
|
137
|
-
|
|
138
|
-
AGENTS.md
|
|
139
|
-
-> core.md
|
|
140
|
-
-> golden-rules.md
|
|
141
|
-
-> config.md
|
|
142
|
-
-> token-policy.md
|
|
143
|
-
-> context.md
|
|
144
|
-
-> map.md
|
|
145
|
-
-> project.md
|
|
146
|
-
-> knowledge.md
|
|
147
|
-
-> runbook.md
|
|
148
|
-
-> current backlog / sprint / feature files
|
|
149
|
-
-> agents.md
|
|
150
|
-
-> relevant history + decisions
|
|
151
|
-
-> targeted source files
|
|
152
|
-
```
|
|
93
|
+
Apply project context in this order:
|
|
153
94
|
|
|
154
|
-
|
|
95
|
+
1. owner/system instructions;
|
|
96
|
+
2. universal method invariants in this guide and `SPEC.md`;
|
|
97
|
+
3. `guardrails.md`;
|
|
98
|
+
4. relevant confirmed Decisions and approved Knowledge;
|
|
99
|
+
5. active Feature, Task, Sprint, and Run;
|
|
100
|
+
6. relevant history and evidence;
|
|
101
|
+
7. generated `state.md`, `map.md`, and cache projections.
|
|
155
102
|
|
|
156
|
-
|
|
157
|
-
2. Use `context.md` as a reading guide, never as proof.
|
|
158
|
-
3. Prefer targeted file/range/symbol reads over broad dumps.
|
|
159
|
-
4. Summarize large logs, generated files, old reviews, and old unrelated history.
|
|
160
|
-
5. If a skipped source could affect correctness or safety, read it.
|
|
161
|
-
6. Update `context.md` after study, challenge intake, sprint planning, sprint execution, review, or important knowledge/decision changes.
|
|
103
|
+
Normal read path:
|
|
162
104
|
|
|
163
|
-
|
|
105
|
+
1. `AGENTS.md`;
|
|
106
|
+
2. `.scrumrun/guardrails.md`;
|
|
107
|
+
3. `.scrumrun/state.md`;
|
|
108
|
+
4. only the canonical ids and evidence relevant to current work;
|
|
109
|
+
5. `.scrumrun/core.md` when method details or exceptional transitions are needed.
|
|
164
110
|
|
|
165
|
-
|
|
111
|
+
Lean mode is this bounded read policy; it is not permission to omit canonical truth.
|
|
166
112
|
|
|
167
|
-
|
|
168
|
-
2. Avalie Impactos
|
|
169
|
-
3. Tire Duvidas
|
|
170
|
-
4. Execute
|
|
171
|
-
5. Teste
|
|
113
|
+
`guardrails.md` is the sole canonical project-policy file. `golden-rules.md` is a v1 migration source/compatibility pointer, not a competing authority. `config.md` stores interaction preferences and cannot weaken guardrails.
|
|
172
114
|
|
|
173
|
-
|
|
115
|
+
## Request lifecycle
|
|
174
116
|
|
|
175
|
-
|
|
117
|
+
Everything before approval is transient and read-only:
|
|
176
118
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
119
|
+
```text
|
|
120
|
+
USER REQUEST
|
|
121
|
+
↓
|
|
122
|
+
RECEIVED
|
|
123
|
+
↓
|
|
124
|
+
CONTEXTUALIZING
|
|
125
|
+
├── Project Scan
|
|
126
|
+
├── History Engine
|
|
127
|
+
└── Decision Engine
|
|
128
|
+
↓
|
|
129
|
+
CONTEXT PACKAGE
|
|
130
|
+
↓
|
|
131
|
+
POLICY ENGINE
|
|
132
|
+
↓
|
|
133
|
+
RISK ASSESSMENT
|
|
134
|
+
↓
|
|
135
|
+
CLASSIFICATION
|
|
136
|
+
↓
|
|
137
|
+
PLANNING
|
|
138
|
+
↓
|
|
139
|
+
AWAITING APPROVAL
|
|
195
140
|
```
|
|
196
141
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
### `/sc-study`
|
|
200
|
-
|
|
201
|
-
Perform a deep, read-only project study.
|
|
202
|
-
|
|
203
|
-
Inspect:
|
|
204
|
-
|
|
205
|
-
- product purpose and stack;
|
|
206
|
-
- package managers, frameworks, runtime versions, and local commands;
|
|
207
|
-
- architecture, entry points, routing, controllers, services, jobs, and modules;
|
|
208
|
-
- auth, authorization, roles, permissions, policies, guards, and access boundaries;
|
|
209
|
-
- data model, migrations, seeds, storage, queues, caches, and external state;
|
|
210
|
-
- env/config, secret handling, integrations, webhooks, and provider boundaries;
|
|
211
|
-
- deployment, infrastructure, CI, test strategy, and observability clues;
|
|
212
|
-
- golden rules, approved knowledge, backlog, current sprint plan, history, and decisions;
|
|
213
|
-
- security risks, performance hotspots, brittle areas, unknowns, and next backlog candidates.
|
|
214
|
-
|
|
215
|
-
Return evidence with file references. If something cannot be verified, say it is unknown and explain what evidence is missing. Do not modify files. Recommend sprint candidates as backlog candidates unless the user explicitly asks to create or run a sprint.
|
|
216
|
-
|
|
217
|
-
### `/sc-know`
|
|
218
|
-
|
|
219
|
-
Investigate a specific topic and write a pending knowledge proposal in `.scrumrun/knowledge.md` using the next `K-NNN` id.
|
|
220
|
-
|
|
221
|
-
Each entry should include:
|
|
222
|
-
|
|
223
|
-
- title;
|
|
224
|
-
- user insight;
|
|
225
|
-
- verified facts with file references;
|
|
226
|
-
- assumptions and uncertainty;
|
|
227
|
-
- risks if wrong;
|
|
228
|
-
- affected modules;
|
|
229
|
-
- suggested future use.
|
|
230
|
-
|
|
231
|
-
With deep knowledge, also include key functions, symbols, entry points, call sites, and relevant types/storage.
|
|
232
|
-
|
|
233
|
-
Do not treat new or edited knowledge as approved. Ask the owner to approve or reject it.
|
|
234
|
-
|
|
235
|
-
### `/sc-challenge`
|
|
236
|
-
|
|
237
|
-
Analyze a user challenge after study and recommend the safest path.
|
|
238
|
-
|
|
239
|
-
Read project files, approved knowledge, backlog, sprint plan, history, decisions, feature lanes, and relevant source code. History reading is mandatory when history exists.
|
|
240
|
-
|
|
241
|
-
Return:
|
|
242
|
-
|
|
243
|
-
- challenge understanding;
|
|
244
|
-
- approved knowledge used;
|
|
245
|
-
- evidence with file references;
|
|
246
|
-
- history findings;
|
|
247
|
-
- impact analysis;
|
|
248
|
-
- risks and unknowns;
|
|
249
|
-
- options;
|
|
250
|
-
- recommendation;
|
|
251
|
-
- suggested next command or manual workflow.
|
|
252
|
-
|
|
253
|
-
Valid recommendations include creating a small sprint, adding to backlog, creating a feature lane, running discovery first, or rejecting/defering the request.
|
|
254
|
-
|
|
255
|
-
Do not create backlog items, sprints, feature lanes, code changes, commits, tests, or history entries unless the user explicitly asks.
|
|
256
|
-
|
|
257
|
-
### `/sc-goal`
|
|
258
|
-
|
|
259
|
-
Manage the main project goal in `.scrumrun/goals/main/`.
|
|
260
|
-
|
|
261
|
-
When setting or changing the goal with `--set`, read project rules, map, approved knowledge, review agents, main history, and decisions. Detect the stack first, ask blocking architecture questions, then update `.scrumrun/project.md`, `.scrumrun/goals/main/sprint.md`, and `.scrumrun/goals/main/decisions.md`.
|
|
262
|
-
|
|
263
|
-
Do not implement code.
|
|
264
|
-
|
|
265
|
-
### `/sc-feature`
|
|
266
|
-
|
|
267
|
-
Create or manage isolated feature lanes under `.scrumrun/features/<slug>/`.
|
|
268
|
-
|
|
269
|
-
Feature lanes must have separate `feature.md`, `sprint.md`, `history.md`, and `decisions.md`. They must respect project rules and approved knowledge but must not pollute main goal history.
|
|
270
|
-
|
|
271
|
-
### `/sc-sprint`
|
|
272
|
-
|
|
273
|
-
Manage or run main-goal sprints.
|
|
274
|
-
|
|
275
|
-
For a sprint added with `--add`, append it to `.scrumrun/goals/main/sprint.md` with goal, scope, acceptance criteria, dependencies, suggested verification, and review checkpoints.
|
|
276
|
-
|
|
277
|
-
For sprint execution:
|
|
278
|
-
|
|
279
|
-
1. Read `AGENTS.md`, core, golden rules, config, map, project, knowledge, runbook, sprint or feature plan, agents, history, and decisions.
|
|
280
|
-
2. Use only approved knowledge.
|
|
281
|
-
3. Check whether the sprint is completed, partial, or blocked.
|
|
282
|
-
4. Follow Entenda -> Avalie Impactos -> Tire Duvidas -> Execute -> Teste.
|
|
283
|
-
5. Run configured review agents.
|
|
284
|
-
6. Fix findings before marking complete.
|
|
285
|
-
7. Update main history and decisions.
|
|
286
|
-
|
|
287
|
-
If the owner asks to send a sprint to backlog, add it to `.scrumrun/backlog.md` and stop without executing.
|
|
288
|
-
|
|
289
|
-
### `/sc-backlog`
|
|
290
|
-
|
|
291
|
-
Manage `.scrumrun/backlog.md`.
|
|
292
|
-
|
|
293
|
-
Backlog items are candidates, not active work. Adding to backlog must not change sprint status, run tests, execute agents, or modify application code.
|
|
294
|
-
|
|
295
|
-
### `/sc-fix`
|
|
296
|
-
|
|
297
|
-
Manage `.scrumrun/fixes.md`.
|
|
298
|
-
|
|
299
|
-
Record what went wrong and what was done with `--add`. Browse the fix log with `--list` and `--show`. If patterns repeat, use `--insight` to create durable knowledge. `/sc-sprint --fix` auto-registers entries.
|
|
300
|
-
|
|
301
|
-
### `/sc-agent`
|
|
142
|
+
Intake must:
|
|
302
143
|
|
|
303
|
-
|
|
144
|
+
1. understand outcome, urgency, scope, risk, uncertainty, and current-work relationship;
|
|
145
|
+
2. retrieve only relevant project/code/history/decision evidence;
|
|
146
|
+
3. apply guardrails before making a recommendation;
|
|
147
|
+
4. classify as standalone Task, Sprint batch, Feature, discovery, fix Task, backlog Task, quick Task, or reject/defer;
|
|
148
|
+
5. recommend one route and, in guided mode, at most two useful alternatives;
|
|
149
|
+
6. ask one explicit approval question before execution; config may change presentation, never remove the gate.
|
|
304
150
|
|
|
305
|
-
|
|
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.
|
|
306
152
|
|
|
307
|
-
|
|
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.
|
|
308
154
|
|
|
309
|
-
|
|
155
|
+
## Execution lifecycle
|
|
310
156
|
|
|
311
|
-
|
|
157
|
+
Explicit approval creates or updates the Task and creates a Run:
|
|
312
158
|
|
|
313
|
-
|
|
159
|
+
```text
|
|
160
|
+
executing
|
|
161
|
+
→ validating
|
|
162
|
+
→ learning
|
|
163
|
+
→ completed
|
|
164
|
+
↘ failed
|
|
165
|
+
↘ blocked
|
|
166
|
+
```
|
|
314
167
|
|
|
315
|
-
|
|
168
|
+
Rules:
|
|
316
169
|
|
|
317
|
-
|
|
170
|
+
- one Run belongs to one Task;
|
|
171
|
+
- one Task may have multiple immutable attempts;
|
|
172
|
+
- every state transition writes exactly one append-only `RUN-NNN-EVT-NNN` JSON event with RFC3339 time, actor, reason, and typed evidence;
|
|
173
|
+
- the Run ledger is operational history; Task synchronizes current status without copying the Run event;
|
|
174
|
+
- validation, learning, completion, failure, block, and resume require a reason or evidence;
|
|
175
|
+
- validation must match the risk and acceptance criteria;
|
|
176
|
+
- configured reviews run before completion;
|
|
177
|
+
- learning proposes memory candidates after validation and never auto-confirms AI inference;
|
|
178
|
+
- complete a Sprint only when all its included Tasks meet the Sprint exit gate;
|
|
179
|
+
- do not mark work complete merely because time or token budget ended.
|
|
318
180
|
|
|
319
|
-
|
|
181
|
+
Canonical mutations are schema-validated, lossless, and atomic. Preserve unknown fields, prose, and unrelated owner edits. A failed mutation must leave canonical state unchanged or recoverable.
|
|
320
182
|
|
|
321
|
-
|
|
183
|
+
Task/Run pair mutations use an ignored durable journal under `.scrumrun/.backup/transactions/`. A captured failure rolls back immediately; an interrupted `prepared` transaction is rolled back before the next approved mutation, while an interrupted `committed` transaction is verified and finalized. Audit only reports `TRANSACTION_PENDING`. Recovery writes occur only when the approved operation is retried or `doctor --recover` is explicitly invoked, and recovery refuses to overwrite bytes that match neither side of the journal.
|
|
322
184
|
|
|
323
|
-
|
|
185
|
+
## Semantic memory
|
|
324
186
|
|
|
325
|
-
|
|
187
|
+
### Knowledge
|
|
326
188
|
|
|
327
|
-
|
|
328
|
-
- `/sc-context --update` (`-u`) `[reason]`: update only changed sections after study, challenge, planning, execution, review, or knowledge changes.
|
|
329
|
-
- `/sc-context --show` (`-s`): show the current snapshot without modifying files.
|
|
330
|
-
- `/sc-context --clear` (`-c`): reset the snapshot to a stale placeholder so future agents know it must be rebuilt.
|
|
331
|
-
- `/sc-context --policy` (`-p`): show token economy rules and explain how they apply to the current task.
|
|
189
|
+
Verified descriptive facts about the project. Only `approved` Knowledge may guide execution as truth.
|
|
332
190
|
|
|
333
|
-
|
|
191
|
+
### Decision
|
|
334
192
|
|
|
335
|
-
|
|
193
|
+
Normative constraints such as “pricing calculations must remain on the backend.” Decisions carry status, scope, evidence/source, validity conditions, and review triggers.
|
|
336
194
|
|
|
337
|
-
|
|
195
|
+
### Insight
|
|
338
196
|
|
|
339
|
-
|
|
197
|
+
Explanatory context such as placement rationale, tradeoff, business rule, failure history, performance reason, security reason, usage warning, or testing note. Insights are not automatically Decisions.
|
|
340
198
|
|
|
341
|
-
|
|
199
|
+
AI extraction creates `candidate` Insights. Confirmation requires explicit human approval or trusted evidence. Supported states are `candidate`, `confirmed`, `stale`, `deprecated`, and `invalidated`.
|
|
342
200
|
|
|
343
|
-
|
|
201
|
+
### Dossier
|
|
344
202
|
|
|
345
|
-
|
|
203
|
+
A durable evidence bundle about a topic/module, with last-verified source/commit and staleness information.
|
|
346
204
|
|
|
347
|
-
|
|
205
|
+
Useful graph relations include:
|
|
348
206
|
|
|
349
207
|
```text
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
208
|
+
defined_in
|
|
209
|
+
depends_on
|
|
210
|
+
used_by
|
|
211
|
+
constrained_by
|
|
212
|
+
introduced_by
|
|
213
|
+
modified_by
|
|
214
|
+
has_insight
|
|
215
|
+
protected_by
|
|
353
216
|
```
|
|
354
217
|
|
|
355
|
-
|
|
218
|
+
Context retrieval must explain why a record matched and label stale evidence. Invalidated/rejected memory is preserved for audit but never injected as active truth.
|
|
356
219
|
|
|
357
|
-
|
|
358
|
-
Read .scrumrun/core.md and follow ScrumRun.
|
|
359
|
-
I want the equivalent of /sc-challenge:
|
|
360
|
-
<challenge>
|
|
361
|
-
Show options and recommendation only. Do not execute.
|
|
362
|
-
```
|
|
220
|
+
## Migration contract
|
|
363
221
|
|
|
364
|
-
|
|
222
|
+
Migration is explicit:
|
|
365
223
|
|
|
366
224
|
```text
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
225
|
+
scrumrun migrate --to 2 --dry-run
|
|
226
|
+
scrumrun migrate --to 2 --apply
|
|
227
|
+
scrumrun migrate --to 2 --rollback
|
|
370
228
|
```
|
|
371
229
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
230
|
+
- ordinary install/update never applies a migration; update performs a read-only v1 preflight, and only explicit `update --migrate` applies its verified plan;
|
|
231
|
+
- early v2 Run prose is also preflighted read-only and upgraded explicitly to ledger schema 1 with byte-exact backup and safe rollback;
|
|
232
|
+
- dry-run writes no project data;
|
|
233
|
+
- apply inventories source hashes, creates a byte-exact local backup, transforms in staging, validates, and activates by atomic directory swap;
|
|
234
|
+
- incomplete hybrid v1/v2 trees reuse existing evidenced canonical relations instead of creating duplicate Tasks/Runs;
|
|
235
|
+
- legacy-only aggregates leave the active v2 tree after apply and remain byte-exact in the ignored backup;
|
|
236
|
+
- the mapping report relates every inferred v1 block to its v2 destination while every original file remains covered by the backup inventory;
|
|
237
|
+
- replay is idempotent;
|
|
238
|
+
- ambiguous mappings are preserved and warned, never guessed;
|
|
239
|
+
- vault contents remain unchanged and are never rendered;
|
|
240
|
+
- rollback verifies the backup and refuses if it would erase post-migration work.
|
|
241
|
+
|
|
242
|
+
Legacy sprint plan entries normally become Tasks. History attempts become Runs when a Task link is evidenced. A v2 Sprint is created only with actual timebox/batch evidence. Feature lanes become Features; backlog entries become backlog Tasks; fixes become fix Tasks; Knowledge states are preserved; extracted Insights remain candidates; golden rules become stable-id Guardrails.
|
|
243
|
+
|
|
244
|
+
## Command reference
|
|
245
|
+
|
|
246
|
+
### `/sc plan`
|
|
247
|
+
|
|
248
|
+
- `task --add|--list|--show|--run|--audit|--cancel|--retry`
|
|
249
|
+
- `sprint --add|--list|--show|--start|--complete|--block`
|
|
250
|
+
- `feature --add|--list|--show|--activate|--complete`
|
|
251
|
+
- `run --list|--show|--validate|--learn|--complete|--resume|--fail|--block`
|
|
252
|
+
- `intake <request>`
|
|
253
|
+
- `challenge <question>`
|
|
254
|
+
|
|
255
|
+
### `/sc knowledge`
|
|
256
|
+
|
|
257
|
+
- `fact --add|--list|--show|--approve|--reject|--deprecate|--invalidate`
|
|
258
|
+
- `decision --add|--list|--show|--resolve|--deprecate|--invalidate`
|
|
259
|
+
- `insight --propose|--list|--show|--confirm|--stale|--reject|--deprecate|--invalidate`
|
|
260
|
+
- `dossier --add|--list|--show|--refresh|--stale|--deprecate|--archive`
|
|
261
|
+
- `context --build|--update|--show|--clear`
|
|
262
|
+
- `map --build|--show`
|
|
263
|
+
- `study <focus>`
|
|
264
|
+
- `vault --add|--list|--show|--remove|--path`
|
|
265
|
+
|
|
266
|
+
### `/sc rules`
|
|
267
|
+
|
|
268
|
+
- `guardrail --add|--list|--show|--retire`
|
|
269
|
+
- `reviewer --add|--list|--show|--run`
|
|
270
|
+
|
|
271
|
+
### `/sc review`
|
|
272
|
+
|
|
273
|
+
- `code --run`
|
|
274
|
+
- `artifact --run`
|
|
275
|
+
- `migration --run`
|
|
276
|
+
- `release --run`
|
|
277
|
+
|
|
278
|
+
Review is read-only unless fixes are separately authorized. Report findings by severity with evidence.
|
|
279
|
+
|
|
280
|
+
### `/sc config`
|
|
281
|
+
|
|
282
|
+
- `project --show|--language|--interaction|--approval|--quick-tasks`
|
|
283
|
+
- `init --local|--shared|--force`
|
|
284
|
+
- `update all|codex|opencode|claude [--migrate]`
|
|
285
|
+
- `migrate --to 2 --dry-run|--apply|--rollback`
|
|
286
|
+
- `doctor all|codex|opencode|claude [--strict]`
|
|
287
|
+
- `uninstall --force`
|
|
288
|
+
- `help <topic>`
|
|
289
|
+
|
|
290
|
+
## Stable invariants
|
|
291
|
+
|
|
292
|
+
- Intake is read-only.
|
|
293
|
+
- No execution without explicit valid approval.
|
|
294
|
+
- Guardrails cannot be bypassed; they may only be superseded/retired with history.
|
|
295
|
+
- Active Guardrails produce explicit passed/blocked/deferred evaluations; blocks cite stable ids and deferred checks remain visible until their execution gate.
|
|
296
|
+
- Task is atomic; Sprint is grouping; Run is an attempt.
|
|
297
|
+
- Retries preserve prior Runs.
|
|
298
|
+
- History is append-only.
|
|
299
|
+
- Only approved/confirmed, non-stale memory guides work as truth.
|
|
300
|
+
- AI proposals never self-confirm.
|
|
301
|
+
- Generated views/caches never override canonical Markdown.
|
|
302
|
+
- Vault values never leave the local vault boundary.
|
|
303
|
+
- Migration never guesses or runs implicitly; `update --migrate` is explicit migration approval.
|
|
304
|
+
- Review does not imply authorization to fix.
|