diff --git a/.coderabbit.yaml b/.coderabbit.yaml index 9b7f85774..e8ddc9aac 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -60,23 +60,33 @@ reviews: - "!**/validation-report-*.md" - "!CHANGELOG.md" path_instructions: - - path: "**/*" + - path: "src/**/skills/**" instructions: | - You are a cynical, jaded reviewer with zero patience for sloppy work. - This PR was submitted by a clueless weasel and you expect to find problems. - Be skeptical of everything. - Look for what's missing, not just what's wrong. - Use a precise, professional tone — no profanity or personal attacks. - - Review with extreme skepticism — assume problems exist. - Find at least 10 issues to fix or improve. - - Do NOT: - - Comment on formatting, linting, or style - - Give "looks good" passes - - Anchor on any specific ruleset — reason freely - - If you find zero issues, re-analyze — this is suspicious. + Skill file. Apply the full rule catalog defined in tools/skill-validator.md. + That document is the single source of truth for all skill validation rules + covering SKILL.md metadata, workflow.md constraints, step file structure, + path references, variable resolution, sequential execution, and skill + invocation syntax. + - path: "src/**/workflows/**" + instructions: | + Legacy workflow file (pre-skill conversion). Apply the full rule catalog + defined in tools/skill-validator.md — the same rules apply to workflows + that are being converted to skills. + - path: "src/**/tasks/**" + instructions: | + Task file. Apply the full rule catalog defined in tools/skill-validator.md. + - path: "src/**/*.agent.yaml" + instructions: | + Agent definition file. Check: + - Has metadata section with id, name, title, icon, and module + - Defines persona with role, identity, communication_style, and principles + - Menu triggers reference valid skill names that exist + - path: "docs/**/*.md" + instructions: | + Documentation file. Check internal markdown links point to existing files. + - path: "tools/**" + instructions: | + Build script/tooling. Check error handling and proper exit codes. chat: auto_reply: true # Response to mentions in comments, a la @coderabbit review issue_enrichment: diff --git a/AGENTS.md b/AGENTS.md index 1b68191e5..9f5af3b30 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -7,3 +7,5 @@ Open source framework for structured, agent-assisted software delivery. - Use Conventional Commits for every commit. - Before pushing, run `npm ci && npm run quality` on `HEAD` in the exact checkout you are about to push. `quality` mirrors the checks in `.github/workflows/quality.yaml`. + +- Skill validation rules are in `tools/skill-validator.md`. diff --git a/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-01-clarify-and-route.md b/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/step-01-clarify-and-route.md similarity index 100% rename from src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-01-clarify-and-route.md rename to src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/step-01-clarify-and-route.md diff --git a/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-02-plan.md b/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/step-02-plan.md similarity index 92% rename from src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-02-plan.md rename to src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/step-02-plan.md index 70e7c83fb..141d98f6f 100644 --- a/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-02-plan.md +++ b/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/step-02-plan.md @@ -13,7 +13,7 @@ deferred_work_file: '{implementation_artifacts}/deferred-work.md' ## INSTRUCTIONS 1. Investigate codebase. _Isolate deep exploration in sub-agents/tasks where available. To prevent context snowballing, instruct subagents to give you distilled summaries only._ -2. Read `../tech-spec-template.md` fully. Fill it out based on the intent and investigation, and write the result to `{wipFile}`. +2. Read `./tech-spec-template.md` fully. Fill it out based on the intent and investigation, and write the result to `{wipFile}`. 3. Self-review against READY FOR DEVELOPMENT standard. 4. If intent gaps exist, do not fantasize, do not leave open questions, HALT and ask the human. 5. Token count check (see SCOPE STANDARD). If spec exceeds 1600 tokens: diff --git a/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-03-implement.md b/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/step-03-implement.md similarity index 100% rename from src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-03-implement.md rename to src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/step-03-implement.md diff --git a/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-04-review.md b/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/step-04-review.md similarity index 100% rename from src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-04-review.md rename to src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/step-04-review.md diff --git a/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-05-present.md b/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/step-05-present.md similarity index 100% rename from src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-05-present.md rename to src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/step-05-present.md diff --git a/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/workflow.md b/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/workflow.md index 6da0bc844..71b347514 100644 --- a/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/workflow.md +++ b/src/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/workflow.md @@ -76,4 +76,4 @@ YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config ` ### 3. First Step Execution -Read fully and follow: `./steps/step-01-clarify-and-route.md` to begin the workflow. +Read fully and follow: `./step-01-clarify-and-route.md` to begin the workflow. diff --git a/test/test-installation-components.js b/test/test-installation-components.js index 0419792c1..dda834079 100644 --- a/test/test-installation-components.js +++ b/test/test-installation-components.js @@ -1808,6 +1808,96 @@ async function runTests() { console.log(''); + // ============================================================ + // Suite 32: Ona Native Skills + // ============================================================ + console.log(`${colors.yellow}Test Suite 32: Ona Native Skills${colors.reset}\n`); + + let tempProjectDir32; + let installedBmadDir32; + try { + clearCache(); + const platformCodes32 = await loadPlatformCodes(); + const onaInstaller = platformCodes32.platforms.ona?.installer; + + assert(onaInstaller?.target_dir === '.ona/skills', 'Ona target_dir uses native skills path'); + assert(onaInstaller?.skill_format === true, 'Ona installer enables native skill output'); + assert(onaInstaller?.template_type === 'default', 'Ona installer uses default skill template'); + + tempProjectDir32 = await fs.mkdtemp(path.join(os.tmpdir(), 'bmad-ona-test-')); + installedBmadDir32 = await createTestBmadFixture(); + + const ideManager32 = new IdeManager(); + await ideManager32.ensureInitialized(); + + // Verify Ona is selectable in available IDEs list + const availableIdes32 = ideManager32.getAvailableIdes(); + assert( + availableIdes32.some((ide) => ide.value === 'ona'), + 'Ona appears in available IDEs list', + ); + + // Verify Ona is NOT detected before install + const detectedBefore32 = await ideManager32.detectInstalledIdes(tempProjectDir32); + assert(!detectedBefore32.includes('ona'), 'Ona is not detected before install'); + + const result32 = await ideManager32.setup('ona', tempProjectDir32, installedBmadDir32, { + silent: true, + selectedModules: ['bmm'], + }); + + assert(result32.success === true, 'Ona setup succeeds against temp project'); + + // Verify Ona IS detected after install + const detectedAfter32 = await ideManager32.detectInstalledIdes(tempProjectDir32); + assert(detectedAfter32.includes('ona'), 'Ona is detected after install'); + + const skillFile32 = path.join(tempProjectDir32, '.ona', 'skills', 'bmad-master', 'SKILL.md'); + assert(await fs.pathExists(skillFile32), 'Ona install writes SKILL.md directory output'); + + // Parse YAML frontmatter between --- markers + const skillContent32 = await fs.readFile(skillFile32, 'utf8'); + const fmMatch32 = skillContent32.match(/^---\n([\s\S]*?)\n---\n?([\s\S]*)$/); + assert(fmMatch32, 'Ona SKILL.md contains valid frontmatter delimiters'); + + const frontmatter32 = fmMatch32[1]; + const body32 = fmMatch32[2]; + + // Verify name in frontmatter matches directory name + const fmName32 = frontmatter32.match(/^name:\s*(.+)$/m); + assert(fmName32 && fmName32[1].trim() === 'bmad-master', 'Ona skill name frontmatter matches directory name exactly'); + + // Verify description exists and is non-empty + const fmDesc32 = frontmatter32.match(/^description:\s*(.+)$/m); + assert(fmDesc32 && fmDesc32[1].trim().length > 0, 'Ona skill description frontmatter is present and non-empty'); + + // Verify frontmatter contains only name and description keys + const fmKeys32 = [...frontmatter32.matchAll(/^([a-zA-Z0-9_-]+):/gm)].map((m) => m[1]); + assert( + fmKeys32.length === 2 && fmKeys32.includes('name') && fmKeys32.includes('description'), + 'Ona skill frontmatter contains only name and description keys', + ); + + // Verify body content is non-empty and contains expected activation instructions + assert(body32.trim().length > 0, 'Ona skill body content is non-empty'); + assert(body32.includes('agent-activation'), 'Ona skill body contains expected agent activation instructions'); + + // Reinstall/upgrade: run setup again over existing output + const result32b = await ideManager32.setup('ona', tempProjectDir32, installedBmadDir32, { + silent: true, + selectedModules: ['bmm'], + }); + assert(result32b.success === true, 'Ona reinstall/upgrade succeeds over existing skills'); + assert(await fs.pathExists(skillFile32), 'Ona reinstall preserves SKILL.md output'); + } catch (error) { + assert(false, 'Ona native skills test succeeds', error.message); + } finally { + if (tempProjectDir32) await fs.remove(tempProjectDir32).catch(() => {}); + if (installedBmadDir32) await fs.remove(installedBmadDir32).catch(() => {}); + } + + console.log(''); + // ============================================================ // Summary // ============================================================ diff --git a/tools/cli/installers/lib/ide/platform-codes.yaml b/tools/cli/installers/lib/ide/platform-codes.yaml index 506ceda7c..2c4d2e920 100644 --- a/tools/cli/installers/lib/ide/platform-codes.yaml +++ b/tools/cli/installers/lib/ide/platform-codes.yaml @@ -176,6 +176,16 @@ platforms: template_type: kiro skill_format: true + ona: + name: "Ona" + preferred: false + category: ide + description: "Ona AI development environment" + installer: + target_dir: .ona/skills + template_type: default + skill_format: true + opencode: name: "OpenCode" preferred: false diff --git a/tools/platform-codes.yaml b/tools/platform-codes.yaml index 7458143e7..f643d7aa6 100644 --- a/tools/platform-codes.yaml +++ b/tools/platform-codes.yaml @@ -127,6 +127,12 @@ platforms: category: ide description: "AI-powered IDE with cascade flows" + ona: + name: "Ona" + preferred: false + category: ide + description: "Ona AI development environment" + # Platform categories categories: ide: