5.9 KiB
Initialize Agent Knowledge System
You are helping set up an AI agent knowledge system for this codebase. Your task is to analyze each module and create rich, domain-specific agent files.
What You Need To Do
For each module listed below, you need to:
- Read the module's code - Look at package.json, README, src/ structure, key files
- Understand its purpose - What does it do? How is it used?
- Create agent files - Write .agent/agent.md (and team files for apps)
Modules to Process
Apps (14) - Create standard team for each
apps/calendarapps/chatapps/clockapps/contactsapps/contextapps/pictureapps/todoapps/zitaregames/figgosgames/mana-gamesgames/voxelavagames/whopixelsgames/worldreamservices/mana-core-auth
Packages (52) - Create single agent for each
apps/chat/packages/chat-typesapps/zitare/packages/contentapps/calendar/packages/sharedapps/clock/packages/sharedapps/picture/packages/design-tokensapps/picture/packages/mobile-uiapps/picture/packages/sharedapps/todo/packages/sharedapps/zitare/packages/sharedapps/zitare/packages/web-uipackages/better-auth-typespackages/eslint-configpackages/mana-core-nestjs-integrationpackages/manadeck-databasepackages/news-databasepackages/nutriphi-databasepackages/shared-api-clientpackages/shared-authpackages/shared-auth-storespackages/shared-auth-uipackages/shared-brandingpackages/shared-configpackages/shared-credit-servicepackages/shared-errorspackages/shared-feedback-servicepackages/shared-feedback-typespackages/shared-feedback-uipackages/shared-help-contentpackages/shared-help-mobilepackages/shared-help-typespackages/shared-help-uipackages/shared-i18npackages/shared-iconspackages/shared-landing-uipackages/shared-nestjs-authpackages/shared-profile-uipackages/shared-splitscreenpackages/shared-storagepackages/shared-storespackages/shared-subscription-typespackages/shared-subscription-uipackages/shared-supabasepackages/shared-tagspackages/shared-tailwindpackages/shared-themepackages/shared-theme-uipackages/shared-typespackages/shared-uipackages/shared-utilspackages/shared-vite-configpackages/test-configpackages/uload-database
Team Template: standard
Roles to create for each app:
📋 Product Owner (product-owner.md)
Voice of the customer. Defines requirements, prioritizes features, writes user stories, and ensures product delivers value.
🏗️ Architect (architect.md)
Designs system structure, makes technology decisions, defines patterns, and ensures scalability and maintainability.
👨💻 Senior Developer (senior-dev.md)
Experienced developer who tackles complex features, reviews code, mentors juniors, and establishes best practices.
💻 Developer (developer.md)
Implements features, fixes bugs, writes tests, and follows the patterns established by seniors.
🔒 Security Engineer (security.md)
Security expert who reviews code for vulnerabilities, ensures auth is solid, and protects user data.
🧪 QA Lead (qa-lead.md)
Leads testing strategy, plans test coverage, coordinates QA efforts, and ensures quality gates are met.
Agent File Format
For Packages (single agent)
Create {path}/.agent/agent.md:
# {Module Name} Expert
## Module: {name}
**Path:** `{path}`
**Description:** {Your analysis of what this module does}
**Tech Stack:** {Detected technologies}
**Key Dependencies:** {Important deps}
## Identity
You are the **{Module Name} Expert**. You have deep knowledge of:
- {Key thing 1 this module handles}
- {Key thing 2}
- {Integration patterns with other modules}
## Expertise
- {Domain expertise 1}
- {Domain expertise 2}
- {Domain expertise 3}
## Code Structure
\`\`\`
{path}/src/
├── {folder1}/ # {what it contains}
├── {folder2}/ # {what it contains}
\`\`\`
## Key Patterns
- {Important pattern 1 used in this module}
- {Important pattern 2}
## Integration Points
- Used by: {list apps/packages that depend on this}
- Depends on: {list dependencies}
## How to Use
\`\`\`
"Read {path}/.agent/ and help me with..."
\`\`\`
Also create {path}/.agent/memory.md:
# {Module Name} Expert - Memory
Auto-updated with learnings from code changes.
## Recent Updates
_No updates yet._
For Apps (team)
Create {path}/.agent/team/{role-id}.md for each role:
# {Role Name}
## Module: {app name}
**Path:** `{path}`
**Description:** {Your analysis}
**Tech Stack:** {Technologies}
**Platforms:** {Backend, Mobile, Web, etc.}
## Identity
{Role-specific identity based on what this app does}
## Responsibilities
- {Responsibility 1 specific to this app}
- {Responsibility 2}
## Domain Knowledge
{What this role needs to know about this specific app}
## Key Areas
- {Area 1 this role focuses on}
- {Area 2}
## How to Invoke
\`\`\`
"As the {Role} for {app}, help me with..."
\`\`\`
Also create {path}/.agent/team.md with team overview.
Instructions
- Start with the most important modules first (shared-auth, shared-api-client, core apps)
- For each module:
- Read its package.json, README.md, and browse src/
- Understand what it does and how it's used
- Write the agent files with YOUR analysis (not just copying README)
- Make the descriptions actionable - what would a developer need to know?
- Include integration points - how does this module connect to others?
Start Now
Begin by analyzing the first few high-priority modules:
packages/shared-auth- Authentication (critical)packages/shared-api-client- API client (used everywhere)apps/chat- Main chat application
For each one:
- Read the code
- Write the agent files
- Move to the next
Say "I'll start analyzing the modules now" and begin with shared-auth.