一键导入
prj-setup
Sets up PR Jangler module in a project. Use when the user requests to 'install prj module', 'configure PR Jangler', or 'setup PR Jangler'.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Sets up PR Jangler module in a project. Use when the user requests to 'install prj module', 'configure PR Jangler', or 'setup PR Jangler'.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
PR Jangler hub. Cron-driven autonomous workflow for triaging, verifying, reviewing, fix-planning, adversarially validating, fix-implementing, deciding, and daily-reporting on a GitHub PR backlog. Use when the user mentions "PR jangler", "pr-jangler", "PR backlog workflow", "PR triage", "autonomous PR review", "fix-plan", "fix-PR", "adversarial validator", "PleaseAdvise", or wants to install, configure, or extend the PR Jangler BMad module. Routes to 12 phase skills, owns the cross-cutting state-file conventions, idempotency rules, GitHub-label vocabulary, and 1Password/SMTP/`gh`/`op` dependency map shared by every phase. Triggers on prj-setup, prj-orchestrator, prj-discover, prj-triage, prj-verify-claim, prj-review, prj-detect-overlap, prj-plan-fix, prj-validate-adversarial, prj-implement-fix, prj-decision, prj-report-daily.
PR Jangler final-call workflow. Use when the orchestrator dispatches the decision phase for a reviewed PR or when the user runs 'prj-decision' to label, comment, and log a ready-to-merge / request-changes / close-as-not-now verdict.
PR Jangler duplicate and overlap detector. Use when the orchestrator dispatches the overlap check after triage marked a PR as possible-duplicate, or when the user runs 'prj-detect-overlap' for manual debug.
PR Jangler GitHub-to-queue sync. Use when the orchestrator dispatches the discovery sweep (on cadence or empty queue) or when the user runs 'prj-discover' for manual debug.
PR Jangler Tier-2 implementer. Use when prj-validate-adversarial passed for a PR and the orchestrator dispatches FixImpl. Pushes a fix branch and opens a fix-PR into the contributor's branch; falls back to a comment if the contributor's branch refuses PRs.
PR Jangler cron heartbeat dispatcher. Use when cron invokes one heartbeat of the PR backlog workflow or when the user runs 'prj-orchestrator' for manual debug.
| name | prj-setup |
| description | Sets up PR Jangler module in a project. Use when the user requests to 'install prj module', 'configure PR Jangler', or 'setup PR Jangler'. |
Installs and configures a BMad module into a project. Module identity (name, code, version) comes from assets/module.yaml. Collects user preferences and writes them to three files:
{project-root}/_bmad/config.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.{project-root}/_bmad/config.user.yaml — personal settings intended to be gitignored: user_name, communication_language, and any module variable marked user_setting: true in assets/module.yaml. These values live exclusively here.{project-root}/_bmad/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.
assets/module.yaml for module metadata and variable definitions (the code field is the module identifier){project-root}/_bmad/config.yaml exists — if a section matching the module's code is already present, inform the user this is an update{project-root}/_bmad/prj/config.yaml and {project-root}/_bmad/core/config.yaml. If either file exists:
{project-root}/_bmad/config.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.{project-root}/_bmad/config.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.If the user provides arguments (e.g. accept all defaults, --headless, 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.
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 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.
Default priority (highest wins): existing new config values > legacy config values > assets/module.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.
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}/_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.
Module config: Read each variable in assets/module.yaml that has a prompt field. Ask using that prompt with its default value (or legacy value if available).
Write a temp JSON file with the collected answers structured as {"core": {...}, "module": {...}} (omit core if it already exists). Then run both scripts — they can run in parallel since they write to different files:
python3 scripts/merge-config.py --config-path "{project-root}/_bmad/config.yaml" --user-config-path "{project-root}/_bmad/config.user.yaml" --module-yaml assets/module.yaml --answers {temp-file} --legacy-dir "{project-root}/_bmad"
python3 scripts/merge-help-csv.py --target "{project-root}/_bmad/module-help.csv" --source assets/module-help.csv --legacy-dir "{project-root}/_bmad" --module-code prj
Both 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, then delete the legacy files after a successful merge. Check legacy_configs_deleted and legacy_csvs_deleted in the output to confirm cleanup.
Run scripts/merge-config.py --help or scripts/merge-help-csv.py --help for full usage.
After 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}/. 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.
After both merge scripts complete successfully, remove the installer's package directories. Skills and agents in these directories are already installed at .claude/skills/ — the {project-root}/_bmad/ directory should only contain config files.
python3 scripts/cleanup-legacy.py --bmad-dir "{project-root}/_bmad" --module-code prj --also-remove _config --skills-dir "{project-root}/.claude/skills"
The script verifies that every skill in the legacy directories exists at .claude/skills/ before removing anything. Directories without skills (like _config/) are removed directly. 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.
Check directories_removed and files_removed_count in the JSON output for the confirmation step. Run scripts/cleanup-legacy.py --help for full usage.
Beyond standard config + help-CSV writes, PR Jangler setup validates its external dependencies and initializes the persistent workflow tree. Run after the config merge succeeds. Each extension is best-effort with clear error surfaces: a failed check is reported but does not abort setup unless explicitly noted.
Check gh, op, and git are on PATH:
python3 scripts/check-deps.py
Reports each tool's presence and version. If gh is present, also checks it's authenticated and warns if the active user does not match prj_bot_user. If op is present, checks the user is signed in. Failures are warnings, not blocking — the user may install/authenticate after setup.
Send a one-time "PR Jangler online" email to prj_email_to using the configured SMTP host + port + 1Password creds. Confirms the daily-report path works before the first cron tick.
python3 scripts/smtp-test.py --config-path "{project-root}/_bmad/config.toml"
Reports send success/failure. SMTP failure is a warning, not blocking — the user may reconfigure and re-test.
The orchestrator's siblings apply labels at runtime; those labels must exist on prj_repo first. Read assets/labels.txt (one label per line, format: name|color|description) and create each label on the target repo:
python3 scripts/create-labels.py --repo "{prj_repo}" --labels assets/labels.txt
Idempotent: existing labels with matching names are skipped, not overwritten. Failure on a single label is logged but does not abort the batch.
Create the _bmad-output/pr-workflow/ skeleton and the empty state.json so the orchestrator's first run does not have to bootstrap:
python3 scripts/init-workflow.py --project-root "{project-root}" --repo "{prj_repo}"
Creates: _bmad-output/pr-workflow/{state.json, prs/, logs/, reports/, worktrees/}. Skips files that already exist.
Read assets/consent-banner.md and print it to the user with a one-line note: "Post this as a pinned issue on {prj_repo} before the bot opens its first fix-PR. Skipping this is fine for a personal test repo but expected for any repo with outside contributors."
Use 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), user settings written to config.user.yaml (user_keys in result), help entries added, fresh install vs update. If legacy files were deleted, mention the migration. If legacy directories were removed, report the count and list (e.g. "Cleaned up 106 installer package files from bmb/, core/, _config/ — skills are installed at .claude/skills/"). Also report:
Then display the module_greeting from assets/module.yaml to the user.
Once 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.