Library Agent Documentation Template

This document is optimized for AI-assisted development sessions.

{{PackageName}} Agent Reference

Purpose

This document is optimized for AI-assisted development sessions. It prioritizes fast retrieval of:

  • What {{PackageName}} is responsible for
  • Which APIs to call for specific goals
  • Where source of truth lives
  • What constraints and runtime behaviors matter

Quick Facts

KeyValue
Package{{PackageName}}
Project file{{ProjectFilePath}}
Target frameworks{{TargetFrameworksCsv}}
Primary role{{PrimaryRole}}
Core themes{{CoreThemesCsv}}

Use This Package When

  • {{UseCase1}}
  • {{UseCase2}}
  • {{UseCase3}}
  • {{UseCase4}}
  • {{UseCase5}}

Do Not Assume

  • {{Constraint1}}
  • {{Constraint2}}
  • {{Constraint3}}

High-Value Entry Points

{{EntryPointGroup1Title}}

{{EntryPointGroup2Title}}

{{EntryPointGroup3Title}}

{{EntryPointGroup4Title}}

{{EntryPointGroup5Title}}

{{EntryPointGroup6Title}}

Decision Matrix For Agents

GoalPreferred APINotes
{{Goal1}}{{PreferredApi1}}{{DecisionNote1}}
{{Goal2}}{{PreferredApi2}}{{DecisionNote2}}
{{Goal3}}{{PreferredApi3}}{{DecisionNote3}}
{{Goal4}}{{PreferredApi4}}{{DecisionNote4}}
{{Goal5}}{{PreferredApi5}}{{DecisionNote5}}
{{Goal6}}{{PreferredApi6}}{{DecisionNote6}}
{{Goal7}}{{PreferredApi7}}{{DecisionNote7}}
{{Goal8}}{{PreferredApi8}}{{DecisionNote8}}

Minimal Integration Recipe

Install

dotnet add package {{PackageName}}

Setup in Program.cs

using {{Namespace1}};
using {{Namespace2}};

var builder = WebApplication.CreateBuilder(args);

{{BuilderSetupCode}}

{{ServiceRegistrationCode}}

{{OptionalInitializerOrConfigCode}}

var app = builder.Build();

{{PipelineSetupCode}}

app.Run();

Behavior Notes That Affect Agent Decisions

  • {{BehaviorNote1}}
  • {{BehaviorNote2}}
  • {{BehaviorNote3}}
  • {{BehaviorNote4}}
  • {{BehaviorNote5}}

Source-Accurate Capability Map

{{CapabilityArea1Title}}

  • {{Capability1}}
  • {{Capability2}}
  • {{Capability3}}
  • {{Capability4}}

Files:

{{CapabilityArea2Title}}

  • {{Capability5}}
  • {{Capability6}}
  • {{Capability7}}
  • {{Capability8}}

Files:

{{CapabilityArea3Title}}

  • {{Capability9}}
  • {{Capability10}}
  • {{Capability11}}
  • {{Capability12}}

Files:

{{CapabilityArea4Title}}

  • {{Capability13}}
  • {{Capability14}}
  • {{Capability15}}
  • {{Capability16}}

Files:

{{CapabilityArea5Title}}

  • {{Capability17}}
  • {{Capability18}}
  • {{Capability19}}

Files:

{{CapabilityArea6Title}}

  • {{Capability20}}
  • {{Capability21}}
  • {{Capability22}}

Files:

Dependencies

From {{ProjectFilePath}}:

  • {{Dependency1}}
  • {{Dependency2}}
  • {{Dependency3}}
  • {{Dependency4}}
  • {{Dependency5}}

Template Usage Notes

  1. Keep section order unchanged so agents can parse docs consistently across packages.
  2. Keep statements evidence-based and map each capability to concrete files.
  3. Prefer API names exactly as implemented to improve retrieval quality.
  4. Keep behavior notes focused on constraints that change agent decisions.
  5. Use short, imperative wording in the decision matrix goal column.
  6. Remove unused placeholders before publishing.

Agent Authoring Checklist

  • Scope is explicit: package role and non-goals are clearly separated.
  • Entry points are complete: startup, runtime, domain, data, utility surfaces are covered.
  • Decision matrix is actionable: each goal maps to one preferred API.
  • Integration recipe compiles conceptually for the package type.
  • Behavior notes include environment, lifecycle, and runtime caveats.
  • Capability map links every claim to source files.