planning

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package planning implements plan mode for structured task execution. Plans are stored on disk so users can edit them in their IDE. The plan is read at exit time, not kept in memory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PlanMode

type PlanMode struct {
	Active   bool   `json:"active"`
	PlanPath string `json:"plan_path"`
	Steps    []PlanStep
}

PlanMode manages the plan mode state machine.

func NewPlanMode

func NewPlanMode() *PlanMode

NewPlanMode creates a new inactive PlanMode.

func (*PlanMode) Enter

func (pm *PlanMode) Enter(planPath string)

Enter activates plan mode with the given file path.

func (*PlanMode) Exit

func (pm *PlanMode) Exit() (*PlanMode, error)

Exit reads the plan from disk, parses it, deactivates plan mode, and returns the final state.

func (*PlanMode) IsActive

func (pm *PlanMode) IsActive() bool

IsActive returns whether plan mode is currently active.

func (*PlanMode) ReadPlan

func (pm *PlanMode) ReadPlan() (string, error)

ReadPlan reads the plan file from disk, allowing users to edit it externally.

func (*PlanMode) WritePlan

func (pm *PlanMode) WritePlan(content string) error

WritePlan writes content to the plan file on disk.

type PlanStep

type PlanStep struct {
	Description string `json:"description"`
	Status      string `json:"status"` // "pending", "in_progress", "done", "skipped"
}

PlanStep represents a single step in a plan.

func ParseSteps

func ParseSteps(content string) []PlanStep

ParseSteps parses markdown checklist lines into PlanSteps. Supports: - [ ] pending, - [x] done, - [~] skipped, - [>] in_progress

Jump to

Keyboard shortcuts

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