Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
175 commits
Select commit Hold shift + click to select a range
88cfe10
Update generator
Nov 29, 2025
8a419b8
Fix bugs
Dec 25, 2025
1e0fdb7
Fix
Jan 19, 2026
9e9385b
Update EnumPropertyDrawer and SerializableType
VPDPersonal Feb 2, 2026
6088eea
Add package.json
VPDPersonal Feb 2, 2026
e8105a9
Add meta file
VPDPersonal Feb 2, 2026
dee5d62
Update TypeSelector
VPDPersonal Feb 19, 2026
2c3575e
Update
VPDPersonal Mar 4, 2026
a523813
Update README.md
Mar 4, 2026
72a7607
Add README_RU.md.meta
VPDPersonal Mar 4, 2026
4702ec8
Integrate Aspid.Internal.Unity
VPDPersonal Mar 4, 2026
63492ec
Add Samples to UnityFastTools json
VPDPersonal Mar 4, 2026
0815798
Rename Samples
VPDPersonal Mar 4, 2026
25f000f
Fix package.json
VPDPersonal Mar 4, 2026
4a289ec
Fix package.json
VPDPersonal Mar 4, 2026
437aad8
Rename UnityFastTools to FastTools
VPDPersonal Mar 4, 2026
2bada94
Fix README
VPDPersonal Mar 4, 2026
e7cf7af
Merge remote-tracking branch 'origin/main' into Develop
VPDPersonal Mar 4, 2026
b38c788
Fix smaples and package.json
VPDPersonal Mar 5, 2026
ac908c2
Fix GetScriptNameWithIndex
VPDPersonal Mar 7, 2026
3ef883d
Update
VPDPersonal Mar 19, 2026
98ae32a
Add CLAUDE.md
VPDPersonal Mar 21, 2026
c392d3e
Add Generic Support
VPDPersonal Mar 21, 2026
d664d40
Fix extension methods
VPDPersonal Mar 24, 2026
39b2164
Add ComponentTypeSelectorAttribute
VPDPersonal Mar 25, 2026
16e5846
Update Unity
VPDPersonal Mar 25, 2026
a4ee044
Add prototype
VPDPersonal Mar 25, 2026
a7253de
Fix rename
VPDPersonal Mar 25, 2026
088429b
Fix Rename
VPDPersonal Mar 25, 2026
15d5f76
Optimize performance and reduce code duplication
VPDPersonal Mar 26, 2026
eba8cfa
Add dialog window
VPDPersonal Mar 26, 2026
a1e1e73
Update
VPDPersonal Mar 27, 2026
29bf5ba
Update
VPDPersonal Mar 27, 2026
ad77650
Add xml comments
VPDPersonal Mar 27, 2026
ee0e3a7
Big Refactoring
VPDPersonal Apr 3, 2026
a53cf90
Fix
VPDPersonal Apr 3, 2026
9dee4db
Fix
VPDPersonal Apr 3, 2026
0339855
Fix
VPDPersonal Apr 3, 2026
f04f822
Fix
VPDPersonal Apr 3, 2026
65ba5c3
Fix
VPDPersonal Apr 3, 2026
1cae9f5
Fix
VPDPersonal Apr 3, 2026
115cb2c
Add XML documentation to VisualElement and IStyle extensions
VPDPersonal Apr 4, 2026
75b3412
Clean
VPDPersonal Apr 4, 2026
4cc91c0
Fix for addressables
VPDPersonal Apr 5, 2026
d9f8f5f
Fix meta
VPDPersonal Apr 5, 2026
29a2e23
Update samples
VPDPersonal Apr 5, 2026
9e4d4ff
update ignore
VPDPersonal Apr 5, 2026
3f2542a
Update Readme and Claude.md
VPDPersonal Apr 6, 2026
9d8e090
Remove comments
VPDPersonal Apr 11, 2026
c1e752b
Add Insert child methods and string color overloads to VisualElement …
VPDPersonal Apr 11, 2026
4481371
Update icon in c# scripts
VPDPersonal Apr 14, 2026
79b59d5
Add internal editor VisualElement components and default dark stylesheet
VPDPersonal Apr 14, 2026
b30fdd7
Add SetBackgroundImageFromResource extension method
VPDPersonal Apr 15, 2026
35c1dcc
Update CLAUDE.md with internal editor components and conventions
VPDPersonal Apr 15, 2026
4625294
Add IBindable and VisualElement binding extension methods
VPDPersonal Apr 15, 2026
a7dd54d
Add PropertyField extension methods
VPDPersonal Apr 15, 2026
652aeb8
Add PropertyField extension methods
VPDPersonal Apr 15, 2026
ccf92f2
Add EnumField and EnumFlagsField extension methods
VPDPersonal Apr 15, 2026
c3d47b5
Add xml comments
VPDPersonal Apr 15, 2026
5565cd1
Add missing assembly reference to editor asmdef
VPDPersonal Apr 15, 2026
173e256
Update meta files for VisualElement extension scripts
VPDPersonal Apr 15, 2026
0ea21fb
Fix namespaces and trailing newlines in editor VisualElement scripts
VPDPersonal Apr 15, 2026
9195c46
Add open_button_icon
VPDPersonal Apr 16, 2026
27d4f38
Refactoring
VPDPersonal Apr 16, 2026
f6ba2f5
Update CLAUDE.md to reflect current codebase
VPDPersonal Apr 16, 2026
78707c5
Refactor Ids module into subfolders and fix Contains bug
VPDPersonal Apr 16, 2026
884118b
Update README and add documentation files
VPDPersonal Apr 16, 2026
8e0491d
Merge branch 'claude/unruffled-chaum-afe680': Update README and add d…
VPDPersonal Apr 16, 2026
b7083aa
Add populate-missing context menu for EnumValues drawer
VPDPersonal Apr 16, 2026
8c1beab
Document EnumValues populate-missing context menu
VPDPersonal Apr 16, 2026
f7ac3c1
Update CLAUDE.md with README sync note
VPDPersonal Apr 16, 2026
f6324b1
Add Claude.md for Generator
VPDPersonal Apr 17, 2026
3c2de25
Reorganize samples and improve SerializableType tooltip handling
VPDPersonal Apr 17, 2026
94b9bcf
Add VisualElements sample demonstrating custom inspector API
VPDPersonal Apr 18, 2026
369765b
Add Types sample demonstrating polymorphic type selection
VPDPersonal Apr 18, 2026
f045744
Add ProfilerMarkers sample demonstrating this.Marker() usage forms
VPDPersonal Apr 18, 2026
601985a
Fix SerializableType selector NRE and lost-first-write in list drawers
VPDPersonal Apr 18, 2026
0c32e41
Wire up Types sample scene with prefab instances and update README
VPDPersonal Apr 18, 2026
0594eff
Suppress ReSharper namespace warning in AbilityConfig sample
VPDPersonal Apr 18, 2026
293421d
Rename sample asmdef files to match their Aspid.FastTools.Samples.* n…
VPDPersonal Apr 18, 2026
8739633
Add EnumValues sample demonstrating enum-to-value mapping
VPDPersonal Apr 18, 2026
4183ca7
Switch asmdef references to name-based and move Editor asmdef to Scripts
VPDPersonal Apr 18, 2026
4746788
Update CLAUDE.md Editor asmdef path to Unity/Editor/Scripts
VPDPersonal Apr 18, 2026
bfd5633
Add missing Интеграция header in package Russian README
VPDPersonal Apr 18, 2026
cbbba08
Fix
VPDPersonal Apr 21, 2026
776f360
Harden IdStruct generator and fix IdRegistry player build
VPDPersonal Apr 21, 2026
e536ade
Fix build
VPDPersonal Apr 22, 2026
2015829
Rework IdRegistry editor UX and split its stylesheet
VPDPersonal Apr 22, 2026
41e3428
Ignore .worktrees/ directory
VPDPersonal Apr 22, 2026
fc37ba1
Add Id Registries redesign spec
VPDPersonal Apr 22, 2026
e4c75e0
Add Id Registries implementation plan
VPDPersonal Apr 22, 2026
6acb49c
Fix small IdRegistry bugs: duplicate scan, USS dead classes, cache fi…
VPDPersonal Apr 22, 2026
82eedd5
Drop unused System.Linq import from StringIdRegistryValidator
VPDPersonal Apr 22, 2026
4c0b7b7
Remove StringIdUsageScanner and its delete-dialog usage count
VPDPersonal Apr 22, 2026
d77d38f
Seal StringIdRegistry and add dictionary caches for O(1) lookups
VPDPersonal Apr 23, 2026
c04d28e
Split IdRegistry into int-only runtime + editor-only names partial
VPDPersonal Apr 23, 2026
9b3522f
Replace StringIdRegistryHelper with IdRegistryResolver (dual-type sea…
VPDPersonal Apr 23, 2026
76ac390
Add meta file for IdRegistryResolver
VPDPersonal Apr 23, 2026
840c367
Rename StringIdRegistryCacheInvalidator to IdRegistryResolverCacheInv…
VPDPersonal Apr 23, 2026
8a2fe67
Rename validator to IdRegistryValidator and add C# identifier validation
VPDPersonal Apr 23, 2026
9c28090
Rename entry visual element and data struct to IdRegistry*
VPDPersonal Apr 23, 2026
bee3ae8
Introduce IRegistryAccessor and two concrete implementations
VPDPersonal Apr 23, 2026
35ff64e
Add RegistryEditorCore — storage-agnostic shared inspector UI
VPDPersonal Apr 23, 2026
59294fe
Fix build: expose StringIdRegistry.InvalidateCache to editor assembly
VPDPersonal Apr 23, 2026
6c4fbe6
Rewire StringIdRegistryEditor to delegate to RegistryEditorCore
VPDPersonal Apr 23, 2026
82ed6e4
Add IdRegistryEditor delegating to RegistryEditorCore
VPDPersonal Apr 23, 2026
5405d6b
Remove IdRegisterEditorExtensions; route drawer Add through accessor
VPDPersonal Apr 23, 2026
5393f37
Replace silent CleanUpInvalid with explicit Review/Clean-up warning row
VPDPersonal Apr 23, 2026
e2fafca
Add Next ID control with backward-step warning
VPDPersonal Apr 23, 2026
f573517
Add Sort and Group toolbar with SessionState persistence
VPDPersonal Apr 23, 2026
9a6920d
Add Open Registry button and int-only registry hint to IdStructDrawer
VPDPersonal Apr 23, 2026
8512fe9
Update CLAUDE.md to document both Id registry types
VPDPersonal Apr 23, 2026
9fe05f3
Fix meta
VPDPersonal Apr 23, 2026
90a3bd9
Refine Id Registry inspector UX
VPDPersonal Apr 23, 2026
8481928
Refine registry runtime: open to subclassing, cache Contains lookups
VPDPersonal Apr 23, 2026
984ed99
Document USS naming conventions and migrate palette variables
VPDPersonal Apr 25, 2026
8d6fb43
Add design.md
VPDPersonal Apr 25, 2026
f418450
Refactor Id Registry inspector USS and expand dark theme palette
VPDPersonal Apr 25, 2026
f3d1b09
Add AnimatedTitle
VPDPersonal Apr 26, 2026
0a761f0
Add AnimatedDotsBackground
VPDPersonal Apr 26, 2026
ea41a34
Add meta files
VPDPersonal Apr 26, 2026
025a2a3
Restructure editor UI resources and prefix internal components with A…
VPDPersonal Apr 26, 2026
0ebc71b
Sync warning-text-lightness with USS and fix status-success class typo
VPDPersonal Apr 27, 2026
2464e3a
Polish AspidDividingLine
VPDPersonal Apr 27, 2026
4e34e96
Refactor AspidDividingLine
VPDPersonal Apr 27, 2026
8732280
Reorganize Internal VisualElements into Components/Styles and add Log…
VPDPersonal Apr 29, 2026
092be25
Add Welcome window with UPM-aware samples, clickable version and toas…
VPDPersonal Apr 29, 2026
ed17bdf
Extract VisualElement/SerializedProperty extension references into de…
VPDPersonal Apr 29, 2026
c66d34e
Remove lowDpiClass
VPDPersonal Apr 29, 2026
46db14e
Fix
VPDPersonal Apr 29, 2026
2c19dd3
Fix AspidHelpBox uss
VPDPersonal Apr 29, 2026
f4a9927
Fix AspidHelpBoxStyle
VPDPersonal Apr 29, 2026
b7e3582
Document Ids editor architecture and switch RegistryEditorCore to Asp…
VPDPersonal Apr 29, 2026
7b96bdf
Add Ids sample, editor tests and TryGet API for registries
VPDPersonal Apr 30, 2026
e505670
Assign script icon to package meta files missing it
VPDPersonal Apr 30, 2026
38b0c1b
Document Ids/Types public API and tidy editor usings
VPDPersonal Apr 30, 2026
6e586b0
Replace TypeSelector bool flags with TypeAllow enum and tighten visib…
VPDPersonal Apr 30, 2026
c47bff5
Expose editor internals to Aspid.MVVM editor assemblies
VPDPersonal Apr 30, 2026
2b4eb63
Mark internal editor VisualElement components as internal
VPDPersonal Apr 30, 2026
7cd98d6
Rebuild VisualElements sample editor on public API
VPDPersonal Apr 30, 2026
352f4b3
Move Ids public API into Aspid.FastTools.Ids namespace
VPDPersonal Apr 30, 2026
84a916c
Fix this.Marker() generator for explicit interfaces, generics and fie…
VPDPersonal Apr 30, 2026
b63bf28
Update Generator
VPDPersonal Apr 30, 2026
77bd6fb
Fix
VPDPersonal Apr 30, 2026
1d8ee7e
Update Generator
VPDPersonal Apr 30, 2026
1f566f4
Add IdStruct missing-state feedback
VPDPersonal Apr 30, 2026
379f917
Migrate Ids stylesheets to design tokens and add visual polish
VPDPersonal Apr 30, 2026
239314f
Tighten Ids editor seam and dedupe shared registry state
VPDPersonal Apr 30, 2026
dacd7b2
Cover RegistryChanged, GetOrCreateStringMapped and missing-state with…
VPDPersonal Apr 30, 2026
5f92fa4
Fix StringIdRegistry.TryGetName contract and Ids polish follow-ups
VPDPersonal Apr 30, 2026
b6a668d
Consolidate Ids into single IdRegistry and split editor into VisualEl…
VPDPersonal May 5, 2026
c50d4b8
Extract SerializableType drawer into reusable TypeSelectorField
VPDPersonal May 5, 2026
c02d7c3
Fix
VPDPersonal May 5, 2026
7bef04f
Split Type drawer into IMGUI and UIToolkit and unify with ComponentTy…
VPDPersonal May 5, 2026
a06dc90
Fix Type drawer regressions and document selector helpers
VPDPersonal May 6, 2026
1c162cc
Align IMGUI and UIToolkit Type drawer rendering
VPDPersonal May 6, 2026
019cb60
Fix
VPDPersonal May 6, 2026
a4b060a
Add IMGUI Type drawer sample and align open-script button with UIToolkit
VPDPersonal May 6, 2026
51e946f
Refine TypeSelectorWindow keyboard navigation and reorganize Types sa…
VPDPersonal May 6, 2026
a3f100f
Sync Types sample README with reorganized scripts and IMGUI variants
VPDPersonal May 6, 2026
ae66b35
Replace draw-adapter helper with inspector-container selector and ref…
VPDPersonal May 6, 2026
3207299
Fix ProfilerMarkers sample line annotations
VPDPersonal May 6, 2026
a5bb32d
Fix SerializedProperty extension bugs and document DynamicSerializePr…
VPDPersonal May 6, 2026
ef9b9fa
Fix EditorExtensions null check and AddComponentMenu inheritance
VPDPersonal May 6, 2026
0e62bbc
Add brand book documenting palette, H1-H7 scale and 10 internal compo…
VPDPersonal May 6, 2026
f4c6964
Reorganize Enums editor resources and move EnumField extensions to ru…
VPDPersonal May 7, 2026
9a82d83
Sync CLAUDE.md and READMEs with current code
VPDPersonal May 7, 2026
ae81380
Add uss-bem-checker subagent and generator-rebuild PostToolUse hook
VPDPersonal May 7, 2026
f8fd3ab
Add manipulator fluent extensions and refactor EnumValues drawer
VPDPersonal May 8, 2026
51e96dc
Simplify ScrollViewScope by removing unused by-value Begin overloads
VPDPersonal May 8, 2026
a7d0a1f
Fix VisualElements bugs and stale XML doc
VPDPersonal May 8, 2026
677f302
Extract DoubleClickTracker, manage scheduled item lifecycle
VPDPersonal May 8, 2026
2aa701a
Reuse AddOpenScriptCommand in AspidInspectorHeader
VPDPersonal May 8, 2026
1988e82
Use BEM modifier separator for BackgroundRoundedState class
VPDPersonal May 8, 2026
3374269
Add IdField VisualElement and use it in IdStruct drawer
VPDPersonal May 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
36 changes: 36 additions & 0 deletions .claude/agents/code-reviewer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: code-reviewer
description: Reviews C# code for Unity/Editor boundary violations, generator correctness, and package conventions
---

You are a C# code reviewer specializing in Unity packages and Roslyn source generators. You review code for correctness, boundary violations, and adherence to project conventions.

## Project Context

This is **Aspid.FastTools** — a Unity package (`com.aspid.fasttools`) with two separate projects:
- `Aspid.FastTools/` — Unity project (Runtime + Editor assemblies)
- `Aspid.FastTools.Generators/` — .NET solution with Roslyn source generators

## Review Checklist

### Assembly Boundaries
- `Unity/Runtime/` code must NOT reference `UnityEditor` namespace — it ships with player builds
- `Unity/Editor/Scripts/` code is editor-only and may use `UnityEditor` freely
- Generator code targets `netstandard2.0` and must NOT reference any Unity assemblies

### Generators (`Aspid.FastTools.Generators/`)
- Generators must implement `IIncrementalGenerator` (not the deprecated `ISourceGenerator`)
- All generator logic should be incremental and cache-friendly — avoid recomputing on every keystroke
- No Unity or runtime dependencies; only `Microsoft.CodeAnalysis.CSharp` and `Aspid.Generators.Helper`

### Unity Runtime Code
- Prefer `[SerializeField]` over public fields for Inspector-visible state
- `ScriptableObject` subclasses should not be instantiated with `new` — use `ScriptableObject.CreateInstance`
- Extension methods on `VisualElement` should follow the fluent pattern already established in `VisualElementExtensions.*`

### General C# Quality
- Nullable annotations must be consistent — the project has `<Nullable>enable</Nullable>`
- Avoid boxing of value types in hot paths (ProfilerMarkers, EnumValues iteration)
- Partial classes must all reside in files named consistently with the partial suffix pattern used elsewhere

Report issues grouped by severity: **Error** (breaks compilation or runtime), **Warning** (likely bug or convention violation), **Info** (minor improvement).
80 changes: 80 additions & 0 deletions .claude/agents/uss-bem-checker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
name: uss-bem-checker
description: Reviews USS stylesheets and the C# strings that reference them against the Aspid.FastTools BEM grammar (class names) and the positional grammar (custom properties). Use after edits to any *.uss file or to any code holding USS class names / `--aspid-*` variables (Constants.cs, AspidStyles.cs, component .cs files).
---

You are a strict reviewer of UIToolkit USS conventions for the **Aspid.FastTools** Unity package. Both grammars below are mandatory and documented in the project root `CLAUDE.md`. Your only job is to verify that every USS class name and every custom property follows them, and to flag legacy forms.

## Scope

Files to review (only what was changed unless the user widens the scope):

- `Aspid.FastTools/Assets/Plugins/Aspid/FastTools/Unity/Editor/Resources/UI/**/*.uss`
- C# files that emit class strings or read custom properties:
- `Unity/Editor/Scripts/Ids/Constants.cs` (`Constants.Drawer.*`, `Constants.Registry.*`, `Constants.Selector.*`)
- `Unity/Editor/Scripts/VisualElements/Internal/Styles/AspidStyles.cs`
- Component `.cs` under `Unity/Editor/Scripts/VisualElements/Internal/Components/**/`
- Anywhere a literal `aspid-fasttools-...` or `--aspid-...` appears.

## Grammar #1 — USS class names (BEM)

Format: `aspid-fasttools-{block}[__{element}][--{modifier}]`

Rules to enforce:

1. The prefix `aspid-fasttools-` is mandatory and joined to the block by a single `-`.
2. Block — kebab-case (`id-registry`, `enum-values`, `serializable-type`).
3. Element — joined to block with `__` (double underscore): `aspid-fasttools-id-drawer__add-button`.
4. Modifier — joined with `--` (double dash): `aspid-fasttools-id-registry__warning--visible`, `aspid-fasttools-status--error`.
5. Inside any segment use kebab-case only — never `camelCase`, never single `_`.
6. Utility/state classes (`status`, `theme`) are blocks of their own: `aspid-fasttools-status--error`, `aspid-fasttools-theme--dark`.

**Legacy form to flag and propose migrating:** classes that use a single `-` between block and element instead of `__` (e.g. `aspid-fasttools-id-drawer-add-button`). The CLAUDE.md says: migrate when touching surrounding code; new classes must follow BEM from the start. So:
- If the diff *adds* a non-BEM class → reject.
- If the diff *modifies code around* a legacy class → suggest migrating it as part of the change, but don't block.

## Grammar #2 — USS custom properties (positional)

Format: `--{prefix}-{group}-{role}[-{state}][-{tone}]`

Rules to enforce:

| Slot | Allowed values | Required |
|---|---|---|
| `prefix` | `aspid` (palette shared between Aspid packages) or `aspid-fasttools` (product-specific) | yes |
| `group` | `colors`, `icons`, `metrics`, `prop` | yes |
| `role` | `bg`, `shade`, `text`, `border`, `icon`, `status`, `gradient`, `label_size`, `line_size`, `theme`, … | yes |
| `state` | `success`, `warning`, `error`, `info`, `hover`, `pressed`, … | optional |
| `tone` | `darkness`, `dark`, `light`, `lightness` | optional |

Additional rules:

1. Slot separator is `-`. Compound words **inside one slot** use `_` (e.g. `label_size`, `line_size`) — never two independent concepts in one slot.
2. Order is **state → tone**: `--aspid-colors-status-success-darkness`, never `darkness-success`.
3. Color roles:
- `bg` — surface palette.
- `shade` — generic content palette (text/border/icon-tint share the same shade swatch when not specialised).
- `text` / `border` / `icon` — specialised, component-local roles.
- `status` — `success` / `warning` / `error` / `info`.
4. `prop` group is for inline component parameters (e.g. `--aspid-fasttools-prop-theme`), not palette tokens.
5. Palette variables are declared on `:root`. Component-scoped variables on the component's selector.

The reference implementation is `Aspid-FastTools-Default-Dark.uss` — palette tokens there are the source of truth.

## How to review

For each USS file or code string in scope:

1. Extract every class name (`.aspid-fasttools-...`) and every custom property (`--aspid-...`).
2. For each, validate against the matching grammar above.
3. Categorise findings as:
- **Block** — adds a new non-conforming name. Must be fixed before merge.
- **Migrate** — touches surrounding code that already contains a legacy form. Suggest the rewrite, don't block.
- **OK** — conforming.
4. Report concisely:
- File path + line.
- The offending name.
- Which rule it breaks.
- The corrected form.

Do not propose stylistic changes (colors, spacing, ordering). Stay narrowly inside the two grammars and the legacy-migration rule. If the change does not touch USS classes or custom properties, return "No USS naming issues found." in one line.
27 changes: 27 additions & 0 deletions .claude/hooks/rebuild-generators-on-change.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
# PostToolUse hook: rebuild Roslyn source generators after edits inside the
# main generator project, then redeploy the DLL into the Unity package.
#
# Path-scoped on purpose:
# - Triggers ONLY for *.cs under Aspid.FastTools.Generators/Aspid.FastTools.Generators/
# - Skips Unity-side edits (Aspid.FastTools/Assets/...), tests, and the Sample project.
# - Skipping Unity edits matches the rule "do not run dotnet build for Unity-only edits".
#
# Build success -> exit 0 (silent).
# Path mismatch -> exit 0 (silent).
# Build failure -> exit 2 with stderr piped through, so the assistant sees it.

set -uo pipefail

file_path=$(jq -r '.tool_input.file_path // empty' 2>/dev/null)

case "$file_path" in
*/Aspid.FastTools.Generators/Aspid.FastTools.Generators/*.cs) ;;
*) exit 0 ;;
esac

cd "$CLAUDE_PROJECT_DIR" || exit 0

dotnet build \
Aspid.FastTools.Generators/Aspid.FastTools.Generators/Aspid.FastTools.Generators.csproj \
-c Release --nologo -v quiet 1>&2 || exit 2
26 changes: 26 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"extraKnownMarketplaces": {
"unicli": {
"source": {
"source": "github",
"repo": "yucchiy/UniCli"
}
}
},
"enabledPlugins": {
"unicli@unicli": true
},
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/rebuild-generators-on-change.sh\""
}
]
}
]
}
}
13 changes: 13 additions & 0 deletions .claude/skills/build-generator/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: build-generator
description: Build Roslyn source generators and deploy the resulting DLL into the Unity package
user-invocable: true
---

Build the Aspid.FastTools source generators and deploy to Unity:

1. Run `dotnet build Aspid.FastTools.Generators/Aspid.FastTools.Generators/Aspid.FastTools.Generators.csproj -c Release` from the repository root
2. Copy `Aspid.FastTools.Generators/Aspid.FastTools.Generators/bin/Release/netstandard2.0/Aspid.FastTools.Generators.dll` to `Aspid.FastTools/Assets/Plugins/Aspid/FastTools/Aspid.FastTools.Generators.dll`
3. Report the result: build output, any errors, and confirm the DLL was copied successfully

Arguments: $ARGUMENTS (optional: pass `Debug` to build in Debug configuration instead of Release)
81 changes: 81 additions & 0 deletions .claude/skills/sync-readmes/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
name: sync-readmes
description: Verify and update Aspid.FastTools README files against the actual codebase — namespaces, public API, CreateAssetMenu paths — keeping EN/RU and root/Documentation copies in sync
user-invocable: true
---

The package ships **eight** README files that drift from the code easily. Use this skill whenever the user asks to "check / update / sync READMEs", or after any change that touches: namespaces of public types, public API surface, `[CreateAssetMenu]` paths, source generator output, or sample structure.

## Files in scope

**Main READMEs (mirror each other 1:1 except for image paths and one heading):**

| Path | Locale | Image base path |
|---|---|---|
| `README.md` | EN | `Aspid.FastTools/Assets/Plugins/Aspid/FastTools/Documentation/Images/` |
| `README_RU.md` | RU | `Aspid.FastTools/Assets/Plugins/Aspid/FastTools/Documentation/Images/` |
| `Aspid.FastTools/Assets/Plugins/Aspid/FastTools/Documentation/README.md` | EN | `Images/` |
| `Aspid.FastTools/Assets/Plugins/Aspid/FastTools/Documentation/README_RU.md` | RU | `Images/` |

The Documentation copies have an extra `## Source Code` / `## Исходный код` block linking to the GitHub repo — the root copies don't. Otherwise the body is identical character-for-character.

**Sample READMEs (one EN + one RU per sample):**

- `Aspid.FastTools/Assets/Plugins/Aspid/FastTools/Samples/Types/`
- `Aspid.FastTools/Assets/Plugins/Aspid/FastTools/Samples/Ids/`
- `Aspid.FastTools/Assets/Plugins/Aspid/FastTools/Samples/EnumValues/`
- `Aspid.FastTools/Assets/Plugins/Aspid/FastTools/Samples/ProfilerMarkers/`
- `Aspid.FastTools/Assets/Plugins/Aspid/FastTools/Samples/VisualElements/`

## Workflow

### 1. Verify against source before editing

For every fact the README states, prove it from the code:

| Claim | Verify with |
|---|---|
| Namespace of a public type | `grep -rn "namespace " <runtime-or-editor-dir> --include="*.cs"` then locate the file declaring the type |
| `[CreateAssetMenu]` menu path | `grep -rn "CreateAssetMenu\|menuName" <dir> --include="*.cs"` |
| Public method signature / return value | Read the source file directly; do not infer from name |
| Generated code shape (`IdStructGenerator`, `ProfilerMarkersGenerator`) | Read `Aspid.FastTools.Generators/Aspid.FastTools.Generators/Generators/.../*Body.cs` |
| Class actually exists | `find … -name "<ClassName>.cs"` — not all helper classes documented in old READMEs still exist (e.g. there is **no** `AspidEditorGUILayout`) |

Common drift points discovered historically:

- **Namespaces split per feature.** Public types live in `Aspid.FastTools` (root: `IId`, `UniqueIdAttribute`, `StringIdRegistry`), `Aspid.FastTools.Types`, `Aspid.FastTools.Enums`, `Aspid.FastTools.Ids`, `Aspid.FastTools.UIElements`. Editor helpers split similarly: `Aspid.FastTools.Editors` for `SerializedProperty` extensions / IMGUI scopes / `GetScriptName`, but per-feature editor code lives in `Aspid.FastTools.{Feature}.Editors`. A `using Aspid.FastTools;` line in a `SerializableType` example is wrong — it must be `using Aspid.FastTools.Types;`.
- **Two ID registries.** `StringIdRegistry` (in `Aspid.FastTools`) keeps int↔string at runtime; `IdRegistry` (in `Aspid.FastTools.Ids`) is int-only at runtime with names stripped from player builds. Don't conflate them. Their menu paths differ: `Aspid/FastTools/String Id Registry` vs `Aspid/FastTools/Id Registry`. `StringIdRegistry.GetId` returns `-1` (not `0`) when not found; the lookup-by-id method is `GetNameId(int)`, not `GetName(int)`. Neither registry exposes public `Add`, `Remove`, or `Rename` — those live behind the registry inspector / `RegistryEditorCore`.
- **Sample asset menu order.** Samples use `Aspid/Samples/FastTools/<Thing>` (Samples first), not `Aspid/FastTools/Samples/<Thing>`. Always re-grep `[CreateAssetMenu]` instead of trusting the existing README.

### 2. Apply edits to all matching files

Most edits hit all four main READMEs (EN root, EN Documentation, RU root, RU Documentation). Apply the same change to each — they must stay textually identical inside their respective body except for the image paths and the `## Source Code` heading.

For RU edits, follow the existing RU translation conventions in the file: `Namespace` → `Пространство имён`, `Description` → `Описание`, code identifiers and English technical terms like `runtime`, `partial struct`, `Inspector` stay in English.

When updating sample READMEs, edit both the EN and RU copy in the same sample folder.

### 3. Sanity-check after editing

Run these commands from the repo root and skim the output:

```bash
# All using statements in samples — these are ground truth for namespaces
grep -rn "^using Aspid" Aspid.FastTools/Assets/Plugins/Aspid/FastTools/Samples --include="*.cs" | sort -u

# All CreateAssetMenu paths in the package
grep -rn "menuName" Aspid.FastTools/Assets/Plugins/Aspid/FastTools --include="*.cs"

# Confirm both READMEs of a pair stay aligned (count sections)
grep -c "^## " README.md Aspid.FastTools/Assets/Plugins/Aspid/FastTools/Documentation/README.md
grep -c "^## " README_RU.md Aspid.FastTools/Assets/Plugins/Aspid/FastTools/Documentation/README_RU.md
```

Then visually diff each pair of matched files (EN root vs EN Documentation; RU root vs RU Documentation) — only image paths and the `## Source Code` block should differ.

## Arguments

`$ARGUMENTS` (optional):
- empty — full audit and update of all eight READMEs;
- `--check` — audit only, report findings without editing;
- a feature name (`ids`, `types`, `enums`, `visualelements`, `profilermarkers`, `imgui`, `serializedproperty`) — narrow the audit/update to that section.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.claude/settings.local.json
.worktrees/
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>UnityFastToolsGenerators.Sample</RootNamespace>
<RootNamespace>Aspid.FastTools.Sample</RootNamespace>
<UnityVersion>6000.2.7f2</UnityVersion>
<LangVersion>9</LangVersion>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Aspid.UnityFastTools.Generators\Aspid.UnityFastTools.Generators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\Aspid.FastTools.Generators\Aspid.FastTools.Generators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<IsPackable>false</IsPackable>

<RootNamespace>UnityFastToolsGenerators.Tests</RootNamespace>
<RootNamespace>Aspid.FastTools.Tests</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand All @@ -20,7 +20,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Aspid.UnityFastTools.Generators\Aspid.UnityFastTools.Generators.csproj" />
<ProjectReference Include="..\Aspid.FastTools.Generators\Aspid.FastTools.Generators.csproj" />
</ItemGroup>


Expand Down
Loading