feat: named agents, audit timestamps, --trace logging#32
Conversation
Named agents: - agents/*.md files with model/description/tools in YAML frontmatter - Auto-discovered from .magic-code/agents/ and agents/ - Injected into system prompt so LLM knows available agents - 3 new tests Audit completeness: - Added timestamp to every audit log entry Debug/trace: - --trace flag enables structured tool call logging (input + output + duration) - trace-level logs in tool registry execution 183 tests pass.
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThe changes introduce agent discovery and loading functionality to the CLI with a new Changes
Sequence DiagramsequenceDiagram
participant CLI as CLI
participant Core as mc-core
participant FS as File System
participant Prompt as System Prompt
CLI->>CLI: Parse --trace flag
CLI->>CLI: Configure logging (trace/debug/warn)
CLI->>Core: discover_agents(project.cwd)
Core->>FS: Scan .magic-code/agents/ & agents/
FS-->>Core: Return .md files
Core->>Core: Parse frontmatter & extract AgentDef
Core-->>CLI: Return Vec<AgentDef>
alt Agents found
CLI->>Core: agents_prompt_section(&agents)
Core-->>CLI: Formatted agents markdown
CLI->>Prompt: Append agents section
else No agents
CLI->>Core: agents_prompt_section(&agents)
Core-->>CLI: Empty string
end
CLI->>Prompt: Build system prompt with agents
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Named Agents
Auto-discovered, injected into system prompt.
Audit Completeness
Timestamps added to every audit log entry.
--trace
magic-code --trace 'fix the bug'Shows tool inputs, outputs, and duration at trace level.
183 tests pass (+3 for agents).
Summary by CodeRabbit
Release Notes
--traceCLI flag to enable detailed debug logging of tool executions with timing and output metrics.