Require preset-usage README with Spec Kit CLI syntax in preset submissions#3104
Require preset-usage README with Spec Kit CLI syntax in preset submissions#3104mnriem wants to merge 4 commits into
Conversation
Tighten the community preset submission workflow so it validates the README referenced by the documentation field rather than merely checking for a root README. The workflow now fails submissions whose linked README lacks a valid 'specify preset add ...' command and flags monorepo submissions that point documentation at a generic root README. - Add a required Documentation URL field to the preset issue template - Add validation step 2d (documentation README + CLI-syntax check) to .github/workflows/add-community-preset.md and recompile the lock file - Document the stricter usage-README requirement and reviewer content check in presets/PUBLISHING.md Closes github#3103 Assisted-by: GitHub Copilot (model: Claude Opus 4.8, autonomous) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR hardens the community preset submission workflow by requiring submitters to provide a Documentation URL that points to the actual preset-usage README, and by documenting/enforcing that the linked README contains valid Spec Kit CLI install syntax (e.g., specify preset add ...). This addresses monorepo submissions that previously passed validation by linking to a generic repo-root README that wasn’t preset usage documentation.
Changes:
- Updated the
add-community-presetworkflow spec to validate the README at the submitteddocumentationURL and require aspecify preset add ...invocation (preferring--from <download-url>). - Extended the preset submission issue form to collect a required Documentation URL and add a submission requirement checkbox.
- Updated
presets/PUBLISHING.mdwith explicit “Usage README Requirements” and reviewer guidance for the residual content judgment.
Show a summary per file
| File | Description |
|---|---|
presets/PUBLISHING.md |
Documents the new requirement for preset-scoped usage READMEs and Spec Kit CLI install syntax; adds reviewer note about remaining human judgment. |
.github/workflows/add-community-preset.md |
Updates the workflow spec to validate the README referenced by documentation and require specify preset add ... usage. |
.github/workflows/add-community-preset.lock.yml |
Regenerated lockfile reflecting the workflow spec body change (hash update). |
.github/ISSUE_TEMPLATE/preset_submission.yml |
Adds a required documentation field and a checkbox reinforcing the linked-README + CLI-syntax requirement. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 4/4 changed files
- Comments generated: 3
Address PR review feedback on github#3104: - PUBLISHING.md: clarify that only README resolution + a valid 'specify preset add ...' command are mechanically enforced; the preset-scoped-README and minimum-structure items are reviewer expectations, not automated checks. - PUBLISHING.md: state that a missing 'specify preset add ...' command is a hard validation failure (check 2d), not just 'flagged for changes'. - preset_submission.yml: require 'specify preset add ...' (not the looser 'specify preset ...') to match the workflow validation. Assisted-by: GitHub Copilot (model: Claude Opus 4.8, autonomous) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Addressed the review feedback in e0ab77f:
No change to the workflow Posted on behalf of @mnriem by GitHub Copilot (model: Claude Opus 4.8, autonomous). |
Address PR review feedback on github#3104: - Workflow Step 2c: drop the generic repo-root README.md check so the README requirement is enforced exactly once, in Step 2d, against the file the documentation field points to (avoids monorepo false-positive). - Workflow Step 2d: restrict the documentation URL to GitHub-hosted README URLs (github.com/.../blob/... or raw.githubusercontent.com/...) before fetching user-provided input. - PUBLISHING.md: add the required 'id' field to the example catalog entry. - preset_submission.yml: fix the Documentation URL placeholder to match the recommended monorepo presets/<id>/README.md pattern. - Recompile add-community-preset.lock.yml (body hash only). Assisted-by: GitHub Copilot (model: Claude Opus 4.8, autonomous) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Addressed the review feedback in da15c18:
Posted on behalf of @mnriem by GitHub Copilot (model: Claude Opus 4.8, autonomous). |
| - **Include a valid Spec Kit CLI install command** *(enforced)*. The linked README must | ||
| contain at least one `specify preset add ...` invocation. Preferably use the | ||
| catalog-install form whose URL matches your Download URL: | ||
|
|
||
| ```bash | ||
| specify preset add --from https://github.com/<org>/<repo>/releases/download/vX.Y.Z/<id>-X.Y.Z.zip | ||
| ``` |
| - **Restrict the URL to GitHub before fetching.** The `documentation` value is | ||
| user-provided input. Only accept GitHub-hosted README URLs — `https://github.com/<owner>/<repo>/blob/<ref>/<path>` | ||
| or `https://raw.githubusercontent.com/<owner>/<repo>/<ref>/<path>`. If the URL points | ||
| anywhere else (or isn't a URL), **fail this check** and do not fetch it. | ||
| - Fetch the **exact URL** in the `documentation` field (convert GitHub `blob` URLs to | ||
| their `raw.githubusercontent.com` equivalent before fetching) and confirm it resolves | ||
| to a readable Markdown file. |
| - **Validate that the README contains a valid Spec Kit CLI install command.** The fetched | ||
| README must contain at least one `specify preset add ...` invocation. The strongest | ||
| signal is the catalog-install form whose URL matches the submitted **Download URL**: | ||
| - `specify preset add --from <download-url>` (preferred — the URL must match exactly), or | ||
| - `specify preset add <preset-id>`, or | ||
| - `specify preset add --dev <path>` | ||
|
|
||
| If **no** `specify preset add ...` command is present, the README is treated as a generic | ||
| description/pitch rather than preset-usage documentation — **fail this check** and tell the | ||
| submitter to add a valid install command (ideally `specify preset add --from <download-url>`). |
| - label: Valid `preset.yml` manifest included | ||
| required: true | ||
| - label: README.md with description and usage instructions | ||
| required: true | ||
| - label: Linked README explains how to use this preset and includes a valid `specify preset add ...` command matching the download URL | ||
| required: true |
Address PR review feedback on github#3104: - Workflow Step 2d: broaden the documentation URL allowlist to also accept github.com/.../raw/... URLs; strip any fragment/query before fetching so the target is deterministic; clarify that a 'specify preset add --from <url>' command only counts when its URL matches the submitted Download URL (a different --from URL does not satisfy the requirement, though other accepted forms still can). - PUBLISHING.md: show both accepted download URL shapes (tag archive and release asset) in the README install example instead of implying only the releases/download form. - preset_submission.yml: remove the ambiguous generic 'README.md with description and usage instructions' checkbox; the linked-README requirement is the single source of truth. - Recompile add-community-preset.lock.yml (body hash only). Assisted-by: GitHub Copilot (model: Claude Opus 4.8, autonomous) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Addressed the review feedback in 843d700:
Lockfile recompiled (body hash only). Posted on behalf of @mnriem by GitHub Copilot (model: Claude Opus 4.8, autonomous). |
Summary
Addresses #3103. The community preset submission workflow previously validated only that a
README.mdexists at the repository root, which passes trivially for monorepos even when the linkeddocumentationpoints at a product pitch rather than preset-usage docs.This PR tightens the workflow and docs to validate the README that
documentationactually points to, and requires a valid Spec Kit CLI install command.Changes
.github/workflows/add-community-preset.md— parse thedocumentationfield; new validation step 2d fetches the linked README (convertingblob→raw) and:specify preset add ...invocation (preferring--from <download-url>with an exact URL match),documentationpoints at a generic root README and recommends the preset-scoped one.Renumbered subsequent checks and recompiled
add-community-preset.lock.yml(only the body hash changed)..github/ISSUE_TEMPLATE/preset_submission.yml— required Documentation URL field + a new Submission Requirements checkbox.presets/PUBLISHING.md— a 'Usage README Requirements' section, updated prerequisites/checklist, and a reviewer note about the residual human content check.Acceptance criteria
documentation, not just root presencespecify preset ...invocationpresets/PUBLISHING.mdupdated to document the stricter requirementCloses #3103
🤖 Authored autonomously by GitHub Copilot (model: Claude Opus 4.8) on behalf of @mnriem.