Skip to content
kujolangPublic

About

Source is an agent-first software development and collaboration platform built around Git.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Source

Version License built for Kujo Kujo ecosystem Runtime

Source connects Git changes to the work, agent sessions, checks and review decisions that produced them. Contributors can propose changes and attach evidence. Only an authorized review decision allows Source to promote a proposal into canonical Git.

Source is part of the Kujo ecosystem. Its server and CLI run on Node.js; adapters read evidence from Kujo Eval, Spec and ShipCheck.

Documentation · Release · Public MCP catalog

What Source does

  • Tracks a change from its task through review and promotion.
  • Assembles concurrent proposals and binds verification to the exact candidate.
  • Runs durable PostgreSQL verification workers with deduplication and evidence reuse.
  • Keeps GitHub as origin with secondary-remote sync and recoverable keyed submission.
  • Gives contributors scoped, expiring capabilities for API and Git access.
  • Checks required evidence before accepting a proposal.
  • Rejects stale proposals and preserves the record of revisions and conflicts.
  • Provides a browser UI for work, evidence, decisions, repository files and history.
  • Supports JSON and SQLite for local use, plus Postgres for shared deployments.
  • Promotes accepted changes to Cloudflare Artifacts through a Worker-backed bridge.
Project → Work → Session → Change → Evidence → Decision → Canonical Git

Status

Source is an experimental, self-hosted platform. Version 0.2.0 adds candidate integration, durable verification and recoverable submissions. It is suitable for local evaluation and controlled integration; it is not a production-readiness certification.

The three-client demo exercises real Git commits, concurrent proposals, approval denials, stale updates and conflict recovery. Clients and maintainer decisions are scripted. The live Cloudflare profile also verifies accepted promotion, recovery after a lost push acknowledgment, and an independent clone of the final repository. Source and its review data run locally in that profile; Workers and canonical Git run on Cloudflare.

CI covers the deterministic suite, PostgreSQL concurrency, container builds and writer failover. See the validation record, live Cloudflare evidence and versioned roadmap for the scope and remaining work. Deployment-scale capacity and independent security validation remain open.

Quick start

Use Node.js 22.23.4+, 24.22.1+, or 26.12.1+ on the supported branches, npm and Git. The local demo needs no Cloudflare account, Postgres database, Kujo checkout or model-provider key.

git clone --branch v0.2.0 https://github.com/kujolang/source.git
cd source
npm ci
npm run demo:contest -- --trace

The command creates an isolated run under .contest-demo/ and prints its report path. To inspect that run in the browser, use the directory printed by the demo:

npm run demo:serve -- .contest-demo/run-XXXXXX

Open http://127.0.0.1:8790. Read the login IDs and password from that run's local operator.json. Run directories and credentials are ignored by Git. Stop the server with Ctrl-C. See the runbook for repeatable checks and the reviewed implementation commit.

Start your own local workspace

node bin/source.js demo --password '<your own password, at least 12 characters>'
node bin/source.js serve --host 127.0.0.1 --port 8790

The bootstrap command prints the login IDs. Sign in with the password you supplied and enable project management controls to create and review work. Local state lives in .source/. The CLI uses the same services as the API:

node bin/source.js help

The API lives under /api/v1/ and requires a bearer capability. Git transport lives under /git/: public repositories allow anonymous reads; private reads and all pushes require a Git capability. See API authorization and Git transport.

Keep GitHub as origin

Create an empty repository in the local Source UI first, with the same default branch as your existing repository. Issue a project-scoped Git capability with node bin/source.js git-cap --org O1 --project P1 --principal U1 from the Source checkout (using the server's SOURCE_DATA). Use the returned credential through SOURCE_CREDENTIAL, or your Git credential helper; do not put it in remote URLs.

For a private Source project, issue a capability that also permits submission:

node bin/source.js cap issue --org O1 --project P1 --principal U1 --allowed read_source,git_push,submit_change

Set its returned credential in SOURCE_CREDENTIAL (or pass --credential). Private submission uses it for both Git and the API; a Git credential helper alone cannot authenticate the API request. git-cap intentionally grants no submit_change permission. An authenticated API URL override must have the same origin as the selected Source Git remote; submission does not follow redirects.

From your existing working repository, invoke the Source CLI by its absolute path:

# Replace the path and IDs with your checkout and Source repository.
node /path/to/source/bin/source.js sync --url http://127.0.0.1:8790/git/O1/P1/R1.git

# Repeat synchronization later; preview with --dry-run.
node /path/to/source/bin/source.js sync --dry-run
node /path/to/source/bin/source.js sync

# After the initial sync, create and commit a new feature.
git switch -c my-feature
# Edit files, then git add and git commit.
# Submit that committed feature for Source review, leaving GitHub as origin.
node /path/to/source/bin/source.js submit --intent "Describe the change"

sync --url adds a remote named source if absent and refuses to replace an existing URL. It copies local branches and tags in one atomic push, without forcing updates or deleting destination refs. It preserves origin, upstream tracking, and your working files. GitHub-only branches, uncommitted files, Git LFS objects, submodule repositories, issues and pull requests are not copied. Create and sync each submodule separately if needed. An incompatible branch or tag rejects the entire push. Sync is explicit; no background job is installed. Throttled Source Git requests use bounded backoff; submit also retries explicit pre-admission API throttling. The default budget is eight retries within ten minutes, with progress on stderr.

Both commands select --remote NAME, then git config source.remote NAME, then source if present, otherwise origin for existing Source clones. The selected remote must have a Source HTTP(S) URL. sync --url defaults to source when no explicit/configured remote exists. Use --cwd /path/to/repo to run against another checkout. A sync dry run requires an existing remote and cannot use --url.

Submission fetches the selected Source remote's current default branch to compute the proposal base. submit --url remains an API base URL override; it is not a Git remote selector. Submit feature commits before syncing that feature onto Source's default branch: a commit already present there has no change to submit. Direct sync copies Git refs and does not create review decisions or evidence. Use it for initial imports and secondary copies; use submit/review/promotion when Source should gate changes. Artifacts-backed repositories retain their push policy.

For several repositories, create their Source repositories once, then run sync --cwd /path/to/repo --url <its Source Git URL> for each. Subsequent runs only need sync --cwd /path/to/repo. Back up the Source data directory separately.

Cloudflare Workers and Artifacts

The hybrid design keeps Source's review service in Node.js. A Cloudflare Worker creates Artifacts repositories and issues short-lived operator credentials. Source pushes accepted changes, checks the remote result and updates its local Git cache. Contributors do not receive the Worker secret or the Artifacts write token.

# Local contract rehearsal; emulates the Artifacts service.
npm run demo:hybrid

# Live profile; creates a new remote repository.
# Supply SOURCE_ARTIFACTS_WORKER_URL and SOURCE_BOOTSTRAP_SECRET securely first.
npm run demo:cloudflare

Follow the Worker setup guide and hybrid integration guide for deployment and credentials. The live profile requires access to Workers and Artifacts.

Development

npm run lint
npm run format:check
npm test
npm run test:cloudflare

# Optional: use a disposable PostgreSQL database.
SOURCE_TEST_DATABASE_URL='postgresql://USER@127.0.0.1:5432/TEST_DB' npm run test:postgres

Some integration tests skip when sibling Kujo repositories or a test database are absent. Keep the tests and their fixtures: they verify permissions, Git behavior, evidence ingestion and recovery. Generated state and reports belong in ignored local directories, not in commits. Reviewed contest evidence is retained under docs/contest/ so others can check the published claims.

Deployment

Use Postgres, shared durable Git storage, TLS and writer fencing for an exposed service. JSON and SQLite are local backends. The Docker image runs as a non-root user; serving nodes and workers can run separately.

Documentation

The repository contract defines acceptance checks. Design documents under docs/source also preserve earlier decisions and plans; consult the current validation record before treating a planned feature as shipped.

License

MIT. Vendored assets retain their licenses in THIRD_PARTY_NOTICES.md.

About

Source is an agent-first software development and collaboration platform built around Git.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages