Skip to content

fix(skill): deft-swarm Phase 6 -- require read-back verification after rebase conflict resolution #288

@MScottAdams

Description

@MScottAdams

Summary

During the v0.16.0 swarm merge cascade, a CHANGELOG.md conflict resolution using a PowerShell -replace regex produced a corrupted file (two bullet entries collapsed onto one line with a literal backtick-n separator instead of a real newline). The corruption was not caught before git add and was only surfaced by Greptile's re-review.

Root Cause

Two gaps in the deft-swarm Phase 6 rebase conflict resolution flow:

  1. No read-back step after conflict resolution: The skill instructs the monitor to resolve conflicts and run git add, but does not require re-reading the resolved file to verify structural integrity before staging. The mandatory pre-commit file review rule (t1.11.4) applies to agent commits but is not explicitly called out in the monitor's conflict resolution path.

  2. Shell operation trust without verification: A -replace regex in PowerShell's substitution context behaves differently from a double-quoted string (backtick-n is not expanded). edit_files is safer for structured content edits -- the line-by-line output confirms the result immediately.

Proposed Fix

Add a ! rule to skills/deft-swarm/SKILL.md Phase 6 Step 1 rebase cascade:

  • After resolving any conflict and before running git add, re-read the resolved file and visually verify structural integrity (no conflict markers, no collapsed lines, no encoding artifacts)
  • Prefer edit_files over shell regex for CHANGELOG.md and SPECIFICATION.md conflict resolution
  • Mirrors the mandatory pre-commit file review from t1.11.4, targeted at rebase conflict resolution

Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions