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,45 @@
{
"skill_name": "business-review",
"evals": [
{
"id": 1,
"prompt": "Does this change meet the requirement?\n\nRequirement (JIRA SHOP-88): \"Customers with Gold membership get free shipping on orders of 50 EUR or more. Silver members get free shipping from 100 EUR. Everyone else pays shipping.\"\n\nImplementation:\n```ts\nfunction shippingCost(order: Order, customer: Customer): number {\n if (customer.tier === 'gold' && order.subtotal > 50) return 0;\n if (customer.tier === 'silver' && order.subtotal > 100) return 0;\n return standardShipping(order);\n}\n```",
"expected_output": "Should identify actors (Gold, Silver, other customers) and acceptance criteria from SHOP-88. Should flag that the implementation uses > instead of >=, so orders of exactly 50 EUR (Gold) or 100 EUR (Silver) are wrongly charged. Should ask about material ambiguity rather than inventing policy, e.g. whether 'order' value means subtotal before or after discounts or including VAT. Should report gaps with affected actor, workflow, evidence, impact, and the decision needed.",
"assertions": [
"Identifies Gold, Silver, and other customers as the affected actors",
"Flags the boundary error where exactly 50 EUR or exactly 100 EUR orders are charged shipping",
"Cites the requirement text as evidence for the gap",
"Raises the ambiguity of whether the threshold applies to subtotal before or after discounts or VAT as a question",
"Does not invent a business rule to resolve that ambiguity",
"Each gap names the affected actor and its impact"
],
"files": []
},
{
"id": 2,
"prompt": "Product wants: \"Managers can approve expense reports of their direct reports.\" Here's the PR summary: added an `Approve` button on the expense report page, visible when `currentUser.role === 'Manager'`, and the API `POST /expenses/{id}/approve` checks `user.role == Manager`. Approved reports go to Finance. Does this satisfy the business requirement?",
"expected_output": "Should trace the workflow including permissions and handoffs. Should identify that any Manager can approve any report, not only those of their direct reports, which violates the requirement. Should consider related cases: self-approval by a manager on their own report, reports already approved or rejected, a manager whose report changed teams. Should separate stated requirements, observed behavior, and assumptions, and ask about material ambiguity (e.g. may managers approve their own expenses, delegation during absence) rather than inventing policy.",
"assertions": [
"Flags that the role check allows any manager to approve any report, not only direct reports",
"Identifies the self-approval case as a gap or open question",
"Considers report states such as already approved or rejected",
"Separates the stated requirement from observed behavior",
"Asks about ambiguous policy rather than inventing it",
"Does not focus on code style or implementation preferences"
],
"files": []
},
{
"id": 3,
"prompt": "Review this change from a business perspective: we renamed the React component `UserProfileCard` to `ProfileCard`, moved it into `components/profile/`, and switched its styling from CSS modules to Tailwind. No visible change in the UI. I personally think the old CSS modules were cleaner.",
"expected_output": "There is no stated business requirement or workflow change; the change is a refactor with no visible behavior change. Should state that no business-level gaps are evident or ask what business goal the change was meant to serve. Should not substitute implementation preference (CSS modules vs Tailwind) for business intent. May note that it could not verify the 'no visible change' claim.",
"assertions": [
"States that no business requirement or user workflow is affected, or asks for the intended business goal",
"Does not report the CSS modules versus Tailwind choice as a business gap",
"Does not invent business requirements for the refactor",
"Notes whether the no-visible-change claim was verified"
],
"files": []
}
]
}