Skip to content

[Update] document Hypha plugin grounding step in CLAUDE.md#318

Open
samatstariongroup wants to merge 4 commits into
developmentfrom
hypha-grounding-guidance
Open

[Update] document Hypha plugin grounding step in CLAUDE.md#318
samatstariongroup wants to merge 4 commits into
developmentfrom
hypha-grounding-guidance

Conversation

@samatstariongroup

@samatstariongroup samatstariongroup commented Jun 30, 2026

Copy link
Copy Markdown
Member

Summary

Adds a "Grounding SysML v2 / KerML work with the Hypha plugin" subsection to CLAUDE.md (under Formal specification references, before Project Dependency Graph).

Motivation

When the Hypha plugin is installed, its skills/agents (hypha:metamodel-lookup, hypha:spec-citation, hypha:sysml-validation, hypha:metamodel-navigator) are the authoritative way to ground metamodel/spec contracts. In practice they auto-trigger on "how is X defined" / "what does the spec say" phrasings, but not on implementation-shaped requests ("implement this Compute* method") — which is exactly where grounding matters most. A standing project instruction closes that gap so the grounding step fires on implementation/codegen/review work too, rather than relying on a sibling analogue or the doc-comment OCL as the source of truth.

What the guidance says

  • Treat Hypha as the grounding step before implementing/reviewing anything depending on the metamodel.
  • Lists the triggering situations (Compute* derivations under SysML2.NET/Extend/, metaclass feature/multiplicity/ordering/redefinition reasoning, textual-notation rules, spec claims).
  • Grounds on two axes — structure and intent:
    • hypha:metamodel-lookupstructure (always): type, multiplicity, ordering, redefinitions/subsettings, hierarchy, and the derivation/constraint OCL. (hypha:metamodel-navigator for cross-cutting fan-out.)
    • hypha:spec-citationintent (when interpretation is needed): the OCL is a formalization, not an explanation. Consult the spec for rationale/semantics when the OCL is terse, ambiguous, or leans on a defined term; skip it only for genuinely mechanical, unambiguous derivations.
    • hypha:sysml-validation — validate .sysml / .kerml notation.
  • When the plugin is not installed: inform the user once that Hypha exists and is recommended, then fall back to the checked-in sources — the XMI metamodel (Resources/*_only_xmi.uml) for structure and Resources/specification/ for intent.
  • Two concrete examples of why grounding beats a sibling analogue:
    • structure the OCL comment hidesActionDefinition::action is declared ordered;
    • intent the OCL comment cannot express — an OCL ->first() picks one of many, but only the spec says on what basis (e.g. most-specific redefinition).

It is explicitly conditioned on plugin availability, so contributors without the plugin are unaffected beyond the one-time recommendation.

Scope

Documentation only — CLAUDE.md, 1 file, ~+25 lines. No code, no tests.

@sonarqubecloud

sonarqubecloud Bot commented Jul 2, 2026

Copy link
Copy Markdown

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