issue_69: Separate what a risk affects from what mitigates it - #70
Merged
Conversation
The risk register headed a column "Mitigation/action" and filled it from the risk's outgoing `affects` relations. Those are opposites: `affects` points at what the risk endangers. Every risk in this repository names a quality scenario there, so the register told readers that the scenario mitigates the risk it is threatened by -- in the one artifact people scan without opening the detail pages. `mitigates` already existed in the relation enum and no generator had ever read it. Four ADRs here declare it, and none of that reached the register. It is only ever authored outgoing, so answering "what mitigates this risk?" needs the incoming direction -- which the render helper already held the artifacts for. Splits the column in two rather than replacing it: what a risk affects is worth seeing next to what is being done about it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The register lifts likelihood, impact and priority verbatim into columns one tenth of the table wide. Nothing says those source fields have to be terse, so writing a normal explanatory sentence -- which is what an assessment wants -- collapses the generated table, and the author only finds out by rendering it. The source artifact should not have to be written for its own index. `summary_cell` takes the leading sentence, so the verdict reaches the register and the reasoning stays where it belongs. Only a real sentence boundary counts: "Medium (rises when hosted)" survives whole. The template and the risk skill now say so too. Truncating silently would trade one invisible rule for another. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
dieterbaier
commented
Jul 29, 2026
dieterbaier
left a comment
Member
Author
There was a problem hiding this comment.
Review-Ergebnis: sieht gut aus. ✅
Die beiden in #69 beschriebenen Probleme sind sauber und an der richtigen Stelle behoben:
- Der Generator trennt jetzt korrekt zwischen dem, was ein Risiko gefährdet (
affects), und dem, was es mindert (eingehendemitigates-Relationen). Damit wird die Semantik aus dem Metamodell nicht länger im wichtigsten Überblicksartefakt umgedreht. incoming_relation_sourcesfolgt konsequent der bestehenden Regel, Relationen nur ausgehend zu pflegen und die Gegenrichtung bei der Generierung abzuleiten. Sortierung und Fallback sind deterministisch.- Die Bewertungsspalten übernehmen mit
summary_cellnur noch das führende Urteil. Gleichzeitig wird diese Projektionsregel nicht heimlich eingeführt, sondern sowohl im Risk-Skill als auch im Template erklärt. - Die Tests decken die falsche Spaltenbelegung sowie Satzgrenze, Klammerzusatz und leeren Wert ab.
- Der GitHub-Workflow
Validateist für den aktuellen Head erfolgreich durchgelaufen.
Besonders gut: Affects wurde nicht einfach entfernt. Beide Richtungen sind für ein Risk Register relevant und stehen nun mit ehrlichen Überschriften nebeneinander.
Von meiner Seite keine blockierenden Findings. Eine formale Freigabe lässt GitHub nicht zu, weil der PR vom verbundenen Benutzer selbst stammt.
This was referenced Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #69. Two commits, one per problem.
1. The register labelled harm as mitigation
fa0c854. TheRiskindex headed a columnMitigation/actionand filled itfrom the risk's outgoing
affectsrelations — which point at what the riskendangers. This repository's own register was the clearest case: every risk
names a quality scenario there, so it read as if the scenario mitigated the risk
it is threatened by.
mitigateswas in the relation enum and no generator had ever read it.grep -n mitigates scripts/validate-metamodel.rbreturned nothing, while fourADRs here declare it. Relations are only ever authored outgoing, so the question
"what mitigates this risk?" can only be answered from the incoming direction —
which
ArtifactRenderHelperalready had the artifacts for.The column is split rather than replaced, per the discussion on #69: what a risk
affects is worth seeing next to what is being done about it.
Before, for this repository's own R-001:
After:
That ADR-007 link is data this repository has carried all along.
2. Prose assessments collapsed the table
1bbb773.Likelihood,ImpactandPrioritywere lifted verbatim intocolumns one tenth of the table wide. Nothing said those fields had to be terse,
so writing the explanatory sentence an assessment actually wants wrecked the
generated register — discoverable only by rendering it.
summary_celltakes the leading sentence, so the verdict reaches the registerand the reasoning stays in the artifact. Only a real sentence boundary counts, so
Medium (rises when hosted)survives whole.Truncating silently would swap one invisible rule for another, so
templates/risk.adocandskills/risk/SKILL.mdnow state it, and the templategained a place to put the reasoning.
Verification
./build.sh test,validate,check-adapters,generate— all exit 0, andthe worktree is clean after
generate.test/validate_metamodel_test.rb. Both were confirmed to failagainst
mainbefore the fix — the register test on the column header, thetruncation test with
NoMethodError.maintoo and are not touched here.Provenance
Found while writing a second risk artifact in a project that consumes the
toolkit. The register only became visibly wrong once there was a second row to
compare against.
🤖 Generated with Claude Code