diff --git a/LICENSE-TEMPLATES b/LICENSE-TEMPLATES new file mode 100644 index 0000000..fe7141a --- /dev/null +++ b/LICENSE-TEMPLATES @@ -0,0 +1,16 @@ +MIT No Attribution + +Copyright 2026 K. C. Ramakrishna + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/dev/build_skills.py b/dev/build_skills.py index c83f937..2063076 100644 --- a/dev/build_skills.py +++ b/dev/build_skills.py @@ -38,7 +38,7 @@ same ``metadata.version`` added. - ``references/``: the state contract, the playbooks, the kickoff prompt, the shared prompt on how to talk to the user (from ``audit/prompts/``), the check files, the stack profiles, - ADR 0003, the ADR policy and the ADR template, ``spec/command-surface.md`` and the spec decisions, the state schema and its docs, and the parts of + ADR 0003, the greenfield ADR policy and ADR template, ``spec/command-surface.md`` and the spec decisions, the state schema and its docs, and the parts of the Tools CLI reference that cover the carried tools (:data:`TOOLS_CLI_SECTIONS`). The playbook templates (:data:`IMPLEMENT_TEMPLATE_FILES`) sit beside the playbooks in ``references/playbooks/templates/``, so a playbook step can copy one into the target. @@ -336,8 +336,9 @@ def build_bundle(out_dir: Path) -> Path: "implement/docs/architecture/adrs/0003-push-and-pr-policy.md", "references/adrs/0003-push-and-pr-policy.md", ), - ("docs/ADR_POLICY.md", "references/adr-policy/ADR_POLICY.md"), - ("docs/templates/adr-template.md", "references/adr-policy/adr-template.md"), + # The greenfield copies (MIT-0), the ones `establish-docs-contract` adapts into a target, not `docs/` (GFDL). + ("greenfield/templates/docs/ADR_POLICY.md", "references/adr-policy/ADR_POLICY.md"), + ("greenfield/templates/docs/templates/adr-template.md", "references/adr-policy/adr-template.md"), ("spec/command-surface.md", "references/spec/command-surface.md"), ("spec/decisions/0001-constraint-artifact.md", "references/spec/decisions/0001-constraint-artifact.md"), ("spec/decisions/0002-lint-in-the-gate.md", "references/spec/decisions/0002-lint-in-the-gate.md"), diff --git a/docs/reference/implement-master.md b/docs/reference/implement-master.md index 7d59d8d..53593b4 100644 --- a/docs/reference/implement-master.md +++ b/docs/reference/implement-master.md @@ -279,7 +279,7 @@ not moved. | [`DOC-02` docs/STYLE_GUIDE.md exists](audit-master.md#doc-02-docsstyle_guidemd-exists) | Adds a one-page `docs/STYLE_GUIDE.md` and one line in the instruction file that names it | | [`DOC-03` artefacts/ exists and is ignored](audit-master.md#doc-03-artefacts-exists-and-is-ignored) | Verifies the scratch directory rule; adds the ignore rule only if a scratch directory exists | | [`DOC-04` ADR directory and index](audit-master.md#doc-04-adr-directory-and-index) | Adds `docs/adr/` with an ADR policy page, a template, an index and two or three first records for the owner to review | -| [`DOC-05` Docs are readable](audit-master.md#doc-05-docs-are-readable) | Adds a "Plain language" and a "Diagrams" section to the style guide (Steps 3); the pages this theme writes pass the rules. Existing pages are not rewritten. A prose check with a ratchet only when the owner names a licence for it (Inputs 6, Steps 8). Trigger: a confirmed finding, or `extra.doc-05` (Preconditions) | +| [`DOC-05` Docs are readable](audit-master.md#doc-05-docs-are-readable) | Adds a "Plain language" and a "Diagrams" section to the style guide (Steps 3); the pages this theme writes pass the rules. Existing pages are not rewritten. A prose check with a ratchet only when the owner picks one of three permissive licences for it (Inputs 6, Steps 8). Trigger: a confirmed finding, or `extra.doc-05` (Preconditions) | | [`NAV-01` Declared component boundaries](audit-master.md#nav-01-declared-component-boundaries) | Verification only: lists the declared components in the architecture page | | [`NAV-02` Obvious entry points](audit-master.md#nav-02-obvious-entry-points) | Verification only: names the entry points in the architecture page | | [`NAV-03` Structural red flags](audit-master.md#nav-03-structural-red-flags) | Census of oversized files, catch-all directories, binaries and minified assets; document, never move | diff --git a/docs/reference/licensing.md b/docs/reference/licensing.md index 422ef1e..5b50e0b 100644 --- a/docs/reference/licensing.md +++ b/docs/reference/licensing.md @@ -10,13 +10,20 @@ |---|---| | Scripts and code: `audit/tools/`, `implement/tools/`, the playbook templates in `implement/playbooks/templates/` (a copy in a target carries `MIT`, `Apache-2.0` or `BSD-3-Clause`, as its owner picks, and keeps the copyright line), the engine code in `audit/engine/` (the `audit/` package, its tests and `build.py`), the dev-only checks and build tools in `dev/`, and their tests | AGPL-3.0-or-later | | Documentation: this `docs/` tree, the engine's docs (`audit/engine/docs/`, its README and `AGENTS.md`), recipes, check files, playbooks, stack profiles, the check catalogue (`catalogue.json`) | GFDL 1.3 | +| Templates: `greenfield/templates/`, and the text an implement playbook copies or adapts from them into a target repository. A copy needs no notice | MIT-0 | | JSON Schemas (`audit/schema/`) and their documentation | GFDL 1.3 | | Example reports and other outputs published in this repository, including `audit/engine/examples/` | GFDL 1.3 | -The licence texts are root files: `LICENSE` holds the GFDL 1.3 text and `LICENSE-CODE` holds the AGPL text. Each skill +The licence texts are root files: `LICENSE` holds the GFDL 1.3 text, `LICENSE-CODE` holds the AGPL text and +`LICENSE-TEMPLATES` holds the MIT-0 text. Each skill bundle that `dev/build_skills.py` builds carries a `LICENSE` file with the AGPL text. -SPDX identifiers: `AGPL-3.0-or-later` for code and `GFDL-1.3-only` for documentation, schemas and published outputs. +SPDX identifiers: `AGPL-3.0-or-later` for code, `MIT-0` for templates, and `GFDL-1.3-only` for documentation, +schemas and published outputs. + +The templates are MIT-0 so that text copied into a repository, private and enterprise ones included, carries no +copyleft and no notice duty. The repository then owns its copy. For the same reason a playbook copies or adapts +text only from `greenfield/templates/`, never from this repository's `docs/`. > [!NOTE] > The AGPL covers the tools, not the repositories they analyse. Reports that you produce on your own repositories are yours; the tools place no licence on them. Outputs this project publishes as examples are GFDL 1.3. diff --git a/greenfield/README.md b/greenfield/README.md index 1e0df47..2198d6f 100644 --- a/greenfield/README.md +++ b/greenfield/README.md @@ -7,6 +7,11 @@ --- +The files in `templates/` are MIT-0 ([`LICENSE-TEMPLATES`](../LICENSE-TEMPLATES)): copy and change them freely, +with no notice. Your project then owns its copy and picks its own licence. + +--- + ## File Tree — What Gets Created ``` diff --git a/implement/AGENTS.md b/implement/AGENTS.md index 8df59c2..4b3cb64 100644 --- a/implement/AGENTS.md +++ b/implement/AGENTS.md @@ -21,6 +21,7 @@ folder. ## Rules - Use the standard library only in `tools/`. Never add a third-party import. +- Text a playbook copies into a target comes from `greenfield/templates/` (MIT-0), never from `docs/` (GFDL 1.3). - Code in `playbooks/templates/` is relicensed when a playbook copies it into a target. Only its copyright holder changes it, or a contributor who agrees in writing to that relicensing. Say so in the pull request. - Every tool follows the tool contract in [`audit/tools/README.md`](../audit/tools/README.md). diff --git a/implement/playbooks/README.md b/implement/playbooks/README.md index acb5df0..5389965 100644 --- a/implement/playbooks/README.md +++ b/implement/playbooks/README.md @@ -42,6 +42,8 @@ Rules for every playbook: - A playbook never restates a check's rubric or a requirement; it links to the check file in [`audit/checks/`](../../audit/checks/README.md) and to `spec/`. - Templates come from `greenfield/templates/` by reference, never copied verbatim into the playbook. +- Text a playbook copies or adapts into a target comes only from `greenfield/templates/` (MIT-0), never from + this repository's `docs/` (GFDL 1.3). See [licensing](../../docs/reference/licensing.md). - Code a playbook copies into a target lives in [`templates/`](templates/), with its tests in `implement/tools/tests/`. A copy carries `MIT`, `Apache-2.0` or `BSD-3-Clause`, as the owner picks, never this repository's. - A playbook does not restate the shared procedure of `SKILL.md` Stages 2 to 4; it links to the stage step. diff --git a/implement/playbooks/establish-docs-contract.md b/implement/playbooks/establish-docs-contract.md index a5f2c70..c3fc15b 100644 --- a/implement/playbooks/establish-docs-contract.md +++ b/implement/playbooks/establish-docs-contract.md @@ -18,7 +18,7 @@ not moved. | DOC-02 | [03-documentation-contract.md](../../audit/checks/03-documentation-contract.md#doc-02--docsstyle_guidemd-exists) | Adds a one-page `docs/STYLE_GUIDE.md` and one line in the instruction file that names it | | DOC-03 | [03-documentation-contract.md](../../audit/checks/03-documentation-contract.md#doc-03--artefacts-exists-and-is-ignored) | Verifies the scratch directory rule; adds the ignore rule only if a scratch directory exists | | DOC-04 | [03-documentation-contract.md](../../audit/checks/03-documentation-contract.md#doc-04--adr-directory-and-index) | Adds `docs/adr/` with an ADR policy page, a template, an index and two or three first records for the owner to review | -| DOC-05 | [03-documentation-contract.md](../../audit/checks/03-documentation-contract.md#doc-05--docs-are-readable) | Adds a "Plain language" and a "Diagrams" section to the style guide (Steps 3); the pages this theme writes pass the rules. Existing pages are not rewritten. A prose check with a ratchet only when the owner names a licence for it (Inputs 6, Steps 8). Trigger: a confirmed finding, or `extra.doc-05` (Preconditions) | +| DOC-05 | [03-documentation-contract.md](../../audit/checks/03-documentation-contract.md#doc-05--docs-are-readable) | Adds a "Plain language" and a "Diagrams" section to the style guide (Steps 3); the pages this theme writes pass the rules. Existing pages are not rewritten. A prose check with a ratchet only when the owner picks one of three permissive licences for it (Inputs 6, Steps 8). Trigger: a confirmed finding, or `extra.doc-05` (Preconditions) | | NAV-01 | [11-navigation.md](../../audit/checks/11-navigation.md#nav-01--declared-component-boundaries) | Verification only: lists the declared components in the architecture page | | NAV-02 | [11-navigation.md](../../audit/checks/11-navigation.md#nav-02--obvious-entry-points) | Verification only: names the entry points in the architecture page | | NAV-03 | [11-navigation.md](../../audit/checks/11-navigation.md#nav-03--structural-red-flags) | Census of oversized files, catch-all directories, binaries and minified assets; document, never move | @@ -71,8 +71,8 @@ They stay here so a repository that has one has a procedure, and so the re-audit > rather than implementing it. See the owner-facing comparison in the track research note > (`node-vs-java-docs-lint`, not part of the recipe). An owner who asks "why not Java" gets this answer; the > docs job stays separate from the build, so the build toolchain is unchanged. -2. **Style guide source.** Default: adapt the framework's - [`docs/STYLE_GUIDE.md`](../../docs/STYLE_GUIDE.md) (Diátaxis) to one page. The alternative +2. **Style guide source.** Default: adapt the greenfield + [`docs/STYLE_GUIDE.md`](../../greenfield/templates/docs/STYLE_GUIDE.md) (Diátaxis) to one page. The alternative (the owner's own house rules) is allowed only when those rules are not private to a different repository. Either way, the guide gains the "Plain language" and "Diagrams" sections (Steps 3) when DOC-05 is in the theme. 3. **First ADRs.** Ask which two or three existing decisions to record. With no owner preference, pick them @@ -135,10 +135,11 @@ They stay here so a repository that has one has a procedure, and so the re-audit the architecture page. Re-run the engine before the theme closes: `DOC-05` cites no line on those pages. 4. **ADRs (DOC-04).** Create `docs/adr/` with four parts: - `README.md`, the index: a table of number, title and a one-line summary, linking every file by its path. - - `0000-template.md`, copied from the framework's [`adr-template.md`](../../docs/templates/adr-template.md): + - `0000-template.md`, copied from the greenfield + [`adr-template.md`](../../greenfield/templates/docs/templates/adr-template.md): Context, Decision, Alternatives Considered, Consequences. It has no status, date or decider fields. - - An ADR policy page, adapted from the framework's [`ADR_POLICY.md`](../../docs/ADR_POLICY.md). Keep its - rules; replace the framework's folder list and links with the target's. Name the page to fit the target's + - An ADR policy page, adapted from the greenfield [`ADR_POLICY.md`](../../greenfield/templates/docs/ADR_POLICY.md). + Keep its rules; replace its folder list and links with the target's. Name the page to fit the target's file names: `docs/ADR_POLICY.md` beside `docs/STYLE_GUIDE.md` by default, or `docs/adr-policy.md` where the docs use lower-case names. The instruction-file line names it (Inputs 5). - The first records, as `0001-short-title.md`.