Documentation
¶
Overview ¶
Package add provides the "ctx add" command for appending entries to context files.
It supports adding decisions, tasks, learnings, and conventions to their respective files in the .context/ directory. Content can be provided via command argument, --file flag, or stdin pipe.
Supported entry types (defined in [config.FileType]):
- decision/decisions: Appends to DECISIONS.md
- task/tasks: Inserts into TASKS.md before first unchecked task, or under a named section when --section is provided
- learning/learnings: Appends to LEARNINGS.md
- convention/conventions: Appends to CONVENTIONS.md
Example usage:
ctx add decision "Use PostgreSQL for primary database" ctx add task "Implement auth" --priority high --section "Phase 1" ctx add learning --file notes.md echo "Use camelCase" | ctx add convention
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package cmd provides coverage tests for the ctx add subcommand tree.
|
Package cmd provides coverage tests for the ctx add subcommand tree. |
|
root
Package root implements the ctx add command.
|
Package root implements the ctx add command. |
|
Package core provides helper functions for the add command.
|
Package core provides helper functions for the add command. |
|
entry
Package entry provides file-type predicates for routing add entries to the correct context file.
|
Package entry provides file-type predicates for routing add entries to the correct context file. |
|
example
Package example provides usage examples shown when the add command receives no content for a given entry type.
|
Package example provides usage examples shown when the add command receives no content for a given entry type. |
|
extract
Package extract retrieves entry content from command arguments, files, or stdin for the add command.
|
Package extract retrieves entry content from command arguments, files, or stdin for the add command. |
|
format
Package format builds timestamped Markdown entries for decisions, learnings, tasks, and conventions.
|
Package format builds timestamped Markdown entries for decisions, learnings, tasks, and conventions. |
|
insert
Package insert places formatted entries into context file content at the correct position based on entry type and section headers.
|
Package insert places formatted entries into context file content at the correct position based on entry type and section headers. |
|
normalize
Package normalize ensures section headings and other user input have the correct Markdown format before insertion.
|
Package normalize ensures section headings and other user input have the correct Markdown format before insertion. |
Click to show internal directories.
Click to hide internal directories.