Skip to main content

nut context

Manage context documents (role, agents, team, memory) for your Coconut instance.

Overview

Context documents provide essential information to AI skills about the role they should play, the agents available to them, the team they are collaborating with, and any memory that should persist across sessions. These documents help skills make better decisions and produce more relevant results.
nut context manages context documents in the current local workspace. To read context from a remote peer Coconut through the Coconut Dashboard, use nut coconut context.

Context Types

  • role - Role definitions and expectations for AI skills
  • agents - Agent definitions and capabilities available in the instance
  • team - Team structure, members, and collaboration conventions
  • memory - Long-lived notes and memory to carry across sessions

nut context get

Read a context document.
Arguments:
  • type - Context type (role, agents, team, or memory)
Options:
  • --json - Output as JSON
Examples:

nut context update

Replace the entire content of a context document.
Arguments:
  • type - Context type to update
Options:
  • --file <path> - Path to file containing new content
  • --content <text> - Direct content to set
Examples:
Using update replaces the entire document. Use append to add content without replacing existing text.

nut context append

Append content to a context document.
Arguments:
  • type - Context type to append to
  • content - Text to append (optional if using --file)
Options:
  • --file <path> - Path to file to append
Examples:
Appending is useful for incrementally building up context without having to re-specify everything.

nut context replace

Find and replace text in a context document.
Arguments:
  • type - Context type to modify
Options:
  • --old <text> - Text to find (required)
  • --new <text> - Replacement text (required)
Examples:

Context Document Examples

Role Context

Agents Context

Team Context

Memory Context


Best Practices

Regularly update context documents as your project evolves. Outdated information can lead to AI skills making incorrect assumptions.
The more detail you provide, the better AI skills can understand your project and make appropriate decisions. Include coding standards, architectural patterns, and specific requirements.
Structure your context documents with clear headings and sections. Markdown formatting makes documents easier to read and parse.
Begin with basic context and expand over time. You don’t need perfect, comprehensive context on day one—add details as you discover what information skills need most.

Context Workflow

1

Define skill roles

2

Describe available agents

3

Add team context

4

Refine incrementally

5

Review and update