commands

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: MIT Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColTicket      = "ticket"
	ColTitle       = "title"
	ColStatus      = "status"
	ColTopics      = "topics"
	ColPath        = "path"
	ColLastUpdated = "last_updated"
	ColTasksOpen   = "tasks_open"
	ColTasksDone   = "tasks_done"

	ColDocType = "doc_type"

	ColIndex   = "index"
	ColChecked = "checked"
	ColText    = "text"
	ColFile    = "file"

	ColCategory    = "category"
	ColSlug        = "slug"
	ColDescription = "description"
)

Column name constants used across docmgr list commands

View Source
const DefaultTicketPathTemplate = "{{YYYY}}/{{MM}}/{{DD}}/{{TICKET}}--{{SLUG}}"

Variables

View Source
var ColumnsTasksList = []string{ColIndex, ColChecked, ColText}
View Source
var ColumnsVocabList = []string{ColCategory, ColSlug, ColDescription}
View Source
var GuidelineContent = map[string]string{
	"index": `# Guidelines: Index Documents

## Purpose
The index document is the canonical entry point for a ticket workspace. It provides a single source of truth for understanding the ticket's scope, status, and key resources.

## Required Elements
- **Overview**: Brief description of the ticket and its goals
- **Status**: Current status of the ticket
- **Key Links**: References to related files and external sources
- **Topics**: The main topics this ticket addresses
- **Tasks**: Link to tasks.md
- **Changelog**: Link to changelog.md
- **Structure**: Brief overview of the directory structure

## Best Practices
- Keep the overview concise but informative
- Update status regularly as work progresses
- Maintain RelatedFiles to help LLMs discover relevant code
- Link to important decisions and documents
- Use consistent formatting for easy scanning
`,

	"design-doc": `# Guidelines: Design Documents

## Purpose
Design documents provide structured rationale and architecture notes. They document decisions, alternatives considered, and implementation plans.

## Required Elements
- **Executive Summary**: High-level overview
- **Problem Statement**: Clear description of the problem
- **Proposed Solution**: Detailed solution description
- **Design Decisions**: Key decisions with rationale
- **Alternatives Considered**: Other approaches evaluated
- **Implementation Plan**: Steps to implement

## Best Practices
- Start with executive summary for quick scanning
- Document the "why" behind decisions, not just the "what"
- Include diagrams or code examples where helpful
- Keep open questions visible until resolved
- Link to related RFCs, tickets, or references
- Use clear section hierarchy for easy navigation
`,

	"reference": `# Guidelines: Reference Documents

## Purpose
Reference documents provide copy/paste-ready context, API contracts, prompt packs, or quick-look tables. They're designed for reuse in LLM prompts or as quick reference during development.

## Required Elements
- **Goal**: What this reference accomplishes
- **Context**: Background needed to use the reference
- **Quick Reference**: The actual reference content (code, tables, prompts)
- **Usage Examples**: How to use this reference

## Best Practices
- Focus on copy/paste-ready content
- Keep context minimal but sufficient
- Format for easy scanning (tables, code blocks)
- Include practical examples
- Update when APIs or processes change
- Link to related references or design docs
`,

	"working-note": `# Guidelines: Working Notes

## Purpose
Working notes capture free-form logs, meeting summaries, research findings, or exploratory thoughts. They're ephemeral but help maintain context during active work.

## Required Elements
- **Summary**: Brief summary for LLM ingestion (at the top)
- **Notes**: The main content (free-form)
- **Decisions**: Any decisions made
- **Next Steps**: Follow-up actions

## Best Practices
- Always include a summary at the top
- Keep notes focused and organized
- Extract important decisions to changelog.md
- Mark resolved items clearly
- Use consistent date formatting
- Archive when ticket is complete
`,

	"tutorial": `# Guidelines: Tutorial Documents

## Purpose
Tutorials provide step-by-step workflows or reusable prompt playbooks. They guide readers through a process from start to finish.

## Required Elements
- **Overview**: Learning objectives
- **Prerequisites**: Required knowledge or setup
- **Step-by-Step Guide**: Detailed walkthrough
- **Verification**: How to verify completion
- **Troubleshooting**: Common issues and solutions

## Best Practices
- Start with clear learning objectives
- Break steps into logical chunks
- Include code examples and expected outputs
- Provide verification steps
- Anticipate common pitfalls
- Link to related resources
- Follow glazed documentation style guidelines
`,

	"playbook": `# Guidelines: Playbook Documents

## Purpose
Playbooks document command sequences, manual test procedures, or operational steps. They're designed for repeated execution.

## Required Elements
- **Purpose**: What the playbook accomplishes
- **Environment Assumptions**: Required setup
- **Commands**: The actual command sequence
- **Exit Criteria**: Success indicators

## Best Practices
- List all prerequisites upfront
- Use code blocks for commands
- Include expected outputs
- Document failure modes
- Update when commands change
- Keep environment assumptions explicit
- Include timing estimates if relevant
`,

	"task-list": `# Guidelines: Task List Documents

## Purpose
Task lists provide canonical TODO tracking with checkboxes and owners. They keep execution visible and machine-readable.

## Required Elements
- **Tasks**: List of uncompleted tasks with checkboxes
- **Completed**: List of completed tasks
- **Notes**: Additional context or blockers

## Best Practices
- Use Markdown checkboxes for machine readability
- Assign owners to tasks when possible
- Move completed items to completed section
- Keep tasks specific and actionable
- Update regularly as work progresses
- Link to related documents or code
`,

	"log": `# Guidelines: Log Documents

## Purpose
Logs maintain a running changelog, incident timeline, or decision log. They track what happened and when.

## Required Elements
- **Log Entries**: Chronological entries (newest first)

## Best Practices
- Use reverse chronological order (newest first)
- Include dates in entry headers
- Keep entries concise but informative
- Document decisions and their rationale
- Link to related commits or documents
- Maintain consistent formatting
- Update promptly after notable events
`,

	"script": `# Guidelines: Script Documents

## Purpose
Script documents describe temporary code, SQL snippets, or REPL transcripts. They live in the scripts/ directory alongside executable files.

## Required Elements
- **Purpose**: What the script does
- **Usage**: How to run it
- **Implementation**: Description or link to executable

## Best Practices
- Keep scripts focused on a single purpose
- Document all required parameters
- Include usage examples
- Note any side effects or dependencies
- Link to related design docs if applicable
- Archive when no longer needed
- Include a README.md in scripts/ summarizing all scripts
`,

	"code-review": `# Guidelines: Code Review Documents

## Purpose
Capture the outcome of code reviews with enough context that future readers can understand scope, findings, and decisions.

## Required Elements
- **Summary**: One-paragraph overview of what was reviewed and the conclusion
- **Context**: PRs, branches, features; links to tickets and references
- **Files Reviewed**: Key files and rationale (consider notes in RelatedFiles)
- **Findings**: Strengths and issues/risks
- **Decisions & Follow-ups**: Decisions made and action items

## Best Practices
- Link to PRs, commits, and related docs
- Keep findings concise; prefer bullet lists
- Capture actionable follow-ups with owners
- Use RelatedFiles with short notes to explain why files matter
- Update when follow-ups are completed
`,
}

GuidelineContent holds guideline content for different document types

Functions

func ColumnsListString

func ColumnsListString(cols []string) string

func GetGuideline

func GetGuideline(docType string) (string, bool)

GetGuideline returns the guideline content for a given doc type

func ListGuidelineTypes

func ListGuidelineTypes() []string

ListGuidelineTypes returns all available guideline types

func LoadVocabulary

func LoadVocabulary() (*models.Vocabulary, error)

LoadVocabulary loads vocabulary from the configured path or defaults. Resolution order: - .ttmp.yaml 'vocabulary' path (relative to config dir if not absolute) - <root>/vocabulary.yaml, where root is from .ttmp.yaml (default 'ttmp') - fallback search for 'ttmp/vocabulary.yaml' upwards - legacy fallback 'doc/vocabulary.yaml' upwards

func SaveVocabulary

func SaveVocabulary(vocab *models.Vocabulary, repoRoot string) error

SaveVocabulary saves vocabulary to the resolved vocabulary path, creating directories as needed. If no configuration is found, it defaults to '<repoRoot>/ttmp/vocabulary.yaml'.

Types

type AddCommand

type AddCommand struct {
	*cmds.CommandDescription
}

AddCommand adds a new document to a workspace

func NewAddCommand

func NewAddCommand() (*AddCommand, error)

func (*AddCommand) Run added in v0.0.2

func (c *AddCommand) Run(
	ctx context.Context,
	parsedValues *values.Values,
) error

func (*AddCommand) RunIntoGlazeProcessor

func (c *AddCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type AddResult added in v0.0.2

type AddResult struct {
	Ticket         string
	DocType        string
	Title          string
	DocPath        string
	DocStatus      string
	Topics         []string
	Owners         []string
	Intent         string
	GuidelineText  string
	GuidelineTitle string
	Root           string
	ConfigPath     string
	VocabularyPath string
}

type AddSettings

type AddSettings struct {
	Ticket          string   `glazed:"ticket"`
	DocType         string   `glazed:"doc-type"`
	Title           string   `glazed:"title"`
	Root            string   `glazed:"root"`
	Topics          []string `glazed:"topics"`
	Owners          []string `glazed:"owners"`
	Status          string   `glazed:"status"`
	Intent          string   `glazed:"intent"`
	ExternalSources []string `glazed:"external-sources"`
	Summary         string   `glazed:"summary"`
	RelatedFiles    []string `glazed:"related-files"`
}

AddSettings holds the parameters for the add command

type ChangelogUpdateCommand

type ChangelogUpdateCommand struct{ *cmds.CommandDescription }

func NewChangelogUpdateCommand

func NewChangelogUpdateCommand() (*ChangelogUpdateCommand, error)

func (*ChangelogUpdateCommand) Run

Implement BareCommand for human-friendly output with reminders

func (*ChangelogUpdateCommand) RunIntoGlazeProcessor

func (c *ChangelogUpdateCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	pl *values.Values,
	gp middlewares.Processor,
) error

type ChangelogUpdateSettings

type ChangelogUpdateSettings struct {
	Ticket        string `glazed:"ticket"`
	Root          string `glazed:"root"`
	ChangelogFile string `glazed:"changelog-file"`
	Title         string `glazed:"title"`
	Entry         string `glazed:"entry"`
	// Deprecated: kept only to emit a friendly migration error if provided
	Files            []string `glazed:"files"`
	FileNotes        []string `glazed:"file-note"`
	Suggest          bool     `glazed:"suggest"`
	ApplySuggestions bool     `glazed:"apply-suggestions"`
	Query            string   `glazed:"query"`
	Topics           []string `glazed:"topics"`
}

type ConfigShowCommand added in v0.0.2

type ConfigShowCommand struct {
	*cmds.CommandDescription
}

ConfigShowCommand shows the current configuration resolution

func NewConfigShowCommand added in v0.0.2

func NewConfigShowCommand() (*ConfigShowCommand, error)

func (*ConfigShowCommand) Run added in v0.0.2

func (c *ConfigShowCommand) Run(
	ctx context.Context,
	parsedValues *values.Values,
) error

Run provides human-friendly output for config show command

func (*ConfigShowCommand) RunIntoGlazeProcessor added in v0.0.2

func (c *ConfigShowCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type ConfigShowSettings added in v0.0.2

type ConfigShowSettings struct {
	Root string `glazed:"root"`
}

ConfigShowSettings holds the parameters for the config show command

type ConfigureCommand

type ConfigureCommand struct {
	*cmds.CommandDescription
}

ConfigureCommand writes a .ttmp.yaml configuration file at the repository root

func NewConfigureCommand

func NewConfigureCommand() (*ConfigureCommand, error)

func (*ConfigureCommand) Run added in v0.0.2

func (c *ConfigureCommand) Run(
	ctx context.Context,
	parsedValues *values.Values,
) error

func (*ConfigureCommand) RunIntoGlazeProcessor

func (c *ConfigureCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type ConfigureResult added in v0.0.2

type ConfigureResult struct {
	ConfigPath string
	Root       string
	Vocabulary string
	Status     string
}

type ConfigureSettings

type ConfigureSettings struct {
	Root       string   `glazed:"root"`
	Owners     []string `glazed:"owners"`
	Intent     string   `glazed:"intent"`
	Vocabulary string   `glazed:"vocabulary"`
	Force      bool     `glazed:"force"`
}

ConfigureSettings holds parameters for writing .ttmp.yaml

type CreateTicketCommand

type CreateTicketCommand struct {
	*cmds.CommandDescription
}

CreateTicketCommand creates a new ticket workspace under the docs root

func NewCreateTicketCommand

func NewCreateTicketCommand() (*CreateTicketCommand, error)

func (*CreateTicketCommand) Run added in v0.0.2

func (c *CreateTicketCommand) Run(
	ctx context.Context,
	parsedValues *values.Values,
) error

func (*CreateTicketCommand) RunIntoGlazeProcessor

func (c *CreateTicketCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type CreateTicketResult added in v0.0.2

type CreateTicketResult struct {
	Ticket       string
	Title        string
	Path         string
	Root         string
	Directories  []string
	FilesCreated []string
}

type CreateTicketSettings

type CreateTicketSettings struct {
	Ticket       string   `glazed:"ticket"`
	Title        string   `glazed:"title"`
	Topics       []string `glazed:"topics"`
	Root         string   `glazed:"root"`
	Force        bool     `glazed:"force"`
	PathTemplate string   `glazed:"path-template"`
}

CreateTicketSettings holds the parameters for the create-ticket command

type DocMoveCommand added in v0.0.7

type DocMoveCommand struct {
	*cmds.CommandDescription
}

DocMoveCommand moves a markdown document from one ticket to another and rewrites its Ticket field.

func NewDocMoveCommand added in v0.0.7

func NewDocMoveCommand() (*DocMoveCommand, error)

func (*DocMoveCommand) RunIntoGlazeProcessor added in v0.0.7

func (c *DocMoveCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type DocMoveResult added in v0.0.7

type DocMoveResult struct {
	SourceTicket string
	DestTicket   string
	SourcePath   string
	DestPath     string
	CompletedAt  time.Time
}

type DocMoveSettings added in v0.0.7

type DocMoveSettings struct {
	Root       string `glazed:"root"`
	Doc        string `glazed:"doc"`
	DestTicket string `glazed:"dest-ticket"`
	DestDir    string `glazed:"dest-dir"`
	Overwrite  bool   `glazed:"overwrite"`
}

type DoctorCommand

type DoctorCommand struct {
	*cmds.CommandDescription
}

DoctorCommand validates document workspaces

func NewDoctorCommand

func NewDoctorCommand() (*DoctorCommand, error)

func (*DoctorCommand) Run added in v0.0.2

func (c *DoctorCommand) Run(
	ctx context.Context,
	parsedValues *values.Values,
) error

func (*DoctorCommand) RunIntoGlazeProcessor

func (c *DoctorCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp glazedMiddlewares.Processor,
) error

type DoctorSettings

type DoctorSettings struct {
	Root            string   `glazed:"root"`
	Ticket          string   `glazed:"ticket"`
	Doc             string   `glazed:"doc"`
	All             bool     `glazed:"all"`
	IgnoreDirs      []string `glazed:"ignore-dir"`
	IgnoreGlobs     []string `glazed:"ignore-glob"`
	StaleAfterDays  int      `glazed:"stale-after"`
	FailOn          string   `glazed:"fail-on"`
	DiagnosticsJSON string   `glazed:"diagnostics-json"`
	// Schema printing flags (human mode only)
	PrintTemplateSchema bool   `glazed:"print-template-schema"`
	SchemaFormat        string `glazed:"schema-format"`
}

DoctorSettings holds the parameters for the doctor command

type ExportSQLiteCommand added in v0.0.7

type ExportSQLiteCommand struct {
	*cmds.CommandDescription
}

ExportSQLiteCommand exports a workspace index to a persistent sqlite file for debugging/sharing.

func NewExportSQLiteCommand added in v0.0.7

func NewExportSQLiteCommand() (*ExportSQLiteCommand, error)

func (*ExportSQLiteCommand) Run added in v0.0.7

func (c *ExportSQLiteCommand) Run(ctx context.Context, parsedValues *values.Values) error

Run implements cmds.BareCommand (classic/human mode only).

type ExportSQLiteSettings added in v0.0.7

type ExportSQLiteSettings struct {
	Root        string `glazed:"root"`
	Out         string `glazed:"out"`
	Force       bool   `glazed:"force"`
	IncludeBody bool   `glazed:"include-body"`
}

type GuidelinesCommand

type GuidelinesCommand struct {
	*cmds.CommandDescription
}

GuidelinesCommand displays guidelines for document types

func NewGuidelinesCommand

func NewGuidelinesCommand() (*GuidelinesCommand, error)

func (*GuidelinesCommand) Run

func (c *GuidelinesCommand) Run(
	ctx context.Context,
	parsedValues *values.Values,
) error

Implement BareCommand for human-friendly output

func (*GuidelinesCommand) RunIntoGlazeProcessor

func (c *GuidelinesCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type GuidelinesSettings

type GuidelinesSettings struct {
	DocType             string `glazed:"doc-type"`
	Root                string `glazed:"root"`
	List                bool   `glazed:"list"`
	PrintTemplateSchema bool   `glazed:"print-template-schema"`
	SchemaFormat        string `glazed:"schema-format"`
}

GuidelinesSettings holds the parameters for the guidelines command

type IgnoreExplainCommand added in v0.0.18

type IgnoreExplainCommand struct {
	*cmds.CommandDescription
}

func NewIgnoreExplainCommand added in v0.0.18

func NewIgnoreExplainCommand() (*IgnoreExplainCommand, error)

func (*IgnoreExplainCommand) RunIntoGlazeProcessor added in v0.0.18

func (c *IgnoreExplainCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type IgnoreExplainSettings added in v0.0.18

type IgnoreExplainSettings struct {
	Root  string `glazed:"root"`
	Path  string `glazed:"path"`
	IsDir bool   `glazed:"is-dir"`
	Trace bool   `glazed:"trace"`
}

type ImportFileCommand

type ImportFileCommand struct {
	*cmds.CommandDescription
}

ImportFileCommand imports a file into the document workspace

func NewImportFileCommand

func NewImportFileCommand() (*ImportFileCommand, error)

func (*ImportFileCommand) Run added in v0.0.2

func (c *ImportFileCommand) Run(
	ctx context.Context,
	parsedValues *values.Values,
) error

func (*ImportFileCommand) RunIntoGlazeProcessor

func (c *ImportFileCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type ImportFileResult added in v0.0.2

type ImportFileResult struct {
	Ticket      string
	SourceFile  string
	Destination string
	MetaPath    string
	IndexPath   string
}

type ImportFileSettings

type ImportFileSettings struct {
	Ticket   string `glazed:"ticket"`
	FilePath string `glazed:"file"`
	Root     string `glazed:"root"`
	Name     string `glazed:"name"`
}

ImportFileSettings holds the parameters for the import file command

type InitCommand

type InitCommand struct {
	*cmds.CommandDescription
}

InitCommand initializes a documentation root (ttmp/) with vocabulary, templates, and guidelines

func NewInitCommand

func NewInitCommand() (*InitCommand, error)

func (*InitCommand) Run added in v0.0.2

func (c *InitCommand) Run(
	ctx context.Context,
	parsedValues *values.Values,
) error

func (*InitCommand) RunIntoGlazeProcessor

func (c *InitCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type InitResult added in v0.0.2

type InitResult struct {
	Root         string
	Vocabulary   string
	DocmgrIgnore string
	ConfigPath   string
	Status       string
}

type InitSettings

type InitSettings struct {
	Root           string `glazed:"root"`
	Force          bool   `glazed:"force"`
	SeedVocabulary bool   `glazed:"seed-vocabulary"`
}

InitSettings holds the parameters for the root init command

type LayoutFixCommand

type LayoutFixCommand struct {
	*cmds.CommandDescription
}

LayoutFixCommand moves documents into subdirectories named after their doc-type

func NewLayoutFixCommand

func NewLayoutFixCommand() (*LayoutFixCommand, error)

func (*LayoutFixCommand) Run added in v0.0.2

func (c *LayoutFixCommand) Run(
	ctx context.Context,
	parsedValues *values.Values,
) error

func (*LayoutFixCommand) RunIntoGlazeProcessor

func (c *LayoutFixCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type LayoutFixMove added in v0.0.2

type LayoutFixMove struct {
	Ticket string
	From   string
	To     string
	Status string
}

type LayoutFixSettings

type LayoutFixSettings struct {
	Root   string `glazed:"root"`
	Ticket string `glazed:"ticket"`
	DryRun bool   `glazed:"dry-run"`
}

type ListCommand

type ListCommand struct {
	*cmds.CommandDescription
}

ListCommand lists document workspaces

func NewListCommand

func NewListCommand() (*ListCommand, error)

func (*ListCommand) RunIntoGlazeProcessor

func (c *ListCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type ListDocsCommand

type ListDocsCommand struct {
	*cmds.CommandDescription
}

ListDocsCommand lists individual documents

func NewListDocsCommand

func NewListDocsCommand() (*ListDocsCommand, error)

func (*ListDocsCommand) Run

func (c *ListDocsCommand) Run(
	ctx context.Context,
	parsedValues *values.Values,
) error

Implement BareCommand for human-friendly output

func (*ListDocsCommand) RunIntoGlazeProcessor

func (c *ListDocsCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type ListDocsSettings

type ListDocsSettings struct {
	Root    string   `glazed:"root"`
	Ticket  string   `glazed:"ticket"`
	Status  string   `glazed:"status"`
	DocType string   `glazed:"doc-type"`
	Topics  []string `glazed:"topics"`
	// Schema printing flags (human mode only)
	PrintTemplateSchema bool   `glazed:"print-template-schema"`
	SchemaFormat        string `glazed:"schema-format"`
}

ListDocsSettings holds the parameters for the list docs command

type ListSettings

type ListSettings struct {
	Root   string `glazed:"root"`
	Ticket string `glazed:"ticket"`
	Status string `glazed:"status"`
}

ListSettings holds the parameters for the list command

type ListTicketsCommand

type ListTicketsCommand struct {
	*cmds.CommandDescription
}

ListTicketsCommand lists ticket workspaces

func NewListTicketsCommand

func NewListTicketsCommand() (*ListTicketsCommand, error)

func (*ListTicketsCommand) Run

func (c *ListTicketsCommand) Run(
	ctx context.Context,
	parsedValues *values.Values,
) error

Implement BareCommand for human-friendly output

func (*ListTicketsCommand) RunIntoGlazeProcessor

func (c *ListTicketsCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type ListTicketsSettings

type ListTicketsSettings struct {
	Root   string `glazed:"root"`
	Ticket string `glazed:"ticket"`
	Status string `glazed:"status"`
	// Schema printing flags (human mode only)
	PrintTemplateSchema bool   `glazed:"print-template-schema"`
	SchemaFormat        string `glazed:"schema-format"`
}

ListTicketsSettings holds the parameters for the list tickets command

type MetaUpdateCommand

type MetaUpdateCommand struct {
	*cmds.CommandDescription
}

MetaUpdateCommand updates document frontmatter

func NewMetaUpdateCommand

func NewMetaUpdateCommand() (*MetaUpdateCommand, error)

func (*MetaUpdateCommand) Run added in v0.0.2

func (c *MetaUpdateCommand) Run(
	ctx context.Context,
	parsedValues *values.Values,
) error

func (*MetaUpdateCommand) RunIntoGlazeProcessor

func (c *MetaUpdateCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type MetaUpdateContext added in v0.0.2

type MetaUpdateContext struct {
	Root           string
	ConfigPath     string
	VocabularyPath string
}

type MetaUpdateExecutionResult added in v0.0.2

type MetaUpdateExecutionResult struct {
	Context MetaUpdateContext
	Updates []MetaUpdateRow
}

type MetaUpdateRow added in v0.0.2

type MetaUpdateRow struct {
	Doc    string
	Field  string
	Value  string
	Status string
	Error  string
}

type MetaUpdateSettings

type MetaUpdateSettings struct {
	Doc     string `glazed:"doc"`
	Ticket  string `glazed:"ticket"`
	DocType string `glazed:"doc-type"`
	Field   string `glazed:"field"`
	Value   string `glazed:"value"`
	Root    string `glazed:"root"`
}

MetaUpdateSettings holds the parameters for the meta update command

type RelateCommand

type RelateCommand struct {
	*cmds.CommandDescription
}

RelateCommand updates RelatedFiles metadata and can suggest files to relate

func NewRelateCommand

func NewRelateCommand() (*RelateCommand, error)

func (*RelateCommand) Run added in v0.0.2

func (c *RelateCommand) Run(
	ctx context.Context,
	parsedValues *values.Values,
) error

func (*RelateCommand) RunIntoGlazeProcessor

func (c *RelateCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type RelateResult added in v0.0.2

type RelateResult struct {
	Suggestions []RelateSuggestion
	Update      *RelateUpdateSummary
}

type RelateSettings

type RelateSettings struct {
	Ticket string `glazed:"ticket"`
	Doc    string `glazed:"doc"`
	// Deprecated: kept only to emit a friendly migration error if provided
	Files            []string `glazed:"files"`
	RemoveFiles      []string `glazed:"remove-files"`
	FileNotes        []string `glazed:"file-note"`
	Suggest          bool     `glazed:"suggest"`
	ApplySuggestions bool     `glazed:"apply-suggestions"`
	FromGit          bool     `glazed:"from-git"`
	Query            string   `glazed:"query"`
	Topics           []string `glazed:"topics"`
	Root             string   `glazed:"root"`
}

type RelateSuggestion added in v0.0.2

type RelateSuggestion struct {
	File    string
	Reasons []string
}

type RelateUpdateSummary added in v0.0.2

type RelateUpdateSummary struct {
	DocPath string
	Added   int
	Updated int
	Removed int
	Total   int
}

type RenameTicketCommand added in v0.0.2

type RenameTicketCommand struct {
	*cmds.CommandDescription
}

RenameTicketCommand renames a ticket identifier and moves the workspace directory.

func NewRenameTicketCommand added in v0.0.2

func NewRenameTicketCommand() (*RenameTicketCommand, error)

func (*RenameTicketCommand) Run added in v0.0.2

func (c *RenameTicketCommand) Run(
	ctx context.Context,
	parsedValues *values.Values,
) error

Implement BareCommand for human-friendly output

func (*RenameTicketCommand) RunIntoGlazeProcessor added in v0.0.2

func (c *RenameTicketCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type RenameTicketSettings added in v0.0.2

type RenameTicketSettings struct {
	Root      string `glazed:"root"`
	Ticket    string `glazed:"ticket"`
	NewTicket string `glazed:"new-ticket"`
	DryRun    bool   `glazed:"dry-run"`
}

type RenumberCommand

type RenumberCommand struct {
	*cmds.CommandDescription
}

RenumberCommand resequences numeric prefixes within a ticket and updates intra-ticket references.

func NewRenumberCommand

func NewRenumberCommand() (*RenumberCommand, error)

func (*RenumberCommand) Run added in v0.0.2

func (c *RenumberCommand) Run(
	ctx context.Context,
	parsedValues *values.Values,
) error

func (*RenumberCommand) RunIntoGlazeProcessor

func (c *RenumberCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type RenumberResult added in v0.0.2

type RenumberResult struct {
	Ticket      string
	Renamed     int
	Path        string
	CompletedAt time.Time
}

type RenumberSettings

type RenumberSettings struct {
	Root   string `glazed:"root"`
	Ticket string `glazed:"ticket"`
}

type SearchCommand

type SearchCommand struct {
	*cmds.CommandDescription
}

SearchCommand searches documents by content and metadata

func NewSearchCommand

func NewSearchCommand() (*SearchCommand, error)

func (*SearchCommand) Run

func (c *SearchCommand) Run(
	ctx context.Context,
	parsedValues *values.Values,
) error

Implement BareCommand for human-friendly output

func (*SearchCommand) RunIntoGlazeProcessor

func (c *SearchCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type SearchSettings

type SearchSettings struct {
	Query               string   `glazed:"query"`
	Ticket              string   `glazed:"ticket"`
	Topics              []string `glazed:"topics"`
	DocType             string   `glazed:"doc-type"`
	Status              string   `glazed:"status"`
	OrderBy             string   `glazed:"order-by"`
	Files               bool     `glazed:"files"`
	File                string   `glazed:"file"`
	Dir                 string   `glazed:"dir"`
	ExternalSource      string   `glazed:"external-source"`
	Since               string   `glazed:"since"`
	Until               string   `glazed:"until"`
	CreatedSince        string   `glazed:"created-since"`
	UpdatedSince        string   `glazed:"updated-since"`
	Root                string   `glazed:"root"`
	PrintTemplateSchema bool     `glazed:"print-template-schema"`
	SchemaFormat        string   `glazed:"schema-format"`
}

SearchSettings holds the parameters for the search command

type SkillExportCommand added in v0.0.17

type SkillExportCommand struct {
	*cmds.CommandDescription
}

SkillExportCommand exports a skill plan into an Agent Skills package.

func NewSkillExportCommand added in v0.0.17

func NewSkillExportCommand() (*SkillExportCommand, error)

func (*SkillExportCommand) Run added in v0.0.17

func (c *SkillExportCommand) Run(ctx context.Context, parsedValues *values.Values) error

Run implements BareCommand.

type SkillExportSettings added in v0.0.17

type SkillExportSettings struct {
	Root        string `glazed:"root"`
	Ticket      string `glazed:"ticket"`
	Skill       string `glazed:"skill"`
	Query       string `glazed:"query"`
	OutDir      string `glazed:"out-dir"`
	OutputSkill string `glazed:"output-skill"`
	Force       bool   `glazed:"force"`
}

SkillExportSettings holds the parameters for skill export.

type SkillImportCommand added in v0.0.17

type SkillImportCommand struct {
	*cmds.CommandDescription
}

SkillImportCommand imports an Agent Skills package into a skill plan.

func NewSkillImportCommand added in v0.0.17

func NewSkillImportCommand() (*SkillImportCommand, error)

func (*SkillImportCommand) Run added in v0.0.17

func (c *SkillImportCommand) Run(ctx context.Context, parsedValues *values.Values) error

Run implements BareCommand.

type SkillImportSettings added in v0.0.17

type SkillImportSettings struct {
	Root      string   `glazed:"root"`
	Ticket    string   `glazed:"ticket"`
	Input     string   `glazed:"input"`
	Topics    []string `glazed:"topics"`
	Title     string   `glazed:"title"`
	WhatFor   string   `glazed:"what-for"`
	WhenToUse string   `glazed:"when-to-use"`
	Force     bool     `glazed:"force"`
}

SkillImportSettings holds the parameters for skill import.

type SkillListCommand added in v0.0.8

type SkillListCommand struct {
	*cmds.CommandDescription
}

SkillListCommand lists skills

func NewSkillListCommand added in v0.0.8

func NewSkillListCommand() (*SkillListCommand, error)

func (*SkillListCommand) Run added in v0.0.8

func (c *SkillListCommand) Run(
	ctx context.Context,
	parsedValues *values.Values,
) error

Implement BareCommand for human-friendly output

func (*SkillListCommand) RunIntoGlazeProcessor added in v0.0.8

func (c *SkillListCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type SkillListSettings added in v0.0.8

type SkillListSettings struct {
	Root                string   `glazed:"root"`
	Ticket              string   `glazed:"ticket"`
	Topics              []string `glazed:"topics"`
	File                string   `glazed:"file"`
	Dir                 string   `glazed:"dir"`
	PrintTemplateSchema bool     `glazed:"print-template-schema"`
	SchemaFormat        string   `glazed:"schema-format"`
}

SkillListSettings holds the parameters for the skill list command

type SkillShowCommand added in v0.0.8

type SkillShowCommand struct {
	*cmds.CommandDescription
}

SkillShowCommand shows detailed information about a skill

func NewSkillShowCommand added in v0.0.8

func NewSkillShowCommand() (*SkillShowCommand, error)

func (*SkillShowCommand) Run added in v0.0.8

func (c *SkillShowCommand) Run(
	ctx context.Context,
	parsedValues *values.Values,
) error

Run implements BareCommand (show commands typically use human-friendly output)

type SkillShowSettings added in v0.0.8

type SkillShowSettings struct {
	Root    string `glazed:"root"`
	Ticket  string `glazed:"ticket"`
	Skill   string `glazed:"skill"`
	Query   string `glazed:"query"`
	Resolve bool   `glazed:"resolve"`
}

SkillShowSettings holds command parameters

type StatusCommand

type StatusCommand struct {
	*cmds.CommandDescription
}

StatusCommand prints a summary status of the docs root

func NewStatusCommand

func NewStatusCommand() (*StatusCommand, error)

func (*StatusCommand) Run

func (c *StatusCommand) Run(
	ctx context.Context,
	parsedValues *values.Values,

) error

Implement BareCommand for human-friendly output

func (*StatusCommand) RunIntoGlazeProcessor

func (c *StatusCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type StatusSettings

type StatusSettings struct {
	Root                string `glazed:"root"`
	Ticket              string `glazed:"ticket"`
	StaleAfterDays      int    `glazed:"stale-after"`
	SummaryOnly         bool   `glazed:"summary-only"`
	PrintTemplateSchema bool   `glazed:"print-template-schema"`
	SchemaFormat        string `glazed:"schema-format"`
}

type TasksAddCommand

type TasksAddCommand struct{ *cmds.CommandDescription }

tasks add

func NewTasksAddCommand

func NewTasksAddCommand() (*TasksAddCommand, error)

func (*TasksAddCommand) Run

func (c *TasksAddCommand) Run(ctx context.Context, pl *values.Values) error

type TasksAddSettings

type TasksAddSettings struct {
	Ticket    string `glazed:"ticket"`
	Root      string `glazed:"root"`
	TasksFile string `glazed:"tasks-file"`
	Text      string `glazed:"text"`
	After     int    `glazed:"after"`
}

type TasksCheckCommand

type TasksCheckCommand struct{ *cmds.CommandDescription }

tasks check

func NewTasksCheckCommand

func NewTasksCheckCommand() (*TasksCheckCommand, error)

func (*TasksCheckCommand) Run

func (*TasksCheckCommand) RunIntoGlazeProcessor added in v0.0.2

func (c *TasksCheckCommand) RunIntoGlazeProcessor(ctx context.Context, pl *values.Values, gp middlewares.Processor) error

type TasksCheckSettings

type TasksCheckSettings struct {
	Ticket    string `glazed:"ticket"`
	Root      string `glazed:"root"`
	TasksFile string `glazed:"tasks-file"`
	IDs       []int  `glazed:"id"`
	Match     string `glazed:"match"`
}

type TasksEditCommand

type TasksEditCommand struct{ *cmds.CommandDescription }

tasks edit

func NewTasksEditCommand

func NewTasksEditCommand() (*TasksEditCommand, error)

func (*TasksEditCommand) Run added in v0.0.2

func (*TasksEditCommand) RunIntoGlazeProcessor

func (c *TasksEditCommand) RunIntoGlazeProcessor(ctx context.Context, pl *values.Values, gp middlewares.Processor) error

type TasksEditSettings

type TasksEditSettings struct {
	Ticket    string `glazed:"ticket"`
	Root      string `glazed:"root"`
	TasksFile string `glazed:"tasks-file"`
	ID        int    `glazed:"id"`
	Text      string `glazed:"text"`
}

type TasksListCommand

type TasksListCommand struct{ *cmds.CommandDescription }

tasks list

func NewTasksListCommand

func NewTasksListCommand() (*TasksListCommand, error)

func (*TasksListCommand) Run

Implement BareCommand for human-friendly output

func (*TasksListCommand) RunIntoGlazeProcessor

func (c *TasksListCommand) RunIntoGlazeProcessor(ctx context.Context, pl *values.Values, gp middlewares.Processor) error

type TasksListSettings

type TasksListSettings struct {
	Ticket              string `glazed:"ticket"`
	Root                string `glazed:"root"`
	TasksFile           string `glazed:"tasks-file"`
	PrintTemplateSchema bool   `glazed:"print-template-schema"`
	SchemaFormat        string `glazed:"schema-format"`
}

type TasksRemoveCommand

type TasksRemoveCommand struct{ *cmds.CommandDescription }

tasks remove

func NewTasksRemoveCommand

func NewTasksRemoveCommand() (*TasksRemoveCommand, error)

func (*TasksRemoveCommand) Run

type TasksRemoveSettings

type TasksRemoveSettings struct {
	Ticket    string `glazed:"ticket"`
	Root      string `glazed:"root"`
	TasksFile string `glazed:"tasks-file"`
	IDs       []int  `glazed:"id"`
}

type TasksUncheckCommand

type TasksUncheckCommand struct{ *cmds.CommandDescription }

tasks uncheck

func NewTasksUncheckCommand

func NewTasksUncheckCommand() (*TasksUncheckCommand, error)

func (*TasksUncheckCommand) Run

type TasksUncheckSettings

type TasksUncheckSettings struct {
	Ticket    string `glazed:"ticket"`
	Root      string `glazed:"root"`
	TasksFile string `glazed:"tasks-file"`
	IDs       []int  `glazed:"id"`
	Match     string `glazed:"match"`
}

type TemplateValidateCommand added in v0.0.2

type TemplateValidateCommand struct {
	*cmds.CommandDescription
}

TemplateValidateCommand validates template files

func NewTemplateValidateCommand added in v0.0.2

func NewTemplateValidateCommand() (*TemplateValidateCommand, error)

func (*TemplateValidateCommand) Run added in v0.0.2

func (c *TemplateValidateCommand) Run(
	ctx context.Context,
	parsedValues *values.Values,
) error

func (*TemplateValidateCommand) RunIntoGlazeProcessor added in v0.0.2

func (c *TemplateValidateCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type TemplateValidateSettings added in v0.0.2

type TemplateValidateSettings struct {
	Root    string `glazed:"root"`
	Path    string `glazed:"path"`
	Verbose bool   `glazed:"verbose"`
}

TemplateValidateSettings holds the parameters for the template validate command

type TicketCloseCommand added in v0.0.2

type TicketCloseCommand struct {
	*cmds.CommandDescription
}

TicketCloseCommand closes a ticket by updating status, optional intent, and changelog

func NewTicketCloseCommand added in v0.0.2

func NewTicketCloseCommand() (*TicketCloseCommand, error)

func (*TicketCloseCommand) Run added in v0.0.2

func (c *TicketCloseCommand) Run(
	ctx context.Context,
	parsedValues *values.Values,
) error

Run implements BareCommand for human-friendly output

func (*TicketCloseCommand) RunIntoGlazeProcessor added in v0.0.2

func (c *TicketCloseCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type TicketCloseSettings added in v0.0.2

type TicketCloseSettings struct {
	Ticket         string `glazed:"ticket"`
	Root           string `glazed:"root"`
	Status         string `glazed:"status"`
	Intent         string `glazed:"intent"`
	ChangelogEntry string `glazed:"changelog-entry"`
}

TicketCloseSettings holds the parameters for the ticket close command

type TicketGraphCommand added in v0.0.8

type TicketGraphCommand struct {
	*cmds.CommandDescription
}

func NewTicketGraphCommand added in v0.0.8

func NewTicketGraphCommand() (*TicketGraphCommand, error)

func (*TicketGraphCommand) Run added in v0.0.8

func (c *TicketGraphCommand) Run(
	ctx context.Context,
	parsedValues *values.Values,
) error

func (*TicketGraphCommand) RunIntoGlazeProcessor added in v0.0.8

func (c *TicketGraphCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type TicketGraphSettings added in v0.0.8

type TicketGraphSettings struct {
	Ticket             string `glazed:"ticket"`
	Root               string `glazed:"root"`
	Format             string `glazed:"format"`
	Direction          string `glazed:"direction"`
	Label              string `glazed:"label"`
	EdgeNotes          string `glazed:"edge-notes"`
	Depth              int    `glazed:"depth"`
	Scope              string `glazed:"scope"`
	ExpandFiles        bool   `glazed:"expand-files"`
	MaxNodes           int    `glazed:"max-nodes"`
	MaxEdges           int    `glazed:"max-edges"`
	BatchSize          int    `glazed:"batch-size"`
	IncludeControlDocs bool   `glazed:"include-control-docs"`
	IncludeArchived    bool   `glazed:"include-archived"`
	IncludeScriptsPath bool   `glazed:"include-scripts-path"`
}

type TicketMoveCommand added in v0.0.7

type TicketMoveCommand struct {
	*cmds.CommandDescription
}

TicketMoveCommand moves an existing ticket directory to a new path based on the current path template.

func NewTicketMoveCommand added in v0.0.7

func NewTicketMoveCommand() (*TicketMoveCommand, error)

func (*TicketMoveCommand) RunIntoGlazeProcessor added in v0.0.7

func (c *TicketMoveCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	pl *values.Values,
	gp middlewares.Processor,
) error

type TicketMoveResult added in v0.0.7

type TicketMoveResult struct {
	Ticket      string
	SourcePath  string
	DestPath    string
	CompletedAt time.Time
}

type TicketMoveSettings added in v0.0.7

type TicketMoveSettings struct {
	Root         string `glazed:"root"`
	Ticket       string `glazed:"ticket"`
	PathTemplate string `glazed:"path-template"`
	Overwrite    bool   `glazed:"overwrite"`
}

type ValidateFrontmatterCommand added in v0.0.7

type ValidateFrontmatterCommand struct {
	*cmds.CommandDescription
}

ValidateFrontmatterCommand validates YAML frontmatter for a document.

func NewValidateFrontmatterCommand added in v0.0.7

func NewValidateFrontmatterCommand() (*ValidateFrontmatterCommand, error)

func (*ValidateFrontmatterCommand) Run added in v0.0.7

func (c *ValidateFrontmatterCommand) Run(
	ctx context.Context,
	parsedValues *values.Values,
) error

func (*ValidateFrontmatterCommand) RunIntoGlazeProcessor added in v0.0.7

func (c *ValidateFrontmatterCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type ValidateFrontmatterSettings added in v0.0.7

type ValidateFrontmatterSettings struct {
	Doc          string `glazed:"doc"`
	Root         string `glazed:"root"`
	SuggestFixes bool   `glazed:"suggest-fixes"`
	AutoFix      bool   `glazed:"auto-fix"`
}

ValidateFrontmatterSettings holds parameters for validation.

type VocabAddCommand

type VocabAddCommand struct {
	*cmds.CommandDescription
}

VocabAddCommand adds a vocabulary entry

func NewVocabAddCommand

func NewVocabAddCommand() (*VocabAddCommand, error)

func (*VocabAddCommand) Run added in v0.0.2

func (c *VocabAddCommand) Run(
	ctx context.Context,
	parsedValues *values.Values,
) error

func (*VocabAddCommand) RunIntoGlazeProcessor

func (c *VocabAddCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type VocabAddResult added in v0.0.2

type VocabAddResult struct {
	Category       string
	Slug           string
	Description    string
	VocabularyPath string
	Root           string
	ConfigPath     string
}

type VocabAddSettings

type VocabAddSettings struct {
	Category    string `glazed:"category"`
	Slug        string `glazed:"slug"`
	Description string `glazed:"description"`
	Root        string `glazed:"root"`
}

VocabAddSettings holds the parameters for the vocab add command

type VocabListCommand

type VocabListCommand struct {
	*cmds.CommandDescription
}

VocabListCommand lists vocabulary entries

func NewVocabListCommand

func NewVocabListCommand() (*VocabListCommand, error)

func (*VocabListCommand) Run

func (c *VocabListCommand) Run(
	ctx context.Context,
	parsedValues *values.Values,
) error

Implement BareCommand for human-friendly output

func (*VocabListCommand) RunIntoGlazeProcessor

func (c *VocabListCommand) RunIntoGlazeProcessor(
	ctx context.Context,
	parsedValues *values.Values,
	gp middlewares.Processor,
) error

type VocabListSettings

type VocabListSettings struct {
	Category            string `glazed:"category"`
	Root                string `glazed:"root"`
	PrintTemplateSchema bool   `glazed:"print-template-schema"`
	SchemaFormat        string `glazed:"schema-format"`
}

VocabListSettings holds the parameters for the vocab list command

Jump to

Keyboard shortcuts

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