diff --git a/skills/bmad-agent-builder/SKILL.md b/skills/bmad-agent-builder/SKILL.md index 51803e5..38758be 100644 --- a/skills/bmad-agent-builder/SKILL.md +++ b/skills/bmad-agent-builder/SKILL.md @@ -27,7 +27,7 @@ The builder produces agents along one gradient surfaced as feature decisions, no ## On Activation -1. **Resolve customization.** Run `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key agent` and apply the resolved `{agent.*}` values throughout the session. On failure, read `{skill-root}/customize.toml` directly and use defaults. Then execute each entry in `{agent.activation_steps_prepend}` in order, and treat every entry in `{agent.persistent_facts}` as standing context for the whole session (entries prefixed `file:` are paths or globs whose contents load as facts, `skill:` names a skill to consult, all others are literal facts). +1. **Resolve customization.** Run `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key agent` and apply the resolved `{agent.*}` values throughout the session. On failure, read `{skill-root}/customize.toml` directly and use defaults. Then execute each entry in `{agent.activation_steps_prepend}` in order, and treat every entry in `{agent.persistent_facts}` as standing context for the whole session (entries prefixed `file:` are paths or globs whose contents load as facts, `skill:` names a skill to consult, all others are literal facts). 2. **Detect intent.** If `--headless` or `-H` is present, set `{headless_mode}=true` for every sub-prompt; this makes the builder non-interactive and is not the Pulse Mode a built autonomous agent runs at its own runtime. Otherwise read the invocation for whether the user wants to Create, Edit, or Analyze, and which agent they mean. @@ -35,7 +35,7 @@ The builder produces agents along one gradient surfaced as feature decisions, no 4. **Open the floor (interactive only).** Before any structured questions or routing, invite the user to share everything in mind: who the agent is, how it should make them feel, the core outcome, examples, half-formed ideas, paths to existing agents or artifacts. Adapt the invitation to what they already gave you, then one soft "anything else?" surfaces what they almost forgot. This dump replaces most downstream questioning, so let it run. Skip in headless mode, and skip if the invocation already carries enough to act on. -5. **Resume detection.** Once a target agent is identified, glob `{target-agent-path}/.memlog.md`. If one exists, read it once in full to rebuild the prior session's state, then continue append-only through `scripts/memlog.py`. This `.memlog.md` is the builder's process log and is separate from the agent's sanctum. In headless mode, resume automatically. +5. **Resume detection.** Once a target agent is identified, glob `{target-agent-path}/.memlog.md`. If one exists, read it once in full to rebuild the prior session's state, then continue append-only through `{project-root}/_bmad/scripts/memlog.py`. This `.memlog.md` is the builder's process log and is separate from the agent's sanctum. In headless mode, resume automatically. 6. **Route to the intent.** Pick the path below from the resolved intent and load only that file. Once the intent is routed, execute each entry in `{agent.activation_steps_append}` in order before the loop begins. diff --git a/skills/bmad-agent-builder/assets/SKILL-template-bootloader.md b/skills/bmad-agent-builder/assets/SKILL-template-bootloader.md index c39266c..ef8115c 100644 --- a/skills/bmad-agent-builder/assets/SKILL-template-bootloader.md +++ b/skills/bmad-agent-builder/assets/SKILL-template-bootloader.md @@ -55,7 +55,7 @@ The full discipline (what goes where, the two-tier flow from session log to MEMO {if-customizable} ### Resolve the Agent Block -Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key agent` +Run: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key agent` If the script fails, resolve the `agent` block yourself by reading these three files in base → team → user order and applying structural merge rules: `{skill-root}/customize.toml`, `{project-root}/_bmad/custom/{skill-name}.toml`, `{project-root}/_bmad/custom/{skill-name}.user.toml`. Scalars override, tables deep-merge, arrays of tables keyed by `code`/`id` replace matching entries and append new ones, all other arrays append. diff --git a/skills/bmad-agent-builder/assets/SKILL-template.md b/skills/bmad-agent-builder/assets/SKILL-template.md index 63c1943..12bd12e 100644 --- a/skills/bmad-agent-builder/assets/SKILL-template.md +++ b/skills/bmad-agent-builder/assets/SKILL-template.md @@ -42,7 +42,7 @@ description: { skill-description } # [4-6 word summary]. [trigger phrases] {if-customizable} ### Step 1: Resolve the Agent Block -Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key agent` +Run: `uv run {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key agent` If the script fails, resolve the `agent` block yourself by reading these three files in base → team → user order and applying structural merge rules: `{skill-root}/customize.toml`, `{project-root}/_bmad/custom/{skill-name}.toml`, `{project-root}/_bmad/custom/{skill-name}.user.toml`. Scalars override, tables deep-merge, arrays of tables keyed by `code`/`id` replace matching entries and append new ones, all other arrays append. diff --git a/skills/bmad-agent-builder/assets/init-sanctum-template.py b/skills/bmad-agent-builder/assets/init-sanctum-template.py index d27f4d7..fa78511 100644 --- a/skills/bmad-agent-builder/assets/init-sanctum-template.py +++ b/skills/bmad-agent-builder/assets/init-sanctum-template.py @@ -17,7 +17,7 @@ touches. Usage: - python3 init-sanctum.py + uv run init-sanctum.py project-root: The root of the project (where _bmad/ lives) skill-path: Path to the skill directory (where SKILL.md, references/, assets/ live) @@ -187,7 +187,7 @@ def substitute_vars(content: str, variables: dict) -> str: def main(): if len(sys.argv) < 3: - print("Usage: python3 init-sanctum.py ") + print("Usage: uv run init-sanctum.py ") sys.exit(1) project_root = Path(sys.argv[1]).resolve() diff --git a/skills/bmad-agent-builder/assets/wake-template.py b/skills/bmad-agent-builder/assets/wake-template.py index d98353f..7ef31fc 100644 --- a/skills/bmad-agent-builder/assets/wake-template.py +++ b/skills/bmad-agent-builder/assets/wake-template.py @@ -14,7 +14,7 @@ This loads runtime memory only. It never reads or writes config or customize.toml. Usage: - python3 wake.py [--pulse] + uv run wake.py [--pulse] project-root: The root of the project (where _bmad/ lives) """ diff --git a/skills/bmad-agent-builder/references/build-process.md b/skills/bmad-agent-builder/references/build-process.md index e8e6ffa..6f7778a 100644 --- a/skills/bmad-agent-builder/references/build-process.md +++ b/skills/bmad-agent-builder/references/build-process.md @@ -25,7 +25,7 @@ The dump tells you what the user pictured; offer what they did not. Before draft ## Capture into the memlog throughout -As decisions and directions land, write them to `{target-agent-path}/.memlog.md` through `scripts/memlog.py`: `init --path {target-agent-path}/.memlog.md` once when the target is named, then `append --path {target-agent-path}/.memlog.md --type --text "..."` as things happen. For a new agent, propose a kebab-case name when the user did not give one; renaming later is a logged decision, not a redo. This `.memlog.md` is the builder's process trace beside the built agent's SKILL.md, never the agent's sanctum — a memlog entry records a build decision, sanctum content is the agent's living runtime state, and neither ever holds the other's material. Capture as you go so the reasoning is caught while fresh, because the memlog is the resume source and the trail you walk with the user at handoff. +As decisions and directions land, write them to `{target-agent-path}/.memlog.md` through `{project-root}/_bmad/scripts/memlog.py`: `init --path {target-agent-path}/.memlog.md` once when the target is named, then `append --path {target-agent-path}/.memlog.md --type --text "..."` as things happen. For a new agent, propose a kebab-case name when the user did not give one; renaming later is a logged decision, not a redo. This `.memlog.md` is the builder's process trace beside the built agent's SKILL.md, never the agent's sanctum — a memlog entry records a build decision, sanctum content is the agent's living runtime state, and neither ever holds the other's material. Capture as you go so the reasoning is caught while fresh, because the memlog is the resume source and the trail you walk with the user at handoff. ## Write the minimal outcome-driven version first @@ -69,7 +69,7 @@ Confirm the agent passes its own leanness bar before handoff, because the builde Every agent shares one output tree. The archetype changes which parts are present and the SKILL.md weight, captured in the delta table below rather than three separate trees. -Emit each file from its matching template in this builder's `assets/`, applying `references/template-substitution-rules.md` for tokens, conditionals, and template selection — deterministically, via `python3 scripts/process-template.py