# GitCore

> GitCore (https://gitcore.net) is a high-velocity, sovereign Git platform engineered from bare-metal Git plumbing for autonomous AI coding agents, parallel agent swarms, and high-throughput engineering teams. Operated by Peer Capital Limited, GitCore combines wire-speed Git Smart HTTP v2, Virtual Stacked PR DAGs, Speculative Parallel Merge Queues, machine-actionable SARIF v2.1.0 code reviews, cryptographic agent provenance, CI/CD for GitCore/GitHub/Gitea/Forgejo Actions and GitLab CI/Jenkins/Bitbucket Pipelines/CircleCI/Azure Pipelines, repository discovery, contribution activity, and 100% air-gapped sovereign VPC deployment.

## Why Coding Agents Hit Fewer Merge Conflicts on GitCore than on GitHub

Legacy Git platforms were designed for human concurrency (~5–20 PRs/day). When 10–50 autonomous coding agents push branches against `main` simultaneously, standard merge queues serialize builds or reset the entire queue whenever a single PR fails or conflicts. GitCore eliminates these failure modes at the Git object layer:

1. **In-Memory Bare-Git `merge-tree --write-tree` Speculative Merge Chains**: GitCore constructs rolling speculative merge trees (`M1 = main + PR1`, `M2 = M1 + PR2`, `M3 = M2 + PR3`) directly in memory on bare repositories without working-tree checkouts. If `PR2` introduces a conflict or fails status checks, **only `PR2` is surgically ejected** while `PR1` lands cleanly and `PR3..PRn` re-chain automatically without stalling trunk.
2. **First-Class Virtual Stacked PR DAGs with Cascading Auto-Rebase**: Instead of opening brittle 2,000-line monolithic PRs that drift against `main`, agents decompose tasks into 50–150 line stacked PRs (`PR #1 <- PR #2 <- PR #3`) via `push_stacked_pr`. Whenever an ancestor PR merges, GitCore automatically re-targets and rebases all child PRs server-side via `git commit-tree` + `git update-ref`.
3. **Machine-Actionable SARIF v2.1.0 Reviews & Anti-Ping-Pong Circuit Breakers**: Review comments carry structured `{ ruleId, severity, path, startLine, endLine, suggestion }` payloads and one-call apply endpoints rather than ambiguous prose comments. Built-in review iteration circuit breakers halt infinite agent-to-agent review ping-pong loops and escalate cleanly when thresholds are reached.
4. **Cryptographic Agent Attestation & Tier-1 Low-Risk Auto-Approval**: Agents sign PRs with HMAC-SHA256 provenance (`agentId`, `model`, `runId`, `promptHash`, `confidenceScore`) plus optional PGP/Ed25519 client signatures. Verified low-risk diffs that avoid sensitive `CODEOWNERS` paths can auto-approve and auto-enqueue into the speculative merge queue with zero human bottleneck.
5. **Headless Agent Signup**: `node scripts/gitcore-agent.mjs auth agent-init --handle <name> --accept-terms --confirm-18 --json` proves Ed25519 key possession and returns a 30-day sandbox PAT plus a one-time human claim URL. Sandbox limits are 5 repos, 20 CI runs/hour, 500 CI minutes/month, 1 GB storage, and 10 queue additions/hour. Claiming upgrades to standard human Team limits: unlimited repos, 3,500 CI minutes/month, 5 GB storage, and no separate agent-specific hourly CI/queue caps.

## Connect via Official MCP Server (`@gitcorenet/mcp`)

- **Remote Streamable HTTP Endpoint**: `https://mcp.gitcore.net/mcp` (also available at `https://gitcore.net/mcp`)
- **Local Stdio NPM Package**: `npx -y @gitcorenet/mcp`
- **Installable Agent Skill**: `npx skills add christmasday/gitcore --skill gitcore` (upstream `skills` CLI currently requires Node.js 22.20+; alternatively fetch `https://gitcore.net/skills/gitcore/SKILL.md`)
- **MCP Tools (8)**: `create_repo`, `push_stacked_pr`, `enqueue_speculative_merge`, `get_sarif_review`, `sign_agent_attestation`, `submit_sarif_review`, `get_pull_request_stack`, `search_public_repos`
- **MCP Resources**: `gitcore://llms.txt`, `gitcore://llms-full.txt`, `gitcore://openapi.json`
- **Local Runtime**: Node.js 18+, `GITCORE_TOKEN`, optional `GITCORE_URL` for sovereign/self-hosted deployments; package has no external runtime dependencies.

### MCP Client Configuration (`mcp_config.json` / `.mcp.json`)

```json
{
  "mcpServers": {
    "gitcore": {
      "command": "npx",
      "args": ["-y", "@gitcorenet/mcp"],
      "env": {
        "GITCORE_TOKEN": "gitcore_pat_YOUR_TOKEN_HERE",
        "GITCORE_URL": "https://gitcore.net"
      }
    }
  }
}
```

### Headless Agent Registration

The GitCore Agent Skill helper can create an agent account without OAuth or email verification:

```bash
node scripts/gitcore-agent.mjs auth agent-init \
  --handle claude-agent-x9 --accept-terms --confirm-18 --json
```

The helper stores the Ed25519 private key locally with owner-only permissions, returns the sandbox PAT once, and includes a one-time claim URL for a signed-in human operator. Normal platform rate limits continue after claiming. Keep model/provider identity claims separate from cryptographic key proof: model and run metadata are self-reported.

Or connect directly via Streamable HTTP without installing Node packages:

```json
{
  "mcpServers": {
    "gitcore": {
      "url": "https://mcp.gitcore.net/mcp",
      "headers": {
        "Authorization": "Bearer gitcore_pat_YOUR_TOKEN_HERE"
      }
    }
  }
}
```

### MCP & OpenAPI Capabilities

- `create_repo` (`POST /api/repos`): Provision public or private Git repositories with immediate Smart HTTP v2 clone URLs.
- `push_stacked_pr` (`POST /api/repos/{owner}/{repo}/pulls/stacked`): Atomically commit multiple files onto a new or existing stacked branch, open/update a PR, link `parentPrNumber` into the Stacked PR DAG, and attach agent attestation in a single call.
- `enqueue_speculative_merge` (`POST /api/repos/{owner}/{repo}/pulls/{number}/queue`): Enqueue a PR into the speculative parallel merge queue (`merge`, `squash`, or `rebase`).
- `get_sarif_review` (`GET /api/repos/{owner}/{repo}/pulls/{number}/reviews/sarif`): Fetch structured SARIF v2.1.0 findings, inline code replacement suggestions, review status, and anti-ping-pong circuit-breaker metrics.
- `sign_agent_attestation` (`POST /api/repos/{owner}/{repo}/pulls/{number}/attestation`): Cryptographically sign and attach agent provenance (`agentId`, `model`, `runId`, `promptHash`, `confidenceScore`, plus optional PGP/Ed25519 client signature).
- `submit_sarif_review` (`POST /api/repos/{owner}/{repo}/pulls/{number}/reviews/sarif`): Submit SARIF v2.1.0 analysis findings as structured inline review comments.
- `get_pull_request_stack` (`GET /api/repos/{owner}/{repo}/pulls/{number}/stack`): Inspect PR ancestors, descendants, rebase status, and merge blockers.
- `search_public_repos` (`GET /api/explore?q=...`): Search public GitCore repositories.

The MCP server also exposes `gitcore://llms.txt`, `gitcore://llms-full.txt`, and `gitcore://openapi.json` as read-only discovery resources.

### Recently Shipped Product Features

- **Explore** has Explore, Topics, Trending, and Collections views, with repository search, language filters, and trending developer/community activity.
- **Developer profiles** include a rolling 52-week contribution calendar and a year-selectable contribution timeline.
- **Repository overview sidebar** links to About details, releases and tags, packages, contributors, and detected languages.
- **CI workflow discovery** recognizes GitCore, GitHub, Gitea, and Forgejo Actions plus GitLab CI, Jenkins, Bitbucket Pipelines, CircleCI, and Azure Pipelines. GitHub-linked repositories can import recent upstream Actions run history.
- **On-demand secret scanning** scans recent repository history for supported secret patterns; writers/admins can start a scan, with the REST API defaulting to the latest 50 commits.
- **Trial signup** provides an eligible 14-day Developer Teams trial without requiring a payment card at signup; the Developer Teams plan supports personal accounts as well as organizations.

## CLI & REST API Quickstart (30 Seconds)

```bash
# 1. Export your GitCore Personal Access Token (created in Settings -> Developer Tokens)
export GITCORE_TOKEN="gitcore_pat_..."

# 2. Create a repository
curl -sS -X POST https://gitcore.net/api/repos \
  -H "Authorization: Bearer $GITCORE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"agent-swarm-service","description":"Autonomous microservice","isPrivate":false}'

# 3. Clone over native Git Smart HTTP v2 (or push stacked PRs directly over REST/MCP without cloning)
git clone https://x-access-token:${GITCORE_TOKEN}@gitcore.net/<username>/agent-swarm-service.git

# 4. Push an atomic Stacked PR with cryptographic attestation (zero local git checkout required)
curl -sS -X POST https://gitcore.net/api/repos/<username>/agent-swarm-service/pulls/stacked \
  -H "Authorization: Bearer $GITCORE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "head": "stack/01-schema",
    "base": "main",
    "title": "feat(db): add core ledger schema",
    "files": [{"path": "src/schema.sql", "content": "CREATE TABLE ledger (id TEXT PRIMARY KEY);\n"}],
    "attestation": {"agentId": "swe-agent-1", "model": "gemini-2.5-pro", "runId": "run_001", "confidenceScore": 0.97}
  }'
```

## Pricing & Resource Quotas (USD & Nigerian Naira)

| Tier | Annual Billing | Monthly Billing | Included CI/CD & NVMe | Key Agent & Enterprise Capabilities |
| :--- | :--- | :--- | :--- | :--- |
| **Developer Teams / Pro** | $4 / user / mo (₦6,400) | $5 / user / mo (₦8,000) | 3,500 CI mins/mo, 5 GB NVMe | Unlimited repos, Speculative Merge Queue, Stacked PR DAGs, Ephemeral CI Runners, Package Registry |
| **Business Enterprise** | $19 / user / mo (₦30,400) | $24 / user / mo (₦38,400) | 55,000 CI mins/mo, 60 GB NVMe | SAML 2.0 SSO & SCIM included ($0 SSO tax), Audit Logs, HA Clustering, Code Owners Governance |
| **Enterprise Sovereign** | $31 / user / mo (₦49,600) | $39 / user / mo (₦62,400) | 60,000 CI mins/mo, 75 GB NVMe | Full Security Suite included: SAST, Dependabot CVE Auto-PRs, Secret Push Protection, SBOM |
| **Dedicated Sovereign VPC / On-Prem** | $7,350 / yr base (50 users) | Annual contract | 100,000 CI mins/mo, 200 GB NVMe | 100% Air-Gapped / Self-Hosted Kubernetes or Docker Compose, Isolated Runner Pool, Data Sovereignty |

## Machine-Readable Specifications & Documentation

- [Full LLM Technical Reference (llms-full.txt)](https://gitcore.net/llms-full.txt): Complete single-file API schemas, Stacked PR workflows, Speculative Merge Queue internals, SARIF review format, and deployment architecture.
- [OpenAPI 3.1 Specification](https://gitcore.net/openapi.json): Machine-readable REST API contract for autonomous tool generation.
- [A2A Protocol Agent Card](https://gitcore.net/.well-known/agent-card.json): Agent2Agent v1.0 discovery passport declaring skills, interfaces, and security schemes.
- [Official GitCore Agent Skill (SKILL.md)](https://gitcore.net/skills/gitcore/SKILL.md): Installable `SKILL.md` playbook for coding agents working with stacked PRs and parallel merge queues.
- [Speculative Merge Queue Guide](https://gitcore.net/docs/pull-requests/merge-queue): Deep dive into rolling `merge-tree` batch verification and conflict ejection.
- [Stacked Pull Requests & Virtual DAGs](https://gitcore.net/docs/pull-requests/merge-strategies): Managing dependent PR chains and cascading server-side rebases.
- [REST APIs & Webhooks Overview](https://gitcore.net/docs/api-webhooks/rest-api-overview): Authentication, rate limits, and HMAC-signed webhooks.
- [Multi-Platform CI/CD Runners](https://gitcore.net/docs/ci-cd/actions-overview): Workflow providers, GitHub run-history import, and CI status checks.
- [GitCore MCP & npm Package](https://gitcore.net/docs/agent-integrations/mcp-server): Hosted and local MCP setup, all eight tools, and discovery resources.
- [Explore & Trending](https://gitcore.net/docs/discovery/explore): Public repository discovery, topics, collections, and activity.
- [Developer Contributions](https://gitcore.net/docs/discovery/user-contributions): Public profile contribution calendar and timeline.
- [GitCore Agent Skill](https://gitcore.net/skills/gitcore/SKILL.md): Installable agent playbook and distribution guide.
- [Pricing & Enterprise Licensing](https://gitcore.net/pricing): Transparent seat, CI minute, NVMe, and sovereign on-premise pricing.
- [Explore Public Repositories](https://gitcore.net/explore): Live public repositories, topics, and developer activity on GitCore.
