Skip to content

CM-64678: refactor ai-guardrails to single-file-per-IDE abstraction#459

Merged
Ilanlido merged 1 commit into
mainfrom
CM-64678-ai-guardrails-ide-refactor
May 25, 2026
Merged

CM-64678: refactor ai-guardrails to single-file-per-IDE abstraction#459
Ilanlido merged 1 commit into
mainfrom
CM-64678-ai-guardrails-ide-refactor

Conversation

@Ilanlido
Copy link
Copy Markdown
Collaborator

Move all IDE-specific code into one file per IDE under ides/, register instances in ides/init.py::IDES, and route install / uninstall / status / scan / session-start through the registry. Adding a new IDE is now one new file plus one registry line.

Handlers return a canonical HookDecision; IDE.build_hook_response translates to the per-IDE JSON response shape. Per-IDE config files, response_builders.py, IDE_CONFIGS, per-IDE event mappings, and the AIHookPayload classmethods are deleted in favor of the IDE class.

A parameterized IDE contract test gives every future agent the same baseline coverage automatically.

Move all IDE-specific code into one file per IDE under ides/, register
instances in ides/__init__.py::IDES, and route install / uninstall /
status / scan / session-start through the registry. Adding a new IDE
is now one new file plus one registry line.

Handlers return a canonical HookDecision; IDE.build_hook_response
translates to the per-IDE JSON response shape. Per-IDE config files,
response_builders.py, IDE_CONFIGS, per-IDE event mappings, and the
AIHookPayload classmethods are deleted in favor of the IDE class.

A parameterized IDE contract test gives every future agent the same
baseline coverage automatically.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cycodehq cycodehq deleted a comment from cycode-security Bot May 25, 2026
@cycodehq cycodehq deleted a comment from cycode-security Bot May 25, 2026
@cycodehq cycodehq deleted a comment from mateusz-sterczewski May 25, 2026
@Ilanlido Ilanlido merged commit 08499d3 into main May 25, 2026
45 of 46 checks passed
@Ilanlido Ilanlido deleted the CM-64678-ai-guardrails-ide-refactor branch May 25, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants