Skip to content

Commit fbc5a06

Browse files
committed
docs: v1.1.8 — parallel-sessions guide, README, CHANGELOG
Releases v1.1.8 (the framework version is the CHANGELOG's top `## [X.Y.Z]` header, which generate-plugin.sh extracts). - CHANGELOG: new [1.1.8] entry — git branch discipline (branch per initiative, user-gated merge, per-initiative decision logs), opt-in worktree isolation (isolation: config, sage worktree launcher, collision guard, workflow bounce), the multi-agent /build-x quality+efficiency work, and the sage-memory 0.11 codebase-scan docs sync. - README: sage worktree in the CLI table; isolation: in the config block + toggle table; a new 'Parallel Sessions (optional)' section; sage-version example bumped to 1.1.8. - docs/parallel-sessions.md (new): comprehensive guide — why branches aren't enough for parallel work, the can't-relocate-a- session constraint, quickstart, isolation: worktree, the full sage worktree reference, the collision guard, the tracked-vs- gitignored .sage/ worlds (incl. WSL/symlink notes), per-initiative state, a typical parallel day, merge/cleanup, troubleshooting. Independently accuracy-reviewed against the shipped code (the one BLOCKER it found — the multi-agent runtime copy — was fixed in the preceding commit so every claim holds).
1 parent e03c35c commit fbc5a06

3 files changed

Lines changed: 505 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,96 @@
22

33
All notable changes to Sage will be documented in this file.
44

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+
595
## [1.1.7] — sage-memory integration (unified naming, auto-upgrade, auto-sync)
696

797
### Renamed (BREAKING for custom prompts referencing old names)

README.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ Run in your terminal:
229229
| `sage remove <skill>` | Remove a skill from project |
230230
| `sage skills` | List installed skills |
231231
| `sage update [target]` | Update community skills to latest |
232+
| `sage worktree <slug>` | Create an isolated worktree + branch for a parallel session ([guide](docs/parallel-sessions.md)) |
232233

233234
## How Sage Works
234235

@@ -508,23 +509,25 @@ relationships) for smarter integration.
508509
Sage configuration lives in `.sage/config.yaml`:
509510

510511
```yaml
511-
sage-version: "1.1.1"
512+
sage-version: "1.1.8"
512513
project-name: "my-app"
513514
detected-stack: [react, typescript]
514515
auto_review: true # sub-agent review after spec/plan approval
515516
auto_qa: true # sub-agent QA after quality gates
516517
independent_gate3: true # sub-agent code quality review (Gate 3)
517518
command_prefix: false # prefix commands as sage:build, sage:fix, etc.
519+
isolation: branch # branch | worktree — how parallel work is isolated
518520
```
519521

520-
All toggles default to `true` (except `command_prefix`). Set to `false` to disable:
522+
All toggles default to `true` (except `command_prefix` and `isolation`). Set to `false` to disable:
521523

522524
| Setting | What It Controls |
523525
|---------|-----------------|
524526
| `auto_review` | Sub-agent review of spec, plan, and ADR after approval |
525527
| `auto_qa` | Sub-agent code verification after quality gates pass |
526528
| `independent_gate3` | Sub-agent code quality review at Gate 3 (falls back to self-review) |
527529
| `command_prefix` | Namespace all commands as `sage:build`, `sage:fix`, etc. (set via `--prefix` flag) |
530+
| `isolation` | `branch` (default, sequential) or `worktree` (parallel sessions). See [Parallel Sessions](#parallel-sessions-optional). |
528531

529532
## Multi-Agent (optional)
530533

@@ -575,6 +578,37 @@ Claude Code only in v1.
575578
- `.sage/docs/multi-agent.md` (post-install) — protocol contract,
576579
schema, integration points
577580

581+
## Parallel Sessions (optional)
582+
583+
Every delivery workflow works on its own branch (`feat/<slug>`,
584+
`fix/<slug>`, `arch/<slug>`) and merges only when you choose `[M]` at
585+
the completion checkpoint — never on its own. That gives you clean,
586+
reviewable, one-PR-per-initiative history out of the box, with no new
587+
steps for a single sequential session.
588+
589+
To run **two tasks at once** — one session fixing a bug, another
590+
building a feature — branches alone aren't enough: two `claude`
591+
sessions in the same directory share one working tree and clobber each
592+
other's files. The isolation that simultaneous sessions need is a
593+
`git worktree` — a directory per session. One command sets it up:
594+
595+
```bash
596+
sage worktree payment-retry # creates ../<repo>-payment-retry on
597+
# branch feat/payment-retry, copies the
598+
# runtime, prints: cd … && claude
599+
cd ../<repo>-payment-retry && claude # an isolated session; /build works as normal
600+
```
601+
602+
Opt in with `isolation: worktree` in `.sage/config.yaml` to make the
603+
workflows offer this automatically. If you forget and open a second
604+
session in the same checkout, Sage warns you (it can't silently move a
605+
running session into a worktree — that's a launch-time action).
606+
607+
**Learn more:** **[docs/parallel-sessions.md](docs/parallel-sessions.md)**
608+
— when to use a branch vs a worktree, the full `sage worktree`
609+
reference, the collision guard, and the tracked-vs-gitignored `.sage/`
610+
details.
611+
578612
## Project State
579613

580614
When Sage runs in your project, it manages state in `.sage/`:

0 commit comments

Comments
 (0)