https://github.com/erniker/understudy
One AI, Every Role β A system that configures teams of specialized AI agents (Architect, Backend, Frontend, DevOps, Security, QA). Compatible with GitHub Copilot CLI, Claude Code, and Cursor.
https://github.com/erniker/understudy
agentic-ai ai ai-agents automation claude cursor developer-tools devops github-copilot llm multi-agent prompt-engineering software-architecture
Last synced: 22 days ago
JSON representation
One AI, Every Role β A system that configures teams of specialized AI agents (Architect, Backend, Frontend, DevOps, Security, QA). Compatible with GitHub Copilot CLI, Claude Code, and Cursor.
- Host: GitHub
- URL: https://github.com/erniker/understudy
- Owner: erniker
- License: mit
- Created: 2026-04-22T15:27:44.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-05-06T10:01:06.000Z (28 days ago)
- Last Synced: 2026-05-06T12:05:00.923Z (28 days ago)
- Topics: agentic-ai, ai, ai-agents, automation, claude, cursor, developer-tools, devops, github-copilot, llm, multi-agent, prompt-engineering, software-architecture
- Language: Shell
- Homepage:
- Size: 1.09 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# π Understudy β One AI, Every Role
> A system that configures specialized AI agents in any project.
> One assistant, multiple roles: Architect, Backend, Frontend, DevOps, Security, QA.
> Compatible with **GitHub Copilot CLI**, **VS Code**, **Claude Code** and **Cursor**.
## Installation
### Linux / macOS / Windows Git Bash / WSL
**One-liner:**
```bash
curl -fsSL https://raw.githubusercontent.com/erniker/understudy/main/install.sh | bash
```
**Specific version:**
```bash
curl -fsSL https://raw.githubusercontent.com/erniker/understudy/main/install.sh | bash -s -- --version v1.0.0
```
### Windows (PowerShell)
**One-liner:**
```powershell
irm https://raw.githubusercontent.com/erniker/understudy/main/install.ps1 | iex
```
**Specific version:**
```powershell
.\install.ps1 -Version v1.0.0
```
> Requires **Git for Windows** (provides `bash.exe`). The installer detects it
> automatically and creates a PowerShell launcher that delegates to bash.
### Manual (clone)
```bash
git clone https://github.com/erniker/understudy.git
cd understudy
chmod +x wizard.sh
```
> See [install options](#install-options) for `--dir`, `--no-path` and `--uninstall`.
## Quick Start
```bash
# Deploy Understudy in any project
cd /path/to/your/project
understudy
# β Choose platforms: Copilot, Claude Code, Cursor
# Then open your AI tool
claude # Claude Code
copilot # GitHub Copilot CLI
cursor . # Cursor
```
### Zero-question deploy (`--here`)
Already inside an existing repo and don't want to answer the wizard's
questions? Use `--here` β Understudy infers project name, description,
stack, repository URL and PM from the files in your working directory:
```bash
cd /path/to/your/project
understudy --here # shows inferred values, asks one confirmation
understudy --here --yes # fully unattended, no prompts
```
What gets inferred:
- **Project name** β from the folder name or root `package.json`
- **Description** β from `package.json` or the first paragraph of `README.md`
- **Stack** β Node.js / React / Vue / Angular / .NET / Python / Terraform / Docker / Shell
- **Repository URL** β from `git remote get-url origin`
- **PM** β from `git config user.name`
The wizard prints a numbered summary of all 9 settings (the same questions
the interactive wizard asks) and offers three options at the confirmation
prompt:
- **`Y`** β deploy with the inferred settings (default).
- **`n`** β cancel.
- **`e`** β edit any field interactively. You enter the field number
(`1`-`9`), provide a new value, and repeat until satisfied. Then `d` to
deploy or `q` to quit.
Defaults applied for non-inferable choices: `split` guardrails, all three
platforms enabled, files committed to the repo. Run without `--here` for
the full interactive wizard if you need to customize them.
### Install options
**Bash (`install.sh`):**
| Flag | Description |
|---|---|
| `--version ` | Install a specific version (e.g. `v1.2.0`) |
| `--dir ` | Custom install directory (default: `~/.understudy`) |
| `--no-path` | Skip PATH setup |
| `--uninstall` | Remove Understudy from the system |
**PowerShell (`install.ps1`):**
| Parameter | Description |
|---|---|
| `-Version ` | Install a specific version (e.g. `v1.2.0`) |
| `-InstallDir ` | Custom install directory (default: `~/.understudy`) |
| `-NoPath` | Skip PATH setup |
| `-Uninstall` | Remove Understudy from the system |
### Automatic update checks
When you run `understudy`, it checks for a new release on GitHub.
If a newer version exists, it asks whether you want to update now.
To disable this check (for CI or offline environments):
```bash
export UNDERSTUDY_SKIP_UPDATE_CHECK=1
```
## What is this?
A system that automatically generates all the configuration needed for
**GitHub Copilot CLI**, **VS Code**, **Claude Code** and **Cursor** to work as a complete development team:
| Member | Role | Expertise |
|---|---|---|
| ποΈ **Architect** | Solutions Architect | System design, APIs, databases, cloud |
| βοΈ **Backend** | Backend Developer | .NET, Node.js, C#, TypeScript, Python, Bash |
| π¨ **Frontend** | Frontend Developer | React, TypeScript, UX/UI, accessibility |
| π **DevOps** | DevOps Engineer | Azure, AWS, Docker, K8s, Terraform, CI/CD |
| π **Security** | Security Expert | OWASP, threat modeling, compliance, IAM |
| π§ͺ **QA** | QA Engineer | Testing .NET, Node.js, Python, E2E, contract testing |
## Key Concepts
### 1. AGENTS.md β "Who is the team"
A file at the project root that defines agents selectable with `/agent` in Copilot CLI.
Each agent has a name, role, expertise and behavioral rules.
### 2. .github/copilot-instructions.md β "Project rules"
Global instructions that Copilot loads **automatically** in every session.
Defines project context, conventions and workflow.
### 3. .github/instructions/*.instructions.md β "How each member works"
Modular instruction files per role. Activated with `/instructions`
or loaded alongside the corresponding agent. They contain the detailed personality,
code standards and checklists for each member.
### 4. Parallel sub-agents β "Divide and conquer"
Copilot CLI can launch sub-agents (task tool) that work in parallel.
Ideal for Backend and Frontend to implement simultaneously while
DevOps prepares the infrastructure.
### 5. Context files β "Memory between sessions"
The files `docs/session-log.md`, `docs/spec.md` and `docs/decisions.md`
act as persistent memory. At the start of each session the agent reads them;
at the end, it updates them. This saves tokens and avoids repeating information.
### 6. π‘οΈ Guardrails β "What we NEVER do"
Security and behavioral limits that all agents respect.
They cover 8 categories: security, scope, process, destructive operations,
data/PII, quality, environments and documentation. They are **non-negotiable** and
deployed automatically with the wizard.
### 7. π Local-only mode β "Keep AI config out of git"
Optional. The wizard can append the generated AI config (`AGENTS.md`,
`CLAUDE.md`, `.github/instructions/`, `.claude/`, `.cursor/`β¦) and/or the
session memory files (`docs/spec.md`, `docs/decisions.md`,
`docs/session-log.md`) to the project's `.gitignore` so they stay local.
Useful in corporate repos where AI tool config is private, or open source
projects where you don't want to expose your internal workflow. Toggle with
`git.local_config` / `git.local_memory` in `understudy.yaml` β see
[docs/09-configuration.md](docs/09-configuration.md#local-only-mode).
## Guardrails
Guardrails protect the team from:
- Secrets or sensitive data leaks
- Destructive operations without confirmation
- Production changes without change control
- Code without spec, without tests, or without review
- Scope violations between agents
### Deployment modes
| Mode | Description |
|---|---|
| π **split** (recommended) | Critical guardrails always active in `copilot-instructions.md` + full details file in `guardrails.instructions.md` |
| π¦ **embedded** | Only critical guardrails embedded in `copilot-instructions.md` (lighter, no separate file) |
### Split vs Embedded: practical differences
| Aspect | π split | π¦ embedded |
|---|---|---|
| **Enforcement level** | Critical guardrails are always active **and** full guardrails are available in a dedicated file | Only critical guardrails are always active |
| **Visibility** | Higher: team can review complete guardrails in `guardrails.instructions.md` | Lower: only the reduced set is visible in global instructions |
| **Maintenance** | Easier to evolve full guardrails without bloating global instructions | Simpler file structure, but less room for detailed policies |
| **Best for** | Regulated teams, larger repos, multi-agent workflows, stricter governance | Small/fast projects, lightweight setups, teams that want minimal overhead |
| **Trade-off** | More files and a bit more structure | Less explicit coverage of non-critical rules |
**Rule of thumb:**
- Choose **split** when you want stronger governance, better auditability and clearer team alignment.
- Choose **embedded** when speed and simplicity matter more than policy depth.
The mode is selected during the wizard and can be changed by editing `understudy.yaml`:
```yaml
guardrails:
mode: "split" # "split" or "embedded"
```
### Categories
| # | Category | What it protects |
|---|---|---|
| 1 | π‘οΈ Security | No secrets, no bypass, mandatory input validation |
| 2 | π― Scope | File ownership per agent, justification required to cross boundaries |
| 3 | π Process | Spec-first (with exceptions for bugfixes/emergencies), documented decisions |
| 4 | π₯ Destructive | PM confirmation before deleting, purging or revoking |
| 5 | π Data/PII | No real data, synthetic data in tests, GDPR |
| 6 | ποΈ Quality | Self-review, appropriate tests, naming, error handling |
| 7 | β οΈ Environments | Promotion order devβprd, mandatory IaC, no manual changes |
| 8 | π Documentation | ADRs, session-log, updated spec |
## System Structure
```
understudy/
βββ wizard.sh # π§ The wizard β deploys Understudy
βββ install.sh # π¦ One-liner curl installer
βββ run_tests.sh # π§ͺ Local test runner
βββ understudy.yaml # βοΈ Global configuration
βββ templates/ # π Base templates
β βββ AGENTS.md # Copilot: team definition
β βββ CLAUDE.md # Claude: global instructions
β βββ .github/ # Copilot / VS Code
β β βββ copilot-instructions.md
β β βββ instructions/
β β β βββ architect.instructions.md
β β β βββ backend.instructions.md
β β β βββ frontend.instructions.md
β β β βββ devops.instructions.md
β β β βββ security.instructions.md
β β β βββ qa-engineer.instructions.md
β β β βββ guardrails.instructions.md
β β βββ prompts/
β β βββ start-session.prompt.md
β β βββ end-session.prompt.md
β β βββ design-feature.prompt.md
β β βββ security-review.prompt.md
β β βββ understudy.prompt.md
β βββ .claude/ # Claude Code
β β βββ agents/
β β β βββ architect.md, backend.md, frontend.md
β β β βββ devops.md, security.md, qa.md
β β βββ commands/
β β β βββ start-session.md, end-session.md
β β β βββ design-feature.md, security-review.md
β β β βββ understudy.md
β β βββ hooks/
β β β βββ guardrails-check.sh
β β βββ settings.json
β βββ .cursor/ # Cursor
β β βββ agents/
β β β βββ architect.md, backend.md, frontend.md
β β β βββ devops.md, security.md, qa-engineer.md
β β βββ commands/
β β β βββ understudy.md
β β βββ rules/
β β βββ understudy-global.mdc
β β βββ guardrails.mdc
β βββ docs/
β βββ spec.md
β βββ decisions.md
β βββ session-log.md
β βββ team-roster.md
βββ roles/ # π Optional roles catalog
β βββ data-engineer.instructions.md
β βββ git-specialist.instructions.md
β βββ mobile-engineer.instructions.md
β βββ ml-engineer.instructions.md
β βββ repo-documenter.instructions.md
β βββ shell-scripting.instructions.md
β βββ tech-writer.instructions.md
β βββ sre.instructions.md
βββ modules/ # π§© Opt-in modules
β βββ caveman/ # Token-efficient communication
β βββ module.yaml # Module manifest (auto-discovered)
β βββ role.instructions.md # Caveman role definition
β βββ bin/ # understudy-compress, install-hooks, etc.
β βββ commands/ # Slash command templates per platform
β βββ hooks/ # Reinforcement hook templates
β βββ statusline/ # Claude Code statusline script
β βββ evals/ # Token-reduction evaluation harness
β βββ tests/ # Module-specific bats tests
βββ tests/ # π§ͺ bats test suite
β βββ unit/ # config_read, detect, deploy_file, guardrails
β βββ hooks/ # guardrails-check.sh tests
β βββ integration/ # end-to-end wizard deployment
β βββ fixtures/ # fake project structures
β βββ lib/helpers.bash # shared test helpers
βββ docs/ # π Documentation
βββ README.md # Index
βββ 01-introduction.md
βββ 02-quick-start.md
βββ 03-platform-comparison.md
βββ 04-guardrails.md
βββ 05-roles-and-workflow.md
βββ platforms/
β βββ copilot-cli.md
β βββ vscode-copilot.md
β βββ claude-code.md
β βββ cursor.md
βββ 08-cross-platform-workflows.md
βββ 09-configuration.md
βββ 10-caveman-mode.md
βββ 11-troubleshooting.md
```
## Documentation
Full docs live under [`docs/`](docs/README.md) and are organized so they can be
published as a static site without restructuring.
| Section | Contents |
|---|---|
| [Introduction and Core Concepts](docs/01-introduction.md) | Mental model, agents, spec-driven development, persistent memory, guardrails, roles catalog, generated files |
| [Quick Start](docs/02-quick-start.md) | Install, first session, extending the team |
| [Platform Capability Matrix](docs/03-platform-comparison.md) | What each tool supports out of the box |
| [Guardrails](docs/04-guardrails.md) | 8 categories, deployment modes, enforcement per platform, customization |
| [Roles & Spec-Driven Development](docs/05-roles-and-workflow.md) | Role system, `applyTo`, spec lifecycle, session protocol, ADRs, sub-agents |
| [GitHub Copilot CLI](docs/platforms/copilot-cli.md) | Setup, commands, full feature flow, sub-agents, tips |
| [VS Code Copilot](docs/platforms/vscode-copilot.md) | `applyTo` globs, prompt files, start β work β end flow |
| [Claude Code](docs/platforms/claude-code.md) | Agents, slash commands, deny list, PreToolUse hook, adding commands |
| [Cursor](docs/platforms/cursor.md) | Rules (MDC), agent panel, creating your own rules |
| [Cross-Platform Workflows](docs/08-cross-platform-workflows.md) | Mixed setups and the shared session protocol |
| [Configuration Reference](docs/09-configuration.md) | Full `understudy.yaml` reference |
| [Caveman Mode](docs/10-caveman-mode.md) | Token-efficient role, compress script, hooks, statusline, evals |
| [Troubleshooting and FAQ](docs/11-troubleshooting.md) | Common issues, model choice, reporting bugs |
## Wizard Commands
| Command | Description |
|---|---|
| `understudy` | Full interactive deployment |
| `understudy --here` | Deploy in the current directory using values inferred from the repo (numbered summary, editable with `e`) |
| `understudy --here --yes` | Same as `--here` but skip the confirmation prompt (fully unattended) |
| `understudy --add-member` | Add a team member (data engineer, QA, etc.) |
| `understudy --create-role` | Create a custom role from scratch |
| `understudy --help` | Show help |
> If you installed manually via `git clone`, replace `understudy` with `./wizard.sh`.
## Integration into Existing Projects and Monorepos
The wizard automatically detects existing projects and adapts:
| Scenario | Behavior |
|---|---|
| π Folder doesn't exist | Creates new project with full structure |
| π Existing project | Integrates Understudy without touching existing files |
| β οΈ Already has Understudy | Re-deploy: only adds missing files |
### Automatic Stack Detection
The wizard scans up to 3 levels deep to detect technologies:
| Technology | Marker | Example |
|---|---|---|
| .NET | `*.csproj`, `*.sln` | `.NET: services/api-customers (ApiCustomers)` |
| Node.js | `package.json` (without React/Vue/Angular) | `Node.js: services/api-notifications` |
| React | `package.json` with `"react"` | `React: frontend/web-app` |
| Vue | `package.json` with `"vue"` | `Vue: frontend/admin` |
| Angular | `package.json` with `"@angular/core"` | `Angular: frontend/portal` |
| Python | `requirements.txt`, `pyproject.toml`, `setup.py`, `Pipfile` | `Python: services/ml-scoring` |
| Terraform | `*.tf` | `Terraform: infra/terraform` |
| Docker | `Dockerfile`, `docker-compose.yml` | `Docker: 4 Dockerfiles` |
| Shell | `*.sh`, `*.bash`, `*.zsh` | `Shell` (auto-adds shell-scripting role) |
### Monorepo Support
When 2+ independent projects are detected, the stack is labeled as **Monorepo**:
```
Monorepo: .NET(2) + Node.js + React(2) + Python + Terraform + Docker
Components found:
β’ .NET: services/api-customers (ApiCustomers)
β’ .NET: services/api-policies (ApiPolicies)
β’ React: frontend/web-app
β’ Node.js: services/api-notifications
β’ Python: services/ml-scoring
β’ Terraform: infra/terraform
β’ Docker: 4 Dockerfiles
β’ Docker Compose: ./
```
The detected stack is pre-filled as the default value, saving you time during setup.
## Recommended Workflow
```
PM writes spec.md
β
βΌ
/agent Architect ββββ designs solution ββββ docs/decisions.md
β
βΌ
/agent Security βββββ threat model
β
ββββββββββββββββββββββββ
βΌ βΌ
/agent Backend /agent Frontend
(implements APIs) (implements UI)
β β
ββββββββββββ¬ββββββββββββ
βΌ
/agent QA
(test plan + tests)
β
βΌ
/agent DevOps
(infra + CI/CD + deploy)
β
βΌ
/agent Security
(final review)
β
βΌ
session-log.md updated
```
## How to Add New Roles
The `roles/` folder is the **official optional roles catalog** for the system. The 6 core roles (Architect, Backend, Frontend, DevOps, Security, QA) are always deployed from `templates/`; roles in `roles/` are additional and you choose them.
**Included optional roles:**
| Role | When to use it |
|---|---|
| π **caveman** | Token-efficient prose. Drops fillers; keeps code/paths/URLs. Opt-in via `--caveman`. See [Caveman Mode](docs/10-caveman-mode.md). |
| π **data-engineer** | ETL/ELT pipelines, data warehouses, streaming, data governance |
| πΏ **git-specialist** | Git workflows, branch policies, PR hygiene, release discipline |
| π± **mobile-engineer** | iOS/Android apps, React Native, Flutter |
| π€ **ml-engineer** | ML models, MLOps, LLMs, RAG, responsible AI |
| π **repo-documenter** | Codebase understanding, architecture docs, onboarding guides |
| π **shell-scripting** | Bash/sh automation, cross-platform scripting, ShellCheck best practices |
| π **tech-writer** | Technical documentation, API docs, tutorials, Diataxis |
| π§ **sre** | SLOs, observability, incident response, chaos engineering |
**Auto-deploy:** The wizard always includes `git-specialist` and
`repo-documenter`. If shell scripts (`*.sh`, `*.bash`, `*.zsh`) are detected
in your project, `shell-scripting` is added automatically. All are deployed to
every platform you selected (Copilot, Claude, Cursor).
**How to add more:**
1. **From the existing catalog**: `understudy --add-member` β choose from menu (works with Copilot, Claude and Cursor projects)
2. **Create a new one**: `understudy --create-role` β saved in `roles/` for reuse
3. **Manual**: create a file `name.instructions.md` in `roles/` following the existing format
> Roles you create with `--create-role` are stored in `roles/` and will be available for **all your future Understudy deployments**, not just the current project.
## Tips for Project Managers
- Use **Claude Opus** (`/model`) for the Architect β better reasoning for design
- Use **Claude Sonnet** for Backend/Frontend β good speed/quality balance
- Use **Claude Haiku** for quick DevOps tasks β economical and efficient
- Always ask to update `session-log.md` at the end of each session
- The spec is sacred: if scope changes, update the spec first
> These defaults are in `understudy.yaml`. Edit it in your project to customize.
## Configuration and Override
The system uses an `understudy.yaml` configuration file with priority hierarchy:
```
1. Wizard defaults (built-in) β lowest priority
2. ~/.understudy/understudy.yaml (installed) β global defaults
OR understudy.yaml next to wizard.sh (cloned) β if installed manually
3. understudy.yaml in the project β per-project override (highest)
```
Example override: your project needs Opus for Security because it's fintech:
```yaml
# my-project/understudy.yaml
models:
security: "claude-opus-4.6" # override: more reasoning for fintech
platforms:
copilot: true
claude: true # or false if you only use one platform
cursor: true
guardrails:
mode: "embedded" # override: only critical guardrails for lighter project
```
## Compatibility: Copilot CLI + VS Code + Claude Code + Cursor
Understudy works on **all four platforms** β choose one or all during deployment:
| Feature | Copilot CLI | VS Code | Claude Code | Cursor |
|---|---|---|---|---|
| Global instructions | β
Auto-loaded | β
Auto-loaded | β
CLAUDE.md | β
`.cursor/rules/` |
| Role instructions | β
`/instructions` | β
Auto-applies by `applyTo` | β
`.claude/agents/` | β
`.cursor/agents/` |
| Guardrails | β
Auto + `/instructions` | β
Auto-applies (`**`) | β
CLAUDE.md + hooks | β
`guardrails.mdc` |
| Agent selection | `/agent` | Chat with context | Invoke by name | Agent panel |
| Reusable prompts | N/A | β
`.github/prompts/` | β
`/project:command` | N/A |
| Team definition | β
AGENTS.md | β
AGENTS.md | β
`.claude/agents/` | β
`.cursor/agents/` |
| File protection | N/A | N/A | β
`settings.json` deny | N/A |
| Security hooks | N/A | N/A | β
`.claude/hooks/` | N/A |
| Caveman role | β
opt-in | β
opt-in | β
opt-in | β
opt-in |
| Caveman compress | β
repo-level | β
repo-level | β
repo-level | β
repo-level |
| Caveman `/compress` `/restore` | N/A | β
`.github/prompts/` | β
`.claude/commands/` | β
`.cursor/commands/` |
| Caveman hooks (reinforcement) | N/A | β οΈ Marker block | β
Real hooks | β οΈ Always-apply rule |
| Caveman statusline | N/A | N/A | β
Claude only | N/A |
### In VS Code
- Instructions are applied **automatically** based on the file you're editing
(thanks to the `applyTo` frontmatter in each `.instructions.md`)
- Prompts in `.github/prompts/` are available as reusable prompts
- Use "Start Session" and "End Session" prompts for the context flow
- **Caveman**: role via `.github/instructions/caveman.instructions.md`, slash commands
via `.github/prompts/compress.prompt.md` and `restore.prompt.md`, reinforcement
via marker block in `copilot-instructions.md`
### In Claude Code
- `CLAUDE.md` is loaded automatically when you open the project
- Agents are in `.claude/agents/` β invoke them by name
- Commands are in `.claude/commands/` β use them with `/project:name`
- The guardrails hook blocks destructive operations automatically
- `settings.json` protects sensitive files (.env, keys, secrets)
- **Caveman**: role via `.claude/agents/caveman.md`, `/compress` and `/restore`
commands, real `SessionStart` / `UserPromptSubmit` hooks, statusline showing
cumulative compression savings
### In Cursor
- Global rules (`.cursor/rules/`) are applied **automatically** in every session
- Agents are in `.cursor/agents/` β invoke them from the Agent panel
- Guardrails are in `.cursor/rules/guardrails.mdc` β always active
- Each agent has its model configured in the frontmatter (`auto`, `fast`, or a specific model)
- **Caveman**: role via `.cursor/agents/caveman.md`, `/compress` and `/restore`
commands via `.cursor/commands/`, reinforcement via
`.cursor/rules/00-caveman-active.mdc` (alwaysApply)
### Files by platform
**Copilot / VS Code:**
```
.github/copilot-instructions.md β Always active (includes critical guardrails)
.github/instructions/*.instructions.md β By file type (applyTo)
.github/instructions/guardrails.instructions.md β Always active (applyTo: "**")
.github/prompts/*.prompt.md β Invocable from Copilot Chat
AGENTS.md β Read as context
# Caveman (opt-in)
.github/instructions/caveman.instructions.md β Role (applyTo: "**")
.github/prompts/compress.prompt.md β /compress slash command
.github/prompts/restore.prompt.md β /restore slash command
```
**Claude Code:**
```
CLAUDE.md β Always active (includes critical guardrails)
.claude/agents/*.md β Agents by role (with frontmatter)
.claude/commands/*.md β Commands (/project:name)
.claude/settings.json β Permissions and hooks
.claude/hooks/guardrails-check.sh β Hook PreToolUse
# Caveman (opt-in)
.claude/agents/caveman.md β Caveman role agent
.claude/commands/compress.md β /compress command
.claude/commands/restore.md β /restore command
settings.json β SessionStart + UserPromptSubmit hooks, statusLine
```
**Cursor:**
```
.cursor/agents/*.md β Agents by role (with frontmatter)
.cursor/rules/understudy-global.mdc β Global rules (always active)
.cursor/rules/guardrails.mdc β Guardrails (always active)
# Caveman (opt-in)
.cursor/agents/caveman.md β Caveman role agent
.cursor/commands/compress.md β /compress command
.cursor/commands/restore.md β /restore command
.cursor/rules/00-caveman-active.mdc β Reinforcement (alwaysApply)
```
## Contributing
Contributions are welcome. Read the [contribution guide](CONTRIBUTING.md) before
opening a PR β it includes commit conventions, versioning, CHANGELOG maintenance
and the review process.
To report bugs or propose improvements use the [issue templates](https://github.com/erniker/understudy/issues/new/choose).
To report security vulnerabilities, see the [security policy](SECURITY.md).
This project follows the [Contributor Covenant](CODE_OF_CONDUCT.md) as its code of conduct.
## Acknowledgments
- **Caveman mode** (the `caveman` role and the `understudy-compress` script)
is inspired by [JuliusBrussee/caveman](https://github.com/JuliusBrussee/caveman) β
thanks to its author for the original idea of token-efficient AI prose and for
open-sourcing the prompt patterns that informed our port. See
[docs/10-caveman-mode.md](docs/10-caveman-mode.md) for what we adapted and
what we intentionally did not ship.