feat(preset): nexusx spec-kit preset (4-phase SDD on spec-kit)#97
Open
allmonday wants to merge 1 commit into
Open
feat(preset): nexusx spec-kit preset (4-phase SDD on spec-kit)#97allmonday wants to merge 1 commit into
allmonday wants to merge 1 commit into
Conversation
Migrate the nexusx 4-phase methodology from a hand-driven skill into a
spec-kit preset so users get the iterative specify/plan/tasks workflow
plus nexusx-specific interview gates and constitution enforcement.
What's bundled (presets/nexusx/):
- preset.yml — manifest, 4 templates + 3 command overrides (replace
strategy following lean preset's pattern; wrap can't interleave).
- templates/constitution-template.md — 8 hard rules (lazy=noload,
entity-purity, DTO purity, UseCase return annotation, MCP transport,
etc.) + V-型验收 + inter-phase pause governance.
- templates/spec-template.md — spec-kit user-story spine with a Phase 0
需求确认纪要 prepended (entities / 关系 / 聚合根 / Service切分候选 /
DB选型). Magic strings like [NEEDS CLARIFICATION] stay English so the
checklist validator still detects them.
- templates/plan-template.md — nexusx Technical Context (DB选型 /
async+sync URL / alembic / Service切分最终方案 / 是否生成 TS SDK).
- templates/tasks-template.md — phase-first hybrid: Schema → Methods →
Service → optional SDK. Every task carries [P1]/[P2]/[P3]/[P4] phase
tag plus [USx] story tag.
- commands/speckit.specify.md — full Phase 0 八步访谈 with hard gate
on Service切分 (Constitution Principle IV: must propose candidate
and get explicit user choice).
- commands/speckit.plan.md — DB选型 + alembic + 第三方库 + TS SDK
决策访谈; verifies Phase 0 completeness before proceeding.
- commands/speckit.tasks.md — phase tagging rule + reference doc
linking + conditional Phase 4 emission based on plan's TS SDK flag.
- reference/phase{1,2,3}.md — copied from skill/phases/ with sync
header (preset self-contained for future publishing).
Also: scripts/preset-reinstall.sh wraps the copy-based reinstall flow
(`specify preset add --dev` is not symlink-based, so each source edit
needs re-install).
skill/ stays untouched — preset is the preferred path going forward,
skill remains as fallback. End-to-end test plan in the PR description.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.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.
Summary
把
skill/里的 nexusx 4-phase 方法论迁到 spec-kit preset,让用户跑标准/speckit-specify→/speckit-plan→/speckit-tasks时拿到 nexusx 风味的输出(Phase 0 八步访谈、nexusx Technical Context、phase-tagged tasks)。skill/ 保留不动作为 fallback。What's bundled
presets/nexusx/— 12 files:preset.ymltemplates/constitution-template.mdtemplates/spec-template.mdtemplates/plan-template.mdtemplates/tasks-template.md[P1]/[P2]/[P3]/[P4]commands/speckit.specify.mdcommands/speckit.plan.mdcommands/speckit.tasks.mdreference/phase{1,2,3}.mdskill/phases/复制(preset 自包含;带同步头)scripts/preset-reinstall.sh—specify preset add --dev是 copy-based,每次源码改动需重装。脚本封装 remove + add + 验证 resolve。Plan agent 关键修正
{CORE_TEMPLATE}占位符前后追加,不能交错。改用 replace(mirror lean preset 模式)。provides.templates下用type:区分,不存在provides.commands。第一版用错字段导致命令未注册,已修。006-skill-template-polish不存在:原计划用作回归对照,实际 specs/ 里已重命名为006-voyager-about-tab。改为建议用007-preset-test。Status
Preset 安装链路已验证:
Test plan
Pre-check(已通过):
bash scripts/preset-reinstall.sh退出码 0specify preset list列出 nexusxspecify preset resolve spec-template指向 nexusx.claude/skills/speckit-specify/SKILL.mddescription 是 nexusx 文案End-to-end(待 user 实测,Phase 0 访谈需要 user 回答):
# 在 nexusx repo root /speckit-specify 为 demo/blog 增加 post 评论功能验证:
SPEC_PHASE0_BLOCKED)specs/007-*/spec.md包含## Phase 0 需求确认纪要区块验证:
specs/007-*/plan.mdTechnical Context 含 nexusx 字段(DB 选型 / async URL / sync URL / alembic / Service 切分 / TS SDK 决策)验证:
specs/007-*/tasks.md按 Phase 1 Schema → 2 Methods → 3 Service 组织[P1]/[P2]/[P3]phase 标签 +[USx]presets/nexusx/reference/phaseN.mdOpen issues(非阻塞,留 v2)
MissingReturnAnnotationError)。v2 可考虑加 phase-exit checklist 模板。reference/phase{1,2,3}.md会与skill/phases/漂移;已加同步头注释让 drift grep-able。>=0.6.0,上游命令结构改了需要手动 re-sync。🤖 Generated with Claude Code