|
2 | 2 |
|
3 | 3 | All notable changes to Sage will be documented in this file. |
4 | 4 |
|
| 5 | +## [1.1.8] — Git discipline + parallel-session worktrees |
| 6 | + |
| 7 | +Every delivery workflow now works on its own branch, merges only when |
| 8 | +you say so, and can run in an isolated `git worktree` so multiple |
| 9 | +Claude Code sessions develop in parallel without clobbering each |
| 10 | +other. All of it is opt-in or degrades silently in non-git projects — |
| 11 | +nothing changes for a single sequential session in a repo that doesn't |
| 12 | +opt in. |
| 13 | + |
| 14 | +### Branch discipline (all delivery workflows) |
| 15 | +- `/build`, `/fix`, `/architect`, and the multi-agent `/build-x` now |
| 16 | + create a branch per initiative before implementation commits — |
| 17 | + `feat/<slug>`, `fix/<slug>`, `arch/<slug>` respectively (extending |
| 18 | + the conventional-commit convention to branch names). Propose-confirm: |
| 19 | + the branch is never created silently; dirty-tree, already-on-a-branch, |
| 20 | + and detached-HEAD states are each handled. |
| 21 | +- **Merge is always user-gated.** Completion checkpoints add an |
| 22 | + `[M] Merge to <default>` option; `[A]` no longer merges. Before a |
| 23 | + merge: the test suite is gated on its own exit code, the tree must be |
| 24 | + clean (`git status --porcelain`) and the branch must have commits |
| 25 | + (`git rev-list`), and the merge is `--no-ff`. No workflow path ever |
| 26 | + merges, pushes, or opens a PR on its own. |
| 27 | +- **Per-initiative decision logs.** Checkpoint decisions now go to |
| 28 | + `.sage/work/<slug>/decisions.md` (the global `.sage/decisions.md` is |
| 29 | + reserved for cross-initiative decisions) — two parallel branches no |
| 30 | + longer collide on one append-only file. Readers check the initiative |
| 31 | + log first and fall back to the global one; older projects keep |
| 32 | + working. |
| 33 | +- The new single-source-of-truth capability |
| 34 | + `core/capabilities/execution/git-discipline/SKILL.md` defines naming, |
| 35 | + creation, the user-gated merge protocol, worktrees, and cleanup; |
| 36 | + workflows cite it, never restate it. |
| 37 | + |
| 38 | +### Parallel sessions — opt-in worktree isolation |
| 39 | +- New `isolation: branch | worktree` key in `.sage/config.yaml` |
| 40 | + (default `branch`). Branches isolate *history* (enough for one |
| 41 | + session at a time); worktrees isolate the *working tree* (required |
| 42 | + for simultaneous sessions, because two `claude` processes in one |
| 43 | + checkout share one working tree and one HEAD). |
| 44 | +- New **`sage worktree <slug>`** launcher — the front door for a |
| 45 | + parallel task. Creates the branch + a sibling worktree directory, |
| 46 | + copies the gitignored runtime into it (real `cp -R`, never symlinks), |
| 47 | + and prints the `cd … && claude` line to open an isolated session. |
| 48 | + Flags `--from`, `--prefix feat|fix|arch`, `--launch`; plus |
| 49 | + `sage worktree list` and `sage worktree prune`. |
| 50 | +- **Collision guard.** A second `claude` opened in the *same* checkout |
| 51 | + is warned (never blocked) by the session-init hook — |
| 52 | + "Another Sage session appears active in this checkout … run |
| 53 | + `sage worktree <name>`" — instead of silently clobbering. Liveness |
| 54 | + is grounded on the hook's parent process id (`$PPID` + `kill -0`), |
| 55 | + with a 6-hour staleness backstop; non-git projects skip it entirely. |
| 56 | +- **Workflow bounce.** Under `isolation: worktree`, a delivery workflow |
| 57 | + started in the main checkout offers a guided menu (set up a worktree |
| 58 | + / proceed here / sequential this once) — never a hard refusal. |
| 59 | +- See **[docs/parallel-sessions.md](docs/parallel-sessions.md)** for |
| 60 | + the full guide. |
| 61 | + |
| 62 | +### Multi-agent `/build-x` — quality + efficiency |
| 63 | +- **Deterministic stop-rule.** Review-loop verdicts (Phase 3/5/7) are |
| 64 | + computed by `review-stop.sh`, not counted in-head — the script reads |
| 65 | + the review files, applies the seven rules, and returns the action. |
| 66 | +- **Per-task-class cost tier.** `[roles.<role>.tiers]` in `agents.toml` |
| 67 | + lets a `mechanical` cycle review with a cheaper model than an |
| 68 | + `architecture-shaped` one; the planner proposes the class and the |
| 69 | + user confirms. |
| 70 | +- **Iron-law TDD + active scope-guard** in the implementer charter; |
| 71 | + a **per-step validator** (`validate-step.sh`) and a |
| 72 | + **hallucination-check precondition** (`hallucination-check.sh`, |
| 73 | + per-file polyglot manifest resolution) catch defects before the |
| 74 | + full code-review pass pays for them. |
| 75 | +- **Structured `handoff:` frontmatter** on every artifact, injected |
| 76 | + into downstream CLI-role prompts as the cross-model bridge. |
| 77 | +- **Stuck-handling** (technique-switch, not attempt-count) and a |
| 78 | + **plan-keyed memory-context refresh** between plan and implementation. |
| 79 | + |
| 80 | +### sage-memory 0.11+ codebase-scan docs |
| 81 | +- The `sage-memory`, `sage-ontology`, and `sage-self-learning` skills |
| 82 | + document the `scan-codebase` CLI / `sage_memory_scan_codebase` MCP |
| 83 | + tool (tree-sitter source indexing) — cross-referencing scanned code, |
| 84 | + linking learnings to code symbols, 10–50× token savings on cross-file |
| 85 | + queries. Mirrored in the plugin tree. |
| 86 | + |
| 87 | +### Notes |
| 88 | +- All git behavior is conditional on `git rev-parse --git-dir` — a |
| 89 | + non-git project sees no branching, no worktree prompts, no collision |
| 90 | + warnings. |
| 91 | +- Claude Code is the verified platform for the collision warning (a |
| 92 | + session-init hook); the config switch and launcher are |
| 93 | + platform-agnostic. |
| 94 | + |
5 | 95 | ## [1.1.7] — sage-memory integration (unified naming, auto-upgrade, auto-sync) |
6 | 96 |
|
7 | 97 | ### Renamed (BREAKING for custom prompts referencing old names) |
|
0 commit comments