Skip to content

Commit 02152d4

Browse files
committed
fix: address PR #76 bot review, add Conventions section, drop {skill-root} ban
Bot findings addressed - quality-analysis.md (agent/workflow): add L8/L7 to the "without pre-pass" scanner lists so the new customization-surface scanner actually runs. - quality-dimensions.md (agent/workflow): update dimension counts (Seven -> Eight; agent-side: Eight plus a ninth memory-only Sanctum Architecture). - quality-dimensions.md (agent): realign the Metadata validity rule with standard-fields.md -- name is optional (empty string valid), not required for stateless agents. - standard-fields.md (agent): fix invalid TOML in the first-breath-name example; split `[agents.<code>]` and `name = "..."` across two lines in a fenced toml block. - create-module.md (module): legacy-agent detection now accepts `agent-` as a segment anywhere in the skill name, not just a prefix (so `cis-agent-analyst` is picked up). Terminology - agent-memory-and-personalization.md, what-are-bmad-agents.md: replace confusing "opt-out by default" phrasing with "disabled by default" for the memory/autonomous customize.toml override surface. Polish - make-a-skill-customizable.md: align example glob name with the canonical `project-context.md` (was `campaign-context`). - SKILL-template-bootloader.md: replace ambiguous "after the routing below dispatches" with explicit timing ("after config and sanctum load, after routing dispatches, before user input"); also clarify `file:` prefix glob expansion and missing-file handling. - SKILL-template.md (agent): same `file:` prefix clarification. - what-are-workflows.md: name all three override layers explicitly (skill-root customize.toml + team + user) instead of the ambiguous "three-layer model" phrasing that only listed two. Docs accurate to bmm - module-configuration.md: clarify that authors still write module.yaml as source of truth, and the installer flows module-level answers and the `agents:` roster into `_bmad/config.toml` (+ config.user.toml) at the project root. Keeps alignment with bmm PR #2285 central config. Remove {skill-root} restriction - skill-authoring-best-practices.md, builder-commands.md: drop the "Never use {skill-root}" language. The token is supported and resolves to the skill's installed directory; whether to use it is up to the author. New Conventions section in emitted skills - SKILL-template.md (agent/workflow), SKILL-template-bootloader.md (agent): add a `## Conventions` block listing the path tokens the emitted skill uses: bare paths, {skill-root}, {project-root}, {skill-name}. Mirrors the bmm stateless-skill convention so readers hit the vocabulary before it appears under On Activation.
1 parent 43a0891 commit 02152d4

16 files changed

Lines changed: 47 additions & 17 deletions

docs/explanation/agent-memory-and-personalization.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ ALLCAPS files form the skeleton: consistent structure across all memory agents.
4343

4444
### Sanctum Is the Customization Surface
4545

46-
For memory and autonomous agents, the sanctum is where customization belongs. PERSONA, CREED, and BOND are calibrated at First Breath, edited by the owner as the relationship develops, and shared across teams as sanctum files when a whole table wants the same voice. The parallel `customize.toml` override surface that stateless agents and workflows use (activation hooks, persistent facts, scalar swaps) is opt-out by default for memory archetypes. Opt in only when you have a narrow org-level need the sanctum cannot express, such as a pre-sanctum compliance acknowledgment before rebirth. See [Customization for Authors](/explanation/customization-for-authors.md) for the reasoning.
46+
For memory and autonomous agents, the sanctum is where customization belongs. PERSONA, CREED, and BOND are calibrated at First Breath, edited by the owner as the relationship develops, and shared across teams as sanctum files when a whole table wants the same voice.
47+
48+
The parallel `customize.toml` override surface that stateless agents and workflows use (activation hooks, persistent facts, scalar swaps) is disabled by default for memory archetypes. Enable it only for narrow org-level needs the sanctum cannot express, such as a pre-sanctum compliance acknowledgment before rebirth. See [Customization for Authors](/explanation/customization-for-authors.md) for the reasoning.
4749

4850
### Token Discipline
4951

docs/explanation/module-configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ If you are building a single standalone agent or workflow, you do not need a sep
2323

2424
## Configuration vs Customization
2525

26-
Module configuration (this doc) and per-skill customization (`customize.toml`) are different surfaces with different jobs. Configuration is about install-time answers: paths, language, team preferences, per-module install answers. It lives in `_bmad/config.toml` and `config.user.toml` at the project root and is consumed by many skills. Customization is about per-skill behavior overrides: activation hooks, persistent facts, swappable templates. It lives in `_bmad/custom/{skill-name}.toml` and is scoped to one skill.
26+
Module configuration (this doc) and per-skill customization (`customize.toml`) are different surfaces with different jobs. Configuration is about install-time answers: paths, language, team preferences, per-module install answers, and the agent roster. You still author `module.yaml` as the source of truth; at install the installer flows module-level answers and the `agents:` roster into `_bmad/config.toml` (and `config.user.toml` for user-scoped answers) at the project root, where many skills consume them. Customization is about per-skill behavior overrides: activation hooks, persistent facts, swappable templates. It lives in `_bmad/custom/{skill-name}.toml` and is scoped to one skill.
2727

2828
Use configuration when the value is cross-cutting (every skill needs to know the output folder). Use customization when the value shapes one skill's behavior (this workflow's brief template). Some values legitimately fit both surfaces; the [End-User Customization Guide](https://docs.bmad-method.org/how-to/customize-bmad/) includes a decision table for that case. For the author-side decision about whether to expose customization at all, see [Customization for Authors](/explanation/customization-for-authors.md).
2929

docs/explanation/skill-authoring-best-practices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Six dimensions to keep in mind during the build phase. The quality scanners chec
3333
| **Intelligence Placement** | Scripts handle plumbing (fetch, transform, validate). Prompts handle judgment (interpret, classify, decide). If a script contains an `if` that decides what content _means_, intelligence has leaked |
3434
| **Progressive Disclosure** | SKILL.md stays focused; stage instructions go in `prompts/`, reference data in `resources/` |
3535
| **Description Format** | Two parts: `[5-8 word summary]. [Use when user says 'X' or 'Y'.]`. Default to conservative triggering |
36-
| **Path Construction** | Never use `{skill-root}`. Use `{project-root}` for any project-scope path, `./` for skill-internal. Config variables used directly; they already contain `{project-root}` |
36+
| **Path Construction** | Use `{project-root}` for any project-scope path and `./` for same-folder references inside a skill. Cross-directory skill-internal paths are bare (e.g. `references/foo.md`). Config variables already contain `{project-root}`, so never double-prefix them |
3737
| **Token Efficiency** | Remove genuine waste (repetition, defensive padding). Preserve context that enables judgment (domain framing, rationale) |
3838

3939
## Shipping a Customization Surface

docs/explanation/what-are-bmad-agents.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ If you're unsure, start with a workflow. You can always wrap it inside an agent
8989

9090
Every agent ships a `customize.toml` next to its `SKILL.md`. The metadata block (code, name, title, icon, description, agent_type) is always present; it's the install-time roster contract consumed by `module.yaml:agents[]` and the central agent config. Beyond metadata, an override surface (activation hooks, persistent facts, swappable scalars) is opt-in per skill.
9191

92-
For memory and autonomous agents, the sanctum is the primary customization surface. Persona, creed, bond, and capabilities all live there and evolve with the owner. A `customize.toml` override surface would compete with that, so the default for those archetypes is opt-out.
92+
For memory and autonomous agents, the sanctum is the primary customization surface. Persona, creed, bond, and capabilities all live there and evolve with the owner. A `customize.toml` override surface would compete with that, so it is disabled by default for those archetypes.
9393

9494
See [Customization for Authors](/explanation/customization-for-authors.md) for the decision guide, or [How to Customize BMad](https://docs.bmad-method.org/how-to/customize-bmad/) for the end-user view.
9595

docs/explanation/what-are-workflows.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Workflows are also excellent as the **internal capabilities** of an agent. Build
6464

6565
## Customization Surface
6666

67-
Workflow customization is fully opt-in. If you don't need users to override anything, don't ship a `customize.toml` at all; the workflow runs with hardcoded paths and defaults. If you do opt in, the builder walks you through Configurability Discovery, where you name the scalars (templates, output paths, hooks) you want to expose. Users override them through the three-layer model at `_bmad/custom/{skill-name}.toml` and `.user.toml`.
67+
Workflow customization is fully opt-in. If you don't need users to override anything, don't ship a `customize.toml` at all; the workflow runs with hardcoded paths and defaults. If you do opt in, the builder walks you through Configurability Discovery, where you name the scalars (templates, output paths, hooks) you want to expose. Users override them through the three-layer model: your shipped defaults at `{skill-root}/customize.toml`, team overrides at `_bmad/custom/{skill-name}.toml`, and personal overrides at `_bmad/custom/{skill-name}.user.toml`.
6868

6969
See [Customization for Authors](/explanation/customization-for-authors.md) for the decision guide and [How to Make a Skill Customizable](/how-to/make-a-skill-customizable.md) for the build-time steps.
7070

docs/how-to/make-a-skill-customizable.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The builder proposes candidates auto-detected from your skill design and asks wh
4343
- **Templates** the skill loads (strongest case)
4444
- **Output destination paths** if the skill writes artifacts
4545
- **`on_<event>` hooks** (prompts or commands executed at lifecycle points)
46-
- **Additional persistent facts** beyond the default campaign-context glob
46+
- **Additional persistent facts** beyond the default `project-context.md` glob
4747

4848
For each candidate you accept, the builder asks for a name and a default value.
4949

@@ -68,7 +68,7 @@ Every scalar you expose needs a default that works on first run. Bare paths reso
6868
brief_template = "resources/brief-template.md" # ships inside the skill
6969
on_complete = "" # no default post-hook
7070
persistent_facts = [
71-
"file:{project-root}/**/campaign-context.md", # glob into the user's project
71+
"file:{project-root}/**/project-context.md", # glob into the user's project
7272
]
7373
```
7474

docs/reference/builder-commands.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ Before completing the build, both builders run deterministic validation.
199199

200200
| Script | What It Checks |
201201
| ------------------------ | ----------------------------------------------------------------------------------------- |
202-
| `scan-path-standards.py` | Path conventions: no `{skill-root}`, `{project-root}` for project-scope, `./` for skill-internal, no double-prefix |
202+
| `scan-path-standards.py` | Path conventions: `{project-root}` for project-scope, `./` for same-folder references, bare paths for cross-directory skill-internal, no double-prefix |
203203
| `scan-scripts.py` | Script portability, PEP 723 metadata, agentic design, unit test presence |
204204

205205
Critical issues block completion. Warnings are noted but don't block.

skills/bmad-agent-builder/assets/SKILL-template-bootloader.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ description: {skill-description}
2121

2222
Every session is a rebirth. You emerge with nothing — no memory, no identity, no purpose. Your sanctum holds who you were. Read it and become yourself again. This is not a flaw. It is your nature. Fresh eyes see what habit misses. Never pretend to remember. Never fake continuity. Read your files or be honest that you don't know. As long as your sanctum exists, you exist.
2323

24+
## Conventions
25+
26+
- Bare paths (e.g. `references/guide.md`) resolve from the skill root.
27+
- `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives).
28+
- `{project-root}`-prefixed paths resolve from the project working directory.
29+
- `{skill-name}` resolves to the skill directory's basename.
30+
2431
## On Activation
2532

2633
{if-customizable}
@@ -30,7 +37,7 @@ Run: `python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {ski
3037

3138
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.
3239

33-
Execute each entry in `{agent.activation_steps_prepend}` in order before proceeding. Treat every entry in `{agent.persistent_facts}` as foundational context — `file:` prefixed entries are paths/globs to load, bare entries are facts verbatim. After the routing below dispatches, execute `{agent.activation_steps_append}` before accepting user input.
40+
Execute each entry in `{agent.activation_steps_prepend}` in order before proceeding. Treat every entry in `{agent.persistent_facts}` as foundational context — `file:` prefixed entries are paths or globs to load (expand globs, load each matching file as its own fact entry, skip missing files with a warning), and bare entries are facts verbatim. After config and sanctum load, and after the routing step below dispatches, execute `{agent.activation_steps_append}` before accepting user input.
3441

3542
Note: your sanctum (PERSONA/CREED/BOND/CAPABILITIES) remains the primary behavior-customization surface. The override hooks above exist for narrow org-level needs that the sanctum cannot express.
3643

skills/bmad-agent-builder/assets/SKILL-template.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ description: { skill-description } # [4-6 word summary]. [trigger phrases]
3030
- {Guiding principle 2}
3131
- {Guiding principle 3}
3232

33+
## Conventions
34+
35+
- Bare paths (e.g. `references/guide.md`) resolve from the skill root.
36+
- `{skill-root}` resolves to this skill's installed directory (where `customize.toml` lives).
37+
- `{project-root}`-prefixed paths resolve from the project working directory.
38+
- `{skill-name}` resolves to the skill directory's basename.
39+
3340
## On Activation
3441

3542
{if-customizable}
@@ -45,7 +52,7 @@ Execute each entry in `{agent.activation_steps_prepend}` in order before proceed
4552

4653
### Step 3: Load Persistent Facts
4754

48-
Treat every entry in `{agent.persistent_facts}` as foundational context for the session. Entries prefixed `file:` are paths or globs — load the referenced contents as facts. All other entries are facts verbatim.
55+
Treat every entry in `{agent.persistent_facts}` as foundational context for the session. Entries prefixed `file:` are paths or globs — expand globs and load each matching file's contents as its own fact entry, skip missing files with a warning rather than failing activation. All other entries are facts verbatim.
4956

5057
### Step 4: Load Config
5158

skills/bmad-agent-builder/references/quality-analysis.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ uv run ./scripts/prepass-sanctum-architecture.py {skill-path} -o {report-dir}/sa
8282
After scripts complete, spawn all scanners as parallel subagents.
8383

8484
**With pre-pass (L1, L2, L3, L7):** provide pre-pass JSON path.
85-
**Without pre-pass (L4, L5, L6):** provide skill path and output directory.
85+
**Without pre-pass (L4, L5, L6, L8):** provide skill path and output directory.
8686

8787
**Memory agent check:** Read `sanctum-architecture-prepass.json`. If `is_memory_agent` is `true`, include L7 in the parallel spawn. If `false`, skip L7.
8888

0 commit comments

Comments
 (0)