{"owner":"htop-dev","repo":"htop","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["AGENTS.md"],"skills":{"AGENTS.md":"# AGENTS.md\n\nThis file provides guidance to AI coding agents working with code in this repository.\n\n## Build Commands\n\n```bash\n# Build for local platform - htop binary\n./autogen.sh && ./configure && make\n\n# Build with Performance Co-Pilot (PCP) support - pcp-htop binary\n./autogen.sh && ./configure --enable-pcp && make\n\n# Rebuild after code changes (no autogen needed)\nmake\n```\n\nKey configure flags: `--enable-capabilities`, `--enable-debug`, `--enable-delayacct`, `--enable-pcp`, `--enable-sensors`, `--enable-unicode`.\n\n## Code Style (from docs/styleguide.md)\n\n- **Indentation**: 3 spaces, never tabs\n- **Filenames**: CamelCase.c/.h (exceptions: `htop.c`, `pcp-htop.c`); directories lowercase\n- **Functions**: `ModuleName_functionName()` (e.g. `Process_compare()`)\n- **Variables**: short and precise (`i` not `someCounterValueForLoop`); module-private globals must be `static`\n- **Header guards**: `#ifndef HEADER_FILENAME` placed **before** the copyright comment\n- **Include order** (each group separated by blank line):\n  1. `#include \"config.h\" // IWYU pragma: keep` (required if using XUtils.h)\n  2. Accompanying module header (in .c files only)\n  3. System headers\n  4. Program headers\n  5. Conditional headers\n- Includes must be sorted alphabetically, with subdirectory paths sorting after parent-level files (`unistd.h` before `sys/time.h`)\n- **Braces**: omit around simple single statements (return, break, continue, trivial assignments); never put control flow body on same line as condition; if any block in an if/else chain needs braces, all blocks get braces\n- **Exports**: mark functions `static` unless they are public API with a header declaration; avoid function-like macros\n- **Strings**: use `String_eq()`, `String_cat()` etc. from XUtils.h instead of raw strcmp/strcat\n- **Memory**: use `xMalloc()`, `xCalloc()`, `xRealloc()` (never raw malloc); use `xReallocArray()` for arrays; never allocate 0 bytes\n- **Blank lines**: use single blank lines to separate groups of related statements within functions\n\n## Architecture\n\nhtop is a cross-platform interactive process viewer in C99. It uses an object-oriented C pattern with virtual method tables.\n\n### Class hierarchy\n\n`Object` (base with vtable: Display, Compare, Delete) → `Row` → `Process` (per-process data)\n`Object` → `Panel` (UI widget with event handling, scrolling)\n`Object` → `Meter` (system metric with text/bar/graph modes)\n\n### Platform abstraction\n\nEach platform directory (`linux/`, `darwin/`, `freebsd/`, `netbsd/`, `openbsd/`, `dragonflybsd/`, `solaris/`, `pcp/`, `unsupported/`) provides:\n- `Platform.c/.h` — platform init/done, load average, clock, etc.\n- `<Platform>Machine.c/.h` — system state (CPU counts, memory, uptime)\n- `<Platform>ProcessTable.c/.h` — process enumeration from OS\n- `<Platform>Process.c/.h` — platform-specific process fields\n\nThe `pcp/` platform uses PMAPI to fetch metrics and supports dynamic column/meter/screen definitions via config files in `pcp/columns/`, `pcp/meters/`, `pcp/screens/`.\n\n### Main loop\n\n`htop.c` or `pcp-htop.c` → `CommandLine_run()` → `ScreenManager_run()` which loops:\n1. Timer-based recalculation (fetch process data, update meters)\n2. Redraw if dirty\n3. Read keyboard input via `Panel_getCh()`\n4. Dispatch to action handler → returns `Htop_Reaction` flags (REFRESH, RECALCULATE, QUIT, etc.)\n\n### Key subsystems\n\n- **Action.c** — keyboard action handlers, each returns `Htop_Reaction`\n- **Settings.c** — config persistence (`~/.config/htop/htoprc`)\n- **Header.c** — meter layout in the top area\n- **FunctionBar.c** — F1-F10 key labels at bottom\n- **CRT.c** — ncurses abstraction (colors, attributes, input)\n- **Vector.c / Hashtable.c** — generic containers\n- **XUtils.c** — memory wrappers, string utilities (requires `config.h` in any .c that uses it)\n- **RichString.c** — attributed/colored string buffers\n- **generic/** — routines that may be shared across multiple platforms\n\n## AI Contributions Policy\n\nDisclose AI use via `Assisted-by:` or `Co-authored-by:` commit trailers. Contributor is fully responsible for quality and license compliance. See `docs/ai-contributions-policy.md`.\n\nSign off commits with a `Signed-off-by:` trailer (`git commit -s`) to certify the [Developer Certificate of Origin](https://developercertificate.org/). Sign-off is distinct from AI disclosure: `Assisted-by:` records tool use; `Signed-off-by:` records human responsibility. An agent must not sign off on a contributor's behalf without confirmation.\n"},"files":{"AGENTS.md":"# AGENTS.md\n\nThis file provides guidance to AI coding agents working with code in this repository.\n\n## Build Commands\n\n```bash\n# Build for local platform - htop binary\n./autogen.sh && ./configure && make\n\n# Build with Performance Co-Pilot (PCP) support - pcp-htop binary\n./autogen.sh && ./configure --enable-pcp && make\n\n# Rebuild after code changes (no autogen needed)\nmake\n```\n\nKey configure flags: `--enable-capabilities`, `--enable-debug`, `--enable-delayacct`, `--enable-pcp`, `--enable-sensors`, `--enable-unicode`.\n\n## Code Style (from docs/styleguide.md)\n\n- **Indentation**: 3 spaces, never tabs\n- **Filenames**: CamelCase.c/.h (exceptions: `htop.c`, `pcp-htop.c`); directories lowercase\n- **Functions**: `ModuleName_functionName()` (e.g. `Process_compare()`)\n- **Variables**: short and precise (`i` not `someCounterValueForLoop`); module-private globals must be `static`\n- **Header guards**: `#ifndef HEADER_FILENAME` placed **before** the copyright comment\n- **Include order** (each group separated by blank line):\n  1. `#include \"config.h\" // IWYU pragma: keep` (required if using XUtils.h)\n  2. Accompanying module header (in .c files only)\n  3. System headers\n  4. Program headers\n  5. Conditional headers\n- Includes must be sorted alphabetically, with subdirectory paths sorting after parent-level files (`unistd.h` before `sys/time.h`)\n- **Braces**: omit around simple single statements (return, break, continue, trivial assignments); never put control flow body on same line as condition; if any block in an if/else chain needs braces, all blocks get braces\n- **Exports**: mark functions `static` unless they are public API with a header declaration; avoid function-like macros\n- **Strings**: use `String_eq()`, `String_cat()` etc. from XUtils.h instead of raw strcmp/strcat\n- **Memory**: use `xMalloc()`, `xCalloc()`, `xRealloc()` (never raw malloc); use `xReallocArray()` for arrays; never allocate 0 bytes\n- **Blank lines**: use single blank lines to separate groups of related statements within functions\n\n## Architecture\n\nhtop is a cross-platform interactive process viewer in C99. It uses an object-oriented C pattern with virtual method tables.\n\n### Class hierarchy\n\n`Object` (base with vtable: Display, Compare, Delete) → `Row` → `Process` (per-process data)\n`Object` → `Panel` (UI widget with event handling, scrolling)\n`Object` → `Meter` (system metric with text/bar/graph modes)\n\n### Platform abstraction\n\nEach platform directory (`linux/`, `darwin/`, `freebsd/`, `netbsd/`, `openbsd/`, `dragonflybsd/`, `solaris/`, `pcp/`, `unsupported/`) provides:\n- `Platform.c/.h` — platform init/done, load average, clock, etc.\n- `<Platform>Machine.c/.h` — system state (CPU counts, memory, uptime)\n- `<Platform>ProcessTable.c/.h` — process enumeration from OS\n- `<Platform>Process.c/.h` — platform-specific process fields\n\nThe `pcp/` platform uses PMAPI to fetch metrics and supports dynamic column/meter/screen definitions via config files in `pcp/columns/`, `pcp/meters/`, `pcp/screens/`.\n\n### Main loop\n\n`htop.c` or `pcp-htop.c` → `CommandLine_run()` → `ScreenManager_run()` which loops:\n1. Timer-based recalculation (fetch process data, update meters)\n2. Redraw if dirty\n3. Read keyboard input via `Panel_getCh()`\n4. Dispatch to action handler → returns `Htop_Reaction` flags (REFRESH, RECALCULATE, QUIT, etc.)\n\n### Key subsystems\n\n- **Action.c** — keyboard action handlers, each returns `Htop_Reaction`\n- **Settings.c** — config persistence (`~/.config/htop/htoprc`)\n- **Header.c** — meter layout in the top area\n- **FunctionBar.c** — F1-F10 key labels at bottom\n- **CRT.c** — ncurses abstraction (colors, attributes, input)\n- **Vector.c / Hashtable.c** — generic containers\n- **XUtils.c** — memory wrappers, string utilities (requires `config.h` in any .c that uses it)\n- **RichString.c** — attributed/colored string buffers\n- **generic/** — routines that may be shared across multiple platforms\n\n## AI Contributions Policy\n\nDisclose AI use via `Assisted-by:` or `Co-authored-by:` commit trailers. Contributor is fully responsible for quality and license compliance. See `docs/ai-contributions-policy.md`.\n\nSign off commits with a `Signed-off-by:` trailer (`git commit -s`) to certify the [Developer Certificate of Origin](https://developercertificate.org/). Sign-off is distinct from AI disclosure: `Assisted-by:` records tool use; `Signed-off-by:` records human responsibility. An agent must not sign off on a contributor's behalf without confirmation.\n"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","title":"AGENTS.md","content":"# AGENTS.md\n\nThis file provides guidance to AI coding agents working with code in this repository.\n\n## Build Commands\n\n```bash\n# Build for local platform - htop binary\n./autogen.sh && ./configure && make\n\n# Build with Performance Co-Pilot (PCP) support - pcp-htop binary\n./autogen.sh && ./configure --enable-pcp && make\n\n# Rebuild after code changes (no autogen needed)\nmake\n```\n\nKey configure flags: `--enable-capabilities`, `--enable-debug`, `--enable-delayacct`, `--enable-pcp`, `--enable-sensors`, `--enable-unicode`.\n\n## Code Style (from docs/styleguide.md)\n\n- **Indentation**: 3 spaces, never tabs\n- **Filenames**: CamelCase.c/.h (exceptions: `htop.c`, `pcp-htop.c`); directories lowercase\n- **Functions**: `ModuleName_functionName()` (e.g. `Process_compare()`)\n- **Variables**: short and precise (`i` not `someCounterValueForLoop`); module-private globals must be `static`\n- **Header guards**: `#ifndef HEADER_FILENAME` placed **before** the copyright comment\n- **Include order** (each group separated by blank line):\n  1. `#include \"config.h\" // IWYU pragma: keep` (required if using XUtils.h)\n  2. Accompanying module header (in .c files only)\n  3. System headers\n  4. Program headers\n  5. Conditional headers\n- Includes must be sorted alphabetically, with subdirectory paths sorting after parent-level files (`unistd.h` before `sys/time.h`)\n- **Braces**: omit around simple single statements (return, break, continue, trivial assignments); never put control flow body on same line as condition; if any block in an if/else chain needs braces, all blocks get braces\n- **Exports**: mark functions `static` unless they are public API with a header declaration; avoid function-like macros\n- **Strings**: use `String_eq()`, `String_cat()` etc. from XUtils.h instead of raw strcmp/strcat\n- **Memory**: use `xMalloc()`, `xCalloc()`, `xRealloc()` (never raw malloc); use `xReallocArray()` for arrays; never allocate 0 bytes\n- **Blank lines**: use single blank lines to separate groups of related statements within functions\n\n## Architecture\n\nhtop is a cross-platform interactive process viewer in C99. It uses an object-oriented C pattern with virtual method tables.\n\n### Class hierarchy\n\n`Object` (base with vtable: Display, Compare, Delete) → `Row` → `Process` (per-process data)\n`Object` → `Panel` (UI widget with event handling, scrolling)\n`Object` → `Meter` (system metric with text/bar/graph modes)\n\n### Platform abstraction\n\nEach platform directory (`linux/`, `darwin/`, `freebsd/`, `netbsd/`, `openbsd/`, `dragonflybsd/`, `solaris/`, `pcp/`, `unsupported/`) provides:\n- `Platform.c/.h` — platform init/done, load average, clock, etc.\n- `<Platform>Machine.c/.h` — system state (CPU counts, memory, uptime)\n- `<Platform>ProcessTable.c/.h` — process enumeration from OS\n- `<Platform>Process.c/.h` — platform-specific process fields\n\nThe `pcp/` platform uses PMAPI to fetch metrics and supports dynamic column/meter/screen definitions via config files in `pcp/columns/`, `pcp/meters/`, `pcp/screens/`.\n\n### Main loop\n\n`htop.c` or `pcp-htop.c` → `CommandLine_run()` → `ScreenManager_run()` which loops:\n1. Timer-based recalculation (fetch process data, update meters)\n2. Redraw if dirty\n3. Read keyboard input via `Panel_getCh()`\n4. Dispatch to action handler → returns `Htop_Reaction` flags (REFRESH, RECALCULATE, QUIT, etc.)\n\n### Key subsystems\n\n- **Action.c** — keyboard action handlers, each returns `Htop_Reaction`\n- **Settings.c** — config persistence (`~/.config/htop/htoprc`)\n- **Header.c** — meter layout in the top area\n- **FunctionBar.c** — F1-F10 key labels at bottom\n- **CRT.c** — ncurses abstraction (colors, attributes, input)\n- **Vector.c / Hashtable.c** — generic containers\n- **XUtils.c** — memory wrappers, string utilities (requires `config.h` in any .c that uses it)\n- **RichString.c** — attributed/colored string buffers\n- **generic/** — routines that may be shared across multiple platforms\n\n## AI Contributions Policy\n\nDisclose AI use via `Assisted-by:` or `Co-authored-by:` commit trailers. Contributor is fully responsible for quality and license compliance. See `docs/ai-contributions-policy.md`.\n\nSign off commits with a `Signed-off-by:` trailer (`git commit -s`) to certify the [Developer Certificate of Origin](https://developercertificate.org/). Sign-off is distinct from AI disclosure: `Assisted-by:` records tool use; `Signed-off-by:` records human responsibility. An agent must not sign off on a contributor's behalf without confirmation.\n","category":"root","tokens":1120}]}