Goal (Execution Plan §17.3): make the manifest (ADR-002) a first-class, editable, round-trippable artifact. Users can import/export a manifest, edit it (form + raw JSON), and the studio warns when an upgrade makes it stale. Schema migrations keep old manifests loadable.
Slice: export ⇄ import round-trip · form + raw-JSON editor · reviewed edits survive re-analyze · staleness by implementation code hash · versioned schema with a migration framework.
Legend: [ ] todo · [~] in progress · [x] done · status: implemented
-
CURRENT_MANIFEST_VERSIONconstant -
migrateManifest(input)- readversion, apply ordered N→N+1 migrations, validate the result; typed result withfromVersion/toVersion/error - Reject manifests newer than the supported version
- Unit tests (identity v1, missing version, too-new, invalid)
-
manifestCodeHash(manifest, contractId?) -
isManifestStale(manifest, currentCodeHash, contractId?)(compares stored implementation code hash to the live one) - Unit tests (match / mismatch / missing data)
-
set-descriptionreview action -
mergeReviewed(previous, fresh)- re-analysis refreshes technical fields but preserves human-edited display fields for reviewed operations (ADR-002) -
buildManifestacceptsimplementationAddress/implementationCodeHash - Unit tests (merge preserves reviewed, refreshes analysis)
- Persist
codeHashonProject(from the resolver result) -
computeManifestderivesabiSourcefrom provenance and passes implementation address + code hash into the manifest - Re-analyze preserves reviewed operations via
mergeReviewed
- Import manifest (file) →
migrateManifest→ validate → persist - Errors shown inline; export already exists (JSON download)
-
ManifestEditoroverlay opened fromProjectView - Operations tab: edit title, description, audience, visibility, reviewed
- Raw JSON tab: edit + validate (
safeParseManifest) before applying - Save persists; Cancel discards
- On open, fetch live code hash (implementation for proxies) and compare
- Banner offers Re-analyze when stale
- ADR-004 - manifest versioning & migration strategy
- Update
PROGRESS.md,docs/roadmap.md, backlog - Keep lint/typecheck/test/build/e2e green
- Export a manifest, re-import it into a fresh project - identical result
- Edit an operation (form or JSON), save, and see it reflected in the app
- Re-analyze keeps reviewed edits
- Upgrading the implementation surfaces a staleness banner
- Old-version manifests load via migration; all checks green
- Re-analyze refreshes classification on the current ABI + code hash. Full re-resolution (re-fetching a new ABI after an upgrade) reuses the Phase 2 resolver and is tracked as a follow-up.
- Raw-JSON editor is textarea-based; a schema-aware editor with inline field hints can come with the Phase 3+ polish.