← 返回
未分类 中文

Ai Code Generator

AI code generator using Plan-and-Solve + ReAct for generating complete, runnable code from requirements and specifications.
AI代码生成器,采用计划‑解决(Plan‑and‑Solve)与ReAct方法,从需求和规格说明生成完整、可运行的代码。
banxian87
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 401
下载
💾 0
安装
1
版本
#latest

概述

AI Code Generator

AI-powered code generation tool that combines structured planning (Plan-and-Solve) with tool use (ReAct) to generate complete, production-ready code from natural language requirements.


Features

📝 Requirement Analysis

  • Understanding: Parse natural language requirements
  • Clarification: Ask clarifying questions when needed
  • Specification: Generate technical specification

🏗️ Code Generation

  • Full-stack Support: Frontend, backend, database
  • Multiple Languages: JavaScript, Python, TypeScript, Go
  • Best Practices: Clean code, design patterns
  • Complete Projects: Full project structure

🔧 Tool Integration

  • File Generation: Create multiple files
  • Dependency Management: package.json, requirements.txt
  • Testing: Generate unit tests
  • Documentation: README, API docs

Usage

Basic Code Generation

const generator = new CodeGenerator();

const project = await generator.generate({
  requirements: 'Create a REST API for a todo app with user authentication',
  language: 'javascript',
  framework: 'express',
  database: 'mongodb'
});

console.log(project.files);
console.log(project.instructions);

Advanced Options

const generator = new CodeGenerator({
  style: 'professional',
  includeTests: true,
  includeDocs: true,
  verbose: true
});

const project = await generator.generate({
  requirements: 'Build a real-time chat application',
  language: 'typescript',
  framework: 'nestjs',
  database: 'postgresql',
  features: ['websocket', 'jwt-auth', 'message-history']
});

Example Output

project/
├── src/
│   ├── controllers/
│   │   └── todo.controller.js
│   ├── models/
│   │   └── todo.model.js
│   ├── routes/
│   │   └── todo.routes.js
│   └── middleware/
│       └── auth.middleware.js
├── tests/
│   └── todo.test.js
├── package.json
├── .env.example
└── README.md

Workflow

User Requirements
    ↓
Plan-and-Solve Agent
    ├─ Phase 1: Analyze requirements
    ├─ Phase 2: Design architecture
    ├─ Phase 3: Plan file structure
    └─ Phase 4: Generate code
    ↓
ReAct Agent (for each file)
    ├─ Research best practices
    ├─ Generate code
    ├─ Review and fix
    └─ Write to file
    ↓
Complete Project

Installation

clawhub install ai-code-generator

License

MIT


Version

1.0.0


Created

2026-04-02

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-03 09:13 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Task Planner

banxian87
智能任务规划器,采用计划‑解决模式,将目标拆解为可操作步骤并配有时间线和优先级。
★ 0 📥 403

Code Review Expert

banxian87
基于 Manager-Worker 模式的多智能体代码审查系统,从语法、逻辑、安全和性能等方面提供全面的代码分析。
★ 0 📥 660

Meeting Assistant

banxian87
AI会议助手,生成议程、记录纪要、跟踪行动项,采用 Manager-Worker 模式。
★ 0 📥 445