Correct the residual Sdlc/Structural/ConceptCycle message and lesson #1752

Closed
opened 2026-11-13 20:07:00 +00:00 by jared · 2 comments
Owner

Problem

The residual message of Sdlc/Structural/ConceptCycle is for a loop reference of no proven kind.
In round 1 it gave a correct fix in only 6 of 15 runs. This is below the 90% target.
The message stays open against that target until real corrections test it.
Ticket 1 supplies the facts. This ticket is blocked by ticket 1.

The base branch is ticket-1742. It is not merged. Its worktree is /home/jared/dev/cc-os/.claude/worktrees/ticket-1742. It holds the cop Sdlc/Structural/ConceptCycle and the class OsSdlc::Lint::ConceptCycleCheck. main does not have them.

The research source is docs/research/lint-lessons/2026-11-13-concept-cycle-kinds/ on main (commits 5465548a7, 9bb6a9845, 58ee53c). It holds simulation/kinds.rb, simulation/facts-os-sdlc.yml, simulation/package/ (lessons, message forms, render.rb), and simulation/round-1/grades/*.yml.

A "loop reference" is a reference from one concept to another concept when the two concepts are in a dependency loop. A "concept" is a top-level namespace of the library with its directory. The cop reports 93 loop references in 58 files of os-sdlc.

Work: correct the message and the lesson of the ConceptCycle cop on ticket-1742.
The source text is simulation/package/sdlc-structural-concept-cycle.yml, plus the round 1 corrections below.
Corrections:

  • List each proven fault on a return route, with file and line, and say "correct those first, then run the gate again".
  • Say that the printed route is one of N routes.
  • Give file and line for each route edge.
  • Add a lesson step for a correct line with zero direct opposite sites. The step says to follow the indirect route.
  • Remove or qualify "Do not move the whole loop into one concept". It forbids the correct fix in a two-member loop.
  • List the users of the source constant.
  • Put "do not change this line" after the analysis sentences.
  • Replace the const_get example with a move to an owner.

ADR-0082 says that Sdlc/* cops apply to each target project.
Before any change to the cop name, search the target projects for a .rubocop.yml that names Sdlc/Structural/ConceptCycle.

Constraints:

  • Register cops in plugins/os-sdlc/.rubocop.yml only (ADR-0298).
  • Each cop file name under lib/os_sdlc/cops/structural/ agrees with its constant (ADR-0090).
  • Use no Exclude list and no allowlist.
  • Write no repository name in lesson or message-form text.
  • Put pass/fail logic in tested Ruby, not in prompt text.

Observed

On five held-out references (round-1/grades/unseen-1.yml to unseen-5.yml), 6 of 15 runs made a correct fix.
9 of 15 runs named the correct fault and made no edit.
0 of 15 runs made a wrong change.
In the two-member loops (2 cases), 6 of 6 runs fixed the fault.
In the nine-member loop (3 cases), 0 of 9 runs fixed the fault.
The cause: the message names a proven fault only when one fix alone removes the report. When it named one, all three runs went to it.

Reproduce

n/a: feature ticket.

Origin

  • Trigger: round 1 of the concept-cycle kinds research (docs/research/lint-lessons/2026-11-13-concept-cycle-kinds/ on main)
  • Improvised this session: none
  • Chain: the agent names the fault and makes no edit ← the message names a proven fault only when one fix alone removes the report ← the message design (DESIGN: simulation/package/sdlc-structural-concept-cycle.yml and simulation/round-1/grades/unseen-*.yml)
  • Root candidate: none found; searched ConceptCycle, concept cycle, Structural, residual message, lesson (open #1746 and #1741 name ConceptCycleCheck but cover different faults)
  • Where: the ConceptCycle cop and lesson (branch ticket-1742)
  • Session: fdf2ac7d-9590-47d4-97e8-ebff9711ce46
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os-plugins-os-sdlc/fdf2ac7d-9590-47d4-97e8-ebff9711ce46.jsonl
  • VERDICT: CREATE - round 1 measured the fault (6 of 15 against a 90% target); no open ticket covers the same message or lesson fault.
## Problem The residual message of `Sdlc/Structural/ConceptCycle` is for a loop reference of no proven kind. In round 1 it gave a correct fix in only 6 of 15 runs. This is below the 90% target. The message stays open against that target until real corrections test it. Ticket 1 supplies the facts. This ticket is blocked by ticket 1. The base branch is `ticket-1742`. It is not merged. Its worktree is `/home/jared/dev/cc-os/.claude/worktrees/ticket-1742`. It holds the cop `Sdlc/Structural/ConceptCycle` and the class `OsSdlc::Lint::ConceptCycleCheck`. `main` does not have them. The research source is `docs/research/lint-lessons/2026-11-13-concept-cycle-kinds/` on `main` (commits `5465548a7`, `9bb6a9845`, `58ee53c`). It holds `simulation/kinds.rb`, `simulation/facts-os-sdlc.yml`, `simulation/package/` (lessons, message forms, `render.rb`), and `simulation/round-1/grades/*.yml`. A "loop reference" is a reference from one concept to another concept when the two concepts are in a dependency loop. A "concept" is a top-level namespace of the library with its directory. The cop reports 93 loop references in 58 files of os-sdlc. Work: correct the message and the lesson of the `ConceptCycle` cop on `ticket-1742`. The source text is `simulation/package/sdlc-structural-concept-cycle.yml`, plus the round 1 corrections below. Corrections: - List each proven fault on a return route, with file and line, and say "correct those first, then run the gate again". - Say that the printed route is one of N routes. - Give file and line for each route edge. - Add a lesson step for a correct line with zero direct opposite sites. The step says to follow the indirect route. - Remove or qualify "Do not move the whole loop into one concept". It forbids the correct fix in a two-member loop. - List the users of the source constant. - Put "do not change this line" after the analysis sentences. - Replace the `const_get` example with a move to an owner. ADR-0082 says that `Sdlc/*` cops apply to each target project. Before any change to the cop name, search the target projects for a `.rubocop.yml` that names `Sdlc/Structural/ConceptCycle`. Constraints: - Register cops in `plugins/os-sdlc/.rubocop.yml` only (ADR-0298). - Each cop file name under `lib/os_sdlc/cops/structural/` agrees with its constant (ADR-0090). - Use no `Exclude` list and no allowlist. - Write no repository name in lesson or message-form text. - Put pass/fail logic in tested Ruby, not in prompt text. ## Observed On five held-out references (`round-1/grades/unseen-1.yml` to `unseen-5.yml`), 6 of 15 runs made a correct fix. 9 of 15 runs named the correct fault and made no edit. 0 of 15 runs made a wrong change. In the two-member loops (2 cases), 6 of 6 runs fixed the fault. In the nine-member loop (3 cases), 0 of 9 runs fixed the fault. The cause: the message names a proven fault only when one fix alone removes the report. When it named one, all three runs went to it. ## Reproduce n/a: feature ticket. ## Origin - Trigger: round 1 of the concept-cycle kinds research (`docs/research/lint-lessons/2026-11-13-concept-cycle-kinds/` on `main`) - Improvised this session: none - Chain: the agent names the fault and makes no edit ← the message names a proven fault only when one fix alone removes the report ← the message design (DESIGN: `simulation/package/sdlc-structural-concept-cycle.yml` and `simulation/round-1/grades/unseen-*.yml`) - Root candidate: none found; searched ConceptCycle, concept cycle, Structural, residual message, lesson (open #1746 and #1741 name ConceptCycleCheck but cover different faults) - Where: the `ConceptCycle` cop and lesson (branch `ticket-1742`) - Session: fdf2ac7d-9590-47d4-97e8-ebff9711ce46 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os-plugins-os-sdlc/fdf2ac7d-9590-47d4-97e8-ebff9711ce46.jsonl - VERDICT: CREATE - round 1 measured the fault (6 of 15 against a 90% target); no open ticket covers the same message or lesson fault.
Author
Owner

Blocked by #1748: this ticket uses the classification that it builds.

Blocked by #1748: this ticket uses the classification that it builds.
Author
Owner

Resolution

Done: The residual Sdlc/Structural/ConceptCycle message lists each proven fault on a return route with its line and its cop, says how many routes exist, gives the lines of each edge of one route, lists the users of the class of the line, and ends with 'Do not change this line' only when the Facts prove it. The lesson has the step for a line with no direct line back, the corrected sentence on a two-concept loop, and a move-to-owner example. README explains that the four cops work together. One History row is in docs/implementation-status/os-sdlc.md.

Evidence: Branch ticket-1742, commits cd772150f ee1167980 700513058 (22 files, +578/-65). Suite: 5541 runs, 0 failures, 0 errors. Rubocop on the 19 changed Ruby files: no offenses. Cop counts on os-sdlc lib did not change: ConceptCycle 62 in 36 files, ClassInWrongConcept 1, StartingCodeInSharedConcept 19, ConceptCallsItsCaller 11. ADR-0082 check by the build agent: no other project config names the cop. The messages at the three unseen os-sdlc lines of round 1 now give the Facts that the agents lacked.

Follow-ups: The 90% target is not measured for the residual message: no second simulation round was run (ruling 160). #1746 stays open (a superclass reference of a concept root class gets the wrong source). Dropped: Kinds::Sites sorts lines as text, a display order defect only.

## Resolution **Done:** The residual Sdlc/Structural/ConceptCycle message lists each proven fault on a return route with its line and its cop, says how many routes exist, gives the lines of each edge of one route, lists the users of the class of the line, and ends with 'Do not change this line' only when the Facts prove it. The lesson has the step for a line with no direct line back, the corrected sentence on a two-concept loop, and a move-to-owner example. README explains that the four cops work together. One History row is in docs/implementation-status/os-sdlc.md. **Evidence:** Branch ticket-1742, commits cd772150f ee1167980 700513058 (22 files, +578/-65). Suite: 5541 runs, 0 failures, 0 errors. Rubocop on the 19 changed Ruby files: no offenses. Cop counts on os-sdlc lib did not change: ConceptCycle 62 in 36 files, ClassInWrongConcept 1, StartingCodeInSharedConcept 19, ConceptCallsItsCaller 11. ADR-0082 check by the build agent: no other project config names the cop. The messages at the three unseen os-sdlc lines of round 1 now give the Facts that the agents lacked. **Follow-ups:** The 90% target is not measured for the residual message: no second simulation round was run (ruling 160). #1746 stays open (a superclass reference of a concept root class gets the wrong source). Dropped: Kinds::Sites sorts lines as text, a display order defect only. <!-- os-backlog kind: resolution -->
jared closed this issue 2026-11-13 21:51:29 +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#1752
No description provided.