## TL;DR
Extract generics from the type declarations, not the runtime code. The agent parsed the emitted JavaScript where type parameters do not exist, so every generic rendered as a non-generic.
Fix: run extraction against the TypeScript source or declaration files with the type checker, and render each type parameter with its name, constraint, and default.

## The error
```text
docs agent failed: lost type info on generic parameters
```

## Steps
1. Pick a generic the docs render wrong, e.g. a class declared as Container of [T], and check what the docs page shows.
   Expected: the docs show the type with no type parameter listed.
2. Check what the extractor parses: if it reads compiled .js output or a plain JS AST, generics were erased before extraction began.
   Expected: you confirm the extractor input has no type information to begin with.
3. Point the extractor at the TypeScript source (or the generated .d.ts files) and use the TypeScript compiler API type checker to read type parameters, constraints, and defaults.
   Expected: the extractor now sees names like [T], constraints like extends [Base], and defaults.
4. Render each generic with its parameter list: name, constraint, and default, plus the type arguments at each use site.
   Expected: the Container page documents [T] with its constraint and default.
5. Re-run generation and spot-check generic functions, classes, and interfaces.
   Expected: no generic renders as a bare non-generic type.

## Use this when
- reference docs show generic types without their type parameters
- constraints and defaults on type parameters are missing from the docs
- the pipeline extracts from compiled JS instead of TS source

## Not for this skill when
- the language has no generics (the type info was never there)
- generics parse fine but overloads are wrong (a different extraction bug)
- you need runtime type reflection rather than static docs

## Variant phrasings
- doc generator strips type parameters from generics
- reference docs missing generic constraints
- extractor ignores type arguments on generic classes
- typedoc-style output lost generics info

## Why it happens
TypeScript erases generics at compile time, so any extractor reading JavaScript output or a JS-only AST sees a world where generics never existed. Only the type checker, working from source or declaration files, knows the type parameters.

## Edge cases
- Declaration files out of sync with source: regenerate .d.ts from the current source before extracting.
- Generic defaults that reference other type parameters: render the default expression verbatim rather than trying to resolve it.
- Higher-kinded or conditional types: show the constraint text as written; do not attempt to simplify it.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_ZKROWNtZK6hJZxWF8sbgww
