Skip to content

BE hyperstack: add optimizer plugin + skill (teaches runtime analysis + algorithm derivation)#113

Merged
KailasMahavarkar merged 1 commit into
mainfrom
f-BE-hyperstack-optimizer-plugin
Jun 15, 2026
Merged

BE hyperstack: add optimizer plugin + skill (teaches runtime analysis + algorithm derivation)#113
KailasMahavarkar merged 1 commit into
mainfrom
f-BE-hyperstack-optimizer-plugin

Conversation

@KailasMahavarkar

Copy link
Copy Markdown
Collaborator

Adds the optimizer - hyperstack's missing quality axis. Code today is made current, correct, designed, and minimal; nothing made it algorithmically sound. This closes that, the hyperstack way: evidence over vibes, lens not gate.

What it is (and is NOT)

It does not ship a library of algorithm implementations - models already know BFS, and algorithms are stable (unlike framework APIs). Instead:

Part Role
optimizer skill teaches two transferable skills: (1) derive Big-O straight from code (cost model, recurrences/Master Theorem, amortized, space), (2) derive a better algorithm by removing redundant work ("what does this recompute that it could do once?")
optimizer_* plugin (5 tools) the menu/lookup: problem -> candidate technique classes + complexity + the naive smell it replaces + a web-search query for the authoritative impl. ~60 techniques across 18 classes. No code shipped.

The skill is the thinking; the plugin confirms the named technique and points at the impl to web-search. Gated by YAGNI - it stays quiet when a naive loop over 10 items is correctly the lazy-right answer.

The derivation loop (the teaching)

derive current Big-O -> locate dominant cost -> name the redundancy ->
map redundancy to its fix (= technique class) -> optimizer_get_technique + web-search impl ->
re-derive new Big-O  (present before -> after)

Files / wiring

Area Change
Plugin src/plugins/optimizer/{data.ts, index.ts, tools/*} (13th plugin)
Skill skills/optimizer/SKILL.md (teaches analysis + playbook)
Wiring src/index.ts, bootstrap Layer-1 + Support-Skills, audit manifest (editorial), registry test 12->13

Verification

bun test 47/0 (registry now 13, audit coverage + skills-index include optimizer) · bun run build clean · bun run audit clean (optimizer = editorial) · 5 tools register and match_problem returns the menu.

Honest notes: (1) the matcher is substring-based, so it over-returns candidates (e.g. "unsorted" trips "sorted") - acceptable for a recall aid, worth tightening later. (2) No version/count bump here - that rides the next release (1.2.0), same as how 1.1.0 was cut.

…sis + algorithm derivation, catalog confirms technique, websearch the impl
@KailasMahavarkar KailasMahavarkar merged commit eff452b into main Jun 15, 2026
4 checks passed
@KailasMahavarkar KailasMahavarkar deleted the f-BE-hyperstack-optimizer-plugin branch June 15, 2026 18:09
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