Documentation
¶
Overview ¶
Package agents defines the multi-agent pipeline that turns a raw job posting into a human-approvable application draft. Each agent is a small, focused step (research, write, review). Real LLM-backed implementations can replace these stubs without changing the orchestrator.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
Agent is a single step in the pipeline. Run mutates p in place and returns a short log line describing what it did.
type AgentLog ¶
AgentLog records the work one agent did. We surface this to the user so the pipeline is auditable and not a black box.
type Options ¶
Options tunes the default pipeline. The zero value is valid: nil LLM means the writer uses its deterministic template, which keeps v0.1 behavior.
type Orchestrator ¶
type Orchestrator struct {
// contains filtered or unexported fields
}
Orchestrator runs a fixed sequence of agents and streams progress to w. Cancellation via ctx is honored between steps.
func NewOrchestrator ¶
func NewOrchestrator(w io.Writer, extra ...Agent) *Orchestrator
NewOrchestrator wires up the default research -> write -> review pipeline with no LLM. Existing callers (and v0.1 tests) keep working unchanged. Pass extra agents to extend the sequence.
func NewOrchestratorWithOptions ¶
func NewOrchestratorWithOptions(w io.Writer, opts Options) *Orchestrator
NewOrchestratorWithOptions is the explicit constructor. The CLI uses this to inject an LLM client read from config.json.
type Pipeline ¶
type Pipeline struct {
Job job.Job
Profile profile.Profile
ResumePath string // absolute path of the user's active resume, if any
ResumeName string // original filename, used in the draft
ResumeSnippet string // up to N UTF-8 runes of plain-text resume content, when readable
Findings []string
Draft string
DraftSource string // "llm:<provider>" or "template"
Critique []string
Score int
AgentLogs []AgentLog
}
Pipeline is the shared, mutable context the agents pass between each other. Keeping it explicit (rather than a sea of method args) makes it obvious what each agent reads and writes.
type Researcher ¶
type Researcher struct{}
Researcher synthesizes lightweight findings about the job and how the user's profile lines up with it. This is a heuristic stub today; a future version can call an LLM or pull external pages.
func (Researcher) Name ¶
func (Researcher) Name() string
type Reviewer ¶
type Reviewer struct{}
Reviewer critiques the writer's draft against simple quality heuristics (length, placeholders, profile completeness) and emits a score in [0,100]. A future LLM-backed reviewer can replace this without touching the orchestrator.
type Writer ¶
type Writer struct {
// LLM is optional. When nil the writer uses its template directly,
// keeping the pipeline usable on a fresh install with no API keys.
LLM llm.Client
}
Writer drafts a short cover-letter-style message. If a real LLM client is configured, the writer asks it to produce the body; otherwise it falls back to a deterministic template. Either way, the active resume (if any) is referenced in the closing so the user can see it will be attached.