Skip to content

Conversation

@brainless
Copy link
Owner

Summary

This PR introduces a comprehensive project management workflow system with requirements gathering, workflow creation capabilities, and significantly expands LLM model support. It also includes substantial cleanup by removing deprecated crates and refactoring agent architecture.

Project Management Features

  • Added project management types and workflow UI with interactive components
  • Implemented requirements gathering agent with database-backed Q&A system
  • Created Requirements page (formerly Specifications) with user clarification workflow
  • Added workflow creation agent integration
  • Established foreign key relationships between agent_tool_calls and project_requirements_qna tables
  • Converted requirements gathering from typed JSON to tool calling for better reliability

New LLM Model Support

  • Google Gemini 3: Added support for Gemini 3 Pro and Flash models with complete API integration
  • Voyage AI: Added text embeddings support for enhanced semantic capabilities
  • Per-Model Defaults: Implemented per-model default configurations for consistent behavior
  • JSON Mode: Added JSON mode support across all providers (OpenAI, xAI/Grok, Cerebras/GLM, ZAI/GLM)

Agent Architecture Improvements

  • Added StructuredJsonAgent for type-safe JSON generation with validation
  • Refactored agent execution handlers into separate files per agent type for better maintainability
  • Added shared config module for nocodo-agents
  • Added TypeScript generation library function for API type generation
  • Improved agent-to-GUI integration through consistent database patterns

Code Quality & Refactoring

  • Major Cleanup: Removed entire manager crate (~15k lines) and nocodo-github-actions crate
  • Renamed modules for clarity:
    • sqlitesqlite_analysis (to reflect read-only restrictions)
    • user_clarificationrequirements_gathering (better reflects purpose)
  • Refactored user interaction types into shared-types crate
  • Removed old specs and documentation files (moved to proper locations)

Bug Fixes

  • Fixed Gemini 3 API integration and compilation errors
  • Fixed requirements gathering agent to work with GUI via database
  • Fixed ZAI/GLM response_format parameter passing
  • Pinned codex dependencies to commit 6951872 to fix ExecEnv API incompatibility
  • Applied code formatting and added GUI dependencies

GUI Updates

  • Added ProjectSpecifications and ProjectWorkflow pages
  • Added WorkflowStepItem component for visual workflow representation
  • Enhanced ProjectDetailsLayout with new navigation
  • Updated navigation to include Requirements page

Test Plan

  • Test requirements gathering workflow end-to-end in GUI
  • Test workflow creation agent with various project types
  • Verify Gemini 3 Pro and Flash models work correctly
  • Verify Voyage AI embeddings integration
  • Test JSON mode across all LLM providers
  • Verify all existing tests pass
  • Test GUI navigation and new pages functionality

🤖 Generated with Claude Code

brainless and others added 30 commits January 11, 2026 21:44
- Create Rust types for Project, Workflow, and WorkflowStep in shared-types
- Generate TypeScript types for frontend
- Add project management pages with workflow editor
- Implement workflow branching visualization UI
- Add WorkflowStepItem reusable component
- Update navigation to include Projects section

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implement StructuredJsonAgent that constrains LLM responses to JSON
conforming to specified TypeScript types from shared-types crate.

Features:
- TypeValidator module for JSON syntax and structure validation
- StructuredJsonAgent with retry logic for invalid responses (max 3 retries)
- System prompt generation with embedded TypeScript type definitions
- Binary runner (structured-json-runner) for CLI usage
- Integration with AgentFactory for agent creation
- Updated AgentConfig enum with StructuredJson variant

Components:
- nocodo-agents/src/structured_json/validator.rs: JSON validation
- nocodo-agents/src/structured_json/mod.rs: Agent implementation
- nocodo-agents/src/structured_json/tests.rs: Unit tests
- nocodo-agents/bin/structured_json_runner.rs: CLI binary

Updated files:
- nocodo-agents/src/lib.rs: Export structured_json module
- nocodo-agents/src/factory.rs: Add StructuredJson agent type and factory method
- nocodo-agents/Cargo.toml: Add binary definition
- shared-types/src/agent.rs: Add StructuredJsonAgentConfig
- shared-types/src/lib.rs: Export StructuredJsonAgentConfig
- nocodo-agents/src/tesseract/mod.rs: Fix test function call

All 80 library tests and 11 structured_json tests passing.
- Include integration tests by adding tests module to mod.rs
- Move inline tests to separate tests.rs file for better organization
- Add StructuredJsonAgentConfig to TypeScript generator for frontend integration
- Clean up dead code warnings:
  - Remove unused AgentType import from runner
  - Remove unused methods from TypeValidator
  - Mark future-use fields with #[allow(dead_code)]
- Make extract_text_from_content pub(crate) for test access

All 19 tests passing. Zero build warnings. Production ready.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Remove GitHub workflows, release scripts, and types from shared-types
that were only used by the manager crate. Retain project management
types as they are used by nocodo-api.

Changes:
- Remove manager CI/release GitHub workflows
- Remove manager release script
- Remove auth module from shared-types (User, Team, Permission types)
- Remove unused types from shared-types (ServerStatus, ProjectCommand, etc.)
- Update TypeScript generation to reflect remaining types

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Move agent execution form from Home to Agents page
- Add workflow generation form to Home page
- Reorganize agent_execution.rs into module folder
- Add workflow-creation agent with Workflow/WorkflowStep types
- Remove structured-json agent (now replaced by workflow-creation)
- Connect Home page to workflow-creation agent with session polling
- Update ProjectWorkflow to display AI-generated workflows from session
- Pass type_names from request config in workflow agent handler
- Update nocodo-agents README with all available agents
- Add TypeScript generation tests for workflow types
- Minor formatting fixes across crates

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Relocate AskUserRequest, AskUserResponse, UserQuestion, QuestionType,
QuestionValidation, and UserQuestionResponse from manager-tools to
shared-types for sharing across agents, api, and gui. Add TS derive
macros for TypeScript generation. Simplify to only support Text
question type initially, with other variants commented out.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create shared config module with load_config() and get_zai_config() functions
- Update all binaries (codebase_analysis, sqlite_analysis, structured_json) to use shared config
- Add new user_clarification_runner binary with default prompt "Build me a website"
- Add UserClarificationAgent to nocodo-agents with JSON parsing and format enforcement
- Add ResponseFormat enum and response_format field to nocodo-llm-sdk types
- Disable GLM thinking mode and enforce JSON response format
- Update all agents to include response_format field in CompletionRequest
Remove QuestionValidation struct and all validation-related fields from user interaction types:
- Remove UserQuestion::validation field
- Remove AskUserRequest::prompt, required, and timeout_secs fields
- Remove AskUserResponse::response_time_secs field
- Remove UserQuestionResponse::valid and validation_error fields

Update all consuming code to use simplified types and regenerate TypeScript definitions.
Remove all validation-related code and fields from ask_user tool:
- Remove response_time_secs tracking
- Remove valid and validation_error fields from responses
- Remove validate_response function and all validation logic
- Update README.md to remove validation examples
- Remove QuestionValidation import from types/mod.rs
Remove complex JSON extraction logic and use ZAI API's JSON mode to ensure
model returns valid JSON directly. Implement retry mechanism with error feedback
to handle parsing failures gracefully. Simplify system prompt to only include
TypeScript type definitions.
- Set response_format to JsonObject in StructuredJsonAgent
- Remove unused import and method from UserClarificationAgent
- Prioritize ZAI provider when API key is configured, fallback to specified provider or Anthropic default
…as/GLM, ZAI/GLM) with consistent TypeScript interface tests
The GlmClientTrait implementation for ZaiGlmClient was incorrectly
hardcoding response_format to None instead of converting the request's
response_format parameter. This prevented JSON mode from working when
using the builder pattern with ZAI provider.

Now properly converts GlmResponseFormat to ZaiResponseFormat, enabling
JSON mode support as documented in the ZAI API reference.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Integrate the user_clarification agent into the API server following established patterns. The agent analyzes user requests to determine if clarification questions are needed before proceeding.

- Add UserClarificationAgentConfig type to shared-types with empty config struct
- Add UserClarification variant to AgentConfig enum
- Create execute_user_clarification_agent handler with /agents/user-clarification/execute endpoint
- Add create_user_clarification_agent helper function
- Register agent in supported agents list and main router
- Add system prompt debug logging to user_clarification_runner
- Update tests with proper type imports

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Breaks down the large mod.rs file (367 lines) into individual agent-specific modules following the existing workflow_creation_agent.rs pattern. Each agent handler now has its own file for better maintainability and code organization.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add user-clarification to AgentConfig union type
- Create ProjectSpecifications page with iterative Q&A flow
- Update Home page to navigate to specifications instead of workflow
- Add specifications route and sidebar navigation
- Implement conversation history tracking for multi-round clarification
- Use fieldset/legend pattern for proper form layout

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The manager crate has been migrated into smaller specialized crates (nocodo-api, nocodo-agents, manager-tools). This commit removes the now-obsolete manager crate and cleans up related references.

Changes:
- Remove manager from workspace members in Cargo.toml
- Delete entire manager/ directory (source, tests, config)
- Delete nocodo-github-actions crate (dependency of manager)
- Remove 9 task files specific to manager crate implementation
- Update NOTICE.md to reference nocodo agents instead of manager
- Delete PLAYBOOK.md and ROADMAP.md documentation files

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implements complete Voyage AI embeddings integration with support for all models
including voyage-4-lite, voyage-4, voyage-code-3, and domain-specific models.

Features:
- VoyageClient with HTTP client and error handling
- VoyageEmbeddingBuilder with fluent API
- Support for all Voyage models with model constants
- Flexible input (single/multiple texts)
- Configurable dimensions (256/512/1024/2048)
- Input types (query/document) for retrieval optimization
- Multiple output formats (float/int8/uint8/binary/ubinary)
- Comprehensive example with 6 usage patterns
- Full test coverage for client and builder

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…strictions

The sqlite module only allows SQL SELECT and PRAGMA statements for database
analysis. Renaming it to sqlite_analysis better reflects this read-only,
analysis-focused purpose and avoids confusion with general SQL operations.

Changes:
- Rename manager-tools/src/sqlite/ to manager-tools/src/sqlite_analysis/
- Rename manager-tools/src/types/sqlite.rs to sqlite_analysis.rs
- Update all module declarations and imports across manager-tools and nocodo-agents
- Update internal module references in formatter.rs and documentation

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…reflect its purpose

The UserClarificationAgent primarily focuses on gathering requirements through clarifying questions about business process automation, making requirements_gathering a more accurate module name.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Replace the rigid JSON-forcing pattern with a flexible tool calling approach
that aligns with the sqlite_analysis agent architecture.

Changes:
- Add ToolExecutor dependency to UserClarificationAgent
- Replace JSON-based system prompt with task-oriented objectives
- Implement execute_tool_call() for tool execution with database logging
- Implement get_tool_definitions() helper method
- Replace build_messages() to read from database
- Rewrite execute() with agentic loop (max 10 iterations)
- Update tools() to return AskUser tool
- Remove obsolete validate_and_retry() and parse_response() methods
- Update factory methods to pass tool_executor
- Update tests to verify tool calling behavior

Benefits:
- LLM can provide natural language responses alongside tool calls
- Multi-turn conversational interactions supported
- Extensible for future tools
- Consistent pattern across all agents
… Q&A

Previously, the agent called ask_user tool which blocked waiting for CLI input,
preventing GUI integration. Now questions are stored in database and fetched via API.

Changes:
- Add waiting_for_user_input status to agent_sessions table with migration
- Create project_requirements_qna table to store questions and answers
- Modify agent to pause execution when ask_user tool is called
- Add GET /agents/sessions/{id}/questions endpoint to fetch questions
- Add POST /agents/sessions/{id}/answers endpoint to submit answers and resume agent
- Update GUI to poll for waiting_for_user_input status and fetch questions
- Add ToolExecutor dependency to UserClarificationAgent
- Fix API handler to preserve waiting_for_user_input status

The agent now pauses when questions are needed, stores them in database,
and resumes execution after user submits answers via GUI.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…uirements_qna

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
brainless and others added 5 commits January 18, 2026 13:26
- Add gemini module with types, client, builder, and tool format adapter
- Support gemini-3-pro-preview and gemini-3-flash-preview models
- Implement thinking level controls (minimal/low/medium/high)
- Add message builder pattern for ergonomic API usage
- Include integration tests and usage examples
- Register model metadata with full capability information
- Export GeminiClient from main lib
- Make GeminiContent fields (role, parts, text) optional to handle different response formats between Gemini 3 Pro and Flash
- Make GeminiUsageMetadata fields optional for better API compatibility
- Add missing response_format fields to all LLM request structs to fix compilation errors
- Update test assertions to handle optional response fields
- Enable running Gemini 3 integration tests with API keys
Implement automatic application of model-specific defaults for
temperature, max_tokens, and thinking_level. Gemini 3 Pro now defaults
to 1024 tokens (sufficient for thinking + response) and "high" thinking
level, while Gemini 3 Flash defaults to 512 tokens and "medium" thinking.

This fixes the Gemini 3 Pro integration test failure caused by
insufficient token budget for the model's dynamic thinking feature.

Changes:
- Add default_thinking_level field to ModelMetadata
- Implement automatic default application in Gemini MessageBuilder
- Set sensible defaults for Gemini 3 Pro and Flash models
- Update Gemini integration tests to use defaults (all 4 tests now pass)
- Add comprehensive Gemini documentation to README
- Add Gemini API reference docs and developer guide
- Add test runner support for Gemini integration tests
- Fix response parsing in Gemini examples

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Run rustfmt across codebase to improve code readability and consistency.
Add baseline-browser-mapping dev dependency to GUI package for browser compatibility.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@github-actions
Copy link

📊 Code Complexity Analysis

  • Lines added: 11673
  • Lines removed: 36248
  • Net change: -24575

💡 Suggestion: This is a large PR with 11673 added lines. Consider:

  • Breaking it into smaller, focused PRs
  • Adding comprehensive tests for the new functionality
  • Updating documentation as needed

Automated analysis by GitHub Actions

@github-actions
Copy link

🤖 Automated Code Review Summary

This automated review was generated to help ensure code quality and security standards.

Rust Code Analysis

  • ⚠️ Code formatting: Some Rust files are not formatted according to rustfmt standards.

    • Run cargo fmt to fix formatting issues.
  • ⚠️ Linting: Clippy found potential issues in Rust code.

    • Run cargo clippy --workspace --all-targets -- --deny warnings to see detailed warnings.

TypeScript/JavaScript Code Analysis

Security Analysis

  • ⚠️ Potential secrets: Found references to passwords, secrets, or tokens.

    • Please verify no hardcoded credentials are present.
  • ℹ️ Debug output: Found debug print statements.

    • Consider removing or replacing with proper logging.

Recommendations

  • Run the full CI pipeline to ensure all tests pass
  • Consider adding tests for any new functionality
  • Update documentation if API changes are involved
  • Follow the development workflow described in CLAUDE.md

This review was automatically generated. Please address any issues before merging.

@brainless brainless merged commit 7e00d4e into main Jan 18, 2026
4 checks passed
@brainless brainless deleted the project-management branch January 18, 2026 11:56
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