| 3191 | } |
| 3192 | |
| 3193 | int cbm_upsert_instructions(const char *path, const char *content) { |
| 3194 | if (!path || !content) { |
| 3195 | return CLI_ERR; |
| 3196 | } |
| 3197 | if (ensure_parent_dir(path) != CLI_OK) { |
| 3198 | return CLI_ERR; |
| 3199 | } |
| 3200 | return cbm_text_upsert_managed_block(path, CMM_MARKER_START, CMM_MARKER_END, content) == 0 |
| 3201 | ? CLI_OK |
| 3202 | : CLI_ERR; |
| 3203 | } |
| 3204 | |
| 3205 | static int cbm_upsert_windsurf_rules(const char *path, const char *content) { |
| 3206 | if (!path || !content || ensure_parent_dir(path) != CLI_OK) { |
no test coverage detected