Article CMS Persistence Workflow¶
Purpose¶
This document defines the cleanup rule that locally persisted article-domain artifacts must be persisted into the CMS system through the BFF.
This applies to:
- article markdown artifacts under
docs/articles/*.md - collection YAML artifacts under
docs/articles/collections/*.yaml
Authority Model¶
During cleanup, local files may continue to exist for:
- editorial drafting
- review
- normalization
- migration support
But the intended operational authority is:
- BFF as the mutation and retrieval gateway
- CMS as the underlying persistence layer
Required Persistence Rule¶
An article-domain cleanup is not complete until the affected object is persisted through BFF into CMS.
That means:
- cleaning a local article file is not enough
- creating a local collection YAML is not enough
- the resulting object must be represented in the BFF-backed system
Persistence Workflow¶
Article Object¶
- prepare or revise the local article artifact
- validate it against the article contract
- determine whether the object should be created or updated
- call:
createArticle- or
updateArticle - re-read via BFF and confirm persisted state
Article Collection¶
- prepare or revise the local collection artifact
- validate membership and collection metadata
- determine whether the collection should be created or updated
- call:
createArticleCollection- or
updateArticleCollection - apply membership mutations as needed:
addArticlesToCollectionremoveArticlesFromCollectionreplaceArticlesInCollection- re-read via BFF and confirm persisted state
Assistant Obligation¶
When an article-related cleanup or restructuring task is performed, the assistant should:
- identify which local artifacts changed
- determine whether those changes imply required BFF persistence
- perform safe validation before mutation
- persist the resulting objects through BFF when the needed mutation path exists
- report any gap where a required persistence path is still missing
Transitional Reality¶
Current scaffolding may still consume local article artifacts in some app flows.
That is acceptable as an interim compatibility measure.
But the direction of cleanup is:
- local file as staging
- BFF/CMS as authority
- site scaffolding progressively shifting to BFF-backed retrieval