Skip to content

guardrails: plugin MVP for policy enforcement #4

@terisuke

Description

@terisuke

Parent epic: #1

Source brief:

  • docs/ai-guardrails/issues/003-guardrail-plugin-mvp.md
  • docs/ai-guardrails/migration/claude-code-skills-inventory.md

Problem

Claude hooks that enforced guardrails do not transfer directly. OpenCode plugins are the primary runtime surface for secret blocking, shell environment injection, and lifecycle observation.

Deliverables

  • local or packaged guardrail plugin skeleton
  • secret read blocklist
  • shell environment injection for policy mode
  • lifecycle logging for session and permission events
  • compaction hook stub for future context preservation
  • first migration of fast-feedback hooks such as post-lint-format and config protection where feasible

Acceptance

  • plugin loads from project config
  • plugin can inject environment through shell.env
  • plugin can observe session.created
  • plugin tests do not require a deep core patch

Notes

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions