Replace the workspace's rules from a doctrine.v1 document.
POST/api/doctrine/import
The body is the raw YAML. It is validated twice, and both must pass: first
[DoctrineDoc::from_yaml] enforces the three format rules (lossless schema,
constants that travel, no forged system rule), then the ordinary rule-set save
re-runs the author-time checks and the locked-rule protection. An import is not
a privileged path: it may not author anything a hand-written PUT /api/rules
could not, and it goes through the same rules::replace_for to guarantee it.
Request
Responses
- 200
- 400
the imported set, now in force, with its new version
malformed document: not doctrine.v1, a constant that does not travel, a forged system rule, or a rule the author-time checks refuse