grokkit/internal/workon/workon.go
Greg Gauthier 9080cf7f3e feat(workon): add initial workon command for starting todo items
Introduces the `workon` CLI command which selects the next queued todo item,
moves it to doing/, creates a git branch, generates a work plan via Grok,
appends it to the file, and commits the changes. Includes skeleton implementation
with TODOs for full functionality.
2026-03-31 20:30:05 +01:00

36 lines
970 B
Go

package workon
import (
_ "gmgauthier.com/grokkit/internal/errors"
"gmgauthier.com/grokkit/internal/logger"
// TODO: import todo, git, grok packages as we build them
)
// Run executes the full workon transaction
func Run() error {
logger.Info("Bootstrapping todo structure if needed...")
// TODO: todo.BootstrapIfMissing()
logger.Info("Selecting next queued item...")
// TODO: item, err := todo.NextQueued()
// if err != nil { return err }
logger.Info("Moving item to doing/ and creating branch...")
// TODO: branchName, err := todo.MoveToDoingAndCreateBranch(item)
logger.Info("Generating Work Plan via Grok...")
// TODO: plan, err := grok.GenerateWorkPlan(item)
logger.Info("Appending plan to todo file...")
// TODO: err = todo.AppendWorkPlan(item, plan)
logger.Info("Committing changes...")
// TODO: err = git.CommitWorkonChanges(branchName, item)
logger.Info("Optional post-steps (cnadd, open IDE)...")
// TODO: postSteps()
return nil
}