You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: guard plugin csp-search agent/skill copies against template drift #124
plugins/csp/agents/csp-search.md and plugins/csp/skills/csp-search/SKILL.md are hand-synced copies of the csp init agent templates in crates/csp/src/bin/csp/agents/*.md. Only the embedded templates are covered by a unit test (agent_templates_match_cli_output_and_auto_cache in crates/csp/src/bin/csp/main.rs). If someone edits a template and forgets the plugin copies, nothing catches it. PR #122 had to update all of these files by hand.
Proposal
Add a guard that fails when the plugin copies drift from the templates. Two options:
A Rust test that reads the plugin files (via CARGO_MANIFEST_DIR, skipped when the files are absent, so isolated crate builds such as crates.io packaging still pass) and runs the same assertions, or compares bodies after stripping frontmatter.
A CI script that strips frontmatter and the skill-only header from each copy and diffs the bodies against an agent template.
Acceptance criteria
A change to the shared template body that is not mirrored in both plugin copies fails CI.
Isolated crate builds (cargo package / crates.io) are unaffected.
Out of scope
The README / README.ko / docs/src/content/docs/agents-md.mdx snippet copies (those are prose docs, not shipped agent definitions).
Activity