6 Commits
Author SHA1 Message Date
ayobamiseun 2e49319164 docs(tdd): make test-driven-development ecosystem-neutral (#404 Phase 1)
- SKILL.md gains a 'Discover the Stack First' step: identify the
  language, build system, checked-in wrappers, test framework, and
  documented commands before choosing any test command, and run the
  repository's own focused/full-suite commands throughout the loop
- verification checklist no longer hardcodes 'npm test'; red flag added
  for reaching for a default test command without checking the repo
- references/testing-patterns.md relabeled in place as JavaScript/
  TypeScript examples illustrating the universal principles (no
  relocation, per the #361/#236 sequencing agreed in the issue)
- new behavioral eval: a Python/unittest fixture verifying the skill
  adapts to non-npm repository tooling
2026-07-19 17:08:30 +01:00
Addy Osmani 45e1449138 feat(evals): add a three-tier skill eval framework
There was no way to measure whether skills trigger correctly, stay
distinct, or change agent behavior. This adds evals, aligned with what
the community has converged on, with a deterministic CI tier on top:

- evals/cases/<skill>.json for all 24 skills. The evals[] block uses
  Anthropic skill-creator's evals.json schema verbatim (id, prompt,
  expected_output, expectations[]) so its runner, benchmarks, and eval
  viewer work against our files unmodified. A trigger block (this
  repo's extension) adds positive/negative routing prompts per skill.
- scripts/run-evals.js, zero-dependency runner:
  Tier 2 (CI): trigger evals via stemmed TF-IDF ranking over skill
  descriptions (positive prompts must rank top-k, negative prompts
  must not rank first), catalog collision detection between skill
  descriptions, schema and coverage checks.
  Tier 3 (opt-in): --behavioral <skill> executes each eval through
  headless claude -p and grades the transcript against expectations[]
  (superpowers-style); --dry-run previews without spending tokens.
- CI: run the deterministic tier in the validate-skills job.
- Docs: evals/README.md defines the framework and prior art;
  CONTRIBUTING requires an eval file for new skills (warning-level in
  the runner until in-flight skill PRs clear); CLAUDE.md pointers.

Current baseline: 120 checks pass, 85% trigger rank-1 rate across 72
positive prompts, zero catalog collisions.
2026-07-03 23:46:30 -07:00
Federico Bartoli 9a429d0574 feat(hooks): opt-in citation cache for source-driven-development
Adds a pair of optional Claude Code hooks that cache WebFetch output
on disk but revalidate every reuse against the origin. Content is
served only when the server returns 304 Not Modified, so
source-driven-development's "verify against current docs" guarantee
still holds across sessions.

- hooks/sdd-cache-pre.sh: PreToolUse hook. For a cached entry, issues
  a HEAD with If-None-Match / If-Modified-Since. On 304, blocks the
  WebFetch (exit 2) and returns cached content via stderr; otherwise
  allows the fetch through.
- hooks/sdd-cache-post.sh: PostToolUse hook. Captures response plus
  current ETag / Last-Modified. Entries without a validator are
  never stored — without one, the pre hook cannot verify freshness
  and caching would amount to trusting memory.
- Cache key: sha256(url + normalized_prompt). Prompt is lowercased
  and whitespace-collapsed so stylistic variants hit the same entry;
  semantically different prompts still miss.
- Hard 24h TTL as a safety net against misbehaving origins.
- hooks/SDD-CACHE.md: opt-in setup, end-to-end testing, debugging.
- .gitignore: ignore the .claude/sdd-cache/ directory.

Hooks are opt-in: users register them in .claude/settings.json. The
source-driven-development skill itself is unchanged.
2026-04-16 19:34:38 +02:00
Federico Bartoli 1730a69454 Add simplify-ignore hook for block-level code protection
Single bash script that prevents the model from seeing (and accidentally
simplifying) code blocks marked with simplify-ignore annotations during
/code-simplify sessions.

Hook flow:
- PreToolUse Read: backs up file, replaces blocks with BLOCK_<hash> placeholders
- PostToolUse Edit|Write: expands placeholders, applies model changes, re-filters
- Stop: restores files from backup when session ends

Features:
- Hash-based tokens (content-addressed, unambiguous round-trip)
- Multi-block support per file
- Optional reason string: /* simplify-ignore-start: perf-critical */
- Language-aware placeholders (preserves comment syntax per language)
- Glob-safe parameter expansion (Bash 3.2 compatible)
- Atomic locking with stale lock recovery
- Trailing newline preservation
- Self-healing recovery from interrupted sessions
- Cross-platform: Bash 3.2+, jq, shasum/sha1sum (macOS, Linux, Git Bash)

Implements #2
2026-03-18 05:20:14 +01:00
Addy OsmaniandClaude Opus 4.6 3e4a665e4e prepare repo for public release
Add MIT LICENSE file, CONTRIBUTING.md with skill quality guidelines,
expand .gitignore for safety, and remove leftover idea-refine.zip artifact.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 14:40:04 -08:00
Addy Osmani cbb3585aef add gitignore and readme 2026-02-15 12:35:52 -08:00