Skip to content

chore(governance): thin-proxy CLAUDE.md refactor — add prompts/ submodule and .claude/rules/ #75

@CodeMonkeyCybersecurity

Description

Summary

Apply the CLAUDE.md thin-proxy refactor pattern (documented in cybermonkey/prompts#564) to eos.

The existing CLAUDE.md is 1833 lines, far exceeding the 200-line soft limit and 400-line hard limit enforced by `scripts/check-claude-md-size.sh`.

Changes

  • Add `prompts/` submodule: `ssh://git@vhost7:9001/cybermonkey/prompts.git` — gives access to all governance contracts via `@prompts/` @imports
  • Replace CLAUDE.md: 1833-line monolith → 75-line thin proxy (within budget)
  • Extract to `.claude/rules/` (path-scoped, loaded on demand):
    • `go-patterns.md` → loads on `**/*.go` — architecture, constants, logging, idempotency
    • `cli-patterns.md` → loads on `cmd/**/*.go` — cmd/pkg separation, flag validation, human-centric input
    • `secrets-vault.md` → loads on `pkg/vault/`, `pkg/consul/` — Vault/Consul patterns, token auth
    • `debugging.md` → loads on `cmd/debug/**` — diagnostic logging, evidence collection
  • Profile: `cybermonkey/prompts` profile `profiles/eos.yaml` created

Rationale

Frontier LLMs reliably follow ~150-200 instructions. A 1833-line CLAUDE.md means most rules are ignored due to context saturation. Path-scoped `.claude/rules/` files ensure the right rules load only when touching relevant code.

Refs: cybermonkey/prompts#564

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions