This is a Tauri 2 + React 18 + TypeScript + Rust coding-agent harness. The
skills/ directory is the runtime catalog the shipped Zeus app uses to
inject guidance into model calls; it is not the agent's own skill set.
- Frontend:
src/— React + TypeScript, strict mode, vitest. - Backend:
src-tauri/src/— Rust 1.95, Tauri 2, SQLite (rusqlite). - Bridge: Tauri commands in
src-tauri/src/agent_runtime_commands.rsexposed to React viasrc/providers/agentRuntime.ts. - Patch engine:
src-tauri/src/patch.rs— multi-file transactional unified-diff applier. - Agent loop:
src-tauri/src/agent_runtime.rsowns sessions, plans, tool runs, approvals, browser sessions, memory, and code-search observations. The bounded observe-and-replan driver is mirrored insrc/agentRuntimeDeepLoop.ts. - Runtime policy (access modes, command classes, approval gates):
src-tauri/src/policy.rs. The Rust types are mirrored insrc/providers/workspace.tsfor the tool-run panel.
- Read before edit. Touched files only; check callers, not just the function being changed. Bug fix = root cause, not symptom.
- Build incrementally. One logical change at a time, verify with
npm run typecheck && npm test && npm run build, then move on. - Match stated to actual. If a config file, env example, README badge, or capability guard disagrees with what the code actually does, fix the doc, not the code. Drift is a process smell.
- No side-loaded scripts. Every UI change goes through React. If the inspector needs a runtime plan, extract a component. If a panel needs DOM patching, fix the component.
- Use the patch engine for multi-file edits. Single-file edits are
fine via the IDE; multi-file changes route through
apply_patchwithexpectedTextguards. Do not "force-add past.gitignore" tracked files; either commit them properly or drop the rule. - Tests alongside logic. New helper or behavior change gets a
*.test.ts(x)next to the file. One failing test is enough to start; passing tests stay passing. - Pre-commit verification (mandatory):
npm run typecheck— cleannpm test— all greennpm run build— cleanbash scripts/check-tauri-capabilities.sh— passesgit diff --stat— review for forgottenconsole.log, commented-out test code, hardcoded test paths
- Commit message format:
type(scope): summaryin present tense.fix(chat): …,feat(harness): …,chore: …,refactor(app): …. One logical change per commit.
| To change … | Look in … |
|---|---|
| A new Tauri command (Rust → TS bridge) | src-tauri/src/agent_runtime_commands.rs + src/providers/agentRuntime.ts + the matching TypeScript types in the same file |
| A new slash command | src/providers/slash.ts (the picker) + the dispatcher in src/App.tsx |
| A new skill category | skills/<Category>/<skill-name>/SKILL.md with YAML frontmatter (name, description); the runtime auto-discovers from ZEUS_SKILLS_DIR or the bundled skills/ resource |
| Access-mode policy | src-tauri/src/policy.rs (Rust) — the binary allow/deny gate |
| Command classification (Safe / Dependency / Network / Destructive / Privileged) | src-tauri/src/policy.rs — drives the Tool Run panel badge color |
| Validation failure types (workspace / argument / policy / transient / unknown) | src-tauri/src/validation.rs + src/agentRuntimeDeepLoop.ts |
| The provider dispatch table | src/providers/registry.ts (TS) + src-tauri/src/providers/ (Rust trait + per-provider adapter) |
| The agent runtime state machine (HarnessProposalStatus, etc.) | src/state/harness.ts |
| Plan / design documents | docs/superpowers/specs/ and docs/superpowers/plans/ |
App.tsxis still 2300+ lines. A real refactor would split it by view (Home, Sessions, Skills, Memory, Harness Evolution, Settings). Don't expand it without extracting at least the new logic into a component file.styles.cssis 2300+ lines. Same shape — pull view-specific rules into per-component CSS modules or per-panel<style>blocks when you add a new panel.dist/index.htmlis the Vite build output; never edit it directly.- The desktop window config is
src-tauri/tauri.conf.json. Changing thewindowsblock changes the launched UX. - The CI matrix is
.github/workflows/package.yml(macOS, Ubuntu, Windows). Anything Tauri-build or platform-conditional needs to be tested on all three.
npm run typecheckcleannpm testall greennpm run buildcleanbash scripts/check-tauri-capabilities.shpassesgit statusshows only the files you intended to change- The change is explained in the diff (no "fix stuff" commits)
.githooks/pre-commit runs typecheck + vitest (changed files when supported)
- the tauri-capability check when
src-tauri/is touched. Enable once per clone:git config core.hooksPath .githooks. The hook is opt-in so it never breaks fresh clones, sandboxed agents, or one-off commits.