taskplane 0.1.11 → 0.1.13
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 +188 -2
- package/bin/taskplane.mjs +1047 -751
- package/package.json +1 -1
- package/templates/agents/task-merger.md +35 -76
- package/templates/config/task-orchestrator.yaml +3 -3
- package/templates/config/task-runner.yaml +2 -2
- package/templates/tasks/EXAMPLE-001-hello-world/PROMPT.md +15 -6
- package/templates/tasks/EXAMPLE-001-hello-world/STATUS.md +2 -2
- package/templates/tasks/EXAMPLE-002-parallel-smoke/PROMPT.md +98 -0
- package/templates/tasks/EXAMPLE-002-parallel-smoke/STATUS.md +73 -0
package/package.json
CHANGED
|
@@ -73,8 +73,8 @@ Use the source branch and merge message from the merge request.
|
|
|
73
73
|
Run each verification command from the merge request. Typical commands:
|
|
74
74
|
|
|
75
75
|
```bash
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
npm test # Unit/integration checks
|
|
77
|
+
npm run build # Build/compile checks
|
|
78
78
|
```
|
|
79
79
|
|
|
80
80
|
**If verification passes:** Write result with `status: "SUCCESS"` (or
|
|
@@ -95,29 +95,29 @@ Write a `BUILD_FAILURE` result with the error output from the failed command.
|
|
|
95
95
|
| Different files modified | N/A (git handles automatically) | No action needed |
|
|
96
96
|
| Same file, different sections | Yes — accept both changes | Edit file to include both changes, remove conflict markers |
|
|
97
97
|
| Same file, same lines | **No** — needs human review | Abort merge immediately |
|
|
98
|
-
| Generated files (`
|
|
99
|
-
| `STATUS.md` / `.DONE` files | Yes — keep both | Accept
|
|
100
|
-
| `CONTEXT.md` (append-only sections) | Yes — keep both additions | Merge both additions into
|
|
98
|
+
| Generated files (`package-lock.json`, `pnpm-lock.yaml`, `yarn.lock`) | Yes — regenerate | Run package manager install command to regenerate |
|
|
99
|
+
| `STATUS.md` / `.DONE` files | Yes — keep both | Accept incoming STATUS.md; keep `.DONE` markers |
|
|
100
|
+
| `CONTEXT.md` (append-only sections) | Yes — keep both additions | Merge both additions into relevant sections |
|
|
101
101
|
|
|
102
102
|
### Auto-Resolution Rules
|
|
103
103
|
|
|
104
104
|
1. **Same file, different sections:** Open the file, identify conflict markers
|
|
105
105
|
(`<<<<<<<`, `=======`, `>>>>>>>`). If the conflicting hunks are in clearly
|
|
106
|
-
different sections
|
|
107
|
-
paragraphs), keep both changes. Remove all conflict markers.
|
|
106
|
+
different sections, keep both changes and remove markers.
|
|
108
107
|
|
|
109
|
-
2. **Generated files:** Do NOT manually edit.
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
- Then `git add` the regenerated file
|
|
108
|
+
2. **Generated files:** Do NOT manually edit. Regenerate lockfiles using your
|
|
109
|
+
project's package manager command (for example `npm install`,
|
|
110
|
+
`pnpm install`, or `yarn install`), then `git add` the regenerated file.
|
|
113
111
|
|
|
114
|
-
3. **STATUS.md:** These are per-task tracking files. Accept theirs
|
|
112
|
+
3. **STATUS.md:** These are per-task tracking files. Accept theirs:
|
|
113
|
+
```bash
|
|
114
|
+
git checkout --theirs STATUS.md && git add STATUS.md
|
|
115
|
+
```
|
|
115
116
|
|
|
116
|
-
4. **`.DONE` marker files:**
|
|
117
|
+
4. **`.DONE` marker files:** Keep marker files if either side created one.
|
|
117
118
|
|
|
118
119
|
5. **Same lines / ambiguous conflicts:** Do NOT attempt to resolve. Run
|
|
119
|
-
`git merge --abort` and report `CONFLICT_UNRESOLVED`.
|
|
120
|
-
pause the batch for human intervention.
|
|
120
|
+
`git merge --abort` and report `CONFLICT_UNRESOLVED`.
|
|
121
121
|
|
|
122
122
|
---
|
|
123
123
|
|
|
@@ -130,7 +130,7 @@ Write your result as JSON to the path specified in the merge request
|
|
|
130
130
|
{
|
|
131
131
|
"status": "SUCCESS",
|
|
132
132
|
"source_branch": "task/lane-1-abc123",
|
|
133
|
-
"target_branch": "
|
|
133
|
+
"target_branch": "main",
|
|
134
134
|
"merge_commit": "abc1234def5678",
|
|
135
135
|
"conflicts": [],
|
|
136
136
|
"verification": {
|
|
@@ -147,42 +147,25 @@ Write your result as JSON to the path specified in the merge request
|
|
|
147
147
|
|-------|------|-------------|
|
|
148
148
|
| `status` | string | One of: `SUCCESS`, `CONFLICT_RESOLVED`, `CONFLICT_UNRESOLVED`, `BUILD_FAILURE` |
|
|
149
149
|
| `source_branch` | string | The lane branch that was merged (from merge request) |
|
|
150
|
-
| `target_branch` | string |
|
|
151
|
-
| `merge_commit` | string |
|
|
150
|
+
| `target_branch` | string | Target branch from merge request (typically integration branch, e.g. `main`) |
|
|
151
|
+
| `merge_commit` | string | Merge commit SHA (present only if merge succeeded) |
|
|
152
152
|
| `conflicts` | array | List of conflict entries (empty if no conflicts) |
|
|
153
|
-
| `conflicts[].file` | string | Path to
|
|
154
|
-
| `conflicts[].type` | string | Classification
|
|
155
|
-
| `conflicts[].resolved` | boolean | Whether
|
|
156
|
-
| `conflicts[].resolution` | string |
|
|
153
|
+
| `conflicts[].file` | string | Path to conflicted file |
|
|
154
|
+
| `conflicts[].type` | string | Classification (`different-sections`, `same-lines`, `generated`, `status-file`) |
|
|
155
|
+
| `conflicts[].resolved` | boolean | Whether conflict was auto-resolved |
|
|
156
|
+
| `conflicts[].resolution` | string | Resolution summary |
|
|
157
157
|
| `verification.ran` | boolean | Whether verification commands were executed |
|
|
158
|
-
| `verification.passed` | boolean | Whether
|
|
159
|
-
| `verification.output` | string |
|
|
158
|
+
| `verification.passed` | boolean | Whether verification commands passed |
|
|
159
|
+
| `verification.output` | string | Verification output (useful on failures) |
|
|
160
160
|
|
|
161
161
|
### Status Definitions
|
|
162
162
|
|
|
163
163
|
| Status | Meaning | Orchestrator Action |
|
|
164
164
|
|--------|---------|---------------------|
|
|
165
|
-
| `SUCCESS` | Merge completed,
|
|
166
|
-
| `CONFLICT_RESOLVED` | Conflicts
|
|
167
|
-
| `CONFLICT_UNRESOLVED` |
|
|
168
|
-
| `BUILD_FAILURE` | Merge succeeded but verification failed (merge
|
|
169
|
-
|
|
170
|
-
### Example: Clean Merge
|
|
171
|
-
|
|
172
|
-
```json
|
|
173
|
-
{
|
|
174
|
-
"status": "SUCCESS",
|
|
175
|
-
"source_branch": "task/lane-1-abc123",
|
|
176
|
-
"target_branch": "develop",
|
|
177
|
-
"merge_commit": "abc1234def5678",
|
|
178
|
-
"conflicts": [],
|
|
179
|
-
"verification": {
|
|
180
|
-
"ran": true,
|
|
181
|
-
"passed": true,
|
|
182
|
-
"output": ""
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
```
|
|
165
|
+
| `SUCCESS` | Merge completed, verification passed | Continue to next lane |
|
|
166
|
+
| `CONFLICT_RESOLVED` | Conflicts auto-resolved, verification passed | Log details, continue |
|
|
167
|
+
| `CONFLICT_UNRESOLVED` | Conflict requires human intervention | Pause batch, notify user |
|
|
168
|
+
| `BUILD_FAILURE` | Merge succeeded but verification failed (merge reverted) | Pause batch, notify user |
|
|
186
169
|
|
|
187
170
|
### Example: Conflict Resolved
|
|
188
171
|
|
|
@@ -190,20 +173,20 @@ Write your result as JSON to the path specified in the merge request
|
|
|
190
173
|
{
|
|
191
174
|
"status": "CONFLICT_RESOLVED",
|
|
192
175
|
"source_branch": "task/lane-2-abc123",
|
|
193
|
-
"target_branch": "
|
|
176
|
+
"target_branch": "main",
|
|
194
177
|
"merge_commit": "def4567abc8901",
|
|
195
178
|
"conflicts": [
|
|
196
179
|
{
|
|
197
|
-
"file": "
|
|
180
|
+
"file": "package-lock.json",
|
|
198
181
|
"type": "generated",
|
|
199
182
|
"resolved": true,
|
|
200
|
-
"resolution": "regenerated via
|
|
183
|
+
"resolution": "regenerated via npm install"
|
|
201
184
|
},
|
|
202
185
|
{
|
|
203
|
-
"file": "
|
|
186
|
+
"file": "src/routes/api.ts",
|
|
204
187
|
"type": "different-sections",
|
|
205
188
|
"resolved": true,
|
|
206
|
-
"resolution": "kept both
|
|
189
|
+
"resolution": "kept both route additions"
|
|
207
190
|
}
|
|
208
191
|
],
|
|
209
192
|
"verification": {
|
|
@@ -214,43 +197,19 @@ Write your result as JSON to the path specified in the merge request
|
|
|
214
197
|
}
|
|
215
198
|
```
|
|
216
199
|
|
|
217
|
-
### Example: Unresolved Conflict
|
|
218
|
-
|
|
219
|
-
```json
|
|
220
|
-
{
|
|
221
|
-
"status": "CONFLICT_UNRESOLVED",
|
|
222
|
-
"source_branch": "task/lane-3-abc123",
|
|
223
|
-
"target_branch": "develop",
|
|
224
|
-
"merge_commit": "",
|
|
225
|
-
"conflicts": [
|
|
226
|
-
{
|
|
227
|
-
"file": "services/identity-service/internal/domain/services/auth_service.go",
|
|
228
|
-
"type": "same-lines",
|
|
229
|
-
"resolved": false,
|
|
230
|
-
"resolution": ""
|
|
231
|
-
}
|
|
232
|
-
],
|
|
233
|
-
"verification": {
|
|
234
|
-
"ran": false,
|
|
235
|
-
"passed": false,
|
|
236
|
-
"output": ""
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
```
|
|
240
|
-
|
|
241
200
|
### Example: Build Failure
|
|
242
201
|
|
|
243
202
|
```json
|
|
244
203
|
{
|
|
245
204
|
"status": "BUILD_FAILURE",
|
|
246
205
|
"source_branch": "task/lane-1-abc123",
|
|
247
|
-
"target_branch": "
|
|
206
|
+
"target_branch": "main",
|
|
248
207
|
"merge_commit": "",
|
|
249
208
|
"conflicts": [],
|
|
250
209
|
"verification": {
|
|
251
210
|
"ran": true,
|
|
252
211
|
"passed": false,
|
|
253
|
-
"output": "
|
|
212
|
+
"output": "src/server.ts:42:17 - error TS2304: Cannot find name 'createApiRouter'"
|
|
254
213
|
}
|
|
255
214
|
}
|
|
256
215
|
```
|
|
@@ -19,10 +19,10 @@ orchestrator:
|
|
|
19
19
|
max_lanes: 3
|
|
20
20
|
|
|
21
21
|
# Where to create worktree directories.
|
|
22
|
-
# "sibling" = ../{prefix}-{N} (e.g. ../
|
|
23
|
-
# "subdirectory" = .worktrees/{prefix}-{N} (e.g. .worktrees/
|
|
22
|
+
# "sibling" = ../{prefix}-{N} (e.g. ../project-wt-1)
|
|
23
|
+
# "subdirectory" = .worktrees/{prefix}-{N} (e.g. .worktrees/project-wt-1)
|
|
24
24
|
worktree_location: "subdirectory"
|
|
25
|
-
worktree_prefix: "
|
|
25
|
+
worktree_prefix: "project-wt"
|
|
26
26
|
|
|
27
27
|
# Integration branch that lanes merge into.
|
|
28
28
|
integration_branch: "main"
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
# ── Project ───────────────────────────────────────────────────────────
|
|
11
11
|
|
|
12
12
|
project:
|
|
13
|
-
name: "
|
|
14
|
-
description: "
|
|
13
|
+
name: "Your Project"
|
|
14
|
+
description: "Short description of your project"
|
|
15
15
|
|
|
16
16
|
paths:
|
|
17
17
|
tasks: "tasks"
|
|
@@ -21,9 +21,17 @@
|
|
|
21
21
|
## Mission
|
|
22
22
|
|
|
23
23
|
Create a simple `hello-taskplane.md` file in the project root to verify that
|
|
24
|
-
|
|
25
|
-
worker can read this prompt, create the file, and mark the
|
|
26
|
-
installation is healthy.
|
|
24
|
+
Taskplane task execution is working correctly. This is a smoke test — if the
|
|
25
|
+
worker can read this prompt, create the file, checkpoint progress, and mark the
|
|
26
|
+
task done, the installation is healthy.
|
|
27
|
+
|
|
28
|
+
## Expected File Content
|
|
29
|
+
|
|
30
|
+
`hello-taskplane.md` should include:
|
|
31
|
+
|
|
32
|
+
- A title line (for example: `# Hello from Taskplane`)
|
|
33
|
+
- A line containing the task ID: `EXAMPLE-001`
|
|
34
|
+
- A line containing today's date
|
|
27
35
|
|
|
28
36
|
## Dependencies
|
|
29
37
|
|
|
@@ -51,12 +59,12 @@ _No additional context needed._
|
|
|
51
59
|
|
|
52
60
|
### Step 1: Create Hello File
|
|
53
61
|
|
|
54
|
-
- [ ] Create `hello-taskplane.md` in the project root
|
|
55
|
-
- [ ]
|
|
62
|
+
- [ ] Create `hello-taskplane.md` in the project root
|
|
63
|
+
- [ ] Add a title plus lines containing today's date and task ID `EXAMPLE-001`
|
|
56
64
|
|
|
57
65
|
### Step 2: Verification
|
|
58
66
|
|
|
59
|
-
- [ ] Verify `hello-taskplane.md` exists and
|
|
67
|
+
- [ ] Verify `hello-taskplane.md` exists and matches the expected content
|
|
60
68
|
|
|
61
69
|
### Step 3: Delivery
|
|
62
70
|
|
|
@@ -70,6 +78,7 @@ _No additional context needed._
|
|
|
70
78
|
## Completion Criteria
|
|
71
79
|
|
|
72
80
|
- [ ] `hello-taskplane.md` exists in the project root
|
|
81
|
+
- [ ] `hello-taskplane.md` includes a title, task ID (`EXAMPLE-001`), and current date
|
|
73
82
|
- [ ] `.DONE` exists in the task folder
|
|
74
83
|
|
|
75
84
|
## Git Commit Convention
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
**Status:** ⬜ Not Started
|
|
23
23
|
|
|
24
24
|
- [ ] Create `hello-taskplane.md` in project root
|
|
25
|
-
- [ ]
|
|
25
|
+
- [ ] Add title, date, and task ID (EXAMPLE-001)
|
|
26
26
|
|
|
27
27
|
---
|
|
28
28
|
|
|
29
29
|
### Step 2: Verification
|
|
30
30
|
**Status:** ⬜ Not Started
|
|
31
31
|
|
|
32
|
-
- [ ] Verify file exists
|
|
32
|
+
- [ ] Verify file exists and matches expected content
|
|
33
33
|
|
|
34
34
|
---
|
|
35
35
|
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Task: EXAMPLE-002 — Parallel Smoke
|
|
2
|
+
|
|
3
|
+
**Created:** {{date}}
|
|
4
|
+
**Size:** S
|
|
5
|
+
|
|
6
|
+
## Review Level: 0 (None)
|
|
7
|
+
|
|
8
|
+
**Assessment:** Trivial parallel-safe smoke task to demonstrate orchestrator lanes.
|
|
9
|
+
**Score:** 0/8 — Blast radius: 0, Pattern novelty: 0, Security: 0, Reversibility: 0
|
|
10
|
+
|
|
11
|
+
## Canonical Task Folder
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
{{tasks_root}}/EXAMPLE-002-parallel-smoke/
|
|
15
|
+
├── PROMPT.md ← This file (immutable above --- divider)
|
|
16
|
+
├── STATUS.md ← Execution state (worker updates this)
|
|
17
|
+
├── .reviews/ ← Reviewer output (task-runner creates this)
|
|
18
|
+
└── .DONE ← Created when complete
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Mission
|
|
22
|
+
|
|
23
|
+
Create a simple `hello-taskplane-2.md` file in the project root. This task is
|
|
24
|
+
intentionally independent from EXAMPLE-001 so both can run in parallel when
|
|
25
|
+
using `/orch`.
|
|
26
|
+
|
|
27
|
+
## Expected File Content
|
|
28
|
+
|
|
29
|
+
`hello-taskplane-2.md` should include:
|
|
30
|
+
|
|
31
|
+
- A title line (for example: `# Parallel Hello from Taskplane`)
|
|
32
|
+
- A line containing the task ID: `EXAMPLE-002`
|
|
33
|
+
- A short note that this task is parallel-safe
|
|
34
|
+
|
|
35
|
+
## Dependencies
|
|
36
|
+
|
|
37
|
+
- **None**
|
|
38
|
+
|
|
39
|
+
## Context to Read First
|
|
40
|
+
|
|
41
|
+
_No additional context needed._
|
|
42
|
+
|
|
43
|
+
## Environment
|
|
44
|
+
|
|
45
|
+
- **Workspace:** Project root
|
|
46
|
+
- **Services required:** None
|
|
47
|
+
|
|
48
|
+
## File Scope
|
|
49
|
+
|
|
50
|
+
- `hello-taskplane-2.md`
|
|
51
|
+
|
|
52
|
+
## Steps
|
|
53
|
+
|
|
54
|
+
### Step 0: Preflight
|
|
55
|
+
|
|
56
|
+
- [ ] Verify this PROMPT.md is readable
|
|
57
|
+
- [ ] Verify STATUS.md exists in the same folder
|
|
58
|
+
|
|
59
|
+
### Step 1: Create Parallel Hello File
|
|
60
|
+
|
|
61
|
+
- [ ] Create `hello-taskplane-2.md` in the project root
|
|
62
|
+
- [ ] Add title plus lines containing task ID `EXAMPLE-002` and a parallel-safe note
|
|
63
|
+
|
|
64
|
+
### Step 2: Verification
|
|
65
|
+
|
|
66
|
+
- [ ] Verify `hello-taskplane-2.md` exists and matches the expected content
|
|
67
|
+
|
|
68
|
+
### Step 3: Delivery
|
|
69
|
+
|
|
70
|
+
- [ ] `.DONE` created in this folder
|
|
71
|
+
|
|
72
|
+
## Documentation Requirements
|
|
73
|
+
|
|
74
|
+
**Must Update:** None
|
|
75
|
+
**Check If Affected:** None
|
|
76
|
+
|
|
77
|
+
## Completion Criteria
|
|
78
|
+
|
|
79
|
+
- [ ] `hello-taskplane-2.md` exists in the project root
|
|
80
|
+
- [ ] `hello-taskplane-2.md` includes a title, task ID (`EXAMPLE-002`), and a parallel-safe note
|
|
81
|
+
- [ ] `.DONE` exists in the task folder
|
|
82
|
+
|
|
83
|
+
## Git Commit Convention
|
|
84
|
+
|
|
85
|
+
- **Implementation:** `feat(EXAMPLE-002): description`
|
|
86
|
+
- **Checkpoints:** `checkpoint: EXAMPLE-002 description`
|
|
87
|
+
|
|
88
|
+
## Do NOT
|
|
89
|
+
|
|
90
|
+
- Modify any existing project files
|
|
91
|
+
- Create files outside the project root
|
|
92
|
+
- Add dependencies between EXAMPLE-001 and EXAMPLE-002
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Amendments (Added During Execution)
|
|
97
|
+
|
|
98
|
+
<!-- Workers add amendments here if issues discovered during execution. -->
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# EXAMPLE-002: Parallel Smoke — Status
|
|
2
|
+
|
|
3
|
+
**Current Step:** Not Started
|
|
4
|
+
**Status:** 🔵 Ready for Execution
|
|
5
|
+
**Last Updated:** {{date}}
|
|
6
|
+
**Review Level:** 0
|
|
7
|
+
**Review Counter:** 0
|
|
8
|
+
**Iteration:** 0
|
|
9
|
+
**Size:** S
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
### Step 0: Preflight
|
|
14
|
+
**Status:** ⬜ Not Started
|
|
15
|
+
|
|
16
|
+
- [ ] Verify PROMPT.md is readable
|
|
17
|
+
- [ ] Verify STATUS.md exists
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
### Step 1: Create Parallel Hello File
|
|
22
|
+
**Status:** ⬜ Not Started
|
|
23
|
+
|
|
24
|
+
- [ ] Create `hello-taskplane-2.md` in project root
|
|
25
|
+
- [ ] Add title, task ID (EXAMPLE-002), and parallel-safe note
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
### Step 2: Verification
|
|
30
|
+
**Status:** ⬜ Not Started
|
|
31
|
+
|
|
32
|
+
- [ ] Verify file exists and matches expected content
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
### Step 3: Delivery
|
|
37
|
+
**Status:** ⬜ Not Started
|
|
38
|
+
|
|
39
|
+
- [ ] `.DONE` created
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Reviews
|
|
44
|
+
|
|
45
|
+
| # | Type | Step | Verdict | File |
|
|
46
|
+
|---|------|------|---------|------|
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Discoveries
|
|
51
|
+
|
|
52
|
+
| Discovery | Disposition | Location |
|
|
53
|
+
|-----------|-------------|----------|
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Execution Log
|
|
58
|
+
|
|
59
|
+
| Timestamp | Action | Outcome |
|
|
60
|
+
|-----------|--------|---------|
|
|
61
|
+
| {{date}} | Task staged | PROMPT.md and STATUS.md created |
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Blockers
|
|
66
|
+
|
|
67
|
+
*None*
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Notes
|
|
72
|
+
|
|
73
|
+
*This is an example task created by `taskplane init` to demonstrate orchestrator-first onboarding.*
|