Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions plugin/skills/design/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,30 @@ Create PRDs through structured decision-tree interviews and collaborative dialog

## Phase 0: Pre-Execute

### 0. Acquire Worktree Lock

Before any work, acquire the worktree lock to prevent parallel sessions from modifying the same branch. Design and plan commit directly to the base branch (no worktree), so concurrent sessions would race on `git add -A`.

```bash
( set -C; echo "$$:design:$(date -Iseconds)" > .beastmode/.worktree-lock ) 2>/dev/null
```

If the lock file already exists (command fails), read it and STOP immediately:

```bash
cat .beastmode/.worktree-lock
```

Print:

```
BLOCKED — another beastmode session is active on this branch.
Lock held by: <contents of lock file>
Wait for it to finish, or remove .beastmode/.worktree-lock if the session crashed.
```

STOP. Do not proceed.

### 1. Problem-First Question

Before exploring the codebase, ask the user what they are trying to solve.
Expand Down Expand Up @@ -172,6 +196,12 @@ git add -A
git commit -m "design(<epic-slug>): checkpoint"
```

Release the worktree lock:

```bash
rm -f .beastmode/.worktree-lock
```

Print:

```
Expand Down
30 changes: 30 additions & 0 deletions plugin/skills/plan/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,30 @@ Decompose a PRD into independent feature plans. Each feature is a vertical slice

## Phase 1: Execute

### -1. Acquire Worktree Lock

Before any work, acquire the worktree lock to prevent parallel sessions from modifying the same branch. Design and plan commit directly to the base branch (no worktree), so concurrent sessions would race on `git add -A`.

```bash
( set -C; echo "$$:plan:$(date -Iseconds)" > .beastmode/.worktree-lock ) 2>/dev/null
```

If the lock file already exists (command fails), read it and STOP immediately:

```bash
cat .beastmode/.worktree-lock
```

Print:

```
BLOCKED — another beastmode session is active on this branch.
Lock held by: <contents of lock file>
Wait for it to finish, or remove .beastmode/.worktree-lock if the session crashed.
```

STOP. Do not proceed.

### 0. Check Research Trigger

Research triggers if ANY:
Expand Down Expand Up @@ -305,6 +329,12 @@ git add -A
git commit -m "plan(<epic-slug>): checkpoint"
```

Release the worktree lock:

```bash
rm -f .beastmode/.worktree-lock
```

Print features and their implement commands:

```
Expand Down