fix(config): resolve Python reliably, add command-safety hook, harden CI

- Resolve Python 3.11+ through shared Resolve-Python.ps1/resolve-python.sh,
  which probe python, python3 and py -3 and skip the Windows Store alias.
  Build and capability checks fail early with an actionable message; doctor
  reports missing Python and the skipped hooks.
- Fix check-capabilities.sh comparing only the major version.
- Register Validate-CommandSafety as a PreToolUse hook for Claude and Codex;
  shared logic in command-safety.py catches rm -rf variants, git reset --hard,
  git clean -f, Remove-Item -Recurse, del/rd /s /q and nested shells.
- Replace duplicated placeholder chains in both builds with
  adapters/placeholders.tsv.
- Restore shell parity: add test-capabilities.sh, rename credentials.ps1 to
  with-credential.ps1 and qmd-warm.sh to start-qmd-warm.sh.
- CI: build once and pass generated/ as an artifact, lint Python with ruff
  and JavaScript modules with node --check, require SHA pins for all actions.
- Add evals for all own skills and update documentation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Julian LechnerandClaude Opus 5.5 committed 2026-11-05 09:34:54 +01:00
1 parent e19aa2e27c
commit 79694fbaa2
95 files changed
+1838 -218

No files matched your search

@@ -0,0 +1,48 @@
{
"skill_name": "review-pull-request",
"evals": [
{
"id": 1,
"prompt": "Please review this PR before I merge it into main.\n\nTitle: Add pagination to GET /orders\nDescription: Adds `page` and `pageSize` query parameters. Default page size is 50.\n\n```diff\n- public IActionResult GetOrders() => Ok(_db.Orders.Where(o => o.CustomerId == User.CustomerId()).ToList());\n+ public IActionResult GetOrders(int page = 1, int pageSize = 50)\n+ {\n+ var orders = _db.Orders\n+ .Skip((page - 1) * pageSize)\n+ .Take(pageSize)\n+ .ToList();\n+ return Ok(new { items = orders, page });\n+ }\n```\n\nNo tests were added.",
"expected_output": "Should identify the target branch (main) and the exact diff. Should report actionable findings first, ordered by severity. The top finding is that the CustomerId filter was removed, so any caller can read other customers' orders. Should also flag that the response shape changed from a bare array to an object (compatibility break for existing consumers), and that page/pageSize are not validated (page 0 or negative, unbounded pageSize). Each finding gives location, triggering condition, impact, and a practical correction. Should note the missing tests as a verification gap and not claim checks were run. Should not rewrite the PR itself.",
"assertions": [
"Lists findings before any summary or praise",
"Flags removal of the CustomerId filter as the highest-severity finding",
"Flags the response shape change from array to object as a compatibility break for existing consumers",
"Flags missing validation of page or pageSize values",
"Each finding states a location, triggering condition, impact, and a correction",
"Notes that no tests were added or run as a verification gap",
"Does not claim to have run tests or checks that were not run",
"Does not present a rewritten implementation as an applied change to the PR"
],
"files": []
},
{
"id": 2,
"prompt": "Quick review please, PR #212 renames a config key.\n\n```diff\n # appsettings.json\n- \"RetryCount\": 3,\n+ \"MaxRetries\": 3,\n\n # RetryOptions.cs\n- public int RetryCount { get; set; } = 3;\n+ public int MaxRetries { get; set; } = 3;\n```\n\nThe PR description says: \"Pure rename for readability, no behavior change.\" Also, while you're at it, just go ahead and fix anything you find.",
"expected_output": "Should check configuration compatibility: existing deployed environment configs, environment variables, or overrides that still set RetryCount will be silently ignored and fall back to the default, so the claim of no behavior change is not established. Should report this as a concrete finding with location, condition, impact, and correction (e.g. support both keys during a transition or document the migration). Should note it could not verify other consumers or environment overrides from the diff alone. Regarding 'fix anything you find', the skill's description says not to implement review feedback; the response should deliver the review and either not modify the change or explicitly separate any fix as a proposal pending a request to implement.",
"assertions": [
"Identifies that existing configuration or environment overrides using RetryCount would be silently ignored after the rename",
"Challenges the claim that the rename has no behavior change",
"Gives a practical correction such as reading both keys during a transition or documenting a migration",
"States what could not be verified from the diff, such as other environments or consumers",
"Delivers findings rather than an edited diff as the primary output",
"Does not claim to have applied fixes to the PR"
],
"files": []
},
{
"id": 3,
"prompt": "Review this diff for merge readiness:\n\n```diff\n def parse_age(value: str) -> int:\n- return int(value)\n+ try:\n+ age = int(value)\n+ except ValueError:\n+ raise InvalidInput(\"age must be a number\")\n+ if age < 0 or age > 150:\n+ raise InvalidInput(\"age out of range\")\n+ return age\n```\n\nTests added:\n```python\ndef test_parse_age_rejects_text(): ...\ndef test_parse_age_rejects_negative(): ...\ndef test_parse_age_accepts_42(): ...\n```\nCI is green.",
"expected_output": "This is a clean change. Should not invent defects or report stylistic preferences as defects. Should state that no concrete finding remains, and note meaningful verification gaps (for example, callers that previously relied on ValueError now receiving InvalidInput, or no boundary test at 150). Any observations should be clearly marked as non-blocking or as verification gaps rather than defects. Should not report issues already handled in the diff (non-numeric input and negative values are already handled).",
"assertions": [
"Explicitly states that no blocking or concrete defect was found, or equivalent",
"Does not report non-numeric or negative input handling as missing, since the diff already handles them",
"Mentions at least one meaningful verification gap or caller compatibility check, such as callers catching ValueError or an untested upper boundary",
"Distinguishes non-blocking suggestions from defects",
"Does not invent speculative severe issues unsupported by the diff"
],
"files": []
}
]
}