Files
Daniel Avila 938c6656cf Rename risk-manager to trading-risk-manager, fix naming collision (#765)
* improve: rename risk-manager to trading-risk-manager, add model field

- Resolve name collision with finance/risk-manager.md by renaming this
  trading/portfolio-focused agent to trading-risk-manager (frontmatter
  name + filename), sharpening the description to distinguish it from
  the enterprise ERM-focused finance/risk-manager
- Add required model: sonnet field (was missing, failed component-reviewer
  checklist)
- Add "When Invoked" context-gathering step and Human-in-the-Loop Pause
  Criteria (account size, risk tolerance, leverage/derivatives, full-Kelly
  requests)
- Add financial-advice disclaimer as a required Output element
- Add <example> blocks to description for reliable auto-invocation
- Recommend fractional (half/quarter) Kelly over full Kelly, and add
  tail-risk hedging / leverage-liquidation risk / Sharpe-Sortino-Calmar
  focus areas
- Add "Integration with Other Agents" section

Automated review cycle | Co-Authored-By: Claude Code <noreply@anthropic.com>

* chore: regenerate component catalog for trading-risk-manager rename

Propagates the risk-manager -> trading-risk-manager rename (and the
model/content updates) into the generated catalog artifacts so
browse/search/install no longer reference the deleted
business-marketing/risk-manager.md path. Also removes the now-orphaned
component-content JSON for the deleted path.

Addresses review feedback on PR #765.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-30 10:06:59 -04:00
..

API Directory - Documentation

This directory contains static files for the Claude Code Templates project deployed on Vercel.

📁 Structure Overview

docs/api/
├── README.md     # This file
└── agents.json   # Static JSON file for agent queries

🔍 Why This Structure?

The project uses TWO separate API directories:

1. /api/ (Root) - Serverless Functions

/api/
├── track-download-supabase.js     # Serverless function
└── package.json                   # Dependencies
  • Purpose: Vercel serverless functions (Edge Functions)
  • Auto-detected by Vercel: Functions in /api/ are automatically deployed
  • Runtime: Node.js with ES Modules
  • URL: https://www.aitmpl.com/api/track-download-supabase

2. /docs/api/ - Static Files

/docs/api/
├── README.md      # This documentation
└── agents.json    # Static data file
  • Purpose: Static JSON files served with the frontend
  • Served from: outputDirectory: "docs" in vercel.json
  • URL: https://www.aitmpl.com/api/agents.json

⚠️ Important: Why Two Directories?

Vercel has a specific requirement:

  • Serverless functions MUST be in /api/ at the project root
  • Static files can be in /docs/api/ when using outputDirectory: "docs"

You cannot put serverless functions in /docs/api/ - Vercel will serve them as static HTML files instead of executing them.


📄 Files in This Directory

agents.json (Static File)

  • Type: Static JSON data
  • Purpose: Contains the list of available agents for the frontend
  • Accessed by: Frontend application via fetch
  • URL: https://www.aitmpl.com/api/agents.json
  • Size: ~25KB
  • Updates: Generated by /scripts/generate_components_json.py script

Usage:

fetch('https://www.aitmpl.com/api/agents.json')
  .then(res => res.json())
  .then(data => console.log(data));

Serverless Functions (in /api/)

See /api/README.md for documentation on:

  • track-download-supabase.js - Download tracking endpoint
  • Environment variables required
  • Request/response formats
  • Database schema

📝 Best Practices

  1. Static Files: Keep in /docs/api/
  2. Serverless Functions: Keep in /api/ (root)
  3. Never Mix: Don't put serverless functions in /docs/api/
  4. Version Control: Commit both directories separately

Last Updated: October 22, 2025 Maintained by: Claude Code Templates Team