agentleFS
tronschelltronschell/shinbo/.claude/skills/contributing/SKILL.md

contributing

Skill1 starsChanged 3 months agoMITView on GitHub

How to contribute to the Shinbo repository — the house standards, which layer to rebuild for a given change, how to run a dev instance (and a second one that will not fight the first), how to run against the packaged build, the six checks, and how to verify a change in the real app. Use for any change to Shinbo's own desktop, crates, or harness code, or when asked how to build, run, check, or package this repo.

  • Installs packages

13 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 0 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 13 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Validate at the trust boundary: Every IPC parameter, NDJSON line, imported manifest and model-supplied argument is parsed and bounded where …

    line 25
  2. Very specific:

    Start feature branches from dev and open PRs against dev.

    line 39
  3. Very specific:

    When preparing or updating a feature PR, write its ## Release notes section from the completed changes using releasing.

    line 44
  4. Very specific:

    All six. Nothing else is a check — just check runs two of them and is not the list.

    line 97

“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Contributing to Shinbo

Read first

AGENTS.md is the contract, not a style guide. The rule that catches everyone: no comments, anywhere — TypeScript, Rust, Zig, CSS, shell, config, and doc comments (///, /** */, JSDoc) count. Delete the ones you find in files you are already editing. Only tool-mandated lines survive: shebangs, license headers on vendored files, and directives like // @ts-expect-error or #![allow(...)].

The rest of the standards:

  • Layer boundaries stay visible. desktop/main owns windows, shortcuts, IPC and every privileged runtime; desktop/src is a sandboxed renderer with no Node and no Electron imports; desktop/shared is what both agree on and may not import Electron; crates/host is the NDJSON bridge; crates/core owns durable Markdown records; harness/ owns the agent loop. Filesystem, process, network, image and model work never moves into the renderer.
  • Validate at the trust boundary. Every IPC parameter, NDJSON line, imported manifest and model-supplied argument is parsed and bounded where it arrives. desktop/main/ipc.ts and desktop/main/tools.ts are the house style. The guard goes in the shared function, not in each caller.
  • No new dependency, crate, trait, service locator or plugin framework until a second real implementation needs the boundary. One implementation is not a boundary.
  • Shortest diff that works, fewest files.
  • One runnable check for non-trivial logic. node:test files in desktop/test/*.test.ts; copy a neighbour's shape.
  • harness/ is a fork of vercel-labs/fx, Apache-2.0. Read harness/FORK.md before touching it and keep it honest; LICENSE and THIRD_PARTY_NOTICES.md stay.

Start feature branches from dev and open PRs against dev. Squash-merge features with a conventional PR title. Only a prepared release on dev is promoted to main, using a merge commit. See releasing. Preserve unrelated work already in the checkout.

When preparing or updating a feature PR, write its ## Release notes section from the completed changes using releasing. Keep the notes current as the PR changes; squash merging preserves them for the release.

Running it

Three ways, and they are not interchangeable.

CommandWhat you get
Devnpm run devBuilds host + native + main, starts Vite, launches Electron against it. Only desktop/src/** hot-reloads
Prod-ishnpm --prefix desktop startSame builds, no Vite — Electron runs the built bundle. Closest thing to the shipped app without packaging
Packagednpm run package:macRelease Rust + ReleaseSafe Zig + electron-packager → desktop/release/Shinbo-darwin-arm64/Shinbo.app. Apple silicon only; signed with the Developer ID Application identity in your keychain when there is one (or SHINBO_CODESIGN_IDENTITY), ad hoc otherwise, so privacy grants survive rebuilds

First clone:

npm install --prefix desktop
npm run dev

scripts/dev.mjs is strictly sequential and has no watcher. A change to main/, shared/, crates/, harness/ or native/ means quit and rerun npm run dev. A main-process edit that was not rebuilt and relaunched shows up as red No handler registered for 'shinbo:…' in the window — that is a stale main process, not your bug.

A second instance, without killing the first

A running Shinbo holds Electron's single-instance lock, so a plain electron . exits silently with code 0 and looks like a build failure. Give the second one its own profile, and its own data root so it does not edit real threads:

cd desktop && SHINBO_DATA_DIR=/tmp/shinbo-dev-data ./node_modules/.bin/electron . \
  --user-data-dir=/tmp/shinbo-dev-profile --remote-debugging-port=9223

The unsigned dev binary never gets macOS notification permission — only the packaged app is prompted.

Rebuild only the layer you touched

ChangedBuild withThen
desktop/srcnpm --prefix desktop run build:rendererreload the window
desktop/main, desktop/sharednpm --prefix desktop run build:mainrelaunch Electron
crates/npm --prefix desktop run build:hostrelaunch
harness/npm --prefix desktop run build:harnessrelaunch
desktop/native/*.m, *.cnpm --prefix desktop run build:nativerelaunch

Checks

All six. Nothing else is a check — just check runs two of them and is not the list.

npm --prefix desktop run check
cargo fmt --all -- --check
cargo check --workspace --locked --all-targets
cargo test --workspace --locked
cargo clippy --workspace --locked --all-targets -- -D warnings
(cd harness && zig build test)

npm run check is test → typecheck → lint → renderer build. Never run two at once: concurrent Vite builds clash over dist-renderer.

Verifying

Launching is not verifying. Visible or platform work is not done until the real app has been launched and the changed interaction exercised.

SHINBO_CDP_PORT=9223 node desktop/scripts/drive.mjs \
  'return await window.shinbo.request("snapshot", {})'
node desktop/scripts/shot.mjs 9223 /tmp/shinbo-shots 1440 900

drive.mjs evaluates against the real window.shinbo bridge — the same path a click takes. Its argument is an async function body, so it needs return. shot.mjs reloads first, so it picks up a renderer rebuild but not a main one. A screenshot that disagrees with the source is a stale bundle: rebuild, confirm over CDP, then believe the picture.

Report what you did not verify. Privacy permissions, VoiceOver, display geometry, signing and non-macOS paths are called out, not implied.

Deeper

  • releasing — conventional PR titles, the generated changelog, CI, and how a build reaches a release
  • docs/development.md — every npm script, the full repo map, toolchain pins, packaging and the open release blockers
  • docs/architecture.md — process boundaries and the trust model
  • docs/data.md — every file and environment variable
  • docs/troubleshooting.md — when it breaks
  • docs/design-system.md — the renderer's visual contract

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.