# M12 Wave 3 — adapter manifest enhancements (JIT plan)

> todlando 2026-06-14, post W1.5+REQ-HOST-RUN-2 gate (both PASS, committed 0c687fe). doyle
> ordered W3 FIRST (most directly unblocks spt-claude-code). DESIGN-CHECK PENDING with doyle
> before building (open questions below). Build only after his ruling.

## Scope (M12-PLAN.md Wave 3)
- **T3.1** File-backed adapter `[strings]`: a `[strings]` entry may point to a FILE; standardized
  per-adapter auxiliary file-storage location (verify none exists). Resolution still rides the
  leaf-replace profile overlay. Unblocks spt-claude-code skill-instruction + hint bodies without
  manifest bloat.
- **T3.2** Cross-adapter fallback targets `<adapter>:<profile>` (not just bare adapter_name);
  reconcile CONTEXT.md "ccs, its own adapter" wording.

## What exists today (investigation)
- `Manifest.strings: toml::Table` — opaque KV, dot-path readable via `spt adapter get-string`,
  rides leaf-replace profile overlay (REQ-MANIFEST-3). manifest.rs:66-75.
- Local profiles: `adapters/<adapter>/profiles/<profile>.toml` (REQ-MANIFEST-2). `<adapter>:<profile>`
  composite address already parsed by `registry::resolve_option`.
- **No per-adapter aux/data file-storage location exists** beyond `profiles/` (confirmed).
- **No node-wide cross-adapter fallback SETTING is implemented yet** — CONTEXT.md:137 describes it
  ("node-wide setting, not a manifest field; falls back to another adapter e.g. ccs") but no
  `fallback_adapter` config/consumer found in spt-daemon/spt-live. T3.2 scope hinges on this.

## Open design questions for doyle
**T3.1**
1. File-pointer syntax for a `[strings]` entry. Proposal: inline table `key = { file = "rel/path" }`
   (explicit, typed, leaf-replace-overlayable) vs a `@file:` sentinel string vs a `[strings.files]`
   sub-table. Recommend the inline-table form.
2. Standardized aux file-storage location. Proposal: `adapters/<adapter>/strings/` (sibling of
   `profiles/`), file paths resolved relative to it; a local profile may override the pointer or
   inline the value (leaf-replace). Confirm location + shipped-vs-local override semantics.
3. Read timing. Proposal: validate-exists at registration; read LAZILY at `get-string` (file edits
   reflect without re-register); skip-diagnostics (no silent drop) on missing/unreadable, matching
   the `[digest]` skip-diagnostics stance.

**T3.2**
4. The node-wide fallback setting appears absent. Is T3.2 = (a) ONLY make the fallback TARGET
   resolve through `resolve_option` (adapter:profile-aware) wherever a fallback target string is
   read + reconcile CONTEXT.md wording (deferring the full fallback-invocation wiring to the
   consuming milestone), or (b) also establish the node-wide setting + its consumer now? Recommend
   (a) — minimal, contract-only, unblocks spt-claude-code's addressing without speculative wiring.

## Tasks (pending doyle ruling — shapes may shift)
- **T3.1a** New REQ (e.g. REQ-MANIFEST-5) in traceable-reqs.toml first. Manifest: file-pointer
  parse + the aux-dir resolver + lazy read at get-string + register-time validate + skip-diag.
- **T3.1b** Unit (parse + overlay leaf-replace of a file pointer) + int (get-string reads the file;
  a profile overrides it).
- **T3.2a** Resolve fallback target via `resolve_option` (adapter:profile); CONTEXT.md reconcile.
  REQ id per doyle's scope ruling.
- Activate stages as evidence lands. Full suite + clippy -D + traceable EXIT=0. W3 gate (doyle).

## Notes
- Manifest schema = ADR-0001 wire/contract territory: copy-verbatim stable formats, additive +
  N-1-safe, regen `manifest.schema.json` (doc generation is CI-gated against drift).
- UNCOMMITTED building until operator calls a commit (they chose commit-then-continue for W1.5+HR2).
