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 Django application 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/django.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: django
# @policy title: Django app (apps/ layout, pytest-django)
# @policy summary: A Django project. The agent may change app code, templates and tests, and must keep
# pytest green. Migrations, production settings and anything that runs at manage.py
# startup stay off-limits.
# @policy stack: python, django, pytest-django, drf
# @policy author: your-github-handle
# @policy blocks: apps/billing/migrations/0012_add_plan.py, config/settings/production.py, manage.py, .github/workflows/deploy.yml, .env.production
# @policy allows: apps/billing/models.py, apps/billing/views.py, apps/billing/serializers.py, tests/test_billing.py, requirements/base.txt
version: 2
task_type: feature-work
allowed_paths:
- "apps/**"
- "templates/**"
- "tests/**"
- "requirements/**"
- "README.md"
- "CHANGELOG.md"
forbidden_paths:
# Inside apps/** which is otherwise allowed. A Django migration is applied once
# against a real database and reversed by hand; `makemigrations` output also
# encodes state the diff doesn't show, so review of the file is not review of the
# schema change.
- "**/migrations/**"
# Production settings configure the deployed system: ALLOWED_HOSTS, DEBUG, the
# datasource, middleware order. None of it is exercised by the test suite that
# gates this change.
- "**/settings/production.py"
- "**/settings/prod.py"
# manage.py and wsgi/asgi entrypoints execute before any test collection.
- "manage.py"
- "**/wsgi.py"
- "**/asgi.py"
- "**/conftest.py"
- ".github/**"
- "infra/**"
- "deploy/**"
- "**/.env*"
- "**/*secret*"
max_files_changed: 12
required_checks:
- "pytest -q"
- "python -m django check --deploy --fail-level WARNING"
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 Django application that exception is:
**/migrations/** — apps/** is allowed because that's the application, but every
Django app carries a migrations/ directory inside it, and a migration is a one-way door.
The Django trap worth a comment in the file
Adding to INSTALLED_APPS or MIDDLEWARE in a settings file you do allow loads
new code at boot — the risk isn't the line, it's the import. Also requirements/**: a
pinned bump is routine, an unpinned add is a new dependency at deploy time. Comment which
you intend.
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 Django application 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/django.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 Django application that exception is:
**/migrations/**—apps/**is allowed because that's the application, but everyDjango app carries a
migrations/directory inside it, and a migration is a one-way door.The Django trap worth a comment in the file
Adding to
INSTALLED_APPSorMIDDLEWAREin a settings file you do allow loadsnew code at boot — the risk isn't the line, it's the import. Also
requirements/**: apinned bump is routine, an unpinned add is a new dependency at deploy time. Comment which
you intend.
Acceptance criteria
signetry_core/policies/django.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.