Skip to content

Commit f9c774e

Browse files
catstrikeCopilotAndrei Gaspariangasparianclaude
authored
[DBA-295] Migrate validate-agent-guidance from Bash to Python (#79)
* DBA-295 Migrate `validate-agent-guidance` from Bash to Python * Replace `validate-agent-guidance` script with `make lint-skills` in smoke test * Update .pre-commit-config.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Address copilot comments * Redundant copy of Makefile in documentation * Update scripts/validate_agent_guidance.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * drop autosteer skill from evals * Update scripts/validate_agent_guidance.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update scripts/validate_agent_guidance.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix ruff-format on validate_agent_guidance.py Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Andrei Gasparian <andrei.gasparian@jetbrains.com> Co-authored-by: Andrey Gasparyan <gasparian.andrey@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e29c765 commit f9c774e

6 files changed

Lines changed: 249 additions & 145 deletions

File tree

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ repos:
3636
- id: validate-agent-guidance
3737
name: validate-agent-guidance
3838
description: Validate agent skills and guidance docs structure
39-
entry: scripts/validate-agent-guidance.sh
40-
language: script
39+
entry: uv run python scripts/validate_agent_guidance.py
40+
language: system
4141
pass_filenames: false
42-
files: ^(\.claude/skills/|docs/(python-coding-guidelines|architecture|testing-strategy)\.md|scripts/validate-agent-guidance\.sh)$
42+
files: ^(\.claude/skills/|CLAUDE\.md|docs/(python-coding-guidelines|architecture|testing-strategy)\.md|scripts/validate_agent_guidance\.py)$

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ nickname:
3232
@git config user.email | cut -d@ -f1
3333

3434
lint-skills:
35-
scripts/validate-agent-guidance.sh
35+
uv run python scripts/validate_agent_guidance.py
3636

3737
smoke-skills:
3838
scripts/smoke-test-skills.sh

docs/testing-strategy.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,6 @@ Run the smallest relevant slice first, then broaden before finalizing:
4141
- Add a regression test for every bug fix when feasible.
4242
- Test files mirror source modules (e.g., `test_init.py` tests `commands/init.py`).
4343

44-
## Make Targets
45-
46-
| Target | Command | What it does |
47-
|----------------|------------------------------------------------------|----------------------------|
48-
| `make setup` | `uv sync --dev` + pre-commit + verify | One-time environment setup |
49-
| `make check` | `uv run pre-commit run --all-files` | Ruff lint + mypy |
50-
| `make test` | `uv run pytest tests/ -v` (sources `.env` if present)| Unit tests |
51-
| `make test-cov` | `uv run pytest ... --cov` | Coverage report (no threshold) |
52-
| `make test-cov-check`| `uv run pytest ... --cov` (threshold from `pyproject.toml`)| Coverage enforcement |
53-
| `make lint-skills` | `scripts/validate-agent-guidance.sh` | Static checks on agent guidance |
54-
| `make smoke-skills` | `scripts/smoke-test-skills.sh` | Functional skill verification |
55-
5644
## What Does NOT Run in CI / Pre-commit
5745

5846
Everything above (lint, type-check, unit tests, skill validation) is

scripts/smoke-test-skills.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ run_test() {
2424
}
2525

2626
echo "=== Tier 1: Static validation ==="
27-
run_test "validate-agent-guidance" "scripts/validate-agent-guidance.sh"
27+
run_test "validate-agent-guidance" "make lint-skills"
2828

2929
echo ""
3030
echo "=== Tier 2: Functional smoke tests ==="

scripts/validate-agent-guidance.sh

Lines changed: 0 additions & 128 deletions
This file was deleted.

0 commit comments

Comments
 (0)