View Source Magma.Concept (Magma v0.2.0)
The basic Magma document type used for generating concrete artefacts.
It contains all user-contributed content necessary for artefact generation, such as descriptions of the subject matter, background knowledge, and task descriptions for various artefacts.
This module provides functions for creating, loading and updating these concept documents, as well as functions for accessing specific sections of the document such as the description and context knowledge sections. It also allows for the creation of prompts based on a concept.
Summary
Functions
Creates a new concept document for a given subject matter in the Magma.Vault
.
Creates a new concept document for a given subject matter in the Magma.Vault
.
Fetches a document from a related document and immediately loads it with load!/1
Loads a document from the given path
or document
.
Loads a document from the given path
or document
and raises an exception in error cases.
Loads a document from the given Obsidian link
, i.e. a string of the form "[[name]]"
.
Creates a new concept document struct for a given subject matter.
Types
Functions
Creates a new concept document for a given subject matter in the Magma.Vault
.
Creates a new concept document for a given subject matter in the Magma.Vault
.
Fails in error cases.
Fetches a document from a related document and immediately loads it with load!/1
Loads a document from the given path
or document
.
If the loaded document is not of the proper document type an Magma.InvalidDocumentType
exception is returned in an :error
tuple.
Loads a document from the given path
or document
and raises an exception in error cases.
Loads a document from the given Obsidian link
, i.e. a string of the form "[[name]]"
.
If the referenced document is not of the proper document type an Magma.InvalidDocumentType
exception is returned in an :error
tuple.
Creates a new concept document struct for a given subject matter.
Note, this function doesn't create the document in the Magma.Vault
.
Use create/3
for this purpose.