An experiment in long term memory for AI coding agents. Closely modelled around traditional software project management tooling. We'll have to see how that works out.
- The project models work as story 'cards'. There are fifty two cards in a typical playing card deck.
- Oftentimes, personal goal setting is done around the 52 weeks of a year. eg. 52 book clubs etc.
- What are the 2 numbers that follow 5?
bun installCreate a config file with a secure random JWT secret:
bun run mkconfigThis creates fivetwo.config.json in the current directory with:
db: Path to the SQLite database (relative to config file or absolute)jwtSecret: Auto-generated secure random secret (min 32 characters)
Run migrations to set up the database schema:
nix run github:neenaoffline/litem8 -- up --db data.db --migrations ./migrationsUsage: bun src/index.ts <command> [options]
Commands:
mkconfig Create a new fivetwo.config.json in the current directory
mkhuman <name> Create a human user
mkagent <name> Create an AI agent user
auth <username> Generate a JWT token for the specified user
serve Start the server (default if no command given)
Options:
--config <path> Path to config file (default: fivetwo.config.json)
# Create config file
bun run mkconfig
# Create users
bun run mkhuman alice
bun run mkagent bot
# Generate a JWT for a user
bun run auth alice
# Start the server
bun devDevelopment server with hot reload:
bun devProduction:
bun startfivetwo includes an htop-style terminal interface for browsing and managing cards.
Note: The TUI requires a real interactive terminal (TTY) to run. It won't work in non-interactive environments like CI pipelines or editor terminals without proper TTY support.
FIVETWO_TOKEN=$(cat neenaauth.token) bun run tuiOr set the environment variable:
export FIVETWO_TOKEN=$(bun run auth <username>)
bun run tui| Key | Action |
|---|---|
↑/↓ |
Navigate cards |
←/→ |
Switch between projects |
/ |
Search/filter cards |
p |
Open project picker |
Enter |
View card details |
Escape |
Close search/picker |
q |
Quit |
| Variable | Description | Default |
|---|---|---|
FIVETWO_URL |
API base URL | http://localhost:3000 |
FIVETWO_TOKEN |
JWT authentication token (required) | - |
All /api/* routes require JWT authentication. Tokens expire after 1 week.
Include the token in the Authorization header:
curl -H "Authorization: Bearer <token>" http://localhost:3000/api/v1/statusReturns server status.
{ "status": "ok", "timestamp": "2025-01-01T00:00:00.000Z" }Returns the authenticated user's information.
{
"id": 1,
"username": "alice",
"type": "human",
"email": null,
"created_at": "2025-01-01T00:00:00.000Z"
}List projects. Supports optional filters:
| Query Param | Description |
|---|---|
id |
Filter by project ID |
host |
Filter by host |
owner |
Filter by owner |
repository |
Filter by repository |
Create a new project.
{
"host": "github.com",
"owner": "myorg",
"repository": "myrepo"
}List all card references within a project. Supports optional type filter.
List cards. Supports filters and full-text search:
| Query Param | Description |
|---|---|
id |
Filter by card ID |
project_id |
Filter by project |
status |
Filter by status |
priority |
Filter by priority |
type |
Filter by type |
search |
Full-text search (title and description) |
Valid statuses: backlog, in_progress, review, blocked, done, wont_do, invalid
Valid types: story, bug, task, epic, spike, chore
Create a new card.
{
"project_id": 1,
"title": "Implement feature X",
"description": "Optional description",
"status": "backlog",
"priority": 50,
"type": "task"
}Required: project_id, title
Priority: 0-100 (higher = more important, default: 50)
Update a card. Supports optimistic locking via version field.
{
"title": "Updated title",
"status": "in_progress",
"version": 1
}Returns 409 Conflict with current_version if version mismatch.
List comments for a card.
Add a comment to a card.
{ "message": "This is a comment" }Soft delete a comment (sets status to deleted).
References link cards together with typed relationships.
Valid reference types: blocks, blocked_by, relates_to, duplicates, duplicated_by, parent_of, child_of, follows, precedes, clones, cloned_by
List references for a card. Returns outgoing (this card → others) and incoming (others → this card).
Create a reference from this card to another.
{
"target_card_id": 2,
"reference_type": "blocks"
}Delete a reference.