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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eff1de85a7315917f85e24626ff38e6e23ee2d7e5815aee20df1b69833f90df8
|
|
| MD5 |
cbfd0bb015e738baf86e2c013bb5f613
|
|
| BLAKE2b-256 |
101843a62424d61dceb7ddedc7d22b33bda8274b7dbc3b5e6504ff898c8df94d
|
Provenance
The following attestation bundles were made for ucp_gen-0.1.0.tar.gz:
Publisher:
release.yml on ucpcore/ucp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ucp_gen-0.1.0.tar.gz -
Subject digest:
eff1de85a7315917f85e24626ff38e6e23ee2d7e5815aee20df1b69833f90df8 - Sigstore transparency entry: 2082501419
- Sigstore integration time:
-
Permalink:
ucpcore/ucp@af2e248648924a9d69e85d7c2254d8cbe8f241e6 -
Branch / Tag:
refs/tags/gen-v0.1.0 - Owner: https://github.com/ucpcore
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@af2e248648924a9d69e85d7c2254d8cbe8f241e6 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6dad38c4afb5e011a0ed0daa61b145d15fbbd03a9a84ec2dbf254428a014d8f8
|
|
| MD5 |
9cae286d7c3a396432e550906288f3a2
|
|
| BLAKE2b-256 |
658f07d46365c8645170f924c3585c3e9fae09b387e4b2e0434d5e09311655a1
|
Provenance
The following attestation bundles were made for ucp_gen-0.1.0-py3-none-any.whl:
Publisher:
release.yml on ucpcore/ucp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ucp_gen-0.1.0-py3-none-any.whl -
Subject digest:
6dad38c4afb5e011a0ed0daa61b145d15fbbd03a9a84ec2dbf254428a014d8f8 - Sigstore transparency entry: 2082501439
- Sigstore integration time:
-
Permalink:
ucpcore/ucp@af2e248648924a9d69e85d7c2254d8cbe8f241e6 -
Branch / Tag:
refs/tags/gen-v0.1.0 - Owner: https://github.com/ucpcore
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@af2e248648924a9d69e85d7c2254d8cbe8f241e6 -
Trigger Event:
push
-
Statement type: