Commit Graph

8 Commits

Author SHA1 Message Date
dafang ab39a4be56 refactor(cs-skill): 对齐 feat/epic Spec 与 runtime 2026-07-10 11:15:28 +08:00
dafang df9295700a feat(eval-cs-skill): e2e pipeline hardening from cs-feat smoke findings
- neutral prompt title (issue→user request); context block adds goal-driver
  waiver (headless has no visible Task agent — agents were rule-abidingly
  handing off and exiting with zero implementation) and an explicit "process
  artifacts still required" clause (deconfound: sonnet artifact 0→0.22)
- scenario.artifact_glob: fixtures carry their own artifact contract
  (cs-feat features/**/*design*), fix-note default kept for compat
- bug_id now optional (feature scenarios inject nothing); .codestable tree
  snapshot in scorer evidence

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-08 13:37:16 +08:00
dafang b086f00230 fix(eval-cs-skill): e2e prompt template no longer leaks process requirements
P0 L2 finding: the shared output-requirements block told BOTH variants to
write fix-note and run pytest, handing the skill's process contract to the
bare control group and flattening the artifact metric. The shared template
now stays neutral (fix on disk + summarize); process requirements come from
the skill text itself. Tests assert the inverse (fix-note/pytest must NOT
appear in the shared template) so the leak cannot silently return.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-08 08:25:34 +08:00
dafang 3268f4e268 feat(eval-cs-skill): e2e-outcome pipeline — seed workdir, hidden-test scoring
New answerType e2e-outcome: agent runs a full skill workflow inside a real
seed repo workdir (prepare_e2e_workdir: build-seed + bug inject), scored
mechanically by hidden acceptance tests + regression suite + artifact
contract (all [measured]). Scoring moved inside the workdir lifetime;
HarnessResult.workdir carries the repo path to scorers. 10 offline tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-08 06:41:36 +08:00
dafang 3bd84a6d81 feat(eval-cs-skill): harden runner + add routing-decision eval engine
- runner: per-cell checkpoint/resume (kill-safe), --fresh, --offset/--limit
  segmenting; per-cell error tolerance (one 504 no longer kills a segment)
- adapter_api: backoff retry on transient 429/5xx (slow-model gateway 504s)
- judge_issues: cover recall_judge (was llm_judge-only, missed same-source bias)
- new routing-decision answerType + build_routing_prompt + routing_decision
  scorer (mechanical [measured]; result_type_any/target_any semantic-equivalent
  matching) — decision fixtures are now executable
- tests: resume round-trip, segment tolerance, 504 retry, routing engine

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 20:54:08 +08:00
dafang 98f5c802dc refactor(eval-cs-skill): rename cs-skill-lab -> eval-cs-skill
Now that build-cs-skill owns skill authoring, this skill is purely the measured
eval/optimize loop, so eval-cs-skill is the clearer name. Physical rename of
.claude/skills/cs-skill-lab -> eval-cs-skill and experiments/cs-skill-lab-001 ->
eval-cs-skill-001, with all self-references, tests, ADR-003, and results updated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 10:25:14 +08:00
dafang ca89d6e41e feat(cs-skill-lab): add semantic recall_judge oracle; fix token-matcher false negatives
Manual inspection during the real-model campaign caught a second measurement
bug: planted_defect's token-overlap oracle gives false negatives on prose /
symbol answers (e.g. ">= changed to >", "removed early-return guard"). On
cs-refactor both sonnet and haiku actually caught every behavior-equivalence
violation, but the token matcher scored them 0.62/0.75. A judge-based semantic
recall oracle scores both at 1.00.

- add scorers/recall_judge.py: an independent judge decides, per defect,
  whether the output identifies it (wording-agnostic); tagged [soft]; falls
  back to token overlap offline / when no judge_model is set
- committed eval suite uses planted_defect + recall_judge
- test for the offline token-fallback path

Corrected fair review-skill baseline (onboard context + recall_judge, sonnet
+ haiku): cs-issue/cs-audit/cs-refactor all ~1.00 across both models. The
earlier "gaps" were eval artifacts (missing context, brittle scorer, k=1
variance), not skill/model defects.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 09:20:47 +08:00
dafang bf79cb4d8d feat(cs-skill-lab): add skill engineering eval/autoresearch loop
Add cs-skill-lab, a project-local maintainer skill (.claude/skills/, NOT
shipped in the codestable plugin) for engineering cs skills end to end:
author -> eval -> optimize -> release, across models/harnesses, reusing the
BAIME discipline (dual value function, pre-registration, [measured] honesty).

- runner + harness adapter registry (mock/mock-weak offline; claude-headless,
  codex-cli, paseo, api real) + scorers (planted_defect, dod_gate, llm_judge)
  + metrics tagged [measured]/[soft]/[underpowered]; cost dry-run + budget cap
- optimize.py OCA loop (V_instance/V_meta, convergence), regression battery,
  bump_version, adapt_extracted_skill, enqueue (cron autonomy), calibrate_judge
- 8 eval experiments (code-review/issue-fix/audit/refactor/feat/epic/docs +
  cs-skill-lab self-reference); cs-feedback -> regression fixture bridge
- 5 pytest suites; ADR-003; generated eval outputs gitignored

Land a [measured] cross-model fix into cs-code-review: an ad-hoc/bare-input
fast path so weaker models review a bare diff instead of refusing on missing
CodeStable context (claude-haiku-4-5 recall 0.31 -> 1.00, sonnet unchanged;
evidence in experiments/cs-code-review-robustness-001).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 08:31:08 +08:00