mirror of
https://github.com/bmadcode/BMAD-METHOD.git
synced 2025-12-29 16:14:59 +00:00
fix: restore agent files accidentally modified in Docusaurus merge (#1191)
* fix: restore agent files accidentally modified in Docusaurus merge Restores 25 agent files to their pre-merge state: - Trigger format with shortcuts (WS, CH, BP, etc.) restored - Fuzzy matching syntax restored - BMB module: restores separate agent-builder, module-builder, workflow-builder agents; removes consolidated bmad-builder Also updates test to match restored trigger format. Note: Schema validation needs update in follow-up commit. * fix: normalize trigger fuzzy match format for schema validation - Add dashes to fuzzy match text to match kebab-case triggers - Add missing 'chat' kebab in CH triggers (CH or chat or fuzzy match on chat) - Relax schema to allow 1-3 char shortcuts and skip shortcut derivation check - Remove compound-wrong-shortcut test fixture (no longer validated) All 24 agent files now pass schema validation.
This commit is contained in:
@@ -4,7 +4,7 @@ const { z } = require('zod');
|
||||
|
||||
const COMMAND_TARGET_KEYS = ['workflow', 'validate-workflow', 'exec', 'action', 'tmpl', 'data'];
|
||||
const TRIGGER_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
||||
const COMPOUND_TRIGGER_PATTERN = /^([A-Z]{1,2}) or ([a-z0-9]+(?:-[a-z0-9]+)*) or fuzzy match on ([a-z0-9]+(?:-[a-z0-9]+)*)$/;
|
||||
const COMPOUND_TRIGGER_PATTERN = /^([A-Z]{1,3}) or ([a-z0-9]+(?:-[a-z0-9]+)*) or fuzzy match on ([a-z0-9]+(?:-[a-z0-9]+)*)$/;
|
||||
|
||||
/**
|
||||
* Derive the expected shortcut from a kebab-case trigger.
|
||||
@@ -43,14 +43,9 @@ function parseCompoundTrigger(triggerValue) {
|
||||
};
|
||||
}
|
||||
|
||||
// Validate shortcut matches derived value
|
||||
const expectedShortcut = deriveShortcutFromKebab(kebabTrigger);
|
||||
if (shortcut !== expectedShortcut) {
|
||||
return {
|
||||
valid: false,
|
||||
error: `shortcut "${shortcut}" does not match expected "${expectedShortcut}" for "${kebabTrigger}"`,
|
||||
};
|
||||
}
|
||||
// Note: We intentionally don't validate that shortcut matches derived value
|
||||
// because shortcuts are often semantic (e.g., PS="party start", UX="user experience")
|
||||
// rather than derived from kebab-case (PM, UD)
|
||||
|
||||
return { valid: true, kebabTrigger };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user