# CloudTeam AI-Toolkit — End-to-End SDLC Productivity Framework

> **Enterprise AI assistance powered by OpenSpec workflow - Build with specifications first, implementation second**

[![Framework Status](https://img.shields.io/badge/Status-Production%20Ready-brightgreen)]()
[![Platform](https://img.shields.io/badge/Platform-Claude%20Code-blue)]()
[![Setup Time](https://img.shields.io/badge/Setup%20Time-%3C%205%20minutes-blue)]()
[![Compliance](https://img.shields.io/badge/Compliance-ISO%2FCMMI%20Level%203-blue)]()

---

## What Is CloudTeam AI-Toolkit?

CloudTeam AI-Toolkit is a **spec-driven development framework** that brings structure and compliance to AI-assisted software development. Instead of ad-hoc code changes, every modification follows a proven three-phase workflow: **Specification → Implementation → Validation**.

### Core Philosophy

**Every change starts with a specification. Every implementation follows a spec. Every deployment is validated against its spec.**

This approach ensures:
- ✅ Clear requirements before coding
- ✅ Automatic compliance validation (ISO/IEC 27001/27701/27002, CMMI Level 3)
- ✅ Complete traceability from idea to production
- ✅ Consistent quality across teams
- ✅ No lost context or tribal knowledge

### What You Get

- **OpenSpec Workflow** - Three commands to manage all changes
- **10 Specialist AI Agents** - Backend, Frontend, QA, Architecture, Platform, Data, Business Analysis, Code Review, Debugging, Documentation
- **12 Claude Skills** - Reusable capabilities for AI, frontend, backend, DevOps, authentication, media processing, and more
- **16 Slash Commands** - Quick shortcuts for common workflows
- **Compliance Built-In** - Automatic validation against industry standards
- **MCP Server Integration** - Database adapters, Atlassian, Figma, Playwright, MongoDB, Context7

---

## 🚀 Installation

### Global Installation

Global installation allows you to use the toolkit across multiple projects without installing it in each one.

#### Step 1: Install Globally

**For macOS/Linux users:** The package will automatically set up user-prefix during installation (no `sudo` needed):

```bash
npm install -g @cloudteam-dev/ai-toolkit
```

The installation will automatically:
- Create `~/.npm-global` directory if it doesn't exist
- Configure npm to use user-prefix
- Add to your shell PATH (`.zshrc` or `.bashrc`)

**Note:** After installation, restart your terminal or run `source ~/.zshrc` (or `source ~/.bashrc`) to load the new PATH.

**For Windows users:** No setup needed - npm already uses user folder by default:

```bash
npm install -g @cloudteam-dev/ai-toolkit
```

#### Step 2: Initialize in Your Project

Navigate to your project directory and run:

```bash
cd my-project

# Initialize the toolkit (copies files to current directory)
cteam-init
# or
cloudteam-ai-init
```

#### Step 3: Keep Updated

When a new version is released on npm, update your toolkit:

```bash
# Check for updates and sync project files
cteam-update
# or
cloudteam-ai-update
```

This command will:
- Check npm registry for the latest version
- Update the global package if newer version exists
- Re-sync project files with the latest toolkit version

**IMPORTANT: After initialization, set up project documentation:**

```bash
# Before starting any work, initialize documentation structure
/docs:init
```

This command creates essential documentation files in the `docs/` folder:
- `code-standards.md` - Coding standards and best practices
- `codebase-summary.md` - High-level codebase overview
- `project-overview-pdr.md` - Product Development Requirements
- `system-architecture.md` - System architecture documentation

Only after documentation initialization should you proceed with development.

### What Gets Installed

The framework copies these directories to your project:

```
your-project/
├── .claude/           # AI agents, commands, and skills
├── docs/              # Documentation templates and compliance standards
├── openspec/          # OpenSpec workflow directory
├── .mcp.json          # MCP server configuration
├── CLAUDE.md          # Project instructions for Claude
├── README.md          # This file
└── LICENSE            # License information
```

---

## 📖 Tutorial: OpenSpec Workflow

The OpenSpec workflow has **three core commands** that guide you through every change:

### 1. `/openspec:proposal` - Create a Specification

**What it does:**
- Analyzes your requirements
- Creates a structured specification document
- Validates against ISO/CMMI compliance standards
- Defines clear acceptance criteria
- Generates implementation plan

**When to use:**
- Starting any new feature
- Fixing bugs that require design decisions
- Making architectural changes
- Any work requiring planning

**Example:**
```
/openspec:proposal Add OAuth2 authentication
```

**What you get:**
A complete proposal in `openspec/changes/` with:
- Change summary and rationale
- Technical approach
- Security considerations
- Compliance checklist
- Implementation steps
- Testing strategy
- Acceptance criteria

**🚨 CRITICAL: Human Review Required**

Before proceeding to implementation, **thoroughly review the entire proposal**. Validate **technical approach**, **security considerations**, **implementation steps**, and **acceptance criteria**. Request AI fixes for any **unreasonable points** or edit manually. **Never skip this step**—proceeding without validation risks implementing incorrect solutions.

---

### 2. `/openspec:apply` - Implement the Specification

**What it does:**
- Reads your approved specification
- Implements features according to spec requirements
- Tracks progress with todo items
- Validates implementation against acceptance criteria
- Updates proposal status

**When to use:**
- After stakeholders approve your proposal
- When you're ready to implement the planned changes

**Example:**
```
/openspec:apply oauth2-authentication
```

**What happens:**
- Agent reads `openspec/changes/oauth2-authentication/`
- Implements exactly what was specified
- Creates todo list to track progress
- Validates each step against requirements
- Updates proposal with implementation notes

---

### 3. `/openspec:archive` - Archive After Deployment

**⚠️ Before Archiving:** Verify all proposal tasks are complete and all acceptance criteria met. If incomplete, ask AI to continue implementation. Never archive partial work.

**What it does:**
- Marks proposal as deployed
- Moves spec to archive with timestamp
- Updates deployment records
- Generates deployment summary

**When to use:**
- After successfully deploying to production
- When the change is complete and validated

**Example:**
```
/openspec:archive oauth2-authentication
```

**What happens:**
- Moves `openspec/changes/oauth2-authentication/` to `openspec/changes/archive/YYMMDD-oauth2-authentication/`
- Creates deployment record
- Preserves full history for future reference

---

## 🤖 AI Agents

CTEAM AI Kit includes **10 specialist agents** organized by department. Each agent has deep expertise in their domain and supports the OpenSpec workflow.

### Development Team

**Backend Developer Agent** (`.claude/agents/dev/agent-backend-developer.md`)
- API design, microservices, security, AI integration
- Expertise: Node.js, Python, Go, databases, authentication
- Shortcut: `/dev/as-dev-backend`

**Frontend Developer Agent** (`.claude/agents/dev/agent-frontend-developer.md`)
- UI/UX implementation, React components, accessibility, performance
- Expertise: React, TypeScript, MUI, TanStack Router, responsive design
- Shortcut: `/dev/as-dev-frontend`

**Quality Engineer Agent** (`.claude/agents/dev/agent-quality-engineer.md`)
- Test automation, compliance validation, security testing
- Expertise: Unit tests, integration tests, E2E tests, test coverage
- Shortcut: `/dev/as-dev-quality`

### Business & Analysis

**Business Analyst Agent** (`.claude/agents/business/agent-business-analyst.md`)
- Requirements engineering, stakeholder analysis, user stories
- Creates specifications for OpenSpec proposals
- Shortcut: `/ba/as-business-analyst`

### Infrastructure & Operations

**Architecture Expert Agent** (`.claude/agents/infrastructure/agent-architecture-expert.md`)
- System design, technical leadership, distributed systems
- Designs technical architecture in proposals
- Shortcut: `/infras/as-infra-architect`

**Platform Engineer Agent** (`.claude/agents/infrastructure/agent-platform-engineer.md`)
- Infrastructure as code, CI/CD, Kubernetes, cloud deployment
- Expertise: Docker, Cloudflare, GCP, automation
- Shortcut: `/infras/as-infra-platform`

### Data Engineering

**Data Engineer Agent** (`.claude/agents/data/agent-data-engineer.md`)
- Data pipelines, ETL, data warehouse, analytics
- Implements data pipeline specifications
- Shortcut: `/data/as-data-engineer`

### Specialized Agents

**Code Reviewer Agent** (`.claude/agents/code-reviewer/`)
- Code quality validation, security review, best practices
- Validates code against specifications

**Debugger Agent** (`.claude/agents/debugger/`)
- Issue investigation, error analysis, diagnostics
- Investigates issues during implementation

**Docs Manager Agent** (`.claude/agents/docs/`)
- Documentation generation, maintenance, updates
- Maintains documentation throughout workflow

### How to Use Agents

**Option 1: Use slash command shortcuts**
```
/dev/as-dev-backend Help me implement the payment gateway API
```

**Option 2: Direct invocation**
```
I need help with backend development for [task description]
```

The framework will automatically route to the appropriate specialist agent.

---

## 🎯 Claude Skills

CTEAM AI Kit includes **12 reusable skills** that provide specialized capabilities:

### AI & Multimodal

**AI Multimodal** (`.claude/skills/ai-multimodal/`)
- Audio processing, video analysis, image generation, document extraction
- Uses Google Gemini API for multimedia processing

### Development

**Backend Development** (`.claude/skills/backend-development/`)
- Node.js, Python, Go, APIs, databases, authentication, security

**Frontend Development** (`.claude/skills/frontend-development/`)
- React, TypeScript, MUI, TanStack Router, modern patterns

**Frontend Design** (`.claude/skills/frontend-design/`)
- UI/UX design, Figma integration, animations with anime.js

**Aesthetic** (`.claude/skills/aesthetic/`)
- Beautiful interface design, proven design principles, micro-interactions

### Infrastructure & DevOps

**DevOps** (`.claude/skills/devops/`)
- Cloudflare Workers, Docker, GCP deployment, edge computing

**Better Auth** (`.claude/skills/better-auth/`)
- Authentication framework integration, OAuth, 2FA, session management

### Utilities

**Media Processing** (`.claude/skills/media-processing/`)
- FFmpeg video/audio processing, ImageMagick image manipulation

**Code Review** (`.claude/skills/code-review/`)
- Quality assessment, security review, receiving feedback

**Debugging** (`.claude/skills/debugging/`)
- Systematic debugging, root cause tracing, verification

**Docs Seeker** (`.claude/skills/docs-seeker/`)
- Documentation search via llms.txt, library documentation lookup

**Sequential Thinking** (`.claude/skills/sequential-thinking/`)
- Structured problem-solving for complex tasks

### How Skills Work

Skills are automatically activated when relevant to your task. You can also invoke them explicitly:

```
Use the ai-multimodal skill to analyze this video file
```

---

## 💬 Slash Commands

CTEAM AI Kit provides **16 slash commands** for quick access to common workflows:

### OpenSpec Workflow (Core)

```bash
/openspec:proposal    # Create new change specification
/openspec:apply       # Implement approved specification
/openspec:archive     # Archive deployed specification
```

### Agent Shortcuts

```bash
/dev/as-dev-backend      # Backend Developer
/dev/as-dev-frontend     # Frontend Developer
/dev/as-dev-quality      # Quality Engineer
/ba/as-business-analyst  # Business Analyst
/infras/as-infra-architect   # Architecture Expert
/infras/as-infra-platform    # Platform Engineer
/data/as-data-engineer   # Data Engineer
```

### Supporting Workflows

**Git Operations:**
```bash
/git/push          # Auto-review, commit, and push
/git/undo          # Interactive undo
/git/discard       # Discard uncommitted changes
/git/revert-last   # Revert last commit
```

**Documentation:**
```bash
/docs/init         # Initialize project documentation
/docs/update       # Update existing documentation
```

**Debugging:**
```bash
/debugger/debug    # Launch debugging session
```
---

## 📁 Project Structure

```
.claude/
├── agents/                     # 10 AI Agents
│   ├── dev/                    # Development (Backend, Frontend, QA)
│   ├── business/               # Business Analysis
│   ├── infrastructure/         # Architecture, Platform Engineering
│   ├── data/                   # Data Engineering
│   ├── code-reviewer/          # Code Review
│   ├── debugger/               # Debugging
│   └── docs/                   # Documentation
├── commands/                   # 16 Slash Commands
│   ├── openspec/               # OpenSpec workflow (CORE)
│   ├── dev/                    # Dev agent shortcuts
│   ├── ba/                     # Business analyst shortcut
│   ├── infras/                 # Infrastructure shortcuts
│   ├── data/                   # Data engineer shortcut
│   ├── git/                    # Git operations
│   ├── docs/                   # Documentation
│   └── debugger/               # Debugging
└── skills/                     # 12 Reusable Skills

docs/
├── compliances/                # ISO/CMMI/PCI-DSS standards
├── brd/                        # Business requirements
├── prd/                        # Product requirements
├── epics/                      # Epic-level documentation
├── tasks/                      # Technical tasks
└── user-stories/               # User stories

openspec/
├── changes/                    # Active proposals
│   └── archive/                # Deployed proposals
└── specs/                      # Specification templates
```

---

## 🔒 Compliance & Standards

CTEAM AI Kit automatically validates against:

- ✅ **ISO/IEC 27001:2022** - Information Security Management
- ✅ **ISO/IEC 27701:2019** - Privacy Information Management
- ✅ **ISO/IEC 27002:2022** - Security Controls
- ✅ **CMMI Level 3** - Defined Process Maturity
- ✅ **PCI-DSS** - Payment Card Industry Data Security (when applicable)

Compliance validation runs automatically in every OpenSpec proposal.

---

## 🔧 Requirements

- **Claude Code** (for AI agents and MCP integration)
- **Git** (for version control)
- **Node.js** 18+ (optional, for dependencies)

### Optional (for MCP servers)
- Docker (for Atlassian MCP server)
- Database drivers (if using database adapter MCP servers)
- Python 3.8+ (for document parsing scripts)

---

## 📚 Documentation

- **CLAUDE.md** - Project instructions for Claude Code
- **.claude/README.md** - Detailed agent documentation
- **docs/compliances/** - ISO/CMMI/PCI-DSS standards
- **openspec/** - OpenSpec proposals and archive

---


## 📞 Support

- **Documentation**: Check docs/ directory first
- **Contact**: phuc.phan@cloudteam.vn / ty.pham@cloudteam.vn
- **Compliance Standards**: See docs/compliances/ for ISO/CMMI documentation

---

## 📜 Version History

- **v1.0.0** *(November 2025)* - Initial release: Claude Code framework with department-based agent organization, MCP integration, OpenSpec workflow, 10 agents, 16 commands, 12 skills

---

## 📝 License

ISC License - See LICENSE file for details

---

## 🔗 Quick Links

- [OpenSpec Workflow](.claude/commands/openspec/) - Core spec-driven development commands
- [AI Agents](.claude/agents/) - 10 specialist agents
- [Claude Skills](.claude/skills/) - 12 reusable skills
- [Slash Commands](.claude/commands/) - 16 commands total
- [Compliance Standards](docs/compliances/) - ISO/IEC 27001/27701/27002, CMMI, PCI-DSS

---

**Framework Version**: 1.0.0
**Last Updated**: November 29, 2025
**Platform**: Claude Code, Claude Desktop, Claude.ai
**Methodology**: OpenSpec Workflow (Proposal → Apply → Archive)
