Give inflection one owner in os-sdlc lib #1103

Open
opened 2026-10-18 14:53:42 +00:00 by jared · 1 comment
Owner

Problem

The os-sdlc lib has three copies of underscore/camelize: crc/census/definition.rb, crc/records/path_lookup.rb, and collaborator_pass/concept_brief/concept.rb. concept_brief/site.rb camelizes too. Inflection has no single owner.

Reproduce

n/a: design gap.

Approach

Give inflection one owner.

Required work:

  1. Add one inflection owner and use it in crc/census/definition.rb, crc/records/path_lookup.rb, concept_brief/concept.rb and concept_brief/site.rb.

Acceptance criteria

  1. Given the os-sdlc lib, when searched for underscore or camelize implementations, then one owner defines them.

Origin

  • Trigger: Follow-up from #1094 (implementation 63, hand-finish commit 17d4c688), session 6f78b932-f117-4bd7-bbed-524776dbb719.
  • Improvised this session: none
  • Chain: duplicate inflection <- no shared owner <- each file wrote its own
  • Where: plugins/os-sdlc lib/os_sdlc/crc, collaborator_pass/concept_brief
  • Session: 6f78b932-f117-4bd7-bbed-524776dbb719
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/6f78b932-f117-4bd7-bbed-524776dbb719.jsonl

VERDICT: CREATE

## Problem The os-sdlc lib has three copies of underscore/camelize: crc/census/definition.rb, crc/records/path_lookup.rb, and collaborator_pass/concept_brief/concept.rb. concept_brief/site.rb camelizes too. Inflection has no single owner. ## Reproduce n/a: design gap. ## Approach Give inflection one owner. Required work: 1. Add one inflection owner and use it in crc/census/definition.rb, crc/records/path_lookup.rb, concept_brief/concept.rb and concept_brief/site.rb. ## Acceptance criteria 1. Given the os-sdlc lib, when searched for underscore or camelize implementations, then one owner defines them. ## Origin - Trigger: Follow-up from #1094 (implementation 63, hand-finish commit 17d4c688), session 6f78b932-f117-4bd7-bbed-524776dbb719. - Improvised this session: none - Chain: duplicate inflection <- no shared owner <- each file wrote its own - Where: plugins/os-sdlc lib/os_sdlc/crc, collaborator_pass/concept_brief - Session: 6f78b932-f117-4bd7-bbed-524776dbb719 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/6f78b932-f117-4bd7-bbed-524776dbb719.jsonl VERDICT: CREATE
Author
Owner

Occurrence: Give the camel-to-snake rule one owner (principle 8)
Seen: plugins/os-sdlc/lib/os_sdlc/crc/records/path_lookup.rb
Run: Session: f1340f6a-3a9c-4161-984d-16e6863438c7
Adds: two more copies and the acronym split; a Zeitwerk-inflector question; a related ledger-row rule.

The camel-to-snake rule has five copies in os-sdlc, under plugins/os-sdlc/lib/os_sdlc/:

  • crc/records/path_lookup.rb:57: simple form name.gsub(/([a-z\d])([A-Z])/, '\1_\2').downcase
  • collaborator_pass/concept_brief/concept.rb:19: def underscore(part), same simple form at line 20
  • crc/definitions/definition.rb:11: def underscore(word), acronym-aware form ([A-Z]+)([A-Z][a-z]) first
  • cops/structural/unused_private_method/superclass_definition.rb:34: gsub chain in file_name, form ([A-Z]+)([A-Z][a-z])
  • cops/dry/repeated_collaborator_construction/construction.rb:25: gsub chain in extracted_name, form ([A-Z\d]+)([A-Z][a-z])

The three regex forms differ on acronyms. Question: can the Zeitwerk inflector (ADR-0090) be the one owner?

A second copy of a different rule: plugins/os-sdlc/lib/os_sdlc/crc/placement/rulings.rb:29 is renames.fetch(path, path). It answers "what is the current constant or path of a ledger row". plugins/os-sdlc/lib/os_sdlc/crc/records/row_check.rb:39 answers it differently: return row.fetch("constant") if pending?. The pending? branch is absent from rulings.rb. Principle 8 track, not started.

Occurrence: Give the camel-to-snake rule one owner (principle 8) Seen: plugins/os-sdlc/lib/os_sdlc/crc/records/path_lookup.rb Run: Session: f1340f6a-3a9c-4161-984d-16e6863438c7 Adds: two more copies and the acronym split; a Zeitwerk-inflector question; a related ledger-row rule. The camel-to-snake rule has five copies in os-sdlc, under `plugins/os-sdlc/lib/os_sdlc/`: - `crc/records/path_lookup.rb:57`: simple form `name.gsub(/([a-z\d])([A-Z])/, '\1_\2').downcase` - `collaborator_pass/concept_brief/concept.rb:19`: `def underscore(part)`, same simple form at line 20 - `crc/definitions/definition.rb:11`: `def underscore(word)`, acronym-aware form `([A-Z]+)([A-Z][a-z])` first - `cops/structural/unused_private_method/superclass_definition.rb:34`: `gsub` chain in `file_name`, form `([A-Z]+)([A-Z][a-z])` - `cops/dry/repeated_collaborator_construction/construction.rb:25`: `gsub` chain in `extracted_name`, form `([A-Z\d]+)([A-Z][a-z])` The three regex forms differ on acronyms. Question: can the Zeitwerk inflector (ADR-0090) be the one owner? A second copy of a different rule: `plugins/os-sdlc/lib/os_sdlc/crc/placement/rulings.rb:29` is `renames.fetch(path, path)`. It answers "what is the current constant or path of a ledger row". `plugins/os-sdlc/lib/os_sdlc/crc/records/row_check.rb:39` answers it differently: `return row.fetch("constant") if pending?`. The `pending?` branch is absent from `rulings.rb`. Principle 8 track, not started.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#1103
No description provided.