Cognir Platform Overview
Cognir is a local-first, AI-augmented knowledge work environment designed for deep engagement with complex textual material. It provides an integrated pipeline for document ingestion, semantic concept extraction, active annotation, multi-page note composition, three-dimensional knowledge graph construction, and structured output compilation.
The platform operates entirely within the browser. No data is transmitted to external servers except direct API calls to the configured AI provider. All persistent state — documents, annotations, notes, and knowledge graphs — is stored in IndexedDB with a localStorage fallback.
Cognir is built on the principle that every idea that matters should cost you a thought. Passive storage creates an illusion of knowledge; active annotation forces cognitive compression, which is the mechanism of genuine understanding.
Core Capabilities
| Capability | Description |
|---|---|
| Document Ingestion | PDF, DOCX, TXT, and Markdown file parsing with multi-file support |
| Semantic Extraction | AI-driven concept, thesis, and argument extraction from source material |
| Active Annotation | Select any text element and attach structured thoughts with Zettelkasten integration |
| Multi-Page Editor | Rich text composition with formatting, math symbols, image insertion, and page management |
| 3D Knowledge Graph | Force-directed three-dimensional visualization of atomic ideas and their connections |
| Structured Export | Compile knowledge into paragraphs, bullets, reports, or concise formats |
| Local-First Storage | All data persists in-browser via IndexedDB; zero server-side storage |
Quickstart
This section provides a minimal path to first value. Users can be operational within two minutes of initial load.
Step 1: Configure an API Key
Cognir requires an API key from a supported AI provider to perform semantic extraction and knowledge graph synthesis. The platform ships with a shared default Groq key for immediate evaluation, but users are strongly encouraged to provision their own key for production use.
- Click the Settings button (☰) in the top-right corner of the landing page.
- Paste your API key into the input field. The system will auto-detect the provider based on key prefix.
- Click Save Key. The key is stored exclusively in your browser's IndexedDB.
Step 2: Import a Document or Start a Note
From the landing page, users have two entry points:
- Load Document — Upload a PDF, DOCX, TXT, or Markdown file. The system will extract text, perform AI-driven concept extraction, and present an annotated reader view.
- Try Cognir — Opens the multi-page note editor directly with a pre-built starter document demonstrating the annotation and graph workflow.
Step 3: Annotate and Build
Once in the reader or note editor, select any text to trigger the annotation popup. Write your reaction or analysis. After accumulating annotations, click Graph to generate the 3D knowledge map. Finally, click Compile Output to export your synthesized knowledge.
For first-time users, the platform loads a pre-built starter document called "The Cognir Method" with three pre-annotated passages and a pre-computed 3D knowledge graph. This allows immediate exploration of the full workflow without any AI API calls.
Architecture
Cognir is a single-page application delivered as a self-contained HTML file. It requires no build step, no server, and no installation. The architecture is intentionally minimal to reduce attack surface and maximize portability.
Runtime Dependencies
| Library | Version | Purpose |
|---|---|---|
| PDF.js | 3.11.174 | Client-side PDF text extraction with coordinate-aware parsing |
| Mammoth.js | 1.6.0 | DOCX to plain text conversion |
| Three.js | r128 | WebGL-based 3D knowledge graph rendering |
| Google Fonts | — | Inter (UI), Lora (prose), JetBrains Mono (code) |
Data Flow
─────────────┐ ┌──────────────┐ ┌─────────────┐ ┌──────────────┐
│ File Input │────▶│ Text Extract│────▶│ AI Extract │────▶│ Concept │
│ (PDF/DOCX/ │ │ (pdf.js / │ │ (Provider │ │ Model │
│ TXT / MD) │ │ mammoth) │ │ API call) │ │ (JSON) │
└─────────────┘ ──────────────┘ └─────────────┘ └──────────────┘
│
▼
┌─────────────┐ ┌──────────────┐ ┌─────────────┐ ┌──────────────┐
│ Export │────│ Zettelkasten│◀────│ Annotation │◀────│ Reader / │
│ (TXT) │ │ Graph (3D) │ │ System │ │ Note Editor │
└─────────────┘ └──────────────┘ └─────────────┘ └──────────────┘
Storage Architecture
All persistent data is stored in a single IndexedDB database (cognir_db) with one object store (state). The entire application state is serialized as a single JSON document keyed under cognir_v3. A localStorage fallback (cognir_v2) is maintained for compatibility.
IndexedDB: cognir_db
── Object Store: state
│ └── Key: cognir_v3
│ └── Value: {
│ theme: "dark" | "light",
│ apiKey: string,
│ spellCheck: boolean,
│ pages: Page[],
│ currentPageId: string,
│ doc: Document | null,
│ hl: Record<string, Annotation[]>,
│ ac: number,
│ version: "cognir_v3"
│ }
Core Concepts
Annotation
An annotation is a structured pairing of a selected text span (the highlight) and a user-authored thought (the note). Annotations are the atomic unit of engagement in Cognir. Each annotation carries a unique identifier, a reference to its source context, and a boolean flag controlling its inclusion in the Zettelkasten graph.
Concept
A concept is an AI-extracted thematic unit from a source document. Each concept contains a title, summary, consolidated content passage, and a list of key theses (arguments). Concepts form the navigable structure of the document reader.
Zettelkasten Node
A Zettelkasten node is an atomic idea extracted from the union of source material and user annotations. Nodes are typed (insight, concept, question, connection, tension), contain a short title (≤7 words), a 1–2 sentence synthesis, optional source highlights, and explicit connections to other nodes. The resulting graph is the platform's primary knowledge artifact.
Page
A page is an independent note document within the multi-page editor. Each page has its own title, HTML content, annotation set, and optional cached knowledge graph. Pages can be individually selected for graph synthesis via the Page Specific feature.
Graph Fingerprint
A content-derived signature computed from a page's annotations and content length. The fingerprint enables cache-based instant graph rendering: if the fingerprint matches a previously computed graph, the system skips the AI call and renders immediately.
Importing Documents
Cognir supports four document formats for ingestion. The import interface accepts single or multiple files via drag-and-drop or file browser selection.
Supported Formats
| Format | Extension | Extraction Method | Notes |
|---|---|---|---|
| PDF.js with coordinate-aware text layer parsing | Image-based PDFs return empty; encrypted PDFs are not supported | ||
| Word Document | .docx, .doc | Mammoth.js raw text extraction | Preserves textual content; formatting is discarded |
| Plain Text | .txt | Native FileReader API | UTF-8 encoding assumed |
| Markdown | .md | Native FileReader API | Markdown syntax preserved as plain text |
Multi-File Processing
When multiple files are uploaded, Cognir processes each sequentially with progress indication, then concatenates the extracted texts with file-name delimiters (=== filename ===) before performing unified concept extraction. This enables cross-document analysis.
PDFs that are image-based (scanned documents without embedded text layers) will return an empty extraction result. The system will display an error: "No text extracted from PDF. The file may be image-based or encrypted."
Text Extraction Pipeline
The extraction pipeline is format-specific and operates entirely in the browser's main thread. For PDFs, the system performs coordinate-aware text reconstruction to preserve reading order.
PDF Extraction Algorithm
- The PDF binary is loaded into an
ArrayBufferand parsed by PDF.js. - For each page, the text content layer is retrieved with whitespace normalization enabled.
- Text items are grouped by their vertical position (Y-coordinate, rounded to 0.1pt precision).
- Rows are sorted top-to-bottom; items within each row are sorted left-to-right by X-coordinate.
- Items are concatenated with single-space delimiters to reconstruct lines.
- Pages are separated by double newlines.
// Coordinate-aware reconstruction
const rows = {};
tc.items.forEach(it => {
const y = Math.round(it.transform[5] * 10) / 10;
if (!rows[y]) rows[y] = [];
rows[y].push({ x: it.transform[4], str: it.str });
});
// Sort: top-to-bottom, then left-to-right
Object.keys(rows).map(Number).sort((a,b) => b-a).forEach(y => {
const line = rows[y].sort((a,b) => a.x-b.x)
.map(it => it.str).join(' ').trim();
if (line) out += line + '\n';
});
AI Concept Extraction
After text extraction, the system performs AI-driven semantic analysis to identify conceptual themes, arguments, and structural elements. The extraction strategy adapts to document length.
Single-Chunk Extraction
Documents under 8,000 characters are processed in a single AI call. The system prompt instructs the model to extract all conceptual themes while preserving original wording, returning a structured JSON object containing title, overview, and an array of concepts with titles, summaries, content, and theses.
Multi-Chunk Extraction
Documents exceeding 8,000 characters are split into chunks of 8,000 characters with a 500-character overlap window. A maximum of 6 chunks are processed. Each chunk is analyzed independently, then the resulting concept lists are merged via a secondary AI call that deduplicates, consolidates, and synthesizes across sections.
| Parameter | Value | Rationale |
|---|---|---|
| Chunk size | 8,000 chars | Balances context window utilization with extraction granularity |
| Overlap | 500 chars | Prevents concept fragmentation at chunk boundaries |
| Max chunks | 6 | Controls total API call count and processing time |
| Inter-call delay | 2,800 ms | Respects rate limits on free-tier API keys |
| Max tokens (extraction) | 2,400 | Sufficient for structured JSON output |
| Max tokens (merge) | 3,000 | Accommodates consolidated concept lists |
Retry and Backoff Strategy
The AI call layer implements exponential backoff with jitter for rate-limit and network errors:
- Rate limit errors: Base delay 8,000ms, multiplied by 2.2^attempt, capped at 38,000ms
- Network errors: Base delay 4,000ms, same multiplier and cap
- Maximum retries: 3 attempts per call
- Progress feedback: Users see countdown timers and attempt numbers during backoff periods
Reader & Annotation Interface
The reader presents extracted concepts in a three-column layout: concept navigation sidebar, main content area, and annotation panel.
Layout Structure
| Region | Width | Function |
|---|---|---|
| Concept Sidebar | 240px | Numbered concept list with active-state highlighting |
| Main Content | Flexible (max 680px) | Document title, overview, concept title, summary, theses, and full content |
| Annotation Panel | 300px | Displays annotations for the current concept with quote and note |
Annotation Interaction
Text selection anywhere in the main content area (title, overview, summary, theses, or body) triggers an annotation popup positioned above the selection. The popup displays the selected text as a truncated quote and provides a text input for the user's thought.
- Enter — Saves the annotation
- Escape — Cancels without saving
- Cancel button — Dismisses the popup
Saved annotations are highlighted in the source text with a subtle background and border. Hovering a highlight cross-highlights the corresponding annotation card, and vice versa. Clicking a highlight scrolls the annotation panel to the matching card.
Annotation Deletion
Each annotation card includes a delete button (×). Deletion is immediate and irreversible within the session; the annotation is removed from the highlight map and the view re-renders.
Multi-Page Note Editor
The note editor is a rich text composition environment supporting multiple independent pages, each with its own annotation set and optional cached knowledge graph. It is the primary workspace for original thought composition.
Editor Architecture
The editor uses a contenteditable div with the Lora serif typeface for prose composition. Content is stored as HTML, enabling rich formatting persistence. All edits are auto-saved to IndexedDB on every input event.
| Component | Specification |
|---|---|
| Typeface | Lora, Georgia, Times New Roman (serif stack) |
| Base size | 16px |
| Line height | 1.85 |
| Max width | 720px (centered) |
| Content storage | HTML (innerHTML) |
| Auto-save | On every input event, debounced to storage write |
| Spell check | Configurable via Settings; defaults to enabled |
Multi-Page System
Each note document can contain multiple pages, accessible via a collapsible left sidebar. Pages are independent units with separate titles, content, annotations, and graph caches.
Page Operations
| Operation | Mechanism |
|---|---|
| Create | Click "+ New Page" at the bottom of the pages sidebar |
| Switch | Click any page item in the sidebar; current content is auto-saved before switching |
| Delete | Click the × button on a page item; requires confirmation; last page cannot be deleted |
| Rename | Edit the title input at the top of the editor; changes persist immediately |
| Search | Type in the search field above the page list to filter by title |
| Toggle panel | Click the ☰ button in the toolbar to show/hide the pages sidebar |
Page Data Model
{
id: string, // 'p' + timestamp(36) + random(36)
title: string, // User-editable; defaults to 'Untitled Note'
html: string, // Editor innerHTML
annotations: Annotation[],
created: number, // Date.now() at creation
updated: number, // Date.now() at last edit
graph: ZettelGraph | null, // Cached knowledge graph
graphFp: string | null // Content fingerprint for cache validation
}
Rich Formatting Toolbar
The formatting toolbar provides grouped controls for text styling, structural elements, list management, and special insertions.
Style Group
| Control | Command | Shortcut |
|---|---|---|
| B | bold | Ctrl/Cmd + B |
| I | italic | Ctrl/Cmd + I |
| U | underline | Ctrl/Cmd + U |
Heading Group
| Control | Command | Output |
|---|---|---|
| H1 | formatBlock → h2 | <h2> element (visual H1) |
| H2 | formatBlock → h3 | <h3> element (visual H2) |
| ¶ | formatBlock → div | Standard paragraph block |
List Group
| Control | Command |
|---|---|
| • | insertUnorderedList |
| 1. | insertOrderedList |
| → | indent |
| ← | outdent |
Insert Group
| Control | Function |
|---|---|
| ∑ | Opens math symbol palette (47 symbols) |
| ↑ txt | Import a .txt file as a new page |
| ↓ txt | Export current page as a .txt file |
Math Symbol Palette
The math palette provides 47 symbols organized in an 8-column grid, including summation (∑), integral (∫), partial derivative (∂), infinity (∞), Greek letters (α, β, γ, δ, θ, λ, μ, σ, ω, φ, ψ), set theory operators (∈, ∉, ∩, ∪, ⊂, ⊃), logic symbols (∀, ∃, ¬, ∧, ∨), number sets (ℝ, ℤ, ℕ, ℚ, ℂ), and miscellaneous operators. Symbols are inserted at the current cursor position.
Paste Behavior
All pasted content is stripped of formatting. Images are the sole exception — image data from the clipboard passes through natively. Text is inserted as plain text via execCommand('insertText'), ensuring no external fonts, colors, or styles contaminate the document.
Image Width Cycling
Clicking an image in the editor cycles its width through three states: 100% → 60% → 30% → 100%. A brief selection border confirms the change.
Annotation Mode Toggle
The editor features a toggle switch in the toolbar that controls whether text selection triggers the annotation popup.
| State | Label | Behavior |
|---|---|---|
| On (default) | Annotate | Selecting text opens the annotation popup. Enter saves, Escape cancels. |
| Off | Select | Text selection behaves normally — no popup. Users can copy text without interruption. |
The toggle state is session-scoped and resets to Annotate on each editor load. A toast notification confirms each state change.
Reading Mode (Zen Mode)
Reading Mode provides a distraction-free writing environment by hiding all auxiliary UI elements.
What Reading Mode Hides
- Formatting toolbar
- Pages sidebar
- Annotation panel (right column)
- Top bar mid-section label
What Reading Mode Shows
- Top navigation bar (with Reading toggle button)
- Editor content area (centered, max 720px, with 80px vertical padding)
- Bottom info bar (reduced opacity, reveals on hover)
Reading Mode is toggled via the Reading button in the top navigation bar. The button shows an active state when the mode is engaged.
Zettelkasten Knowledge Graph
The Zettelkasten system transforms annotations and source material into a structured graph of atomic ideas. The graph is the platform's primary knowledge artifact — a navigable, three-dimensional map of connected thinking.
Graph Construction Pipeline
- Input aggregation: The system collects all annotations marked for Zettelkasten inclusion, plus the full note body or document context (up to 5,500 characters).
- AI synthesis: A structured prompt instructs the AI to extract 14–30 nodes (depending on input richness), each typed and connected to 2–5 other nodes.
- Cache validation: For note-based graphs, a content fingerprint is computed. If the fingerprint matches a cached graph, the AI call is skipped and the cached graph renders instantly.
- 3D layout: Nodes are positioned via a force-directed algorithm (140 iterations of repulsion + attraction), then rendered in WebGL.
Node Count Heuristics
| Condition | Minimum Nodes | Maximum Nodes |
|---|---|---|
| With source context (>80 chars) | 22 | 30 |
| Annotations only | max(14, annotations × 2 + 6) | 28 |
| Integration mode (existing graph) | Existing count | 30 |
Type Distribution Targets
| Type | Target % | Purpose |
|---|---|---|
| Insight | 35% | Non-obvious conclusions and synthesized observations |
| Concept | 25% | Named ideas, frameworks, and definitional units |
| Question | 15% | Open problems and unresolved tensions |
| Connection | 15% | Bridging ideas that link disparate concepts |
| Tension | 10% | Contradictions, trade-offs, and structural conflicts |
3D Graph Visualization
The knowledge graph is rendered as an interactive three-dimensional scene using Three.js. Nodes are represented as colored spheres with glow effects; edges are rendered as lines with particle streams indicating connection flow.
Rendering Specifications
| Element | Specification |
|---|---|
| Node geometry | SphereGeometry(1, 20, 14) |
| Glow geometry | SphereGeometry(1, 8, 6) with additive blending |
| Base node size | 0.14 + 0.15 × (degree / maxDegree) |
| Selected node scale | 2.5× base size |
| Connected node scale | 0.92× base size |
| Dimmed node scale | 0.7× base size |
| Edge particle count | 2–3 per edge, random |
| Particle speed | 0.0022–0.0052 per frame |
| Auto-rotation | 0.00088 rad/frame when idle |
| Camera FOV | 55° |
| Camera distance | 13 (≤5 nodes), 20 (≤13 nodes), 27 (>13 nodes) |
| Starfield (dark mode) | 700 particles at 0.06 size + 220 at 0.16 size |
Force-Directed Layout
Nodes are initialized on a Fibonacci sphere distribution, then refined through 140 iterations of force simulation:
- Repulsion: All node pairs repel with force proportional to 1/d², scaled by cooling factor
- Attraction: Connected nodes attract with spring force (rest length 3.8 units)
- Damping: Velocity multiplied by 0.52 each iteration
- Cooling: Force magnitude scales by (1 - iteration/140)
Node Type Color System
Each node type is assigned a distinct color that is consistent across nodes, edges, glow effects, labels, and filter buttons.
| Type | Dark Mode | Light Mode | Edge Color (Dark) |
|---|---|---|---|
| Insight | #c8d4ff | #2244aa | #1a2355 |
| Concept | #88aaff | #1133cc | #101f44 |
| Question | #ffcc55 | #996600 | #332200 |
| Connection | #55ddaa | #117755 | #0a2a1a |
| Tension | #ff7744 | #cc3300 | #2a0a00 |
Node size is proportional to degree (total connections, both outgoing and incoming). Higher-degree nodes appear larger and more prominent in the visualization.
Filters & Navigation
Type Filters
A filter bar at the top of the graph view allows users to isolate nodes by type. The All filter is active by default. Selecting a specific type dims all non-matching nodes and their edges.
| Filter | Effect |
|---|---|
| All | Shows all nodes and edges at full opacity |
| Insight | Shows only insight nodes; dims all others |
| Concept | Shows only concept nodes |
| Question | Shows only question nodes |
| Connection | Shows only connection nodes |
| Tension | Shows only tension nodes |
Camera Controls
| Interaction | Effect |
|---|---|
| Click + drag | Rotates the entire graph around its center |
| Scroll wheel | Zooms in/out (range: 5–65 units) |
| Idle | Auto-rotates at 0.00088 rad/frame |
| Click node | Selects node; highlights connections; opens detail panel |
| Click empty space | Deselects current node |
Node Selection Behavior
When a node is selected:
- The selected node scales to 2.5× and turns white (dark mode) or black (light mode)
- Directly connected nodes scale to 0.92× and retain their type color
- All other nodes scale to 0.7× and dim to a neutral gray
- Edges between the selected node and its connections become fully opaque
- All other edges dim to 8% opacity
- The detail panel slides in from the right showing title, type, content, source highlights, and connections
Editing Nodes
The detail panel includes an inline editor for modifying node properties without regenerating the entire graph.
Editable Fields
| Field | Type | Constraint |
|---|---|---|
| Title | Text input | Free text; recommended ≤7 words |
| Content | Textarea | Free text; recommended 1–2 sentences |
| Connections | List + selector | Add or remove connections to other nodes |
Connection Management
- Add connection: Select a target node from the dropdown and click Add. The connection is added bidirectionally in the data model, and the 3D graph re-renders to show the new edge.
- Remove connection: Click the × button next to any connection in the list. The edge is removed and the graph re-renders.
Changes are saved to the in-memory graph object and persisted to IndexedDB. The 3D visualization updates immediately after each save.
Compilation & Export
The export module transforms the Zettelkasten graph into structured prose via AI synthesis. Users select a format, and the system generates a compiled document that can be edited, copied, or downloaded.
Export Pipeline
- User selects an export format from the four available options.
- The full Zettelkasten JSON (nodes, synthesis, open questions) is sent to the AI with a format-specific style prompt.
- The AI returns compiled text, which is displayed in an editable textarea.
- User can edit the output directly, then copy to clipboard or download as a .txt file.
Export Formats
| Format | Style Prompt | Use Case |
|---|---|---|
| Paragraphs | Flowing, well-structured prose paragraphs. No headers, no bullets. Clear and intellectual. | Essays, articles, narrative synthesis |
| Bullet Points | Clean bullet points by theme. Sub-bullets where helpful. Precise language. | Presentations, briefings, scannable summaries |
| Report | Formal report with titled sections, an introduction, and a conclusion. | Formal documentation, deliverables, white papers |
| Concise | Maximum compression. Every word earns its place. Short sentences. No filler. | Executive summaries, quick references |
The compiled output is entirely yours. Edit it freely in the textarea before exporting. The AI generates a first draft; you refine it into its final form.
API Key Management
Cognir requires an API key from a supported AI provider for all AI-driven operations: concept extraction, knowledge graph synthesis, and export compilation. Keys are stored exclusively in the browser and are never transmitted to any party except the configured AI provider.
Key Detection
The system auto-detects the provider based on key prefix:
| Prefix | Provider | Model | Tier |
|---|---|---|---|
gsk_ | Groq | Llama 3.3 70B | Free |
sk-ant- | Anthropic | Claude Sonnet 4 | Paid |
sk- | OpenAI | GPT-4o Mini | Paid |
AIzaSy | Gemini | 2.0 Flash | Free tier |
Keys that do not match any known prefix are flagged as Unrecognised and cannot be saved.
Key Storage
API keys are stored in IndexedDB as part of the application state JSON. The key is accessible only within the browser session and is sent directly to the provider's API endpoint via fetch requests. No intermediary server processes or logs the key.
AI Provider Configuration
Provider Endpoints
| Provider | Endpoint | Auth Header |
|---|---|---|
| Groq | https://api.groq.com/openai/v1/chat/completions | Authorization: Bearer {key} |
| OpenAI | https://api.openai.com/v1/chat/completions | Authorization: Bearer {key} |
| Anthropic | https://api.anthropic.com/v1/messages | x-api-key: {key} + anthropic-version: 2023-06-01 |
| Gemini | https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key={key} | Key in URL query parameter |
Provider Recommendations
| Provider | Recommendation | Rationale |
|---|---|---|
| Groq | ⭐ Recommended for most users | Free tier, fast inference, sufficient quality for extraction and graph synthesis |
| Anthropic | Best quality | Claude Sonnet 4 produces the most nuanced concept extraction and graph synthesis |
| OpenAI | Reliable alternative | GPT-4o Mini offers consistent performance with moderate cost |
| Gemini | Experimental | Free tier available but output quality and reliability vary |
Data Storage Architecture
Primary Storage: IndexedDB
All application state is persisted in an IndexedDB database named cognir_db (version 1). The database contains a single object store (state) with one record keyed as cognir_v3. This record holds the complete serialized application state as a JSON string.
Fallback Storage: localStorage
A secondary copy of the state is maintained in localStorage under the key cognir_v2. This serves as a compatibility fallback in environments where IndexedDB is unavailable or restricted.
Save Triggers
The system writes to storage on every meaningful state change:
- Editor content changes (on every input event)
- Annotation creation or deletion
- Page creation, deletion, or title change
- API key save
- Theme change
- Spell check toggle
- Graph cache update
Load Sequence
- Attempt to read from IndexedDB.
- If IndexedDB fails or returns null, fall back to localStorage.
- If both fail, initialize with default state (empty pages, default API key).
- On first visit (no pages and no document), inject the starter document.
Themes & Preferences
Theme System
Cognir supports two themes controlled by CSS custom properties on the <body> element:
| Theme | Body Class | Background | Text |
|---|---|---|---|
| Dark | dark | #0a0a0a | #ececec |
| Light | light | #f7f7f5 | #1a1a1a |
Theme preference is persisted in storage and applied on application load. The 3D graph renderer also adapts its color palette, starfield, and background color to the active theme.
Spell Check
Spell check is controlled via a toggle in Settings. When enabled, the spellcheck attribute is set to true on the editor element. The preference persists across sessions.
Backup & Import
Export All Data
The Settings panel provides an Export All Data (JSON) button that serializes the complete application state (theme, API key, spell check preference, all pages, current document, highlights, and version identifier) into a JSON file with a timestamped filename (cognir_backup_YYYY-MM-DD.json).
Import Data
The Import Data (JSON) button opens a file picker accepting .json files. The system validates that the file contains a version field starting with cognir. Upon confirmation, the imported data replaces all current state. The application re-renders immediately after import.
Importing a backup file replaces ALL current data. This action cannot be undone. Ensure you have exported a backup of your current state before importing.
Keyboard Shortcuts
Editor Shortcuts
| Shortcut | Action |
|---|---|
Ctrl/Cmd + B | Bold selected text |
Ctrl/Cmd + I | Italicize selected text |
Ctrl/Cmd + U | Underline selected text |
Escape | Close math palette |
Annotation Popup Shortcuts
| Shortcut | Action |
|---|---|
Enter | Save annotation |
Escape | Cancel annotation |
General Navigation
| Interaction | Action |
|---|---|
| Click concept in sidebar | Navigate to concept in reader |
| Click annotation highlight | Scroll to corresponding annotation card |
| Click node in 3D graph | Open node detail panel |
| Scroll in 3D graph | Zoom in/out |
| Drag in 3D graph | Rotate view |
Troubleshooting
Rate Limit Errors
Symptom: Error message mentioning rate limits, 429 status, or quota exhaustion.
Cause: The shared default Groq key has limited capacity. During periods of high concurrent usage, the key may hit rate limits.
Resolution: Provision your own free Groq API key at console.groq.com. This provides dedicated capacity and eliminates shared-key contention.
Network Errors
Symptom: "Failed to fetch" or network timeout errors.
Cause: Intermittent connectivity issues or provider-side outages.
Resolution: Verify internet connectivity. The system implements automatic exponential backoff with up to 3 retries. If the issue persists, try switching providers.
Malformed JSON Response
Symptom: "AI returned malformed JSON" error.
Cause: The AI provider returned a response that could not be parsed as valid JSON, possibly due to model hallucination or output truncation.
Resolution: Retry the operation. The system includes robust JSON parsing with markdown fence stripping and object extraction. If the error persists consistently, consider switching to a higher-quality provider (Anthropic or OpenAI).
Empty PDF Extraction
Symptom: "No text extracted from PDF" error.
Cause: The PDF is image-based (scanned document) or encrypted.
Resolution: Convert the PDF to a text-based format using OCR software before importing, or use the note editor to manually transcribe key passages.
Graph Not Updating
Symptom: Clicking "Graph" shows the cached version despite new content.
Cause: The content fingerprint has not changed (no new annotations or content length change).
Resolution: Add new annotations or modify the note content. The fingerprint is computed from annotation IDs, notes, and content length. Any meaningful change will trigger a fresh AI synthesis.
Glossary
| Term | Definition |
|---|---|
| Annotation | A structured pairing of a selected text span and a user-authored thought, with optional Zettelkasten inclusion flag. |
| Concept | An AI-extracted thematic unit from source material, containing title, summary, content, and theses. |
| Zettelkasten | A knowledge management method based on atomic, interconnected notes. Cognir implements this as a 3D graph of typed nodes. |
| Node | An atomic idea in the knowledge graph, typed as insight, concept, question, connection, or tension. |
| Edge | A connection between two nodes in the knowledge graph, representing a conceptual relationship. |
| Graph Fingerprint | A content-derived signature used to validate cached knowledge graphs. Computed from annotation IDs, notes, and content length. |
| Force-Directed Layout | A graph layout algorithm that positions nodes using simulated physical forces (repulsion between all nodes, attraction along edges). |
| Chunk | A segment of a large document processed independently for concept extraction, with overlap to prevent boundary fragmentation. |
| Page | An independent note document within the multi-page editor, with its own content, annotations, and graph cache. |
| Reading Mode | A distraction-free view that hides toolbars, sidebars, and panels, showing only the editor content. |
| Arquantian System | The design philosophy underlying Cognir: built for depth of thought over speed of consumption. |