#
When You Change Code
- Before editing, run
cofactor deploy describe <paths>to see the owning target, its symbols, and who requires them. - Update the contracts in the same diff as the code. Adding a route, column read, job, event or env var adds a symbol. Removing one removes it. A new deployable unit goes in
system.yml. - An incompatible shape change mints
@n+1next to@n. Never change what@nmeans. - Never write a DROP, RENAME or narrowing migration. To contract the schema, remove the symbol from the db target's
provides; the column stays physically until much later. - One logical change per PR, across as many targets as it needs. Do not split a change by target. Split only when
plan --diffsays the change is unplannable, and then split along the reason it prints. - Before opening a PR, run
cofactor deploy plan --diff --application <name>. It plans your working-tree graph against what is live in each environment and prints the step order, or "unplannable" with the reason. Never sequence merges by hand.