Skip to content

Implement writ adopt --from-receipt #70

Open

Description

@David-Noble-at-work

Summary

Implement the --from-receipt flag for writ adopt that reads a lore receipt and adopts the packages-manifest.yaml and config files into the environment repository.

Current State

The function runAdoptFromReceipt() is a stub that returns an error (previously returned success, fixed in #65).

Location: internal/writ/commands.go:1202-1211

Requirements

  1. Read a lore receipt from the specified path (or ~/.local/state/devlore/receipts/lore-latest.yaml if not specified)
  2. Parse the receipt to extract:
    • packages-manifest.yaml that was deployed
    • Any config files that were templated
  3. Adopt these files into the specified layer/project using the existing adopt logic

Documentation References

Acceptance Criteria

  • writ adopt --from-receipt reads the most recent lore receipt
  • writ adopt --from-receipt <path> reads the specified receipt
  • Adopted files are placed in <layer>/<scope>/<project>/
  • Symlinks are created back to original locations
  • Tests verify the feature works correctly

Epic: #447 · Feature: #463

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area:CLICommand-line interfaceClaudeJudgmentError:FalseSuccessCode returns success when operation not performedEpic:WritDeploymentwrit deployment: layers, adoption, and drifttaskImplementation work item

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions