Skip to content

Document app-first Terminal.Gui agent design loop, snapshot contract, and self-improvement pipeline#5456

Draft
Copilot wants to merge 4 commits into
developfrom
copilot/design-gui-cs-equivalent
Draft

Document app-first Terminal.Gui agent design loop, snapshot contract, and self-improvement pipeline#5456
Copilot wants to merge 4 commits into
developfrom
copilot/design-gui-cs-equivalent

Conversation

Copilot AI commented May 31, 2026

Copy link
Copy Markdown
Contributor

Fixes

Issue linkage is handled automatically by the system.

Proposed Changes/Todos

  • This issue asks for a gui-cs equivalent of the WinUI agent-plugin model, grounded in existing tuirec workflow patterns and the winprint design-loop proposal.
  • Added a focused proposal doc at docfx/docs/agent-design-loop.md defining:
    • Plugin shape: new gui-cs/tui-dev-skills style repo structure (plugins/tui, agents/tui-dev, skills, src/tools)
    • Skill model: setup/design/dev-workflow/snapshot/record/review/session-report
    • Cross-repo contract: Terminal.Gui + tuirec + gui-cs/cli responsibilities for a shared human+agent design loop
  • Broadened scope from view-centric to full Terminal.Gui app workflows:
    • problem statement now targets Terminal.Gui apps (not just views)
    • design loop step now covers app code (views, state, commands, workflows)
    • tui-design scope updated to iterative app UX/layout refinement
  • Added phased rollout guidance to the proposal:
    • Phase 1: optimize for Terminal.Gui app authoring/review
    • Phase 2: expand to other .NET TUI frameworks
    • Phase 3: expand to broader non-.NET TUI frameworks
  • Wired proposal into docs navigation:
    • docfx/docs/toc.yml
    • docfx/docs/index.md
  • Clarified core rendering contract in Terminal.Gui/Drivers/IDriver.cs XML docs:
    • ToString () is the canonical full-grid capture for deterministic snapshots
    • ToAnsi () is terminal replay/output oriented and not the golden snapshot source
  • Expanded the proposal with a built-in self-improvement feedback pipeline:
    • tui-session-report includes structured lessons learned
    • deduplication via stable fingerprinting
    • high-signal-only automated issue filing in the plugin repository
    • rate limiting and agent-feedback labeling to avoid spam
    • evidence links (session/logs/snapshots/repro) in filed issues
/// This returns the complete current screen grid and is suitable for deterministic snapshot/golden comparisons.
public string ToString ();

/// ...Prefer <see cref="ToString"/> as the canonical source for snapshot/golden assertions.
public string ToAnsi ();

Pull Request checklist:

  • I've named my PR in the form of "Fixes #issue. Terse description."
  • My code follows the style guidelines of Terminal.Gui - if you use Visual Studio, hit CTRL-K-D to automatically reformat your files before committing.
  • My code follows the Terminal.Gui library design guidelines
  • I ran dotnet test before commit
  • I have made corresponding changes to the API documentation (using /// style comments)
  • My changes generate no new warnings
  • I have checked my code and corrected any poor grammar or misspellings
  • I conducted basic QA to assure all features are working

Copilot AI assigned Copilot and tig May 31, 2026
Copilot AI linked an issue May 31, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Design the gui-cs equivalent of the WinUI agent plugin Document gui-cs agent design loop proposal and snapshot capture contract May 31, 2026
Copilot finished work on behalf of tig May 31, 2026 14:22
Copilot AI requested a review from tig May 31, 2026 14:22
@tig

tig commented May 31, 2026

Copy link
Copy Markdown
Member

@copilot needs to be inherently self improving.

In developing tuirec, as agents used it, I would regularly have them what they leaned and how tuirec and its guidance could be improved.

We need this concept built in here. Some sort of automated pipeline back to the agent plugin repository. Eg file gh issues (without spamming).

Copilot AI commented May 31, 2026

Copy link
Copy Markdown
Contributor Author

@copilot needs to be inherently self improving.

In developing tuirec, as agents used it, I would regularly have them what they leaned and how tuirec and its guidance could be improved. ...

Addressed in b3725a1. I updated the proposal with a built-in self-improvement feedback loop: structured lessons in tui-session-report, deduplication by fingerprint, high-signal-only issue filing, rate limiting to avoid spam, and evidence-backed agent-feedback issues in the plugin repo.

Copilot AI changed the title Document gui-cs agent design loop proposal and snapshot capture contract Document gui-cs agent design loop proposal, snapshot capture contract, and self-improvement feedback loop May 31, 2026
Copilot finished work on behalf of tig May 31, 2026 14:55
@tig

tig commented May 31, 2026

Copy link
Copy Markdown
Member

@copilot this is too narrowly focused on views. It should encapsulate full TG TUI apps. The initial focus should be on TG. Later we may expand to any dotnet TUI framework and later to any tui framework.

Copilot AI commented May 31, 2026

Copy link
Copy Markdown
Contributor Author

@copilot this is too narrowly focused on views. It should encapsulate full TG TUI apps. The initial focus should be on TG. Later we may expand to any dotnet TUI framework and later to any tui framewo...

Addressed in 5138375. I broadened the proposal to target full Terminal.Gui app development (not just views), updated the design-loop step to cover app workflows/state/commands, and added phased rollout scope: Terminal.Gui first, then other .NET TUI frameworks, then broader TUI frameworks.

Copilot AI changed the title Document gui-cs agent design loop proposal, snapshot capture contract, and self-improvement feedback loop Document app-first Terminal.Gui agent design loop, snapshot contract, and self-improvement pipeline May 31, 2026
Copilot finished work on behalf of tig May 31, 2026 17:49
@tig tig marked this pull request as ready for review June 24, 2026 04:15
@tig tig marked this pull request as draft June 24, 2026 04:16

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5138375585

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

/// </summary>
/// <remarks>
/// This output is intended for terminal replay and may include incremental escape-sequence behavior.
/// Prefer <see cref="ToString"/> as the canonical source for snapshot/golden assertions.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep ANSI snapshots as the visual golden source

For visual snapshot/design-review assertions, this guidance would make tests miss any regression that only changes attributes, styles, or OSC8 links: DriverImpl.ToString() appends only each cell's Grapheme, while the current snapshot helper records IDriver.ToAnsi() specifically because it preserves the byte-exact rendered look. If a view changes from red to blue, the proposed ToString() golden stays identical, so please qualify this as text-only snapshots or keep ToAnsi() as the canonical source for visual goldens.

Useful? React with 👍 / 👎.

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.

Design the gui-cs equivalent of the WinUI agent plugin

2 participants