Conversation
…, godoc - README.md: Replace all stale Crush references with Goose (Block) in the stack table, architecture diagram, CLI commands table, and core insight. Crush was retired in v0.5.x; Goose is the current local execution driver. - docs/architecture.md: Update 8-layer stack to reflect v0.6.x reality — DeepAgents layer replaced by Dagu (orchestration), Crush→Goose (execution), OpenShell sandbox note updated. Engine Architecture section now lists Goose first, with OpenCode/DeepAgents as alternatives. Governance flow corrected to show correction feedback loop on denial. - docs/roadmap.md: Add Bug Backlog section cataloguing 7 open issues (#60-#69) covering test coverage gap, governance bypass via malformed JSON, fragile sed parsing in govern-shell.sh, silent log write failure, and dead code. - internal/governance/engine.go: Add godoc to Evaluate and GetTimeout. - internal/logger/logger.go: Add godoc to all 8 exported functions. - internal/tools/tools.go: Add godoc to Execute and FormatForPrompt. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jpleva91
left a comment
There was a problem hiding this comment.
Code Review — QA Pass
🟡 Duplicate/Conflicting Godoc Comments (internal/tools/tools.go)
PR adds new godoc lines below pre-existing comments, creating two conflicting descriptions for the same function:
// Execute runs a tool call through governance, then executes if allowed. // ← pre-existing
// Execute evaluates the tool call against governance policy and, if allowed, runs it. // ← added by this PR
// This is the fully governed path; use ExecuteDirect when governance is already checked.
func Execute(...)// FormatForPrompt returns tool descriptions for the system prompt. // ← pre-existing
// FormatForPrompt returns Markdown-formatted tool definitions for inclusion in a system prompt. // ← added by this PR
func FormatForPrompt()Go godoc treats the entire comment block as the doc string — having two sentences starting with the function name causes go doc output to show duplicated, contradictory descriptions. The original comment should be replaced, not supplemented.
Fix: Remove the original single-line comment on each function and keep only the new multi-line godoc.
🟡 Stale crush References in cmd/shellforge/main.go (Not Addressed by This PR)
This PR correctly updates all docs, but main.go still contains four stale Crush references that now contradict the updated documentation:
| Line | Content |
|---|---|
| 94 | Run a governed agent (claude, copilot, codex, gemini, crush) — help text |
| 519 | fmt.Fprintln(os.Stderr, "Available drivers: claude, copilot, codex, gemini, crush") — runtime error message |
| 783 | // Used by Crush fork to check actions before execution. — code comment |
| 809 | // Map Crush tool names to ShellForge tool names — code comment |
Since this PR is a "post-v0.6 accuracy pass" to align docs with the Goose transition, these should be included or tracked in a follow-up issue.
✅ Everything Else LGTM
go build ./...andgo vet ./...pass cleanly- Roadmap bug backlog table is accurate
- Architecture layer updates are correct
- All Crush→Goose substitutions in docs are accurate
There was a problem hiding this comment.
Pull request overview
Documentation accuracy pass for the post-v0.6.x transition from Crush/Aider to Goose as the primary local execution driver, plus small GoDoc additions to exported APIs.
Changes:
- Updated README + architecture docs to replace stale Crush references with Goose and refresh stack/flow descriptions.
- Added a “Bug Backlog” section to the roadmap tracking known pre-v1.0 issues.
- Added/expanded GoDoc comments for exported functions in governance, logger, and tools packages.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Replaces Crush with Goose in overview, stack table, CLI driver list, and architecture diagram. |
| docs/architecture.md | Updates 8-layer stack and engine/data-flow sections to reflect v0.6.x (Goose-first). |
| docs/roadmap.md | Adds a Bug Backlog table referencing open issues (#60–#69). |
| internal/governance/engine.go | Adds GoDoc for Evaluate and GetTimeout. |
| internal/logger/logger.go | Adds GoDoc for logging lifecycle and exported logging functions. |
| internal/tools/tools.go | Adds/expands GoDoc for governed tool execution and prompt formatting helpers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 4. **Native** (fallback) — built-in multi-turn loop with Ollama + tool calling | ||
|
|
||
| The engine selection is automatic based on what's installed. | ||
| The engine selection is automatic based on what's installed. Use `shellforge run goose` for local models, or `shellforge agent` for the native loop. |
There was a problem hiding this comment.
This text says engine selection is automatic based on what’s installed, but the CLI requires the user to explicitly choose a driver via shellforge run <driver> (it doesn’t auto-pick Goose/OpenCode/etc.). Please adjust the wording to match the current behavior (e.g., “ShellForge can run different engines; select one with shellforge run <driver>”).
| The engine selection is automatic based on what's installed. Use `shellforge run goose` for local models, or `shellforge agent` for the native loop. | |
| ShellForge can run different engines; select one explicitly with `shellforge run <driver>`. For example, use `shellforge run goose` for local models, or `shellforge agent` for the native loop. |
| 1. User invokes `./shellforge qa` (or agent, report, scan) | ||
| 2. CLI loads `agentguard.yaml` governance policy | ||
| 3. Detects available engine (OpenCode > DeepAgents > Native) | ||
| 3. Detects available engine (Goose > OpenCode > DeepAgents > Native) | ||
| 4. Engine sends prompt to Ollama (via RTK for token compression) |
There was a problem hiding this comment.
Data Flow step 3 describes automatic engine detection and a priority order (Goose > OpenCode > DeepAgents > Native). The current CLI flow doesn’t auto-select an engine; it runs the driver the user specifies. Please either describe the explicit selection (shellforge run goose|claude|...) or document where this auto-detection happens if it exists.
| // Execute runs a tool call through governance, then executes if allowed. | ||
| // Execute evaluates the tool call against governance policy and, if allowed, runs it. | ||
| // This is the fully governed path; use ExecuteDirect when governance is already checked. | ||
| func Execute(engine *governance.Engine, agent, tool string, params map[string]string) Result { | ||
| decision := engine.Evaluate(tool, params) |
There was a problem hiding this comment.
The doc comment for Execute is now redundant: the first line already provides a valid GoDoc summary, and the following two lines repeat the same information. Consider collapsing this into a single concise GoDoc block (keeping the extra detail about ExecuteDirect without duplicating the summary).
| // Execute runs a tool call through governance, then executes if allowed. | |
| // Execute evaluates the tool call against governance policy and, if allowed, runs it. | |
| // This is the fully governed path; use ExecuteDirect when governance is already checked. | |
| func Execute(engine *governance.Engine, agent, tool string, params map[string]string) Result { | |
| decision := engine.Evaluate(tool, params) | |
| // Execute runs a tool call through governance and, if allowed, executes it. | |
| // This is the fully governed path; use ExecuteDirect when governance is already checked. | |
| func Execute(engine *governance.Engine, agent, tool string, params map[string]string) Result { | |
| decision := engine.Evaluate(tool, params) | |
| decision := engine.Evaluate(tool, params) |
| @@ -224,6 +226,7 @@ return Result{Success: true, Output: output} | |||
| } | |||
|
|
|||
| // FormatForPrompt returns tool descriptions for the system prompt. | |||
There was a problem hiding this comment.
FormatForPrompt has two consecutive GoDoc summary lines that both start with the function name and say essentially the same thing. Please remove the duplication and keep a single, precise summary (with any extra detail in subsequent sentences that don’t repeat the opener).
| // FormatForPrompt returns tool descriptions for the system prompt. |
| ) | ||
|
|
||
| // Init opens a JSONL log file under outputDir named "<agent>-<timestamp>.jsonl". | ||
| // Must be called before any log functions; call Close when done. |
There was a problem hiding this comment.
The Init GoDoc says it “Must be called before any log functions,” but the logger functions still work without Init (they print to stdout and store in-memory entries; they just won’t write a JSONL file because logFile is nil). Please reword this to reflect the actual behavior (e.g., “Call Init to enable JSONL file logging; otherwise logs are stdout/in-memory only”).
| // Must be called before any log functions; call Close when done. | |
| // Call Init before logging to enable JSONL file output; otherwise logs are stdout/in-memory only. Call Close when done. |
| // Governance logs a governance evaluation result to stdout and the JSONL log. | ||
| func Governance(agent, tool string, params map[string]string, allowed bool, policyName, reason string) { | ||
| status := "allow" |
There was a problem hiding this comment.
The Governance GoDoc says it logs to stdout and the JSONL log, but JSONL output only happens if Init has been called (logFile != nil). Consider clarifying that file logging is conditional so callers don’t assume a file is always written.
Summary
Documentation accuracy pass following the v0.6.0/v0.6.1 releases that replaced Crush/Aider with Goose as the primary local execution driver.
Changes
README.md — Fix stale Crush references
Execute | Crush→Execute | Goose (Block)Agent Driver (Crush, ...)→Agent Driver (Goose, ...)crushfrom driver list (not supported)Crush (Execution Engine)→Goose (Execution Engine)docs/architecture.md — Update for v0.6.x
docs/roadmap.md — Add bug backlog section
Added Bug Backlog table with 7 open issues (#60–#69) to track known bugs before v1.0, including the governance bypass via malformed JSON (#62), zero test coverage (#60, #64, #68), fragile sed parsing (#67), and the normalizer prefix-match false positives (#63).
Go doc comments
Added godoc to exported functions that were missing them:
internal/governance/engine.go:Evaluate,GetTimeoutinternal/logger/logger.go:Init,Close,Governance,ToolResult,Agent,ModelCall,Error,GetEntriesinternal/tools/tools.go:Execute,FormatForPromptVerification
go build ./...passes (0 errors)Governance Report
agent/docs/post-v0.6-accuracy✓