Skip to content

commit upsert — create-or-update without a prior scaffold #17

Description

@adworzynski

Problem

ea commit is update-only: it requires a prior ea scaffold and refuses if the skeleton isn't already on disk (see src/ea_core/commands/commit.py and spec 07 §11/§13 at archive/pre-github). Spec 07 §13 named commit upsert (create-or-update without a prior scaffold) a deferred open item — "useful for headless re-authoring; deferred until the conversational flow is proven". That conversational flow is now proven (Phases 2, 8, 19, 28), so the blocking precondition has been met.

Direction

Core, guarded write. Let commit create-or-update in one step: when no skeleton exists, derive it from the type (the scaffold path) then apply the content patch, all under one dry-run + content-bound --confirm. The confirm-token must bind prior absence on the create branch exactly as the Phase-13 prev-on-creates guard does, so a create-create race still trips exit 4. The interactive two-step (scaffold → review guidance → commit) stays the default surface flow; upsert serves headless/CI re-authoring where the guidance round-trip is noise. Additive; touches P1/P3.

Forks

  • Do nothing — the two-step flow works; upsert is a headless convenience only.
  • A separate --create flag on commit vs. making upsert the implicit behavior when the skeleton is absent — a contract-shape question for the proposal.
  • A distinct ea author verb that wraps scaffold+commit — more surface, no new capability.

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposalDesign change; may graduate to proposals/NNNN

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions