
# Node Types

Every document in a Context Nest vault has a `type` field in its frontmatter. The type tells agents how to interpret the content.

## Types

| Type | Purpose | Example |
|------|---------|---------|
| `document` | General knowledge | Architecture overview, meeting notes, guides |
| `snippet` | Reusable text fragments | Boilerplate, templates, standard responses |
| `glossary` | Term definitions | Domain-specific vocabulary |
| `persona` | Agent role definitions | "You are a senior architect who..." |
| `prompt` | Reusable prompt templates | Code review checklist, analysis framework |
| `source` | Instructions for fetching live data | Jira sprint tickets, GitHub PRs, Slack threads |
| `tool` | Tool documentation | API endpoint docs, CLI reference |
| `reference` | Reference material | Standards, regulations, external specs |
| `agent` | Agent definitions | A named agent with a role, tools, and operating instructions |
| `artifact` | Saved outputs / generated deliverables | A saved response, rendered doc, or produced file kept in the vault |
| `table` | Structured tabular data | Row/column datasets queryable via `context_table_query` |
| `skill` | Executable, triggered procedures | A named skill with a trigger, inputs, required tools, and guard-rails |

The node-type values `document`, `snippet`, `glossary`, `persona`, `prompt`, `source`, `tool`, `reference`, `agent`, `artifact`, `table`, and `skill` are all handled as first-class types by the engine's canonical `context_create` path.

## Default type

If `type` is omitted, the document is treated as `document`.

## Source nodes

Source nodes are special — their body contains **instructions for agents to follow**, not knowledge to absorb. See [Source Nodes](https://nest.promptowl.ai/d/promptowl-documents/protocol/source-nodes/overview) for details.

Source nodes are **writable**: `source` is a first-class node type, so the engine creates, updates, and versions source nodes through the standard governed write path (a source node's fetch instructions, dependencies, and cache settings are edited, versioned, and reviewed like any other node). The `init` flow even scaffolds a `sources/` directory for them.

## Skill nodes

`skill` nodes describe an executable, triggered procedure. They carry additional frontmatter — a mandatory `trigger`, plus optional `inputs`, `tools_required`, and `guard_rails`. See [Frontmatter](https://nest.promptowl.ai/d/promptowl-documents/protocol/concepts/frontmatter) for the skill-node field reference.

## Tags and namespaced tags

Tags are prefixed with `#` (for example `#engineering`). A **namespaced** convention groups related tags under a hierarchy using a `/` separator — for example `#team/eng` or `#area/security` — so you can organize tags while keeping each one a single token.

## Example

```markdown
---
title: "Brand Voice Guide"
type: persona
tags: ["#brand", "#writing"]
status: published
version: 3
---

# Brand Voice

When writing on behalf of the company, use these guidelines:

- Tone: Professional but approachable
- Avoid: Jargon, buzzwords, passive voice
- Always: Lead with the user benefit
```
