This commit implements a comprehensive reorganization of project documentation and adds explicit Gitea platform context throughout the project. ## Documentation Reorganization ### File Moves (Content Preserved) - Moved CURSOR_WINDOWS_SETUP.md to kb/_guides/ for better organization - Moved docs/PHASE-UPDATES/ to kb/_guides/PROJECT-SETUP-GUIDE/: - COMPLETE-SYSTEM-REPLICATION-GUIDE.md - PHASE-0-GITEA-UPDATES.md - README.md - Added new file: kb/_guides/PROJECT-SETUP-GUIDE/PHASE-1-PLAN.md **Reason**: Consolidate project setup and configuration guides into the knowledge base structure for better discoverability and organization. ### New Phase Documentation Structure Created tendril/phases/ directory with structured phase documentation: - phase-00-foundation/: blueprint, changelog, decisions, tasks - phase-01-testing-validation/: blueprint, changelog, decisions, tasks **Reason**: Establish consistent phase documentation structure following project guidelines for phase management and tracking. ## Gitea Platform Context Integration ### .cursorrules Updates - Added comprehensive Gitea platform context section - Added Gitea documentation references for workflows and platform questions - Added platform terminology guidelines (Gitea vs GitHub) - Added references to docs/GITEA/ documentation throughout rules **Reason**: Ensure all AI agents and contributors use correct Gitea terminology and have clear guidance on where to find Gitea-specific documentation. ### Documentation Path Updates - CONTRIBUTING.md: Updated CURSOR_WINDOWS_SETUP.md path reference - docs/AGENT-GUIDELINES.md: Updated path references to moved documentation - PROJECT_STATUS.md: Updated comment to mention Gitea Actions **Reason**: Maintain link integrity after file reorganization and ensure documentation references point to correct locations. ## Impact and Benefits 1. **Better Organization**: Documentation is now organized in logical structures (kb/ for knowledge base, tendril/phases/ for phase docs) 2. **Clear Platform Context**: Explicit Gitea platform references prevent confusion with GitHub terminology and provide clear documentation paths 3. **Consistent Structure**: Phase documentation follows standardized format (blueprint, changelog, decisions, tasks) for easier maintenance 4. **Improved Discoverability**: Guides consolidated in kb/_guides/ make it easier to find setup and configuration information All file moves preserve content - no information was lost in this reorganization.
14 KiB
Contributing to Tendril
Thank you for your interest in contributing to Tendril! This guide will help you understand the development workflow, documentation standards, and how to submit changes.
Table of Contents
- Getting Started
- Development Workflow
- Branch Management
- Documentation Guidelines
- Code Standards
- Submitting Changes
- Documentation Types
Getting Started
Prerequisites
Before you begin, ensure you have:
-
Rust installed (via rustup - required for dev extensions)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -
Zed IDE installed from https://zed.dev
-
Git configured with your credentials
-
Access to the repository (fork or direct access)
Development Environment Setup
Windows Users with Cursor IDE:
If you're setting up a Windows development environment with Cursor IDE, see CURSOR_WINDOWS_SETUP.md for detailed step-by-step instructions on:
- Installing and configuring the Gitea MCP Server
- Setting up Cursor IDE to work with Gitea
- Configuring authentication tokens
- Testing the connection
Repository Setup
-
Fork the repository (if you don't have direct write access):
- Go to https://git.parkingmeter.info/Mycelium/tendril
- Click "Fork" to create your own copy
-
Clone your fork (or the main repo if you have access):
git clone https://git.parkingmeter.info/Mycelium/tendril.git cd tendril -
Add upstream remote (if you forked):
git remote add upstream https://git.parkingmeter.info/Mycelium/tendril.git -
Verify setup:
git remote -v # Should show origin (your fork) and upstream (main repo)
Development Workflow
1. Checkout a New Branch
Always create a new branch for your work. Never commit directly to main.
Branch Naming Conventions:
feature/description- New features (e.g.,feature/http-streaming)docs/description- Documentation updates (e.g.,docs/contributing-guide)fix/description- Bug fixes (e.g.,fix/docker-path-resolution)refactor/description- Code refactoring (e.g.,refactor/error-handling)test/description- Test improvements (e.g.,test/windows-compatibility)
Example:
# Update your local main branch first
git checkout main
git pull upstream main # or: git pull origin main
# Create and checkout a new branch
git checkout -b feature/your-feature-name
# Or for documentation:
git checkout -b docs/your-doc-update
2. Make Your Changes
Work on your feature, fix, or documentation update.
For Code Changes:
- Edit
src/mcp_server_gitea.rsfor extension logic - Edit
extension.tomlfor extension metadata - Edit
Cargo.tomlfor dependencies
For Documentation:
- See Documentation Guidelines below
3. Test Your Changes
For Code Changes:
# Check for compilation errors
cargo check
# Run linter
cargo clippy
# Build release version
cargo build --release
# Test in Zed:
# 1. Open Zed
# 2. Extensions → Install Dev Extension
# 3. Select the tendril directory
# 4. Test your changes in Assistant panel
For Documentation:
- Review markdown formatting
- Check all links work
- Verify code examples are correct
- Ensure consistency with existing docs
4. Commit Your Changes
Use clear, descriptive commit messages:
# Good commit messages:
git commit -m "Add feature: HTTP streaming transport support"
git commit -m "Fix: Docker binary path resolution on Windows"
git commit -m "Docs: Add contributing guide and workflow documentation"
# Bad commit messages:
git commit -m "fix stuff"
git commit -m "updates"
git commit -m "WIP"
Commit Message Format:
Type: Brief description (50 chars or less)
Optional longer explanation if needed. Can wrap to 72 characters.
Explain what and why, not how.
- Bullet points for multiple changes
- Reference issues: Fixes #123
Types:
Add- New featureFix- Bug fixDocs- Documentation onlyRefactor- Code refactoringTest- Test additions/changesChore- Maintenance tasks
5. Push Your Branch
# Push to your fork
git push origin feature/your-feature-name
# If branch doesn't exist remotely yet:
git push -u origin feature/your-feature-name
6. Create a Pull Request
- Go to https://git.parkingmeter.info/Mycelium/tendril
- Click "New Pull Request" or "Create Pull Request"
- Select your branch
- Fill out the PR template:
PR Title: Same as your commit message
PR Description:
## Description
Brief description of what this PR does.
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Refactoring
- [ ] Other (please describe)
## Changes Made
- Change 1
- Change 2
- Change 3
## Testing
- [ ] Code compiles: `cargo check`
- [ ] No clippy warnings: `cargo clippy`
- [ ] Tested in Zed IDE
- [ ] Documentation reviewed
## Related Issues
Closes #123
Fixes #456
## Screenshots (if applicable)
[Add screenshots for UI changes]
## Checklist
- [ ] Code follows project style guidelines
- [ ] Self-review completed
- [ ] Comments added for complex logic
- [ ] Documentation updated
- [ ] No new warnings generated
- [ ] Tests pass (if applicable)
Branch Management
Keeping Your Branch Up to Date
If the main branch has moved forward while you're working:
# Switch to main
git checkout main
# Pull latest changes
git pull upstream main # or: git pull origin main
# Switch back to your branch
git checkout feature/your-feature-name
# Rebase your changes on top of main
git rebase main
# If conflicts occur, resolve them, then:
git add .
git rebase --continue
# Force push (only after rebase)
git push --force-with-lease origin feature/your-feature-name
Note: Only use --force-with-lease on your own feature branches. Never force push to main.
Switching Between Branches
# List all branches
git branch -a
# Switch to a branch
git checkout branch-name
# Create and switch in one command
git checkout -b new-branch-name
# See what branch you're on
git branch
Documentation Guidelines
Documentation Structure
Tendril has several types of documentation files:
-
README.md - Main user-facing documentation
- Installation instructions
- Configuration examples
- Troubleshooting
- User-focused content
-
DEVELOPMENT.md - Developer guide
- Architecture details
- Code structure
- Development setup
- Roadmap
-
PROJECT_STATUS.md - Project status and roadmap
- Current version status
- Completed features
- Known issues
- Testing status
-
QUICKSTART.md - Quick setup guide
- TL;DR version
- Minimal steps to get started
-
CONTRIBUTING.md - This file
- Contribution guidelines
- Development workflow
-
Configuration Documentation:
configuration/default_settings.jsonc- Settings template with commentsconfiguration/installation_instructions.md- UI-visible setup guide
-
Analysis/Research Docs:
SSE_MODE_ANALYSIS.md- Technical decisionsTESTING_FINDINGS.md- Test results and learnings
When to Update Documentation
Update README.md when:
- Adding new configuration options
- Changing installation steps
- Adding new features users interact with
- Fixing common issues
Update DEVELOPMENT.md when:
- Changing code architecture
- Adding new code patterns
- Updating development setup
- Changing build process
Update PROJECT_STATUS.md when:
- Releasing new versions
- Completing major features
- Changing project status
- Updating roadmap
Create new documentation when:
- Making significant technical decisions
- Documenting test results
- Explaining complex features
- Providing detailed guides
Documentation Standards
-
Markdown Formatting:
- Use proper heading hierarchy (## for sections, ### for subsections)
- Use code blocks with language tags:
```bash,```rust,```json - Use tables for structured data
- Use lists for step-by-step instructions
-
Code Examples:
- Always test code examples before committing
- Include expected output when relevant
- Use realistic examples, not placeholders
- Show both success and error cases when helpful
-
Links:
- Use relative links for internal documentation:
[README](README.md) - Use absolute links for external resources
- Verify all links work before committing
- Use relative links for internal documentation:
-
Consistency:
- Follow existing documentation style
- Use consistent terminology (e.g., "gitea-mcp" not "gitea mcp")
- Match formatting patterns in similar documents
Creating New Documentation
For a new feature guide:
# Create new doc file
git checkout -b docs/feature-name-guide
touch FEATURE_NAME.md
# Write documentation following existing patterns
# Reference it from README.md or appropriate location
For technical analysis:
# Create analysis document
git checkout -b docs/technical-decision-name
touch TECHNICAL_DECISION.md
# Document:
# - Problem statement
# - Options considered
# - Decision made
# - Rationale
# - Implementation details
Example Documentation Template:
# Feature Name / Analysis Title
**Date**: YYYY-MM-DD
**Status**: Draft / In Progress / Complete
**Related**: Issue #123, PR #456
## Overview
Brief description of what this document covers.
## Details
### Section 1
Content here.
### Section 2
More content.
## References
- [Link 1](https://example.com)
- [Link 2](https://example.com)
## Conclusion
Summary of key points.
Code Standards
Rust Code Quality
Before submitting code:
# Format code
cargo fmt
# Check for issues
cargo check
# Run linter
cargo clippy
# Build release
cargo build --release
Code Style:
- Follow Rust naming conventions
- Keep functions focused (< 50 lines preferred)
- Add comments for complex logic
- Use meaningful variable names
- Handle errors explicitly
Error Messages
- Be specific about what went wrong
- Provide actionable solutions
- Include file paths or commands when relevant
- Format multi-line errors clearly
Testing Checklist
Before submitting:
- Code compiles:
cargo check - No clippy warnings:
cargo clippy - Builds successfully:
cargo build --release - Tested manually in Zed IDE
- Documentation updated if needed
- No breaking changes (or documented if intentional)
Submitting Changes
Pull Request Process
-
Ensure your branch is up to date (see Branch Management above)
-
Push your branch:
git push origin feature/your-feature-name -
Create Pull Request:
- Go to repository on Gitea
- Click "New Pull Request"
- Select your branch
- Fill out PR description (see template above)
-
Respond to feedback:
- Address review comments
- Make requested changes
- Push updates to your branch (PR updates automatically)
- Mark conversations as resolved when done
-
After approval:
- Maintainer will merge your PR
- Your branch can be deleted after merge
PR Review Criteria
Your PR will be reviewed for:
- Functionality: Does it work as intended?
- Code Quality: Follows Rust best practices?
- Documentation: Is it documented appropriately?
- Testing: Has it been tested?
- Breaking Changes: Are any breaking changes documented?
- Consistency: Matches existing code style?
After Your PR is Merged
-
Update your local main:
git checkout main git pull upstream main -
Delete your feature branch (optional):
git branch -d feature/your-feature-name git push origin --delete feature/your-feature-name
Documentation Types
User-Facing Documentation
README.md - Main entry point
- Installation instructions
- Configuration examples
- Troubleshooting
- Quick start guide
QUICKSTART.md - Fast setup
- Minimal steps
- TL;DR version
- Quick reference
configuration/installation_instructions.md - UI guide
- Shown in Zed extension UI
- Concise setup steps
- Links to full docs
Developer Documentation
DEVELOPMENT.md - Developer guide
- Architecture overview
- Code structure
- Development setup
- Roadmap
CONTRIBUTING.md - This file
- Contribution process
- Workflow guidelines
- Standards
PROJECT_STATUS.md - Project state
- Current version
- Feature status
- Testing matrix
- Roadmap
Technical Documentation
SSE_MODE_ANALYSIS.md - Technical decisions
- Why SSE was removed
- Alternatives considered
- Implementation details
TESTING_FINDINGS.md - Test results
- What was tested
- Results and learnings
- Recommendations
ZedExtensions.md - Research notes
- Zed extension development
- MCP integration
- Reference material
Configuration Documentation
configuration/default_settings.jsonc - Settings template
- All available options
- Inline comments
- Examples
- Default values
Getting Help
If you need help:
-
Check existing documentation:
- README.md for user questions
- DEVELOPMENT.md for developer questions
- This file for contribution questions
-
Search issues:
- Check if your question was already asked
- Look for similar problems
-
Ask in issues:
- Open a new issue with your question
- Use "Question" label if available
- Provide context about what you're trying to do
-
Contact maintainers:
- @parkingmeter on Gitea
- Open a discussion if available
Code of Conduct
- Be respectful and constructive
- Focus on the code, not the person
- Help others learn and improve
- Follow the project's coding standards
- Ask questions when unsure
License
By contributing, you agree that your contributions will be licensed under the Apache License 2.0, the same license as the project.
Thank you for contributing to Tendril! 🎉
Your contributions help make this project better for everyone.