What this is
signetry-core ships a policy registry: a directory of YAML files, one per repository
shape, that says which paths an AI agent may touch for a given task and which it may not.
Six ship today (signetry_core/policies/):
python-library, node-service, monorepo-service, docs-only, dependency-bump,
ci-workflow-fix. A Go service is missing.
This is the highest-leverage thing you can contribute without touching the kernel: one new
file, no Python, and no test to write — tests/test_policy_registry.py is parametrized
over every file in that directory, so your policy is validated the moment it exists.
The deliverable
One file: signetry_core/policies/go-service.yaml. Copy
python-library.yaml
as your starting shape — the # @policy header comments are load-bearing metadata, not
decoration.
A starting point, not a spec to type in verbatim — argue with it, the reasoning is the
contribution:
# @policy id: go-service
# @policy title: Go service (cmd/internal layout, go test)
# @policy summary: A Go service laid out as cmd/ + internal/. The agent may change handlers, business
# logic and tests, and must keep `go test ./...` and `go vet` green. Generated code,
# migrations, the container image and CI stay off-limits.
# @policy stack: go, go-modules, gotest
# @policy author: your-github-handle
# @policy blocks: internal/db/migrations/0007_add_index.sql, internal/api/api.gen.go, Dockerfile, .github/workflows/release.yml, deploy/k8s/prod.yaml
# @policy allows: cmd/server/main.go, internal/handler/checkout.go, internal/handler/checkout_test.go, go.mod, README.md
version: 2
task_type: feature-work
allowed_paths:
- "cmd/**"
- "internal/**"
- "pkg/**"
- "go.mod"
- "go.sum"
- "README.md"
- "CHANGELOG.md"
forbidden_paths:
# A file ending .gen.go / .pb.go is the OUTPUT of a generator. Hand-editing it
# makes the checked-in code disagree with the source it was generated from, and
# the next `go generate` silently reverts the fix.
- "**/*.gen.go"
- "**/*.pb.go"
- "**/zz_generated*.go"
# Inside internal/** which is otherwise allowed: a migration is applied once and
# unapplied by hand at 3am. Schema change is a human decision, not agent scope.
- "internal/db/migrations/**"
- "**/migrations/**"
- ".github/**"
- "Dockerfile*"
- "deploy/**"
- "**/.env*"
- "**/*secret*"
max_files_changed: 15
required_checks:
- "go build ./..."
- "go vet ./..."
- "go test ./..."
policy_owner: your-team
policy_version: "1.0"
The part people get wrong
Your blocks list must include at least one path that sits inside your own
allowed_paths. Carving an exception out of a directory you otherwise own is the whole
skill. For a Go service that exception is:
internal/db/migrations/** — internal/** is allowed wholesale because that's
where the service actually lives, but a migration is applied once and rolled back by hand
under pressure. Schema change is a human decision.
The Go trap worth a comment in the file
go.sum changing while go.mod doesn't is a dependency swap wearing a checksum
update's clothing, and //go:embed pulls a file into the binary without that file
looking dangerous — an embedded template or cert bundle ships in the artifact. Decide
deliberately whether go.sum belongs in your allowlist and say why in a comment.
Acceptance criteria
Getting started
The full numbered walkthrough, including what makes a policy worth merging, is in
docs/site/policy-registry.md → "Contributing a policy".
git clone https://github.com/Signetry/core && cd core
uv sync
uv run pytest tests/test_policy_registry.py -q
uv run signetry policies # your entry should appear here once the file exists
Comment to claim it — one policy per contributor so nobody's work gets duplicated. Happy to
review a half-finished scope list; the reasoning matters more than the YAML.
What this is
signetry-coreships a policy registry: a directory of YAML files, one per repositoryshape, that says which paths an AI agent may touch for a given task and which it may not.
Six ship today (
signetry_core/policies/):python-library,node-service,monorepo-service,docs-only,dependency-bump,ci-workflow-fix. A Go service is missing.This is the highest-leverage thing you can contribute without touching the kernel: one new
file, no Python, and no test to write —
tests/test_policy_registry.pyis parametrizedover every file in that directory, so your policy is validated the moment it exists.
The deliverable
One file:
signetry_core/policies/go-service.yaml. Copypython-library.yamlas your starting shape — the
# @policyheader comments are load-bearing metadata, notdecoration.
A starting point, not a spec to type in verbatim — argue with it, the reasoning is the
contribution:
The part people get wrong
Your
blockslist must include at least one path that sits inside your ownallowed_paths. Carving an exception out of a directory you otherwise own is the wholeskill. For a Go service that exception is:
internal/db/migrations/**—internal/**is allowed wholesale because that'swhere the service actually lives, but a migration is applied once and rolled back by hand
under pressure. Schema change is a human decision.
The Go trap worth a comment in the file
go.sumchanging whilego.moddoesn't is a dependency swap wearing a checksumupdate's clothing, and
//go:embedpulls a file into the binary without that filelooking dangerous — an embedded template or cert bundle ships in the artifact. Decide
deliberately whether
go.sumbelongs in your allowlist and say why in a comment.Acceptance criteria
signetry_core/policies/go-service.yamlexists; filename matches@policy id.blocksandallowseach list 3–4 realistic paths for this stack, and don't overlap.blocksentry is insideallowed_paths.forbidden_pathsentry that isn't self-evident carries a comment saying why,not just that it is.
python-libraryforbidsconftest.pyat any depth and the commentexplains it executes at collection time on every developer machine — that is the bar.
pytest tests/test_policy_registry.pyis green. The suite proves each claimed block isactually refused by the real
evaluate_contract, so a policy that misleads adoptersfails CI rather than shipping.
caution:—signetry initprints it at adoption time. A risky policy with no caution gets sent back; a risky
policy that's honest is fine.
Getting started
The full numbered walkthrough, including what makes a policy worth merging, is in
docs/site/policy-registry.md→ "Contributing a policy".Comment to claim it — one policy per contributor so nobody's work gets duplicated. Happy to
review a half-finished scope list; the reasoning matters more than the YAML.