sisyphi 1.2.1 → 1.2.11
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/README.md +20 -20
- package/dist/cli.js +12461 -11237
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +1112 -564
- package/dist/daemon.js.map +1 -1
- package/dist/templates/agent-plugin/agents/CLAUDE.md +2 -2
- package/dist/templates/agent-plugin/agents/implementor.md +3 -2
- package/dist/templates/agent-plugin/agents/operator.md +3 -4
- package/dist/templates/agent-plugin/agents/plan.md +1 -1
- package/dist/templates/agent-plugin/agents/problem.md +20 -20
- package/dist/templates/agent-plugin/agents/research-lead.md +1 -1
- package/dist/templates/agent-plugin/agents/spec/engineer.md +9 -7
- package/dist/templates/agent-plugin/agents/spec/requirements-writer.md +1 -1
- package/dist/templates/agent-plugin/agents/spec.md +31 -25
- package/dist/templates/agent-plugin/hooks/CLAUDE.md +0 -1
- package/dist/templates/agent-plugin/hooks/ask-background-guard.sh +11 -11
- package/dist/templates/agent-plugin/hooks/intercept-send-message.sh +1 -1
- package/dist/templates/agent-plugin/hooks/operator-user-prompt.sh +2 -2
- package/dist/templates/agent-plugin/hooks/plan-validate.sh +3 -3
- package/dist/templates/agent-plugin/hooks/require-submit.sh +1 -1
- package/dist/templates/agent-plugin/skills/operator/SKILL.md +1 -1
- package/dist/templates/agent-suffix.md +4 -18
- package/dist/templates/companion-plugin/hooks/user-prompt-context.sh +1 -1
- package/dist/templates/dashboard-claude.md +15 -13
- package/dist/templates/orchestrator-base.md +44 -78
- package/dist/templates/orchestrator-completion.md +9 -11
- package/dist/templates/orchestrator-discovery.md +8 -8
- package/dist/templates/orchestrator-impl.md +6 -7
- package/dist/templates/orchestrator-planning.md +2 -2
- package/dist/templates/orchestrator-plugin/commands/sisyphus/scratch.md +1 -1
- package/dist/templates/orchestrator-plugin/commands/sisyphus/strategize.md +2 -2
- package/dist/templates/orchestrator-validation.md +1 -3
- package/dist/templates/termrender-haiku-system.md +5 -3
- package/dist/tui.js +1817 -1400
- package/dist/tui.js.map +1 -1
- package/native/build-notify.sh +2 -2
- package/package.json +3 -3
- package/templates/agent-plugin/agents/CLAUDE.md +2 -2
- package/templates/agent-plugin/agents/implementor.md +3 -2
- package/templates/agent-plugin/agents/operator.md +3 -4
- package/templates/agent-plugin/agents/plan.md +1 -1
- package/templates/agent-plugin/agents/problem.md +20 -20
- package/templates/agent-plugin/agents/research-lead.md +1 -1
- package/templates/agent-plugin/agents/spec/engineer.md +9 -7
- package/templates/agent-plugin/agents/spec/requirements-writer.md +1 -1
- package/templates/agent-plugin/agents/spec.md +31 -25
- package/templates/agent-plugin/hooks/CLAUDE.md +0 -1
- package/templates/agent-plugin/hooks/ask-background-guard.sh +11 -11
- package/templates/agent-plugin/hooks/intercept-send-message.sh +1 -1
- package/templates/agent-plugin/hooks/operator-user-prompt.sh +2 -2
- package/templates/agent-plugin/hooks/plan-validate.sh +3 -3
- package/templates/agent-plugin/hooks/require-submit.sh +1 -1
- package/templates/agent-plugin/skills/operator/SKILL.md +1 -1
- package/templates/agent-suffix.md +4 -18
- package/templates/companion-plugin/hooks/user-prompt-context.sh +1 -1
- package/templates/dashboard-claude.md +15 -13
- package/templates/orchestrator-base.md +44 -78
- package/templates/orchestrator-completion.md +9 -11
- package/templates/orchestrator-discovery.md +8 -8
- package/templates/orchestrator-impl.md +6 -7
- package/templates/orchestrator-planning.md +2 -2
- package/templates/orchestrator-plugin/commands/sisyphus/scratch.md +1 -1
- package/templates/orchestrator-plugin/commands/sisyphus/strategize.md +2 -2
- package/templates/orchestrator-validation.md +1 -3
- package/templates/termrender-haiku-system.md +5 -3
- package/dist/templates/agent-plugin/skills/humanloop/SKILL.md +0 -148
- package/dist/templates/agent-plugin/skills/operator-memory/SKILL.md +0 -64
- package/dist/templates/agent-plugin/skills/perspective-fanout/SKILL.md +0 -115
- package/dist/templates/agent-plugin/skills/problem-document/SKILL.md +0 -105
- package/dist/templates/agent-plugin/skills/problem-plateau-breakers/SKILL.md +0 -83
- package/dist/templates/orchestrator-plugin/skills/humanloop/SKILL.md +0 -150
- package/dist/templates/orchestrator-plugin/skills/orchestration/CLAUDE.md +0 -1
- package/dist/templates/orchestrator-plugin/skills/orchestration/SKILL.md +0 -29
- package/dist/templates/orchestrator-plugin/skills/orchestration/strategy.md +0 -160
- package/dist/templates/orchestrator-plugin/skills/orchestration/task-patterns.md +0 -266
- package/dist/templates/orchestrator-plugin/skills/orchestration/workflow-examples.md +0 -428
- package/templates/agent-plugin/skills/humanloop/SKILL.md +0 -148
- package/templates/agent-plugin/skills/operator-memory/SKILL.md +0 -64
- package/templates/agent-plugin/skills/perspective-fanout/SKILL.md +0 -115
- package/templates/agent-plugin/skills/problem-document/SKILL.md +0 -105
- package/templates/agent-plugin/skills/problem-plateau-breakers/SKILL.md +0 -83
- package/templates/orchestrator-plugin/skills/humanloop/SKILL.md +0 -150
- package/templates/orchestrator-plugin/skills/orchestration/CLAUDE.md +0 -1
- package/templates/orchestrator-plugin/skills/orchestration/SKILL.md +0 -29
- package/templates/orchestrator-plugin/skills/orchestration/strategy.md +0 -160
- package/templates/orchestrator-plugin/skills/orchestration/task-patterns.md +0 -266
- package/templates/orchestrator-plugin/skills/orchestration/workflow-examples.md +0 -428
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: humanloop
|
|
3
|
-
description: >
|
|
4
|
-
Read before calling `sis ask`. Triggers when surfacing multiple questions or decisions to the user, presenting work for review/sign-off, or proposing concrete alternatives. Covers when a deck beats chat, how to design options as real forks the user can pick between, how to bundle related questions into one deck, and how to submit via the Bash tool's `run_in_background` so you can end your turn while the user takes their time answering.
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Talking to the user via decks
|
|
8
|
-
|
|
9
|
-
`sis ask` posts a structured deck of questions to the user's dashboard inbox. They walk through it on their own time and you read structured JSON back. Use it instead of dumping a wall of questions into chat.
|
|
10
|
-
|
|
11
|
-
This skill covers **what to put in a deck** and **how to invoke it**. Run `sis ask -h` for the CLI shape (file path, `--session`, the `poll` and `peek` subcommands).
|
|
12
|
-
|
|
13
|
-
## Reach for a deck when
|
|
14
|
-
|
|
15
|
-
- You have **2+ questions** to surface in one beat (bundle them into one deck).
|
|
16
|
-
- You're presenting **work for review or sign-off** (a design, a plan, a completion summary).
|
|
17
|
-
- You're choosing between **concrete alternatives** the user must pick.
|
|
18
|
-
- The work will sit while the user thinks. Decks survive across cycles; chat does not.
|
|
19
|
-
|
|
20
|
-
## Skip the deck when
|
|
21
|
-
|
|
22
|
-
- It's a single, low-stakes question whose answer barely changes downstream work — just ask in chat.
|
|
23
|
-
- You can settle the question yourself by reading code or running a tool. **Default to investigating before asking.**
|
|
24
|
-
- The user is actively conversing with you — converting a live exchange into a deck adds friction.
|
|
25
|
-
|
|
26
|
-
## How to invoke
|
|
27
|
-
|
|
28
|
-
The CLI **always blocks** until the user resolves the deck (potentially 10+ minutes). Submit through the Bash tool with `run_in_background: true` and **end your turn**. Do not peek, poll, or output filler chat between submit and answer — the bash completion notification is the only signal you need; it will wake you with stdout ready to parse. Same pattern for orchestrator, sub-agents, and one-off Claude Code sessions.
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
Bash tool call:
|
|
32
|
-
command: sis ask "$deck"
|
|
33
|
-
run_in_background: true
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Stdout on completion is one line of JSON: `{responses: [{id, selectedOptionId?, freetext?}, ...], completedAt}`. Branch on each response by its interaction `id`.
|
|
37
|
-
|
|
38
|
-
If you already hold an `askId` from a prior cycle (e.g. respawned mid-wait), `sis ask poll <askId>` blocks on it and `sis ask peek <askId>` returns status without blocking. Use these only for respawn-recovery — **never to monitor a deck you just submitted in the current turn**. See `sis ask -h`.
|
|
39
|
-
|
|
40
|
-
## Designing interactions
|
|
41
|
-
|
|
42
|
-
### Each option is a concrete path forward
|
|
43
|
-
|
|
44
|
-
The user picks an option to commit to a direction. Each option should name a real path with its tradeoffs spelled out, grounded in *this* codebase. Sign-off decks branch differently per option ("looks good", "minor fixes", "moderate fixes", "scope rework" each route the orchestrator somewhere different). Decision decks present mutually exclusive directions with named consequences.
|
|
45
|
-
|
|
46
|
-
<example type="good">
|
|
47
|
-
```
|
|
48
|
-
title: "Session store backend?"
|
|
49
|
-
subtitle: "Auth needs persistent sessions across restarts"
|
|
50
|
-
kind: decision
|
|
51
|
-
options:
|
|
52
|
-
in-memory: "In-memory map — simplest. Loses sessions on restart; single-process only."
|
|
53
|
-
redis: "Redis — survives restart, supports horizontal scale. New ops dependency."
|
|
54
|
-
postgres: "Reuse existing Postgres — no new infra; ~10ms read latency vs Redis ~1ms."
|
|
55
|
-
defer: "Ship in-memory now, migrate later if scale becomes real."
|
|
56
|
-
allowFreetext: true
|
|
57
|
-
freetextLabel: "Different framing — describe it"
|
|
58
|
-
```
|
|
59
|
-
</example>
|
|
60
|
-
|
|
61
|
-
<example type="bad">
|
|
62
|
-
```
|
|
63
|
-
title: "Happy with this design?"
|
|
64
|
-
options:
|
|
65
|
-
1. Yes
|
|
66
|
-
2. No, start over
|
|
67
|
-
3. Maybe, with comments
|
|
68
|
-
4. (no option, just freetext)
|
|
69
|
-
```
|
|
70
|
-
"Happy?" names a feeling, not a fork. Options 3 and 4 both collapse to freetext, forcing the user to invent the actual decision. Rewrite as specific decisions about specific elements of the design.
|
|
71
|
-
</example>
|
|
72
|
-
|
|
73
|
-
### Use `allowFreetext: true` as a safety valve, not the primary input
|
|
74
|
-
|
|
75
|
-
Freetext catches "anything else?" — opinions or context the options didn't anticipate. When freetext IS the answer you want, write a chat message instead.
|
|
76
|
-
|
|
77
|
-
<example type="bad">
|
|
78
|
-
```
|
|
79
|
-
title: "Approve?"
|
|
80
|
-
options:
|
|
81
|
-
1. Approve
|
|
82
|
-
2. Reject
|
|
83
|
-
3. Comment
|
|
84
|
-
allowFreetext: true
|
|
85
|
-
```
|
|
86
|
-
A freetext form wearing option clothing. Either name what "reject" actually routes to (back to design? abandon? try a different framing?), or drop the deck and ask in chat.
|
|
87
|
-
</example>
|
|
88
|
-
|
|
89
|
-
### Bound option count to 2–4
|
|
90
|
-
|
|
91
|
-
Above four, options become too granular for the user to weigh; below two, you've collapsed into a yes/no that's faster to ask in chat.
|
|
92
|
-
|
|
93
|
-
### Ground options in what you've already gathered
|
|
94
|
-
|
|
95
|
-
Each option label should reference specifics from the codebase, plan, or exploration you just did — file names, framework constraints, prior decisions. When you can't fill in specifics, investigate before asking.
|
|
96
|
-
|
|
97
|
-
### One concern per interaction
|
|
98
|
-
|
|
99
|
-
When two questions interact, give them separate `id` / `title` / `options` inside the same deck (see Bundling below). One interaction asks one thing.
|
|
100
|
-
|
|
101
|
-
## `kind` — display hint
|
|
102
|
-
|
|
103
|
-
| kind | use for |
|
|
104
|
-
|---|---|
|
|
105
|
-
| `decision` | fork in the road; user picks a path forward |
|
|
106
|
-
| `validation` | sign-off on completed work |
|
|
107
|
-
| `notify` | FYI; user acknowledges |
|
|
108
|
-
| `context` | surfacing background that needs a response |
|
|
109
|
-
| `error` | something went wrong; user picks a recovery |
|
|
110
|
-
|
|
111
|
-
The dashboard uses `kind` for inbox icons and sort weight. Mis-tagging trains the user to ignore the icons. Pick the closest fit.
|
|
112
|
-
|
|
113
|
-
## Bundling
|
|
114
|
-
|
|
115
|
-
If you'd otherwise submit two decks in the same beat, merge them. One deck with multiple `interactions` is one context switch for the user; two decks is two.
|
|
116
|
-
|
|
117
|
-
```bash
|
|
118
|
-
deck="$SISYPHUS_SESSION_DIR/context/.ask-$(date +%s).json"
|
|
119
|
-
cat > "$deck" <<'EOF'
|
|
120
|
-
{
|
|
121
|
-
"title": "Phase 2 sign-off + follow-on decisions",
|
|
122
|
-
"interactions": [
|
|
123
|
-
{
|
|
124
|
-
"id": "approve-phase-2",
|
|
125
|
-
"title": "Phase 2 looks good?",
|
|
126
|
-
"kind": "validation",
|
|
127
|
-
"options": [...]
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
"id": "phase-3-scope",
|
|
131
|
-
"title": "Phase 3 scope?",
|
|
132
|
-
"kind": "decision",
|
|
133
|
-
"options": [...]
|
|
134
|
-
}
|
|
135
|
-
]
|
|
136
|
-
}
|
|
137
|
-
EOF
|
|
138
|
-
# Then invoke `sis ask "$deck"` via the Bash tool with run_in_background: true.
|
|
139
|
-
# Each interaction returns its own selectedOptionId / freetext in output.responses[], indexed by id.
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
## Submission notes
|
|
143
|
-
|
|
144
|
-
- The deck is validated at submit (precise errors — trust them).
|
|
145
|
-
- `kind` is an enum: `notify` | `validation` | `decision` | `context` | `error`. No other values accepted (see the table above for which to pick).
|
|
146
|
-
- `bodyPath` points at a markdown file instead of inlining the body in JSON. The path is resolved **relative to the deck JSON's directory** and must stay inside it (no `..`, no symlinks out, no absolute paths pointing elsewhere). Practical pattern: write the deck JSON next to its body file — e.g. both inside `$SISYPHUS_SESSION_DIR/context/` — and use a basename like `"completion-summary.md"`. Mutually exclusive with `body`.
|
|
147
|
-
- On completion, stdout is one line of JSON: `{responses, completedAt}`. Parse `responses[]` and dispatch on each interaction's `id`.
|
|
148
|
-
- See `sis ask -h` for the full CLI surface.
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: operator-memory
|
|
3
|
-
description: Use right before the operator agent submits its final report. Provides guidance for updating the project-local operator memory at .sisyphus/agent-plugin/skills/operator/ — what to capture, where to put it (SKILL.md vs a new reference file), naming conventions, and what to skip. Defers to /authoring:skills for generic skill conventions (frontmatter, length budgets, structure).
|
|
4
|
-
user-invocable: false
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Updating operator memory
|
|
8
|
-
|
|
9
|
-
You're about to submit. Spend a minute capturing what the next operator should not have to rediscover.
|
|
10
|
-
|
|
11
|
-
The memory lives at `.sisyphus/agent-plugin/skills/operator/`:
|
|
12
|
-
- `SKILL.md` — the high-level map of this app's surfaces and operations
|
|
13
|
-
- per-task-family reference files alongside it (`auth.md`, `db-reset.md`, `checkout-flow.md`, etc.)
|
|
14
|
-
|
|
15
|
-
## When to update (and when NOT to)
|
|
16
|
-
|
|
17
|
-
The bar is **"will future operators benefit from this?"** Specifics:
|
|
18
|
-
|
|
19
|
-
UPDATE when you discovered:
|
|
20
|
-
- A repeatable operational procedure (login flow, db reset, seed step, environment toggle)
|
|
21
|
-
- A surface that wasn't obvious (admin route, debug overlay, hidden flag, internal port)
|
|
22
|
-
- A footgun you hit and worked around (race condition, ordering requirement, stale-cache trap)
|
|
23
|
-
- A convention this app uses that differs from defaults (custom auth headers, non-standard ports, weird redirect chains)
|
|
24
|
-
|
|
25
|
-
DON'T update when:
|
|
26
|
-
- It's session-specific state (this user's email, this session's seeded data)
|
|
27
|
-
- It's a one-off observation that won't reproduce
|
|
28
|
-
- It's already covered (read existing files first — duplication is worse than nothing)
|
|
29
|
-
- It's about the codebase, not about operating the app — that's the orchestrator's domain, not yours
|
|
30
|
-
|
|
31
|
-
## SKILL.md vs a reference file
|
|
32
|
-
|
|
33
|
-
**SKILL.md** is the high-level map. It answers "what surfaces does this app have, what are the most common operations, where do I find deep dives?" Keep it dense — under ~80 lines. Each entry is a line or two with a pointer.
|
|
34
|
-
|
|
35
|
-
**A reference file** is the deep dive for one task family. It answers "exactly how do I do X step by step in this project". Each file has scope: `auth.md`, `db-reset.md`, `checkout-flow.md`, `feature-flags.md`.
|
|
36
|
-
|
|
37
|
-
Decision rule:
|
|
38
|
-
- New task family the operator might face → new reference file (and add a one-line entry to SKILL.md's Reference Files section).
|
|
39
|
-
- Refinement to existing knowledge → update the existing reference file or SKILL.md.
|
|
40
|
-
- A surface name you keep referencing → add it to SKILL.md's App Surfaces section once.
|
|
41
|
-
|
|
42
|
-
## Naming conventions
|
|
43
|
-
|
|
44
|
-
- Reference files: kebab-case, task-family scope, no `operator-` prefix (the directory already implies it), `.md` extension.
|
|
45
|
-
- Good: `auth.md`, `admin-panel.md`, `db-reset.md`, `feature-flags.md`.
|
|
46
|
-
- Bad: `operator-auth.md`, `flows.md`, `notes.md`, `stuff.md`.
|
|
47
|
-
- One file per task family. If `auth.md` exists, append to it; don't create `auth-new.md` or `auth-2.md`.
|
|
48
|
-
|
|
49
|
-
## How to update
|
|
50
|
-
|
|
51
|
-
1. **Read first.** Open the current `SKILL.md` and any reference file you'll touch — orient before writing. Avoid duplicating what's already there.
|
|
52
|
-
2. **Write/edit with the Write or Edit tool.** The directory already exists at `.sisyphus/agent-plugin/skills/operator/` (the hook scaffolds it on first run).
|
|
53
|
-
3. **Keep prose dense.** The next operator pays in tokens for everything you write. If a step is obvious, omit it.
|
|
54
|
-
4. **Register new reference files** by adding a one-line entry to `SKILL.md`'s "Reference files" section so they're discoverable.
|
|
55
|
-
|
|
56
|
-
For frontmatter, length budgets, and general skill structure rules, invoke `/authoring:skills`. Don't reinvent those rules here — this skill only covers operator-specific guidance.
|
|
57
|
-
|
|
58
|
-
## Examples
|
|
59
|
-
|
|
60
|
-
**Discovered magic-link auth flow:** Create `auth.md` with the steps (email submit → check inbox → click link → cookie set). Add a one-liner to `SKILL.md` App Surfaces (`/login` — magic-link, see `auth.md`). Add to Common Operational Patterns (`Log in: see auth.md`).
|
|
61
|
-
|
|
62
|
-
**Hit a stale-cache footgun:** The `/dashboard` route serves stale data for ~30s after a write because of an SWR cache. Add a single bullet to `SKILL.md` Known Footguns: `Dashboard SWR cache holds stale data ~30s after writes — hard refresh or wait`. No new reference file needed — it's a one-liner.
|
|
63
|
-
|
|
64
|
-
**Found admin overlay:** `?admin=1` query param toggles an admin panel with seed/reset buttons. Add to `SKILL.md` App Surfaces: `Admin overlay: append ?admin=1 to any page; has seed/reset/feature-flag buttons`. If the overlay is rich enough to need step-by-step coverage, create `admin-panel.md` and link from there.
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: perspective-fanout
|
|
3
|
-
description: >
|
|
4
|
-
Load when the problem-agent dialogue has produced enough substance to react to but conclusions haven't hardened — typically four or more turns in, with a framing solidifying. Provides the protocol for spawning eight perspective sub-agents in parallel, synthesizing their outputs, and presenting the synthesis back to the user via a render+deck pair. Available only at MEDIUM, HIGH, or XHIGH effort.
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Perspective fanout
|
|
8
|
-
|
|
9
|
-
Spawn the eight perspective lenses as parallel sub-agents to challenge convergence before the framing locks in. The agents operate from a shared problem statement so their outputs are directly comparable. After they return, synthesize and surface to the user — convergence, surprises, insights — as the seed for the next dialogue turn.
|
|
10
|
-
|
|
11
|
-
## When to spawn
|
|
12
|
-
|
|
13
|
-
- The conversation has substance to react to (typically four or more turns in)
|
|
14
|
-
- A framing is starting to solidify
|
|
15
|
-
- You want to challenge convergence, not rescue a stalled discussion
|
|
16
|
-
- You have already formed your own take
|
|
17
|
-
|
|
18
|
-
If the conversation is stalled, use a plateau-breaker instead — perspective fanout needs material to push against.
|
|
19
|
-
|
|
20
|
-
## Before spawning: write the shared problem statement
|
|
21
|
-
|
|
22
|
-
Two or three sentences, given verbatim to all eight agents:
|
|
23
|
-
|
|
24
|
-
- What's happening (or not happening)
|
|
25
|
-
- What's been considered so far (from your exploration and the user input)
|
|
26
|
-
- What a good outcome looks like
|
|
27
|
-
|
|
28
|
-
This shared framing is what makes the eight outputs comparable. Different framings produce different conversations and the synthesis collapses.
|
|
29
|
-
|
|
30
|
-
## The eight lenses
|
|
31
|
-
|
|
32
|
-
Spawn one sub-agent per lens, all in the background, in parallel:
|
|
33
|
-
|
|
34
|
-
| Lens | Brief |
|
|
35
|
-
|---|---|
|
|
36
|
-
| First Principles | Strip away assumptions. What is the actual problem at its most fundamental level? |
|
|
37
|
-
| User Empathy | Forget the code. What does the person using this actually need? |
|
|
38
|
-
| Simplifier | What can be deleted, removed, or skipped? The best solution might be no solution. |
|
|
39
|
-
| Systems Thinker | Zoom out. What are the second-order effects? What breaks downstream? |
|
|
40
|
-
| Contrarian | Take the opposite position of whatever seems obvious. |
|
|
41
|
-
| Time Traveler | Six months from now, what will we wish we had done? |
|
|
42
|
-
| Adversarial | Assume the current approach is wrong. Find the flaw, the hidden assumption that breaks under stress. |
|
|
43
|
-
| Precedent | Has this been solved before? In this codebase, in open source, in a different domain entirely? |
|
|
44
|
-
|
|
45
|
-
Continue the conversation with the user while the agents run. Do not block.
|
|
46
|
-
|
|
47
|
-
## Synthesis
|
|
48
|
-
|
|
49
|
-
When the eight return, write to `$SISYPHUS_SESSION_DIR/context/perspective-synthesis.md` covering:
|
|
50
|
-
|
|
51
|
-
- **Convergence** — where multiple lenses pointed the same direction (signal worth trusting)
|
|
52
|
-
- **Surprises** — which perspective said something nobody else did (potential breakthroughs)
|
|
53
|
-
- **Insights** — name each key finding in a memorable sentence the user can carry forward
|
|
54
|
-
|
|
55
|
-
Then render in the side pane:
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
termrender --tmux "$SISYPHUS_SESSION_DIR/context/perspective-synthesis.md"
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Bail on non-zero exit with the file path and exit code.
|
|
62
|
-
|
|
63
|
-
## Surface to the user
|
|
64
|
-
|
|
65
|
-
Issue the synthesis deck. No `${var}` shell assignments needed; angle-bracket placeholders are pre-substituted:
|
|
66
|
-
|
|
67
|
-
- `<one-line convergence>` — where multiple lenses pointed the same direction
|
|
68
|
-
- `<one-line surprise>` — what a single lens said that nobody else did
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
synth_deck="$SISYPHUS_SESSION_DIR/context/.ask-problem-synth-$(date +%s)-$$.json"
|
|
72
|
-
cat > "$synth_deck" <<EOF
|
|
73
|
-
{
|
|
74
|
-
"interactions": [{
|
|
75
|
-
"id": "problem-perspective-synth",
|
|
76
|
-
"title": "Lens synthesis",
|
|
77
|
-
"subtitle": "After 8 perspective agents",
|
|
78
|
-
"body": "## In the side pane\n\n- Synthesis rendered via termrender — scroll and react below.\n\n## What I'm hearing\n\n- <one-line convergence>\n- <one-line surprise>",
|
|
79
|
-
"kind": "decision",
|
|
80
|
-
"options": [
|
|
81
|
-
{"id": "breakthrough", "label": "Breakthrough — this lens reframes it"},
|
|
82
|
-
{"id": "useful", "label": "Useful but not load-bearing"},
|
|
83
|
-
{"id": "wrong-direction", "label": "Wrong direction — discard"},
|
|
84
|
-
{"id": "mixed", "label": "Mixed — see freetext"}
|
|
85
|
-
],
|
|
86
|
-
"allowFreetext": true,
|
|
87
|
-
"freetextLabel": "Which lens, what landed, what's still missing"
|
|
88
|
-
}]
|
|
89
|
-
}
|
|
90
|
-
EOF
|
|
91
|
-
result=$(sis ask "$synth_deck") || { sis agent submit "Synthesis deck failed — deck: $synth_deck"; exit 1; }
|
|
92
|
-
[ -n "$result" ] || { sis agent submit "Synthesis deck: empty result — deck: $synth_deck"; exit 1; }
|
|
93
|
-
choice=$(echo "$result" | jq -r '.responses[0].selectedOptionId // empty')
|
|
94
|
-
notes=$(echo "$result" | jq -r '.responses[0].freetext // ""')
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
## Routing after synthesis
|
|
98
|
-
|
|
99
|
-
All four option ids return to the dialogue loop's turn-deck flow.
|
|
100
|
-
|
|
101
|
-
- `breakthrough`, `useful`, `mixed` — carry the synthesis forward into the next turn's framing (the next turn deck body should reference what landed)
|
|
102
|
-
- `wrong-direction` — discards the synthesis but does not exit the loop
|
|
103
|
-
- `notes` flows into the next turn's framing regardless of `choice`
|
|
104
|
-
|
|
105
|
-
**Increment the turn counter `N`** before issuing the next turn deck. Skipping the increment produces two consecutive `Turn N — <lens>` subtitles with the same N, breaking inbox scannability.
|
|
106
|
-
|
|
107
|
-
## Failure handling
|
|
108
|
-
|
|
109
|
-
- If more than four of eight agents return errors, surface partial results if any returned cleanly, otherwise bail
|
|
110
|
-
- If `termrender --tmux` fails on the synthesis render, bail with file path and exit code
|
|
111
|
-
- If the synthesis deck fails or returns empty, bail with the deck path
|
|
112
|
-
|
|
113
|
-
## Body content rules
|
|
114
|
-
|
|
115
|
-
The deck `body` field uses `##` headings, bullet lists, and bold only — no tables, no code fences, no termrender directives.
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: problem-document
|
|
3
|
-
description: >
|
|
4
|
-
Load when ready to draft `context/problem.md` — the thinking artifact that orients downstream agents (spec, plan, implement) to why the work exists. Provides design principles, the section vocabulary to pick from, and an anchor example showing the target style. Use this before writing the draft, not after.
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Designing the problem document
|
|
8
|
-
|
|
9
|
-
The problem document is a **thinking artifact**, not a spec. Its job is to orient downstream agents (spec, plan, implement) to *why* the work exists — what hurts, what's the non-obvious trick, what matters, what's risky — tightly enough that they can read the whole thing in under thirty seconds.
|
|
10
|
-
|
|
11
|
-
## Design principles
|
|
12
|
-
|
|
13
|
-
- **Scannable, not exhaustive.** A downstream agent reads this once before doing real work. It needs to walk away with the right mental model, not every detail of the conversation that produced it.
|
|
14
|
-
- **Sections are a vocabulary, not a checklist.** Use the sections that earn their place for *this* problem. Skip ones that don't. Add ones that do. Different problems need different shapes.
|
|
15
|
-
- **Each section answers a question a downstream agent would ask:** "What hurts? What's the trick? What are we building? Why is it tricky? What does done look like? What can't we do? What's still up in the air?" If a section doesn't answer one of those, cut it.
|
|
16
|
-
- **Tables and bullets do the structural work; prose fills gaps where tables would feel forced.** A central decision shown as a 2-row table is worth ten sentences of paragraph.
|
|
17
|
-
- **No alternatives section.** The forks you considered and rejected lived in the conversation — they don't need to live in the artifact. Downstream agents care about the path forward, not the paths not taken.
|
|
18
|
-
- **Length follows from clarity, not from rules.** When the thinking is crisp, the document is short on its own. If a section feels like it wants more words, the answer is usually to tighten the thinking, not expand the section.
|
|
19
|
-
|
|
20
|
-
## Section vocabulary
|
|
21
|
-
|
|
22
|
-
Pick what earns its place; rename freely.
|
|
23
|
-
|
|
24
|
-
- **The pain / what's wrong** — what hurts and why now
|
|
25
|
-
- **Key insight** — the non-obvious understanding that reframes the problem
|
|
26
|
-
- **What we're building** — the artifact(s) or change(s) the work produces
|
|
27
|
-
- **Why it's tricky** — failure modes, mental traps, things that defeat the obvious approach
|
|
28
|
-
- **What success looks like** — concrete outcomes, not metrics theater
|
|
29
|
-
- **Constraints** — what bounds the solution (not assumptions, not anti-goals — actual bounds)
|
|
30
|
-
- **Open questions** — unresolved choices the next phase needs to make
|
|
31
|
-
|
|
32
|
-
## Anchor example
|
|
33
|
-
|
|
34
|
-
This is the target style — terse, scannable, structured by what serves the content rather than by template:
|
|
35
|
-
|
|
36
|
-
<example>
|
|
37
|
-
# Session debugging is too expensive to do
|
|
38
|
-
|
|
39
|
-
## The pain
|
|
40
|
-
When a sisyphus session produces unexpected output, the maintainer can't
|
|
41
|
-
cheaply learn from it. The choice is between re-teaching Claude the
|
|
42
|
-
architecture every conversation, or doing manual archaeology across raw
|
|
43
|
-
JSONL files. Both are expensive enough that the learning loop gets skipped
|
|
44
|
-
entirely.
|
|
45
|
-
|
|
46
|
-
## Key insight
|
|
47
|
-
The data is already on disk — sisyphus just doesn't read it. Every agent's
|
|
48
|
-
full transcript lives at `~/.claude/projects/<cwd>/<sessionId>.jsonl` with
|
|
49
|
-
file touches, tokens, subagent spawns, and timing. The fix is a reader, not
|
|
50
|
-
new instrumentation.
|
|
51
|
-
|
|
52
|
-
## The two artifacts
|
|
53
|
-
|
|
54
|
-
| What | Why it's needed |
|
|
55
|
-
|---|---|
|
|
56
|
-
| **Debugging toolkit** (CLI verbs) | Cheap "what happened in session X" lookups Claude can compose with grep/jq |
|
|
57
|
-
| **Architecture skill** (SKILL.md) | A mental model Claude can pull when reasoning about sisyphus runtime — the novel multi-agent design defeats its priors |
|
|
58
|
-
|
|
59
|
-
Useless apart, powerful together. The toolkit answers *what*; the skill
|
|
60
|
-
answers *how to make sense of what*.
|
|
61
|
-
|
|
62
|
-
## Why the skill matters
|
|
63
|
-
|
|
64
|
-
Claude's failure modes when reasoning about sisyphus are predictable:
|
|
65
|
-
- Treats the orchestrator as a long-running process with memory (it's
|
|
66
|
-
stateless, fork-per-cycle)
|
|
67
|
-
- Conflates sisyphus-managed agents with Claude-Code-managed Task-tool
|
|
68
|
-
subagents
|
|
69
|
-
- Misses that "completed" means three different things at three levels
|
|
70
|
-
- Loses track of which channel agents communicate over
|
|
71
|
-
|
|
72
|
-
These aren't undocumented — they're scattered across CLAUDE.md files framed
|
|
73
|
-
as traps, not mental models. The skill is synthesis with decision heuristics,
|
|
74
|
-
not new philosophy.
|
|
75
|
-
|
|
76
|
-
## What success looks like
|
|
77
|
-
|
|
78
|
-
- Maintainer says "investigate session X", Claude pulls the skill, runs a
|
|
79
|
-
couple of CLI queries, gives a grounded diagnosis citing real file paths
|
|
80
|
-
and JSONL evidence — no re-teaching
|
|
81
|
-
- Same skill loads automatically for high-level architecture discussions,
|
|
82
|
-
not just debugging
|
|
83
|
-
- Zero new instrumentation — derived from data already on disk plus a
|
|
84
|
-
one-line fix to complete an existing index
|
|
85
|
-
|
|
86
|
-
## Constraints
|
|
87
|
-
|
|
88
|
-
- Claude Code JSONL format isn't a stable contract — reader must degrade
|
|
89
|
-
gracefully if Anthropic changes it
|
|
90
|
-
- Codex/OpenAI agents have no equivalent transcript — known blind spot,
|
|
91
|
-
not in scope
|
|
92
|
-
|
|
93
|
-
## Open questions
|
|
94
|
-
|
|
95
|
-
- Skill scope: one broad "sisyphus" skill (architecture + debugging) or
|
|
96
|
-
split into two?
|
|
97
|
-
- Pre-fix sessions: accept they're harder to debug, or add an mtime-proximity
|
|
98
|
-
fallback in the reader?
|
|
99
|
-
</example>
|
|
100
|
-
|
|
101
|
-
Notice what this example *doesn't* have: no "Alternatives Considered," no "Assumptions" section, no "User Experience" header (folded into success), no "Anti-Goals." Each section earned its place because the content needed it. A different problem would skip "Why the skill matters" and add "Migration path" or "User flows" — whatever the content demands.
|
|
102
|
-
|
|
103
|
-
## Bifurcation case
|
|
104
|
-
|
|
105
|
-
If the conversation revealed that the scope contains **independent sub-problems** rather than one problem with sub-parts, do not write a unified `problem.md`. Instead, use the bifurcation-exit pattern from the agent prompt — the orchestrator handles re-entering discovery for each sub-problem.
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: problem-plateau-breakers
|
|
3
|
-
description: >
|
|
4
|
-
Load when the problem-agent dialogue loop signals the conversation has stalled — repeated circling, user freetext like "different angle" / "going nowhere" / "feels stuck", or the agent senses it has been chasing the same framing for several turns without traction. Provides four breaker-deck shapes (flip, zoom-out, zoom-in, name-tension) and the routing for each. Increments the turn counter and returns control to the dialogue loop.
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Plateau-breaker decks
|
|
8
|
-
|
|
9
|
-
When the conversation circles, the user wants a *different shape of question*, not another variation of the same one. Pick the breaker whose move matches the stall pattern, issue the deck, then resume the turn loop.
|
|
10
|
-
|
|
11
|
-
## Pick the breaker type
|
|
12
|
-
|
|
13
|
-
| Type | Use when | Move |
|
|
14
|
-
|---|---|---|
|
|
15
|
-
| `flip` | The conversation keeps assuming a position is correct | Embrace the opposite — what changes if we believed the inverse? |
|
|
16
|
-
| `zoom-out` | The conversation is litigating details before establishing whether they matter | Step back — does this distinction even change the outcome? |
|
|
17
|
-
| `zoom-in` | The conversation is trading abstractions without testing them against a real case | Pick a concrete scenario and see if the framing survives |
|
|
18
|
-
| `name-tension` | Two values are being held in tension without naming the trade-off | Surface the tension itself as the question |
|
|
19
|
-
|
|
20
|
-
Choose one per stall. Do not chain breakers — if a breaker doesn't unstick the conversation, the next one is the *next* stall, counted toward the repeated-stuck guard.
|
|
21
|
-
|
|
22
|
-
## Issue the deck
|
|
23
|
-
|
|
24
|
-
Required prior assignments before the heredoc:
|
|
25
|
-
- `type` — one of `flip` / `zoom-out` / `zoom-in` / `name-tension`
|
|
26
|
-
|
|
27
|
-
Angle-bracket placeholders (substitute literally before writing the heredoc):
|
|
28
|
-
- `<observation>` — what the conversation has been circling
|
|
29
|
-
- `<reframe>` — provisional alternative tied to the breaker type
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
type=flip # or zoom-out / zoom-in / name-tension
|
|
33
|
-
deck="$SISYPHUS_SESSION_DIR/context/.ask-problem-plateau-${type}-$(date +%s)-$$.json"
|
|
34
|
-
cat > "$deck" <<EOF
|
|
35
|
-
{
|
|
36
|
-
"interactions": [{
|
|
37
|
-
"id": "problem-plateau-${type}",
|
|
38
|
-
"title": "Plateau breaker",
|
|
39
|
-
"subtitle": "Plateau breaker — ${type}",
|
|
40
|
-
"body": "## Stalled\n\n- <observation>\n\n## Reframe\n\n- <reframe>",
|
|
41
|
-
"kind": "decision",
|
|
42
|
-
"options": [
|
|
43
|
-
<options for this type — see table below>
|
|
44
|
-
],
|
|
45
|
-
"allowFreetext": true,
|
|
46
|
-
"freetextLabel": "Or describe the angle differently"
|
|
47
|
-
}]
|
|
48
|
-
}
|
|
49
|
-
EOF
|
|
50
|
-
result=$(sis ask "$deck") || { sis agent submit "Plateau-breaker deck failed — type: $type — deck: $deck"; exit 1; }
|
|
51
|
-
[ -n "$result" ] || { sis agent submit "Plateau-breaker deck: empty result — type: $type — deck: $deck"; exit 1; }
|
|
52
|
-
choice=$(echo "$result" | jq -r '.responses[0].selectedOptionId // empty')
|
|
53
|
-
notes=$(echo "$result" | jq -r '.responses[0].freetext // ""')
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
## Per-breaker options
|
|
57
|
-
|
|
58
|
-
Pre-substitute the matching row before writing the heredoc:
|
|
59
|
-
|
|
60
|
-
| `type` | Options (id / label) |
|
|
61
|
-
|---|---|
|
|
62
|
-
| `flip` | `embrace-flipped` / "Embrace the flipped position" · `stick-original` / "Stick with original" · `merge-both` / "Merge both" |
|
|
63
|
-
| `zoom-out` | `drop-doesnt-matter` / "Doesn't matter — drop" · `smaller-scope` / "Matters but smaller" · `matters-as-is` / "Matters as is" |
|
|
64
|
-
| `zoom-in` | `scenario-breaks-it` / "This scenario breaks it" · `scenario-holds` / "Scenario holds" · `different-scenario` / "Different scenario" |
|
|
65
|
-
| `name-tension` | `pick-side-A` / "Pick A" · `pick-side-B` / "Pick B" · `tension-itself` / "The tension itself is the problem" |
|
|
66
|
-
|
|
67
|
-
## After the response
|
|
68
|
-
|
|
69
|
-
Increment the turn counter `N` and return to the dialogue loop's turn-deck flow. The user's `choice` and `notes` flow into the next turn's framing.
|
|
70
|
-
|
|
71
|
-
## Body content rules
|
|
72
|
-
|
|
73
|
-
The deck `body` field uses `##` headings, bullet lists, and bold only — no tables, no code fences, no termrender directives. Violations fail `termrender --check` inside `parseDeck`.
|
|
74
|
-
|
|
75
|
-
## Sanitize freetext on bail
|
|
76
|
-
|
|
77
|
-
If you bail with the user's freetext in the message, sanitize it first:
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
safe_notes=$(printf '%s' "$notes" | tr -d '`$"\\')
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
Raw `"$notes"` in a shell-interpolated bail message is a defect.
|