paw-cra-setup
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePawbytes 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 . Collects user preferences and writes them to the Pawbytes ecosystem config:
./assets/module.yaml- — shared project config: core settings at root plus a
{project-root}/.pawbytes/config/config.yamlsection with module-specific values.cra: - — personal settings intended to be gitignored: API keys and any variable marked
{project-root}/.pawbytes/config/config.user.yamlinuser_setting: true. These values live exclusively here../assets/module.yaml - — registers module capabilities for the help system.
{project-root}/.pawbytes/config/module-help.csv
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}在项目中安装并配置Pawbytes Creative Suites模块。模块标识(名称、代码、版本)来自。收集用户偏好并将其写入Pawbytes生态系统配置:
./assets/module.yaml- — 项目共享配置:根目录下的核心设置,加上包含模块特定值的
{project-root}/.pawbytes/config/config.yaml部分。cra: - — 个人设置(需加入git忽略):API密钥及
{project-root}/.pawbytes/config/config.user.yaml中标记为./assets/module.yaml的所有变量。这些值仅存储于此文件。user_setting: true - — 为帮助系统注册模块功能。
{project-root}/.pawbytes/config/module-help.csv
两个配置脚本均采用“防僵尸”模式——在写入新内容前,先移除该模块的现有条目,确保不会留存过期值。
{project-root}On Activation
激活流程
- Read for module metadata and variable definitions (the
./assets/module.yamlfieldcodeis the module identifier)cra - Check if exists — if a
{project-root}/.pawbytes/config/config.yamlsection is already present, inform the user this is an updatecra: - Check for existing config at (legacy BMad format). If found, inform the user that legacy config can be migrated to the new Pawbytes ecosystem format.
{project-root}/_bmad/config.yaml
If the user provides arguments (e.g. , , or inline values like ), 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.
accept all defaults--headlessuser name is Alice, fal key is abc123- 读取获取模块元数据和变量定义(
./assets/module.yaml字段code为模块标识符)cra - 检查是否存在——如果已存在
{project-root}/.pawbytes/config/config.yaml部分,告知用户这是一次更新操作cra: - 检查(旧版BMad格式)是否存在。若找到,告知用户旧版配置可迁移至新的Pawbytes生态系统格式。
{project-root}/_bmad/config.yaml
如果用户提供参数(例如、,或内联值如),将提供的值映射到配置键,其余使用默认值,并跳过交互式提示。最后仍需显示完整的确认摘要。
accept all defaults--headlessuser name is Alice, fal key is abc123Collect 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 > defaults.
./assets/module.yamlCore config (only if no core keys exist yet): (default: user), and (default: English — ask as a single language question, both keys get the same answer). Of these, and are written exclusively to .
user_namecommunication_languagedocument_output_languageuser_namecommunication_languageconfig.user.yamlModule config: Read each variable in that has a field. Ask using that prompt with its default value.
./assets/module.yamlpromptAPI Keys (stored in , not committed):
config.user.yaml- — Required for image/video generation
fal_key - — Optional, for AI voiceover
elevenlabs_api_key - — Optional, for stock media research
pexels_api_key
向用户请求配置值,默认值显示在括号中。将所有配置项一并展示,用户只需一次回复即可修改需要调整的值(例如:“将fal_key改为abc123,其余保持默认”)。切勿告知用户“按回车”或“留空”——在聊天界面中,用户必须输入内容才能回复。
默认值优先级(优先级从高到低):现有配置值 > 中的默认值。
./assets/module.yaml核心配置(仅当核心键不存在时):(默认值:user)、和(默认值:English——合并为一个语言问题询问,两个键使用相同的回答)。其中,和仅写入。
user_namecommunication_languagedocument_output_languageuser_namecommunication_languageconfig.user.yaml模块配置:读取中所有带有字段的变量,使用该提示语及默认值向用户询问。
./assets/module.yamlpromptAPI密钥(存储在中,不提交至版本控制):
config.user.yaml- —— 生成图像/视频的必填项
fal_key - —— 可选,用于AI语音旁白
elevenlabs_api_key - —— 可选,用于素材媒体检索
pexels_api_key
Write Files
写入文件
Write a temp JSON file with the collected answers structured as . Then run the config merge script:
{"core": {...}, "module": {...}}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 craBoth scripts output JSON to stdout with results. If either exits non-zero, surface the error and stop.
将收集到的答案整理为结构,写入临时JSON文件。然后运行配置合并脚本:
{"core": {...}, "module": {...}}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 token and create each path:
{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"写入配置后,创建所有已配置的输出目录。执行文件系统操作时,解析令牌并创建每个路径:
{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 , help entries added, fresh install vs update. Then display the from .
config.user.yamlgreeting./assets/module.yaml使用脚本输出的JSON信息展示已写入的内容——已设置的配置值、写入的用户设置、添加的帮助条目,以及是全新安装还是更新操作。然后显示中的内容。
config.user.yaml./assets/module.yamlgreetingOutcome
结果
Once the user's and 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_namecommunication_language一旦获知用户的和,在本次会话剩余时间内需持续使用这些信息:以用户配置的名称称呼用户,并使用其配置的语言进行沟通。
user_namecommunication_languageFile 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/ # 活动日志