Skip to content

Add Go guardrail validation for hex architecture projects#8

Open
dpeterka wants to merge 2 commits intopiercelamb:mainfrom
petabloc:feat/go-guardrails
Open

Add Go guardrail validation for hex architecture projects#8
dpeterka wants to merge 2 commits intopiercelamb:mainfrom
petabloc:feat/go-guardrails

Conversation

@dpeterka
Copy link
Copy Markdown

Summary

  • Adds validate_go_guardrails.py — validates Go files against hex architecture constraints (file sizes by layer, function lengths, import direction, prohibited patterns)
  • Wires validation into SKILL.md as Step 4.5 (post-implementation, pre-staging) with 2-retry loop
  • Adds go-guardrails.md prompt reference so Claude generates compliant code upfront
  • Adds hex architecture awareness to code-reviewer agent (Rule 6)
  • 34 unit tests, all passing

Test plan

  • uv run pytest tests/checks/test_validate_go_guardrails.py -v — 34/34 pass
  • Run /deep-implement on a Go section and verify guardrail step executes
  • Verify non-Go projects skip guardrail steps entirely

dpeterka and others added 2 commits March 11, 2026 08:31
Ports file size, function length, hex layer import, and prohibited
pattern checks from devx-design-crew. Wired into SKILL.md as Step 4.5
(post-implementation, pre-staging) with prompt-level guidance doc.

- validate_go_guardrails.py: 7 validation checks, CLI --override escape hatch
- 34 unit tests (all passing)
- go-guardrails.md: prompt reference for Claude during implementation
- code-reviewer: hex architecture awareness (Rule 6)
…ewer enhancements

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant