Skip to content

feat(socratic-recovery): pin a fixed second level for the question tree#497

Merged
rdmueller merged 2 commits into
LLM-Coding:mainfrom
raifdmueller:feat/socratic-fixed-question-tree-493
May 17, 2026
Merged

feat(socratic-recovery): pin a fixed second level for the question tree#497
rdmueller merged 2 commits into
LLM-Coding:mainfrom
raifdmueller:feat/socratic-fixed-question-tree-493

Conversation

@raifdmueller

@raifdmueller raifdmueller commented May 17, 2026

Copy link
Copy Markdown
Contributor

Closes #493, closes #494, closes #495.

Why

Across four reverse-engineering runs on the same codebase, the question tree came out at 105 / 60 / 57 leaves, with whole role-sections silently dropped. "Anchors as guides" does not constrain the tree's shape, and unstable Q-IDs make trees from different runs impossible to diff.

What

The tree's second level is now fixed — the same enumerated node set on every run, emitted even when a node's only leaf is [OPEN] or [ANSWERED: not applicable]:

  • Q1.1-Q1.6 — six PRD elements
  • Q2.1-Q2.6 — six specification categories
  • Q3.1-Q3.12 — the twelve arc42 chapters, in arc42 order
  • Q4.1-Q4.8 — the eight ISO/IEC 25010 characteristics; Q4.9 priority
  • Q5.1-Q5.5 — five risk categories

Free, code-driven decomposition continues only below the fixed level. Q-IDs become stable — Q3.7 is always the Deployment View — so trees diff node-by-node.

The three issues land together because the contract, the brownfield page and the skill all described free decomposition and would otherwise compete:

Notes

Test plan

  • npm run build succeeds; /brownfield, /socratic-recovery-skill, /contracts render
  • llms.txt shows the rewritten socratic-code-theory-recovery contract
  • Skill files internally consistent — no Q2.PUC / Q2.SUC left without the fixed-node prefix

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Dokumentation

    • Stabilisierte Struktur des Fragenbaums mit festen Knoten auf der zweiten Ebene
    • Verfeinerte Q-ID-Konventionen für bessere Nachverfolgbarkeit über mehrere Läufe hinweg
    • Präzisierte Vorgaben für die Ausgabe offener Fragen organisiert nach Rolle (Product Owner, Architect, Developer, Domain Expert, Operations)
  • Refactor

    • Umgestaltung von flexibler rekursiver zu strukturierter fixed-level Zerlegung für konsistentere Ergebnisse

Review Change Stack

Closes LLM-Coding#493, LLM-Coding#494, LLM-Coding#495.

Across four reverse-engineering runs on the same codebase the question
tree came out at 105 / 60 / 57 leaves, with whole role-sections silently
dropped. "Anchors as guides" does not constrain the shape. This pins the
tree's second level to a fixed, enumerated node set so Q-IDs are stable
and trees from different runs diff node-by-node.

The fixed second level (emitted on every run, even when a node's only
leaf is [OPEN] or [ANSWERED: not applicable]):
- Q1.1-Q1.6  six PRD elements
- Q2.1-Q2.6  six specification categories
- Q3.1-Q3.12 the twelve arc42 chapters, in arc42 order
- Q4.1-Q4.8  the eight ISO/IEC 25010 characteristics; Q4.9 priority
- Q5.1-Q5.5  five risk categories
Free, code-driven decomposition continues only below the fixed level.

LLM-Coding#493 — contracts.json: rewrote the socratic-code-theory-recovery card
  (template + templateDe) as the canonical enumeration.
LLM-Coding#494 — brownfield page (EN/DE): Phase 1 prose, the copy-paste Phase 1
  prompt, the cheat-sheet prompt, and the OPEN_QUESTIONS rule (always
  one section per Ask role, empty ones included).
LLM-Coding#495 — the skill: phase-1-question-tree prompt, SKILL.md, and the
  references (arc42, iso-25010, cockburn-use-cases, output-schema,
  examples) reframed from "guides" to the fixed level. Named use-case
  sub-trees now nest under their fixed node — Q2.PUC.* -> Q2.2.PUC.*,
  Q2.SUC.* -> Q2.3.SUC.* — and the socratic-recovery-skill page (EN/DE)
  is brought in line. Plugin mirror auto-synced by the pre-commit hook.

The last contract bullet drops "with Q-ID traceability" to stay
consistent with the merged LLM-Coding#491 (Q-IDs are build-time only, not written
into synthesized docs).

docs/all-anchors.adoc regenerated (was stale — missing recent anchors).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 17, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@raifdmueller has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 40 minutes and 42 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 6d11bb8a-da04-4d72-8d22-39a64e4012a9

📥 Commits

Reviewing files that changed from the base of the PR and between 546fec5 and 330fea8.

📒 Files selected for processing (14)
  • docs/brownfield-workflow.adoc
  • docs/brownfield-workflow.de.adoc
  • plugins/semantic-anchors/skills/socratic-code-theory-recovery/prompts/phase-1-question-tree.md
  • plugins/semantic-anchors/skills/socratic-code-theory-recovery/prompts/phase-2-synthesize.md
  • plugins/semantic-anchors/skills/socratic-code-theory-recovery/references/examples.md
  • plugins/semantic-anchors/skills/socratic-code-theory-recovery/references/iso-25010.md
  • plugins/semantic-anchors/skills/socratic-code-theory-recovery/references/output-schema.md
  • skill/socratic-code-theory-recovery/prompts/phase-1-question-tree.md
  • skill/socratic-code-theory-recovery/prompts/phase-2-synthesize.md
  • skill/socratic-code-theory-recovery/references/examples.md
  • skill/socratic-code-theory-recovery/references/iso-25010.md
  • skill/socratic-code-theory-recovery/references/output-schema.md
  • website/public/data/contracts.json
  • website/public/llms.txt

Walkthrough

Die PR konkretisiert das Socratic Code-Theory Recovery-Verfahren durch eine fixierte zweite Ebene des Fragenbaums (Q1.1–Q5.5) mit stabilen Q-IDs über Dokumentationen, Prompts, Referenzmaterialien und Skill-Definitionen hinweg. Dadurch wird die vorherige freie Zerlegung durch eine enumerierte, maschinenüberprüfbare Struktur ersetzt, die konsistente Ausgaben über mehrere Läufe ermöglicht.

Changes

Fixierte zweite Ebene des Question-Tree mit stabilen Q-IDs

Layer / File(s) Summary
Output-schema und Q-ID-Struktur
plugins/semantic-anchors/skills/socratic-code-theory-recovery/references/output-schema.md, skill/socratic-code-theory-recovery/references/output-schema.md
Die QUESTION_TREE.adoc und OPEN_QUESTIONS.adoc Ausgabeformate werden neu definiert: feste zweite Ebene mit enumerierten Knoten, stabile Bezeichnungen für Unterbäume (Q2.2.PUC., Q2.3.SUC.), und Ausgaberegeln (jeder feste Knoten auch wenn nur [OPEN] oder [ANSWERED: not applicable]).
Phase-1-Prompt mit fixierter Zerlegungsregel
plugins/semantic-anchors/skills/socratic-code-theory-recovery/prompts/phase-1-question-tree.md, skill/socratic-code-theory-recovery/prompts/phase-1-question-tree.md
Der Phase-1-Prompt wird umgestellt: explizite fünf Root-Fragen, erzwungene Emission der festen zweiten Ebene (Q1.1–Q5.5) in exakter Reihenfolge, freie code-getriebene Zerlegung nur unterhalb dieser Ebene, klare Stopp-Kriterien, und mandatorische Ask-Rolle-Sektionen in OPEN_QUESTIONS.adoc auch wenn leer.
Referenzmaterialien mit neuer Knoten-Zuordnung
plugins/semantic-anchors/skills/socratic-code-theory-recovery/references/arc42.md, references/cockburn-use-cases.md, references/iso-25010.md, references/examples.md, skill/socratic-code-theory-recovery/references/...
arc42 wird als feste Q3.1–Q3.12 Kapitel neupositioniert, Cockburn-Use-Cases unter Q2.2 (Persona) und Q2.3 (System) mit neuen Präfixen, ISO-25010 als feste Q4.1–Q4.8 Nodes, und Beispiele werden umnummeriert zur neuen Struktur.
Socratic-Recovery-Skill mit neuer Phase-1-Struktur
plugins/semantic-anchors/skills/socratic-code-theory-recovery/SKILL.md, skill/socratic-code-theory-recovery/SKILL.md
Die Skill-Dateien dokumentieren die fixierte zweite Ebene, stabile Q-IDs, Ausgaberegeln für Ask-Rollen und die klare Abgrenzung zwischen fester Ebene und freier Zerlegung.
Brownfield-Workflow-Prozessdokumentation
docs/brownfield-workflow.adoc, docs/brownfield-workflow.de.adoc
Phase-1-Beschreibung stellt klar, dass die zweite Ebene fix ist, Q-IDs stabil bleiben, freie Zerlegung erst unterhalb der festen Ebene erfolgt, und OPEN_QUESTIONS.adoc immer eine Sektion pro Ask-Rolle enthält (auch leer).
Socratic-Recovery-Skill-Übersichten
docs/socratic-recovery-skill.adoc, docs/socratic-recovery-skill.de.adoc
Skill-Übersichten beschreiben, dass die zweite Ebene fix enumeriert ist, arc42 die Q3.1–Q3.12 Nodes liefert, Cockburn Fully-Dressed-Felder für Persona vs. System bereitstellt, und ISO-25010 die Q4.1–Q4.8 Nodes definiert.
Katalog-Updates für Semantic Anchors
docs/all-anchors.adoc
all-anchors.adoc wird um neue Semantic-Anchor-Includes erweitert (xy-problem, decisional-balance-sheet, double-diamond, kano-model, kotter-8-step-change-model, hoshin-kanri) und ein neuer Workflow-Abschnitt hinzugefügt.
Verträge und LLM-Anweisungen
website/public/data/contracts.json, website/public/llms.txt
contracts.json und llms.txt werden aktualisiert, um die fixierte zweite Ebene, stabile Q-ID-Konventionen, Ausgaberegeln für Ask-Rollen und den Zwei-Phasen-Workflow als maschinenüberprüfbare Verträge zu definieren.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • LLM-Coding/Semantic-Anchors#493: Definiert den initialen Kontrakt für die fixierte zweite Ebene des Question-Tree in contracts.json mit stabilen Q-ID-Bereichen und Ausgaberegeln.
  • LLM-Coding/Semantic-Anchors#494: Aktualisiert die Brownfield-Workflow-Seite mit Phase-1-Prozessbeschreibung der fixierten zweiten Ebene und Ask-Rolle-Ausgaben.
  • LLM-Coding/Semantic-Anchors#495: Aktualisiert die Socratic Code Theory Recovery Skill-Definitionen und Prompts zur Durchsetzung der fixierten zweiten Ebene.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Der PR-Titel fasst die Hauptänderung präzise zusammen: Einführung einer festen zweiten Ebene für den Question-Tree im Socratic-Recovery-Workflow.
Linked Issues check ✅ Passed Der PR implementiert vollständig die Anforderungen aus allen drei verknüpften Issues (#493, #494, #495): feste zweite Ebene (Q1.1–Q5.5) in contracts.json, Brownfield-Dokumentation aktualisiert, Skill-Anweisungen angepasst, stabile Q-IDs gewährleistet, alle fünf Ask-Rollen in OPEN_QUESTIONS enthalten.
Out of Scope Changes check ✅ Passed Alle Änderungen sind direkt auf die drei verlinkten Issues (#493, #494, #495) bezogen: Vertrag, Dokumentation, Skill-Referenzen und Beispiele sind konsistent mit dem Ziel der festen zweiten Ebene.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 10

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
skill/socratic-code-theory-recovery/references/examples.md (1)

167-188: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Kritisches Problem: Duplizierte Q-ID Q5.1.

Sowohl Zeile 167 als auch Zeile 178 verwenden Q5.1 als Fragenidentifikator:

  • Zeile 167: ### Q5.1: What test debt exists?
  • Zeile 178: ### Q5.1: What technical debt is the team already tracking?

Q-IDs müssen eindeutig sein, da sie als stabile Build-Zeit-Identifikatoren dienen (laut PR-Zielen und SKILL.md). Die zweite Frage sollte wahrscheinlich Q5.2 sein.

🔧 Vorgeschlagene Korrektur
-### Q5.1: What technical debt is the team already tracking?
+### Q5.2: What technical debt is the team already tracking?
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skill/socratic-code-theory-recovery/references/examples.md` around lines 167
- 188, The file contains duplicate question IDs: the headings "### Q5.1: What
test debt exists?" and "### Q5.1: What technical debt is the team already
tracking?" must be unique; change the second heading to "### Q5.2: What
technical debt is the team already tracking?" and update any in-file references
or cross-links that point to the old Q5.1 identifier (search for "Q5.1"
occurrences and adjust to "Q5.2" where they refer to the second question) so
build-time stable IDs remain unique.
🧹 Nitpick comments (1)
website/public/llms.txt (1)

6375-6380: ⚡ Quick win

Kanonische Quelle explizit referenzieren, um Enumerations-Drift zu vermeiden.

Die vollständige Zweite-Ebene-Liste ist hier dupliziert. Ein kurzer SSOT-Hinweis auf den Contract (z. B. contracts.json / #493) reduziert Pflegefehler bei zukünftigen Änderungen.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@website/public/llms.txt` around lines 6375 - 6380, The duplicated fixed
second-level enumeration (Q1.1–Q5.5) should be replaced with a single canonical
reference to the contracts source instead of repeating the list: remove the
hard-coded list in website/public/llms.txt and add a short SSOT pointer like
"See canonical enumeration in contracts.json (contract `#493`)" and, if desired, a
concise note that the second-level nodes are fixed (Q1.1–Q5.5) to preserve
intent; ensure any mention of the second-level enumeration across the repo
refers to contracts.json/#493 to avoid drift.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/brownfield-workflow.adoc`:
- Around line 69-70: Die lokal ausgeschriebene Enumeration Q1.1–Q5.5 (inkl.
Q3.1–Q3.12 und Q4.1–Q4.9) fehlt eine Verlinkung zur kanonischen
Contract-Definition; aktualisiere beide Stellen, an denen die feste Ebene
ausgeschrieben ist, so dass unmittelbar nach der Beschreibung ein klarer Verweis
auf die offizielle Contract-Quelle steht (z. B. ein eindeutiger
Contract-Identifier/URL oder ein Verweisstext wie "siehe Canonical Question
Contract <name/id>"), und ergänze optional einen kurzen Hinweis, dass Q-IDs
stabil sind (z. B. "Q3.7 = Deployment View") damit künftig kein Drift zwischen
dieser Dokumentation und dem Contract entsteht.

In `@docs/brownfield-workflow.de.adoc`:
- Around line 67-68: Die wiederholte feste Enumeration (Q1.1–Q5.5, inklusive
Q3.7 als Verteilungssicht) muss mit der kanonischen Contract-Quelle verlinkt
werden: ergänze in der kurzen Beschreibung bei "zweite Ebene ist fix" und in der
vollständigen Liste (die zweite Stelle der Wiederholung) jeweils einen
eindeutigen Verweis/Zitat (z. B. Contract-Name, Version und URL oder AsciiDoc
xref/anchor) zur offiziellen Quelle, so dass Leserinnen direkt zur autoritativen
Definition springen können und Inkonsistenzen vermieden werden.

In `@docs/socratic-recovery-skill.adoc`:
- Line 12: The document hard-codes the fixed Question Tree enumeration (Q-IDs
like Q1.1–Q5.5, the six PRD elements, twelve arc42 chapters, the eight ISO/IEC
25010 characteristics, etc.) in the prose and table sections, which breaks
Single Source of Truth; change the docs to reference and/or include the
canonical contract data instead of literal lists: replace the explicit
enumeration in the "Question Tree"/Q-IDs text and the table block that repeats
those entries with a generated include or template call that pulls the
authoritative enumeration from the canonical contract/metadata source (the same
JSON/YAML/constants that define the Q-IDs), and add a simple validation step in
the doc build to fail if the included enumeration and the contract diverge so
the "Q-IDs"/Question Tree and table remain in sync.

In `@docs/socratic-recovery-skill.de.adoc`:
- Line 12: The repeated explicit enumeration of the fixed Question Tree nodes
(the Q1.1–Q5.5 list referenced in the "Question Tree" description and the
duplicate block later) must be replaced by a canonical reference: remove the
hard-coded list text and instead reference or include the single authoritative
contract/source (the canonical contract for the Skill) so the document points to
that source for the fixed node list; update both occurrences that mention
"Q1.1–Q5.5" and the repeated fixed-node paragraph to use an AsciiDoc include or
xref to the canonical contract (or a named "Socratic Recovery Skill" contract
identifier) and keep the explanatory text about stable Q-IDs and free
decomposition unchanged.

In
`@plugins/semantic-anchors/skills/socratic-code-theory-recovery/references/examples.md`:
- Line 169: Der fehlende Language-Tag am Fenced-Code-Block verursacht MD040;
ergänze unmittelbar nach den drei Backticks des betreffenden Blockbeginns im
examples.md einen Language-Identifier (z.B. ```text oder ```markdown) damit der
Linter den Block korrekt erkennt und MD040 verschwindet; suche den ungetaggten
Block um Zeile 169 und füge den Tag ein.
- Around line 167-178: The document has two headings using the same Q-ID "Q5.1"
(the heading "### Q5.1: What test debt exists?" and the subsequent "### Q5.1:
What technical debt is the team already tracking?"), causing schema ambiguity;
fix by assigning a unique ID to the second heading (e.g., rename it to "Q5.2" or
the next sequential ID), update any internal references or cross-links that
point to the old ID, and ensure all other Q-ID headings remain unique (search
for "Q5.1" occurrences and adjust them consistently, including in any TOC or
anchors).

In
`@plugins/semantic-anchors/skills/socratic-code-theory-recovery/references/iso-25010.md`:
- Around line 3-4: Die Referenz auf die Prioritätsfrage ist falsch: ersetze alle
Verwendungen/Verweise von Q4.0 durch Q4.9 in diesem Skill so dass die feste
Prioritäts-Node korrekt auf Q4.9 zeigt; überprüfe alle Stellen, die IDs oder
Ausgaben generieren (z.B. die Beschreibung "fixed nodes Q4.1–Q4.8" und die
Stelle, die "Priorität" referenziert) und passe die erzeugten IDs/Labels an,
damit Outputs konsistent Q4.9 als Prioritätsknoten ausweisen.

In
`@plugins/semantic-anchors/skills/socratic-code-theory-recovery/references/output-schema.md`:
- Around line 63-65: The document contradicts itself about Q-ID stability:
reconcile and clarify the numbering rules by stating that the "fixed second
level" (Q1.1–Q1.6, Q2.1–Q2.6, Q3.1–Q3.12, Q4.1–Q4.9, Q5.1–Q5.5) remains stable
across runs (e.g., Q3.7 always means Deployment View) while only the
arbitrary-depth nodes below that (examples like Q3.5.2 and any third-level+
nodes) may be renumbered per re-run; update the language where it currently says
"tree is renumbered on every re-run" to limit that statement to third-level and
deeper nodes and add a short sentence stating that fixed nodes must always be
emitted (even if only [OPEN] or [ANSWERED: not applicable]) to preserve
cross-run diffs.

In `@skill/socratic-code-theory-recovery/references/output-schema.md`:
- Around line 63-65: Die Formulierung zur Q-ID-Traceability ist inkonsistent:
halten Sie die zweite Ebene als feste, stabile Nummerierung fest (z. B.
Q1.1–Q1.6, Q3.7 = Deployment View) und entfernen oder korrigieren Sie jede
Aussage, die behauptet, diese zweite Ebene werde bei jedem Lauf „renumbered“.
Erklären Sie stattdessen klar, dass nur die dritte Ebene (z. B. Q3.5.2 und
tiefer) frei und laufzeitabhängig nummeriert wird; behalten Sie die Anweisung
bei, alle festen Knoten auch mit `[OPEN]`/`[ANSWERED: not applicable]` zu
emitten, und passen Sie Formulierungen an Q1, Q2, Q1.1, Q3.7 und Q3.5.2 an,
damit die Traceability-Beschreibung konsistent ist.

In `@website/public/llms.txt`:
- Around line 6382-6387: Die beiden Regeln sind inkonsistent: die Zeile "stop
when a leaf is answerable from one piece of code evidence or one stakeholder
fact." erlaubt `[ANSWERED]` durch Stakeholder-Fakten, während die Zeile "Each
leaf is [ANSWERED] (with file:line evidence) or [OPEN] ..." verlangt, dass
`[ANSWERED]` strikt mit `file:line` belegt ist; vereinheitliche das Dokument
indem du die erste Formulierung änderst so, dass `[ANSWERED]` nur für Antworten
mit konkretem Code-Beleg (explizit "file:line evidence") gilt und
Stakeholder-Fakten nur `[ANSWERED]` werden dürfen, wenn sie zusätzlich einen
verlinkten file:line-Beleg oder eine explizite Zertifizierung tragen;
aktualisiere entsprechend die Formulierungen in den Abschnitten mit den Phrasen
"stop when a leaf is answerable from one piece of code evidence or one
stakeholder fact." und "Each leaf is [ANSWERED] (with file:line evidence) or
[OPEN] (with Category, Ask role...)" damit beide Stellen dieselbe, restriktive
Regel verwenden.

---

Outside diff comments:
In `@skill/socratic-code-theory-recovery/references/examples.md`:
- Around line 167-188: The file contains duplicate question IDs: the headings
"### Q5.1: What test debt exists?" and "### Q5.1: What technical debt is the
team already tracking?" must be unique; change the second heading to "### Q5.2:
What technical debt is the team already tracking?" and update any in-file
references or cross-links that point to the old Q5.1 identifier (search for
"Q5.1" occurrences and adjust to "Q5.2" where they refer to the second question)
so build-time stable IDs remain unique.

---

Nitpick comments:
In `@website/public/llms.txt`:
- Around line 6375-6380: The duplicated fixed second-level enumeration
(Q1.1–Q5.5) should be replaced with a single canonical reference to the
contracts source instead of repeating the list: remove the hard-coded list in
website/public/llms.txt and add a short SSOT pointer like "See canonical
enumeration in contracts.json (contract `#493`)" and, if desired, a concise note
that the second-level nodes are fixed (Q1.1–Q5.5) to preserve intent; ensure any
mention of the second-level enumeration across the repo refers to
contracts.json/#493 to avoid drift.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: cc560d7e-a8ea-4ab8-9fb7-de5885345a75

📥 Commits

Reviewing files that changed from the base of the PR and between 0eb4648 and 546fec5.

📒 Files selected for processing (21)
  • docs/all-anchors.adoc
  • docs/brownfield-workflow.adoc
  • docs/brownfield-workflow.de.adoc
  • docs/socratic-recovery-skill.adoc
  • docs/socratic-recovery-skill.de.adoc
  • plugins/semantic-anchors/skills/socratic-code-theory-recovery/SKILL.md
  • plugins/semantic-anchors/skills/socratic-code-theory-recovery/prompts/phase-1-question-tree.md
  • plugins/semantic-anchors/skills/socratic-code-theory-recovery/references/arc42.md
  • plugins/semantic-anchors/skills/socratic-code-theory-recovery/references/cockburn-use-cases.md
  • plugins/semantic-anchors/skills/socratic-code-theory-recovery/references/examples.md
  • plugins/semantic-anchors/skills/socratic-code-theory-recovery/references/iso-25010.md
  • plugins/semantic-anchors/skills/socratic-code-theory-recovery/references/output-schema.md
  • skill/socratic-code-theory-recovery/SKILL.md
  • skill/socratic-code-theory-recovery/prompts/phase-1-question-tree.md
  • skill/socratic-code-theory-recovery/references/arc42.md
  • skill/socratic-code-theory-recovery/references/cockburn-use-cases.md
  • skill/socratic-code-theory-recovery/references/examples.md
  • skill/socratic-code-theory-recovery/references/iso-25010.md
  • skill/socratic-code-theory-recovery/references/output-schema.md
  • website/public/data/contracts.json
  • website/public/llms.txt

Comment on lines +69 to 70
Start with five root questions about the bounded context. Their *second level is fixed*: every run emits the same prescribed set of sub-questions — the six PRD elements (Q1.1–Q1.6), six specification categories (Q2.1–Q2.6), the twelve arc42 chapters (Q3.1–Q3.12), the eight ISO/IEC 25010 characteristics plus a priority question (Q4.1–Q4.9), and five risk categories (Q5.1–Q5.5). Free, code-driven decomposition applies only *below* that fixed level. The fixed level keeps Q-IDs stable — Q3.7 is always the Deployment View — so trees from different runs can be diffed node-by-node.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Kanonische Quelle für die feste Enumeration fehlt

In Line 69-70 und erneut in Line 93-106 wird die komplette Q1.1–Q5.5-Enumeration lokal ausgeschrieben, aber ohne expliziten Verweis auf die kanonische Contract-Definition. Das erhöht das Drift-Risiko zwischen Doku und Contract bei späteren Änderungen. Bitte hier klar auf die kanonische Quelle verweisen.

Also applies to: 93-106

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/brownfield-workflow.adoc` around lines 69 - 70, Die lokal
ausgeschriebene Enumeration Q1.1–Q5.5 (inkl. Q3.1–Q3.12 und Q4.1–Q4.9) fehlt
eine Verlinkung zur kanonischen Contract-Definition; aktualisiere beide Stellen,
an denen die feste Ebene ausgeschrieben ist, so dass unmittelbar nach der
Beschreibung ein klarer Verweis auf die offizielle Contract-Quelle steht (z. B.
ein eindeutiger Contract-Identifier/URL oder ein Verweisstext wie "siehe
Canonical Question Contract <name/id>"), und ergänze optional einen kurzen
Hinweis, dass Q-IDs stabil sind (z. B. "Q3.7 = Deployment View") damit künftig
kein Drift zwischen dieser Dokumentation und dem Contract entsteht.

Comment on lines +67 to 68
Mit fünf Wurzelfragen zum Bounded Context starten. Ihre *zweite Ebene ist fix*: jeder Lauf erzeugt denselben vorgegebenen Satz an Unterfragen — die sechs PRD-Elemente (Q1.1–Q1.6), sechs Spezifikationskategorien (Q2.1–Q2.6), die zwölf arc42-Kapitel (Q3.1–Q3.12), die acht ISO/IEC-25010-Merkmale plus eine Prioritätsfrage (Q4.1–Q4.9) und fünf Risikokategorien (Q5.1–Q5.5). Freie, code-getriebene Zerlegung gilt nur *unterhalb* dieser fixen Ebene. Die fixe Ebene hält Q-IDs stabil — Q3.7 ist immer die Verteilungssicht —, sodass Bäume verschiedener Läufe Knoten für Knoten verglichen werden können.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Kanonische Quelle für die feste Enumeration nicht referenziert

Die feste Q1.1–Q5.5-Liste wird in Line 67-68 und Line 91-103 vollständig lokal wiederholt, aber ohne expliziten Verweis auf die kanonische Contract-Quelle. Das macht spätere Inkonsistenzen wahrscheinlicher. Bitte die kanonische Quelle direkt referenzieren.

Also applies to: 91-103

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/brownfield-workflow.de.adoc` around lines 67 - 68, Die wiederholte feste
Enumeration (Q1.1–Q5.5, inklusive Q3.7 als Verteilungssicht) muss mit der
kanonischen Contract-Quelle verlinkt werden: ergänze in der kurzen Beschreibung
bei "zweite Ebene ist fix" und in der vollständigen Liste (die zweite Stelle der
Wiederholung) jeweils einen eindeutigen Verweis/Zitat (z. B. Contract-Name,
Version und URL oder AsciiDoc xref/anchor) zur offiziellen Quelle, so dass
Leserinnen direkt zur autoritativen Definition springen können und
Inkonsistenzen vermieden werden.

=== Phase 1 — Build the Question Tree

The skill prompts the LLM to recursively decompose five questions about a bounded context (Problem/Users, Specification, Architecture, Quality Goals, Risks). Each leaf is classified:
The skill prompts the LLM to build a Question Tree from five root questions about a bounded context (Problem/Users, Specification, Architecture, Quality Goals, Risks). Their second level is fixed — every run emits the same enumerated nodes (Q1.1–Q5.5: six PRD elements, six specification categories, the twelve arc42 chapters, the eight ISO/IEC 25010 characteristics plus a priority question, five risk categories), so Q-IDs are stable and trees from different runs can be diffed node-by-node. Free, code-driven decomposition happens only below that fixed level. Each leaf is classified:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Single-Source-of-Truth für die Q-Enumeration wird unterlaufen

In Line 12 und erneut im Tabellenabschnitt Line 193-199 wird die feste Knoten-Enumeration im Skill-Doc selbst ausgeschrieben. Für den Skill sollte diese Definition aus einer kanonischen Contract-Quelle referenziert werden, um Divergenzen zu vermeiden.

Also applies to: 193-199

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/socratic-recovery-skill.adoc` at line 12, The document hard-codes the
fixed Question Tree enumeration (Q-IDs like Q1.1–Q5.5, the six PRD elements,
twelve arc42 chapters, the eight ISO/IEC 25010 characteristics, etc.) in the
prose and table sections, which breaks Single Source of Truth; change the docs
to reference and/or include the canonical contract data instead of literal
lists: replace the explicit enumeration in the "Question Tree"/Q-IDs text and
the table block that repeats those entries with a generated include or template
call that pulls the authoritative enumeration from the canonical
contract/metadata source (the same JSON/YAML/constants that define the Q-IDs),
and add a simple validation step in the doc build to fail if the included
enumeration and the contract diverge so the "Q-IDs"/Question Tree and table
remain in sync.

=== Phase 1 — Question Tree aufbauen

Der Skill weist das LLM an, fünf Fragen zum Bounded Context (Problem/User, Spezifikation, Architektur, Qualitätsziele, Risiken) rekursiv zu zerlegen. Jedes Blatt wird klassifiziert:
Der Skill weist das LLM an, aus fünf Wurzelfragen zum Bounded Context (Problem/User, Spezifikation, Architektur, Qualitätsziele, Risiken) einen Question Tree zu bauen. Ihre zweite Ebene ist fix — jeder Lauf erzeugt dieselben enumerierten Knoten (Q1.1–Q5.5: sechs PRD-Elemente, sechs Spezifikationskategorien, die zwölf arc42-Kapitel, die acht ISO/IEC-25010-Merkmale plus eine Prioritätsfrage, fünf Risikokategorien), sodass Q-IDs stabil sind und Bäume verschiedener Läufe Knoten für Knoten verglichen werden können. Freie, code-getriebene Zerlegung passiert nur unterhalb dieser fixen Ebene. Jedes Blatt wird klassifiziert:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Kanonische Contract-Quelle für die feste Knotenliste fehlt

Die fixe Q1.1–Q5.5-Enumeration wird in Line 12 sowie in Line 193-199 lokal wiederholt. Für den Skill sollte diese Definition auf die kanonische Contract-Quelle verweisen, statt sie mehrfach auszuschreiben, um Drift zu verhindern.

Also applies to: 193-199

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/socratic-recovery-skill.de.adoc` at line 12, The repeated explicit
enumeration of the fixed Question Tree nodes (the Q1.1–Q5.5 list referenced in
the "Question Tree" description and the duplicate block later) must be replaced
by a canonical reference: remove the hard-coded list text and instead reference
or include the single authoritative contract/source (the canonical contract for
the Skill) so the document points to that source for the fixed node list; update
both occurrences that mention "Q1.1–Q5.5" and the repeated fixed-node paragraph
to use an AsciiDoc include or xref to the canonical contract (or a named
"Socratic Recovery Skill" contract identifier) and keep the explanatory text
about stable Q-IDs and free decomposition unchanged.

### Q5.2: What test debt exists?
### Q5.1: What test debt exists?

```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fenced Code Block mit Sprachkennung ergänzen (MD040).

Der Codeblock startet ohne Language-Tag. Bitte z. B. ```text ergänzen, damit der Linter sauber durchläuft.

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 169-169: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@plugins/semantic-anchors/skills/socratic-code-theory-recovery/references/examples.md`
at line 169, Der fehlende Language-Tag am Fenced-Code-Block verursacht MD040;
ergänze unmittelbar nach den drei Backticks des betreffenden Blockbeginns im
examples.md einen Language-Identifier (z.B. ```text oder ```markdown) damit der
Linter den Block korrekt erkennt und MD040 verschwindet; suche den ungetaggten
Block um Zeile 169 und füge den Tag ein.

Comment thread skill/socratic-code-theory-recovery/references/output-schema.md
Comment thread website/public/llms.txt Outdated
- examples.md: two Q5 example leaves both used the bare ID Q5.1.
  Both are technical-debt examples, so they become third-level leaves
  Q5.1.TestDebt and Q5.1.TrackedDebt (CodeRabbit suggested Q5.2, but
  Q5.2 is "security risks" — that would mislabel them).
- iso-25010.md: the priority question was still tagged Q4.0; the fixed
  level defines it as Q4.9.
- output-schema.md and phase-2-synthesize.md claimed the tree "is
  renumbered on every re-run", which contradicts the now-fixed second
  level. Reconciled: the fixed second level (Q1.1-Q5.5) is stable,
  third-level Q-IDs are run-specific, and the tree is a temporary
  intermediate artifact that is not shipped — that is why Q-IDs stay
  out of the synthesized docs.
- Clarified the decomposition stop rule: a leaf is small enough to
  answer from one piece of code evidence, or to pose as one precise
  stakeholder question — so "answerable from a stakeholder fact" no
  longer reads as if it could be [ANSWERED].

Not changed: CodeRabbit also asked every doc to reference one canonical
source for the Q1.1-Q5.5 enumeration. Declined — the enumeration lives
in a JSON contract, a copy-paste skill prompt, and AsciiDoc pages; there
is no include mechanism across those formats, and LLM-Coding#494/LLM-Coding#495 deliberately
put a self-contained copy in each artifact. The MD040 lint nit is
pre-existing file style, out of scope.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@raifdmueller

Copy link
Copy Markdown
Contributor Author

CodeRabbit review — addressed

Pushed 330fea8.

Fixed:

  • Duplicate Q5.1 in examples.md — both leaves were technical-debt examples, now third-level Q5.1.TestDebt / Q5.1.TrackedDebt. (Not CodeRabbit's suggested Q5.2 — that ID is "security risks" in the fixed level and would mislabel them.)
  • Q4.0Q4.9 in iso-25010.md — the priority question is the fixed Q4.9 node.
  • "renumbered on every re-run" contradiction in output-schema.md and phase-2-synthesize.md — left over from fix(socratic-recovery): make synthesized docs self-contained, cite code not Q-IDs #491, now contradicts the fixed second level. Reconciled: the fixed second level (Q1.1–Q5.5) is stable; only third-level Q-IDs are run-specific; the tree is a temporary intermediate artifact that is not shipped — which is the actual reason Q-IDs stay out of synthesized docs.
  • [ANSWERED] vs "stakeholder fact" ambiguity — reworded the stop rule: a leaf is small enough to answer from one piece of code evidence, or to pose as one precise stakeholder question.

Declined, with reason:

@rdmueller rdmueller merged commit 6c205ed into LLM-Coding:main May 17, 2026
7 checks passed
rdmueller pushed a commit that referenced this pull request May 17, 2026
…[OPEN]

Closes #498.

A recovery run reduced arc42 Chapter 10 (Quality Requirements) to two
[OPEN] pointers, which an independent arc42 review graded RED. The
Socratic process was treating all of Quality as team-only knowledge.

It is not. Quality-goal *priority/ranking* is team knowledge (Q4.9,
[OPEN]); quality *scenarios* — what the system measurably does today —
are usually code-derivable.

Made the split operative (it previously lived only as a "rule of thumb"
in references/iso-25010.md, with nothing enforcing it):

- contract (#493) + phase-1 prompt: Q4 quality scenarios are [ANSWERED]
  where code shows measurable behaviour (timeouts, truncation limits,
  budgets, retry policies, the Q3.8 threats and test concept); only the
  ranking is [OPEN]; never invent a target number.
- iso-25010.md: new section distinguishing a literal-threshold scenario
  (fully [ANSWERED], cite file:line) from a mechanism-only one (scenario
  derived, target value [OPEN]); explicit Q3.8 evidence reuse.
- arc42.md: Q3.10 row now defines the Q4 -> Chapter 10 relationship.
- phase-2-synthesize.md: Chapter 10 carve-out — synthesized from the
  [ANSWERED] Q4 scenarios plus the Q4.9 ranking, never just an [OPEN]
  pointer; "No information" only legitimate if Q4 produced no answered
  scenario at all.
- examples.md: added an [ANSWERED] quality-scenario leaf (a literal
  3-second timeout) alongside the existing mechanism/[OPEN]-target pair.

Also fixed the German contract's stop-rule wording to match the EN one
from the #497 CodeRabbit pass (was still "Stakeholder-Fakt").

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants