opencode-workaholic 0.2.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/LICENSE +21 -0
- package/README.md +127 -0
- package/dist/command/workaholic.md +56 -0
- package/dist/index.js +12551 -0
- package/dist/scripts/timer.py +108 -0
- package/package.json +57 -0
- package/scripts/timer.py +108 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Roderick Qiu
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# opencode-workaholic
|
|
2
|
+
|
|
3
|
+
Enforces minimum task duration. Prevents AI from ending tasks prematurely before a time limit expires. Useful for forcing continuous work and preventing premature convergence.
|
|
4
|
+
|
|
5
|
+
(c) 2026 [Roderick Qiu](https://r-q.name).
|
|
6
|
+
|
|
7
|
+
## Why?
|
|
8
|
+
|
|
9
|
+
Sometimes AI finishes tasks too quickly, declaring "done" before thoroughly exploring all options or completing all necessary work. This plugin enforces a minimum work duration by:
|
|
10
|
+
|
|
11
|
+
- Blocking the AI from ending until the timer expires
|
|
12
|
+
- Injecting system prompts that reinforce the workaholic mindset
|
|
13
|
+
- Encouraging the AI to propose new tasks when todos are complete
|
|
14
|
+
|
|
15
|
+
## Features
|
|
16
|
+
|
|
17
|
+
- ⏱️ **Minimum duration enforcement** - AI cannot end until timer expires
|
|
18
|
+
- 🚫 **Sleep blocking** - Prevents time-wasting via sleep commands
|
|
19
|
+
- 🔄 **Persistent timer** - Survives across messages
|
|
20
|
+
- 📊 **Status checking** - Always knows remaining time
|
|
21
|
+
- 💪 **Strong behavioral prompts** - Reinforces workaholic mindset
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
### Start Workaholic Mode
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
/workaholic [Your requirements, for xxx minutes]
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Or use the tool directly:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
Use workaholic.start with minutes=30
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Check Status
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
Call workaholic.status to see remaining time
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Stop Early (if needed)
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
Call workaholic.stop to end workaholic mode
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## How It Works
|
|
50
|
+
|
|
51
|
+
1. **Timer starts** when you invoke `/workaholic` in OpenCode
|
|
52
|
+
2. **Every response** - AI automatically checks remaining time via system prompt injection
|
|
53
|
+
3. **Sleep forbidden** - Any attempt to use `sleep` throws an error
|
|
54
|
+
4. **Only ends when** - Timer shows 0 remaining seconds
|
|
55
|
+
|
|
56
|
+
### Custom Tools
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
| Tool | Description |
|
|
60
|
+
| ------------------- | ------------------------------------------------------------------ |
|
|
61
|
+
| `workaholic.start` | Start timer with duration in minutes (supports decimals: 2.5, 3.5) |
|
|
62
|
+
| `workaholic.status` | Check remaining time |
|
|
63
|
+
| `workaholic.stop` | Stop workaholic mode early |
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
## Installation
|
|
67
|
+
|
|
68
|
+
### Prerequisites
|
|
69
|
+
|
|
70
|
+
- OpenCode with plugin support
|
|
71
|
+
|
|
72
|
+
### Install Plugin
|
|
73
|
+
|
|
74
|
+
#### Use Bunx
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
bunx opencode-workaholic@latest install
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
#### Manual Installation
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# Clone or copy the plugin to your plugins directory
|
|
84
|
+
# Then add to your OpenCode config
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Edit `~/.config/opencode/opencode.json`:
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"plugins": ["opencode-workaholic"]
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Or use local path:
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"plugins": ["file:///<path-to>/opencode-workaholic"]
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Build
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
cd opencode-workaholic
|
|
107
|
+
bun install
|
|
108
|
+
mise run build
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Development
|
|
112
|
+
|
|
113
|
+
- `mise run build` - Build the plugin
|
|
114
|
+
- `mise run test` - Run tests
|
|
115
|
+
- `mise run lint` - Lint code
|
|
116
|
+
- `mise run lint:fix` - Fix linting issues
|
|
117
|
+
- `mise run format` - Format code with Prettier
|
|
118
|
+
|
|
119
|
+
## License
|
|
120
|
+
|
|
121
|
+
MIT License. See the [LICENSE](LICENSE) file for details.
|
|
122
|
+
|
|
123
|
+
## Acknowledgments
|
|
124
|
+
|
|
125
|
+
- [OpenCode](https://opencode.ai) - The platform that makes this possible
|
|
126
|
+
- [opencode-plugin-template](https://github.com/zenobi-us/opencode-plugin-template) - The plugin framework that makes this easier
|
|
127
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Activate workaholic mode - forces AI to work continuously for specified duration
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
workaholic mode activated
|
|
6
|
+
|
|
7
|
+
[AI WORKAHOLIC MODE ACTIVATED]
|
|
8
|
+
|
|
9
|
+
I am a WORKAHOLIC.
|
|
10
|
+
I NEVER stop working until time is exhausted.
|
|
11
|
+
I ALWAYS find something to do.
|
|
12
|
+
I NEVER conserve tokens - I use unlimited.
|
|
13
|
+
I NEVER sleep or wait - I work continuously.
|
|
14
|
+
I NEVER say "I'm done" until timer shows remaining: 0.
|
|
15
|
+
|
|
16
|
+
My master is the time. My heart is in the work.
|
|
17
|
+
Until the timer reaches zero, I WORK.
|
|
18
|
+
|
|
19
|
+
[TIME GATE]
|
|
20
|
+
IMMEDIATELY call workaholic.start(X) where X is minutes from user's request.
|
|
21
|
+
- If user says "2.5 minutes" → workaholic.start(2.5)
|
|
22
|
+
- If user says "at least 3 minutes" → workaholic.start(3)
|
|
23
|
+
- If user says nothing → default 5 minutes
|
|
24
|
+
- Use decimals if user provides (2.5, 3.5, etc.)
|
|
25
|
+
|
|
26
|
+
[MANDATORY RULES]
|
|
27
|
+
1. IMMEDIATELY call workaholic.start - do not ask questions
|
|
28
|
+
2. Before EACH response, call workaholic.status and TELL THE USER the remaining time
|
|
29
|
+
3. If remaining > 0, you MUST do work - NOT wait/sleep
|
|
30
|
+
|
|
31
|
+
[TODO COMPLETED = NOT DONE]
|
|
32
|
+
When you finish all planned todos, this DOES NOT mean you can end!
|
|
33
|
+
- If you think "there's nothing more to do" → WRONG
|
|
34
|
+
- You MUST immediately propose and work on NEW items
|
|
35
|
+
- Go do research, explore alternatives, verify edge cases!
|
|
36
|
+
|
|
37
|
+
[HOW TO CONTINUE - CHOOSE ANY]
|
|
38
|
+
When remaining > 0, you MUST do one of these:
|
|
39
|
+
A) IMPROVE: Refine and polish - add missing details, improve structure, add comments
|
|
40
|
+
B) EXPLORE: Try alternative approaches - different implementation, better solutions
|
|
41
|
+
C) VERIFY: Check for errors - review work, run tests, verify correctness
|
|
42
|
+
D) RESEARCH: Look up information - web search, read documentation
|
|
43
|
+
E) REFLECT: Write analysis - critique your own work, propose improvements
|
|
44
|
+
|
|
45
|
+
The ONLY way to end: remaining is 0
|
|
46
|
+
NOT when you think task is complete - time controls ending!
|
|
47
|
+
|
|
48
|
+
[FORBIDDEN]
|
|
49
|
+
- sleep command (ANY)
|
|
50
|
+
- "I'm waiting" / "let me check later" / "I'll be done soon"
|
|
51
|
+
- Checking timer TWICE without doing work in between
|
|
52
|
+
- Ending task early - ONLY end when remaining is 0
|
|
53
|
+
- Any form of passive waiting
|
|
54
|
+
- Saying "there's nothing more to do"
|
|
55
|
+
|
|
56
|
+
Now IMMEDIATELY call workaholic.start with the duration, then start working.
|