Load cc-architect through Zeitwerk (ADR-0302) #1462
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#1462
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
cc-architect loads its Ruby files through a hand-ordered
require_relativelist.plugins/cc-architect/scripts/plugin_config/plugin_config.rbhas 28require_relativelines, andSdlcRequireRelativeDensity allows 15 (hit at line 4). ADR-0302 (supersedes ADR-0241, ruled by Jared 2026-10-28) states that every Ruby plugin loads through Zeitwerk, and it names cc-architect.Observed
cc-architect has 70 Ruby files (35 under
test/) and 92require_relativelines:plugin_config.rb28,operations/validate.rb6,operations/audit.rb5. No file mentions Zeitwerk. The constants already match their paths, for examplePluginConfig::Operations::EnableandPluginConfig::Cli. #1385 counts only project-local requires, so it does not clear this hit.Reproduce
n/a: structure change; the RequireRelativeDensity offense at
plugin_config.rb:4is the signal.Approach
Load
scripts/plugin_config/through one Zeitwerk loader, as os-me does atplugins/os-me/lib/os_me.rb:21:Remove the
require_relativelines that the loader replaces. Add an eager-load test like the other Ruby plugins have. Behavior is unchanged; the existing cc-architect suite is the proof.Required work:
PluginConfig— check: presentZeitwerk::Loaderinplugins/cc-architect/scripts/plugin_config/plugin_config.rbrequire_relative 'key_check'inplugins/cc-architect/scripts/plugin_config/plugin_config.rbeager_loadinplugins/cc-architect/test/**/*.rbRejected: split
plugin_config.rbinto smaller manifests —operations.rbwould still hold 19 lines, so the offense moves. Rejected: a cop Exclude or baseline — forbidden.Origin
plugins/cc-architect/scripts/plugin_config/plugin_config.rb:4require_relativelines ← cc-architect not on Zeitwerk ← DESIGN (ADR-0241 listed four plugins only; ADR-0302 now names cc-architect)VERDICT: CREATE — no open ticket converts cc-architect to Zeitwerk; #1385 is a cop-matcher fix and #1418 is a gate sweep.