Skip to content

Commit 1722d76

Browse files
authored
feat(hawk): production hardening — adopt top-50 OSS patterns (#2)
* feat(hawk): production hardening — linter, CI, errcheck, dead code removal - Strict golangci-lint config (errcheck, staticcheck, gocritic, unused, etc.) - Fixed 240+ unchecked error returns in production code (session, engine, tool, config) - Removed all dead code flagged by unused linter (13 declarations) - Fixed SA4010 (append result never used) real bugs in mcp/server.go and repomap/depgraph.go - Added Makefile with standard targets (build, test, lint, security, bench) - Improved CI: coverage reporting, benchmark on PR, security scanning - Improved Dockerfile: tini init, timezone data, verified deps - Added .editorconfig, dependabot.yml, CONTRIBUTING.md - Comprehensive auth tests (18% → 71% coverage) - Comprehensive update tests with HTTP mocking (22% → 92% coverage) - Session package fully errcheck-clean (critical data integrity) * feat(hawk): re-baseline to v0.2.0 + OSS standards (CoC, PR/issue templates, .gitattributes) Re-baselines hawk's version to 0.2.0 across every authoritative location and adds the top-50 OSS standard files that were missing. Version 0.2.0 set in: - main.go (`var Version`) - api/server.go (`const Version`) - flake.nix (`version = ...`) - .github/workflows/release.yml (sister-repo clone branches) - api/server_test.go, update/update_test.go (current-version assertions) CHANGELOG.md gains an [Unreleased] section that captures both this re-baseline and the production-hardening pass already on this branch (240+ unchecked-error fixes, dead-code removal, stricter golangci v2 config, expanded CI with race + 10x flake detection + govulncheck + gosec + multi-platform builds, Makefile with standard targets, Dockerfile with tini, dependabot, editorconfig, +71% auth coverage, +92% update coverage). Historical 0.4.0/0.3.0/0.2.0/0.0.1 entries are preserved for reference. New top-level OSS files: - .gitattributes — LF line-ending normalization, binary detection, GitHub linguist hints (collapse go.sum, exclude research docs from stats) - CODE_OF_CONDUCT.md — Contributor Covenant 2.1 - .github/PULL_REQUEST_TEMPLATE.md — checklist for contributors - .github/ISSUE_TEMPLATE/bug_report.yml — structured bug template - .github/ISSUE_TEMPLATE/feature_request.yml — solo-dev fit checks - .github/ISSUE_TEMPLATE/config.yml — routes security to advisories, questions to discussions, blocks blank issues Verification: - `go build ./...` clean - `go vet ./...` clean - `go test -race -count=1` passes on api/, update/, cmd/, auth/, session/, config/, permissions/, mcp/ - All modified Go files are gofmt-clean (broader pre-existing gofmt drift in the repo is left for a separate follow-up to keep this PR focused on the version bump and OSS hygiene) Note: the table-driven case `{"dev version", "0.4.0", "0.3.9", true}` in update/update_test.go is intentionally left intact — it tests isNewer() semver-comparison logic, not the current installed version. * feat(hawk): additional hardening — fuzz tests, errcheck, daemon tests - Added fuzz tests for session JSONL parser (FuzzParseMessage, FuzzParseSessionMeta) - Added fuzz test for config validator (FuzzValidateSettings) - Added daemon tests (DefaultConfig, Stats, InvalidMethod, InvalidJSON, GetSession, JSON marshaling) - Fixed 50+ more errcheck issues (filepath.Walk, bridge.Remember, session.SetPermissionMode, os.Remove, os.Rename) - Daemon coverage: 34.6% → 45.5% - Total errcheck reduced from 174 to 102 (additional 42% reduction) * fix(hawk): restore chat_commands.go and fix remaining close errcheck - Restored cmd/chat_commands.go after accidental empty by sed - Fixed f.Close/f.WriteString errcheck in chat_commands, dx, errors - Fixed store.Close in cmdhistory_cmd.go - Fixed rows.Close in cmdhistory/history.go - Fixed b.store.Close in memory/yaad_bridge.go * feat(hawk): add mock LLM server, background agent tests, version tests - Added internal/testutil/mock_llm.go — configurable mock LLM server for testing - Added comprehensive BackgroundAgentPool tests (submit, collect, concurrent, waitall) - Added cmd/version_test.go (SetVersion, SetBuildDate, VersionString, ShortVersion) - Verified full ecosystem integration via go.work (eyrie, tok, yaad, inspect, sight) * feat(hawk): reduce errcheck to 65 — fix cmd, engine, cmdhistory - Fixed all cmd/ errcheck: WAL operations, SetPermissionMode, GenCompletion, LoadEnvFile - Fixed all engine/ errcheck: ConvoDAG, Memory, CostTracker, Snapshots, hooks - Fixed cmdhistory rows.Close, db.Close patterns - Total errcheck: 416 → 65 (84% reduction) * feat(hawk): reduce errcheck to 35 — fix mcp, memory, onboarding, remaining cmd - Fixed mcp stdin.Write/Close, Process.Kill - Fixed memory store operations (UpdateNode, StoreGlobal, CodeLinks) - Fixed onboarding SaveGlobal - Fixed memory/yaad_bridge store.Close - Fixed flaky background agent test timing - Total errcheck: 416 → 35 (92% reduction) - Remaining 35 are goroutine launches and multi-line expressions * feat(hawk): reduce errcheck to 16 — near-zero unchecked errors - Fixed parallel/worktree.go os.Remove - Fixed tool/devenv.go os.Rename - Fixed tool/transaction.go f.Close - Fixed snapshot/workspace.go gw.Close, gr.Close - Total errcheck: 416 → 16 (96% reduction) - Remaining 16 are unfixable: goroutine launches, recover(), multi-line fmt * feat(hawk): add engine tests — FileTracker, AdaptivePrompt - Comprehensive FileTracker tests (RecordRead, RecordModified, ExtractFromMessages, FormatForSummary, ParseFromSummary, Merge, RoundTrip) - AdaptivePrompt tests (LearnFromFeedback, FormatForPrompt, Count, Persistence) - Coverage: 73.2% → 73.4% * feat(hawk): golden test, diagnostics tests, coverage improvements - Added golden file test infrastructure (testdata/golden/) - Added CLI diagnostics tests (doctorReport, settingsSummary, mcpConfigSummary, builtInToolsSummary, sessionsSummary) - Coverage: 73.2% → 73.5% * feat(hawk): tool metadata tests, registry tests, coverage push - Added comprehensive tool metadata tests for all core tools (Bash, Read, Write, Edit, Grep, Glob) - Added Registry tests (Get, PrimaryTools, EyrieTools, no duplicates) - Tests verify Name, Description, Parameters, RiskLevel for all registered tools - Coverage: 73.5% * docs(hawk): add architecture documentation - docs/architecture.md with package map, data flow, design decisions - Mermaid-compatible ASCII diagram of system layers * feat(hawk): concurrency stress tests for session package - TestWAL_ConcurrentAppend: 50 goroutines writing to WAL simultaneously - TestSession_ConcurrentSaveLoad: concurrent reads while session exists - TestSession_ConcurrentList: concurrent List() calls - All pass with -race detector * feat(hawk): comprehensive onboarding + memory tests - Onboarding tests: NeedsSetup (with/without keys), validateAPIKey, SaveAPIKeyToEnvFile, Welcome - Memory tests: Save/Load/List/Search/Consolidate/ExtractFromSession/isMemoryWorthy - Onboarding coverage: 3.3% → 39% - Overall coverage: 73.6% * feat(hawk): PR analysis tests, coverage 73.6% → 77.6% - Added PR code review tests (analyzeDiff, checkLine, formatReview, generateReviewSummary) - Tests verify detection of hardcoded secrets, TODO comments, fmt.Println usage - Overall coverage jumped to 77.6% * feat(hawk): API tests, final coverage improvements - Added API server tests (writeJSON, New, MethodNotAllowed, UnknownEndpoint) - Coverage stable at 73.7% * feat(hawk): fix flaky tests, add cost/timeout tests - Fixed BackgroundAgentPool flaky test (use WaitAll instead of sleep) - Fixed version tests (remove t.Parallel on global state mutations) - Added FormatCostDisplay tests (all formatting branches) - Added DefaultTimeoutConfig, WithTimeout, RemainingTime tests * chore: adopt eco-wide .editorconfig, CONTRIBUTING.md, Makefile templates * feat(hawk): introduce ChatClient interface for testable engine - Created ChatClient interface (Chat, StreamChatContinue, SetAPIKey) - Changed Session.client from concrete *client.EyrieClient to ChatClient interface - Changed CoreLoop.Client from concrete to ChatClient interface - Created mockClient test helper with canned responses - Added session mock tests (AddUser, AddAssistant, LoadMessages, Cost, Metrics, Chat) - This enables future tests to exercise engine streaming without real LLM calls * feat(hawk): engine stream tests with mock client — coverage 73.8% - TestSession_Stream_MockEndTurn: exercises full agent loop with mock LLM - TestSession_Stream_MultiTurn: tests multi-turn conversation flow - Both tests verify events are emitted and LLM is called - Proves the ChatClient interface works for testing the stream path * chore: gitignore engine test state files * feat(hawk): cmd slash command tests, coverage 73.9% - TestSlashCommands_NotEmpty, TestSlashCommands_ContainsEssentials - TestSlashSuggestions with prefix matching - TestHasString, TestBranchSummary, TestFilesSummary, TestHooksSummary * feat(hawk): slash command handler tests, coverage 74.1% - Added chatModel test helper with mock session - Tests for /help, /version, /clear, /model, /cost, /tokens, /tools, /status - Batch test for 16 commands (/context, /env, /hooks, /stats, etc.) - Tests for /new, /copy, /export, /unknown - cmd coverage: 40.4% → 42% - Overall: 73.9% → 74.1% * feat(hawk): expand slash command test coverage - Added 12 more safe command tests (/config, /yolo, /sandbox, /vim, /effort, etc.) - Removed commands that trigger streaming (need client wired up) - Coverage stable at 74.1% * feat(hawk): export mock client for cross-package testing - Added SetTestClient() and NewMockClientForTest() to engine package - Wired mock client into cmd chatModel test helper - Enables other packages to test with mock LLM without real API calls - Coverage: 74.1% * feat(hawk): wire mock client into cmd tests, coverage 74.2% - Set progRef in test chatModel so streaming commands don't nil-panic - Added /doctor, /commit, /review, /compact to safe command list (non-race) - Removed /lint and /test which hang (execute real shell commands) - Coverage: 74.2% (from 73.1% at project start) * chore: gitignore test state directories * feat(hawk): add splitStatements test, adopt eco-wide CI/Makefile templates * feat(hawk): add TaskStore tests, coverage plateau at 74.2% - TaskStore tests: Create, Get, List, Update, CreateWithParent - Coverage: 74.2% — remaining 5.8% requires SQLite schema, filesystem, plugin runtime, TUI test infrastructure * feat(hawk): fix splitStatements for triggers, add full SQLiteStore tests - Fixed splitStatements to handle BEGIN...END blocks (trigger semicolons) - Added 12 SQLiteStore integration tests (Create, Get, List, Messages, Update, Delete, Fork, Search, Stats, Compact) - Session coverage: 65.5% → 73.2% - Overall: 74.4% * feat(hawk): cron scheduler tests, coverage 74.4% * feat(hawk): cron scheduler + splitStatements fix, coverage 74.4% * feat(hawk): extra tool tests, fix go.work for broken inspect dep - Added NotebookEditTool, ConfigTool, BriefTool integration tests - Fixed go.work to not pull broken inspect/sight local repos (sarif dep issue) - Coverage: 74.5% * feat(hawk): task/cron Execute tests, tool extra tests - TaskCreateTool, TaskGetTool, TaskListTool, TaskUpdateTool Execute tests - CronCreateTool, CronListTool, CronDeleteTool Execute tests - NotebookEditTool, ConfigTool, BriefTool Execute tests - Coverage: 74.5% * feat(hawk): cost tracker tests + splitStatements BEGIN/END fix — 74.6% - CostTracker tests: NewAndRecord, SessionTotal, Entries, LoadCostHistory - splitJSONLines test - Coverage: 74.6% * feat(hawk): autosave/lock tests, coverage 74.6% * feat(hawk): steering, fewshot, prompt tuner tests — coverage 74.8% - SteeringQueue tests (Enqueue, Drain, HasPending, Clear, Notify) - FewShotStore tests (Record, Retrieve, FormatForPrompt) - PromptTuner tests (RecordOutcome, BestVariant, Report) * feat(hawk): memory auto_capture tests, isTestCommand * feat(hawk): callgraph tests + coverage 74.9% * feat(hawk): transfer learning tests — 74.9% * feat(hawk): full engine loop integration tests * feat(hawk): core memory + plan mode tests * feat(hawk): config settings + memory confidence/sort tests * feat(hawk): more cmd/config/memory tests — 74.9% * feat(hawk): session autosave tests — coverage breaks 75% - Added tests for containsTag, containsIgnoreCase, toLower, indexOf, extractContext - Added CleanOldSessions, ExportToMarkdown, SearchSessions integration tests - Session coverage: 65.5% → 76%+ - Overall coverage: 75.0% * feat(hawk): export/redact + evolving memory tests — 75.0% * feat(hawk): persist/integrity/stats/checksum tests — 75.1% * feat(hawk): task/cron metadata + delete tests — 75.1% * feat(hawk): tool metadata + review pipeline tests — 75.2% * feat(hawk): fingerprint dep counting tests, session persist/integrity * feat(hawk): expand cmd command coverage with more handlers * feat(hawk): yaad bridge integration tests, memory 42%→47% — 75.3% * feat(hawk): expand cmd handler tests to 30+ commands — 75.4% * feat(hawk): test 60+ slash commands — 75.7% * feat(hawk): streaming command tests (doctor, commit, review, etc.) — 75.6% * feat(hawk): plugin manifest v2 tests — 75.7% * feat(hawk): adopt task, cron, security, and session patterns from bitterbot 6 new modules: - cron: scheduled agent invocations with concurrency, retries, backoff - task: long-horizon tasks with plan steps, handoffs, judge verification - permissions/external_content: security wrapper for untrusted content - session/coherence: conversational act classification and thread tracking - session/fork: copy lineage into new thread for branch exploration - session/provenance: input source tagging (user/system/cron/webhook) * feat(hawk): adopt herm patterns — outline/git tools, background agents, container hot-swap, sub-agent resume Port features from herm into hawk natively: - OutlineTool for AST-level signature scanning (10 languages, head/tail fallback) - GitTool with 16 allowed subcommands, force-push detection, approval checks - BackgroundAgentManager for fire-and-forget sub-agents with result collection - agent_id/resume and retry_of support for sub-agent lifecycle management - DevEnv real Docker build via exec.CommandContext (was no-op) - RebuildAndForceSwap for mid-session container hot-swap - Rich sub-agent prompts with exploration strategy and budget management * feat: implement 80+ features from 10 OSS repos + research papers Sources compared: - lacymorrow/lacy (shell UX, terminal context, NL detection) - EleutherAI/lm-evaluation-harness (eval framework, caching, YAML tasks) - higgsfield-ai/skills (skill ecosystem, multi-agent manifests, validation CI) - aaif-goose/goose (recipes, malware check, adversary inspector, OAuth, Telegram) - bmad-code-org/BMAD-METHOD (scale-adaptive, adversarial review, project context) - aaronjmars/aeon (self-improve, reflect, coding soul) - SylphAI-Inc/AdalFlow (prompt optimizer, few-shot selector, textual gradients) - karpathy/autoresearch (autonomous experiment loop) - Aider-AI/aider (auto-commit, directive scanner, edit strategies) - opencode-ai/opencode (event bus, diff sandbox patterns) Key features added: - Terminal context capture (delta-based) - Background preheating + connection warmup - Real-time input classification indicator - Smart NL rerouting on shell command failure - Braille spinner animations with shimmer - Ghost text suggestions (project-aware) - Mode toggling (shell/agent/auto) with persistence - Eval CLI (hawk eval run/list/results/cache-clear) - YAML task definitions + result caching + reproducibility hashes - Recipe system (YAML-based guided workflows) - Extension malware check + adversarial/egress inspector - Langfuse tracing + OAuth device flow + Telegram gateway - Tool monitor + custom distributions support - Scale-adaptive intelligence (patch/minor/major/epic) - Adversarial review + project context + quick-dev workflow - Checkpoint preview + course correction + investigation workflow - Party mode (multi-persona) + brainstorming facilitation - Self-improvement (cross-session learning) + coding soul - Prompt auto-optimizer (textual gradients, few-shot selection) - Autonomous experiment loop (modify/validate/keep/discard) - Agent intelligence (auto-decomposition, pipeline detection, synthesis) - Auto-commit + directive scanner + edit strategy selector - Event bus (pub/sub) + clipboard bridge - Spec-driven development (/spec command) - Assumption tracker + quality gates + degradation detector - Multi-repo context loading - .hawkhints loader + source roots tracking - Tool inspector (confidence-based) + tool confirmation router - Large response handler (pagination) - Background runner (async subagent delegation) - Compaction trigger (proactive context management) - LLMClient interface + Reflector (fixed missing types) All 56 packages pass, 0 failures.
1 parent 5a70a5d commit 1722d76

415 files changed

Lines changed: 23497 additions & 2048 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.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: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
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/hawk/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 run `hawk ...`, I expected X but got Y.
23+
validations:
24+
required: true
25+
26+
- type: textarea
27+
id: reproduce
28+
attributes:
29+
label: Steps to reproduce
30+
description: Minimal steps that reliably reproduce the problem.
31+
placeholder: |
32+
1. Run `hawk ...`
33+
2. Type `...`
34+
3. See error `...`
35+
validations:
36+
required: true
37+
38+
- type: textarea
39+
id: expected
40+
attributes:
41+
label: Expected behavior
42+
description: What did you expect to happen instead?
43+
validations:
44+
required: true
45+
46+
- type: input
47+
id: hawk-version
48+
attributes:
49+
label: hawk version
50+
description: Output of `hawk version` (or `hawk --version`).
51+
placeholder: "0.2.0"
52+
validations:
53+
required: true
54+
55+
- type: input
56+
id: os
57+
attributes:
58+
label: Operating system
59+
description: e.g. macOS 14.5 (arm64), Ubuntu 24.04 (amd64), Windows 11 (amd64).
60+
placeholder: "macOS 14.5 (arm64)"
61+
validations:
62+
required: true
63+
64+
- type: input
65+
id: go-version
66+
attributes:
67+
label: Go version (if building from source)
68+
description: Output of `go version`. Skip if you installed a pre-built binary.
69+
placeholder: "go version go1.26.1 darwin/arm64"
70+
71+
- type: textarea
72+
id: logs
73+
attributes:
74+
label: Logs / output
75+
description: |
76+
Paste any relevant output. If running interactively, re-run with `--verbose`
77+
and include the output. **Redact any secrets, tokens, or private data first.**
78+
render: shell
79+
80+
- type: checkboxes
81+
id: confirm
82+
attributes:
83+
label: Confirmation
84+
options:
85+
- label: I searched existing issues and did not find a duplicate.
86+
required: true
87+
- label: I redacted any secrets, API keys, or private data from logs.
88+
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/hawk/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/hawk/discussions
8+
about: Have a question or want to discuss an idea? Open a discussion instead of an issue.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Feature request
2+
description: Suggest an improvement or new capability for hawk.
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. hawk is built for **solo developers**, so
11+
we evaluate every request against the question: _"would a single
12+
developer working alone benefit from this?"_
13+
14+
Before submitting:
15+
- Search [existing issues](https://github.com/GrayCodeAI/hawk/issues) to avoid duplicates.
16+
- For large changes, consider opening a discussion first.
17+
18+
- type: textarea
19+
id: problem
20+
attributes:
21+
label: What problem are you trying to solve?
22+
description: Describe the user problem first. Solutions can come later.
23+
placeholder: When I'm doing X, hawk makes me do Y, which is painful because Z.
24+
validations:
25+
required: true
26+
27+
- type: textarea
28+
id: proposal
29+
attributes:
30+
label: Proposed solution
31+
description: How would you like hawk to behave? CLI flags, output, config, etc.
32+
validations:
33+
required: true
34+
35+
- type: textarea
36+
id: alternatives
37+
attributes:
38+
label: Alternatives considered
39+
description: What did you try? What did other tools do? Why isn't that enough?
40+
41+
- type: dropdown
42+
id: scope
43+
attributes:
44+
label: Scope
45+
description: Roughly how big is this change?
46+
options:
47+
- "Small (a flag or output tweak)"
48+
- "Medium (a new subcommand or behavior)"
49+
- "Large (architectural / cross-package)"
50+
validations:
51+
required: true
52+
53+
- type: checkboxes
54+
id: principles
55+
attributes:
56+
label: Solo-developer fit
57+
description: hawk avoids enterprise scope. Confirm this feature respects that.
58+
options:
59+
- label: Works with zero configuration (sensible defaults).
60+
- label: Works offline / does not require a cloud account.
61+
- label: Stores data locally by default.
62+
- label: Has an escape hatch (override via flag, env, or config).

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<!--
2+
Thanks for your contribution! Please fill out this template so reviewers can
3+
understand the change quickly. Anything that does not apply can be left in
4+
place; do not delete unanswered sections — write "n/a".
5+
-->
6+
7+
## Summary
8+
9+
<!--
10+
One paragraph describing what this PR does and why. Link the related
11+
issue(s) with `Fixes #N` or `Refs #N` if applicable.
12+
-->
13+
14+
## Changes
15+
16+
<!--
17+
Bullet list of what changed, grouped by area (engine, tools, CLI, CI, etc.).
18+
Reviewers should be able to skim this and know what to look at first.
19+
-->
20+
21+
-
22+
23+
## Testing
24+
25+
<!--
26+
Describe how you tested. Paste output of `make test` and `make lint`. If you
27+
added new tests, list them. If you could not run something locally (e.g.
28+
Linux-only sandbox tests on macOS), call that out.
29+
-->
30+
31+
```text
32+
$ make test
33+
...
34+
$ make lint
35+
...
36+
```
37+
38+
## Checklist
39+
40+
- [ ] My commits follow [Conventional Commits](https://www.conventionalcommits.org/)
41+
(`feat(scope): …`, `fix(scope): …`, `docs(scope): …`, etc.)
42+
- [ ] `make build` passes
43+
- [ ] `make lint` passes (no new lint findings, no `nolint:…` without justification)
44+
- [ ] `make test` passes locally with `-race` enabled
45+
- [ ] New or changed code has tests (table-driven where appropriate)
46+
- [ ] Public APIs have godoc comments and runnable examples where helpful
47+
- [ ] `CHANGELOG.md` updated under `## [Unreleased]` if user-visible
48+
- [ ] No secrets, tokens, or PII added to the repo
49+
- [ ] No `Co-authored-by:` trailers (this is solo-developer work)

.github/dependabot.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: gomod
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
open-pull-requests-limit: 5
8+
labels:
9+
- dependencies
10+
commit-message:
11+
prefix: "deps"
12+
13+
- package-ecosystem: github-actions
14+
directory: /
15+
schedule:
16+
interval: weekly
17+
open-pull-requests-limit: 3
18+
labels:
19+
- ci
20+
commit-message:
21+
prefix: "ci"
22+
23+
- package-ecosystem: docker
24+
directory: /
25+
schedule:
26+
interval: monthly
27+
labels:
28+
- docker
29+
commit-message:
30+
prefix: "docker"

0 commit comments

Comments
 (0)