Skip to content

Commit 3bb7366

Browse files
committed
fix: repair stale refs and restore deleted compatibility-matrix files
Stale references fixed after main.go and heavy-docs reorganization: - README.md: 'go build .' -> 'go build ./cmd/hawk' (2 spots) - README.md: '# Architecture, research notes' -> 'docs/' description - docs/architecture.md: 'main.go at root' -> 'cmd/hawk/main.go' + 'main: ./cmd/hawk' - docs/compatibility.md: self-ref './docs/platform-capabilities.json' -> './platform-capabilities.json' - Makefile: VERSIONING.md GitHub URL -> docs/versioning.md - scripts/verify-developer-path.sh: 'go build .' -> 'go build ./cmd/hawk' - scripts/e2e-macos.sh: 'go build -o hawk .' -> 'go build -o hawk ./cmd/hawk' Restored files (Makefile compat-test target was broken): - testdata/compatibility-matrix.json - testdata/compatibility-matrix.schema.json
1 parent d670804 commit 3bb7366

8 files changed

Lines changed: 116 additions & 9 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ MAIN_PKG := ./cmd/hawk
1010

1111
# ---------------------------------------------------------------------------
1212
# Versioning — sourced from VERSION file; falls back to git describe.
13-
# See https://github.com/GrayCodeAI/hawk/blob/main/VERSIONING.md.
13+
# See https://github.com/GrayCodeAI/hawk/blob/main/docs/versioning.md.
1414
# ---------------------------------------------------------------------------
1515
VERSION ?= $(shell cat VERSION 2>/dev/null | head -n1 | tr -d '[:space:]' || git describe --tags --always --dirty 2>/dev/null || echo "dev")
1616
COMMIT := $(shell git rev-parse --short HEAD 2>/dev/null || echo "none")

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ go install github.com/GrayCodeAI/hawk@latest
6464
curl -fsSL https://raw.githubusercontent.com/GrayCodeAI/hawk/main/install.sh | sh
6565

6666
# From source
67-
git clone https://github.com/GrayCodeAI/hawk && cd hawk && go build .
67+
git clone https://github.com/GrayCodeAI/hawk && cd hawk && go build ./cmd/hawk
6868
```
6969

7070
## Features
@@ -220,7 +220,7 @@ hawk/
220220
│ ├── bridge/ # External bridges (sight, inspect, sessioncapture)
221221
│ ├── provider/ # Provider routing
222222
│ └── system/ # Bus, cron, retention, shutdown
223-
├── docs/ # Architecture, research notes
223+
├── docs/ # Architecture, security, integration docs
224224
└── testdata/ # Test fixtures
225225
```
226226

@@ -255,7 +255,7 @@ You may keep a **personal** parent **`go.work`** that lists alternate clones on
255255
### Build & Test
256256

257257
```bash
258-
go build . # Build binary
258+
go build ./cmd/hawk # Build binary
259259
go test -race ./... # Run all tests with race detector
260260
make ci # Run full CI suite (lint, test, security)
261261
make cover # Generate coverage report

docs/architecture.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ hawk is an AI-powered coding agent for the terminal. It reads codebases, writes
2222

2323
```
2424
hawk/
25-
├── main.go ⚡ Entry point — calls cmd.Execute()
2625
├── api/openapi.yaml 📜 Daemon REST API contract (OpenAPI 3.1)
2726
├── cmd/ 🖥️ Cobra CLI commands (200+ files)
27+
│ ├── hawk/main.go ⚡ Entry point — calls cmd.Execute()
2828
│ ├── root.go ⚙️ Root command, flag definitions
2929
│ ├── daemon.go 🔮 Daemon start/stop/status
3030
│ ├── chat.go 💬 Interactive TUI chat
@@ -111,7 +111,7 @@ Tool Call → 🛡️ Guardian (rules DSL) → 🧱 Boundary Checker → 👤 Us
111111

112112
| Decision | Rationale |
113113
|----------|-----------|
114-
| `main.go` at root | Intentional — goreleaser builds with `main: ./` producing `hawk` binary |
114+
| `cmd/hawk/main.go` entry point | Standard Go layout — goreleaser builds with `main: ./cmd/hawk` producing `hawk` binary |
115115
| `cmd/` is CLI library | Not a binary sub-directory — holds 200+ cobra command files |
116116
| Zero CGO | Pure Go, cross-compilable. Tree-sitter is optional |
117117
| `internal/` is private | Other repos import `shared/types/` only |

docs/compatibility.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ question: *which combinations of versions are actually tested together?*
66

77
The answer lives in [`testdata/compatibility-matrix.json`](./testdata/compatibility-matrix.json).
88

9-
Platform/provider capability metadata is separate: [`platform-capabilities.json`](./docs/platform-capabilities.json).
9+
Platform/provider capability metadata is separate: [`platform-capabilities.json`](./platform-capabilities.json).
1010

1111
## What it records
1212

scripts/e2e-macos.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fail() { FAIL=$((FAIL+1)); echo " FAIL: $1"; }
1212
# Ensure binary exists
1313
if [ ! -f ./hawk ]; then
1414
echo "Building hawk..."
15-
go build -o hawk .
15+
go build -o hawk ./cmd/hawk
1616
fi
1717

1818
echo "=== macOS E2E Tests ==="

scripts/verify-developer-path.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ go test ./internal/tool/ -run 'IsSensitivePath' -count=1
1515

1616
echo "== developer path CLI =="
1717
BIN="${DEV_PATH_HAWK_BIN:-/tmp/hawk-path-verify}"
18-
go build -mod=readonly -o "$BIN" .
18+
go build -mod=readonly -o "$BIN" ./cmd/hawk
1919
set +o pipefail
2020
"$BIN" path >/dev/null 2>&1 || true
2121
set -o pipefail

testdata/compatibility-matrix.json

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"$schema": "./compatibility-matrix.schema.json",
3+
"description": "Cross-repo compatibility tracking for GrayCodeAI repositories. Each `matrix` entry records a combination of component versions that have been tested together. CI runs the matrix on a schedule and on PR to ensure released components stay compatible.",
4+
"version": "1",
5+
"updated": "2026-06-02",
6+
"components": [
7+
"hawk",
8+
"hawk-sdk-go",
9+
"hawk-sdk-python",
10+
"eyrie",
11+
"sight",
12+
"inspect",
13+
"tok",
14+
"yaad",
15+
"trace"
16+
],
17+
"dependencies": {
18+
"hawk": ["eyrie", "sight", "inspect", "tok"],
19+
"hawk-sdk-go": ["hawk"],
20+
"hawk-sdk-python": ["hawk"],
21+
"sight": ["hawk", "eyrie"],
22+
"inspect": ["hawk"],
23+
"trace": [],
24+
"tok": ["hawk"],
25+
"yaad": [],
26+
"eyrie": []
27+
},
28+
"matrices": [
29+
{
30+
"name": "stable",
31+
"description": "Latest tested-together stable combination across the eco. This is what new users get when installing.",
32+
"components": {
33+
"hawk": "0.2.0",
34+
"hawk-sdk-go": "0.2.0",
35+
"hawk-sdk-python": "0.2.0",
36+
"eyrie": "0.2.0",
37+
"sight": "0.2.0",
38+
"inspect": "0.2.0",
39+
"tok": "0.2.0",
40+
"yaad": "0.2.0",
41+
"trace": "0.2.0"
42+
}
43+
},
44+
{
45+
"name": "next",
46+
"description": "Combination that the upcoming release will ship — kept up to date by release-please as components advance. Tested in CI on every PR.",
47+
"components": {
48+
"hawk": "main",
49+
"hawk-sdk-go": "main",
50+
"hawk-sdk-python": "main",
51+
"eyrie": "main",
52+
"sight": "main",
53+
"inspect": "main",
54+
"tok": "main",
55+
"yaad": "main",
56+
"trace": "main"
57+
}
58+
}
59+
]
60+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://github.com/GrayCodeAI/hawk/blob/main/compatibility-matrix.schema.json",
4+
"title": "GrayCodeAI compatibility matrix",
5+
"description": "Schema for compatibility-matrix.json — records which combinations of component versions are tested together.",
6+
"type": "object",
7+
"required": ["version", "components", "dependencies", "matrices"],
8+
"properties": {
9+
"$schema": { "type": "string" },
10+
"description": { "type": "string" },
11+
"version": { "type": "string", "description": "Schema version of this file (independent of any component version)." },
12+
"updated": { "type": "string", "format": "date" },
13+
"components": {
14+
"type": "array",
15+
"description": "Canonical list of component (repo) names in the eco.",
16+
"items": { "type": "string" },
17+
"uniqueItems": true,
18+
"minItems": 1
19+
},
20+
"dependencies": {
21+
"type": "object",
22+
"description": "Per-component dependency list — which other eco components a given one consumes. Drives test ordering and impact analysis.",
23+
"additionalProperties": {
24+
"type": "array",
25+
"items": { "type": "string" }
26+
}
27+
},
28+
"matrices": {
29+
"type": "array",
30+
"description": "Named version combinations that are tested together.",
31+
"items": {
32+
"type": "object",
33+
"required": ["name", "components"],
34+
"properties": {
35+
"name": { "type": "string" },
36+
"description": { "type": "string" },
37+
"components": {
38+
"type": "object",
39+
"description": "Map of component name → version. Use `main` to mean the latest commit on the main branch (tested every PR).",
40+
"additionalProperties": { "type": "string" }
41+
}
42+
}
43+
},
44+
"minItems": 1
45+
}
46+
}
47+
}

0 commit comments

Comments
 (0)