What is STRUCTURE.json?

STRUCTURE.json is an auto-generated file that maps your project’s module structure, IPC channels, and architecture notes. AI agents use it to understand the codebase layout without reading every file.

Generation

Auto-generated by PATAPIM. Updated via pre-commit hook or manual regeneration.

Format

{
  "modules": {
    "main": [
      "index.js",
      "ptyManager.js",
      "remoteServer.js",
      "browserManager.js",
      "parakeetService.js",
      "tasksManager.js"
    ],
    "renderer": [
      "index.js",
      "terminalManager.js",
      "multiTerminalUI.js",
      "fileTreeUI.js",
      "tasksPanel.js"
    ]
  },
  "ipc": {
    "terminal": [
      "terminal-create",
      "terminal-destroy",
      "terminal-input-id",
      "terminal-output-id",
      "terminal-resize-id"
    ],
    "browser": [
      "browser:create",
      "browser:navigate",
      "browser:back",
      "browser:screenshot",
      "browser:set-device"
    ],
    "tasks": [
      "load-tasks",
      "add-task",
      "update-task",
      "delete-task"
    ],
    "files": [
      "read-file",
      "write-file",
      "check-file-exists"
    ]
  },
  "architecture": "Electron app with main/renderer process split. Main process manages PTY instances, browser views, and remote access. Renderer handles xterm.js UI, file tree, and panel system."
}

Sections

modules

Lists source files organized by process:

  • main: Electron main process modules (Node.js backend)
  • renderer: Electron renderer modules (UI)

ipc

Lists IPC channels organized by category. These are the channels used for main-renderer communication via Electron’s ipcMain/ipcRenderer.

architecture

A text description of the overall project architecture.

How AI Agents Use It

When Claude Code reads STRUCTURE.json, it can:

  • Navigate to the right file without scanning the entire codebase
  • Understand which IPC channels exist before adding new ones
  • Know which modules are in main vs renderer process
  • Get a quick architecture overview