taskmanager-exe 0.1.0__tar.gz
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.
- taskmanager_exe-0.1.0/.github/workflows/publish.yml +45 -0
- taskmanager_exe-0.1.0/.github/workflows/test.yml +44 -0
- taskmanager_exe-0.1.0/.gitignore +47 -0
- taskmanager_exe-0.1.0/DESIGN.md +369 -0
- taskmanager_exe-0.1.0/LICENSE +3 -0
- taskmanager_exe-0.1.0/PKG-INFO +8 -0
- taskmanager_exe-0.1.0/PROMPT.md +116 -0
- taskmanager_exe-0.1.0/pyproject.toml +22 -0
- taskmanager_exe-0.1.0/skills/describe.md +5 -0
- taskmanager_exe-0.1.0/skills/history-batch.md +7 -0
- taskmanager_exe-0.1.0/skills/history-diffs.md +7 -0
- taskmanager_exe-0.1.0/skills/history-search.md +13 -0
- taskmanager_exe-0.1.0/skills/sync.md +5 -0
- taskmanager_exe-0.1.0/taskman/__init__.py +1 -0
- taskmanager_exe-0.1.0/taskman/cli.py +77 -0
- taskmanager_exe-0.1.0/taskman/core.py +480 -0
- taskmanager_exe-0.1.0/taskman/jj.py +76 -0
- taskmanager_exe-0.1.0/taskman/server.py +56 -0
- taskmanager_exe-0.1.0/tests/conftest.py +37 -0
- taskmanager_exe-0.1.0/tests/test_cli.py +30 -0
- taskmanager_exe-0.1.0/tests/test_core.py +56 -0
- taskmanager_exe-0.1.0/tests/test_e2e.py +48 -0
- taskmanager_exe-0.1.0/tests/test_install.py +167 -0
- taskmanager_exe-0.1.0/tests/test_jj.py +33 -0
- taskmanager_exe-0.1.0/tests/test_server.py +22 -0
- taskmanager_exe-0.1.0/tests/test_skills.py +27 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
|
|
14
|
+
- name: Set up Python
|
|
15
|
+
uses: actions/setup-python@v5
|
|
16
|
+
with:
|
|
17
|
+
python-version: "3.12"
|
|
18
|
+
|
|
19
|
+
- name: Install build dependencies
|
|
20
|
+
run: pip install build
|
|
21
|
+
|
|
22
|
+
- name: Build package
|
|
23
|
+
run: python -m build
|
|
24
|
+
|
|
25
|
+
- name: Upload dist artifacts
|
|
26
|
+
uses: actions/upload-artifact@v4
|
|
27
|
+
with:
|
|
28
|
+
name: dist
|
|
29
|
+
path: dist/
|
|
30
|
+
|
|
31
|
+
publish:
|
|
32
|
+
needs: build
|
|
33
|
+
runs-on: ubuntu-latest
|
|
34
|
+
environment: pypi
|
|
35
|
+
permissions:
|
|
36
|
+
id-token: write
|
|
37
|
+
steps:
|
|
38
|
+
- name: Download dist artifacts
|
|
39
|
+
uses: actions/download-artifact@v4
|
|
40
|
+
with:
|
|
41
|
+
name: dist
|
|
42
|
+
path: dist/
|
|
43
|
+
|
|
44
|
+
- name: Publish to PyPI
|
|
45
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [master]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ${{ matrix.os }}
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
os: [ubuntu-latest, macos-latest]
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Set up Python
|
|
19
|
+
uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.12"
|
|
22
|
+
|
|
23
|
+
- name: Cache cargo
|
|
24
|
+
uses: actions/cache@v4
|
|
25
|
+
with:
|
|
26
|
+
path: |
|
|
27
|
+
~/.cargo/bin/jj
|
|
28
|
+
~/.cargo/.crates.toml
|
|
29
|
+
~/.cargo/.crates2.json
|
|
30
|
+
key: cargo-jj-${{ runner.os }}
|
|
31
|
+
|
|
32
|
+
- name: Install jj
|
|
33
|
+
run: command -v jj || cargo install --locked jj-cli
|
|
34
|
+
|
|
35
|
+
- name: Configure git
|
|
36
|
+
run: |
|
|
37
|
+
git config --global user.email "ci@test.com"
|
|
38
|
+
git config --global user.name "CI"
|
|
39
|
+
|
|
40
|
+
- name: Install package
|
|
41
|
+
run: pip install -e ".[dev]"
|
|
42
|
+
|
|
43
|
+
- name: Run tests
|
|
44
|
+
run: pytest
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
build/
|
|
8
|
+
develop-eggs/
|
|
9
|
+
dist/
|
|
10
|
+
downloads/
|
|
11
|
+
eggs/
|
|
12
|
+
.eggs/
|
|
13
|
+
lib/
|
|
14
|
+
lib64/
|
|
15
|
+
parts/
|
|
16
|
+
sdist/
|
|
17
|
+
var/
|
|
18
|
+
wheels/
|
|
19
|
+
*.egg-info/
|
|
20
|
+
.installed.cfg
|
|
21
|
+
*.egg
|
|
22
|
+
|
|
23
|
+
# Virtual environments
|
|
24
|
+
.venv/
|
|
25
|
+
venv/
|
|
26
|
+
ENV/
|
|
27
|
+
|
|
28
|
+
# IDE
|
|
29
|
+
.idea/
|
|
30
|
+
.vscode/
|
|
31
|
+
*.swp
|
|
32
|
+
*.swo
|
|
33
|
+
|
|
34
|
+
# Testing
|
|
35
|
+
.pytest_cache/
|
|
36
|
+
.coverage
|
|
37
|
+
htmlcov/
|
|
38
|
+
.tox/
|
|
39
|
+
.nox/
|
|
40
|
+
|
|
41
|
+
# Agent files
|
|
42
|
+
.agent-files/
|
|
43
|
+
.claude/
|
|
44
|
+
|
|
45
|
+
# OS
|
|
46
|
+
.DS_Store
|
|
47
|
+
Thumbs.db
|
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
# TaskManager.exe Design
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
A version-controlled task management system for AI agents. Agents use familiar file editing tools; versioning and sync happen transparently via jj (jujutsu).
|
|
6
|
+
|
|
7
|
+
**Design philosophy:** Dumb store + automation for things agents forget. Intelligence is wielded by the agent, not baked into the system.
|
|
8
|
+
|
|
9
|
+
## Architecture
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
13
|
+
│ Agent │
|
|
14
|
+
│ │ │
|
|
15
|
+
│ ┌────────────┴────────────┐ │
|
|
16
|
+
│ ▼ ▼ │
|
|
17
|
+
│ Edit tool MCP Server │
|
|
18
|
+
│ (file ops) (batch/sync ops) │
|
|
19
|
+
│ │ │ │
|
|
20
|
+
│ ▼ ▼ │
|
|
21
|
+
│ raw jj commands compound workflows │
|
|
22
|
+
│ │ │ │
|
|
23
|
+
│ └────────────┬────────────┘ │
|
|
24
|
+
│ ▼ │
|
|
25
|
+
│ .agent-files/ │
|
|
26
|
+
│ (jj repo) │
|
|
27
|
+
│ │ │
|
|
28
|
+
│ push/pull │
|
|
29
|
+
│ ▼ │
|
|
30
|
+
│ .agent-files.git/ │
|
|
31
|
+
│ (bare origin) │
|
|
32
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Components:**
|
|
36
|
+
|
|
37
|
+
1. **Agent**: Uses Edit tool for files, raw jj for simple ops, MCP for batch/compound ops
|
|
38
|
+
2. **MCP Server**: FastMCP, in-process, stdio. Only for things that need scripting.
|
|
39
|
+
3. **.agent-files/**: jj repo (can be colocated or non-colocated with git)
|
|
40
|
+
4. **.agent-files.git/**: Bare git origin for worktree sync
|
|
41
|
+
|
|
42
|
+
**Why clones instead of jj workspaces?**
|
|
43
|
+
|
|
44
|
+
jj workspaces share a commit graph immediately (no push/pull). But:
|
|
45
|
+
- No natural "source of truth" - all workspaces are peers
|
|
46
|
+
- Race conditions when multiple agents sync simultaneously
|
|
47
|
+
- Bare origin provides serialization: first push wins, second must pull first
|
|
48
|
+
- Explicit sync boundaries via push/pull match our session model
|
|
49
|
+
|
|
50
|
+
## Repo Structure
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
repo/
|
|
54
|
+
├── .agent-files.git/ # bare origin (shared across worktrees)
|
|
55
|
+
├── .agent-files/ # jj clone
|
|
56
|
+
│ ├── .jj/ # jj internals (includes git at .jj/repo/store/git)
|
|
57
|
+
│ ├── STATUS.md
|
|
58
|
+
│ ├── LONGTERM_MEM.md
|
|
59
|
+
│ ├── MEDIUMTERM_MEM.md
|
|
60
|
+
│ └── tasks/
|
|
61
|
+
│ ├── TASK_<slug>.md
|
|
62
|
+
│ └── _archive/
|
|
63
|
+
├── worktree-a/.agent-files/ # another jj clone
|
|
64
|
+
└── worktree-b/.agent-files/ # another jj clone
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
All clones push/pull to `.agent-files.git/`.
|
|
68
|
+
|
|
69
|
+
**Colocate vs non-colocate:** Either works. Non-colocated repos store git internally at `.jj/repo/store/git`. Push/pull works identically. Colocate only needed if you want git tools to work directly.
|
|
70
|
+
|
|
71
|
+
## Task File Format
|
|
72
|
+
|
|
73
|
+
```markdown
|
|
74
|
+
# TASK: <title>
|
|
75
|
+
|
|
76
|
+
## Meta
|
|
77
|
+
Status: planned|in_progress|blocked|complete
|
|
78
|
+
Priority: P0|P1|P2
|
|
79
|
+
Created: YYYY-MM-DD
|
|
80
|
+
Completed: YYYY-MM-DD
|
|
81
|
+
|
|
82
|
+
## Problem
|
|
83
|
+
<what, why>
|
|
84
|
+
|
|
85
|
+
## Design
|
|
86
|
+
<decisions, alternatives rejected>
|
|
87
|
+
|
|
88
|
+
## Checklist
|
|
89
|
+
- [ ] item
|
|
90
|
+
- [x] completed item
|
|
91
|
+
|
|
92
|
+
## Attempts
|
|
93
|
+
<!-- append-only, raw log -->
|
|
94
|
+
### Attempt 1 (YYYY-MM-DD HH:MM)
|
|
95
|
+
Approach: ...
|
|
96
|
+
Result: ...
|
|
97
|
+
|
|
98
|
+
## Summary
|
|
99
|
+
<!-- distilled on handoff, kept lean -->
|
|
100
|
+
Current state: ...
|
|
101
|
+
Key learnings: ...
|
|
102
|
+
Next steps: ...
|
|
103
|
+
|
|
104
|
+
## Notes
|
|
105
|
+
<breadcrumbs, file:line references>
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Versioning Model
|
|
109
|
+
|
|
110
|
+
**jj configuration:**
|
|
111
|
+
```toml
|
|
112
|
+
[ui]
|
|
113
|
+
conflict-marker-style = "git"
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Auto-snapshot:** jj snapshots working copy at start of any jj command. No explicit trigger needed.
|
|
117
|
+
|
|
118
|
+
**Revision syntax:**
|
|
119
|
+
- `@` = working copy commit
|
|
120
|
+
- `@-` = parent, `@--` = grandparent
|
|
121
|
+
- `bookmark..@` = range from bookmark to working copy
|
|
122
|
+
|
|
123
|
+
## Sync Model
|
|
124
|
+
|
|
125
|
+
**Sync at task boundaries only:**
|
|
126
|
+
- Session start: pull
|
|
127
|
+
- `/continue`: pull
|
|
128
|
+
- `/handoff`: push
|
|
129
|
+
- Task complete: push
|
|
130
|
+
|
|
131
|
+
**Last handoff tracking:** Agent records in STATUS.md: `Last handoff: <timestamp> (rev <id>)`
|
|
132
|
+
|
|
133
|
+
## CLI (taskman)
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
# Setup
|
|
137
|
+
taskman init # create .agent-files.git/ (bare) + .agent-files/ (clone)
|
|
138
|
+
taskman wt # in worktree: clone from root's .agent-files.git/
|
|
139
|
+
taskman install <agent> # install MCP config (claude, cursor, codex)
|
|
140
|
+
taskman install-skills # install skill files to ~/.claude/commands/
|
|
141
|
+
|
|
142
|
+
# Operations (used by both MCP and skills)
|
|
143
|
+
taskman describe <reason> # create checkpoint
|
|
144
|
+
taskman sync <reason> # full sync workflow
|
|
145
|
+
taskman history-diffs <file> <start> [end] # diffs across range
|
|
146
|
+
taskman history-batch <file> <start> [end] # versions across range
|
|
147
|
+
taskman history-search <pattern> [file] [mode] [limit] # search history
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Dual Interface: MCP + Skills
|
|
151
|
+
|
|
152
|
+
Both interfaces call the same CLI commands:
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
┌─────────────┐ ┌─────────────┐
|
|
156
|
+
│ MCP tools │ │ Skills │
|
|
157
|
+
└──────┬──────┘ └──────┬──────┘
|
|
158
|
+
│ │
|
|
159
|
+
└───────┬───────────┘
|
|
160
|
+
▼
|
|
161
|
+
taskman CLI
|
|
162
|
+
│
|
|
163
|
+
▼
|
|
164
|
+
jj commands
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
**MCP Server**: Calls `taskman` subprocess, returns output
|
|
168
|
+
**Skills**: Markdown prompts that run `taskman` via Bash
|
|
169
|
+
|
|
170
|
+
Same operations available either way. MCP preferred when available (typed params, structured errors), skills as fallback.
|
|
171
|
+
|
|
172
|
+
## What Agents Use Directly vs MCP
|
|
173
|
+
|
|
174
|
+
**Use jj directly (no wrapper needed):**
|
|
175
|
+
```bash
|
|
176
|
+
jj status # see current state
|
|
177
|
+
jj log # view history
|
|
178
|
+
jj log -r 'bookmark..@' # changes since bookmark
|
|
179
|
+
jj restore --from <rev> <file> # restore file
|
|
180
|
+
jj op log # operation history
|
|
181
|
+
jj op restore <id> # restore to operation
|
|
182
|
+
jj diff # see changes
|
|
183
|
+
jj git fetch # fetch only
|
|
184
|
+
jj git push # push only
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
**Use MCP tools (need scripting/batching):**
|
|
188
|
+
- `describe(reason)` - important checkpoint, ensures snapshot first
|
|
189
|
+
- `sync(reason)` - compound: describe + fetch + rebase + push + conflict check
|
|
190
|
+
- `history_diffs(file, start, end)` - aggregate diffs across range
|
|
191
|
+
- `history_batch(file, start, end)` - fetch multiple file versions
|
|
192
|
+
- `history_search(pattern, file, limit)` - search using jj's `diff_contains()` revset
|
|
193
|
+
|
|
194
|
+
## Code Architecture
|
|
195
|
+
|
|
196
|
+
```
|
|
197
|
+
taskman/
|
|
198
|
+
├── core.py # Core logic (describe, sync, history_*)
|
|
199
|
+
├── jj.py # jj command utilities
|
|
200
|
+
├── server.py # MCP server (imports core)
|
|
201
|
+
└── cli.py # CLI (imports core)
|
|
202
|
+
|
|
203
|
+
~/.claude/commands/
|
|
204
|
+
├── describe.md # Skill: runs `taskman describe`
|
|
205
|
+
├── sync.md # Skill: runs `taskman sync`
|
|
206
|
+
├── history-diffs.md # Skill: runs `taskman history-diffs`
|
|
207
|
+
└── ...
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
┌─────────────────┐ ┌─────────────┐
|
|
212
|
+
│ MCP server │ │ CLI │
|
|
213
|
+
│ (in-process) │ │ (subprocess)│
|
|
214
|
+
└────────┬────────┘ └──────┬──────┘
|
|
215
|
+
│ import │ import
|
|
216
|
+
└──────────┬──────────┘
|
|
217
|
+
▼
|
|
218
|
+
taskman/core.py
|
|
219
|
+
│
|
|
220
|
+
▼
|
|
221
|
+
taskman/jj.py
|
|
222
|
+
│
|
|
223
|
+
▼
|
|
224
|
+
jj commands
|
|
225
|
+
↑
|
|
226
|
+
Skills (bash) ─── taskman CLI
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
MCP imports core directly (no subprocess overhead). Skills call CLI via bash.
|
|
230
|
+
|
|
231
|
+
## MCP API
|
|
232
|
+
|
|
233
|
+
Thin wrappers around sync core functions. FastMCP handles exceptions as tool errors automatically.
|
|
234
|
+
|
|
235
|
+
```python
|
|
236
|
+
from mcp.server.fastmcp import FastMCP
|
|
237
|
+
from taskman import core
|
|
238
|
+
|
|
239
|
+
mcp = FastMCP("taskman")
|
|
240
|
+
|
|
241
|
+
@mcp.tool()
|
|
242
|
+
def describe(reason: str) -> str:
|
|
243
|
+
"""Create named checkpoint."""
|
|
244
|
+
return core.describe(reason)
|
|
245
|
+
|
|
246
|
+
@mcp.tool()
|
|
247
|
+
def sync(reason: str) -> str:
|
|
248
|
+
"""Full sync: describe, fetch, rebase, push."""
|
|
249
|
+
return core.sync(reason)
|
|
250
|
+
|
|
251
|
+
@mcp.tool()
|
|
252
|
+
def history_diffs(file: str, start_rev: str, end_rev: str = "@") -> str:
|
|
253
|
+
"""Get all diffs for file across revision range."""
|
|
254
|
+
return core.history_diffs(file, start_rev, end_rev)
|
|
255
|
+
|
|
256
|
+
@mcp.tool()
|
|
257
|
+
def history_batch(file: str, start_rev: str, end_rev: str = "@") -> str:
|
|
258
|
+
"""Fetch file content at all revisions in range."""
|
|
259
|
+
return core.history_batch(file, start_rev, end_rev)
|
|
260
|
+
|
|
261
|
+
@mcp.tool()
|
|
262
|
+
def history_search(pattern: str, file: str = None, limit: int = 20) -> str:
|
|
263
|
+
"""Search history for pattern in diffs."""
|
|
264
|
+
return core.history_search(pattern, file, limit)
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
## Skills
|
|
268
|
+
|
|
269
|
+
Skill files call CLI (which imports core):
|
|
270
|
+
|
|
271
|
+
**describe.md:**
|
|
272
|
+
```markdown
|
|
273
|
+
Run: taskman describe "$ARGUMENTS"
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
**sync.md:**
|
|
277
|
+
```markdown
|
|
278
|
+
Run: taskman sync "$ARGUMENTS"
|
|
279
|
+
If conflicts, resolve with Edit, then run again.
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
**history-diffs.md / history-batch.md / history-search.md:**
|
|
283
|
+
```markdown
|
|
284
|
+
Run: taskman <command> $ARGUMENTS
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
## Sync Protocol
|
|
288
|
+
|
|
289
|
+
**sync() implementation:**
|
|
290
|
+
```
|
|
291
|
+
1. jj describe -m "<reason>" # snapshot + describe
|
|
292
|
+
2. jj git fetch # get remote changes
|
|
293
|
+
3. jj rebase -d main@origin # rebase onto remote
|
|
294
|
+
4. check jj status for conflicts
|
|
295
|
+
- if conflicts: return conflict info, agent resolves, calls sync() again
|
|
296
|
+
5. jj git push # push to origin
|
|
297
|
+
- if rejected: return error (remote changed, need to sync again)
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
## Conflict Resolution
|
|
301
|
+
|
|
302
|
+
With `ui.conflict-marker-style = "git"`:
|
|
303
|
+
|
|
304
|
+
```
|
|
305
|
+
<<<<<<< side A
|
|
306
|
+
local changes
|
|
307
|
+
||||||| base
|
|
308
|
+
original content
|
|
309
|
+
=======
|
|
310
|
+
remote changes
|
|
311
|
+
>>>>>>> side B
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
Agent resolves with Edit, calls `sync()` to complete.
|
|
315
|
+
|
|
316
|
+
## Handoff Types
|
|
317
|
+
|
|
318
|
+
**handoff_detailed (mid-task):** Comprehensive to avoid repeating mistakes.
|
|
319
|
+
- Attempts: what was tried, what failed
|
|
320
|
+
- Summary: current state, learnings, next steps
|
|
321
|
+
- Notes: breadcrumbs (file:line references)
|
|
322
|
+
|
|
323
|
+
**handoff_next_task (task complete):** Brief pointer to next task.
|
|
324
|
+
|
|
325
|
+
**Breadcrumbs principle:** Include enough to reconstruct, not everything.
|
|
326
|
+
|
|
327
|
+
## Error Handling
|
|
328
|
+
|
|
329
|
+
Bubble up jj errors to agent. No complex handling - agent decides.
|
|
330
|
+
|
|
331
|
+
## jj Gotchas
|
|
332
|
+
|
|
333
|
+
1. **Stale working copy**: If operation interrupted, fix with `jj workspace update-stale`
|
|
334
|
+
2. **Conflicted commits in git**: Appear as `.jjconflict-*/` directories
|
|
335
|
+
3. **Change IDs**: Stored in non-standard git headers, may not survive pure-git ops
|
|
336
|
+
|
|
337
|
+
## MCP Configuration Locations
|
|
338
|
+
|
|
339
|
+
**Claude Code:**
|
|
340
|
+
- Global: `~/.claude.json`
|
|
341
|
+
- Project: `.mcp.json`
|
|
342
|
+
- Format: JSON with `mcpServers` key
|
|
343
|
+
|
|
344
|
+
```json
|
|
345
|
+
{
|
|
346
|
+
"mcpServers": {
|
|
347
|
+
"taskman": {
|
|
348
|
+
"type": "stdio",
|
|
349
|
+
"command": "taskman",
|
|
350
|
+
"args": ["serve"]
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
**Cursor:**
|
|
357
|
+
- Global: `~/.cursor/mcp.json`
|
|
358
|
+
- Project: `.cursor/mcp.json`
|
|
359
|
+
- Format: JSON with `mcpServers` key (same structure as Claude)
|
|
360
|
+
|
|
361
|
+
**Codex:**
|
|
362
|
+
- Global: `~/.codex/config.toml`
|
|
363
|
+
- Format: TOML with `mcp_servers` key (underscore, not hyphen)
|
|
364
|
+
|
|
365
|
+
```toml
|
|
366
|
+
[mcp_servers.taskman]
|
|
367
|
+
command = "taskman"
|
|
368
|
+
args = ["serve"]
|
|
369
|
+
```
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# TaskManager.exe
|
|
2
|
+
|
|
3
|
+
Build a task management system for AI agents.
|
|
4
|
+
|
|
5
|
+
## Problem
|
|
6
|
+
|
|
7
|
+
AI agents using file-based task systems lose work when:
|
|
8
|
+
- Multiple agents edit the same file
|
|
9
|
+
- Agent context resets mid-task and overwrites with stale state
|
|
10
|
+
- No history to recover from
|
|
11
|
+
- **Agents go in circles** - after context reset, they repeat the same mistakes because they don't know what was already tried
|
|
12
|
+
|
|
13
|
+
## Use Cases
|
|
14
|
+
|
|
15
|
+
### Single agent, single repo
|
|
16
|
+
Agent works on tasks, context resets periodically. Need to preserve what was tried.
|
|
17
|
+
|
|
18
|
+
### Multiple agents, worktrees
|
|
19
|
+
Multiple agents work in different git worktrees of same repo. Each has own `.agent-files/` that should sync with others. Agents shouldn't trample each other's work.
|
|
20
|
+
|
|
21
|
+
## Task System Structure
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
.agent-files/
|
|
25
|
+
STATUS.md # Task index, current session state, blockers, next steps
|
|
26
|
+
LONGTERM_MEM.md # Architecture knowledge (stable for months)
|
|
27
|
+
MEDIUMTERM_MEM.md # Patterns, gotchas (stable for weeks)
|
|
28
|
+
HANDOFF_<slug>.md # Handoff prompts between sessions
|
|
29
|
+
tasks/
|
|
30
|
+
TASK_<slug>.md # Individual tasks with status, checklist, notes
|
|
31
|
+
_archive/ # Completed tasks
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Task file format:**
|
|
35
|
+
```markdown
|
|
36
|
+
# TASK: <title>
|
|
37
|
+
|
|
38
|
+
## Meta
|
|
39
|
+
Status: planned|in_progress|blocked|complete
|
|
40
|
+
Priority: P0|P1|P2
|
|
41
|
+
Created: YYYY-MM-DD
|
|
42
|
+
|
|
43
|
+
## Problem
|
|
44
|
+
<what, why>
|
|
45
|
+
|
|
46
|
+
## Design
|
|
47
|
+
<decisions, alternatives>
|
|
48
|
+
|
|
49
|
+
## Checklist
|
|
50
|
+
- [ ] item
|
|
51
|
+
- [x] completed item
|
|
52
|
+
|
|
53
|
+
## Attempts
|
|
54
|
+
<!-- append-only log of what was tried -->
|
|
55
|
+
### Attempt 1 (YYYY-MM-DD HH:MM)
|
|
56
|
+
Approach: ...
|
|
57
|
+
Result: ...
|
|
58
|
+
|
|
59
|
+
## Summary
|
|
60
|
+
<!-- distilled on handoff, kept lean -->
|
|
61
|
+
Current state: ...
|
|
62
|
+
Key learnings: ...
|
|
63
|
+
Next steps: ...
|
|
64
|
+
|
|
65
|
+
## Notes
|
|
66
|
+
<gotchas, breadcrumbs>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Requirements
|
|
70
|
+
|
|
71
|
+
### Core
|
|
72
|
+
- Version every file change automatically
|
|
73
|
+
- Expose history queries via API (raw git is too heavy, agents forget to use it)
|
|
74
|
+
- MCP server (in-process, stdio transport). Recommend FastMCP but open to alternatives.
|
|
75
|
+
- Agents should keep using Edit tool for file ops (familiar, low friction)
|
|
76
|
+
|
|
77
|
+
### Handoff Requirements
|
|
78
|
+
|
|
79
|
+
Need two handoff modes with different verbosity:
|
|
80
|
+
- **Mid-task handoff**: Comprehensive context to avoid next session repeating mistakes
|
|
81
|
+
- **Task complete handoff**: Brief pointer to next task (avoid memory bloat)
|
|
82
|
+
|
|
83
|
+
### Breadcrumbs Principle
|
|
84
|
+
|
|
85
|
+
Don't include all context in handoffs. Include enough that a clean session can reconstruct what's needed - references with short summaries, not full content.
|
|
86
|
+
|
|
87
|
+
### Backing Store Options
|
|
88
|
+
|
|
89
|
+
**jj (jujutsu):**
|
|
90
|
+
- Working copy is always a commit (automatic snapshotting)
|
|
91
|
+
- Simpler model than git (no staging area)
|
|
92
|
+
|
|
93
|
+
**git:**
|
|
94
|
+
- Ubiquitous
|
|
95
|
+
- Heavier (commit messages, staging area)
|
|
96
|
+
|
|
97
|
+
**Alternative:** Each `.agent-files/` is a cloned repo that agents push/pull. Downside: commit messages and merge conflicts burn tokens.
|
|
98
|
+
|
|
99
|
+
### Edit Tool Compatibility
|
|
100
|
+
|
|
101
|
+
Agents know the Edit tool well. Ideal: keep using Edit, get versioning "for free."
|
|
102
|
+
|
|
103
|
+
Options:
|
|
104
|
+
1. MCP tools for everything (agents learn new API)
|
|
105
|
+
2. Edit tool + background auto-commit watcher
|
|
106
|
+
3. Edit passthrough via MCP
|
|
107
|
+
4. Just use git directly (heavy)
|
|
108
|
+
|
|
109
|
+
## Open Design Questions
|
|
110
|
+
|
|
111
|
+
1. jj vs git?
|
|
112
|
+
2. MCP API for writes, or let agents use Edit?
|
|
113
|
+
3. How to surface history to agents who forget to query it?
|
|
114
|
+
4. Atomic multi-file commits - needed?
|
|
115
|
+
5. What triggers commit? (every write, debounced, explicit)
|
|
116
|
+
6. Worktree sync model - workspaces vs clones?
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "taskmanager-exe"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
requires-python = ">=3.11"
|
|
5
|
+
dependencies = [
|
|
6
|
+
"mcp",
|
|
7
|
+
]
|
|
8
|
+
|
|
9
|
+
[project.optional-dependencies]
|
|
10
|
+
dev = [
|
|
11
|
+
"pytest>=8.0",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
[project.scripts]
|
|
15
|
+
taskman = "taskman.cli:main"
|
|
16
|
+
|
|
17
|
+
[build-system]
|
|
18
|
+
requires = ["hatchling"]
|
|
19
|
+
build-backend = "hatchling.build"
|
|
20
|
+
|
|
21
|
+
[tool.hatch.build.targets.wheel]
|
|
22
|
+
packages = ["taskman"]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Search history for a pattern in diffs.
|
|
2
|
+
|
|
3
|
+
Arguments: <pattern> [--file <file>] [--limit N]
|
|
4
|
+
|
|
5
|
+
Pattern syntax (jj native):
|
|
6
|
+
- Default: glob match
|
|
7
|
+
- regex:pattern - regex match
|
|
8
|
+
- exact:pattern - exact match
|
|
9
|
+
- substring:pattern - substring match
|
|
10
|
+
|
|
11
|
+
Run: taskman history-search $ARGUMENTS
|
|
12
|
+
|
|
13
|
+
Display matching revisions.
|