agentleFS
VKirillVKirill/agent-consult/AGENTS.md

agent-consult

AGENTS.md1 starsChanged 5 months agoMITView on GitHub

This repository is indexed by Repowise. Use the MCP tools below for orientation, discovery, and enriched context (documentation, ownership, history, decisions). Always verify against actual source files before making changes — the index may be stale. Last indexed: 2026-06-18 (commit 598d608). Confidence: 100%. ### Architecture This repository implements an autonomous agent orchestration engine: it consumes user prompts and codebase context, processes them through a multi-agent workflow managed by an orchestrator, and produces structured analytical outputs or task executions via LLM…

The file

Files
AGENTS.md

Agent Consult

Build and Test Commands

  • Build project (TypeScript compilation): npm run build
  • Run tests: npm run test (or execute specific test scripts, e.g., node dist/test-local.js)

System Guidelines and GitNexus

Architecture, code navigation, symbol-based impact analysis and MCP servers: see the GitNexus section at the end of this file and the Repowise block below.

<!-- REPOWISE:START — Do not edit below this line. Auto-generated by Repowise. -->

IMPORTANT: Codebase Intelligence Instructions for agent_counsult

This repository is indexed by Repowise. Use the MCP tools below for orientation, discovery, and enriched context (documentation, ownership, history, decisions). Always verify against actual source files before making changes — the index may be stale.

Last indexed: 2026-06-18 (commit 598d608). Confidence: 100%.

Architecture

This repository implements an autonomous agent orchestration engine: it consumes user prompts and codebase context, processes them through a multi-agent workflow managed by an orchestrator, and produces structured analytical outputs or task executions via LLM integration. The system leverages a modular architecture to coordinate specialized agents, manage configuration-driven personalities, and interface with external AI models via OpenRouter. The project is built on a TypeScript-first foundation, utilizing a robust ecosystem for web services, schema validation, and AI integration:

  • Runtime & Language: TypeScript, Node.js. * Orchestration & Logic: Custom orchestrator patterns for managing agent workflows.

Key Modules

ModulePurposeOwner
community-1The external:@modelcontextprotocol/sdk module serves as the primary transport an—
community-0The test module serves as the architecturally central verification and diagnosti—

Entry Points

  • src/index.ts

Tech Stack

Languages: Node.js, TypeScript

Architectural Layers

LayerFilesPurpose
System Integration Testing8A collection of orchestration and security test suites designed to validate syst
MCP Protocol Interface6Core infrastructure for managing Model Context Protocol server connections and e
Project Analysis Utilities4File system and path management tools used for dynamic project analysis and runt
Process Execution Tests3Isolated test utilities focused on spawning and managing child processes for dir
Agent Documentation1Reference documentation outlining the architecture and capabilities of the syste
Project Changelog1Contains the historical record of version updates and feature changes for the pr
Claude AI Guidelines1Provides specific instructions and context for AI-assisted development within th
Community Code Conduct1Defines the expected standards of behavior and interaction for all project contr
Contribution Guidelines1Outlines the processes and requirements for developers wishing to submit code or
German Project Documentation1Provides a localized version of the project overview and setup instructions in G

Guided Tour (6 steps)

  1. Project Overview and Entry Point — README.md
  2. Configuration and Environment — src/config.ts
  3. MCP Protocol Infrastructure — src/openrouter-client.ts
  4. Orchestration and Logic — src/consult-orchestrator.ts
  5. System Integration and Testing — src/test-mcp-direct.ts
  6. Skills and Personality Framework — profiles/personalities/critic.md

Hotspots (High Churn)

FileChurn90d CommitsOwner
src/consult-orchestrator.ts90.9th %ile8VKirill
src/config.ts81.8th %ile5VKirill

Code health

Hotspot health: 1.28/10 (stable) · Average: 3.8/10 · Worst: 1.0/10 (src/consult-orchestrator.ts)

Critical biomarkers

  • src/config.ts — untested hotspot — impact −2.0
  • src/consult-orchestrator.ts — nested complexity (queryLocalCLI) — impact −1.0
  • src/consult-orchestrator.ts — large method (queryLocalCLI) — impact −0.3
  • src/consult-orchestrator.ts — complex method (runConsultation) — impact −0.3
  • src/consult-orchestrator.ts — complex method (queryLocalCLI) — impact −0.3

Repowise MCP Tools

This repo has the Repowise MCP server configured. The tools below answer questions grep/Read cannot. Every response carries an _meta envelope with index_age_days, indexed_commit, and a stale_warning only when the index has actually diverged from HEAD — silence means the index is current.

When to call which tool:

ToolWhat only this tool answers
get_answer(question)Synthesised answer with verified citations and a calibrated retrieval_quality. First call for "how does X work" / "why is Y like this". On low confidence returns best_guesses with one-line justifications instead of an empty answer.
get_context(targets=[...])Triage card for files/modules/symbols — title, summary, signatures, hotspot bit, decision_records titles, and symbol_ids to pipe into get_symbol. Use include=["callers","ownership",...] to widen. NOT for source bytes.
get_symbol("path/to/file.py::Name")Raw source bytes for one indexed symbol with exact line bounds. Cheaper and safer than Read + offset math. Use the symbol_id returned by get_context.
search_codebase(query, kind?)Find pages by concept when you don't know the file. Each result carries search_method (embedding vs bm25 fallback). For exact identifiers use Grep — the tool will hint when it sees one.
get_why(query, targets?)Architectural decision archaeology — why the code is shaped this way. Call before refactors or pattern divergences. Falls back to git archaeology when no ADRs exist for a file.
get_risk(targets, changed_files?)What history says about touching these files: churn, owners, blast radius. Pass changed_files for PR mode → returns a directive (will_break, missing_cochanges, missing_tests).
get_dead_code(...)Tiered unreachable / unused-export / zombie-package findings. Run before a cleanup sprint, not before a targeted fix.
get_overview(repo?)Architecture map for an unfamiliar repo. One-time orientation; skip on subsequent calls in the same session.

Composition tips:

  • get_answer → if confidence is medium/low, follow the best_guesses[0].file or fallback_targets[0] into get_context, then get_symbol for bytes.
  • get_context returns decision_records titles → call get_why(targets=[...]) for the rationale.
  • get_context returns hotspot: true → call get_risk before editing.
  • PR review → get_risk(targets=[...], changed_files=[...]); read the directive block first.

Verify when: _meta.stale_warning is present, or retrieval_quality is partial/weak, or search_method is bm25. Otherwise trust the response and act on it.

Codebase Conventions

Commands:

  • Build: npm run build
  • Test: npm run test
  • Dev: npm run dev
<!-- REPOWISE:END --><!-- gitnexus:start -->

GitNexus

This repo is indexed by GitNexus as agent-consult (MCP: query, context, impact; from a git worktree pass repo: "agent-consult"). Before changing an exported function or type, run impact upstream and keep its callers working. query finds code by concept, context lists a symbol's callers and callees; use grep for literals. Stale index: gitnexus analyze --index-only.

<!-- gitnexus:end -->

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.