Skip to content

Commit 77d4b04

Browse files
hyperpolymathclaude
andcommitted
chore(docs): convert 8 Markdown-in-.adoc files; gate the dialect
The estate rule "AsciiDoc by default" was satisfied in letter, not substance. Eight files were a `= Title` line bolted onto an unmodified Markdown body, committed that way since the initial commit. They passed check-no-md-in-docs.sh (named .adoc) and Asciidoctor's Markdown-compat mode accepted `##` headings and ``` fences without complaint — so they looked clean while rendering wrong: - SPDX headers wrapped in <!-- --> rendered as *visible body text* in five files (HTML comments are not comments in AsciiDoc). - 21 Markdown pipe-tables rendered as garbage, 11 of them in THREAT-MODEL — the threat model's tables did not render at all. - Markdown links rendered as literal `[text](url)`. - Every render failure shared one root cause: a Markdown `#` H1 parses as a *level-0* section, and a second level-0 section is a hard error ("level 0 sections can only be used when doctype is book"). Converted: 130 ATX headings, 49 code fences, 21 pipe-tables, 8 HTML comments, 5 links, 121 `- [ ]` task markers. Markup only — no prose was reworded, added, or removed; verified by diffing the word multiset of every file before/after, where the only deltas are added AsciiDoc tokens and the removed duplicate-title words. check-docs-render.sh's ALLOWED quarantine drops from 6 entries to 0. Adds scripts/check-adoc-not-markdown.sh — the missing third leg of the gate: check-no-md-in-docs.sh extension: is it named .adoc? check-docs-render.sh render: does asciidoctor parse it? check-adoc-not-markdown.sh dialect: is the body actually AsciiDoc? The first two cannot catch this class of bug, which is how it survived. The new check is block-aware, so shell `# comments` inside listing blocks are not mistaken for headings, and it does not flag valid AsciiDoc that merely looks Markdown-ish (`**bold**`, `-` bullets, `>` quotes, `* [ ]` checklists). Verified failing on a probe file, not merely passing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 287c905 commit 77d4b04

12 files changed

Lines changed: 835 additions & 566 deletions

File tree

.github/workflows/quality.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,9 @@ jobs:
7474

7575
- name: Check every .adoc renders
7676
run: ./scripts/check-docs-render.sh .
77+
78+
# ...and that it renders *because it is AsciiDoc*, not because
79+
# Asciidoctor's Markdown-compat mode quietly accepted a Markdown body.
80+
# Needs no asciidoctor — it is a pure syntax scan.
81+
- name: Check every .adoc is AsciiDoc, not Markdown
82+
run: ./scripts/check-adoc-not-markdown.sh .
Lines changed: 99 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
= Template Placeholders
2-
# Template Placeholders
32

43
All placeholders in this template follow the `{{PLACEHOLDER}}` pattern.
54
After cloning, replace them with your project-specific values.
65

7-
## Recommended: Interactive Bootstrap
6+
== Recommended: Interactive Bootstrap
87

9-
```bash
8+
[source,bash]
9+
----
1010
just init
11-
```
11+
----
1212

1313
This interactively prompts for all values, replaces every placeholder,
1414
validates the result, and runs k9-svc checks if available.
1515

16-
## Manual Replace
16+
== Manual Replace
1717

18-
```bash
18+
[source,bash]
19+
----
1920
# If you prefer manual replacement (run from repo root)
2021
2122
sed -i 's/Jonathan D.A. Jewell/Jane Doe/g' $(grep -rl 'Jonathan D.A. Jewell' .)
@@ -28,80 +29,104 @@ sed -i 's/the-nash-equilibrium/my-project/g' $(grep -rl 'the-nash-equilibrium' .
2829
sed -i 's/github.com/github.com/g' $(grep -rl 'github.com' .)
2930
sed -i "s/2026/$(date +%Y)/g" $(grep -rl '2026' .)
3031
sed -i "s/{{CURRENT_DATE}}/$(date +%Y-%m-%d)/g" $(grep -rl '{{CURRENT_DATE}}' .)
31-
```
32+
----
3233

33-
## Placeholder Reference
34+
== Placeholder Reference
3435

35-
### Author & Copyright
36+
=== Author & Copyright
3637

37-
| Placeholder | Description | Example | Files |
38-
|---|---|---|---|
39-
| `Jonathan D.A. Jewell` | Full legal name | `Jane Doe` | SPDX headers (all files), MAINTAINERS.md, .mailmap, .reuse/dep5, docs/AI-CONVENTIONS.md |
40-
| `j.d.a.jewell@open.ac.uk` | Primary contact email | `jane@example.org` | SPDX headers (all files), .mailmap, .reuse/dep5, .well-known/humans.txt |
41-
| `{{AUTHOR_EMAIL_ALT}}` | Previous/secondary email (for .mailmap) | `old@example.com` | .mailmap |
42-
| `{{AUTHOR_ORG}}` | Author's organization/affiliation | `Acme University` | project-metadata.k9.ncl |
43-
| `{{AUTHOR_LAST}}` | Author surname (for citations) | `Doe` | docs/CITATIONS.adoc |
44-
| `{{AUTHOR_FIRST}}` | Author first name (for citations) | `Jane` | docs/CITATIONS.adoc |
45-
| `{{AUTHOR_INITIALS}}` | Author initials (for citations) | `J.` | docs/CITATIONS.adoc |
38+
[cols="1,1,1,1",options="header"]
39+
|===
40+
| Placeholder | Description | Example | Files
4641

47-
### Project Identity
42+
| `Jonathan D.A. Jewell` | Full legal name | `Jane Doe` | SPDX headers (all files), MAINTAINERS.md, .mailmap, .reuse/dep5, docs/AI-CONVENTIONS.md
43+
| `j.d.a.jewell@open.ac.uk` | Primary contact email | `jane@example.org` | SPDX headers (all files), .mailmap, .reuse/dep5, .well-known/humans.txt
44+
| `{{AUTHOR_EMAIL_ALT}}` | Previous/secondary email (for .mailmap) | `old@example.com` | .mailmap
45+
| `{{AUTHOR_ORG}}` | Author's organization/affiliation | `Acme University` | project-metadata.k9.ncl
46+
| `{{AUTHOR_LAST}}` | Author surname (for citations) | `Doe` | docs/CITATIONS.adoc
47+
| `{{AUTHOR_FIRST}}` | Author first name (for citations) | `Jane` | docs/CITATIONS.adoc
48+
| `{{AUTHOR_INITIALS}}` | Author initials (for citations) | `J.` | docs/CITATIONS.adoc
49+
|===
4850

49-
| Placeholder | Description | Example | Files |
50-
|---|---|---|---|
51-
| `The Nash Equilibrium` | Human-readable project name | `My Project` | SECURITY.md, CODE_OF_CONDUCT.md, TOPOLOGY.md, STATE.a2ml, Justfile, GOVERNANCE.md, MAINTAINERS.md, flake.nix, devcontainer.json |
52-
| `6X strategy board game exploring economic systems, planetary boundaries, and post-scarcity futures` | One-line description | `A tool for X` | flake.nix |
53-
| `{{PROJECT}}` | Uppercase identifier (for Idris2 modules, C macros) | `MY_PROJECT` | ABI-FFI-README.md, src/interface/abi/*.idr, src/interface/ffi/*.zig |
54-
| `the-nash-equilibrium` | Lowercase identifier (for C symbols, filenames) | `my_project` | ABI-FFI-README.md, src/interface/ffi/*.zig |
55-
| `the-nash-equilibrium` | Repository name (slug) | `my-project` | CONTRIBUTING.md, SECURITY.md, CODE_OF_CONDUCT.md, cliff.toml |
56-
| `hyperpolymath` | GitHub/GitLab org or username | `my-org` | SPDX headers, CONTRIBUTING.md, SECURITY.md, GOVERNANCE.md, MAINTAINERS.md, CODEOWNERS, mirror.yml, cliff.toml |
57-
| `github.com` | Git forge domain | `github.com` | CONTRIBUTING.md |
51+
=== Project Identity
5852

59-
### Dates
53+
[cols="1,1,1,1",options="header"]
54+
|===
55+
| Placeholder | Description | Example | Files
6056

61-
| Placeholder | Description | Example | Files |
62-
|---|---|---|---|
63-
| `2026` | Current year | `2026` | SPDX headers (all files), GOVERNANCE.md, MAINTAINERS.md |
64-
| `{{CURRENT_DATE}}` | Current date (ISO) | `2026-02-14` | STATE.a2ml, MAINTAINERS.md |
65-
| `{{DATE}}` | Last updated date | `2026-02-14` | TOPOLOGY.md, THREAT-MODEL.md |
57+
| `The Nash Equilibrium` | Human-readable project name | `My Project` | SECURITY.md, CODE_OF_CONDUCT.md, TOPOLOGY.md, STATE.a2ml, Justfile, GOVERNANCE.md, MAINTAINERS.md, flake.nix, devcontainer.json
58+
| `6X strategy board game exploring economic systems, planetary boundaries, and post-scarcity futures` | One-line description | `A tool for X` | flake.nix
59+
| `{{PROJECT}}` | Uppercase identifier (for Idris2 modules, C macros) | `MY_PROJECT` | ABI-FFI-README.md, src/interface/abi/*.idr, src/interface/ffi/*.zig
60+
| `the-nash-equilibrium` | Lowercase identifier (for C symbols, filenames) | `my_project` | ABI-FFI-README.md, src/interface/ffi/*.zig
61+
| `the-nash-equilibrium` | Repository name (slug) | `my-project` | CONTRIBUTING.md, SECURITY.md, CODE_OF_CONDUCT.md, cliff.toml
62+
| `hyperpolymath` | GitHub/GitLab org or username | `my-org` | SPDX headers, CONTRIBUTING.md, SECURITY.md, GOVERNANCE.md, MAINTAINERS.md, CODEOWNERS, mirror.yml, cliff.toml
63+
| `github.com` | Git forge domain | `github.com` | CONTRIBUTING.md
64+
|===
6665

67-
### Contact & Security
66+
=== Dates
6867

69-
| Placeholder | Description | Example | Files |
70-
|---|---|---|---|
71-
| `j.d.a.jewell@open.ac.uk` | Security contact email | `security@example.org` | SECURITY.md |
72-
| `TODO` | 40-char PGP fingerprint | `ABCD 1234 ...` | SECURITY.md |
73-
| `TODO` | URL to public PGP key | `https://keys.openpgp.org/...` | SECURITY.md |
74-
| `{{WEBSITE}}` | Project website | `https://example.org` | SECURITY.md |
75-
| `j.d.a.jewell@open.ac.uk` | Conduct reports email | `conduct@example.org` | CODE_OF_CONDUCT.md |
76-
| `maintainers` | Conduct committee name | `Code of Conduct Committee` | CODE_OF_CONDUCT.md |
77-
| `48 hours` | SLA for initial response | `48 hours` | CODE_OF_CONDUCT.md |
68+
[cols="1,1,1,1",options="header"]
69+
|===
70+
| Placeholder | Description | Example | Files
7871

79-
### Git
72+
| `2026` | Current year | `2026` | SPDX headers (all files), GOVERNANCE.md, MAINTAINERS.md
73+
| `{{CURRENT_DATE}}` | Current date (ISO) | `2026-02-14` | STATE.a2ml, MAINTAINERS.md
74+
| `{{DATE}}` | Last updated date | `2026-02-14` | TOPOLOGY.md, THREAT-MODEL.md
75+
|===
8076

81-
| Placeholder | Description | Example | Files |
82-
|---|---|---|---|
83-
| `main` | Main branch name | `main` | CONTRIBUTING.md |
77+
=== Contact & Security
8478

85-
### Build
79+
[cols="1,1,1,1",options="header"]
80+
|===
81+
| Placeholder | Description | Example | Files
8682

87-
| Placeholder | Description | Example | Files |
88-
|---|---|---|---|
89-
| `{{LICENSE}}` | License name | `AGPL-3.0-or-later` | ABI-FFI-README.md |
90-
| `6X strategy board game` | One-line project description | `FFI bridges between languages` | STATE.a2ml |
83+
| `j.d.a.jewell@open.ac.uk` | Security contact email | `security@example.org` | SECURITY.md
84+
| `TODO` | 40-char PGP fingerprint | `ABCD 1234 ...` | SECURITY.md
85+
| `TODO` | URL to public PGP key | `https://keys.openpgp.org/...` | SECURITY.md
86+
| `{{WEBSITE}}` | Project website | `https://example.org` | SECURITY.md
87+
| `j.d.a.jewell@open.ac.uk` | Conduct reports email | `conduct@example.org` | CODE_OF_CONDUCT.md
88+
| `maintainers` | Conduct committee name | `Code of Conduct Committee` | CODE_OF_CONDUCT.md
89+
| `48 hours` | SLA for initial response | `48 hours` | CODE_OF_CONDUCT.md
90+
|===
9191

92-
### AI Manifest
92+
=== Git
9393

94-
| Placeholder | Description | Example | Files |
95-
|---|---|---|---|
96-
| `[YOUR-REPO-NAME]` | Repository name | `my-project` | 0-AI-MANIFEST.a2ml |
97-
| `[DATE]` | Creation date | `2026-02-14` | 0-AI-MANIFEST.a2ml |
98-
| `[YOUR-NAME/ORG]` | Maintainer name | `hyperpolymath` | 0-AI-MANIFEST.a2ml |
94+
[cols="1,1,1,1",options="header"]
95+
|===
96+
| Placeholder | Description | Example | Files
9997

100-
### AI Installation Guide
98+
| `main` | Main branch name | `main` | CONTRIBUTING.md
99+
|===
101100

102-
| Marker | Description | Files |
103-
|---|---|---|
104-
| `[TODO-AI-INSTALL]` | Unfilled section in AI installation guide | `docs/AI_INSTALLATION_GUIDE.adoc`, `docs/AI-INSTALL-README-SECTION.adoc`, `README.adoc` |
101+
=== Build
102+
103+
[cols="1,1,1,1",options="header"]
104+
|===
105+
| Placeholder | Description | Example | Files
106+
107+
| `{{LICENSE}}` | License name | `AGPL-3.0-or-later` | ABI-FFI-README.md
108+
| `6X strategy board game` | One-line project description | `FFI bridges between languages` | STATE.a2ml
109+
|===
110+
111+
=== AI Manifest
112+
113+
[cols="1,1,1,1",options="header"]
114+
|===
115+
| Placeholder | Description | Example | Files
116+
117+
| `[YOUR-REPO-NAME]` | Repository name | `my-project` | 0-AI-MANIFEST.a2ml
118+
| `[DATE]` | Creation date | `2026-02-14` | 0-AI-MANIFEST.a2ml
119+
| `[YOUR-NAME/ORG]` | Maintainer name | `hyperpolymath` | 0-AI-MANIFEST.a2ml
120+
|===
121+
122+
=== AI Installation Guide
123+
124+
[cols="1,1,1",options="header"]
125+
|===
126+
| Marker | Description | Files
127+
128+
| `[TODO-AI-INSTALL]` | Unfilled section in AI installation guide | `docs/AI_INSTALLATION_GUIDE.adoc`, `docs/AI-INSTALL-README-SECTION.adoc`, `README.adoc`
129+
|===
105130

106131
These are **not** standard `{{PLACEHOLDER}}` markers -- they are TODO markers
107132
that must be replaced with project-specific content before release. They mark
@@ -118,25 +143,29 @@ sections where the developer (or AI) must fill in:
118143

119144
**finishbot checks:** `just validate-ai-install` verifies no `[TODO-AI-INSTALL]` markers remain.
120145

121-
## Deletion Markers
146+
== Deletion Markers
122147

123148
Some files contain deletion instructions:
124149

125-
| Marker | Meaning | File |
126-
|---|---|---|
127-
| `{{~ ... ~}}` | Delete this entire line after reading | ABI-FFI-README.md (line 1) |
150+
[cols="1,1,1",options="header"]
151+
|===
152+
| Marker | Meaning | File
153+
154+
| `{{~ ... ~}}` | Delete this entire line after reading | ABI-FFI-README.md (line 1)
155+
|===
128156

129-
## Verification
157+
== Verification
130158

131159
After replacing all placeholders, verify none remain:
132160

133-
```bash
161+
[source,bash]
162+
----
134163
grep -rn '{{' . --include='*.md' --include='*.adoc' --include='*.a2ml' \
135164
--include='*.scm' --include='*.idr' --include='*.zig' --include='*.res' \
136165
--include='Justfile' --include='*.nix' --include='*.toml' --include='*.yml' \
137166
--include='*.yaml' --include='*.hs' --include='*.ncl' --include='*.txt' \
138167
--include='*.json' --include='Containerfile' --include='dep5' \
139168
| grep -v 'PLACEHOLDERS.md' | grep -v 'node_modules'
140-
```
169+
----
141170

142171
If the above command produces no output, all placeholders have been replaced.

Justfile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,20 @@ docs:
281281
just man
282282
@echo "Documentation generated in docs/"
283283

284-
# Check every .adoc actually renders (content-side counterpart to the .md ban)
285-
docs-check:
284+
# Check the docs three ways: named .adoc, parses, and is actually AsciiDoc.
285+
# The three are independent — eight files once passed the first two while their
286+
# bodies were still Markdown (SPDX headers rendering as visible text, tables
287+
# rendering as garbage). See scripts/check-adoc-not-markdown.sh.
288+
docs-check: docs-check-render docs-check-dialect
289+
290+
# Every .adoc must parse (content-side counterpart to the .md extension ban)
291+
docs-check-render:
286292
@./scripts/check-docs-render.sh .
287293

294+
# Every .adoc must be AsciiDoc, not Markdown wearing an .adoc extension
295+
docs-check-dialect:
296+
@./scripts/check-adoc-not-markdown.sh .
297+
288298
# Render the docs to HTML for local reading [reversible: rm -rf docs/generated/html]
289299
docs-html:
290300
#!/usr/bin/env bash

docs/STATE-VISUALIZER.adoc

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
1-
= Project State Visualizer
2-
[source]
3-
----
4-
<!-- SPDX-License-Identifier: CC-BY-SA-4.0 -->
5-
<!-- TOPOLOGY.md — Project architecture map and completion dashboard -->
6-
<!-- Last updated: 2026-02-28 -->
7-
8-
# RSR Template Repo — Project Topology
1+
// SPDX-License-Identifier: CC-BY-SA-4.0
2+
// TOPOLOGY.md — Project architecture map and completion dashboard
3+
// Last updated: 2026-02-28
4+
= RSR Template Repo — Project Topology
95

10-
## System Architecture
6+
== System Architecture
117

12-
```
8+
----
139
┌─────────────────────────────────────────┐
1410
│ NEW REPOSITORY │
1511
│ (Consumer of this Template) │
@@ -56,11 +52,11 @@
5652
│ Justfile / Mustfile .machine_readable/ │
5753
│ Codeowners / Reuse 0-AI-MANIFEST.a2ml │
5854
└─────────────────────────────────────────┘
59-
```
55+
----
6056

61-
## Completion Dashboard
57+
== Completion Dashboard
6258

63-
```
59+
----
6460
COMPONENT STATUS NOTES
6561
───────────────────────────────── ────────────────── ─────────────────────────────────
6662
CORE STANDARDS
@@ -92,11 +88,11 @@ REPO INFRASTRUCTURE
9288
9389
─────────────────────────────────────────────────────────────────────────────
9490
OVERALL: ██████████ 100% RSR Template Stable & Certified
95-
```
91+
----
9692

97-
## Key Dependencies
93+
== Key Dependencies
9894

99-
```
95+
----
10096
Philosophy ──────► RSR Standard ──────► Template Scaffolding ──► New Repo
10197
│ │ │ │
10298
▼ ▼ ▼ ▼
@@ -112,9 +108,9 @@ CCCP Policy ─────► 0-AI-MANIFEST ────────► Justfil
112108
113109
114110
k9-svc deploy
115-
```
111+
----
116112

117-
## Update Protocol
113+
== Update Protocol
118114

119115
This file is maintained by both humans and AI agents. When updating:
120116

@@ -125,4 +121,3 @@ This file is maintained by both humans and AI agents. When updating:
125121

126122
Progress bars use: `█` (filled) and `░` (empty), 10 characters wide.
127123
Percentages: 0%, 10%, 20%, ... 100% (in 10% increments).
128-
----

0 commit comments

Comments
 (0)