Skip to content

Commit e54f590

Browse files
authored
feat(sight): production hardening — re-baseline to v0.2.0 + OSS hygiene (#2)
* feat(sight): re-baseline to v0.2.0 + OSS standards (CoC, dependabot, PR/issue templates) Re-baselines sight's version to 0.2.0 across the MCP advertisement and both SARIF driver-version sites, and adds the top-50 OSS standard files that were missing. Version 0.2.0 set in: - mcp/server.go (`mcpserver.NewMCPServer("sight", "0.2.0", ...)`) - sarif.go (`Driver.Version` and `Driver.SemanticVersion` → "0.2.0"; the SARIF spec version remains "2.1.0" — that's a different field that identifies the SARIF format, not the tool) - internal/output/sarif.go (same fix in the duplicated SARIF code, which only has `Driver.Version` — no `SemanticVersion` field) Aligns sight with the rest of the hawk-eco ecosystem (hawk, tok, eyrie, yaad, trace, inspect). CHANGELOG.md gains an [Unreleased] section. Existing 0.4.0 / 0.2.0 / 0.1.0 historical entries preserved. New top-level OSS files: - CODE_OF_CONDUCT.md — Contributor Covenant 2.1 - .gitattributes — LF normalization, binary detection, GitHub linguist hint to collapse go.sum in PR diffs - .editorconfig — UTF-8, LF, final newline, trim trailing whitespace, tabs for Go + Makefile, 2-space indent for YAML/JSON/TOML, no-trim for Markdown - .github/dependabot.yml — weekly gomod + github-actions, gomod grouped by mark3labs/mcp-go to reduce PR noise - .github/PULL_REQUEST_TEMPLATE.md — Summary / Changes / Review- quality impact (eval-set numbers) / SARIF compatibility / Testing / Checklist - .github/ISSUE_TEMPLATE/bug_report.yml — surface dropdown (library API / MCP / SARIF / static rules / eval) plus a dedicated 'false-positive / false-negative' textarea - .github/ISSUE_TEMPLATE/feature_request.yml — kind selector covering 8 functional areas (review concerns, static rules, SARIF, MCP, config, eval, output, tooling) and solo-dev fit checks - .github/ISSUE_TEMPLATE/config.yml — routes security to advisories, questions to discussions, blocks blank issues Cleanup: - gofmt -w on sarif.go and internal/output/sarif.go to fix pre-existing struct-tag alignment drift in the files I touched Verification: - `go build ./...` clean - `go vet ./...` clean - `go test -race -count=1 -timeout=120s -short ./...` passes on every package: root sight, internal/{comment,context,diff,output,review}, and mcp - `gofmt -l` clean for all files I touched * chore: standardize eco-wide infra (versioning, CI, hooks, templates) - VERSION file as single source of truth - CODEOWNERS for auto-review routing - Canonical Makefile with standard targets - release-please config + workflow - lefthook/pre-commit hooks (conventional commits, fmt, lint, secrets) - Canonical CI + release GitHub Actions workflows - Standardized .editorconfig, .gitattributes, CODE_OF_CONDUCT, SECURITY, CONTRIBUTING - goreleaser config (where applicable) Part of hawk-eco standardization sweep.
1 parent 271d646 commit e54f590

25 files changed

Lines changed: 1405 additions & 531 deletions

.editorconfig

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# EditorConfig — https://editorconfig.org
2+
# Canonical eco-wide template (.shared-templates/editorconfig.tmpl).
3+
4+
root = true
5+
6+
# Default for everything.
7+
[*]
8+
charset = utf-8
9+
end_of_line = lf
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
indent_style = space
13+
indent_size = 4
14+
15+
# Go uses tabs by convention.
16+
[*.go]
17+
indent_style = tab
18+
indent_size = 4
19+
20+
# Python — PEP 8.
21+
[*.py]
22+
indent_size = 4
23+
24+
# TypeScript / JavaScript — 2 spaces, ecosystem default.
25+
[*.{ts,tsx,js,jsx,mjs,cjs}]
26+
indent_size = 2
27+
28+
# Web assets.
29+
[*.{html,css,scss}]
30+
indent_size = 2
31+
32+
# YAML — 2 spaces (ecosystem standard, GitHub Actions, k8s, etc.).
33+
[*.{yml,yaml}]
34+
indent_size = 2
35+
36+
# JSON / JSONC.
37+
[*.{json,jsonc}]
38+
indent_size = 2
39+
40+
# TOML.
41+
[*.toml]
42+
indent_size = 2
43+
44+
# Markdown — 2 spaces, preserve trailing whitespace (used for line breaks).
45+
[*.md]
46+
trim_trailing_whitespace = false
47+
indent_size = 2
48+
49+
# Shell scripts.
50+
[*.{sh,bash,zsh,fish}]
51+
indent_size = 4
52+
53+
# Makefiles must use tabs.
54+
[{Makefile,*.mk}]
55+
indent_style = tab
56+
57+
# Dockerfiles.
58+
[Dockerfile*]
59+
indent_size = 4
60+
61+
# GitHub Actions workflows — 2 spaces.
62+
[.github/**/*.{yml,yaml}]
63+
indent_size = 2
64+
65+
# Config files.
66+
[*.{cfg,ini,conf}]
67+
indent_size = 4

.gitattributes

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Canonical eco-wide .gitattributes template (.shared-templates/gitattributes.tmpl).
2+
# Auto-detect text files and normalise line endings to LF.
3+
4+
* text=auto eol=lf
5+
6+
# --- Source code -----------------------------------------------------------
7+
*.go text eol=lf diff=golang
8+
*.py text eol=lf diff=python
9+
*.ts text eol=lf
10+
*.tsx text eol=lf
11+
*.js text eol=lf
12+
*.jsx text eol=lf
13+
*.mjs text eol=lf
14+
*.cjs text eol=lf
15+
*.rs text eol=lf diff=rust
16+
17+
# --- Shell + config --------------------------------------------------------
18+
*.sh text eol=lf
19+
*.bash text eol=lf
20+
*.toml text eol=lf
21+
*.yaml text eol=lf
22+
*.yml text eol=lf
23+
*.json text eol=lf linguist-language=JSON
24+
*.jsonc text eol=lf linguist-language=JSON
25+
*.cff text eol=lf
26+
27+
# --- Documentation ---------------------------------------------------------
28+
*.md text eol=lf diff=markdown
29+
*.txt text eol=lf
30+
31+
# --- Build / packaging ----------------------------------------------------
32+
Makefile text eol=lf
33+
*.mk text eol=lf
34+
Dockerfile* text eol=lf
35+
docker-compose*.yml text eol=lf
36+
.github/**/*.yml text eol=lf
37+
.github/**/*.yaml text eol=lf
38+
39+
# --- Generated artefacts (mark as such for diffs and language stats) ------
40+
go.mod text eol=lf linguist-generated
41+
go.sum text eol=lf linguist-generated
42+
*.pb.go linguist-generated
43+
*_generated.go linguist-generated
44+
package-lock.json linguist-generated
45+
pnpm-lock.yaml linguist-generated
46+
yarn.lock linguist-generated
47+
48+
# --- Vendored / external sources ------------------------------------------
49+
vendor/** linguist-vendored
50+
node_modules/** linguist-vendored
51+
testdata/** linguist-vendored
52+
benchmarks/data/** linguist-vendored
53+
54+
# --- Binary files (do not text-normalise) ---------------------------------
55+
*.exe binary
56+
*.dll binary
57+
*.so binary
58+
*.dylib binary
59+
*.a binary
60+
*.o binary
61+
*.db binary
62+
*.sqlite binary
63+
*.png binary
64+
*.jpg binary
65+
*.jpeg binary
66+
*.gif binary
67+
*.ico binary
68+
*.svg text eol=lf
69+
*.pdf binary
70+
*.zip binary
71+
*.tar.gz binary
72+
*.tgz binary
73+
*.whl binary
74+
75+
# --- Source archive hygiene (excluded from `git archive`) -----------------
76+
.github export-ignore
77+
.shared-templates export-ignore
78+
.gitattributes export-ignore
79+
.gitignore export-ignore
80+
.editorconfig export-ignore
81+
.golangci.yml export-ignore
82+
.goreleaser.yml export-ignore
83+
.goreleaser.yaml export-ignore
84+
testdata/ export-ignore
85+
benchmarks/ export-ignore
86+
e2e/ export-ignore
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: Bug report
2+
description: Something is broken or behaving unexpectedly.
3+
title: "bug: <one-line summary>"
4+
labels: ["bug", "triage"]
5+
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for taking the time to file a bug report. Please fill in as much
11+
of the form as you can — the more we know, the faster we can fix it.
12+
13+
Before submitting:
14+
- Search [existing issues](https://github.com/GrayCodeAI/sight/issues) to avoid duplicates.
15+
- If this is a security issue, please **do not** file a public issue. See `SECURITY.md`.
16+
17+
- type: textarea
18+
id: what-happened
19+
attributes:
20+
label: What happened?
21+
description: A clear, concise description of the bug.
22+
placeholder: When I call sight.Review(...) on diff X, I expected Y but got Z.
23+
validations:
24+
required: true
25+
26+
- type: dropdown
27+
id: surface
28+
attributes:
29+
label: Surface
30+
description: How are you using sight?
31+
options:
32+
- "Library API (`sight.Review`, `sight.Describe`, `sight.Improve`)"
33+
- "MCP (`sight_review`, `sight_describe`, `sight_improve` tools)"
34+
- "SARIF output"
35+
- "Static rules / convention checks"
36+
- "Eval framework"
37+
validations:
38+
required: true
39+
40+
- type: textarea
41+
id: reproduce
42+
attributes:
43+
label: Steps to reproduce
44+
description: Minimal Go snippet, MCP call, or diff that reliably reproduces the problem.
45+
render: go
46+
placeholder: |
47+
diff := `--- a/foo.go
48+
+++ b/foo.go
49+
@@ ... @@`
50+
result, err := sight.Review(ctx, diff, sight.WithProvider(p), sight.Thorough)
51+
// ^ wrong finding category / missed finding / panic / etc.
52+
validations:
53+
required: true
54+
55+
- type: textarea
56+
id: expected
57+
attributes:
58+
label: Expected behavior
59+
description: What did you expect to happen instead?
60+
validations:
61+
required: true
62+
63+
- type: textarea
64+
id: false-positive
65+
attributes:
66+
label: If this is a false positive / false negative
67+
description: |
68+
Paste the relevant finding (or the missing one), and explain why you
69+
think the verdict is wrong. Include the snippet of code that
70+
triggered (or should have triggered) it.
71+
72+
- type: input
73+
id: sight-version
74+
attributes:
75+
label: sight version
76+
description: Output of `sight version` (or the git SHA you built from).
77+
placeholder: "0.2.0"
78+
validations:
79+
required: true
80+
81+
- type: input
82+
id: go-version
83+
attributes:
84+
label: Go version
85+
description: Output of `go version`.
86+
placeholder: "go version go1.26.1 darwin/arm64"
87+
validations:
88+
required: true
89+
90+
- type: input
91+
id: provider
92+
attributes:
93+
label: LLM provider used
94+
description: Which provider/model? (Anthropic Claude Opus, OpenAI GPT-5, local Ollama, mock, etc.)
95+
placeholder: "anthropic claude-opus-4-20250514"
96+
97+
- type: textarea
98+
id: logs
99+
attributes:
100+
label: Logs / output
101+
description: |
102+
Paste relevant output. **Redact any secrets, API keys, proprietary
103+
code, and identifying repo paths first.**
104+
render: shell
105+
106+
- type: checkboxes
107+
id: confirm
108+
attributes:
109+
label: Confirmation
110+
options:
111+
- label: I searched existing issues and did not find a duplicate.
112+
required: true
113+
- label: I redacted any secrets, API keys, or private code from logs.
114+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Security vulnerability
4+
url: https://github.com/GrayCodeAI/sight/security/advisories/new
5+
about: Please report security issues privately via a GitHub Security Advisory. See SECURITY.md.
6+
- name: Question / discussion
7+
url: https://github.com/GrayCodeAI/sight/discussions
8+
about: Have a question or want to discuss an idea? Open a discussion instead of an issue.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Feature request
2+
description: Suggest an improvement, a new review concern, or a new integration.
3+
title: "feat: <one-line summary>"
4+
labels: ["enhancement", "triage"]
5+
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for proposing a feature. sight is the AI code-review library that
11+
backs hawk's review pipeline. Every feature is evaluated against whether
12+
it serves **a single developer** running an AI agent locally — i.e. it
13+
either improves review precision/recall, lowers latency, or simplifies
14+
integration.
15+
16+
Before submitting:
17+
- Search [existing issues](https://github.com/GrayCodeAI/sight/issues) to avoid duplicates.
18+
19+
- type: dropdown
20+
id: kind
21+
attributes:
22+
label: Kind of feature
23+
description: What flavour of change is this?
24+
options:
25+
- "Review concerns / multi-concern pipeline"
26+
- "Static rules / convention checks"
27+
- "SARIF output"
28+
- "MCP server / tools"
29+
- "Configuration (.sight/, options)"
30+
- "Eval framework"
31+
- "Output format / inline comments / describe / improve"
32+
- "Tooling / CI / docs"
33+
validations:
34+
required: true
35+
36+
- type: textarea
37+
id: problem
38+
attributes:
39+
label: What problem are you trying to solve?
40+
description: Describe the user problem first. Solutions can come later.
41+
placeholder: When I review diff X, sight misses Y / surfaces too many Z.
42+
validations:
43+
required: true
44+
45+
- type: textarea
46+
id: proposal
47+
attributes:
48+
label: Proposed solution
49+
description: How would you like sight to behave? Library snippet, MCP tool shape, config sample.
50+
validations:
51+
required: true
52+
53+
- type: textarea
54+
id: alternatives
55+
attributes:
56+
label: Alternatives considered
57+
description: |
58+
What did you try? What do other code-review tools (CodeRabbit, Sourcery,
59+
DeepSource, Qodana, Semgrep, Sourcegraph code-review, danger-js) do?
60+
Why isn't that enough?
61+
62+
- type: checkboxes
63+
id: principles
64+
attributes:
65+
label: Solo-developer fit
66+
description: sight avoids enterprise scope. Confirm this feature respects that.
67+
options:
68+
- label: Works with zero configuration (sensible defaults).
69+
- label: Does not require a network call beyond the user's chosen LLM provider.
70+
- label: Stores any state locally (under `.sight/` in the repo).
71+
- label: Has an escape hatch (override via option, env, or config).

0 commit comments

Comments
 (0)