fix: 修复 copier 生成的三个致命 bug,端到端跑通
- copier.yml 补 _subdirectory: template(此前把整个仓库当模板, 生成项目里混入 template/、scripts/、README、.claude/skills) - _exclude 去掉 .jinja 后缀(copier 按渲染后路径匹配,原 agent.md.jinja 等条件排除从未生效,agent=false 仍会带入 agent 规则) - 新增 template/.copier-answers.yml.jinja(此前缺失,导致 copier update 无法追踪、verify.sh 读不到 llm_provider/database 而误判)
This commit is contained in:
+6
-3
@@ -1,5 +1,8 @@
|
|||||||
_templates_suffix: .jinja
|
_templates_suffix: .jinja
|
||||||
|
|
||||||
|
# 模板文件都在 template/ 子目录;脚手架自身的 README/scripts/.claude/skills 不进生成项目
|
||||||
|
_subdirectory: template
|
||||||
|
|
||||||
_skip_if_exists:
|
_skip_if_exists:
|
||||||
- "backend/src/**"
|
- "backend/src/**"
|
||||||
- "agent/src/**"
|
- "agent/src/**"
|
||||||
@@ -14,12 +17,12 @@ _exclude:
|
|||||||
- "{% if not include_frontend %}frontend{% endif %}"
|
- "{% if not include_frontend %}frontend{% endif %}"
|
||||||
# ── Backend 规则(仅 include_backend=true 时复制)──────────────────────
|
# ── Backend 规则(仅 include_backend=true 时复制)──────────────────────
|
||||||
- "{% if not include_backend %}.claude/rules/backend.md{% endif %}"
|
- "{% if not include_backend %}.claude/rules/backend.md{% endif %}"
|
||||||
- "{% if not include_backend %}.claude/rules/backend-db.md.jinja{% endif %}"
|
- "{% if not include_backend %}.claude/rules/backend-db.md{% endif %}"
|
||||||
- "{% if not include_backend %}.claude/rules/backend-concurrency.md{% endif %}"
|
- "{% if not include_backend %}.claude/rules/backend-concurrency.md{% endif %}"
|
||||||
# ── Agent 规则(仅 include_agent=true 时复制)────────────────────────────
|
# ── Agent 规则(仅 include_agent=true 时复制)────────────────────────────
|
||||||
- "{% if not include_agent %}.claude/rules/agent.md.jinja{% endif %}"
|
- "{% if not include_agent %}.claude/rules/agent.md{% endif %}"
|
||||||
- "{% if not include_agent %}.claude/rules/agent-dag.md{% endif %}"
|
- "{% if not include_agent %}.claude/rules/agent-dag.md{% endif %}"
|
||||||
- "{% if not include_agent %}.claude/rules/agent-concurrency.md.jinja{% endif %}"
|
- "{% if not include_agent %}.claude/rules/agent-concurrency.md{% endif %}"
|
||||||
- "{% if not include_agent %}.claude/rules/agent-extension-points.md{% endif %}"
|
- "{% if not include_agent %}.claude/rules/agent-extension-points.md{% endif %}"
|
||||||
# LLM 驱动层:按 llm_provider 只保留对应变体
|
# LLM 驱动层:按 llm_provider 只保留对应变体
|
||||||
- "{% if not include_agent or llm_provider != 'gemini-cli' %}.claude/rules/agent-llm-pty.md{% endif %}"
|
- "{% if not include_agent or llm_provider != 'gemini-cli' %}.claude/rules/agent-llm-pty.md{% endif %}"
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# 此文件由 Copier 自动生成与维护,请勿手动编辑。
|
||||||
|
# 记录模板版本与问卷答案,供 `copier update` 三路合并使用。
|
||||||
|
{{ _copier_answers|to_nice_yaml }}
|
||||||
Reference in New Issue
Block a user