Skip to content

Commit 4484d57

Browse files
bricefclaude
andcommitted
Update docs, add getting started guide, CI, and future plans
Documentation: - Rewrite docs/cli.md to match current command tree (add task detail, task search, board audit/overview, delivery list; remove old audit and search commands) - Rewrite docs/http-api.md to include all current endpoints (/me, task_detail, task_search, board_overview, SSE, delivery list), fix min roles, add all server config env vars - Add Getting Started guide to README with actor creation workflow Server: - Support TASKFLOW_SEED_ADMIN_KEY env var for deterministic seed keys (useful for CI and automation) CI: - Add GitHub Actions workflow: fmt check, vet, unit/integration tests with race detector, QA smoke test, Docker build + push to Docker Hub Infrastructure: - Include taskflow-mcp in Dockerfile Future plans: - Capture pagination and dashboard improvements as active plans Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 0df2269 commit 4484d57

8 files changed

Lines changed: 279 additions & 87 deletions

File tree

.github/workflows/ci.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: actions/setup-go@v5
16+
with:
17+
go-version-file: go.mod
18+
19+
- name: Check formatting
20+
run: test -z "$(gofmt -l .)" || (echo "Files need formatting:" && gofmt -l . && exit 1)
21+
22+
- name: Vet
23+
run: go vet ./...
24+
25+
- name: Unit and integration tests
26+
run: go test -count=1 -race ./...
27+
28+
- name: Build all binaries
29+
run: |
30+
go build -o taskflow-server ./cmd/taskflow-server
31+
go build -o taskflow ./cmd/taskflow
32+
go build -o taskflow-mcp ./cmd/taskflow-mcp
33+
34+
- name: QA smoke test
35+
run: |
36+
# Install jq for the QA script.
37+
sudo apt-get install -qy jq
38+
./scripts/qa-test.sh
39+
40+
docker:
41+
needs: test
42+
runs-on: ubuntu-latest
43+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
44+
steps:
45+
- uses: actions/checkout@v4
46+
47+
- name: Set up Docker Buildx
48+
uses: docker/setup-buildx-action@v3
49+
50+
- name: Log in to Docker Hub
51+
uses: docker/login-action@v3
52+
with:
53+
username: ${{ secrets.DOCKERHUB_USERNAME }}
54+
password: ${{ secrets.DOCKERHUB_TOKEN }}
55+
56+
- name: Build and push
57+
uses: docker/build-push-action@v6
58+
with:
59+
context: .
60+
push: true
61+
tags: |
62+
${{ secrets.DOCKERHUB_USERNAME }}/taskflow:latest
63+
${{ secrets.DOCKERHUB_USERNAME }}/taskflow:${{ github.sha }}
64+
cache-from: type=gha
65+
cache-to: type=gha,mode=max

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ COPY . .
88

99
RUN CGO_ENABLED=0 go build -o /taskflow-server ./cmd/taskflow-server
1010
RUN CGO_ENABLED=0 go build -o /taskflow ./cmd/taskflow
11+
RUN CGO_ENABLED=0 go build -o /taskflow-mcp ./cmd/taskflow-mcp
1112

1213
# Runtime stage
1314
FROM alpine:3.21
@@ -16,6 +17,7 @@ RUN apk add --no-cache ca-certificates
1617

1718
COPY --from=builder /taskflow-server /usr/local/bin/taskflow-server
1819
COPY --from=builder /taskflow /usr/local/bin/taskflow
20+
COPY --from=builder /taskflow-mcp /usr/local/bin/taskflow-mcp
1921

2022
RUN mkdir -p /data
2123
WORKDIR /data

README.md

Lines changed: 53 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,72 @@
22

33
TaskFlow is a task tracker designed for fluid collaboration between humans and AI agents. It provides a durable server as the single source of truth, with tasks organized on kanban boards that have explicitly configured workflow state machines. Any actor — human or AI — can create, advance, review, and manage tasks, with a full audit trail recording every action with actor attribution and timestamps.
44

5-
## Quick Start
5+
## Getting Started
6+
7+
### 1. Start the server
68

79
```bash
8-
# Option 1: Docker Compose (recommended)
10+
# Option A: Docker Compose
911
just docker-up
10-
docker compose exec taskflow cat /data/seed-admin-key.txt
1112

12-
# Option 2: Run locally
13+
# Option B: Run locally
1314
just build
1415
just run
15-
cat seed-admin-key.txt
16+
```
17+
18+
On first start, the server creates a seed admin actor and writes the API key to `seed-admin-key.txt`. The admin name defaults to the value of `TASKFLOW_SEED_ADMIN_NAME` (set to `admin` in docker-compose.yml).
19+
20+
```bash
21+
# Get the seed admin key
22+
cat seed-admin-key.txt # local
23+
docker compose exec taskflow cat /data/seed-admin-key.txt # Docker
24+
```
25+
26+
To set a specific key instead of a random one (useful for CI/automation):
1627

17-
# Use the CLI
28+
```bash
29+
TASKFLOW_SEED_ADMIN_NAME=admin TASKFLOW_SEED_ADMIN_KEY=my-known-key ./taskflow-server
30+
```
31+
32+
### 2. Configure the CLI
33+
34+
```bash
1835
export TASKFLOW_API_KEY=$(cat seed-admin-key.txt)
36+
# Or add to config file:
37+
# echo "api_key: $(cat seed-admin-key.txt)" >> ~/.config/taskflow/config.yaml
38+
```
39+
40+
### 3. Create a board and tasks
41+
42+
```bash
1943
taskflow board create --slug my-board --name "My Board"
2044
taskflow task create my-board --title "Fix auth bug" --priority high
2145
taskflow task list my-board
2246
taskflow task transition my-board 1 --transition start --comment "On it"
47+
```
48+
49+
### 4. Add more actors
50+
51+
Create actors for team members and AI agents. Each gets their own API key for identity and audit attribution.
52+
53+
```bash
54+
# Create a human member
55+
taskflow actor create --name alice --display_name "Alice Chen" --type human --role member
56+
57+
# Create an AI agent
58+
taskflow actor create --name claude --display_name "Claude" --type ai_agent --role member
59+
```
60+
61+
The API key is returned in the response (shown once). Share it with the actor for CLI, TUI, or MCP configuration.
62+
63+
### 5. Use other interfaces
64+
65+
```bash
66+
# TUI — interactive terminal UI
67+
TASKFLOW_API_KEY=<key> taskflow-tui
2368

24-
# Or use the TUI
25-
taskflow-tui
69+
# MCP — AI agent integration (see docs/mcp.md)
70+
TASKFLOW_API_KEY=<agent-key> taskflow-mcp
2671
```
2772

2873
## Documentation

cmd/taskflow-server/main.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,15 @@ func seedAdmin(svc taskflow.TaskFlow) error {
7979
return nil // actors already exist, skip seeding
8080
}
8181

82-
apiKey, err := generateAPIKey()
83-
if err != nil {
84-
return fmt.Errorf("generating API key: %w", err)
82+
// Allow setting the seed admin key via environment variable.
83+
// If not set, generate a random one.
84+
apiKey := os.Getenv("TASKFLOW_SEED_ADMIN_KEY")
85+
if apiKey == "" {
86+
var err error
87+
apiKey, err = generateAPIKey()
88+
if err != nil {
89+
return fmt.Errorf("generating API key: %w", err)
90+
}
8591
}
8692

8793
displayName := envOr("TASKFLOW_SEED_ADMIN_DISPLAY_NAME", name)

docs/cli.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# TaskFlow CLI
22

3-
The `taskflow` CLI is a thin HTTP client that calls the TaskFlow server. Commands are derived automatically from the domain operation definitions — adding a new server operation makes it available in the CLI with no additional code.
3+
The `taskflow` CLI is a thin HTTP client that calls the TaskFlow server. Commands are derived automatically from the domain model — every Resource and Operation in the model becomes a CLI command.
44

55
## Configuration
66

@@ -38,34 +38,46 @@ taskflow actor get <name>
3838
taskflow actor update <name> [--display_name <name>] [--role <role>] [--active <bool>]
3939
```
4040
41+
### admin
42+
43+
```
44+
taskflow admin stats # system-wide statistics (admin only)
45+
```
46+
4147
### board
4248
4349
```
44-
taskflow board create --slug <slug> --name <name> --workflow <json>
50+
taskflow board create --slug <slug> --name <name> [--workflow <json>]
4551
taskflow board list [--include_deleted]
4652
taskflow board get <slug>
4753
taskflow board update <slug> [--name <name>] [--description <desc>]
48-
taskflow board delete <slug>
54+
taskflow board delete <slug> # soft-delete (admin only)
4955
taskflow board reassign <slug> --target_board <slug> [--states <state1,state2>]
56+
taskflow board detail <slug> # full board dump
57+
taskflow board overview <slug> # task counts by state
58+
taskflow board audit <slug> # board audit log
5059
```
5160
5261
### task
5362
5463
```
55-
taskflow task create <slug> --title <title> [--description <desc>] [--priority <priority>] [--tags <t1,t2>]
64+
taskflow task create <slug> --title <title> [--description <desc>] [--priority <priority>] [--tags <t1,t2>] [--assignee <name>]
5665
taskflow task list <slug> [--state <state>] [--assignee <name>] [--priority <p>] [--tag <tag>] [--q <search>]
5766
[--sort <field>] [--order <asc|desc>] [--include_closed] [--include_deleted]
5867
taskflow task get <slug> <num>
59-
taskflow task update <slug> <num> [--title <title>] [--description <desc>] [--priority <p>] [--tags <t1,t2>]
68+
taskflow task detail <slug> <num> # task with comments, deps, attachments, audit
69+
taskflow task update <slug> <num> [--title <title>] [--description <desc>] [--priority <p>] [--tags <t1,t2>] [--assignee <name>]
6070
taskflow task transition <slug> <num> --transition <name> [--comment <text>]
6171
taskflow task delete <slug> <num>
72+
taskflow task search [--q <query>] [--state <state>] [--assignee <name>] [--priority <p>] [--include_closed]
73+
taskflow task audit <slug> <num> # task audit log
6274
```
6375
6476
### workflow
6577
6678
```
6779
taskflow workflow get <slug>
68-
taskflow workflow set <slug> (reads workflow JSON from stdin or --workflow flag)
80+
taskflow workflow set <slug> # reads workflow JSON from --workflow flag
6981
taskflow workflow health <slug>
7082
```
7183
@@ -103,34 +115,22 @@ taskflow webhook update <id> [--url <url>] [--events <e1,e2>] [--active <bool>]
103115
taskflow webhook delete <id>
104116
```
105117
106-
### audit
118+
### delivery
107119
108120
```
109-
taskflow audit list <slug> <num> # task audit log
110-
taskflow audit list <slug> # board audit log
121+
taskflow delivery list <id> # webhook delivery attempts
111122
```
112123
113-
### Convenience commands
124+
### tag
114125
115126
```
116-
taskflow board detail <slug> # complete board dump (tasks, comments, deps, audit)
117-
taskflow admin stats # system-wide statistics
118-
taskflow search --q <query> [--state] [--assignee] [--priority] # cross-board search
127+
taskflow tag list <slug> # tags in use on a board
119128
```
120129
121-
## Input Validation
122-
123-
The CLI validates required flags before making HTTP requests. Missing required flags show an error with usage:
124-
125-
```
126-
$ taskflow webhook create
127-
Usage:
128-
taskflow webhook create [flags]
129-
...
130-
missing required flag(s): --url, --events, --secret
131-
```
130+
## Special Values
132131
133-
Optional fields (like `--description`, `--tags`) are not required.
132+
- **`@me`** — use as `--assignee @me` to assign tasks to yourself or filter by your own tasks
133+
- **Priority values** — `critical`, `high`, `medium`, `low`, or omit for none
134134
135135
## Output Formats
136136

0 commit comments

Comments
 (0)