Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

@ammar-agent ammar-agent commented Dec 26, 2025

Summary

This PR improves the agent definitions system by:

  1. Converting built-in agents to markdown files - Built-ins now use the same format as user-defined agents, serving as authentic examples. Files live in src/node/builtinAgents/*.md.

  2. Adding ui.disabled support - Users can now completely hide agents (including built-ins) by creating a file with ui.disabled: true. This is useful for disabling built-in agents without replacing them.

  3. Auto-generating built-in agents in docs - Extended scripts/gen_docs.ts to sync the built-in agents section of docs/agents.mdx from the source markdown files. Single source of truth.

  4. Improved agents documentation - Enhanced docs/agents.mdx with:

    • Quick start guide
    • Complete frontmatter schema reference
    • How to disable built-in agents
    • Example custom agents (Security Audit, Documentation)

Files Changed

  • src/node/builtinAgents/*.md - New built-in agent definitions
  • src/node/services/agentDefinitions/builtInAgentDefinitions.ts - Load from disk
  • src/node/services/agentDefinitions/agentDefinitionsService.ts - Handle disabled filtering
  • src/common/orpc/schemas/agentDefinition.ts - Add disabled to schema
  • scripts/gen_docs.ts - Auto-generate built-in agents section
  • docs/agents.mdx - Improved documentation

Generated with mux • Model: anthropic:claude-opus-4-5 • Thinking: high

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

…tion

- Convert built-in agents to markdown files (src/node/builtinAgents/*.md)
  - exec.md, plan.md, compact.md, explore.md
  - Same format as user-defined agents, serving as examples
- Add `ui.disabled` support for completely hiding agents
  - Useful for disabling built-in agents without replacing them
- Extend gen_docs.ts to auto-generate built-in agents section
  - Syncs docs/agents.mdx from src/node/builtinAgents/*.md
  - Shows each agent in an expandable accordion
- Improve docs/agents.mdx with:
  - Quick start guide
  - Frontmatter schema reference
  - Disabling built-ins documentation
  - Example custom agents (Security Audit, Documentation)

---
_Generated with `mux` • Model: `anthropic:claude-opus-4-5` • Thinking: `high`_
@ammar-agent ammar-agent changed the title 🤖 feat: add custom modes system with .mux/modes/*.md files 🤖 feat: improve agent definitions with markdown files and docs generation Dec 29, 2025
- Add copy step in Makefile to copy src/node/builtinAgents/*.md to dist/builtinAgents/
- Add dist/**/*.md to package.json files array
- Path resolution works in both dev and prod since __dirname + ../../builtinAgents resolves correctly
The API CLI uses ESM (.mjs) where __dirname is not available, and import.meta.url
doesn't work with the main process TypeScript config. Keep built-ins hardcoded
for runtime reliability while maintaining .md files for documentation generation.

- builtInAgentDefinitions.ts: hardcoded agents (ESM + CJS compatible)
- src/node/builtinAgents/*.md: source files for docs generation
- gen_docs.ts: generates docs/agents.mdx from .md files
- dist/builtinAgents/*.md: copied during build (for reference, not runtime)
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