agentleFS
maxwell2732maxwell2732/claudecode-research-harness-workflow/skills/harness-sync/SKILL.md

harness-sync

Skill42 starsChanged 6 days agoMITView on GitHub

HAR: Sync Plans.md with implementation. Drift detect, marker update, retrospective. Trigger: sync-status, where am I, check progress. --snapshot for snapshots. Do NOT load for: planning, implementation, review, release.

2 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Verify Plans.md exists and is properly formatted.

    line 45
  2. Distinctive:

    When drift is detected, propose and execute:

    line 103
  3. Very specific:

    When --snapshot is specified, save the current progress state as a timestamped snapshot.

    line 139
  4. Distinctive:

    When a previous snapshot exists, show the diff:

    line 173
  5. Very specific:

    If there is at least 1 cc:done task, automatically run a retrospective.

    line 210

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Harness Sync

Reconciles Plans.md against implementation status and detects/updates drift. Standalone version of legacy sync-status and the harness-plan sync subcommand.

Quick Reference

User inputAction
harness-syncProgress sync + retrospective (default ON)
harness-sync --no-retroProgress sync only (skip retrospective)
harness-sync --snapshotSave snapshot (point-in-time progress record)
harness-sync --plan roadmapSync the roadmap named plan
"Where am I?" / "Check progress"Same as above

Options

OptionDescriptionDefault
--snapshotSave current progress as a snapshotfalse
--no-retroSkip retrospectivefalse (runs by default)
--plan NAMEUse a named plan from plans/manifest.jsonactive/default

Step 0: Plans.md validation

Verify Plans.md exists and is properly formatted. If issues are found, guide and stop immediately. In repos with multiple Plans.md files, confirm the target plan with scripts/plan-registry.sh list or --plan NAME before reading.

StateGuidance
Plans.md does not existPlans.md not found. Create it with harness-plan create. → Stop
Header missing DoD / Depends columns (v1 format)Plans.md is in old format (3 columns). Regenerate to v2 (5 columns) with harness-plan create. Existing tasks will be carried over automatically. → Stop
v2 format (5 columns)Proceed to Step 1

Step 1: Collect current state (parallel)

# Plans.md state
cat Plans.md

# Git change state
git status
git diff --stat HEAD~3

# Recent commit history
git log --oneline -10

# Agent trace (recently edited files)
tail -20 .claude/state/agent-trace.jsonl 2>/dev/null | jq -r '.files[].path' | sort -u

Step 1.5: Agent trace analysis

Retrieve recent edit history from Agent Trace and reconcile with Plans.md tasks:

# List of recently edited files
RECENT_FILES=$(tail -20 .claude/state/agent-trace.jsonl 2>/dev/null | \
  jq -r '.files[].path' | sort -u)

# Project information
PROJECT=$(tail -1 .claude/state/agent-trace.jsonl 2>/dev/null | \
  jq -r '.metadata.project')

Reconciliation points:

Check itemDetection method
File edits not in Plans.mdAgent Trace vs task descriptions
Files different from task descriptionExpected files vs actual edits
Tasks with no edits for a long timeAgent Trace timeline vs WIP duration

Step 2: Drift detection

Check itemDetection method
cc:WIP despite being doneCommit history vs marker
cc:TODO despite being startedChanged files vs marker
cc:done but not committedgit status vs marker

Step 3: Plans.md update proposal

When drift is detected, propose and execute:

Plans.md update needed

| Task | Current | Change to | Reason |
|------|---------|-----------|--------|
| XX   | cc:WIP | cc:done | Already committed |
| YY   | cc:TODO | cc:WIP | File already edited |

Update? (yes / no)

Step 4: Progress summary output

## Progress Summary

**Project**: {{project_name}}

| Status | Count |
|--------|-------|
| Not started (cc:TODO) | {{count}} |
| In progress (cc:WIP) | {{count}} |
| Done (cc:done) | {{count}} |
| PM confirmed (pm:approved) | {{count}} |

**Progress rate**: {{percent}}%

### Recently edited files (Agent Trace)
- {{file1}}
- {{file2}}

Step 4.5: Save snapshot (when --snapshot is specified)

When --snapshot is specified, save the current progress state as a timestamped snapshot.

Save location

Save in JSON format to the .claude/state/snapshots/ directory:

SNAPSHOT_DIR="${PROJECT_ROOT}/.claude/state/snapshots"
mkdir -p "${SNAPSHOT_DIR}"
SNAPSHOT_FILE="${SNAPSHOT_DIR}/progress-$(date -u +%Y%m%dT%H%M%SZ).json"

Snapshot contents

{
  "timestamp": "2026-03-08T10:30:00Z",
  "phase": "Phase 26",
  "progress": {
    "total": 16,
    "todo": 5,
    "wip": 3,
    "done": 6,
    "confirmed": 2
  },
  "progress_rate": 50,
  "recent_commits": ["abc1234 feat: ...", "def5678 fix: ..."],
  "recent_files": ["skills/harness-work/SKILL.md", "..."],
  "notes": ""
}

Diff comparison

When a previous snapshot exists, show the diff:

## Snapshot diff

| Metric | Previous ({{prev_time}}) | Current | Change |
|--------|-------------------------|---------|--------|
| Progress rate | {{prev}}% | {{current}}% | +{{diff}}%pt |
| Done tasks | {{prev_done}} | {{current_done}} | +{{diff_done}} |
| WIP tasks | {{prev_wip}} | {{current_wip}} | {{diff_wip}} |

Design intent: Snapshots are for manual use when users want to "record the current state." This is a different feature from the automatic progress feed during breezing (26.2.3).

Step 5: Next action suggestions

Next steps

**Priority 1**: {{task}}
- Reason: {{requested / waiting for unblock}}

**Recommended**: harness-work, harness-review

Anomaly detection

SituationWarning
Multiple cc:WIPMultiple tasks in progress simultaneously
pm:requested unprocessedHandle PM requests first
Large driftTask management not keeping up
WIP not updated for 3+ daysCheck if blocked

Step 6: Retrospective (default ON)

If there is at least 1 cc:done task, automatically run a retrospective. Can be explicitly skipped with --no-retro.

Step R1: Collect completed tasks

# Extract cc:done / pm:approved tasks from Plans.md
grep -E 'cc:done|pm:approved' Plans.md

# Recent completion commit history
git log --oneline --since="7 days ago"

# Change scale
git diff --stat HEAD~10

Step R2: Retrospective 4 items

ItemAnalysis method
Estimation accuracyInfer expected file count from Plans.md task descriptions → compare with actual changed files from git diff --stat
Block causesAggregate reason patterns for tasks with blocked marker (technical / external dependency / unclear spec)
Quality marker accuracyFor tasks tagged [feature:security] etc., check if related issues actually occurred
Scope variationTask count in Plans.md at first commit vs current count (added/removed count)

Step R3: Retrospective summary output

## Retrospective Summary

**Period**: {{start_date}} – {{end_date}}

| Metric | Value |
|--------|-------|
| Completed tasks | {{count}} |
| Blocks occurred | {{blocked_count}} |
| Scope variation | +{{added}} / -{{removed}} |
| Estimation accuracy | Expected {{est}} files → Actual {{actual}} files |

### Learnings
- {{1-2 lines of learning}}

### Actions for next time
- {{1-2 lines of improvement actions}}

Step R4: Record to harness-mem

Record retrospective results in harness-mem for reference during the next create. Record location: Relevant agent memory under .claude/agent-memory/.

Related skills

  • harness-plan — Plan creation and task management
  • harness-work — Task implementation
  • harness-review — Code review

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.