A project override silently turns off presets for that template
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Issue 将 preset resolve 和预设文档列为切入点;阅读 artifact info 如何报告被隐藏的预设更改,并找到解释项目模板覆盖的文档。记录覆盖会隐藏预设更改;如果该行为属于范围内,则让 preset resolve 报告被隐藏的预设。完成标准是用户能够查明预设内容缺失的原因。
由索引模型根据 Issue 内容生成。
描述
What happens (v1.2.6)
A team installs a preset that adds a section to the plan template. Later, a developer copies the plan template into .specify/templates/overrides/ to tweak one line. From then on, the preset's section is gone from every plan, and nothing says so:
specify preset resolve plan-templateshows only the override.specify preset liststill shows the preset as enabled.- Only
specify artifact info plan-template --kind template --jsonreveals it, ashidden: true.
This matches the rule that project overrides always win, so it isn't a bug. It's just invisible.
Reproduction script
#!/usr/bin/env bash
# u5: a project override on a template silently drops every preset layer on it, and the CLI says nothing.
# A team preset that appends a section (the documented "append" strategy), plus a developer's own
# override of the same template (the documented .specify/templates/overrides/ folder). Stock CLI only.
set -uo pipefail
REF="${REF:-v1.2.6}"
WORK="$(mktemp -d)"
cd "$WORK"
SPECIFY=(uvx -q --from "git+https://github.com/github/spec-kit.git@$REF" specify)
"${SPECIFY[@]}" init --here --force --non-interactive --integration claude --script sh --ignore-agent-tools >/dev/null 2>&1 || { echo "init failed"; exit 2; }
echo "spec-kit $REF in $WORK"
mkdir -p preset-src/templates
cat > preset-src/preset.yml <<'YML'
schema_version: "1.0"
preset:
id: "team-governance"
name: "Team Governance"
version: "0.1.0"
description: "Appends a compliance appendix to every plan"
author: "repro"
requires:
speckit_version: ">=1.2.0"
provides:
templates:
- type: "template"
name: "plan-template"
file: "templates/plan-template.md"
strategy: "append"
description: "Compliance appendix appended to the plan"
tags: ["governance"]
YML
printf '\n## Compliance Appendix\n\nList every regulated data field the change touches.\n' > preset-src/templates/plan-template.md
echo "1. team installs the preset"
"${SPECIFY[@]}" preset add --dev ./preset-src </dev/null 2>&1 | tail -1
echo " preset resolve plan-template:"
"${SPECIFY[@]}" preset resolve plan-template 2>&1 | sed 's/^/ /'
echo "2. a developer overrides the plan template for this project (copies it and edits a line)"
mkdir -p .specify/templates/overrides
sed 's/^# Implementation Plan/# Implementation Plan (our team)/' .specify/templates/plan-template.md > .specify/templates/overrides/plan-template.md
echo " preset resolve plan-template:"
"${SPECIFY[@]}" preset resolve plan-template 2>&1 | sed 's/^/ /'
echo " artifact info plan-template --kind template:"
"${SPECIFY[@]}" artifact info plan-template --kind template --json 2>&1 | python3 -c "import json,sys;d=json.load(sys.stdin);print(json.dumps(d,indent=1)[:1500])" 2>&1 | sed 's/^/ /'
echo " preset list:"
"${SPECIFY[@]}" preset list 2>&1 | sed 's/^/ /' | head -8
o=.specify/templates/overrides/plan-template.md
if [ -f "$o" ] && [ "$(awk '/Compliance Appendix/{n++} END{print n+0}' "$o")" = "0" ]; then
echo "RESULT: plan-template now resolves to $o, which has no Compliance Appendix. Read the output above for any warning that the preset is hidden."
fi
Suggested fix (small)
- One sentence in the presets docs: a project override replaces the template and hides every preset change to it.
- One line from
preset resolvewhen that happens, for example "team-governance (append) is hidden by a project override". The information is already computed forartifact info, so this is a few lines. Happy to open a PR for it if that direction works for you.
AI disclosure: drafted with Claude Code (Claude Opus 5.5, default settings) from runs in a throwaway sandbox; I checked it before filing.
- 主要语言
- Python
- 星标
- 149k
- 派生
- 13.4k
- 平均合并
- 1 天 5 小时
- 30 天内合并 PR
- 223
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/spec-kit 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
triage-must-have
难度 1/5 1 小时以内 新手友好度 78/100
维护者通常 1 天内回复
-
Workflow-step verifier test fixture breaks when the checkout path contains whitespace (4 failures on macOS)可能已有人在做 @mehdikarimi55 于 3 天前认领。 未关闭triage-can-wait
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复
-
Parity tests fail under the documented direct pytest invocation when the ambient python3 lacks PyYAML (11 failures)可能已有人在做 @mehdikarimi55 于 3 天前认领。 未关闭triage-must-have
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
bug triage-out-of-scope
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 80/100
glossyio/traffic-monitor#312 ·
维护者通常 1 天内回复
-
documentation enhancement
难度 2/5 1-3 小时 新手友好度 76/100
es-ude/elastic-ai.creator#1046 ·
维护者通常 3 天内回复
-
feature request
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
confident-ai/deepteam#306 ·
维护者通常 1 天内回复
-
SslLibrary crashes with unhandled OSError: port/proto not found on non-standard SSL ports可能已有人在做 @himanchalkaushale 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
OWASP/Nettacker#1884 · 1 条评论 ·
维护者通常 1 天内回复