diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index fb2857d..fda7e31 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -11,7 +11,7 @@ Write **caveman-full** by default. See [`CONTRIBUTING.md`](../CONTRIBUTING.md#ca ## Test - [ ] `pytest tests/ -q` (if code touched) -- [ ] `python scripts/check_docs.py` (if docs touched) +- [ ] `python bin/check_docs.py` (if docs touched) - [ ] ADR added if boundary/contract changed ## Links diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a786b9e..39f7444 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -37,10 +37,10 @@ jobs: run: pip install --quiet pyyaml - name: ADR immutability (no edits to accepted records) - run: python scripts/check_adrs.py --base origin/main + run: python bin/check_adrs.py --base origin/main - name: Documentation rules (links, glossary, readability) - run: python scripts/check_docs.py + run: python bin/check_docs.py verify: name: Verify simulator diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 88164d9..1692b18 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,7 +17,7 @@ The CI pipeline enforces this: | Gate | When it runs | | --- | --- | -| `python scripts/check_docs.py` | Every push/PR (`docs-verify` job) — links, glossary anchors, readability rules ([ci-rules](docs/improvement/ci-rules.md)) | +| `python bin/check_docs.py` | Every push/PR (`docs-verify` job) — links, glossary anchors, readability rules ([ci-rules](docs/improvement/ci-rules.md)) | | `pytest tests/` | Every push/PR (`verify` job) | | `RUN pytest tests/` in the simulator Docker build | Every `docker build` — a red test blocks the image | | Smoke flight + DuckDB assertion | Every push/PR | diff --git a/scripts/check_adrs.py b/bin/check_adrs.py similarity index 100% rename from scripts/check_adrs.py rename to bin/check_adrs.py diff --git a/scripts/check_docs.py b/bin/check_docs.py similarity index 99% rename from scripts/check_docs.py rename to bin/check_docs.py index b0f2c4a..90daf29 100644 --- a/scripts/check_docs.py +++ b/bin/check_docs.py @@ -166,7 +166,7 @@ def _line_no(text: str, index: int) -> int: def run_checks(warnings_as_errors: bool = False) -> int: - rules = load_rules(ROOT / "scripts/docs_rules.yaml") + rules = load_rules(RULES_PATH) anchor_cache: dict[Path, set[str]] = {} all_errors: list[str] = [] all_warnings: list[str] = [] diff --git a/scripts/docs_rules.yaml b/bin/docs_rules.yaml similarity index 94% rename from scripts/docs_rules.yaml rename to bin/docs_rules.yaml index 63c4233..938376b 100644 --- a/scripts/docs_rules.yaml +++ b/bin/docs_rules.yaml @@ -1,4 +1,4 @@ -# Documentation rules enforced by CI (scripts/check_docs.py). +# Documentation rules enforced by CI (bin/check_docs.py). # See docs/improvement/ci-rules.md for rationale and PR workflow. markdown_paths: diff --git a/docs/improvement/2026-07-10-audit.md b/docs/improvement/2026-07-10-audit.md index 9b888dc..47c0c8b 100644 --- a/docs/improvement/2026-07-10-audit.md +++ b/docs/improvement/2026-07-10-audit.md @@ -63,7 +63,7 @@ Manual pass over `docs/`, all READMEs, and glossary. Goal: correct links, unify ## Suggested CI checks (for issue #1) -Implemented in [`scripts/check_docs.py`](../../scripts/check_docs.py) — see [ci-rules.md](ci-rules.md). +Implemented in [`bin/check_docs.py`](../../bin/check_docs.py) — see [ci-rules.md](ci-rules.md). ## Files touched diff --git a/docs/improvement/README.md b/docs/improvement/README.md index cfef87f..162ba80 100644 --- a/docs/improvement/README.md +++ b/docs/improvement/README.md @@ -15,7 +15,7 @@ Issues, PRs, and reviews default to **caveman-full** ([`CONTRIBUTING.md`](../../ ## CI automation -Enforced in Gitea Actions (`docs-verify` job). Rules live in [`scripts/docs_rules.yaml`](../../scripts/docs_rules.yaml); see [ci-rules.md](ci-rules.md). +Enforced in Gitea Actions (`docs-verify` job). Rules live in [`bin/docs_rules.yaml`](../../bin/docs_rules.yaml); see [ci-rules.md](ci-rules.md). Originally tracked in [issue #1](https://git.produktor.io/eSlider/swarm-house/issues/1). diff --git a/docs/improvement/ci-rules.md b/docs/improvement/ci-rules.md index 13929b1..8887be6 100644 --- a/docs/improvement/ci-rules.md +++ b/docs/improvement/ci-rules.md @@ -2,7 +2,7 @@ Automated checks for markdown in this repository. Enforced on every **pull request** and on **push to `main`** (including docs-only pushes that skip the simulator gate). -Implementation: [`scripts/check_docs.py`](../../scripts/check_docs.py) reads [`scripts/docs_rules.yaml`](../../scripts/docs_rules.yaml). +Implementation: [`bin/check_docs.py`](../../bin/check_docs.py) reads [`bin/docs_rules.yaml`](../../bin/docs_rules.yaml). Workflow: [`.github/workflows/release.yaml`](../../.github/workflows/release.yaml) job **`Verify documentation`**. @@ -46,13 +46,13 @@ Docs-only changes therefore still get link and glossary validation on `main`; th ## Local run ```bash -python scripts/check_docs.py -python scripts/check_adrs.py --base origin/main -python scripts/check_docs.py --warnings-as-errors # treat section-link warnings as failures +python bin/check_docs.py +python bin/check_adrs.py --base origin/main +python bin/check_docs.py --warnings-as-errors # treat section-link warnings as failures ``` ## Changing rules -1. Edit `scripts/docs_rules.yaml` (paths, banned targets, preferred anchors). -2. Adjust `scripts/check_docs.py` only when adding a new rule *type*. +1. Edit `bin/docs_rules.yaml` (paths, banned targets, preferred anchors). +2. Adjust `bin/check_docs.py` only when adding a new rule *type*. 3. Add a row to the table above and mention it in the audit/improvement record if the change is significant. diff --git a/prototype/tsconfig.tsbuildinfo b/prototype/tsconfig.tsbuildinfo index 6953ed3..6f80c2e 100644 --- a/prototype/tsconfig.tsbuildinfo +++ b/prototype/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"root":["./src/App.tsx","./src/main.tsx","./src/sim.ts"],"version":"5.9.3"} \ No newline at end of file +{"root":["./src/App.tsx","./src/live.ts","./src/main.tsx","./src/sim.ts","./src/vite-env.d.ts"],"version":"5.9.3"} \ No newline at end of file diff --git a/simulator/tests/__init__.py b/simulator/tests/__init__.py index e69de29..8b13789 100644 --- a/simulator/tests/__init__.py +++ b/simulator/tests/__init__.py @@ -0,0 +1 @@ + diff --git a/simulator/tests/test_check_adrs.py b/simulator/tests/test_check_adrs.py index af90ee4..f276388 100644 --- a/simulator/tests/test_check_adrs.py +++ b/simulator/tests/test_check_adrs.py @@ -1,4 +1,4 @@ -"""Tests for scripts/check_adrs.py — ADR immutability gate.""" +"""Tests for bin/check_adrs.py — ADR immutability gate.""" from __future__ import annotations @@ -8,7 +8,7 @@ from pathlib import Path import pytest -SCRIPTS = Path(__file__).resolve().parents[2] / "scripts" +SCRIPTS = Path(__file__).resolve().parents[2] / "bin" sys.path.insert(0, str(SCRIPTS)) from check_adrs import find_modified_adrs, run_check # noqa: E402 diff --git a/simulator/tests/test_check_docs.py b/simulator/tests/test_check_docs.py index f079da3..540f5bd 100644 --- a/simulator/tests/test_check_docs.py +++ b/simulator/tests/test_check_docs.py @@ -1,4 +1,4 @@ -"""Tests for scripts/check_docs.py — documentation CI rules.""" +"""Tests for bin/check_docs.py — documentation CI rules.""" from __future__ import annotations @@ -7,7 +7,7 @@ from pathlib import Path import pytest -SCRIPTS = Path(__file__).resolve().parents[2] / "scripts" +SCRIPTS = Path(__file__).resolve().parents[2] / "bin" sys.path.insert(0, str(SCRIPTS)) from check_docs import ( # noqa: E402 @@ -57,7 +57,7 @@ def test_broken_link_detected(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) - docs.mkdir() (docs / "00-glossary.md").write_text("# Glossary\n\n## Data & storage\n") (docs / "bad.md").write_text("See [missing](missing.md).\n") - rules = tmp_path / "scripts" + rules = tmp_path / "bin" rules.mkdir() (rules / "docs_rules.yaml").write_text( "markdown_paths:\n - docs/**/*.md\n" diff --git a/var/t1/.gitkeep b/var/t1/.gitkeep index e69de29..8b13789 100644 --- a/var/t1/.gitkeep +++ b/var/t1/.gitkeep @@ -0,0 +1 @@ + diff --git a/var/t3/.gitkeep b/var/t3/.gitkeep index e69de29..8b13789 100644 --- a/var/t3/.gitkeep +++ b/var/t3/.gitkeep @@ -0,0 +1 @@ +