{"owner":"tstack","repo":"lnav","hasSkills":true,"totalSkillsCount":22,"totalTokensCount":7500,"categories":["project-spec","root-instruction","cursor-rule","windsurf-rule","cline-rule","roo-rule","mcp-config","marketplace","plugin-manifest","copilot-instructions"],"hasMcp":true,"mcpConfig":{"mcpServers":{"lnav":{"command":"npx","args":["-y","@modelcontextprotocol/server-lnav"]}}},"found":["ARCHITECTURE.md","RULES.md","PROMPT.md","PROMPTS.md","SYSTEM.md","ROUTING.md","SKILLS.md",".cursorrules",".windsurfrules",".clinerules",".roorules",".aideprules",".roomodes","llms.txt","llms-full.txt","mcp.json","marketplace.json","plugin.json",".github/copilot-instructions.md",".cursor/mcp.json",".claude-plugin/marketplace.json",".claude-plugin/plugin.json"],"skills":{"ARCHITECTURE.md":"# Architecture\n\nThis document covers the internal architecture of the Logfile Navigator (lnav),\na terminal-based tool for viewing and analyzing log files.\n\n## Goals\n\nThe following goals drive the design and implementation of lnav:\n\n- Don't make the user do something that can be done automatically.\n\n  Example: Automatically detect log formats for files instead of making them\n  specify the format for each file.\n\n- Be performant on low-spec hardware.\n\n  Example: Prefer single-threaded optimizations over trying to parallelize\n\n- Operations should be \"live\" and not block the user from continuing to work.\n\n  Example: Searches are run in the background.\n\n- Provide context-sensitive help.\n\n  Example: When the cursor is over a SQL keyword/function, the help text for\n  that is shown above.\n\n- Show a preview of operations so the user knows what is going to happen.\n\n  Example: When entering a `:filter-out` command, the matched parts of the\n  lines are highlighted in red.\n\n## Overview\n\nThe whole of lnav consists of a\n[log file parser](https://docs.lnav.org/en/latest/formats.html),\n[text UI](https://docs.lnav.org/en/latest/ui.html),\n[integrations with SQLite](https://docs.lnav.org/en/latest/sqlext.html),\n[command-line interface](https://docs.lnav.org/en/latest/cli.html), and\n[commands for operating on logs](https://docs.lnav.org/en/latest/commands.html).\nSince the majority of lnav's operations center around logs, the core\ndata-structure is the combined log message index. The message index is populated\nwhen new messages are read from log files. The text UI displays a subset of\nmessages from the index. The SQLite virtual-tables allow for programmatic access\nto the messages and lnav's internal state.\n\n[![lnav architecture](docs/lnav-architecture.png)](https://whimsical.com/lnav-architecture-UM594Qo4G3nt2XWaSZA1mh)\n\n## File Monitoring\n\nEach file being monitored by lnav has an associated [`logfile`](src/logfile.hh)\nobject, be they plaintext files or files with a recognized format.  These\nobjects are periodically polled by the main event loop to check if the file\nwas deleted, truncated, or new lines added.  While reading new lines, if no\nlog format has matched yet, each line will be passed through the log format\nregular expressions to try and find a match.  Each line that is read is added\nto an index\n\n#### Why is `mmap()` not used?\n\nNote that file contents are consumed using `pread(2)`/`read(2)` and not\n`mmap(2)` since `mmap(2)` does not react well to files changing out from\nunderneath it.  For example, a truncated file would likely result in a\n`SIGBUS`.\n\n## Log Messages\n\nAs files are being indexed, if a matching format is found, the file is\n\"promoted\" from a plaintext file to a log file.  When the file is promoted,\nit is added to the [logfile_sub_source](src/logfile_sub_source.hh), which\ncollates all log messages together into a single index.\n\n### Timestamp Parsing\n\nSince all log messages need to have a timestamp, timestamp parsing needs to be\nvery efficient.  The standard `strptime()` function is quite expensive, so lnav\nincludes an optimized custom parser and code-generator in the\n[ptimec](src/ptimec.hh) component.  The code-generator is used at compile-time\nto generate parsers for several [common formats](src/time_formats.am).\n\n## Log Formats\n\n[log_format](src/log_format.hh) instances are used to parse lines from files\ninto `logline` objects. The majority of log formats are\n[external_log_format](src/log_format_ext.hh) objects that are create from\n[JSON format definitions](https://docs.lnav.org/en/latest/formats.html). The\nbuilt-in definitions are located in the [formats](src/formats) directory. Log\nformats that cannot be handled through a simple regular expression are\nimplemented in the [log_format_impls.cc](src/log_format_impls.cc) file.\n\n## User Interface\n\nThe lnav text-user-interface is built on top of\n[notcurses](https://notcurses.com).\nHowever, the higher-level functionality of panels, widgets, and such is not\nused.  Instead, the following custom components are built on top of the notcurses\nprimitives:\n\n- [view_curses](src/view_curses.hh) - Provides the basics for text roles, which\n  allows for themes to color and style text. The `mvwattrline()` function does\n  all the heavy lifting of drawing [\"attributed\" lines](src/base/attr_line.hh),\n  which are strings that have attributes associated with a given range of\n  characters.\n- [listview_curses](src/listview_curses.hh) - Displays a list of items that are\n  provided by a source.\n- [textview_curses](src/textview_curses.hh) - Builds on the list view by adding\n  support for searching, filtering, bookmarks, etc...  The main panel that\n  displays the logs/plaintext/help is a textview.\n- [statusview_curses](src/state-extension-functions.cc) - Draws the status bars\n  at the top and bottom of the TUI.\n\nThe following diagram shows the underlying components that make up the TUI:\n\n[![lnav TUI](docs/lnav-tui.png)](https://whimsical.com/lnav-tui-MQjXc7Vx23BxQTHrnuNp5F)\n","RULES.md":"# Development & Architecture Rules\n\nPath: `RULES.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/RULES.md)","PROMPT.md":"# Core System Prompt & Persona\n\nPath: `PROMPT.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/PROMPT.md)","PROMPTS.md":"# Agent Prompts Catalog\n\nPath: `PROMPTS.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/PROMPTS.md)","SYSTEM.md":"# System Architecture & Agent Directives\n\nPath: `SYSTEM.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/SYSTEM.md)","ROUTING.md":"# Multi-Agent Routing & Delegation Matrix\n\nPath: `ROUTING.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/ROUTING.md)","SKILLS.md":"# Workspace Skills & Capabilities Index\n\nPath: `SKILLS.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/SKILLS.md)",".cursorrules":"# Cursor IDE Native Rules\n\nPath: `.cursorrules`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.cursorrules)",".windsurfrules":"# Windsurf Cascade Agent Rules\n\nPath: `.windsurfrules`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.windsurfrules)",".clinerules":"# Cline Extension Native Directives\n\nPath: `.clinerules`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.clinerules)",".roorules":"# Roo Code Autonomous Agent Rules\n\nPath: `.roorules`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.roorules)",".aideprules":"# Aider Coding Assistant Guidelines\n\nPath: `.aideprules`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.aideprules)",".roomodes":"# Roo Code Custom Persona Modes\n\nPath: `.roomodes`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.roomodes)","llms.txt":"# LLM Index & Context Digest\n\nPath: `llms.txt`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/llms.txt)","llms-full.txt":"# LLM Full Documentation Context\n\nPath: `llms-full.txt`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/llms-full.txt)","mcp.json":"# Model Context Protocol (MCP) Configuration\n\nPath: `mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/mcp.json)","marketplace.json":"# Claude Plugin Marketplace Catalog\n\nPath: `marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/marketplace.json)","plugin.json":"# Plugin Plugin Manifest\n\nPath: `plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/plugin.json)",".github/copilot-instructions.md":"# GitHub Copilot Instructions\n\nPath: `.github/copilot-instructions.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.github/copilot-instructions.md)",".cursor/mcp.json":"# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.cursor/mcp.json)",".claude-plugin/marketplace.json":"# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.claude-plugin/marketplace.json)",".claude-plugin/plugin.json":"# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.claude-plugin/plugin.json)"},"files":{"ARCHITECTURE.md":"# Architecture\n\nThis document covers the internal architecture of the Logfile Navigator (lnav),\na terminal-based tool for viewing and analyzing log files.\n\n## Goals\n\nThe following goals drive the design and implementation of lnav:\n\n- Don't make the user do something that can be done automatically.\n\n  Example: Automatically detect log formats for files instead of making them\n  specify the format for each file.\n\n- Be performant on low-spec hardware.\n\n  Example: Prefer single-threaded optimizations over trying to parallelize\n\n- Operations should be \"live\" and not block the user from continuing to work.\n\n  Example: Searches are run in the background.\n\n- Provide context-sensitive help.\n\n  Example: When the cursor is over a SQL keyword/function, the help text for\n  that is shown above.\n\n- Show a preview of operations so the user knows what is going to happen.\n\n  Example: When entering a `:filter-out` command, the matched parts of the\n  lines are highlighted in red.\n\n## Overview\n\nThe whole of lnav consists of a\n[log file parser](https://docs.lnav.org/en/latest/formats.html),\n[text UI](https://docs.lnav.org/en/latest/ui.html),\n[integrations with SQLite](https://docs.lnav.org/en/latest/sqlext.html),\n[command-line interface](https://docs.lnav.org/en/latest/cli.html), and\n[commands for operating on logs](https://docs.lnav.org/en/latest/commands.html).\nSince the majority of lnav's operations center around logs, the core\ndata-structure is the combined log message index. The message index is populated\nwhen new messages are read from log files. The text UI displays a subset of\nmessages from the index. The SQLite virtual-tables allow for programmatic access\nto the messages and lnav's internal state.\n\n[![lnav architecture](docs/lnav-architecture.png)](https://whimsical.com/lnav-architecture-UM594Qo4G3nt2XWaSZA1mh)\n\n## File Monitoring\n\nEach file being monitored by lnav has an associated [`logfile`](src/logfile.hh)\nobject, be they plaintext files or files with a recognized format.  These\nobjects are periodically polled by the main event loop to check if the file\nwas deleted, truncated, or new lines added.  While reading new lines, if no\nlog format has matched yet, each line will be passed through the log format\nregular expressions to try and find a match.  Each line that is read is added\nto an index\n\n#### Why is `mmap()` not used?\n\nNote that file contents are consumed using `pread(2)`/`read(2)` and not\n`mmap(2)` since `mmap(2)` does not react well to files changing out from\nunderneath it.  For example, a truncated file would likely result in a\n`SIGBUS`.\n\n## Log Messages\n\nAs files are being indexed, if a matching format is found, the file is\n\"promoted\" from a plaintext file to a log file.  When the file is promoted,\nit is added to the [logfile_sub_source](src/logfile_sub_source.hh), which\ncollates all log messages together into a single index.\n\n### Timestamp Parsing\n\nSince all log messages need to have a timestamp, timestamp parsing needs to be\nvery efficient.  The standard `strptime()` function is quite expensive, so lnav\nincludes an optimized custom parser and code-generator in the\n[ptimec](src/ptimec.hh) component.  The code-generator is used at compile-time\nto generate parsers for several [common formats](src/time_formats.am).\n\n## Log Formats\n\n[log_format](src/log_format.hh) instances are used to parse lines from files\ninto `logline` objects. The majority of log formats are\n[external_log_format](src/log_format_ext.hh) objects that are create from\n[JSON format definitions](https://docs.lnav.org/en/latest/formats.html). The\nbuilt-in definitions are located in the [formats](src/formats) directory. Log\nformats that cannot be handled through a simple regular expression are\nimplemented in the [log_format_impls.cc](src/log_format_impls.cc) file.\n\n## User Interface\n\nThe lnav text-user-interface is built on top of\n[notcurses](https://notcurses.com).\nHowever, the higher-level functionality of panels, widgets, and such is not\nused.  Instead, the following custom components are built on top of the notcurses\nprimitives:\n\n- [view_curses](src/view_curses.hh) - Provides the basics for text roles, which\n  allows for themes to color and style text. The `mvwattrline()` function does\n  all the heavy lifting of drawing [\"attributed\" lines](src/base/attr_line.hh),\n  which are strings that have attributes associated with a given range of\n  characters.\n- [listview_curses](src/listview_curses.hh) - Displays a list of items that are\n  provided by a source.\n- [textview_curses](src/textview_curses.hh) - Builds on the list view by adding\n  support for searching, filtering, bookmarks, etc...  The main panel that\n  displays the logs/plaintext/help is a textview.\n- [statusview_curses](src/state-extension-functions.cc) - Draws the status bars\n  at the top and bottom of the TUI.\n\nThe following diagram shows the underlying components that make up the TUI:\n\n[![lnav TUI](docs/lnav-tui.png)](https://whimsical.com/lnav-tui-MQjXc7Vx23BxQTHrnuNp5F)\n","RULES.md":"# Development & Architecture Rules\n\nPath: `RULES.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/RULES.md)","PROMPT.md":"# Core System Prompt & Persona\n\nPath: `PROMPT.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/PROMPT.md)","PROMPTS.md":"# Agent Prompts Catalog\n\nPath: `PROMPTS.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/PROMPTS.md)","SYSTEM.md":"# System Architecture & Agent Directives\n\nPath: `SYSTEM.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/SYSTEM.md)","ROUTING.md":"# Multi-Agent Routing & Delegation Matrix\n\nPath: `ROUTING.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/ROUTING.md)","SKILLS.md":"# Workspace Skills & Capabilities Index\n\nPath: `SKILLS.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/SKILLS.md)",".cursorrules":"# Cursor IDE Native Rules\n\nPath: `.cursorrules`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.cursorrules)",".windsurfrules":"# Windsurf Cascade Agent Rules\n\nPath: `.windsurfrules`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.windsurfrules)",".clinerules":"# Cline Extension Native Directives\n\nPath: `.clinerules`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.clinerules)",".roorules":"# Roo Code Autonomous Agent Rules\n\nPath: `.roorules`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.roorules)",".aideprules":"# Aider Coding Assistant Guidelines\n\nPath: `.aideprules`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.aideprules)",".roomodes":"# Roo Code Custom Persona Modes\n\nPath: `.roomodes`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.roomodes)","llms.txt":"# LLM Index & Context Digest\n\nPath: `llms.txt`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/llms.txt)","llms-full.txt":"# LLM Full Documentation Context\n\nPath: `llms-full.txt`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/llms-full.txt)","mcp.json":"# Model Context Protocol (MCP) Configuration\n\nPath: `mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/mcp.json)","marketplace.json":"# Claude Plugin Marketplace Catalog\n\nPath: `marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/marketplace.json)","plugin.json":"# Plugin Plugin Manifest\n\nPath: `plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/plugin.json)",".github/copilot-instructions.md":"# GitHub Copilot Instructions\n\nPath: `.github/copilot-instructions.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.github/copilot-instructions.md)",".cursor/mcp.json":"# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.cursor/mcp.json)",".claude-plugin/marketplace.json":"# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.claude-plugin/marketplace.json)",".claude-plugin/plugin.json":"# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.claude-plugin/plugin.json)"},"items":[{"name":".aideprules","path":".aideprules","rawUrl":"https://raw.githubusercontent.com/tstack/lnav/HEAD/.aideprules","title":"Aider Coding Assistant Guidelines","category":"root-instruction","format":"markdown","content":"# Aider Coding Assistant Guidelines\n\nPath: `.aideprules`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.aideprules)","tokens":300,"sizeBytes":150},{"name":"llms-full.txt","path":"llms-full.txt","rawUrl":"https://raw.githubusercontent.com/tstack/lnav/HEAD/llms-full.txt","title":"LLM Full Documentation Context","category":"root-instruction","format":"text","content":"# LLM Full Documentation Context\n\nPath: `llms-full.txt`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/llms-full.txt)","tokens":300,"sizeBytes":151},{"name":"llms.txt","path":"llms.txt","rawUrl":"https://raw.githubusercontent.com/tstack/lnav/HEAD/llms.txt","title":"LLM Index & Context Digest","category":"root-instruction","format":"text","content":"# LLM Index & Context Digest\n\nPath: `llms.txt`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/llms.txt)","tokens":300,"sizeBytes":137},{"name":"PROMPT.md","path":"PROMPT.md","rawUrl":"https://raw.githubusercontent.com/tstack/lnav/HEAD/PROMPT.md","title":"Core System Prompt & Persona","category":"root-instruction","format":"markdown","content":"# Core System Prompt & Persona\n\nPath: `PROMPT.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/PROMPT.md)","tokens":300,"sizeBytes":141},{"name":"PROMPTS.md","path":"PROMPTS.md","rawUrl":"https://raw.githubusercontent.com/tstack/lnav/HEAD/PROMPTS.md","title":"Agent Prompts Catalog","category":"root-instruction","format":"markdown","content":"# Agent Prompts Catalog\n\nPath: `PROMPTS.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/PROMPTS.md)","tokens":300,"sizeBytes":136},{"name":"ROUTING.md","path":"ROUTING.md","rawUrl":"https://raw.githubusercontent.com/tstack/lnav/HEAD/ROUTING.md","title":"Multi-Agent Routing & Delegation Matrix","category":"root-instruction","format":"markdown","content":"# Multi-Agent Routing & Delegation Matrix\n\nPath: `ROUTING.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/ROUTING.md)","tokens":300,"sizeBytes":154},{"name":"RULES.md","path":"RULES.md","rawUrl":"https://raw.githubusercontent.com/tstack/lnav/HEAD/RULES.md","title":"Development & Architecture Rules","category":"root-instruction","format":"markdown","content":"# Development & Architecture Rules\n\nPath: `RULES.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/RULES.md)","tokens":300,"sizeBytes":143},{"name":"SKILLS.md","path":"SKILLS.md","rawUrl":"https://raw.githubusercontent.com/tstack/lnav/HEAD/SKILLS.md","title":"Workspace Skills & Capabilities Index","category":"root-instruction","format":"markdown","content":"# Workspace Skills & Capabilities Index\n\nPath: `SKILLS.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/SKILLS.md)","tokens":300,"sizeBytes":150},{"name":"SYSTEM.md","path":"SYSTEM.md","rawUrl":"https://raw.githubusercontent.com/tstack/lnav/HEAD/SYSTEM.md","title":"System Architecture & Agent Directives","category":"root-instruction","format":"markdown","content":"# System Architecture & Agent Directives\n\nPath: `SYSTEM.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/SYSTEM.md)","tokens":300,"sizeBytes":151},{"name":"ARCHITECTURE.md","path":"ARCHITECTURE.md","rawUrl":"https://raw.githubusercontent.com/tstack/lnav/HEAD/ARCHITECTURE.md","title":"System Architecture & Module Boundaries","category":"project-spec","format":"markdown","content":"# Architecture\n\nThis document covers the internal architecture of the Logfile Navigator (lnav),\na terminal-based tool for viewing and analyzing log files.\n\n## Goals\n\nThe following goals drive the design and implementation of lnav:\n\n- Don't make the user do something that can be done automatically.\n\n  Example: Automatically detect log formats for files instead of making them\n  specify the format for each file.\n\n- Be performant on low-spec hardware.\n\n  Example: Prefer single-threaded optimizations over trying to parallelize\n\n- Operations should be \"live\" and not block the user from continuing to work.\n\n  Example: Searches are run in the background.\n\n- Provide context-sensitive help.\n\n  Example: When the cursor is over a SQL keyword/function, the help text for\n  that is shown above.\n\n- Show a preview of operations so the user knows what is going to happen.\n\n  Example: When entering a `:filter-out` command, the matched parts of the\n  lines are highlighted in red.\n\n## Overview\n\nThe whole of lnav consists of a\n[log file parser](https://docs.lnav.org/en/latest/formats.html),\n[text UI](https://docs.lnav.org/en/latest/ui.html),\n[integrations with SQLite](https://docs.lnav.org/en/latest/sqlext.html),\n[command-line interface](https://docs.lnav.org/en/latest/cli.html), and\n[commands for operating on logs](https://docs.lnav.org/en/latest/commands.html).\nSince the majority of lnav's operations center around logs, the core\ndata-structure is the combined log message index. The message index is populated\nwhen new messages are read from log files. The text UI displays a subset of\nmessages from the index. The SQLite virtual-tables allow for programmatic access\nto the messages and lnav's internal state.\n\n[![lnav architecture](docs/lnav-architecture.png)](https://whimsical.com/lnav-architecture-UM594Qo4G3nt2XWaSZA1mh)\n\n## File Monitoring\n\nEach file being monitored by lnav has an associated [`logfile`](src/logfile.hh)\nobject, be they plaintext files or files with a recognized format.  These\nobjects are periodically polled by the main event loop to check if the file\nwas deleted, truncated, or new lines added.  While reading new lines, if no\nlog format has matched yet, each line will be passed through the log format\nregular expressions to try and find a match.  Each line that is read is added\nto an index\n\n#### Why is `mmap()` not used?\n\nNote that file contents are consumed using `pread(2)`/`read(2)` and not\n`mmap(2)` since `mmap(2)` does not react well to files changing out from\nunderneath it.  For example, a truncated file would likely result in a\n`SIGBUS`.\n\n## Log Messages\n\nAs files are being indexed, if a matching format is found, the file is\n\"promoted\" from a plaintext file to a log file.  When the file is promoted,\nit is added to the [logfile_sub_source](src/logfile_sub_source.hh), which\ncollates all log messages together into a single index.\n\n### Timestamp Parsing\n\nSince all log messages need to have a timestamp, timestamp parsing needs to be\nvery efficient.  The standard `strptime()` function is quite expensive, so lnav\nincludes an optimized custom parser and code-generator in the\n[ptimec](src/ptimec.hh) component.  The code-generator is used at compile-time\nto generate parsers for several [common formats](src/time_formats.am).\n\n## Log Formats\n\n[log_format](src/log_format.hh) instances are used to parse lines from files\ninto `logline` objects. The majority of log formats are\n[external_log_format](src/log_format_ext.hh) objects that are create from\n[JSON format definitions](https://docs.lnav.org/en/latest/formats.html). The\nbuilt-in definitions are located in the [formats](src/formats) directory. Log\nformats that cannot be handled through a simple regular expression are\nimplemented in the [log_format_impls.cc](src/log_format_impls.cc) file.\n\n## User Interface\n\nThe lnav text-user-interface is built on top of\n[notcurses](https://notcurses.com).\nHowever, the higher-level functionality of panels, widgets, and such is not\nused.  Instead, the following custom components are built on top of the notcurses\nprimitives:\n\n- [view_curses](src/view_curses.hh) - Provides the basics for text roles, which\n  allows for themes to color and style text. The `mvwattrline()` function does\n  all the heavy lifting of drawing [\"attributed\" lines](src/base/attr_line.hh),\n  which are strings that have attributes associated with a given range of\n  characters.\n- [listview_curses](src/listview_curses.hh) - Displays a list of items that are\n  provided by a source.\n- [textview_curses](src/textview_curses.hh) - Builds on the list view by adding\n  support for searching, filtering, bookmarks, etc...  The main panel that\n  displays the logs/plaintext/help is a textview.\n- [statusview_curses](src/state-extension-functions.cc) - Draws the status bars\n  at the top and bottom of the TUI.\n\nThe following diagram shows the underlying components that make up the TUI:\n\n[![lnav TUI](docs/lnav-tui.png)](https://whimsical.com/lnav-tui-MQjXc7Vx23BxQTHrnuNp5F)\n","isInternal":false,"tokens":1200,"sizeBytes":4986},{"name":".cursorrules","path":".cursorrules","rawUrl":"https://raw.githubusercontent.com/tstack/lnav/HEAD/.cursorrules","title":"Cursor IDE Native Rules","category":"cursor-rule","format":"markdown","content":"# Cursor IDE Native Rules\n\nPath: `.cursorrules`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.cursorrules)","tokens":300,"sizeBytes":142},{"name":".windsurfrules","path":".windsurfrules","rawUrl":"https://raw.githubusercontent.com/tstack/lnav/HEAD/.windsurfrules","title":"Windsurf Cascade Agent Rules","category":"windsurf-rule","format":"markdown","content":"# Windsurf Cascade Agent Rules\n\nPath: `.windsurfrules`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.windsurfrules)","tokens":300,"sizeBytes":151},{"name":"copilot-instructions.md","path":".github/copilot-instructions.md","rawUrl":"https://raw.githubusercontent.com/tstack/lnav/HEAD/.github/copilot-instructions.md","title":"GitHub Copilot Instructions","category":"copilot-instructions","format":"markdown","content":"# GitHub Copilot Instructions\n\nPath: `.github/copilot-instructions.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.github/copilot-instructions.md)","tokens":300,"sizeBytes":184},{"name":".roomodes","path":".roomodes","rawUrl":"https://raw.githubusercontent.com/tstack/lnav/HEAD/.roomodes","title":"Roo Code Custom Persona Modes","category":"roo-rule","format":"markdown","content":"# Roo Code Custom Persona Modes\n\nPath: `.roomodes`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.roomodes)","tokens":300,"sizeBytes":142},{"name":".roorules","path":".roorules","rawUrl":"https://raw.githubusercontent.com/tstack/lnav/HEAD/.roorules","title":"Roo Code Autonomous Agent Rules","category":"roo-rule","format":"markdown","content":"# Roo Code Autonomous Agent Rules\n\nPath: `.roorules`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.roorules)","tokens":300,"sizeBytes":144},{"name":".clinerules","path":".clinerules","rawUrl":"https://raw.githubusercontent.com/tstack/lnav/HEAD/.clinerules","title":"Cline Extension Native Directives","category":"cline-rule","format":"markdown","content":"# Cline Extension Native Directives\n\nPath: `.clinerules`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.clinerules)","tokens":300,"sizeBytes":150},{"name":"marketplace.json","path":".claude-plugin/marketplace.json","rawUrl":"https://raw.githubusercontent.com/tstack/lnav/HEAD/.claude-plugin/marketplace.json","title":"Claude Plugin Marketplace Catalog","category":"marketplace","format":"json","content":"# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.claude-plugin/marketplace.json)","tokens":300,"sizeBytes":190},{"name":"marketplace.json","path":"marketplace.json","rawUrl":"https://raw.githubusercontent.com/tstack/lnav/HEAD/marketplace.json","title":"Claude Plugin Marketplace Catalog","category":"marketplace","format":"json","content":"# Claude Plugin Marketplace Catalog\n\nPath: `marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/marketplace.json)","tokens":300,"sizeBytes":160},{"name":"plugin.json","path":".claude-plugin/plugin.json","rawUrl":"https://raw.githubusercontent.com/tstack/lnav/HEAD/.claude-plugin/plugin.json","title":"claude-plugin Plugin Manifest","category":"plugin-manifest","format":"json","content":"# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.claude-plugin/plugin.json)","tokens":300,"sizeBytes":176},{"name":"plugin.json","path":"plugin.json","rawUrl":"https://raw.githubusercontent.com/tstack/lnav/HEAD/plugin.json","title":"Plugin Plugin Manifest","category":"plugin-manifest","format":"json","content":"# Plugin Plugin Manifest\n\nPath: `plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/plugin.json)","tokens":300,"sizeBytes":139},{"name":"mcp.json","path":".cursor/mcp.json","rawUrl":"https://raw.githubusercontent.com/tstack/lnav/HEAD/.cursor/mcp.json","title":"Model Context Protocol (MCP) Configuration","category":"mcp-config","format":"json","content":"# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.cursor/mcp.json)","tokens":300,"sizeBytes":169},{"name":"mcp.json","path":"mcp.json","rawUrl":"https://raw.githubusercontent.com/tstack/lnav/HEAD/mcp.json","title":"Model Context Protocol (MCP) Configuration","category":"mcp-config","format":"json","content":"# Model Context Protocol (MCP) Configuration\n\nPath: `mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/mcp.json)","tokens":300,"sizeBytes":153}],"systemPromptSnippet":"<yakaai_skills repo=\"tstack/lnav\">\n<!-- File: .aideprules (Tokens: ~300 | Category: root-instruction) -->\n# Aider Coding Assistant Guidelines\n\nPath: `.aideprules`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.aideprules)\n\n<!-- File: llms-full.txt (Tokens: ~300 | Category: root-instruction) -->\n# LLM Full Documentation Context\n\nPath: `llms-full.txt`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/llms-full.txt)\n\n<!-- File: llms.txt (Tokens: ~300 | Category: root-instruction) -->\n# LLM Index & Context Digest\n\nPath: `llms.txt`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/llms.txt)\n\n<!-- File: PROMPT.md (Tokens: ~300 | Category: root-instruction) -->\n# Core System Prompt & Persona\n\nPath: `PROMPT.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/PROMPT.md)\n\n<!-- File: PROMPTS.md (Tokens: ~300 | Category: root-instruction) -->\n# Agent Prompts Catalog\n\nPath: `PROMPTS.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/PROMPTS.md)\n\n<!-- File: ROUTING.md (Tokens: ~300 | Category: root-instruction) -->\n# Multi-Agent Routing & Delegation Matrix\n\nPath: `ROUTING.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/ROUTING.md)\n\n<!-- File: RULES.md (Tokens: ~300 | Category: root-instruction) -->\n# Development & Architecture Rules\n\nPath: `RULES.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/RULES.md)\n\n<!-- File: SKILLS.md (Tokens: ~300 | Category: root-instruction) -->\n# Workspace Skills & Capabilities Index\n\nPath: `SKILLS.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/SKILLS.md)\n\n<!-- File: SYSTEM.md (Tokens: ~300 | Category: root-instruction) -->\n# System Architecture & Agent Directives\n\nPath: `SYSTEM.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/SYSTEM.md)\n\n<!-- File: ARCHITECTURE.md (Tokens: ~1200 | Category: project-spec) -->\n# Architecture\n\nThis document covers the internal architecture of the Logfile Navigator (lnav),\na terminal-based tool for viewing and analyzing log files.\n\n## Goals\n\nThe following goals drive the design and implementation of lnav:\n\n- Don't make the user do something that can be done automatically.\n\n  Example: Automatically detect log formats for files instead of making them\n  specify the format for each file.\n\n- Be performant on low-spec hardware.\n\n  Example: Prefer single-threaded optimizations over trying to parallelize\n\n- Operations should be \"live\" and not block the user from continuing to work.\n\n  Example: Searches are run in the background.\n\n- Provide context-sensitive help.\n\n  Example: When the cursor is over a SQL keyword/function, the help text for\n  that is shown above.\n\n- Show a preview of operations so the user knows what is going to happen.\n\n  Example: When entering a `:filter-out` command, the matched parts of the\n  lines are highlighted in red.\n\n## Overview\n\nThe whole of lnav consists of a\n[log file parser](https://docs.lnav.org/en/latest/formats.html),\n[text UI](https://docs.lnav.org/en/latest/ui.html),\n[integrations with SQLite](https://docs.lnav.org/en/latest/sqlext.html),\n[command-line interface](https://docs.lnav.org/en/latest/cli.html), and\n[commands for operating on logs](https://docs.lnav.org/en/latest/commands.html).\nSince the majority of lnav's operations center around logs, the core\ndata-structure is the combined log message index. The message index is populated\nwhen new messages are read from log files. The text UI displays a subset of\nmessages from the index. The SQLite virtual-tables allow for programmatic access\nto the messages and lnav's internal state.\n\n[![lnav architecture](docs/lnav-architecture.png)](https://whimsical.com/lnav-architecture-UM594Qo4G3nt2XWaSZA1mh)\n\n## File Monitoring\n\nEach file being monitored by lnav has an associated [`logfile`](src/logfile.hh)\nobject, be they plaintext files or files with a recognized format.  These\nobjects are periodically polled by the main event loop to check if the file\nwas deleted, truncated, or new lines added.  While reading new lines, if no\nlog format has matched yet, each line will be passed through the log format\nregular expressions to try and find a match.  Each line that is read is added\nto an index\n\n#### Why is `mmap()` not used?\n\nNote that file contents are consumed using `pread(2)`/`read(2)` and not\n`mmap(2)` since `mmap(2)` does not react well to files changing out from\nunderneath it.  For example, a truncated file would likely result in a\n`SIGBUS`.\n\n## Log Messages\n\nAs files are being indexed, if a matching format is found, the file is\n\"promoted\" from a plaintext file to a log file.  When the file is promoted,\nit is added to the [logfile_sub_source](src/logfile_sub_source.hh), which\ncollates all log messages together into a single index.\n\n### Timestamp Parsing\n\nSince all log messages need to have a timestamp, timestamp parsing needs to be\nvery efficient.  The standard `strptime()` function is quite expensive, so lnav\nincludes an optimized custom parser and code-generator in the\n[ptimec](src/ptimec.hh) component.  The code-generator is used at compile-time\nto generate parsers for several [common formats](src/time_formats.am).\n\n## Log Formats\n\n[log_format](src/log_format.hh) instances are used to parse lines from files\ninto `logline` objects. The majority of log formats are\n[external_log_format](src/log_format_ext.hh) objects that are create from\n[JSON format definitions](https://docs.lnav.org/en/latest/formats.html). The\nbuilt-in definitions are located in the [formats](src/formats) directory. Log\nformats that cannot be handled through a simple regular expression are\nimplemented in the [log_format_impls.cc](src/log_format_impls.cc) file.\n\n## User Interface\n\nThe lnav text-user-interface is built on top of\n[notcurses](https://notcurses.com).\nHowever, the higher-level functionality of panels, widgets, and such is not\nused.  Instead, the following custom components are built on top of the notcurses\nprimitives:\n\n- [view_curses](src/view_curses.hh) - Provides the basics for text roles, which\n  allows for themes to color and style text. The `mvwattrline()` function does\n  all the heavy lifting of drawing [\"attributed\" lines](src/base/attr_line.hh),\n  which are strings that have attributes associated with a given range of\n  characters.\n- [listview_curses](src/listview_curses.hh) - Displays a list of items that are\n  provided by a source.\n- [textview_curses](src/textview_curses.hh) - Builds on the list view by adding\n  support for searching, filtering, bookmarks, etc...  The main panel that\n  displays the logs/plaintext/help is a textview.\n- [statusview_curses](src/state-extension-functions.cc) - Draws the status bars\n  at the top and bottom of the TUI.\n\nThe following diagram shows the underlying components that make up the TUI:\n\n[![lnav TUI](docs/lnav-tui.png)](https://whimsical.com/lnav-tui-MQjXc7Vx23BxQTHrnuNp5F)\n\n<!-- File: .cursorrules (Tokens: ~300 | Category: cursor-rule) -->\n# Cursor IDE Native Rules\n\nPath: `.cursorrules`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.cursorrules)\n\n<!-- File: .windsurfrules (Tokens: ~300 | Category: windsurf-rule) -->\n# Windsurf Cascade Agent Rules\n\nPath: `.windsurfrules`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.windsurfrules)\n\n<!-- File: .github/copilot-instructions.md (Tokens: ~300 | Category: copilot-instructions) -->\n# GitHub Copilot Instructions\n\nPath: `.github/copilot-instructions.md`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.github/copilot-instructions.md)\n\n<!-- File: .roomodes (Tokens: ~300 | Category: roo-rule) -->\n# Roo Code Custom Persona Modes\n\nPath: `.roomodes`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.roomodes)\n\n<!-- File: .roorules (Tokens: ~300 | Category: roo-rule) -->\n# Roo Code Autonomous Agent Rules\n\nPath: `.roorules`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.roorules)\n\n<!-- File: .clinerules (Tokens: ~300 | Category: cline-rule) -->\n# Cline Extension Native Directives\n\nPath: `.clinerules`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.clinerules)\n\n<!-- File: .claude-plugin/marketplace.json (Tokens: ~300 | Category: marketplace) -->\n# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.claude-plugin/marketplace.json)\n\n<!-- File: marketplace.json (Tokens: ~300 | Category: marketplace) -->\n# Claude Plugin Marketplace Catalog\n\nPath: `marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/marketplace.json)\n\n<!-- File: .claude-plugin/plugin.json (Tokens: ~300 | Category: plugin-manifest) -->\n# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.claude-plugin/plugin.json)\n\n<!-- File: plugin.json (Tokens: ~300 | Category: plugin-manifest) -->\n# Plugin Plugin Manifest\n\nPath: `plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/plugin.json)\n\n<!-- File: .cursor/mcp.json (Tokens: ~300 | Category: mcp-config) -->\n# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/.cursor/mcp.json)\n\n<!-- File: mcp.json (Tokens: ~300 | Category: mcp-config) -->\n# Model Context Protocol (MCP) Configuration\n\nPath: `mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/tstack/lnav/HEAD/mcp.json)\n</yakaai_skills>"}