Pick the next unblocked story from Linear and implement it using the Ralph Wiggum loop
Picks the next unblocked Linear story and implements it using the Ralph Wiggum loop with 100% test coverage.
/plugin marketplace add theinfinityguides/software-assembly-line/plugin install software-assembly-line@software-assembly-line[--project-id <ID>] [--story-id <ID>] [--continue]Pick the next unblocked story from Linear and implement it using the Ralph Wiggum loop.
/sal:work [--project-id <LINEAR_PROJECT_ID>] [--story-id <STORY_ID>] [--continue]
# Pick next unblocked story from project and implement
/sal:work --project-id PROJ-123
# Work on a specific story
/sal:work --story-id STORY-456
# Continue working on current story (after interruption)
/sal:work --continue
| Argument | Required | Description |
|---|---|---|
--project-id | No* | Linear project to pull stories from |
--story-id | No* | Specific story to work on |
--continue | No | Resume work on current story |
*One of --project-id or --story-id required unless --continue.
If --story-id provided:
If --project-id provided:
IMPORTANT: All work must be done in a git worktree, not the main working directory.
# Get repo info
REPO_ROOT=$(git rev-parse --show-toplevel)
REPO_NAME=$(basename "$REPO_ROOT")
BRANCH="feat/STORY-456-create-subscriptions-table"
BRANCH_SLUG=$(echo "$BRANCH" | sed 's/[^a-zA-Z0-9]/-/g')
WORKTREE_PATH="${REPO_ROOT}/../${REPO_NAME}--${BRANCH_SLUG}"
# Create branch and worktree (as sibling to main repo)
git worktree add -b "$BRANCH" "$WORKTREE_PATH"
# Register work session BEFORE changing directory
mkdir -p "$REPO_ROOT/.claude/session"
cat > "$REPO_ROOT/.claude/session/work-goal" << EOF
branch=$BRANCH
worktree=$WORKTREE_PATH
EOF
# Change to worktree - ALL WORK HAPPENS HERE
cd "$WORKTREE_PATH"
The worktree is created as a sibling directory:
~/dev/
├── my-repo/ # Main (stays on main branch)
└── my-repo--feat-STORY-456-create-subscrip... # Worktree (your work here)
Why worktrees?
Read the story description and acceptance criteria. If story references:
Execute implementation in a persistent loop until all acceptance criteria are met:
1. Read acceptance criteria
2. Implement next criterion
3. Write tests for the criterion (100% coverage required)
4. Run tests and coverage check
5. If tests fail or coverage < 100% → fix and retry
6. If tests pass with 100% coverage → check next criterion
7. Repeat until all criteria met
Exit conditions:
✓ All acceptance criteria complete with 100% test coverage
✗ Blocked by external dependency
✗ Needs human decision
✗ Max iterations reached
Coverage standard: 100% test coverage is required. Run bun coverage from the repo root to check.
Before creating PR, run these commands from the repo root:
bun lint # Linting passes
bun check # Types check
bun coverage # Tests pass with 100% coverage
Verify:
bun lint passesbun check passesbun coverage passes with 100% coverage@ts-expect-error or as any introducedgh pr create --title "[STORY-456] Create subscriptions table migration" --body "..." --draft
## Work Complete
### Story
STORY-456: [db:schema] Create subscriptions table migration
### Worktree
../my-repo--feat-STORY-456-create-subscriptions-table
### Branch
feat/STORY-456-create-subscriptions-table
### Changes
- Created migration: packages/db/migrations/0042_create_subscriptions.sql
- Added schema: packages/db/src/schema/subscriptions.ts
- Added tests: packages/db/test/subscriptions.test.ts
### Verification
- [x] Tests pass (12 tests, 100% coverage)
- [x] Types check
- [x] Lint clean
- [x] All acceptance criteria met
### Pull Request
https://github.com/org/repo/pull/123
### Next Steps
Run `/sal:review` to trigger multi-agent code review.
Structured markers for parsing:
[SAL:WORK:START] {"storyId": "STORY-456", "branch": "feat/..."}
[SAL:WORK:PROGRESS] {"criterion": 1, "total": 5, "status": "complete"}
[SAL:WORK:COMPLETE] {"storyId": "STORY-456", "prUrl": "https://..."}
[SAL:WORK:BLOCKED] {"storyId": "STORY-456", "reason": "..."}