radioactive_ralph¶
import "github.com/jbcom/radioactive-ralph/cmd/radioactive_ralph"
Command radioactive_ralph is the radioactive-ralph CLI entry point.
Ralph is a per-repo runtime binary with multiple built-in personas. The runtime ships provider bindings for claude, codex, and gemini today, while keeping the product contract provider-oriented rather than provider-branded. See https://github.com/jbcom/radioactive-ralph for the full rationale and architecture plan.
Index¶
Variables¶
Version is set by GoReleaser at build time via -ldflags.
var (
Version = "dev"
Commit = "none"
Date = "unknown"
)
type AttachCmd¶
AttachCmd is `radioactive_ralph attach`.
type AttachCmd struct {
RepoRoot string `help:"Repo root. Defaults to cwd." type:"path"`
Raw bool `help:"Emit raw JSON-line event frames instead of the default one-line summary."`
}
func (*AttachCmd) Run¶
func (c *AttachCmd) Run(rc *runContext) error
Run streams events from the repo service until the operator cancels.
type DoctorCmd¶
DoctorCmd is `radioactive_ralph doctor`.
type DoctorCmd struct{}
func (*DoctorCmd) Run¶
func (c *DoctorCmd) Run(rc *runContext) error
Run prints the doctor report.
type InitCmd¶
InitCmd is `radioactive_ralph init`.
type InitCmd struct {
RepoRoot string `help:"Repo root to initialize. Defaults to cwd." type:"path" default:""`
Force bool `help:"Overwrite existing config.toml."`
Refresh bool `help:"Re-write config while preserving existing repo settings."`
Yes bool `help:"No-op compatibility flag; init is non-interactive."`
}
func (*InitCmd) Run¶
func (c *InitCmd) Run(rc *runContext) error
Run executes the init subcommand.
type PlanApprovalsCmd¶
PlanApprovalsCmd implements `plan approvals`.
type PlanApprovalsCmd struct{}
func (*PlanApprovalsCmd) Run¶
func (c *PlanApprovalsCmd) Run(rc *runContext) error
type PlanApproveCmd¶
PlanApproveCmd implements `plan approve <plan> <task>`.
type PlanApproveCmd struct {
PlanIDOrSlug string `arg:"" help:"Plan UUID or slug."`
TaskID string `arg:"" help:"Task id within the plan."`
}
func (*PlanApproveCmd) Run¶
func (c *PlanApproveCmd) Run(rc *runContext) error
type PlanBlockedCmd¶
PlanBlockedCmd implements `plan blocked`.
type PlanBlockedCmd struct{}
func (*PlanBlockedCmd) Run¶
func (c *PlanBlockedCmd) Run(rc *runContext) error
type PlanCmd¶
PlanCmd is `radioactive_ralph plan <sub>`. This is the durable plan-DAG surface — direct CRUD against the SQLite store under $XDG_STATE_HOME/radioactive_ralph/.
type PlanCmd struct {
Ls PlanLsCmd `cmd:"" help:"List plans for this repo by default. Use --all-repos to widen the view."`
Show PlanShowCmd `cmd:"" help:"Show one plan's tasks and current ready set."`
Next PlanNextCmd `cmd:"" help:"Print the next ready task for a plan (without claiming it)."`
Tasks PlanTasksCmd `cmd:"" help:"List tasks for one plan."`
Approvals PlanApprovalsCmd `cmd:"" help:"List tasks in this repo waiting for operator approval."`
Blocked PlanBlockedCmd `cmd:"" help:"List tasks in this repo that are blocked or waiting on more context."`
Approve PlanApproveCmd `cmd:"" help:"Approve a task and return it to the runnable queue."`
Requeue PlanRequeueCmd `cmd:"" help:"Requeue a blocked/failed task back into the runnable queue."`
Handoff PlanHandoffCmd `cmd:"" help:"Hand a blocked/failed task to a different variant."`
Retry PlanRetryCmd `cmd:"" help:"Retry a blocked or failed task."`
Fail PlanFailCmd `cmd:"" help:"Force-fail a task from the operator surface."`
History PlanHistoryCmd `cmd:"" help:"Show recent task events for one task."`
// Import seeds a plan from a JSON file. Used during the
// dogfooding bootstrap before fixit owns full durable planning.
Import PlanImportCmd `cmd:"" help:"Import tasks into a new plan from a JSON file."`
// MarkDone lets an operator (or shell script acting as one)
// close out a task manually while we bootstrap.
MarkDone PlanMarkDoneCmd `cmd:"mark-done" help:"Mark a running task as done."`
}
type PlanFailCmd¶
PlanFailCmd implements `plan fail <plan> <task>`.
type PlanFailCmd struct {
PlanIDOrSlug string `arg:"" help:"Plan UUID or slug."`
TaskID string `arg:"" help:"Task id within the plan."`
Reason string `help:"Operator reason for force-failing the task."`
}
func (*PlanFailCmd) Run¶
func (c *PlanFailCmd) Run(rc *runContext) error
type PlanHandoffCmd¶
PlanHandoffCmd implements `plan handoff <plan> <task> <variant>`.
type PlanHandoffCmd struct {
PlanIDOrSlug string `arg:"" help:"Plan UUID or slug."`
TaskID string `arg:"" help:"Task id within the plan."`
Variant string `arg:"" help:"Variant to hint for the next run."`
Reason string `help:"Operator reason for the handoff."`
RequireApproval bool `help:"Keep the task approval-gated after the handoff."`
}
func (*PlanHandoffCmd) Run¶
func (c *PlanHandoffCmd) Run(rc *runContext) error
type PlanHistoryCmd¶
PlanHistoryCmd implements `plan history <plan> <task>`.
type PlanHistoryCmd struct {
PlanIDOrSlug string `arg:"" help:"Plan UUID or slug."`
TaskID string `arg:"" help:"Task id within the plan."`
Limit int `help:"Maximum number of events to show." default:"20"`
}
func (*PlanHistoryCmd) Run¶
func (c *PlanHistoryCmd) Run(rc *runContext) error
type PlanImportCmd¶
PlanImportCmd implements `plan import <json-file>`.
type PlanImportCmd struct {
Path string `arg:"" help:"Path to JSON file."`
}
func (*PlanImportCmd) Run¶
func (c *PlanImportCmd) Run(rc *runContext) error
type PlanLsCmd¶
PlanLsCmd implements `plan ls`.
type PlanLsCmd struct {
All bool `help:"Include archived + abandoned plans."`
AllRepos bool `help:"Include plans from every repo in the operator state dir."`
}
func (*PlanLsCmd) Run¶
func (c *PlanLsCmd) Run(rc *runContext) error
type PlanMarkDoneCmd¶
PlanMarkDoneCmd implements `plan mark-done <plan> <task>`.
type PlanMarkDoneCmd struct {
PlanIDOrSlug string `arg:"" help:"Plan UUID or slug."`
TaskID string `arg:"" help:"Task id within the plan."`
Evidence string `help:"Evidence payload (JSON or short string)."`
}
func (*PlanMarkDoneCmd) Run¶
func (c *PlanMarkDoneCmd) Run(rc *runContext) error
type PlanNextCmd¶
PlanNextCmd implements `plan next <id-or-slug>`.
type PlanNextCmd struct {
IDOrSlug string `arg:"" help:"Plan UUID or slug."`
JSON bool `help:"Emit the next task as JSON instead of human-readable."`
}
func (*PlanNextCmd) Run¶
func (c *PlanNextCmd) Run(rc *runContext) error
type PlanRequeueCmd¶
PlanRequeueCmd implements `plan requeue <plan> <task>`.
type PlanRequeueCmd struct {
PlanIDOrSlug string `arg:"" help:"Plan UUID or slug."`
TaskID string `arg:"" help:"Task id within the plan."`
Reason string `help:"Operator reason for requeueing the task."`
VariantHint string `help:"Optional new variant hint for the requeued task."`
RequireApproval bool `help:"Return the task to approval-gated state instead of runnable pending."`
}
func (*PlanRequeueCmd) Run¶
func (c *PlanRequeueCmd) Run(rc *runContext) error
type PlanRetryCmd¶
PlanRetryCmd implements `plan retry <plan> <task>`.
type PlanRetryCmd struct {
PlanIDOrSlug string `arg:"" help:"Plan UUID or slug."`
TaskID string `arg:"" help:"Task id within the plan."`
Reason string `help:"Operator reason for retrying the task."`
}
func (*PlanRetryCmd) Run¶
func (c *PlanRetryCmd) Run(rc *runContext) error
type PlanShowCmd¶
PlanShowCmd implements `plan show <id-or-slug>`.
type PlanShowCmd struct {
IDOrSlug string `arg:"" help:"Plan UUID or slug."`
}
func (*PlanShowCmd) Run¶
func (c *PlanShowCmd) Run(rc *runContext) error
type PlanTasksCmd¶
PlanTasksCmd implements `plan tasks <id-or-slug>`.
type PlanTasksCmd struct {
IDOrSlug string `arg:"" help:"Plan UUID or slug."`
Status []string `help:"Only include these task statuses (repeatable)."`
}
func (*PlanTasksCmd) Run¶
func (c *PlanTasksCmd) Run(rc *runContext) error
type RunCmd¶
RunCmd is `radioactive_ralph run –variant X`.
type RunCmd struct {
Variant string `help:"Variant name (blue, grey, green, red, professor, fixit, immortal, savage, old-man, world-breaker)." required:""`
RepoRoot string `help:"Repo root. Defaults to cwd." type:"path"`
SpendCapUSD float64 `help:"Spend cap for variants that require one." name:"spend-cap-usd"`
ConfirmBurnBudget bool `help:"Confirmation gate for savage." name:"confirm-burn-budget"`
ConfirmNoMercy bool `help:"Confirmation gate for old-man." name:"confirm-no-mercy"`
ConfirmBurnEverything bool `help:"Confirmation gate for world-breaker." name:"confirm-burn-everything"`
// Fixit-only flags.
Advise bool `help:"(fixit only) Run in advisor mode: scan the codebase, write .radioactive-ralph/plans/<topic>-advisor.md, and sync the first durable DAG plan for this repo. Auto-enabled when no active plan exists for this repo."`
Topic string `help:"(fixit --advise only) Slug used for the output filename (plans/<topic>-advisor.md). Defaults to 'general'."`
Description string `help:"(fixit --advise only) Free-form operator goal. Overrides TOPIC.md. Passed verbatim to the provider subprocess."`
AutoHandoff bool `help:"(fixit --advise only) When the recommendation has no tradeoffs, start the recommended variant automatically."`
// Advisor refinement thresholds. Operators can also set these in
// .radioactive-ralph/config.toml under [variants.fixit].
MaxIterations int `help:"(fixit --advise only) Max refinement passes. Default 3."`
MinConfidence int `help:"(fixit --advise only) Confidence threshold for accepting a proposal without refinement. Default 70."`
PlanModel string `help:"(fixit --advise only) Provider model tier for planning. Default opus."`
PlanEffort string `help:"(fixit --advise only) Reasoning-effort level for planning (low/medium/high/max). Default high."`
}
func (*RunCmd) Run¶
func (c *RunCmd) Run(rc *runContext) error
Run executes one bounded variant attached to the current terminal.
type ServiceCmd¶
ServiceCmd is `radioactive_ralph service <subcommand>`.
type ServiceCmd struct {
Start ServiceStartCmd `cmd:"" help:"Launch the durable repo service in the foreground."`
Install ServiceInstallCmd `cmd:"" help:"Install the repo service definition for the current platform."`
Uninstall ServiceUninstallCmd `cmd:"" help:"Remove the repo service definition for the current platform."`
List ServiceListCmd `cmd:"" help:"List installed repo service definitions."`
Status ServiceStatusCmd `cmd:"" help:"Show service-manager status for the current platform."`
WindowsRun ServiceWindowsRunCmd `cmd:"run-windows" help:"Run as a native Windows service host." hidden:""`
}
type ServiceInstallCmd¶
ServiceInstallCmd wires the service.Install filesystem operation.
type ServiceInstallCmd struct {
RepoRoot string `help:"Repo root. Defaults to cwd." type:"path"`
RalphBin string `help:"Absolute path to the radioactive_ralph binary. Defaults to the currently-running executable." name:"radioactive_ralph-bin"`
Env []string `help:"KEY=VALUE env vars to inject into the service unit (repeatable)."`
}
func (*ServiceInstallCmd) Run¶
func (c *ServiceInstallCmd) Run(_ *runContext) error
type ServiceListCmd¶
ServiceListCmd lists installed repo service definitions.
type ServiceListCmd struct{}
func (*ServiceListCmd) Run¶
func (c *ServiceListCmd) Run(_ *runContext) error
type ServiceStartCmd¶
ServiceStartCmd runs the durable repo-scoped runtime.
type ServiceStartCmd struct {
RepoRoot string `help:"Repo root. Defaults to cwd." type:"path"`
Foreground bool `help:"Run in the foreground. Service units pass this explicitly." hidden:""`
}
func (*ServiceStartCmd) Run¶
func (c *ServiceStartCmd) Run(rc *runContext) error
type ServiceStatusCmd¶
ServiceStatusCmd invokes the platform service manager for live status.
type ServiceStatusCmd struct {
RepoRoot string `help:"Repo root. Defaults to cwd." type:"path"`
}
func (*ServiceStatusCmd) Run¶
func (c *ServiceStatusCmd) Run(_ *runContext) error
type ServiceUninstallCmd¶
ServiceUninstallCmd removes an installed unit.
type ServiceUninstallCmd struct {
RepoRoot string `help:"Repo root. Defaults to cwd." type:"path"`
}
func (*ServiceUninstallCmd) Run¶
func (c *ServiceUninstallCmd) Run(_ *runContext) error
type ServiceWindowsRunCmd¶
ServiceWindowsRunCmd exists so the command tree stays buildable on every platform; only Windows uses it.
type ServiceWindowsRunCmd struct{}
func (*ServiceWindowsRunCmd) Run¶
func (c *ServiceWindowsRunCmd) Run(_ *runContext) error
type StatusCmd¶
StatusCmd is `radioactive_ralph status`.
type StatusCmd struct {
RepoRoot string `help:"Repo root. Defaults to cwd." type:"path"`
JSON bool `help:"Emit status as JSON instead of the default text table."`
}
func (*StatusCmd) Run¶
func (c *StatusCmd) Run(rc *runContext) error
Run dials the repo service socket and prints the status reply.
type StopCmd¶
StopCmd is `radioactive_ralph stop`.
type StopCmd struct {
RepoRoot string `help:"Repo root. Defaults to cwd." type:"path"`
}
func (*StopCmd) Run¶
func (c *StopCmd) Run(rc *runContext) error
Run asks the repo service to shut down gracefully.
type TUICmd¶
type TUICmd struct {
RepoRoot string `help:"Repo root. Defaults to cwd." type:"path"`
NoAutostart bool `help:"Do not auto-launch the repo service if it is not already running." name:"no-autostart"`
}
func (*TUICmd) Run¶
func (c *TUICmd) Run(_ *runContext) error
Generated by gomarkdoc