File-native projects
seif.yaml (format: seif.files.v1) takes precedence over context-project.json. The compiler returns the existing normalized model; the runtime and immutable Build contracts remain compatible. Migration preserves the exact design digest and retains the original JSON. Export creates context-project.export.json, never overwriting it.
agents/<agent>/AGENT.md: agent identity, consumers and objectives in YAML frontmatter.agents/<agent>/objectives/*.md: objective instructions, including exact whitespace.agents/<agent>/context.yaml: ordered profiles, layer bindings, rules and budgets.knowledge/**/*.md,policies/**/*.md: frontmatterlayer,audience,updated,currentness,tags;##sections are materials withpath#headinglocators.tools/*.tool.yaml: existing tool contract, executor and approval settings.tests/*.ctx.md: existing Context Test fields orquery,inputs,must,forbid,budgetaliases.must/forbidmatch material locators;expect.include/excludeaddress layers.orderpreserves migrated array order.tests/*.guard.md: the same test model with retained incident provenance.experiments/*.exp.yaml: deterministic sweep definitions.bindings/<env>.binding.yaml: environment references, never secrets.
Migration keeps legacy source connections (including committed Git snapshots) intact. Legacy inline text is read from an inlineFile Markdown body and compiled to the same source model. This preserves both design and material digests. New Markdown files use the stable file-native source and explicit layer bindings. Their content is observed from the working tree. Paths are locators; identity includes source and digest. Section comments such as <!-- seif: updated=2024-12-02 --> override metadata. Duplicate headings receive deterministic -2, -3 suffixes; fenced code is ignored. Section splitting is opt-in on normalized source definitions (sections: true), so old JSON projects and old Builds retain their original meaning.
The watcher coalesces edits for 60ms and invalidates resolution and tests. All tests are invalidated conservatively because an edit can affect selection in other layers. Native/editor saves compare the original file digest and refuse external conflicts. Secrets, malformed YAML, duplicate keys, aliases and escaping symlinks are refused. Generated .seif/, Builds and archive directories do not feed back into the watcher.