Skip to content

contox save

Save session work into categorized sub-contexts. This is how you tell Contox what you accomplished during a coding session so it can be enriched and stored in the project brain.

Usage

bash
contox save [summary...] [options]

Arguments

ArgumentDescriptionRequired
summaryA plain text summary of the session work. Multiple words are joined together.No (unless --json and --auto are not used)

Options

FlagDescriptionRequiredDefault
--jsonRead structured JSON input from stdinNofalse
--autoAuto-extract changes from a transcriptNofalse
-c, --category <cat>Category for the saveNoimplementation

Categories

The following categories are available:

CategoryDescription
architectureTech stack, architecture decisions, design patterns, project structure
conventionsCoding conventions, style rules, naming patterns, team agreements
implementationFeatures built, components created, APIs implemented, integrations added
decisionsKey decisions with rationale, trade-offs considered, constraints
bugsBugs found and how they were fixed, edge cases, workarounds
todoPending tasks, known issues, planned improvements, tech debt

Examples

Save with a simple summary:

bash
contox save "Built user authentication with JWT tokens and refresh flow"

Save with a specific category:

bash
contox save -c decisions "Chose PostgreSQL over MongoDB for relational data integrity"

Save structured data from stdin:

bash
echo '{"summary":"Added auth","changes":[{"category":"implementation","title":"JWT auth","content":"Implemented JWT authentication with refresh tokens"}]}' | contox save --json

Auto-extract from a transcript:

bash
contox save --auto

How enrichment works

When you save a session, the data is sent to the Contox V2 ingest pipeline, which:

  1. Extracts factual claims from the session evidence
  2. Verifies claims against actual code changes
  3. Categorizes knowledge into the appropriate brain categories
  4. Assigns confidence scores to each extracted item
  5. Stores approved items in the project brain for future sessions

Notes

  • The --auto flag attempts to extract structured changes from the current session transcript without requiring a manual summary.
  • When using --json, the input must be valid JSON with a summary field and an optional changes array containing objects with category, title, and content fields.
  • The default category is implementation, which is the most common category for session saves.