cli/cmd/ai/commands.go
Snider 1f452c6602 docs: update package docblocks across all cmd/ packages
Add comprehensive package-level documentation to all CLI command packages:
- cmd/core.go, core_ci.go, core_dev.go: Main CLI entry points
- cmd/shared: Lipgloss styles and utility functions
- cmd/ai: AI agent task management and Claude integration
- cmd/dev: Multi-repo git workflows and GitHub integration
- cmd/build, cmd/ci: Build and release automation
- cmd/sdk: OpenAPI validation and compatibility
- cmd/go: Go development tools with enhanced output
- cmd/php: Laravel development, build, and deployment
- cmd/docs: Documentation sync across repos
- cmd/doctor: Environment validation
- cmd/test: Test runner with coverage
- cmd/pkg: GitHub package management
- cmd/setup: Workspace initialisation
- cmd/vm: LinuxKit VM management

Each docblock now describes:
- Package purpose and commands
- Key features and configuration
- Package naming notes where relevant (gocmd, testcmd)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 18:27:33 +00:00

69 lines
2.5 KiB
Go

// Package ai provides AI agent task management and Claude Code integration.
//
// Commands:
// - tasks: List tasks from the agentic service
// - task: View, claim, or auto-select tasks
// - task:update: Update task status and progress
// - task:complete: Mark tasks as completed or failed
// - task:commit: Create commits with task references
// - task:pr: Create pull requests linked to tasks
// - claude: Claude Code CLI integration (planned)
package ai
import "github.com/leaanthony/clir"
// AddCommands registers the 'ai' command and all subcommands.
func AddCommands(app *clir.Cli) {
aiCmd := app.NewSubCommand("ai", "AI agent task management")
aiCmd.LongDescription("Manage tasks from the core-agentic service for AI-assisted development.\n\n" +
"Commands:\n" +
" tasks List tasks (filterable by status, priority, labels)\n" +
" task View task details or auto-select highest priority\n" +
" task:update Update task status or progress\n" +
" task:complete Mark task as completed or failed\n" +
" task:commit Create git commit with task reference\n" +
" task:pr Create GitHub PR linked to task\n" +
" claude Claude Code integration\n\n" +
"Workflow:\n" +
" core ai tasks # List pending tasks\n" +
" core ai task --auto --claim # Auto-select and claim a task\n" +
" core ai task:commit <id> -m 'msg' # Commit with task reference\n" +
" core ai task:complete <id> # Mark task done")
// Add Claude command
addClaudeCommand(aiCmd)
// Add agentic task commands
AddAgenticCommands(aiCmd)
}
// addClaudeCommand adds the 'claude' subcommand for Claude Code integration.
func addClaudeCommand(parent *clir.Command) {
claudeCmd := parent.NewSubCommand("claude", "Claude Code integration")
claudeCmd.LongDescription("Tools for working with Claude Code.\n\n" +
"Commands:\n" +
" run Run Claude in the current directory\n" +
" config Manage Claude configuration")
// core ai claude run
runCmd := claudeCmd.NewSubCommand("run", "Run Claude Code in the current directory")
runCmd.Action(func() error {
return runClaudeCode()
})
// core ai claude config
configCmd := claudeCmd.NewSubCommand("config", "Manage Claude configuration")
configCmd.Action(func() error {
return showClaudeConfig()
})
}
func runClaudeCode() error {
// Placeholder - will integrate with claude CLI
return nil
}
func showClaudeConfig() error {
// Placeholder - will show claude configuration
return nil
}