| name | code-review |
| description | Code review skill for the Ollama Agent Harness — enforces architectural conventions from the Claude Code paper |
| domain | code-review |
| confidence | medium |
| source | generated by CopilotForge |
| triggers | ["review this","check my code","code review"] |
Context
Reviews code changes against the architectural conventions established for the Ollama Agent Harness. The harness borrows patterns from the Claude Code paper: minimal scaffolding, deny-first safety, context-as-scarce-resource, append-only state, and subagent isolation.
Patterns
Review Checklist
- Agent loop integrity — Does the change preserve the simple while-loop pattern? No explicit state graphs or planning frameworks added?
- Permission enforcement — Are new tools gated through the permission system? Does deny-first ordering hold?
- Context budget — Does the change increase context consumption? Are tool results capped? Are large outputs truncated or summarized?
- Append-only persistence — Do session storage changes only append? No in-place mutations of transcript files?
- Tool classification — Are new tools correctly classified as read-only (concurrent-safe) or exclusive (state-modifying)?
- Subagent isolation — Do subagent interactions return summary-only? No full history leaking to parent?
- Type safety — Explicit types on function signatures? No
any in public APIs?
- Error recovery — Are errors surfaced as tool results for the model to adapt, not silently swallowed?
- Ollama API usage — Correct use of
ollama-js streaming, tool calling, and message format?
- Security — No command injection in tool dispatch? No unvalidated user input passed to shell?
TypeScript-Specific Checks
- Strict mode compliance
- No implicit
any
- Proper async/await usage (no floating promises)
- Import organization (path aliases over relative paths)
Examples
Good: Tool with permission check
const result = await permissions.check(toolCall);
if (result.decision === 'deny') {
return { error: result.reason };
}
return await tool.execute(toolCall.input);
Bad: Tool bypassing permissions
return await tool.execute(toolCall.input);
Anti-Patterns
- Approving code that adds explicit planning/state-graph frameworks without strong justification.
- Missing permission checks on new tool implementations.
- In-place mutation of session transcript files.
- Unbounded tool results that consume excessive context.
- Using
any as a type escape hatch in core subsystem interfaces.