Skip to content

Comments

Fix/ruff lint autofixes#42

Closed
AduchiMergen wants to merge 2 commits intoAutoForgeAI:masterfrom
AduchiMergen:fix/ruff-lint-autofixes
Closed

Fix/ruff lint autofixes#42
AduchiMergen wants to merge 2 commits intoAutoForgeAI:masterfrom
AduchiMergen:fix/ruff-lint-autofixes

Conversation

@AduchiMergen
Copy link

@AduchiMergen AduchiMergen commented Jan 11, 2026

Summary by CodeRabbit

  • New Features

    • Added comprehensive spec-generation workflow with multi-phase interactive conversation for app requirements and technical details.
    • Added contributor guidance documentation with architecture, testing, and development patterns.
  • Bug Fixes & Updates

    • Migrated authentication from CLI-based credentials to API key-based authentication using OPENCODE_API_KEY.
    • Updated project initialization to use Opencode as the default provider.
    • Refined setup status checks to reflect Opencode SDK and API key availability.
  • Documentation

    • Updated all documentation to reference Opencode instead of legacy provider naming.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 11, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This pull request migrates the project from Claude SDK to Opencode SDK across the entire codebase. Changes include replacing client implementations, authentication mechanisms (API key-based), configuration references, file paths, and documentation. A new OpencodeClient adapter is introduced, along with comprehensive specification creation workflow documentation. Dependencies and default models are updated accordingly.

Changes

Cohort / File(s) Summary
Documentation & Guidelines
.github/copilot-instructions.md, OPENCODE.md, .opencode/agents/*, .opencode/commands/*, .opencode/skills/*
Added comprehensive Opencode contributor guidance and architecture documentation. Updated agent/command references from CLAUDE.md to OPENCODE.md. Introduced extensive spec creation workflow (578 lines) with multi-phase conversation model, output structure, and status tracking. Replaced branding references throughout skill documentation.
Core SDK Adapter
opencode_adapter.py
New module introducing OpencodeClient wrapper around opencode_ai AsyncOpencode client. Implements async context management, message querying, polling-based response streaming, and block type definitions (TextBlock, ToolUseBlock, ToolResultBlock, AssistantMessage, UserMessage). ~169 lines of new public API.
Client & Agent Layer
client.py, agent.py
Replaced claude_agent_sdk imports with opencode_adapter. Updated create_client() to return OpencodeClient. Removed CLI command scaffolding. Settings file renamed (.claude_settings.json → .opencode_settings.json). Updated function signatures and docstrings.
Service Layer - Chat Sessions
server/services/assistant_chat_session.py, server/services/spec_chat_session.py, server/services/expand_chat_session.py
Replaced ClaudeSDKClient type with OpencodeClient throughout. Renamed query_claude() methods to query_opencode(). Updated settings file paths (.claude* → .opencode*). Removed CLI-dependent code paths. Updated tool block handling for Opencode block types. Adjusted initialization and greeting flows for Opencode integration.
Authentication & Startup
auth.py, start.py, start.sh, start.bat, start_ui.sh, autonomous_agent_demo.py
Migrated from Claude CLI authentication to Opencode API Key (OPENCODE_API_KEY env var). Updated error detection patterns, help messages, and prerequisite checks. Replaced claude login guidance with SDK installation (pip install --pre opencode-ai) and environment variable setup.
Server API & Schemas
server/main.py, server/schemas.py, server/routers/assistant_chat.py, server/routers/expand_project.py, server/routers/spec_creation.py
Updated SetupStatus schema: removed claude_cli/credentials fields, added opencode_sdk/opencode_api_key fields. Changed ProjectCreate.spec_method from Literal["claude", "manual"] to Literal["opencode", "manual"]. Updated default CLI from 'claude' to 'opencode'. Replaced Claude references with Opencode in router docstrings and WebSocket protocol descriptions.
Configuration & Dependencies
requirements.txt, .env.example, prompts.py, registry.py
Replaced claude-agent-sdk dependency with opencode-ai. Added pytest-asyncio. Updated CLI_COMMAND default. Changed template directory from .claude/templates to .opencode/templates. Replaced model list with single "default" provider model. Updated environment example with OPENCODE_API_KEY guidance.
UI Components & Hooks
ui/src/components/NewProjectModal.tsx, ui/src/components/SetupWizard.tsx, ui/src/components/SpecCreationChat.tsx, ui/src/components/ExpandProjectChat.tsx, ui/src/components/TypingIndicator.tsx, ui/src/hooks/useProjects.ts, ui/src/lib/api.ts, ui/src/lib/types.ts
Updated spec_method type from 'claude'
Process & Testing
server/services/process_manager.py, test_security.py, tests/test_opencode_adapter.py
Updated process manager documentation for generic model handling. Refactored security tests to separate run_* and test_* functions for reusability. Added new unit tests for OpencodeClient (context, query, receive_response behavior).
Template & Progress Tracking
.opencode/templates/app_spec.template.txt, .opencode/templates/coding_prompt.template.md, .opencode/templates/coding_prompt_yolo.template.md, .opencode/templates/initializer_prompt.template.md
Updated all template references from claude-progress.txt to opencode-progress.txt. Updated in-template instructions to reference Opencode instead of Claude. No changes to template structure or logic.
Project Documentation
README.md, .claude/commands/create-spec.md
Replaced all Claude SDK references with Opencode in README prerequisites, authentication, command examples, and troubleshooting. Updated project structure examples. Simplified fallback template reference in create-spec command.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 From Claude to Opencode, we hop once more,
Adapters and API keys unlock the door,
New templates sing, spec creation flows,
Where autonomous agents plant semantic seeds that grow! 🌱

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 334b655 and 9ed0691.

📒 Files selected for processing (51)
  • .claude/commands/create-spec.md
  • .env.example
  • .github/copilot-instructions.md
  • .opencode/agents/code-review.md
  • .opencode/agents/coder.md
  • .opencode/agents/deep-dive.md
  • .opencode/commands/check-code.md
  • .opencode/commands/checkpoint.md
  • .opencode/commands/create-spec.md
  • .opencode/commands/expand-project.md
  • .opencode/skills/frontend-design/LICENSE.txt
  • .opencode/skills/frontend-design/SKILL.md
  • .opencode/templates/app_spec.template.txt
  • .opencode/templates/coding_prompt.template.md
  • .opencode/templates/coding_prompt_yolo.template.md
  • .opencode/templates/initializer_prompt.template.md
  • CLAUDE.md
  • OPENCODE.md
  • README.md
  • agent.py
  • auth.py
  • autonomous_agent_demo.py
  • client.py
  • opencode_adapter.py
  • prompts.py
  • registry.py
  • requirements.txt
  • server/main.py
  • server/routers/assistant_chat.py
  • server/routers/expand_project.py
  • server/routers/spec_creation.py
  • server/schemas.py
  • server/services/assistant_chat_session.py
  • server/services/expand_chat_session.py
  • server/services/process_manager.py
  • server/services/spec_chat_session.py
  • start.bat
  • start.py
  • start.sh
  • start_ui.sh
  • test_security.py
  • tests/test_opencode_adapter.py
  • ui/src/components/ExpandProjectChat.tsx
  • ui/src/components/NewProjectModal.tsx
  • ui/src/components/SetupWizard.tsx
  • ui/src/components/SpecCreationChat.tsx
  • ui/src/components/TypingIndicator.tsx
  • ui/src/hooks/useProjects.ts
  • ui/src/hooks/useSpecChat.ts
  • ui/src/lib/api.ts
  • ui/src/lib/types.ts

Comment @coderabbitai help to get the list of available commands and usage tips.

@AduchiMergen AduchiMergen deleted the fix/ruff-lint-autofixes branch January 11, 2026 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant