ZettelFlow for Obsidian

repository·main·Indexed 41 days ago

https://github.com/rafaelgb/obsidian-zettelflow

A Zettelkasten toolkit and cognitive engine for Obsidian that transforms Canvas workflows into guided note-creation wizards. It manages the knowledge lifecycle (fleeting to evergreen), provides semantic graph querying via predicates, and monitors slip-box health. ZettelFlow features a scriptable Knowledge API, human-in-the-loop AI integration, and a system of roles and conditional edges to automate knowledge transformation processes.

Tokens
97.9K
Snippets
158
Records
500
Agent score
51%

What's inside ZettelFlow

  1. Overview of ZettelFlow

    main

    ZettelFlow is a Zettelkasten toolkit for Obsidian designed to manage the processes of knowledge transformation rather than just managing notes. It treats Obsidian as the storage layer and acts as a cognitive engine to evolve knowledge through four main pillars:

    • Knowledge Lifecycle: Tracks the state of ideas (e.g., fleeting → permanent → evergreen) and proposes the next logical step in the lifecycle.
    • Semantic Knowledge Graph: Enables reasoning-based queries, such as finding ideas that contradict a specific note.
    • Knowledge Discovery: Surfaces unexpected connections, ideas to challenge, or hidden structures within your notes.
    • Knowledge Health: Measures the maturity and richness of your knowledge (e.g., knowledge debt, maturity, or idea heatmaps) rather than just note volume.

    Key Principle: AI is treated as a tool for suggestion, not an autonomous agent. When AI is enabled, it proposes actions that you must manually accept, edit, or reject, ensuring you maintain control over your work.

  2. Explore the ZettelFlow Zettelkasten toolkit

    main

    ZettelFlow is a comprehensive Zettelkasten workflow toolkit for Obsidian that goes beyond simple note templating. It provides tools for capturing, cultivating, and managing a slip-box through several specialized surfaces and actions. Key capabilities include:

    • Quick Capture: A single-keystroke command to write fleeting notes directly to your Inbox.
    • Cultivate: A guided thinking session to evolve ideas through connection, challenging, and lifecycle advancement.
    • Ask your graph: A deterministic query surface to find notes using predicates like state:permanent, relation:contradicts, degree>=5, orphan, unsourced, or older-than:30.
    • Slip-box Health: Monitoring connectivity, knowledge debt (0–100 score), and identifying orphans or dead-ends.
    • Note Lifecycle Management: Moving notes through states (🌱 fleeting → 📝 literature → 💡 permanent → 🔬 developing → 📚 evergreen → 🪦 archived) using the Change note state command.
    • Relationship & Research Actions: Tools to create semantic relation (e.g., supports, contradicts), extract claims, and find sources.
    • Visual Workflows: Using a visual language (WHEN / IF / ACTION / WAIT) on the canvas to create reactive, human-in-the-loop flows.
  3. Understand the ZettelFlow settings organization

    main

    ZettelFlow settings are organized by functional activity rather than feature chronology. The settings panel is divided into eight primary groups. Understanding these groups helps you locate specific configurations for your workflow:

    1. Your flows: Manages canvases with roles, the gallery, and bound triggers.
    2. Creating notes: Controls drafts, builder friction, density, color by phase, target folders, and title prefixes.
    3. Your vault's vocabulary: Manages excluded folders, lifecycle properties, and inline relations.
    4. Thinking: Configures cultivate, judgement, patterns, the journal, and the timeline.
    5. AI: Contains all AI-related settings (off by default).
    6. Automation: Manages property hooks.
    7. Advanced: Contains internal file locations, script type declarations, and logging (folded by default).
    8. About: Displays version, documentation, and support information.

    Additionally, a status line at the top of the panel provides real-time derived facts about your current state (e.g., active canvas, AI provider, thinking friction status, property hook count, and current log level).

  4. Understand ZettelFlow's privacy and data access model

    main

    ZettelFlow is designed with a privacy-first approach, collecting no telemetry and transmitting no personal data or vault contents. Most capabilities are opt-in or strictly local.

    Key privacy behaviors:

    • No Telemetry: No analytics, crash reporting, or phone-home mechanisms.
    • Local Storage: Sensitive data like inquiry checkpoints, note-builder drafts, and the thinking-heatmap journal are stored locally in the plugin's data.json and are never transmitted.
    • AI Privacy: AI actions are off by default. When enabled, note content is sent only to the HTTPS OpenAI-compatible endpoint you configure. AI completions are treated as 'proposals' that require your explicit acceptance before being written to a note.
    • Clipboard: The plugin only performs writes to the clipboard (e.g., via 'copy' buttons for JSON configurations); it never reads from your clipboard.
    • Diagnostics: Error logs for indexing are content-free, recording only fixed failure categories (e.g., TypeError) and never note paths or bodies.
  5. Technical stack and build system for ZettelFlow

    main

    ZettelFlow is an Obsidian plugin built with the following stack:

    • Language/Build: TypeScript (target es2018) bundled with esbuild. SCSS is compiled via esbuild-sass-plugin.
    • UI: React 19 mounted into Obsidian via createRoot/unmount.
    • State Management: Zustand 5 is used specifically for the note-builder wizard (useNoteBuilderStore). Other parts of the plugin use singleton instances via getInstance().
    • Canvas Integration: Uses a monkey-around approach to patch Obsidian's internal Canvas view for custom workspace events.
    • Editors: CodeMirror 6 powers the .js script editor and the {{frontmatter}} live-preview extension.
    • Data Handling: tiny-jsonc and json-stable-stringify ensure deterministic canvas serialization and lenient JSONC repair.
  6. Understand the ZettelFlow Home dashboard features

    main

    The Home dashboard displays several dynamic widgets derived from your vault model:

    • Greeting & Thinking Streak: Shows how many distinct days you have developed ideas, based on your development journal.
    • 3D-graph teaser: A shortcut to the Graph surface → 3D mode.
    • Growth nudge: Displays the number of state: fleeting notes ready for development. Clicking it jumps to the latest capture.
    • New ideas: A list of notes created within the last 7 days.
    • Main concepts: Your most well-connected notes, sorted by degree in descending order.
    • Deserves a review: Hubs (notes with degree ≥ 5) that have not been touched for 30+ days.
    • Suggested connections: Unlinked notes that share context (based on morning discoveries).
    • Pinned queries: Live cards for any Ask your graph queries you have pinned. Shows how many notes match the query; clicking it reopens the query interface.
    • What to do next: The top ~5 KnowledgeRecommendations by priority (e.g., resolve a contradiction, add a source, connect this idea). Clicking a note row navigates to that note. If no actions are available, it displays "you're all caught up."

    Note: Home is a read-only surface. It writes nothing and operates fully offline.

  7. Explore ZettelFlow features and capabilities

    main

    ZettelFlow is a Zettelkasten toolkit for Obsidian that uses Obsidian's native Canvas as a workflow engine. It focuses on 'knowledge with purpose' through guided thinking sessions, offline graph analysis, and human-in-the-loop automation.

    Core Capabilities

    • Canvas-based flows: Use Obsidian Canvas to build workflows without learning a custom DSL.
    • Knowledge Patterns: Templates that run automated actions (e.g., finding contradictions, suggesting links) upon note creation.
    • Scriptable Knowledge API: Access the zf.knowledge and zf.ai.propose() APIs via JavaScript to build custom logic.
    • Built-in Actions: Over 30 actions covering Prompt, Checkbox, Tags, Backlinks, and specialized Knowledge, Relation, Research, and AI actions.
    • Workflow Control: Supports conditional edges (branching logic), step-based exits, and 'roles' (defining if a canvas creates notes, edits the open note, or runs on events).
    • Health & Insights: Tools like ZettelFlow Home, Slip-box health, and Agency review provide read-only, offline insights into your knowledge debt, connectivity, and decision-making patterns.
  8. Identify and use ZettelFlow entry points

    main

    Users can interact with ZettelFlow through three primary surfaces:

    1. Ribbon: A single all-in-one "Open ZettelFlow" button. Its menu provides access to Create note (which can also be bound to a hotkey via the open-workflow command) and various view surfaces.
    2. Sidebar Views: Accessed via the ribbon menu or specific show-* commands. These views open as standard tabs in the main area.
    3. Commands: Approximately 23 commands are available, including show-<view-name> for navigating to specific surfaces and various action commands.
  9. Understand ZettelFlow Community Resource Types

    main

    ZettelFlow community resources are categorized into five types:

    • Systems (Recommended): One-click .zftemplate bundles that install a full methodology (canvas + steps) into a specific folder. They include advanced features like maturity scoring and graph-based link suggestions.
    • Steps: Individual components representing a single action or decision point, intended to be added to existing workflows.
    • Actions: Specific functions within a step (e.g., adding a date, selecting options, or running scripts).
    • Markdown: Reusable text templates for note content.
    • Flows (Legacy): Complete workflows installed via clipboard copy-and-paste onto a canvas.
  10. How maturity scores are calculated

    main

    Maturity is calculated using a weighted formula where weights sum to 100. The final result is rounded and clamped to the range [0, 100].

    Formula: maturity = state·40 + connectivity·30 + sources·15 + recency·15

    Factor Details (each factor is 0..1):

    FactorComputation Logic
    stateBased on lifecycle state: fleeting (0.0), literature (0.3), developing (0.5), permanent (0.8), evergreen (1.0), or archived (0.6).
    connectivitymin(degree, 10) / 10 — based on in+out links.
    sources1 if the note cites any source, else 0.
    recencymin(ageDays, 180) / 180 — older, seasoned notes score higher.

    Note: If the index is not ready or the note is not indexed, the action safely no-ops.

    maturity = state·40 + connectivity·30 + sources·15 + recency·15
  11. How the state transition machine works

    main

    Transitions between states are governed by a strict state machine. You can only move between states that are explicitly allowed. Any attempt to skip ahead, demote a note arbitrarily, or perform a self-transition that isn't defined will be rejected.

    Valid Transitions:

    • fleeting → literature (promote)
    • fleeting → permanent (direct promote)
    • literature → permanent (promote)
    • permanent → developing (develop)
    • developing → evergreen (consolidate)
    • evergreen → developing (rework)
    • Archiving: Any state (except archived) can transition to archived.
    • Reviving: archived can transition back to fleeting.
  12. Understand the Action Lifecycle

    main

    Actions move through several distinct phases during the note creation process:

    PhaseMemberPurpose
    Registration / Step Editorid, defaultActionStores the key and the config template cloned by getDefaultActionInfo
    Design Time (Step Editor)settings(...)Renders the config UI that mutates the action object
    Design TimesettingsReader(...)Provides a read-only preview of the configuration
    Build Time (Wizard)component(props)The React UI the user interacts with; calls props.callback(value)
    Buildexecute(info)Writes the action's contribution into ContentDTO or context
    After File WritepostProcess(info, file)Executes side effects needing the real TFile (e.g., backlinks)
    Menus / DocsgetIcon(), getLabel(), link, purposePresentation elements