@jamesaphoenix/tx 0.1.0
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/LICENSE +21 -0
- package/README.md +125 -0
- package/dist/cli.js +868 -0
- package/dist/cli.js.map +1 -0
- package/dist/db.js +70 -0
- package/dist/db.js.map +1 -0
- package/dist/errors.js +22 -0
- package/dist/errors.js.map +1 -0
- package/dist/id.js +19 -0
- package/dist/id.js.map +1 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/layer.js +20 -0
- package/dist/layer.js.map +1 -0
- package/dist/mcp/server.js +453 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/repo/dep-repo.js +104 -0
- package/dist/repo/dep-repo.js.map +1 -0
- package/dist/repo/task-repo.js +140 -0
- package/dist/repo/task-repo.js.map +1 -0
- package/dist/schema.js +37 -0
- package/dist/schema.js.map +1 -0
- package/dist/schemas/sync.js +55 -0
- package/dist/schemas/sync.js.map +1 -0
- package/dist/services/dep-service.js +34 -0
- package/dist/services/dep-service.js.map +1 -0
- package/dist/services/hierarchy-service.js +66 -0
- package/dist/services/hierarchy-service.js.map +1 -0
- package/dist/services/ready-service.js +70 -0
- package/dist/services/ready-service.js.map +1 -0
- package/dist/services/score-service.js +82 -0
- package/dist/services/score-service.js.map +1 -0
- package/dist/services/sync-service.js +244 -0
- package/dist/services/sync-service.js.map +1 -0
- package/dist/services/task-service.js +201 -0
- package/dist/services/task-service.js.map +1 -0
- package/migrations/001_initial.sql +57 -0
- package/package.json +52 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 James Phoenix
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# tx
|
|
2
|
+
|
|
3
|
+
A lean task management system for AI agents and humans, built with Effect-TS.
|
|
4
|
+
|
|
5
|
+
## Why
|
|
6
|
+
|
|
7
|
+
AI coding agents lose context across sessions. Markdown plans go stale, git issue trackers are designed for humans, and session-scoped todo lists vanish when the conversation ends.
|
|
8
|
+
|
|
9
|
+
**tx** gives agents a persistent, queryable, dependency-aware task store that works across sessions and can be programmatically manipulated through CLI, MCP, or TypeScript API.
|
|
10
|
+
|
|
11
|
+
## Core Ideas
|
|
12
|
+
|
|
13
|
+
- **Persistent** -- Tasks survive across agent sessions and machine restarts via SQLite
|
|
14
|
+
- **Fast** -- Sub-100ms queries for common operations (list, ready, get)
|
|
15
|
+
- **Dependency-aware** -- Explicit blocking relationships so agents never work on blocked tasks
|
|
16
|
+
- **Ready detection** -- `tx ready` returns the highest-priority unblocked tasks, sorted by score
|
|
17
|
+
- **Hierarchical** -- Flexible N-level nesting (epics, milestones, tasks, subtasks)
|
|
18
|
+
- **Multi-interface** -- CLI for humans, MCP server for Claude Code, TypeScript API for custom agents
|
|
19
|
+
- **Minimal** -- Single dependency (SQLite), no external services required for core features
|
|
20
|
+
- **LLM-optional** -- Core commands work without an API key; LLM features (dedupe, compact, reprioritize) use Claude when available
|
|
21
|
+
|
|
22
|
+
## How It Works
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
tx add "Implement authentication" --score 800
|
|
26
|
+
tx add "Design auth schema" --parent tx-a1b2c3
|
|
27
|
+
tx block tx-d4e5f6 tx-a1b2c3
|
|
28
|
+
tx ready # returns highest-priority unblocked tasks
|
|
29
|
+
tx done tx-a1b2c3 # completes task, unblocks dependents
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Agents query `tx ready` to pick up work, create subtasks as they decompose problems, and mark tasks done to unblock the next piece of work. Humans review, reprioritize, and add context.
|
|
33
|
+
|
|
34
|
+
## Architecture
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
CLI / MCP Server / TypeScript API
|
|
38
|
+
|
|
|
39
|
+
Service Layer (Effect-TS)
|
|
40
|
+
TaskService, ReadyService, ScoreService, HierarchyService
|
|
41
|
+
|
|
|
42
|
+
Repository Layer
|
|
43
|
+
TaskRepository, DependencyRepository
|
|
44
|
+
|
|
|
45
|
+
SQLite (better-sqlite3, WAL mode)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
All business logic uses Effect-TS for typed errors, service composition, and layer-based dependency injection. Two layer configurations:
|
|
49
|
+
|
|
50
|
+
- **AppMinimalLive** -- No LLM, used by CLI core commands, MCP server, Agent SDK
|
|
51
|
+
- **AppLive** -- Includes LLM, used by dedupe/compact/reprioritize
|
|
52
|
+
|
|
53
|
+
## Status Lifecycle
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
backlog -> ready -> planning -> active -> blocked -> review -> human_needs_to_review -> done
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
A task is **ready** when its status is workable and all blockers have status `done`.
|
|
60
|
+
|
|
61
|
+
## Interfaces
|
|
62
|
+
|
|
63
|
+
| Interface | Consumer | Protocol |
|
|
64
|
+
|-----------|----------|----------|
|
|
65
|
+
| CLI (`tx`) | Humans, scripts | stdin/stdout (text or JSON) |
|
|
66
|
+
| MCP Server | Claude Code | JSON-RPC over stdio |
|
|
67
|
+
| TypeScript API | Custom agents | Effect types |
|
|
68
|
+
| Agent SDK | Anthropic SDK | Tool definitions |
|
|
69
|
+
|
|
70
|
+
## LLM Features (optional)
|
|
71
|
+
|
|
72
|
+
These commands require `ANTHROPIC_API_KEY`:
|
|
73
|
+
|
|
74
|
+
- **`tx dedupe`** -- Find and merge semantically duplicate tasks
|
|
75
|
+
- **`tx compact`** -- Summarize completed tasks, extract learnings, export to CLAUDE.md
|
|
76
|
+
- **`tx reprioritize`** -- LLM recalculates scores based on context
|
|
77
|
+
|
|
78
|
+
## RALPH Loop — Autonomous Development
|
|
79
|
+
|
|
80
|
+
tx uses an adapted [RALPH loop](https://ghuntley.com/ralph) for autonomous development. Fresh agent instances are spawned per task — memory persists through files (CLAUDE.md, git, `.tx/tasks.db`), not conversation history.
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
./scripts/ralph.sh # Run until all tasks done
|
|
84
|
+
./scripts/ralph.sh --max 10 # Run at most 10 iterations
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
The orchestrator picks the highest-priority task from `tx ready`, dispatches it to a specialized agent, and loops until all work is complete.
|
|
88
|
+
|
|
89
|
+
### Specialized Agents
|
|
90
|
+
|
|
91
|
+
Agents are defined as markdown files in `.claude/agents/`:
|
|
92
|
+
|
|
93
|
+
| Agent | Role |
|
|
94
|
+
|-------|------|
|
|
95
|
+
| `tx-planner` | Research codebase, create implementation plan, decompose into subtasks |
|
|
96
|
+
| `tx-implementer` | Write Effect-TS code for a single task, following doctrine |
|
|
97
|
+
| `tx-reviewer` | Review code changes against all 7 doctrine rules |
|
|
98
|
+
| `tx-tester` | Write integration tests with SHA256 deterministic fixtures |
|
|
99
|
+
| `tx-decomposer` | Break large tasks into atomic subtasks for single iterations |
|
|
100
|
+
|
|
101
|
+
Agents can also be used programmatically via the [Claude Agent SDK](https://docs.anthropic.com/en/docs/agent-sdk).
|
|
102
|
+
|
|
103
|
+
## Project Structure
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
tx/
|
|
107
|
+
├── CLAUDE.md # Doctrine, PRDs, design docs
|
|
108
|
+
├── .claude/
|
|
109
|
+
│ └── agents/ # Specialized agent definitions
|
|
110
|
+
│ ├── tx-planner.md
|
|
111
|
+
│ ├── tx-implementer.md
|
|
112
|
+
│ ├── tx-reviewer.md
|
|
113
|
+
│ ├── tx-tester.md
|
|
114
|
+
│ └── tx-decomposer.md
|
|
115
|
+
├── scripts/
|
|
116
|
+
│ └── ralph.sh # RALPH loop orchestrator
|
|
117
|
+
├── docs/
|
|
118
|
+
│ ├── prd/ # Product Requirements Documents
|
|
119
|
+
│ └── design/ # Design Documents
|
|
120
|
+
└── src/ # Implementation
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## License
|
|
124
|
+
|
|
125
|
+
MIT
|