Skip to content

/map-plan resume-detection keyed on branch name: false 'plan complete' / artifact clobber when one branch hosts multiple sequential plans #166

@azalio

Description

@azalio

Summary

/map-plan (and the MAP planning lifecycle generally) keys all planning artifacts on the sanitized git branch name (.map/<branch>/). When a single git branch hosts more than one sequential planning effort over its lifetime, the second effort either (a) is falsely reported as "already complete" by the Resume-Detection pre-flight and STOPs, or (b) silently clobbers the first effort's spec/blueprint/task_plan. There is no per-plan namespacing.

mapify_version: 3.10.0

Where

/map-plan → "Pre-flight: Resume Detection":

BRANCH=$(git rev-parse --abbrev-ref HEAD | sed -E '...')
echo "state: $(test -f .map/${BRANCH}/step_state.json && echo EXISTS || echo MISSING)"

Resume rule: "Existing step_state.json: plan is complete; print checkpoint and STOP."

Repro

  1. On a long-lived feature branch (here: rca) a previous MAP effort had already completed — .map/rca/ contained findings_rca.md, spec_rca.md (goal: "Auditable Graph-Guided RCA (P0–P7)"), task_plan_rca.md, and step_state.json.
  2. Start a new, unrelated planning task on the same branch (/map-plan for a different feature).
  3. Resume-Detection reports:
    findings:    EXISTS
    spec:        EXISTS
    task_plan:   EXISTS
    state:       EXISTS
    
  4. Per the documented rule the command concludes the plan is complete and STOPs — for a task it never planned. The existing spec_rca.md is for a different goal.

Impact

  • False "plan complete" off-ramp for a brand-new task; the user gets no plan.
  • If the operator instead proceeds, the new spec/blueprint overwrites the prior completed plan's artifacts (loss of the historical plan record for the merged effort).
  • Forces a workaround of creating a throwaway git branch per planning effort (what I did here: branched verify-hypotheses off rca purely to get a clean .map/ namespace). That pollutes branch/PR topology for a tooling reason.

Expected

A branch should be able to host multiple sequential plans without collision. Options:

  • Namespace plans by a plan slug / goal id under the branch (.map/<branch>/<plan-slug>/...) rather than one flat dir per branch; list_plans already exists to select among them.
  • Or, in Resume-Detection, compare the existing spec's Goal against the current request and treat a goal mismatch as "new plan" (prompt to archive/rename the old one) instead of "complete → STOP".
  • At minimum, document that .map/<branch>/ is single-plan-per-branch and have Resume-Detection warn when the existing spec goal doesn't match the incoming request.

Environment

  • mapify 3.10.0, /map-plan skill, branch-name-keyed .map/ layout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions