Appendix: Policy and Ignore Rules
Configure RC.6 admission requirements in .ait/policy.yaml and repository visibility in .aitignore with exact accepted fields and matching rules.
Audience: Repository owners, developers, and coding agents
Repository policy and ignore rules#
This page documents the two repository-root text files that control admission requirements and filesystem visibility. They solve different problems: .ait/policy.yaml decides which evidence is required; .aitignore decides which workspace paths AIT sees.
.ait/policy.yaml#
ait init creates this file with owner-only permissions. Its policy_id must match .ait/config.json.policy_profile. RC.6 supports the policy IDs prototype, team, and release.
version: 1
policy_id: prototype
defaults:
require_attestation: true
require_tests: true
require_lint: false
require_security_scan: false
require_license_scan: false
require_ai_provenance: false
require_code_review_summary: false
class_overrides:
- when:
content_class: docs_only
set:
require_tests: false
require_lint: false
require_security_scan: false
require_license_scan: falseRoot and requirement fields#
| Field | Type and meaning |
|---|---|
version | Integer 1. |
policy_id | One of prototype, team, or release; must equal the Repository policy profile. |
defaults | Required map containing the baseline requirement switches. |
class_overrides | Optional ordered list of conditional partial overrides. An empty list is valid. |
Every requirement value is an exact YAML boolean:
| Requirement | Evidence controlled |
|---|---|
require_attestation | An admitted attestation is required. |
require_tests | Test evidence must pass. |
require_lint | Lint evidence must pass. |
require_security_scan | Security-scan evidence must pass. |
require_license_scan | License-scan evidence must pass. |
require_ai_provenance | AI provenance evidence is required. |
require_code_review_summary | A code-review summary is required. |
The same seven names are accepted under an override's set map. defaults must contain all seven; set is partial and changes only the fields it names.
Override selectors#
Each class_overrides[] entry requires a nonempty when map and a nonempty set map. when accepts either or both selectors:
| Selector | Accepted values |
|---|---|
content_class | docs_only, code_change |
author_class | human_only, ai_related |
Overrides are evaluated in file order. Keep conditions explicit and avoid overlapping entries whose result depends on ordering.
Generated profile baselines#
All three generated profiles require attestation and tests and leave AI provenance and code-review-summary requirements off. Their other defaults are:
| Profile | Lint | Security scan | License scan |
|---|---|---|---|
prototype | false | false | false |
team | true | false | false |
release | true | true | true |
The generated documentation-only override turns tests, lint, security scan, and license scan off. Changing a generated policy is an admission-policy change; review it together with the matching profile setting.
YAML acceptance rules#
- Use spaces, never tabs, with two-space indentation steps.
- Use exact lowercase
trueandfalsevalues. - Duplicate and unknown fields fail validation.
- Keep
version,policy_id,defaults, and any override map at the exact nesting shown above. - A first remote registration in RC.6 admits the exact
prototypebaseline and its complete documentation-only override. Select that profile before registering a new Repository. Locally configuredteamandreleaseprofiles remain valid policy files for their supported local use.
.aitignore#
.aitignore is a line-oriented repository visibility contract. It applies to workspace inspection and to the files considered by status, Snapshot, and Plan filesystem discovery. It augments AIT's built-in exclusions; it does not replace them.
# Generated outputs
dist/
*.tmp
# Keep one fixture visible
!fixtures/expected.tmp
# Literal leading markers
\#notes.txt
\!important.txtRule syntax#
| Form | Behavior |
|---|---|
| blank line | Ignored. |
# comment | Ignored. |
\#name | Matches a literal leading #. |
!pattern | Negates a prior match and makes the path visible again. |
\!name | Matches a literal leading !. |
./path | The leading ./ is removed. |
/path | Anchored to the Repository root. |
path/ | Directory-only rule. |
name | With no slash, matches that basename at any depth. |
* | Matches any sequence within a path segment. |
? | Matches one character within a path segment. |
Rules are evaluated from top to bottom and the last matching rule wins. Other regular-expression characters are treated literally; character-class syntax is not part of the RC.6 matcher. .aitignore itself remains visible so its effect can be captured and reviewed.
An ignore rule changes visibility, not ownership or deletion. It does not erase an existing Snapshot, authorize secret storage, or make a generated directory safe to commit.
Verification#
After changing either file, use read-only inspection before normal work:
ait config show --json
ait status
ait diffFor remote registration, run the actual ait remote add command only after the policy and Patchset CI catalog are ready; its validation is authoritative.