feat: add new-sep scaffolding command#272
Open
pugsatoshi wants to merge 1 commit into
Open
Conversation
Related modelcontextprotocol#243. This commit adds the new-sep <NNNN> subcommand, which writes the file src/scenarios/<target>/sep-<NNNN>.yaml. This file contains the "sep", "spec_url", and "requirements" rows in the same style as sep-2164.yaml, with single quotes and two spaces. The spec source resolves in order: --spec-url → --spec-path → GitHub API against modelcontextprotocol/modelcontextprotocol (explicit --pr or title search for "SEP-NNNN"). The target directory is inferred from the spec path (`server/`, `client/`, or `basic/authorization*`); the --target flag overrides this. It refuses to overwrite without the --force flag. Token resolution reuses the "gh auth token" fallback pattern from tier-check. It also ships the .claude/skills/new-sep directory, which drives the CLI. It fetches the spec diff via "gh api" and extracts RFC 2119 sentences. There is a warning against regex-only matching. Bullets inherit keywords from their lead-in sentence. It rewrites the placeholder rows per the severity rules in AGENTS.md. MUST/SHALL/REQUIRED are checked for FAILURE. SHOULD is checked for WARNING. MAY/OPTIONAL are excluded. Signed-off-by: Satoshi Ito <satoshi.ito.tf@hitachi.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds the
new-sep <NNNN>CLI subcommand and a companion Claude Code skill that scaffolds asep-NNNN.yamlrequirement-traceability file for a new SEP — populatingsep,spec_url(derived from the SEP's spec diff), and TODOrequirements[]rows in the same style assrc/scenarios/server/sep-2164.yaml.Motivation and Context
Related #243.
SEP-2484 introduces the YAML format for requirement traceability. Currently, only
sep-2164.yamlexists. Contributors must write the front matter from scratch, including thegh apiritual documented inAGENTS.mdfor extractingspec_urlfromdocs/specification/draft/diffs. This PR eliminates that manual work, allowing SEP-2484 to reach final status.How Has This Been Tested?
Offline Scaffold from a Known Spec Path:
Online lookup via GitHub API (
modelcontextprotocol/modelcontextprotocolPR #2164):The generated
spec_urlmatches the page URL of the.mdxfile that the PR changes. The output style is byte-identical tosep-2164.yaml.--forceguard verified (refuses to overwrite an existing yaml without the flag),--targetoverride verified forclient/server/authorization-server, and input validation (Invalid SEP number,Invalid --target,spec path must start with ...) verified.Breaking Changes
None
Types of changes
Checklist
Additional context