agentleFS
HerbHallHerbHall/samverk/CLAUDE.md

samverk

CLAUDE.md1 starsChanged 9 months agoMITArchived repositoryView on GitHub

Async background development engine -- keeps your project building while you live your life.

The file

We split this CLAUDE.md into the rules it gives an agent

9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before any work in a new session:

    line 82
  2. Very specific:

    Read .samverk/status.md -- current phase, in-flight issues, last session summary

    line 84
  3. Very specific:

    Call samverk get_digest --since 168h if Samverk MCP is configured and available

    line 85
  4. Distinctive:

    Check open issues if the task involves issue triage or project direction

    line 86
  5. Distinctive:

    Rule: Never ask the user "what's the current state?" or "where did we leave off?" Read the repo first.

    line 89
  6. Distinctive:

    Read the repo first. Ask only if something is genuinely ambiguous after reading.

    line 90
  7. Distinctive:

    Never commit directly to main -- always PR

    line 97
  8. Distinctive:

    Follow language-specific idioms (Go: gofmt, Python: ruff)

    line 102
  9. Distinctive:

    No over-engineering -- implement only what's needed now

    line 103

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Samverk

Async background development engine -- keeps your project building while you live your life.

Quick Start

make build     # Build binary to bin/samverk
make test      # Run all tests
make lint      # Run golangci-lint
make lint-md   # Run markdownlint
make ci        # Run build + test + lint (full CI locally)
make hooks     # Install pre-push git hook
make run       # Build and start samverk serve

Project Structure

samverk/
├── cmd/samverk/               # Single binary entrypoint (cobra subcommands)
├── internal/
│   ├── server/                # HTTP server (MCP + API + embedded SPA)
│   ├── api/                   # REST API handlers for dashboard
│   ├── mcp/                   # MCP protocol handler (Streamable HTTP)
│   ├── dispatcher/            # Issue watcher, task router, dependency DAG
│   ├── digest/                # Check-in digest builder and formatting
│   ├── forge/                 # IssueTracker interface + GitHub/Gitea impls
│   ├── agent/                 # Agent runtime, container management
│   ├── provider/              # AI provider clients (Claude, OpenAI, Ollama)
│   ├── autonomy/              # Trust tier evaluation engine
│   ├── profile/               # User profile management
│   ├── cost/                  # Token tracking, budget, attribution
│   ├── store/                 # SQLite persistence layer
│   ├── hostmetrics/           # Host resource collection (disk, RAM, CPU)
│   ├── logstore/              # Structured log persistence to SQLite
│   ├── loganalyst/            # AI log summarization via Ollama
│   ├── logging/               # Structured logging (zap tee)
│   ├── metrics/               # Dispatcher and pool metrics
│   ├── scaling/               # Adaptive worker scaling (1-N)
│   ├── synapset/              # Synapset MCP client for memory enrichment
│   ├── prwatcher/             # PR watcher for auto-merge
│   ├── status/                # Health and status subsystem
│   └── version/               # Build version injection (ldflags)
├── pkg/models/                # Shared types (Issue, Agent, Action, etc.)
├── web/                       # React SPA dashboard (Vite + TypeScript)
├── docs/                      # Design docs and ADRs
│   ├── architecture.md        # System design and components
│   ├── tech-stack.md          # Full technology choices and libraries
│   ├── communication-protocol.md  # Issue schema, labels, dispatcher, QC flow
│   ├── concept.md             # Problem space, target user, value proposition
│   ├── cost-model.md          # Tiered cost model and comparisons
│   ├── mcp-server.md          # MCP server requirements and tool definitions
│   ├── user-interface.md      # Check-in model and device flexibility spec
│   ├── autonomy-model.md      # Three-tier trust model for agent actions
│   ├── user-profile.md        # Persistent user preferences across projects
│   ├── open-questions.md      # Unresolved design and business questions
│   └── decisions/             # Architecture Decision Records (31 total)
├── .samverk/                  # Project state (status.md) and runtime config
├── .github/workflows/         # GitHub CI/CD pipelines
├── .gitea/workflows/          # Gitea Actions CI (gitea-ci.yml, security.yml)
└── Makefile                   # Build and development tasks

Tech Stack

  • Language: Go -- single binary with subcommands (samverk serve, samverk dispatch, samverk config)
  • AI Providers: Anthropic Claude API (primary), OpenAI/GPT-4, Gemini, Ollama (local containers)
  • Web Dashboard: React + TypeScript + Vite, embedded in Go binary via embed.FS
  • Frontend: shadcn/ui, Tailwind CSS, TanStack Query, Zustand, Recharts
  • State: Git issues (tasks) + SQLite (sessions, cost, audit) + YAML (config)
  • Git Forge: GitHub (primary), Gitea (self-hosted), abstracted behind IssueTracker interface
  • Testing: Go stdlib + table-driven tests, Vitest + Testing Library (frontend)
  • Build: Make + GoReleaser
  • CI/CD: GitHub Actions (primary) + Gitea Actions (mirror CI, security.yml)
  • Linting: golangci-lint (Go), ESLint + TypeScript (frontend), markdownlint (docs)

For full details including specific libraries, what NOT to use, and project structure rationale, see docs/tech-stack.md.

Session Start (Required)

Before any work in a new session:

  1. Read .samverk/status.md -- current phase, in-flight issues, last session summary
  2. Call samverk get_digest --since 168h if Samverk MCP is configured and available
  3. Check open issues if the task involves issue triage or project direction
  4. Proceed without asking the user to explain project state -- the repo has it

Rule: Never ask the user "what's the current state?" or "where did we leave off?" Read the repo first. Ask only if something is genuinely ambiguous after reading.

Development Workflow

  • Branch-per-issue: feature/issue-NNN-desc, fix/issue-NNN-desc
  • Conventional commits: feat:, fix:, refactor:, docs:, test:, chore:
  • Co-author tag: Co-Authored-By: Claude <noreply@anthropic.com>
  • Never commit directly to main -- always PR
  • Explore -> Plan -> Code -> Commit

Code Style

  • Follow language-specific idioms (Go: gofmt, Python: ruff)
  • No over-engineering -- implement only what's needed now
  • Comments only where logic isn't self-evident
  • Validate at system boundaries, not internal calls

Known Constraints

  • Infrastructure complete -- all phases through 6 done
  • Current focus: agent autonomy (prompt quality, planning workflow)
  • Free-first routing: 3 Ollama GPU hosts tried before Claude API
  • Async-first architecture (not synchronous tooling)
  • Hybrid local/cloud agent model
  • Target audience: hobbyist devs with limited time, not enterprise teams
  • Success metric: project completion rate, not response speed

Key Decisions

  • Async-first check-in model (ADR-006)
  • Hybrid local/cloud agents (ADR-007)
  • Multi-model from day one (ADR-008)
  • Device flexibility non-negotiable (ADR-009)
  • Ship rate is the success metric (ADR-010)
  • Chat (Claude + MCP) is the interface (ADR-011)
  • Git issues as agent communication (ADR-012)
  • Git forge abstracted behind interface (ADR-013)
  • Dedicated dispatcher agent for routing (ADR-014)
  • Three-tier autonomy model (ADR-015)
  • User profile as first-class concept (ADR-016)
  • Devkit as reference implementation (ADR-017)
  • Three-phase release: alpha, beta, v1.0 (ADR-018)
  • Self-hosted-first development (ADR-019)
  • Web dashboard for operations (ADR-020)
  • Intent verification protocol (ADR-021)
  • Full project lifecycle -- idea to delivery (ADR-022)
  • Per-project repos with coordination layer (ADR-023)
  • Failure recovery strategy (ADR-027)
  • Cross-model QA validation (ADR-030)
  • Dual-forge operational model (ADR-031)
  • Adaptive worker scaling (ADR-032)
  • Multi-machine free agent runtime (ADR-033)
  • Solo developer agent model (ADR-035)
  • Unified execution plan -- Q2 2026 (docs/unified-execution-plan.md)

Infrastructure

  • Proxmox host: root@192.168.1.203 (SSH key auth configured)
  • Samverk container: CT 202 root@192.168.1.162:8080 (SSH key auth)
  • Staging container: CT 203 root@192.168.1.199:8080 (STOPPED -- decommissioned 2026-03-17, spin up if needed)
  • Gitea instance: CT 200 192.168.1.160:3000 (gitea.herbhall.net) -- 40GB disk
  • Ollama VM 300: 192.168.1.207:11434 (RTX 3090 Ti, qwen2.5-coder:14b)
  • Ollama HDH-NZXT: 192.168.1.202:11434 (RTX 5090, qwen3-coder:30b)
  • Ollama CM-ASUS: 100.88.37.47:11434 via Tailscale (RTX 2080 Ti, qwen2.5-coder:7b)
  • Health check: curl http://192.168.1.162:8080/healthz
  • Deploy: make redeploy -- cross-compiles, deploys, restarts, verifies health
  • Model check: bash scripts/deploy-models.sh --check (run from CT 202)
  • Claude Code has SSH access to all hosts

References

  • Architecture
  • Tech Stack
  • Communication Protocol
  • Concept
  • Competitive Landscape
  • Cost Model
  • MCP Server
  • User Interface
  • Open Questions
  • Naming
  • Autonomy Model
  • User Profile
  • Intent Verification Protocol
  • Project Lifecycle
  • Multi-Session Safety
  • Decision Records
  • Samverk Overlay Spec
  • DevKit Boundary Contract
  • Unified Execution Plan
  • Gitea Migration Plan
  • Adaptive Scaling Plan

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.