Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ jobs:

- name: Manifest drift gate (Phase 0 / Track C)
run: make check-manifest

- name: docs/ prose-only gate
run: make check-docs-prose
20 changes: 19 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: install hooks test test-lf watch lint format mypy cov check push pull \
sources sources-anno sources-ydb serve-anno extract reconcile validate all clean \
integrated check-manifest
integrated check-manifest check-docs-prose

PYTHON := .venv/bin/python
PYTEST := .venv/bin/pytest
Expand Down Expand Up @@ -117,3 +117,21 @@ integrated:
# every `exposes.*` payload still exists on disk and (for .json) parses.
check-manifest: integrated
$(PYTHON) tools/check-repo-meta.py dist/repo.meta.json

# Guardrail: docs/ holds only human-readable prose. Non-prose artifacts
# (generated data, JSON/TSV output, copy-paste examples, scaffolding
# templates) belong under dist/, examples/, templates/, or a top-level
# domain-specific directory — not docs/.
check-docs-prose:
@if [ ! -d docs ]; then echo "check-docs-prose: no docs/ directory ✓"; exit 0; fi; \
violations=$$(find docs -type f \
! -name '*.md' ! -name '*.markdown' \
! -name '*.png' ! -name '*.jpg' ! -name '*.jpeg' \
! -name '*.gif' ! -name '*.svg' ! -name '*.webp' \
! -name '.gitkeep'); \
if [ -n "$$violations" ]; then \
echo "ERROR: non-prose files under docs/ — move to dist/, examples/, templates/, or a top-level domain dir:" >&2; \
echo "$$violations" >&2; \
exit 1; \
fi; \
echo "check-docs-prose: docs/ is prose-only ✓"
15 changes: 3 additions & 12 deletions src/m_standard/tools/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,10 @@
def _integrated_dir(project_root: Path) -> Path:
"""Resolve the integrated/ directory location.

The canonical layout has `integrated/` at the repo root, alongside
`per-source/`, `schemas/`, `sources/`, and `src/`. The repo briefly
held it at `docs/integrated/` (3bfb947 .. its reversion); the
fallback is kept for one release cycle so a stale checkout still
validates.
`integrated/` lives at the repo root, alongside `per-source/`,
`schemas/`, `sources/`, and `src/`.
"""
canonical = project_root / "integrated"
if canonical.is_dir():
return canonical
legacy = project_root / "docs" / "integrated"
if legacy.is_dir():
return legacy
return canonical
return project_root / "integrated"


# Names that are ALWAYS tracked under sources/<src>/ regardless of
Expand Down
Loading