This directory holds repository-specific guidance for contributors and coding agents. AGENTS.md is the session entry point; use this index to find relevant details without scanning the repository.
- Optimize for retrieval. Put one coherent topic in each file, use descriptive filenames and scannable headings, and place the task-specific guidance before background context.
- Be concise and actionable. Record verified behavior, constraints, decision points, failure modes, and required implementation/test touchpoints. Prefer a precise bullet, short procedure, or small lookup table over narrative.
- Link to evidence. Include exact repository paths and relevant identifiers so an agent can jump to implementation, tests, or user-facing configuration. Do not copy large code excerpts or repeat information already maintained elsewhere.
- Maintain the source of truth. In each session, capture verified, durable repo-specific insights found during implementation, debugging, or investigation. Create and index a focused page when a useful topic is missing; update or remove guidance when code changes make it inaccurate.
- Keep pages lean. Exclude transient notes, unverified hypotheses (see below), generic programming advice, and details an agent can safely derive from a nearby definition. Consolidate overlap and link to the canonical page.
- Keep navigation complete. Add every page to this index with a short description; use links between related pages instead of duplicating their content.
- Respect the size guideline. Split a page when it exceeds about 8 KB or covers two distinct tasks;
Build\scripts\Test-Docs.ps1warns above 8 KB. - Park unverified findings. Record tentative observations in
open-questions.mdwith how to verify them, not in topic pages. Promote or delete them once checked. - Validate after editing docs. Run
pwsh Build\scripts\Test-Docs.ps1(index completeness, relative links, anchors, page size). - Keep
AGENTS.mdconcise and limited to startup guidance and navigation.
| If you are changing... | Read |
|---|---|
| Menus, commands, source layout, coding conventions, buffers | Codebase and conventions |
Replacing home-grown Edit.c code with Scintilla messages |
Scintilla API usage |
| Build, MSBuild, CI, test scripts, Python scripting | Windows build and test |
Edit.c load/save, atomic save, file watching |
File I/O |
| Open dialog start directory, Recent files dialog | File I/O |
Any Win32 file/path call on HPATHL |
PathLib |
| Encoding selection or UTF-16/32 handling | Encoding detection, then diagnostics and tests |
| Lexers, styles, themes | Lexer development |
| UI strings, locale resources | Localization |
| Search/replace, PCRE2, URL hotspots | Regular expressions |
| INI settings, persistence | Configuration and INI |
| Dark mode, rendering, theme-change redraw | Dark mode and rendering |
| Startup, activation, AppID, new-window reuse | Startup and window lifecycle |
Expression evaluation (=?, Go To, line numbering), tinyexpr_cif |
TinyExpr++ wrapper |
| Topic | Description | Pages |
|---|---|---|
| Architecture | Source map, command dispatch, vendored libraries, coding conventions, and implementation patterns. | Codebase and conventions |
| Architecture: Scintilla API | Verified constraints of Scintilla messages when replacing home-grown Edit.c code. |
Scintilla API usage |
| Build and test | Windows build targets, MSBuild invocation, CI and test gotchas, Python environment. | Windows build and test |
| Domain: configuration | Portable INI lifecycle, persistence rules, and save/load behavior. | Configuration and INI |
| Domain: localization | Locale resource invariants, encoding/line-ending requirements, and adding UI strings. | Localization |
| Domain: lexer development | Lexer registration, property/comment/theme/localization touchpoints, and visual fixtures. | Lexer development |
| Domain: encoding | Detection precedence, UTF validation and heuristics, UCHARDET sampling, and UTF-32 load conversion. | Encoding detection |
| Domain: encoding diagnostics | Developer title diagnostics, abbreviations, and the native regression harness. | Encoding diagnostics and tests |
| Domain: regular expressions | PCRE2 integration, search/replacement syntax, regex translations, and URL hotspots. | Regular expressions |
| Domain: startup and lifecycle | Pasteboard activation, taskbar Shift+Click handoff, AppID grouping, and new-window reuse behavior. | Startup and window lifecycle |
| Domain: file I/O | Load/save flow, atomic saves, error handling, file watching, Open-dialog initial directory, and Recent files dialog. | File I/O |
| Domain: paths | PathLib wrappers, long-path handling, and path comparison rules. | PathLib |
| Domain: UI rendering | Dark mode, ARM64 rendering technology, and theme-change redraw. | Dark mode and rendering |
| Domain: expressions | C wrapper over TinyExpr++: contract, length-preserving pre-pass, error positions, callers. | TinyExpr++ wrapper |
| Docs maintenance | Unverified findings and pages queued for coverage review. | Open questions and coverage review |