Skip to content

Enforce Code Cannon's hard workflow rules through git and platform gates instead of relying on agent instructions #199

Description

@sebastientaggart

Problem to Fix

Code Cannon's non-negotiable workflow rules — work only on an approved feature branch, one change per ticket, always open a pull request, pass review before merging — currently live as written instructions that each developer's AI agent is asked to follow. Different agents on different tools honor them to different degrees, and a rule written as a suggestion can simply be skipped. Nothing actually stops a rule from being broken.

Why it Matters

Consistent enforcement of business rules across a team using different AI tools is the entire point of Code Cannon. Instructions that agents "should" follow drift — that is the exact problem Code Cannon was built to escape. For rules that must never be broken (especially in compliance-sensitive work), enforcement has to sit outside the agent so it binds everyone identically, no matter which tool they use. This backbone is also a prerequisite for extending Code Cannon to new domains: it becomes the reusable pattern for how any future skill group enforces its own rules.

General Approach

Move the hard, non-negotiable rules out of written skill instructions and into automated gates that live in the code repository and on the hosting platform — checks that run automatically and block the action when a rule is violated, regardless of which agent or person triggered it. Written skills continue to guide the normal flow; the automated gates become the backstop that makes compliance mandatory rather than voluntary. Document the setup as a repeatable pattern a future skill group can adopt.

Complexity

Verification / QA effort: significant
Requires standing up repository-side and platform-side checks and confirming they block violations when driven by different agent tools, while ensuring they don't obstruct the legitimate happy path. Part of the effort is design: deciding exactly which invariants belong in local repository checks versus platform-side merge gates.

Acceptance Criteria

  • Committing or pushing outside an approved feature branch is automatically rejected, regardless of which agent or tool is used.
  • Merging a change that has not passed the required review is blocked at the hosting-platform level, not merely discouraged in instructions.
  • The normal, compliant workflow proceeds without new friction for developers who follow the rules.
  • The enforcement setup is documented as a repeatable pattern that a future skill group can adopt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions