NotesServer (fnord v0.8.13)

View Source

Summary

Functions

Uses an AI model to answer a question about the existing research notes. The question should be a concise request for information about the project, such as "What is the purpose of this project?" or "What languages and technologies are used in this project?". The AI model will analyze the existing notes and return a concise answer.

Returns a specification to start this module under a supervisor.

Commits the new notes that have been collected over the course of the current session to persistent storage. This saves any newly extracted facts and user insights that have not yet been consolidated into the main research notes.

Consolidates all newly extracted facts and user insights into the existing research notes. This uses an AI model to reorganize and consolidate the notes according to specified guidelines. The consolidated notes are saved to persistent storage.

Uses an AI model to analyze the result of a tool call and extract facts about the project. The facts are stored in the server's state and can be consolidated later.

Uses an AI model to analyze the user's message and extract insights about their coding preferences, learning style, personality, and other relevant traits. The insights are stored in the server's state and can be consolidated later.

Callback implementation for GenServer.init/1.

Load existing research notes from persistent storage. The project must be set from the --project command line option or CWD.

Functions

ask(question)

@spec ask(binary()) :: binary()

Uses an AI model to answer a question about the existing research notes. The question should be a concise request for information about the project, such as "What is the purpose of this project?" or "What languages and technologies are used in this project?". The AI model will analyze the existing notes and return a concise answer.

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

commit()

@spec commit() :: :ok | {:error, any()}

Commits the new notes that have been collected over the course of the current session to persistent storage. This saves any newly extracted facts and user insights that have not yet been consolidated into the main research notes.

The new notes are added to a special section at the end of the existing research notes, labeled # NEW NOTES (unconsolidated). This section is meant to be consolidated later by the consolidate/0 function.

consolidate()

@spec consolidate() :: :ok

Consolidates all newly extracted facts and user insights into the existing research notes. This uses an AI model to reorganize and consolidate the notes according to specified guidelines. The consolidated notes are saved to persistent storage.

Currently, consolidation generally happens at the beginning of a new research session (from AI.Agent.Coordinator).

ingest_research(func, args_json, result)

@spec ingest_research(binary(), binary(), any()) :: :ok

Uses an AI model to analyze the result of a tool call and extract facts about the project. The facts are stored in the server's state and can be consolidated later.

ingest_user_msg(msg_text)

@spec ingest_user_msg(binary()) :: :ok

Uses an AI model to analyze the user's message and extract insights about their coding preferences, learning style, personality, and other relevant traits. The insights are stored in the server's state and can be consolidated later.

init(opts)

Callback implementation for GenServer.init/1.

load_notes()

@spec load_notes() :: :ok | {:error, any()}

Load existing research notes from persistent storage. The project must be set from the --project command line option or CWD.

start_link(opts \\ [])

@spec start_link(opts :: keyword()) :: GenServer.on_start()