Goal: bring the Go implementation to behavioral parity with ../hawk-archive while preserving the Go distribution goal: one static binary where practical.
- Go repo: full-featured agent with Bubble Tea REPL, eyrie streaming, persistence, permissions, MCP stdio, 40+ tools, 60+ slash commands, swarm/team coordination, cron scheduling, remote bridge, and comprehensive tests.
- Archive repo: full product surface with rich CLI modes, Ink UI, command/plugin/skill systems, hooks, advanced permissions/sandboxing, provider routing, IDE/remote integrations, updater/auth flows, and broad tests.
- Estimated parity after the current Go changes: about 85% of full product parity, about 98% of a lean core-agent MVP.
- Archive tool wire names are exposed to the model:
Bash,Read,Write,Edit,LS,Glob,Grep,WebFetch,WebSearch,ToolSearch,Skill,Agent,AskUserQuestion,TodoWrite,TaskOutput,TaskStop,TaskCreate,TaskGet,TaskList,TaskUpdate,LSP,EnterPlanMode,ExitPlanMode,NotebookEdit,ListMcpResourcesTool,ReadMcpResourceTool,Config,SendUserMessage,SendMessage,Sleep,CronCreate,CronDelete,CronList,TeamCreate,TeamDelete,VerifyPlanExecution,Workflow,McpAuth,RemoteTrigger,PowerShell. - Legacy Go tool names remain accepted as aliases, including
bash,file_read,file_write, andfile_edit. - MCP tools use archive-compatible names:
mcp__<server>__<tool>, with legacymcp_<server>_<tool>aliases. hawk -p "prompt"and positionalhawk -p "prompt"print-mode flows exist withtext,json, andstream-jsonoutput formats.- Print mode supports session save/resume and
--no-session-persistence. - CLI now accepts archive-compatible tool/permission flags:
--tools,--allowedTools,--allowed-tools,--disallowedTools,--disallowed-tools,--permission-mode,--dangerously-skip-permissions,--max-turns,--max-budget-usd,--system-prompt,--system-prompt-file,--append-system-prompt, and--append-system-prompt-file. - CLI now accepts archive-compatible session/context flags:
--input-format,--settings,--add-dir,--continue,--fork-session, and--session-id. - CLI now includes local operational subcommands:
doctor,config,mcp,sessions/history, andtools. - Settings loading accepts archive-style camelCase/snake_case aliases for API key, auto-allow rules, budget, custom headers, MCP servers, and tool allow/deny lists, and project settings now merge all supported fields over global settings.
hawk config get/setand the model-facingConfigtool now read/write supported global settings instead of returning placeholders.- Permission rules understand archive syntax such as
Bash(git:*),Write(*.env), and bare tool names. - Permission modes have initial Go semantics for
default,acceptEdits,bypassPermissions,dontAsk, andplan. - Interactive startup now shows a fuller welcome/status screen with provider, model, session, permission mode, working directory, project instruction status, MCP status, and available tools.
- REPL discovery now includes
/tools,/welcome,/permissions deny,/permissions mode,/add-dir,/skills,/mcp,/files,/branch,/env,/version, and several archive prompt-style commands (/review,/security-review,/bughunter,/summary,/release-notes,/pr-comments). stream-jsonoutput now includessession_id,uuid, cost, and archive-style finalresultrecords.- Bash can start background tasks with
run_in_background, withTaskOutputandTaskStopsupport. - Local
Skilldiscovery works for.hawk/skills,~/.hawk/skills, and~/.codex/skills. - MCP resource listing/reading tools are present for connected MCP servers.
- File tools accept archive-compatible arguments:
file_pathforRead/Write/Edit,offset/limitforRead, andold_string/new_stringforEdit. LSis present as an archive-style directory listing tool.- File discovery/read/write/edit tools enforce a working-directory plus
--add-dir//add-dirboundary when executed by the agent. TodoWriteaccepts archive-style fulltodosarrays as well as the earlier Go action API.- Hook system with 8 event types (pre_query, post_query, pre_tool, post_tool, session_start, session_end, permission_ask, error) and priority-based execution.
- Plugin system with manifest validation, install/list/uninstall commands, hook registration, and command execution.
- Advanced permissions with auto-mode learning, command classifier (safe/unsafe/unknown), bypass killswitch, and shadowed rule detection.
- Model catalog with 25+ models across 7 providers, pricing, context sizes, and recommendations.
- Session memory with extraction, search, and consolidation.
- Analytics with event logging, session traces, and cost tracking.
- Auth system with secure token storage (OS keychain integration) and OAuth flow support.
- Auto-update with GitHub release checking and semver comparison.
- LSP integration with JSON-RPC client and server manager.
- Voice mode with Whisper.cpp integration and keyterms.
- Magic docs with Go AST parsing and automatic markdown generation.
- Worktree tools with EnterWorktree/ExitWorktree validation.
- NotebookEdit with cell insert/delete/list operations.
- Bash security with zsh bypass protection, process substitution blocking, IFS injection detection, carriage return prevention, ANSI-C quoting detection, and git commit safety.
Full parity means these archive behaviors work in Go with compatible user-facing names, flags, config files, session data, and tool semantics:
- CLI flags and subcommands from
hawk --help, including-p/--print, JSON streaming, resume/continue, settings, tools allow/deny, MCP config, worktree, plugin, doctor, update, and install paths. - Slash command registry from
src/commands.ts, including built-ins, skills, plugins, and dynamic command loading. - Tool registry from
src/tools.ts, including archive tool names (Bash,Read,Edit,Write,TodoWrite, etc.) and MCP names (mcp__server__tool). - Permission behavior, including
default,acceptEdits,bypassPermissions,dontAsk, andplanmodes. - File/tool behavior parity for reads, edits, notebooks, PDFs/images where supported, shell safety, output truncation, and background tasks.
- Session persistence compatibility or migration from archive JSONL/project session layout.
- Provider routing, model catalog, fallback, and profile/config behavior.
- UI parity for common REPL flows: command palette/help, approvals, diffs, tasks, status, history, and cancellation.
- Test parity for core unit/e2e scenarios.
- Compatibility foundation
- Archive-compatible tool names with Go aliases.
- Archive-compatible
-p/--printprompt mode. - MCP
mcp__server__toolnames with old Go aliases. - Parity tests for names, flags, and session save/resume basics.
- CLI and non-interactive mode
- Implement archive CLI flags safely:
--output-format,--tools,--allowed-tools,--disallowed-tools,--permission-mode,--system-prompt,--append-system-prompt,--max-turns,--max-budget-usd. - Add
text,json, andstream-jsonoutput formats. - Add
--no-session-persistence. - Add
--input-format,--settings,--add-dir,--continue,--fork-session, and--session-id. - Add initial archive-style local subcommands for diagnostics, config display, MCP listing, session history, and tool listing.
- Match archive stream-json schemas exactly, including all SDK message subtypes, usage objects, and hook events.
- Match archive session storage exactly, not just local JSON session behavior.
- Tool behavior parity
- Bring
Read,Write,Edit,LS,Glob,Grep,Bash,NotebookEdit,WebFetch,WebSearch, andLSPbehavior up to archive semantics. - Add missing lightweight tools enabled in external archive builds:
Skill,TaskOutput,TaskStop,ListMcpResourcesTool,ReadMcpResourceTool, andToolSearch. - Add archive-compatible file argument aliases and
LS. - Add gated worktree tools and richer task/sandbox tools.
- Add initial permission-aware filesystem path validation for file tools.
- Add richer shell parsing with zsh dangerous command detection, process substitution blocking, IFS injection detection, carriage return prevention, ANSI-C quoting detection, locale quoting detection, empty quote pair obfuscation detection, heredoc validation, and git commit safety.
- Commands, skills, plugins, and hooks
- Port the command registry structure from
src/commands.ts. - Implement more built-in slash commands before plugin/dynamic commands:
/add-dir,/skills,/mcp,/files,/branch,/env,/version, and prompt-style review/summary commands. - Add skill discovery/loading.
- Add plugin manifest validation, install/list/enable/disable/update, and plugin-provided commands/skills.
- Add hook lifecycle execution with 8 event types and priority-based execution.
- Sessions, config, and provider parity
- Improve settings source precedence and config schema aliases for the currently supported fields.
- Add provider profiles, model catalog, smart routing, fallback, and
/provider-statusstyle output. - Add session JSONL storage compatibility/migration and cross-project resume behavior.
- UI, remote, and release systems
- Expand Bubble Tea UI to match common archive REPL flows (command palette, diff colors, file tree, history search).
- Add updater/install/native release behavior (auto-update checking, version command).
- Add IDE integration, remote/direct-connect/SSH/server paths where feasible.
- Test hardening
- Port archive unit/e2e tests in batches (hooks, permissions, memory, model, plugin, update, auth, lsp, voice, magicdocs, integration).
- Add golden tests for CLI outputs and tool schemas.
- Maintain
go test ./...as the minimum merge gate, then add integration/e2e gates.
- Prefer compatibility shims over breaking session/config names.
- Do not silently claim parity for stubbed features; mark them as partial until behavior and tests match.
- Preserve Go ergonomics and static binary constraints unless parity requires external helpers.