| name | idumb-workflow |
| description | Guides the implementation of the iDumb plugin reboot following the 8-phase pivotal trial methodology. Use when building TypeScript engines, tools, and hooks for intelligent AI governance. |
iDumb Plugin Reboot Workflow
Core Philosophy
Build the iDumb plugin as a clean, minimal TypeScript system that enhances OpenCode's innate agents through tools and hooks, never replacing them. Follow the 8 pivotal trials with strict validation.
Implementation Workflow
Phase 1: Foundation (Pivotal Trial 1)
Goal: Basic state persistence through 5 compactions
- Create clean worktree structure
- Implement Zod schemas for state/config
- Build disk persistence layer
- Create minimal plugin shell
- Validation: State survives 5 compaction cycles
Phase 2: Core Tools (Pivotal Trial 2)
Goal: Tool compatibility with innate agents
- Implement
idumb_state_read/write tools
- Implement
idumb_anchor_add/list tools
- Implement
idumb_validate_run tool
- Validation: Tools work with default OpenCode agents
Phase 3: Decision Engine (Pivotal Trial 3)
Goal: Decision scoring performance < 100ms
- Implement
decision-scorer.ts engine
- Create
idumb_score_context tool
- Define signal detection patterns
- Validation: Scoring detects contradictions in < 100ms
Phase 4: Attention System (Pivotal Trial 4)
Goal: Attention directives survive 10 compactions
- Implement
attention-anchor.ts engine
- Implement
prompt-transformer.ts pipeline
- Hook into message transformation
- Validation: Focus directives survive 10 compactions
Phase 5: Background Collectors (Pivotal Trial 5)
Goal: Collector results merge into main session
- Implement
context-collector.ts sub-agent system
- Create
idumb_collect_spawn tool
- Define collector task schemas
- Validation: Collector results successfully merge
Phase 6: Delegation Intelligence (Pivotal Trial 6)
Goal: Parallel delegation improves decision quality
- Implement
delegation-router.ts engine
- Build sequential/parallel strategies
- Create hybrid delegation patterns
- Validation: Parallel delegation shows measurable quality improvement
Phase 7: TUI Integration (Pivotal Trial 7)
Goal: TUI feedback without blocking main loop
- Implement TUI hooks (
tui.toast.show, tui.prompt.append)
- Create status display injection
- Build intervention notifications
- Validation: TUI feedback improves user awareness without blocking
Phase 8: Stress Testing (Pivotal Trial 8)
Goal: Pass all 5 stress test scenarios
- Execute STRESS-001 through STRESS-005
- Document all failures and fixes
- Performance benchmarking
- Validation: All stress tests pass with evidence
Daily Workflow Pattern
Morning:
1. Review yesterday's trial results
2. Identify today's pivotal trial
3. Plan implementation approach
Implementation:
1. Use idumb-architect to design the component
2. Use idumb-implementer to write the code
3. Use idumb-tester to validate the trial
Evening:
1. Document trial results
2. Update principles registry
3. Plan next day's trial
Success Criteria Checklist
Before considering any phase complete:
Key Constraints
MUST DO:
- Follow exact file structure from the plan
- Use Zod schemas for all validation
- Expose functionality through custom tools only
- Integrate via OpenCode plugin hooks only
- Maintain compatibility with innate agents
MUST NOT DO:
- Create markdown agents or commands
- Override OpenCode's innate agent behavior
- Use console.log for output
- Skip pivotal trial validation
- Proceed with failing trials
When to Use Supporting Agents
- idumb-architect: When designing new components or interfaces
- idumb-implementer: When writing TypeScript code for engines/tools
- idumb-tester: When validating functionality or designing tests
Always validate each pivotal trial before moving to the next phase.