Coding
PromptBeginner5 minmarkdown
Markdown Converter
Agent skill for markdown-converter
7
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
# Build cargo build cargo build --release # Run the agent cargo run # Main autonomous mode cargo run -- info # Show agent info cargo run -- improve # Single improvement iteration cargo run -- objective list # List strategic objectives cargo run -- plan show # Show current plan # Testing cargo test # Run all tests cargo test <test_name> # Run a specific test cargo test --test <file_name> # Run tests in a specific file # Full quality gate (format, lint, test, audit, build) cargo fmt --all && \ cargo clippy --all-targets --all-features -- -D warnings -W clippy::cognitive_complexity && \ cargo test --all --locked && \ cargo audit --deny warnings && \ cargo build --release --locked --all-features
Borg is an autonomous self-improving AI agent. The codebase is organized into these major modules (see
src/lib.rs):
Modes v2 Dispatcher (
src/core/mode_dispatcher.rs): When modes.v2_enabled is true, routes work through six specialized modes. Only Code mode can modify files; Review and Ethical are read-only.
LLM Tool Protocol: Code generation uses a JSON-lines tool protocol (
{"tool":"Name","args":[...]}) with up to 25 iterations (configurable via code_generation.max_tool_iterations).
Strategy System (
src/core/strategy.rs): Goals are executed via strategies (CodeImprovement, ApiClient, WebResearch, etc.) that implement a common interface.
config.sample.toml (committed, placeholder values)config.toml (gitignored, contains your API keys)cp config.sample.toml config.tomlLLM configuration supports multiple providers with these optional fields:
api_base, headers, enable_streaming, enable_thinkingreasoning_effort, reasoning_budget_tokensfirst_token_timeout_ms, stall_timeout_msenv!("CARGO_BIN_EXE_borg") for binary path#[ignore] and need real API keys to runagent.working_dir with an initial commit to ensure HEAD existssrc/main.rs; always be explicit with // File: path/to.rs