Skip to content

Native: add Runtime-managed Verify/Archive → Shape recovery #323

Description

@zhijulejian

Problem

Comet Native currently has no Runtime-managed transition from Verify or Archive back to Shape when the user rejects an accepted verification result because the user-visible target specification or acceptance criteria must change.

The Native Skill explicitly distinguishes:

  • implementation omissions → return to Build
  • user-visible behavior or acceptance changes → return to Shape

However, comet native next --help exposes --return-to-build but no --return-to-shape. At an await-user boundary after a skill-coordinated pass, the continuation only offers --confirmed, leaving no valid official path when the user rejects the pass and requires Shape changes.

Observed with:

  • @rpamis/comet@0.4.0-beta.17
  • @rpamis/comet@0.4.0-beta.18

Reproduction

  1. Advance a Native change through Build and Verify.
  2. Reach:
    • phase=verify
    • status=await-user
    • verificationResult=pass
    • continuation action confirm-skill-coordinated-pass
  3. The user rejects the pass and requests changes to the formal Spec and acceptance criteria.
  4. Run comet native next --help.

There is no Runtime-supported Shape recovery action. Using --return-to-build would bypass Shape clarification and confirmation; editing comet-state.yaml would violate Runtime ownership.

Requested behavior

Add a formal Runtime-managed Verify/Archive → Shape transition, for example comet native next <change> --summary <text> --return-to-shape, and expose it through the continuation when appropriate.

The transition should:

  • preserve the same change, artifact location, and bound workspace;
  • invalidate the existing candidate, verification result, and any Archive authorization;
  • reset accepted verification/acceptance results so they cannot be reused;
  • enter a Shape state that permits brief and full target Spec updates;
  • require a fresh explicit Shape confirmation before Build;
  • begin a new goal/acceptance cycle without treating the rejected old pass as the new candidate;
  • remain fully Runtime-managed and recoverable through portable state;
  • reject stale continuation/state-version attempts.

A regression test should cover rejecting a skill-coordinated pass, returning to Shape, changing acceptance criteria, reconfirming Shape, producing a new candidate, and verifying that the old pass cannot authorize Archive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions