Skip to content

LSP: the T27F diagram in the editor (specs/lsp/t27f_view.t27) #12253

Closed

Description

@gHashTag

The T27F diagram inside the editor: the spec as a picture, next to the text, kept in step with it. T27F is the visual spec of .t27 (Trinity-S-AI-DNA/trinity#1648, RFC Trinity-S-AI-DNA/trinity#1649) with the labels exact, derived, suggested and unknown on every element. No competitor has this: it is the lane where t27 leads. Part of the LSP epic, Refs #12209 (wave 2, beyond the standard). Only .t27: no code in any other language, not even scratch probes or a loader; see skill only-t27.

Depends on specs/t27f/frontend.t27 (the surfaces and which one answers an intent), specs/lsp/views.t27 and specs/lsp/window.t27 (showDocument). If the core graph of the spec is still missing when this starts, say so in the issue and wire what exists; do not invent a second model.

Prior art:

Boundary

  • specs/lsp/t27f_view.t27

User Scenarios

  • Given a spec is open, when the user runs T27F: show diagram, then the server answers t27/t27fView with a document uri and the client opens it beside the text.
  • Given the cursor moves to a function, when the move arrives as t27/t27fReveal, then the matching element in the diagram is highlighted, and a click on an element sends back a location that the editor reveals.
  • Given the spec is edited, when the snapshot changes, then the diagram refreshes through the virtual document refresh within 500 ms of the last keystroke.
  • Given an element comes from inference, when it is drawn, then its label says derived or suggested, never exact, as the T27F labels define.
  • Given the diagram service is not available on the lab, when the request arrives, then the answer is a clear error naming the missing piece, not an empty picture.

Requirements

  • FR-001: The module MUST implement t27/t27fView (open), t27/t27fReveal (text to diagram) and t27/t27fLocate (diagram to text), using ids from the T27F model, not positions.
  • FR-002: The module MUST pass the T27F label (exact, derived, suggested, unknown) through to the client unchanged and MUST NOT upgrade a label.
  • FR-003: The diagram content MUST come from the T27F tools (t27f_graph, t27f_outline and t27f_view surfaces in specs/t27f/frontend.t27), never from a parallel renderer in this module.
  • FR-004: The module MUST refresh through workspace/textDocumentContent/refresh and MUST debounce at 300 ms.
  • FR-005: The reveal/locate pair MUST round-trip: locate(reveal(position)) contains the position; a test asserts it on 10 sampled positions.

Success Criteria

  • At least 15 tests in specs/lsp/t27f_view.t27 pass, run on the lab with t27c test-report (exit 0), with an injected T27F source.
  • A negative control makes the T27F source answer unknown for an element and asserts the module passes unknown through.
  • git diff --name-only master lists only specs/lsp/t27f_view.t27 (0 files in other languages).

Activity

  1. gHashTag commented on Nov 17, 2026

    @gHashTag
    CollaboratorAuthor

    Spec created: specs/lsp/t27f_view.t27 (typecheck OK, 1 test pass).

  2. gHashTag commented on Nov 17, 2026

    @gHashTag
    CollaboratorAuthor

    Reopened: closed as spec-only. A .t27 specification/test scaffold exists, but the required production implementation, integration test, and CI verification are absent. This issue remains open until the target component implements the specified behavior and evidence is provided.

  3. gHashTag commented on Nov 17, 2026

    @gHashTag
    CollaboratorAuthor

    Spec exists and passes typecheck + tests. M7 milestone complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/specs.t27 spec files and conformanceenhancementNew feature or requestspec

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions