Documentation
¶
Overview ¶
Package knowledge gives memcode the baseline a senior engineer just HAS — curated, authoritative facts and idioms for common stacks (Vercel, Next, React, Node, Supabase…), embedded in the binary so they travel into any repo.
Why this exists: the routing models have weaker/staler recall of fast-moving framework specifics than a frontier model. A dogfood turn invented a custom NEXT_PUBLIC_COMING_SOON env var instead of Vercel's built-in VERCEL_ENV. The packs give the model an authoritative, ungated reference to consult — surfaced via a repo-detected pointer (deterministic FACT) and the `knowledge` tool (model judgment). We deliberately do NOT keyword-match the user's prose to force content in — that's CLI-side intent classification, which doctrine keeps out of the CLI.
Two kinds of content, deliberately separated (see the pack format):
- Facts — authoritative, unconditional. Overrides the model's priors.
- Idioms — greenfield defaults that DEFER to existing code (never refactor working code to satisfy them).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Hints ¶
type Hints struct {
Files []string // files whose presence implies the stack, e.g. "vercel.json"
Deps []string // dependency names to look for in package.json / go.mod
}
Hints lists the cheap, deterministic signals that a repo uses this stack.
type Pack ¶
type Pack struct {
Name string // canonical slug, e.g. "vercel"
Triggers []string // words in the user's text that surface this pack, e.g. ["vercel"]
Detect Hints // repo-detection hints (files present / manifest deps)
Facts string // authoritative, unconditional — the injected digest
Idioms string // greenfield defaults (consult-only; defer to existing code)
}
Pack is one stack's curated knowledge, parsed from packs/<name>.md.
func Catalog ¶
func Catalog() []Pack
Catalog returns every embedded pack, parsed once and sorted by name.
func Detect ¶
Detect returns the packs that fingerprint the repo at root — a file they name exists, or a dependency they name appears in package.json / go.mod. Deterministic and cheap; the net for turns where the user DIDN'T name the stack but is clearly working in it.