2 Commits

Author SHA1 Message Date
Bo
d22b5b6ab5 refactor(suggest): extract magic numbers to named constants (#353)
Extract 9 hardcoded scoring weights from similarity() into documented
package-level constants:

- ScoreExactMatch (1000) - identical string match
- ScorePrefixWeight (20) - per-char prefix bonus
- ScoreContainsFullWeight (15) - search term in candidate
- ScoreSuffixWeight (10) - per-char suffix bonus
- ScoreContainsPartialWeight (10) - candidate in search term
- ScoreDistanceWeight (5) - Levenshtein close match
- ScoreCommonCharsWeight (2) - shared character bonus
- LengthDiffThreshold (5) - penalty trigger threshold
- LengthDiffPenalty (2) - per-char length difference penalty

No behavior change - same scores, now with godoc documentation.

Closes: gt-kf7fw

Co-authored-by: furiosa <gt@gastown.local>
2026-01-11 18:49:01 -08:00
Steve Yegge
df0495be32 feat(tui): add self-documenting help with ASCII diagrams and table helpers
TUI improvements for Christmas launch:
- Add phase transition table and lifecycle diagram to `gt molecule --help`
- Add swarm lifecycle diagram to `gt swarm --help`
- Add mail routing diagram to `gt mail --help`
- Add sling mechanics diagram to `gt sling --help`
- Create Lipgloss table helper (internal/style/table.go)
- Migrate mq_list to use styled tables with color-coded priorities
- Migrate molecule list to use styled tables
- Add fuzzy matching "did you mean" suggestions for polecat not found errors
- Add suggest package with Levenshtein distance implementation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 17:52:44 -08:00