Skip to main content

Generate Universal Context Packages (UCP) from real systems. First source: GitHub issues.

Project description

ucp-gen

Generate Universal Context Packages from real systems — no LLM in the loop. The first supported source is GitHub issues: one command turns an issue, its comments, timeline and linked pull requests into a validated, provenance-backed .ucp.json.

pip install ucp-gen
export GITHUB_TOKEN=...   # optional, raises the API rate limit

# JSON package to a file
ucp-gen github vercel/next.js#12345 -o task.ucp.json

# canonical LLM rendering, capped at 1500 tokens
ucp-gen github owner/repo#42 --markdown --token-budget 1500

# include a "what changed since" diff (adds the ucp-temporal profile)
ucp-gen github owner/repo#42 --since 2026-06-01T00:00:00Z

What the mapping does

GitHub UCP
issue title / state / assignee entity
first meaningful paragraph of the body summary
state, assignees, milestone, labels, PR states, comment gists must_know claims with salience
merged linked PRs decisions (accepted)
comments with decision markers ("we decided", "let's go with") decisions (proposed)
issue timeline history, and context_diff when --since is given
linked PRs related_objects
every issue / comment / PR sources entry with URL + content hash

Every claim cites its sources; every source carries a sha256 content hash. The output always validates against the UCP schema before it is written — the generator will fail rather than emit an invalid package.

Feed the result to any UCP consumer, e.g. the reference MCP server:

pip install ucp-mcp
ucp-gen github owner/repo#42 -o ./contexts/task.ucp.json
ucp-mcp --dir ./contexts   # Cursor / Claude Code now sees the context

Development

pip install -e ".[dev]"
pytest

Part of the UCP reference toolchain (Apache 2.0).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ucp_gen-0.1.1.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ucp_gen-0.1.1-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file ucp_gen-0.1.1.tar.gz.

File metadata

  • Download URL: ucp_gen-0.1.1.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ucp_gen-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f1bfb340487e6867c9deb76becf15be38fc4aa0554a91f7e9304859e2cfb71ba
MD5 02f206cd3b4a10fbf5c9b91eb94a7650
BLAKE2b-256 577bea7ff933a254baa220b28a3fa4a3697f9df0f2ac080aec9997d652597d71

See more details on using hashes here.

Provenance

The following attestation bundles were made for ucp_gen-0.1.1.tar.gz:

Publisher: release.yml on ucpcore/ucp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ucp_gen-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ucp_gen-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ucp_gen-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c4c482d28146660c8cf771434da90f0e754192954f3cd815477cba775875bbae
MD5 0b4b181a8e7fd3b528bc54ad850fd9c9
BLAKE2b-256 26c814482fd237365847dcb24398cbe27adfef4528364b3f4fd44eee70e9ede9

See more details on using hashes here.

Provenance

The following attestation bundles were made for ucp_gen-0.1.1-py3-none-any.whl:

Publisher: release.yml on ucpcore/ucp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page