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.0.tar.gz (9.2 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.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ucp_gen-0.1.0.tar.gz
  • Upload date:
  • Size: 9.2 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.0.tar.gz
Algorithm Hash digest
SHA256 eff1de85a7315917f85e24626ff38e6e23ee2d7e5815aee20df1b69833f90df8
MD5 cbfd0bb015e738baf86e2c013bb5f613
BLAKE2b-256 101843a62424d61dceb7ddedc7d22b33bda8274b7dbc3b5e6504ff898c8df94d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ucp_gen-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: ucp_gen-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.9 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6dad38c4afb5e011a0ed0daa61b145d15fbbd03a9a84ec2dbf254428a014d8f8
MD5 9cae286d7c3a396432e550906288f3a2
BLAKE2b-256 658f07d46365c8645170f924c3585c3e9fae09b387e4b2e0434d5e09311655a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for ucp_gen-0.1.0-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