// SPDX-License-Identifier: CC-BY-SA-4.0
= Template Standards Audit
Codex
v1.0, 2026-04-07
:toc:
:toclevels: 3
:sectnums:

== Scope And Inventory

Audit scope:

* Repository: `rsr-template-repo`
* Focus: root authority docs/manifests, Justfile integration, session bindings
* Recursive inventory method: `rg --files -g '!.git' | sort`

Inventory snapshot at audit time:

* `rsr-template-repo` total tracked files discovered: `240`
* Session-local binding files discovered: `4` under `session/` plus `coordination.k9`

== Claim Vs Actual

[cols="2,2,3,1,3,3",options="header"]
|===
| Claimed item | Claimed by | Expected path | Actual status | Notes | Recommended action

| Placeholder badge tokens in README
| `README.adoc`
| `{{OPENSSF_PROJECT_ID}}`, `hyperpolymath`, `rattlescript`
| placeholder
| Template placeholders are intentional pre-bootstrap content.
| Keep; document clearly as template tokens.

| Docs links used `.adoc` files not present
| legacy `README.adoc` (pre-migration)
| `CONTRIBUTING.adoc`, `GOVERNANCE.adoc`, `SECURITY.adoc`
| outdated
| Actual files are `CONTRIBUTING.md`, no root `GOVERNANCE.adoc`, `SECURITY.md`.
| Fixed README links to existing files.

| ABI path lower-case only
| legacy `README.adoc` + legacy checks
| `src/interface/abi/*.idr`
| outdated
| Current tree has `src/interface/Abi/*.idr` (uppercase A).
| Updated docs/checks to accept current path.

| Root manifest structure with non-existent files
| legacy `0-AI-MANIFEST.a2ml` (pre-migration)
| `GOVERNANCE.adoc`, several strict root assumptions
| outdated
| Manifest claims did not match actual template contents.
| Replaced with accurate authority split + startup checklist.

| Source-human references maintenance/practice docs
| legacy Justfile + policy A2ML (pre-migration)
| `docs/maintenance/...`, `docs/practice/SOFTWARE-DEVELOPMENT-APPROACH.adoc`
| outdated
| Those paths did not exist in template.
| Updated to `docs/governance/...` paths.

| Session-management local binding files
| target architecture
| `session/README.md`, `session/custom-checks.k9`, `session/local-hooks.sh`, `coordination.k9`
| exists
| Added as thin integration layer without protocol duplication.
| Keep.

| Canonical command mapping in local automation
| target architecture
| `Justfile` session aliases + `session/dispatch.sh`
| exists
| All canonical commands map to dispatcher.
| Keep.

| Central protocols are authoritative
| `README.adoc`, `0-AI-MANIFEST.a2ml`, `AUDIT.adoc`
| `standards/session-management-standards/`
| exists
| Local docs now explicitly defer protocol authority to standards repo.
| Keep.

| Runtime session artifacts stay per-repo
| `session/README.md`, `session/dispatch.sh`
| `.session/` in target repo path
| exists
| Dispatcher records canonical commands into runtime `.session/` files.
| Keep runtime artifacts out of authoritative standards docs.

| Local policy hooks remain local
| `session/local-hooks.sh`, `session/custom-checks.k9`
| local session binding layer
| exists
| Policy/hook logic separated from central protocol definitions.
| Keep local-only.
|===

== Classification

=== Authoritative Shared Standard

* External to this repo: `standards/session-management-standards/*`

=== Repo-Local Binding/Integration

* `Justfile` canonical session aliases
* `session/dispatch.sh`
* `session/custom-checks.k9`
* `session/local-hooks.sh`
* `session/README.md`
* `coordination.k9`
* `AUDIT.adoc` (local gate summary)

=== Generated Runtime Artifact

* `.session/*` outputs created by local dispatcher per repository path

=== Obsolete/Duplicate/Drifted

* Legacy path assumptions (`docs/maintenance/*`, `docs/practice/*` for governance policy references)
* Legacy root-doc claims to files not present in this template
* Legacy lower-case-only ABI path references

== Move/Stay/Delete Guidance

=== Move Into `standards`

* Any future full protocol text drafts should move to
  `standards/session-management-standards/`.

=== Stay In `rsr-template-repo`

* Local aliases, hooks, coordination wiring, and repo-local checks.

=== Delete/Archive

* Archive or remove legacy references to non-existent docs/paths if reintroduced.
* Avoid reintroducing full duplicated protocol definitions.

== Missing-But-Expected Session Files (Template Repo)

Template repo expected only thin local integration files.

Current status:

* No mandatory thin-binding files are missing.
* Full protocol directories/files are intentionally absent here by design.

== Proposed Final Directory Map

[source,text]
----
rsr-template-repo/
  README.adoc
  AUDIT.adoc
  0-AI-MANIFEST.a2ml
  EXPLAINME.adoc
  Justfile
  coordination.k9
  session/
    README.md
    dispatch.sh
    custom-checks.k9
    local-hooks.sh
  docs/
    ... (repo-local human docs)
  .machine_readable/
    ... (repo-local machine-readable policy/state)
----

== Maintenance Model Note

* Protocols central: maintained in `standards/session-management-standards/`.
* Policy local: maintained in template/downstream repos (`session/*.k9`, hooks,
  coordination bindings).
* State per-repo: generated during execution (`.session/*`) in the active
  working repository.
