社区扩展管理_add-community-extension
以下为本文档的中文说明该技能用于处理GitHub Issue提交的社区扩展Extension将其添加到Spec Kit目录中。主要功能是解析扩展提交Issue、验证目录条目、更新catalog.community.json和docs/community/extensions.md文档并创建PR。使用场景包括新的扩展提交Issue被提交现有扩展提交更新Issue新版本、元数据变更需要添加或更新社区扩展到扩展目录中。核心工作流程包括获取提交Issue——读取GitHub Issue提取元数据扩展ID、名称、版本、描述、作者、仓库URL、下载URL、主页、文档、变更日志、许可证、依赖的spec-kit版本、命令和钩子数量、标签等验证发布规则——检查发布规则中的所有要求更新目录文件——修改catalog.community.json和文档创建PR——将变更提交为PR。该技能确保了社区贡献的扩展能够以标准化的流程被纳入官方目录降低了社区贡献的门槛同时保证了扩展的质量和一致性。Add Community ExtensionProcess an extension submission issue and add or update it in the community catalog.When to UseA new[Extension]submission issue is filedAn existing extension submits an update issue (new version, changed metadata)You need to add or update a community extension inextensions/catalog.community.jsonanddocs/community/extensions.mdProcedure1. Fetch the submission issueRead the GitHub issue to extract all metadata:Extension ID, name, version, description, authorRepository URL, download URL, homepage, documentation, changelogLicense, required spec-kit version, optional tool dependenciesNumber of commands and hooksTags2. Validate against publishing rulesCheckallof the following (perextensions/EXTENSION-PUBLISHING-GUIDE.md):CheckHowRepository exists and is publicFetch the repository URLextension.ymlmanifest presentConfirm in repo file listingREADME.md presentConfirm in repo file listingLICENSE file presentConfirm in repo file listingGitHub release exists matching versionCheck releases on the repo pageDownload URL is accessibleVerify it followsarchive/refs/tags/vX.Y.Z.zippattern and release existsExtension ID is lowercase-with-hyphens onlyRegex:^[a-z][a-z0-9-]*$Version follows semverFormat:X.Y.ZSubmission checklists are all checkedConfirm in issue body3. Determine if this is an add or updateSearchextensions/catalog.community.jsonfor the extension ID.Not found→ this is anew addition. Proceed to step 4.Found→ this is anupdate. Proceed to step 4 but replace the existing entry in-place instead of inserting.4. Add or updateextensions/catalog.community.jsonNew extension:Insert the entry inalphabetical orderby extension ID.Update:Replace the existing entry in-place. Update only the fields that changed (typicallyversion,download_url,description,provides,requires,tags,updated_at). Preservecreated_atanddownloads/starsfrom the existing entry.Use the existing entries as the format template. Required fields:{id:{name:name,id:id,description:description,author:author,version:version,download_url:download_url,repository:repository,homepage:homepage,documentation:documentation,changelog:changelog,license:license,requires:{speckit_version:speckit_version},provides:{commands:N,hooks:N},tags:[tag1,tag2],verified:false,downloads:0,stars:0,created_at:todayT00:00:00Z,updated_at:todayT00:00:00Z}}If the extension has optional tool dependencies, add atoolsarray insiderequires:tools:[{name:tool,required:false}]Also update the top-levelupdated_attimestamp in the catalog.After editing,validate the JSONby running:python3-cimport json; json.load(open(extensions/catalog.community.json)); print(Valid JSON)5. Add or updatedocs/community/extensions.mdcommunity extensions tableNew extension:Insert a new row into the# Community Extensionstable inalphabetical orderby extension name.Update:Find the existing row and update the description or other changed fields in-place.Determine the category and effect from the extension’s behavior:| Name | Description | category | Effect | [repo-name](repository-url) |Category— one of:docs,code,process,integration,visibilityEffect—Read-only(produces reports only) orReadWrite(modifies project files)6. Commit, push, and open PRUseadd-for new extensions,update-for updates:# New extensiongitcheckout-badd-extension-id-extension# Updategi t checkout-bupdate-extension-id-extensiongitaddextensions/catalog.community.json docs/community/extensions.md# New extensiongitcommit-mAdd Name extension to community catalog Add id extension submitted by issue-author to: - extensions/catalog.community.json (alphabetical order) - docs/community/extensions.md community extensions table Closes #issue-number# Updategitcommit-mUpdate Name extension to vversion Update id extension submitted by issue-author: - extensions/catalog.community.json (version, download_url, etc.) - docs/community/extensions.md community extensions table Closes #issue-numbergitpush originbranch-nameThen create a PR toupstream(github/spec-kit) with:Title:Add Name extension to community catalog(orUpdate Name extension to vversion)Body:Include validation summary,Closes #issue-number, andcc issue-authorHead:fork-owner:branch-nameBase:mainCommon PitfallsAlphabetical order matters— entries must be sorted by ID in the JSON and by name in the docs table.Don’t forget the catalogupdated_at— the top-level timestamp incatalog.community.jsonmust be refreshed.Validate JSON after editing— a trailing comma or missing brace will break the catalog.UseClosesnotFixes—Closes #Nis the correct keyword for submission issues.Match the proposed entry but verify— the issue may include a proposed JSON block, but always validate field values against the actual repository state.Preservecreated_aton updates— keep the originalcreated_atvalue; only changeupdated_at.Preservedownloadsandstarson updates— these reflect usage metrics and must not be reset.3e:[“,,,L41”,null,{“content”:“$42”,“frontMatter”:{“name”:“add-community-extension”,“description”:“Add a community extension to the Spec Kit catalog from a GitHub issue submission. USE FOR: processing extension submission issues, validating catalog entries, updating catalog.community.json and docs/community/extensions.md, creating PRs. DO NOT USE FOR: creating new extensions from scratch, or first-party extension work.”,“argument-hint”:“GitHub issue URL or number for the extension submission”}}]3f:null