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
74 changes: 74 additions & 0 deletions .acecode/skills/macos-portable-package/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
name: macos-portable-package
description: Build an install-free ("green") macOS package for ACECode — a ditto zip containing ACECode.app, the `acecode` TUI binary, and the share/acecode resource tree. Use when asked to build a portable/green Mac package, a self-contained macOS zip, or to guard against the configure-time web-UI embed footgun (silent stale UI in the package).
platforms: [macos]
compatibility: ACECode build system
metadata:
tags: [packaging, macos, release, portable]
---

# macOS Portable ("Green") Package

Produce a self-contained macOS zip that runs by double-click without installation.
Layout mirrors CI `.github/workflows/package.yml` "Package (Unix)" macOS branch:

```
ACECode.app (desktop shell, bundles acecode-daemon)
acecode (TUI executable)
README.md / README_CN.md
share/acecode/models_dev (api.json, MANIFEST.json, LICENSE)
share/acecode/seed (experts, skills, hooks)
```

## Usage

```bash
bash scripts/macos_create_portable_zip.sh [suffix] [--arch arm64] [--output PATH]
# e.g.
bash scripts/macos_create_portable_zip.sh fork
bash scripts/macos_create_portable_zip.sh pre --arch arm64
```

First positional arg is the output suffix (default `portable`). The build dir
defaults to `build/macos-x64-release`; the script auto-detects a working cmake
(see pitfalls) and a fresh `web/dist`.

## The embed footgun this skill prevents

Front-end assets are embedded into C++ **only at cmake configure time**
(`cmake/acecode_embed_assets.cmake` → `build/.../generated/static_assets_data.cpp`,
regenerated by `GLOB_RECURSE ... CONFIGURE_DEPENDS`). Running `cmake --build`
alone never refreshes them. If you edit `web/` and only rebuild, the zip silently
ships the old UI. The script enforces three guards:

1. **Source newer than dist** (`web/src` mtime > `web/dist/index.html`) → fail
with "run pnpm build first". Catches the "edited UI, forgot to build" case.
2. **Dist newer than embedded assets** (`web/dist/index.html` mtime > the
generated cpp, OR a recorded dist-hash marker mismatch) → auto reconfigure
cmake (skipping vcpkg install) and rebuild `acecode-desktop`, then record the
new dist hash. Catches the "built UI, forgot to reconfigure" case.
3. **Post-build binary check** → after zipping, grep the extracted binary for a
dist-only token (`provider-logos`); abort if the embedded asset map is empty.

## Pitfalls (verified on this machine)

- **Broken cmake wrapper**: `~/.local/bin/cmake` is a broken pip shim that fails
with `assert cmake_files is not None`. The real binary is under the pip package:
`~/.local/lib/python3.12/site-packages/cmake/data/bin/cmake`. The script finds
any candidate that answers `--version`.
- **vcpkg install blocked**: reconfigure fails with
`remove("~/vcpkg/buildtrees/0.vcpkg_dep_info.cmake"): Operation not permitted`
(process-level, not a sandbox flag). Pass `-DVCPKG_MANIFEST_INSTALL=OFF` so
cmake skips vcpkg install — dependencies are already installed.
- **Verifying UI presence**: `strings` drops non-ASCII, so grepping a binary for
Chinese copy returns 0; minified JS also mangles symbol names. Use
`grep -a "provider-logos"` on the compiled binary instead.
- **arm64**: pass `--arch arm64`; the script threads `CMAKE_OSX_ARCHITECTURES`
and you must also use the `arm64-osx` vcpkg triplet/overlay if building native.
- **No GUI smoke test** under headless: `ACECode.app` cannot launch without a
display, but `./acecode --version` validates the TUI binary + dylibs.

## Output

`dist/acecode-<version>-macos-<arch>-<suffix>-portable.zip` (~39 MB for 0.9.11),
plus a `du`/`shasum -a 256` line for the record.
74 changes: 74 additions & 0 deletions .agents/skills/macos-portable-package/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
name: macos-portable-package
description: Build an install-free ("green") macOS package for ACECode — a ditto zip containing ACECode.app, the `acecode` TUI binary, and the share/acecode resource tree. Use when asked to build a portable/green Mac package, a self-contained macOS zip, or to guard against the configure-time web-UI embed footgun (silent stale UI in the package).
platforms: [macos]
compatibility: ACECode build system
metadata:
tags: [packaging, macos, release, portable]
---

# macOS Portable ("Green") Package

Produce a self-contained macOS zip that runs by double-click without installation.
Layout mirrors CI `.github/workflows/package.yml` "Package (Unix)" macOS branch:

```
ACECode.app (desktop shell, bundles acecode-daemon)
acecode (TUI executable)
README.md / README_CN.md
share/acecode/models_dev (api.json, MANIFEST.json, LICENSE)
share/acecode/seed (experts, skills, hooks)
```

## Usage

```bash
bash scripts/macos_create_portable_zip.sh [suffix] [--arch arm64] [--output PATH]
# e.g.
bash scripts/macos_create_portable_zip.sh fork
bash scripts/macos_create_portable_zip.sh pre --arch arm64
```

First positional arg is the output suffix (default `portable`). The build dir
defaults to `build/macos-x64-release`; the script auto-detects a working cmake
(see pitfalls) and a fresh `web/dist`.

## The embed footgun this skill prevents

Front-end assets are embedded into C++ **only at cmake configure time**
(`cmake/acecode_embed_assets.cmake` → `build/.../generated/static_assets_data.cpp`,
regenerated by `GLOB_RECURSE ... CONFIGURE_DEPENDS`). Running `cmake --build`
alone never refreshes them. If you edit `web/` and only rebuild, the zip silently
ships the old UI. The script enforces three guards:

1. **Source newer than dist** (`web/src` mtime > `web/dist/index.html`) → fail
with "run pnpm build first". Catches the "edited UI, forgot to build" case.
2. **Dist newer than embedded assets** (`web/dist/index.html` mtime > the
generated cpp, OR a recorded dist-hash marker mismatch) → auto reconfigure
cmake (skipping vcpkg install) and rebuild `acecode-desktop`, then record the
new dist hash. Catches the "built UI, forgot to reconfigure" case.
3. **Post-build binary check** → after zipping, grep the extracted binary for a
dist-only token (`provider-logos`); abort if the embedded asset map is empty.

## Pitfalls (verified on this machine)

- **Broken cmake wrapper**: `~/.local/bin/cmake` is a broken pip shim that fails
with `assert cmake_files is not None`. The real binary is under the pip package:
`~/.local/lib/python3.12/site-packages/cmake/data/bin/cmake`. The script finds
any candidate that answers `--version`.
- **vcpkg install blocked**: reconfigure fails with
`remove("~/vcpkg/buildtrees/0.vcpkg_dep_info.cmake"): Operation not permitted`
(process-level, not a sandbox flag). Pass `-DVCPKG_MANIFEST_INSTALL=OFF` so
cmake skips vcpkg install — dependencies are already installed.
- **Verifying UI presence**: `strings` drops non-ASCII, so grepping a binary for
Chinese copy returns 0; minified JS also mangles symbol names. Use
`grep -a "provider-logos"` on the compiled binary instead.
- **arm64**: pass `--arch arm64`; the script threads `CMAKE_OSX_ARCHITECTURES`
and you must also use the `arm64-osx` vcpkg triplet/overlay if building native.
- **No GUI smoke test** under headless: `ACECode.app` cannot launch without a
display, but `./acecode --version` validates the TUI binary + dylibs.

## Output

`dist/acecode-<version>-macos-<arch>-<suffix>-portable.zip` (~39 MB for 0.9.11),
plus a `du`/`shasum -a 256` line for the record.
74 changes: 74 additions & 0 deletions .claude/skills/macos-portable-package/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
name: macos-portable-package
description: Build an install-free ("green") macOS package for ACECode — a ditto zip containing ACECode.app, the `acecode` TUI binary, and the share/acecode resource tree. Use when asked to build a portable/green Mac package, a self-contained macOS zip, or to guard against the configure-time web-UI embed footgun (silent stale UI in the package).
platforms: [macos]
compatibility: ACECode build system
metadata:
tags: [packaging, macos, release, portable]
---

# macOS Portable ("Green") Package

Produce a self-contained macOS zip that runs by double-click without installation.
Layout mirrors CI `.github/workflows/package.yml` "Package (Unix)" macOS branch:

```
ACECode.app (desktop shell, bundles acecode-daemon)
acecode (TUI executable)
README.md / README_CN.md
share/acecode/models_dev (api.json, MANIFEST.json, LICENSE)
share/acecode/seed (experts, skills, hooks)
```

## Usage

```bash
bash scripts/macos_create_portable_zip.sh [suffix] [--arch arm64] [--output PATH]
# e.g.
bash scripts/macos_create_portable_zip.sh fork
bash scripts/macos_create_portable_zip.sh pre --arch arm64
```

First positional arg is the output suffix (default `portable`). The build dir
defaults to `build/macos-x64-release`; the script auto-detects a working cmake
(see pitfalls) and a fresh `web/dist`.

## The embed footgun this skill prevents

Front-end assets are embedded into C++ **only at cmake configure time**
(`cmake/acecode_embed_assets.cmake` → `build/.../generated/static_assets_data.cpp`,
regenerated by `GLOB_RECURSE ... CONFIGURE_DEPENDS`). Running `cmake --build`
alone never refreshes them. If you edit `web/` and only rebuild, the zip silently
ships the old UI. The script enforces three guards:

1. **Source newer than dist** (`web/src` mtime > `web/dist/index.html`) → fail
with "run pnpm build first". Catches the "edited UI, forgot to build" case.
2. **Dist newer than embedded assets** (`web/dist/index.html` mtime > the
generated cpp, OR a recorded dist-hash marker mismatch) → auto reconfigure
cmake (skipping vcpkg install) and rebuild `acecode-desktop`, then record the
new dist hash. Catches the "built UI, forgot to reconfigure" case.
3. **Post-build binary check** → after zipping, grep the extracted binary for a
dist-only token (`provider-logos`); abort if the embedded asset map is empty.

## Pitfalls (verified on this machine)

- **Broken cmake wrapper**: `~/.local/bin/cmake` is a broken pip shim that fails
with `assert cmake_files is not None`. The real binary is under the pip package:
`~/.local/lib/python3.12/site-packages/cmake/data/bin/cmake`. The script finds
any candidate that answers `--version`.
- **vcpkg install blocked**: reconfigure fails with
`remove("~/vcpkg/buildtrees/0.vcpkg_dep_info.cmake"): Operation not permitted`
(process-level, not a sandbox flag). Pass `-DVCPKG_MANIFEST_INSTALL=OFF` so
cmake skips vcpkg install — dependencies are already installed.
- **Verifying UI presence**: `strings` drops non-ASCII, so grepping a binary for
Chinese copy returns 0; minified JS also mangles symbol names. Use
`grep -a "provider-logos"` on the compiled binary instead.
- **arm64**: pass `--arch arm64`; the script threads `CMAKE_OSX_ARCHITECTURES`
and you must also use the `arm64-osx` vcpkg triplet/overlay if building native.
- **No GUI smoke test** under headless: `ACECode.app` cannot launch without a
display, but `./acecode --version` validates the TUI binary + dylibs.

## Output

`dist/acecode-<version>-macos-<arch>-<suffix>-portable.zip` (~39 MB for 0.9.11),
plus a `du`/`shasum -a 256` line for the record.
74 changes: 74 additions & 0 deletions .codex/skills/macos-portable-package/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
name: macos-portable-package
description: Build an install-free ("green") macOS package for ACECode — a ditto zip containing ACECode.app, the `acecode` TUI binary, and the share/acecode resource tree. Use when asked to build a portable/green Mac package, a self-contained macOS zip, or to guard against the configure-time web-UI embed footgun (silent stale UI in the package).
platforms: [macos]
compatibility: ACECode build system
metadata:
tags: [packaging, macos, release, portable]
---

# macOS Portable ("Green") Package

Produce a self-contained macOS zip that runs by double-click without installation.
Layout mirrors CI `.github/workflows/package.yml` "Package (Unix)" macOS branch:

```
ACECode.app (desktop shell, bundles acecode-daemon)
acecode (TUI executable)
README.md / README_CN.md
share/acecode/models_dev (api.json, MANIFEST.json, LICENSE)
share/acecode/seed (experts, skills, hooks)
```

## Usage

```bash
bash scripts/macos_create_portable_zip.sh [suffix] [--arch arm64] [--output PATH]
# e.g.
bash scripts/macos_create_portable_zip.sh fork
bash scripts/macos_create_portable_zip.sh pre --arch arm64
```

First positional arg is the output suffix (default `portable`). The build dir
defaults to `build/macos-x64-release`; the script auto-detects a working cmake
(see pitfalls) and a fresh `web/dist`.

## The embed footgun this skill prevents

Front-end assets are embedded into C++ **only at cmake configure time**
(`cmake/acecode_embed_assets.cmake` → `build/.../generated/static_assets_data.cpp`,
regenerated by `GLOB_RECURSE ... CONFIGURE_DEPENDS`). Running `cmake --build`
alone never refreshes them. If you edit `web/` and only rebuild, the zip silently
ships the old UI. The script enforces three guards:

1. **Source newer than dist** (`web/src` mtime > `web/dist/index.html`) → fail
with "run pnpm build first". Catches the "edited UI, forgot to build" case.
2. **Dist newer than embedded assets** (`web/dist/index.html` mtime > the
generated cpp, OR a recorded dist-hash marker mismatch) → auto reconfigure
cmake (skipping vcpkg install) and rebuild `acecode-desktop`, then record the
new dist hash. Catches the "built UI, forgot to reconfigure" case.
3. **Post-build binary check** → after zipping, grep the extracted binary for a
dist-only token (`provider-logos`); abort if the embedded asset map is empty.

## Pitfalls (verified on this machine)

- **Broken cmake wrapper**: `~/.local/bin/cmake` is a broken pip shim that fails
with `assert cmake_files is not None`. The real binary is under the pip package:
`~/.local/lib/python3.12/site-packages/cmake/data/bin/cmake`. The script finds
any candidate that answers `--version`.
- **vcpkg install blocked**: reconfigure fails with
`remove("~/vcpkg/buildtrees/0.vcpkg_dep_info.cmake"): Operation not permitted`
(process-level, not a sandbox flag). Pass `-DVCPKG_MANIFEST_INSTALL=OFF` so
cmake skips vcpkg install — dependencies are already installed.
- **Verifying UI presence**: `strings` drops non-ASCII, so grepping a binary for
Chinese copy returns 0; minified JS also mangles symbol names. Use
`grep -a "provider-logos"` on the compiled binary instead.
- **arm64**: pass `--arch arm64`; the script threads `CMAKE_OSX_ARCHITECTURES`
and you must also use the `arm64-osx` vcpkg triplet/overlay if building native.
- **No GUI smoke test** under headless: `ACECode.app` cannot launch without a
display, but `./acecode --version` validates the TUI binary + dylibs.

## Output

`dist/acecode-<version>-macos-<arch>-<suffix>-portable.zip` (~39 MB for 0.9.11),
plus a `du`/`shasum -a 256` line for the record.
2 changes: 2 additions & 0 deletions openspec/changes/fork-user-prompt-to-composer/.openspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
schema: spec-driven
created: 2026-09-08
Loading
Loading