Files
archie/.okf/codebase/internal/workflow/steps.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

51 lines
1.1 KiB
Markdown

---
description: Source module internal/workflow/steps.go (203 lines).
resource: internal/workflow/steps.go
tags:
- go
- source
timestamp: "2026-07-21T18:36:22Z"
title: steps.go
type: Module
---
# Module steps.go
**Path**: `internal/workflow/steps.go`
**Lines**: 203
## Snippet Preview
```
package workflow
import (
"context"
"fmt"
"os"
"path/filepath"
"strings"
"time"
"github.com/samcharles93/archie-core/internal/gate"
"github.com/samcharles93/archie-core/internal/gate/gateeval"
"github.com/samcharles93/archie-core/internal/store"
)
// Shared step library. Every workflow composes these; workflow-specific
// stages live next to their workflow definition.
// StagePrepareWorktree clones the repo fresh and checks out the task
// branch.
func StagePrepareWorktree() Stage {
return Stage{Name: "prepare", Run: func(ctx context.Context, tc *TaskContext) error {
dir, branch, err := tc.Trees.Prepare(ctx, tc.Task.Owner, tc.Task.Repo, tc.Repo.BaseBranch(), tc.Task.IssueNumber)
if err != nil {
return err
}
tc.Dir, tc.Branch = dir, branch
tc.Task.Branch = branch
return nil
}}
```