Documentation
¶
Index ¶
- func ArchiveCurrentPlan(workspaceDir string) (string, error)
- func ArchiveDirPath(workspaceDir string) string
- func AutoArchiveIfDone(workspaceDir string) (bool, string, error)
- func CurrentPlanPath(workspaceDir string) string
- func RenderMarkdownPlan(p *Plan) string
- func SaveCurrentPlan(workspaceDir string, p *Plan) error
- type Plan
- type PlanStep
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArchiveCurrentPlan ¶ added in v0.1.8
ArchiveCurrentPlan moves a completed current_plan.md to .brocode/plans/archive/ and cleans up current_plan.md so no stale tasks linger.
func ArchiveDirPath ¶ added in v0.1.8
ArchiveDirPath returns the directory path for archived completed plans.
func AutoArchiveIfDone ¶ added in v0.1.8
AutoArchiveIfDone archives the plan if all steps have been marked done.
func CurrentPlanPath ¶ added in v0.1.8
CurrentPlanPath returns the file path for the live active plan.
func RenderMarkdownPlan ¶ added in v0.1.8
RenderMarkdownPlan formats a Plan into standard GitHub-flavored Markdown.
func SaveCurrentPlan ¶ added in v0.1.8
SaveCurrentPlan writes the active plan into .brocode/current_plan.md. If an existing plan with a different goal was active, it safely archives the previous plan into .brocode/plans/archive/ first so past tasks are never lost.
Types ¶
type Plan ¶
type Plan struct {
Goal string `json:"goal"`
Status string `json:"status"` // "ACTIVE" | "IN_PROGRESS" | "COMPLETED"
CreatedAt time.Time `json:"created_at"`
Steps []PlanStep `json:"steps"`
Files []string `json:"files,omitempty"`
}
Plan represents an explicit execution plan for complex multi-file tasks.
func LoadCurrentPlan ¶ added in v0.1.8
LoadCurrentPlan reads and parses .brocode/current_plan.md if it exists.
func MarkStepsDoneByEditedFiles ¶ added in v0.1.8
MarkStepsDoneByEditedFiles matches edited file paths against step descriptions, marking matching steps as done and saving the updated plan.
func ParseMarkdownPlan ¶ added in v0.1.8
ParseMarkdownPlan extracts goal, status, checklist tasks, and impacted files.
func (*Plan) IsAllStepsDone ¶ added in v0.1.8
IsAllStepsDone checks if all steps in the plan have been marked done.