Fix sp-stack wiring reference: defineApp().use() not createHost

The api-plugin-* packages mount via @suaveplan/api's defineApp().use(plugin)
(confirmed in api-plugin-payment's quick-start), not the lower-level
createHost() from @suaveplan/api-host. Also make the docs-traversal
fallback root explicit as docs/README.md instead of borrowing sp's
packages/ terminology.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-30 01:21:25 +01:00
parent a47300ac87
commit 7d268b52c2

View File

@@ -37,9 +37,10 @@ and a booking calendar"*.
2. **Resolve each capability.** 2. **Resolve each capability.**
- **Manifest hit** → take `primary` + `supporting`; open its `example_doc` under - **Manifest hit** → take `primary` + `supporting`; open its `example_doc` under
`${CLAUDE_PLUGIN_ROOT}/docs/` and read the quick-start block verbatim. `${CLAUDE_PLUGIN_ROOT}/docs/` and read the quick-start block verbatim.
- **Manifest miss** → fall back to the `sp` docs-traversal: root README → - **Manifest miss** → fall back to the `sp` docs-traversal under
`<category>/README.md` → `<subcategory>/README.md` → package README, ranking `${CLAUDE_PLUGIN_ROOT}/docs/`: `docs/README.md` → `<category>/README.md` →
turnkey `api-plugin-*` / engine packages above low-level primitives. `<subcategory>/README.md` → package `README.md`, ranking turnkey `api-plugin-*` /
engine packages above low-level primitives.
3. **Assemble.** Dedupe packages, order by dependency (turnkey plugins first), group by 3. **Assemble.** Dedupe packages, order by dependency (turnkey plugins first), group by
`layer` (backend / frontend / foundation / devtools). `layer` (backend / frontend / foundation / devtools).
@@ -53,8 +54,8 @@ and a booking calendar"*.
- **Bill of materials** — grouped by layer, one-line reason per package. - **Bill of materials** — grouped by layer, one-line reason per package.
- **Install** — a single `bun add @suaveplan/… …`. - **Install** — a single `bun add @suaveplan/… …`.
- **Wiring** — the `createHost({ plugins: [...] })` composition (see - **Wiring** — the `defineApp().use(plugin)` composition from `@suaveplan/api` (see
`docs/api-stack/api/api/README.md` for the host entry point). `docs/api-stack/api/api/README.md` for the app entry point).
- **Starter code** — stitched from the verbatim docs examples. - **Starter code** — stitched from the verbatim docs examples.
- **Gaps & prerequisites** — capabilities with no `@suaveplan` package (the user writes - **Gaps & prerequisites** — capabilities with no `@suaveplan` package (the user writes
custom code or brings a third-party lib) and required external services (API keys, custom code or brings a third-party lib) and required external services (API keys,