| 699 | } |
| 700 | |
| 701 | bool cbm_remove_old_monolithic_skill(const char *skills_dir, bool dry_run) { |
| 702 | if (!skills_dir) { |
| 703 | return false; |
| 704 | } |
| 705 | |
| 706 | char old_path[CLI_BUF_1K]; |
| 707 | snprintf(old_path, sizeof(old_path), "%s/codebase-memory-mcp", skills_dir); |
| 708 | struct stat st; |
| 709 | if (stat(old_path, &st) != 0 || !S_ISDIR(st.st_mode)) { |
| 710 | return false; |
| 711 | } |
| 712 | |
| 713 | if (dry_run) { |
| 714 | return true; |
| 715 | } |
| 716 | return rmdir_recursive(old_path) == 0; |
| 717 | } |
| 718 | |
| 719 | /* ── JSON config helpers (using yyjson) ───────────────────────── */ |
| 720 |
no test coverage detected