There are two ways to change an app and both are supported: edit the .cordango.yaml files
directly, or apply semantic operations. Both assemble into the same model,
so pick whichever is convenient. Neither one is more correct than the other.
Hand-editing suits a small, known change. Semantic operations suit structural change, and anything
an agent is driving.
Find the file first
The directory layout is a convention for people. What makes a file an entity is the entity: key on
its first line, not the folder it sits in.
Check what you may write
This answers from the build you have installed, so it can’t disagree with what your CLI will accept.
Don’t go reading the App Definition schema. See The schema for why.
Then check the change
No model, no database, no network. It’s free, and it reports against the file and line you wrote
instead of a path into a compiled document. Run it constantly.
Canonical key order and quoting for every .cordango.yaml file. Run it after hand-editing so the
next diff shows a change in meaning instead of a change in whitespace.
Four rules
One aggregate per change. A diff touching one entity is a diff somebody can review. A diff
touching nine is a diff that gets approved without being read.
Keys are stable. You can’t rename an entity or field key, because nothing rewrites the
references to it. Add the new one and remove the old one, deliberately, as two decisions.
There’s no rename. A key you choose today is a key you live with, or migrate away from by hand.
Spend a moment on it.
Never edit .cordango/. The dotted directory is build output. Changes there vanish on the next
cordango build, and they were never the source of anything.
Check before you declare. Companies, people and calendar events already exist as
core apps. Reference them.
Bringing in an existing definition
That turns an App Definition into source files you can edit. It’s the way in for an app that was
built before the workspace existed, or one produced somewhere else.
Diagnosing a workspace
This finds problems that aren’t source errors: an app registered in cordango.yaml whose directory
is missing, a stale credential, a layout that doesn’t add up. cordango check asks whether the app
is right. doctor asks whether the workspace is.