This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow-steward.git


The following commit(s) were added to refs/heads/main by this push:
     new 48c3d6c6 chore(pre-commit): add spec-validate hook for spec-loop specs 
(#489)
48c3d6c6 is described below

commit 48c3d6c661b4395c2bcbaef2b212fd25855f442e
Author: Justin Mclean <[email protected]>
AuthorDate: Thu Jun 11 19:23:34 2026 +1000

    chore(pre-commit): add spec-validate hook for spec-loop specs (#489)
    
    The spec-validator tool already ships a `spec-validate` CLI and passes
    all tests, but was never wired into pre-commit. Any spec-frontmatter or
    section regression would therefore only surface in CI, not at commit
    time. Hook fires on changes to `tools/spec-loop/specs/**/*.md` and to
    the validator source so rule updates are reapplied automatically.
    
    Generated-by: Claude (Opus 4.7)
---
 .pre-commit-config.yaml | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 6659bad8..7893f48d 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -179,3 +179,17 @@ repos:
         entry: uv run --project tools/skill-and-tool-validator 
skill-and-tool-validate
         files: 
^(skills/.*\.md|tools/[^/]+/README\.md|docs/labels-and-capabilities\.md|tools/skill-and-tool-validator/(src|pyproject\.toml))
         pass_filenames: false
+
+  # Validate `tools/spec-loop/specs/` frontmatter and required body sections
+  # via the `spec-validate` CLI. Re-fires on spec-source changes so rule
+  # updates get re-applied. `--project` (not `--directory`) so CWD stays at
+  # repo root; the directory argument is passed directly to the CLI so it
+  # scans the full specs tree even when only one file changed.
+  - repo: local
+    hooks:
+      - id: spec-validate
+        name: spec-validate (spec-loop specs frontmatter + sections)
+        language: system
+        entry: uv run --project tools/spec-validator spec-validate 
tools/spec-loop/specs/
+        files: 
^(tools/spec-loop/specs/.*\.md|tools/spec-validator/(src|pyproject\.toml))
+        pass_filenames: false

Reply via email to