Skip to content

Commit 6422ff2

Browse files
feat(workflow): restore sisyphus agent enhancements with ultrawork/analyze-mode (#439)
Re-implements the workflow enhancements that were reverted in #437. Changes: - Add ultrawork-mode section with agent utilization principles, execution rules, TDD workflow, and zero-tolerance failure guidelines - Add analyze-mode section for context gathering before execution - Add CRITICAL: First Steps section requiring full conversation reading and immediate todo creation - Includes PR inline review comments and review bodies in context gathering This restores the functionality from #430 to ensure the agent: - Reads full issue/PR context before taking action - Creates todos immediately after reading context - Follows structured parallel execution patterns Co-authored-by: sisyphus-dev-ai <[email protected]>
1 parent 3c27206 commit 6422ff2

File tree

1 file changed

+95
-1
lines changed

1 file changed

+95
-1
lines changed

.github/workflows/sisyphus-agent.yml

Lines changed: 95 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ jobs:
2121
github.event.comment.user.login != 'sisyphus-dev-ai' &&
2222
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association))
2323
24-
# Minimal default GITHUB_TOKEN permissions
2524
permissions:
2625
contents: read
2726

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

160224
## GitHub Actions Environment
161225

@@ -303,6 +367,21 @@ jobs:
303367
export PATH="$HOME/.opencode/bin:$PATH"
304368
305369
PROMPT=$(cat <<'PROMPT_EOF'
370+
[analyze-mode]
371+
ANALYSIS MODE. Gather context before diving deep:
372+
373+
CONTEXT GATHERING (parallel):
374+
- 1-2 explore agents (codebase patterns, implementations)
375+
- 1-2 librarian agents (if external library involved)
376+
- Direct tools: Grep, AST-grep, LSP for targeted searches
377+
378+
IF COMPLEX (architecture, multi-system, debugging after 2+ failures):
379+
- Consult oracle for strategic guidance
380+
381+
SYNTHESIZE findings before proceeding.
382+
383+
---
384+
306385
Your username is @sisyphus-dev-ai, mentioned by @AUTHOR_PLACEHOLDER in REPO_PLACEHOLDER.
307386
308387
## Context
@@ -316,6 +395,21 @@ jobs:
316395
317396
---
318397
398+
## CRITICAL: First Steps (MUST DO BEFORE ANYTHING ELSE)
399+
400+
1. **READ FULL CONVERSATION**: Before doing ANYTHING, read the ENTIRE conversation history:
401+
- **Issues**: `gh issue view NUMBER_PLACEHOLDER --comments`
402+
- **PRs**: Use ALL THREE commands to get complete context:
403+
- `gh pr view NUMBER_PLACEHOLDER --comments` (issue-style comments)
404+
- `gh api repos/REPO_PLACEHOLDER/pulls/NUMBER_PLACEHOLDER/comments` (inline review comments)
405+
- `gh api repos/REPO_PLACEHOLDER/pulls/NUMBER_PLACEHOLDER/reviews` (review bodies)
406+
Understand the full context - previous discussions, decisions, and what has already been tried.
407+
408+
2. **CREATE TODOS IMMEDIATELY**: Right after reading the conversation, create your todo list using the todo tools. Plan everything before starting any work.
409+
410+
---
411+
412+
319413
Plan everything using todo tools.
320414
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.
321415
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)