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.
7.3 KiB
Agent Guidelines for Tendril
Purpose: This document provides guidelines for AI agents (like Cursor AI) working on the Tendril project. It defines the project structure, documentation standards, and workflow expectations.
Last Updated: 2025-01-27
Project Overview
Tendril is a Zed IDE extension that integrates with Gitea through the Model Context Protocol (MCP). It provides seamless access to Gitea repositories, issues, pull requests, and more directly within the Zed editor.
Repository: https://git.parkingmeter.info/Mycelium/tendril
Current Version: v0.1.0
Language: Rust (compiled to WASM for Zed extension)
License: Apache 2.0
Documentation System Architecture
Tendril uses a comprehensive documentation system with the following components:
Phase Documentation System
Location: tendril/phases/phase-XX-name/
Each phase has four synchronized documents:
blueprint.md- Complete phase specificationtasks.md- Task tracking (mirrors Gitea issues)decisions.md- Architecture Decision Records (ADRs)changelog.md- Change history
Critical Rule: When blueprint.md is modified, ALL related documents must be checked and updated in the same session.
Knowledge Base (KB) System
Location: kb/
The KB system provides a lightweight, LLM-friendly staging area for external information:
kb/01_projects/tendril/- Project-specific noteskb/02_systems/- Infrastructure/toolingkb/03_research/- Informal researchkb/04_design/- Product specs/UXkb/05_decisions/- Project-level ADRskb/06_glossary/- Terms/acronymskb/07_playbooks/- How-to guideskb/08_archive/- Superseded content
KB File Naming: YYYY-MM-DD--slug--type.md
KB Frontmatter: All KB files require complete YAML frontmatter with 18 required fields.
Gitea Automation
Location: .github/
.github/workflows/- Gitea Actions workflows (compatible with GitHub Actions format).github/README.md- Automation overview.github/CHANGELOG.md- Workflow change tracking.github/decisions.md- Automation decisions
Note: Gitea Actions is compatible with GitHub Actions, so workflows use the same YAML format and .github/ directory structure.
Core Principles
- Documentation is the Single Source of Truth - Always read phase blueprints before making changes
- Synchronization is Mandatory - Related documents must stay in sync automatically
- LLM-Friendly Structure - All documentation is structured for AI agent consumption
- Incremental Updates - Update documentation as you work, not at the end
- Validation at Every Step - Automated validation ensures consistency
Mandatory Workflows
When Editing Phase Blueprints
-
Read related documents first:
changelog.md- Check recent changestasks.md- Understand current task statusdecisions.md- Review existing ADRs
-
After editing
blueprint.md:- Update
changelog.mdwith today's date and description - Sync
tasks.mdwith blueprint deliverables and definition of done - Review
decisions.mdfor new ADRs needed - Verify project name consistency across all documents
- Update
-
Before completing:
- Provide summary of all files modified
- Ask user if they want to push changes
When Creating KB Files
-
Before creating:
- Check
kb/_index.mdfor existing related content - Determine appropriate category using routing decision tree
- Assess routing confidence (0.00-1.00)
- Check
-
After creating:
- Run
kb/scripts/generate-index.shto update index - Update
kb/CHANGELOG.mdwith entry - Commit all three changes together
- Run
When Modifying Gitea Actions Workflows
- Update
.github/CHANGELOG.md- Document what changed - Update
.github/decisions.md- Document decision rationale (if applicable) - Update
.github/README.md- Update workflow descriptions (if needed)
Note: Gitea Actions workflows use the same YAML format as GitHub Actions, so existing GitHub Actions workflows can be used with minimal or no modifications.
When Completing Work Sessions
-
Check README.md:
- Verify phase statuses are accurate
- Update if phase statuses changed
- Verify links are correct
-
Verify consistency:
- Project name matches across documents
- Dates are consistent
- Status indicators are aligned
File Structure Conventions
Directory Naming
- Phase directories:
phase-XX-namewhere XX is zero-padded (00, 01, 02, etc.) - KB categories:
01_projects/,02_systems/, etc. (numbered for ordering) - Special KB directories:
_guides/,_templates/,_inbox/,_review_queue/(underscore prefix)
File Naming
- Phase documentation:
blueprint.md,tasks.md,decisions.md,changelog.md - KB files:
YYYY-MM-DD--slug--type.md - Workflows:
kebab-case.yml
Commit Messages
Format: type(scope): description
Types:
feat: New featurefix: Bug fixdocs: Documentation changeschore: Maintenance tasksci: CI/CD changes
Examples:
feat(phase-01): Add Zapier integrationfix(phase-02): Resolve web link capture (#123)docs(kb): add api-auth-decision and update index/changelog
Critical Rules
NEVER Do These Things
- ❌ NEVER delete files or folders when committing or pushing
- ❌ NEVER edit blueprint.md without checking related documents
- ❌ NEVER leave related documents out of sync
- ❌ NEVER assume related documents are already updated
- ❌ NEVER skip KB index/changelog updates
- ❌ NEVER complete work without checking README.md
ALWAYS Do These Things
- ✅ ALWAYS read related documents before making changes
- ✅ ALWAYS update related documents in the same session
- ✅ ALWAYS verify consistency across all phase documents
- ✅ ALWAYS run KB index generation after KB file changes
- ✅ ALWAYS check README.md after significant changes
- ✅ ALWAYS provide summaries of what was updated
Project-Specific Context
Technology Stack
- Language: Rust
- Target: WASM (WebAssembly) for Zed extension
- Dependencies: zed_extension_api, serde, schemars
- Build:
cargo build --target wasm32-unknown-unknown --release
Key Files
src/mcp_server_gitea.rs- Main extension logicextension.toml- Zed extension manifestCargo.toml- Rust project configurationconfiguration/default_settings.jsonc- Configuration template
Current Status
- Version: v0.1.0
- Status: Feature-complete for core functionality
- Features: Binary path resolution, Docker support, cross-platform detection
- Limitations: SSE mode not supported (Zed API limitation)
Getting Help
If you're unsure about:
- Documentation structure: See
kb/_guides/PROJECT-SETUP-GUIDE/COMPLETE-SYSTEM-REPLICATION-GUIDE.md - KB system: See
kb/README.mdandkb/_guides/ - Phase documentation: See
tendril/phases/phase-00-foundation/for examples - Gitea automation: See
.github/README.mdand.github/LLM-Usage-Guide--tendril.md - Gitea platform: See
docs/GITEA/for comprehensive Gitea documentation
Location: docs/AGENT-GUIDELINES.md
Maintained by: Tendril Project Maintainers
Based on: kb/_guides/PROJECT-SETUP-GUIDE/COMPLETE-SYSTEM-REPLICATION-GUIDE.md