paw-cra-setup

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Pawbytes Creative Suites Setup

Pawbytes Creative Suites 设置流程

Overview

概述

Installs and configures the Pawbytes Creative Suites module into a project. Module identity (name, code, version) comes from
./assets/module.yaml
. Collects user preferences and writes them to the Pawbytes ecosystem config:
  • {project-root}/.pawbytes/config/config.yaml
    — shared project config: core settings at root plus a
    cra:
    section with module-specific values.
  • {project-root}/.pawbytes/config/config.user.yaml
    — personal settings intended to be gitignored: API keys and any variable marked
    user_setting: true
    in
    ./assets/module.yaml
    . These values live exclusively here.
  • {project-root}/.pawbytes/config/module-help.csv
    — registers module capabilities for the help system.
Both config scripts use an anti-zombie pattern — existing entries for this module are removed before writing fresh ones, so stale values never persist.
{project-root}
is a literal token in config values — never substitute it with an actual path. It signals to the consuming LLM that the value is relative to the project root, not the skill root.
在项目中安装并配置Pawbytes Creative Suites模块。模块标识(名称、代码、版本)来自
./assets/module.yaml
。收集用户偏好并将其写入Pawbytes生态系统配置:
  • {project-root}/.pawbytes/config/config.yaml
    — 项目共享配置:根目录下的核心设置,加上包含模块特定值的
    cra:
    部分。
  • {project-root}/.pawbytes/config/config.user.yaml
    — 个人设置(需加入git忽略):API密钥及
    ./assets/module.yaml
    中标记为
    user_setting: true
    的所有变量。这些值仅存储于此文件。
  • {project-root}/.pawbytes/config/module-help.csv
    — 为帮助系统注册模块功能。
两个配置脚本均采用“防僵尸”模式——在写入新内容前,先移除该模块的现有条目,确保不会留存过期值。
{project-root}
是配置值中的字面令牌——切勿替换为实际路径。它用于告知消费LLM该值是相对于项目根目录,而非技能根目录。

On Activation

激活流程

  1. Read
    ./assets/module.yaml
    for module metadata and variable definitions (the
    code
    field
    cra
    is the module identifier)
  2. Check if
    {project-root}/.pawbytes/config/config.yaml
    exists — if a
    cra:
    section is already present, inform the user this is an update
  3. Check for existing config at
    {project-root}/_bmad/config.yaml
    (legacy BMad format). If found, inform the user that legacy config can be migrated to the new Pawbytes ecosystem format.
If the user provides arguments (e.g.
accept all defaults
,
--headless
, or inline values like
user name is Alice, fal key is abc123
), map any provided values to config keys, use defaults for the rest, and skip interactive prompting. Still display the full confirmation summary at the end.
  1. 读取
    ./assets/module.yaml
    获取模块元数据和变量定义(
    code
    字段
    cra
    为模块标识符)
  2. 检查
    {project-root}/.pawbytes/config/config.yaml
    是否存在——如果已存在
    cra:
    部分,告知用户这是一次更新操作
  3. 检查
    {project-root}/_bmad/config.yaml
    (旧版BMad格式)是否存在。若找到,告知用户旧版配置可迁移至新的Pawbytes生态系统格式。
如果用户提供参数(例如
accept all defaults
--headless
,或内联值如
user name is Alice, fal key is abc123
),将提供的值映射到配置键,其余使用默认值,并跳过交互式提示。最后仍需显示完整的确认摘要。

Collect Configuration

收集配置信息

Ask the user for values. Show defaults in brackets. Present all values together so the user can respond once with only the values they want to change (e.g. "change fal_key to abc123, rest are fine"). Never tell the user to "press enter" or "leave blank" — in a chat interface they must type something to respond.
Default priority (highest wins): existing config values >
./assets/module.yaml
defaults.
Core config (only if no core keys exist yet):
user_name
(default: user),
communication_language
and
document_output_language
(default: English — ask as a single language question, both keys get the same answer). Of these,
user_name
and
communication_language
are written exclusively to
config.user.yaml
.
Module config: Read each variable in
./assets/module.yaml
that has a
prompt
field. Ask using that prompt with its default value.
API Keys (stored in
config.user.yaml
, not committed):
  • fal_key
    Required for image/video generation
  • elevenlabs_api_key
    — Optional, for AI voiceover
  • pexels_api_key
    — Optional, for stock media research
向用户请求配置值,默认值显示在括号中。将所有配置项一并展示,用户只需一次回复即可修改需要调整的值(例如:“将fal_key改为abc123,其余保持默认”)。切勿告知用户“按回车”或“留空”——在聊天界面中,用户必须输入内容才能回复。
默认值优先级(优先级从高到低):现有配置值 >
./assets/module.yaml
中的默认值。
核心配置(仅当核心键不存在时):
user_name
(默认值:user)、
communication_language
document_output_language
(默认值:English——合并为一个语言问题询问,两个键使用相同的回答)。其中,
user_name
communication_language
仅写入
config.user.yaml
模块配置:读取
./assets/module.yaml
中所有带有
prompt
字段的变量,使用该提示语及默认值向用户询问。
API密钥(存储在
config.user.yaml
中,不提交至版本控制):
  • fal_key
    —— 生成图像/视频的必填项
  • elevenlabs_api_key
    —— 可选,用于AI语音旁白
  • pexels_api_key
    —— 可选,用于素材媒体检索

Write Files

写入文件

Write a temp JSON file with the collected answers structured as
{"core": {...}, "module": {...}}
. Then run the config merge script:
bash
python3 ./scripts/merge-config.py --config-path "{project-root}/.pawbytes/config/config.yaml" --user-config-path "{project-root}/.pawbytes/config/config.user.yaml" --module-yaml ./assets/module.yaml --answers {temp-file}
Then register capabilities with the help CSV merge:
bash
python3 ./scripts/merge-help-csv.py --target "{project-root}/.pawbytes/config/module-help.csv" --source ./assets/module-help.csv --module-code cra
Both scripts output JSON to stdout with results. If either exits non-zero, surface the error and stop.
将收集到的答案整理为
{"core": {...}, "module": {...}}
结构,写入临时JSON文件。然后运行配置合并脚本:
bash
python3 ./scripts/merge-config.py --config-path "{project-root}/.pawbytes/config/config.yaml" --user-config-path "{project-root}/.pawbytes/config/config.user.yaml" --module-yaml ./assets/module.yaml --answers {temp-file}
随后通过帮助CSV合并脚本注册功能:
bash
python3 ./scripts/merge-help-csv.py --target "{project-root}/.pawbytes/config/module-help.csv" --source ./assets/module-help.csv --module-code cra
两个脚本均会向标准输出打印JSON格式的结果。若任一脚本退出码非零,需显示错误信息并终止流程。

Create Output Directories

创建输出目录

After writing config, create any output directories that were configured. For filesystem operations, resolve the
{project-root}
token and create each path:
bash
mkdir -p "{project-root}/.pawbytes/creative-suites"
mkdir -p "{project-root}/.pawbytes/creative-suites/brands"
mkdir -p "{project-root}/.pawbytes/creative-suites/knowledge"
mkdir -p "{project-root}/.pawbytes/creative-suites/daily"
写入配置后,创建所有已配置的输出目录。执行文件系统操作时,解析
{project-root}
令牌并创建每个路径:
bash
mkdir -p "{project-root}/.pawbytes/creative-suites"
mkdir -p "{project-root}/.pawbytes/creative-suites/brands"
mkdir -p "{project-root}/.pawbytes/creative-suites/knowledge"
mkdir -p "{project-root}/.pawbytes/creative-suites/daily"

Confirm

确认

Use the script JSON output to display what was written — config values set, user settings written to
config.user.yaml
, help entries added, fresh install vs update. Then display the
greeting
from
./assets/module.yaml
.
使用脚本输出的JSON信息展示已写入的内容——已设置的配置值、写入
config.user.yaml
的用户设置、添加的帮助条目,以及是全新安装还是更新操作。然后显示
./assets/module.yaml
中的
greeting
内容。

Outcome

结果

Once the user's
user_name
and
communication_language
are known, use them consistently for the remainder of the session: address the user by their configured name and communicate in their configured language.
一旦获知用户的
user_name
communication_language
,在本次会话剩余时间内需持续使用这些信息:以用户配置的名称称呼用户,并使用其配置的语言进行沟通。

File Structure After Setup

设置完成后的文件结构

{project-root}/
  .pawbytes/
    config/
      config.yaml           # Shared config (committed)
      config.user.yaml      # User settings (gitignored)
      module-help.csv       # Capability registry
    creative-suites/
      index.md              # Agency memory index
      brands/               # Brand guidelines and assets
      knowledge/            # Research and references
      daily/                # Activity logs
{project-root}/
  .pawbytes/
    config/
      config.yaml           # 共享配置(已提交至版本控制)
      config.user.yaml      # 用户设置(已加入git忽略)
      module-help.csv       # 功能注册表
    creative-suites/
      index.md              # 代理内存索引
      brands/               # 品牌指南与资源
      knowledge/            # 研究与参考资料
      daily/                # 活动日志