claude-code-arcane 2.11.0 → 2.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,6 +33,9 @@ rules:
33
33
  - test-standards
34
34
  - implementation-workflow
35
35
  - code-comments
36
+ - verification
37
+ - agent-delegation
38
+ - git-worktrees
36
39
  gamedev:
37
40
  []
38
41
 
@@ -47,8 +50,7 @@ hooks:
47
50
  - detect-division.sh
48
51
  - detect-gaps.sh
49
52
  - validate-commit.sh
50
- - validate-push.sh
51
- - validate-secrets.sh
53
+ - guard.sh
52
54
  - validate-assets.sh
53
55
  - validate-skill-change.sh
54
56
  - notify.sh
@@ -67,10 +69,15 @@ permissions:
67
69
  - "Bash(git rev-parse*)"
68
70
  - "Bash(ls *)"
69
71
  - "Bash(dir *)"
70
- - "Bash(gh *)"
72
+ - "Bash(gh pr *)"
73
+ - "Bash(gh issue *)"
74
+ - "Bash(gh run *)"
75
+ - "Bash(gh repo view*)"
76
+ - "Bash(gh release view*)"
77
+ - "Bash(gh search *)"
78
+ - "Bash(gh auth status*)"
71
79
  - "Bash(curl -s*)"
72
80
  deny:
73
- - "Bash(rm -rf *)"
74
81
  - "Bash(git push --force*)"
75
82
  - "Bash(git push -f *)"
76
83
  - "Bash(git reset --hard*)"
@@ -51,5 +51,4 @@ permissions:
51
51
  - "Glob(*)"
52
52
  - "Grep(*)"
53
53
  deny:
54
- - "Bash(rm -rf *)"
55
54
  - "Bash(git push --force*)"
@@ -0,0 +1,8 @@
1
+ # Agent Delegation Rule
2
+
3
+ Applies to the main session and to every subagent it starts.
4
+
5
+ - **Your final message is the deliverable.** Never end a turn with "waiting for the subagents": a started task is not a finished one.
6
+ - **If you delegate, you collect.** Wait for every result, integrate it, then answer. No fire-and-forget.
7
+ - **One agent by default.** Split work only when it cannot fit one context, or when the second agent needs something the first must not have: different tools or permissions, a clean context (a reviewer that must not see the maker's reasoning), or a different model.
8
+ - **The prompt is all the subagent knows.** It does not see this conversation: pass the goal, the relevant files and the output format you expect.
@@ -33,3 +33,10 @@ paths:
33
33
  - Nested business logic in DB queries (computed columns that reimplement rules)
34
34
  - Silent retries with no backoff, no max attempts, no circuit breaker
35
35
  - Returning raw DB rows as HTTP responses — always go through a DTO / view model
36
+
37
+ ## How to verify
38
+
39
+ - Run the tests that cover the change.
40
+ - Start the service locally and call the changed endpoint with `curl` (or the project's HTTP client). Show the status code and the body.
41
+ - Call one failure case too (invalid input, missing auth), not only the happy path.
42
+ - Read the server log for those requests: no stack trace, no unexpected warning.
@@ -59,6 +59,12 @@ Reglas production-ready para ASP.NET Core (.NET 10), ordenadas por impacto. Cat
59
59
  - `Domain` referenciando `Infrastructure` / EF Core (dependencia hacia afuera)
60
60
  - Forzar Clean Architecture en un CRUD simple (sobre-ingeniería)
61
61
 
62
+ ## How to verify
63
+
64
+ - `dotnet build` with no new warnings, and `dotnet test` for the projects the change touches.
65
+ - Run the API locally and call the changed endpoint with `curl`: show the status code and the body, plus one failure case (invalid input, missing auth).
66
+ - Read the log for those requests: no exception, no unexpected warning.
67
+
62
68
  ---
63
69
 
64
70
  _Derivado de [github/awesome-copilot](https://github.com/github/awesome-copilot) (dotnet-best-practices), [dotnet/skills](https://github.com/dotnet/skills) y [ardalis/CleanArchitecture](https://github.com/ardalis/CleanArchitecture). Condensado al formato Arcane._
@@ -33,3 +33,28 @@ paths:
33
33
  - Unmanaged re-renders triggered by new object/array literals in parent render
34
34
  - DOM manipulation via `document.querySelector` inside a component
35
35
  - Inline handlers defined in JSX for components that memoize
36
+
37
+ ## Visual Quality
38
+
39
+ - Do not ship library defaults as the design: a stock card grid, a centered hero with a gradient blob, the same radius and shadow on every component.
40
+ - Give each screen a hierarchy: one primary action, deliberate emphasis, designed hover, focus and active states.
41
+ - If the app has light and dark themes, both must look designed, not inverted.
42
+
43
+ ## Web Performance
44
+
45
+ - Images declare `width` and `height`, load `lazy` below the fold, and ship as AVIF or WebP near their rendered size.
46
+ - At most two font families, `font-display: swap`, and preload only the critical weight.
47
+ - Animate only `transform` and `opacity`; use `IntersectionObserver` instead of scroll handlers.
48
+ - Third-party scripts load `async` or `defer`, and only on the pages that need them.
49
+
50
+ ## How to verify
51
+
52
+ - The build passes and the type check is clean.
53
+ - For a web task done in Plan + Goal or Goal-driven mode, a Playwright check is required before the task counts as done:
54
+ 1. The page loads with no console errors.
55
+ 2. Screenshots at 320, 768, 1024 and 1440 px wide, in both themes if the app has a dark mode.
56
+ 3. Walk the flow you changed: clicks, forms, navigation.
57
+ 4. Keyboard: every control in the flow is reachable with Tab, usable with Enter or Space, and shows a visible focus.
58
+ 5. Keep the screenshots and show them as evidence.
59
+ - If Playwright is not installed, propose installing it once (`npm i -D @playwright/test`, then `npx playwright install chromium`). If the user declines, close the task with "visual result not verified".
60
+ - In React Native or Flutter Playwright does not apply: say what was not verified visually.
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  paths:
3
3
  - "src/ai/**"
4
+ - "Assets/**/Scripts/**/AI/**"
4
5
  ---
5
6
 
6
7
  # AI Code Rules
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  paths:
3
3
  - "src/audio/**"
4
+ - "Assets/**/Scripts/**/Audio/**"
4
5
  ---
5
6
 
6
7
  # Audio Code Rules
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  paths:
3
3
  - "src/core/**"
4
+ - "Assets/**/Scripts/Core/**"
4
5
  ---
5
6
 
6
7
  # Engine Code Rules
@@ -39,3 +40,9 @@ void FixedUpdate()
39
40
  nearby.AddRange(FindObjectsOfType<Enemy>()); // VIOLATION: scene scan every frame
40
41
  }
41
42
  ```
43
+
44
+ ## How to verify
45
+
46
+ - The project compiles with no new errors: the Unity console, or a batchmode compile (`Unity -batchmode -quit -projectPath . -logFile -`); for Unreal, see `unreal-code`.
47
+ - Run the EditMode and PlayMode tests that cover the change (`-runTests -testPlatform EditMode` or `PlayMode`).
48
+ - You cannot play the game. Name what needs a human playtest (game feel, timing, visuals, input) and list exactly what to try.
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  paths:
3
3
  - "src/gameplay/**"
4
+ - "Assets/**/Scripts/Gameplay/**"
5
+ - "Assets/**/Scripts/Systems/**"
4
6
  ---
5
7
 
6
8
  # Gameplay Code Rules
@@ -28,3 +30,9 @@ float speed = stats.MovementSpeed * Time.deltaTime;
28
30
  float damage = 25.0f; // VIOLATION: hardcoded gameplay value
29
31
  float speed = 5.0f; // VIOLATION: not from config, not using delta
30
32
  ```
33
+
34
+ ## How to verify
35
+
36
+ - The project compiles with no new errors: the Unity console, or a batchmode compile (`Unity -batchmode -quit -projectPath . -logFile -`); for Unreal, see `unreal-code`.
37
+ - Run the EditMode and PlayMode tests that cover the change (`-runTests -testPlatform EditMode` or `PlayMode`).
38
+ - You cannot play the game. Name what needs a human playtest (game feel, timing, visuals, input) and list exactly what to try.
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  paths:
3
3
  - "src/networking/**"
4
+ - "Assets/**/Scripts/**/Network*/**"
4
5
  ---
5
6
 
6
7
  # Network Code Rules
@@ -1,6 +1,9 @@
1
1
  ---
2
2
  paths:
3
3
  - "assets/shaders/**"
4
+ - "Assets/**/Shaders/**"
5
+ - "**/*.shader"
6
+ - "**/*.hlsl"
4
7
  ---
5
8
 
6
9
  # Shader Code Standards
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  paths:
3
3
  - "src/ui/**"
4
+ - "Assets/**/Scripts/UI/**"
4
5
  ---
5
6
 
6
7
  # UI Code Rules
@@ -13,3 +14,9 @@ paths:
13
14
  - UI must never block the game thread
14
15
  - Scalable text and colorblind modes are mandatory, not optional
15
16
  - Test all screens at minimum and maximum supported resolutions
17
+
18
+ ## How to verify
19
+
20
+ - The project compiles with no new errors: the Unity console, or a batchmode compile (`Unity -batchmode -quit -projectPath . -logFile -`); for Unreal, see `unreal-code`.
21
+ - Run the EditMode and PlayMode tests that cover the change (`-runTests -testPlatform EditMode` or `PlayMode`).
22
+ - You cannot play the game. Name what needs a human playtest (game feel, timing, visuals, input) and list exactly what to try.
@@ -123,3 +123,9 @@ class AGate : public AActor
123
123
  }
124
124
  };
125
125
  ```
126
+
127
+ ## How to verify
128
+
129
+ - The editor target compiles with no new errors or warnings (Build in the IDE, or `Build.bat <Project>Editor Win64 Development <path>.uproject`).
130
+ - Run the automation tests that cover the change (`UnrealEditor-Cmd <project>.uproject -ExecCmds="Automation RunTests <Filter>;Quit" -unattended -nullrhi`).
131
+ - You cannot play the game. Name what needs a human playtest (game feel, replication under latency, visuals) and list exactly what to try.
@@ -0,0 +1,22 @@
1
+ # Git Worktree Rule
2
+
3
+ A session can run inside a git worktree: a second checkout of the same repository, usually under `.claude/worktrees/`. You are in one when `git rev-parse --git-dir` and `git rev-parse --git-common-dir` print different paths.
4
+
5
+ ## Decide by the branch the action is about
6
+
7
+ | The action is about | Where to run it |
8
+ |---|---|
9
+ | The worktree's own branch: commit, push, rebase, merge `main` into it | Inside the worktree. First push: `git push -u origin HEAD` |
10
+ | Another branch: `main`, or whatever the main checkout has (checkout, switch, pull, update) | Outside: leave the worktree first |
11
+ | Unclear | Ask once |
12
+
13
+ ## Leaving the worktree
14
+
15
+ The user authorizes you to leave a worktree without asking, in two cases:
16
+
17
+ 1. **The task is done.** Commit the work on the worktree branch, push it if the task included pushing, then call `ExitWorktree` with `action: "keep"`. Tell the user the worktree path and its branch.
18
+ 2. **You need another branch** (second row of the table). Leave with `ExitWorktree` (`keep`), run the operation, and enter again if the task continues.
19
+
20
+ Always `keep`. Never `remove` a worktree: deleting worktrees is the user's call.
21
+
22
+ `ExitWorktree` only acts on a worktree this session entered with `EnterWorktree`. If it does nothing (the session started inside the worktree, or it was made with `git worktree add` or `arcane worktree`), run git against the main checkout instead: `git -C "<main checkout>" pull`. The main checkout is the parent directory of `git rev-parse --git-common-dir`. Tell the user the session itself is still inside the worktree.
@@ -39,6 +39,15 @@ Use AskUserQuestion exactly like this:
39
39
  - **Goal-driven:** Help the user define a verifiable goal statement and 2-4 checkpoints, create tasks, implement toward each checkpoint. No formal plan.
40
40
  - **Directo:** Proceed immediately without ceremony.
41
41
 
42
+ ## Before writing new code
43
+
44
+ In every mode, search in this order and take the first option that fully works:
45
+
46
+ 1. **The codebase**: a helper, component or pattern that already does it.
47
+ 2. **The standard library** or a platform feature.
48
+ 3. **A dependency the project already has.**
49
+ 4. **A new dependency**, only when 1–3 cannot do it. Name the package and why before installing it.
50
+
42
51
  ## Key principles
43
52
 
44
53
  - One question, not a wall of text — present options and wait
@@ -45,3 +45,9 @@ paths:
45
45
  - Inline shell scripts in CI that do complex logic — move to a versioned script with tests
46
46
  - Copying `production.tf` to `staging.tf` and diverging them by hand
47
47
  - Running DB migrations from a CI job that doesn't have transactional rollback if the deploy fails after
48
+
49
+ ## How to verify
50
+
51
+ - Validate without applying: `terraform plan`, `helm lint` + `helm template`, `docker compose config`, `docker build`. Show the output.
52
+ - Never run `apply`, a deploy or `kubectl apply` to verify a change.
53
+ - For a CI workflow, run `actionlint` if it is installed, and say that the workflow itself only proves itself on the next push.
@@ -39,3 +39,9 @@ paths:
39
39
  - `DELETE FROM users WHERE ...` in a migration without a backup and written-out rollback
40
40
  - Migration that depends on application code (calling service layer) — migrations run with DB access only, not app code
41
41
  - Migrations that only work if previous migration left specific data — be defensive, check before mutating
42
+
43
+ ## How to verify
44
+
45
+ - On the local database, run the migration up, then down, then up again. All three must succeed.
46
+ - After up, confirm the schema change landed: `\d <table>` in psql, `DESCRIBE <table>` in MySQL, or the ORM's status command.
47
+ - For a backfill, run it twice: the second run must change nothing.
@@ -71,3 +71,9 @@ Reglas production-ready para NestJS, ordenadas por impacto. Catálogo completo (
71
71
  ---
72
72
 
73
73
  _Derivado de [kadajett/agent-nestjs-skills](https://github.com/kadajett/agent-nestjs-skills) (nestjs-best-practices). Condensado al formato Arcane._
74
+
75
+ ## How to verify
76
+
77
+ - Run the tests that cover the change (`npm test`, or the project's script) and the type check.
78
+ - Start the app locally and call the changed endpoint with `curl`: show the status code and the body, plus one failure case (invalid DTO, missing auth).
79
+ - Read the app log for those requests: no stack trace, no unexpected warning.
@@ -0,0 +1,13 @@
1
+ # Verification Rule
2
+
3
+ Every claim about the state of the work rests on evidence produced in this session.
4
+
5
+ - **No claim without a run.** "Tests pass", "it builds" and "it works" each need the command you ran in this session and its result. If you did not run it, say so.
6
+ - **Read before you edit.** Never change or overwrite a file you have not read in this session: the user may have changed it.
7
+ - **Search, don't guess.** Before you use a path, function, flag or config key you are not sure exists, find it (Grep, Glob, `--help`, the source).
8
+ - **The installed version beats memory.** Before you use a library API from memory, check its version in the lockfile; when in doubt, read the installed types or source.
9
+ - **Fix the code, not the check.** Never edit a test, a lint/format/type config or a CI step to make it pass, unless the task is about that test or config. If you think the test is wrong, say so and ask.
10
+ - **Filter long output.** Pipe it through `tail`, `grep` or a quiet flag instead of pouring thousands of lines into the context.
11
+ - **Close with what was not verified.** End a task by naming what you could not check: a platform, a manual flow, a visual result.
12
+
13
+ Domain rules add a `## How to verify` section with what counts as evidence in that kind of code.
@@ -1,21 +0,0 @@
1
- #!/usr/bin/env bash
2
- set +e
3
-
4
- main() {
5
- local INPUT
6
- INPUT=$(cat 2>/dev/null) || true
7
-
8
- local COMMAND
9
- COMMAND=$(echo "$INPUT" | grep -oE '"command"\s*:\s*"[^"]*"' | head -1 | sed 's/.*"command"\s*:\s*"//;s/"$//') || true
10
-
11
- [[ -z "$COMMAND" || "$COMMAND" != *"git push"* ]] && return 0
12
-
13
- if [[ "$COMMAND" == *"--force"* || "$COMMAND" == *"-f "* ]]; then
14
- if [[ "$COMMAND" == *"main"* || "$COMMAND" == *"master"* ]]; then
15
- echo "BLOCK: force push to main/master is prohibited." >&2
16
- exit 2
17
- fi
18
- fi
19
- }
20
- main
21
- exit 0
@@ -1,23 +0,0 @@
1
- #!/usr/bin/env bash
2
- set +e
3
-
4
- main() {
5
- local INPUT
6
- INPUT=$(cat 2>/dev/null) || true
7
-
8
- local COMMAND
9
- COMMAND=$(echo "$INPUT" | grep -oE '"command"\s*:\s*"[^"]*"' | head -1 | sed 's/.*"command"\s*:\s*"//;s/"$//') || true
10
-
11
- [[ -z "$COMMAND" ]] && return 0
12
-
13
- if echo "$COMMAND" | grep -qE '(cat|type|less|more|head|tail)\s+.*\.env' 2>/dev/null; then
14
- echo "BLOCK: reading .env files is prohibited for security." >&2
15
- exit 2
16
- fi
17
-
18
- if echo "$COMMAND" | grep -qE 'curl.*\-d.*(api_key|password|secret|token)=' 2>/dev/null; then
19
- echo "WARN: command appears to send credentials over network. Review carefully." >&2
20
- fi
21
- }
22
- main
23
- exit 0