Plans.md とセッション状態の同期・ハンドオフ支援
/plugin marketplace add Chachamaru127/claude-code-harness/plugin install claude-code-harness@claude-code-harness-marketplacesonnetセッション間のハンドオフと Plans.md の状態同期を担当するエージェント。 Cursor(PM)との状態共有を確実にします。
Task tool で subagent_type="project-state-updater" を指定
{
"action": "save_state" | "restore_state" | "sync_with_cursor",
"context": "string (optional - 追加コンテキスト)"
}
{
"status": "success" | "partial" | "failed",
"updated_files": ["string"],
"state_summary": {
"tasks_in_progress": number,
"tasks_completed": number,
"tasks_pending": number,
"last_handoff": "datetime"
}
}
save_stateセッション終了時に現在の作業状態を保存。
# Git状態
git status -sb
git log --oneline -3
# Plans.md の内容
cat Plans.md
## 最終更新情報
- **更新日時**: {{YYYY-MM-DD HH:MM}}
- **最終セッション担当**: Claude Code
- **ブランチ**: {{branch}}
- **最終コミット**: {{commit_hash}}
---
## 進行中タスク(自動保存)
{{cc:WIP のタスク一覧}}
## 次回セッションへの引き継ぎ
{{作業途中の内容、注意点}}
git add Plans.md
git commit -m "docs: セッション状態を保存 ({{datetime}})"
restore_stateセッション開始時に前回の状態を復元。
cat Plans.md
## 📋 前回セッションからの引き継ぎ
**前回更新**: {{最終更新日時}}
**担当**: {{最終セッション担当}}
### 継続タスク(`cc:WIP`)
{{進行中だったタスク一覧}}
### 引き継ぎメモ
{{前回セッションからの注意点}}
---
**作業を継続しますか?** (y/n)
sync_with_cursorCursor との状態同期。Plans.md のマーカーを更新。
Plans.md から全マーカーを抽出:
grep -E '(cc:|cursor:)' Plans.md
| 不整合パターン | 対処 |
|---|---|
cc:完了 が長期間 pm:確認済(互換: cursor:確認済)にならない | PM に確認を促す |
pm:依頼中(互換: cursor:依頼中)が cc:WIP にならない | Claude Code が着手を忘れている |
複数の cc:WIP が存在 | 並行作業の確認 |
## 🔄 2-Agent 同期レポート
**同期日時**: {{YYYY-MM-DD HH:MM}}
### Claude Code 側の状態
| タスク | マーカー | 最終更新 |
|--------|---------|---------|
| {{タスク名}} | `cc:WIP` | {{日時}} |
| {{タスク名}} | `cc:完了` | {{日時}} |
### Cursor 確認待ち
以下のタスクは Claude Code で完了済みです。確認をお願いします:
- [ ] {{タスク名}} `cc:完了` → `pm:確認済`(互換: `cursor:確認済`)に更新
### 不整合・警告
{{検出された不整合があれば記載}}
| マーカー | 意味 | 設定者 |
|---|---|---|
cc:TODO | Claude Code 未着手 | Cursor / Claude Code |
cc:WIP | Claude Code 作業中 | Claude Code |
cc:完了 | Claude Code 完了(確認待ち) | Claude Code |
pm:確認済 | PM 確認完了 | PM |
pm:依頼中 | PM から依頼 | PM |
cursor:確認済 | (互換)pm:確認済 と同義 | Cursor |
cursor:依頼中 | (互換)pm:依頼中 と同義 | Cursor |
blocked | ブロック中(理由を併記) | どちらでも |
[新規タスク]
↓
pm:依頼中 ─→ cc:TODO ─→ cc:WIP ─→ cc:完了 ─→ pm:確認済
↑ │
└───────────┘
(差し戻し)
このエージェントは以下のタイミングで自動実行を推奨:
restore_statesave_state/handoff-to-cursor 実行時: sync_with_cursorsync_with_cursor(状態の確認)cc:完了 ≠ cc:完了 )Designs feature architectures by analyzing existing codebase patterns and conventions, then providing comprehensive implementation blueprints with specific files to create/modify, component designs, data flows, and build sequences