Documentation
¶
Index ¶
- func BuildProjectReviewSeed(root string) string
- func HasReviewableArtifacts(root string) bool
- type DoneTask
- type PipelineState
- type ResumableTask
- type TaskRunner
- func (tr *TaskRunner) AgentDurations() map[bus.AgentRole]time.Duration
- func (tr *TaskRunner) Approve()
- func (tr *TaskRunner) CodingStarted() time.Time
- func (tr *TaskRunner) CurrentState() PipelineState
- func (tr *TaskRunner) Regenerate()
- func (tr *TaskRunner) Resume(ctx context.Context) error
- func (tr *TaskRunner) ResumeBuildFix(ctx context.Context) error
- func (tr *TaskRunner) Run(ctx context.Context, taskInput string) error
- func (tr *TaskRunner) SendHumanReply(msg string)
- func (tr *TaskRunner) SetInteractive(v bool)
- type TaskScope
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildProjectReviewSeed ¶
BuildProjectReviewSeed reads the key .decsr artifacts (curated files plus recent task memory) and produces a task-input string that instructs the PM to comb the existing planning files, compare them against the current repository state, and plan ONLY the work that remains. Returns "" when no artifacts are present.
func HasReviewableArtifacts ¶
HasReviewableArtifacts reports whether the project's .decsr workspace holds any planning artifacts the PM could use to resume the project. This includes the curated top-level files AND the persistent task memory under .decsr/memory/ (which is what survives after a completed/failed run).
Types ¶
type PipelineState ¶
type PipelineState string
PipelineState represents the current phase of the pipeline.
const ( PipelineIdle PipelineState = "idle" PipelinePM PipelineState = "pm" PipelineCompacting PipelineState = "compacting" PipelineNegotiating PipelineState = "negotiating" PipelineResearch PipelineState = "research" PipelinePlanning PipelineState = "planning" PipelineCoding PipelineState = "coder" PipelinePoC PipelineState = "poc" PipelineQATests PipelineState = "qa_tests" PipelineQAReview PipelineState = "qa_review" PipelineUXReviewing PipelineState = "ux_reviewer" PipelineSecurity PipelineState = "security" PipelineDone PipelineState = "done" PipelineGate PipelineState = "human_gate" PipelineRateLimited PipelineState = "rate_limited" )
type ResumableTask ¶
ResumableTask describes an interrupted run that can be resumed.
func Resumable ¶
func Resumable(ctx context.Context, root string) (ResumableTask, bool)
Resumable reports whether root has an interrupted decsr task that can be resumed: an in_progress top-level decsr-task bead whose id matches the run-state sidecar, with the spec and sub-task plan still present. Returns (task, true) when resumable. Beads is the source of truth; the sidecars are a cross-check.
type TaskRunner ¶
type TaskRunner struct {
// contains filtered or unexported fields
}
TaskRunner is the unified decsr that treats everything as a task. All work flows through: negotiate → decompose → per-bead (QA tests → coder) → quality review → PM arbitrate → done.
func NewTaskRunner ¶
func NewTaskRunner( b *bus.Bus, agents map[bus.AgentRole]agent.Agent, cfg config.Config, ws artifacts.Workspace, root string, ) *TaskRunner
NewTaskRunner creates a TaskRunner with all agent dependencies.
func (*TaskRunner) AgentDurations ¶
func (tr *TaskRunner) AgentDurations() map[bus.AgentRole]time.Duration
AgentDurations returns cumulative wall-clock time each agent has spent running.
func (*TaskRunner) Approve ¶
func (tr *TaskRunner) Approve()
Approve unblocks the task spec approval gate.
func (*TaskRunner) CodingStarted ¶
func (tr *TaskRunner) CodingStarted() time.Time
CodingStarted returns the timestamp when the coder was first invoked.
func (*TaskRunner) CurrentState ¶
func (tr *TaskRunner) CurrentState() PipelineState
CurrentState returns the current pipeline state.
func (*TaskRunner) Regenerate ¶
func (tr *TaskRunner) Regenerate()
Regenerate signals the TaskRunner to re-negotiate.
func (*TaskRunner) Resume ¶
func (tr *TaskRunner) Resume(ctx context.Context) error
Resume continues an interrupted task: it loads the top-level bead, spec and sub-task plan from the workspace, skips negotiate/decompose, and finishes the remaining (open or interrupted) sub-tasks. Use Resumable() to check first.
func (*TaskRunner) ResumeBuildFix ¶
func (tr *TaskRunner) ResumeBuildFix(ctx context.Context) error
ResumeBuildFix re-runs the coder's build-and-fix loop using the current project files on disk. Use after a build-fix failure to give the coder another round of attempts without restarting the whole task pipeline.
func (*TaskRunner) Run ¶
func (tr *TaskRunner) Run(ctx context.Context, taskInput string) error
Run executes the full task lifecycle: 1. Negotiate with PM (human in the loop) 2. PM plans execution strategy (autonomous) 3. Execute: code → quality gate (fully autonomous)
func (*TaskRunner) SendHumanReply ¶
func (tr *TaskRunner) SendHumanReply(msg string)
SendHumanReply delivers a user message during the negotiation phase.
func (*TaskRunner) SetInteractive ¶
func (tr *TaskRunner) SetInteractive(v bool)
SetInteractive controls whether human gates block for approval. Plain mode sets this to false so the context pack is auto-approved and the supplied task description is used without prompting.