[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79R4CVNK1ER4EVZXWHA1QPZ":3,"skill-same:01M79R4CVNK1ER4EVZXWHA1QPZ":70},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M79R4CVNK1ER4EVZXWHA1QPZ","bmad-loop-setup",null,"Sets up BMAD Loop Skills module in a project. Use when the user requests to 'install bmad-loop module', 'configure BMAD Loop Skills', or 'setup BMAD Loop Skills'.","thkennedy\u002Ftk-studio","thkennedy","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F4164502?v=4","01M79QZ8DMP5FF2HC6GS3S6FDF","Tim Kennedy","01M79QZ8EM9JBWJ15R5JNC4PW3",0,"MIT","https:\u002F\u002Fgithub.com\u002Fthkennedy\u002Ftk-studio\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbmad-loop-setup\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: 'bmad-loop-setup'\ndescription: Sets up BMAD Loop Skills module in a project. Use when the user requests to 'install bmad-loop module', 'configure BMAD Loop Skills', or 'setup BMAD Loop Skills'.\n---\n\n# Module Setup\n\n## Overview\n\nInstalls, configures, **and upgrades** a BMad module in a project. This module is special: alongside the four automation skills it relies on the **bmad-loop orchestrator tool** (the Python program that drives the loop), installed as the `bmad-loop` package from its public Git repository. So setup does two jobs — (1) register module config + help entries, and (2) install **or upgrade** the orchestrator tool and bootstrap the project so it is ready to run.\n\nThe same skill handles both first-time setup and **upgrades**. When it detects an existing bmad-loop install (or you ask it to `upgrade`), it upgrades the orchestrator tool, refreshes the per-project `bmad-loop-*` skill copies, and re-stamps config — the two-step upgrade ritual, run for you. A plain re-run on an already-installed project is treated as an upgrade.\n\nModule identity (name, code, version) comes from `.\u002Fassets\u002Fmodule.yaml`. Collects user preferences and writes them to three files:\n\n- **`{project-root}\u002F_bmad\u002Fconfig.yaml`** — shared project config: core settings at root (e.g. `output_folder`, `document_output_language`) plus a section per module with metadata and module-specific values. User-only keys (`user_name`, `communication_language`) are **never** written here.\n- **`{project-root}\u002F_bmad\u002Fconfig.user.yaml`** — personal settings intended to be gitignored: `user_name`, `communication_language`, and any module variable marked `user_setting: true` in `.\u002Fassets\u002Fmodule.yaml`. These values live exclusively here.\n- **`{project-root}\u002F_bmad\u002Fmodule-help.csv`** — registers module capabilities for the help system.\n\nBoth config scripts use an anti-zombie pattern — existing entries for this module are removed before writing fresh ones, so stale values never persist.\n\n`{project-root}` is a **literal token** in config _values_ (the data written into the files above) — never substitute it there. It signals to the consuming LLM that the value is relative to the project root, not the skill root. **This does not apply to the filesystem path _arguments_ passed to the scripts below** (the `--*-path`, `--*-dir`, and `--target` arguments): those are real paths, so you **must** resolve `{project-root}` to the actual project root before running, or the scripts will write to a literal `{project-root}\u002F` directory under the skill folder. The scripts reject an unresolved token with an error.\n\n## On Activation\n\n1. Read `.\u002Fassets\u002Fmodule.yaml` for module metadata and variable definitions (the `code` field is the module identifier)\n2. Check if `{project-root}\u002F_bmad\u002Fconfig.yaml` exists — if a section matching the module's code is already present, inform the user this is an update\n3. Check for per-module configuration at `{project-root}\u002F_bmad\u002Fbmad-loop\u002Fconfig.yaml` and `{project-root}\u002F_bmad\u002Fcore\u002Fconfig.yaml`. If either file exists:\n   - If `{project-root}\u002F_bmad\u002Fconfig.yaml` does **not** yet have a section for this module: this is a **fresh install**. Inform the user that installer config was detected and values will be consolidated into the new format.\n   - If `{project-root}\u002F_bmad\u002Fconfig.yaml` **already** has a section for this module: this is a **legacy migration**. Inform the user that legacy per-module config was found alongside existing config, and legacy values will be used as fallback defaults.\n   - In both cases, legacy per-module config is consolidated into the new format. Live config files are **preserved** (never deleted); only genuinely redundant skill-payload directories, if any, are cleaned up after setup.\n\n**Decide fresh-install vs upgrade.** This drives whether the tool is upgraded and whether the per-project skills are refreshed (see \"Install the Orchestrator Tool\" below). Treat it as an **upgrade** when **any** of these hold:\n\n- The user asked for one in their arguments — `upgrade`, `update`, `upgrade tool and skills`, or similar.\n- `{project-root}\u002F_bmad\u002Fconfig.yaml` already has a `bmad-loop` section (step 2 above).\n- The orchestrator tool is already installed under uv: run `uv tool list` and look for a `bmad-loop` entry. (A bare `bmad-loop --version` is **not** sufficient on its own — it can be satisfied by a source checkout or unrelated virtualenv; see step 1 of \"Install the Orchestrator Tool\".)\n- **A pre-rename install is present** — the project (or the machine) is on the old `bmad-auto`. Two tells: `{project-root}\u002F_bmad\u002Fconfig.yaml` has a legacy `bauto` section, or `uv tool list` shows a `bmad-auto` entry (the tool's former name). Treat this as an **upgrade from bmad-auto (renamed to bmad-loop)** and follow \"Migrating from bmad-auto (renamed)\" below in addition to the normal upgrade path.\n\nOtherwise it is a **fresh install**. State the decision to the user before proceeding — e.g. \"Detected an existing bmad-loop install — running an upgrade: tool + skills + config\" or \"No existing install detected — running a fresh setup\". When the signals conflict (e.g. config has a `bmad-loop` section but the tool isn't uv-managed), prefer the upgrade path for whatever **is** present and call out what's missing.\n\nIf the user provides arguments (e.g. `accept all defaults`, `--headless`, `upgrade`, or inline values like `user name is BMad, I speak Swahili`), 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.\n\n## Migrating from bmad-auto (renamed)\n\nOnly when you detected a **pre-rename install** (\"Decide fresh-install vs upgrade\" above). The project was set up under the tool's former name, `bmad-auto`. The rename was a clean break — module code `bauto` → `bmad-loop`, tool package `bmad-auto` → `bmad-loop`, state dir `.automator\u002F` → `.bmad-loop\u002F` — with no compatibility shims, so a few steps below need explicit handling. Do these as part of the normal upgrade:\n\n1. **Carry old config defaults over.** `merge-config.py --legacy-dir` reads `_bmad\u002Fbmad-loop\u002F` (the new code), so it won't find the old `bauto` config on its own. Before collecting values, read the legacy `bauto:` section from `{project-root}\u002F_bmad\u002Fconfig.yaml` (and, if present, the old installer file `{project-root}\u002F_bmad\u002Fbauto\u002Fconfig.yaml`) and fold any keys that still match the current `module.yaml` schema into your defaults. Priority: existing `bmad-loop` values > legacy `bauto` section > legacy `_bmad\u002Fbauto\u002Fconfig.yaml` > `module.yaml` defaults.\n2. **Reinstall the tool under its new name** — uv can't rename a package in place, so this is an uninstall + install, not an upgrade. See the renamed-tool note in \"Install the Orchestrator Tool\" step 2.\n3. **Run `bmad-loop init`** as usual. It handles the on-disk migration for you: strips the old `.automator\u002F` Stop hook from each CLI's settings, removes the `bmad-auto-*` skill dirs, and carries `.automator\u002Fpolicy.toml` over to `.bmad-loop\u002Fpolicy.toml` — leaving the rest of `.automator\u002F` (runs, archives, profiles, plugins) in place for you to delete once satisfied.\n4. **Post-merge cleanup** — the anti-zombie merges key on the **new** names, so old rows and sections survive and need explicit removal:\n   - Delete the leftover `bauto:` section from `{project-root}\u002F_bmad\u002Fconfig.yaml`, plus any `bauto`-marked keys in `{project-root}\u002F_bmad\u002Fconfig.user.yaml`.\n   - Delete rows from `{project-root}\u002F_bmad\u002Fmodule-help.csv` whose module column (column 1) reads `BMAD Automator Skills` — `merge-help-csv.py`'s anti-zombie filter keys on the new `BMAD Loop Skills`, so it leaves the old-named rows behind.\n   - The legacy installer dir `_bmad\u002Fbauto\u002F` is cleaned by the bauto cleanup step (see \"Cleanup Legacy Directories\") **only if** it holds redundant `bmad-auto-*` skill copies; if it holds only stale config it is preserved (harmless — remove it manually once satisfied).\n\nThen continue with the normal flow below.\n\n## Collect Configuration\n\nAsk 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 language to Swahili, rest are fine\"). Never tell the user to \"press enter\" or \"leave blank\" — in a chat interface they must type something to respond.\n\n**Default priority** (highest wins): existing new config values > legacy config values > `.\u002Fassets\u002Fmodule.yaml` defaults. When legacy configs exist, read them and use matching values as defaults instead of `module.yaml` defaults. Only keys that match the current schema are carried forward — changed or removed keys are ignored. On a **rename-upgrade from bmad-auto**, the old `bauto` section (in `_bmad\u002Fconfig.yaml`) and any `_bmad\u002Fbauto\u002Fconfig.yaml` installer file slot in below existing `bmad-loop` values and above `module.yaml` defaults — you read them yourself (see \"Migrating from bmad-auto (renamed)\"), since merge-config's `--legacy-dir` only looks under the new code.\n\n**Core config** (only if no core keys exist yet): `user_name` (default: BMad), `communication_language` and `document_output_language` (default: English — ask as a single language question, both keys get the same answer), `output_folder` (default: `{project-root}\u002F_bmad-output`). Of these, `user_name` and `communication_language` are written exclusively to `config.user.yaml`. The rest go to `config.yaml` at root and are shared across all modules.\n\n**Module config**: Read each variable in `.\u002Fassets\u002Fmodule.yaml` that has a `prompt` field. Ask using that prompt with its default value (or legacy value if available).\n\n## Write Files\n\nWrite a temp JSON file with the collected answers structured as `{\"core\": {...}, \"module\": {...}}` (omit `core` if it already exists). Values inside this JSON keep the literal `{project-root}` token. Then run both scripts — they can run in parallel since they write to different files.\n\nIn the commands below, replace `{project-root}` in every path argument with the actual project root (e.g. `\u002Fhome\u002Fme\u002Fmyapp`) before running — these are filesystem paths, not config values.\n\n```bash\npython3 .\u002Fscripts\u002Fmerge-config.py --config-path \"{project-root}\u002F_bmad\u002Fconfig.yaml\" --user-config-path \"{project-root}\u002F_bmad\u002Fconfig.user.yaml\" --module-yaml .\u002Fassets\u002Fmodule.yaml --answers {temp-file} --legacy-dir \"{project-root}\u002F_bmad\"\npython3 .\u002Fscripts\u002Fmerge-help-csv.py --target \"{project-root}\u002F_bmad\u002Fmodule-help.csv\" --source .\u002Fassets\u002Fmodule-help.csv --legacy-dir \"{project-root}\u002F_bmad\" --module-code bmad-loop\n```\n\nBoth scripts output JSON to stdout with results. If either exits non-zero, surface the error and stop. The scripts automatically read legacy config values as fallback defaults. Legacy config files are **preserved, never deleted** — on BMAD v6 the per-module and core `config.yaml` \u002F `module-help.csv` are live, manifest-tracked files (so `legacy_configs_deleted` \u002F `legacy_csvs_deleted` are always empty).\n\nRun `.\u002Fscripts\u002Fmerge-config.py --help` or `.\u002Fscripts\u002Fmerge-help-csv.py --help` for full usage.\n\n## Create Output Directories\n\nAfter writing config, create any output directories that were configured. For filesystem operations only (such as creating directories), resolve the `{project-root}` token to the actual project root and create each path-type value from `config.yaml` that does not yet exist — this includes `output_folder` and any module variable whose value starts with `{project-root}\u002F`. The paths stored in the config files must continue to use the literal `{project-root}` token; only the directories on disk should use the resolved paths. Use `mkdir -p` or equivalent to create the full path.\n\n## Install the Orchestrator Tool\n\nThis module ships the **bmad-loop orchestrator** — the Python program that actually drives the loop — as the `bmad-loop` Python package, installed from its public Git repository. The skills do nothing on their own: the orchestrator is what spawns fresh coding CLI sessions through the selected adapter(s) to invoke `bmad-dev-auto` (the upstream dev primitive) for the dev pass — then re-invokes it on the `done` spec for the follow-up review pass — and `bmad-loop-sweep`, watches their hook signals, and verifies their artifacts. Installing the tool is therefore part of setup, not an optional extra.\n\n> **Why is the tool installed from Git?** The BMAD installer copies only the skill directories into a project — it does **not** carry sibling files, so the tool can't ride along in the skill folder; it's installed from Git instead. The canonical source is \u003Chttps:\u002F\u002Fgithub.com\u002Fbmad-code-org\u002Fbmad-loop>. (The reverse holds, though: the tool's wheel **bundles** the skills, so `bmad-loop init` lays them down into a project's skill trees on its own — see step 3.)\n\nUnless the user explicitly asked to skip it (e.g. `skills only` \u002F `--no-tool`), install **or upgrade** and bootstrap now. Which branch you take in step 2 follows the fresh-install-vs-upgrade decision from \"On Activation\". In the commands below, resolve `{project-root}` to the real project path before running.\n\n1. **Check what's already on PATH:** run `bmad-loop --version`. A version printing here does **not** mean this project is set up — it only means _some_ `bmad-loop` is importable in the current environment. Before trusting it, run `uv tool list` and look for `bmad-loop`: if it's absent (the on-PATH copy comes from a source checkout or an unrelated virtualenv), warn the user that the active environment is shadowing a clean install and that the project would be relying on that checkout. Unless the user explicitly declines, install\u002Fupgrade from the canonical source below so the project doesn't depend on an incidental dev environment. Only skip the install if the user confirms the on-PATH copy is the one they want this project to use.\n\n2. **Install or upgrade from the Git repository** (the `[tui]` extra pulls in the Textual dashboard so `bmad-loop tui` works). `uv tool install` puts `bmad-loop` in uv's own managed environment, so there's no PEP 668 externally-managed conflict and no need for `--user`, an activated virtualenv, or `--break-system-packages`.\n\n   - **Renamed from bmad-auto** (`uv tool list` shows `bmad-auto`, not `bmad-loop`): uv can't rename a package in place, so `uv tool upgrade` won't move you across the rename. Record `bmad-auto --version` first (for the delta), then uninstall the old tool and install the new one fresh:\n\n     ```bash\n     uv tool uninstall bmad-auto\n     uv tool install \"bmad-loop[tui] @ git+https:\u002F\u002Fgithub.com\u002Fbmad-code-org\u002Fbmad-loop.git\"\n     ```\n\n     After this the machine is on `bmad-loop`; later runs follow the plain upgrade path below.\n\n   - **Fresh install** (no uv-managed `bmad-loop`):\n\n     ```bash\n     uv tool install \"bmad-loop[tui] @ git+https:\u002F\u002Fgithub.com\u002Fbmad-code-org\u002Fbmad-loop.git\"\n     ```\n\n     Pin a release tag for reproducibility by appending `@v\u003CX.Y.Z>` to the Git URL.\n\n   - **Upgrade** (uv already manages `bmad-loop`, per the \"On Activation\" decision):\n\n     1. Record the current version first so you can report the delta: `bmad-loop --version`.\n     2. Default — follow `main` (or the currently pinned tag):\n\n        ```bash\n        uv tool upgrade bmad-loop --reinstall\n        ```\n\n        The `--reinstall` is **required** for a Git source: a plain `uv tool upgrade` reuses the cached commit and won't pull new code. Then **offer to pin a release tag** for reproducibility — if the user wants a specific version, move to it with:\n\n        ```bash\n        uv tool install --force \"bmad-loop[tui] @ git+https:\u002F\u002Fgithub.com\u002Fbmad-code-org\u002Fbmad-loop.git@v\u003CX.Y.Z>\"\n        ```\n\n     3. Re-run `bmad-loop --version` and note the before → after for the confirmation step.\n\n3. **Bootstrap the project** — install the coding-CLI hooks, the bundled `bmad-loop-*` skills, the `.bmad-loop\u002Fpolicy.toml` template, and the gitignore entry (idempotent).\n\n   First decide **which coding CLI(s)** the orchestrator should drive. The supported adapters are `claude` (default), `codex`, `gemini`, `copilot`, and `antigravity` (Google's `agy`). Hooks are registered per CLI, so the choice matters — register every CLI you intend to use for dev\u002Freview\u002Ftriage. Ask the user (unless they already specified it in their setup args, e.g. `cli: claude, codex`, or accepted defaults — then default to `claude` only):\n\n   > \"Which coding CLI(s) should the orchestrator drive — `claude`, `codex`, `gemini`, `copilot`, and\u002For `antigravity`? You can pick more than one. [claude]\"\n\n   Build the command with one `--cli \u003Cname>` per selected CLI (the flag is repeatable). **On an upgrade, append `--force-skills`** so the per-project skill copies are actually refreshed — without it `init` skips every existing skill dir and the project keeps stale skills against the upgraded tool. On a fresh install, omit it.\n\n   ```bash\n   # fresh install, claude only (default)\n   bmad-loop init --project \"{project-root}\" --cli claude\n\n   # fresh install, multiple, e.g. claude + codex + gemini\n   bmad-loop init --project \"{project-root}\" --cli claude --cli codex --cli gemini\n\n   # upgrade — refresh the bundled skills in place\n   bmad-loop init --project \"{project-root}\" --cli claude --force-skills\n   ```\n\n   Names must be exactly `claude`, `codex`, `gemini`, `copilot`, or `antigravity` — `init` errors on an unknown profile and lists the valid ones. `init` prints any one-time first-run notes per CLI (e.g. start `claude` once in the project and accept the workspace-trust + hooks-approval dialogs before `bmad-loop run` — spawned sessions can't answer first-run dialogs). Relay those notes to the user.\n\n   **Skills are installed automatically:** `init` lays the bundled `bmad-loop-*` skills into the right tree for each selected CLI — `.claude\u002Fskills\u002F` for `claude`, `.agents\u002Fskills\u002F` for `codex`\u002F`gemini`\u002F`copilot`\u002F`antigravity`. On a fresh install, existing skill dirs are left untouched; on an upgrade, `--force-skills` overwrites them with the bundled copies from the upgraded tool (use `--no-skills` to skip the step and manage skills yourself).\n\n   > **Note:** `--force-skills` also overwrites `bmad-loop-setup` itself (it ships in the same bundle). That's expected and safe — the freshly laid-down setup skill takes effect on the **next** invocation, and your `_bmad\u002Fcustom\u002F*.toml` overrides (keyed by skill directory name) are untouched.\n\n4. **Preflight** — verify config, sprint-status, git, tmux, and the coding CLI:\n\n   ```bash\n   bmad-loop validate --project \"{project-root}\"\n   ```\n\n   `validate` exits non-zero when the project isn't fully ready (e.g. no `sprint-status.yaml` yet, or `bmad-sprint-planning` hasn't run). On a fresh project that is **expected** — report its findings to the user as a readiness checklist, not as an install failure.\n\n5. **Point the user at per-role adapter config.** `--cli` in step 3 only registers _hooks_ for each CLI. Which CLI actually **runs** each stage is governed by `{project-root}\u002F.bmad-loop\u002Fpolicy.toml`, written from a template by `init`. The `[adapter] name` (default `claude`) applies to every stage; optional `[adapter.dev]`, `[adapter.review]`, and `[adapter.triage]` tables override individual stages (each takes its own `name` and `extra_args`). So a mixed setup — e.g. `claude` for dev, `codex` for review — needs both the hooks registered (step 3) **and** the role pointed at that CLI in `policy.toml`:\n\n   ```toml\n   [adapter]\n   name = \"claude\"        # default for all stages\n\n   [adapter.review]\n   name = \"codex\"         # review runs on codex instead\n   ```\n\n   Tell the user where the file is and that any CLI named in `policy.toml` must also have been registered with `--cli` in step 3 (re-run `bmad-loop init --cli \u003Cname>` to add one later). Leave `policy.toml` untouched if they only use a single CLI — the default is correct.\n\n## Cleanup Legacy Directories\n\nAfter both merge scripts complete successfully, remove any **redundant skill-payload** directories an older installer may have staged under `_bmad\u002F` (past layouts duplicated skills that already live in the CLI's skill tree, e.g. `.claude\u002Fskills\u002F`). On a modern BMAD v6 install nothing redundant is staged, so this step is a **safe no-op** — it never touches `_bmad\u002Fcore\u002F`, per-module config, or the `_bmad\u002F_config\u002F` manifest.\n\nAs with the merge scripts, replace `{project-root}` in the `--bmad-dir` and `--skills-dir` path arguments with the actual project root before running. For `--skills-dir`, use the skill tree of a CLI registered in step 3: `.claude\u002Fskills` for `claude`, `.agents\u002Fskills` for `codex`\u002F`gemini`\u002F`copilot`\u002F`antigravity`. `init` lays the bundled skills into **every** selected CLI's tree, so any registered CLI's tree verifies correctly — the command below shows the `claude` tree; substitute `.agents\u002Fskills` if only non-Claude CLIs were registered. Do **not** pass `--also-remove _config` (or any shared config\u002Fmanifest dir): `_config\u002F` is live BMAD infrastructure and the script refuses to remove it regardless.\n\n```bash\npython3 .\u002Fscripts\u002Fcleanup-legacy.py --bmad-dir \"{project-root}\u002F_bmad\" --module-code bmad-loop --skills-dir \"{project-root}\u002F.claude\u002Fskills\"\n```\n\nA directory is removed only when it is a **verified-redundant skill payload**: it contains a `SKILL.md`, carries no live config\u002Fmanifest files anywhere in its tree (marker-named files inside a staged skill payload don't count — skills legitimately ship e.g. `assets\u002Fmodule-help.csv`), and (with `--skills-dir`) its skills are verified installed under the `--skills-dir` tree. Live config directories (per-module and nested config\u002Fmanifests) are protected and reported under `directories_protected`; `core\u002F` and `_config\u002F` are protected by name regardless of contents. If the script exits non-zero, surface the error and stop. Missing directories (already cleaned by a prior run) are not errors — the script is idempotent.\n\n**On a rename-upgrade from bmad-auto**, if the old `_bmad\u002Fbauto\u002F` directory holds pre-rename `bmad-auto-*` skill copies (an older payload layout), run this cleanup **without** `--skills-dir` to skip installed-skill verification (their removal is the point). It is a no-op when `_bmad\u002Fbauto\u002F` holds only config or isn't present:\n\n```bash\npython3 .\u002Fscripts\u002Fcleanup-legacy.py --bmad-dir \"{project-root}\u002F_bmad\" --module-code bauto\n```\n\nCheck `directories_removed`, `directories_protected`, and `files_removed_count` in the JSON output for the confirmation step. Run `.\u002Fscripts\u002Fcleanup-legacy.py --help` for full usage.\n\n## Confirm\n\nUse the script JSON output to display what was written — config values set (written to `config.yaml` at root for core, module section for module values; the `bmad-loop` section's `version` is re-stamped from `.\u002Fassets\u002Fmodule.yaml` on every run via the anti-zombie merge), user settings written to `config.user.yaml` (`user_keys` in result), help entries added, fresh install vs upgrade.\n\nReport the **tool** result according to the branch taken:\n\n- **Fresh install:** the installed `bmad-loop --version`, that `bmad-loop init` registered hooks, installed the `bmad-loop-*` skills, and wrote policy\u002Fgitignore for the selected coding CLI(s) (name each one — e.g. \"hooks + skills installed for claude, codex\").\n- **Upgrade:** the before → after `bmad-loop --version` (e.g. \"upgraded 0.3.1 → 0.3.2\", or \"already current at 0.3.2\"), that the `bmad-loop-*` skills were **refreshed** (not skipped) with `--force-skills` in each CLI tree, and the re-stamped config version.\n\nAlso report the `bmad-loop validate` preflight result (pass, or the readiness checklist of what's still missing). If legacy config was consolidated, mention the migration (live config files are preserved, not deleted). If any redundant skill-payload directories were removed, report the count and list from `directories_removed` (e.g. \"Cleaned up a redundant skill-payload directory — skills are installed in the CLI's skill tree\"); on a v6 install this is typically empty and `directories_protected` confirms `core\u002F` and `_config\u002F` were left intact. Then display the `module_greeting` from `.\u002Fassets\u002Fmodule.yaml` to the user.\n\n## Outcome\n\nOnce the user's `user_name` and `communication_language` are known (from collected input, arguments, or existing config), use them consistently for the remainder of the session: address the user by their configured name and communicate in their configured `communication_language`.\n","# Module Setup\n\n## Overview\n\nInstalls, configures, **and upgrades** a BMad module in a project. This module is special: alongside the four automation skills it relies on the **bmad-loop orchestrator tool** (the Python program that drives the loop), installed as the `bmad-loop` package from its public Git repository. So setup does two jobs — (1) register module config + help entries, and (2) install **or upgrade** the orchestrator tool and bootstrap the project so it is ready to run.\n\nThe same skill handles both first-time setup and **upgrades**. When it detects an existing bmad-loop install (or you ask it to `upgrade`), it upgrades the orchestrator tool, refreshes the per-project `bmad-loop-*` skill copies, and re-stamps config — the two-step upgrade ritual, run for you. A plain re-run on an already-installed project is treated as an upgrade.\n\nModule identity (name, code, version) comes from `.\u002Fassets\u002Fmodule.yaml`. Collects user preferences and writes them to three files:\n\n- **`{project-root}\u002F_bmad\u002Fconfig.yaml`** — shared project config: core settings at root (e.g. `output_folder`, `document_output_language`) plus a section per module with metadata and module-specific values. User-only keys (`user_name`, `communication_language`) are **never** written here.\n- **`{project-root}\u002F_bmad\u002Fconfig.user.yaml`** — personal settings intended to be gitignored: `user_name`, `communication_language`, and any module variable marked `user_setting: true` in `.\u002Fassets\u002Fmodule.yaml`. These values live exclusively here.\n- **`{project-root}\u002F_bmad\u002Fmodule-help.csv`** — registers module capabilities for the help system.\n\nBoth config scripts use an anti-zombie pattern — existing entries for this module are removed before writing fresh ones, so stale values never persist.\n\n`{project-root}` is a **literal token** in config _values_ (the data written into the files above) — never substitute it there. It signals to the consuming LLM that the value is relative to the project root, not the skill root. **This does not apply to the filesystem path _arguments_ passed to the scripts below** (the `--*-path`, `--*-dir`, and `--target` arguments): those are real paths, so you **must** resolve `{project-root}` to the actual project root before running, or the scripts will write to a literal `{project-root}\u002F` directory under the skill folder. The scripts reject an unresolved token with an error.\n\n## On Activation\n\n1. Read `.\u002Fassets\u002Fmodule.yaml` for module metadata and variable definitions (the `code` field is the module identifier)\n2. Check if `{project-root}\u002F_bmad\u002Fconfig.yaml` exists — if a section matching the module's code is already present, inform the user this is an update\n3. Check for per-module configuration at `{project-root}\u002F_bmad\u002Fbmad-loop\u002Fconfig.yaml` and `{project-root}\u002F_bmad\u002Fcore\u002Fconfig.yaml`. If either file exists:\n   - If `{project-root}\u002F_bmad\u002Fconfig.yaml` does **not** yet have a section for this module: this is a **fresh install**. Inform the user that installer config was detected and values will be consolidated into the new format.\n   - If `{project-root}\u002F_bmad\u002Fconfig.yaml` **already** has a section for this module: this is a **legacy migration**. Inform the user that legacy per-module config was found alongside existing config, and legacy values will be used as fallback defaults.\n   - In both cases, legacy per-module config is consolidated into the new format. Live config files are **preserved** (never deleted); only genuinely redundant skill-payload directories, if any, are cleaned up after setup.\n\n**Decide fresh-install vs upgrade.** This drives whether the tool is upgraded and whether the per-project skills are refreshed (see \"Install the Orchestrator Tool\" below). Treat it as an **upgrade** when **any** of these hold:\n\n- The user asked for one in their arguments — `upgrade`, `update`, `upgrade tool and skills`, or similar.\n- `{project-root}\u002F_bmad\u002Fconfig.yaml` already has a `bmad-loop` section (step 2 above).\n- The orchestrator tool is already installed under uv: run `uv tool list` and look for a `bmad-loop` entry. (A bare `bmad-loop --version` is **not** sufficient on its own — it can be satisfied by a source checkout or unrelated virtualenv; see step 1 of \"Install the Orchestrator Tool\".)\n- **A pre-rename install is present** — the project (or the machine) is on the old `bmad-auto`. Two tells: `{project-root}\u002F_bmad\u002Fconfig.yaml` has a legacy `bauto` section, or `uv tool list` shows a `bmad-auto` entry (the tool's former name). Treat this as an **upgrade from bmad-auto (renamed to bmad-loop)** and follow \"Migrating from bmad-auto (renamed)\" below in addition to the normal upgrade path.\n\nOtherwise it is a **fresh install**. State the decision to the user before proceeding — e.g. \"Detected an existing bmad-loop install — running an upgrade: tool + skills + config\" or \"No existing install detected — running a fresh setup\". When the signals conflict (e.g. config has a `bmad-loop` section but the tool isn't uv-managed), prefer the upgrade path for whatever **is** present and call out what's missing.\n\nIf the user provides arguments (e.g. `accept all defaults`, `--headless`, `upgrade`, or inline values like `user name is BMad, I speak Swahili`), 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.\n\n## Migrating from bmad-auto (renamed)\n\nOnly when you detected a **pre-rename install** (\"Decide fresh-install vs upgrade\" above). The project was set up under the tool's former name, `bmad-auto`. The rename was a clean break — module code `bauto` → `bmad-loop`, tool package `bmad-auto` → `bmad-loop`, state dir `.automator\u002F` → `.bmad-loop\u002F` — with no compatibility shims, so a few steps below need explicit handling. Do these as part of the normal upgrade:\n\n1. **Carry old config defaults over.** `merge-config.py --legacy-dir` reads `_bmad\u002Fbmad-loop\u002F` (the new code), so it won't find the old `bauto` config on its own. Before collecting values, read the legacy `bauto:` section from `{project-root}\u002F_bmad\u002Fconfig.yaml` (and, if present, the old installer file `{project-root}\u002F_bmad\u002Fbauto\u002Fconfig.yaml`) and fold any keys that still match the current `module.yaml` schema into your defaults. Priority: existing `bmad-loop` values > legacy `bauto` section > legacy `_bmad\u002Fbauto\u002Fconfig.yaml` > `module.yaml` defaults.\n2. **Reinstall the tool under its new name** — uv can't rename a package in place, so this is an uninstall + install, not an upgrade. See the renamed-tool note in \"Install the Orchestrator Tool\" step 2.\n3. **Run `bmad-loop init`** as usual. It handles the on-disk migration for you: strips the old `.automator\u002F` Stop hook from each CLI's settings, removes the `bmad-auto-*` skill dirs, and carries `.automator\u002Fpolicy.toml` over to `.bmad-loop\u002Fpolicy.toml` — leaving the rest of `.automator\u002F` (runs, archives, profiles, plugins) in place for you to delete once satisfied.\n4. **Post-merge cleanup** — the anti-zombie merges key on the **new** names, so old rows and sections survive and need explicit removal:\n   - Delete the leftover `bauto:` section from `{project-root}\u002F_bmad\u002Fconfig.yaml`, plus any `bauto`-marked keys in `{project-root}\u002F_bmad\u002Fconfig.user.yaml`.\n   - Delete rows from `{project-root}\u002F_bmad\u002Fmodule-help.csv` whose module column (column 1) reads `BMAD Automator Skills` — `merge-help-csv.py`'s anti-zombie filter keys on the new `BMAD Loop Skills`, so it leaves the old-named rows behind.\n   - The legacy installer dir `_bmad\u002Fbauto\u002F` is cleaned by the bauto cleanup step (see \"Cleanup Legacy Directories\") **only if** it holds redundant `bmad-auto-*` skill copies; if it holds only stale config it is preserved (harmless — remove it manually once satisfied).\n\nThen continue with the normal flow below.\n\n## Collect Configuration\n\nAsk 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 language to Swahili, rest are fine\"). Never tell the user to \"press enter\" or \"leave blank\" — in a chat interface they must type something to respond.\n\n**Default priority** (highest wins): existing new config values > legacy config values > `.\u002Fassets\u002Fmodule.yaml` defaults. When legacy configs exist, read them and use matching values as defaults instead of `module.yaml` defaults. Only keys that match the current schema are carried forward — changed or removed keys are ignored. On a **rename-upgrade from bmad-auto**, the old `bauto` section (in `_bmad\u002Fconfig.yaml`) and any `_bmad\u002Fbauto\u002Fconfig.yaml` installer file slot in below existing `bmad-loop` values and above `module.yaml` defaults — you read them yourself (see \"Migrating from bmad-auto (renamed)\"), since merge-config's `--legacy-dir` only looks under the new code.\n\n**Core config** (only if no core keys exist yet): `user_name` (default: BMad), `communication_language` and `document_output_language` (default: English — ask as a single language question, both keys get the same answer), `output_folder` (default: `{project-root}\u002F_bmad-output`). Of these, `user_name` and `communication_language` are written exclusively to `config.user.yaml`. The rest go to `config.yaml` at root and are shared across all modules.\n\n**Module config**: Read each variable in `.\u002Fassets\u002Fmodule.yaml` that has a `prompt` field. Ask using that prompt with its default value (or legacy value if available).\n\n## Write Files\n\nWrite a temp JSON file with the collected answers structured as `{\"core\": {...}, \"module\": {...}}` (omit `core` if it already exists). Values inside this JSON keep the literal `{project-root}` token. Then run both scripts — they can run in parallel since they write to different files.\n\nIn the commands below, replace `{project-root}` in every path argument with the actual project root (e.g. `\u002Fhome\u002Fme\u002Fmyapp`) before running — these are filesystem paths, not config values.\n\n```bash\npython3 .\u002Fscripts\u002Fmerge-config.py --config-path \"{project-root}\u002F_bmad\u002Fconfig.yaml\" --user-config-path \"{project-root}\u002F_bmad\u002Fconfig.user.yaml\" --module-yaml .\u002Fassets\u002Fmodule.yaml --answers {temp-file} --legacy-dir \"{project-root}\u002F_bmad\"\npython3 .\u002Fscripts\u002Fmerge-help-csv.py --target \"{project-root}\u002F_bmad\u002Fmodule-help.csv\" --source .\u002Fassets\u002Fmodule-help.csv --legacy-dir \"{project-root}\u002F_bmad\" --module-code bmad-loop\n```\n\nBoth scripts output JSON to stdout with results. If either exits non-zero, surface the error and stop. The scripts automatically read legacy config values as fallback defaults. Legacy config files are **preserved, never deleted** — on BMAD v6 the per-module and core `config.yaml` \u002F `module-help.csv` are live, manifest-tracked files (so `legacy_configs_deleted` \u002F `legacy_csvs_deleted` are always empty).\n\nRun `.\u002Fscripts\u002Fmerge-config.py --help` or `.\u002Fscripts\u002Fmerge-help-csv.py --help` for full usage.\n\n## Create Output Directories\n\nAfter writing config, create any output directories that were configured. For filesystem operations only (such as creating directories), resolve the `{project-root}` token to the actual project root and create each path-type value from `config.yaml` that does not yet exist — this includes `output_folder` and any module variable whose value starts with `{project-root}\u002F`. The paths stored in the config files must continue to use the literal `{project-root}` token; only the directories on disk should use the resolved paths. Use `mkdir -p` or equivalent to create the full path.\n\n## Install the Orchestrator Tool\n\nThis module ships the **bmad-loop orchestrator** — the Python program that actually drives the loop — as the `bmad-loop` Python package, installed from its public Git repository. The skills do nothing on their own: the orchestrator is what spawns fresh coding CLI sessions through the selected adapter(s) to invoke `bmad-dev-auto` (the upstream dev primitive) for the dev pass — then re-invokes it on the `done` spec for the follow-up review pass — and `bmad-loop-sweep`, watches their hook signals, and verifies their artifacts. Installing the tool is therefore part of setup, not an optional extra.\n\n> **Why is the tool installed from Git?** The BMAD installer copies only the skill directories into a project — it does **not** carry sibling files, so the tool can't ride along in the skill folder; it's installed from Git instead. The canonical source is \u003Chttps:\u002F\u002Fgithub.com\u002Fbmad-code-org\u002Fbmad-loop>. (The reverse holds, though: the tool's wheel **bundles** the skills, so `bmad-loop init` lays them down into a project's skill trees on its own — see step 3.)\n\nUnless the user explicitly asked to skip it (e.g. `skills only` \u002F `--no-tool`), install **or upgrade** and bootstrap now. Which branch you take in step 2 follows the fresh-install-vs-upgrade decision from \"On Activation\". In the commands below, resolve `{project-root}` to the real project path before running.\n\n1. **Check what's already on PATH:** run `bmad-loop --version`. A version printing here does **not** mean this project is set up — it only means _some_ `bmad-loop` is importable in the current environment. Before trusting it, run `uv tool list` and look for `bmad-loop`: if it's absent (the on-PATH copy comes from a source checkout or an unrelated virtualenv), warn the user that the active environment is shadowing a clean install and that the project would be relying on that checkout. Unless the user explicitly declines, install\u002Fupgrade from the canonical source below so the project doesn't depend on an incidental dev environment. Only skip the install if the user confirms the on-PATH copy is the one they want this project to use.\n\n2. **Install or upgrade from the Git repository** (the `[tui]` extra pulls in the Textual dashboard so `bmad-loop tui` works). `uv tool install` puts `bmad-loop` in uv's own managed environment, so there's no PEP 668 externally-managed conflict and no need for `--user`, an activated virtualenv, or `--break-system-packages`.\n\n   - **Renamed from bmad-auto** (`uv tool list` shows `bmad-auto`, not `bmad-loop`): uv can't rename a package in place, so `uv tool upgrade` won't move you across the rename. Record `bmad-auto --version` first (for the delta), then uninstall the old tool and install the new one fresh:\n\n     ```bash\n     uv tool uninstall bmad-auto\n     uv tool install \"bmad-loop[tui] @ git+https:\u002F\u002Fgithub.com\u002Fbmad-code-org\u002Fbmad-loop.git\"\n     ```\n\n     After this the machine is on `bmad-loop`; later runs follow the plain upgrade path below.\n\n   - **Fresh install** (no uv-managed `bmad-loop`):\n\n     ```bash\n     uv tool install \"bmad-loop[tui] @ git+https:\u002F\u002Fgithub.com\u002Fbmad-code-org\u002Fbmad-loop.git\"\n     ```\n\n     Pin a release tag for reproducibility by appending `@v\u003CX.Y.Z>` to the Git URL.\n\n   - **Upgrade** (uv already manages `bmad-loop`, per the \"On Activation\" decision):\n\n     1. Record the current version first so you can report the delta: `bmad-loop --version`.\n     2. Default — follow `main` (or the currently pinned tag):\n\n        ```bash\n        uv tool upgrade bmad-loop --reinstall\n        ```\n\n        The `--reinstall` is **required** for a Git source: a plain `uv tool upgrade` reuses the cached commit and won't pull new code. Then **offer to pin a release tag** for reproducibility — if the user wants a specific version, move to it with:\n\n        ```bash\n        uv tool install --force \"bmad-loop[tui] @ git+https:\u002F\u002Fgithub.com\u002Fbmad-code-org\u002Fbmad-loop.git@v\u003CX.Y.Z>\"\n        ```\n\n     3. Re-run `bmad-loop --version` and note the before → after for the confirmation step.\n\n3. **Bootstrap the project** — install the coding-CLI hooks, the bundled `bmad-loop-*` skills, the `.bmad-loop\u002Fpolicy.toml` template, and the gitignore entry (idempotent).\n\n   First decide **which coding CLI(s)** the orchestrator should drive. The supported adapters are `claude` (default), `codex`, `gemini`, `copilot`, and `antigravity` (Google's `agy`). Hooks are registered per CLI, so the choice matters — register every CLI you intend to use for dev\u002Freview\u002Ftriage. Ask the user (unless they already specified it in their setup args, e.g. `cli: claude, codex`, or accepted defaults — then default to `claude` only):\n\n   > \"Which coding CLI(s) should the orchestrator drive — `claude`, `codex`, `gemini`, `copilot`, and\u002For `antigravity`? You can pick more than one. [claude]\"\n\n   Build the command with one `--cli \u003Cname>` per selected CLI (the flag is repeatable). **On an upgrade, append `--force-skills`** so the per-project skill copies are actually refreshed — without it `init` skips every existing skill dir and the project keeps stale skills against the upgraded tool. On a fresh install, omit it.\n\n   ```bash\n   # fresh install, claude only (default)\n   bmad-loop init --project \"{project-root}\" --cli claude\n\n   # fresh install, multiple, e.g. claude + codex + gemini\n   bmad-loop init --project \"{project-root}\" --cli claude --cli codex --cli gemini\n\n   # upgrade — refresh the bundled skills in place\n   bmad-loop init --project \"{project-root}\" --cli claude --force-skills\n   ```\n\n   Names must be exactly `claude`, `codex`, `gemini`, `copilot`, or `antigravity` — `init` errors on an unknown profile and lists the valid ones. `init` prints any one-time first-run notes per CLI (e.g. start `claude` once in the project and accept the workspace-trust + hooks-approval dialogs before `bmad-loop run` — spawned sessions can't answer first-run dialogs). Relay those notes to the user.\n\n   **Skills are installed automatically:** `init` lays the bundled `bmad-loop-*` skills into the right tree for each selected CLI — `.claude\u002Fskills\u002F` for `claude`, `.agents\u002Fskills\u002F` for `codex`\u002F`gemini`\u002F`copilot`\u002F`antigravity`. On a fresh install, existing skill dirs are left untouched; on an upgrade, `--force-skills` overwrites them with the bundled copies from the upgraded tool (use `--no-skills` to skip the step and manage skills yourself).\n\n   > **Note:** `--force-skills` also overwrites `bmad-loop-setup` itself (it ships in the same bundle). That's expected and safe — the freshly laid-down setup skill takes effect on the **next** invocation, and your `_bmad\u002Fcustom\u002F*.toml` overrides (keyed by skill directory name) are untouched.\n\n4. **Preflight** — verify config, sprint-status, git, tmux, and the coding CLI:\n\n   ```bash\n   bmad-loop validate --project \"{project-root}\"\n   ```\n\n   `validate` exits non-zero when the project isn't fully ready (e.g. no `sprint-status.yaml` yet, or `bmad-sprint-planning` hasn't run). On a fresh project that is **expected** — report its findings to the user as a readiness checklist, not as an install failure.\n\n5. **Point the user at per-role adapter config.** `--cli` in step 3 only registers _hooks_ for each CLI. Which CLI actually **runs** each stage is governed by `{project-root}\u002F.bmad-loop\u002Fpolicy.toml`, written from a template by `init`. The `[adapter] name` (default `claude`) applies to every stage; optional `[adapter.dev]`, `[adapter.review]`, and `[adapter.triage]` tables override individual stages (each takes its own `name` and `extra_args`). So a mixed setup — e.g. `claude` for dev, `codex` for review — needs both the hooks registered (step 3) **and** the role pointed at that CLI in `policy.toml`:\n\n   ```toml\n   [adapter]\n   name = \"claude\"        # default for all stages\n\n   [adapter.review]\n   name = \"codex\"         # review runs on codex instead\n   ```\n\n   Tell the user where the file is and that any CLI named in `policy.toml` must also have been registered with `--cli` in step 3 (re-run `bmad-loop init --cli \u003Cname>` to add one later). Leave `policy.toml` untouched if they only use a single CLI — the default is correct.\n\n## Cleanup Legacy Directories\n\nAfter both merge scripts complete successfully, remove any **redundant skill-payload** directories an older installer may have staged under `_bmad\u002F` (past layouts duplicated skills that already live in the CLI's skill tree, e.g. `.claude\u002Fskills\u002F`). On a modern BMAD v6 install nothing redundant is staged, so this step is a **safe no-op** — it never touches `_bmad\u002Fcore\u002F`, per-module config, or the `_bmad\u002F_config\u002F` manifest.\n\nAs with the merge scripts, replace `{project-root}` in the `--bmad-dir` and `--skills-dir` path arguments with the actual project root before running. For `--skills-dir`, use the skill tree of a CLI registered in step 3: `.claude\u002Fskills` for `claude`, `.agents\u002Fskills` for `codex`\u002F`gemini`\u002F`copilot`\u002F`antigravity`. `init` lays the bundled skills into **every** selected CLI's tree, so any registered CLI's tree verifies correctly — the command below shows the `claude` tree; substitute `.agents\u002Fskills` if only non-Claude CLIs were registered. Do **not** pass `--also-remove _config` (or any shared config\u002Fmanifest dir): `_config\u002F` is live BMAD infrastructure and the script refuses to remove it regardless.\n\n```bash\npython3 .\u002Fscripts\u002Fcleanup-legacy.py --bmad-dir \"{project-root}\u002F_bmad\" --module-code bmad-loop --skills-dir \"{project-root}\u002F.claude\u002Fskills\"\n```\n\nA directory is removed only when it is a **verified-redundant skill payload**: it contains a `SKILL.md`, carries no live config\u002Fmanifest files anywhere in its tree (marker-named files inside a staged skill payload don't count — skills legitimately ship e.g. `assets\u002Fmodule-help.csv`), and (with `--skills-dir`) its skills are verified installed under the `--skills-dir` tree. Live config directories (per-module and nested config\u002Fmanifests) are protected and reported under `directories_protected`; `core\u002F` and `_config\u002F` are protected by name regardless of contents. If the script exits non-zero, surface the error and stop. Missing directories (already cleaned by a prior run) are not errors — the script is idempotent.\n\n**On a rename-upgrade from bmad-auto**, if the old `_bmad\u002Fbauto\u002F` directory holds pre-rename `bmad-auto-*` skill copies (an older payload layout), run this cleanup **without** `--skills-dir` to skip installed-skill verification (their removal is the point). It is a no-op when `_bmad\u002Fbauto\u002F` holds only config or isn't present:\n\n```bash\npython3 .\u002Fscripts\u002Fcleanup-legacy.py --bmad-dir \"{project-root}\u002F_bmad\" --module-code bauto\n```\n\nCheck `directories_removed`, `directories_protected`, and `files_removed_count` in the JSON output for the confirmation step. Run `.\u002Fscripts\u002Fcleanup-legacy.py --help` for full usage.\n\n## Confirm\n\nUse the script JSON output to display what was written — config values set (written to `config.yaml` at root for core, module section for module values; the `bmad-loop` section's `version` is re-stamped from `.\u002Fassets\u002Fmodule.yaml` on every run via the anti-zombie merge), user settings written to `config.user.yaml` (`user_keys` in result), help entries added, fresh install vs upgrade.\n\nReport the **tool** result according to the branch taken:\n\n- **Fresh install:** the installed `bmad-loop --version`, that `bmad-loop init` registered hooks, installed the `bmad-loop-*` skills, and wrote policy\u002Fgitignore for the selected coding CLI(s) (name each one — e.g. \"hooks + skills installed for claude, codex\").\n- **Upgrade:** the before → after `bmad-loop --version` (e.g. \"upgraded 0.3.1 → 0.3.2\", or \"already current at 0.3.2\"), that the `bmad-loop-*` skills were **refreshed** (not skipped) with `--force-skills` in each CLI tree, and the re-stamped config version.\n\nAlso report the `bmad-loop validate` preflight result (pass, or the readiness checklist of what's still missing). If legacy config was consolidated, mention the migration (live config files are preserved, not deleted). If any redundant skill-payload directories were removed, report the count and list from `directories_removed` (e.g. \"Cleaned up a redundant skill-payload directory — skills are installed in the CLI's skill tree\"); on a v6 install this is typically empty and `directories_protected` confirms `core\u002F` and `_config\u002F` were left intact. Then display the `module_greeting` from `.\u002Fassets\u002Fmodule.yaml` to the user.\n\n## Outcome\n\nOnce the user's `user_name` and `communication_language` are known (from collected input, arguments, or existing config), use them consistently for the remainder of the session: address the user by their configured name and communicate in their configured `communication_language`.\n",{"name":5,"description":7},"main","ecd23b3c0458cd511812f643d9111e3d7c8235f4",".claude\u002Fskills\u002Fbmad-loop-setup","https:\u002F\u002Fgithub.com\u002Fthkennedy\u002Ftk-studio","https:\u002F\u002Fgithub.com\u002Fthkennedy","https:\u002F\u002Ftimothyhkennedy.com","Just a guy who loves making tools, automation and games.","2026-11-10 20:38:16",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add thkennedy\u002Ftk-studio --skill bmad-loop-setup",{"tool":38,"command":39},"bunx","bunx skills add thkennedy\u002Ftk-studio --skill bmad-loop-setup",{"tool":41,"command":42},"pnpm","pnpm dlx skills add thkennedy\u002Ftk-studio --skill bmad-loop-setup","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fthkennedy\u002Ftk-studio\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbmad-loop-setup\u002FSKILL.md",true,[46,52,56,62,66],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"assets\u002Fmodule-help.csv","ASSET","资产文件",588,"https:\u002F\u002Fgithub.com\u002Fthkennedy\u002Ftk-studio\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbmad-loop-setup\u002Fassets\u002Fmodule-help.csv",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"assets\u002Fmodule.yaml",1261,"https:\u002F\u002Fgithub.com\u002Fthkennedy\u002Ftk-studio\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbmad-loop-setup\u002Fassets\u002Fmodule.yaml",{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"scripts\u002Fcleanup-legacy.py","SCRIPT","脚本",13044,"https:\u002F\u002Fgithub.com\u002Fthkennedy\u002Ftk-studio\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbmad-loop-setup\u002Fscripts\u002Fcleanup-legacy.py",{"path":63,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":64,"sourceHtmlUrl":65},"scripts\u002Fmerge-config.py",15940,"https:\u002F\u002Fgithub.com\u002Fthkennedy\u002Ftk-studio\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbmad-loop-setup\u002Fscripts\u002Fmerge-config.py",{"path":67,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":68,"sourceHtmlUrl":69},"scripts\u002Fmerge-help-csv.py",7998,"https:\u002F\u002Fgithub.com\u002Fthkennedy\u002Ftk-studio\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbmad-loop-setup\u002Fscripts\u002Fmerge-help-csv.py",[71,78,85,92,99,106],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M79RYSQ8C3MWDFTDSRAYFJYA","tk-studio-track","Tracking verbs on the bound Jira project — `block` moves a story the loop cannot progress, and each dependent story, to \"Blocked - Awaiting User\" with a comment that @mentions the owner (or, with `--engagement`, one engagement's questions issue, which `close` later moves to \"Done\"); `reply` posts the owner's answer (or \"Done.\") with the owner's host-only token and moves the issue to \"Block Resolved\"; `validate` checks that resolution and passes the issue back to work or re-blocks it with a follow-up. Use when the user says \"block this story\", \"tk track block\", \"put it in the owner's inbox\", \"reply to the blocked issue\", \"validate the resolution\", or a supervisor or engagement payload names this skill.","https:\u002F\u002Fgithub.com\u002Fthkennedy\u002Ftk-studio\u002Fblob\u002Fmain\u002Fplugins\u002Ftk-studio\u002Fskills\u002Ftk-studio-track\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M79RYMVE0031EV5B64MBGD8V","tk-studio-session","Session discipline as a surface — land a boundary handoff (optionally carrying knowledge deltas) and end the session, or resume a fresh session from a run workspace alone. Use when the user says \"hand off this run\", \"tk session\", \"resume the run\", or a boundary\u002Fbudget trigger says the session must split.","https:\u002F\u002Fgithub.com\u002Fthkennedy\u002Ftk-studio\u002Fblob\u002Fmain\u002Fplugins\u002Ftk-studio\u002Fskills\u002Ftk-studio-session\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M79RYFM9ATWHM6HAXJ3D19WV","tk-studio-research","Run a chartered research pass — survey the topics a charter scopes, grade every finding by evidence, land the findings in the run workspace, and emit observation events for recommendation-worthy ones. Use when the user says \"run the ecosystem watch\", \"tk research\", or a research job's invoke-skill directive names this skill.","https:\u002F\u002Fgithub.com\u002Fthkennedy\u002Ftk-studio\u002Fblob\u002Fmain\u002Fplugins\u002Ftk-studio\u002Fskills\u002Ftk-studio-research\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M79RYA1AWZZF83KBHGR6JDN3","tk-studio-report","One-verb human defect report — \"the skill did the wrong thing\" — recorded as a report event in the local measurement ledger. Use when the user says \"tk report\", \"report a defect\", \"that skill misbehaved\", or \"log a studio issue\".","https:\u002F\u002Fgithub.com\u002Fthkennedy\u002Ftk-studio\u002Fblob\u002Fmain\u002Fplugins\u002Ftk-studio\u002Fskills\u002Ftk-studio-report\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":19},"01M79RY33VMYR5YNPVFKWRNW9S","tk-studio-playable-judge","The playable-verify leg's screenshot judge (Story 34.3) — reads only a playable run's report.json and its frames, answers the fixed rubric (scene loaded, player visible and framed, no magenta or error overlay, HUD reads, the named moments shown) with pass or fail and findings each naming a frame and a rubric line. Driven headless by the supervisor's host leg on the project's sandbox tier; use when the payload names a playable `media` folder, or the user says \"judge the playable frames\".","https:\u002F\u002Fgithub.com\u002Fthkennedy\u002Ftk-studio\u002Fblob\u002Fmain\u002Fplugins\u002Ftk-studio\u002Fskills\u002Ftk-studio-playable-judge\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":19},"01M79RXY4AM8JM6ZK2MAR3W3X2","tk-studio-plan-sync","Planning adapter — canonicalize BMad-native planning artifacts (normalize pass, sole id authority) and sync them with the bound planning backend. Use when the user says \"sync the plan\", \"normalize planning artifacts\", \"tk plan sync\", or after stock BMad planning flows produce or change epics\u002Fstories.","https:\u002F\u002Fgithub.com\u002Fthkennedy\u002Ftk-studio\u002Fblob\u002Fmain\u002Fplugins\u002Ftk-studio\u002Fskills\u002Ftk-studio-plan-sync\u002FSKILL.md",[],[]]