ctx

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package ctx defines the canonical context file read order and required file lists.

Index

Constants

View Source
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

View Source
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.

ReadOrder defines the priority order for reading context files.

The order follows a logical progression for AI agents:

  1. CONSTITUTION: Inviolable rules. Must be loaded first so the agent knows what it cannot do before attempting anything.

  2. TASKS: Current work items. What the agent should focus on.

  3. CONVENTIONS: How to write code. Patterns and standards to follow.

  4. ARCHITECTURE: System structure. Understanding of components and boundaries before making changes.

  5. DECISIONS: Historical context. Why things are the way they are, to avoid re-debating settled decisions.

  6. LEARNINGS: Gotchas and tips. Lessons from past work that inform the current implementation.

  7. GLOSSARY: Reference material. Domain terms and abbreviations for lookup as needed.

  8. 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL