workflow-template-seeder

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Workflow: Template Seeder (Skills → Templates)

工作流:模板生成器(技能→模板)

Goal: Turn a short template spec into a runnable, documented template under
templates/
.
This workflow is skills-first:
  • Use skills as the primary execution engine
  • Treat templates as “frozen outputs” (examples + regression references), not the mainline product
目标:将简短的模板规格转换为templates/目录下可运行、带文档的模板。
此工作流以技能为核心
  • 以技能作为主要执行引擎
  • 将模板视为“冻结的输出”(示例+回归参考),而非主线产品

Input (pass paths only)

输入(仅传递路径)

  • repo_root
    : Ship Faster repository root (where
    templates/
    lives)
  • run_dir
    :
    runs/template-seeder/active/<run_id>/
  • template_spec.md
    : One-page spec (what it is, target user, core pages, required integrations)
  • repo_root
    : Ship Faster 仓库根目录(
    templates/
    所在位置)
  • run_dir
    :
    runs/template-seeder/active/<run_id>/
  • template_spec.md
    : 单页规格文档(包含模板定义、目标用户、核心页面、所需集成)

Output (persisted)

输出(持久化内容)

  • 03-plans/template-plan.md
  • 05-final/template-summary.md
  • A new template directory:
    templates/<NNN>-<slug>/
    containing:
    • README.md
      (5‑minute runnable)
    • .env.local.example
      (keys only)
    • metadata.json
  • 03-plans/template-plan.md
  • 05-final/template-summary.md
  • 新的模板目录:
    templates/<NNN>-<slug>/
    ,包含:
    • README.md
      (5分钟即可运行)
    • .env.local.example
      (仅含密钥名称)
    • metadata.json

Workflow

工作流

0) Initialize

0) 初始化

  1. Create
    run_dir
    .
  2. Determine:
    • <slug>
      from spec (kebab-case)
    • <NNN>
      as the next available number under
      templates/
      (001, 002, …)
  3. Write
    01-input/context.json
    for this workflow:
    • entry_type: idea
    • repo_root: <path-to-new-template-dir>
    • need_deploy: false
      (templates should not auto-deploy)
    • Enable only the integrations required by the spec (DB/billing/SEO)
  1. 创建
    run_dir
    目录。
  2. 确定:
    • 从规格文档中提取
      <slug>
      (短横线命名格式)
    • <NNN>
      templates/
      下的下一个可用编号(001、002……)
  3. 为此工作流编写
    01-input/context.json
    • entry_type: idea
    • repo_root: <path-to-new-template-dir>
    • need_deploy: false
      (模板不应自动部署)
    • 仅启用规格文档要求的集成(数据库/计费/SEO)

1) Generate the template baseline (prefer clean + minimal)

1) 生成模板基线(优先简洁+最小化)

Preferred path:
  • Create a clean Next.js baseline in the new template directory, then run the same “Ship Faster chain” against it.
Execution order (recommended):
  1. workflow-project-intake
    (optional if spec is already complete)
  2. workflow-ship-faster
    with the template directory as
    repo_root
  3. If any steps are skipped (e.g., no DB/billing), record why in
    00-index.md
    /
    05-final/template-summary.md
推荐路径:
  • 在新模板目录中创建一个干净的Next.js基线,然后对其运行相同的“快速交付(Ship Faster)”技能链。
推荐执行顺序:
  1. workflow-project-intake
    (如果规格文档已完整,可省略)
  2. 以模板目录作为
    repo_root
    运行
    workflow-ship-faster
  3. 如果跳过任何步骤(如无数据库/计费),请在
    00-index.md
    /
    05-final/template-summary.md
    中记录原因

2) Template hardening (shareable output)

2) 模板加固(可共享输出)

Must do:
  • Remove secrets; only keep env key names in
    .env.local.example
  • Ensure
    README.md
    includes:
    • Node version
    • install + dev
    • required env keys
    • optional integrations notes
  • Ensure
    metadata.json
    is accurate and generic (no private branding unless intended)
必须执行:
  • 移除敏感信息;仅在
    .env.local.example
    中保留环境变量密钥名称
  • 确保
    README.md
    包含:
    • Node 版本
    • 安装与开发指令
    • 所需环境变量密钥
    • 可选集成说明
  • 确保
    metadata.json
    准确且通用(除非有明确需求,否则不包含私有品牌信息)

3) Verification

3) 验证

At minimum (document results in
05-final/template-summary.md
):
  • install works
  • dev
    starts
  • build
    succeeds (if the template requires external credentials, document the minimal required keys)
至少完成以下操作(结果记录在
05-final/template-summary.md
中):
  • 安装可正常完成
  • dev
    命令可启动服务
  • build
    命令执行成功(如果模板需要外部凭证,请记录所需的最小密钥集合)

Constraints

约束条件

  • Do not create a “kitchen sink” template.
  • Avoid large refactors; prefer small, clean baselines that are easy to adapt.
  • Never commit secrets.
  • 不要创建“大而全”的模板。
  • 避免大规模重构;优先选择易于调整的小型、简洁基线。
  • 绝对不要提交敏感信息。