editorbrain 0.4.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -6
- package/bin/{editorharness.mjs → editorbrain.mjs} +762 -286
- package/package.json +2 -3
- package/skill/{editorharness → editorbrain}/SKILL.md +3 -3
- package/skill/{editorharness → editorbrain}/references/cli-mcp.md +44 -23
- package/skill/{editorharness → editorbrain}/references/workspace-files.md +7 -7
- /package/skill/{editorharness → editorbrain}/AGENTS.md +0 -0
- /package/skill/{editorharness → editorbrain}/references/production-and-review.md +0 -0
package/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "editorbrain",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "EditorBrain editorial knowledge, portable workspaces and skills for AI video agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"bin": {
|
|
8
|
-
"editorbrain": "bin/
|
|
9
|
-
"editorharness": "bin/editorharness.mjs"
|
|
8
|
+
"editorbrain": "bin/editorbrain.mjs"
|
|
10
9
|
},
|
|
11
10
|
"files": [
|
|
12
11
|
"bin",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description: Use EditorBrain
|
|
2
|
+
name: editorbrain
|
|
3
|
+
description: Use EditorBrain to edit a user's video, adapt an editorial style, find reference evidence, or manage brand and video project context through its CLI or MCP. Connect the project's actual footage, script and brand to editing decisions, then implement and review the result with the available editing tools. Also use when the user names EditorBrain, requests its library or asks to follow a saved preset.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# EditorBrain
|
|
7
7
|
|
|
8
|
-
The public product is EditorBrain. The
|
|
8
|
+
The public product is EditorBrain. The npm package is `editorbrain`; `editorbrain` is the CLI command. Skill name and portable folder paths use `editorbrain`. Web: https://editorbrain.com. API/MCP: https://api.editorbrain.com/mcp.
|
|
9
9
|
|
|
10
10
|
Convert reference evidence into an appropriate edit for this project. Reading the library starts the work; quality is demonstrated in the delivered video.
|
|
11
11
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# CLI and MCP: read, retrieve, save
|
|
2
2
|
|
|
3
|
-
Use the connected MCP schema and `
|
|
3
|
+
Use the connected MCP schema and `editorbrain help` to confirm the installed contract. Examples below describe the 0.6.0 customer workflow; older installations may lack the skill installer or reference-media tool. Do not invent commands from historical architecture documents.
|
|
4
4
|
|
|
5
5
|
API/MCP: `https://api.editorbrain.com/mcp`. The host must connect this server separately; installing a skill does not register or authorize MCP.
|
|
6
6
|
|
|
@@ -9,18 +9,18 @@ API/MCP: `https://api.editorbrain.com/mcp`. The host must connect this server se
|
|
|
9
9
|
An existing account normally starts with:
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
editorbrain status
|
|
13
|
+
editorbrain pull --dir ./my-videos
|
|
14
|
+
editorbrain skill install --dir ./my-videos --agent both
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
If unauthenticated, `
|
|
17
|
+
If unauthenticated, `editorbrain login --url https://api.editorbrain.com` uses browser/device consent. Request the user's participation only for this required login step. Credentials stay outside project files. CLI login does not automatically authenticate a separate MCP host: register the MCP URL without a bearer header and authorize through the host’s OAuth login. Choose the same workspace in the consent page. Existing bearer-key connections remain compatible; do not overwrite one during setup.
|
|
18
18
|
|
|
19
|
-
Skill installation is offline and independent of login. It creates `.agents/skills/
|
|
19
|
+
Skill installation is offline and independent of login. It creates `.agents/skills/editorbrain/` for Codex and `.claude/skills/editorbrain/` for Claude. Open the target folder in the agent and explicitly ask it to read the installed `SKILL.md` if automatic discovery has not refreshed. The skill directs the agent to its bundled `AGENTS.md`; a bundled file alone is not assumed to load automatically.
|
|
20
20
|
|
|
21
21
|
Existing root `AGENTS.md`/`CLAUDE.md` are preserved. Read the install result's instruction paths and conflict reports. A preserved root guide does not mean the native skill failed; a conflicting existing skill needs a deliberate merge, not an overwrite. Do not replace the user's custom instructions to finish setup.
|
|
22
22
|
|
|
23
|
-
For a separate local workspace, `
|
|
23
|
+
For a separate local workspace, `editorbrain init --dir ./new-video --brand <id> --style <id> --project <id>` creates portable context and installs guidance. Do not initialize over a pulled workspace to reset it. `pull` and `push` synchronize documents, not the installed native skill folders or local render media.
|
|
24
24
|
|
|
25
25
|
## Reading the project
|
|
26
26
|
|
|
@@ -34,13 +34,13 @@ MCP sequence:
|
|
|
34
34
|
Use the local files after a successful `pull` when working through CLI. Commands:
|
|
35
35
|
|
|
36
36
|
```sh
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
editorbrain validate --dir ./my-videos
|
|
38
|
+
editorbrain resolve <project-id> --dir ./my-videos
|
|
39
|
+
editorbrain assets list --limit 200
|
|
40
|
+
editorbrain assets download <sha256> --out ./media/clip.mp4
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
`assets list` returns `nextCursor`; continue with `--cursor` when needed. MCP `list_assets
|
|
43
|
+
`assets list` returns `nextCursor`; continue with `--cursor` when needed. MCP `list_assets` also returns `nextCursor`; pass it as `cursor` to retrieve the next page (default 100, maximum 1000). Project `media.json` is the primary source for project-specific IDs. Asset tags passed to recommendations describe declared resources, not tool-verified contents.
|
|
44
44
|
|
|
45
45
|
## Selecting a method and examining examples
|
|
46
46
|
|
|
@@ -58,16 +58,16 @@ Discover current argument schemas before calling:
|
|
|
58
58
|
CLI counterparts for discovery/documents:
|
|
59
59
|
|
|
60
60
|
```sh
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
editorbrain styles list
|
|
62
|
+
editorbrain styles recommend <project-id> --dir ./my-videos
|
|
63
|
+
editorbrain library search "comparison"
|
|
64
|
+
editorbrain library get <video-id>
|
|
65
|
+
editorbrain library get <video-id> --document <returned-path>
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
Recommendations and direction drafts use the saved remote project, require a non-empty script and check that local source context matches it. After `init` or local edits, validate and successfully `push` the intended project context before those calls. Do not discard unsynced local changes to silence a context mismatch. An offline draft can be written by the agent from available evidence without claiming a remote recommendation ran.
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
Pin historical evidence with `editorbrain library get <video-id> --document <path> --sha256 <source-hash>`, or MCP `read_reference_document` with `sha256`. CLI checks the returned content hash. Without a pin, the latest version is retrieved; keep the returned hash.
|
|
71
71
|
|
|
72
72
|
### Complete enough evidence
|
|
73
73
|
|
|
@@ -88,8 +88,8 @@ Access is scoped to the current workspace's reference grant and credential. A kn
|
|
|
88
88
|
`draft_direction` proposes an initial method and techniques. Inspect its pending requirements and transfer status, complete the per-beat decisions using evidence and the actual material, then implement the user's requested output. Available CLI:
|
|
89
89
|
|
|
90
90
|
```sh
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
editorbrain direction draft <project-id> --dir ./my-videos --out ./direction-draft
|
|
92
|
+
editorbrain export <project-id> --dir ./my-videos --adapter neutral --out ./handoff
|
|
93
93
|
```
|
|
94
94
|
|
|
95
95
|
`export_project({projectId,adapter})` supports `neutral`, `hyperframes` and `remotion`. It returns plans for an external rendering agent/engine; it does not create a video. Inspect the engine's real capabilities before committing to an effect.
|
|
@@ -97,9 +97,30 @@ editorharness export <project-id> --dir ./my-videos --adapter neutral --out ./ha
|
|
|
97
97
|
Save through local portable documents plus `push`, or MCP `write_document` with the revision returned by the last read and the actual schema. To create a new document, use `expectedRevision: 0`; to update an existing one, use its current read revision. Do not guess a revision or force over a conflict; reread, reconcile and retry only if still authorized. Keep generated production notes small enough for the document limit (128 KiB per document); do not duplicate every raw catalog response into a customer workspace.
|
|
98
98
|
|
|
99
99
|
```sh
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
editorbrain validate --dir ./my-videos
|
|
101
|
+
editorbrain resolve <project-id> --dir ./my-videos
|
|
102
|
+
editorbrain push --dir ./my-videos
|
|
103
103
|
```
|
|
104
104
|
|
|
105
105
|
`push` is not a media upload. Use `assets upload <file>` for authorized production files within current limits and then record returned IDs/hashes. Keep large renders/evidence in the appropriate media store, with permanent identifiers in the project. Preserve old revisions and disclose unsynchronized local work if saving fails.
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
## Recovery and diagnostics (CLI 0.6.0)
|
|
109
|
+
|
|
110
|
+
Use `editorbrain version` to discover the installed release. Run `editorbrain doctor --dir <folder> --agent codex|claude|both` before troubleshooting; `--offline` deliberately skips credentials and remote checks. Doctor is read-only. Its `mcpClient: not_verified` is not a claim that the host is connected. A customized skill is reported as a warning, not replaced automatically.
|
|
111
|
+
|
|
112
|
+
Before reconciling sync problems, use `push --dry-run` or `pull --dry-run`. Read `conflicts` and the planned paths. A preview neither writes nor reserves revisions. Never use a separate workspace to evade a binding mismatch.
|
|
113
|
+
|
|
114
|
+
Errors include `code`, `hint`, `retryable` and the legacy text `error`. `AUTH_REQUIRED` needs user authorization, `ACCESS_DENIED` needs the right permission, `SYNC_CONFLICT` needs reconciliation, and `WORKSPACE_MISMATCH` requires the correct separate folder. `WORKSPACE_BUSY` means another CLI operation owns `.editorbrain-operation.lock`; do not auto-delete it. After a crash, verify no process is using the folder before removing a leftover lock.
|
|
115
|
+
|
|
116
|
+
GET requests use bounded retries and respect Retry-After. Writes are not retried automatically: after a network error, inspect remote state before repeating them. Do not treat `retryable` as permission for an unbounded loop. HTTP error bodies are not printed. The MCP now provides matching structuredContent and text; consume either without counting them as separate results. Writing a document is declared mutating and may update existing content even though revision history is preserved.
|
|
117
|
+
|
|
118
|
+
## Guided setup and OAuth (0.6.0)
|
|
119
|
+
|
|
120
|
+
`editorbrain setup --dir ./mis-videos --agent codex --workspace <expected-id>` authorizes the CLI when necessary, pulls documents, installs the complete skill and registers an absent MCP connection. Use `claude` or `both` for other hosts. The expected ID is a check, never authorization. Setup preserves existing MCP entries and customized guidance. Exit 2 means action is still required; inspect each step instead of repeating blindly. `--no-browser` defers MCP registration; `--skip-mcp` prepares only the CLI/skill.
|
|
121
|
+
|
|
122
|
+
Codex can use `codex mcp login editorbrain`; Claude Code completes OAuth from `/mcp`. Native host configuration is not proof of an authenticated MCP. Call `workspace_info` inside the host and compare it with CLI `status`. A read-only consent cannot save documents: ask for editing scope only when needed. Revoke OAuth connections from the app’s connection settings. CLI device credentials and MCP OAuth connections are separate.
|
|
123
|
+
|
|
124
|
+
`editorbrain narrative search [query] --kind hook --channel visual` finds candidates. `narrative get <video-id> --sha256 <document-hash> --event-offset 0 --relation-offset 0 --limit 50` pages through one pinned narrative document; follow returned offsets. Missing narrative coverage stays explicit.
|
|
125
|
+
|
|
126
|
+
`editorbrain library media <video-id> --sha256 <media-hash> --out <new-file>` downloads an authorized frame/audio/video and verifies its hash (90 MiB maximum). It will not overwrite an existing file. Downloading is not reviewing: inspect it with available visual/audio tools and record the intervals actually checked. Neither CLI nor MCP ingest customer references.
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# EditorBrain workspace files
|
|
2
2
|
|
|
3
|
-
Use this reference when creating a project, changing branding or styles, resolving conflicting settings, or deciding where to save feedback. Technical paths and the CLI remain named `
|
|
3
|
+
Use this reference when creating a project, changing branding or styles, resolving conflicting settings, or deciding where to save feedback. Technical paths and the CLI remain named `editorbrain`; the public product is EditorBrain.
|
|
4
4
|
|
|
5
5
|
## Discover before editing
|
|
6
6
|
|
|
7
|
-
Read `videos/<project-id>/project.json` first: its `brand`, `style` and `outputProfile` fields select the context. Discover IDs using the returned documents or local files. Folder names below are placeholders, not literal IDs. For a new local workspace use `
|
|
7
|
+
Read `videos/<project-id>/project.json` first: its `brand`, `style` and `outputProfile` fields select the context. Discover IDs using the returned documents or local files. Folder names below are placeholders, not literal IDs. For a new local workspace use `editorbrain init`; for an existing account use `pull`. Read the generated documents before changing their schema.
|
|
8
8
|
|
|
9
9
|
```text
|
|
10
10
|
AGENTS.md Codex entry point (existing instructions preserved)
|
|
11
11
|
CLAUDE.md Claude Code entry point (existing instructions preserved)
|
|
12
|
-
.agents/skills/
|
|
13
|
-
.claude/skills/
|
|
14
|
-
.
|
|
12
|
+
.agents/skills/editorbrain/ Codex skill, contract and references
|
|
13
|
+
.claude/skills/editorbrain/ Claude Code skill, contract and references
|
|
14
|
+
.editorbrain/
|
|
15
15
|
brands/<brand-id>/
|
|
16
16
|
brand.md Identity, audience, constraints
|
|
17
17
|
design.md Composition and visual treatment (optional)
|
|
@@ -38,7 +38,7 @@ videos/<project-id>/
|
|
|
38
38
|
reviews/ Reviews tied to a particular delivered version
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
The native skill folders are local instructions, not portable documents synchronized by `push`. Local media/render folders are not media uploads. `.
|
|
41
|
+
The native skill folders are local instructions, not portable documents synchronized by `push`. Local media/render folders are not media uploads. `.editorbrain/.sync.json` is CLI-managed sync state; do not edit it to bypass conflicts. An older valid workspace may omit the optional files and local production directories.
|
|
42
42
|
|
|
43
43
|
The resolver requires the selected brand's `brand.md`, `tokens.json`, `language.json`, `assets.json`; the selected style's `style.md`, `style.json`, `examples.json`; the selected output profile; and the project's `project.json`, `brief.md`, `direction.md`. Preserve them even when a declaration is empty. Additional guidance such as `adaptation-rules.json`, library indexes or memory may be present: read it explicitly when relevant. It is not automatically included in `resolve` merely because it exists.
|
|
44
44
|
|
|
@@ -76,6 +76,6 @@ Save reusable feedback at its stated scope: project-only changes in the project,
|
|
|
76
76
|
|
|
77
77
|
## Updating the installed skill
|
|
78
78
|
|
|
79
|
-
Updating the global CLI does not replace skills already copied into a project. Run `
|
|
79
|
+
Updating the global CLI does not replace skills already copied into a project. Run `editorbrain skill install --dir <workspace> --agent both` and inspect `conflicts`, `preserved`, `warnings` and `readInstructions`.
|
|
80
80
|
|
|
81
81
|
If skill files differ, the installer keeps them. Prepare the new version in a separate temporary directory, compare it with the project's installed copy, and merge changes while preserving custom instructions. Do not assume a successful exit means all guidance was upgraded. Root `AGENTS.md`/`CLAUDE.md` remain user-owned: if already present, use the returned skill path explicitly, or add a narrowly scoped pointer when the user asks to integrate it. There is no automatic global installation for every future project.
|
|
File without changes
|
|
File without changes
|