Skip to content

Commit f26bc09

Browse files
bricefclaude
andcommitted
Update documentation for releases, versioning, and key rotation
README: - Add Releasing section (just release, CI pipeline, Watchtower deploy) - Add versioning note under Deployment - Update build comment to mention all binaries - Fix endpoint count (43) ARCHITECTURE.md: - Add Versioning section (build-time ldflags, headers, client checks) - Document API key generation on actor create and key rotation docs/http-api.md: - Add PATCH /actors/{name}/rotate-key - Note that POST /actors returns API key once docs/cli.md: - Add actor rotate_key command - Document key lifecycle (create returns key, rotate, deactivate) docs/mcp.md: - Add actor_rotate_key tool Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 74a5245 commit f26bc09

5 files changed

Lines changed: 40 additions & 9 deletions

File tree

ARCHITECTURE.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,18 @@ Each board has a workflow defined as a JSON state machine:
253253

254254
The workflow engine validates transitions, enforces terminal states, and provides health checks (detecting tasks orphaned in states with no outgoing transitions). Workflows are validated on board creation and replacement.
255255

256+
## Versioning
257+
258+
All binaries embed a version string from `git describe --tags --always` at build time via ldflags. The `internal/version.Version` variable defaults to `"dev"` if not set.
259+
260+
- Server adds `X-TaskFlow-Version` to all response headers
261+
- `/health` includes `version` in the JSON response
262+
- MCP reports the version during capability negotiation
263+
- The httpclient checks the server version on the first request and warns on stderr if versions differ or the header is missing
264+
256265
## Authentication and RBAC
257266

258-
API keys are SHA-256 hashed and stored with actor records. Three roles:
267+
API keys are SHA-256 hashed and stored with actor records. Creating an actor via the API generates a random key and returns it once in the response. Keys can be rotated with `PATCH /actors/{name}/rotate-key` — the old key is immediately invalidated. Three roles:
259268

260269
| Role | Permissions |
261270
|------|------------|

README.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ TASKFLOW_URL=http://localhost:8374 TASKFLOW_API_KEY=<agent-key> taskflow-mcp
111111
## Features
112112

113113
- HTTP API with auth (SHA-256 keys), RBAC, idempotency keys, and batch operations
114-
- 42 domain endpoints (19 Resources + 23 Operations) auto-derived from the model
114+
- 43 domain endpoints (19 Resources + 24 Operations) auto-derived from the model
115115
- OpenAPI 3.1 spec auto-generated at startup
116116
- CLI with commands derived from the same model
117117
- Interactive TUI with kanban, list, workflow graph, and live event stream — see **[TUI Reference](docs/tui.md)**
@@ -208,7 +208,7 @@ Requires Go 1.25+ and [just](https://github.com/casey/just).
208208
just check # fmt-check + vet + test (full suite)
209209
just test # unit + integration + QA smoke test (45 endpoint checks)
210210
just test-unit # unit + integration tests only (no server startup)
211-
just build # build server + CLI binaries
211+
just build # build all binaries (server, CLI, TUI, MCP)
212212
just run # start the server locally
213213
just fmt # format code
214214
just seed # generate test database
@@ -222,13 +222,30 @@ just clean # remove build artifacts
222222

223223
Set `TASKFLOW_DEV_MODE=true` to disable all rate limiting (useful for testing and development). See [TESTING.md](TESTING.md) for the full manual QA checklist.
224224

225-
### Deployment note
225+
### Releasing
226+
227+
```bash
228+
just release v0.1.2
229+
```
230+
231+
This creates an annotated git tag and pushes it. CI then:
232+
1. Runs the full test suite
233+
2. Cross-compiles binaries for linux/amd64, linux/arm64, darwin/amd64, darwin/arm64
234+
3. Creates a GitHub Release with downloadable archives and auto-generated release notes
235+
4. Builds and pushes Docker images tagged `:latest`, `:sha`, and `:v0.1.2`
236+
5. Watchtower deploys the new image to the VPS within 3 minutes
237+
238+
To build release archives locally: `just dist` (outputs to `dist/`).
239+
240+
### Deployment
226241

227242
The server must be hosted at the root of a domain (e.g. `https://taskflow.example.com`). Hosting at a subpath (e.g. `/taskflow`) is not currently supported — the dashboard, OpenAPI spec, and SSE endpoints generate absolute paths without a configurable prefix.
228243

244+
All binaries embed a version string from `git describe` at build time. The server exposes it via the `X-TaskFlow-Version` response header and the `/health` endpoint. Clients warn on stderr if their version differs from the server.
245+
229246
### Testing with the simulator
230247

231-
The activity simulator generates realistic board activity for testing SSE live updates:
248+
The activity simulator generates realistic board activity for testing live updates:
232249

233250
```bash
234251
# Terminal 1: server with test database

docs/cli.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,15 @@ api_key: your-api-key-here
3232
### actor
3333

3434
```
35-
taskflow actor create --name <name> --display_name <name> --type <human|ai_agent> --role <admin|member|read_only>
35+
taskflow actor create --name <name> --display_name <name> --type <human|ai_agent> --role <admin|member|read_only>
3636
taskflow actor list
37-
taskflow actor get <name>
38-
taskflow actor update <name> [--display_name <name>] [--role <role>] [--active <bool>]
37+
taskflow actor get <name>
38+
taskflow actor update <name> [--display_name <name>] [--role <role>] [--active <bool>]
39+
taskflow actor rotate_key <name> # generate new API key (shown once)
3940
```
4041
42+
Creating an actor returns the API key in the response (shown once — save it). Use `rotate_key` to generate a new key if compromised. Use `update --active false` to deactivate an actor (revokes access, preserves audit history).
43+
4144
### admin
4245
4346
```

docs/http-api.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,10 @@ curl "/boards/my-board/tasks?assignee=@me" -H "Authorization: Bearer $KEY"
7777

7878
| Method | Path | Description | Min Role |
7979
|--------|------|-------------|----------|
80-
| POST | `/actors` | Create an actor | admin |
80+
| POST | `/actors` | Create an actor (returns API key once) | admin |
8181
| GET | `/actors` | List all actors | read_only |
8282
| GET | `/actors/{name}` | Get an actor by name | read_only |
83+
| PATCH | `/actors/{name}/rotate-key` | Rotate API key (returns new key once) | admin |
8384
| PATCH | `/actors/{name}` | Update an actor | admin |
8485

8586
### Self

docs/mcp.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ Tools are mutations that change state. Path parameters and body fields are passe
122122
| Tool | Description | Key Inputs |
123123
|------|-------------|------------|
124124
| `actor_create` | Create an actor (admin) | `name`, `type`, `role` |
125+
| `actor_rotate_key` | Rotate an actor's API key (admin) | `name` |
125126
| `actor_update` | Update an actor (admin) | `name`, fields to change |
126127
| `webhook_create` | Create a webhook (admin) | `url`, `events`, `secret` |
127128
| `webhook_update` | Update a webhook (admin) | `id`, fields to change |

0 commit comments

Comments
 (0)