Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# EditorConfig — https://editorconfig.org
# Canonical eco-wide template (.shared-templates/editorconfig.tmpl).

root = true

# Default for everything.
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4

# Go uses tabs by convention.
[*.go]
indent_style = tab
indent_size = 4

# Python — PEP 8.
[*.py]
indent_size = 4

# TypeScript / JavaScript — 2 spaces, ecosystem default.
[*.{ts,tsx,js,jsx,mjs,cjs}]
indent_size = 2

# Web assets.
[*.{html,css,scss}]
indent_size = 2

# YAML — 2 spaces (ecosystem standard, GitHub Actions, k8s, etc.).
[*.{yml,yaml}]
indent_size = 2

# JSON / JSONC.
[*.{json,jsonc}]
indent_size = 2

# TOML.
[*.toml]
indent_size = 2

# Markdown — 2 spaces, preserve trailing whitespace (used for line breaks).
[*.md]
trim_trailing_whitespace = false
indent_size = 2

# Shell scripts.
[*.{sh,bash,zsh,fish}]
indent_size = 4

# Makefiles must use tabs.
[{Makefile,*.mk}]
indent_style = tab

# Dockerfiles.
[Dockerfile*]
indent_size = 4

# GitHub Actions workflows — 2 spaces.
[.github/**/*.{yml,yaml}]
indent_size = 2

# Config files.
[*.{cfg,ini,conf}]
indent_size = 4
86 changes: 86 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Canonical eco-wide .gitattributes template (.shared-templates/gitattributes.tmpl).
# Auto-detect text files and normalise line endings to LF.

* text=auto eol=lf

# --- Source code -----------------------------------------------------------
*.go text eol=lf diff=golang
*.py text eol=lf diff=python
*.ts text eol=lf
*.tsx text eol=lf
*.js text eol=lf
*.jsx text eol=lf
*.mjs text eol=lf
*.cjs text eol=lf
*.rs text eol=lf diff=rust

# --- Shell + config --------------------------------------------------------
*.sh text eol=lf
*.bash text eol=lf
*.toml text eol=lf
*.yaml text eol=lf
*.yml text eol=lf
*.json text eol=lf linguist-language=JSON
*.jsonc text eol=lf linguist-language=JSON
*.cff text eol=lf

# --- Documentation ---------------------------------------------------------
*.md text eol=lf diff=markdown
*.txt text eol=lf

# --- Build / packaging ----------------------------------------------------
Makefile text eol=lf
*.mk text eol=lf
Dockerfile* text eol=lf
docker-compose*.yml text eol=lf
.github/**/*.yml text eol=lf
.github/**/*.yaml text eol=lf

# --- Generated artefacts (mark as such for diffs and language stats) ------
go.mod text eol=lf linguist-generated
go.sum text eol=lf linguist-generated
*.pb.go linguist-generated
*_generated.go linguist-generated
package-lock.json linguist-generated
pnpm-lock.yaml linguist-generated
yarn.lock linguist-generated

# --- Vendored / external sources ------------------------------------------
vendor/** linguist-vendored
node_modules/** linguist-vendored
testdata/** linguist-vendored
benchmarks/data/** linguist-vendored

# --- Binary files (do not text-normalise) ---------------------------------
*.exe binary
*.dll binary
*.so binary
*.dylib binary
*.a binary
*.o binary
*.db binary
*.sqlite binary
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.svg text eol=lf
*.pdf binary
*.zip binary
*.tar.gz binary
*.tgz binary
*.whl binary

# --- Source archive hygiene (excluded from `git archive`) -----------------
.github export-ignore
.shared-templates export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.editorconfig export-ignore
.golangci.yml export-ignore
.goreleaser.yml export-ignore
.goreleaser.yaml export-ignore
testdata/ export-ignore
benchmarks/ export-ignore
e2e/ export-ignore
114 changes: 114 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: Bug report
description: Something is broken or behaving unexpectedly.
title: "bug: <one-line summary>"
labels: ["bug", "triage"]

body:
- type: markdown
attributes:
value: |
Thanks for taking the time to file a bug report. Please fill in as much
of the form as you can — the more we know, the faster we can fix it.

Before submitting:
- Search [existing issues](https://github.com/GrayCodeAI/sight/issues) to avoid duplicates.
- If this is a security issue, please **do not** file a public issue. See `SECURITY.md`.

- type: textarea
id: what-happened
attributes:
label: What happened?
description: A clear, concise description of the bug.
placeholder: When I call sight.Review(...) on diff X, I expected Y but got Z.
validations:
required: true

- type: dropdown
id: surface
attributes:
label: Surface
description: How are you using sight?
options:
- "Library API (`sight.Review`, `sight.Describe`, `sight.Improve`)"
- "MCP (`sight_review`, `sight_describe`, `sight_improve` tools)"
- "SARIF output"
- "Static rules / convention checks"
- "Eval framework"
validations:
required: true

- type: textarea
id: reproduce
attributes:
label: Steps to reproduce
description: Minimal Go snippet, MCP call, or diff that reliably reproduces the problem.
render: go
placeholder: |
diff := `--- a/foo.go
+++ b/foo.go
@@ ... @@`
result, err := sight.Review(ctx, diff, sight.WithProvider(p), sight.Thorough)
// ^ wrong finding category / missed finding / panic / etc.
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected behavior
description: What did you expect to happen instead?
validations:
required: true

- type: textarea
id: false-positive
attributes:
label: If this is a false positive / false negative
description: |
Paste the relevant finding (or the missing one), and explain why you
think the verdict is wrong. Include the snippet of code that
triggered (or should have triggered) it.

- type: input
id: sight-version
attributes:
label: sight version
description: Output of `sight version` (or the git SHA you built from).
placeholder: "0.2.0"
validations:
required: true

- type: input
id: go-version
attributes:
label: Go version
description: Output of `go version`.
placeholder: "go version go1.26.1 darwin/arm64"
validations:
required: true

- type: input
id: provider
attributes:
label: LLM provider used
description: Which provider/model? (Anthropic Claude Opus, OpenAI GPT-5, local Ollama, mock, etc.)
placeholder: "anthropic claude-opus-4-20250514"

- type: textarea
id: logs
attributes:
label: Logs / output
description: |
Paste relevant output. **Redact any secrets, API keys, proprietary
code, and identifying repo paths first.**
render: shell

- type: checkboxes
id: confirm
attributes:
label: Confirmation
options:
- label: I searched existing issues and did not find a duplicate.
required: true
- label: I redacted any secrets, API keys, or private code from logs.
required: true
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Security vulnerability
url: https://github.com/GrayCodeAI/sight/security/advisories/new
about: Please report security issues privately via a GitHub Security Advisory. See SECURITY.md.
- name: Question / discussion
url: https://github.com/GrayCodeAI/sight/discussions
about: Have a question or want to discuss an idea? Open a discussion instead of an issue.
71 changes: 71 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Feature request
description: Suggest an improvement, a new review concern, or a new integration.
title: "feat: <one-line summary>"
labels: ["enhancement", "triage"]

body:
- type: markdown
attributes:
value: |
Thanks for proposing a feature. sight is the AI code-review library that
backs hawk's review pipeline. Every feature is evaluated against whether
it serves **a single developer** running an AI agent locally — i.e. it
either improves review precision/recall, lowers latency, or simplifies
integration.

Before submitting:
- Search [existing issues](https://github.com/GrayCodeAI/sight/issues) to avoid duplicates.

- type: dropdown
id: kind
attributes:
label: Kind of feature
description: What flavour of change is this?
options:
- "Review concerns / multi-concern pipeline"
- "Static rules / convention checks"
- "SARIF output"
- "MCP server / tools"
- "Configuration (.sight/, options)"
- "Eval framework"
- "Output format / inline comments / describe / improve"
- "Tooling / CI / docs"
validations:
required: true

- type: textarea
id: problem
attributes:
label: What problem are you trying to solve?
description: Describe the user problem first. Solutions can come later.
placeholder: When I review diff X, sight misses Y / surfaces too many Z.
validations:
required: true

- type: textarea
id: proposal
attributes:
label: Proposed solution
description: How would you like sight to behave? Library snippet, MCP tool shape, config sample.
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: |
What did you try? What do other code-review tools (CodeRabbit, Sourcery,
DeepSource, Qodana, Semgrep, Sourcegraph code-review, danger-js) do?
Why isn't that enough?

- type: checkboxes
id: principles
attributes:
label: Solo-developer fit
description: sight avoids enterprise scope. Confirm this feature respects that.
options:
- label: Works with zero configuration (sensible defaults).
- label: Does not require a network call beyond the user's chosen LLM provider.
- label: Stores any state locally (under `.sight/` in the repo).
- label: Has an escape hatch (override via option, env, or config).
Loading
Loading