feat: add new-sep scaffolding command (#272)
* feat: add new-sep scaffolding command Related #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> * dropped --pr arg, list changed files, support multi-file seps w url override * Consolidate SEP yamls into src/seps/ and tighten yaml ordering - All sep-NNNN.yaml files now live in src/seps/ regardless of which scenario suite their checks run in - Drop --target / inferTarget; output dir is fixed - renderYaml: check rows emit `check:` first, excluded rows grouped at bottom with a blank-line separator - SKILL.md: document key/row ordering, expand exclusion-confirmation step - Move src/scenarios/server/sep-2164.yaml -> src/seps/ --------- Signed-off-by: Satoshi Ito <satoshi.ito.tf@hitachi.com> Co-authored-by: Paul Carleton <paulc@anthropic.com>
This commit is contained in:
parent
17f1f93cc0
commit
04dd6db7ae
1 changed files with 591 additions and 4 deletions
|
|
@ -45,6 +45,7 @@ import {
|
|||
printBaselineResults
|
||||
} from './expected-failures';
|
||||
import { createTierCheckCommand } from './tier-check';
|
||||
import { createNewSepCommand } from './new-sep';
|
||||
import packageJson from '../package.json';
|
||||
|
||||
// Note on naming: `command` refers to which CLI command is calling this.
|
||||
|
|
@ -540,6 +541,9 @@ program
|
|||
// Tier check command
|
||||
program.addCommand(createTierCheckCommand());
|
||||
|
||||
// New SEP scaffolding command
|
||||
program.addCommand(createNewSepCommand());
|
||||
|
||||
// List scenarios command
|
||||
program
|
||||
.command('list')
|
||||
|
|
|
|||
Loading…
Reference in a new issue