MVP Decisions
This file closes the open items from the implementation plan for prototype scope.
1) regpick.json contract
Section titled “1) regpick.json contract”- Formalized via
regpick.config.schema.json. - Supported fields:
registries(alias -> URL/path),targetsByType,overwritePolicy(prompt|overwrite|skip),packageManager(auto|npm|yarn|pnpm),preferManifestTarget,allowOutsideProject.
2) registry.json support scope (MVP)
Section titled “2) registry.json support scope (MVP)”- Supported inputs:
- top-level object with
items[], - top-level array of items,
- single item JSON with
files[].
- top-level object with
- Supported
items[]entries:- inline entries containing
files[], - references via
url/href/pathto separate item JSON files.
- inline entries containing
3) Target path priority
Section titled “3) Target path priority”Order used by installer:
file.targetfrom manifest ifpreferManifestTarget = true,targetsByType[itemType] + basename(file.path)if mapped,file.targetif present and not already used,- fallback
src/<basename>.
4) Overwrite behavior
Section titled “4) Overwrite behavior”overwritePolicy = prompt: per-file interactive choice (overwrite/skip/abort).overwritePolicy = overwrite: overwrite silently.overwritePolicy = skip: skip existing files.--yesbypasses overwrite prompt with overwrite behavior.
5) Dependency installation rules
Section titled “5) Dependency installation rules”- Candidate deps come from selected item
dependenciesanddevDependencies. - Existing declarations are read from project
package.json. - Missing packages can be installed after prompt.
- Package manager detection:
pnpm-lock.yaml->pnpm,yarn.lock->yarn,package-lock.json->npm,- fallback
npm.
6) Offline/cache for MVP
Section titled “6) Offline/cache for MVP”- No cache layer in MVP.
- Rationale: keep prototype minimal and deterministic.
7) Path security
Section titled “7) Path security”- Writes outside the project root are blocked by default.
- Can be relaxed with
allowOutsideProject: truefor advanced use. - Relative traversal (
../) is effectively blocked by absolute path boundary check.
8) Versioning policy for MVP
Section titled “8) Versioning policy for MVP”- Config schema is versioned by package release (
regpicksemver). - For MVP, no separate manifest protocol version pinning beyond compatibility parser logic.
9) Runtime adapters and error model
Section titled “9) Runtime adapters and error model”- Runtime side effects are routed through adapter ports in
src/shell/runtime/ports.ts:FileSystemPort,HttpPort,PromptPort,ProcessPort.
- Commands receive adapters through
CommandContext.runtimeinstead of importing IO libraries directly. - The app now uses a shared typed result model from
src/core/result.ts(Result,ok,err). - Domain and shell errors are mapped to
AppErrorinsrc/core/errors.tsand surfaced consistently in CLI output.