core

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

Documentation

Overview

Package core provides the compact command's CLI-specific orchestration. Shared helpers for task block parsing, archival, and text cleanup live in internal/tidy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompactTasks

func CompactTasks(
	cmd *cobra.Command, ctx *entity.Context, archive bool,
) (int, error)

CompactTasks moves completed tasks to the "Completed" section in TASKS.md.

Scans TASKS.md for checked items ("- [x]") outside the Completed section, including their nested content (indented lines below the task). This only moves tasks where all nested subtasks are also complete. Optionally archives them to .context/archive/.

Parameters:

  • cmd: Cobra command for output messages
  • ctx: Loaded context containing the files
  • archive: If true, write completed tasks to a dated archive file

Returns:

  • int: Number of tasks moved
  • error: Non-nil if file write fails

Types

This section is empty.

Jump to

Keyboard shortcuts

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