gabriel / muse public
feat code main

feat(code): Phase 2 — query v2 predicate grammar + muse query-history

muse query upgrades to a full v2 predicate grammar: - OR, NOT, and parenthesis grouping via recursive descent parser - New predicate keys: qualified_name, body_hash, signature_id, lineno_gt, lineno_lt (no external dependencies) - All operators: = ~= ^= $= != (>= <= for lineno) - JSON output now includes schema_version:2 wrapper and end_lineno - Backward-compatible: existing "key=value" "key~=value" still work

New module muse/plugins/code/_predicate.py: - Token → Parser → Predicate pipeline - Public API: parse_query(str | list[str]) → Predicate - Drives both muse query and muse query-history

muse query-history PREDICATE... [--from REF] [--to REF]: - Walks a commit range, accumulating per-symbol history - Reports: first seen, last seen, commit count, change count - JSON with schema_version:2 - Answers: "find all Python functions introduced after v1.0"

New store function walk_commits_between() for bounded range walking. mypy: 0 errors · typing_audit: 0 violations · pytest: 797 passed.

G Gabriel Cardona <gabriel@tellurstori.com> · 5d ago Mar 18, 2026 · 0590ede7 · parent 7887bec7
92
files changed
137
files in snapshot
Files Changed 137 in snapshot
+64 ~27 −1
~ AGENTS.md .md
~ README.md .md
~ pyproject.toml .toml
docs/architecture/supercharge-plan.md .md
← Older Oldest on main
All commits
Newer → Latest on main

0 comments

No comments yet. Be the first to start the discussion.