refactor-artifacts-sync
Artifacts Sync — refactor-chain · docs
Bundle: refactor-chain (self-diagnosing, self-healing fix-it pipeline). Phase: docs · Prerequisite: refactor-write-up (the change narrative) · Next: refactor-publish-checklist / refactor-ship. Adaptivity / conditional: repo-agnostic. Only edits documentation files; if an artifact doesn't exist yet, it offers to create it from the matching template.
Purpose
Every refactor quietly rots the docs. When files move, layers get renamed, or permissions get
re-wired, the standing documents that describe the system — how it's built, how data flows,
who's allowed to do what, and where the tests live — stop matching reality. This skill keeps
four durable artifacts current: architecture.md, flows.md, permissions.md, and
tests-map.md. It reads the post-refactor code, diffs each artifact against what the code now
says, and updates only the parts that drifted — so the docs a teammate reads next week describe
the app that actually exists.