Skip to content

itsdanieldk/fsharp-concurrency-review-agents

Repository files navigation

F# Concurrent Runtime Review Agents

A prompt library for performing rigorous concurrency and architecture reviews of F#/.NET runtime projects using an LLM. Four specialized agents run in sequence — Cartographer → Architecture Reviewer → Safety Auditor → Synthesizer — producing a prioritized report with concrete fix recommendations.

What This Is

  • Four agent prompts (agent-1 through agent-4) — system + user templates, model-agnostic
  • Two optional helper agents (agent-5 coverage check, agent-6 v1↔v2 diff)
  • Six Claude Code subagent definitions (agents/) — for interactive use within Claude Code
  • Five Anthropic Agent Skills (skills/) — structured reasoning techniques the agents invoke
  • Automation (scripts/run-pipeline.sh) — runs the full pipeline via the claude CLI
  • JSON schemas (schemas/) — optional structured-output variant for CI/tooling
  • Worked example (examples/toy-runtime/) — sample project and outputs

Installation

One-command install (Claude Code)

./scripts/install.sh

This installs the 5 skills to ~/.claude/skills/ and 6 subagent definitions to ~/.claude/agents/. Restart Claude Code to pick them up.

To install only skills or only agents:

./scripts/install.sh --skills-only
./scripts/install.sh --agents-only

To uninstall:

./scripts/install.sh --uninstall

Manual install

# Skills
mkdir -p ~/.claude/skills
cp -r skills/*/ ~/.claude/skills/

# Agents
mkdir -p ~/.claude/agents
cp agents/*.md ~/.claude/agents/

Validate skill files

./scripts/validate-skills.sh

User Guide

Option A: Interactive agents in Claude Code

After installing, the 6 agents are available as custom subagents within any Claude Code session. Invoke them by asking Claude Code to use the appropriate agent:

"Use the fsharp-cartographer agent to analyze the F# project at ./src and save the architecture summary to ./outputs/v1/architecture_summary.md"

Then chain the subsequent agents:

"Use the fsharp-architecture-reviewer agent with the summary at ./outputs/v1/architecture_summary.md, review the project at ./src, and save to ./outputs/v1/architecture_review.md"

The agents use Read, Glob, and Grep to explore your codebase directly — no need to paste source code.

Option B: Automated pipeline

Run all 4 core agents in sequence with a single command:

./scripts/run-pipeline.sh --source ./my-fsharp-project --output ./outputs/v1

Options:

./scripts/run-pipeline.sh --source ./src --output ./out --model claude-opus-4-6

This requires the claude CLI (Claude Code). Each agent runs as a fresh prompt — no cross-contamination between agents.

Option C: Manual paste (any LLM)

Each agent-N-*.md file contains paste-ready prompts (marked with ✂️ BEGIN/END). Open a new chat session per agent, paste the system + user prompts, and substitute the {{...}} placeholders with your source code and prior outputs.

See orchestration.md for the detailed step-by-step manual flow.

Documentation

File Purpose
orchestration.md Start here. Full pipeline guide with chunking, severity legend, troubleshooting
agent-1-cartographer.md Extracts architecture from raw source
agent-2-architecture-reviewer.md Evaluates module boundaries, cohesion, abstraction leaks
agent-3-safety-auditor.md Hunts concurrency bugs: races, deadlocks, visibility, disposal
agent-4-synthesizer.md Merges prior agents into a prioritized action plan
agent-5-coverage-auditor.md Optional. Flags modules that agents silently skipped
agent-6-iteration-diff.md Optional. Regression report between two pipeline runs
skills/README.md How to install and use the Agent Skills
CHANGELOG.md Version history for prompts and skills

Design Principles

  1. Pure extraction before evaluation — Agent 1 describes, Agent 2+ judge.
  2. Evidence-based findings — every concurrency finding requires a concrete adversarial scenario, not hand-waving.
  3. Fresh context per agent — each agent runs in a new chat session; prompts are model-agnostic.
  4. Progressive disclosure via Skills — techniques stay loaded only when needed (Claude Code).
  5. Iterative improvement — run the pipeline, fix findings, re-run, compare.

License

MIT — see LICENSE.

Packages

 
 
 

Contributors

Languages