docs: add opt-in understand-quickly publish workflow#7
Conversation
Adds PUBLISHING.md describing how users can opt-in to publish their codebase 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.
There was a problem hiding this comment.
Pull request overview
Docs-only PR documenting an opt-in GitHub Actions workflow for publishing Codebase Digest output to the external looptech-ai/understand-quickly registry.
Changes:
- Add
PUBLISHING.mddescribing the registry, one-time setup, and a sample publishing workflow. - Add a
README.mdpointer linking users toPUBLISHING.md.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| README.md | Adds a link guiding users to the publishing documentation. |
| PUBLISHING.md | Introduces end-to-end documentation and a sample GitHub Actions workflow snippet for publishing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - run: pip install codebase-digest && cdigest . -o markdown -f digest.md | ||
| - name: Build bundle@1 sidecar | ||
| run: | | ||
| python -c " | ||
| import json, os, datetime | ||
| b = os.path.getsize('digest.md') | ||
| json.dump({ | ||
| 'format': 'bundle@1', | ||
| 'manifest': {'tool': 'codebase-digest', 'tool_version': 'latest', | ||
| 'generated_at': datetime.datetime.utcnow().isoformat() + 'Z', | ||
| 'file_count': 0, 'byte_count': b, 'token_estimate': b // 4, | ||
| 'format': 'markdown'}, | ||
| 'content_url': 'https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}/digest.md' | ||
| }, open('digest.bundle.json', 'w'), indent=2)" |
| permissions: { contents: read } | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - run: pip install codebase-digest && cdigest . -o markdown -f digest.md |
| b = os.path.getsize('digest.md') | ||
| json.dump({ | ||
| 'format': 'bundle@1', | ||
| 'manifest': {'tool': 'codebase-digest', 'tool_version': 'latest', | ||
| 'generated_at': datetime.datetime.utcnow().isoformat() + 'Z', | ||
| 'file_count': 0, 'byte_count': b, 'token_estimate': b // 4, |
| json.dump({ | ||
| 'format': 'bundle@1', | ||
| 'manifest': {'tool': 'codebase-digest', 'tool_version': 'latest', | ||
| 'generated_at': datetime.datetime.utcnow().isoformat() + 'Z', |
|
|
||
| ## Workflow | ||
|
|
||
| Drop into `.github/workflows/understand-quickly-publish.yml`. It runs `cdigest`, writes a small `bundle@1` sidecar, then hands off to the [`looptech-ai/uq-publish-action`](https://github.com/looptech-ai/uq-publish-action) Marketplace Action. |
| Drop into `.github/workflows/understand-quickly-publish.yml`. It runs `cdigest`, writes a small `bundle@1` sidecar, then hands off to the [`looptech-ai/uq-publish-action`](https://github.com/looptech-ai/uq-publish-action) Marketplace Action. | ||
|
|
- 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 instead of deprecated utcnow(). - Drop hard-coded placeholder fields (tool_version:'latest', file_count:0). - Note the workflow is only suitable for public repos. - Grammar fix in intro.
|
Pushed 2a677a1 addressing the Copilot review:
|
|
Quick update from upstream — the registry just hit
The PR is rebased and the merge state is clean. Happy to address any further feedback whenever you have a moment. |
Why
looptech-ai/understand-quicklyis a public, machine-readable registry of code-knowledge and code-context artifacts. It indexes Codebase Digest output through itsbundle@1format — 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 digest. The registry stores no bodies; the digest stays in the user's repo and is fetched fromraw.githubusercontent.com.This PR is docs-only. It documents the opt-in workflow for
cdigestusers who want their digest to land in the registry. No CLI changes, no runtime changes.What changes
PUBLISHING.md— explains the registry, one-time setup, and a drop-in.github/workflows/understand-quickly-publish.ymlsnippet (~30 lines) that runscdigest, builds a small bundle@1 sidecar (file size, generated_at, content_url, format), and hands it off to thelooptech-ai/uq-publish-action@v0.1.0Marketplace Action.README.md: a one-line pointer at the bottom of the "Usage" examples linking toPUBLISHING.md.Opt-in / no-op
Submission is gated entirely on the user setting
UNDERSTAND_QUICKLY_TOKEN(a fine-grained PAT scoped tolooptech-ai/understand-quicklyonly withRepository 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:
cdigestalready emits the digest, 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
PUBLISHING.md, two-line README pointer).setup.pychanges.Notes
DATA-LICENSE.mdand protocol §12 — opt-in, gated on the secret, never invisible.Links