@buildsource/agentize
v0.2.7
Published
Agentize any project — scaffolds opencode AI agent configuration with Spec-Driven Development
Downloads
1,186
Maintainers
Readme
@buildsource/agentize
Agentize any project with AI agents powered by opencode and Claude Code. Scaffolds the complete agent infrastructure, Spec-Driven Development structure, and project tooling.
npx @buildsource/agentize init
npx @buildsource/agentize specializeImagine adding an entire AI team inside your system — with Agentize you can build:
- AI Coding Copilots that write, review, and explain code
- Smart Virtual Agents for websites, WhatsApp, and customer support
- Sales Agents that qualify and engage leads automatically
- Real Estate Assistants that match properties and answer clients
- Document Analyzers that parse contracts, PDFs, and reports
- Enterprise Automations wired to APIs and databases
- Autonomous Agents that execute tasks, make decisions, and collaborate
- AI-Native SaaS Platforms with embedded intelligence from day one
All built with TypeScript, memory, tools, workflows, and integration with the leading AI models.
Agentize is not just a library. It's the foundation for building the next generation of intelligent software.
Features
- Smart Stack Detection — analyzes package.json, source code, config files, env.example, and directory structure
- Multi-Language Support — JavaScript/TypeScript, Python, Rust, Go, Ruby, PHP, and generic fallback
- Dual AI Tool Support — generates config for opencode, Claude Code, or both with
--tool - AI Agents — orchestrator, subagents for frontend, backend, database, QA, DevOps, billing, SEO, security, 3D, performance, and more
- Spec-Driven Development (SDD) — creates
docs/specs/with feature spec and ADR templates - Task Infrastructure — CHANGELOG, ROADMAP, task board with templates
- Dotfiles — .prettierrc, .nvmrc, .vscode/, .gitignore
- Auto-Evolution — agents learn from mistakes and create new agents on demand
- Agent Upgrade — update existing agent prompts from latest templates safely
Commands
init
Creates the initial agent structure with 6 core agents (@orchestrator, @explore, @docs, @planner, @task-runner, @data-migration):
npx @buildsource/agentize init
npx @buildsource/agentize init --yes
npx @buildsource/agentize init --yes --lang js-tsspecialize
Detects your project's stack and customizes the agent configuration with relevant specialized agents:
npx @buildsource/agentize specialize
npx @buildsource/agentize specialize --yesScans language config files, analyzes dependencies, and inspects directory structure to automatically select matching agents:
▸ @frontend — next.config found, App Router dir found
▸ @backend — API routes dir found, next.config found
▸ @database — DrizzleORM in package.json
▸ @devops — Dockerfile found
▸ @security — Auth files found
▸ @performance — .env.example: Queue/Redis
▸ @reviewer — Prettier/ESLint detectedWithout --yes, shows the detection report and lets you select which agents to include interactively.
upgrade
Updates existing agent prompts to the latest template versions with automatic backup:
npx @buildsource/agentize upgrade
npx @buildsource/agentize upgrade --agent frontendChanged files are backed up to .opencode/.backups/ before overwriting.
Options
| Flag | Description |
|------|-------------|
| -y, --yes | Skip all prompts and use defaults |
| --dry-run | Show what would be created without writing files |
| -l, --lang <name> | Force language profile (js-ts, python, rust, go, ruby, php) |
| --tech <items> | Comma-separated additional tech stack items |
| -t, --tool <name> | AI tool to configure (opencode, claude, both). Default: opencode |
AI Tool Selection
By default, agentize generates configuration for opencode. Use --tool to change:
npx @buildsource/agentize init --tool opencode # Default
npx @buildsource/agentize init --tool claude # Claude Code only
npx @buildsource/agentize init --tool both # Both tools--tool claude— createsCLAUDE.md,AGENTS.md, and.claude/(noopencode.jsonor.opencode/)--tool both— generates both.opencode/and.claude/structures
What Gets Created
--tool opencode (default)
my-project/
├── AGENTS.md # Agent system overview
├── CLAUDE.md # opencode reference to AGENTS.md
├── opencode.json # opencode configuration
├── .opencode/
│ ├── package.json # opencode plugin dependency
│ ├── agents/ # AI agent prompts
│ │ ├── orchestrator.md # The maestro — decomposes tasks & delegates
│ │ ├── frontend.md # UI/UX specialist
│ │ ├── backend.md # API & server-side specialist
│ │ ├── ... # More agents based on your stack
│ │ ├── evolutions/README.md # Agent evolution tracking
│ │ └── lessons/README.md # Lessons learned
│ ├── skills/ # opencode skills
│ │ ├── build-diagnostics/ # Build error troubleshooting
│ │ ├── git-rules/ # Git protocol rules
│ │ └── docker-ops/ # Docker operations
│ └── tasks/ # Task management
│ ├── CHANGELOG.md # Keep a Changelog
│ ├── ROADMAP.md # Milestones & vision
│ ├── INDEX.md # Task catalog
│ ├── logs/ # Task execution logs
│ └── TEMPLATES/ # Task & bug templates
├── docs/specs/ # Spec-Driven Development
│ ├── INDEX.md # Spec index
│ └── TEMPLATES/ # Feature spec & ADR templates
├── .prettierrc # Prettier config
├── .nvmrc # Node version
└── .vscode/ # VS Code settings
├── extensions.json
└── settings.json--tool claude
my-project/
├── AGENTS.md # Agent system overview
├── CLAUDE.md # Full Claude Code instructions
└── .claude/
├── settings.json # Claude Code settings
└── agents/ # AI agent prompts
├── orchestrator.md # The maestro
├── frontend.md # UI/UX
├── backend.md # API
├── ...
├── evolutions/README.md
└── lessons/README.md--tool both
Combines both structures above — .opencode/ for opencode and .claude/ for Claude Code.
Agent System
| Agent | Role | Created When |
|-------|------|-------------|
| @orchestrator | Decomposes tasks, delegates, consolidates | Always |
| @frontend | React, UI/UX, components | React/Next.js/Vue detected |
| @backend | API routes, services, auth | Server framework detected |
| @database | ORM, migrations, queries | DrizzleORM, Prisma, etc. |
| @qa | Tests, coverage, E2E | Vitest, Jest, Playwright |
| @devops | Docker, deploy, CI/CD | Dockerfile, CI found |
| @billing | Stripe, payments | Stripe detected |
| @security | OWASP, auth, vulnerabilities | Auth lib, env patterns |
| @designer | Design system, tokens | Tailwind, Framer Motion |
| @seo | Meta tags, structured data | SEO lib, metadata exports |
| @viewer3d | Three.js, WebGL | Three.js detected |
| @performance | CWV, bundle, caching | Queue lib, Redis |
| @reviewer | Code review, lint | ESLint, Prettier |
| @explore | Codebase investigation | Always |
| @planner | Strategic planning | Always |
| @task-runner | Autonomous task execution | Always |
| @docs | Documentation & specs | Always |
| @data-migration | Data ETL | Always |
The orchestrator can create new agents on demand as patterns emerge.
Language Profiles
| Profile | Detected By | Unique Agents |
|---------|-------------|---------------|
| js-ts | package.json | frontend, billing, designer, seo, viewer3d, performance |
| python | pyproject.toml, setup.py, requirements.txt | data-science, ml-ops |
| rust | Cargo.toml | systems, cli |
| go | go.mod | cli |
| ruby | Gemfile | — |
| php | composer.json | — |
| generic | Fallback | — |
Stack detection also works universally — Dockerfiles, test directories, .env files, and CI/CD configs are detected regardless of language.
Spec-Driven Development
Every feature starts with a spec in docs/specs/:
# Spec: Feature Name
## Visão Geral
<!-- O que é esta feature e por que estamos fazendo? -->
## Modelo de Dados
<!-- Schemas, types, validações, relacionamentos -->
## UI/UX
<!-- Layout, estados, comportamentos, responsividade -->
## Regras de Negócio
<!-- Constraints, validações, autorizações -->
## Critérios de Aceite
- [ ] Critério 1
- [ ] Critério 2Templates for feature specs and Architecture Decision Records (ADRs) are provided in docs/specs/TEMPLATES/.
Next Steps
After running agentize init:
cd my-project
npx @buildsource/agentize specialize # Optional: detect stackGeneral next steps:
- For opencode:
cd .opencode && npm install && cd .., then open the project with opencode - For Claude Code: the configuration is ready — just open the project with Claude Code
- For both: both setups are ready. Install opencode dependencies if needed:
cd .opencode && npm install
Requirements
- Node.js 18+
- npm or yarn
- opencode (optional, for opencode mode)
- Claude Code (optional, for claude mode)
Project Links
- Architecture — codebase overview and module docs
- Development — setup, testing, and contribution guide
- Contributing — how to contribute
- Changelog — version history
License
MIT
