Phase 0: Foundation & Cursor Rules Setup - Complete This commit establishes the foundation for a comprehensive documentation and project management system for Tendril, following best practices from the COMPLETE-SYSTEM-REPLICATION-GUIDE.md. ## What Was Created ### 1. Cursor Rules System (.cursorrules) - Comprehensive rules for AI agent behavior in Cursor IDE - Phase documentation synchronization rules (auto-update changelog, tasks, decisions) - KB (Knowledge Base) ingestion and routing rules - Gitea Actions workflow maintenance rules - README maintenance rules - File deletion protection rules - Customized for Tendril project with Gitea platform ### 2. Directory Structure - tendril/phases/ - Phase-based project management structure - kb/ - Knowledge Base system with 8 categories: * 01_projects/tendril/ - Project-specific notes * 02_systems/ - Infrastructure/tooling * 03_research/ - Informal research * 04_design/ - Product specs/UX * 05_decisions/ - Project-level ADRs * 06_glossary/ - Terms/acronyms * 07_playbooks/ - How-to guides * 08_archive/ - Superseded content * Special directories: _guides/, _templates/, _inbox/, _review_queue/, scripts/ - .github/workflows/ - Gitea Actions workflows (compatible with GitHub Actions) - docs/PROMPTS/ - LLM usage guides ### 3. Agent Guidelines (docs/AGENT-GUIDELINES.md) - Comprehensive guide for AI agents working on Tendril - Documents project structure, workflows, and conventions - Mandatory workflows and critical rules - Project-specific context (Rust/WASM, Zed extension) - Links to all documentation systems ### 4. Gitea Documentation (docs/GITEA/) Complete documentation suite for working with Gitea: - README.md - Overview and quick reference - Gitea-Basics.md - Core concepts, features, differences from GitHub - Gitea-Actions-Guide.md - CI/CD guide with compatibility notes - Gitea-Workflows.md - Common workflows and best practices - Gitea-API-Reference.md - API differences and usage - LLM-Gitea-Guidelines.md - LLM-specific guidelines and terminology ### 5. Phase Updates Documentation (docs/PHASE-UPDATES/) - COMPLETE-SYSTEM-REPLICATION-GUIDE.md - Complete replication guide - PHASE-0-GITEA-UPDATES.md - Documents Gitea-specific updates - README.md - Directory overview and navigation ## Why This Was Done 1. **Establish AI-Friendly Documentation System** - Enables consistent AI agent behavior across the project - Provides clear guidelines for documentation maintenance - Ensures automated synchronization of related documents 2. **Platform-Specific Adaptation (Gitea)** - Tendril uses self-hosted Gitea, not GitHub - Gitea Actions is compatible with GitHub Actions but needs proper documentation - Ensures all references use correct terminology (Gitea vs GitHub) 3. **Foundation for Phase-Based Management** - Sets up structure for phase documentation system - Prepares for KB system implementation - Establishes automation workflows foundation 4. **Knowledge Management** - KB system structure ready for capturing project knowledge - Templates and guides prepared for future use - Index generation system prepared ## How It Benefits the Project ### 1. Automated Documentation Synchronization - When phase blueprints are modified, related documents (changelog, tasks, decisions) are automatically checked and updated - Reduces manual synchronization errors - Ensures consistency across all phase documents ### 2. AI Agent Consistency - Cursor rules ensure all AI interactions follow the same patterns - Clear guidelines prevent inconsistent documentation - Automated checks ensure nothing is missed ### 3. Gitea Platform Understanding - Comprehensive Gitea documentation helps LLMs understand the platform - Correct terminology prevents confusion (Gitea vs GitHub) - Workflow compatibility clearly documented ### 4. Scalable Structure - Phase-based system supports long-term project management - KB system ready for knowledge capture and organization - Automation workflows prepared for CI/CD ### 5. Developer Experience - Clear documentation structure makes onboarding easier - Automated workflows reduce manual maintenance - Consistent patterns across all documentation ### 6. Future-Proof Foundation - Structure supports future phases (1-6) - KB system ready for knowledge capture - Automation system ready for workflow implementation ## Technical Details ### Gitea Actions Compatibility - Gitea Actions uses same YAML format as GitHub Actions - Same .github/workflows/ directory structure - Workflows are largely interchangeable - Documentation notes compatibility throughout ### File Organization - All documentation organized in docs/ directory - Phase updates tracked in docs/PHASE-UPDATES/ - Gitea-specific docs in docs/GITEA/ - Agent guidelines in docs/AGENT-GUIDELINES.md ### Cursor Rules Customization - Project name: Tendril - Phase directory: tendril/phases/ - KB project: tendril - Platform: Gitea (self-hosted) ## Next Steps Phase 0 is complete. Ready for: - Phase 1: Phase Documentation System setup - Phase 2: KB System implementation - Phase 3: Gitea Actions workflows - Phase 4: LLM Usage Guides - Phase 5: Documentation migration - Phase 6: Validation and testing ## Files Added - .cursorrules (root) - docs/AGENT-GUIDELINES.md - docs/GITEA/ (6 files) - docs/PHASE-UPDATES/ (3 files) - Directory structures for phases, KB, workflows, and prompts All files validated with no linter errors.
Tendril: Gitea MCP for Zed
A Zed IDE extension that integrates with Gitea through the Model Context Protocol (MCP). Tendril is part of The Mycelium Project and provides seamless access to Gitea repositories, issues, pull requests, and more directly within your editor.
What is This?
Tendril is a Zed IDE extension that acts as a bridge between Zed and a Gitea MCP server. The extension is lightweight - it connects your editor to a Gitea MCP server running on your system (or in Docker).
Think of it as:
- Extension: Tendril (this repository) - runs inside Zed
- Server: gitea-mcp binary or Docker container - communicates with Gitea
- Result: Full Gitea access from your editor through Zed's AI features
Requirements
Before you can use Tendril, you need:
- Zed IDE - Download from https://zed.dev
- Gitea MCP Server - Either:
- Binary installed locally, OR
- Docker with gitea-mcp image
- Gitea Access Token - Generated from your Gitea instance
- Rust (for dev installation) - Installed via rustup
Quick Start
Step 1: Install Gitea MCP Server
Choose one method:
Option A: macOS (Homebrew - Recommended)
brew install gitea/tap/gitea-mcp-server
The binary will be installed at /opt/homebrew/bin/gitea-mcp-server.
Option B: Linux (Pre-built Binary)
# Download from: https://gitea.com/gitea/gitea-mcp/releases
# Example for Linux x64:
wget https://gitea.com/gitea/gitea-mcp/releases/download/v1.0.0/gitea-mcp-linux-amd64
chmod +x gitea-mcp-linux-amd64
sudo mv gitea-mcp-linux-amd64 /usr/local/bin/gitea-mcp
Option C: Build from Source
git clone https://gitea.com/gitea/gitea-mcp.git
cd gitea-mcp
make install
Option D: Use Docker
If you prefer Docker, skip the binary installation - we'll configure Docker mode in Step 3.
Step 2: Generate a Gitea Access Token
- Log in to your Gitea instance
- Go to Settings → Applications → Generate New Token
- Give it a name like "Zed MCP"
- Select repository-related permissions
- Copy the token
Step 3: Install Tendril Extension
- Clone this repository
- Open Zed
- Go to Extensions panel (Cmd/Ctrl + Shift + X)
- Click Install Dev Extension
- Select the
tendrildirectory - Zed will compile and load the extension
Step 4: Configure Zed Settings
Open your Zed settings (Cmd/Ctrl + ,) and add one of the following configurations:
For Local Binary (macOS with Homebrew):
{
"context_servers": {
"tendril-gitea-mcp": {
"settings": {
"gitea_access_token": "YOUR_GITEA_TOKEN_HERE",
"gitea_mcp_binary_path": "/opt/homebrew/bin/gitea-mcp-server"
}
}
}
}
For Local Binary (Linux):
{
"context_servers": {
"tendril-gitea-mcp": {
"settings": {
"gitea_access_token": "YOUR_GITEA_TOKEN_HERE",
"gitea_mcp_binary_path": "/usr/local/bin/gitea-mcp"
}
}
}
}
For Docker:
{
"context_servers": {
"tendril-gitea-mcp": {
"settings": {
"gitea_access_token": "YOUR_GITEA_TOKEN_HERE",
"use_docker": true,
"docker_binary_path": "/usr/bin/docker"
}
}
}
}
Note: Find your docker path with which docker and use that full path.
Step 5: Test the Connection
In Zed's Assistant panel, try:
list my repositories
You should see your Gitea repositories!
Configuration Reference
Required Settings
| Setting | Type | Description |
|---|---|---|
gitea_access_token |
string | Your Gitea personal access token |
Binary Configuration (choose one)
| Setting | Type | Description |
|---|---|---|
gitea_mcp_binary_path |
string | Full path to gitea-mcp binary (e.g., /opt/homebrew/bin/gitea-mcp-server) |
use_docker |
boolean | Set to true to use Docker instead of local binary |
docker_binary_path |
string | Full path to docker binary (required when use_docker: true) |
Important: Due to WebAssembly sandbox limitations, you must explicitly configure:
- Either
gitea_mcp_binary_pathfor local binary - Or
use_docker: true+docker_binary_pathfor Docker mode
Auto-detection is not possible.
Optional Settings
| Setting | Type | Default | Description |
|---|---|---|---|
gitea_host |
string | (none) | URL of your Gitea instance (for self-hosted) |
gitea_insecure |
boolean | false | Allow self-signed certificates |
docker_image |
string | gitea/gitea-mcp-server:latest | Docker image to use (when use_docker: true) |
Finding binary paths:
- gitea-mcp:
which gitea-mcporwhich gitea-mcp-server - docker:
which docker
Configuration Examples
Self-Hosted Gitea with Binary
{
"context_servers": {
"tendril-gitea-mcp": {
"settings": {
"gitea_access_token": "YOUR_TOKEN",
"gitea_host": "https://git.example.com",
"gitea_mcp_binary_path": "/usr/local/bin/gitea-mcp"
}
}
}
}
Self-Hosted Gitea with Docker
{
"context_servers": {
"tendril-gitea-mcp": {
"settings": {
"gitea_access_token": "YOUR_TOKEN",
"gitea_host": "https://git.example.com",
"use_docker": true,
"docker_binary_path": "/usr/bin/docker"
}
}
}
}
Self-Signed Certificates
{
"context_servers": {
"tendril-gitea-mcp": {
"settings": {
"gitea_access_token": "YOUR_TOKEN",
"gitea_host": "https://git.internal.company.com",
"gitea_insecure": true,
"gitea_mcp_binary_path": "/usr/local/bin/gitea-mcp"
}
}
}
}
Security Note: Only use gitea_insecure: true for trusted internal servers.
Custom Docker Image
{
"context_servers": {
"tendril-gitea-mcp": {
"settings": {
"gitea_access_token": "YOUR_TOKEN",
"use_docker": true,
"docker_binary_path": "/usr/bin/docker",
"docker_image": "my-registry.com/gitea-mcp:v1.0.0"
}
}
}
}
Available Features
Through the Gitea MCP server, you get access to:
- User Management: Get user info, list organizations, search users
- Repository Management: List, create, fork repositories
- Branch Management: Create, delete, list branches
- Release Management: Create, list, delete releases
- Tag Management: Create, list, delete tags
- File Operations: View, create, update, delete files
- Issue Management: Create, edit, list issues, add comments
- Pull Requests: Create, list, manage pull requests
- Commits: List and view commits
See the Gitea MCP documentation for complete tool details.
Why Explicit Configuration?
Tendril runs as a WebAssembly (WASM) extension inside Zed. The WASM sandbox has important security restrictions:
- ❌ Cannot detect the host operating system
- ❌ Cannot access PATH environment variable reliably (especially on macOS)
- ❌ Cannot check if files exist on the filesystem
- ❌ Cannot spawn commands like
which
These limitations mean automatic binary discovery is unreliable and platform-dependent. Explicit configuration ensures the extension works reliably across all platforms.
The upside: Once configured, it just works! And you have full control over which binary/Docker image is used.
Note on Docker: Docker mode also requires explicit docker_binary_path for the same reasons.
Troubleshooting
"Binary path not configured" Error
You'll see this if neither gitea_mcp_binary_path nor use_docker is set.
Solution: Add one of these to your Zed settings:
"gitea_mcp_binary_path": "/opt/homebrew/bin/gitea-mcp-server"
or
"use_docker": true,
"docker_binary_path": "/usr/bin/docker"
Finding Your Binary Path
If you're not sure where your binary is installed:
macOS (Homebrew):
which gitea-mcp-server
# Output: /opt/homebrew/bin/gitea-mcp-server
Linux:
which gitea-mcp
# Output: /usr/local/bin/gitea-mcp
Use the output path in your gitea_mcp_binary_path setting.
"Failed to spawn command" Error
The path is configured but Zed can't execute the binary:
-
Verify the path is correct:
ls -la /opt/homebrew/bin/gitea-mcp-server -
Ensure it's executable:
chmod +x /opt/homebrew/bin/gitea-mcp-server -
Test it manually:
/opt/homebrew/bin/gitea-mcp-server --help -
Restart Zed after fixing permissions
Authentication Issues
- Verify your token has the correct permissions
- Check for extra spaces when copying the token
- Ensure the token hasn't expired
- Try generating a new token
Docker Issues
If using use_docker: true and seeing errors:
-
Find your docker binary path:
which docker # Output: /usr/bin/docker (use this in docker_binary_path) -
Check Docker is running:
docker ps -
Verify Docker can pull images:
docker pull gitea/gitea-mcp-server:latest -
On Linux, check permissions:
sudo usermod -aG docker $USER # Log out and back in
Common Docker paths:
- Linux:
/usr/bin/docker - macOS:
/usr/local/bin/dockeror/Applications/Docker.app/Contents/Resources/bin/docker
View Logs
Check Zed logs for detailed error messages:
- In Zed, run command:
zed: open log - Look for errors related to "tendril" or "gitea-mcp"
- The error messages will show the exact path that was attempted
Development
Building from Source
Prerequisites:
- Rust (installed via rustup)
- WASM target:
rustup target add wasm32-unknown-unknown
Build the extension:
cd tendril
cargo build --target wasm32-unknown-unknown --release
cp target/wasm32-unknown-unknown/release/mcp_server_gitea.wasm extension.wasm
Project Structure
tendril/
├── Cargo.toml # Rust project configuration
├── extension.toml # Zed extension manifest
├── src/
│ └── mcp_server_gitea.rs # Main extension logic
├── configuration/
│ ├── default_settings.jsonc # Default configuration template
│ └── installation_instructions.md # Setup guide for Zed UI
├── README.md # This file
├── DEVELOPMENT.md # Developer guide
├── PROJECT_STATUS.md # Project status and roadmap
└── LICENSE # Apache 2.0
Code Overview
The extension is ~300 lines of clean Rust code:
GiteaContextServerSettings: Configuration structurebuild_binary_command(): Creates command for local binarybuild_docker_command(): Creates command for Dockerresolve_binary_path(): Validates explicit configuration
Common Binary Paths
For reference, here are the typical installation paths:
| Platform | Package Manager | Path |
|---|---|---|
| macOS | Homebrew | /opt/homebrew/bin/gitea-mcp-server |
| macOS (Intel) | Homebrew | /usr/local/bin/gitea-mcp-server |
| Linux | Manual install | /usr/local/bin/gitea-mcp |
| Linux | User install | ~/.local/bin/gitea-mcp |
| Source build | Cargo | ~/.cargo/bin/gitea-mcp |
| Windows | Manual install | C:\Program Files\gitea-mcp\gitea-mcp.exe |
Use which gitea-mcp or which gitea-mcp-server to find your actual path.
Related Projects
- Gitea: https://gitea.io - Lightweight Git service
- Gitea MCP: https://gitea.com/gitea/gitea-mcp - MCP server for Gitea
- Model Context Protocol: https://modelcontextprotocol.io
- The Mycelium Project: https://git.parkingmeter.info/Mycelium
- Zed IDE: https://zed.dev
License
Licensed under the Apache License 2.0. See LICENSE for details.
Support
For issues or questions:
- Check troubleshooting section above
- Review Zed logs using
zed: open log - Open an issue on Tendril repository
- Consult documentation:
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for detailed guidelines on:
- Development workflow
- Branch management
- Documentation standards
- Code quality requirements
- Pull request process
Quick Start:
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name - Make your changes and test thoroughly
- Submit a pull request with a clear description
For full details, see CONTRIBUTING.md.
Authors
- Ryan Parmeter (@parkingmeter)
- The Mycelium Project Contributors
Changelog
v0.2.0 (Current)
- 🔧 BREAKING: Removed automatic binary path detection (WASM limitations)
- ✨ Explicit configuration required:
gitea_mcp_binary_pathoruse_docker: true+docker_binary_path - ✨ Docker mode now requires explicit
docker_binary_path(consistent with binary requirement) - 📚 Simplified documentation and clearer error messages
- 🐛 Fixed macOS M4 compatibility issues
- ✅ Tested on Linux (x86_64) and macOS (M4)
v0.1.0 (Previous)
- ✨ Attempted automatic binary path detection
- ✨ Docker support
- 🐛 Issues with PATH detection in WASM on macOS
v0.0.1 (Initial)
- Initial development version
- STDIO mode support
- Basic configuration through Zed settings