Skip to content

feat: guide submodule commit then parent pointer commit workflows #189

Description

@jacobleft

🔎 Existing issue check

  • I have searched the existing issues.

🧭 Problem

For monorepos where implementation packages are git submodules, the correct Comet commit sequence is:

  1. Commit changes inside the submodule.
  2. Stage the parent repository submodule pointer.
  3. Commit parent OpenSpec/Superpowers/archive state.

This workflow was not encoded by Comet and had to be handled manually. If an agent commits the parent before the submodule, the parent can point to an uncommitted or unintended submodule state. If it stages all submodules, unrelated work can be captured accidentally.

✨ Proposed solution

Detect submodule pointer changes and guide the agent through the safe sequence:

  • show dirty status inside changed submodules
  • require or recommend committing relevant submodules first
  • verify changed submodule worktrees are clean before parent commit
  • stage only the relevant submodule pointer(s)
  • leave unrelated dirty submodules untouched

🎯 Primary area

Classic workflow runtime (domains/comet-classic, assets/skills/comet/scripts/)

🪐 Workflow phase

Build

🔀 Alternatives considered

Document the convention only. Documentation helps, but a guard is safer because parent/submodule commits are easy to get wrong during long-running workflows.

🧰 Compatibility notes

  • Comet package: @rpamis/comet@0.4.0-beta.3
  • Repo shape: Julia monorepo with implementation packages in git submodules
  • The check could run in build/archive verification before final parent commit.

🧩 Additional context

Suggested guard: warn when the parent index contains a submodule pointer whose submodule worktree still has uncommitted changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions