AI SummaryComprehensive Copilot instructions for a bidirectional AI canvas application integrating Next.js frontend, LlamaIndex backend, and Google Sheets via Composio. Developers building real-time collaborative AI interfaces with state synchronization will find this immediately actionable.
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to add the "test-jules-hackathon — Copilot Instructions" prompt rules to my project. Repository: https://github.com/pavanreddy21/test-jules-hackathon Please read the repo to find the rules/prompt file, then: 1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type) 2. If there's an existing rules file, merge the new rules in rather than overwriting 3. Confirm what was added
Description
Copilot Instructions for test-jules-hackathon
Architecture Overview
This is a bidirectional AI canvas application with real-time state synchronization between: • Frontend: Next.js 15 + React 19 + CopilotKit (TypeScript) • Backend: LlamaIndex AG-UI agent + FastAPI (Python) • External Integration: Google Sheets via Composio API The architecture uses shared state as ground truth - all changes flow through a centralized state object synchronized between UI and agent.
Composio Tools
Dynamic loading in agent/agent.py via _load_composio_tools(): • Reads COMPOSIO_TOOL_IDS env var (comma-separated slugs) • Requires COMPOSIO_API_KEY and COMPOSIO_USER_ID • Tools are LlamaIndex-compatible via LlamaIndexProvider()
Key Architectural Patterns
⚠️ CRITICAL: As you plan or implement any architectural changes, you MUST update this section to reflect the new reality.
1. State Synchronization via CopilotKit
The entire application state flows through useCoAgent hook in src/app/page.tsx: `typescript const { state, setState } = useCoAgent<AgentState>({ name: "sample_agent", initialState, }); ` Critical Rule: Never manipulate state directly. Always use setState or exposed Copilot actions. The LlamaIndex agent receives this state on every turn and can call frontend actions to mutate it.
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster
Works With
Any AI assistant that accepts custom rules or system prompts