-
Notifications
You must be signed in to change notification settings - Fork 37
Create agent tips and tricks documentation #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create agent tips and tricks documentation #9
Conversation
Add comprehensive documentation with 10 advanced patterns for building powerful agents using mdflow. Covers symbol extraction, git integration, conditional prompts, composable agents, multi-file refactoring, pipeline chaining, remote schemas, interactive debugging, and multi-model orchestration.
WalkthroughA new documentation file introduces 10 advanced agent patterns leveraging mdflow system features including symbol extraction, template variables, globs, conditionals, nested imports, line-range targeting, stdin chaining, remote schema integration, interactive sessions, and multi-model orchestration, with usage examples and best practices. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
docs/agent-tips-tricks.md (2)
359-359: Consider rephrasing for a more formal tone.The phrase "enables the agent to explore and fix issues autonomously" could benefit from more formal wording. Consider: "enables the agent to autonomously identify and remediate issues" or "provides the agent with autonomous issue diagnosis and repair capabilities."
This is a minor style improvement based on static analysis feedback.
422-450: Consider adding examples for positional mapping and clarifying system keys.The coding guidelines mention positional mapping (
$1,$2in frontmatter to map arguments to CLI flags), but no tip demonstrates this pattern. Additionally, the documentation could clarify the distinction between system keys (_stdin, env, $1, $2, _cwd) that are consumed by mdflow versus custom template variables (_target, _env, _file, etc.) that are user-defined and passed via CLI flags. Line 387 uses_subcommand: execwithout explanation—is this a system key or a template variable?Consider adding:
- A tip demonstrating positional mapping for CLI argument routing
- A note in the Best Practices section clarifying the system key vs. template variable distinction
- Documentation for
_subcommandif it's a system key, or clarification if it's user-definedThis would help developers understand the full range of mdflow capabilities and write more maintainable agent configurations.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/agent-tips-tricks.md(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.md
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.md: Parse YAML frontmatter in markdown files for agent configuration
Use_prefix for template variables (e.g.,_varname) in frontmatter and body templates
System keys in agent frontmatter (_varname,_stdin,env,$1,$2, etc.) are consumed by md and not passed to the command
All non-system frontmatter keys are passed directly as CLI flags to the specified command
Use LiquidJS template syntax for variable substitution in markdown bodies (variables, conditionals, filters)
Use positional mapping ($1,$2) in frontmatter to map body or positional args to specific CLI flags
Implement imports in markdown files using syntax: basic (@./path.md), globs (@./src/**/*.ts), line ranges (@./file.ts:10-50), symbols (@./file.ts#InterfaceName), commands (!`cmd`), and URLs (@https://example.com/file.md)
Files:
docs/agent-tips-tricks.md
🧠 Learnings (2)
📚 Learning: 2025-12-10T00:48:48.888Z
Learnt from: CR
Repo: johnlindquist/mdflow PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-10T00:48:48.888Z
Learning: Applies to **/*.md : Parse YAML frontmatter in markdown files for agent configuration
Applied to files:
docs/agent-tips-tricks.md
📚 Learning: 2025-12-10T00:48:48.888Z
Learnt from: CR
Repo: johnlindquist/mdflow PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-10T00:48:48.888Z
Learning: Applies to **/*.md : Implement imports in markdown files using syntax: basic (`@./path.md`), globs (`@./src/**/*.ts`), line ranges (`@./file.ts:10-50`), symbols (`@./file.ts#InterfaceName`), commands (`` !`cmd` ``), and URLs (`https://example.com/file.md`)
Applied to files:
docs/agent-tips-tricks.md
🪛 LanguageTool
docs/agent-tips-tricks.md
[style] ~359-~359: Consider using a different verb for a more formal wording.
Context: ...ration enables the agent to explore and fix issues autonomously. Usage: ```bas...
(FIX_RESOLVE)
🔇 Additional comments (2)
docs/agent-tips-tricks.md (2)
422-450: Comprehensive and well-organized documentation.The tips are clearly structured with concrete examples, rationale, and usage patterns. The quick reference table effectively summarizes feature syntax, and the best practices list provides actionable guidance for developers new to advanced mdflow patterns. The progression from simple patterns (Tip 1) to orchestration (Tip 10) naturally builds complexity.
299-299: URL imports with template variable substitution are not supported in mdflow.The syntax
@{{ _api_base }}/openapi.jsonwill not work as intended. The import system expands imports before template variable substitution occurs. The URL pattern matcher expects literal URLs starting withhttps://orhttp://, so@{{ _api_base }}/openapi.jsonwon't be recognized as an import. The template substitution only happens afterward, leaving the unprocessed@https://...in the final prompt rather than fetching it.Use a static URL import instead:
@https://api.example.com/openapi.json, or import a file path that contains the API base URL and reference it through a symbol or file import.Likely an incorrect or invalid review comment.
|
Hey @johnlindquist , hopefully this is an appropriate place to put this. How-to disable mcpServers for the agent's session
---
model: sonnet
strict-mcp-config: true
mcp-config: '{"mcpServers": {}}'
$1: p
---
solve the halting problem! |
|
@cds-amal Thank you!!! |
Add comprehensive documentation with 10 advanced patterns for building powerful agents using mdflow. Covers symbol extraction, git integration, conditional prompts, composable agents, multi-file refactoring, pipeline chaining, remote schemas, interactive debugging, and multi-model orchestration.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.