agentleFS
shyamsridhar123shyamsridhar123/oneshot/.github/copilot-instructions.md

oneshot

Copilot instructions4 starsChanged 10 months agoMITView on GitHub

OneShot is a multi-agent AI platform for professional services, demonstrating coordinated AI agents that mirror a consulting firm's operating model.

  • Reads credentials
  • Installs packages

The file

We split this copilot-instructions.md into the rules it gives an agent

12 rules. About 0 are common, 3 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Async everywhere: Use async/await for all I/O operations (FastAPI, aiosqlite, Azure OpenAI)

    line 59
  2. Very specific:

    Structured outputs: Use llm_service.structured_output() for reliable JSON from GPT

    line 60
  3. Very specific:

    Agent communication: Use AgentContext for passing state between agents, not direct calls

    line 61
  4. Very specific:

    Compound components: Follow patterns in .github/skills/vercel-composition-patterns/AGENTS.md

    line 64
  5. Very specific:

    React 19: Use use() instead of useContext(), ref as regular prop (no forwardRef)

    line 66
  6. Very specific:

    Create backend/app/agents/{name}.py inheriting from Agent

    line 78
  7. Very specific:

    Add prompts to backend/app/agents/prompts.py

    line 82
  8. Distinctive:

    Don't add boolean props to components (use composition/variants)

    line 122
  9. Distinctive:

    Don't call agents directly—go through Orchestrator

    line 123
  10. Very specific:

    Don't use sync database calls (always async with aiosqlite)

    line 124
  11. Very specific:

    Don't hardcode API keys (use .env)

    line 125
  12. Distinctive:

    Don't create production security features (this is a demo/POC)

    line 126

≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

OneShot - AI Coding Agent Instructions

Project Overview

OneShot is a multi-agent AI platform for professional services, demonstrating coordinated AI agents that mirror a consulting firm's operating model.

Architecture (Dual-Stack)

Frontend (Next.js 14)         Backend (Python FastAPI)
     ↓                              ↓
Shadcn/ui + Tailwind          Microsoft Agent Framework
Vercel Agent Skills           7 Specialized Agents
Zustand state                 Azure OpenAI GPT-5.x
     ↓                              ↓
     └──── REST API / WebSocket ────┘
                  ↓
            SQLite (aiosqlite)

Agent Roles

AgentPurposeKey File
OrchestratorTask decomposition, coordinationbackend/app/agents/orchestrator.py
StrategistProposals, engagement scopingbackend/app/agents/strategist.py
ResearcherWeb search, news, company intelbackend/app/agents/researcher.py
AnalystData viz, financial modelingbackend/app/agents/analyst.py
ScribeDocument generation, brandingbackend/app/agents/scribe.py
AdvisorClient comms, exec summariesbackend/app/agents/advisor.py
MemoryKnowledge retrieval, RAGbackend/app/agents/memory.py

Developer Workflows

Running Locally

# Backend (Terminal 1)
cd backend && python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000

# Frontend (Terminal 2)
cd frontend && npm install && npm run dev

Environment Setup

Copy .env.example to .env and configure:

  • AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_KEY, AZURE_OPENAI_DEPLOYMENT
  • DATABASE_URL=sqlite+aiosqlite:///./data/oneshot.db

Docker Alternative

cp .env.example .env && docker-compose up

Code Conventions

Backend (Python)

  • Agent pattern: Inherit from Agent base class in backend/app/agents/base.py
  • Async everywhere: Use async/await for all I/O operations (FastAPI, aiosqlite, Azure OpenAI)
  • Structured outputs: Use llm_service.structured_output() for reliable JSON from GPT
  • Agent communication: Use AgentContext for passing state between agents, not direct calls

Frontend (React/Next.js)

  • Compound components: Follow patterns in .github/skills/vercel-composition-patterns/AGENTS.md
  • State: Zustand for global state, lift component state into Providers
  • React 19: Use use() instead of useContext(), ref as regular prop (no forwardRef)
  • Components: Shadcn/ui in frontend/components/ui/, compose explicit variants (no boolean prop sprawl)
  • Agent Skills: Integrate via @vercel-labs/agent-skills in frontend/lib/agentSkills.ts

Database

  • SQLite with SQLAlchemy 2.x + aiosqlite for async access
  • Models in backend/app/models/database.py
  • Key tables: conversations, messages, agent_traces, documents, knowledge_items, engagements

Key Patterns

Adding a New Agent

  1. Create backend/app/agents/{name}.py inheriting from Agent
  2. Define name, description, capabilities
  3. Implement async def process(self, ctx: AgentContext, message: Message)
  4. Register in agent registry used by Orchestrator
  5. Add prompts to backend/app/agents/prompts.py

Real-time Agent Updates

WebSocket at /ws/agents/{conversation_id} streams events:

  • agent.started, agent.thinking, agent.completed, agent.handoff
  • stream.token for streaming LLM responses
  • document.generated when Scribe produces output

Knowledge/RAG Flow

  1. User query → Orchestrator dispatches to Memory Agent
  2. Memory Agent embeds query via llm_service.embed()
  3. Semantic search over knowledge_items table
  4. Results passed via AgentContext to other agents

Important Files

PathPurpose
docs/PRD.mdProduct requirements, demo scenarios
docs/TRD.mdFull technical architecture, API specs
backend/app/main.pyFastAPI entry point
backend/app/services/llm_service.pyAzure OpenAI wrapper
frontend/app/page.tsxMain chat page
frontend/lib/store.tsZustand state management
frontend/lib/websocket.tsWebSocket handler for agent updates

Testing

# Backend
cd backend && pytest

# Frontend
cd frontend && npm test

Demo validation: proposals < 5 min, research accuracy > 95%, real-time agent status streaming.

What NOT to Do

  • Don't add boolean props to components (use composition/variants)
  • Don't call agents directly—go through Orchestrator
  • Don't use sync database calls (always async with aiosqlite)
  • Don't hardcode API keys (use .env)
  • Don't create production security features (this is a demo/POC)

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.