gitcontribute

module
v0.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2026 License: MIT

README

GitContribute

Local research and validation for GitHub contributions.

CI npm Go License Platforms

Quick start · Workflow · CLI · MCP · Safety · Documentation

GitContribute contribution workbench

gitcontribute is available as a CLI, terminal UI, and MCP server for coding agents.

GitHub can show you open issues. It cannot tell you whether an issue is still relevant, already being implemented, appropriate for an outside contributor, or supported by enough evidence to work on safely.

GitContribute collects repository guidance, related issues and pull requests, code context, accepted contribution patterns, and validation results in a local SQLite corpus. Results identify missing or stale coverage.

find work -> understand it -> check competing work -> prove the change -> prepare the handoff

[!IMPORTANT] GitContribute never writes to GitHub. It prepares local research and drafts for you to review.

Quick start

Run the guided setup with Node.js 18 or newer:

npx --yes gitcontribute@latest setup

Choose MCP to use GitContribute from a supported coding agent, CLI for the terminal and TUI, or Both. The wizard shows every planned change before applying it. Adding a repository during setup does not contact GitHub or start a sync.

After setup, start with a repository or an exact issue:

Task Coding agent CLI
Find candidates Find contribution candidates in owner/repo. Rank them by contribution fit, evidence, scope, and coordination risk. gitcontribute archive sync owner/repo
gitcontribute radar owner/repo --limit 10
Research an issue Investigate owner/repo#42. Check guidance, discussion, code, prior fixes, competing work, and missing evidence. gitcontribute archive sync owner/repo --numbers 42
gitcontribute research brief issue:owner/repo#42

Results include source references, coverage gaps, and suggested next steps.

Other installation options

Install a persistent command:

npm install --global gitcontribute@latest
gitcontribute setup

Pin GitContribute to a project:

npm install --save-dev gitcontribute
npm exec -- gitcontribute setup --mode mcp --codex --token-source none --yes

Build from source with Go 1.26 or newer:

go install github.com/morluto/gitcontribute/cmd/gitcontribute@latest

Native npm binaries are included for macOS ARM64/x64, Linux ARM64/x64, and Windows x64. You also need git. The gh CLI is optional and can provide authentication through gh auth token.

Contribution workflow

1. Find a candidate

Search a repository or rank its open issues by available evidence, scope, risks, blockers, and signs that maintainer coordination is needed.

Find contribution candidates in golang/go. Exclude issues with active
implementation work and explain why each remaining candidate is worth
investigating.

The ranking only covers stored observations. Results report incomplete coverage.

2. Research an issue

Build a research brief from the issue, repository guidance, discussion, linked work, indexed code, and historical contributions. Extracted maintainer text and checkboxes are not presented as complete acceptance criteria.

Investigate issue owner/repo#42. Summarize the confirmed problem, likely scope,
relevant code, maintainer guidance, and open questions.

Look for duplicate reports, linked pull requests, closing relationships, and semantically overlapping work before investing in an implementation.

Check whether owner/repo#42 has duplicate reports or competing implementation
work. Tell me what you checked and identify any missing coverage.

Incomplete coverage is reported instead of being treated as proof that no competing work exists.

4. Validate a change

Record a reproduction, test, benchmark, or other validation and compare the unmodified baseline with a candidate. Validation commands run only after explicit approval.

Validate my candidate change against the baseline. Run the approved checks,
record both results, and explain whether the evidence supports the change.

Stored runs include the command, outcome, timing, and available process metrics.

5. Prepare a draft

Create a local issue, pull-request, or review draft tied to the research and validation evidence already collected.

Prepare a pull-request draft for this contribution. Tie its claims to the
recorded evidence, include the validation results, and do not post anything.

Draft revisions retain their exact rendered bytes and provenance.

Interfaces and storage

GitContribute stores repositories, threads, code snapshots, investigations, evidence, validation results, and contribution outcomes in SQLite. Network access is explicit; once information has been synced, corpus search and inspection work offline.

 GitHub read APIs                  Local checkout
       |                                |
       | explicit sync / hydrate        | explicit index / acquire
       v                                v
  +------------------------------------------------+
  |              Local SQLite corpus               |
  | observations · coverage · evidence · outcomes  |
  +------------------------+-----------------------+
                           | offline reads
                 +---------+---------+
                 v                   v
              CLI / TUI          Coding agents

The CLI and MCP server use the same application services and side-effect boundaries.

CLI

The CLI exposes the same workflow without requiring an MCP client:

# Sync repository context and current threads
gitcontribute archive sync-context owner/repo
gitcontribute archive sync owner/repo

# Find and inspect contribution candidates
gitcontribute radar owner/repo --limit 10
gitcontribute research brief issue:owner/repo#42

# Search stored threads and indexed code
gitcontribute search threads "connection timeout" --repo owner/repo
gitcontribute search code "context.WithTimeout" --repo owner/repo

For implementation work:

gitcontribute investigation start-thread issue:owner/repo#42 --json
gitcontribute workspace create <investigation-id>
gitcontribute validation define --kind=test --command="go test ./..." \
  --working-dir=/path/to/workspace <investigation-id>
gitcontribute validation run <validation-id> --kind=base --execute
gitcontribute validation run <validation-id> --kind=candidate --execute
gitcontribute validation compare <base-run-id> <candidate-run-id>
gitcontribute readiness opportunity <opportunity-id>
gitcontribute prepare pr --approach="Bound retries with context" \
  --workspace <workspace-id> <opportunity-id>

Run gitcontribute --help or gitcontribute <command> --help for the complete command and flag reference. Most non-interactive commands accept --json; machine-readable output goes to stdout and progress goes to stderr.

Launch the local TUI with:

gitcontribute tui

MCP

The MCP server advertises one unified catalog. Hosts such as Codex and Claude Code can discover large MCP catalogs with native tool search, so setup does not ask users to choose permanent capability profiles.

gitcontribute setup --mode mcp --codex --token-source none --yes
gitcontribute setup --mode mcp --all-clients --token-source none --yes

To start the stdio server directly:

gitcontribute mcp serve --transport=stdio

Add --read-only to remove tools that permit local writes or execution. See Scalable MCP workflows for the tool sequence, coverage model, partial-result recovery, and side-effect boundaries.

Side-effect boundaries

GitContribute separates corpus reads, GitHub reads, local writes, process execution, and external mutation.

Operation Network Local write Runs a process GitHub write
Search and inspect stored research No No No No
Record investigations and evidence No Yes No No
Sync or hydrate GitHub context Yes Yes No No
Acquire and index code Yes Yes git only No
Run an explicitly approved validation No by default Yes Yes No
  • Corpus reads never fetch data.
  • Crawling and indexing never execute repository-controlled code.
  • Explicit validation commands run on your host with your user permissions.
  • GitContribute has no GitHub mutation capability.
  • There is no hosted corpus or product telemetry.

See Architecture for the complete boundary definitions.

Documentation

Storage

GitContribute follows platform conventions:

Platform Configuration Data
Linux $XDG_CONFIG_HOME/gitcontribute or ~/.config/gitcontribute $XDG_DATA_HOME/gitcontribute or ~/.local/share/gitcontribute
macOS ~/Library/Application Support/gitcontribute ~/Library/Application Support/gitcontribute/Data
Windows %APPDATA%\gitcontribute %LOCALAPPDATA%\gitcontribute\Data

The default corpus is gitcontribute.db in the data directory. Run gitcontribute metadata or gitcontribute doctor --json to inspect the local setup.

Platform support

Linux and macOS are the primary development and test targets. Windows builds are tested in CI and use the standard %APPDATA% and %LOCALAPPDATA% locations.

Development

make verify
go run ./cmd/gitcontribute --help

Before changing package boundaries or side effects, read docs/architecture.md. See CONTRIBUTING.md for the repository workflow.

Directories

Path Synopsis
cmd
gitcontribute command
internal
acquire
Package acquire manages explicit, native-git clone/fetch operations into a local cache.
Package acquire manages explicit, native-git clone/fetch operations into a local cache.
app
Package app owns GitContribute use cases and capability composition.
Package app owns GitContribute use cases and capability composition.
buflimit
Package buflimit provides bounded in-memory command output capture.
Package buflimit provides bounded in-memory command output capture.
cli
Package cli parses command-line input and renders stable human and JSON output for GitContribute application services.
Package cli parses command-line input and renders stable human and JSON output for GitContribute application services.
clustering
Package clustering computes exact duplicate-thread clusters from caller-owned candidate snapshots.
Package clustering computes exact duplicate-thread clusters from caller-owned candidate snapshots.
clusterprojection
Package clusterprojection owns the dependency-neutral contracts for the durable duplicate-cluster projection.
Package clusterprojection owns the dependency-neutral contracts for the durable duplicate-cluster projection.
codeindex
Package codeindex indexes a bounded snapshot of tracked UTF-8 text files from a clean Git checkout using the native git executable and the standard library.
Package codeindex indexes a bounded snapshot of tracked UTF-8 text files from a clean Git checkout using the native git executable and the standard library.
commitplan
Package commitplan builds verifiable, read-only semantic commit plans from Git-owned patches.
Package commitplan builds verifiable, read-only semantic commit plans from Git-owned patches.
concern
Package concern models low-confidence local findings before they become contribution hypotheses or public issues.
Package concern models low-confidence local findings before they become contribution hypotheses or public issues.
corpus
Package corpus provides the product-owned SQLite system of record.
Package corpus provides the product-owned SQLite system of record.
deepwiki
Package deepwiki adapts the public DeepWiki MCP server behind a narrow, product-owned read contract.
Package deepwiki adapts the public DeepWiki MCP server behind a narrow, product-owned read contract.
discovery
Package discovery turns explicit repositories, GitHub repository searches, and GH Archive events into bounded discovery signals.
Package discovery turns explicit repositories, GitHub repository searches, and GH Archive events into bounded discovery signals.
facets
Package facets owns the names and selection policy for stored thread facets.
Package facets owns the names and selection policy for stored thread facets.
failure
Package failure defines application failure kinds without transport policy.
Package failure defines application failure kinds without transport policy.
github
Package github adapts read-only GitHub APIs to product-owned values.
Package github adapts read-only GitHub APIs to product-owned values.
gitremote
Package gitremote validates remote locations accepted by the native Git adapters.
Package gitremote validates remote locations accepted by the native Git adapters.
health
Package health computes deterministic repository health and community metrics from already stored public corpus facts.
Package health computes deterministic repository health and community metrics from already stored public corpus facts.
lens
Package lens applies transparent, reusable filters and weighted signals to local corpus candidates.
Package lens applies transparent, reusable filters and weighted signals to local corpus candidates.
log
Package log provides structured logging for gitcontribute using log/slog.
Package log provides structured logging for gitcontribute using log/slog.
managedbinary
Package managedbinary owns GitContribute's private MCP runtime installation.
Package managedbinary owns GitContribute's private MCP runtime installation.
manifest
Package manifest owns the stable contribution evidence export contract.
Package manifest owns the stable contribution evidence export contract.
mcpadapter
Package mcpadapter wires the application boundary to the MCP transport.
Package mcpadapter wires the application boundary to the MCP transport.
mcpserver
Package mcpserver exposes GitContribute application capabilities through the Model Context Protocol.
Package mcpserver exposes GitContribute application capabilities through the Model Context Protocol.
precedent
Package precedent owns dependency-neutral models used to load and rank historical threads without leaking database adapter types into application logic.
Package precedent owns dependency-neutral models used to load and rank historical threads without leaking database adapter types into application logic.
radar
Package radar ranks locally stored contribution candidates with transparent, deterministic signals.
Package radar ranks locally stored contribution candidates with transparent, deterministic signals.
ranking
Package ranking owns exact bounded selection utilities.
Package ranking owns exact bounded selection utilities.
redaction
Package redaction removes common credential forms from content crossing a publication boundary.
Package redaction removes common credential forms from content crossing a publication boundary.
relatedwork
Package relatedwork owns dependency-neutral relationship facts extracted from stored thread text.
Package relatedwork owns dependency-neutral relationship facts extracted from stored thread text.
repository
Package repository defines narrow, product-owned repository read contracts shared by offline research builders.
Package repository defines narrow, product-owned repository read contracts shared by offline research builders.
repositorycontext
Package repositorycontext owns the bounded repository-level GitHub reads shared by application planning and public adapters.
Package repositorycontext owns the bounded repository-level GitHub reads shared by application planning and public adapters.
research
Package research builds deterministic, source-backed thread research briefs.
Package research builds deterministic, source-backed thread research briefs.
setup
Package setup owns local coding-client detection and MCP registration.
Package setup owns local coding-client detection and MCP registration.
similarity
Package similarity owns exact, versioned thread similarity policies.
Package similarity owns exact, versioned thread similarity policies.
terminalinstall
Package terminalinstall owns the external package-manager capability used to make the GitContribute CLI and TUI persistently available.
Package terminalinstall owns the external package-manager capability used to make the GitContribute CLI and TUI persistently available.
tracking
Package tracking models local contribution research history.
Package tracking models local contribution research history.
tui
Package tui provides an offline contribution workbench over local corpus data.
Package tui provides an offline contribution workbench over local corpus data.
tuicontract
Package tuicontract defines the product-owned offline workbench boundary.
Package tuicontract defines the product-owned offline workbench boundary.
workspace
Package workspace manages Git mirrors and detached worktrees used to inspect candidate contributions.
Package workspace manages Git mirrors and detached worktrees used to inspect candidate contributions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL