Skip to content

Chat: sequence diagrams and the diagram lines of the skill (#696, D287) - #743

Merged
contursofran merged 5 commits into
mainfrom
agent/696-diagrams-seq
Nov 11, 2026
Merged

contursofran merged 5 commits into
mainfrom
agent/696-diagrams-seq

Conversation

@contursofran

Copy link
Copy Markdown
Owner

Fixes #696

What

  • internal/app/diagram/seq.go: ParseSeq (A -> B: text, A --> B: text reply, A -> A: text to itself) and SeqView (actors, dashed lifelines, arrows, dashed replies, self loop), from the spike, Painter only, tokens only, chat text size. Limits: 6 actors, 16 messages, actor 28 and message 40 characters, wider than the column → code block.
  • Chat.seqBlock in chatview, the same shape as flowBlock.
  • Skill kit/skills/chat-writing: a Diagrams section for contr-flow (syntax from diagram.Parse in main) and contr-seq, with limits and one example each.
  • D287, ChatView.md Diagrams section. Sheet part ChatSeq, see.sh fixture chat-seq (the flow fixture now shares a helper).

Tests

  • TestParseSeq, TestParseSeqErrors, TestSeqLimits, TestSeqView, TestSeqBlock.
  • e2e: scripts/see.sh chat-seq dark|light: pass, all labels checked in the PNGs.

Pre-check

  1. Tests: saw fail with the change undone: TestSeqBlock (seqBlock not wired), TestParseSeq (reply flag), TestSeqLimits (actor limit).
  2. Plan: both steps done; limits stated in the spec.
  3. Contract: contr-seq, label "Sequence diagram", D287.
  4. Up to date: main merged; no open PR touches internal/app/diagram.
  5. Diff read: no leftovers.
  6. Coverage: issue step 2 done.
  7. Duties: nothing removed; the skill's line "diagram blocks show as code" now names the two blocks that draw.
  8. Evidence: sheets and see PNGs taken after the last code change.

Package diagram parses a contr-seq block (A -> B: text, --> for a reply,
A -> A for a message to itself) and draws actors, lifelines and arrows
with the Painter. A block that does not parse or is too large shows as
code. The chat-writing skill says when and how to write contr-flow and
contr-seq blocks.
@contursofran
contursofran marked this pull request as ready for review November 11, 2026 19:42
@contursofran
contursofran merged commit b09e4d0 into main Nov 11, 2026
3 checks passed
@contursofran
contursofran deleted the agent/696-diagrams-seq branch November 11, 2026 19:42
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.

Chat: diagrams in Claude's answers (flow and sequence)

1 participant