Documentation
¶
Overview ¶
Package ctx defines the canonical context file read order and required file lists.
Index ¶
Constants ¶
const ( // Constitution contains inviolable rules for agents. Constitution = "CONSTITUTION.md" // Task contains current work items and their status. Task = "TASKS.md" // Convention contains code patterns and standards. Convention = "CONVENTIONS.md" // Architecture contains system structure documentation. Architecture = "ARCHITECTURE.md" // Decision contains architectural decisions with rationale. Decision = "DECISIONS.md" // Learning contains gotchas, tips, and lessons learned. Learning = "LEARNINGS.md" // Glossary contains domain terms and definitions. Glossary = "GLOSSARY.md" // AgentPlaybook contains the meta-instructions for using the // context system. AgentPlaybook = "AGENT_PLAYBOOK.md" // Dependency contains project dependency documentation. Dependency = "DEPENDENCIES.md" )
`ctx` file name constants for the .context/ directory.
Variables ¶
var FilesRequired = []string{ Constitution, Task, Decision, }
FilesRequired lists the essential context files that must be present.
These are the files created with `ctx init --minimal` and checked by drift detection for missing files.
var ReadOrder = []string{ Constitution, Task, Convention, Architecture, Decision, Learning, Glossary, AgentPlaybook, }
ReadOrder defines the priority order for reading context files.
The order follows a logical progression for AI agents:
CONSTITUTION: Inviolable rules. Must be loaded first so the agent knows what it cannot do before attempting anything.
TASKS: Current work items. What the agent should focus on.
CONVENTIONS: How to write code. Patterns and standards to follow.
ARCHITECTURE: System structure. Understanding of components and boundaries before making changes.
DECISIONS: Historical context. Why things are the way they are, to avoid re-debating settled decisions.
LEARNINGS: Gotchas and tips. Lessons from past work that inform the current implementation.
GLOSSARY: Reference material. Domain terms and abbreviations for lookup as needed.
AGENT_PLAYBOOK: Meta instructions. How to use this context system. Loaded last because it's about the system itself, not the work. The agent should understand the content before the operating manual.
Functions ¶
This section is empty.
Types ¶
This section is empty.