LearnNewsExamplesServices
Frontmatter
id9958
titleSystem Prompt Token Optimization via Mermaid Graphs
stateClosed
labels
documentationenhancementai
assignees[]
createdAtApr 13, 2026, 11:39 AM
updatedAtMay 5, 2026, 6:44 PM
githubUrlhttps://github.com/neomjs/neo/issues/9958
authortobiu
commentsCount1
parentIssue9950
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMay 5, 2026, 6:44 PM

System Prompt Token Optimization via Mermaid Graphs

Closed v13.0.0/archive-v13-0-0-chunk-4 documentationenhancementai
tobiu
tobiu commented on Apr 13, 2026, 11:39 AM

Goal

Drastically reduce the contextual token bloat of AGENTS.md and AGENTS_STARTUP.md by replacing verbose, paragraph-based rules with highly compressed Mermaid state-flow graphs.

Implementation Checklist

  • Refactor the mandatory workflows (e.g., The Pre-Commit Hard Gates, Swarm OS loops) from english text into semantic Mermaid flowcharts.
  • Validate that Frontier models effortlessly parse the .md diagrams and respect the state flows to exactly the same degree as the written word, significantly reducing n_ctx overhead.
tobiu added the documentation label on Apr 13, 2026, 11:39 AM
tobiu added the enhancement label on Apr 13, 2026, 11:39 AM
tobiu added the ai label on Apr 13, 2026, 11:39 AM
tobiu added parent issue #9950 on Apr 13, 2026, 11:39 AM