docs: reorganize project structure and add Gitea platform context

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.
This commit is contained in:
2025-11-11 11:38:44 -07:00
parent 0a131a296e
commit 03db6efeb8
17 changed files with 892 additions and 16 deletions

View File

@@ -0,0 +1,172 @@
# Gitea Development Environment Setup Guide for Windows & Cursor
**Objective:** This document details the complete process for configuring a local development environment on a Windows PC to work with a Gitea-hosted source code repository. It covers connecting the Cursor IDE using the Model Context Protocol (MCP) and cloning a project repository to begin work.
## Core Components
* **Gitea:** The remote Git server where the project's code is stored.
* **Gitea MCP Server:** A command-line application that acts as a bridge between Cursor and Gitea.
* **Cursor IDE:** The code editor used for development.
* **Git for Windows:** The underlying version control software used for all `git` commands.
---
## Phase 1: Environment Setup and Configuration
### Step 1: Download and Prepare the Gitea MCP Server
The first step is to get the bridge application that allows Cursor to communicate with Gitea.
1. **Download the Binary:**
* Navigate to the official Gitea MCP releases page: [https://gitea.com/gitea/gitea-mcp/releases](https://gitea.com/gitea/gitea-mcp/releases)
* From the latest release, download the zip archive for Windows, named `gitea-mcp_Windows_x86_64.zip`.
2. **Create a Permanent Location:**
* Create a dedicated folder on your computer where this tool will live permanently. For this guide, we used: `D:\OneDrive\GIT_Parkingmeter\gitea-mcp_Windows_x86_64`
3. **Extract the Files:**
* Extract the contents of the downloaded `.zip` file into the folder you just created. The most important file is `gitea-mcp.exe`.
### Step 2: Generate a Gitea Access Token
Cursor needs a secure "password" to access your Gitea account. This is called an Access Token.
1. **Navigate to Gitea Settings:** Go to your Gitea instance's Applications page: [https://git.parkingmeter.info/user/settings/applications](https://git.parkingmeter.info/user/settings/applications)
2. **Generate a New Token:**
* Give the token a descriptive name (e.g., "Cursor on Windows PC").
* Set the following permissions to **Read and Write**:
* `issue`
* `repository`
* `user`
* Click **"Generate Token"**.
3. **Copy and Save the Token:**
* **CRITICAL:** Gitea will display the token only once. Copy it immediately and save it in a secure place (like a password manager or a temporary text file). You will need it in the next steps.
### Step 3: Create the Server Startup Script (`run-gitea.bat`)
To ensure the Gitea MCP Server starts reliably every time, we will create a simple startup script.
1. **Create the File:**
* In the same folder where you extracted `gitea-mcp.exe`, create a new file named `run-gitea.bat`.
2. **Edit the Script:**
* Open `run-gitea.bat` with a text editor (like Notepad) and paste the following content:
```batch
@echo off
echo Starting Gitea MCP server in HTTP mode...
echo Do not close this window!
D:\OneDrive\GIT_Parkingmeter\gitea-mcp_Windows_x86_64\gitea-mcp.exe -t http --host https://git.parkingmeter.info --token YOUR_GITEA_TOKEN_HERE
```
3. **Add Your Token:**
* In the script, **replace `YOUR_GITEA_TOKEN_HERE` with the actual Gitea token** you copied in Step 2.
* Save and close the file.
### Step 4: Configure Cursor's MCP Tools
This is the most important step. We need to tell Cursor how to find and use your new Gitea server.
1. **Open Cursor's MCP Settings:**
* In Cursor, navigate to the settings UI.
* Go to the **"Tools & MCP"** section.
* You will see a file named **`mcp.json`**. Open this file.
2. **Add the Gitea Server Configuration:**
* Inside the `"mcpServers": { ... }` object, add the following configuration block. Be sure to add a comma `,` after the preceding entry.
```json
"gitea-local": {
"url": "http://localhost:8080/mcp",
"headers": {
"Authorization": "Bearer YOUR_GITEA_TOKEN_HERE"
}
}
```
3. **Add Your Token:**
* Again, **replace `YOUR_GITEA_TOKEN_HERE` with your actual Gitea token**.
* **IMPORTANT:** The word `Bearer` followed by a space must be kept in front of the token.
4. **Save the `mcp.json` file.**
### Step 5: Test the Connection Workflow
This is the process you will follow each time you want to use the Gitea integration.
1. **Manually Start the Server:**
* Using File Explorer, navigate to your `gitea-mcp_Windows_x86_64` folder.
* **Double-click the `run-gitea.bat` script.**
* A black command prompt window will appear and stay open. This is your server. **You must keep this window running** while you use the integration in Cursor.
2. **Restart and Test in Cursor:**
* Completely close and reopen the Cursor application to ensure it loads the new configuration.
* Open the AI Chat panel (`Ctrl + L`).
* Send the command: `@gitea-local list my repositories`.
* The AI may initially be confused. **Confirm that it should make a direct API call** to your Gitea instance, providing the URL (`https://git.parkingmeter.info`) when prompted.
* **Success is confirmed when the AI returns a formatted list of your Gitea repositories.**
### Step 6: Clone the Project Repository
The final setup step is to download the project's source code to your machine.
1. **Open a Terminal in Cursor:**
* Go to the top menu and select **Terminal -> New Terminal**.
2. **Navigate to Your Projects Directory:**
* In the terminal, change to the folder where you want to store your projects. We used:
```bash
cd /d/OneDrive/GIT_Parkingmeter
```
3. **Clone the Repository:**
* Run the `git clone` command with the project's URL:
```bash
git clone https://git.parkingmeter.info/Mycelium/tendril.git
```
---
## Phase One Complete
At this point, your environment is fully configured. You have successfully linked Cursor to your Gitea account and downloaded a local copy of the project code. You are now ready to move on to Phase Two: The Development Workflow (editing, pushing, and pulling code).

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,62 @@
# Phase 0 Gitea Updates Summary
**Date**: 2025-01-27
**Purpose**: Document updates made to Phase 0 files to reflect Gitea (self-hosted) instead of GitHub
## Changes Made
### 1. `.cursorrules` File Updates
**Updated References:**
- "GitHub Actions workflows" → "Gitea Actions workflows" (3 occurrences)
- "GitHub Actions will auto-update" → "Gitea Actions will auto-update"
**Note**: Gitea Actions is compatible with GitHub Actions, so the `.github/workflows/` directory structure and YAML format remain the same.
### 2. `docs/AGENT-GUIDELINES.md` Updates
**Updated References:**
- "GitHub issues" → "Gitea issues"
- "GitHub Automation" → "Gitea Automation" (section title)
- "GitHub Actions workflows" → "Gitea Actions workflows (compatible with GitHub Actions format)"
- "When Modifying GitHub Workflows" → "When Modifying Gitea Actions Workflows"
- Added note: "Gitea Actions is compatible with GitHub Actions, so workflows use the same YAML format and `.github/` directory structure."
- Added 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."
- "GitHub automation" → "Gitea automation" (in Getting Help section)
## Key Points
1. **Gitea Actions Compatibility**: Gitea Actions is compatible with GitHub Actions, meaning:
- Same `.github/workflows/` directory structure
- Same YAML workflow format
- Same triggers and syntax
- Existing GitHub Actions workflows can be used with minimal or no modifications
2. **Repository Context**:
- Primary repository: https://git.parkingmeter.info/Mycelium/tendril (Gitea)
- Self-hosted Gitea instance
- Uses Gitea Actions for CI/CD automation
3. **No Structural Changes Needed**:
- Directory structure remains the same
- Workflow files will work as-is
- Only documentation references needed updating
## Files Modified
1. `.cursorrules` - Updated 3 references from GitHub to Gitea
2. `docs/AGENT-GUIDELINES.md` - Updated 6 references and added compatibility notes
## Next Steps
When creating workflows in Phase 3:
- Use standard GitHub Actions YAML format
- Workflows will work with Gitea Actions automatically
- Reference "Gitea Actions" in documentation, but note GitHub Actions compatibility
- Test workflows in Gitea Actions interface (similar to GitHub Actions tab)
---
**Location**: `kb/_guides/PROJECT-SETUP-GUIDE/PHASE-0-GITEA-UPDATES.md`
**Related**: Phase 0 setup, Gitea Actions compatibility

View File

@@ -0,0 +1,209 @@
# Phase 1: Phase Documentation System - Detailed Plan
**Objective**: Set up phase-based project management with synchronized documents
**Status**: Ready for Review
**Date**: 2025-01-27
---
## Overview
Phase 1 establishes the phase documentation system that will track all project work in synchronized documents. Each phase will have four documents that stay in sync automatically via Cursor rules.
---
## Tasks Breakdown
### Task 1: Create Phase Documentation Templates
**Location**: `tendril/phases/phase-00-foundation/`
**Files to Create**:
1. **`blueprint.md`** - Complete phase specification template
2. **`tasks.md`** - Task tracking template (mirrors Gitea issues)
3. **`decisions.md`** - ADR (Architecture Decision Record) template
4. **`changelog.md`** - Change history template
**Templates Source**: `kb/_guides/PROJECT-SETUP-GUIDE/COMPLETE-SYSTEM-REPLICATION-GUIDE.md`
**Customizations Needed**:
- Replace `pairs/phases/` with `tendril/phases/`
- Replace "GitHub issues" with "Gitea issues" in tasks.md
- Update project name to "Tendril"
- Update repository URL to Gitea instance
---
### Task 2: Populate Phase 0 (Foundation) with Current Project State
**Location**: `tendril/phases/phase-00-foundation/`
**Data Sources**:
- `PROJECT_STATUS.md` - Current v0.1.0 status
- `README.md` - Project description and features
- `DEVELOPMENT.md` - Architecture and roadmap
- Phase 0 work just completed (Cursor rules, directory structure, Gitea docs)
**Phase 0 Content to Document**:
**Blueprint.md**:
- **Project**: Tendril
- **Phase**: Phase 0: Foundation & Cursor Rules Setup
- **Status**: ✅ Complete
- **Objectives**:
- Establish Cursor rules system
- Create directory structure
- Set up agent guidelines
- Create Gitea documentation
- Organize phase updates documentation
- **Deliverables**:
- `.cursorrules` file
- `docs/AGENT-GUIDELINES.md`
- `docs/GITEA/` documentation suite
- `kb/_guides/PROJECT-SETUP-GUIDE/` organization
- Complete directory structure
- **Timeline**: Completed 2025-01-27
- **Definition of Done**: All Phase 0 tasks completed and committed
**Tasks.md**:
- Mirror completed work from Phase 0
- Mark all Phase 0 tasks as complete
- Reference commit: `0a131a2`
**Decisions.md**:
- ADR-000: Use Gitea (self-hosted) instead of GitHub
- ADR-001: Use `tendril/phases/` directory structure
- ADR-002: Implement comprehensive Cursor rules system
- ADR-003: Create Gitea-specific documentation
**Changelog.md**:
- **2025-01-27**: Phase 0 completed - Established foundation
- Created `.cursorrules` with comprehensive rules
- Created directory structure (phases, KB, workflows, prompts)
- Created `docs/AGENT-GUIDELINES.md`
- Created Gitea documentation suite
- Organized phase updates documentation
- Committed all changes (commit `0a131a2`)
---
### Task 3: Create Phase 1 Blueprint for Next Development Cycle
**Location**: `tendril/phases/phase-01-testing-validation/` (or similar name)
**Phase 1 Content** (based on PROJECT_STATUS.md roadmap):
**Blueprint.md**:
- **Project**: Tendril
- **Phase**: Phase 1: Testing & Validation
- **Status**: ⏳ Planned
- **Objectives**:
- Test with actual Gitea instances (various versions)
- Test binary discovery on multiple systems
- Test Docker mode on Linux, macOS, Windows
- Test with self-hosted Gitea instances
- Validate error messages are helpful
- Performance testing with large repositories
- **Deliverables**:
- Test results documentation
- Platform compatibility matrix
- Error message improvements
- Performance benchmarks
- **Timeline**: TBD
- **Definition of Done**: All testing complete, results documented, issues resolved
**Tasks.md**:
- Create tasks from PROJECT_STATUS.md "What's Next" section
- Link to Gitea issues when created
- Organize by category (Testing, UX, Documentation, Release)
**Decisions.md**:
- Will be populated as decisions are made during Phase 1
**Changelog.md**:
- Will be populated as Phase 1 progresses
---
## Customizations for Tendril
### Directory Structure
- **Use**: `tendril/phases/` (not `pairs/phases/`)
- **Reason**: Matches project name and structure
### Platform References
- **Use**: "Gitea" (not "GitHub")
- **Tasks.md**: "mirrors Gitea issues" (not "GitHub issues")
- **Repository**: https://git.parkingmeter.info/Mycelium/tendril
### Project Context
- **Project Name**: Tendril
- **Current Version**: v0.1.0
- **Language**: Rust (WASM for Zed extension)
- **Platform**: Gitea (self-hosted)
---
## Synchronization Rules (Already in .cursorrules)
When `blueprint.md` is modified:
1. ✅ Update `changelog.md` with today's date and description
2. ✅ Sync `tasks.md` with blueprint deliverables
3. ✅ Review `decisions.md` for new ADRs needed
4. ✅ Verify consistency across all documents
---
## Files to Create
### Phase 0 (Foundation)
```
tendril/phases/phase-00-foundation/
├── blueprint.md # Phase 0 specification
├── tasks.md # Phase 0 tasks (all complete)
├── decisions.md # Phase 0 ADRs
└── changelog.md # Phase 0 change history
```
### Phase 1 (Testing & Validation)
```
tendril/phases/phase-01-testing-validation/
├── blueprint.md # Phase 1 specification
├── tasks.md # Phase 1 tasks (from PROJECT_STATUS.md)
├── decisions.md # Phase 1 ADRs (empty initially)
└── changelog.md # Phase 1 change history (empty initially)
```
---
## Review Checklist
Before implementing Phase 1, verify:
- [ ] Templates use `tendril/phases/` (not `pairs/phases/`)
- [ ] All references say "Gitea" (not "GitHub")
- [ ] Tasks.md says "mirrors Gitea issues"
- [ ] Project name is "Tendril" throughout
- [ ] Repository URL is Gitea instance
- [ ] Phase 0 content accurately reflects completed work
- [ ] Phase 1 objectives align with PROJECT_STATUS.md roadmap
- [ ] All dates are in YYYY-MM-DD format
- [ ] Status indicators are consistent (✅ Complete, 🔄 In Progress, ⏳ Planned)
---
## Next Steps After Phase 1
Once Phase 1 is complete:
- Phase 2: KB System Setup
- Phase 3: Gitea Actions Workflows
- Phase 4: LLM Usage Guides
- Phase 5: Documentation Migration
- Phase 6: Validation and Testing
---
**Location**: `kb/_guides/PROJECT-SETUP-GUIDE/PHASE-1-PLAN.md`
**Related**: `kb/_guides/PROJECT-SETUP-GUIDE/COMPLETE-SYSTEM-REPLICATION-GUIDE.md`, `PROJECT_STATUS.md`

View File

@@ -0,0 +1,63 @@
# Project Setup Guide
**Purpose**: This directory contains documentation related to project setup, phase plans, system replication guides, and migration notes.
**Last Updated**: 2025-01-27
---
## Contents
### System Replication
- **[COMPLETE-SYSTEM-REPLICATION-GUIDE.md](./COMPLETE-SYSTEM-REPLICATION-GUIDE.md)** - Comprehensive guide for replicating the PAIRS documentation and automation system in another project. Includes all structures, schemas, templates, rationale, and step-by-step instructions.
### Phase Plans and Updates
- **[PHASE-0-GITEA-UPDATES.md](./PHASE-0-GITEA-UPDATES.md)** - Documents updates made to Phase 0 files to reflect Gitea (self-hosted) instead of GitHub. Includes changes to `.cursorrules` and `docs/AGENT-GUIDELINES.md`.
- **[PHASE-1-PLAN.md](./PHASE-1-PLAN.md)** - Detailed plan for Phase 1: Phase Documentation System setup. Includes tasks breakdown, customizations for Tendril, and review checklist.
---
## Purpose
This directory serves as a reference for:
1. **System Replication**: Complete guide for setting up the documentation and automation system in new projects
2. **Phase Plans**: Detailed plans for each phase of project setup
3. **Phase Updates**: Tracking changes and updates made during each phase of project setup
4. **Migration Notes**: Documenting platform-specific adaptations (e.g., Gitea vs GitHub)
---
## Usage
### For System Replication
If you want to replicate this documentation system in another project:
1. Read `COMPLETE-SYSTEM-REPLICATION-GUIDE.md`
2. Follow the step-by-step replication guide
3. Customize for your project's needs
### For Phase Plans and Updates
When planning or updating phases:
1. Create phase plans in this directory (e.g., `PHASE-1-PLAN.md`)
2. Document changes in phase-specific update files (e.g., `PHASE-0-GITEA-UPDATES.md`)
3. Reference these files when reviewing phase work
4. Use as historical record of decisions made
---
## Related Documentation
- **Agent Guidelines**: `docs/AGENT-GUIDELINES.md` - Guidelines for AI agents
- **Gitea Documentation**: `docs/GITEA/` - Gitea-specific documentation
- **Phase Documentation**: `tendril/phases/` - Phase blueprints and related docs
---
**Location**: `kb/_guides/PROJECT-SETUP-GUIDE/`
**Maintained by**: Tendril Project Maintainers