Skip to content

feat(skills): SkillMatcher extraction + SQLite registry#7

Merged
jonathanpeterwu merged 17 commits intomainfrom
feature/skill-matcher-sqlite-registry
Mar 28, 2026
Merged

feat(skills): SkillMatcher extraction + SQLite registry#7
jonathanpeterwu merged 17 commits intomainfrom
feature/skill-matcher-sqlite-registry

Conversation

@jonathanpeterwu
Copy link
Copy Markdown
Collaborator

Summary

  • Port skill-eval.cjs scoring engine to TypeScript SkillMatcher (stateless, pure functions)
  • Replace Redis-backed SkillStorageService with SQLite SkillRegistry (~/.stackmemory/skills.db)
  • Add match_prompt MCP tool for prompt→skill scoring
  • Add rule/matcher types, remove dead Redis constants (REDIS_KEYS, CACHE_TTL, calculateSkillTTL)
  • Fix pre-existing prettier formatting in src/core/rules/

Test plan

  • 52 new tests: pure matcher scoring, SQLite CRUD with temp dirs, golden parity with CJS
  • Full test suite passes (1972 tests, 0 failures)
  • Lint clean, build compiles
  • Manual: seed rules from skill-rules.json, match prompts, verify same results as hook

StackMemory Bot (CLI) added 17 commits March 22, 2026 13:18
Unify three disconnected skill layers (hook scoring, slash skills,
runtime skills) behind a shared TypeScript engine and SQLite backend.

- Add rule/matcher types to types.ts, remove dead Redis constants
- Port skill-eval.cjs algorithm to stateless skill-matcher.ts
- Add SkillRegistry with SQLite backend (~/.stackmemory/skills.db)
- Rewire MCP skill-handlers to use SQLite instead of Redis
- Add match_prompt MCP tool for prompt→skill scoring
- 52 tests: pure matcher, SQLite CRUD, golden parity with CJS
Auto-format pre-existing src/core/rules/ and src/cli/commands/rules.ts
to pass pre-push lint gate.
- pr-ci.yml: lint, test, build in parallel on PRs to main
- pr-review.yml: Claude Sonnet reviews diffs, posts findings as PR comment
  Updates existing bot comment on force-push instead of spamming
- Remove unused imports in rules.ts (prettier error)
- Point typecheck at tsconfig.check.json
- Fix .tsbuildinfo glob in .gitignore
- Replace full-file variant output with condensed delta summaries
  (added/changed/removed sections + score delta)
- Add multi-target config (targets[] array) with per-target eval sets
  for global, provenantai, dispatch, and stackmemory CLAUDE.md files
- Add `apply` command to patch best variant into target with backup
- Add `run-all` command to optimize all targets sequentially
- Add `targets` command to list configured targets
- Add `--target <name>` flag for single-target optimization
- Add `--full` flag to diff for unified diff (delta is default)
- Add gepa-session-hook.js for Claude Code Stop event auto-wiring:
  tracks sessions, auto-triggers reflect+optimize after N sessions
New `stackmemory skill` command for managing .skill.md knowledge files:
- list: discover skills from global + project dirs
- match: keyword-match skills against a prompt
- show: display full skill content
- add: install from local file or URL
- refresh: check freshness, flag expired skills
- init: scaffold new .skill.md with template
@jonathanpeterwu jonathanpeterwu merged commit 260085c into main Mar 28, 2026
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant