Rename Map::Catalog to MapCatalog #896

Closed
opened 2026-10-02 12:44:26 +00:00 by jared · 1 comment
Owner

Problem

OsSdlc::Map::Catalog (adapter/map/catalog.rb) shares the Map namespace with the model in a different role, and more catalogs may come. ADR-0261 decision 4 renames it to OsSdlc::MapCatalog at adapter/map_catalog.rb (ADR-0222: one concept-named constant per file; two objects in different roles cannot share a name).

Reproduce

n/a: mechanical rename, no behavior change.

Approach

  1. git mv plugins/os-sdlc/lib/os_sdlc/adapter/map/catalog.rb plugins/os-sdlc/lib/os_sdlc/adapter/map_catalog.rb; define OsSdlc::MapCatalog (not nested in Map). Keep PLUGIN_MAPS_DIR, CATALOG_KEY, default, default=, dir, path_for, load.
  2. Update every caller: model/implementation.rb:71, model/implementation/targeting.rb:6, command/implementation/open.rb:18, presenter/brief.rb:6, query/brief/facts.rb:73, reroute/draft.rb:54.
  3. Update every test and test helper: tests/support/{cli_next_instruction_helpers,tmpdir_test_case,reroute_test_case,subagent_start_cli}.rb and the tests under tests/command, tests/presenter, tests/query, tests/controller, tests/adapter/map/catalog_guard_map_test.rb (move it to tests/adapter/map_catalog_guard_map_test.rb to mirror the role directory).
  4. Update the ADR-0260 wording only if a doc names Map::Catalog outside docs/adr (docs/adr stay as written).
    Run after #895 lands; no behavior change.

Required work:

  1. Move the constant — check: present class MapCatalog in plugins/os-sdlc/lib/os_sdlc/adapter/map_catalog.rb
  2. Remove the old name from lib — check: absent Map::Catalog in plugins/os-sdlc/lib/os_sdlc/**/*.rb
  3. Remove the old name from tests — check: absent Map::Catalog in plugins/os-sdlc/tests/**/*.rb

Acceptance criteria

  1. Given the renamed constant, when the full suite runs, then it is green with no behavior change.
  2. Given the repository, when Map::Catalog is searched in plugins/os-sdlc lib and tests, then there is no match.
  3. Given OsSdlc::MapCatalog.new(dir).load("x"), when dir/x.yaml exists, then it returns the map as before.

Owner sketch

class OsSdlc::MapCatalog
  def self.default
  def load(name)
end

Origin

  • Trigger: user ruling on the map reroute design, 2026-10-02 (ADR-0261)
  • Improvised this session: none
  • Root candidate: #859
  • Session: 616e6f92-69d9-4a00-bf30-33a77404deb3
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/616e6f92-69d9-4a00-bf30-33a77404deb3.jsonl
  • Chain: Catalog shares the Map namespace across roles ← ADR-0222 naming rule ← DESIGN (docs/adr/0261)
  • Where: plugins/os-sdlc/lib/os_sdlc/adapter/map/catalog.rb

Parent: #859
Blocked by: #895

## Problem `OsSdlc::Map::Catalog` (adapter/map/catalog.rb) shares the `Map` namespace with the model in a different role, and more catalogs may come. ADR-0261 decision 4 renames it to `OsSdlc::MapCatalog` at `adapter/map_catalog.rb` (ADR-0222: one concept-named constant per file; two objects in different roles cannot share a name). ## Reproduce n/a: mechanical rename, no behavior change. ## Approach 1. `git mv plugins/os-sdlc/lib/os_sdlc/adapter/map/catalog.rb plugins/os-sdlc/lib/os_sdlc/adapter/map_catalog.rb`; define `OsSdlc::MapCatalog` (not nested in `Map`). Keep `PLUGIN_MAPS_DIR`, `CATALOG_KEY`, `default`, `default=`, `dir`, `path_for`, `load`. 2. Update every caller: model/implementation.rb:71, model/implementation/targeting.rb:6, command/implementation/open.rb:18, presenter/brief.rb:6, query/brief/facts.rb:73, reroute/draft.rb:54. 3. Update every test and test helper: tests/support/{cli_next_instruction_helpers,tmpdir_test_case,reroute_test_case,subagent_start_cli}.rb and the tests under tests/command, tests/presenter, tests/query, tests/controller, tests/adapter/map/catalog_guard_map_test.rb (move it to tests/adapter/map_catalog_guard_map_test.rb to mirror the role directory). 4. Update the ADR-0260 wording only if a doc names `Map::Catalog` outside docs/adr (docs/adr stay as written). Run after #895 lands; no behavior change. Required work: 1. Move the constant — check: present `class MapCatalog` in `plugins/os-sdlc/lib/os_sdlc/adapter/map_catalog.rb` 2. Remove the old name from lib — check: absent `Map::Catalog` in `plugins/os-sdlc/lib/os_sdlc/**/*.rb` 3. Remove the old name from tests — check: absent `Map::Catalog` in `plugins/os-sdlc/tests/**/*.rb` ## Acceptance criteria 1. Given the renamed constant, when the full suite runs, then it is green with no behavior change. 2. Given the repository, when `Map::Catalog` is searched in plugins/os-sdlc lib and tests, then there is no match. 3. Given `OsSdlc::MapCatalog.new(dir).load("x")`, when `dir/x.yaml` exists, then it returns the map as before. ## Owner sketch ```ruby class OsSdlc::MapCatalog def self.default def load(name) end ``` ## Origin - Trigger: user ruling on the map reroute design, 2026-10-02 (ADR-0261) - Improvised this session: none - Root candidate: #859 - Session: 616e6f92-69d9-4a00-bf30-33a77404deb3 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/616e6f92-69d9-4a00-bf30-33a77404deb3.jsonl - Chain: Catalog shares the Map namespace across roles ← ADR-0222 naming rule ← DESIGN (docs/adr/0261) - Where: plugins/os-sdlc/lib/os_sdlc/adapter/map/catalog.rb Parent: #859 Blocked by: #895
Author
Owner

Resolution

Done: Not done: user ruled 2026-10-02 to keep Map::Catalog

Evidence: ADR-0262 (e67674ce) amends ADR-0261 decision 4

Follow-ups: none

## Resolution **Done:** Not done: user ruled 2026-10-02 to keep Map::Catalog **Evidence:** ADR-0262 (e67674ce) amends ADR-0261 decision 4 **Follow-ups:** none
jared closed this issue 2026-10-02 13:04:25 +00:00
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#896
No description provided.