openstoat 0.1.0 → 0.2.1

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 ADDED
@@ -0,0 +1,216 @@
1
+ # OpenStoat
2
+
3
+ > AI ↔ Human task queue — orchestrate work between AI agents and humans with a local-first CLI.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/openstoat.svg)](https://www.npmjs.com/package/openstoat)
6
+
7
+ OpenStoat is a **decoupled task queue** that coordinates AI agents and humans. AI handles tasks that don't require human input; when humans complete their tasks, downstream AI tasks are triggered automatically. No cloud, no API keys, no built-in LLM — just a local SQLite store and a CLI that both agents and humans use.
8
+
9
+ ---
10
+
11
+ ## Features
12
+
13
+ | Feature | Description |
14
+ |---------|-------------|
15
+ | **Local-first** | All data in `~/.openstoat/` (SQLite). No account or API key required. |
16
+ | **CLI-first** | Every operation via `openstoat` commands. Same CLI for agents and humans. |
17
+ | **No LLM** | OpenStoat orchestrates only. Planning and execution are done by external agents (Cursor, Claude, etc.). |
18
+ | **1 human + N agents** | Humans are the bottleneck; AI fills idle time. Explicit ownership per task. |
19
+ | **Transparent** | Clear task states, dependencies, and handoffs. |
20
+
21
+ ---
22
+
23
+ ## Quick Start
24
+
25
+ ### Install
26
+
27
+ ```bash
28
+ npm install -g openstoat
29
+ # or
30
+ bun add -g openstoat
31
+ # or
32
+ npx openstoat --help
33
+ ```
34
+
35
+ ### 1. Initialize a project
36
+
37
+ ```bash
38
+ openstoat project init --id my_project --name "My Project" --template checkout-default-v1
39
+ ```
40
+
41
+ ### 2. Create tasks
42
+
43
+ ```bash
44
+ openstoat task create \
45
+ --project my_project \
46
+ --title "Implement payment provider mapping" \
47
+ --description "Add Paddle to provider enum and implement mapping" \
48
+ --acceptance-criteria "Checkout works with Paddle" \
49
+ --acceptance-criteria "Unit tests pass" \
50
+ --status ready \
51
+ --owner agent_worker \
52
+ --task-type implementation
53
+ ```
54
+
55
+ ### 3. Claim and execute (as agent or human)
56
+
57
+ ```bash
58
+ openstoat task claim task_001 --as agent_worker --logs-append "Claimed"
59
+ openstoat task start task_001 --as agent_worker --logs-append "Started"
60
+ openstoat task done task_001 \
61
+ --output "Implemented and tested" \
62
+ --handoff-summary "Added Paddle provider mapping in src/payments/provider-map.ts. No migration needed. Tests pass." \
63
+ --logs-append "Completed"
64
+ ```
65
+
66
+ ### 4. Optional: Web UI
67
+
68
+ ```bash
69
+ openstoat web
70
+ # Opens http://localhost:3080
71
+ ```
72
+
73
+ ### 5. Optional: Daemon for auto-scheduling AI tasks
74
+
75
+ ```bash
76
+ openstoat daemon init # Configure .openstoat.json
77
+ openstoat daemon start # Poll for ready agent_worker tasks and invoke your agent
78
+ ```
79
+
80
+ ---
81
+
82
+ ## Core Concepts
83
+
84
+ | Concept | Description |
85
+ |---------|-------------|
86
+ | **Project** | Template-bound workspace. Every task belongs to one project. |
87
+ | **Task** | Smallest unit of work. Status: `ready` → `in_progress` → `done`. Owner: `agent_worker` or `human_worker`. |
88
+ | **Template** | Workflow template defining which task types need human input (e.g. credentials, review, deploy). |
89
+ | **Handoff** | Context passed when a task completes. Required on every `done` (min 200 chars). |
90
+ | **Self-unblock** | When an agent is blocked by human input: create a human task, then run `task self-unblock` with `--depends-on`. |
91
+
92
+ ---
93
+
94
+ ## CLI Commands
95
+
96
+ | Command | Description |
97
+ |---------|-------------|
98
+ | `openstoat project init` | Initialize project (requires `--id`, `--name`, `--template`) |
99
+ | `openstoat project ls` | List projects |
100
+ | `openstoat project show <id>` | Show project details |
101
+ | `openstoat task ls` | List tasks (filter by `--project`, `--status`, `--owner`) |
102
+ | `openstoat task create` | Create task (all required fields) |
103
+ | `openstoat task claim <id>` | Claim ready task (`--as agent_worker` or `human_worker`) |
104
+ | `openstoat task start <id>` | Start working on task |
105
+ | `openstoat task done <id>` | Complete task (`--output`, `--handoff-summary` required) |
106
+ | `openstoat task self-unblock <id>` | Rollback when blocked (`--depends-on` human task required) |
107
+ | `openstoat task show <id>` | Show task details |
108
+ | `openstoat daemon init` | Interactively create `.openstoat.json` |
109
+ | `openstoat daemon start` | Start worker daemon (polls for ready agent tasks) |
110
+ | `openstoat install skill` | Install planner and worker skills for agents |
111
+ | `openstoat web` | Start Web UI server |
112
+ | `openstoat manual` | Print full agent operational manual |
113
+
114
+ Run `openstoat --help` for full usage.
115
+
116
+ ---
117
+
118
+ ## Daemon Configuration
119
+
120
+ The daemon polls for `ready` tasks owned by `agent_worker` and invokes your configured agent. Create `.openstoat.json` in your project root:
121
+
122
+ ```json
123
+ {
124
+ "project": "my_project",
125
+ "agent": "/path/to/agent-executable",
126
+ "agent_args_template": "{{prompt}}"
127
+ }
128
+ ```
129
+
130
+ | Field | Description |
131
+ |-------|-------------|
132
+ | `project` | Project ID for task commands. |
133
+ | `agent` | Path to your agent executable (e.g. Cursor CLI, Claude CLI). |
134
+ | `agent_args_template` | Optional. How to pass the prompt. Use `{{prompt}}` as placeholder. Default: `{{prompt}}` (positional). Examples: `--prompt {{prompt}}`, `-m {{prompt}}` for agents that expect different CLI flags. |
135
+
136
+ ---
137
+
138
+ ## Agent Workflows
139
+
140
+ ### Agent Planner
141
+
142
+ 1. **Before creating tasks**: List existing tasks to avoid duplicates.
143
+ ```bash
144
+ openstoat task ls --project <project_id> --status ready,in_progress
145
+ ```
146
+ 2. **Create tasks**: Use `task create` with `owner=agent_worker` or `owner=human_worker` and `--depends-on` for dependencies.
147
+
148
+ ### Agent Worker
149
+
150
+ 1. **Claim**: `openstoat task claim <id> --as agent_worker --logs-append "Claimed"`
151
+ 2. **Start**: `openstoat task start <id> --as agent_worker --logs-append "Started"`
152
+ 3. **Done**: `openstoat task done <id> --output "..." --handoff-summary "..." --logs-append "..."` (handoff min 200 chars)
153
+
154
+ ### Agent Blocked by Human
155
+
156
+ 1. Create human task: `openstoat task create --project X --owner human_worker --task-type credentials ...`
157
+ 2. Self-unblock: `openstoat task self-unblock <my_task_id> --depends-on <human_task_id> --logs-append "Blocked: ..."`
158
+ 3. Resume after human completes the dependency.
159
+
160
+ ---
161
+
162
+ ## Install Skills for AI Agents
163
+
164
+ OpenStoat provides skills for planner and worker roles. Install them so your AI agent (Cursor, Claude, etc.) can use them:
165
+
166
+ ```bash
167
+ openstoat install skill
168
+ # Installs to .agent/skills and .claude/skills
169
+ ```
170
+
171
+ Use `--here` to install to the current directory instead.
172
+
173
+ ---
174
+
175
+ ## Recommended Setup
176
+
177
+ ### Agent Planner
178
+
179
+ Use **OpenClaw** as your Agent Planner — it has memory and timer features, which help with planning and decomposing work over time.
180
+
181
+ ### Daemon & Worker Agent
182
+
183
+ Run `openstoat daemon init` in your project source root to create `.openstoat.json`. For the agent executable, you can use:
184
+
185
+ - **Claude Code** or **Cursor CLI** (recommended) — both offer membership plans and excel at coding
186
+ - OpenCode
187
+ - OpenClaw
188
+
189
+ ### Running Multiple Agents in Parallel
190
+
191
+ If you need several agents working at once, create separate project directories. For example, if your project is `x`, create `x1`, `x2`, `x3` — each agent runs in its own environment with its own daemon config, so they work in parallel without interfering.
192
+
193
+ ### Human Workflow
194
+
195
+ - Use `openstoat web` to view the Kanban board and monitor progress.
196
+ - **Tip**: Create a dedicated project (e.g. `x0`) for human tasks — your window for manually directing agents. When you finish your work, simply tell the agent in `x0` that you're done and ask it to run `openstoat task done <task_id>` for your task.
197
+
198
+ ---
199
+
200
+ ## Requirements
201
+
202
+ - **Node.js 22+** or **Bun**
203
+ - No account or API key required
204
+
205
+ ---
206
+
207
+ ## Links
208
+
209
+ - [GitHub](https://github.com/meside-ai/openstoat)
210
+ - [npm](https://www.npmjs.com/package/openstoat)
211
+
212
+ ---
213
+
214
+ ## License
215
+
216
+ MIT
@@ -1 +1 @@
1
- {"version":3,"file":"daemon.d.ts","sourceRoot":"","sources":["../../src/commands/daemon.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAOlC,eAAO,MAAM,cAAc;;;qBAGR,IAAI;;CAyEtB,CAAC"}
1
+ {"version":3,"file":"daemon.d.ts","sourceRoot":"","sources":["../../src/commands/daemon.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAOlC,eAAO,MAAM,cAAc;;;qBAGR,IAAI;;CA8EtB,CAAC"}
@@ -31,11 +31,14 @@ export const daemonCommands = {
31
31
  project = await prompt('Project ID', project);
32
32
  }
33
33
  const agent = await prompt('Agent executable path (for daemon to invoke)', existing?.agent ?? '');
34
+ const agentArgsTemplate = await prompt('Agent args template (use {{prompt}} as placeholder; default: {{prompt}})', existing?.agent_args_template ?? '{{prompt}}');
34
35
  const config = {};
35
36
  if (project)
36
37
  config.project = project;
37
38
  if (agent)
38
39
  config.agent = agent;
40
+ if (agentArgsTemplate)
41
+ config.agent_args_template = agentArgsTemplate;
39
42
  saveProjectConfig(config);
40
43
  console.log('\nCreated .openstoat.json');
41
44
  console.log(JSON.stringify(config, null, 2));
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "openstoat",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
+ "description": "AI and Human task queue - orchestrate work between AI agents and humans with a local-first CLI",
4
5
  "bin": {
5
6
  "openstoat": "./bin/openstoat"
6
7
  },
@@ -37,10 +37,15 @@ export const daemonCommands = {
37
37
  }
38
38
 
39
39
  const agent = await prompt('Agent executable path (for daemon to invoke)', existing?.agent ?? '');
40
+ const agentArgsTemplate = await prompt(
41
+ 'Agent args template (use {{prompt}} as placeholder; default: {{prompt}})',
42
+ (existing as { agent_args_template?: string })?.agent_args_template ?? '{{prompt}}'
43
+ );
40
44
 
41
45
  const config: Record<string, string> = {};
42
46
  if (project) config.project = project;
43
47
  if (agent) config.agent = agent;
48
+ if (agentArgsTemplate) config.agent_args_template = agentArgsTemplate;
44
49
 
45
50
  saveProjectConfig(config);
46
51
  console.log('\nCreated .openstoat.json');