Skip to content

Commit 8077dc9

Browse files
committed
docs-format: add Glama README.md carve-out (glama.json-gated)
Glama (glama.ai, the MCP-server directory) requires a README.md to index a server and will not render README.adoc. Add a single, gated carve-out to the .adoc-canonical / no-duplicate-format rule, keyed on a repo-root glama.json: - doc-format.yml: skip the duplicate-format error for README when glama.json present - contractiles/must/Mustfile: readme-md-glama-carveout — require README.md iff glama.json - contractiles/dust/Dustfile: preserve:glama-readme — cleanup must not delete it - contractiles/CANONICAL-TEMPLATES.adoc: document the carve-out (the canonical statement) - .machine_readable/6a2/PLAYBOOK.a2ml: release-step + docs-format note README.adoc stays the source of truth everywhere; README.md is maintained solely for Glama. Non-Glama repos (no glama.json) are unaffected. Glama limitation, not an owner-policy change.
1 parent ec25c48 commit 8077dc9

5 files changed

Lines changed: 57 additions & 0 deletions

File tree

.github/workflows/doc-format.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ jobs:
3434
# Check for docs that exist in both .md and .adoc (except GitHub-required)
3535
for doc in README ARCHITECTURE ROADMAP PHILOSOPHY INSTALL CHANGELOG; do
3636
if [ -f "${doc}.md" ] && [ -f "${doc}.adoc" ]; then
37+
# Glama carve-out: the Glama MCP-server directory (glama.ai) requires a
38+
# README.md to index a server and will NOT render README.adoc. When a
39+
# glama.json is present, README.md is permitted alongside the canonical
40+
# README.adoc. README.adoc remains the source of truth. This is a Glama
41+
# limitation, not an owner-policy change. See contractiles/CANONICAL-TEMPLATES.adoc.
42+
if [ "${doc}" = "README" ] && [ -f "glama.json" ]; then
43+
echo "::notice::README.md kept alongside README.adoc (Glama carve-out: glama.json present; .adoc remains canonical)."
44+
continue
45+
fi
3746
echo "::error::Duplicate documentation: ${doc}.md and ${doc}.adoc both exist. Keep only .adoc"
3847
DUPLICATES=$((DUPLICATES + 1))
3948
fi

.machine_readable/6a2/PLAYBOOK.a2ml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ last-updated = "2026-04-11"
2525
# 1. Update version in STATE.a2ml, META.a2ml
2626
# 2. Run `just release-preflight` (validate + quality + security + maint-hard-pass)
2727
# 3. Tag and push
28+
# 4. If glama.json is present (repo listed on the Glama MCP directory),
29+
# regenerate README.md from the canonical README.adoc before tagging so the
30+
# Glama listing stays current. README.adoc is the source of truth; README.md
31+
# exists solely for Glama (which will not render .adoc). Carve-out enforced by
32+
# doc-format.yml + Mustfile readme-md-glama-carveout + Dustfile preserve:glama-readme.
33+
34+
[docs-format]
35+
# Estate docs are .adoc-canonical, no duplicate formats. Sole exception: the
36+
# Glama README.md carve-out (gated on glama.json). See
37+
# contractiles/CANONICAL-TEMPLATES.adoc "Documentation carve-out — Glama README.md".
2838

2939
[maintenance-operations]
3040
# Baseline audit: just maint-audit

contractiles/CANONICAL-TEMPLATES.adoc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,33 @@ Items with an observable probe belong in `[[intents]]`; horizon-level
6060
desires that might never be acted on belong in `[[wishes]]`. A wish can
6161
graduate into an intent when a concrete plan materialises.
6262

63+
=== Documentation carve-out — Glama README.md
64+
65+
The estate is `.adoc`-canonical with no duplicate documentation formats
66+
(`doc-format.yml` blocks a `README.md` that sits alongside `README.adoc`).
67+
There is exactly one standing exception:
68+
69+
[NOTE]
70+
====
71+
*Glama README.md carve-out.* The Glama MCP-server directory
72+
(https://glama.ai) requires a `README.md` to index a server and will not
73+
render `README.adoc`. A repository that opts into Glama therefore keeps a
74+
`README.md` *alongside* the canonical `README.adoc`, gated on the presence
75+
of a `glama.json` at the repo root.
76+
77+
* `README.adoc` remains the authored source of truth; `README.md` is
78+
maintained (regenerated from the `.adoc`) solely to satisfy Glama.
79+
* This is a Glama limitation, *not* an owner-policy change — it does not
80+
loosen the no-duplicate-format rule for any other file or any repo
81+
without a `glama.json`.
82+
* Enforced by three coupled checks, all keyed on `glama.json`:
83+
`doc-format.yml` (skips the duplicate error for `README`),
84+
`contractiles/must/Mustfile` (`readme-md-glama-carveout` — requires the
85+
`README.md` when `glama.json` is present), and
86+
`contractiles/dust/Dustfile` (`preserve: glama-readme` — forbids cleanup
87+
from deleting it).
88+
====
89+
6390
== 2. Semantics The Estate Expects
6491

6592
=== Must

contractiles/dust/Dustfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ recovery:
2424
rollback: "git checkout HEAD~1 -- REPLACE-WITH-REAL-CONFIG-PATH"
2525
notes: "Roll back a specific config or policy file without disturbing the rest of the tree."
2626

27+
preserve:
28+
# Data-preservation carve-out: artefacts a cleanup/uninstall/de-dup pass MUST NOT remove.
29+
- name: glama-readme
30+
path: "README.md"
31+
condition: "test -f glama.json"
32+
notes: "Glama (glama.ai, the MCP-server directory) requires README.md to index this server and will not render README.adoc. When glama.json is present, do NOT delete README.md as a duplicate-format violation. README.adoc remains the canonical source of truth; regenerate README.md from it rather than dropping it."
33+
2734
deprecation:
2835
- name: example-deprecated-surface
2936
what: "REPLACE with the real API, module, or command being retired."

contractiles/must/Mustfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ checks:
2828
description: "README.adoc (or README.md) must exist."
2929
run: "test -f README.adoc || test -f README.md"
3030

31+
- name: readme-md-glama-carveout
32+
description: "Glama carve-out: if glama.json is present (repo listed on the Glama MCP-server directory, glama.ai), README.md MUST also exist — Glama requires it and will not render README.adoc. README.adoc stays canonical; README.md is maintained solely for Glama. A Glama limitation, not a policy change. No glama.json => no requirement, so non-Glama repos are unaffected."
33+
run: "test ! -f glama.json || test -f README.md"
34+
3135
- name: spdx-headers-present
3236
description: "Source files must carry SPDX-License-Identifier headers."
3337
run: "bash -uc '! rg --files . | xargs -r grep -rL SPDX-License-Identifier | rg -v \".gitkeep|.lock|LICENSE|NOTICE\" | head -1 | rg .'"

0 commit comments

Comments
 (0)