gen-adapter-forge — typed declarative spec for gen adapters.
Every existing adapter (gen-cargo / gen-npm / gen-bundler) has the same shape:
- one or more manifest markers (
Cargo.toml,package.json, …) - zero or more lockfile markers (
Cargo.lock,pnpm-lock.yaml, …) - a registry (CratesIo / Npm / RubyGems / …)
- a constraint syntax family (
semver-caret-default/semver-exact-default/bundler-pessimistic/ …) - dependency table names (
dependencies/devDependencies/ …) - target-predicate shape (cargo cfg / npm engines+os / bundler platforms / pep-508 markers / none)
- workspace shape (
members/workspacesarray / single-package)
A typed [AdapterSpec] captures all of this. The forge component
generates the boilerplate scaffold (lib.rs + error.rs + raw.rs +
tests) from one spec; the adapter author only writes the format-
specific parsing logic — typically <100 LOC.
Generated by gen-adapter-forge from a typed AdapterSpec. Implement the parse_manifest + (optionally) parse_lockfile bodies — the rest of the wiring (manifest assembly, root dispatch, error mapping) is already in place.
TODO(adapter author): replace the placeholder struct with the actual fields the manifest format ships.