Commit b8ea144
This commit adds an opt-in --update-cache flag to src/convert_to_ide_formats.py to refresh the local Claude Code plugin cache after a successful build.
After the normal build pipeline succeeds, --update-cache mirrors the
generated skills/software-security/ tree into:
~/.claude/plugins/cache/project-codeguard/codeguard-security/<version>/
skills/software-security/
so locally edited rules can be exercised in Claude Code immediately,
without waiting for a marketplace release.
Behavior:
- Off by default; no change to standard CI builds.
- Marketplace name (project-codeguard) and plugin name (codeguard-security)
match .claude-plugin/marketplace.json and .claude-plugin/plugin.json.
- Version is read from pyproject.toml via the existing helper and validated
against [A-Za-z0-9._-]+ before being spliced into a filesystem path
(defense-in-depth against path traversal).
- The versioned cache directory is fully replaced (rmtree of cache_base
followed by copytree) so stale rules from a previous build can't linger.
This is not atomic: there is a brief window where the directory is
missing or partially written. The flag is intended for dev use where
this is acceptable.
- All shutil operations are wrapped in try/except; failures exit non-zero
with a clear message.
No new dependencies; only stdlib (re, shutil, pathlib).1 parent dddb5c3 commit b8ea144
1 file changed
Lines changed: 94 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
68 | 143 | | |
69 | 144 | | |
70 | 145 | | |
| |||
326 | 401 | | |
327 | 402 | | |
328 | 403 | | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
329 | 414 | | |
330 | 415 | | |
331 | 416 | | |
| |||
445 | 530 | | |
446 | 531 | | |
447 | 532 | | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
0 commit comments