agentleFS
HerbHallHerbHall/samverk/.github/copilot-instructions.md

samverk

Copilot instructions1 starsChanged 9 months agoMITArchived repositoryView on GitHub

Samverk is an async background development engine. Go backend with React TypeScript dashboard embedded via go:embed. Files: */.md excludeAgent: "code-review"

The file

We split this copilot-instructions.md into the rules it gives an agent

12 rules. About 0 are common, 7 are distinctive, and 5 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.

  • 5

    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
  1. Distinctive:

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

    line 18
  2. Distinctive:

    Remove unused code completely -- no backwards-compatibility hacks

    line 21
  3. Very specific:

    Use net/http with Go 1.22+ routing patterns, no web frameworks

    line 25
  4. Very specific:

    Use for i := range slice with slice[i] for structs > 64 bytes

    line 31
  5. Very specific:

    Always use ExecContext/QueryContext (never Exec/Query)

    line 33
  6. Distinctive:

    All API calls through typed fetch wrappers

    line 41
  7. Distinctive:

    Verify every import is used (ESLint catches unused imports)

    line 43
  8. Very specific:

    Run go build ./..., go test ./..., golangci-lint before committing

    line 49
  9. Distinctive:

    Use LangChain, LangGraph, CrewAI, or agent frameworks

    line 53
  10. Very specific:

    Use gRPC, PostgreSQL, Redis, or web frameworks (gin/echo/fiber)

    line 54
  11. Distinctive:

    Add dependencies without checking if stdlib covers the need

    line 55
  12. Distinctive:

    Commit directly to main -- always use feature branches

    line 56

≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions 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
copilot-instructions.md

Samverk -- Copilot Instructions

Samverk is an async background development engine. Go backend with React TypeScript dashboard embedded via go:embed.

Architecture

  • Single binary: cmd/samverk/main.go with cobra subcommands
  • Internal packages under internal/ (server, api, mcp, dispatcher, forge, agent, provider, autonomy, profile, cost, store, digest, version)
  • Shared types in pkg/models/
  • React SPA in web/ embedded at build time
  • SQLite for persistence (modernc.org/sqlite, pure Go, no CGO)
  • Config via YAML files in .samverk/

Code Style

  • Conventional commits: feat:, fix:, refactor:, docs:, test:, chore:
  • No over-engineering -- implement only what's needed now
  • Comments only where logic isn't self-evident
  • Validate at system boundaries, not internal calls
  • Remove unused code completely -- no backwards-compatibility hacks

Go Conventions

  • Use net/http with Go 1.22+ routing patterns, no web frameworks
  • Named returns on functions returning multiple values
  • Table-driven tests with t.Run subtests
  • Error wrapping with fmt.Errorf("context: %w", err)
  • context.Context as first parameter
  • Preallocate slices: make([]T, 0, len(source)) not var s []T
  • Use for i := range slice with slice[i] for structs > 64 bytes
  • Combine consecutive append() calls to the same slice
  • Always use ExecContext/QueryContext (never Exec/Query)
  • Close *http.Response bodies explicitly: defer func() { _ = resp.Body.Close() }()

React/TypeScript Conventions

  • React 19 + Vite 6 + TypeScript strict mode
  • shadcn/ui components with Tailwind CSS
  • TanStack Query for server state, Zustand for client state
  • All API calls through typed fetch wrappers
  • No any type -- use unknown with type guards
  • Verify every import is used (ESLint catches unused imports)

Testing

  • Go: table-driven tests, testutil.NewStore(t) for SQLite fixtures
  • Frontend: Vitest + Testing Library
  • Run go build ./..., go test ./..., golangci-lint before committing

Do NOT

  • Use LangChain, LangGraph, CrewAI, or agent frameworks
  • Use gRPC, PostgreSQL, Redis, or web frameworks (gin/echo/fiber)
  • Add dependencies without checking if stdlib covers the need
  • Commit directly to main -- always use feature branches

Path Instructions

Files: **/*.md excludeAgent: "code-review"

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.