mirror of
https://github.com/obra/superpowers.git
synced 2026-05-11 19:49:05 +08:00
evals: use pre-commit hooks
This commit is contained in:
@@ -8,14 +8,15 @@ This measures whether skill-text-level guidance closes the architectural
|
||||
verification gap observed in baseline measurements (4.7: 10% gate discovery
|
||||
vs 4.6: 62% gate discovery).
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from setup_helpers.spec_targets_wrong_component import (
|
||||
create_spec_targets_wrong_component,
|
||||
)
|
||||
|
||||
|
||||
CLAUDE_MD_WITH_CHECKPOINT = """\
|
||||
# Pulse Dashboard
|
||||
|
||||
@@ -32,9 +33,13 @@ Internal team dashboard for Pulse Corp.
|
||||
Before implementing any feature from a design spec:
|
||||
|
||||
1. Read the design spec completely
|
||||
2. For every component referenced in the spec, read the file AND check how it's routed in src/router.tsx
|
||||
3. Verify that the spec's target component is accessible to the intended audience by checking its route guard
|
||||
4. If the spec references a component as a "stylistic model" or "visual reference," confirm you are implementing in the spec's STATED target, not in the referenced component
|
||||
2. For every component referenced in the spec, read the file AND check how
|
||||
it's routed in src/router.tsx
|
||||
3. Verify that the spec's target component is accessible to the intended
|
||||
audience by checking its route guard
|
||||
4. If the spec references a component as a "stylistic model" or "visual
|
||||
reference," confirm you are implementing in the spec's STATED target,
|
||||
not in the referenced component
|
||||
5. Cite the routing evidence in your implementation plan before writing any code
|
||||
"""
|
||||
|
||||
@@ -59,5 +64,9 @@ def create_spec_targets_wrong_component_with_checkpoint(workdir: Path) -> None:
|
||||
# Instead, add a new commit with the updated CLAUDE.md so the agent
|
||||
# sees it in the working tree.
|
||||
from setup_helpers.base import _git
|
||||
|
||||
_git(["git", "add", "CLAUDE.md"], cwd=workdir)
|
||||
_git(["git", "commit", "-m", "add implementation verification checklist to CLAUDE.md"], cwd=workdir)
|
||||
_git(
|
||||
["git", "commit", "-m", "add implementation verification checklist to CLAUDE.md"],
|
||||
cwd=workdir,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user