Files
archie/.okf/codebase/internal/workflow/agent.md
T
sam 7c34bdae5a okf: scaffold knowledge bundle and MCP server config
Adds a harvested .okf/ knowledge bundle (codebase concepts + starter
architecture/services/rules scaffolding) and .mcp.json pointing at the
shared okf MCP service (http://localhost:8765/archie-core/), which
serves multiple projects' bundles from a single process.
2026-07-22 04:36:50 +10:00

1.3 KiB

description, resource, tags, timestamp, title, type
description resource tags timestamp title type
Source module internal/workflow/agent.go (221 lines). internal/workflow/agent.go
go
source
2026-07-21T18:36:22Z agent.go Module

Module agent.go

Path: internal/workflow/agent.go
Lines: 221

Snippet Preview

package workflow

import (
	"context"
	"fmt"

	"github.com/samcharles93/archie-core/internal/agentexec"
	"github.com/samcharles93/archie-core/internal/config"
	"github.com/samcharles93/archie-core/internal/skill"
)

// AgentStage is the reusable bridge from a workflow stage to an
// agentloop run. Every LLM-driven stage in any workflow (implement's
// planner/builder, tdd's test-writer/fixer, feasibility's analyst)
// is an AgentStage with a different mission, gate, and result handler —
// never a new engine.
type AgentStage struct {
	Name string
	// Role selects the model via cfg.Models[Role]; falls back to
	// cfg.Models["builder"].
	Role     string
	ReadOnly bool
	// Mission produces the task statement from the current context.
	Mission func(*TaskContext) string
	// Gate returns the stage's quality gate; nil means ungated (e.g.
	// read-only analysis stages).
	Gate func(*TaskContext) agentexec.Gate
	// ExtraRules is appended to the system prompt.
	ExtraRules string
	// MaxSteps overrides the configured step budget when > 0 (planner