Skip to content

Commit bbe9ed9

Browse files
committed
docs: distribute AGENTS.md into per-module knowledge files
1 parent 6a055da commit bbe9ed9

9 files changed

Lines changed: 920 additions & 656 deletions

File tree

AGENTS.md

Lines changed: 65 additions & 656 deletions
Large diffs are not rendered by default.

src/controllers/AGENTS.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Controllers
2+
3+
Controllers are QObject-based business logic mediators that sit between models, views, and services. They translate user actions into service calls and service results into UI feedback, orchestrating operations without containing any UI logic themselves.
4+
5+
## MVC Rules for Controllers
6+
7+
See [MVC Rules](../../AGENTS.md#mvc-rules-must-follow) — Key rule for controllers: **Controllers MUST NOT inherit from QWidget** (testable without GUI).
8+
9+
See [MVC Example](../../AGENTS.md#mvc-example-notebook-node-operations) for the Controller → View → Model flow.
10+
11+
## Controller Inventory
12+
13+
| Controller | Purpose |
14+
|------------|---------|
15+
| `NotebookNodeController` | Node CRUD operations (new/delete/rename/move) |
16+
| `NewNoteController` | New note creation flow |
17+
| `NewFolderController` | New folder creation flow |
18+
| `NewNotebookController` | New notebook creation flow |
19+
| `OpenNotebookController` | Open existing notebook flow |
20+
| `ManageNotebooksController` | Notebook management operations |
21+
| `ImportFolderController` | Folder import flow |
22+
| `RecycleBinController` | Recycle bin operations |
23+
| `ViewAreaController` | View area orchestration (open/close/split/move buffers) |
24+
| `SearchController` | Search operations |
25+
| `SnippetController` | Snippet management |
26+
| `TagController` | Tag operations |
27+
| `OutlineController` | Document outline |
28+
| `AttachmentController` | Attachment management |
29+
| `MarkdownEditorController` | Markdown editing logic |
30+
| `MarkdownViewWindowController` | Markdown view window logic |
31+
| `TextViewWindowController` | Plain text editing |
32+
| `PdfViewWindowController` | PDF viewing |
33+
| `MindMapViewWindowController` | Mind map viewing |
34+
35+
## Related Modules
36+
37+
- [`../core/AGENTS.md`](../core/AGENTS.md) — ServiceLocator and services used by controllers
38+
- [`../models/AGENTS.md`](../models/AGENTS.md) — Models manipulated by controllers
39+
- [`../views/AGENTS.md`](../views/AGENTS.md) — Views that signal controllers
40+
- [`../widgets/AGENTS.md`](../widgets/AGENTS.md) — Widgets containing MVC wiring
41+
- [`../../AGENTS.md`](../../AGENTS.md) — Full MVC rules, architecture overview, hook system

0 commit comments

Comments
 (0)