samverk
AGENTS.md1 starsChanged 9 months agoMITArchived repositoryView on GitHub
Async background development engine -- keeps your project building while you live your life. Multi-forge development workflow manager that manages Git repositories across GitHub, Gitea, and other forges.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 33,398 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
The file
We split this AGENTS.md into the rules it gives an agent
10 rules. About 2 are common, 5 are distinctive, and 3 are very specific to this project.
≈2
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 82
Create a feature branch for every change (feature/issue-NNN-description)
- Very specific: line 83
Use conventional commits: feat:, fix:, refactor:, docs:, test:, chore:
- Distinctive: line 84
Run build, test, and lint before opening a PR
- Distinctive: line 85
Write table-driven tests with descriptive names
- Distinctive: line 100
Commit directly to main -- always use feature branches
- Very specific: line 102
Use --no-verify or --force flags
- Common: line 103
Commit secrets, credentials, or API keys
- Distinctive: line 104
Add TODO comments without a linked issue number
- Common: line 113
Safety: Never force-push main. Never skip hooks.
- Distinctive: line 114
Honesty: Never mark work as complete when it is not.
≈ “Common” is an estimate: at least 1 in 5 of the 43,423 AGENTS.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.
Files
<!--
Scope: AGENTS.md guides the Copilot coding agent and Copilot Chat.
For code completion and code review patterns, see .github/copilot-instructions.md
and .github/instructions/*.instructions.md
For Claude Code, see CLAUDE.md
-->Samverk
Async background development engine -- keeps your project building while you live your life. Multi-forge development workflow manager that manages Git repositories across GitHub, Gitea, and other forges.
Tech Stack
- Language: Go 1.25 -- single binary with Cobra subcommands (
samverk serve,samverk dispatch,samverk config) - AI Providers: Anthropic Claude API (primary), OpenAI/GPT-4, Gemini, Ollama (local containers)
- Web Dashboard: React 19 + 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
IssueTrackerinterface - SDKs: Gitea SDK, GitHub Go SDK, MCP Go SDK
- Testing: Go stdlib + table-driven tests, Vitest + Testing Library (frontend)
- Build: Make + GoReleaser
- CI/CD: GitHub Actions
- Linting: golangci-lint v2 (Go), ESLint + TypeScript (frontend), markdownlint (docs)
Build and Test Commands
# Build (compiles frontend first, then Go binary)
make build # or: go build ./...
# Test
make test # or: go test ./...
# Lint
make lint # or: golangci-lint run ./...
# Markdown lint
make lint-md
# Full verification (run before any PR)
make ci # or: go build ./... && go test ./... && golangci-lint run ./...
# Frontend only
make web # Build frontend to internal/server/static/
make dev-web # Run Vite dev serverProject 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 implementations
│ ├── 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
│ └── version/ # Build version injection (ldflags)
├── pkg/models/ # Shared types (Issue, Agent, Action, etc.)
├── web/ # React SPA dashboard (Vite + TypeScript + pnpm)
├── docs/ # Design docs and ADRs
├── deploy/ # Deployment configurations
├── scripts/ # Build and utility scripts
├── bin/ # Compiled binaries (gitignored)
├── .github/workflows/ # CI/CD pipelines
└── Makefile # Build and development tasksWorkflow Rules
Always Do
- Create a feature branch for every change (
feature/issue-NNN-description) - Use conventional commits:
feat:,fix:,refactor:,docs:,test:,chore: - Run build, test, and lint before opening a PR
- Write table-driven tests with descriptive names
- Wrap errors with context:
fmt.Errorf("operation: %w", err) - Fix every error you find, regardless of who introduced it
Ask First
- Adding new dependencies (check if stdlib covers the need)
- Architectural changes (new packages, major interface changes)
- Database schema migrations
- Changes to CI/CD workflows
- Removing or renaming public APIs
- Changes to the forge abstraction layer (
IssueTrackerinterface)
Never Do
- Commit directly to
main-- always use feature branches - Skip tests or lint checks -- even for "small changes"
- Use
--no-verifyor--forceflags - Commit secrets, credentials, or API keys
- Add TODO comments without a linked issue number
- Mark work as complete when build, test, or lint failures remain
Core Principles
These are unconditional -- no optimization or time pressure overrides them:
- Quality: Once found, always fix, never leave. There is no "pre-existing" error.
- Verification: Build, test, and lint must pass before any commit.
- Safety: Never force-push
main. Never skip hooks. Never commit secrets. - Honesty: Never mark work as complete when it is not.
Error Handling
// Wrap errors with context -- every return site should add meaning
if err != nil {
return fmt.Errorf("load config: %w", err)
}
// Use sentinel errors for caller-distinguishable conditions
var ErrNotFound = errors.New("not found")
if errors.Is(err, ErrNotFound) { ... }Testing Conventions
// Table-driven tests with descriptive names
func TestFunctionName(t *testing.T) {
tests := []struct {
name string
input string
want string
wantErr bool
}{
{
name: "valid input returns expected output",
input: "example",
want: "result",
},
{
name: "empty input returns error",
input: "",
wantErr: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := FunctionName(tt.input)
if (err != nil) != tt.wantErr {
t.Errorf("FunctionName() error = %v, wantErr %v", err, tt.wantErr)
}
if got != tt.want {
t.Errorf("FunctionName() = %v, want %v", got, tt.want)
}
})
}
}Commit Format
feat: add user authentication endpoint
Implements JWT-based login and token refresh. Tokens expire after 1h.
Closes #42
Co-Authored-By: GitHub Copilot <copilot@github.com>Types: feat (new feature), fix (bug fix), refactor (no behavior change),
docs (documentation only), test (tests only), chore (build/tooling).
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
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.

