Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

AGENTS.md

Instructions for AI agents and new contributors working on Pixelflux. CLAUDE.md points here, so the same guidance is picked up by Claude Code and other agents.

What this is

A collaborative 200×200 pixel canvas (Rust / axum), with real-time updates over SSE + Redis pub/sub, wrapped in a full SDLC pipeline (Nix dev shell, distroless container, multi-level tests, security scans, CI, and a Kubernetes deployment).

Setup

nix develop            # reproducible dev shell — provides every tool
task lock              # generate Cargo.lock (first time only)
task hooks:install     # install the git hooks

Commands — your toolbox

Run task with no arguments to list everything. The ones you’ll use most:

GoalCommand
Run the server (:3000)task run
Buildtask build
Format everythingtask fmt
Lint (code + config)task lint
Check docs (prose + links)task docs:lint
Build the docs site (mdBook)task docs:build
Serve the docs locallytask docs:serve
Unit teststask test
Integration tests (real Redis)task test:integration
API contract teststask test:api
Load testtask bench
Secret scantask secrets
Build containertask container
Image size guard (< 20 MB)task container:size
SBOM / CVE scantask sbom / task cve
Deploy (k3s + Traefik)task deploy, task deploy:tls
Full local gatetask check

Conventions

  • Commits: Conventional Commits, enforced by the commit-msg hook (feat, fix, docs, ci, …).
  • Hooks: pre-commit formats and lints staged files and scans for secrets; don’t bypass with --no-verify on shared branches.
  • Branches: short-lived, named after the change (feat/…, fix/…); rebase on main before a PR.
  • CI must be green before merging.

Where things are

PathWhat
src/Rust app (lib.rs = canvas + routes, main.rs, index.html = embedded UI, admin.html = admin dashboard)
api/OpenAPI spec + Hurl contract tests
load/k6 load test
k8s/Kubernetes manifests + Traefik
argocd/Argo CD GitOps Application
docs/ADRs (docs/adr/) + the mdBook documentation site (docs/book/)
flake.nixDev shell + container build
Taskfile.ymlEvery task

Before you finish a change

  1. task fmt then task check (lint + secrets + tests).
  2. task docs:lint if you touched documentation.
  3. Commit with a Conventional Commit message; push; make sure CI is green.

Going further with real agent skills

This file documents the task commands as the agent toolbox. If you later want versioned, executable Claude/agent skills (e.g. a deploy or review skill), add them under .claude/skills/ and reference them here.