diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 6cb4e4a8..d5aa90ae 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -35,17 +35,17 @@ jobs: - name: Build Documentation run: | - swift package --allow-writing-to-directory ./docs \ + swift package --allow-writing-to-directory ./.docc-build \ generate-documentation \ --target mcpbridge-wrapper \ - --output-path ./docs \ + --output-path ./.docc-build \ --transform-for-static-hosting \ --hosting-base-path mcpbridge-wrapper - name: Add .nojekyll and index.html redirect run: | - touch docs/.nojekyll - cat > docs/index.html << 'EOF' + touch .docc-build/.nojekyll + cat > .docc-build/index.html << 'EOF' @@ -67,7 +67,7 @@ jobs: if: github.event_name == 'push' uses: actions/upload-pages-artifact@v3 with: - path: "./docs" + path: "./.docc-build" deploy: if: github.event_name == 'push' && github.ref == 'refs/heads/main' diff --git a/.gitignore b/.gitignore index 14c2f6eb..73f01d6f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -# Python .gitignore +# Python __pycache__/ *.py[cod] *$py.class @@ -23,14 +23,33 @@ venv/ .venv/ .env -# Task tracker state files -.task_state.json -.current_task +# Testing & Coverage .coverage +htmlcov/ +.tox/ +.nox/ +.hypothesis/ +.pytest_cache/ +.mypy_cache/ +.ruff_cache/ + +# IDEs & Editors +.vscode/ +.idea/ +*.swp +*.swo +*~ + +# macOS +.DS_Store -# Swift build artifacts +# Swift / DocC .build/ +.docc-build/ *.xcodeproj/ *.xcworkspace/ Package.resolved -.DS_Store + +# Task tracker state files +.task_state.json +.current_task diff --git a/AGENTS.md b/AGENTS.md index 57bcc6f4..097523ac 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -294,6 +294,54 @@ For more troubleshooting tips, see [docs/troubleshooting.md](docs/troubleshootin - [Tools Reference](docs/tools-reference.md) - [Usage Examples](docs/usage-examples.md) +## Contributing + +### Contribution Workflow + +**⚠️ IMPORTANT:** The `main` branch is protected by GitHub ruleset. **All contributions must be made through Pull Requests (PRs).** + +Direct pushes to `main` are not allowed. Follow this workflow: + +1. **Create a feature branch from main:** + ```bash + git checkout main + git pull origin main + git checkout -b feature/your-feature-name + ``` + +2. **Make your changes** and commit them: + ```bash + git add . + git commit -m "Description of changes" + ``` + +3. **Push the branch to origin:** + ```bash + git push origin feature/your-feature-name + ``` + +4. **Create a Pull Request** on GitHub: + - Go to https://github.com/SoundBlaster/XcodeMCPWrapper/pulls + - Click "New Pull Request" + - Select your feature branch and compare against `main` + - Fill in the PR template with description of changes + - Request review if applicable + +5. **After PR is merged**, clean up locally: + ```bash + git checkout main + git pull origin main + git branch -d feature/your-feature-name + ``` + +### Code Quality Requirements + +Before submitting a PR, ensure: +- All tests pass: `pytest` +- Code coverage remains ≥90%: `pytest --cov` +- Linting passes: `ruff check src/` +- Type checking passes: `mypy src/` + ## References - [Apple Official Documentation](https://developer.apple.com/documentation/xcode/giving-external-agentic-coding-tools-access-to-xcode) diff --git a/Package.swift b/Package.swift index d7a5ac67..d35f187b 100644 --- a/Package.swift +++ b/Package.swift @@ -16,6 +16,9 @@ let package = Package( targets: ["mcpbridge-wrapper-docs"] ), ], + dependencies: [ + .package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"), + ], targets: [ .target( name: "mcpbridge-wrapper",