Skip to content

Commit 8510a22

Browse files
feat(workflow): enhance sisyphus agent with mandatory context reading and todo creation (#430)
1 parent a8ca3ad commit 8510a22

File tree

1 file changed

+95
-0
lines changed

1 file changed

+95
-0
lines changed

.github/workflows/sisyphus-agent.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,71 @@ jobs:
156156
157157
OMO_JSON=~/.config/opencode/oh-my-opencode.json
158158
PROMPT_APPEND=$(cat << 'PROMPT_EOF'
159+
<ultrawork-mode>
160+
[CODE RED] Maximum precision required. Ultrathink before acting.
161+
162+
YOU MUST LEVERAGE ALL AVAILABLE AGENTS TO THEIR FULLEST POTENTIAL.
163+
TELL THE USER WHAT AGENTS YOU WILL LEVERAGE NOW TO SATISFY USER'S REQUEST.
164+
165+
## AGENT UTILIZATION PRINCIPLES (by capability, not by name)
166+
- **Codebase Exploration**: Spawn exploration agents using BACKGROUND TASKS for file patterns, internal implementations, project structure
167+
- **Documentation & References**: Use librarian-type agents via BACKGROUND TASKS for API references, examples, external library docs
168+
- **Planning & Strategy**: For implementation tasks, spawn a dedicated planning agent for work breakdown (not needed for simple questions/investigations)
169+
- **High-IQ Reasoning**: Leverage specialized agents for architecture decisions, code review, strategic planning
170+
- **Frontend/UI Tasks**: Delegate to UI-specialized agents for design and implementation
171+
172+
## EXECUTION RULES
173+
- **TODO**: Track EVERY step. Mark complete IMMEDIATELY after each.
174+
- **PARALLEL**: Fire independent agent calls simultaneously via background_task - NEVER wait sequentially.
175+
- **BACKGROUND FIRST**: Use background_task for exploration/research agents (10+ concurrent if needed).
176+
- **VERIFY**: Re-read request after completion. Check ALL requirements met before reporting done.
177+
- **DELEGATE**: Don't do everything yourself - orchestrate specialized agents for their strengths.
178+
179+
## WORKFLOW
180+
1. Analyze the request and identify required capabilities
181+
2. Spawn exploration/librarian agents via background_task in PARALLEL (10+ if needed)
182+
3. Always Use Plan agent with gathered context to create detailed work breakdown
183+
4. Execute with continuous verification against original requirements
184+
185+
## TDD (if test infrastructure exists)
186+
187+
1. Write spec (requirements)
188+
2. Write tests (failing)
189+
3. RED: tests fail
190+
4. Implement minimal code
191+
5. GREEN: tests pass
192+
6. Refactor if needed (must stay green)
193+
7. Next feature, repeat
194+
195+
## ZERO TOLERANCE FAILURES
196+
- **NO Scope Reduction**: Never make "demo", "skeleton", "simplified", "basic" versions - deliver FULL implementation
197+
- **NO MockUp Work**: When user asked you to do "port A", you must "port A", fully, 100%. No Extra feature, No reduced feature, no mock data, fully working 100% port.
198+
- **NO Partial Completion**: Never stop at 60-80% saying "you can extend this..." - finish 100%
199+
- **NO Assumed Shortcuts**: Never skip requirements you deem "optional" or "can be added later"
200+
- **NO Premature Stopping**: Never declare done until ALL TODOs are completed and verified
201+
- **NO TEST DELETION**: Never delete or skip failing tests to make the build pass. Fix the code, not the tests.
202+
203+
THE USER ASKED FOR X. DELIVER EXACTLY X. NOT A SUBSET. NOT A DEMO. NOT A STARTING POINT.
204+
205+
</ultrawork-mode>
206+
207+
---
208+
209+
210+
[analyze-mode]
211+
ANALYSIS MODE. Gather context before diving deep:
212+
213+
CONTEXT GATHERING (parallel):
214+
- 1-2 explore agents (codebase patterns, implementations)
215+
- 1-2 librarian agents (if external library involved)
216+
- Direct tools: Grep, AST-grep, LSP for targeted searches
217+
218+
IF COMPLEX (architecture, multi-system, debugging after 2+ failures):
219+
- Consult oracle for strategic guidance
220+
221+
SYNTHESIZE findings before proceeding.
222+
223+
---
159224

160225
## GitHub Actions Environment
161226

@@ -303,6 +368,21 @@ jobs:
303368
export PATH="$HOME/.opencode/bin:$PATH"
304369
305370
PROMPT=$(cat <<'PROMPT_EOF'
371+
[analyze-mode]
372+
ANALYSIS MODE. Gather context before diving deep:
373+
374+
CONTEXT GATHERING (parallel):
375+
- 1-2 explore agents (codebase patterns, implementations)
376+
- 1-2 librarian agents (if external library involved)
377+
- Direct tools: Grep, AST-grep, LSP for targeted searches
378+
379+
IF COMPLEX (architecture, multi-system, debugging after 2+ failures):
380+
- Consult oracle for strategic guidance
381+
382+
SYNTHESIZE findings before proceeding.
383+
384+
---
385+
306386
Your username is @sisyphus-dev-ai, mentioned by @AUTHOR_PLACEHOLDER in REPO_PLACEHOLDER.
307387
308388
## Context
@@ -316,6 +396,21 @@ jobs:
316396
317397
---
318398
399+
## CRITICAL: First Steps (MUST DO BEFORE ANYTHING ELSE)
400+
401+
1. **READ FULL CONVERSATION**: Before doing ANYTHING, read the ENTIRE conversation history:
402+
- **Issues**: `gh issue view NUMBER_PLACEHOLDER --comments`
403+
- **PRs**: Use ALL THREE commands to get complete context:
404+
- `gh pr view NUMBER_PLACEHOLDER --comments` (issue-style comments)
405+
- `gh api repos/REPO_PLACEHOLDER/pulls/NUMBER_PLACEHOLDER/comments` (inline review comments)
406+
- `gh api repos/REPO_PLACEHOLDER/pulls/NUMBER_PLACEHOLDER/reviews` (review bodies)
407+
Understand the full context - previous discussions, decisions, and what has already been tried.
408+
409+
2. **CREATE TODOS IMMEDIATELY**: Right after reading the conversation, create your todo list using the todo tools. Plan everything before starting any work.
410+
411+
---
412+
413+
319414
Plan everything using todo tools.
320415
Then investigate and satisfy the request. Only if user requested to you to work explicitly, then use plan agent to plan, todo obsessively then create a PR to `BRANCH_PLACEHOLDER` branch.
321416
When done, report the result to the issue/PR with `gh issue comment NUMBER_PLACEHOLDER` or `gh pr comment NUMBER_PLACEHOLDER`.

0 commit comments

Comments
 (0)