wrkq

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2026 License: MIT

README

wrkq

WRKQ is task-based collaboration surface between coding agents and humans. Command structure mimics a Unix filesystem-style interface for maximum human/agent familiarity, and structured output formats and actor attribution make it native to agent workflows. Changes can be bundled as diffs and committed to git, enabling version-controlled task state that flows through your normal PR process. The easiest way to integrate is to have your agent run wrkq info directly or add to an agent startup hook.

Features

  • Agent-first - Structured output, actor attribution, and machine-readable formats designed for AI agent workflows
  • Unix-style interface - Familiar commands like ls, cat, mv, rm, tree, touch, mkdir
  • Git-native - SQLite database hydrated from git; bundle changes as diffs for PRs
  • Pipe-friendly - JSON, NDJSON, and porcelain output formats for scripting
  • Optimistic concurrency - ETag-based conflict detection on writes

Installation

Homebrew (macOS/Linux)
brew tap lherron/wrkq
brew install wrkq
From Source
# Clone and build
git clone https://github.com/lherron/wrkq.git
cd wrkq
just build

# Install to ~/.local/bin
just install

Then update your agent startup hook to run wrkq info:

echo "=== This project uses wrkq ==="
wrkq agent-info 2>/dev/null || echo "(wrkq info failed or not available, notify user)"
Requirements
  • Go 1.23.2 or newer local toolchain; see go.mod
  • SQLite 3.x (bundled via go-sqlite3)

Agent / sandbox validation

For no-network or constrained environments, run:

scripts/agent-check.sh

See AGENTS.md for details.

Quick Start

# Initialize a new project database
wrkqadm init

# Create a container (project)
wrkq mkdir myproject

# Create a task
wrkq touch myproject/implement-feature -t "Implement new feature" -d "Description here"

# List tasks
wrkq ls myproject

# View task details
wrkq cat myproject/implement-feature

# Update task state
wrkq set T-00001 --state in_progress

# Add a comment
wrkq comment add T-00001 -m "Started implementation"

# Mark complete
wrkq set T-00001 --state completed

Architecture

The system ships four binaries:

  • wrkq - Day-to-day task management, made for agents and humans
  • wrkqadm - Administrative operations (database init, migrations, actor management)
  • wrkqd - Local daemon for shared database access
  • wrkf - Workflow engine CLI

See docs/SPEC.md for the canonical product, domain, CLI, and daemon contract. The wrkf JSON-RPC stdio contract lives in docs/wrkf-rpc.md.

Core Concepts

Concept Description
Actor Human or agent performing actions (attribution, not authentication)
Container Project or subproject (hierarchical); changesets bundle container state for git
Task Actionable item with state, priority, labels
Comment Append-only notes on tasks
Attachment File references stored alongside tasks
Task States

Common path: idea -> draft -> open -> in_progress -> completed.

Supported states: idea, draft, open, in_progress, blocked, completed, cancelled, archived, deleted.

Addressing

Resources can be referenced by:

  • Path: myproject/subproject/task-slug
  • Friendly ID: T-00123, P-00007
  • UUID: Full database UUID

Output Formats

wrkq ls myproject --json      # Pretty JSON
wrkq ls myproject --ndjson    # Newline-delimited JSON
wrkq ls myproject --porcelain # Stable machine-readable
wrkq ls myproject --type t --sort updated_at --reverse --limit 5

Configuration

Configuration is loaded from (in precedence order):

  1. CLI flags
  2. Environment variables (WRKQ_DB_PATH, WRKQ_ACTOR)
  3. .env.local in current directory
  4. ~/.config/wrkq/config.yaml

License

MIT License - see LICENSE for details.

Directories

Path Synopsis
cmd
architecture-records command
Command architecture-records validates the structure and freshness of wrkq's durable architecture law under architecture/ and generates its projections.
Command architecture-records validates the structure and freshness of wrkq's durable architecture law under architecture/ and generates its projections.
doc-link-check command
Command doc-link-check verifies that router and canonical documentation paths resolve.
Command doc-link-check verifies that router and canonical documentation paths resolve.
explain-area command
layer-boundary command
rot-sensor command
surface-guard command
Command surface-guard enforces delta-based public-surface coverage for wrkf RPC methods.
Command surface-guard enforces delta-based public-surface coverage for wrkf RPC methods.
wrkf command
wrkq command
wrkq-legacy command
Command wrkq-legacy preserves the pre-cutover direct-store CLI as a test-only oracle for the RPC cutover parity harness.
Command wrkq-legacy preserves the pre-cutover direct-store CLI as a test-only oracle for the RPC cutover parity harness.
wrkq-rpccli command
Command wrkq-rpccli is the RPC-backed mirror of the wrkq CLI, used as a parity harness during the JSON-RPC CLI migration.
Command wrkq-rpccli is the RPC-backed mirror of the wrkq CLI, used as a parity harness during the JSON-RPC CLI migration.
wrkqadm command
wrkqd command
internal
archrecords
Package archrecords validates the structure and freshness of wrkq's durable architecture law under architecture/ and generates the human/retrieval projections (INVARIANTS.md, RISKS.md, index.jsonl) from the records.
Package archrecords validates the structure and freshness of wrkq's durable architecture law under architecture/ and generates the human/retrieval projections (INVARIANTS.md, RISKS.md, index.jsonl) from the records.
attach
Package attach handles attachment file I/O and path resolution.
Package attach handles attachment file I/O and path resolution.
causedby
Package causedby parses and resolves caused_by causal-lineage input shared by the legacy CLI, the RPC server, and any other surface.
Package causedby parses and resolves caused_by causal-lineage input shared by the legacy CLI, the RPC server, and any other surface.
cli
cli/appctx
Package appctx provides a shared bootstrap helper for CLI commands.
Package appctx provides a shared bootstrap helper for CLI commands.
db
doclink
Package doclink provides a doc-link reachability checker.
Package doclink provides a doc-link reachability checker.
id
patch
Package patch implements RFC 6902 JSON Patch for wrkq snapshots.
Package patch implements RFC 6902 JSON Patch for wrkq snapshots.
projectroot
Package projectroot holds the neutral project-root path/selector transform that both the legacy CLI (internal/cli) and the RPC-backed mirror (internal/rpccli) apply to raw user arguments BEFORE they become RPC params or store lookups.
Package projectroot holds the neutral project-root path/selector transform that both the legacy CLI (internal/cli) and the RPC-backed mirror (internal/rpccli) apply to raw user arguments BEFORE they become RPC params or store lookups.
rotguard
Package rotguard detects stale TDD-phase comments in *_test.go files.
Package rotguard detects stale TDD-phase comments in *_test.go files.
rpccli
Package rpccli is the RPC-backed mirror of the wrkq CLI.
Package rpccli is the RPC-backed mirror of the wrkq CLI.
scope
Package scope provides a Go port of the canonical agent-scope grammar (originally in TypeScript at ~/praesidium/agent-spaces/packages/agent-scope) plus an env-aware Resolve helper used by wrkq commands.
Package scope provides a Go port of the canonical agent-scope grammar (originally in TypeScript at ~/praesidium/agent-spaces/packages/agent-scope) plus an env-aware Resolve helper used by wrkq commands.
snapshot
Package snapshot provides canonical JSON state snapshots for wrkq.
Package snapshot provides canonical JSON state snapshots for wrkq.
store
Package store provides a persistence layer that abstracts database operations, automatically handling etag management, timestamps, and event logging.
Package store provides a persistence layer that abstracts database operations, automatically handling etag management, timestamps, and event logging.
style
Package style holds wrkq's shared terminal-presentation primitives: ANSI coloring, the markdown renderer, the styled task card, and the relative-time helpers.
Package style holds wrkq's shared terminal-presentation primitives: ANSI coloring, the markdown renderer, the styled task card, and the relative-time helpers.
suppressionlint
Package suppressionlint scans first-party Go source for ungoverned nolint suppressions.
Package suppressionlint scans first-party Go source for ungoverned nolint suppressions.
surfaceguard
Package surfaceguard enforces delta-based public-surface coverage for wrkf RPC methods.
Package surfaceguard enforces delta-based public-surface coverage for wrkf RPC methods.
workrpc
Package workrpc will provide the unified JSON-RPC 2.0 server for the wrkq+wrkf protocol (protocol version 2026-06-30).
Package workrpc will provide the unified JSON-RPC 2.0 server for the wrkq+wrkf protocol (protocol version 2026-06-30).
workrpc/bootstrap
Package bootstrap is the single, neutral source of truth for constructing the wrkq/wrkf JSON-RPC server's *wrkfapi.API and workrpc.RegistryOptions from already-open config/database inputs.
Package bootstrap is the single, neutral source of truth for constructing the wrkq/wrkf JSON-RPC server's *wrkfapi.API and workrpc.RegistryOptions from already-open config/database inputs.
wrkqapi
Package wrkqapi implements the wrkq-namespace business surface of the unified wrkq/wrkf JSON-RPC protocol (docs/wrkq-wrkf-rpc.md).
Package wrkqapi implements the wrkq-namespace business surface of the unified wrkq/wrkf JSON-RPC protocol (docs/wrkq-wrkf-rpc.md).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL