Commit Graph

86 Commits

Author SHA1 Message Date
Alexander Payne
7bcec41d16 feat: add transcript_harvester — rule-based knowledge extraction from sessions
Some checks failed
Test / pytest (pull_request) Failing after 12s
Implements issue #195 — harvest Q&A pairs, decisions, patterns, preferences,
and error-fix links from Hermes session JSONL transcripts without LLM.

- scripts/transcript_harvester.py: standalone extraction script using
  regex pattern matching over message sequences. Handles 5 categories:
  * qa_pair — user questions ending in ? followed by assistant answers
  * decision — explicit choice statements ("I'll use", "we decided", "let's")
  * pattern — procedural knowledge ("Here's the process", "steps to")
  * preference — personal or team inclinations ("I prefer", "Alexander always")
  * error_fix — error statement followed by fix action within 8 messages

- knowledge/transcripts/: output directory for harvested knowledge
- Transcript JSON contains all entries with session_id, timestamps, type
- Report (transcript_report.md) gives category counts and sample entries

Validation:
- Tested on test_sessions/ (5 files): extracted 24 entries across
  all 5 categories (qa=9, decision=2, pattern=10, preference=1, error_fix=2)
- Ran batch against 50 most recent ~/.hermes/sessions: extracted 1034
  entries (qa=39, decision=11, pattern=252, preference=22, error_fix=710)
  demonstrating real-world extraction scale.

Closes #195
2026-04-26 15:09:45 -04:00
Rockachopa
4b5a675355 feat: add PR complexity scorer — estimate review effort\n\nImplements issue #135: a script that analyzes open PRs and computes\na complexity score (1-10) based on files changed, lines added/removed,\ndependency changes, and test coverage delta. Also estimates review time.\n\nThe scorer can be run with --dry-run to preview or --apply to post\nscore comments directly on PRs.\n\nOutput: metrics/pr_complexity.json with full analysis.\n\nCloses #135
Some checks failed
Test / pytest (push) Failing after 10s
2026-04-26 09:34:57 -04:00
345d2451d0 Merge pull request 'feat: knowledge deduplication — content hash + token similarity (#196)' (#228) from burn/196-1776306000 into main
Some checks failed
Test / pytest (push) Failing after 33s
2026-04-21 15:28:50 +00:00
8aa9c9f018 Merge pull request 'fix: escape DOT renderer quotes in dependency_graph.py (#212)' (#214) from fix/212-dot-quoting into main
Some checks failed
Test / pytest (push) Has been cancelled
2026-04-21 15:26:13 +00:00
277f9e3a2b Merge pull request 'feat: Knowledge freshness cron — detect stale entries from code changes (#200)' (#227) from feat/200-knowledge-freshness-cron into main
Some checks failed
Test / pytest (push) Has been cancelled
2026-04-21 15:21:28 +00:00
21f654a159 Merge pull request 'fix: implement refactoring_opportunity_finder API (#210)' (#221) from burn/210-1776305000 into main
Some checks failed
Test / pytest (push) Has been cancelled
2026-04-21 15:21:20 +00:00
12abaad838 Merge pull request 'fix: syntax errors in perf_bottleneck_finder.py #211' (#217) from fix/perf-bottleneck-syntax-211 into main
Some checks failed
Test / pytest (push) Has been cancelled
2026-04-21 15:21:15 +00:00
c106db2e28 Merge pull request 'fix: escape quotes in DOT renderer (#212)' (#216) from burn/212-fix-dot-quoting into main
Some checks failed
Test / pytest (push) Has been cancelled
2026-04-21 15:21:14 +00:00
242c77cc99 Merge pull request 'fix(#676): update Codebase Genome for compounding-intelligence' (#209) from fix/676 into main
Some checks failed
Test / pytest (push) Has been cancelled
2026-04-21 15:21:09 +00:00
fe94130380 Merge pull request 'feat: quality gate — score and filter knowledge entries (#198)' (#208) from fix/198-quality-gate into main
Some checks failed
Test / pytest (push) Has been cancelled
2026-04-21 15:21:06 +00:00
4181065f60 Merge pull request 'fix(#201): Fix PytestReturnNotNoneWarning in harvest prompt tests' (#207) from fix/201-pytest-warnings into main
Some checks failed
Test / pytest (push) Has been cancelled
2026-04-21 15:21:04 +00:00
cc215e3ed7 feat: knowledge deduplication — content hash + token similarity (#196)
Some checks failed
Test / pytest (pull_request) Failing after 21s
Dedup module for knowledge entries with:
- SHA256 content hashing for exact duplicates
- Token Jaccard similarity for near-duplicates (default 0.95)
- Quality-based merge: keeps higher confidence/source_count
- Metadata merging: tags, related, source_count
- Dry-run mode
- 30 tests passing
- Built-in --test mode with generated duplicates

Usage:
  python scripts/dedup.py --input knowledge/index.json
  python scripts/dedup.py --input knowledge/index.json --dry-run
  python scripts/dedup.py --test

Closes #196.
2026-04-21 07:58:09 -04:00
baa2c84c3f feat: Add test_freshness.py (#200)
Some checks failed
Test / pytest (pull_request) Failing after 26s
2026-04-21 11:57:54 +00:00
6dd354385f feat: Add freshness.py (#200) 2026-04-21 11:57:53 +00:00
Timmy
55adcb31dc fix: implement refactoring_opportunity_finder API (#210)
Some checks failed
Test / pytest (pull_request) Failing after 30s
The test file expects compute_file_complexity(), calculate_refactoring_score(),
and FileMetrics from the script, but only a stub generate_proposals() existed.

Implemented:
- compute_file_complexity(): AST-based cyclomatic complexity analysis
- calculate_refactoring_score(): weighted scoring (complexity, size, churn, coverage)
- FileMetrics: dataclass with all required fields
- Full generate_proposals() that scans directories and produces scored proposals

All 10 tests pass. py_compile succeeds.

Closes #210
2026-04-21 07:29:44 -04:00
Alexander Whitestone
ec0e9d65ca fix: DOT renderer quoting in dependency_graph.py (#212)
Some checks failed
Test / pytest (pull_request) Failing after 30s
Changed double quotes to single quotes for strings containing
double-quote characters in DOT output.

Lines 152-153: "..." -> '...'

Fixes SyntaxError: '(' was never closed
2026-04-21 07:22:47 -04:00
b732172dcc fix: syntax errors in perf_bottleneck_finder.py #211
Some checks failed
Test / pytest (pull_request) Failing after 20s
2026-04-21 11:21:58 +00:00
f7c479c4eb fix: escape quotes in DOT renderer (#212)
Some checks failed
Test / pytest (pull_request) Failing after 13s
Lines 152-153 used unescaped double quotes inside
Python double-quoted string literals. Switched to
single-quoted strings.
2026-04-21 11:20:25 +00:00
c203010e3a fix(#676): update GENOME.md for compounding-intelligence
Some checks failed
Test / pytest (pull_request) Failing after 35s
Previous version was outdated (said scripts were 'not implemented').
Updated to reflect actual state: 18 scripts, 14 test files, populated
knowledge store, active development.
2026-04-21 04:43:54 +00:00
Alexander Whitestone
e1e42c3f8e feat: quality gate — score and filter knowledge entries (#198)
Some checks failed
Test / pytest (pull_request) Failing after 34s
quality_gate.py:
  4-dimension scoring (0.0-1.0):
    specificity (0.3): concrete examples vs vague
    actionability (0.3): can this be used?
    freshness (0.2): exponential decay over time
    source_quality (0.2): model reliability score
  filter_entries(entries, threshold=0.5)
  quality_report() — distribution + pass rate
  CLI: --threshold, --json, --filter

tests/test_quality_gate.py: 14 tests
  specificity: specific high, vague low, empty baseline
  actionability: actionable high, abstract low
  freshness: recent high, old low, none baseline
  source: claude high, ollama low, unknown default
  entry: good high, poor low
  filter: removes low quality
2026-04-20 20:31:04 -04:00
7a4677c752 fix(#201): rewrite comprehensive tests with proper pytest-compatible functions
Some checks failed
Test / pytest (pull_request) Failing after 32s
2026-04-17 05:17:40 +00:00
229c327c9e fix(#201): remove old comprehensive test file (rewriting) 2026-04-17 05:17:38 +00:00
537bb1b61b fix(#201): convert helper test_* functions to check_*, add pytest-compatible tests 2026-04-17 05:09:55 +00:00
fe8a70adc1 Merge pull request 'docs: link GENOME.md to timmy-home#676' (#206) from fix/676-genome-ci into main
Merge PR #206: docs: link GENOME.md to timmy-home#676
2026-04-17 01:46:47 +00:00
Alexander Whitestone
a4cbfbd5bf docs: link GENOME.md to timmy-home#676
Some checks failed
Test / pytest (pull_request) Failing after 23s
2026-04-16 00:46:53 -04:00
Alexander Whitestone
10096977bd Merge remote-tracking branch 'origin/fix/8-harvester' 2026-04-15 22:12:31 -04:00
Alexander Whitestone
08c4237dca Merge remote-tracking branch 'origin/fix/11-bootstrapper' 2026-04-15 22:12:28 -04:00
Alexander Whitestone
661f2730f2 Merge remote-tracking branch 'origin/fix/10-knowledge-format' 2026-04-15 22:12:21 -04:00
Alexander Whitestone
80cc656fc1 Merge remote-tracking branch 'origin/feat/session-metadata' 2026-04-15 22:12:17 -04:00
Alexander Whitestone
522fa84151 Merge remote-tracking branch 'origin/docs/genome-676' 2026-04-15 22:12:14 -04:00
Alexander Whitestone
69992cf82a Merge remote-tracking branch 'origin/fix/7-extraction-prompt' 2026-04-15 22:12:10 -04:00
Alexander Whitestone
d0a422deef Merge remote-tracking branch 'origin/burn/17-session-sampler' 2026-04-15 22:12:04 -04:00
Alexander Whitestone
4210a4ea9d Merge remote-tracking branch 'origin/feat/91-session-pair-harvester' 2026-04-15 22:11:45 -04:00
Alexander Whitestone
bac0e0336b Merge remote-tracking branch 'origin/feat/93-dependency-graph' 2026-04-15 22:11:41 -04:00
Alexander Whitestone
64b823c598 Merge remote-tracking branch 'origin/feat/94-dead-code-detector' 2026-04-15 22:11:35 -04:00
Alexander Whitestone
27459271ac Merge remote-tracking branch 'origin/feat/177-issue-parser' 2026-04-15 22:11:32 -04:00
Alexander Whitestone
45cd835bd2 Merge remote-tracking branch 'origin/feat/176-diff-analyzer' 2026-04-15 22:11:30 -04:00
Alexander Whitestone
5e8a201a26 Merge remote-tracking branch 'origin/burn/172-1776263893' 2026-04-15 22:11:26 -04:00
Alexander Whitestone
fa43d82f79 Merge remote-tracking branch 'origin/burn/168-1776263899' 2026-04-15 22:11:25 -04:00
Alexander Whitestone
c7b7b38510 Merge remote-tracking branch 'origin/burn/171-1776263896' 2026-04-15 22:11:23 -04:00
Alexander Whitestone
908fbbb26c Merge remote-tracking branch 'origin/burn/174-1776263883' 2026-04-15 22:11:21 -04:00
Alexander Whitestone
ea33c331f6 Merge remote-tracking branch 'origin/burn/169-1776263898' 2026-04-15 22:11:20 -04:00
Alexander Whitestone
f55d31cd02 Merge remote-tracking branch 'origin/burn/170-1776263897' 2026-04-15 22:11:14 -04:00
8ca3132990 Merge pull request 'ci: add pytest workflow (#190)' (#202) from fix/190 into main 2026-04-15 16:03:24 +00:00
Alexander Whitestone
363407293d ci: add pytest workflow for #190
All checks were successful
Test / pytest (pull_request) Successful in 30s
2026-04-15 11:29:23 -04:00
Alexander Whitestone
4bd0a5d7ac test: define CI configuration acceptance for #190 2026-04-15 11:26:08 -04:00
93bc3fc18a fix: add directory exclusions for scan performance (#170) 2026-04-15 15:06:09 +00:00
Alexander Whitestone
9668034ad6 feat: Add refactoring opportunity finder (#169)
Cross-references complexity, churn, and coverage to identify refactoring targets.

Acceptance criteria met:
- Cross-references: complexity x churn x coverage
- Identifies: refactor targets with priority scoring
- Output: prioritized refactor list (JSON or human-readable)
- Designed for monthly execution via cron

Scoring formula:
- Complexity (40%): Higher cyclomatic complexity = higher priority
- Churn (30%): Frequently changed files = high value to refactor
- Size (20%): Larger files = more to refactor
- Coverage (10%): Low coverage = higher risk but more need

Usage:
  python3 scripts/refactoring_opportunity_finder.py --repo /path/to/repo
  python3 scripts/refactoring_opportunity_finder.py --repo /path/to/repo --json

Closes #169
2026-04-15 10:54:58 -04:00
49365c64d2 test: automation opportunity finder tests (#170) 2026-04-15 14:53:43 +00:00
Alexander Whitestone
341abab2a0 feat: Priority Rebalancer — re-score issues from pipeline data (#174)
Monthly pipeline tool that:
- Reads knowledge store, metrics, and staleness data
- Scores all open issues across the org
- Suggests priority upgrades/downgrades based on accumulated signals
- Generates JSON + markdown reports
- Optional --apply mode to push changes via Gitea API

Signals detected:
- Stale/missing knowledge entries
- Empty knowledge store
- Missing metrics output
- Low repo coverage
- Issue age, activity, assignment status
- Keyword/label analysis

Usage:
  python3 scripts/priority_rebalancer.py --org Timmy_Foundation
  python3 scripts/priority_rebalancer.py --org Timmy_Foundation --apply
  python3 scripts/priority_rebalancer.py --org Timmy_Foundation --json

23 tests, all passing.
2026-04-15 10:52:51 -04:00