flow-post-task-synclisted
Install: claude install-skill NDDev-it-com/rldyour-claudecode
# Flow Post-Task Sync
## Purpose
Leave the project in a synchronized, documented, committed state. This skill runs after Serena memory sync, not instead of it.
## Workflow
1. Confirm Serena memories are current. If stale, run `serena-memory-sync` first.
2. If `flow_post_task_state.py` reports `execution.agent_role=worker`, do not run global sync. Return the worker JSON report to the orchestrator. Workers must not push, delete branches, install system configs, mutate project policy, or run final sync unless the orchestrator explicitly delegated that exact action.
3. Resolve rldyour-flow script paths before running commands. Prefer repo-local `plugins/rldyour-flow/scripts/*` when present; otherwise use `${CODEX_HOME:-$HOME/.codex}/plugins/cache/rldyour-codex/rldyour-flow/local/scripts/*`. If the Stop hook provided absolute installed paths, use those.
4. Read `.serena/.flow_post_task_state.json` if present and run the resolved `flow_post_task_state.py`. Inspect `branch_cleanup_state` and run the resolved `git_sync_audit.sh` when branch/worktree cleanup is not obviously complete.
5. Inspect uncommitted changes deeply. Separate source changes, docs, Serena knowledge, generated junk, runtime markers, and secrets.
6. Run `instruction-docs-sync` when durable project instructions may have changed and `project_flow_policy.py` reports `instruction_docs.mode` is not `disabled`. Keep `AGENTS.md` optimized for Codex and `.claude/CLAUDE.md` optimized for Claude Code; both are tracked no