Convert gitgram/ and aitimemachine/ from embedded git repos (which showed as opaque submodule gitlinks on GitHub) into fully-tracked first-party content. AITM now merges its 7 vendored repos as first-party engines: - memory: beads (Go task DAG) + context7 (docs SDK), unified into saved_contexts - git: vendored C git (bundled binary) + gitnexus (in-process code intelligence) - agentic: a2a (@a2a-js/sdk) + pal (AITM-managed Python subprocess) Includes the full session's product build: Gitgram web/mobile/backend features, AITM website/CLI/MCP, the unified memory layer, engine build tooling (scripts/build-engines.sh, Dockerfile, CI), docs (README, ENGINES.md, ARCHITECTURE.md), and extensive test suites. Build artifacts, node_modules, external/, and gemini-cli are gitignored. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
27 lines
1.1 KiB
Bash
Executable File
27 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Pre-commit hook: auto-format with gofmt and lint with golangci-lint.
|
|
# Installed via: git config core.hooksPath .githooks
|
|
# See also: make install (sets hooksPath automatically)
|
|
|
|
set -euo pipefail
|
|
|
|
# Only check staged Go files (Added, Copied, Modified)
|
|
staged_go_files=$(git diff --cached --name-only --diff-filter=ACM -- '*.go')
|
|
[ -z "$staged_go_files" ] && exit 0
|
|
|
|
# Use go run so golangci-lint is always built with the project's Go
|
|
# toolchain, avoiding version-mismatch panics from a stale global binary.
|
|
GOLANGCI_LINT="go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.10.1"
|
|
|
|
# Auto-format and re-stage
|
|
echo "$staged_go_files" | xargs gofmt -w
|
|
echo "$staged_go_files" | xargs git add
|
|
|
|
# Lint changed code with auto-fix; block on remaining issues.
|
|
# CGO_ENABLED=0 avoids typecheck failures from CGO-only dependencies
|
|
# (e.g., dolthub/go-icu-regex) that require system headers not always present.
|
|
CGO_ENABLED=0 $GOLANGCI_LINT run --new-from-rev=HEAD --fix || exit 1
|
|
|
|
# Re-stage any auto-fixes from the linter
|
|
echo "$staged_go_files" | xargs git add
|