fix(generator): Handle object types in qualityStandards section - #28
Conversation
The agent-transformer.js was treating qualityStandards.codeQuality, qualityStandards.testing, and qualityStandards.performance as simple string arrays. However, the YAML schema allows these to be arrays of objects with properties like name, description, enforcement, target, and minimum. When the generator encountered these objects, it would interpolate them as strings, resulting in '[object Object]' appearing in the generated markdown. Changes: - Handle codeQuality items as objects with name, description, enforcement - Handle testing as either array or object format with nested properties - Add support for performance metrics with name, target, and description - Maintain backward compatibility with simple string arrays Affected agents: - product-management-orchestrator - code-reviewer - tech-lead-orchestrator - and 9 other agents with qualityStandards
Code Review for PR #28SummaryThis PR successfully fixes a critical bug where ✅ Strengths
|
The command-transformer.js was treating step.mcp_tool as an implicit field that was ignored during markdown generation. However, the YAML allows mcp_tool objects with properties like name, usage, and fallback. When the generator encountered these objects, they were not rendered at all in the generated markdown, losing important MCP tool configuration information. Changes: - Handle mcp_tool as an object with name, usage, and fallback properties - Maintain backward compatibility with string-only mcp_tool values - Format usage as multi-line content, fallback as inline description - Similar pattern to delegation object handling Affected commands: - create-trd (3 MCP tool steps now properly documented) This follows the same pattern as PR #28 which fixed object rendering in the agent-transformer.js for qualityStandards sections.
Version bump for generator fixes. Changes included: - fix(generator): Handle object types in qualityStandards section (PR #28) - fix(generator): Handle mcp_tool objects in command transformer (PR #29) Affected packages: - ensemble-plugins: 5.0.0 -> 5.2.3 - @fortium/ensemble-core: 5.2.1 -> 5.2.3 - @fortium/ensemble-development: 5.2.1 -> 5.2.3 - @fortium/ensemble-quality: 5.2.1 -> 5.2.3 - @fortium/ensemble-infrastructure: 5.2.1 -> 5.2.3 - @fortium/ensemble-product: 5.2.1 -> 5.2.3 - @fortium/ensemble-full: 5.2.2 -> 5.2.3
…ect-rendering fix(generator): Handle object types in qualityStandards section
The command-transformer.js was treating step.mcp_tool as an implicit field that was ignored during markdown generation. However, the YAML allows mcp_tool objects with properties like name, usage, and fallback. When the generator encountered these objects, they were not rendered at all in the generated markdown, losing important MCP tool configuration information. Changes: - Handle mcp_tool as an object with name, usage, and fallback properties - Maintain backward compatibility with string-only mcp_tool values - Format usage as multi-line content, fallback as inline description - Similar pattern to delegation object handling Affected commands: - create-trd (3 MCP tool steps now properly documented) This follows the same pattern as PR #28 which fixed object rendering in the agent-transformer.js for qualityStandards sections.
Version bump for generator fixes. Changes included: - fix(generator): Handle object types in qualityStandards section (PR #28) - fix(generator): Handle mcp_tool objects in command transformer (PR #29) Affected packages: - ensemble-plugins: 5.0.0 -> 5.2.3 - @fortium/ensemble-core: 5.2.1 -> 5.2.3 - @fortium/ensemble-development: 5.2.1 -> 5.2.3 - @fortium/ensemble-quality: 5.2.1 -> 5.2.3 - @fortium/ensemble-infrastructure: 5.2.1 -> 5.2.3 - @fortium/ensemble-product: 5.2.1 -> 5.2.3 - @fortium/ensemble-full: 5.2.2 -> 5.2.3
Summary
Fixed a bug where the
qualityStandardssection in agent YAML files was rendering as[object Object]in generated markdown.What was broken
The
agent-transformer.jswas treatingqualityStandards.codeQuality,qualityStandards.testing, andqualityStandards.performanceas simple string arrays. However, the YAML schema allows these to be arrays of objects with properties like:namedescriptionenforcement(required/recommended)targetminimumBefore (broken):
Why it was broken
When the generator encountered these objects, it interpolated them as strings using template literals:
JavaScript converts objects to
[object Object]when coerced to strings.How it was fixed
Updated the transformer to:
name,description,enforcement,target, andminimumpropertiestestingsectionperformancesectionAfter (fixed):
Affected agents
12 agents with
qualityStandardssections:Testing
npm run generatecompletes successfully