RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/AGENTS.md/0-AI-UG/cate

AGENTS.md

AGENTS.md
AGENTS.mdroot

Quality

84/100

Scores the file, not the repository.

Length

778 words

13 headings · 1 code blocks

Repository

2.0k

— · pushed 0 days ago

Last changed

3 days ago

First indexed 3 days ago.
0-AI-UG/cate/AGENTS.mdRawGitHub
1# AGENTS.md
2 
3This file provides guidance to Codex (Codex.ai/code) when working with code in this repository.
4 
5## Before You Code
6 
7Read and follow the **karpathy-guidelines** skill (`.Codex/skills/karpathy-guidelines`) when writing, reviewing, or refactoring code here — surface assumptions, make surgical changes, keep it simple, and define verifiable success criteria.
8 
9## Project Overview
10 
11Cate is a desktop application that provides an infinite zoomable canvas where editor panels, terminal panels, and browser panels float spatially (similar to Figma/Miro, but for coding). Built with Electron + React + TypeScript, styled with Tailwind CSS.
12 
13## Build System
14 
15The Electron app lives at the project root. Uses **electron-vite** for bundling.
16 
17```bash
18npm install # install dependencies
19npm run dev # start dev server with hot reload
20npm run build # production build
21npm test # run vitest suite
22```
23 
24Tests use **Vitest** and live alongside the code they cover (`*.test.ts` / `*.test.tsx`). A few git-touching tests assume a clean working repo and may fail when the dev tree has a branch named `main` or local modifications — those failures are environmental, not regressions.
25 
26## Release Process
27 
28Before creating any beta or stable release, update `CHANGELOG.md` with the
29matching version, release date, summary, and categorized user-facing changes.
30The changelog entry must be complete before bumping or tagging the release.
31 
32## Dependencies
33 
34Managed via npm (`package.json`):
35- **Electron** — desktop shell (Chromium + Node.js)
36- **React 18** + **react-dom** — UI framework
37- **xterm.js** (`@xterm/xterm`) — terminal emulator with WebGL addon
38- **node-pty** — native PTY for terminal backend
39- **Monaco Editor** — code editor (VS Code's editor component)
40- **zustand** — lightweight state management
41- **chokidar** — filesystem watching
42- **simple-git** — git operations
43- **@phosphor-icons/react** — icons
44- **electron-updater** — auto-update (GitHub Releases)
45 
46## Architecture
47 
48### Process Model (Electron)
49 
50- **Main process** (`src/main/`) — window management, IPC handlers, native APIs
51- **Preload** (`src/preload/`) — secure bridge exposing IPC to renderer
52- **Renderer** (`src/renderer/`) — React app with canvas UI
53 
54IPC channels are defined in `src/shared/ipc-channels.ts`. Type definitions in `src/shared/types.ts`.
55 
56### Coordinate System & Canvas
57 
58The canvas (`Canvas.tsx`) positions nodes using CSS transforms. Panel positions are stored in **canvas-space** and converted to **view-space** via zoom level and viewport offset. Key conversions in `src/renderer/lib/canvas/coordinates.ts`: `canvasToView()` / `viewToCanvas()`. Zoom range defined by `ZOOM_MIN`/`ZOOM_MAX` in shared types.
59 
60### Canvas Interaction
61 
62`useCanvasInteraction` hook handles wheel events (Cmd+scroll = zoom, two-finger = pan) and right-click drag panning. Node drag/resize handled by `useCanvasNodeDrag` and `useNodeResize` hooks.
63 
64### Panel System
65 
66Panel definitions are centralised in `src/shared/panels.ts`. The detachable panel
67types (`PanelType` in `src/shared/types.ts`) are: terminal, browser, editor,
68canvas, agent, document, extension. Renderer components live in `src/renderer/panels/`:
69- **EditorPanel** — Monaco Editor with syntax highlighting
70- **TerminalPanel** — xterm.js terminal with WebGL renderer, backed by node-pty
71- **BrowserPanel** — embedded webview (file:// allowed for local HTML)
72- **CanvasPanel** — nested canvas
73- **DocumentPanel** — PDF / docx preview
74- **AgentPanel** — Codex agent thread (sidebar + dock)
75- **ExtensionPanel** — third-party extension panel (isolated webview served by an extension server)
76 
77The file tree (`src/renderer/sidebar/FileExplorer.tsx`) and recent-projects
78switcher (`src/renderer/sidebar/ProjectList.tsx`) are **sidebar** components, not
79detachable panels.
80 
81Each panel can be wrapped in a `CanvasNode` (`src/renderer/canvas/CanvasNode.tsx`) — title bar, drag, resize, close — or live inside a dock zone via `DockTabStack` (`src/renderer/docking/`). All panel records render through the shared `PanelHost` (`src/renderer/panels/PanelHost.tsx`); detached windows are dock windows (`src/renderer/shells/DockWindowShell.tsx`) with local panels state synced back to main for session persistence.
82 
83### State Management
84 
85Zustand stores in `src/renderer/stores/`:
86- **canvasStore** — nodes, regions, zoom, viewport offset, focus state, history; per-canvas instances created via `CanvasStoreContext`. A `focusEpoch` counter lets panels re-run focus side effects when the same node is re-focused.
87- **appStore** — workspaces, panels, selected workspace, sidebar
88- **dockStore** — dock-zone layout (per window)
89- **settingsStore** — user preferences
90- **shortcutStore** — keyboard shortcut bindings
91- **statusStore** — status bar state
92- **uiStore** — transient UI state (command palette, etc.)
93- **extensionsStore** — renderer-side mirror of the main process's extension registry (enabled-extension set)
94 
95Persisted state is stored as hand-editable JSON files under `userData` (no
96electron-store). `settingsFile.ts` owns `settings.json`; `jsonStateFile.ts` is a
97reusable factory for that same pattern — it delegates the in-memory-authority
98engine to `jsonStateStore.ts` and keeps the filesystem backend (sync load,
99debounced atomic write, chokidar external-edit watcher, corrupt-file quarantine).
100`workspaceStateStore.ts` uses it for `recent-projects.json`, `sidebar.json`,
101`remote-workspaces.json`, and `layouts.json`. Per-project canvas/session state
102lives in `<project>/.cate/workspace.json` + `session.json`. AI provider credentials are
103global in `userData/pi-agent/auth.json` (+ `models.json`), mirrored into each
104workspace's `.cate/pi-agent/`.
105 
106### Key Patterns
107 
108- **Functional React** with hooks for all logic
109- **Zustand** for global state (no Redux/Context boilerplate)
110- **Tailwind CSS** for styling
111- **IPC** for all main↔renderer communication (filesystem, git, terminal, shell)
112- Keyboard shortcuts via `useShortcuts` hook
113- File explorer is git-aware (tracks file status)
114 

Commands it names

  • npm install
  • npm run dev
  • npm run build
  • npm test

Sections

  • AGENTS.md
  • Before You Code
  • Project Overview
  • Build System
  • Release Process
  • Dependencies
  • Architecture
  • Process Model (Electron)
  • Coordinate System & Canvas
  • Canvas Interaction
  • Panel System
  • State Management
  • Key Patterns

What it covers

setupbuildtestcode-stylearchitecturedependenciesdeployment

Stack — with the evidence

typescript

(1.00)

node

(1.00)

tailwind

(1.00)

vitest

(1.00)

playwright

(1.00)

eslint

(1.00)

react

(0.70)

desktop-app

(0.70)

javascript

(0.60)

github-actions

(0.60)

Format

AGENTS.md

A plain-markdown README for coding agents, deliberately unopinionated: no frontmatter, no globs, no vendor keys. That minimalism is why it became the one file a dozen different agents will read, and why it carries the least per-file targeting power of any format here.

What the corpus says about it

Repository

Owner
0-AI-UG
Language
—
License
—
Archived
no

All configs in this repo

Also in 0-AI-UG/cate

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
0-AI-UG/cateCLAUDE.md · 2.0kCLAUDE.mdtypescriptnode+8setupbuildteststyle+384/1003 days ago
Diff against CLAUDE.md

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
aaif-goose/gooseAGENTS.md · 52kAGENTS.mdrusttypescript+2setupbuildtestlint-format+6100/1003 days ago
TryGhost/Ghoste2e/AGENTS.md · 55kAGENTS.mdtypescriptjavascript+12setupteststylearch+2100/1003 days ago
duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70AGENTS.mdtypescriptjavascript+5buildteststylearch+3100/1003 days ago
n8n-io/n8npackages/@n8n/agents/AGENTS.md · 199kAGENTS.mdtypescriptlangchain+16buildteststylearch+3100/1003 days ago
mui/material-uiAGENTS.md · 99kAGENTS.mdtypescriptjavascript+13setupbuildtestlint-format+9100/1003 days ago
SkeneTechnologies/skene-cookbookAGENTS.md · 51AGENTS.mdpythoneslint+4setupbuildtestlint-format+7100/1002 days ago
trick77/agents-md-syncAGENTS.md · 2AGENTS.mdtypescriptnode+4setupbuildteststyle+5100/1003 days ago
code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 67kAGENTS.mdtypescriptbun+10setupbuildtestlint-format+6100/1002 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack