LSP: complete and document frontmatter field names, with element skeletons

Aperta
#381 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript, rust, yaml

Direzione di ricerca

Start by reading the syscribe lsp implementation and the table that generates syscribe spec fields from prompts/spec/fields.md; inspect the LSP tests and next-id logic. Add coverage for type-specific key completion, nested mapping fields, key hover, value hints, and skeletons, including a 10,000-element latency case. Done means skeletons validate with unused IDs and all listed acceptance checks pass.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Part of #380.

Current state

Completion works at values of cross-reference fields and the type:/status: enums. At a new line in the frontmatter, no field names are offered, and hovering a key shows nothing. A new user has to know that a requirement takes reqDomain, verificationMethod, derivedFrom, breakdownAdr, and so on.

Proposal

  1. Key completion (textDocument/completion inside the frontmatter, at a key position): the fields valid for the element's type: (and the keys of nested mappings such as a transition or a parameter), required fields first, with detail (type) and documentation (the description). insertText is a snippet: key: ${1|choices|} for enums, a list scaffold for list fields, a mapping scaffold for structured fields.
  2. New-element scaffolding. In an empty or type:-only file, a completion item "Requirement (skeleton)" that inserts a complete frontmatter with the next free id (next-id logic) and the body prompt; same for TestCase, ADR, PartDef, and others.
  3. Hover on a key shows the field's description, type, allowed values, the validation codes that govern it (E310 for derivedFrom without breakdownAdr), and whether it is required for this type.
  4. Value hints: for status, testLevel, reqDomain, verificationMethod, silLevel/asilLevel the candidates carry a one-line meaning.
  5. Source of truth: generate the field catalogue from the same table that produces syscribe spec fields (prompts/spec/fields.md), not a second hand-kept list; a test fails if a field in the spec has no catalogue entry.

Acceptance (tests first)

  • Completion at a key position in a Requirement returns the requirement's fields, not those of a PartDef; a mapping inside quantities: returns kind/value/unit.
  • Hover on breakdownAdr returns its description and mentions E310.
  • The skeleton completion inserts a valid element (it validates with no error) with an unused id.
  • Latency under 50 ms for a model of 10,000 elements.

Part of #272. Scope: syscribe lsp only (standard LSP, ADR-SYS-LSP-001).


Generated by Claude Code

Lingua principale
Rust
Stelle
8
Fork
1
Merge medio
3h 35m
PR unite (30g)
69

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di sjames/syscribe

Tutte le issue di sjames/syscribe

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.