Skip to content

Restructure to monorepo and update dependencies#79

Merged
JeremyDev87 merged 1 commit into
masterfrom
fix/77
Dec 22, 2025
Merged

Restructure to monorepo and update dependencies#79
JeremyDev87 merged 1 commit into
masterfrom
fix/77

Conversation

@JeremyDev87

@JeremyDev87 JeremyDev87 commented Dec 22, 2025

Copy link
Copy Markdown
Owner

Restructure to monorepo and update dependencies

📋 Summary

This PR restructures the project into a monorepo architecture and updates key dependencies. The main changes include reorganizing the project structure, creating a new codingbuddy-rules package, and updating dependencies to their latest versions.

Resolves: #77

🔄 Changes

Project Structure Reorganization

  • Moved .ai-rules/packages/rules/.ai-rules/

    • All AI rules files are now organized under the new packages/rules package
    • Maintains backward compatibility through package exports
  • Moved mcp-server/apps/mcp-server/

    • MCP server is now organized as an application in the monorepo
    • Updated all internal references and paths
  • Updated package.json workspaces configuration

    "workspaces": [
      "packages/*",
      "apps/*"
    ]

New Package: codingbuddy-rules

Created a new publishable package packages/rules/ that exports AI rules:

  • package.json: Package configuration with proper exports
  • index.js: Exports rulesPath pointing to .ai-rules directory
  • index.d.ts: TypeScript definitions
  • .ai-rules/: All AI rules files (agents, adapters, schemas, rules)

This package can be published to npm and used by other projects that want to use CodingBuddy's AI rules.

Dependency Updates

  • @modelcontextprotocol/sdk: 1.24.31.25.1

    • Added new peer dependencies: @hono/node-server, json-schema-typed
    • Updated internal dependencies
  • zod: ^3.22.0^4.2.1

    • Major version update to Zod v4
    • Updated type definitions and validation logic
  • New dependencies:

    • @hono/node-server@^1.19.7
    • json-schema-typed@^8.0.2

Code Changes

MCP Server Rules Service (apps/mcp-server/src/rules/rules.service.ts)

Updated the rules directory resolution logic to support the new monorepo structure:

  1. Environment variable support: CODINGBUDDY_RULES_DIR takes precedence
  2. Package-based resolution: Uses codingbuddy-rules package to get rules path
  3. Development fallback: Multiple path candidates for development environments
    • Supports both built (dist/src/rules) and development (src/rules) paths
    • Handles monorepo structure (apps/mcp-serverpackages/rules)

Documentation Updates

Updated path references in multiple documentation files:

  • .antigravity/rules/instructions.md
  • .claude/rules/custom-instructions.md
  • .codex/rules/system-prompt.md
  • .github/workflows/*.yml (canary, dev, release)
  • .kiro/rules/guidelines.md
  • .q/rules/customizations.md
  • CLAUDE.md, CONTRIBUTING.md
  • All multilingual README files (README.*.md)
  • Documentation files in docs/ directory

Yarn Configuration

  • Added .yarnrc.yml at root level
  • Removed mcp-server/.yarnrc.yml (consolidated to root)
  • Updated yarn.lock with new workspace structure

📊 Impact

Files Changed

  • 147 files changed
  • 682 insertions(+), 7,121 deletions(-)
  • Most deletions are from removing duplicate yarn.lock in mcp-server/

Breaking Changes

⚠️ Path changes: Projects referencing .ai-rules/ directly will need to update paths or use the codingbuddy-rules package.

Migration Guide

For projects using CodingBuddy rules:

  1. Option 1: Use the package (Recommended)

    yarn add codingbuddy-rules
    const { rulesPath } = require('codingbuddy-rules');
  2. Option 2: Environment variable

    export CODINGBUDDY_RULES_DIR=/path/to/packages/rules/.ai-rules
  3. Option 3: Update paths

    • Change references from .ai-rules/ to packages/rules/.ai-rules/

✅ Testing

  • Verified MCP server can locate rules in new structure
  • Verified workspace dependencies resolve correctly
  • Verified all documentation paths are updated
  • Verified CI/CD workflows work with new structure
  • Tested development and production builds

🔗 Related

@JeremyDev87 JeremyDev87 self-assigned this Dec 22, 2025
@JeremyDev87
JeremyDev87 force-pushed the fix/77 branch 2 times, most recently from b3f5997 to cbe87b5 Compare December 22, 2025 06:42
- Reorganize project structure (packages/rules, apps/mcp-server)
- Create codingbuddy-rules package
- Update MCP SDK and zod dependencies
- Fix workspace configuration

resolve #77
@JeremyDev87
JeremyDev87 marked this pull request as ready for review December 22, 2025 06:50
@JeremyDev87
JeremyDev87 merged commit 7844cd5 into master Dec 22, 2025
9 checks passed
@JeremyDev87
JeremyDev87 deleted the fix/77 branch December 22, 2025 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

connect fail

2 participants