entry

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: 2 Imported by: 0

Documentation

Overview

Package entry defines entry type identifiers, field names, and file routing maps.

Index

Constants

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

View Source
const (
	Decisions   = "decisions"
	Learnings   = "learnings"
	Conventions = "conventions"
	Tasks       = "tasks"
)

Plural forms used as labels and resource identifiers.

View Source
const (
	PriorityHigh   = "high"
	PriorityMedium = "medium"
	PriorityLow    = "low"
)

Priority levels for task entries.

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

Priorities lists all valid priority levels for shell completion.

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

func FromUserInput(s string) string

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.

Jump to

Keyboard shortcuts

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