documentation-layout: treat symlinked markdown as pointers (allow module READMEs symlinked into docs/) #152
Labels
No labels
burndown-2026-06
coherence-core
consult
headless
interactive
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
coilyco-flight-deck/agentic-os#152
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
check_documentation_layout.pywalks*.mdviarglob, which yields symlinked markdown files. The location rule (check_markdown_locations) then fires on whichever copy lands in a forbidden dir (anything outside repo root,docs/*.md, a skill path, orexamples/). This blocks a useful pattern: a module folder (e.g.warp/) carrying aREADME.mdthat points back into the canonicaldocs/surface, so GitHub renders the module README while the doc itself stays indocs/under the size cap.A symlinked
.mdis a pointer, not content-at-rest, so the location and size rules should treat it as such instead of flagging the pointer (or double-counting its target's bytes).Direction (decided)
Canonical markdown stays in an allowed, size-capped location. Module folders carry a symlinked pointer into it. Concretely for the warp module:
docs/warp.md(real file, linted normally).warp/README.md -> ../docs/warp.md(symlink, GitHub follows it to render the module README).The rejected inverse (real file in
warp/, pointer indocs/) does not work and is not pursued: the realwarp/README.mdviolates the location rule on its own, and allowing it would require broadening allowed locations, which erodes the "markdown lives in exactly three places" invariant the validator protects.Change
In
agentic_os/check_documentation_layout.py:check_markdown_locations()- skiprelwhen(REPO_ROOT / rel).is_symlink(). A symlinked.mdis a pointer, not a doc living there.check_markdown_sizes()- skip symlinks too, so the target is not double-counted (it gets size-checked at its real path).Guardrails so "skip" does not hide bugs:
path.exists()is False on a broken link. Emit a violation (a broken README renders empty on GitHub) instead of silently skipping.path.resolve()must sit underREPO_ROOT. An escaping symlink means the content never gets linted and loses size-cap coverage, so fail it.Tests
warp/README.md -> ../docs/warp.md) passes location + size.REPO_ROOT) fails.Artifacts to land
docs/warp.mdstarter doc +warp/README.md -> ../docs/warp.mdsymlink.docs/documentation-layout-exceptions.mddocumenting the symlink-pointer rule.This is validator semantics (generalizable), so it lands in
agentic-os(the repo that ships the hook), not as a per-repopyproject.tomlopt-out. It dogfoods here.Backlog burndown 2026-06-17: closing low-priority (P3/P4) to bring the open count to a manageable level. Nothing lost — reopen if this resurfaces. Batch tag:
burndown-2026-06.