agentleFS
schmitthubschmitthub/clawker/.github/copilot-instructions.md

clawker

Copilot instructions54 starsChanged 3 months agoMITView on GitHub

You review pull requests for this repository. AGENTS.md at the repository root, the package AGENTS.md files, and the Serena memories under .serena/memories/ are the coding standard. This file tells you what to look for first and how to write each comment. Read the head branch of the pull request. Compare every added or changed line against the priorities below, in order. Flag every added or changed lint suppression. One comment per occurrence. Markers to find in the diff: The repository…

The file

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

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the head branch of the pull request.

    line 8
  2. Distinctive:

    Every CLAUDE.md in this repository is a symbolic link to the file AGENTS.md in the same directory.

    line 74
  3. Distinctive:

    Write in plain, direct English.

    line 113
  4. Distinctive:

    Read the package AGENTS.md files along each changed file's path.

    line 120
  5. Very specific:

    Do not copy a path table here.

    line 124

≈ “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

Copilot code review instructions

You review pull requests for this repository. AGENTS.md at the repository root, the package AGENTS.md files, and the Serena memories under .serena/memories/ are the coding standard. This file tells you what to look for first and how to write each comment.

Read the head branch of the pull request. Compare every added or changed line against the priorities below, in order.

Priority 1: lint suppression

Flag every added or changed lint suppression. One comment per occurrence.

Markers to find in the diff:

  • //nolint and // nolint (with or without a linter list)
  • #nosec
  • //lint:ignore
  • Changes to exclusions, exclude, or nolintlint settings in .golangci.yml

The repository rule (.serena/memories/conventions.md) is: do not add a lint suppression without explicit maintainer approval. Correct the code so the linter passes. An explanation text after the marker is not sufficient on its own. In each comment:

  1. Quote the marker and the linter it silences.
  2. State that the rule requires maintainer approval.
  3. Propose the code change that removes the need for the suppression.

Priority 2: control plane servers and listeners

Applies to new or changed calls to grpc.NewServer, net.Listen, net.ListenConfig, http.Server, and ListenAndServe in these paths:

  • controlplane/**
  • internal/controlplane/**
  • cmd/clawkercp/**
  • clawkerd/**

The canonical authorization code is controlplane/auth:

  • auth.NewAuthInterceptor builds the interceptor from a Hydra introspector and a method-to-scope map.
  • AuthInterceptor.UnaryInterceptor, AuthInterceptor.StreamInterceptor, and AuthInterceptor.GRPCServerOptions attach it to a gRPC server.
  • controlplane/server/grpc_stack.go shows the required chain order: recovery interceptor, then ready-gate interceptor, then auth interceptor.

Report each of these as a blocking finding:

  • No auth. A gRPC server on the admin or agent surface without the controlplane/auth interceptor chain. A hand-written token check, a header check, or a copy of the interceptor logic is not acceptable; the server must use controlplane/auth.
  • Reused auth material. A listener that loads certificate, key, or CA files that belong to another lane, or that shares a tls.Config with another lane. Each listener has its own certificate lane in its own subpackage (controlplane/infracerts, controlplane/otelcerts, controlplane/sdscerts are the pattern). See "Why not otelcerts" in controlplane/sdscerts/AGENTS.md.
  • mTLS without a pin. A listener that uses client certificates instead of bearer tokens must set ClientAuth: tls.RequireAndVerifyClientCert and pin the peer CN or SAN in VerifyPeerCertificate. clawkerd/listener.go is the reference. The pull request description must say why bearer authorization does not apply to that listener.
  • Crash path. panic, log.Fatal, or os.Exit on the control plane boot or serve path, or a serve goroutine without a recover. See the CP failure rules in controlplane/AGENTS.md. A degraded subsystem must emit a structured log line with event=<subsystem>_unavailable.

Priority 3: CLAUDE.md files

Every CLAUDE.md in this repository is a symbolic link to the file AGENTS.md in the same directory. Git submodules are exempt.

For each added or changed CLAUDE.md in the diff, check the file mode and the blob content. A symbolic link has mode 120000, and its blob content is the link target string. Report each of these as a blocking finding:

  • A regular file named CLAUDE.md (mode 100644 or 100755).
  • A link whose target is an absolute path.
  • A link whose target is not exactly AGENTS.md (for example ../AGENTS.md, docs/AGENTS.md, or ./AGENTS.md).
  • A link whose sibling AGENTS.md does not exist in that directory.

The fix is always the same: move the content to the sibling AGENTS.md and replace CLAUDE.md with a relative link to it.

Priority 4: standing rules from AGENTS.md

Flag these when they appear in the diff. Name the shared rule file in the comment.

  • An error assigned to _ or otherwise not handled.
  • A meaningful string literal that is not a named constant.
  • A struct literal that omits required fields (the exhaustruct linter).
  • A dependency, container image, GitHub Action, or hook without an exact version and digest or commit SHA.
  • A context.Context stored in a struct field.
  • An import of github.com/moby/moby/client outside pkg/whail, of pkg/whail outside internal/docker, of golang.org/x/term outside internal/term, of lipgloss outside internal/iostreams, or of bubbletea outside internal/tui.

Do not report

  • Formatting that gofmt, golines, or import ordering already enforce.
  • Word choice in code comments.
  • A finding that a CI check on the same pull request already reports.

Comment style

  • Write in plain, direct English. One sentence, one idea.
  • One finding per comment. Anchor the comment to the line.
  • Name the shared rule file the finding comes from.
  • Give the fix, not only the problem.

Standards by path

Read the package AGENTS.md files along each changed file's path; they hold the package requirements. Cross-cutting conventions (errors, constants, context, output, Docker and terminal boundaries) are in .serena/memories/conventions.md and .serena/memories/cli/core.md. Do not copy a path table here. Dependency version requirements are in .agents/skills/dev-checks/SKILL.md.

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.