Metadata-Version: 2.4
Name: emt-brain
Version: 0.6.0
Summary: EMT Brain — sync skills, workflows, agents into Claude Code
Project-URL: Repository, https://dev.azure.com/azurefsoft139/emt/_git/flezi-emt-skills
Project-URL: Bug Tracker, https://dev.azure.com/azurefsoft139/emt/_git/flezi-emt-skills/issues
Author-email: Chien Dong <chiendx@azurefsoft139.com>
License: MIT
Keywords: azure,claude,copilot,devops,emt,skills,sync
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Requires-Dist: azure-identity>=1.16
Requires-Dist: gitpython>=3.1
Requires-Dist: platformdirs>=4
Requires-Dist: pyyaml>=6
Requires-Dist: rich>=13
Requires-Dist: typer>=0.12
Description-Content-Type: text/markdown

# emt-brain

EMT Brain — populate skills, workflows, and agents from the EMT repository into Claude Code (or GitHub Copilot).

## Install

```bash
pip install emt-brain
# or from source
pip install -e tools/emt-brain
```

## Quick start

```bash
# First run — installs default bundle (master + utilities + anthropics + cteng)
# + all workflows + all agents
emt-brain framework-sync

# See available workflows
emt-brain workflow-list

# Scope to a specific workflow and its dep closure
emt-brain framework-sync --workflow emt-wf-ip-planning

# Preview without writing
emt-brain framework-sync --dry-run

# Show onboarding guide
emt-brain help
```

## Commands

### `emt-brain framework-sync`

Populate skills, workflows, and agents in one shot.

```bash
emt-brain framework-sync                                 # default bundle + all
emt-brain framework-sync --workflow emt-wf-ip-planning  # scope to workflow deps
emt-brain framework-sync --dry-run                      # preview only
emt-brain framework-sync --force                        # overwrite local modifications
emt-brain framework-sync --scope project                # project-local (.claude/skills/)
emt-brain framework-sync --scope global                 # global (~/.claude/skills/)
```

**Default bundle** (`flezi-emt/bundles/default.bundle.yaml`) includes:

- Master skills (10) — EMT meta-tooling
- Utility skills (5) — docs, translations, branding
- Community: Anthropics (7 curated)
- Community: cteng (7 — context engineering foundation per IDEA-001)

**Workflow sync** (`--workflow <id>`) resolves the dep closure:

- Target workflow + transitively consumed workflows
- All agents referenced by those workflows
- All skills used by those agents
- Plus the default bundle (always included)

### `emt-brain workflow-list`

List all available EMT workflows.

```bash
emt-brain workflow-list           # summary table
emt-brain workflow-list --full    # include per-workflow agent list
emt-brain workflow-list --json    # raw JSON
```

### `emt-brain help`

Show categorised command overview and getting-started guide.

### `emt-brain status`

Show current configuration (repo, branch, provider, scope) and drift count.

### `emt-brain doctor`

Run environment diagnostics: Python version, git, Azure auth, repo reachability, destination writable, state file.

### `emt-brain reset`

Delete CLI config and state. Already-synced files are **not** removed.

## Authentication

`emt-brain` uses [azure-identity](https://pypi.org/project/azure-identity/). On first run it prompts for device-code login if the Azure CLI credential is not cached. Subsequent runs reuse the cached credential.

## Project config

Place a `.flezi-emt/config.yaml` at your project root to configure `emt-brain` per project:

```yaml
profile: default            # bundle to sync
provider: claude            # claude | copilot
scope: project              # global | project
```

CLI flags override project config; project config overrides global config.

| Location | Purpose |
| --- | --- |
| Global config | `~/.config/emt-brain/config.json` — repo URL, branch, provider, scope |
| Project config | `.flezi-emt/config.yaml` — profile, filter_tags, provider, scope |
| State | `~/.local/share/emt-brain/state.json` — managed files, last sync |
| Cache | `~/.cache/emt-brain/repo-cache/` — cloned remote repo |

Run `emt-brain doctor` to see active paths.

## Post-sync: Claude Code setup

After syncing, in your project run `/emt-brain-help setup-project` in Claude Code to:

1. Initialize `CLAUDE.md` (if absent)
2. Add horizontal-protocol guidelines (IDEA-001 four-pillar session protocol)
3. Add workflow-usage guidelines for each installed workflow
