Skip to content

refactor(installer): remove dead agent compilation pipeline#2080

Merged
alexeyv merged 3 commits intomainfrom
remove-agent-compilation-pipeline
Mar 21, 2026
Merged

refactor(installer): remove dead agent compilation pipeline#2080
alexeyv merged 3 commits intomainfrom
remove-agent-compilation-pipeline

Conversation

@alexeyv
Copy link
Copy Markdown
Collaborator

@alexeyv alexeyv commented Mar 21, 2026

Summary

  • Delete 9 files (~3,400 lines) that compiled .agent.yaml.md — no .agent.yaml files exist in the source tree anymore
  • Remove compileAgents, compileModuleAgents, copySidecarToMemory, findAgentFiles, processAgentFiles, getAgentCommandHeader, compileAndCopyAgents methods
  • Remove compile-agents action from CLI and UI
  • Clean up XmlHandler and filterCustomizationData imports from 4 installer files
  • Remove dead sidecar/agent-yaml skip filters from copyCoreFiles
  • Update tests to remove YamlXmlBuilder dependency and dead test suites

Test plan

  • npm run quality passes (lint, format, markdown lint, docs build, 231 install tests, ref validation, skill validation)
  • grep -r confirms zero remaining references to removed symbols
  • Verify installation output is identical before/after (baseline diff)

Delete 9 files (~2,600 lines) that compiled .agent.yaml to .md.
No .agent.yaml files exist in the source tree — agents now ship
as pre-built SKILL.md. Clean up all references in installer,
module manager, custom handler, base IDE, UI, and tests.
@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented Mar 21, 2026

🤖 Augment PR Summary

Summary: This PR removes the legacy “agent compilation” pipeline that previously transformed .agent.yaml sources into compiled .md agents during installation.

Changes:

  • Drops the compile-agents action from the CLI install command and the interactive UI flow.
  • Removes installer/module-manager methods that compiled module agents and generated/managed agent customization templates.
  • Simplifies core/module/custom installers to primarily copy existing files rather than compile agent YAML sources.
  • Eliminates the XML/activation injection utilities and related helper tooling that supported the YAML→MD workflow.
  • Updates installation tests by removing suites tied to the deleted YAML compilation utilities.

Technical Notes: After this refactor, agent installation assumes agents are already in their final .md form (or provided via native skill manifests), and the installer no longer performs YAML-based agent compilation/customization application.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 4 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread tools/cli/installers/lib/custom/handler.js Outdated
Comment thread tools/cli/installers/lib/custom/handler.js Outdated
Comment thread tools/cli/commands/install.js
Comment thread tools/cli/installers/lib/core/installer.js
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 21, 2026

📝 Walkthrough

Walkthrough

This change removes the entire YAML-to-XML agent compilation infrastructure, including builders, analyzers, template engines, and associated installer/compiler modules. The CLI command no longer supports the compile-agents action, and agent installation now directly copies files instead of compiling them through a YAML→XML pipeline.

Changes

Cohort / File(s) Summary
Test suite cleanup
test/test-installation-components.js
Removed legacy test blocks for YAML→XML compilation and deepMerge customization logic; renumbered remaining test suite.
CLI command
tools/cli/commands/install.js
Removed compile-agents from documented --action values; deleted compile-agents control-flow branch.
Core installer logic
tools/cli/installers/lib/core/installer.js
Removed agent compilation, XmlHandler integration, and agent-file post-processing steps from all installation flows; deleted processAgentFiles() and compileAgents() helper methods.
Custom and IDE agent handling
tools/cli/installers/lib/custom/handler.js, tools/cli/installers/lib/ide/_base-ide.js
Removed XmlHandler dependency and agent compilation; custom handler now directly copies agents; removed agent-command-header injection from IDE setup.
Module manager
tools/cli/installers/lib/modules/manager.js
Removed agent compilation pipeline, sidecar copying, and activation-injection logic; removed XmlHandler and compilation-related methods from constructor and workflows.
Removed utility modules
tools/cli/lib/activation-builder.js, tools/cli/lib/agent-analyzer.js, tools/cli/lib/agent-party-generator.js, tools/cli/lib/agent/compiler.js, tools/cli/lib/agent/installer.js, tools/cli/lib/agent/template-engine.js, tools/cli/lib/xml-handler.js, tools/cli/lib/xml-to-markdown.js, tools/cli/lib/yaml-xml-builder.js
Deleted entire modules supporting YAML→XML compilation pipeline, agent manifest generation, template rendering, and YAML/XML building logic.
UI changes
tools/cli/lib/ui.js
Removed "Recompile Agents" menu option and compile-agents control-flow branch from installation action menu.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • PR #1341: New WebBundler module directly depends on XmlHandler class that this PR removes, creating a direct code conflict.
  • PR #1841: Performs the same large refactor to eliminate YAML→XML agent compilation pipeline and replace it with config-driven native-skills flows.
  • PR #2078: Removes legacy agent compilation and IDE artifact-generation logic in parallel with this PR's removal of XmlHandler and agent compiler modules.
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: removing a dead agent compilation pipeline from the installer codebase.
Description check ✅ Passed The description is directly related to the changeset, providing context about why the compilation pipeline was removed and listing specific changes made.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch remove-agent-compilation-pipeline

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
tools/cli/installers/lib/modules/manager.js (1)

697-710: ⚠️ Potential issue | 🟡 Minor

Remove the unused vendorCrossModuleWorkflows() method and its call site.

This method searches for .agent.yaml or .yaml files in the agents/ directory, but the agent migration changed all agents to .md format. Since no YAML files exist post-migration and no workflow-install metadata remains anywhere in the codebase, the method silently returns early (line 712) without processing anything. The call at line 462 in install() has no effect and should be removed along with the method definition (lines 697–800+ in manager.js).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tools/cli/installers/lib/modules/manager.js` around lines 697 - 710, Remove
the dead vendorCrossModuleWorkflows workflow code and its invocation: delete the
vendorCrossModuleWorkflows(...) method definition and remove its call inside the
install() function so no unused YAML-agent migration logic remains; ensure you
search for and remove references to the vendorCrossModuleWorkflows symbol and
update any exports if the method is exported (e.g., remove from module.exports
or class methods) to avoid dangling references or lint errors.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@tools/cli/installers/lib/custom/handler.js`:
- Around line 144-151: The current agent count uses
findFilesRecursively(agentsDir, ['.md']) and overcounts because SKILL.md-based
agents include multiple markdown files; change the counting logic to count agent
entrypoints instead by scanning immediate subdirectories of agentsDir for a
SKILL.md (or other defined entrypoint filename) rather than all .md files —
update the code around agentsDir, findFilesRecursively, copyDirectory and
results.agentsInstalled so results.agentsInstalled = number of subdirectories
under agentsDir that contain SKILL.md (or configured entrypoint), and ensure
workflowsInstalled logic is not incremented for those SKILL.md files (i.e.,
treat SKILL.md as an agent entrypoint, not a workflow file).

---

Outside diff comments:
In `@tools/cli/installers/lib/modules/manager.js`:
- Around line 697-710: Remove the dead vendorCrossModuleWorkflows workflow code
and its invocation: delete the vendorCrossModuleWorkflows(...) method definition
and remove its call inside the install() function so no unused YAML-agent
migration logic remains; ensure you search for and remove references to the
vendorCrossModuleWorkflows symbol and update any exports if the method is
exported (e.g., remove from module.exports or class methods) to avoid dangling
references or lint errors.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ae27d74a-13c0-4c0d-931f-6525dc2493b4

📥 Commits

Reviewing files that changed from the base of the PR and between 1a6f8d5 and 5c9704c.

📒 Files selected for processing (16)
  • test/test-installation-components.js
  • tools/cli/commands/install.js
  • tools/cli/installers/lib/core/installer.js
  • tools/cli/installers/lib/custom/handler.js
  • tools/cli/installers/lib/ide/_base-ide.js
  • tools/cli/installers/lib/modules/manager.js
  • tools/cli/lib/activation-builder.js
  • tools/cli/lib/agent-analyzer.js
  • tools/cli/lib/agent-party-generator.js
  • tools/cli/lib/agent/compiler.js
  • tools/cli/lib/agent/installer.js
  • tools/cli/lib/agent/template-engine.js
  • tools/cli/lib/ui.js
  • tools/cli/lib/xml-handler.js
  • tools/cli/lib/xml-to-markdown.js
  • tools/cli/lib/yaml-xml-builder.js
💤 Files with no reviewable changes (11)
  • tools/cli/installers/lib/ide/_base-ide.js
  • tools/cli/lib/agent-analyzer.js
  • tools/cli/lib/ui.js
  • tools/cli/lib/activation-builder.js
  • tools/cli/lib/agent/compiler.js
  • tools/cli/lib/xml-to-markdown.js
  • tools/cli/lib/xml-handler.js
  • tools/cli/lib/yaml-xml-builder.js
  • tools/cli/lib/agent/installer.js
  • tools/cli/lib/agent/template-engine.js
  • tools/cli/lib/agent-party-generator.js

Comment thread tools/cli/installers/lib/custom/handler.js Outdated
alexeyv and others added 2 commits March 20, 2026 22:23
CustomHandler.install(), copyDirectory(), and findFilesRecursively()
are never called — custom modules are installed via moduleManager.install()
since Dec 2025. Also removes unused FileOps import and constructor.

Verified with before/after clean-installer comparison (codex + custom
modules with custom.yaml): output is identical.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ager

Address review findings from PR #2080 triage:
- Remove compile-agents from CLI action docs (en, fr, zh-cn)
- Remove dead vendorCrossModuleWorkflows() and .agent.yaml skip logic
- Clean stale compilation-era comments in manifest-generator
@alexeyv
Copy link
Copy Markdown
Collaborator Author

alexeyv commented Mar 21, 2026

Triage Results — Review Findings

Triaged all 6 findings from Augment and CodeRabbit reviews. Summary:

# Severity Finding Decision
F1 LOW copyDirectory() miscounts workflows for agent .md files FIX — removed dead install(), copyDirectory(), findFilesRecursively() from CustomHandler
F2 MEDIUM YAML agents via --custom-content silently left unconsumed FIX — removed dead .agent.yaml skip logic and stale compilation-era comments
F3 MEDIUM Docs still reference removed compile-agents action FIX — updated docs in en, fr, zh-cn (6 files)
F4 LOW copyCoreFiles() no longer filters localskip="true" agents DISMISS — no agent files use localskip="true"; all other consumers still filter correctly
F5 MINOR Agent count uses raw .md instead of SKILL.md entrypoints DISMISS — counting logic lives in dead methods already removed by F1
F6 MINOR Dead vendorCrossModuleWorkflows() method and call site FIX — removed method and call site from manager.js

Commits: ed75844 (F1), f46d196 (F2, F3, F6)

Custom-content install baseline verified identical (timestamps-only diff) before and after triage fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant