Skip to content

Commit ff17b6c

Browse files
committed
revamp for a better mega merge flow (#1)
1 parent 4b9276f commit ff17b6c

160 files changed

Lines changed: 6716 additions & 3931 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/parallel-agents-starter.md

Lines changed: 0 additions & 178 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,4 @@ bin/jjtask-go
4949
claude-plugin/bin/jjtask-go
5050
/jjtask
5151
tmp
52+
.dev-backup

.mise.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ description = "Build the jjtask binary"
88
run = "go build -o bin/jjtask-go ./cmd/jjtask"
99

1010
[tasks.test]
11-
description = "Run integration tests"
11+
description = "Run Go integration tests"
1212
depends = ["build"]
13-
run = "./test.sh"
13+
run = "go test ./cmd/jjtask/cmd/..."
1414

1515
[tasks.lint]
1616
description = "Run golangci-lint"

CLAUDE.md

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@ jjtask is a portable Claude Code plugin for structured task management using JJ
1212
jjtask/
1313
├── cmd/jjtask/ # Go CLI source
1414
│ ├── main.go # Entry point
15-
│ └── cmd/ # Cobra commands (find, create, flag, next, etc.)
15+
│ └── cmd/ # Cobra commands (wip, done, drop, squash, find, create, etc.)
1616
├── internal/ # Go internal packages
1717
│ ├── jj/ # JJ interaction layer
18-
│ ├── parallel/ # Parallel agent session management
1918
│ └── workspace/ # Multi-workspace support
2019
├── bin/
2120
│ ├── jjtask # Dispatcher (downloads/runs jjtask-go)
@@ -31,25 +30,23 @@ jjtask/
3130
├── shell/fish/
3231
│ ├── completions/ # Generated fish completions
3332
│ └── functions/ # jjtask-env.fish shell setup
34-
├── test/ # Integration tests and snapshots
33+
├── test/ # Test snapshots (test/snapshots_go/)
3534
├── .github/workflows/ # CI and release automation
3635
├── install.sh # Installer (builds Go, symlinks, completions)
37-
├── test.sh # Integration test runner
3836
└── .mise.toml # Toolchain and tasks (Go 1.25, golangci-lint)
3937
```
4038

4139
## Multi-Workspace Support
4240

43-
For projects with multiple jj repos, create `.jj-workspaces.yaml` in project root:
41+
For projects with multiple jj repos, create `.jjtask.toml` in project root:
4442

45-
```yaml
46-
repos:
47-
- path: frontend
48-
name: frontend
49-
- path: backend
50-
name: backend
51-
- path: .
52-
name: root
43+
```toml
44+
[workspaces]
45+
repos = [
46+
{ path = "frontend", name = "frontend" },
47+
{ path = "backend", name = "backend" },
48+
{ path = ".", name = "root" },
49+
]
5350
```
5451

5552
Scripts auto-detect this config and operate across all repos:
@@ -81,10 +78,11 @@ mise run dev # Dev setup: symlinks + completions
8178

8279
Manual workflow:
8380
```bash
84-
go build -o bin/jjtask-go ./cmd/jjtask # Build
85-
./test.sh # Test
86-
./install.sh # Install to ~/.local/bin
87-
./install.sh --uninstall # Remove
81+
go build -o bin/jjtask-go ./cmd/jjtask # Build
82+
go test ./cmd/jjtask/cmd/... # Test all
83+
go test ./cmd/jjtask/cmd/... -v -run TestCreate # Filter tests
84+
./install.sh # Install to ~/.local/bin
85+
./install.sh --uninstall # Remove
8886
```
8987

9088
## Releasing
@@ -105,8 +103,8 @@ This will:
105103
- Go code in `cmd/jjtask/cmd/` for commands, `internal/` for shared packages
106104
- Use Cobra for CLI structure with persistent flags for JJ globals (-R, --quiet)
107105
- Prefer `change_id.shortest()` over `change_id.short()` in templates
108-
- Integration tests use snapshot comparison (test/snapshots/)
109-
- Update snapshots with `SNAPSHOT_UPDATE=1 ./test.sh`
106+
- Integration tests use snapshot comparison (test/snapshots_go/)
107+
- Update snapshots with `SNAPSHOT_UPDATE=1 go test ./cmd/jjtask/cmd/...`
110108

111109
## Creating Skills/Commands
112110

README.md

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@ claude plugin install jjtask@jjtask-marketplace
2424

2525
## Workflow
2626

27-
jjtask enables a two-role workflow: Planners create task specifications, Workers implement them.
27+
jjtask uses a "mega-merge" model: @ is always a merge of all active work.
2828

2929
```
3030
┌─────────────────────────────────────────────────────────────┐
3131
│ PLANNING PHASE │
3232
├─────────────────────────────────────────────────────────────┤
3333
│ 1. Create task DAG with specifications │
34-
jj task create @ "Add user auth" "## Requirements..." │
35-
jj task parallel @ "Frontend" "Backend" "Tests" │
34+
jjtask create "Add user auth" "## Requirements..."
35+
jjtask parallel "Frontend" "Backend" "Tests"
3636
│ │
3737
│ 2. Review structure │
38-
jj task find │
38+
jjtask find
3939
│ │
4040
│ Result: Empty revisions with [task:todo] flags │
4141
└─────────────────────────────────────────────────────────────┘
@@ -44,27 +44,26 @@ jjtask enables a two-role workflow: Planners create task specifications, Workers
4444
┌─────────────────────────────────────────────────────────────┐
4545
│ WORKING PHASE │
4646
├─────────────────────────────────────────────────────────────┤
47-
│ 3. Pick a task and start working │
48-
│ jj edit <task-id> │
49-
│ jj task flag @ wip │
47+
│ 3. Start working on a task (@ becomes merge of active) │
48+
│ jjtask wip <task-id> │
5049
│ │
51-
│ 4. Implement according to specs in description
50+
│ 4. Work directly in @ - changes go to merged tasks
5251
│ # write code, make changes │
5352
│ │
54-
│ 5. Review specs, check acceptance criteria │
55-
jj task next # shows current specs
53+
│ 5. Complete task when ALL criteria met
54+
jjtask done
5655
│ │
57-
│ 6. Transition when ALL criteria met
58-
jj task next --mark-as done <next-task>
56+
│ 6. Ready to push? Flatten the merge
57+
jjtask squash
5958
└─────────────────────────────────────────────────────────────┘
6059
```
6160

6261
### Workflow Rules
6362

6463
- Never mark `done` unless ALL acceptance criteria pass
65-
- Use `blocked`, `review`, or `untested` if criteria aren't fully met
64+
- Use `jjtask flag blocked/review/untested` if criteria aren't fully met
6665
- Task descriptions are specifications - follow them exactly
67-
- `jj task next` shows specs and available transitions
66+
- @ is always a merge of all WIP + done-with-content tasks
6867

6968
## Task Flags
7069

@@ -116,24 +115,24 @@ The `label("task " ++ task_flag, ...)` applies colors defined in jjtask's `[colo
116115

117116
## Commands
118117

119-
All commands work as `jj task <cmd>` (requires alias in config) or `jjtask <cmd>` directly:
120-
121118
| Command | Action |
122119
| --- | --- |
123-
| `jj task find [flag]` | List tasks by status |
124-
| `jj task create [parent] <title> [desc]` | Create task revision |
125-
| `jj task flag <rev> <flag>` | Update task status |
126-
| `jj task next [--mark-as flag] [rev]` | Review current task, transition to next |
127-
| `jj task finalize [rev]` | Strip [task:*] for final commit |
128-
| `jj task parallel <parent> <t1> <t2>...` | Create sibling tasks |
129-
| `jj task hoist` | Rebase pending tasks to @- |
130-
| `jj task show-desc [rev]` | Print revision description |
131-
| `jj task checkpoint [name]` | Create named checkpoint |
120+
| `jjtask create <title> [desc]` | Create task revision |
121+
| `jjtask wip [task]` | Mark WIP, rebuild @ as merge |
122+
| `jjtask done [task]` | Mark done (stays in @ if content) |
123+
| `jjtask drop <task>` | Remove from @ (mark standby) |
124+
| `jjtask squash` | Flatten @ merge for push |
125+
| `jjtask find [-s status]` | List tasks by status |
126+
| `jjtask flag <status> [-r rev]` | Update task status |
127+
| `jjtask parallel <t1> <t2>...` | Create sibling tasks |
128+
| `jjtask show-desc [-r rev]` | Print revision description |
129+
| `jjtask checkpoint [name]` | Create named checkpoint |
132130

133131
Multi-repo support (requires `.jj-workspaces.yaml`):
132+
134133
| Command | Action |
135134
| --- | --- |
136-
| `jj task all <cmd> [args]` | Run jj command across repos |
135+
| `jjtask all <cmd> [args]` | Run jj command across repos |
137136

138137
## Installation
139138

@@ -182,7 +181,7 @@ repos:
182181
name: backend
183182
```
184183
185-
Then `jj task find` and `jj task all` operate across all repos.
184+
Then `jjtask find` and `jjtask all` operate across all repos.
186185

187186
## Writing Good Task Descriptions
188187

bin/jj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,10 @@ case "$1" in
115115
fi
116116
;;
117117
rebase)
118-
show_hint rebase "AGENT HINT: For hoisting pending tasks to @: jjtask hoist"
118+
show_hint rebase "AGENT HINT: Use 'jjtask wip TASK' to start working (rebuilds @ as merge)"
119119
;;
120120
edit)
121-
show_hint edit "AGENT HINT: For task transitions: jjtask next --mark-as STATUS REV"
121+
show_hint edit "AGENT HINT: Use 'jjtask wip TASK' to start, 'jjtask done TASK' to complete"
122122
;;
123123
esac
124124

0 commit comments

Comments
 (0)