extract

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

Documentation

Overview

Package extract pulls structured sections from loaded context files for inclusion in agent context packets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActiveTasks

func ActiveTasks(ctx *entity.Context) []string

ActiveTasks extracts unchecked task items from TASKS.md.

Parameters:

  • ctx: Loaded context containing the files

Returns:

  • []string: List of active tasks with "- [ ]" prefix; nil if the file is not found

func BulletItems

func BulletItems(content string, limit int) []string

BulletItems extracts Markdown bullet items up to a limit.

Skips empty items and lines starting with "#" (headers).

Parameters:

  • content: Markdown content to parse
  • limit: Maximum number of items to return

Returns:

  • []string: Bullet item text without the "- " prefix

func CheckboxItems

func CheckboxItems(content string) []string

CheckboxItems extracts text from Markdown checkbox items.

Matches both checked "- [x]" and unchecked "- [ ]" items.

Parameters:

  • content: Markdown content to parse

Returns:

  • []string: Text content of each checkbox item

func ConstitutionRules

func ConstitutionRules(ctx *entity.Context) []string

ConstitutionRules extracts checkbox items from CONSTITUTION.md.

Parameters:

  • ctx: Loaded context containing the files

Returns:

  • []string: List of constitution rules; nil if the file is not found

func UncheckedTasks

func UncheckedTasks(content string) []string

UncheckedTasks extracts unchecked Markdown checkbox items.

Only matches "- [ ]" items (not checked). Returns items with the "- [ ]" prefix preserved for display.

Parameters:

  • content: Markdown content to parse

Returns:

  • []string: Unchecked task items with "- [ ]" prefix

Types

This section is empty.

Jump to

Keyboard shortcuts

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