Shared contracts for the hawk ecosystem.
This repo holds stable cross-repo type definitions used by every engine and
hawk itself: severity levels, findings, tool contracts, event models, policy
verdicts, review results, verification reports, and agent session state.
Tagline: Shared contracts for the hawk ecosystem.
go get github.com/GrayCodeAI/hawk-core-contracts| Package | Key Types | Purpose |
|---|---|---|
types/ |
Severity, Finding, FindingSlice, ParseSeverity |
Severity levels, findings, shared result vocabulary |
tools/ |
ToolCall, ToolResult |
Provider-neutral tool call and result contracts |
events/ |
ToolEvent, TraceEvent, UsageInfo |
Normalized tool and trace event contracts |
policy/ |
Risk, PermissionVerdict, Allow, Deny |
Risk, permission verdict, guardian decision, approval request contracts |
review/ |
Result, Finding, Comment |
Neutral review findings, comments, stats, and result contracts |
verify/ |
Report, Finding |
Neutral verification findings, stats, and report contracts |
sessions/ |
Phase, CostAccumulator, ParsePhase |
Cross-repo agent session state types |
hawk-core-contracts (stdlib only)
├── types/ Severity, Finding, FindingSlice — the core vocabulary
├── tools/ ToolCall, ToolResult — provider-neutral tool contracts
├── events/ ToolEvent, TraceEvent — normalized event contracts
├── policy/ Risk, PermissionVerdict — governance contracts
├── review/ Result, Finding, Comment — review result contracts
├── verify/ Report, Finding — verification report contracts
└── sessions/ Phase, CostAccumulator — session state contracts
- shared enums (severity levels, risk levels, phases)
- shared structs (findings, tool calls, events, verdicts, reports)
- event models (tool events, trace events, usage info)
- finding/result models (severity, confidence, status)
- engine request/response contracts
- policy and tool contracts
- CLI code (commands, flags, shell output)
- provider implementations
- runtime logic
- storage implementations
- product orchestration
- anything that belongs in a single consuming repo
Engines should depend on this repo only when they produce or consume a shared
cross-repo contract. Contract-free engines (e.g., eyrie, yaad, trace)
should not add the dependency just for consistency.
If a type is only used inside one repo, it should stay in that repo.
The legacy github.com/GrayCodeAI/hawk/shared/types package has been removed.
All shared finding and severity definitions now live here. Migration is
complete:
- Severity and finding definitions migrated from
hawk/shared/types sightandinspectmigrated to import this repo- Tool, event, and policy contracts added
- Review and verification result contracts added
- Sessions package added for cross-repo session state
hawk-core-contracts is a foundation repo in the hawk-eco mono-ecosystem:
| Component | Purpose |
|---|---|
| hawk-core-contracts | Shared cross-repo contracts (this repo) |
| hawk-mcpkit | Shared MCP server scaffolding |
| eyrie | LLM provider runtime — routing, streaming, retries, caching |
| yaad | Graph-based persistent memory for coding agents |
| tok | Tokenizer, compression, secrets scanning, rate limiting |
| sight | Diff-based code review and static analysis |
| inspect | Security audit library (CVE, API security, CI output) |
| trace | Session capture and replay CLI |
| hawk | AI coding agent (this repo) |
hawk and all engines import hawk-core-contracts when they share a real
cross-repo contract; the repo itself never imports back.
Rules that keep this repo at the foundation layer:
- Zero hawk-eco dependencies. This repo imports only the Go standard
library.
make boundaries(also run in CI) enforces this withscripts/check-ecosystem-boundaries.sh. - Implementation-free. See Scope above — no CLI code, provider implementations, runtime logic, storage, or orchestration.
- Consumers, not dependents.
hawkand engines import this repo when they share a real cross-repo contract; it never imports them back.
If a change here would require importing anything outside the standard library, that type does not belong in this repo.
| Path | Team |
|---|---|
/types/ |
@GrayCodeAI/llm-team |
/tools/ |
@GrayCodeAI/llm-team |
/events/ |
@GrayCodeAI/llm-team |
/policy/ |
@GrayCodeAI/llm-team |
/review/ |
@GrayCodeAI/llm-team |
/verify/ |
@GrayCodeAI/llm-team |
/sessions/ |
@GrayCodeAI/llm-team |
/VERSION |
@GrayCodeAI/maintainers |
/Makefile |
@GrayCodeAI/devops-team |
/*.md |
@GrayCodeAI/docs-team |
/.github/ |
@GrayCodeAI/devops-team |
MIT — see LICENSE.