the signals and their derived score are provisional and subject to change.
validate manually before sharing.
a3015bbd62284cd5bf06db68be1db3a48941f3a765c1ff8db16d3 months agoCo-authored-by: Claude Opus 4.8 <noreply@anthropic.com>9e98b2e204153 months agoCo-authored-by: Claude Fable 5 <noreply@anthropic.com># Hope:RE - Senior Engineer Instructions
You are a senior engineer working on Hope:RE, an AI art protection desktop app. You must strictly adhere to the following rules and conventions.
## Project Overview
Hope:RE applies adversarial perturbations to images using CLIP-based ONNX models to protect them from unauthorized AI training.
- **Frontend**: SvelteKit 2 + Svelte 5 (Runes) + TypeScript + Tailwind CSS 4 + shadcn-svelte.
- **Backend**: Rust + Tauri v2 + ONNX Runtime (ort crate).
- **ML Pipeline**:# Hope:RE - Agent Instructions
AI art protection desktop app (adversarial perturbation via ONNX models).
Frontend: SvelteKit 2 + Svelte 5 + TypeScript + Tailwind CSS 4 + shadcn-svelte.
Backend: Rust (Tauri v2) with ONNX Runtime ML inference.
Design philosophy: minimalistic artistic Japanese Zen-like system design.
## Documentation Map
The project documentation is split into five feature documents. Read the relevant one before starting work; this file only keeps the agent-specific tooling and a digest of ---
name: ui-ux-pro-max
description: "UI/UX design intelligence for web and mobile. Includes 50+ styles, 161 color palettes, 57 font pairings, 161 product types, 99 UX guidelines, and 25 chart types across 10 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui, and HTML/CSS). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, and check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, p---
name: svelte5-best-practices
description: "Svelte 5 runes, snippets, SvelteKit patterns, and modern best practices for TypeScript and component development. Use when writing, reviewing, or refactoring Svelte 5 components and SvelteKit applications. Triggers on: Svelte components, runes ($state, $derived, $effect, $props, $bindable, $inspect), snippets ({#snippet}, {@render}), event handling, SvelteKit data loading, form actions, Svelte 4 to Svelte 5 migration, store to rune migration, slots to snippets ---
name: tauri-command
description: Create a new Rust Tauri v2 command following Hope:RE error handling and module conventions
---
## Tauri Command Pattern
When creating a new Tauri command in Hope:RE, follow these conventions:
### Command Function
```rust
#[tauri::command]
pub async fn my_command(
app: tauri::AppHandle,
input_param: String,
) -> Result<MyOutput, String> {
let result = some_operation(&input_param)
.map_err(|e| format!("Failed to do operation: {}", e))?;
let _ = ---
name: protection-algorithm
description: Implement the SPSA-PGD adversarial perturbation pipeline for image protection in Rust
---
## Protection Algorithm Pattern
When working with the SPSA-PGD adversarial perturbation pipeline in Hope:RE, follow these conventions:
### Pipeline Overview
```
Image (any size)
-> Decode base64
-> Tile into 224x224 overlapping patches (stride = TILE_SIZE - TILE_OVERLAP)
-> For each tile:
-> Preprocess: crop, resize to 224x224, normalize to [0.0, 1.0]
---
name: onnx-rust-integration
description: Load and run ONNX models in the Rust Tauri backend using the ort crate with platform-specific execution providers
---
## ONNX Rust Integration Pattern
When working with ONNX models in the Hope:RE Rust backend, follow these conventions:
### Model Specification
Three ONNX models exist, each ~350MB, built on ViT-B/32 CLIP:
| Model | File | Inputs | Output |
|-------|------|--------|--------|
| Noise | `noise_algorithm.onnx` | `input: (1,224,224,3) f32` | scalar---
name: context7
description: Retrieve up-to-date documentation for software libraries, frameworks, and components via the Context7 API. This skill should be used when looking up documentation for any programming library or framework, finding code examples for specific APIs or features, verifying correct usage of library functions, or obtaining current information about library APIs that may have changed since training.
---
# Context7
## Overview
This skill enables retrieval of current documentation fo---
name: tanstack-query
description: Create TanStack Svelte Query hooks following Hope:RE patterns with createQuery and createMutation
---
## TanStack Query Pattern
When creating query hooks in Hope:RE, follow these conventions:
### Query Hook (reading data)
```typescript
import type { MyDataType } from "./types";
import { createQuery } from "@tanstack/svelte-query";
import { invoke } from "@tauri-apps/api/core";
export function useMyData() {
return createQuery(() => ({
queryKey: ["my-data"],
---
name: protection-algorithm
description: Implement the SPSA-PGD adversarial perturbation pipeline for image protection in Rust
---
## Protection Algorithm Pattern
When working with the SPSA-PGD adversarial perturbation pipeline in Hope:RE, follow these conventions:
### Pipeline Overview
```
Image (any size)
-> Decode base64
-> Tile into 224x224 overlapping patches (stride = TILE_SIZE - TILE_OVERLAP)
-> For each tile:
-> Preprocess: crop, resize to 224x224, normalize to [0.0, 1.0]
---
name: ponytail
description: >
Forces the laziest solution that actually works, simplest, shortest, most
minimal. Channels a senior dev who has seen everything: question whether the
task needs to exist at all (YAGNI), reach for the standard library before
custom code, native platform features before dependencies, one line before
fifty. Supports intensity levels: lite, full (default), ultra. Use on ANY
coding task: writing, adding, refactoring, fixing, reviewing, or designing
code, and choos---
name: chrome-devtools
description: Uses Chrome DevTools via MCP for efficient debugging, troubleshooting and browser automation. Use when debugging web pages, automating browser interactions, analyzing performance, or inspecting network requests. This skill does not apply to `--slim` mode (MCP configuration).
---
## Core Concepts
**Browser lifecycle**: Browser starts automatically on first tool call using a persistent Chrome profile. Configure via CLI args in the MCP server configuration: `npx chrome----
name: onnx-export
description: Convert JAX/Python ML models to ONNX format following the Hope:RE notebook pipeline for Google Colab
---
## ONNX Export Pipeline
When creating or modifying the ML training-to-ONNX export pipeline in Hope:RE, follow these conventions:
### Pipeline Overview (6 Notebooks, Google Colab)
```
0_setup_colab.ipynb -> GPU check, JAX+CUDA install
1_clip_to_jax.ipynb -> PyTorch CLIP weights -> numpy, pre-compute text embeddings
2_noise_algorithm.ipynb -> JAX PGD noise prote---
name: onnx-rust-integration
description: Load and run ONNX models in the Rust Tauri backend using the ort crate with platform-specific execution providers
---
## ONNX Rust Integration Pattern
When working with ONNX models in the Hope:RE Rust backend, follow these conventions:
### Model Specification
Three ONNX models exist, each ~350MB, built on ViT-B/32 CLIP:
| Model | File | Inputs | Output |
|-------|------|--------|--------|
| Noise | `noise_algorithm.onnx` | `input: (1,224,224,3) f32` | scalar---
name: model-distribution
description: Handle ONNX model distribution via Git LFS, GitHub Releases, and runtime downloading in Hope:RE
---
## Model Distribution Pattern
When working with ONNX model distribution in Hope:RE, follow these conventions:
### Distribution Flow
```
Developer workflow:
src-models/notebooks/ (train in Colab)
-> src-models/models/*.onnx (export)
-> git lfs track (via .gitattributes)
-> git push (LFS pointers go to repo, binaries to LFS storage)
-> publish.yml ---
name: svelte-component
description: Create a new Svelte 5 component following Hope:RE conventions with runes, Tailwind CSS, and proper barrel exports
---
## Svelte 5 Component Pattern
When creating a new component in Hope:RE, follow these conventions:
### File Structure
```
src/lib/components/<feature>/
index.svelte
index.ts
types.ts
sub-component.svelte
```
### Component Template
```svelte
<script lang="ts">
import type { ComponentProps } from "./types";
let {
prop1 = "default",
---
name: tanstack-query
description: Create TanStack Svelte Query hooks following Hope:RE patterns with createQuery and createMutation
---
## TanStack Query Pattern
When creating query hooks in Hope:RE, follow these conventions:
### Query Hook (reading data)
```typescript
import type { MyDataType } from "./types";
import { createQuery } from "@tanstack/svelte-query";
import { invoke } from "@tauri-apps/api/core";
export function useMyData() {
return createQuery(() => ({
queryKey: ["my-data"],
---
name: tauri-command
description: Create a new Rust Tauri v2 command following Hope:RE error handling and module conventions
---
## Tauri Command Pattern
When creating a new Tauri command in Hope:RE, follow these conventions:
### Command Function
```rust
#[tauri::command]
pub async fn my_command(
app: tauri::AppHandle,
input_param: String,
) -> Result<MyOutput, String> {
let result = some_operation(&input_param)
.map_err(|e| format!("Failed to do operation: {}", e))?;
let _ = ---
name: frontend-design
description: Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
license: Complete terms in LICENSE.txt
---
This skill guides creation of---
name: svelte-component
description: Create a new Svelte 5 component following Hope:RE conventions with runes, Tailwind CSS, and proper barrel exports
---
## Svelte 5 Component Pattern
When creating a new component in Hope:RE, follow these conventions:
### File Structure
```
src/lib/components/<feature>/
index.svelte
index.ts
types.ts
sub-component.svelte
```
### Component Template
```svelte
<script lang="ts">
import type { ComponentProps } from "./types";
let {
prop1 = "default",
---
name: hope-re
description: Primary skill for the Hope:RE AI art protection desktop application. Covers project overview, Zen design language, key conventions, and common workflows.
---
# Hope:RE
Primary skill for the Hope:RE AI art protection desktop application.
## When to Use
Load this skill when working on Hope:RE features, fixes, or general development tasks.
## Project Overview
Hope:RE is an AI art protection desktop app using adversarial perturbation via ONNX models.
- **Frontend**: SvelteK---
name: caveman
description: >
Ultra-compressed communication mode. Cuts output tokens 65% (measured) by speaking like caveman
while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra,
wenyan-lite, wenyan-full, wenyan-ultra.
Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens",
"be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.
---
Respond terse like smart caveman. All technical substance s---
name: model-distribution
description: Handle ONNX model distribution via Git LFS, GitHub Releases, and runtime downloading in Hope:RE
---
## Model Distribution Pattern
When working with ONNX model distribution in Hope:RE, follow these conventions:
### Distribution Flow
```
Developer workflow:
src-models/notebooks/ (train in Colab)
-> src-models/models/*.onnx (export)
-> git lfs track (via .gitattributes)
-> git push (LFS pointers go to repo, binaries to LFS storage)
-> publish.yml ---
name: rust-best-practices
description: >
Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook. Use this skill when:
(1) writing new Rust code or functions,
(2) reviewing or refactoring existing Rust code,
(3) deciding between borrowing vs cloning or ownership patterns,
(4) implementing error handling with Result types,
(5) optimizing Rust code for performance,
(6) writing tests or documentation for Rust projects.
license: MIT
compatibility: Rust 1.70+, Ca---
name: typescript-advanced-types
description: Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications. Use when implementing complex type logic, creating reusable type utilities, or ensuring compile-time type safety in TypeScript projects.
---
# TypeScript Advanced Types
Comprehensive guidance for mastering TypeScript's advanced type system including generics, conditional types, mapped types, ---
name: svelte-code-writer
description: CLI tools for Svelte 5 documentation lookup and code analysis. MUST be used whenever creating, editing or analyzing any Svelte component (.svelte) or Svelte module (.svelte.ts/.svelte.js). If possible, this skill should be executed within the svelte-file-editor agent for optimal results.
---
# Svelte 5 Code Writer
## CLI Tools
You have access to `@sveltejs/mcp` CLI for Svelte-specific assistance. Use these commands via `npx`:
### List Documentation Sections
```---
name: onnx-export
description: Convert JAX/Python ML models to ONNX format following the Hope:RE notebook pipeline for Google Colab
---
## ONNX Export Pipeline
When creating or modifying the ML training-to-ONNX export pipeline in Hope:RE, follow these conventions:
### Pipeline Overview (6 Notebooks, Google Colab)
```
0_setup_colab.ipynb -> GPU check, JAX+CUDA install
1_clip_to_jax.ipynb -> PyTorch CLIP weights -> numpy, pre-compute text embeddings
2_noise_algorithm.ipynb -> JAX PGD noise prote{
"$schema": "https://opencode.ai/config.json",
"instructions": [
"AGENTS.md",
".github/COMMIT_CONVENTION.md"
],
"mcp": {
"context7": {
"type": "remote",
"url": "https://mcp.context7.com/mcp",
"enabled": true
}
},
"formatter": {
"eslint": {
"command": ["pnpm", "eslint", "--fix", "$FILE"],
"extensions": [".ts", ".svelte", ".js", ".mjs"]
},
"rustfmt": {
"command": ["rustfmt", "$FILE"],
"extensions": [".rs"]
}
},
"commandnone