Skip to content

feat: add Socratic Code Theory Recovery contract + Cockburn Use Cases anchor#454

Merged
rdmueller merged 4 commits into
LLM-Coding:mainfrom
raifdmueller:add-socratic-theory-recovery-contract
May 2, 2026
Merged

feat: add Socratic Code Theory Recovery contract + Cockburn Use Cases anchor#454
rdmueller merged 4 commits into
LLM-Coding:mainfrom
raifdmueller:add-socratic-theory-recovery-contract

Conversation

@raifdmueller
Copy link
Copy Markdown
Contributor

@raifdmueller raifdmueller commented May 2, 2026

Summary

Two additions:

  1. New Semantic Contract: Socratic Code Theory Recovery — Recovers a program's "theory" (Naur 1985) from source code through recursive question refinement. Composes: Socratic Method, arc42, ISO 25010, Nygard ADRs, Mental Model (Naur). Two-phase workflow producing a Question Tree with [ANSWERED]/[OPEN] leaves and role-routed handoff documents.

  2. New Anchor: Cockburn Use Cases — Alistair Cockburn's structured textual use case format from Writing Effective Use Cases (2001). Core: Fully Dressed template, three Goal Levels (Summary / User Goal / Subfunction), Actor-Goal List as discovery technique. The anchor explicitly notes what Cockburn does not prescribe (Activity Diagrams, Gherkin, EARS) — those are complementary representations we layer on via the existing "Specification" contract.

Why a separate anchor for Cockburn

The Theory Recovery contract references "Cockburn Use Cases" as a decomposition guide for specification questions. Having it as a proper anchor means:

  • LLMs can activate the full Goal Level + Fully Dressed knowledge from training data
  • The "Specification" contract can later reference it explicitly alongside Gherkin/EARS
  • The Brownfield Workflow page can link to it when we integrate Theory Recovery there

Test plan

  • AsciiDoc linter passes on both EN and DE
  • contracts.json validates (13 contracts)
  • extract-metadata includes cockburn-use-cases (136 anchors total)
  • Changelog updated (2026-05-02 entry for both anchor and contract)
  • AgentSkill catalog updated

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Neue Features

    • Cockburn Use Cases: Umfassende Dokumentation zu vollständig ausgearbeiteten Use-Cases hinzugefügt (Englisch und Deutsch)
    • Sokratische Code-Theorie-Rekonstruktion: Neuer Vertrag mit Prozessvorlage zur Rekonstruktion von Programmtheorien
  • Dokumentation

    • Referenzkatalog und Ankerzuordnungen aktualisiert

raifdmueller and others added 2 commits May 2, 2026 09:45
Recovers a program's "theory" (Naur 1985) from source code through
recursive question refinement. Composes: Socratic Method, arc42,
ISO 25010, Nygard ADRs, Mental Model (Naur). Two-phase workflow
producing a Question Tree with [ANSWERED]/[OPEN] leaves and
role-routed handoff document.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Alistair Cockburn's structured textual use case format from "Writing
Effective Use Cases" (2001). Core concepts: Fully Dressed template,
three Goal Levels (Summary/User Goal/Subfunction), Actor-Goal List
discovery technique. Deliberately notation-agnostic — does NOT
prescribe Activity Diagrams, Gherkin, or EARS; those are complementary
representations layered on top.

Category: requirements-engineering. Tier 3. Related: Gherkin, BDD,
EARS, arc42, ISO 25010.

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

coderabbitai Bot commented May 2, 2026

Warning

Rate limit exceeded

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

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ 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: cc4edc2b-a017-4a58-9e0d-6c7cf48675b1

📥 Commits

Reviewing files that changed from the base of the PR and between 6f9a34b and 363746a.

📒 Files selected for processing (3)
  • docs/spec-driven-workflow.adoc
  • docs/spec-driven-workflow.de.adoc
  • website/public/data/contracts.json

Walkthrough

Dieses PR fügt ein neues Dokumentations-Anker für „Cockburn Use Cases" (mit englischer und deutscher Version) hinzu und registriert es in der Metadaten-Infrastruktur. Gleichzeitig wird ein neuer „Socratic Code Theory Recovery"-Vertrag in die Vertragssammlung aufgenommen. Beide Einträge werden in der Changelog dokumentiert.

Changes

Cockburn Use Cases Anker

Layer / File(s) Zusammenfassung
Dokumentation
docs/anchors/cockburn-use-cases.adoc, docs/anchors/cockburn-use-cases.de.adoc
Zwei neue AsciiDoc-Seiten definieren Cockburns „Fully Dressed Use Cases" mit Kernkonzepten (Zielleveln, Umfang, Actor-Goal-Liste), Anwendungsszenarien und Verweise zu verwandten Ankern.
Katalog-Referenz
skill/semantic-anchor-translator/references/catalog.md
Neuer „Cockburn Use Cases"-Eintrag in der Requirements-Engineering-Sektion mit Aliassen, Befürwortern und Kernbeschreibung.
Anker-Metadaten
website/public/data/anchors.json
Neuer Anker-Eintrag mit id: "cockburn-use-cases", Kategorien, Rollen, verwandten Ankern, Tags und Tier 3, verlinkt auf die Dokumentation.
Kategorisierung & Rollen
website/public/data/categories.json, website/public/data/roles.json
Anker wird zu requirements-engineering-Kategorie und zu vier Rollen (business-analyst, product-owner, software-architect, software-developer) hinzugefügt.
Metadaten-Aktualisierung
website/public/data/metadata.json
Timestamp wird aktualisiert, Anker-Zähler von 135 auf 136 erhöht, Durchschnittswerte für Rollen und Tags angepasst.
Changelog
docs/changelog.adoc
Neuer Eintrag vom 2026-05-02 dokumentiert neue Anker und Verträge.

Socratic Code Theory Recovery Vertrag

Layer / File(s) Zusammenfassung
Vertrag-Definition
website/public/data/contracts.json
Neuer Vertrag "socratic-code-theory-recovery" mit englischen und deutschen Titeln/Beschreibungen, semantischen Ankern, Multi-Schritt-Template für rekursive Frage-Verfeinerung zur Programmtheorie-Rekonstruktion, und Kategorie "documentation".
Changelog
docs/changelog.adoc
Neuer Eintrag vom 2026-05-02 dokumentiert den neuen Vertrag als Teil der Vertrags-Subsktion.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

🚥 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 beschreibt präzise die zwei Hauptänderungen: die neue semantische Verträge und das neue Anchor werden korrekt zusammengefasst.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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
Review rate limit: 0/1 reviews remaining, refill in 50 minutes and 14 seconds.

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@website/public/data/contracts.json`:
- Around line 107-109: The anchors array is missing the key referenced in
template/templateDe ("Cockburn Use Cases"); update the "anchors" value to
include "cockburn-use-cases" (e.g., add "cockburn-use-cases" alongside
"socratic-method", "arc42", "iso-25010", etc.) so the metadata matches the
textual anchors and routing by Anchor-ID works; ensure the string is spelled
exactly "cockburn-use-cases" and appears once.
🪄 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: a7824def-7e20-4bf0-bd26-57e7f13637bb

📥 Commits

Reviewing files that changed from the base of the PR and between d32b906 and 6f9a34b.

📒 Files selected for processing (9)
  • docs/anchors/cockburn-use-cases.adoc
  • docs/anchors/cockburn-use-cases.de.adoc
  • docs/changelog.adoc
  • skill/semantic-anchor-translator/references/catalog.md
  • website/public/data/anchors.json
  • website/public/data/categories.json
  • website/public/data/contracts.json
  • website/public/data/metadata.json
  • website/public/data/roles.json

Comment thread website/public/data/contracts.json
raifdmueller and others added 2 commits May 2, 2026 09:52
- Anchors: added cockburn-use-cases and ears-requirements
- Template: Use Cases now explicitly reference Cockburn's Fully Dressed
  format at User Goal level; EARS syntax added for individual
  requirements. Activity Diagrams and Gherkin retained as complementary
  representations (Cockburn does not prescribe these).
- Global CLAUDE.md updated to match.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Step 4 now starts with an Actor-Goal List discovery prompt before
writing full use cases. Use case template updated to Cockburn's
Fully Dressed format (Primary Actor, Stakeholders & Interests,
Trigger, Preconditions, Main Success Scenario, Extensions with
step references, Success/Minimal Guarantee, Business Rules).

Activity Diagrams and Gherkin explicitly framed as complementary
representations layered on top of Cockburn's prose-based format —
not part of Cockburn, but retained from our contract.

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

Development

Successfully merging this pull request may close these issues.

2 participants