Loading...
Loading...
Structured TODO commit workflow using JJ (Jujutsu). Use to plan tasks as empty commits with [task:*] flags, track progress through status transitions, manage parallel task DAGs with dependency checking. Enforces completion discipline. Enables to divide work between Planners and Workers. **Requires the working-with-jj skill**
npx skill4agent add ypares/agent-skills jj-todo-workflowworking-with-jj# 1. Plan: Create a simple TODO chain
jj-todo-create @ "Add user validation" "Check email format and password strength"
# Created: abc123 (stays on current @)
jj-todo-create abc123 "Add validation tests" "Test valid/invalid emails and passwords"
# Created: def456 (@ still hasn't moved)
# 2. Start working on first TODO
jj edit abc123
jj-flag-update @ wip # Now [task:wip]
# ... implement validation ...
# 3. Verify ALL acceptance criteria met
make test # Or equivalent in your project
# 4. Ask to move to next task
jj-todo-next
### ... review current specs (to ensure compliance) and next possible TODOs ...
# 5. Once we're sure everything is properly done, move to next TODO
jj-todo-next --mark-as done def456 # Marks abc123 as [task:done], starts def456 as [task:wip]jj-todo-next --mark-as done <next-step>[task:*]| Flag | Meaning |
|---|---|
| Placeholder created, needs full specification |
| Not started, empty revision with complete specs |
| Work in progress |
| Waiting on external dependency |
| Awaits some decision (broken and hard to fix, usefulness called into question, etc.) |
| Implementation done, but not tested enough to be validated |
| Needs review (tricky code, design choice) |
| Complete, all acceptance criteria met |
standbydrafttodo[task:draft][task:todo]jj-flag-update @ draft # Mark as needing specification (Planners)
jj-flag-update @ todo # Mark as ready to work on (Planners)
jj-flag-update @ wip # Start work (Workers)
jj-flag-update @ untested # Implementation done, tests missing (Workers)
jj-flag-update @ done # Complete (Workers)jj-find-flagged # All tasks
jj-find-flagged draft # Only [task:draft]
jj-find-flagged todo # Only [task:todo]
jj-find-flagged wip # Only [task:wip]
jj-find-flagged done # Only [task:done]
# Manual - all tasks
jj log -r 'description(substring:"[task:")'
# Incomplete tasks only (excludes done)
jj log -r 'description(substring:"[task:") & ~description(substring:"[task:done]")'# Create linear chain of tasks
jj-todo-create @ "Task 1: Setup data model" "...details..."
jj-todo-create <T1-id> "Task 2: Implement core logic" "..."
jj-todo-create <T2-id> "Task 3: Add API endpoints" "..."
jj-todo-create <T3-id> "Task 4: Write tests" "..."# Read the specs
jj-show-desc <task-id> # BEWARE: Script from the `working-with-jj` skill
# Start working on it
jj edit <task-id>
jj-flag-update @ wip
# ... implement ...
# Mark progress
jj-flag-update @ untestedjj-todo-next# Review current specs and see what's next
jj-todo-next
# Shows:
# 📋 Current task specs for review:
# ─────────────────────
# ...
# ─────────────────────
#
# Current task status: [task:wip]
# Mark as [task:done] only if FULLY COMPLIANT with specs above.
#
# ✅ Available next tasks:
# abc123 [task:todo] Feature B
# def456 [task:todo] Feature C
#
# ⚠️ Child tasks with unmet dependencies:
# xyz789 [task:todo] Integration
# Blocked by: abc123jj edit[task:wip]# Actually mark current done and start editing next:
jj-todo-next --mark-as done abc123
# Does the `jj edit abc123` and shows its description# Linear foundation
jj-todo-create @ "Task 1: Core infrastructure"
jj-todo-create <T1-id> "Task 2: Base components"
# Parallel branches from Task 2
jj-parallel-todos <T2-id> "Widget A" "Widget B" "Widget C"
# ... edit their descriptions to add more details ...
# Merge point (all three parents must complete first)
jj new --no-edit <A-id> <B-id> <C-id> -m "[task:todo] Integration of widgets\n\n..." Integration
/ | \
Widget A Widget B Widget C
\ | /
Task 2: Base
|
Task 1: CoreShort title (< 50 chars)
## Context
Why this task exists, what problem it solves.
## Requirements
- Specific requirement 1
- Specific requirement 2
## Implementation notes
Any hints, constraints, or approaches to consider.
## Acceptance criteria
How to know when this is FULLY DONE (not just "good enough"):
- Criterion 1
- Criterion 2[task:done]#stuff\ref{stuff}@stuffImplement user authentication
## Context
Users need to log in to access their data. Using JWT tokens
for stateless auth.
## Requirements
- POST /auth/login accepts email + password
- Returns JWT token valid for 24h
- POST /auth/refresh extends token
- Invalid credentials return 401
## Implementation notes
- Use bcrypt for password hashing (see src/auth/admin.py::AdminLogin::hash_passwd which already uses it)
- Store refresh tokens in Redis
- See auth.md (#about-tokens) for token format spec
## Acceptance criteria
- All auth endpoints return correct status codes
- Tokens expire correctly
- Rate limiting prevents brute force[task:draft][task:todo][task:todo][task:draft][task:wip][task:draft]@references/parallel-agents.mdjj edit# After implementing, add notes
jj desc -r @ -m "$(jj-show-desc @)
## Post-Implementation notes
- Used argon2 instead of bcrypt. That's because contrary to admin case, here we also needed to comply with...
- Added /auth/logout endpoint. Not in original spec but necessary because...
- Set Rate limit to 5 attempts per minute. Was unspecified, had to make a choice.
"jj-show-descworking-with-jj--no-editjj-todo-createjj new --no-edit--mark-as review--mark-as blocked--mark-as untested--mark-as standby[task:wip]# FIRST: Verify the work
make check # or: cargo build, pnpm tsc, uv run pytest
# ONLY if all checks pass:
jj-todo-next --mark-as done <next-id># Check what a task depends on (its immediate ancestors)
jj log -r 'ancestors(<rev-id>,2)' # 2 for parents, 3 for parents + grandparents, etc.
# Check what depends on a task (its immediate descendants)
jj log -r 'descendants(<rev-id>,2)' # 2 for children, 3 for children + grandchildren, etc.[task:*]drafttodowipblockedjj-todo-nextjjjj logscripts/| Script | Purpose |
|---|---|
| Create TODO (stays on @). Use --draft for placeholder tasks |
| Create parallel TODOs. Use --draft for placeholder tasks |
| Review specs, check dependencies, mark & optionally move |
| Update status flag (auto-detects current) |
| Find flagged revisions |
working-with-jj| Script | Purpose |
|---|---|
| Print description of a revision |
references/parallel-agents.md