Skip to content

docs: add opt-in understand-quickly publish workflow#577

Open
amacsmith wants to merge 2 commits into
coderamp-labs:mainfrom
amacsmith:feat/uq-publish
Open

docs: add opt-in understand-quickly publish workflow#577
amacsmith wants to merge 2 commits into
coderamp-labs:mainfrom
amacsmith:feat/uq-publish

Conversation

@amacsmith
Copy link
Copy Markdown

Why

looptech-ai/understand-quickly is a public, machine-readable registry of code-knowledge and code-context artifacts. It indexes Gitingest digests through its bundle@1 format — a tiny JSON pointer plus a raw URL to the digest body — so AI agents (Claude, Codex, Cursor via MCP) can resolve a repo URL to its Gitingest digest. The registry stores no bodies; the digest stays in the user's repo and is fetched from raw.githubusercontent.com.

This PR is docs-only. It documents the opt-in workflow for Gitingest users who want their digest to land in the registry. No CLI changes, no runtime changes.

What changes

  • New file: docs/publishing.md — explains the registry, one-time setup, and a drop-in .github/workflows/understand-quickly-publish.yml snippet (~30 lines) that chains gitingest with the looptech-ai/uq-publish-action@v0.1.0 Marketplace Action. The snippet builds a small bundle@1 sidecar (file size, generated_at, content_url) and hands it off to publish.
  • README.md: a one-line pointer at the bottom of "Command line usage" linking to docs/publishing.md.

Opt-in / no-op

Submission is gated entirely on the user setting UNDERSTAND_QUICKLY_TOKEN (a fine-grained PAT scoped to looptech-ai/understand-quickly only with Repository dispatches: write). Without the secret, the publish action only stamps metadata locally and exits cleanly. Without the workflow file, nothing changes.

Why no CLI change

The flow is entirely orchestrated in Actions: Gitingest already emits digest.txt, the Marketplace Action builds the bundle@1 sidecar and posts the dispatch. Keeping the integration on the CI side means no new flag in the CLI surface, no test churn, and no behavior change for anyone not opting in.

Test plan

  • Diff is docs-only (one new file at docs/publishing.md, two-line README pointer).
  • No tests touched, no pyproject.toml changes, no Python source touched.
  • (Reviewer) Markdown renders cleanly on GitHub.

Notes

  • This is opt-in for early adopters; nothing in Gitingest's existing surface changes.
  • License & data-grant semantics for users who opt in are described in DATA-LICENSE.md and protocol §12 — opt-in, gated on the secret, never invisible.

Links

Adds docs/publishing.md describing how users can opt-in to publish
their digest to the understand-quickly registry. The workflow is
gated on UNDERSTAND_QUICKLY_TOKEN — no secret, no network call.

No CLI changes, no behavior changes — docs only.
Copilot AI review requested due to automatic review settings May 10, 2026 07:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Documents an opt-in GitHub Actions workflow for publishing gitingest-generated digests to the external looptech-ai/understand-quickly registry, keeping the integration entirely in CI and leaving the CLI/runtime unchanged.

Changes:

  • Add docs/publishing.md describing the registry, setup steps, and a drop-in publish workflow snippet.
  • Add a README pointer linking users to the new publishing documentation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
README.md Adds a link directing users to the new opt-in publishing guide.
docs/publishing.md Introduces end-to-end documentation and an example workflow to generate and publish a bundle@1 sidecar + digest.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/publishing.md Outdated
Comment on lines +24 to +27
permissions: { contents: read }
steps:
- uses: actions/checkout@v4
- run: pip install gitingest && gitingest . -o digest.txt
Comment thread docs/publishing.md Outdated
'generated_at': '$(date -u +%Y-%m-%dT%H:%M:%SZ)',
'file_count': 0, 'byte_count': b, 'token_estimate': b // 4,
'format': 'plaintext'},
'content_url': f'https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}/digest.txt'
Comment thread docs/publishing.md Outdated
permissions: { contents: read }
steps:
- uses: actions/checkout@v4
- run: pip install gitingest && gitingest . -o digest.txt
- Add commit step so content_url actually resolves (was pointing to
  raw.githubusercontent.com for an uncommitted digest -> 404).
- Pin content_url to the commit SHA via env var instead of github.ref_name
  (immutable + script-injection safe).
- Use actions/setup-python + python -m pip for reproducibility.
- Use timezone-aware datetime; replace bogus f-string with proper heredoc.
- Drop hard-coded placeholder fields (tool_version:'latest', file_count:0).
- Note the workflow is only suitable for public repos.
@amacsmith
Copy link
Copy Markdown
Author

Pushed 6e8f395 addressing the Copilot review:

  • content_url 404: workflow now commits the digest to a dedicated understand-quickly orphan branch and pins content_url to that commit SHA, so the URL actually resolves.
  • Bogus f-string: replaced the python -c block (which mixed shell $(date) interpolation with an f-string that didn't actually interpolate any Python vars) with a proper heredoc that pulls REPO/SHA from env vars.
  • Reproducible Python: switched to actions/setup-python + python -m pip, matching this repo's convention.
  • Timezone-aware timestamp: datetime.now(timezone.utc) instead of naive.
  • Public-repo caveat: noted explicitly.

Action pinning: noted inline that real workflows should pin to a SHA; left floating refs in the docs snippet for readability — happy to switch if you'd prefer.

@amacsmith
Copy link
Copy Markdown
Author

Quick update from upstream — the registry just hit v0.3.0 with the full toolchain live:

  • looptech-ai/uq-publish-action@v0.1.0 (GitHub Marketplace) — what this docs PR points users at
  • @looptech-ai/understand-quickly-cli@0.1.2 (npm)
  • @looptech-ai/understand-quickly-mcp@0.1.2 (npm, also listed at io.github.looptech-ai/understand-quickly on the MCP Registry)
  • understand-quickly@0.1.1 (PyPI)

The bundle@1 schema that backs the Gitingest integration is now governed by the Code-Knowledge Graph Protocol v1 spec, so the sidecar shape this PR's workflow snippet emits is locked in. The Marketplace Action handles the dispatch — no CLI change needed on Gitingest's side, which is why this PR stays docs-only.

PR is rebased and ready. Happy to address any further feedback whenever you have a moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants