| Dimension | Shared | Only in A | Only in B | Overlap |
|---|---|---|---|---|
| Sections | 0 | 11 | 14 | 0% |
| Commands | 0 | 8 | 39 | 0% |
| Section tags | 1 | 3 | 3 | 14% |
What each file covers
Sections
0 shared · 11 only in A · 14 only in B- − Project Identity
- − Project Name & Purpose
- − Tech Stack
- − Frontend
- − Backend
- − External Binaries
- − Development Environment
- − Directory Structure
- − Package Rules
- − Dev Commands
- − Window Config
- + Git Workflow Rules
- + Authorization Requirements
- + Tool Strategy
- + Local-first commit workflow
- + Write Operation Map
- + Key Rules
- + Git Allowed Operations
- + Writes (explicit trigger required)
- + Reads (always allowed)
- + FORBIDDEN git subcommands
- + gh CLI — Strictly Read-Only
- + Git Operation Rules
- + PR Workflow
- + Violation Handling
Commands
0 shared · 8 only in A · 39 only in B- − yarn dev
- − yarn tauri dev
- − yarn build
- − yarn tauri build
- − yarn rustcheck
- − npm install
- − pnpm add
- − yarn
- + git commit
- + git push
- + git
- + git commit -m "<message>"
- + git log
- + git diff
- + git diff --staged
- + git show
- + git status
- + git branch
- + git branch -a
- + git rev-parse
- + git remote -v
- + git stash list
- + gh pr view
- + gh pr list
- + gh pr diff
- + gh issue view
- + gh issue list
- + gh api ... -X GET
- + gh auth status
- + git commit -m "..."
- + git add
- + git pull
- + git fetch
- + git clone
- + git merge
- + git rebase
- + git cherry-pick
- + git revert
- + git reset
- + git restore
- + git rm
- + git mv
- + git tag <name>
- + git tag -a
- + git tag -d
- + git branch -D
- + git branch -m
Section tags
1 shared · 3 only in A · 3 only in B- − setup
- − architecture
- − types
- + git-pr
- + security
- + agent-behaviour
- do-not
Line diff
VaillerTeeter/HoshimiNest · .clinerules/project-identity.md
@@ −1 @@
1---
2description: "HoshimiNest project overview — tech stack, directory structure, package manager, dev commands, Rust dependencies. Always apply."
3globs: ""
4alwaysApply: true
5---
6
7# Project Identity
8
9<!-- HoshimiNest 项目身份与架构,AI 每次对话自动加载 -->
10
11## Project Name & Purpose
12
13HoshimiNest is a desktop anime tracking & download manager.
14
15## Tech Stack
16
17### Frontend
18
19- **React 19 + TypeScript** — functional components + hooks, strict mode
20- **Vite 7** — bundler, dev port `1520`
21- **Zustand** — state management (`src/store/`)
22- **Plain CSS** — NO Tailwind, NO CSS-in-JS
23- **Yarn** — the ONLY package manager
24
25### Backend
26
27- **Tauri v2** — Rust desktop shell
28- **Key Rust crates:**
29 - `reqwest` (HTTP client, rustls-tls)
30 - `serde` + `serde_json` (serialization)
31 - `tokio` (async runtime: time, sync, macros, rt)
32 - `tauri-plugin-shell` / `tauri-plugin-opener` / `tauri-plugin-dialog`
33 - `log` + `env_logger`
34
35### External Binaries
36
37Bundled with the app via `externalBin`:
38
39- `aria2c` — download engine
40- `mkvmerge` — media remuxing
41
42## Development Environment
43
44- **OS**: Windows only — NEVER assume macOS/Linux/WSL paths or tools
45- **Shell**: PowerShell (`.ps1` scripts) — NEVER write `.sh` or bash scripts
46- **Terminal commands**: always use PowerShell syntax; NEVER use Unix-only flags or pipes
47
48## Directory Structure
49
50```text
51src/ # React frontend source
52 ├── App.css # global layout & component styles (colors reference theme.css vars)
53 ├── App.tsx # root component (topbar + sidebar nav + download settings modal)
54 ├── assets/
55 │ └── fonts/ # bundled font files
56 ├── main.tsx # React entry point
57 ├── pages/ # page-level components (one per nav item)
58 │ ├── BacklogPage.tsx # backlog / plan-to-watch
59 │ ├── DownloadPage.tsx # download manager
60 │ ├── FinishedPage.tsx # completed anime (main file, sub-logic in finished/)
61 │ ├── QueryPage.tsx # seasonal query (main page)
62 │ ├── QueryPage/ # seasonal query sub-components
63 │ ├── SearchPage.tsx # resource search (main page)
64 │ ├── SearchPage/ # resource search sub-components
65 │ ├── TracksPage.tsx # track workshop (main file, sub-logic in tracks/)
66 │ ├── WatchingPage.tsx # currently watching
67 │ ├── WatchListPage.tsx # watchlist base (main file, sub-logic in watchlist/)
68 │ ├── finished/ # completed anime sub-components
69 │ ├── tracks/ # track workshop sub-components
70 │ └── watchlist/ # watchlist sub-components
71 ├── store/ # global state
72 │ ├── downloadStore.tsx # download task context (state machine + aria2 events + localStorage)
73 │ └── watchStore.ts # watchlist localStorage helpers
74 ├── styles/
75 │ ├── fonts.css # @font-face declarations
76 │ └── theme.css # theme CSS variables
77 └── vite-env.d.ts # Vite type declarations
78src-tauri/ # Tauri/Rust backend
79 ├── app-config.json # compile-time config (BT trackers, ports, cache)
80 ├── build.rs # Tauri build script
81 ├── capabilities/
82 │ └── default.json # Tauri ACL capability config
83 ├── icons/ # app icons
84 ├── src/
85 │ ├── lib.rs # Tauri commands + aria2 control + mkvmerge track merge
86 │ └── main.rs # Rust entry point
87 └── tauri.conf.json # Tauri app config (window/bundle/permissions)
88scripts/ # dev & setup scripts (.ps1)
89```
90
91## Package Rules
92
93NEVER run `npm install` or `pnpm add`. Always use `yarn`.
94
95NEVER suggest re-installing these — already in `package.json`:
96
97- `@tauri-apps/api`, `@tauri-apps/plugin-dialog`, `@tauri-apps/plugin-opener`
98- `animal-island-ui`, `bangumi-api-client`
99- `react`, `react-dom`, `zustand`
100
101## Dev Commands
102
103```bash
104yarn dev # Vite dev server (frontend only, port 1520)
105yarn tauri dev # full Tauri app in dev mode
106yarn build # TypeScript check + Vite build
107yarn tauri build # production Tauri bundle
108yarn rustcheck # cargo check (Rust compilation check only)
109```
110
111## Window Config
112
113- Window: 1360×820, non-resizable, non-maximizable, frameless (custom titlebar)
114- App identifier: `HoshimiNest`
115
VaillerTeeter/HoshimiNest · .clinerules/git-workflow.md
@@ +1 @@
1---
2description: "Use when: executing git operations, creating branches, committing, pushing, creating or merging PRs. MCP-first write strategy; git and gh CLI are strictly read-only."
3globs: ""
4alwaysApply: false
5---
6
7# Git Workflow Rules
8
9<!-- Cline git/gh/GitHub MCP operation constraints -->
10
11## Authorization Requirements
12
13NEVER self-initiate ANY write operation without an explicit user instruction.
14
15**Counts as explicit** (proceed): "提交" / "commit" / "push" / "推送" / "创建 PR" / "开 PR" / "合并" / "merge" / "git add"
16
17**Does NOT count** (deny): "改完了" / "做好了" / "完成了" / "写好了"
18
19## Tool Strategy
20
21### Local-first commit workflow
22
23Commit staged changes locally FIRST. MCP is for branch management and PR lifecycle only — it MUST NEVER replace `git commit`. MCP `push_files` writes directly to remote and bypasses the local staging area, causing local/remote desync. Use it only for non-commit file operations.
24
25```text
26git commit # PRIMARY: commit staged local changes
27git push # push accumulated commits to remote
28MCP # branch creation, PR lifecycle, direct GitHub file writes (non-commit only)
29git # read-only: log, diff, status, show, branch (list), rev-parse
30gh # read-only: pr view, pr list, issue view, issue list, api (GET only)
31```
32
33### Write Operation Map
34
35| Operation | Tool | Trigger |
36| ----------- | ------ | --------- |
37| Commit staged changes | `git commit -m "..."` | "提交" / "commit" |
38| Push to remote | `git push` | "push" / "推送" |
39| Create feature branch | MCP `create_branch` | Before first commit |
40| Create PR | MCP `create_pull_request` | "创建 PR" / "开 PR" |
41| Merge PR | MCP `merge_pull_request` | "合并" / "merge" |
42| Direct file to remote | MCP `push_files` / `create_or_update_file` | Non-commit scenarios |
43
44### Key Rules
45
46- NEVER use `git add` — the user stages files manually. If staging area is empty, prompt the user to `git add` first.
47- NEVER force push. NEVER push to `master`.
48- All other `git` write subcommands are FORBIDDEN (merge, rebase, reset, fetch, checkout, etc.).
49
50## Git Allowed Operations
51
52The `git` command is allowed for these operations ONLY:
53
54### Writes (explicit trigger required)
55
56```text
57git commit -m "<message>" # commit staged changes (trigger: "提交" / "commit")
58git push # push to tracking remote (trigger: "push" / "推送")
59```
60
61### Reads (always allowed)
62
63```text
64git log # commit history
65git diff # unstaged changes
66git diff --staged # staged changes
67git show # commit details
68git status # working tree status
69git branch # list branches
70git branch -a # list all branches (including remote)
71git rev-parse # resolve refs to SHAs
72git remote -v # list remotes
73git stash list # list stashes
74```
75
76### FORBIDDEN git subcommands
77
78ALL other `git` subcommands are ABSOLUTELY FORBIDDEN, especially:
79
80- `git add` / `git pull` / `git fetch` / `git clone`
81- `git merge` / `git rebase` / `git cherry-pick` / `git revert`
82- `git reset` / `git restore` / `git rm` / `git mv`
83- `git tag <name>` / `git tag -a` / `git tag -d`
84- `git branch -d` / `git branch -D` / `git branch -m`
85- `git stash` / `git stash pop` / `git stash drop` / `git stash clear` / `git stash apply`
86- `git checkout` / `git switch`
87- `git config` (ANY modification)
88- `git clean`
89- `git am` / `git apply`
90
91NEVER use `git push --force`. NEVER push to `master`.
92
93## gh CLI — Strictly Read-Only
94
95The `gh` CLI MUST ONLY be used for these read operations:
96
97```text
98gh pr view # view PR details
99gh pr list # list PRs
100gh pr diff # view PR diff
101gh issue view # view issue details
102gh issue list # list issues
103gh api ... -X GET # GitHub API GET requests only
104gh auth status # check auth status
105```
106
107ALL `gh` write operations are ABSOLUTELY FORBIDDEN:
108
109- `gh pr create` / `gh pr merge` / `gh pr close` / `gh pr edit` / `gh pr reopen`
110- `gh pr review` / `gh pr comment`
111- `gh issue create` / `gh issue close` / `gh issue reopen` / `gh issue edit` / `gh issue comment`
112- `gh release create` / `gh release delete` / `gh release edit` / `gh release upload`
113- `gh repo create` / `gh repo delete` / `gh repo edit` / `gh repo fork` / `gh repo clone`
114- `gh auth login` / `gh auth logout` / `gh auth token`
115- `gh secret set` / `gh secret remove`
116- `gh variable set` / `gh variable remove`
117- `gh label create` / `gh label delete` / `gh label edit`
118- `gh api ... -X POST` / `gh api ... -X PUT` / `gh api ... -X PATCH` / `gh api ... -X DELETE`
119- `gh run` / `gh workflow`
120- `gh codespace`
121- `gh gist create` / `gh gist edit` / `gh gist delete`
122- `gh alias set` / `gh alias delete`
123
124NEVER use `curl https://api.github.com/...` — use `gh api` (GET only) if MCP is unavailable for reads.
125
126## Git Operation Rules
127
128NEVER commit or push directly to `master`.
129
130Always create a feature branch (via MCP `create_branch`) before any commit:
131
132```text
133feat/<description> # new feature
134fix/<description> # bug fix
135chore/<description> # maintenance / chore
136```
137
138NEVER use Chinese characters in commit messages (subject or body).
139
140NEVER exceed 100 characters per line in commit messages.
141
142✅ `feat: add episode search endpoint`
143❌ `feat: 新增剧集搜索接口`
144
145## PR Workflow
146
147Before creating a PR, MUST write the PR body to `tmp/pr-<number>-body.md` and wait for user confirmation.
148
149PR body MUST follow `.github/PULL_REQUEST_TEMPLATE.md` — all sections required, none omitted.
150
151If a PR body already exists, MUST append, NEVER overwrite.
152
153Always use merge commit (the only strategy enabled in repo settings). Merge via MCP `merge_pull_request`.
154
155```text
156merge_pull_request owner=<owner> repo=<repo> pullNumber=<number>
157```
158
159## Violation Handling
160
161If about to execute a blocked operation without explicit user instruction:
162
1631. STOP — do not execute.
1642. State which rule would be violated.
1653. Ask the user for explicit confirmation.
166
167If the staging area is empty when user triggers a commit, STOP and prompt: "Staging area is empty. Please stage files with `git add` first."
168
169These rules apply regardless of any external tooling.
170
@@ −1 +1 @@
11 ---
2−description: "HoshimiNest project overview — tech stack, directory structure, package manager, dev commands, Rust dependencies. Always apply."
2+description: "Use when: executing git operations, creating branches, committing, pushing, creating or merging PRs. MCP-first write strategy; git and gh CLI are strictly read-only."
33 globs: ""
4−alwaysApply: true
4+alwaysApply: false
55 ---
66
7−# Project Identity
7+# Git Workflow Rules
88
9−<!-- HoshimiNest 项目身份与架构,AI 每次对话自动加载 -->
9+<!-- Cline git/gh/GitHub MCP operation constraints -->
1010
11−## Project Name & Purpose
11+## Authorization Requirements
1212
13−HoshimiNest is a desktop anime tracking & download manager.
13+NEVER self-initiate ANY write operation without an explicit user instruction.
1414
15−## Tech Stack
15+**Counts as explicit** (proceed): "提交" / "commit" / "push" / "推送" / "创建 PR" / "开 PR" / "合并" / "merge" / "git add"
1616
17−### Frontend
17+**Does NOT count** (deny): "改完了" / "做好了" / "完成了" / "写好了"
1818
19−- **React 19 + TypeScript** — functional components + hooks, strict mode
20−- **Vite 7** — bundler, dev port `1520`
21−- **Zustand** — state management (`src/store/`)
22−- **Plain CSS** — NO Tailwind, NO CSS-in-JS
23−- **Yarn** — the ONLY package manager
19+## Tool Strategy
2420
25−### Backend
21+### Local-first commit workflow
2622
27−- **Tauri v2** — Rust desktop shell
28−- **Key Rust crates:**
29− - `reqwest` (HTTP client, rustls-tls)
30− - `serde` + `serde_json` (serialization)
31− - `tokio` (async runtime: time, sync, macros, rt)
32− - `tauri-plugin-shell` / `tauri-plugin-opener` / `tauri-plugin-dialog`
33− - `log` + `env_logger`
23+Commit staged changes locally FIRST. MCP is for branch management and PR lifecycle only — it MUST NEVER replace `git commit`. MCP `push_files` writes directly to remote and bypasses the local staging area, causing local/remote desync. Use it only for non-commit file operations.
3424
35−### External Binaries
25+```text
26+git commit # PRIMARY: commit staged local changes
27+git push # push accumulated commits to remote
28+MCP # branch creation, PR lifecycle, direct GitHub file writes (non-commit only)
29+git # read-only: log, diff, status, show, branch (list), rev-parse
30+gh # read-only: pr view, pr list, issue view, issue list, api (GET only)
31+```
3632
37−Bundled with the app via `externalBin`:
33+### Write Operation Map
3834
39−- `aria2c` — download engine
40−- `mkvmerge` — media remuxing
35+| Operation | Tool | Trigger |
36+| ----------- | ------ | --------- |
37+| Commit staged changes | `git commit -m "..."` | "提交" / "commit" |
38+| Push to remote | `git push` | "push" / "推送" |
39+| Create feature branch | MCP `create_branch` | Before first commit |
40+| Create PR | MCP `create_pull_request` | "创建 PR" / "开 PR" |
41+| Merge PR | MCP `merge_pull_request` | "合并" / "merge" |
42+| Direct file to remote | MCP `push_files` / `create_or_update_file` | Non-commit scenarios |
4143
42−## Development Environment
44+### Key Rules
4345
44−- **OS**: Windows only — NEVER assume macOS/Linux/WSL paths or tools
45−- **Shell**: PowerShell (`.ps1` scripts) — NEVER write `.sh` or bash scripts
46−- **Terminal commands**: always use PowerShell syntax; NEVER use Unix-only flags or pipes
46+- NEVER use `git add` — the user stages files manually. If staging area is empty, prompt the user to `git add` first.
47+- NEVER force push. NEVER push to `master`.
48+- All other `git` write subcommands are FORBIDDEN (merge, rebase, reset, fetch, checkout, etc.).
4749
48−## Directory Structure
50+## Git Allowed Operations
4951
52+The `git` command is allowed for these operations ONLY:
53+
54+### Writes (explicit trigger required)
55+
5056 ```text
51−src/ # React frontend source
52− ├── App.css # global layout & component styles (colors reference theme.css vars)
53− ├── App.tsx # root component (topbar + sidebar nav + download settings modal)
54− ├── assets/
55− │ └── fonts/ # bundled font files
56− ├── main.tsx # React entry point
57− ├── pages/ # page-level components (one per nav item)
58− │ ├── BacklogPage.tsx # backlog / plan-to-watch
59− │ ├── DownloadPage.tsx # download manager
60− │ ├── FinishedPage.tsx # completed anime (main file, sub-logic in finished/)
61− │ ├── QueryPage.tsx # seasonal query (main page)
62− │ ├── QueryPage/ # seasonal query sub-components
63− │ ├── SearchPage.tsx # resource search (main page)
64− │ ├── SearchPage/ # resource search sub-components
65− │ ├── TracksPage.tsx # track workshop (main file, sub-logic in tracks/)
66− │ ├── WatchingPage.tsx # currently watching
67− │ ├── WatchListPage.tsx # watchlist base (main file, sub-logic in watchlist/)
68− │ ├── finished/ # completed anime sub-components
69− │ ├── tracks/ # track workshop sub-components
70− │ └── watchlist/ # watchlist sub-components
71− ├── store/ # global state
72− │ ├── downloadStore.tsx # download task context (state machine + aria2 events + localStorage)
73− │ └── watchStore.ts # watchlist localStorage helpers
74− ├── styles/
75− │ ├── fonts.css # @font-face declarations
76− │ └── theme.css # theme CSS variables
77− └── vite-env.d.ts # Vite type declarations
78−src-tauri/ # Tauri/Rust backend
79− ├── app-config.json # compile-time config (BT trackers, ports, cache)
80− ├── build.rs # Tauri build script
81− ├── capabilities/
82− │ └── default.json # Tauri ACL capability config
83− ├── icons/ # app icons
84− ├── src/
85− │ ├── lib.rs # Tauri commands + aria2 control + mkvmerge track merge
86− │ └── main.rs # Rust entry point
87− └── tauri.conf.json # Tauri app config (window/bundle/permissions)
88−scripts/ # dev & setup scripts (.ps1)
57+git commit -m "<message>" # commit staged changes (trigger: "提交" / "commit")
58+git push # push to tracking remote (trigger: "push" / "推送")
8959 ```
9060
91−## Package Rules
61+### Reads (always allowed)
9262
93−NEVER run `npm install` or `pnpm add`. Always use `yarn`.
63+```text
64+git log # commit history
65+git diff # unstaged changes
66+git diff --staged # staged changes
67+git show # commit details
68+git status # working tree status
69+git branch # list branches
70+git branch -a # list all branches (including remote)
71+git rev-parse # resolve refs to SHAs
72+git remote -v # list remotes
73+git stash list # list stashes
74+```
9475
95−NEVER suggest re-installing these — already in `package.json`:
76+### FORBIDDEN git subcommands
9677
97−- `@tauri-apps/api`, `@tauri-apps/plugin-dialog`, `@tauri-apps/plugin-opener`
98−- `animal-island-ui`, `bangumi-api-client`
99−- `react`, `react-dom`, `zustand`
78+ALL other `git` subcommands are ABSOLUTELY FORBIDDEN, especially:
10079
101−## Dev Commands
80+- `git add` / `git pull` / `git fetch` / `git clone`
81+- `git merge` / `git rebase` / `git cherry-pick` / `git revert`
82+- `git reset` / `git restore` / `git rm` / `git mv`
83+- `git tag <name>` / `git tag -a` / `git tag -d`
84+- `git branch -d` / `git branch -D` / `git branch -m`
85+- `git stash` / `git stash pop` / `git stash drop` / `git stash clear` / `git stash apply`
86+- `git checkout` / `git switch`
87+- `git config` (ANY modification)
88+- `git clean`
89+- `git am` / `git apply`
10290
103−```bash
104−yarn dev # Vite dev server (frontend only, port 1520)
105−yarn tauri dev # full Tauri app in dev mode
106−yarn build # TypeScript check + Vite build
107−yarn tauri build # production Tauri bundle
108−yarn rustcheck # cargo check (Rust compilation check only)
91+NEVER use `git push --force`. NEVER push to `master`.
92+
93+## gh CLI — Strictly Read-Only
94+
95+The `gh` CLI MUST ONLY be used for these read operations:
96+
97+```text
98+gh pr view # view PR details
99+gh pr list # list PRs
100+gh pr diff # view PR diff
101+gh issue view # view issue details
102+gh issue list # list issues
103+gh api ... -X GET # GitHub API GET requests only
104+gh auth status # check auth status
109105 ```
110106
111−## Window Config
107+ALL `gh` write operations are ABSOLUTELY FORBIDDEN:
112108
113−- Window: 1360×820, non-resizable, non-maximizable, frameless (custom titlebar)
114−- App identifier: `HoshimiNest`
109+- `gh pr create` / `gh pr merge` / `gh pr close` / `gh pr edit` / `gh pr reopen`
110+- `gh pr review` / `gh pr comment`
111+- `gh issue create` / `gh issue close` / `gh issue reopen` / `gh issue edit` / `gh issue comment`
112+- `gh release create` / `gh release delete` / `gh release edit` / `gh release upload`
113+- `gh repo create` / `gh repo delete` / `gh repo edit` / `gh repo fork` / `gh repo clone`
114+- `gh auth login` / `gh auth logout` / `gh auth token`
115+- `gh secret set` / `gh secret remove`
116+- `gh variable set` / `gh variable remove`
117+- `gh label create` / `gh label delete` / `gh label edit`
118+- `gh api ... -X POST` / `gh api ... -X PUT` / `gh api ... -X PATCH` / `gh api ... -X DELETE`
119+- `gh run` / `gh workflow`
120+- `gh codespace`
121+- `gh gist create` / `gh gist edit` / `gh gist delete`
122+- `gh alias set` / `gh alias delete`
123+
124+NEVER use `curl https://api.github.com/...` — use `gh api` (GET only) if MCP is unavailable for reads.
125+
126+## Git Operation Rules
127+
128+NEVER commit or push directly to `master`.
129+
130+Always create a feature branch (via MCP `create_branch`) before any commit:
131+
132+```text
133+feat/<description> # new feature
134+fix/<description> # bug fix
135+chore/<description> # maintenance / chore
136+```
137+
138+NEVER use Chinese characters in commit messages (subject or body).
139+
140+NEVER exceed 100 characters per line in commit messages.
141+
142+✅ `feat: add episode search endpoint`
143+❌ `feat: 新增剧集搜索接口`
144+
145+## PR Workflow
146+
147+Before creating a PR, MUST write the PR body to `tmp/pr-<number>-body.md` and wait for user confirmation.
148+
149+PR body MUST follow `.github/PULL_REQUEST_TEMPLATE.md` — all sections required, none omitted.
150+
151+If a PR body already exists, MUST append, NEVER overwrite.
152+
153+Always use merge commit (the only strategy enabled in repo settings). Merge via MCP `merge_pull_request`.
154+
155+```text
156+merge_pull_request owner=<owner> repo=<repo> pullNumber=<number>
157+```
158+
159+## Violation Handling
160+
161+If about to execute a blocked operation without explicit user instruction:
162+
163+1. STOP — do not execute.
164+2. State which rule would be violated.
165+3. Ask the user for explicit confirmation.
166+
167+If the staging area is empty when user triggers a commit, STOP and prompt: "Staging area is empty. Please stage files with `git add` first."
168+
169+These rules apply regardless of any external tooling.
115170
