Chore: remove serena MCP completely; gitea auto-push + test-count conventions

Serena dropped from .mcp.json + .serena/ untracked (unused in practice,
flaky on Unity per CLAUDE.md's own caveat); memory stack is now three
layers. Standing auths recorded in the skill: docs auto-commit + auto-push
main->gitea (origin stays ask-first).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-07 22:00:33 -07:00
parent a4b6bb9dfe
commit 7b64c1caa3
6 changed files with 33 additions and 24 deletions
+6 -6
View File
@@ -15,7 +15,7 @@ The spine: **size by blast-radius → ground → (design-review) → plan-gate
2. **Plan-approval gate ★.** Phases up to approval are read-only. Code is written only after the operator approves and you call **`ExitPlanMode`**. Self-policed, not harness-enforced. 2. **Plan-approval gate ★.** Phases up to approval are read-only. Code is written only after the operator approves and you call **`ExitPlanMode`**. Self-policed, not harness-enforced.
3. **Doc + memory bookend ★.** Scan the vault/memory at start; update it at end (incl. CLAUDE.md self-maintenance). Protocol → `CLAUDE.md` Memory section + [`references/memory-protocol.md`](references/memory-protocol.md). 3. **Doc + memory bookend ★.** Scan the vault/memory at start; update it at end (incl. CLAUDE.md self-maintenance). Protocol → `CLAUDE.md` Memory section + [`references/memory-protocol.md`](references/memory-protocol.md).
4. **DOTS-correct.** ECS conventions per `CLAUDE.md` + [`references/dots-conventions.md`](references/dots-conventions.md). Any violation found in review is blocking. 4. **DOTS-correct.** ECS conventions per `CLAUDE.md` + [`references/dots-conventions.md`](references/dots-conventions.md). Any violation found in review is blocking.
5. **Code commits gated; docs commits standing.** Code: offer + propose grouping in the final report; commit only on explicit "commit". **Docs-only changes (vault / CLAUDE.md / skill references) auto-commit at session end** in a logical `Docs:` group — operator standing authorization 2026-07-07. **Never push** unless asked. 5. **Code commits gated; docs commits standing.** Code: offer + propose grouping in the final report; commit only on explicit "commit". **Docs-only changes (vault / CLAUDE.md / skill references) auto-commit at session end** in a logical `Docs:` group — operator standing authorization 2026-07-07. **Push: auto-push `main` to `gitea` after session-end commits** (standing auth 2026-07-07); **`origin` (GitHub) only when asked.**
6. **Operator gates.** Present-forks-don't-auto-decide · no time/effort/deadline estimates · never-silently-defer · tuning-defaults autonomy. See *Operator gates* below. 6. **Operator gates.** Present-forks-don't-auto-decide · no time/effort/deadline estimates · never-silently-defer · tuning-defaults autonomy. See *Operator gates* below.
7. **Path-portable.** Never write machine-specific absolute paths (`/Users/…`, `C:\…`) into the skill, code, docs, or `.mcp.json` — use repo-relative / `${CLAUDE_PROJECT_DIR}`. 7. **Path-portable.** Never write machine-specific absolute paths (`/Users/…`, `C:\…`) into the skill, code, docs, or `.mcp.json` — use repo-relative / `${CLAUDE_PROJECT_DIR}`.
@@ -44,13 +44,13 @@ Pick the track from the *surface touched*, never from a minutes estimate.
### Phase 0 — Pre-flight ### Phase 0 — Pre-flight
1. **Foundation check.** `com.unity.entities`/`com.unity.netcode` in `Packages/packages-lock.json`? If **absent**, STOP — point to the one-time setup task (`Docs/dots-setup-task.md`). Never install/scaffold inline. 1. **Foundation check.** `com.unity.entities`/`com.unity.netcode` in `Packages/packages-lock.json`? If **absent**, STOP — point to the one-time setup task (`Docs/dots-setup-task.md`). Never install/scaffold inline.
2. **Unity ready.** `mcpforunity://editor/state``ready_for_tools`. Not ready / no instance → surface, ask operator to focus Unity. Multiple editors → `mcpforunity://instances` + `set_active_instance`. (An unfocused editor throttles to near-idle and breaks Burst recompiles — ask for focus on heavy build/test/Burst sessions.) 2. **Unity ready.** `mcpforunity://editor/state``ready_for_tools`. Not ready / no instance → surface, ask operator to focus Unity. Multiple editors → `mcpforunity://instances` + `set_active_instance`. (An unfocused editor throttles to near-idle and breaks Burst recompiles — ask for focus on heavy build/test/Burst sessions.)
3. **Memory stack.** Probe `basic-memory` + `serena`; on failure fall back (obsidian-cli + Glob/Grep) and continue. 3. **Memory stack.** Probe `basic-memory`; on failure fall back (obsidian-cli + Glob/Grep) and continue.
4. **Intake gate.** Unclear scope/surface/output → bundle 24 ambiguities into one `AskUserQuestion`. Specific prompt → skip. 4. **Intake gate.** Unclear scope/surface/output → bundle 24 ambiguities into one `AskUserQuestion`. Specific prompt → skip.
### Phase 1 — Ground (read-only, plan mode) ### Phase 1 — Ground (read-only, plan mode)
Declare plan mode: read-only tools only (`Read/Glob/Grep`, MCP resource reads, `unity_reflect`, `unity_docs`, `read_console`, ctx7/find-docs, obsidian-cli reads, `basic-memory`, serena reads). No writes. Declare plan mode: read-only tools only (`Read/Glob/Grep`, MCP resource reads, `unity_reflect`, `unity_docs`, `read_console`, ctx7/find-docs, obsidian-cli reads, `basic-memory`). No writes.
Run the **Documentation-Protocol scan** (`CLAUDE.md` → vault MoC + latest session log → open DRs/roadmap → `basic-memory` recall on the goal's nouns → native `MEMORY.md`), then ground the work along three lenses: **code/asset graph** (serena `find_symbol`/refs, else Glob/Grep on `Assets/_Project/**/*.cs` + `*.asmdef`; `manage_scene get_hierarchy`; `unity_reflect` for goal types) · **knowledge state** (vault + `basic-memory`; quote locked decisions that constrain the goal) · **live state** (`editor/state`, `read_console` baseline, installed Entities/Netcode versions for ctx7 pinning). For Feature scope, fan this out read-only via the *Ground fan-out* Workflow pattern; for Small, do it inline. Run the **Documentation-Protocol scan** (`CLAUDE.md` → vault MoC + latest session log → open DRs/roadmap → `basic-memory` recall on the goal's nouns → native `MEMORY.md`), then ground the work along three lenses: **code/asset graph** (Glob/Grep on `Assets/_Project/**/*.cs` + `*.asmdef`; `manage_scene get_hierarchy`; `unity_reflect` for goal types) · **knowledge state** (vault + `basic-memory`; quote locked decisions that constrain the goal) · **live state** (`editor/state`, `read_console` baseline, installed Entities/Netcode versions for ctx7 pinning). For Feature scope, fan this out read-only via the *Ground fan-out* Workflow pattern; for Small, do it inline.
Synthesize a **≤400-word Project Brief**; discard raw dumps. If the goal contradicts a locked vault/`CLAUDE.md` decision, halt and surface. Synthesize a **≤400-word Project Brief**; discard raw dumps. If the goal contradicts a locked vault/`CLAUDE.md` decision, halt and surface.
@@ -74,7 +74,7 @@ The single stateful editor + domain-reload ordering make parallel writes unsafe
### Phase 6 — Verify ladder (definition of done — show evidence, not "done") ### Phase 6 — Verify ladder (definition of done — show evidence, not "done")
NetCodeTestWorld is `internal` and unused here — do NOT prescribe it. Live-driving rules + the server-inject harness → [`references/validation-harness.md`](references/validation-harness.md). NetCodeTestWorld is `internal` and unused here — do NOT prescribe it. Live-driving rules + the server-inject harness → [`references/validation-harness.md`](references/validation-harness.md).
- **L1** — `read_console(types=["error","warning","exception"], include_stacktrace=True)` clean vs the Phase-1 baseline. Burst/source-gen failures surface here, not in a plain build — any new one is a finding. - **L1** — `read_console(types=["error","warning","exception"], include_stacktrace=True)` clean vs the Phase-1 baseline. Burst/source-gen failures surface here, not in a plain build — any new one is a finding.
- **L2** — EditMode tests: plain-Entities `new World → register in SimulationSystemGroup → SortSystems → Update → assert` (`run_tests mode=EditMode`). Extract pure logic to a `*Math.cs` helper and unit-test it (cover swept hit-detection with a tunnelling regression). **Plus one live Play netcode smoke**`execute_code` boot, step ticks, assert **server == client** for the replicated surface (identify worlds by `world.Name == "ServerWorld"/"ClientWorld"`). - **L2** — EditMode tests: plain-Entities `new World → register in SimulationSystemGroup → SortSystems → Update → assert` (`run_tests mode=EditMode`). In DURABLE docs (DRs/logs/memory) write "suite green (N at the time)" — never stamp absolute counts as standing facts; they drift. Extract pure logic to a `*Math.cs` helper and unit-test it (cover swept hit-detection with a tunnelling regression). **Plus one live Play netcode smoke**`execute_code` boot, step ticks, assert **server == client** for the replicated surface (identify worlds by `world.Name == "ServerWorld"/"ClientWorld"`).
- **L3** (visual/asset work) — screenshot via `execute_code` `ScreenCapture` → Read PNG, **and verify asset *values*** (`shader.GetPropertyType`-guard before `GetColor`/`GetFloat`) — a dark/stylized render masks material bugs. - **L3** (visual/asset work) — screenshot via `execute_code` `ScreenCapture` → Read PNG, **and verify asset *values*** (`shader.GetPropertyType`-guard before `GetColor`/`GetFloat`) — a dark/stylized render masks material bugs.
Loop ≤3 fix iterations per finding; if iteration 3 still fails, halt and surface "I can't resolve X without a decision." Loop ≤3 fix iterations per finding; if iteration 3 still fails, halt and surface "I can't resolve X without a decision."
@@ -94,7 +94,7 @@ Per `CLAUDE.md` Memory section + [`references/memory-protocol.md`](references/me
**Reviews**: pre-code <result> · post-impl <result>. **Reviews**: pre-code <result> · post-impl <result>.
**Next step**: <one concrete next action from the log's Next-session intent>. **Next step**: <one concrete next action from the log's Next-session intent>.
``` ```
Then **commit the docs group directly** (standing authorization) and **offer code commits**; code commits only on explicit approval. **Review first** (`git status` + `git diff --stat`); **stage explicit paths — never `git add -A`** (excludes `Library/Temp/obj/Logs/UserSettings`, `.csproj`/`.sln`, scratch screenshots/exports); keep each asset **with its `.meta`** in one commit; one commit per concern; match the repo's message style + the Co-Authored-By trailer; **never push**. Don't auto-loop into a fresh session. Then **commit the docs group directly** and **push to gitea** (both standing authorizations); **offer code commits** — those only on explicit approval. Report the origin-unpushed count. **Review first** (`git status` + `git diff --stat`); **stage explicit paths — never `git add -A`** (excludes `Library/Temp/obj/Logs/UserSettings`, `.csproj`/`.sln`, scratch screenshots/exports); keep each asset **with its `.meta`** in one commit; one commit per concern; match the repo's message style + the Co-Authored-By trailer; **never push**. Don't auto-loop into a fresh session.
## Workflow orchestration (the parallelism primitive) ## Workflow orchestration (the parallelism primitive)
@@ -1,6 +1,6 @@
# Memory & Documentation Protocol # Memory & Documentation Protocol
How `/dots-dev` reads and writes knowledge. **`CLAUDE.md`'s "Memory — four layers" section is authoritative** for the layer definitions and the which-tool-when routing (in-repo vault · `basic-memory` · `serena` · native `memory/`) — this file does not re-table them; it carries the **session bookends** and the **fallback chain**. How `/dots-dev` reads and writes knowledge. **`CLAUDE.md`'s "Memory — three layers" section is authoritative** for the layer definitions and the which-tool-when routing (in-repo vault · `basic-memory` · native `memory/`) — this file does not re-table them; it carries the **session bookends** and the **fallback chain**. (serena removed 2026-07-07 — unused + flaky on Unity; C# nav = `Glob`/`Grep`.)
**Cross-machine rule:** anything that must be true on both the Mac and Windows machines goes in the **vault** (`Docs/Vault/`) or **`CLAUDE.md`** (both committed). Native `memory/` is machine-local convenience — never the sole home of a decision or design fact. **Cross-machine rule:** anything that must be true on both the Mac and Windows machines goes in the **vault** (`Docs/Vault/`) or **`CLAUDE.md`** (both committed). Native `memory/` is machine-local convenience — never the sole home of a decision or design fact.
@@ -25,8 +25,7 @@ If the operator says "skip the protocol," still write a one-line stub session lo
- **No obsidian-cli configured** → direct `Read`/`Write` on `Docs/Vault/**` (it's plain markdown; Obsidian/basic-memory pick up changes on next index). This is the operative path on a fresh machine. - **No obsidian-cli configured** → direct `Read`/`Write` on `Docs/Vault/**` (it's plain markdown; Obsidian/basic-memory pick up changes on next index). This is the operative path on a fresh machine.
- **basic-memory down** → obsidian-cli search + `Grep` over the vault. - **basic-memory down** → obsidian-cli search + `Grep` over the vault.
- **serena C# unavailable / stalls on the Unity solution** → `Glob`/`Grep` (or `claude-context`/LanceDB if it was added as the documented fallback).
## Setup pointer ## Setup pointer
The vault scaffold, the `basic-memory`/`serena` `.mcp.json` entries (using `${CLAUDE_PROJECT_DIR}`), and `CLAUDE.md` are created by the **one-time project setup task** (`Docs/dots-setup-task.md`), not by this skill. If this skill runs and the vault or memory MCPs are missing, it notes the gap and points to that setup task. The vault scaffold, the `basic-memory` `.mcp.json` entry, and `CLAUDE.md` are created by the **one-time project setup task** (`Docs/dots-setup-task.md`), not by this skill. If this skill runs and the vault or memory MCPs are missing, it notes the gap and points to that setup task.
-9
View File
@@ -3,15 +3,6 @@
"basic-memory": { "basic-memory": {
"command": "uvx", "command": "uvx",
"args": ["basic-memory", "mcp"] "args": ["basic-memory", "mcp"]
},
"serena": {
"command": "uvx",
"args": [
"--from", "git+https://github.com/oraios/serena",
"serena", "start-mcp-server",
"--context", "ide-assistant",
"--project", "${CLAUDE_PROJECT_DIR}"
]
} }
} }
} }
+4 -4
View File
@@ -164,12 +164,12 @@ Full rules: `.claude/skills/dots-dev/references/dots-conventions.md` (in-repo; t
- **Never** create/edit/commit `.csproj`/`.sln` — only `.asmdef`. - **Never** create/edit/commit `.csproj`/`.sln` — only `.asmdef`.
- **No asset/scene edits during Play Mode.** Check `editor_state.advice.ready_for_tools` before mutating; package adds/refreshes trigger domain reloads — wait for `is_compiling=false`. - **No asset/scene edits during Play Mode.** Check `editor_state.advice.ready_for_tools` before mutating; package adds/refreshes trigger domain reloads — wait for `is_compiling=false`.
## Memory — four layers (which tool when) ## Memory — three layers (which tool when)
Full protocol + per-layer detail: [[Documentation_Protocol]] (`Docs/Vault/_Meta/Documentation_Protocol.md`). The four layers: **in-repo vault** `Docs/Vault/` (design docs, DRs, session logs — committed) · **basic-memory** MCP (semantic/wikilink recall over the vault) · **serena** MCP (C# symbol nav of `Assets/_Project/`) · **native Claude memory** (`memory/`, `MEMORY.md` — machine-local). Full protocol + per-layer detail: [[Documentation_Protocol]] (`Docs/Vault/_Meta/Documentation_Protocol.md`). The three layers: **in-repo vault** `Docs/Vault/` (design docs, DRs, session logs — committed) · **basic-memory** MCP (semantic/wikilink recall over the vault) · **native Claude memory** (`memory/`, `MEMORY.md` — machine-local). (serena REMOVED 2026-07-07 — unused in practice + flaky on Unity.)
- Where is X / who calls it → **serena** (fallback `Grep`/`Glob`). What did we decide / how does Z work → **basic-memory** → read the vault note. Literal string / asset GUID → **Grep/Glob**. Current DOTS API → **context7**. Conventions → this file. Long-form build lessons → the gotchas archive. - Where is X / who calls it → **Grep/Glob**. What did we decide / how does Z work → **basic-memory** → read the vault note. Current DOTS API → **context7**. Conventions → this file. Long-form build lessons → the gotchas archive.
- **Cross-machine rule:** durable truth → the **vault** or **this file** (both committed); native `memory/` is local-only, never the sole home of a decision. **serena C# caveat:** flaky on Unity — if `find_symbol` stalls, fall back to `Glob`/`Grep`. - **Cross-machine rule:** durable truth → the **vault** or **this file** (both committed); native `memory/` is local-only, never the sole home of a decision.
## Per-machine setup (NOT in git — redo on each machine) ## Per-machine setup (NOT in git — redo on each machine)
@@ -50,6 +50,24 @@ MEMORY.md index de-bloated (two ~500-word narrative lines → true one-liners; d
the stale "scale LEG children" root-cause claim corrected in the redirect memory (real fix was the swallowed the stale "scale LEG children" root-cause claim corrected in the redirect memory (real fix was the swallowed
attribute — see [[2026-07-07_Phase15_NodeFeedback_Attribute_Swallow]]). attribute — see [[2026-07-07_Phase15_NodeFeedback_Attribute_Swallow]]).
## Round 2 (same session) — health sweep + operator authorizations
Sweep findings: **GitHub PAT leaked in the `origin` remote URL** (operator rotating; never echo credentialed remote
URLs) · **75 commits unpushed to origin / 25 to gitea** · basic-memory sync verified LIVE · four pre-redirect roadmap
docs lacked supersession banners (added, `03fb4052e`) · playtest-notes drop file created (`User Sessions/` is
git-ignored — local scratch by design; durable record = session logs).
Operator authorized ×3: (1) **auto-push `main`→gitea whenever** (SKILL.md #5 + memory; origin stays ask-first);
(2) **serena REMOVED completely**`.mcp.json`, `.serena/` (moved to scratchpad; memories were empty), all references
in CLAUDE.md ("three layers" now), SKILL.md, memory-protocol.md, Documentation_Protocol.md; C# nav = Grep/Glob;
(3) **console-noise purge + conventions**: fixed CS0618/CS0414 in `MenuUi` (FindAnyObjectByType),
GA `SaveParticleSystemScript` (prefabAssetPath→assetPath ×2), Synty `SampleOscillateSliders` (FindObjectsByType
overload), `POLYGON_DogAnimationController` (dead `death_b` removed) — **plus a real bug the sweep surfaced:
`PixelArtDevControls` used legacy `Input.GetKeyDown(F3)``InvalidOperationException` EVERY FRAME in Play** (Input
System-only project; fixed to `Keyboard.current.f3Key.wasPressedThisFrame`). Test-count convention: durable docs say
"suite green (N at the time)", never absolute counts (455 ≠ the stale "456" stamps). Suite green (455) post-purge;
compile warnings zero; remaining console = known test-world `Ignoring invalid [UpdateBefore]` artifacts + bridge noise.
## Next-session intent ## Next-session intent
Phase 1.5 in earnest: collision-fidelity pass (stabilize #2, now scoped) → lighting/atmosphere pass → art-look Phase 1.5 in earnest: collision-fidelity pass (stabilize #2, now scoped) → lighting/atmosphere pass → art-look
+3 -2
View File
@@ -16,14 +16,15 @@ How knowledge is read and written for Project M. Four layers, each with a distin
|---|---|---| |---|---|---|
| **This vault** (`Docs/Vault/`) | Design docs, decision records, session logs, roadmap | **Yes** (git) | | **This vault** (`Docs/Vault/`) | Design docs, decision records, session logs, roadmap | **Yes** (git) |
| **basic-memory** MCP | Semantic + wikilink recall over these same vault files | Yes (indexes the vault) | | **basic-memory** MCP | Semantic + wikilink recall over these same vault files | Yes (indexes the vault) |
| **serena** MCP | C# symbol navigation of `Assets/_Project/` | N/A (from code) |
| **Native Claude memory** | Machine-local facts / preferences (`memory/`, `MEMORY.md`) | **No** | | **Native Claude memory** | Machine-local facts / preferences (`memory/`, `MEMORY.md`) | **No** |
> serena MCP (C# symbol nav) REMOVED 2026-07-07 — unused in practice + flaky on Unity; C# navigation = `Grep`/`Glob`.
**Cross-machine rule:** durable truth → vault or repo `CLAUDE.md` (both committed). Native memory is local-only, never the sole home of a decision or design fact. **Cross-machine rule:** durable truth → vault or repo `CLAUDE.md` (both committed). Native memory is local-only, never the sole home of a decision or design fact.
## Which tool when ## Which tool when
- Where is X defined / who calls it → **serena** (fallback `Grep` / `Glob`). - Where is X defined / who calls it → **Grep / Glob**.
- What did we decide / how does system Z work → **basic-memory** recall → read the note here. - What did we decide / how does system Z work → **basic-memory** recall → read the note here.
- Literal string / asset GUID → **Grep / Glob**. - Literal string / asset GUID → **Grep / Glob**.
- Current DOTS / Netcode API → **context7** (never memory). - Current DOTS / Netcode API → **context7** (never memory).