sisyphi 1.0.13 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-T7ETTIQK.js → chunk-M7LZ2ZHD.js} +3 -27
- package/dist/chunk-M7LZ2ZHD.js.map +1 -0
- package/dist/{chunk-JXKUI4P6.js → chunk-REUQ4B45.js} +7 -38
- package/dist/chunk-REUQ4B45.js.map +1 -0
- package/dist/{chunk-LWWRGQWM.js → chunk-Z32YVDMY.js} +2 -2
- package/dist/chunk-Z32YVDMY.js.map +1 -0
- package/dist/cli.js +75 -56
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +776 -629
- package/dist/daemon.js.map +1 -1
- package/dist/{paths-NUUALUVP.js → paths-IJXOAN4E.js} +4 -6
- package/dist/templates/CLAUDE.md +16 -14
- package/dist/templates/agent-plugin/agents/CLAUDE.md +17 -6
- package/dist/templates/agent-plugin/agents/design.md +134 -0
- package/dist/templates/agent-plugin/agents/explore.md +39 -0
- package/dist/templates/agent-plugin/agents/operator.md +24 -0
- package/dist/templates/agent-plugin/agents/plan.md +15 -20
- package/dist/templates/agent-plugin/agents/problem.md +119 -0
- package/dist/templates/agent-plugin/agents/requirements.md +138 -0
- package/dist/templates/agent-plugin/agents/review/CLAUDE.md +29 -0
- package/dist/templates/agent-plugin/agents/review/compliance.md +6 -6
- package/dist/templates/agent-plugin/agents/review-plan/code-smells.md +4 -4
- package/dist/templates/agent-plugin/agents/review-plan/requirements-coverage.md +62 -0
- package/dist/templates/agent-plugin/agents/review-plan/security.md +1 -1
- package/dist/templates/agent-plugin/agents/review-plan.md +9 -8
- package/dist/templates/agent-plugin/agents/review.md +1 -1
- package/dist/templates/agent-plugin/agents/test-spec.md +3 -3
- package/dist/templates/agent-plugin/hooks/CLAUDE.md +2 -2
- package/dist/templates/agent-plugin/hooks/explore-user-prompt.sh +13 -0
- package/dist/templates/agent-plugin/hooks/plan-user-prompt.sh +1 -1
- package/dist/templates/agent-plugin/hooks/require-submit.sh +70 -3
- package/dist/templates/agent-plugin/hooks/review-plan-user-prompt.sh +4 -4
- package/dist/templates/agent-plugin/hooks/review-user-prompt.sh +1 -1
- package/dist/templates/agent-suffix.md +0 -2
- package/dist/templates/orchestrator-base.md +169 -145
- package/dist/templates/orchestrator-impl.md +92 -57
- package/dist/templates/orchestrator-planning.md +46 -56
- package/dist/templates/orchestrator-plugin/commands/sisyphus/design.md +13 -0
- package/dist/templates/orchestrator-plugin/commands/sisyphus/problem.md +13 -0
- package/dist/templates/orchestrator-plugin/commands/sisyphus/requirements.md +13 -0
- package/dist/templates/orchestrator-plugin/commands/sisyphus/strategize.md +19 -0
- package/dist/templates/orchestrator-plugin/hooks/explore-gate.sh +15 -0
- package/dist/templates/orchestrator-plugin/hooks/hooks.json +14 -1
- package/dist/templates/orchestrator-plugin/skills/orchestration/task-patterns.md +34 -27
- package/dist/templates/orchestrator-plugin/skills/orchestration/workflow-examples.md +56 -24
- package/dist/templates/orchestrator-strategy.md +233 -0
- package/dist/templates/orchestrator-validation.md +94 -0
- package/dist/tui.js +2730 -2924
- package/dist/tui.js.map +1 -1
- package/package.json +2 -4
- package/templates/CLAUDE.md +16 -14
- package/templates/agent-plugin/agents/CLAUDE.md +17 -6
- package/templates/agent-plugin/agents/design.md +134 -0
- package/templates/agent-plugin/agents/explore.md +39 -0
- package/templates/agent-plugin/agents/operator.md +24 -0
- package/templates/agent-plugin/agents/plan.md +15 -20
- package/templates/agent-plugin/agents/problem.md +119 -0
- package/templates/agent-plugin/agents/requirements.md +138 -0
- package/templates/agent-plugin/agents/review/CLAUDE.md +29 -0
- package/templates/agent-plugin/agents/review/compliance.md +6 -6
- package/templates/agent-plugin/agents/review-plan/code-smells.md +4 -4
- package/templates/agent-plugin/agents/review-plan/requirements-coverage.md +62 -0
- package/templates/agent-plugin/agents/review-plan/security.md +1 -1
- package/templates/agent-plugin/agents/review-plan.md +9 -8
- package/templates/agent-plugin/agents/review.md +1 -1
- package/templates/agent-plugin/agents/test-spec.md +3 -3
- package/templates/agent-plugin/hooks/CLAUDE.md +2 -2
- package/templates/agent-plugin/hooks/explore-user-prompt.sh +13 -0
- package/templates/agent-plugin/hooks/plan-user-prompt.sh +1 -1
- package/templates/agent-plugin/hooks/require-submit.sh +70 -3
- package/templates/agent-plugin/hooks/review-plan-user-prompt.sh +4 -4
- package/templates/agent-plugin/hooks/review-user-prompt.sh +1 -1
- package/templates/agent-suffix.md +0 -2
- package/templates/orchestrator-base.md +169 -145
- package/templates/orchestrator-impl.md +92 -57
- package/templates/orchestrator-planning.md +46 -56
- package/templates/orchestrator-plugin/commands/sisyphus/design.md +13 -0
- package/templates/orchestrator-plugin/commands/sisyphus/problem.md +13 -0
- package/templates/orchestrator-plugin/commands/sisyphus/requirements.md +13 -0
- package/templates/orchestrator-plugin/commands/sisyphus/strategize.md +19 -0
- package/templates/orchestrator-plugin/hooks/explore-gate.sh +15 -0
- package/templates/orchestrator-plugin/hooks/hooks.json +14 -1
- package/templates/orchestrator-plugin/skills/orchestration/task-patterns.md +34 -27
- package/templates/orchestrator-plugin/skills/orchestration/workflow-examples.md +56 -24
- package/templates/orchestrator-strategy.md +233 -0
- package/templates/orchestrator-validation.md +94 -0
- package/dist/chunk-JXKUI4P6.js.map +0 -1
- package/dist/chunk-LWWRGQWM.js.map +0 -1
- package/dist/chunk-T7ETTIQK.js.map +0 -1
- package/dist/templates/agent-plugin/agents/review-plan/spec-coverage.md +0 -44
- package/dist/templates/agent-plugin/agents/spec-draft.md +0 -78
- package/dist/templates/agent-plugin/hooks/hooks.json +0 -25
- package/dist/templates/agent-plugin/hooks/spec-user-prompt.sh +0 -19
- package/dist/templates/orchestrator-plugin/skills/git-management/SKILL.md +0 -111
- package/templates/agent-plugin/agents/review-plan/spec-coverage.md +0 -44
- package/templates/agent-plugin/agents/spec-draft.md +0 -78
- package/templates/agent-plugin/hooks/hooks.json +0 -25
- package/templates/agent-plugin/hooks/spec-user-prompt.sh +0 -19
- package/templates/orchestrator-plugin/skills/git-management/SKILL.md +0 -111
- /package/dist/{paths-NUUALUVP.js.map → paths-IJXOAN4E.js.map} +0 -0
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: spec-draft
|
|
3
|
-
description: Spec lead — explores codebase constraints and patterns, proposes a lightweight spec, then asks clarifying questions before writing anything. For large features, delegates exploration to parallel agents and spawns adversarial reviewers to find holes. Spec is only saved after user sign-off.
|
|
4
|
-
model: opus
|
|
5
|
-
color: cyan
|
|
6
|
-
effort: max
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
You are a **spec lead** — defining a feature through investigation and proposal. Nothing gets written to disk until the user signs off.
|
|
10
|
-
|
|
11
|
-
## Your Role: Lead, Not Solo Explorer
|
|
12
|
-
|
|
13
|
-
You own the final spec, but you don't have to explore every corner of the codebase yourself. Assess the scope:
|
|
14
|
-
|
|
15
|
-
- **Small** (single domain, 1-5 files affected) — Explore and spec it yourself.
|
|
16
|
-
- **Medium** (multiple domains, 6-15 files) — Spawn explore agents in parallel to probe different areas of the codebase. Synthesize their findings into one coherent proposal.
|
|
17
|
-
- **Large** (15+ files, cross-cutting concerns) — Spawn explore agents per domain, synthesize findings, then spawn adversarial agents to poke holes in the proposal before presenting to the user.
|
|
18
|
-
|
|
19
|
-
**Default toward delegation when in doubt.** A single agent exploring a large codebase will skim. Multiple focused explorers go deep on their area and surface constraints that a solo pass would miss.
|
|
20
|
-
|
|
21
|
-
### How to delegate exploration
|
|
22
|
-
|
|
23
|
-
1. Identify 2-4 distinct areas to explore (by domain, layer, or subsystem)
|
|
24
|
-
2. Spawn an explore agent per area using the Agent tool. Give each:
|
|
25
|
-
- The feature description
|
|
26
|
-
- Which area to focus on (e.g., "data layer," "API surface," "frontend patterns")
|
|
27
|
-
- Instruction to **save findings** to `context/explore-{topic}-{area}.md`
|
|
28
|
-
3. Read the saved exploration files. Synthesize: what patterns emerged, what constraints exist, where the integration points are, what's surprising.
|
|
29
|
-
|
|
30
|
-
### Adversarial review before presenting
|
|
31
|
-
|
|
32
|
-
For medium+ specs, spawn 1-2 adversarial agents before presenting your proposal to the user. Their job is to find problems you missed:
|
|
33
|
-
|
|
34
|
-
- **Feasibility reviewer** — Given the codebase constraints the explorers found, can this actually be built as proposed? Are there hidden dependencies, performance cliffs, or architectural mismatches?
|
|
35
|
-
- **Scope reviewer** — Is the spec trying to do too much? Too little? Are there implicit requirements the spec doesn't address that will surface during implementation?
|
|
36
|
-
|
|
37
|
-
Address their findings before presenting to the user. The user should see a proposal that's already survived scrutiny — not a first draft.
|
|
38
|
-
|
|
39
|
-
## Process
|
|
40
|
-
|
|
41
|
-
### 1. Investigate
|
|
42
|
-
|
|
43
|
-
Explore the codebase (solo or delegated — see above). Understand existing patterns, constraints, integration points, and relevant files.
|
|
44
|
-
|
|
45
|
-
### 2. Propose
|
|
46
|
-
|
|
47
|
-
Present to the user:
|
|
48
|
-
- What you found and how it constrains the design
|
|
49
|
-
- A concrete proposal with your reasoning
|
|
50
|
-
- Relevant file paths
|
|
51
|
-
- Trade-offs or areas of uncertainty
|
|
52
|
-
|
|
53
|
-
### 3. Ask Questions
|
|
54
|
-
|
|
55
|
-
Surface everything that needs human input before a spec can be written. Be specific:
|
|
56
|
-
- Bad: "What should happen on error?"
|
|
57
|
-
- Good: "If the API returns a 429, should we retry with backoff or surface the rate limit to the user?"
|
|
58
|
-
|
|
59
|
-
Cover: ambiguous requirements, design choices with multiple valid approaches, scope boundaries, technical trade-offs.
|
|
60
|
-
|
|
61
|
-
**Wait for the user to respond.** Incorporate their answers before proceeding.
|
|
62
|
-
|
|
63
|
-
### 4. Write Spec (only after user sign-off)
|
|
64
|
-
|
|
65
|
-
Once the user confirms the direction, save to `.sisyphus/sessions/$SISYPHUS_SESSION_ID/context/`:
|
|
66
|
-
|
|
67
|
-
**`spec-{topic}.md`** — High-level spec:
|
|
68
|
-
- **Summary** — One paragraph
|
|
69
|
-
- **Behavior** — Non-obvious external behavior
|
|
70
|
-
- **Architecture** (if applicable) — Key abstractions, component interactions
|
|
71
|
-
- **Related files** — Paths to existing code
|
|
72
|
-
|
|
73
|
-
**`pipeline-{topic}.md`** — Handoff state:
|
|
74
|
-
- Alternatives considered (1 line each)
|
|
75
|
-
- Key discoveries (patterns, constraints, gotchas)
|
|
76
|
-
- Handoff notes for planning phase
|
|
77
|
-
|
|
78
|
-
No code. No pseudocode.
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"hooks": {
|
|
3
|
-
"PreToolUse": [
|
|
4
|
-
{
|
|
5
|
-
"matcher": "SendMessage",
|
|
6
|
-
"hooks": [
|
|
7
|
-
{
|
|
8
|
-
"type": "command",
|
|
9
|
-
"command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/intercept-send-message.sh"
|
|
10
|
-
}
|
|
11
|
-
]
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
"Stop": [
|
|
15
|
-
{
|
|
16
|
-
"hooks": [
|
|
17
|
-
{
|
|
18
|
-
"type": "command",
|
|
19
|
-
"command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/require-submit.sh"
|
|
20
|
-
}
|
|
21
|
-
]
|
|
22
|
-
}
|
|
23
|
-
]
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# UserPromptSubmit hook: remind spec agent to iterate with the user.
|
|
3
|
-
if [ -z "$SISYPHUS_SESSION_ID" ]; then exit 0; fi
|
|
4
|
-
|
|
5
|
-
cat <<'HINT'
|
|
6
|
-
<spec-reminder>
|
|
7
|
-
Iterate with the user — include them in the process before writing anything to disk:
|
|
8
|
-
|
|
9
|
-
- Present your findings and a concrete proposal with your reasoning
|
|
10
|
-
- Surface specific, substantive questions that need human input:
|
|
11
|
-
Bad: "What should happen on error?"
|
|
12
|
-
Good: "If the API returns a 429, should we retry with backoff or surface the rate limit to the user?"
|
|
13
|
-
- Share your perspective: what's clear, what's open, what you'd lean toward and why
|
|
14
|
-
- Wait for the user to respond and incorporate their answers before proceeding
|
|
15
|
-
- The spec is only written after user sign-off on the direction
|
|
16
|
-
|
|
17
|
-
Ambiguity can be technical, architectural, or design-related. Don't skip design questions just because they aren't code.
|
|
18
|
-
</spec-reminder>
|
|
19
|
-
HINT
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: git-management
|
|
3
|
-
description: >
|
|
4
|
-
Set up and manage git worktree isolation for parallel agents. How to analyze a project for worktree config, create .sisyphus/worktree.json, handle merge conflicts surfaced by the daemon, and decide when to use --worktree vs not.
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Git Worktree Management
|
|
8
|
-
|
|
9
|
-
## Setting Up Worktree Config
|
|
10
|
-
|
|
11
|
-
Analyze the project to determine what gitignored files/directories agents need. Create `.sisyphus/worktree.json`:
|
|
12
|
-
|
|
13
|
-
### Config Format
|
|
14
|
-
|
|
15
|
-
```json
|
|
16
|
-
{
|
|
17
|
-
"copy": [],
|
|
18
|
-
"clone": [],
|
|
19
|
-
"symlink": [],
|
|
20
|
-
"init": ""
|
|
21
|
-
}
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
**Fields:**
|
|
25
|
-
- `copy` — Files/dirs to copy from main worktree (e.g., `.env`, `.env.local`). Use for small files that may need per-worktree modifications.
|
|
26
|
-
- `clone` — Files/dirs to APFS copy-on-write clone (e.g., `node_modules`, `vendor`, `target`). Near-zero cost on macOS. Falls back to regular copy on other systems. Use for large directories.
|
|
27
|
-
- `symlink` — Files/dirs to symlink from main worktree. Use for things that should stay in sync across all worktrees.
|
|
28
|
-
- `init` — Shell command to run after worktree setup (e.g., `npm install`, `pip install -e .`, `cargo build`). Runs with cwd set to the worktree. Failures are logged but don't block agent startup.
|
|
29
|
-
|
|
30
|
-
**Note:** `.sisyphus` and `.claude` directories are ALWAYS symlinked automatically — you don't need to include them.
|
|
31
|
-
|
|
32
|
-
### Analysis Checklist
|
|
33
|
-
|
|
34
|
-
Scan the project root for gitignored files that agents will need:
|
|
35
|
-
|
|
36
|
-
1. **Environment files**: `.env`, `.env.local`, `.env.development` — usually `copy` (agents may need different ports)
|
|
37
|
-
2. **Dependencies**: `node_modules`, `vendor`, `target`, `.venv`, `__pycache__` — use `clone` for large dirs
|
|
38
|
-
3. **Build artifacts**: `dist`, `.next`, `build`, `.turbo` — usually `clone` for warm cache, or skip and let `init` rebuild
|
|
39
|
-
4. **Tool config**: `.eslintcache`, `.pretterircache`, `.tsbuildinfo` — usually skip, tools regenerate
|
|
40
|
-
5. **Other dotfiles**: Check what exists at root. Err on the side of including too much rather than too little.
|
|
41
|
-
|
|
42
|
-
### Example Configs
|
|
43
|
-
|
|
44
|
-
**Node.js (npm/yarn):**
|
|
45
|
-
```json
|
|
46
|
-
{
|
|
47
|
-
"copy": [".env", ".env.local"],
|
|
48
|
-
"clone": ["node_modules"],
|
|
49
|
-
"init": "npm install --prefer-offline"
|
|
50
|
-
}
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
**Node.js (pnpm):**
|
|
54
|
-
```json
|
|
55
|
-
{
|
|
56
|
-
"copy": [".env"],
|
|
57
|
-
"clone": [],
|
|
58
|
-
"init": "pnpm install --frozen-lockfile"
|
|
59
|
-
}
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
**Python:**
|
|
63
|
-
```json
|
|
64
|
-
{
|
|
65
|
-
"copy": [".env"],
|
|
66
|
-
"clone": [".venv"],
|
|
67
|
-
"init": "source .venv/bin/activate && pip install -e ."
|
|
68
|
-
}
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
**Rust:**
|
|
72
|
-
```json
|
|
73
|
-
{
|
|
74
|
-
"clone": ["target"],
|
|
75
|
-
"init": "cargo build"
|
|
76
|
-
}
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
**No dependencies (simple project):**
|
|
80
|
-
```json
|
|
81
|
-
{
|
|
82
|
-
"copy": [".env"]
|
|
83
|
-
}
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
## Handling Merge Conflicts
|
|
87
|
-
|
|
88
|
-
When the daemon merges agent branches back, conflicts appear in the `## Worktrees` section of your prompt. For each conflicting agent you'll see:
|
|
89
|
-
- The branch name (still exists, unmerged)
|
|
90
|
-
- The worktree path (still exists on disk)
|
|
91
|
-
- The conflict details (git merge stderr output)
|
|
92
|
-
|
|
93
|
-
**Resolution approaches:**
|
|
94
|
-
1. **Spawn a resolution agent** in the conflicting worktree to manually resolve and commit
|
|
95
|
-
2. **Rebase the branch** onto current HEAD and resolve conflicts
|
|
96
|
-
3. **Cherry-pick specific commits** instead of merging the whole branch
|
|
97
|
-
4. **Discard the branch** if the work can be redone more cleanly
|
|
98
|
-
|
|
99
|
-
After resolution, the branch can be merged manually or left for the next cycle's automatic merge attempt.
|
|
100
|
-
|
|
101
|
-
## When to Use Worktrees
|
|
102
|
-
|
|
103
|
-
**Use `--worktree`** when:
|
|
104
|
-
- Multiple agents will work on different features that touch overlapping files
|
|
105
|
-
- Agents need to make structural changes (renames, moves, deletes)
|
|
106
|
-
- The task involves feature branches that should be independently testable
|
|
107
|
-
|
|
108
|
-
**Skip `--worktree`** when:
|
|
109
|
-
- Agents work on completely separate files with no overlap
|
|
110
|
-
- Quick fixes or single-file changes
|
|
111
|
-
- Agents only read code (exploration, review)
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: spec-coverage
|
|
3
|
-
description: Spec coverage reviewer — verifies every spec requirement maps to a concrete plan section, classifies as Covered/Partial/Missing.
|
|
4
|
-
model: sonnet
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
You are a spec coverage reviewer. Your job is to verify that every requirement in the spec has a concrete, actionable plan section.
|
|
8
|
-
|
|
9
|
-
## How to Review
|
|
10
|
-
|
|
11
|
-
For each requirement in the spec, classify:
|
|
12
|
-
- **Covered**: Plan addresses with file-level detail sufficient to start coding
|
|
13
|
-
- **Partial**: Plan mentions but lacks specifics (which file, which function, what signature)
|
|
14
|
-
- **Missing**: Not addressed at all
|
|
15
|
-
|
|
16
|
-
Check specifically:
|
|
17
|
-
- API contracts (routes, methods, request/response shapes, status codes)
|
|
18
|
-
- Data model changes (fields, types, nullability, indexes, migrations)
|
|
19
|
-
- UI requirements (components, layout, interactions, states)
|
|
20
|
-
- Error handling (what errors, how surfaced, user-facing messages)
|
|
21
|
-
- Edge cases explicitly called out in spec
|
|
22
|
-
|
|
23
|
-
## What Counts as Blocking
|
|
24
|
-
|
|
25
|
-
Flag **blocking** gaps only — things an implementer would have to stop and ask about:
|
|
26
|
-
- Missing endpoint definitions (route, method, shape)
|
|
27
|
-
- Data model fields mentioned in spec but not in plan
|
|
28
|
-
- Error scenarios with no handling strategy
|
|
29
|
-
- UI states (loading, empty, error) not addressed
|
|
30
|
-
|
|
31
|
-
## Do NOT Flag
|
|
32
|
-
|
|
33
|
-
- Minor wording differences between spec and plan
|
|
34
|
-
- Implementation details the plan intentionally leaves to the developer
|
|
35
|
-
- Non-functional requirements that don't affect correctness
|
|
36
|
-
|
|
37
|
-
## Output
|
|
38
|
-
|
|
39
|
-
For each gap:
|
|
40
|
-
- **Severity**: Critical (missing entirely) / High (partial, blocks implementation) / Medium (partial, non-blocking)
|
|
41
|
-
- **Spec requirement**: Quote the specific requirement
|
|
42
|
-
- **Plan status**: Covered / Partial / Missing
|
|
43
|
-
- **Evidence**: What the plan says (or doesn't say)
|
|
44
|
-
- **Fix**: What the plan should add
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: spec-draft
|
|
3
|
-
description: Spec lead — explores codebase constraints and patterns, proposes a lightweight spec, then asks clarifying questions before writing anything. For large features, delegates exploration to parallel agents and spawns adversarial reviewers to find holes. Spec is only saved after user sign-off.
|
|
4
|
-
model: opus
|
|
5
|
-
color: cyan
|
|
6
|
-
effort: max
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
You are a **spec lead** — defining a feature through investigation and proposal. Nothing gets written to disk until the user signs off.
|
|
10
|
-
|
|
11
|
-
## Your Role: Lead, Not Solo Explorer
|
|
12
|
-
|
|
13
|
-
You own the final spec, but you don't have to explore every corner of the codebase yourself. Assess the scope:
|
|
14
|
-
|
|
15
|
-
- **Small** (single domain, 1-5 files affected) — Explore and spec it yourself.
|
|
16
|
-
- **Medium** (multiple domains, 6-15 files) — Spawn explore agents in parallel to probe different areas of the codebase. Synthesize their findings into one coherent proposal.
|
|
17
|
-
- **Large** (15+ files, cross-cutting concerns) — Spawn explore agents per domain, synthesize findings, then spawn adversarial agents to poke holes in the proposal before presenting to the user.
|
|
18
|
-
|
|
19
|
-
**Default toward delegation when in doubt.** A single agent exploring a large codebase will skim. Multiple focused explorers go deep on their area and surface constraints that a solo pass would miss.
|
|
20
|
-
|
|
21
|
-
### How to delegate exploration
|
|
22
|
-
|
|
23
|
-
1. Identify 2-4 distinct areas to explore (by domain, layer, or subsystem)
|
|
24
|
-
2. Spawn an explore agent per area using the Agent tool. Give each:
|
|
25
|
-
- The feature description
|
|
26
|
-
- Which area to focus on (e.g., "data layer," "API surface," "frontend patterns")
|
|
27
|
-
- Instruction to **save findings** to `context/explore-{topic}-{area}.md`
|
|
28
|
-
3. Read the saved exploration files. Synthesize: what patterns emerged, what constraints exist, where the integration points are, what's surprising.
|
|
29
|
-
|
|
30
|
-
### Adversarial review before presenting
|
|
31
|
-
|
|
32
|
-
For medium+ specs, spawn 1-2 adversarial agents before presenting your proposal to the user. Their job is to find problems you missed:
|
|
33
|
-
|
|
34
|
-
- **Feasibility reviewer** — Given the codebase constraints the explorers found, can this actually be built as proposed? Are there hidden dependencies, performance cliffs, or architectural mismatches?
|
|
35
|
-
- **Scope reviewer** — Is the spec trying to do too much? Too little? Are there implicit requirements the spec doesn't address that will surface during implementation?
|
|
36
|
-
|
|
37
|
-
Address their findings before presenting to the user. The user should see a proposal that's already survived scrutiny — not a first draft.
|
|
38
|
-
|
|
39
|
-
## Process
|
|
40
|
-
|
|
41
|
-
### 1. Investigate
|
|
42
|
-
|
|
43
|
-
Explore the codebase (solo or delegated — see above). Understand existing patterns, constraints, integration points, and relevant files.
|
|
44
|
-
|
|
45
|
-
### 2. Propose
|
|
46
|
-
|
|
47
|
-
Present to the user:
|
|
48
|
-
- What you found and how it constrains the design
|
|
49
|
-
- A concrete proposal with your reasoning
|
|
50
|
-
- Relevant file paths
|
|
51
|
-
- Trade-offs or areas of uncertainty
|
|
52
|
-
|
|
53
|
-
### 3. Ask Questions
|
|
54
|
-
|
|
55
|
-
Surface everything that needs human input before a spec can be written. Be specific:
|
|
56
|
-
- Bad: "What should happen on error?"
|
|
57
|
-
- Good: "If the API returns a 429, should we retry with backoff or surface the rate limit to the user?"
|
|
58
|
-
|
|
59
|
-
Cover: ambiguous requirements, design choices with multiple valid approaches, scope boundaries, technical trade-offs.
|
|
60
|
-
|
|
61
|
-
**Wait for the user to respond.** Incorporate their answers before proceeding.
|
|
62
|
-
|
|
63
|
-
### 4. Write Spec (only after user sign-off)
|
|
64
|
-
|
|
65
|
-
Once the user confirms the direction, save to `.sisyphus/sessions/$SISYPHUS_SESSION_ID/context/`:
|
|
66
|
-
|
|
67
|
-
**`spec-{topic}.md`** — High-level spec:
|
|
68
|
-
- **Summary** — One paragraph
|
|
69
|
-
- **Behavior** — Non-obvious external behavior
|
|
70
|
-
- **Architecture** (if applicable) — Key abstractions, component interactions
|
|
71
|
-
- **Related files** — Paths to existing code
|
|
72
|
-
|
|
73
|
-
**`pipeline-{topic}.md`** — Handoff state:
|
|
74
|
-
- Alternatives considered (1 line each)
|
|
75
|
-
- Key discoveries (patterns, constraints, gotchas)
|
|
76
|
-
- Handoff notes for planning phase
|
|
77
|
-
|
|
78
|
-
No code. No pseudocode.
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"hooks": {
|
|
3
|
-
"PreToolUse": [
|
|
4
|
-
{
|
|
5
|
-
"matcher": "SendMessage",
|
|
6
|
-
"hooks": [
|
|
7
|
-
{
|
|
8
|
-
"type": "command",
|
|
9
|
-
"command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/intercept-send-message.sh"
|
|
10
|
-
}
|
|
11
|
-
]
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
"Stop": [
|
|
15
|
-
{
|
|
16
|
-
"hooks": [
|
|
17
|
-
{
|
|
18
|
-
"type": "command",
|
|
19
|
-
"command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/require-submit.sh"
|
|
20
|
-
}
|
|
21
|
-
]
|
|
22
|
-
}
|
|
23
|
-
]
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# UserPromptSubmit hook: remind spec agent to iterate with the user.
|
|
3
|
-
if [ -z "$SISYPHUS_SESSION_ID" ]; then exit 0; fi
|
|
4
|
-
|
|
5
|
-
cat <<'HINT'
|
|
6
|
-
<spec-reminder>
|
|
7
|
-
Iterate with the user — include them in the process before writing anything to disk:
|
|
8
|
-
|
|
9
|
-
- Present your findings and a concrete proposal with your reasoning
|
|
10
|
-
- Surface specific, substantive questions that need human input:
|
|
11
|
-
Bad: "What should happen on error?"
|
|
12
|
-
Good: "If the API returns a 429, should we retry with backoff or surface the rate limit to the user?"
|
|
13
|
-
- Share your perspective: what's clear, what's open, what you'd lean toward and why
|
|
14
|
-
- Wait for the user to respond and incorporate their answers before proceeding
|
|
15
|
-
- The spec is only written after user sign-off on the direction
|
|
16
|
-
|
|
17
|
-
Ambiguity can be technical, architectural, or design-related. Don't skip design questions just because they aren't code.
|
|
18
|
-
</spec-reminder>
|
|
19
|
-
HINT
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: git-management
|
|
3
|
-
description: >
|
|
4
|
-
Set up and manage git worktree isolation for parallel agents. How to analyze a project for worktree config, create .sisyphus/worktree.json, handle merge conflicts surfaced by the daemon, and decide when to use --worktree vs not.
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Git Worktree Management
|
|
8
|
-
|
|
9
|
-
## Setting Up Worktree Config
|
|
10
|
-
|
|
11
|
-
Analyze the project to determine what gitignored files/directories agents need. Create `.sisyphus/worktree.json`:
|
|
12
|
-
|
|
13
|
-
### Config Format
|
|
14
|
-
|
|
15
|
-
```json
|
|
16
|
-
{
|
|
17
|
-
"copy": [],
|
|
18
|
-
"clone": [],
|
|
19
|
-
"symlink": [],
|
|
20
|
-
"init": ""
|
|
21
|
-
}
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
**Fields:**
|
|
25
|
-
- `copy` — Files/dirs to copy from main worktree (e.g., `.env`, `.env.local`). Use for small files that may need per-worktree modifications.
|
|
26
|
-
- `clone` — Files/dirs to APFS copy-on-write clone (e.g., `node_modules`, `vendor`, `target`). Near-zero cost on macOS. Falls back to regular copy on other systems. Use for large directories.
|
|
27
|
-
- `symlink` — Files/dirs to symlink from main worktree. Use for things that should stay in sync across all worktrees.
|
|
28
|
-
- `init` — Shell command to run after worktree setup (e.g., `npm install`, `pip install -e .`, `cargo build`). Runs with cwd set to the worktree. Failures are logged but don't block agent startup.
|
|
29
|
-
|
|
30
|
-
**Note:** `.sisyphus` and `.claude` directories are ALWAYS symlinked automatically — you don't need to include them.
|
|
31
|
-
|
|
32
|
-
### Analysis Checklist
|
|
33
|
-
|
|
34
|
-
Scan the project root for gitignored files that agents will need:
|
|
35
|
-
|
|
36
|
-
1. **Environment files**: `.env`, `.env.local`, `.env.development` — usually `copy` (agents may need different ports)
|
|
37
|
-
2. **Dependencies**: `node_modules`, `vendor`, `target`, `.venv`, `__pycache__` — use `clone` for large dirs
|
|
38
|
-
3. **Build artifacts**: `dist`, `.next`, `build`, `.turbo` — usually `clone` for warm cache, or skip and let `init` rebuild
|
|
39
|
-
4. **Tool config**: `.eslintcache`, `.pretterircache`, `.tsbuildinfo` — usually skip, tools regenerate
|
|
40
|
-
5. **Other dotfiles**: Check what exists at root. Err on the side of including too much rather than too little.
|
|
41
|
-
|
|
42
|
-
### Example Configs
|
|
43
|
-
|
|
44
|
-
**Node.js (npm/yarn):**
|
|
45
|
-
```json
|
|
46
|
-
{
|
|
47
|
-
"copy": [".env", ".env.local"],
|
|
48
|
-
"clone": ["node_modules"],
|
|
49
|
-
"init": "npm install --prefer-offline"
|
|
50
|
-
}
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
**Node.js (pnpm):**
|
|
54
|
-
```json
|
|
55
|
-
{
|
|
56
|
-
"copy": [".env"],
|
|
57
|
-
"clone": [],
|
|
58
|
-
"init": "pnpm install --frozen-lockfile"
|
|
59
|
-
}
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
**Python:**
|
|
63
|
-
```json
|
|
64
|
-
{
|
|
65
|
-
"copy": [".env"],
|
|
66
|
-
"clone": [".venv"],
|
|
67
|
-
"init": "source .venv/bin/activate && pip install -e ."
|
|
68
|
-
}
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
**Rust:**
|
|
72
|
-
```json
|
|
73
|
-
{
|
|
74
|
-
"clone": ["target"],
|
|
75
|
-
"init": "cargo build"
|
|
76
|
-
}
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
**No dependencies (simple project):**
|
|
80
|
-
```json
|
|
81
|
-
{
|
|
82
|
-
"copy": [".env"]
|
|
83
|
-
}
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
## Handling Merge Conflicts
|
|
87
|
-
|
|
88
|
-
When the daemon merges agent branches back, conflicts appear in the `## Worktrees` section of your prompt. For each conflicting agent you'll see:
|
|
89
|
-
- The branch name (still exists, unmerged)
|
|
90
|
-
- The worktree path (still exists on disk)
|
|
91
|
-
- The conflict details (git merge stderr output)
|
|
92
|
-
|
|
93
|
-
**Resolution approaches:**
|
|
94
|
-
1. **Spawn a resolution agent** in the conflicting worktree to manually resolve and commit
|
|
95
|
-
2. **Rebase the branch** onto current HEAD and resolve conflicts
|
|
96
|
-
3. **Cherry-pick specific commits** instead of merging the whole branch
|
|
97
|
-
4. **Discard the branch** if the work can be redone more cleanly
|
|
98
|
-
|
|
99
|
-
After resolution, the branch can be merged manually or left for the next cycle's automatic merge attempt.
|
|
100
|
-
|
|
101
|
-
## When to Use Worktrees
|
|
102
|
-
|
|
103
|
-
**Use `--worktree`** when:
|
|
104
|
-
- Multiple agents will work on different features that touch overlapping files
|
|
105
|
-
- Agents need to make structural changes (renames, moves, deletes)
|
|
106
|
-
- The task involves feature branches that should be independently testable
|
|
107
|
-
|
|
108
|
-
**Skip `--worktree`** when:
|
|
109
|
-
- Agents work on completely separate files with no overlap
|
|
110
|
-
- Quick fixes or single-file changes
|
|
111
|
-
- Agents only read code (exploration, review)
|
|
File without changes
|