An open API service indexing awesome lists of open source software.

https://github.com/deepakb/antigravity-studio

A high-performance CLI and toolkit for deploying specialized AI agents, expert skills, and automated quality gates in TypeScript projects.
https://github.com/deepakb/antigravity-studio

ai-agents ai-engineering automation cli-tool developer-tools enterprise-ai nextjs quality-gates react typescript

Last synced: 11 days ago
JSON representation

A high-performance CLI and toolkit for deploying specialized AI agents, expert skills, and automated quality gates in TypeScript projects.

Awesome Lists containing this project

README

          

# ⚑ Nexus Studio

> **The AI Dev OS for Every Team** β€” One `npx` command installs 29 specialist AI agents, 51 expert skill libraries, and 12 automated quality gates into any project. Works with Cursor, Windsurf, Copilot, and Claude Code β€” consistent AI behaviour across every developer on your team.

[![npm version](https://img.shields.io/npm/v/@nexus/studio.svg)](https://www.npmjs.com/package/@nexus/studio)
[![Node.js](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen)](https://nodejs.org)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.7-blue)](https://www.typescriptlang.org)
[![Tests](https://img.shields.io/badge/tests-43%20passed-brightgreen)](#-testing)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](#-contributing)

---

## πŸ—ΊοΈ Quick Navigation

| I want to… | Go here |
|---|---|
| Bootstrap a new project in 60 seconds | [πŸš€ Quick Start](#-quick-start) |
| Understand how the system works | [πŸ›οΈ Architecture](#️-architecture) |
| See all 24 CLI commands | [πŸ’» CLI Reference](#-cli-reference) |
| Enforce standards across a team | [🏒 Enterprise Configuration](#-enterprise-configuration) |
| Audit an existing project | [`studio doctor`](#studio-doctor) Β· [`studio validate`](#studio-validate) |
| Browse agents, skills & profiles | [πŸ€– Agents](#-specialist-agents-29) Β· [🧠 Skills](#-expert-skills-51) Β· [πŸ“¦ Profiles](#-supported-stacks--profiles) |
| Contribute a skill or agent | [🀝 Contributing](#-contributing) |

---

## What Is Nexus Studio?

Nexus Studio is a polyglot enterprise CLI that installs a **local AI agent system** (`.agent/`) into any project. It gives every developer on your team the same specialist AI agents, skill libraries, and automated quality gates β€” regardless of IDE, framework, or language.

**The problem it solves:** Every developer has a different AI setup β€” one uses Cursor with custom rules, another Copilot with no context, another Claude with a half-written system prompt. The result: inconsistent AI behaviour across the team. Nexus Studio fixes this with a **single canonical `.agent/` source of truth** that every IDE generates its config from.

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Nexus Studio CLI β”‚
β”‚ npx @nexus/studio init β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚ detects + installs
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ .agent/ (local) β”‚
β”‚ agents/ Β· skills/ Β· workflows/ β”‚
β”‚ scripts/ Β· mcp/ β”‚
β””β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
β”‚ β”‚ β”‚ β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β” β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β” β”Œβ–Όβ”€β”€β”€β”€β” β”Œβ–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Cursor β”‚ β”‚Windsurfβ”‚ β”‚Copilβ”‚ β”‚Claude Codeβ”‚
β”‚ .mdc β”‚ β”‚.rules β”‚ β”‚ot β”‚ β”‚CLAUDE.md β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

---

## πŸ“Š Registry at a Glance

| | Count |
|---|---|
| πŸ€– Specialist Agents | **29** across 8 domains |
| 🧠 Expert Skills | **51** across 13 categories |
| πŸ—‚οΈ Architectural Profiles | **15** + Custom |
| βœ… Quality Gates | **12** (3 enforcement tiers) |
| ⚑ Slash Commands | **15** |
| 🌐 Polyglot Stacks | **5** (Node · Python · Java · .NET · Flutter) |
| πŸ–₯️ IDE Integrations | **4** (Cursor Β· Windsurf Β· Copilot Β· Claude) |

---

## πŸš€ Quick Start

```bash
# Run once in any project β€” no global install needed
npx @nexus/studio init

# Or install globally
npm install -g @nexus/studio
studio init
```

**What you see during `studio init`:**

```
⚑ Nexus Studio β€” The AI Dev OS for Every Team

βœ” Detected: Next.js 15 Β· TypeScript Β· Tailwind CSS Β· Prisma
βœ” Suggested profile: nextjs-fullstack

? Select your IDE integrations: (Space to toggle)
β—‰ GitHub Copilot
β—‰ Cursor
β—‹ Windsurf
β—‹ Claude Code

Installing 29 agents Β· 51 skills Β· 15 workflows...
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 100%

βœ” .agent/ installed (147 files)
βœ” .github/copilot-instructions.md generated
βœ” .cursor/rules/nexus-system.mdc generated
βœ” .git/info/exclude updated (.agent/ is local-only β€” never committed)
βœ” .agstudio.json created

✨ Ready! Your AI agents are active. Try /blueprint in your IDE.
```

The `init` wizard will:
1. **Auto-detect** your framework (Next.js, Python/FastAPI, Java/Spring, etc.)
2. **Suggest a profile** with the right agent + skill set
3. **Install `.agent/`** β€” your local AI knowledge base
4. **Generate IDE config** β€” Cursor rules, Copilot instructions, Claude agents, etc.
5. **Wire Git exclusions** β€” `.agent/` stays local, never committed

---

## πŸ›οΈ Architecture

Nexus Studio is built on a **three-layer decoupled architecture**:

### Layer 1 β€” The CLI Orchestrator (`studio`)
A lightweight TypeScript CLI (`@nexus/studio`) that handles detection, installation, drift management, and quality gate execution. It never prescribes implementation details β€” it only wires the agent system into your project.

### Layer 2 β€” The Agent System (`.agent/`)
A project-local directory that is the **single source of truth** for all AI behaviour. It is IDE-agnostic and survives IDE changes. Each IDE generator reads from `.agent/` and produces its own config format.

```
.agent/
β”œβ”€β”€ AGENT_SYSTEM.md # Master system prompt & operating directives
β”œβ”€β”€ AGENTS.md # Agent routing index & coalition patterns
β”œβ”€β”€ AGENT_FLOW.md # 5-stage execution pipeline definition
β”œβ”€β”€ ARCHITECTURE.md # Project architecture reference
β”œβ”€β”€ agents/ # 29 specialist agent personas (.md)
β”œβ”€β”€ skills/ # 51 expert skill libraries (.md)
β”œβ”€β”€ workflows/ # 15 slash command procedures (.md)
β”œβ”€β”€ scripts/ # 12 quality gate shell runners (.sh per stack)
└── mcp/ # MCP server configuration
```

### Layer 3 β€” The Registry (`registry.json`)
A version-controlled manifest that defines all agents, skills, profiles, and slash commands. The `sync` and `update` commands use SHA-256 hash drift detection to identify when upstream templates have changed.

---

## οΏ½ How a Request Flows β€” 8-Stage Pipeline

When you type a prompt in your IDE, Nexus routes it through a structured pipeline defined in `.agent/AGENT_FLOW.md`:

```
1. REQUEST ENTRY ─ Natural language Β· slash command Β· domain request
β”‚
2. SOCRATIC GATE ─ New feature? β†’ 3 strategic clarifying questions
β”‚ Bug fix? β†’ confirm scope β†’ proceed
β”‚
3. AGENT SELECTION ─ Auto-routes via AGENTS.md routing table
β”‚ (no @mention needed β€” intent detection is automatic)
β”‚
4. AGENT INIT ─ Loads persona Β· behavioral constraints Β· output format
β”‚
5. SKILL LOADING ─ Matches request β†’ injects domain SKILL.md into context
β”‚ Cross-links related skills (e.g. owasp-top10 ↔ auth-nextauth)
β”‚
6. TASK EXECUTION ─ Agent executes with full combined context
β”‚ Scripts require explicit user approval before running
β”‚
7. VALIDATION ─ Quick (~30s): security Β· lint/TS Β· schema Β· unit tests
β”‚ Full ( ~5m): + Lighthouse Β· Playwright E2E Β· bundle Β· i18n
β”‚
8. RESULT DELIVERY ─ Code diff + explanation + next-step suggestions
```

> **Multi-agent note:** When a request spans multiple domains (e.g. UI + API + DB), agents execute **sequentially** with context hand-off β€” not in true parallel. The AI processes one domain at a time.

---

## οΏ½πŸ“¦ Supported Stacks & Profiles

Nexus Studio auto-detects your project and maps it to the most appropriate profile:

| Profile ID | Description | Stack Runner |
|---|---|---|
| `nextjs-fullstack` ⭐ | Next.js + Backend + DB | Node |
| `nextjs-frontend` | React/Next.js β€” UI only | Node |
| `react-vite` | React + Vite SPA | Node |
| `angular-enterprise` | Angular with RxJS/NgRx | Node |
| `vue-nuxt` | Full-stack Vue with Nuxt | Node |
| `vue-vite` | Client-side Vue SPA | Node |
| `expo-mobile` | React Native / Expo | Node |
| `node-api` | Node.js REST/GraphQL API | Node |
| `monorepo-root` | Turborepo / Nx workspace root | Node |
| `monorepo-package` | Sub-package within a monorepo | Node |
| `python-fastapi` | Async Python REST API | Python |
| `python-django` | Full-stack Django application | Python |
| `java-spring` | Enterprise Java / Spring Boot | Java |
| `dotnet-api` | .NET / ASP.NET Core API | .NET |
| `flutter-mobile` | Cross-platform Flutter app | Flutter |
| `custom` | Hand-pick individual agents + skills | Any |

---

## πŸ€– Specialist Agents (29)

Agents are expert personas that the AI activates automatically based on request context. They are routed via the `AGENTS.md` auto-routing table β€” no manual `@mention` required.

### πŸ›οΈ Architecture & Leadership (6)
`enterprise-architect` Β· `tech-lead` Β· `orchestrator` Β· `product-manager` Β· `project-planner` Β· `cloud-architect`

### 🌐 Frontend β€” Web (4)
`nextjs-expert` Β· `react-performance-guru` Β· `frontend-specialist` Β· `ui-component-architect`

### 🎨 UX / UI Design (3)
`ux-designer` Β· `ui-design-engineer` Β· `accessibility-auditor`

### βš™οΈ Backend & API (4)
`backend-specialist` Β· `api-architect` Β· `database-engineer` Β· `data-layer-specialist`

### πŸ›‘οΈ Security (2)
`security-engineer` Β· `penetration-tester`

### πŸ“± Mobile (3)
`rn-architect` Β· `rn-performance-expert` Β· `mobile-ux-designer`

### βœ… Quality & Ops (4)
`qa-engineer` Β· `devops-engineer` Β· `debugger` Β· `seo-specialist`

### πŸ€– AI & Innovation (3)
`ai-engineer` Β· `prompt-engineer` Β· `llm-security-officer`

> **LLM Safety Rule**: Any request touching AI/LLM features **always** auto-activates `@llm-security-officer` as a silent co-reviewer β€” no exceptions.

---

## 🧠 Expert Skills (51)

51 skills across 13 categories β€” click to expand

Skills are domain-specific coding guidelines injected into the agent's context. Each skill has a token budget to keep context lean. Use `studio info skill ` to inspect any skill in full detail.

| Category | Skills |
|---|---|
| **Architecture** | `clean-architecture` Β· `solid-principles` Β· `monorepo-turborepo` |
| **Frontend & UI** | `nextjs-app-router` Β· `react-patterns` Β· `shadcn-radix-ui` Β· `tailwind-design-system` Β· `angular-patterns` Β· `rxjs-patterns` Β· `vue-patterns` Β· `form-handling` Β· `framer-motion` Β· `dark-mode-theming` Β· `i18n-localization` Β· `state-management` Β· `accessibility-wcag` |
| **Backend & API** | `api-design-restful` Β· `prisma-orm` Β· `realtime-patterns` Β· `node-express-testing` Β· `python-fastapi-patterns` Β· `python-django-patterns` Β· `java-spring-patterns` Β· `dotnet-patterns` |
| **Mobile** | `expo-router-navigation` Β· `flutter-patterns` |
| **Security & Auth** | `owasp-top10` Β· `auth-nextauth` Β· `input-validation-sanitization` |
| **DevOps & Cloud** | `github-actions-ci-cd` Β· `docker-containerization` Β· `vercel-deployment` Β· `aws-deployment` Β· `azure-deployment` Β· `gcp-deployment` |
| **Performance** | `react-performance` Β· `caching-strategies` Β· `performance-testing` |
| **Quality (QA)** | `vitest-unit-tests` Β· `playwright-e2e` Β· `react-testing-library` Β· `tdd-workflow` Β· `python-testing` |
| **AI & Engineering** | `openai-sdk` Β· `anthropic-claude-sdk` Β· `google-gemini-sdk` Β· `vercel-ai-sdk` Β· `langchain-typescript` Β· `rag-implementation` |
| **Marketing & SEO** | `seo-core-web-vitals` |
| **UX/UI Design** | `ux-fundamentals` |

---

## βœ… Quality Gates (12)

The `studio validate` and `studio run` commands execute shell-based quality gates against your project. Gates are tiered by enforcement level:

### Tier 1 β€” Hard Block (CI fails if these fail)
| Gate | Purpose |
|---|---|
| `security-scan` | OWASP vulnerability patterns, secrets detection |
| `ts-check` | TypeScript strict compilation β€” zero errors |
| `env-validator` | `.env` schema validation β€” required keys present |

### Tier 2 β€” Auto-Fix (applied automatically with `--fix`)
| Gate | Purpose |
|---|---|
| `dependency-audit` | `npm audit` β€” patches non-breaking vulnerabilities |
| `license-audit` | Detects GPL/AGPL licences in production dependencies |

### Tier 3 β€” Advisory (warnings, does not block CI)
| Gate | Purpose |
|---|---|
| `accessibility-audit` | WCAG 2.1 AA automated scan |
| `bundle-analyzer` | Bundle size vs. budget thresholds |
| `performance-budget` | Core Web Vitals β€” LCP, CLS, FID |
| `seo-linter` | Missing meta tags, Open Graph, JSON-LD |
| `i18n-linter` | Hardcoded strings not passed through i18n |
| `type-coverage` | TypeScript coverage threshold (default 90%) |
| `verify-all` | Runs all tiers in sequence |

Each gate ships as `scripts//.sh`, where `` is one of: `node` Β· `python` Β· `java` Β· `dotnet` Β· `flutter`.

---

## ⚑ Slash Commands (15)

Workflows are step-by-step AI procedures triggered by slash commands in your IDE:

| Command | Purpose |
|---|---|
| `/blueprint` | Architecture doc for complex features β€” **required** before 3+ domain changes |
| `/create` | Full feature scaffold (types β†’ service β†’ API β†’ UI β†’ tests) |
| `/enhance` | Improve existing code quality, patterns, and performance |
| `/debug` | Systematic root-cause analysis and fix |
| `/audit-security` | Full OWASP security review of selected code |
| `/refactor-solid` | Apply SOLID principles + Clean Architecture patterns |
| `/generate-tests` | Unit + integration test suite generation |
| `/generate-e2e` | Playwright end-to-end test generation |
| `/deploy` | CI/CD pipeline and deployment configuration |
| `/perf-audit` | React/Node performance profiling and optimisation |
| `/a11y-audit` | Accessibility (WCAG 2.1 AA) compliance review |
| `/document` | JSDoc, API docs, and README generation |
| `/orchestrate` | Multi-agent coordination for epic-scale features |
| `/preview` | Visual component and flow preview |
| `/status` | Report installed agents, skills, and compliance posture |

---

## πŸ’» CLI Reference

### `studio init`
Initialize the Nexus agent system in your project.

```bash
studio init
studio init --force # Overwrite existing .agent/ files
studio init --path ./my-app # Target a specific directory
studio init --quiet # Suppress banner (for scripted use)
```

### `studio status`
Display installed agents, skills, workflows, scripts, and enterprise compliance posture.

```bash
studio status
```

### `studio list`
Browse the full registry: profiles, agents, skills, and slash commands.

```bash
studio list
```

### `studio doctor`
Health check: Node.js version, `.agstudio.json` validity, `.agent/` structure, Git exclusions, company config, and registry integrity.

```bash
studio doctor
```

### `studio validate`
Run quality gate scripts against your project.

```bash
studio validate
studio validate --fix # Auto-fix linting/format issues
studio validate --skip-e2e # Skip Playwright tests (faster CI)
studio validate --all # Scan all monorepo packages (requires turbo)
```

### `studio run `
Run a single quality gate by name.

```bash
studio run security-scan
studio run dependency-audit --fix
studio run ts-check --stack node
studio run verify-all --dry-run
studio run --list # Show all available gates
```

### `studio add `
Add an individual agent, skill, workflow, or script to an already-initialised project.

```bash
studio add agent cloud-architect
studio add skill owasp-top10
studio add workflow blueprint
```

### `studio remove `
Remove an installed component and update `.agstudio.json`.

```bash
studio remove agent seo-specialist
studio remove skill framer-motion
```

### `studio update`
Compare installed template hashes against the upstream registry and update outdated files.

```bash
studio update
studio update --dry-run # Preview what would change
studio update --force # Overwrite including customised files
```

### `studio sync`
Detect drift between installed files and the registry. Also enforces company skill policy.

```bash
studio sync # Interactive: show drift, choose what to pull
studio sync --check # CI mode β€” exit 1 if any drift detected
studio sync --force # Pull all updates without prompting
```

### `studio company init `
Scaffold a `.agstudio.company.json` to define org-wide required skills, forbidden patterns, and default IDE configs.

```bash
studio company init "ACME Corp"
```

### `studio company validate`
Validate a `.agstudio.company.json` against the schema.

```bash
studio company validate
```

### `studio search `
Search the registry for agents, skills, workflows, and profiles by keyword.

```bash
studio search "security"
studio search "react" --type skill
studio search "java" --type agent
```

### `studio info `
Show the full definition, token budget, skill cross-references, and activation conditions for any registry item.

```bash
studio info agent enterprise-architect
studio info skill owasp-top10
studio info profile nextjs-fullstack
```

### `studio diff`
Show what has drifted between your installed files and the upstream registry (read-only β€” does not modify any files).

```bash
studio diff # Show all drifted files
studio diff agents/security-engineer.md # Diff a specific file
```

### `studio rollback`
Roll back the most recent `update` or `sync` operation.

```bash
studio rollback
studio rollback --dry-run # Preview what would be restored
```

### `studio ci`
CI-optimised single command: runs `validate` + `sync --check` in sequence. Exits non-zero on any failure β€” designed for pipeline use.

```bash
studio ci
studio ci --strict # Also fail on Tier 3 advisory warnings
```

### `studio create `
Scaffold a new agent, skill, or workflow template locally β€” ready to customise and contribute upstream.

```bash
studio create skill my-graphql-patterns
studio create agent my-domain-expert
studio create workflow my-deploy-flow
```

### `studio contribute `
Validate a locally-created template against the quality bar, auto-generate its registry entry, and print the git commands to open a PR.

```bash
studio contribute skill my-graphql-patterns
studio contribute agent my-domain-expert
```

### `studio context`
Track AI context β€” decisions, architectural changes, and technical debt β€” linked to your project history.

```bash
studio context init # Initialise context tracking
studio context sync # Sync to .agent/CONTEXT.md
studio context log "Migrated auth to NextAuth v5"
studio context status # Show entries + staleness
```

### `studio profile`
Save and restore named sets of agents + skills for reuse across projects or team members.

```bash
studio profile create my-team-profile
studio profile show my-team-profile
studio profile edit my-team-profile
studio profile path # Print profile file location
```

### `studio mcp`
Manage MCP (Model Context Protocol) server integrations across all active IDE configs.

```bash
studio mcp list # Show registered MCP servers
studio mcp add @modelcontextprotocol/server-filesystem
studio mcp remove @modelcontextprotocol/server-filesystem
studio mcp apply # Write mcp config to all IDEs
```

### `studio completion`
Generate shell completion scripts for instant tab-completion of commands and IDs.

```bash
studio completion bash >> ~/.bashrc
studio completion zsh >> ~/.zshrc
studio completion fish > ~/.config/fish/completions/studio.fish
```

---

## 🏒 Enterprise Configuration

For organisations deploying Nexus Studio across multiple teams, create a `.agstudio.company.json`:

```json
{
"companyName": "ACME Corp",
"version": "1.0.0",
"requiredSkills": ["owasp-top10", "clean-architecture", "solid-principles"],
"forbiddenSkills": [],
"defaultIdes": ["copilot"],
"codingStandardsUrl": "https://wiki.acme.com/engineering-standards",
"registryUrl": "https://registry.acme.com/nexus"
}
```

**How it works:**
- Place in project root (per-repo) or `~/.agstudio.company.json` (machine-wide via IT provisioning)
- `studio init` automatically detects it and injects required skills, removes forbidden ones
- `studio sync` enforces the policy on every drift check
- `studio status` shows a compliance percentage bar

---

## πŸ–₯️ IDE Integration

When you run `studio init`, Nexus generates IDE-specific config files that bridge your IDE's AI assistant to the `.agent/` system:

| IDE | Files Generated |
|---|---|
| **GitHub Copilot** | `.github/copilot-instructions.md` Β· `.github/prompts/*.prompt.md` Β· `.github/instructions/agents.instructions.md` Β· `.vscode/settings.json` Β· `.vscode/mcp.json` |
| **Cursor** | `.cursor/rules/nexus-system.mdc` Β· `.cursor/rules/{agent}.mdc` Β· `.cursor/mcp.json` Β· `.cursorignore` |
| **Windsurf** | `.windsurfrules` Β· `.codeiumignore` |
| **Claude Code** | `CLAUDE.md` Β· `.claude/settings.json` Β· `.claude/commands/*.md` Β· `.claude/agents/*.md` Β· `.mcp.json` |

> `.agent/` is always installed regardless of IDE β€” it is the source of truth that all IDE files are generated from.

---

## πŸ—‚οΈ Project Configuration (`.agstudio.json`)

After `studio init`, a `.agstudio.json` is created in your project root:

```json
{
"version": "1.0.0",
"profile": "nextjs-fullstack",
"project": "my-app",
"installed": {
"agents": ["enterprise-architect", "nextjs-expert", "security-engineer"],
"skills": ["nextjs-app-router", "owasp-top10", "clean-architecture"],
"workflows": ["blueprint", "create", "debug"],
"scripts": ["security-scan", "ts-check", "verify-all"]
},
"customized": [],
"telemetry": false,
"installedHashes": {
"agents/enterprise-architect.md": "a1b2c3d4e5f6"
}
}
```

`installedHashes` stores SHA-256 fingerprints of each installed template at install time. `studio sync` and `studio update` compare these against the current upstream templates to detect drift without false positives from Handlebars compilation.

---

## πŸ”’ Security & Git

`.agent/` is **local-only** by design. `studio init` automatically adds it to `.git/info/exclude` (not `.gitignore`) so:
- βœ… The AI can index and read `.agent/` files
- βœ… The files never appear in `git status`
- βœ… The files are never committed or pushed

> **Do not add `.agent/` to `.gitignore`** β€” this breaks IDE indexing. Use `.git/info/exclude` (which `studio init` handles automatically).

---

## πŸ§ͺ Testing

```bash
npm test # Run all 43 tests via Vitest + Turbo
npm run typecheck # TypeScript strict check β€” 0 errors
npm run build # Production build via tsup
```

**Test coverage:**

| Suite | Tests |
|---|---|
| `platform.test.ts` | 4 β€” cross-platform bash resolver |
| `config-manager.test.ts` | 5 β€” config CRUD + hash persistence |
| `project-detector.test.ts` | 8 β€” framework + IDE heuristics |
| `enterprise-config.test.ts` | 9 β€” company policy load/validate/apply |
| `add-remove.test.ts` | 7 β€” input sanitisation (path traversal, injection) |
| `status.test.ts` | 2 β€” command happy path + error state |
| `template-engine.test.ts` | 8 β€” Handlebars safe compile (JSX, GH Actions, block helpers) |
| **Total** | **43 passed** |

---

## πŸ“ Monorepo Structure

```
nexus-studio-monorepo/
β”œβ”€β”€ apps/
β”‚ └── studio/ # @nexus/studio β€” the CLI package
β”‚ β”œβ”€β”€ src/
β”‚ β”‚ β”œβ”€β”€ cli.ts # Commander.js entry point (21 command modules)
β”‚ β”‚ β”œβ”€β”€ commands/ # init Β· status Β· list Β· doctor Β· validate Β· run
β”‚ β”‚ β”‚ # add Β· remove Β· update Β· sync Β· company Β· search
β”‚ β”‚ β”‚ # info Β· diff Β· rollback Β· ci Β· create Β· contribute
β”‚ β”‚ β”‚ # context Β· profile Β· mcp Β· completion
β”‚ β”‚ β”œβ”€β”€ core/ # template-engine Β· project-detector Β· config-manager
β”‚ β”‚ β”‚ # ide-config-generator Β· enterprise-config Β· git-integration
β”‚ β”‚ β”œβ”€β”€ ui/ # banner Β· logger Β· spinner
β”‚ β”‚ └── types/ # config Β· registry Β· validation
β”‚ └── templates/ # (symlinked from packages/templates at build time)
β”œβ”€β”€ packages/
β”‚ └── templates/ # @nexus/templates β€” registry + agent/skill/workflow files
β”‚ β”œβ”€β”€ registry.json # Single source of truth for all agents, skills, profiles
β”‚ β”œβ”€β”€ .agent/ # Template files (Handlebars β€” compiled at install time)
β”‚ β”œβ”€β”€ .cursor/ # Cursor IDE template rules
β”‚ β”œβ”€β”€ .claude/ # Claude Code template (CLAUDE.md)
β”‚ β”œβ”€β”€ .github/ # Copilot template (copilot-instructions.md)
β”‚ └── windsurf/ # Windsurf template (.windsurfrules)
└── scripts/ # Maintenance scripts (standardize-skills Β· compute-token-budgets)
```

---

## πŸ“‹ Requirements

| Requirement | Minimum |
|---|---|
| Node.js | `>= 18.0.0` |
| npm | `>= 10.0.0` |
| OS | Windows Β· macOS Β· Linux |
| Git | Any recent version (for `.git/info/exclude` setup) |

> **Windows users**: Quality gate scripts (`.sh`) require Git Bash. Nexus Studio auto-detects Git Bash at the standard install paths. WSL is also supported.

---

## 🀝 Contributing

Contributions are welcome β€” and the fastest path is via the CLI itself:

```bash
# 1. Scaffold a new template
studio create skill my-graphql-patterns

# 2. Edit the generated file
# packages/templates/.agent/skills/my-graphql-patterns/SKILL.md

# 3. Validate + generate registry entry + print PR git commands
studio contribute skill my-graphql-patterns
```

**Quality bar per template type:**

| Type | Minimum requirements |
|---|---|
| **Skill** | β‰₯ 400 chars Β· one code example Β· anti-patterns list Β· checklist Β· accurate `tokenBudget` |
| **Agent** | Activation condition Β· when NOT to activate Β· output format spec Β· skill cross-references |
| **Workflow** | Trigger command Β· step-by-step Β· success criteria Β· rollback instructions |

**Review turnaround:**

| PR type | Reviewer | ETA |
|---|---|---|
| New skill | 1 senior dev | ~2 days |
| New agent | Deepak Biswal | ~1 week |
| New workflow | 1 senior dev + QA | ~3 days |
| Bug fix | Automated CI | Same day |

See [CONTRIBUTING.md](CONTRIBUTING.md) for the complete YAML frontmatter schema, branch naming convention (`feat/contribute--`), and test requirements.

---

## πŸ“„ License

MIT Β© Deepak Biswal