Accepted
2026-04-19
Phase 3 of the framework gap closure plan includes two apply-mode scripts:
scripts/context/fill_context_pages.py apply— fills placeholder markers in.github/skills/**anddocs/**context pages.scripts/maintenance/generate_docs.py apply— generates automated documentation fragments and writes them todocs/**.
Both scripts require write access to paths outside the wiki/ directory, which
is the primary governed write zone declared in ADR-005 and ADR-007. Without an
explicit authorization record, the repository's deny-by-default write policy would
prohibit these write paths at the AGENTS.md enforcement layer.
The maintainer decision recorded on 2026-04-18 (Cluster A) confirmed:
- Agents may write to
.github/skills/**anddocs/**via declared scripts. - CI-3 stays wiki- and
raw/processed/**-focused; G1b/G1c are placed in a separateci-4-framework-writer.ymlworkflow scoped to repo documentation and Copilot customizations. schema/**is excluded from the apply write allowlist — schema files are authoritative contracts; auto-fill is inappropriate.fill_context_pages.py applymay still read-scanschema/**to detect accidental placeholder markers, but writes are restricted to.github/skills/**anddocs/**(excludingdocs/staged/**).
Grant the following narrower write authorizations under the deny-by-default policy:
- Writable paths:
.github/skills/**/*.md(placeholder fill only),docs/**/*.md(context pages only). - Explicitly excluded write paths:
docs/staged/**(staged manifests are inputs, not outputs),schema/**(authoritative contracts). - Read-only paths (scan only):
.github/skills/**,docs/**,schema/**. - Lock requirement:
wiki/.kb_write.lockacquired via the sharedexclusive_write_lockutility before every write batch. - Approval gate:
--approval approvedrequired; absent approval returnsapproval_required_resultwithout mutating any files. - Hard-fail conditions: out-of-scope write path, missing or stale lock,
write-on-failure, staged-fill source outside
docs/staged/**.
- Writable paths:
docs/**/*.md(generated documentation fragments only). - Read-only paths (inputs):
.github/skills/**,docs/**,schema/**,scripts/**. - Lock requirement:
wiki/.kb_write.lockviaexclusive_write_lock. - Approval gate:
--approval approvedrequired. - Hard-fail conditions: out-of-scope write path (e.g. anything outside
docs/**), missing lock, write-on-failure.
Both apply modes belong in a new ci-4-framework-writer.yml workflow. CI-3
(ci-3-pr-producer.yml) remains scoped to wiki/** and raw/processed/**
only and must not invoke these scripts.
- Rejected: CI-3 is the wiki governance pipeline; mixing framework-writer
mutations into it would blur the permission boundary and require CI-3 to hold
write access to
.github/skills/**.
- Rejected: The
scripts/context/**andscripts/maintenance/**family rows in AGENTS.md areblocking-onlywith no declared direct writable paths. Each distinct executable surface requires its own narrower row per matrix rules.
- Rejected: Schema files are authoritative contracts. Auto-fill can silently corrupt field definitions. Read-scan is sufficient to surface placeholder markers as warnings without creating an accidental write path.
fill_context_pages.py applyandgenerate_docs.py applyare now declared write surfaces with explicit per-script AGENTS.md rows.- Both scripts enforce
wiki/.kb_write.lockbefore every write — same concurrency model as wiki write surfaces. schema/**remains a read-only surface for automation; changes require explicit maintainer authorship.- Future scripts that need write access to
.github/skills/**ordocs/**must add their own narrower AGENTS.md row before the write gate is lifted.
AGENTS.md(write-surface matrix rows forfill_context_pages.pyandgenerate_docs.py)ADR-005-write-concurrency-guards.mdADR-007-control-plane-layering-and-packaging.mdscripts/context/fill_context_pages.pyscripts/maintenance/generate_docs.py