Skip to content

Add /saga skill for autonomous spec-driven development#32

Merged
zachbai merged 1 commit into
mainfrom
zb/add-saga-skill
Jun 24, 2026
Merged

Add /saga skill for autonomous spec-driven development#32
zachbai merged 1 commit into
mainfrom
zb/add-saga-skill

Conversation

@zachbai

@zachbai zachbai commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Adds the saga skill: an orchestrator-driven, spec-first workflow for
autonomously implementing medium-to-large features with a fleet of worker
subagents.

  • Phase 1: collaborative planning that produces a resumable spec tree
    (SAGA.md + per-milestone/per-task specs) with airtight, per-level
    validation criteria stored in a saga directory under ~/.sagas.
  • Phase 2: parallelized implementation via worker agents in isolated git
    worktrees, each self-validating against its task contract; orchestrator
    integrates and validates per milestone while preserving its context.
  • Phase 3: final saga-level validation and human acceptance.

Includes reference docs for the spec templates, validation strategies, and
continuing/resuming a saga with a fresh orchestrator. Generalized for any
user/team (neutral saga/ branch convention, per-user ~/.sagas).

Co-Authored-By: Oz oz-agent@warp.dev

zachbai commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@zachbai zachbai requested a review from alokedesai June 24, 2026 05:09
@zachbai zachbai marked this pull request as ready for review June 24, 2026 05:09
@oz-for-oss

oz-for-oss Bot commented Jun 24, 2026

Copy link
Copy Markdown

@zachbai

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR adds a new /saga skill and supporting reference docs for a spec-driven, orchestrator/worker workflow.

Concerns

  • The worker contract requires force-removing task worktrees before it requires any commit, push, patch, or other durable handoff. That can discard validated implementation work and leave only an unchanged branch for milestone integration.
  • Resume guidance would be more reliable if PROGRESS.md recorded addressable worker identifiers for in-progress tasks, since a fresh orchestrator cannot message a prior worker by display name alone.

Verdict

Found: 0 critical, 1 important, 1 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread .agents/skills/saga/SKILL.md Outdated

1. Implement only its assigned task and owned files.
2. **Self-validate in a loop** against the task's validation criteria using the prescribed method (computer use / interactive CLI subagent / unit + integration tests). Iterate fix→validate until all criteria pass or it is genuinely blocked.
3. **Remove the worktree** once validation passes (or before reporting a blocked status): `git worktree remove <worktree-path> --force`. The branch persists; the worktree does not. Stale worktrees are unacceptable — this step is not optional.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] Removing the worktree before requiring a commit, push, or patch can discard the worker's validated changes; add a durable handoff step before this forced cleanup.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

worth addresing this comment

<One line per task: status, branch, evidence pointer.
Branch naming convention: saga/<saga-name>/m<M>t<T>-<task-slug> (prepend a team/user branch prefix if your repo requires one)>
- 1.1 <name>: done — branch saga/<saga-name>/m1t1-<slug>, evidence: <pointer / test names / screenshot path>
- 1.2 <name>: in progress (worker <name>, worktree ../saga-<saga-name>-m1t2)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 [SUGGESTION] Store the worker's addressable agent/run ID here, not only a display name, so a fresh orchestrator can actually resume or message in-progress work.

Comment thread .agents/skills/saga/SKILL.md Outdated

1. Implement only its assigned task and owned files.
2. **Self-validate in a loop** against the task's validation criteria using the prescribed method (computer use / interactive CLI subagent / unit + integration tests). Iterate fix→validate until all criteria pass or it is genuinely blocked.
3. **Remove the worktree** once validation passes (or before reporting a blocked status): `git worktree remove <worktree-path> --force`. The branch persists; the worktree does not. Stale worktrees are unacceptable — this step is not optional.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

worth addresing this comment

Adds the saga skill: an orchestrator-driven, spec-first workflow for
autonomously implementing medium-to-large features with a fleet of worker
subagents.

- Phase 1: collaborative planning that produces a resumable spec tree
  (SAGA.md + per-milestone/per-task specs) with airtight, per-level
  validation criteria stored in a saga directory under ~/.sagas.
- Phase 2: parallelized implementation via worker agents in isolated git
  worktrees, each self-validating against its task contract; orchestrator
  integrates and validates per milestone while preserving its context.
- Phase 3: final saga-level validation and human acceptance.

Includes reference docs for the spec templates, validation strategies, and
continuing/resuming a saga with a fresh orchestrator. Generalized for any
user/team (neutral saga/ branch convention, per-user ~/.sagas).

Co-Authored-By: Oz <oz-agent@warp.dev>
@zachbai zachbai force-pushed the zb/add-saga-skill branch from c9f3758 to a13effc Compare June 24, 2026 18:33
@zachbai zachbai merged commit a149e6f into main Jun 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants