scrumrun 1.5.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.
Files changed (67) hide show
  1. package/CORE.md +381 -0
  2. package/DECISIONS.md +212 -0
  3. package/README.md +123 -0
  4. package/SPEC.md +324 -0
  5. package/bin/claude-install.js +147 -0
  6. package/bin/scrumrun.js +1194 -0
  7. package/package.json +48 -0
  8. package/templates/codex/prompts/sc-agent.md +14 -0
  9. package/templates/codex/prompts/sc-backlog.md +13 -0
  10. package/templates/codex/prompts/sc-challenge.md +57 -0
  11. package/templates/codex/prompts/sc-config.md +18 -0
  12. package/templates/codex/prompts/sc-context.md +24 -0
  13. package/templates/codex/prompts/sc-decisions.md +8 -0
  14. package/templates/codex/prompts/sc-feature.md +16 -0
  15. package/templates/codex/prompts/sc-fix.md +21 -0
  16. package/templates/codex/prompts/sc-goal.md +14 -0
  17. package/templates/codex/prompts/sc-golden.md +14 -0
  18. package/templates/codex/prompts/sc-help.md +12 -0
  19. package/templates/codex/prompts/sc-init.md +14 -0
  20. package/templates/codex/prompts/sc-intake.md +22 -0
  21. package/templates/codex/prompts/sc-know.md +75 -0
  22. package/templates/codex/prompts/sc-map.md +13 -0
  23. package/templates/codex/prompts/sc-review.md +13 -0
  24. package/templates/codex/prompts/sc-sprint.md +28 -0
  25. package/templates/codex/prompts/sc-study.md +23 -0
  26. package/templates/codex/prompts/sc-uninstall.md +14 -0
  27. package/templates/codex/prompts/sc-update.md +6 -0
  28. package/templates/codex/prompts/sc-vault.md +27 -0
  29. package/templates/codex/skills/scrumrun/SKILL.md +412 -0
  30. package/templates/opencode/commands/sc-agent.md +14 -0
  31. package/templates/opencode/commands/sc-backlog.md +13 -0
  32. package/templates/opencode/commands/sc-challenge.md +57 -0
  33. package/templates/opencode/commands/sc-config.md +18 -0
  34. package/templates/opencode/commands/sc-context.md +24 -0
  35. package/templates/opencode/commands/sc-decisions.md +8 -0
  36. package/templates/opencode/commands/sc-feature.md +16 -0
  37. package/templates/opencode/commands/sc-fix.md +21 -0
  38. package/templates/opencode/commands/sc-goal.md +14 -0
  39. package/templates/opencode/commands/sc-golden.md +14 -0
  40. package/templates/opencode/commands/sc-help.md +12 -0
  41. package/templates/opencode/commands/sc-init.md +14 -0
  42. package/templates/opencode/commands/sc-intake.md +22 -0
  43. package/templates/opencode/commands/sc-know.md +75 -0
  44. package/templates/opencode/commands/sc-map.md +13 -0
  45. package/templates/opencode/commands/sc-review.md +13 -0
  46. package/templates/opencode/commands/sc-sprint.md +28 -0
  47. package/templates/opencode/commands/sc-study.md +23 -0
  48. package/templates/opencode/commands/sc-uninstall.md +14 -0
  49. package/templates/opencode/commands/sc-update.md +6 -0
  50. package/templates/opencode/commands/sc-vault.md +27 -0
  51. package/templates/opencode/skills/scrumrun/SKILL.md +412 -0
  52. package/templates/project/.scrumrun/agents.md +36 -0
  53. package/templates/project/.scrumrun/backlog.md +7 -0
  54. package/templates/project/.scrumrun/config.md +13 -0
  55. package/templates/project/.scrumrun/context.md +61 -0
  56. package/templates/project/.scrumrun/features/.gitkeep +1 -0
  57. package/templates/project/.scrumrun/goals/main/decisions.md +9 -0
  58. package/templates/project/.scrumrun/goals/main/history.md +51 -0
  59. package/templates/project/.scrumrun/goals/main/sprint.md +54 -0
  60. package/templates/project/.scrumrun/golden-rules.md +9 -0
  61. package/templates/project/.scrumrun/knowledge.md +15 -0
  62. package/templates/project/.scrumrun/map.md +20 -0
  63. package/templates/project/.scrumrun/project.md +26 -0
  64. package/templates/project/.scrumrun/reviews/.gitkeep +1 -0
  65. package/templates/project/.scrumrun/runbook.md +101 -0
  66. package/templates/project/.scrumrun/token-policy.md +43 -0
  67. package/templates/project/AGENTS.md +59 -0
package/CORE.md ADDED
@@ -0,0 +1,381 @@
1
+ # ScrumRun Core
2
+
3
+ ScrumRun is a portable workflow for using AI agents on software projects without relying on a specific AI client.
4
+
5
+ ScrumRun provides controlled autonomy: AI has room to investigate, reason, and recommend, while explicit operating rules prevent it from confusing confidence with permission. In short, autonomy to think, guardrails to act.
6
+
7
+ Slash commands are optional shortcuts. If the current AI client does not support ScrumRun commands, read this file and execute the matching workflow manually.
8
+
9
+ After ScrumRun is initialized in a project, this file is mandatory project methodology. Any AI agent working in the project must follow it before planning, changing, auditing, or reviewing work.
10
+
11
+ ## Operating Rule
12
+
13
+ Before planning, changing, auditing, or reviewing work, read these files when they exist:
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.
45
+
46
+ ## Natural-Language Intake
47
+
48
+ The owner does not need to choose a ScrumRun command. A request such as "I have a checkout bug" or "we need passkeys" automatically starts intake.
49
+
50
+ Intake must:
51
+
52
+ 1. understand the desired outcome rather than matching keywords alone;
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.
58
+
59
+ Intake is read-only until approval. It must not create planning records, modify application code, run a sprint, or treat an ambiguous acknowledgement as execution consent.
60
+
61
+ Default preferences are:
62
+
63
+ ```text
64
+ Interaction Mode: guided
65
+ Execution Approval: always
66
+ Quick Tasks: ask
67
+ ```
68
+
69
+ `guided` presents a recommendation and useful alternatives. `concise` presents only the classification and recommendation. `autonomous-planning` may create planning records when the approval policy permits it, but still may not implement without explicit execution approval. `strict` requires explicit ScrumRun commands and disables automatic intake.
70
+
71
+ `Execution Approval: always` requires approval before creating operational records and again before implementation when those are separate steps. `implementation-only` permits the recommended planning record after intake but still requires explicit approval before changing application code. There is intentionally no mode that silently authorizes implementation.
72
+
73
+ `Quick Tasks: ask` asks before small low-risk changes. `allow` permits a clearly scoped low-risk quick task after classification, but never bypasses golden rules, security checks, or explicit user constraints. `backlog` parks quick tasks instead of executing them.
74
+
75
+ ## Command Grammar
76
+
77
+ Commands use one canonical verb for the same semantic action:
78
+
79
+ - `--add`: create or append a collection item, such as a sprint, feature, backlog item, rule, agent, fix, vault entry, or knowledge proposal;
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.
88
+
89
+ Legacy forms such as `--new`, bare knowledge topics, and positional `approve`/`reject` remain accepted as compatibility aliases, but agents should recommend and generate only the canonical forms. Short aliases that historically conflict keep their legacy meaning; prefer long flags in generated instructions.
90
+
91
+ ## Project Layout
92
+
93
+ ```text
94
+ AGENTS.md
95
+ .scrumrun/
96
+ core.md
97
+ config.md
98
+ token-policy.md
99
+ context.md
100
+ golden-rules.md
101
+ map.md
102
+ agents.md
103
+ runbook.md
104
+ project.md
105
+ backlog.md
106
+ knowledge.md
107
+ vault.local.md
108
+ goals/
109
+ main/
110
+ sprint.md
111
+ history.md
112
+ decisions.md
113
+ features/
114
+ <feature>/
115
+ feature.md
116
+ sprint.md
117
+ history.md
118
+ decisions.md
119
+ reviews/
120
+ ```
121
+
122
+ ## Safety Rules
123
+
124
+ - Do not start implementation unless the owner explicitly asks for it.
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.
132
+
133
+ ## Context Economy Protocol
134
+
135
+ This protocol reduces token waste while preserving correctness.
136
+
137
+ ```text
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
+ ```
153
+
154
+ Rules:
155
+
156
+ 1. Safety beats token economy.
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.
162
+
163
+ ## Sprint Protocol
164
+
165
+ Every sprint follows:
166
+
167
+ 1. Entenda
168
+ 2. Avalie Impactos
169
+ 3. Tire Duvidas
170
+ 4. Execute
171
+ 5. Teste
172
+
173
+ Do not skip the first three steps. They are what prevent confident but unsafe execution.
174
+
175
+ ## Command Equivalents
176
+
177
+ Use these workflows even when slash commands are unavailable.
178
+
179
+ ### `/sc-intake`
180
+
181
+ Explicitly invoke the natural-language intake protocol. This is useful when an AI client does not automatically detect ScrumRun from `AGENTS.md`.
182
+
183
+ Analyze the request, recommend a route, and ask for approval. Do not create records or execute work during intake.
184
+
185
+ ### `/sc-help`
186
+
187
+ Explain ScrumRun commands and workflows. Read `.scrumrun/config.md` first to honor the response language. Do not modify files.
188
+
189
+ ### `/sc-init`
190
+
191
+ Initialize ScrumRun. In CLI form, run:
192
+
193
+ ```bash
194
+ npx scrumrun@latest init
195
+ ```
196
+
197
+ Default init is local: it creates `AGENTS.md` and `.scrumrun/`, then adds them to `.git/info/exclude` when Git is present. This keeps ScrumRun out of commits unless the owner chooses `--shared`.
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`
302
+
303
+ Manage review agents in `.scrumrun/agents.md` or run them against a sprint. Agent findings should be recorded in the relevant history file.
304
+
305
+ ### `/sc-review`
306
+
307
+ Run a code review. Findings must be ordered by severity and include file/line references. Do not modify code unless explicitly asked.
308
+
309
+ ### `/sc-config`
310
+
311
+ Manage `.scrumrun/config.md`, including response language and sprint automation preferences.
312
+
313
+ ### `/sc-golden`
314
+
315
+ Manage `.scrumrun/golden-rules.md`. Golden rules are absolute and must be checked before every planning or execution workflow.
316
+
317
+ ### `/sc-map`
318
+
319
+ Build or view `.scrumrun/map.md`. The map is a navigation aid, not source of truth. Verify files before editing.
320
+
321
+ ### `/sc-context`
322
+
323
+ Manage `.scrumrun/context.md`, the token-safe project snapshot, and `.scrumrun/token-policy.md`, the context economy rules.
324
+
325
+ Actions:
326
+
327
+ - `/sc-context --build` (`-b`): create or fully refresh the snapshot from canonical ScrumRun files and targeted source inspection.
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.
332
+
333
+ Never let `context.md` override golden rules, approved knowledge, history, decisions, or source code.
334
+
335
+ ### `/sc-decisions`
336
+
337
+ Resolve open decisions one at a time in the relevant decisions/history file.
338
+
339
+ ### `/sc-vault`
340
+
341
+ Manage `.scrumrun/vault.local.md`, a plaintext local development vault.
342
+
343
+ This file is for development-only credentials and local test values. It is not encrypted and is not a production secret manager. Values must never be committed or copied into normal ScrumRun records.
344
+
345
+ ## Manual Usage Without Installation
346
+
347
+ If commands are unavailable, ask the agent to do this:
348
+
349
+ ```text
350
+ Read .scrumrun/core.md and follow ScrumRun.
351
+ I want the equivalent of /sc-study.
352
+ Do not modify files.
353
+ ```
354
+
355
+ Or:
356
+
357
+ ```text
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
+ ```
363
+
364
+ Or:
365
+
366
+ ```text
367
+ Read .scrumrun/core.md and follow ScrumRun.
368
+ Run the equivalent of /sc-sprint --run Sprint 01.
369
+ Follow the sprint protocol and update history when done.
370
+ ```
371
+
372
+ ## Bootstrap Prompt
373
+
374
+ For AI clients that do not reliably read project instructions automatically, paste this at the start of the session:
375
+
376
+ ```text
377
+ Read AGENTS.md and .scrumrun/core.md before doing anything else.
378
+ Follow ScrumRun exactly.
379
+ If slash commands are unavailable, execute the equivalent workflow from .scrumrun/core.md manually.
380
+ Do not plan, edit, run, or review work until you have applied the ScrumRun safety rules, project files, approved knowledge, sprint history, and decision history.
381
+ ```
package/DECISIONS.md ADDED
@@ -0,0 +1,212 @@
1
+ # ScrumRun Design Decisions
2
+
3
+ Architectural Decision Records for the ScrumRun method. Each entry captures a decision that shaped the protocol and the reasoning behind it. ADRs are append-only. Superseded decisions stay in the log with a link to the replacement.
4
+
5
+ Format:
6
+
7
+ ```
8
+ ## ADR-NNN — <title>
9
+ Status: accepted | superseded by ADR-XXX | deprecated
10
+ Date: YYYY-MM-DD
11
+
12
+ **Context** — the problem
13
+ **Decision** — what we chose
14
+ **Consequences** — what this buys and costs
15
+ **Alternatives considered** — what we rejected and why
16
+ ```
17
+
18
+ ---
19
+
20
+ ## ADR-001 — Markdown as the sole persistence format
21
+ Status: accepted
22
+ Date: 2026-07-17
23
+
24
+ **Context** — ScrumRun needs a persistence layer for state that is (a) portable across AI agents, (b) diffable via git, (c) readable by humans without tooling, (d) editable by hand in an emergency.
25
+
26
+ **Decision** — All ScrumRun state lives in `.md` files under `.scrumrun/`. No SQLite, no JSON, no YAML-only files.
27
+
28
+ **Consequences** — Any markdown-capable agent can read the full state without a client library. Git history is human-readable. Diffs are meaningful in code review. Cost: parsing is slightly fuzzier than structured formats; frontmatter is used for machine-readable metadata (see I-12).
29
+
30
+ **Alternatives considered** — JSON: unreadable diffs, requires viewer. SQLite: opaque to non-tool users, breaks portability. YAML-only: less friendly for prose (plans, decisions).
31
+
32
+ ---
33
+
34
+ ## ADR-002 — Approval is synchronous and explicit
35
+ Status: accepted
36
+ Date: 2026-07-17
37
+
38
+ **Context** — Agents can act quickly. The line between "understood and helpful" and "acted without permission" is where trust in AI-assisted development breaks.
39
+
40
+ **Decision** — Approval gates are synchronous checkpoints requiring explicit owner response. There is intentionally no config option to grant blanket implementation permission (see I-01, I-06).
41
+
42
+ **Consequences** — Slower than fully autonomous execution. But every code change has a recorded owner decision. Cost: friction on trivial tasks — mitigated by the `Quick Tasks: allow` policy, which still cannot override golden rules.
43
+
44
+ **Alternatives considered** — Async approval (approve later): breaks the "audit trail matches execution" property. Silent execution with rollback: rollback is not a substitute for consent.
45
+
46
+ ---
47
+
48
+ ## ADR-003 — Long flags are canonical
49
+ Status: accepted
50
+ Date: 2026-07-17
51
+
52
+ **Context** — Historical commands used inconsistent short aliases (`--new`, positional `approve`, bare knowledge topics). This created ambiguity in agent-generated instructions.
53
+
54
+ **Decision** — Canonical grammar uses long flags: `--add`, `--set`, `--update`, `--remove`, `--list`, `--show`, `--run`, `--audit`, `--approve`, `--reject`. Legacy aliases remain for compatibility but agents recommend and generate only canonical forms.
55
+
56
+ **Consequences** — Predictable, self-documenting commands. Agent output is greppable and stable across sessions. Cost: more typing for humans — mitigated by natural-language intake being the recommended entry point.
57
+
58
+ **Alternatives considered** — Positional subcommands (`sc sprint add`): fine ergonomically, but harder to compose with other flags and less consistent with existing tooling.
59
+
60
+ ---
61
+
62
+ ## ADR-004 — Intake is strictly read-only
63
+ Status: accepted
64
+ Date: 2026-07-17
65
+
66
+ **Context** — Intake needs to load enough context to make a good recommendation. Without a clear rule, "loading context" can drift into "starting to work".
67
+
68
+ **Decision** — Intake may read any file but cannot create, modify, or delete artifacts, nor modify application code (see I-04).
69
+
70
+ **Consequences** — The autonomy/permission line is bright. Any side effect implies approval happened. Cost: intake sometimes reads context that ends up unused — acceptable price for clarity.
71
+
72
+ **Alternatives considered** — Allowing intake to create draft artifacts: rejected because it blurs the boundary and creates cleanup burden.
73
+
74
+ ---
75
+
76
+ ## ADR-005 — Main goal and feature lanes are physically separate
77
+ Status: accepted
78
+ Date: 2026-07-17
79
+
80
+ **Context** — Feature ideas frequently arrive mid-sprint. Merging them into main sprint history dilutes the narrative of the main goal and makes historical audit harder.
81
+
82
+ **Decision** — Feature lanes live under `.scrumrun/features/<slug>/` with their own `sprint.md`, `history.md`, `decisions.md`. They share project rules and knowledge but never auto-merge into main goal history (see I-05).
83
+
84
+ **Consequences** — Main goal history stays coherent. Features can be planned independently and evaluated on their own merit. Cost: two places to look — mitigated by intake reading both and by the `context.md` snapshot summarizing state across lanes.
85
+
86
+ **Alternatives considered** — Tags within a single history: fails when a feature is abandoned (history is polluted with dead branches).
87
+
88
+ ---
89
+
90
+ ## ADR-006 — Golden rules cannot be silently bypassed
91
+ Status: accepted
92
+ Date: 2026-07-17
93
+
94
+ **Context** — Configuration flags that disable safety features are the most common source of preventable damage in AI-assisted workflows.
95
+
96
+ **Decision** — Active golden rules have highest precedence. There is no command flag, no config option, and no intake path that disables them. Retirement requires explicit owner action and is logged (see I-03, I-08).
97
+
98
+ **Consequences** — Guarantees that "add rule X" produces durable behavior. Cost: cannot temporarily suspend a rule — must retire, act, re-add. Intentional friction.
99
+
100
+ **Alternatives considered** — `--force` flag to override: rejected — the value of a rule is precisely that it does not bend under pressure.
101
+
102
+ ---
103
+
104
+ ## ADR-007 — `context.md` is never authoritative
105
+ Status: accepted
106
+ Date: 2026-07-17
107
+
108
+ **Context** — Token economy pressure encourages agents to trust cached summaries. A summary that is 90% accurate is a summary that will mislead 10% of the time on production decisions.
109
+
110
+ **Decision** — `context.md` is a reading guide only. Every planning, editing, review, or completion step must verify against canonical artifacts and source (see I-09).
111
+
112
+ **Consequences** — Extra reads for accuracy. Cost is real but bounded. Ensures the audit substrate matches reality.
113
+
114
+ **Alternatives considered** — Making `context.md` cache with TTL and invalidation: too much machinery for insufficient benefit — direct reads are cheap enough.
115
+
116
+ ---
117
+
118
+ ## ADR-008 — Fixes and sprints coexist as distinct kinds
119
+ Status: accepted
120
+ Date: 2026-07-17
121
+
122
+ **Context** — A production bug is not a full sprint. Forcing every corrective action through the sprint protocol (plan, review, complete) adds overhead disproportionate to the risk.
123
+
124
+ **Decision** — Fix is a first-class artifact with a lighter state machine than sprint. If scope grows during execution, `escalate` promotes to sprint while preserving id lineage (see §3.2).
125
+
126
+ **Consequences** — Right-sized ceremony per risk class. Cost: two kinds to reason about — mitigated by intake handling classification.
127
+
128
+ **Alternatives considered** — Single "task" kind with priority flag: loses semantic clarity in history ("what was this — feature work or bug?").
129
+
130
+ ---
131
+
132
+ ## ADR-009 — Local by default, not shared
133
+ Status: accepted
134
+ Date: 2026-07-17
135
+
136
+ **Context** — Teams have varying preferences on whether AI planning artifacts belong in the repo. Committing them by default surprises new adopters and can leak internal reasoning.
137
+
138
+ **Decision** — `sc init` is local by default: adds `.scrumrun/` and `AGENTS.md` to `.git/info/exclude`. `--shared` opts into committed mode.
139
+
140
+ **Consequences** — Solo users get zero friction. Teams make an explicit choice to share. Cost: single-machine memory unless owner opts in.
141
+
142
+ **Alternatives considered** — Commit by default: surprising for solo users, especially in existing repos.
143
+
144
+ ---
145
+
146
+ ## ADR-010 — Per-agent portability via a single `CORE.md`
147
+ Status: accepted
148
+ Date: 2026-07-17
149
+
150
+ **Context** — AI clients evolve rapidly. Any method locked to a single client becomes obsolete when the client stagnates or is replaced.
151
+
152
+ **Decision** — `CORE.md` is the portable execution guide. Any agent that can read markdown and follow instructions can implement ScrumRun by reading it. Client-specific integrations (slash commands, skills) are optimizations, not requirements.
153
+
154
+ **Consequences** — ScrumRun outlives specific AI clients. Diversifies risk. Cost: every method change must be expressible as markdown instructions — a healthy constraint.
155
+
156
+ **Alternatives considered** — Client-specific SDKs: faster to build features, faster to become abandonware.
157
+
158
+ ---
159
+
160
+ ## ADR-011 — Vault is local-only plaintext
161
+ Status: accepted
162
+ Date: 2026-07-17
163
+
164
+ **Context** — Development requires access to secrets (API keys, test credentials). A production secret manager is overkill for local development; ad-hoc `.env` files leak into agents' context.
165
+
166
+ **Decision** — `.scrumrun/vault.local.md` is a plaintext local file, never committed, never printed in agent output (see I-11). It is explicitly not a production secret manager.
167
+
168
+ **Consequences** — Fast local ergonomics. Cost: relies on discipline — mitigated by the invariant preventing agents from surfacing values.
169
+
170
+ **Alternatives considered** — Encryption at rest: added friction for a local file whose threat model is "developer's laptop is compromised" — at which point the encryption key is also compromised.
171
+
172
+ ---
173
+
174
+ ## ADR-012 — Method versioning is separate from tooling
175
+ Status: accepted
176
+ Date: 2026-07-17
177
+
178
+ **Context** — Users adopting ScrumRun need to know what changes are safe to auto-update and what changes require reviewing their `.scrumrun/` files.
179
+
180
+ **Decision** — `method`, `cli`, and `skill` versions are independent (see SPEC §10). Tooling can iterate freely; method changes ship with migration guides.
181
+
182
+ **Consequences** — Stability signal is explicit. Adopters can pin `method: 1.0` and update tooling confidently. Cost: three version numbers to track — mitigated by `/sc config --version`.
183
+
184
+ **Alternatives considered** — Single version for everything: forces false major bumps whenever tooling changes shape, eroding trust in the version number.
185
+
186
+ ---
187
+
188
+ ## ADR-013 — Six-command grammar (planned, not yet implemented)
189
+ Status: proposed
190
+ Date: 2026-07-17
191
+
192
+ **Context** — Twenty `sc-*` commands accumulated organically. Overlap between commands (study/know/map/context, sprint/fix/feature/backlog/goal) suggests the grammar has grown by addition rather than design.
193
+
194
+ **Decision** — Consolidate the 20 verbs into 6 nouns: `/sc`, `/sc plan`, `/sc knowledge`, `/sc rules`, `/sc review`, `/sc config`. Legacy commands become invisible aliases for one release cycle, then removed.
195
+
196
+ **Consequences** — Grammar reflects method structure (§4 composition). Discoverability improves without hiding power. Cost: one-time migration effort for existing users — currently only the author.
197
+
198
+ **Alternatives considered** — Keep 20 with better docs: does not address root cause (design accretion). Reduce to 2 (only intake + one power command): loses the ability to script determin­istically.
199
+
200
+ ---
201
+
202
+ ## ADR-014 — Portuguese is a first-class response language
203
+ Status: accepted
204
+ Date: 2026-07-17
205
+
206
+ **Context** — The author works primarily in Portuguese and the method emerged in that context. Forcing English-only interaction excludes the primary user.
207
+
208
+ **Decision** — `config.md` carries a `language` field. Agents honor it for all conversational output. Artifact content remains in whatever language the owner writes it.
209
+
210
+ **Consequences** — Method is usable in the owner's native language without translation overhead. Cost: docs and examples may lag between languages — accepted.
211
+
212
+ **Alternatives considered** — Auto-detect from user input: unreliable across sessions and mixed-language inputs.