Compare commits

..

5 Commits

10 changed files with 234 additions and 260 deletions

View File

@@ -23,9 +23,9 @@ updates are incorporated deliberately.
| [Releases](docs/policy/release.md) | Minimal justified gates and a clear publication completion point. | | [Releases](docs/policy/release.md) | Minimal justified gates and a clear publication completion point. |
| [Open source licensing and attribution](docs/policy/oss.md) | Project grants and factual upstream notices. | | [Open source licensing and attribution](docs/policy/oss.md) | Project grants and factual upstream notices. |
Use the [licensing examples](examples/licensing/) as references when writing Use the upstream [licensing examples](examples/licensing/) to create actual
actual notices. Copy needed texts from the [license collection](docs/oss/licenses/README.md). project notices, and copy applicable texts from the
Applications do not need their own copy of this project's example collection. [license collection](docs/oss/licenses/README.md) locally.
## Work On This Project ## Work On This Project

View File

@@ -21,13 +21,11 @@ templates themselves, use the [contributor guide](development.md).
Select an upstream commit and read the policies relevant to the requested work. Select an upstream commit and read the policies relevant to the requested work.
Use a revision containing the [project grant](../COPYRIGHT) and the reference Use a revision containing the [project grant](../COPYRIGHT) and the reference
assets you intend to use. Record its full commit identifier; a moving branch assets you intend to use. Record its full commit identifier as the adoption
name is not an adoption baseline. No package manager or automatic update service baseline. Git records are sufficient to maintain adoption provenance.
is required.
Preserve existing downstream decisions and unrelated changes. Adoption is a Preserve existing downstream decisions and unrelated changes. Customize selected
local customization task, not authorization to add every capability, document, policies to existing project responsibilities and the author's requested scope.
restriction, or release gate mentioned in the templates.
## Copy And Customize ## Copy And Customize
@@ -35,10 +33,9 @@ restriction, or release gate mentioned in the templates.
downstream locations. downstream locations.
Follow each template's adoption instructions and remove its `Base Policy Follow each template's adoption instructions and remove its `Base Policy
Template` section afterward. Create supporting documents when they have useful Template` section afterward. Create supporting documents when they have useful
content for an existing responsibility, rather than filling an empty outline. content for an existing responsibility.
2. Tailor architecture to the actual project. Preserve the author's selected 2. Tailor architecture to the actual project. Preserve the author's selected
license and existing application contracts. Do not infer new product behavior license and existing application contracts.
from policy examples.
3. Retain each document's `Base Policy Version` and set `Last Updated` to the 3. Retain each document's `Base Policy Version` and set `Last Updated` to the
local adoption date. Add `Upstream Source` metadata linking to that specific local adoption date. Add `Upstream Source` metadata linking to that specific
document at the selected commit. Retain this provenance in future edits. document at the selected commit. Retain this provenance in future edits.
@@ -90,8 +87,8 @@ there; the documentation policy remains the owner of the documentation topic map
## Attribute Copied Policies ## Attribute Copied Policies
Use the [canonical attribution entry](../examples/licensing/policy-attribution.md) Use the [canonical attribution entry](../examples/licensing/policy-attribution.md)
in the downstream `docs/oss/attribution.md`. It is an entry fragment to insert by inserting it beneath the existing title in the downstream
beneath that document's existing title, not an additional document title. `docs/oss/attribution.md`.
- Replace `UPSTREAM_COMMIT` with the selected full commit in all three URLs. - Replace `UPSTREAM_COMMIT` with the selected full commit in all three URLs.
- Adjust the `Material:` sentence to identify the files actually copied. Keep - Adjust the `Material:` sentence to identify the files actually copied. Keep
@@ -134,7 +131,7 @@ Original example formatting is available under CC0 as specified in
attribution entry for this project. attribution entry for this project.
Keep links to these examples in the adopted policy pointed at upstream commits. Keep links to these examples in the adopted policy pointed at upstream commits.
Do not populate the downstream `examples/` directory with this collection. Keep the example collection upstream and use it to create actual project notices.
Copy the applicable standard license texts into the actual local license files; Copy the applicable standard license texts into the actual local license files;
retain their wording and their own terms. Those copies remain necessary under retain their wording and their own terms. Those copies remain necessary under
the House Format even though example documents stay upstream. the House Format even though example documents stay upstream.
@@ -147,30 +144,27 @@ When asked to check the policy set and recommend updates:
`Base Policy Version`, and local customizations. Different documents may have `Base Policy Version`, and local customizations. Different documents may have
different adoption baselines. different adoption baselines.
2. Inspect upstream `main` and record its full commit identifier. Use that fixed 2. Inspect upstream `main` and record its full commit identifier. Use that fixed
revision for the review so later upstream changes do not shift the comparison. revision throughout the comparison.
3. Compare each recorded upstream file with its counterpart at the review 3. Compare each recorded upstream file with its counterpart at the review
revision, then assess the upstream changes against the locally customized revision, then assess the upstream changes against the locally customized
policy. Version labels help orientation; inspect the actual differences. policy. Version labels help orientation; inspect the actual differences.
Note new, renamed, or removed upstream policies where relevant to the project. Note new, renamed, or removed upstream policies where relevant to the project.
4. Recommend applicable changes with their reasons, identify conflicts with 4. Recommend applicable changes with their reasons, identify conflicts with
deliberate local choices, and name policies that need no update. Include the deliberate local choices, and name policies that need no update. Include the
baseline and review revisions so the comparison can be reproduced. Do not baseline and review revisions so the comparison can be reproduced. Ground
recommend wholesale replacement merely because upstream differs. recommendations in the local project's needs.
5. If a baseline is missing or unavailable, report the uncertainty. You may 5. Base provenance claims on available evidence. Report missing or unavailable
compare available content, but do not assume the local policy is an unchanged baselines explicitly and qualify comparisons accordingly. Report upstream
upstream copy or invent an adoption revision. If upstream cannot be reached, access failures and the resulting limits on the review.
report that limitation rather than claiming the policies are current.
For a recommendation-only request, leave files and adoption metadata unchanged. For a recommendation-only request, preserve the current files and adoption
A completed review does not mean a newer policy has been adopted. Apply the metadata. Apply the following procedure when implementation is requested.
following procedure when implementation is requested.
## Update Deliberately ## Update Deliberately
Compare the previously recorded upstream files with a selected newer revision. Compare the previously recorded upstream files with a selected newer revision.
Apply relevant changes while preserving local decisions; do not overwrite Apply relevant changes while preserving local decisions and selecting updates
customized documents wholesale or treat every upstream recommendation as a new that serve the project.
local requirement.
Update `Base Policy Version` when adopting a newer template version and update Update `Base Policy Version` when adopting a newer template version and update
`Upstream Source` to the revision actually incorporated. Change `Last Updated` `Upstream Source` to the revision actually incorporated. Change `Last Updated`
@@ -178,7 +172,6 @@ when revising the local document. Keep the material description, modification
status, and attribution links accurate. If documents use different upstream status, and attribution links accurate. If documents use different upstream
revisions, retain each file's exact source metadata and include the necessary revisions, retain each file's exact source metadata and include the necessary
commit-specific source and notice links in the single project attribution entry. commit-specific source and notice links in the single project attribution entry.
Do not change a source reference to a version that was merely reviewed.
Ordinary review should check the resulting rules, attribution facts, and affected Ordinary review should check the resulting rules, attribution facts, and affected
links. A commit-based adoption record is sufficient; no recurring synchronization links. A commit-based adoption record is sufficient; no recurring synchronization

View File

@@ -9,8 +9,7 @@ Read the [agent policy](policy/agents.md) and inspect the working tree before
editing. Preserve unrelated work. Follow explicit task instructions, including editing. Preserve unrelated work. Follow explicit task instructions, including
requests to leave changes uncommitted. This repository's policy files retain requests to leave changes uncommitted. This repository's policy files retain
their template adoption sections because they are distributed as templates. their template adoption sections because they are distributed as templates.
Application-specific template examples do not require this repository to acquire Application-specific examples illustrate downstream adoption.
application interfaces or infrastructure.
## Policy Reading Guide ## Policy Reading Guide
@@ -39,7 +38,7 @@ application interfaces or infrastructure.
Keep reusable instructions portable. Put adoption instructions in template Keep reusable instructions portable. Put adoption instructions in template
sections and project-specific contributor procedures here. Original licensing sections and project-specific contributor procedures here. Original licensing
examples belong under `examples/licensing/`; explanatory instructions belong in examples belong under `examples/licensing/`; explanatory instructions belong in
their guide or policy so they are not copied into notices. their guide or policy.
Increment the affected template's `Base Policy Version` and update its date when Increment the affected template's `Base Policy Version` and update its date when
changing its substantive rules or adoption instructions. Preserve the licensing changing its substantive rules or adoption instructions. Preserve the licensing
@@ -47,15 +46,12 @@ scope defined in `COPYRIGHT`; reproduced license texts must remain verbatim.
Review the diff, run `git diff --check` for changed prose, and check affected links Review the diff, run `git diff --check` for changed prose, and check affected links
and examples. Example placeholders and destination-relative links should be and examples. Example placeholders and destination-relative links should be
validated against the documented downstream layout, not treated as published validated against the documented downstream layout. Diff, link, and example
URLs or missing local dependencies. No application build or new test suite is review suffice for prose-only changes. Retain upstream formatting in verbatim
needed for prose-only changes. Retain upstream formatting in verbatim license license texts even where it would trigger whitespace warnings.
texts even where it would trigger whitespace warnings.
Pin adopted-source and example links to commits that contain the referenced Pin adopted-source and example links to commits that contain the referenced
files. Discovery links to the upstream project and current adoption guide may files. Discovery links to the upstream project and current adoption guide may
track `main` so downstream agents can find updates. New assets can use local track `main` so downstream agents can find updates. Use local links for new
links within this repository until a containing commit is available; do not assets until a containing commit is available. Confirm public reference links
invent a future hash or publish changes merely to obtain one. are accessible when preparing publication of the reference changes.
Before publication, confirm that public reference links are accessible. This is
change validation, not a recurring downstream release gate.

View File

@@ -3,11 +3,11 @@
This collection supplies reusable reference texts for repositories adopting the This collection supplies reusable reference texts for repositories adopting the
[Open Source Licensing And Attribution Policy](../../policy/oss.md). Copy the [Open Source Licensing And Attribution Policy](../../policy/oss.md). Copy the
texts your incorporated code, documentation, or assets use into your repository's texts your incorporated code, documentation, or assets use into your repository's
`docs/oss/licenses/`, together with applicable companion texts. The collection is not exhaustive, and adopting `docs/oss/licenses/`, together with applicable companion texts. Select the texts
projects need not copy every file. applicable to incorporated material.
These files are reference material. Their presence does not license this These files are reference material. Each project's grant is stated in COPYRIGHT;
repository or an adopting project under every listed license. each component's grant is identified in its attribution entry.
## Sources ## Sources
@@ -40,14 +40,13 @@ and the example-format dedication described in the root [COPYRIGHT](../../../COP
Put actual upstream copyright statements in the component's attribution entry. Put actual upstream copyright statements in the component's attribution entry.
Link project-specific notices and exceptions to the imported upstream commit. Link project-specific notices and exceptions to the imported upstream commit.
- GNU filenames identify the text version. The attribution entry's SPDX - GNU filenames identify the text version. The attribution entry's SPDX
expression specifies `-only` or `-or-later` according to the upstream grant; expression specifies `-only` or `-or-later` according to the upstream grant.
a shared text does not select that grant for the component.
- LGPL 2.0 is the GNU Library General Public License. LGPL 2.1 and 3.0 are the - LGPL 2.0 is the GNU Library General Public License. LGPL 2.1 and 3.0 are the
GNU Lesser General Public License; these versions are distinct. GNU Lesser General Public License; these versions are distinct.
- When copying LGPL 3.0, also copy GPL 3.0, whose terms it incorporates, and make - When copying LGPL 3.0, also copy GPL 3.0, whose terms it incorporates, and make
both texts reachable from the attribution entry. Include other companion texts both texts reachable from the attribution entry. Include other companion texts
or exceptions when the component's applicable terms require them. or exceptions when the component's applicable terms require them.
Record any intentional source refresh here and preserve the retrieved text Record intentional source refreshes here and preserve retrieved texts verbatim.
without editorial changes. No synchronization service or recurring release check Synchronization services and recurring release checks are optional for this
is required for this reference collection. reference collection.

View File

@@ -1,22 +1,22 @@
# Agent Policy # Agent Policy
**Base Policy Version:** 1.1 **Base Policy Version:** 1.3
**Last Updated**: 2026-09-23 **Last Updated**: 2026-09-27
## Base Policy Template ## Base Policy Template
This document is the base template for the canonical house rules that agents must follow while working in this repository. Repositories that implement this policy should: When adopting this policy:
1. Review the policy, remove any rules that must not apply to the current project, and add any additional rules that are required by the current project; 1. Retain applicable rules and add project-specific requirements;
2. Update the `Last Updated` field to the current date; and 2. Update the `Last Updated` field to the current date; and
3. Remove this heading (`Base Policy Template`) and the associated text. 3. Remove this heading (`Base Policy Template`) and the associated text.
Most projects will not require any revisions to the substantive policy rules as written below. Most projects can adopt the substantive rules as written.
## Purpose ## Purpose
Agents working in this repository must read and adhere to the following house rules. Agents must read and follow these rules.
## Implementation Discipline ## Implementation Discipline
@@ -53,15 +53,15 @@ unless that behavior was expressly selected as part of the contract.
## Git Commit Policy ## Git Commit Policy
By default, create a commit after completing each coherent unit of work, using a By default, commit each completed, nonempty unit of work using a
concise, plain-English message describing what changed. This policy is standing concise, plain-English message describing what changed. This policy is standing
authorization to create those local commits; a separate user request is not authorization to create those local commits; a separate user request is not
required. An explicit user instruction to leave work uncommitted takes precedence. required. An explicit user instruction to leave work uncommitted takes precedence.
A unit of work is a focused, reviewable outcome, including its relevant tests and A unit of work is a focused, reviewable outcome, including its relevant tests and
documentation. Do not commit after every intermediate edit or create empty commits. documentation.
Complete the appropriate validation before committing. If work is incomplete or Complete the appropriate validation before committing. If work is incomplete or
validation is blocked, report that state rather than presenting it as completed. validation is blocked, report that state accurately.
Before committing: Before committing:
@@ -69,10 +69,10 @@ Before committing:
changes. Identify changes that predate the current unit of work. changes. Identify changes that predate the current unit of work.
2. Exclude secrets, local environment files, generated junk, and unrelated changes. 2. Exclude secrets, local environment files, generated junk, and unrelated changes.
3. Stage only the files or hunks belonging to the completed unit. Use `git add .` 3. Stage only the files or hunks belonging to the completed unit. Use `git add .`
only when every included change belongs to that unit. Do not disturb unrelated only when every included change belongs to that unit. Preserve unrelated
staged or unstaged work. staged and unstaged work.
4. Review `git diff --staged` and run appropriate checks for the change. Do not 4. Review `git diff --staged` and run appropriate checks for the change. Reuse
repeat checks already passed for unchanged content merely to create a commit. successful checks for unchanged content.
5. Review `git log --oneline -n 10` and use 5. Review `git log --oneline -n 10` and use
`git commit -m "<concise plain-English commit message>"`. `git commit -m "<concise plain-English commit message>"`.
6. Report the commit identifier and any remaining uncommitted work. 6. Report the commit identifier and any remaining uncommitted work.

View File

@@ -1,27 +1,24 @@
# Architecture Policy # Architecture Policy
**Base Policy Version:** 1.1 **Base Policy Version:** 1.3
**Last Updated**: 2026-09-25 **Last Updated**: 2026-09-27
## Base Policy Template ## Base Policy Template
This document is the base template for the canonical architecture policy. When adopting this policy:
Repositories that implement this policy should:
1. Replace the application-specific guidance below with the repository's 1. Replace the application-specific guidance below with the repository's
purpose, adopted architectural constraints, and relevant non-goals; purpose, adopted architectural constraints, and relevant non-goals;
2. Distinguish rules governing development from descriptions of implemented 2. Distinguish rules governing development from descriptions of implemented
structure. Keep proposed changes and implementation status in their canonical structure. Keep proposed changes and implementation status in their canonical
documents under the [documentation policy](documentation.md); documents under the [documentation policy](documentation.md);
3. Reference supporting documents only when they contain useful information. 3. Reference supporting documents when they contain useful information;
Do not create `TODO` documents solely to populate an architectural outline;
4. Update the `Last Updated` field to the current date; and 4. Update the `Last Updated` field to the current date; and
5. Remove this heading (`Base Policy Template`) and the associated text. 5. Remove this heading (`Base Policy Template`) and the associated text.
This template requires substantial customization. Select topics that matter to This template requires substantial customization. Select topics relevant to
the application; the examples below are not a checklist of required subsystems, the application from the examples below.
interfaces, or supporting documents.
## Purpose And Ownership ## Purpose And Ownership
@@ -31,7 +28,7 @@ and dependency rules, established invariants, and explicit non-goals.
Describe the concrete package inventory and implementation mechanics in internal Describe the concrete package inventory and implementation mechanics in internal
documentation. Link to canonical public contracts for their exact behavior and documentation. Link to canonical public contracts for their exact behavior and
to ADRs for decision rationale rather than repeating those definitions here. to ADRs for decision rationale.
## Architectural Approach ## Architectural Approach
@@ -40,23 +37,16 @@ integrations and APIs within internal adapters. Keep domain and application
logic independent of external integration details, and make dependency direction logic independent of external integration details, and make dependency direction
clear in the adopted policy. clear in the adopted policy.
Implement that separation with proportionate, idiomatic code. The preference Implement that separation with proportionate, idiomatic code. Choose interfaces
does not by itself require an interface for every type, a fixed directory tree, and package layout to serve the application's actual boundaries. Use adapters
or adapters for collaborators that have no external integration responsibility. for collaborators with external integration responsibilities.
## Adopted Constraints And Implemented Structure ## Adopted Constraints And Implemented Structure
An adopted architectural constraint governs development. It is not evidence Architectural constraints govern current and future development. Record
that every component or capability to which it could apply already exists. implemented structure accurately, proposals and implementation status in the
For example, a rule that external integrations belong behind adapters can roadmap, and significant decisions and rationale in ADRs. Describe a target
apply to future integrations without implying that those integrations are structure as implemented when its changes land.
implemented or planned.
Describe implemented structure accurately. Keep proposals and implementation
status in the roadmap, and significant decisions and their rationale in ADRs.
When an accepted decision requires changing existing structure, identify that
transition through those documents; do not describe the target structure as
already implemented or treat acceptance as proof of compliance.
Constraints must reflect deliberately selected requirements and decisions. Constraints must reflect deliberately selected requirements and decisions.
Do not promote incidental implementation choices into architectural invariants. Do not promote incidental implementation choices into architectural invariants.
@@ -81,12 +71,11 @@ application's adopted requirements, along with scenarios it explicitly excludes.
For example, distinguish handling untrusted application input from defending For example, distinguish handling untrusted application input from defending
against a privileged actor concurrently modifying the host filesystem. against a privileged actor concurrently modifying the host filesystem.
These statements should explain the scope of the adopted architectural constraints. Excluding a scenario is not a claim that it cannot occur. Do not Threat exclusions define the scope of the adopted requirements. Base defenses
infer additional defenses or guarantees merely because a hypothetical threat and guarantees on those requirements and raise unsettled scope for a deliberate
can be described. Unsettled scope decisions should be raised for a deliberate
decision under the [agent policy](agents.md). decision under the [agent policy](agents.md).
Keep this discussion proportionate. A separate threat assessment or security Keep this discussion proportionate to the application. A separate threat
document is not required merely to adopt this template. Configuration, assessment or security document is optional when adopting this template.
operations, and internal documents retain ownership of credential supply, Configuration, operations, and internal documents retain ownership of credential supply,
runtime handling, and implementation mechanisms under the documentation policy. runtime handling, and implementation mechanisms under the documentation policy.

View File

@@ -1,12 +1,12 @@
# Documentation Policy # Documentation Policy
**Base Policy Version:** 1.9 **Base Policy Version:** 1.11
**Last Updated**: 2026-09-27 **Last Updated**: 2026-09-27
## Base Policy Template ## Base Policy Template
This document is the base template for the canonical documentation policy. Repositories that implement this policy should: When adopting this policy:
1. Review the list of documents under the `Canonical Ownership` heading, remove any entries that do not currently apply and are not expected to apply to the current project, and add any additional entries that may be required by the current project; 1. Review the list of documents under the `Canonical Ownership` heading, remove any entries that do not currently apply and are not expected to apply to the current project, and add any additional entries that may be required by the current project;
2. Create documents for applicable responsibilities when substantive content is available; 2. Create documents for applicable responsibilities when substantive content is available;
@@ -25,7 +25,7 @@ to drift for users, operators, developers, integrators, and LLM coding agents.
Each authoritative fact belongs in one document. A non-owning document may give Each authoritative fact belongs in one document. A non-owning document may give
a short, stable summary for orientation, but it must link to the canonical owner a short, stable summary for orientation, but it must link to the canonical owner
instead of repeating volatile details. for volatile details.
Volatile details include commands, flags, configuration fields and defaults, Volatile details include commands, flags, configuration fields and defaults,
module keys, schemas, file names, paths, status codes, retry behavior, and module keys, schemas, file names, paths, status codes, retry behavior, and
@@ -37,27 +37,26 @@ contract, maintain it only in the owning document.
Outside `docs/roadmap/`, documentation describes implemented behavior only. Outside `docs/roadmap/`, documentation describes implemented behavior only.
Partial features may be described only to their implemented boundary. Partial features may be described only to their implemented boundary.
Architectural constraints may govern future changes without implying that the Architectural constraints may govern future changes. Describe current structure
components or capabilities they would govern already exist. This does not permit from implemented behavior.
describing a proposed system structure as implemented.
ADRs may record an accepted architectural decision before implementation, but ADRs may record an accepted architectural decision before implementation. The
acceptance must not be presented as proof that the behavior exists. The roadmap owns implementation status and sequencing roadmap owns implementation status and sequencing until the decision is
until the decision is implemented. Current architecture, user, operator, implemented. Current architecture, user, operator, integration, and internal
integration, and internal documentation are updated when the behavior lands. documentation are updated when the behavior lands.
### Audience And Detail ### Audience And Detail
Write for the document's stated audience and include only the detail needed for Write for the document's stated audience and include only the detail needed for
its owned topic. User and operator docs should not expose implementation detail. its owned topic. Keep user and operator docs focused on using and operating the
Developer docs should link to user-facing and external contracts rather than application. Developer docs should link to user-facing and external contracts
restate them. for their definitions.
### Examples ### Examples
Complete copyable files belong in `examples/`. Documentation may use the Complete copyable files belong in `examples/`. Documentation may use the
smallest illustrative snippet needed to explain its owned topic, but should link smallest illustrative snippet needed to explain its owned topic, but should link
to maintained examples instead of embedding a second complete copy. to maintained examples for complete copyable files.
Examples must be valid, secret-free, and tested where practical. Commands and Examples must be valid, secret-free, and tested where practical. Commands and
configuration used in documentation should match the application. configuration used in documentation should match the application.
@@ -73,45 +72,42 @@ secret values.
| Topic | Canonical owner | Owned content | Content owned elsewhere | | Topic | Canonical owner | Owned content | Content owned elsewhere |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| Product orientation and minimal end-to-end quickstart | `README.md` | What this application is, why it is useful, one shortest successful invocation, and links onward, including license and attribution navigation. | Complete command reference, configuration reference, operational procedures, implementation detail. | | Product orientation and minimal end-to-end quickstart | `README.md` | Purpose, value, shortest successful invocation, and navigation, including licensing and attribution. | Complete command reference, configuration reference, operational procedures, implementation detail. |
| Contributor entry point | `docs/development.md` | Task-oriented reading guide, minimal contributor orientation, baseline validation commands, and links to canonical docs. | Package inventory, architecture rules, subsystem behavior, detailed change recipes. | | Contributor entry point | `docs/development.md` | Task-oriented reading guide, contributor orientation, baseline validation commands, and canonical links. | Package inventory, architecture rules, subsystem behavior, detailed change recipes. |
| Application architecture policy | `docs/policy/architecture.md` | System shape, normative ownership, dependency direction, architectural boundaries, invariants, safety properties, and non-goals. | Concrete package inventory, implementation mechanics, contributor procedures, decision history, future work. | | Application architecture policy | `docs/policy/architecture.md` | System shape, normative ownership, dependency direction, boundaries, invariants, safety properties, and non-goals. | Concrete package inventory, implementation mechanics, contributor procedures, decision history, future work. |
| Policy-set provenance and upstream navigation | `docs/policy/meta.md` | Origin of the adopted policy set, local authority, meaning of adoption baselines, and links to upstream adoption and update guidance. | Task-specific reading triggers, detailed adoption procedures, and formal attribution notices. | | Policy-set provenance and upstream navigation | `docs/policy/meta.md` | Policy-set origin, local authority, adoption baselines, and upstream adoption and update links. | Task-specific reading triggers, detailed adoption procedures, and formal attribution notices. |
| Agent policy | `docs/policy/agents.md` | Implementation discipline for coding agents, including proportionality, idiomatic simplicity, and rules against inventing requirements, restrictions, guarantees, or repository policy. | Application contracts, architecture, testing policy, and contributor procedures. | | Agent policy | `docs/policy/agents.md` | Proportionate, idiomatic implementation; rules against inventing requirements, restrictions, guarantees, or policy. | Application contracts, architecture, testing policy, and contributor procedures. |
| Documentation policy | `docs/policy/documentation.md` | Documentation ownership, audience boundaries, maintenance rules, and ADR/document lifecycle. | Application architecture or product behavior. | | Documentation policy | `docs/policy/documentation.md` | Documentation ownership, audience boundaries, maintenance rules, and ADR/document lifecycle. | Application architecture or product behavior. |
| Testing policy | `docs/policy/testing.md` | Test philosophy, risk-based sufficiency, test boundaries, doubles, coverage guidance, regression-test policy, and criteria for adding, rewriting, or deleting tests. | Subsystem behavior, application contracts, subsystem-specific test inventories, and implementation plans. | | Testing policy | `docs/policy/testing.md` | Test philosophy, risk sufficiency, boundaries, doubles, coverage, regressions, and test maintenance. | Subsystem behavior, application contracts, subsystem-specific test inventories, and implementation plans. |
| Release policy | `docs/policy/release.md` | Versioning and compatibility rules, release integrity and immutability requirements, release-documentation policy, proportionate gate selection, publication controls, release completion, and the boundary between required checks and optional verification. | Repository-specific commands, product installation guidance, CLI version semantics, historical release summaries, and CI implementation detail. | | Release policy | `docs/policy/release.md` | Versioning, compatibility, release integrity and immutability, release documentation, proportionate gates, publication controls, completion, and required versus optional checks. | Repository-specific commands, product installation guidance, CLI version semantics, historical release summaries, and CI implementation detail. |
| Open source licensing and attribution policy | `docs/policy/oss.md` | Project licensing defaults and author choices, COPYRIGHT conventions, upstream attribution format, license-text and notice-link conventions, discoverability, maintenance, and handling of concrete exceptions. | Component entries, license texts, release commands, and dependency security review. | | Open source licensing and attribution policy | `docs/policy/oss.md` | License defaults and author choices, COPYRIGHT and attribution formats, license/notice links, discoverability, maintenance, and concrete exceptions. | Component entries, license texts, release commands, and dependency security review. |
| Project copyright and license grant | `COPYRIGHT` | Project identity, copyright holders and years, SPDX expression, license grant, warranty disclaimer, and statement about third-party material. | Complete license texts and upstream component attribution. | | Project copyright and license grant | `COPYRIGHT` | Project identity, copyright holders and years, SPDX expression, grant, warranty disclaimer, and third-party statement. | Complete license texts and upstream component attribution. |
| Project license texts | `LICENSE` | Complete project license text and incorporated companion text, with project-specific fields where required by the selected license. | General licensing policy and upstream component attribution. | | Project license texts | `LICENSE` | Complete project and incorporated companion license texts, with required project-specific fields. | General licensing policy and upstream component attribution. |
| Upstream component attribution | `docs/oss/attribution.md` | Factual identification of incorporated code, documentation, and assets, including material scope and modification status where applicable, copyright statements, license identification, required upstream notices, and license, notice, and source links in the House Format. | General attribution policy, exception reasoning, research narratives, compliance commentary, and complete standard license texts. | | Upstream component attribution | `docs/oss/attribution.md` | House Format component entries: identity, material scope and modifications where applicable, copyright, license, required notices, and license, notice, and source links. | General attribution policy, exception reasoning, research narratives, compliance commentary, and complete standard license texts. |
| Standard dependency license texts | `docs/oss/licenses/` | Complete, verbatim standard license texts shared by attribution entries where applicable. | Project-specific upstream notices, attribution prose, and policy interpretation. | | Standard dependency license texts | `docs/oss/licenses/` | Complete, verbatim standard license texts shared by applicable entries. | Project-specific upstream notices, attribution prose, and policy interpretation. |
| Repository-specific release procedure | `docs/release.md` | Maintainer prerequisites, candidate preparation, concrete validation and publication commands, automated publication guards, asynchronous deliverable publication, separate delivery status, optional consumer-facing verification, and failure recovery. | General release requirements, product installation guidance, historical release summaries, and current compatibility contracts. | | Repository-specific release procedure | `docs/release.md` | Maintainer prerequisites, candidate preparation, validation and publication commands and automated guards, asynchronous deliverables, delivery status, optional consumer verification, and recovery. | General release requirements, product installation guidance, historical release summaries, and current compatibility contracts. |
| CLI contract (if applicable) | `docs/cli.md` | Commands, arguments, flags, invocation semantics, and exit codes. | End-to-end operating procedures, configuration field definitions, runtime filesystem layout, module implementation details. | | CLI contract (if applicable) | `docs/cli.md` | Commands, arguments, flags, invocation semantics, and exit codes. | End-to-end operating procedures, configuration field definitions, runtime filesystem layout, module implementation details. |
| Configuration contract (if applicable) | `docs/config.md` | Discovery and precedence, file schema, fields, defaults, environment overrides, validation rules, and user-selectable module or validator keys. | Complete example files, CLI syntax, runtime state lifecycle, module implementation details. | | Configuration contract (if applicable) | `docs/config.md` | Discovery, precedence, schema, fields, defaults, environment overrides, validation, and selectable module and validator keys. | Complete example files, CLI syntax, runtime state lifecycle, module implementation details. |
| Operations (if applicable) | `docs/operations.md` | Runtime workflows, physical filesystem and state layout, output, cache, and debug handling, resume, cleanup, permissions, recovery, and operational limits. | CLI flag syntax, configuration field definitions, logical output schemas, implementation mechanics. | | Operations (if applicable) | `docs/operations.md` | Runtime workflows, physical filesystem and state layout, output, cache and debug handling, resume, cleanup, permissions, recovery, and limits. | CLI flag syntax, configuration field definitions, logical output schemas, implementation mechanics. |
| Public HTTP contract (if applicable) | `docs/api.md` | Routes, authentication, media types, request and response schemas, status codes, pagination, caching, idempotency, rate limits, and HTTP retry semantics. | Client walkthroughs, upstream or downstream integration internals, implementation detail. | | Public HTTP contract (if applicable) | `docs/api.md` | Routes, authentication, media types, request and response schemas, status codes, pagination, caching, idempotency, rate limits, and HTTP retry semantics. | Client walkthroughs, upstream or downstream integration internals, implementation detail. |
| Consumer guidance for the public Go API (if applicable) | `docs/consumers/` | Task-oriented use of the public interface, minimal client examples, and consumer responsibilities. | HTTP wire semantics, external protocol contracts, internal implementation detail. | | Consumer guidance for the public Go API (if applicable) | `docs/consumers/` | Task-oriented public Go API usage, minimal examples, and consumer responsibilities. | HTTP wire semantics, external protocol contracts, internal implementation detail. |
| Integration contracts for external components (if applicable) | `docs/integrations/` | External file formats and protocols, upstream and downstream contracts, logical output bundle paths and schemas, media types, and compatibility behavior. | Physical runtime placement and lifecycle, internal transformations, CLI syntax, configuration defaults. | | Integration contracts for external components (if applicable) | `docs/integrations/` | External formats and protocols, upstream and downstream contracts, logical output paths and schemas, media types, and compatibility. | Physical runtime placement and lifecycle, internal transformations, CLI syntax, configuration defaults. |
| Inventory of implemented internal packages | `docs/internal/overview.md` | Current packages and components, their implemented responsibilities, and links to focused internal docs. | Normative architecture, contributor reading policy, external contracts. | | Inventory of implemented internal packages | `docs/internal/overview.md` | Implemented packages and components, responsibilities, and links to focused internal docs. | Normative architecture, contributor reading policy, external contracts. |
| Behavior and architecture of internal packages | Other files under `docs/internal/` | Implementation flow, internal collaborators and state transitions, package-local guarantees and failures, and relevant tests. | Global architecture invariants, configuration definitions and defaults, external schemas, operator procedures. | | Behavior and architecture of internal packages | Other files under `docs/internal/` | Implementation flow, collaborators, state transitions, package-local guarantees and failures, and relevant tests. | Global architecture invariants, configuration definitions and defaults, external schemas, operator procedures. |
| Architectural decision records | `docs/adr/` | Significant decisions, context, alternatives, rationale, consequences, and supersession history. | Current behavior reference, implementation status, task sequencing. | | Architectural decision records | `docs/adr/` | Significant decisions, context, alternatives, rationale, consequences, and supersession history. | Current behavior reference, implementation status, task sequencing. |
| Future work and implementation status | `docs/roadmap/` | Proposed, accepted, deferred, or rejected work; implementation status; sequencing; and task breakdowns. | Implemented behavior reference and architectural decision rationale. | | Future work and implementation status | `docs/roadmap/` | Proposed, accepted, deferred, or rejected work; implementation status, sequencing, and task breakdowns. | Implemented behavior reference and architectural decision rationale. |
| Release-note history | `docs/releases/` | One checked-in historical summary for each source release made under the procedure. The note at the immutable tag is that release's record. | Current commands, behavior, contracts, and compatibility definitions. | | Release-note history | `docs/releases/` | One checked-in summary per source release under the procedure; the note at its immutable tag is the release record. | Current commands, behavior, contracts, and compatibility definitions. |
| Complete copyable artifacts | `examples/` | Maintained configuration, inputs, and other files intended to be copied or run. | Field-by-field reference, command reference, prose explanation. | | Complete copyable artifacts | `examples/` | Maintained configuration, inputs, and other copyable or runnable files. | Field-by-field reference, command reference, prose explanation. |
Documents that do not exist are required only when the corresponding interface Create supporting documents for existing interfaces and responsibilities when
or responsibility exists. Do not create placeholder API, consumer, integration, substantive content is available.
or operations documents for behavior the application does not have.
## Boundary Rules ## Boundary Rules
### Orientation ### Orientation
The README owns product orientation. The developer guide routes contributors. Link among orientation, architecture, and internal documents; maintain each
Architecture owns normative structure. Internal overview owns the current package or behavior description in its canonical owner.
concrete component map. These documents may link to one another but should not
maintain parallel package or behavior descriptions.
### Commands, Configuration, And Operations ### Commands, Configuration, And Operations
@@ -125,20 +121,16 @@ other contracts.
The release policy defines requirements and invariants that every release must The release policy defines requirements and invariants that every release must
satisfy. The repository-specific release procedure defines the commands and satisfy. The repository-specific release procedure defines the commands and
workflow maintainers use to satisfy that policy. Release notes are immutable workflow maintainers use to satisfy that policy. Release notes record history
historical summaries, not current-state contract owners: the checked-in note at at immutable tags. Maintain current behavior in its canonical documentation,
an immutable tag records that release, while current canonical documentation update it with the corresponding behavior changes, and keep release procedures
must change with the behavior it describes. Do not use a release procedure or consistent with adopted policy.
release note to weaken policy, redefine current behavior, or defer required
documentation updates.
### Project Licensing And Upstream Attribution ### Project Licensing And Upstream Attribution
The [OSS policy](oss.md) defines project licensing conventions, the upstream README and release documents link to the canonical licensing and attribution
House Format, and README and release-link conventions. `COPYRIGHT` states the materials under the [OSS policy](oss.md). The release procedure owns URL
project grant; `LICENSE` supplies its complete license texts. Attribution entries construction and publication mechanics.
own component-specific information. README and release documents provide navigation to those canonical materials; the
release procedure owns URL construction and publication mechanics.
### Contracts And Implementation ### Contracts And Implementation

View File

@@ -1,6 +1,6 @@
# Open Source Licensing And Attribution Policy # Open Source Licensing And Attribution Policy
**Base Policy Version:** 1.6 **Base Policy Version:** 1.8
**Last Updated**: 2026-09-27 **Last Updated**: 2026-09-27
@@ -21,9 +21,8 @@ Repositories adopting this policy should:
Selected standard license texts are available in this template repository's Selected standard license texts are available in this template repository's
[reference collection](https://gitea.maximumdirect.net/eric/policy/src/commit/a469273adda336625f96b9d769ea27b33999f146/docs/oss/licenses/README.md). Copy the applicable texts, [reference collection](https://gitea.maximumdirect.net/eric/policy/src/commit/a469273adda336625f96b9d769ea27b33999f146/docs/oss/licenses/README.md). Copy the applicable texts,
including companion licenses, into the adopting repository. The collection is a including companion licenses, into the adopting repository. Maintain the
convenience, not an exhaustive catalog or a required bundle; maintain the project's project's own attribution entries and upstream notice links under this policy.
own attribution entries and upstream notice links under this policy.
## Purpose And Scope ## Purpose And Scope
@@ -32,8 +31,7 @@ for upstream attribution and license notices. It covers the project's own code
and upstream components incorporated into or distributed with the application and upstream components incorporated into or distributed with the application
or library, including relevant transitive dependencies and copied code, or library, including relevant transitive dependencies and copied code,
documentation, or assets. documentation, or assets.
Treatment follows the component's terms and actual use, rather than its Determine treatment from the component's terms and actual use.
classification as a direct dependency.
Consulting development guidance or using tooling alone does not require an Consulting development guidance or using tooling alone does not require an
attribution entry. Copying or adapting documentation for inclusion in the attribution entry. Copying or adapting documentation for inclusion in the
@@ -50,13 +48,12 @@ compatibility, or resolve every obligation arising from use or distribution.
The [documentation policy](documentation.md) assigns ownership: The [documentation policy](documentation.md) assigns ownership:
- `COPYRIGHT` contains the project name, copyright statements, SPDX expression, - `COPYRIGHT`: project name, copyright statements, SPDX expression, grant,
license grant, warranty disclaimer, and statement about third-party material. warranty disclaimer, and third-party statement.
- `LICENSE` contains the complete, unmodified project license text, including - `LICENSE` contains the complete, unmodified project license text, including
incorporated companion text. Dependency attribution does not relicense the project. incorporated companion text. Dependency attribution does not relicense the project.
- `docs/oss/attribution.md` contains the canonical component entries. - `docs/oss/attribution.md`: canonical component entries.
- `docs/oss/licenses/` contains complete, verbatim standard license texts, - `docs/oss/licenses/`: complete, verbatim standard and applicable companion texts.
including companion texts where applicable.
Use recognizable license filenames, such as `Apache-2.0.txt` or `LGPL-3.0.txt`. Use recognizable license filenames, such as `Apache-2.0.txt` or `LGPL-3.0.txt`.
A shared standard text may serve multiple entries. Keep explanations outside A shared standard text may serve multiple entries. Keep explanations outside
@@ -64,12 +61,9 @@ license texts and preserve distinct versions and exceptions.
## Upstream Reference Examples ## Upstream Reference Examples
The linked examples are reference material hosted in the public policy Use the commit-pinned upstream examples to create actual project notices.
repository at a fixed commit. Retain these upstream links when adopting this Retain their links and keep the example collection upstream; keep applicable
policy; do not copy the example collection into the application's or library's license texts locally as specified above.
`examples/` directory. Create the project's actual `COPYRIGHT` and attribution
files using the examples. Applicable license texts still belong locally in
`LICENSE` and `docs/oss/licenses/` as specified here.
## Project Licensing ## Project Licensing
@@ -88,10 +82,9 @@ individual packages.
Use the upstream [application COPYRIGHT example](https://gitea.maximumdirect.net/eric/policy/src/commit/a469273adda336625f96b9d769ea27b33999f146/examples/licensing/application/COPYRIGHT) Use the upstream [application COPYRIGHT example](https://gitea.maximumdirect.net/eric/policy/src/commit/a469273adda336625f96b9d769ea27b33999f146/examples/licensing/application/COPYRIGHT)
or [library COPYRIGHT example](https://gitea.maximumdirect.net/eric/policy/src/commit/a469273adda336625f96b9d769ea27b33999f146/examples/licensing/library/COPYRIGHT) or [library COPYRIGHT example](https://gitea.maximumdirect.net/eric/policy/src/commit/a469273adda336625f96b9d769ea27b33999f146/examples/licensing/library/COPYRIGHT)
to create the project’s root `COPYRIGHT` file. to create the project’s root `COPYRIGHT` file.
Replace the project name, years, and holders with accurate information; do not Use verified project names, contribution years, and copyright holders.
assume the maintainer owns every contribution or advance years automatically.
For another selected license, adapt the grant, SPDX expression, disclaimer, and For another selected license, adapt the grant, SPDX expression, disclaimer, and
text references together. The examples do not constrain the author's choice. text references together to reflect the author's selected grant.
For GPLv3 projects, copy the complete GPLv3 text into `LICENSE`. For LGPLv3 For GPLv3 projects, copy the complete GPLv3 text into `LICENSE`. For LGPLv3
projects, place the complete LGPLv3 text followed by the complete GPLv3 text in projects, place the complete LGPLv3 text followed by the complete GPLv3 text in
@@ -113,8 +106,7 @@ code license does not override the terms of incorporated documentation.
## Upstream Attribution House Format ## Upstream Attribution House Format
Begin `docs/oss/attribution.md` with `# Open Source Attribution Notices`, Begin `docs/oss/attribution.md` with `# Open Source Attribution Notices`,
followed directly by component entries. Do not add an introductory summary, followed directly by component entries. These comprise the complete document.
policy links, audit narrative, disclaimer, or concluding explanation.
Each entry presents these five fields in order, with blank lines between them: Each entry presents these five fields in order, with blank lines between them:
@@ -123,24 +115,22 @@ Each entry presents these five fields in order, with blank lines between them:
version in backticks. For copied documentation, a concise `Material:` sentence version in backticks. For copied documentation, a concise `Material:` sentence
may identify the affected files and whether they were adapted or copied may identify the affected files and whether they were adapted or copied
without modification. A factual qualifier such as `(transitive dependency)` without modification. A factual qualifier such as `(transitive dependency)`
is permitted; do not describe dependency-discovery methods. is permitted. Limit optional identification prose to factual component and
material scope.
2. **Upstream copyright statement or statements**, preserving their wording. 2. **Upstream copyright statement or statements**, preserving their wording.
Put multiple statements in separate paragraphs. If the selected upstream Put multiple statements in separate paragraphs. Include this field when the
source supplies no applicable statement, omit this field without inventing selected upstream source supplies an applicable statement; otherwise, omit it.
one or adding an explanation of its absence.
3. **SPDX license identifier or expression**, when applicable, using 3. **SPDX license identifier or expression**, when applicable, using
`SPDX-License-Identifier: EXPRESSION`. `SPDX-License-Identifier: EXPRESSION`.
4. **License and notice links**, beginning `License and notices:`, separated 4. **License and notice links**, beginning `License and notices:`, separated
by ` | `, and ending with a period. Label local standard texts by license by ` | `, and ending with a period. Label local standard texts by license
name, such as `MIT` or `Apache 2.0`. Label upstream files by their actual name, such as `MIT` or `Apache 2.0`. Label upstream files by their actual
filenames, such as `COPYRIGHT`, `LICENSE`, `NOTICE`, or `PATENTS`. filenames, such as `COPYRIGHT`, `LICENSE`, `NOTICE`, or `PATENTS`.
5. **Source repository link**, using `[Source](COMMIT_URL).` with no `Source:` 5. **Source repository link**, rendered exactly as `[Source](COMMIT_URL).`.
prefix or additional description.
Use the upstream [attribution example](https://gitea.maximumdirect.net/eric/policy/src/commit/a469273adda336625f96b9d769ea27b33999f146/examples/licensing/attribution.md) Use the upstream [attribution example](https://gitea.maximumdirect.net/eric/policy/src/commit/a469273adda336625f96b9d769ea27b33999f146/examples/licensing/attribution.md)
to create the project’s `docs/oss/attribution.md`. to create the project’s `docs/oss/attribution.md`.
Its three illustrative entries demonstrate a normal entry, omission of an The example illustrates omitted fields and multiple copyrights and licenses.
unavailable copyright statement, and multiple copyrights and license texts.
Replace the uppercase placeholders and illustrative URLs with actual component Replace the uppercase placeholders and illustrative URLs with actual component
information. Local license links are relative to the destination information. Local license links are relative to the destination
`docs/oss/attribution.md`; copy the applicable texts into its `licenses/` `docs/oss/attribution.md`; copy the applicable texts into its `licenses/`
@@ -164,16 +154,15 @@ appropriate decision record, not the attribution document.
## License Texts And Upstream Links ## License Texts And Upstream Links
Link standard license texts to their local copies. Link project-specific Link standard license texts to their local copies. Link project-specific
notices to the upstream copies instead of storing them locally. Every upstream notices to their upstream copies. Every upstream repository or notice link must
repository or notice link must identify the exact commit corresponding to the identify the exact commit corresponding to the
imported version, including the selected source revision for copied material. imported version, including the selected source revision for copied material.
Do not use moving branches or version tags as substitutes for that commit.
Classify material by its contents, not its filename. An upstream `LICENSE`, Classify material according to its contents. An upstream `LICENSE`,
`COPYING`, or similar file may contain project-specific notices or exceptions `COPYING`, or similar file may contain project-specific notices or exceptions
in addition to standard wording. Link both the local standard text and the in addition to standard wording. Link both the local standard text and the
commit-specific upstream file when needed. Make companion license texts directly commit-specific upstream file when needed. Make companion license texts directly
reachable from the entry rather than leaving readers to infer their location. reachable from the entry.
For project-specific license and attribution material, this policy accepts For project-specific license and attribution material, this policy accepts
direct links to the applicable upstream texts as satisfying reproduction, direct links to the applicable upstream texts as satisfying reproduction,

View File

@@ -1,18 +1,18 @@
# Release Policy # Release Policy
**Base Policy Version:** 1.2 **Base Policy Version:** 1.6
**Last Updated**: 2026-09-26 **Last Updated**: 2026-10-08
## Base Policy Template ## Base Policy Template
This document is the base template for the canonical release policy. When adopting this policy:
Repositories that implement this policy should:
1. Adapt its requirements to the application's release needs, keeping gates 1. Adapt its requirements to the application's release needs, keeping gates
minimal and proportionate; minimal and proportionate;
2. Define the repository-specific commands, authoritative remote, primary 2. Define the repository-specific commands, release toolchain, authoritative
branch, supported deliverables, and required build targets in `docs/release.md`; remote, primary branch, supported deliverables, and required build targets in
`docs/release.md`;
3. Add a gate only when it addresses a concrete risk that existing checks do 3. Add a gate only when it addresses a concrete risk that existing checks do
not adequately cover, and record that reason in the adopted policy; not adequately cover, and record that reason in the adopted policy;
4. Update the `Last Updated` field to the current date; and 4. Update the `Last Updated` field to the current date; and
@@ -30,6 +30,9 @@ This policy defines a proportionate workflow for validating and publishing an
intended source revision under a fresh version. Releases should require little intended source revision under a fresh version. Releases should require little
routine intervention, avoid repeated work, and preserve published contents. routine intervention, avoid repeated work, and preserve published contents.
Adopt stronger verification or reproducibility requirements through an explicit
project-specific decision justified by the intended audience and support needs.
The repository-specific commands belong in `docs/release.md`. Historical release The repository-specific commands belong in `docs/release.md`. Historical release
summaries belong in `docs/releases/`. The procedure must agree with the adopted summaries belong in `docs/releases/`. The procedure must agree with the adopted
policy and link to it rather than introduce additional release requirements. policy and link to it rather than introduce additional release requirements.
@@ -59,9 +62,8 @@ the tagged source. The procedure must identify those deliverables and the
responsibility of their automation. Published deliverables must be traceable responsibility of their automation. Published deliverables must be traceable
to that source and identify the same version. to that source and identify the same version.
Artifact delivery is a separate status. A successful tag push is not evidence Track source-release completion and artifact delivery separately. Report delivery
that artifacts are available. Delivery failures do not reverse source-release failures and optional investigations under artifact-delivery status.
success, and optional investigation must not delay release completion.
## Versioning And Compatibility ## Versioning And Compatibility
@@ -78,7 +80,8 @@ requires a deliberate update to the policy and procedure where needed.
For releases at or after `v1.0.0`: For releases at or after `v1.0.0`:
- a major release may make intentional incompatible changes; - a major release may make intentional incompatible changes;
- a minor release may add backward-compatible behavior; and - a minor release may add backward-compatible behavior or raise the Go consumer
minimum as described below; and
- a patch release may make backward-compatible fixes. - a patch release may make backward-compatible fixes.
Before `v1.0.0`, a minor release may change a documented public, operational, Before `v1.0.0`, a minor release may change a documented public, operational,
@@ -90,6 +93,36 @@ Additional compatibility promises and deliberate exceptions belong in the
adopted policy or canonical contract documentation. Release notes explain adopted policy or canonical contract documentation. Release notes explain
changes; they do not redefine current compatibility contracts. changes; they do not redefine current compatibility contracts.
## Consumer Minimum And Release Toolchain
Distinguish the minimum toolchain supported for consumers from the toolchain
maintainers use to build and validate a release. Record the consumer minimum in
the language's standard metadata and explain its support meaning in canonical
documentation. Define the selected release toolchain and its setup commands in
`docs/release.md`. Toolchain selection and upgrade cadence are repository-specific
choices.
For Go repositories, normally declare the initial stable release of the selected
series as the consumer minimum, such as `go 1.26.0`. Use a higher patch minimum
when a dependency or an identified correctness fix requires it, and document
the reason.
For release-policy purposes, successful build and release validation on the
selected Go patch release are sufficient to presume support across that Go
series, subject to the declared consumer minimum and concrete evidence of
incompatibility. Investigate specific compatibility concerns as they arise.
Use the selected release toolchain for candidate validation and release builds,
including CI jobs performing those tasks. A newer validation patch version alone
leaves the consumer minimum unchanged.
A minor release may raise the Go consumer minimum, including from one Go series
to the next, both before and after `v1.0.0`. This is an explicit exception to the
backward-compatibility requirement for minor releases. Patch releases preserve
the consumer minimum. Explain an increase's impact and required consumer action
in the release note. Other incompatible changes remain subject to the versioning
rules above.
## Release Documentation And Preparation ## Release Documentation And Preparation
Every new release must include `docs/releases/<version>.md` in the tagged Every new release must include `docs/releases/<version>.md` in the tagged
@@ -97,15 +130,13 @@ source tree. Use the complete version tag as the filename and begin with a
title containing the product name and that exact version. title containing the product name and that exact version.
Include a short summary and any relevant compatibility impact or upgrade Include a short summary and any relevant compatibility impact or upgrade
instructions. Keep the note proportionate to the change. Fixed sections and instructions. Choose sections suited to the release and keep the note
explicit no-action boilerplate are not required. Existing historical notes proportionate to the change.
need not be rewritten to adopt this format.
Keep exact current contracts in their canonical documents and update affected Keep exact current contracts in their canonical documents and update affected
documentation with the behavior change. Link to those documents from the note documentation with the behavior change. Link to those documents from the note
where useful. A release note must not substitute for current documentation. where useful. If annotated tags are used, derive their summary from the
If annotated tags are used, derive their summary from the checked-in note checked-in note.
rather than requiring a separately authored account of the same release.
Include the release footer defined by the [OSS policy](oss.md#discoverability) Include the release footer defined by the [OSS policy](oss.md#discoverability)
in each new release document and preserve it on the hosted download page. The in each new release document and preserve it on the hosted download page. The
@@ -113,12 +144,11 @@ release procedure defines the concrete URLs and publication mechanics. Prepare
these links with the release note; they do not add a network check or approval these links with the release note; they do not add a network check or approval
gate. gate.
Version selection, release-note content, and retirement of completed roadmaps Handle version selection, release-note content, and retirement of completed
are preparation responsibilities, not separate human approval gates. Preserve roadmaps during preparation. Preserve planned and deferred work and repair
planned and deferred work and repair affected links when retiring roadmaps. affected links when retiring roadmaps. Reuse ordinary change review for
Ordinary change review covers unintended files, credentials, and private data; unintended files, credentials, and private data. Scope release-content review
do not repeat it as a release-specific sign-off. Ignored local files are not to the tagged source.
prohibited merely because they exist: they are not included in the tagged source.
## Candidate Validation ## Candidate Validation
@@ -208,7 +238,8 @@ release without replacing its contents or reusing its version.
Maintain `docs/release.md` as a short, executable maintainer runbook. It must Maintain `docs/release.md` as a short, executable maintainer runbook. It must
identify: identify:
1. prerequisites, primary branch, and authoritative remote; 1. prerequisites, selected release toolchain, primary branch, and authoritative
remote;
2. version and release-note preparation; 2. version and release-note preparation;
3. one publication command with its selected local checks and automated guards; 3. one publication command with its selected local checks and automated guards;
4. declared deliverables, required build targets, and automation responsibilities; 4. declared deliverables, required build targets, and automation responsibilities;

View File

@@ -1,24 +1,24 @@
# Testing Policy # Testing Policy
**Base Policy Version:** 1.1 **Base Policy Version:** 1.3
**Last Updated**: 2026-09-25 **Last Updated**: 2026-09-27
## Base Policy Template ## Base Policy Template
This document is the base template for the canonical testing policy. Repositories that implement this policy should: When adopting this policy:
1. Review the policy, remove any rules that must not apply to the current project, and add any additional rules that are required by the current project; 1. Retain applicable rules and add project-specific requirements;
2. Update the `Last Updated` field to the current date; and 2. Update the `Last Updated` field to the current date; and
3. Remove this heading (`Base Policy Template`) and the associated text. 3. Remove this heading (`Base Policy Template`) and the associated text.
Most projects will not require any revisions to the substantive testing policy rules as written below. Most projects can adopt the substantive rules as written.
## Purpose ## Purpose
Our tests exist to make **incorrect changes expensive and correct changes cheap**. Our tests exist to make **incorrect changes expensive and correct changes cheap**.
We do not optimize for test count, line coverage, exhaustive isolation, or the fewest possible tests. We optimize for sufficient confidence in important behavior while imposing as little unnecessary friction as possible on future development. We optimize for sufficient confidence in important behavior while minimizing friction on future development.
## Every test has a cost ## Every test has a cost
@@ -32,9 +32,9 @@ Evaluate that tradeoff at two levels:
1. **Per test:** What realistic defect does this test detect, how consequential would that defect be, and is that protection worth the test's lifetime cost? 1. **Per test:** What realistic defect does this test detect, how consequential would that defect be, and is that protection worth the test's lifetime cost?
2. **Across the suite:** Does this collection provide materially more confidence than a smaller, simpler suite would? 2. **Across the suite:** Does this collection provide materially more confidence than a smaller, simpler suite would?
Some friction is intentional. Tests should make dangerous changes—such as breaking compatibility, corrupting data, violating security boundaries, or reintroducing subtle bugs—require deliberate review. They should not make ordinary internal changes needlessly expensive. Some friction is intentional. Tests should make dangerous changes—such as breaking compatibility, corrupting data, violating security boundaries, or reintroducing subtle bugs—require deliberate review. Keep ordinary internal changes inexpensive.
The cost of a test is not a reason to omit testing by default. Do not cite maintenance cost abstractly. When omitting a plausible test, be able to state why the protected failure is low-risk, already covered, obvious, reversible, or cheaper to detect elsewhere. For consequential, subtle, or difficult-to-observe behavior, the presumption should favor testing. Evaluate maintenance cost against the specific failure being protected. When omitting a plausible test, be able to state why the protected failure is low-risk, already covered, obvious, reversible, or cheaper to detect elsewhere. For consequential, subtle, or difficult-to-observe behavior, the presumption should favor testing.
## Default testing style ## Default testing style
@@ -66,7 +66,7 @@ To the extent the following features are present in the application, prioritize
6. Previously observed or plausible regressions. 6. Previously observed or plausible regressions.
7. Representative integration and end-to-end workflows. 7. Representative integration and end-to-end workflows.
A package-level contract is behavior relied upon by another package or major collaborator, not every observable detail of a package implementation. A package-level contract comprises behavior relied upon by another package or major collaborator.
Choose tests for requested behavior and established contracts. Tests must not Choose tests for requested behavior and established contracts. Tests must not
introduce new restrictions, guarantees, or threat scenarios merely because they introduce new restrictions, guarantees, or threat scenarios merely because they
@@ -85,7 +85,8 @@ Do not add tests merely because a function, branch, or line exists. Do not add a
## Choose the right test boundary ## Choose the right test boundary
Test through the narrowest stable boundary that expresses the behavior clearly. Choose the narrowest stable boundary that expresses the behavior clearly and
provides durable confidence with minimal incidental coupling.
This is often the package API, but it may instead be: This is often the package API, but it may instead be:
@@ -93,22 +94,15 @@ This is often the package API, but it may instead be:
- a package-level operation when several internal collaborators jointly produce the behavior; or - a package-level operation when several internal collaborators jointly produce the behavior; or
- a larger integration boundary when correctness emerges from interaction with a real dependency. - a larger integration boundary when correctness emerges from interaction with a real dependency.
Do not force all behavior through oversized end-to-end tests. Do not test every private helper merely because it exists. Choose the boundary that gives durable confidence with the least incidental coupling.
## Test behavior, not implementation ## Test behavior, not implementation
A test should protect a decision, contract, or invariant. A test must not memorialize the current implementation. A test should protect a selected decision, contract, or invariant.
A test is suspect when its main purpose is to detect that someone: A test is suspect when it primarily detects changes to private constants or
helpers, equivalent operation ordering, incidental formatting, equivalent
algorithms, or internal structure that preserves behavior.
- changed an internal constant; Behavioral tests should normally remain stable through internal refactoring that preserves the contract.
- renamed or split a private helper;
- reordered equivalent internal operations;
- changed incidental formatting;
- replaced one correct algorithm with another; or
- refactored internal object structure without changing behavior.
Refactoring should normally require no test edits unless the refactored structure is itself part of the contract.
## Expected effects of different changes ## Expected effects of different changes
@@ -125,7 +119,7 @@ A test failing is not the same as a test needing to be edited. Many tests may co
## Separate mechanism from policy ## Separate mechanism from policy
Configurable thresholds and defaults must not be duplicated throughout the test suite. Derive expectations from test-controlled configuration and relationships.
For this example, assume the selected contract rejects a request to start more For this example, assume the selected contract rejects a request to start more
processes than a configured limit. Do not encode its production default indirectly: processes than a configured limit. Do not encode its production default indirectly:
@@ -161,18 +155,18 @@ limit solely to reproduce this example.
The production default should be tested exactly only when its literal value is itself a public, operational, safety, protocol, or compatibility requirement. The production default should be tested exactly only when its literal value is itself a public, operational, safety, protocol, or compatibility requirement.
Apply the same rule to limits, timeouts, capacities, retry counts, and ranges: test relationships and behavior, not duplicated literals. Apply the same rule to limits, timeouts, capacities, retry counts, and ranges: test relationships and behavior.
For established concurrency limits, distinguish these behaviors where the contract requires them: For established concurrency limits, distinguish these behaviors where the contract requires them:
1. **Configuration handling:** values are accepted or rejected according to the selected contract. 1. **Configuration handling:** values are accepted or rejected according to the selected contract.
2. **Runtime enforcement:** observed peak concurrency never exceeds the configured limit. 2. **Runtime enforcement:** observed peak concurrency never exceeds the configured limit.
Use a test-controlled limit and measure the behavior relative to that limit. Do not merely assert today's default value. Use a test-controlled limit and measure the behavior relative to that limit.
## Avoid semantic duplication across layers ## Assign each behavior a test owner
Each behavior should have a clear test owner. Where these layers exist: Where these layers exist, assign ownership as follows:
- Parser tests own parsing cases. - Parser tests own parsing cases.
- Validator tests own validation rules. - Validator tests own validation rules.
@@ -182,7 +176,7 @@ Each behavior should have a clear test owner. Where these layers exist:
- CLI tests own argument and configuration mapping. - CLI tests own argument and configuration mapping.
- End-to-end tests prove that representative assembled workflows work. - End-to-end tests prove that representative assembled workflows work.
Higher-level tests should not repeat every lower-level case. A single intentional policy change should not require unrelated edits across many test files. Give each layer its distinct responsibility and keep expectation updates localized to the contract being changed.
## Use test doubles deliberately ## Use test doubles deliberately
@@ -203,12 +197,9 @@ Mocks are appropriate when the contract includes facts such as:
- an expensive API is called no more than once; or - an expensive API is called no more than once; or
- a security audit event is emitted. - a security audit event is emitted.
Do not use mocks merely to isolate every object or reproduce the implementation's call graph.
## Go-specific guidance ## Go-specific guidance
Select techniques according to the behavior and risk being tested. The following Select techniques by behavior and risk:
are options, not a checklist that every package or application must satisfy:
- table-driven tests for meaningful behavioral categories and boundaries; - table-driven tests for meaningful behavioral categories and boundaries;
- `t.TempDir()` for real filesystem behavior; - `t.TempDir()` for real filesystem behavior;
@@ -218,19 +209,17 @@ are options, not a checklist that every package or application must satisfy:
- integration tests where correctness depends on component interaction; and - integration tests where correctness depends on component interaction; and
- a small number of representative end-to-end tests when assembled workflows expose meaningful risks not adequately covered at narrower boundaries. - a small number of representative end-to-end tests when assembled workflows expose meaningful risks not adequately covered at narrower boundaries.
Avoid exact error-string assertions unless the wording is itself contractual. Prefer `errors.Is`, `errors.As`, typed errors, or structured error fields. Prefer `errors.Is`, `errors.As`, typed errors, or structured error fields. Use exact error-wording assertions only when the wording is contractual.
At CLI boundaries, prefer exit classifications, structured output, and the smallest stable semantic fragment needed to identify the error. Do not snapshot complete diagnostic wording unless it is contractual. At CLI boundaries, prefer exit classifications, structured output, and the smallest stable semantic fragment needed to identify the error. Use complete diagnostic snapshots only when the wording is contractual.
Golden-file updates must require an explicit local flag. CI must not update golden files automatically, and reviewers must inspect the semantic diff before accepting an update. Golden-file updates must require an explicit local flag. CI must not update golden files automatically, and reviewers must inspect the semantic diff before accepting an update.
Keep tests readable and direct. Test helpers and fixture frameworks must earn their own maintenance cost; do not build elaborate test infrastructure for small or isolated needs. Keep tests readable and direct. Size test helpers and fixture frameworks to the maintenance benefit they provide.
## Coverage ## Coverage
Coverage is a diagnostic, not a target. Use coverage to locate untested critical branches and unexpectedly weak packages. Evaluate test quality through meaningful behavioral protection and choose coverage according to risk.
Use it to find untested critical branches and unexpectedly weak packages. Do not write low-value tests solely to increase a percentage, and do not infer test quality from coverage alone.
Pure domain logic will often warrant higher coverage than CLI wiring or external adapters. Uneven coverage is acceptable when it reflects risk. Pure domain logic will often warrant higher coverage than CLI wiring or external adapters. Uneven coverage is acceptable when it reflects risk.
@@ -238,33 +227,30 @@ Pure domain logic will often warrant higher coverage than CLI wiring or external
A bug fix should normally include a regression test that fails before the fix and passes afterward. A bug fix should normally include a regression test that fails before the fix and passes afterward.
Retain the test when the defect could realistically recur and its consequences justify the ongoing cost. Prefer the narrowest durable test of the violated contract or invariant; do not preserve accidental implementation details from the original bug. Retain the test when the defect could realistically recur and its consequences justify the ongoing cost. Prefer the narrowest durable test of the violated contract or invariant.
Not every historical bug requires a permanent test. If the underlying design has made recurrence impossible, the test has become redundant, or a stronger invariant test now subsumes it, remove or consolidate it. Remove or consolidate a test when the underlying design has made recurrence impossible, its protection is redundant, or a stronger invariant test subsumes it.
## Deleting or rewriting tests ## Deleting or rewriting tests
Tests are maintained code, not permanent historical artifacts. Delete or rewrite tests when maintenance cost exceeds their continuing
protective value.
Delete or rewrite a test when its maintenance cost exceeds the confidence it provides.
Strong candidates include tests that: Strong candidates include tests that:
- require updates after harmless internal changes; - require updates after harmless internal changes;
- directly assert private constants without protecting a real contract; - assert incidental private constants or snapshot large amounts of incidental output;
- duplicate the same policy across several layers;
- verify mock choreography rather than outcomes; - verify mock choreography rather than outcomes;
- snapshot large amounts of incidental output; - duplicate policy across layers, retest trivial helpers covered by package
- test trivial private helpers already exercised through stable package behavior; behavior, or protect risks covered more effectively elsewhere;
- protect risks already covered more effectively elsewhere;
- are flaky, misleading, obsolete, or disproportionately expensive to diagnose; or - are flaky, misleading, obsolete, or disproportionately expensive to diagnose; or
- no longer correspond to a plausible failure mode. - no longer correspond to a plausible failure mode.
Several brittle tests may encode one genuine requirement. Replace them with one durable behavior-level or invariant test rather than preserving all of them. Several brittle tests may encode one genuine requirement. Consolidate them into one durable behavior-level or invariant test.
## Reviewing a proposed test ## Reviewing a proposed test
Use the following questions when the value, boundary, or durability of a proposed test is not self-evident. Significant test additions should be reviewable against them, but written answers are not required for every routine test. Use the following questions when a proposed test needs closer evaluation. Significant test additions should be reviewable against them; written answers are optional for routine tests.
1. Which requested behavior or established contract does it protect, and what realistic defect would violate it? 1. Which requested behavior or established contract does it protect, and what realistic defect would violate it?
2. How likely and consequential is that defect, and is it already protected elsewhere? 2. How likely and consequential is that defect, and is it already protected elsewhere?
@@ -278,10 +264,9 @@ A test suite is sufficient when:
- important requested behavior and established contracts are protected against realistic, consequential failures; - important requested behavior and established contracts are protected against realistic, consequential failures;
- boundaries and component interactions have coverage where they introduce meaningful risks not protected elsewhere; - boundaries and component interactions have coverage where they introduce meaningful risks not protected elsewhere;
- failures provide useful signal rather than redundant noise; - failures provide useful, distinct signals;
- legitimate internal changes usually do not require test edits; and - tests usually remain stable through legitimate internal changes; and
- additional tests would mostly repeat existing protection or preserve inconsequential implementation details. - additional tests would mostly repeat existing protection or preserve inconsequential implementation details.
Sufficiency is a risk judgment, not a coverage percentage, test count, or required Reassess sufficiency as the application, its users, and the consequences of
mix of testing techniques. Reassess it as the application, its users, and the failure evolve.
consequences of failure evolve.