Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ jobs:
- name: Discover installable Skills
run: npm test

- name: Pack bundled theme sources
run: |
npx --yes --package=@codedrobe/core@latest codedrobe theme pack \
skills/codedrobe-theme/assets/theme-starter/theme.json \
--output /tmp/theme-starter.codedrobe-theme
npx --yes --package=@codedrobe/core@latest codedrobe theme pack \
skills/codedrobe-theme/assets/examples/doll-sister/theme.json \
--output /tmp/doll-sister.codedrobe-theme

- name: Reject unfinished Skill placeholders
shell: bash
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ wechat-codedrobe-launch.md
cover-image/
imgs/
.baoyu-skills/

# Local verification screenshots
/examples/*.png
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
5. Keep runtime code out of Skills. Add CLI, adapters, package parsing, CDP, host settings, and deterministic runtime behavior to [`CodeDrobe/core`](https://github.com/CodeDrobe/core).
6. Include matching `agents/openai.yaml` metadata with a default prompt that names the Skill.
7. Do not add a root `SKILL.md`; it can shadow the multi-Skill catalog during discovery.
8. Do not commit generated themes, screenshots, credentials, tokens, private reference images, or application binaries.
8. Do not commit generated `.codedrobe-theme` packages, screenshots, credentials, tokens, private reference images, or application binaries. Curated source-theme assets are allowed only when their provenance and redistribution status are documented in a directly linked Skill reference.

## Validate

Expand Down
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,30 @@ bunx @codedrobe/core@latest apps
Example:

```bash
codedrobe dom snapshot --app workbuddy --output /absolute/workbuddy-dom.json
codedrobe apply --app workbuddy --theme /absolute/theme.codedrobe-theme
codedrobe verify --app workbuddy --theme /absolute/theme.codedrobe-theme --screenshot /absolute/preview.png
codedrobe restore --app workbuddy
```

## Theme authoring resources

The installed `codedrobe-theme` Skill includes two copyable source resources:

- `assets/theme-starter/`: a complete neutral Codex/WorkBuddy CSS starting point.
- `assets/examples/doll-sister/`: the complete Doll Sister / 玩偶姐姐 multi-app theme with generated hero and texture artwork.

Templates are not treated as permanent application DOM contracts. The Skill captures a privacy-preserving `codedrobe dom snapshot` from each live home/conversation context, selects semantic candidates from that snapshot, then packs, probes, applies, screenshots, and repairs the theme.

## Repository layout

```text
skills/
├── codedrobe-theme/
│ ├── SKILL.md
│ ├── agents/openai.yaml
│ └── references/
│ ├── references/
│ └── assets/
└── codedrobe-adapter-dev/
├── SKILL.md
├── agents/openai.yaml
Expand Down
13 changes: 12 additions & 1 deletion README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,30 @@ bunx @codedrobe/core@latest apps
示例:

```bash
codedrobe dom snapshot --app workbuddy --output /absolute/workbuddy-dom.json
codedrobe apply --app workbuddy --theme /absolute/theme.codedrobe-theme
codedrobe verify --app workbuddy --theme /absolute/theme.codedrobe-theme --screenshot /absolute/preview.png
codedrobe restore --app workbuddy
```

## 主题制作资源

安装后的 `codedrobe-theme` Skill 包含两套可复制源码:

- `assets/theme-starter/`:覆盖 Codex/WorkBuddy 主要界面的完整中性 CSS 起始模板。
- `assets/examples/doll-sister/`:完整的“玩偶姐姐”双应用主题,包含生成的 hero 和 texture 素材。

模板不会被当作永久 DOM 合约。Skill 会在应用首页和会话页分别采集保护隐私的 `codedrobe dom snapshot`,从实机快照选择语义节点,再完成打包、预检、应用、截图和修正。

## 仓库结构

```text
skills/
├── codedrobe-theme/
│ ├── SKILL.md
│ ├── agents/openai.yaml
│ └── references/
│ ├── references/
│ └── assets/
└── codedrobe-adapter-dev/
├── SKILL.md
├── agents/openai.yaml
Expand Down
2 changes: 1 addition & 1 deletion skills/codedrobe-adapter-dev/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Work in the `@codedrobe/core` repository. Keep the adapter lightweight and prove
1. Inspect the current Core tree, adapter registry, tests, CLI help, and working-tree changes.
2. Locate the actual installed app and record its app version/build. Do not overwrite unrelated local changes.
3. Launch the real app with loopback CDP on a configurable, unoccupied port. Do not restart or terminate it without authorization.
4. Inspect `/json/list`, select the actual renderer, and collect semantic DOM evidence from every relevant route.
4. Inspect `/json/list`, select the actual renderer, and run `codedrobe dom snapshot` on every relevant route to collect privacy-preserving semantic DOM evidence.
5. Choose only cross-route landmarks for the adapter: root, sidebar/navigation, workspace/content, and composer/input.
6. Put app- or theme-specific layout nodes in theme verification contexts, not the adapter.
7. Implement the adapter, registry export, types, and focused tests. Add a renderer profile or host-settings module only when the application requires that behavior.
Expand Down
9 changes: 9 additions & 0 deletions skills/codedrobe-adapter-dev/references/dom-inspection.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@

Do not expose CDP on public interfaces.

After the adapter can identify the renderer, prefer Core's read-only snapshot over arbitrary page dumps:

```bash
codedrobe dom snapshot --app <app-id> --port <port> \
--max-nodes 1500 --output /absolute/dom-<context>.json
```

Capture each route separately. The snapshot excludes text, form values, accessible names, links, and media sources while retaining selector candidates, match counts, geometry, computed style, and adapter landmark results.

## Collect evidence

Inspect every route the adapter must support:
Expand Down
18 changes: 11 additions & 7 deletions skills/codedrobe-theme/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: codedrobe-theme
description: Create, inspect, convert, apply, replace, verify, troubleshoot, update, or restore reversible CodeDrobe themes for supported Chromium/Electron AI desktop apps, including OpenAI Codex and Tencent WorkBuddy. Use for .codedrobe-theme packages, app-specific CDP ports or installation paths, theme images and CSS, DOM compatibility failures, screenshots, or migration from legacy .codex-theme files.
description: Create, inspect, convert, apply, replace, verify, troubleshoot, update, or restore reversible CodeDrobe themes for supported Chromium/Electron AI desktop apps, including OpenAI Codex and Tencent WorkBuddy. Use for .codedrobe-theme packages, live CDP DOM snapshots, starter or example CSS, app-specific ports or installation paths, theme images, DOM compatibility failures, screenshots, or migration from legacy .codex-theme files.
---

# CodeDrobe Theme
Expand All @@ -15,7 +15,9 @@ Use the published `@codedrobe/core` CLI as the only runtime. Keep this Skill ins
- Codex: [references/codex.md](references/codex.md)
- WorkBuddy: [references/workbuddy.md](references/workbuddy.md)
4. For theme creation, images, CSS, packaging, or legacy conversion, read [references/theme-authoring.md](references/theme-authoring.md).
5. For probe, verification, screenshots, missing nodes, CDP failures, or app updates, read [references/verification.md](references/verification.md).
5. For new or repaired CSS, read [references/dom-snapshot.md](references/dom-snapshot.md) and [references/css-templates.md](references/css-templates.md).
6. For the complete Doll Sister / 玩偶姐姐 example, read [references/doll-sister-example.md](references/doll-sister-example.md).
7. For probe, verification, screenshots, missing nodes, CDP failures, or app updates, read [references/verification.md](references/verification.md).

## Apply an existing theme

Expand All @@ -37,11 +39,13 @@ codedrobe verify --app <app-id> --theme /absolute/theme.codedrobe-theme --screen

## Create or repair a theme

1. Start from a source `theme.json`, app-specific CSS files, and local image assets.
2. Keep shared artwork in named `images`; keep app-specific selectors under the relevant target CSS.
3. Keep adapter landmarks generic and theme layout assumptions in theme-specific verification nodes.
4. Pack with Core, inspect the output, then probe and apply it on a real renderer.
5. Iterate from screenshots. Do not claim success from static CSS or package validation alone.
1. Copy `assets/theme-starter/` for a neutral base or `assets/examples/doll-sister/` for a complete multi-app example. Never edit the installed Skill in place.
2. Open each app context the theme will style and capture a separate `codedrobe dom snapshot`; do not infer selectors from the template alone.
3. Select semantic candidates from the snapshot, then write app-specific CSS under `html.codedrobe-host-<app-id>`.
4. Keep shared artwork in named `images`; keep app-specific selectors under the relevant target CSS.
5. Keep adapter landmarks generic and theme layout assumptions in theme-specific verification nodes.
6. Pack with Core, inspect the output, then probe and apply it on a real renderer.
7. Iterate from home and conversation screenshots. Do not claim success from static CSS, a snapshot, or package validation alone.

## Restore

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading