# 1.1.0 — Drafts visible in CapCut + `init` works out of the box

First minor after 1.0 graduation. Closes the two post-1.0 bugs filed against the published surface. **Additive only — no breaking changes.**

## Highlights

- 🎬 **`psycho-build` drafts are now visible in CapCut's UI.** Previously the output was on disk but invisible — CapCut couldn't index it. Drafts now emit the two sidecar files (`draft_meta_info.json` + `draft_info.json`) alongside `draft_content.json`, and a new `--register` flag adds the entry to `root_meta_info.json` so CapCut shows the project on the home screen.
- 🛠️ **New `register` subcommand.** Standalone command that does the root-meta indexing for any draft directory. Useful for drafts produced by older versions of this CLI, or by other tools, that you want to surface in CapCut. Idempotent on `draft_id`. Cross-platform projects-root detection (Windows / macOS / Linux).
- 🔧 **`init` works without `--template`.** The default template path was inherited broken from the upstream Python project. Now defaults to the bundled `templates/minimal/`, and the default `--drafts` path resolves per platform instead of being hard-coded to macOS.

## What changed (CLI surface)

```
capcut-david psycho-build <manifest.yaml> [--out <dir>] [--seed <n>]
                                          [--register] [--projects-root <dir>]
capcut-david register <draft-dir> [--projects-root <dir>]
capcut-david init <name> [--template <dir>] [--drafts <dir>]   # now works without flags
```

Default projects-root by platform:
- **Windows** — `%LOCALAPPDATA%/CapCut/User Data/Projects/com.lveditor.draft`
- **macOS** — `~/Movies/CapCut/User Data/Projects/com.lveditor.draft`
- **Linux** — `~/.local/share/CapCut/User Data/Projects/com.lveditor.draft` (best-effort)

## Bugs fixed

### Bug #1 — `psycho-build` produced invisible drafts

The output directory had `draft_content.json` + `assets/` but was missing the two sidecar files CapCut reads to index a project. Workaround used to be manually cloning those files from an existing draft. Fix: `psycho-build` always emits them now; opt into UI registration with `--register`.

### Bug #2 — `init` broken without explicit `--template`

`cmdInit` tried to copy `<cli-dir>/../CapCutAPI/template`, a path inherited from the upstream Python project that never existed in this fork's npm tarball. Fix: default template now resolves to the bundled `templates/minimal/` (the same template `psycho-build` already used).

## Migration from 1.0.0

**No code changes required.** Existing scripts work as before:
- `capcut-david psycho-build manifest.yaml` still produces a draft at the same path with byte-identical `draft_content.json` output. It now also produces two new sidecar files alongside it (no impact on consumers that only read `draft_content.json`).
- Add `--register` to your `psycho-build` invocation if you want the draft to appear in CapCut's UI automatically. Otherwise run `capcut-david register <draft-dir>` after the build.
- `capcut-david init my-draft` now works on a fresh install. If you previously worked around the bug with an explicit `--template`, the flag still wins.

## Compatibility

- CapCut ≥ 5.x desktop (Windows + macOS), JianYing 6+ unsupported — unchanged from 1.0.0.
- Node `>= 18` — unchanged.
- Runtime dependencies: zero — unchanged.
- 21 new tests (194 total). All existing tests pass; aggregate coverage stays above the 80% gate.

## Roadmap (1.x — non-binding)

Unchanged from 1.0.0:
- `1.x.0` — `capcut-david query` (animation / sticker / effect / filter catalogue lookup)
- `1.x.0` — `capcut-david validate <project>` (schema-invariant linter)
- `1.x.0` — JianYing 6+ research; `psycho-build` dynamic audio ducking

## Thanks

To anyone who hit Bug #1 and worked around it manually — that's the user feedback that drives a 1.x bugfix release.
