Documentation
¶
Overview ¶
Package entry defines entry type identifiers, field names, and file routing maps.
Index ¶
Constants ¶
const ( // Task represents a task entry in TASKS.md. Task = "task" // Decision represents an architectural decision in DECISIONS.md. Decision = "decision" // Learning represents a lesson learned in LEARNINGS.md. Learning = "learning" // Convention represents a code pattern in CONVENTIONS.md. Convention = "convention" // Complete represents a task completion action (marks the task as done). Complete = "complete" // Unknown is returned when user input doesn't match any known type. Unknown = "unknown" )
Entry type constants for context updates.
These are the canonical internal representations used in switch statements for routing add/update commands to the appropriate handler.
const ( Decisions = "decisions" Learnings = "learnings" Conventions = "conventions" Tasks = "tasks" )
Plural forms used as labels and resource identifiers.
const ( PriorityHigh = "high" PriorityMedium = "medium" PriorityLow = "low" )
Priority levels for task entries.
const ( // FieldContext is the background/situation field for decisions and learnings. FieldContext = "context" // FieldRationale is the reasoning field for decisions (why this choice). FieldRationale = "rationale" // FieldConsequence is the outcomes field for decisions (what changes). FieldConsequence = "consequence" // FieldApplication is the usage field for learnings (how to apply going forward). FieldApplication = "application" // FieldLesson is the insight field for learnings (the key takeaway). FieldLesson = "lesson" )
Field name constants for structured entry attributes.
These are used in validation error messages and as attribute names in context-update XML tags for decisions and learnings.
Variables ¶
var Priorities = []string{PriorityHigh, PriorityMedium, PriorityLow}
Priorities lists all valid priority levels for shell completion.
var ToCtxFile = map[string]string{ Decision: ctx.Decision, Task: ctx.Task, Learning: ctx.Learning, Convention: ctx.Convention, }
ToCtxFile maps short names to actual file names.
Functions ¶
func FromUserInput ¶
FromUserInput normalizes user input to a canonical entry type.
Accepts singular and plural forms, case-insensitive.
Parameters:
- s: user-supplied type string (e.g. "tasks", "Decision")
Returns:
- string: canonical entry constant, or Unknown
Types ¶
This section is empty.