feat(sec): initial release v1.0.0-alpha - ergonomic query routing engine
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
# SEC - Quick CLI Cheat Sheet & Code Snippet Assistant
|
||||
|
||||
## Project Purpose
|
||||
A lightweight, lightning-fast CLI cheat sheet and code snippet assistant powered by the `cheat.sh` engine, ergonomic sol-el keyboard layout, smart query routing, and optional clipboard integration.
|
||||
|
||||
---
|
||||
|
||||
## Architectural Decisions
|
||||
1. **Name & Ergonomics:** `sec` (optimized for left-hand QWERTY reachability in dropdown/Quake terminals).
|
||||
2. **Backend & Engine:** Direct live queries to the `cheat.sh` API with smart multi-token routing.
|
||||
3. **Smart Query Router:**
|
||||
- Strategy 1: Targeted language/tool lookup (`cht.sh/<target>/<query>`).
|
||||
- Strategy 2: Global semantic fallback search (`cht.sh/~<query>`).
|
||||
4. **Offline Exact-Query Cache:** Lightweight SQLite or file-based cache for previously fetched queries so repeated lookups work offline.
|
||||
5. **Clipboard Integration:** Optional `-c` / `--copy` flag to automatically extract and copy executable code blocks to the clipboard.
|
||||
6. **Centralized UI/String Catalog:** Centralized JSON string catalog (`catalog/strings.json`). No hardcoded UI strings in code.
|
||||
7. **Code Standards:** Professional English in all code, comments, catalogs, and documentation. No emojis in terminal UI or codebase.
|
||||
8. **Manifest & Versioning:** `manifest.json` tracking semver, dependencies, and changelog, wired to `-V` / `--version`.
|
||||
|
||||
---
|
||||
|
||||
## Pending Topics & Decisions
|
||||
- [x] **1. Live API Client & Multi-token Routing:** Tilde-based search, candidates fallback chain, error/index suppression.
|
||||
- [x] **2. Clipboard Dual Mode:** `-c` for executable code only, `-c a` for full response.
|
||||
- [x] **3. Offline SQLite Cache:** Automatic caching of valid queries in `data/cache.db`.
|
||||
- [ ] **4. Deterministic Non-AI Keyword & Intent Engine:** Build a purely offline, algorithmic keyword classifier (trie/inverted-index/alias table) that parses freeform user prompts into exact `cheat.sh` canonical topics and flags without external AI APIs.
|
||||
- [ ] **5. ANSI Rendering & Paging:** Optional terminal paging for multi-page cheat sheets.
|
||||
- [ ] **6. Cache Expiration & Invalidation:** TTL or explicit cache refresh flags (`--refresh`).
|
||||
Reference in New Issue
Block a user