commands

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Overview

Package commands hosts the `da` subcommands. score.go provides the outcome-scoring command tree: `da score run` to score every iteration in the active log dir and write sidecars, and `da score iteration|session` to render a persisted score back. The scoring rubric and persistence live in internal/scoring; this file is presentation and CLI wiring only.

Index

Constants

This section is empty.

Variables

View Source
var Commit = ""
View Source
var Describe = ""
View Source
var Version = "dev"

Version, Commit, and Describe are set at build time via ldflags.

Functions

func ConfigureRootCommandUX

func ConfigureRootCommandUX(root *cobra.Command)

func ErrorWithHints

func ErrorWithHints(message string, hints ...string) error

func ExactArgsWithHints

func ExactArgsWithHints(n int, hints ...string) cobra.PositionalArgs

func ExampleBlock

func ExampleBlock(lines ...string) string

func MaximumNArgsWithHints

func MaximumNArgsWithHints(n int, hints ...string) cobra.PositionalArgs

func NewAddCmd

func NewAddCmd() *cobra.Command

func NewAgentsCmd

func NewAgentsCmd() *cobra.Command

NewAgentsCmd wires the agents subcommand tree.

func NewExplainCmd

func NewExplainCmd() *cobra.Command

func NewHooksCmd

func NewHooksCmd() *cobra.Command

func NewImportCmd

func NewImportCmd() *cobra.Command

func NewKGCmd

func NewKGCmd() *cobra.Command

NewKGCmd wires the kg subcommand tree with root-level flags and UX helpers.

func NewRefreshCmd

func NewRefreshCmd() *cobra.Command

NewRefreshCmd is the root-package shim that wires the lifecycle subpackage constructor with closures over the still-in-root runRefresh body and package-var seams. Follows SHAPE.md §6 (root shim preserved until t13 deletes it and switches root.go to lifecycle.NewRefreshCmd directly). See .agents/active/fold-back/t07-refresh-body-deferred.md for why the run body cannot move atomically with this PR (t04/t06 still own addDeps / importDeps in the root package).

func NewRemoveCmd

func NewRemoveCmd() *cobra.Command

func NewReviewCmd

func NewReviewCmd() *cobra.Command

func NewRootCommand

func NewRootCommand() *cobra.Command

NewRootCommand builds the root cobra command with persistent global flags and all subcommands. It mirrors cmd/da/main.go so tooling (e.g. global flag coverage) can inspect the live command tree without importing package main.

func NewScoreCmd

func NewScoreCmd() *cobra.Command

NewScoreCmd builds the `da score` command group.

func NewSessionCmd

func NewSessionCmd() *cobra.Command

NewSessionCmd builds the `da session` command group.

func NewSkillsCmd

func NewSkillsCmd() *cobra.Command

NewSkillsCmd wires the skills subcommand tree. Thin shim preserved for source-compat with root.go and external callers.

func NewSyncCmd

func NewSyncCmd() *cobra.Command

func NewWorkflowCmd

func NewWorkflowCmd() *cobra.Command

NewWorkflowCmd builds the `da workflow` command tree.

func NoArgsWithHints

func NoArgsWithHints(hints ...string) cobra.PositionalArgs

func RangeArgsWithHints

func RangeArgsWithHints(min, max int, hints ...string) cobra.PositionalArgs

func RenderCommandError

func RenderCommandError(w io.Writer, root *cobra.Command, argv []string, err error)

func UsageError

func UsageError(message string, hints ...string) error

func WorkflowBridgeDeps

func WorkflowBridgeDeps() wf.Deps

WorkflowBridgeDeps wires workflow CLI handlers to commands UX helpers and global flags (also used by workflow package tests).

Types

type CLIError

type CLIError struct {
	Message   string
	Hints     []string
	ShowUsage bool
	Cause     error
}

CLIError carries actionable hints for user-facing command failures.

func (*CLIError) Error

func (e *CLIError) Error() string

func (*CLIError) Unwrap

func (e *CLIError) Unwrap() error

type GlobalFlags

type GlobalFlags struct {
	DryRun  bool
	Force   bool
	Verbose bool
	Yes     bool
	JSON    bool
}

GlobalFlags holds flags shared across commands.

var Flags GlobalFlags

Directories

Path Synopsis
Package config implements the `da config` command subtree.
Package config implements the `da config` command subtree.
internal
cmdutil
Package cmdutil holds shared helpers for the commands/* CLI tree.
Package cmdutil holds shared helpers for the commands/* CLI tree.
lifecycle
Package lifecycle hosts the project-lifecycle command cluster extracted from the root commands package as part of the root-command-decomposition plan (SHAPE.md §1, §4a).
Package lifecycle hosts the project-lifecycle command cluster extracted from the root commands package as part of the root-command-decomposition plan (SHAPE.md §1, §4a).
mcp
Package mcp owns the `da mcp` subcommand tree.
Package mcp owns the `da mcp` subcommand tree.
settings
Package settings hosts the `da settings` command tree.
Package settings hosts the `da settings` command tree.
close_task.go wires `da workflow close-task`, the T1-molecule client command that composes the end-of-iteration primitive chain:
close_task.go wires `da workflow close-task`, the T1-molecule client command that composes the end-of-iteration primitive chain:

Jump to

Keyboard shortcuts

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