Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
273 commits
Select commit Hold shift + click to select a range
b01978c
test: enforce no prints and handshake preamble
dsarno Aug 17, 2025
555d965
feat: add defensive server path resolution in tests
dsarno Aug 17, 2025
e4544f6
Refine server source path lookup
dsarno Aug 17, 2025
9dbb4ff
Refine handshake tests and stdout hygiene
dsarno Aug 18, 2025
fde29d0
Convert skipped tests to xfail and improve framing robustness
dsarno Aug 18, 2025
5386b23
clarify stdout test failure messaging
dsarno Aug 18, 2025
63b070b
Add handshake fallback and logging checks
dsarno Aug 18, 2025
6cedb80
Claude Desktop: write BOM-free config to macOS path; dual-path fallba…
dsarno Aug 17, 2025
3bc9cd0
MCP: natural-language edit defaults; header guard + precondition for …
dsarno Aug 18, 2025
3cc1acd
MCP: add anchor_delete/anchor_replace structured ops; normalize NL/te…
dsarno Aug 18, 2025
22f55ce
Convert skipped tests to xfail and improve framing robustness
dsarno Aug 18, 2025
f3e94db
clarify stdout test failure messaging
dsarno Aug 18, 2025
d1362ac
Add handshake fallback and logging checks
dsarno Aug 18, 2025
e4e89e4
Claude Desktop: write BOM-free config to macOS path; dual-path fallba…
dsarno Aug 17, 2025
f1d773b
MCP: resolve merge conflicts; unify NL parsing and text-edit guards; …
dsarno Aug 18, 2025
c26ee13
MCP: add spec resource (script-edits); tighten script_apply_edits des…
dsarno Aug 18, 2025
3962cad
MCP: add script-edits spec resource; route all-structured edits via '…
dsarno Aug 18, 2025
c28bb38
CI: gate Unity compile steps behind secrets.UNITY_LICENSE to avoid 'C…
dsarno Aug 19, 2025
3943abd
CI: add Claude NL/T prompt at .claude/prompts/nl-unity-suite.md
dsarno Aug 19, 2025
77c841b
Tests: switch NL suite to ClaudeTests/longUnityScript-claudeTest.cs; …
dsarno Aug 19, 2025
b9eb430
fix: check UNITY_LICENSE via env in workflow
dsarno Aug 19, 2025
e9206a9
Merge pull request #22 from dsarno/codex/fix-workflow-file-unrecogniz…
dsarno Aug 19, 2025
69073c9
fix: allow manual run and env license check
dsarno Aug 19, 2025
54389a2
Merge pull request #23 from dsarno/codex/fix-workflow-file-unrecogniz…
dsarno Aug 19, 2025
543e2c5
fix: detect Unity mode and secrets
dsarno Aug 19, 2025
428328e
Merge pull request #24 from dsarno/codex/fix-unity-workflow-secret-ha…
dsarno Aug 19, 2025
528f603
Add debug print in mcp_source
dsarno Aug 19, 2025
0655f65
Merge pull request #25 from dsarno/codex/add-debug-statement-for-work…
dsarno Aug 19, 2025
230cb48
fix: update Unity MCP server path in workflow
dsarno Aug 19, 2025
b26d7a1
Merge pull request #27 from dsarno/codex/fix-mcp-server-path-in-mcp_c…
dsarno Aug 19, 2025
1351927
fix: update server dependency path
dsarno Aug 19, 2025
5f6b94a
Merge pull request #28 from dsarno/codex/fix-mcp-server-dependency-pa…
dsarno Aug 19, 2025
32f91f2
Update claude-nl-suite.yml
dsarno Aug 19, 2025
cd2e6e0
Update claude-nl-suite.yml
dsarno Aug 19, 2025
84585cc
Remove debug invocation print
dsarno Aug 19, 2025
54f1069
Merge pull request #29 from dsarno/codex/remove-debug-print-from-main
dsarno Aug 19, 2025
7cfb401
updated claude test file
dsarno Aug 19, 2025
50f15e9
Merge branch 'feat/nl-edits-ai-planner-prep' of https://github.com/ds…
dsarno Aug 19, 2025
aaa8b4d
CI: start MCP via uv stdio; preflight tool listing; register script_e…
dsarno Aug 20, 2025
7e276bb
CI: fail-fast preflight for MCP modules; gate Claude step on success()
dsarno Aug 20, 2025
325ca41
CI: log MCP server path and contents for startup diagnostics
dsarno Aug 20, 2025
87cf9c0
CI: use uv --active with --directory for MCP server and diagnostics
dsarno Aug 20, 2025
e44e841
Bridge: resolve Debug ambiguity by removing System.Diagnostics using;…
dsarno Aug 20, 2025
a3738d6
CI: expand allowed tools (find/head/tail) and raise max_turns to 20
dsarno Aug 20, 2025
6a3c68b
Fix MCP server launch and tool permissions
dsarno Aug 20, 2025
8e93adf
Clarify uv launch comment
dsarno Aug 20, 2025
52bc482
Merge pull request #32 from dsarno/codex/fix-mcp-server-launch-in-ci
dsarno Aug 20, 2025
68da960
Merge pull request #33 from dsarno/codex/fix-mcp-server-launch-in-ci-…
dsarno Aug 20, 2025
18e1721
Auto-approve Unity tools and mark permission skips
dsarno Aug 20, 2025
6fba526
Merge pull request #34 from dsarno/codex/enable-auto-approvals-in-ci-…
dsarno Aug 20, 2025
d0e4df9
Ensure artifact dir exists before agent runs
dsarno Aug 20, 2025
367bc11
Merge pull request #35 from dsarno/codex/handle-xml-parsing-errors-gr…
dsarno Aug 20, 2025
278270e
Update claude-nl-suite.yml
dsarno Aug 20, 2025
a8aea77
Align Claude NL test workflow with latest action options
dsarno Aug 20, 2025
0ecb3ba
Merge pull request #36 from dsarno/codex/patch-claude-yaml-for-test-s…
dsarno Aug 20, 2025
04eacf0
chore: refine CI permissions for claude tests
dsarno Aug 20, 2025
8d3af80
Merge pull request #38 from dsarno/codex/fix-auto-approval-for-ci-per…
dsarno Aug 20, 2025
7d99a7e
Server: register resources for both FastMCP.resource/resources; alway…
dsarno Aug 20, 2025
89daa65
CI: add nl-startuptest to quickly verify MCP resources and one previe…
dsarno Aug 20, 2025
8dca4bf
CI: gate full NL/T on startup success; include ClaudeTests in resources
dsarno Aug 20, 2025
bbca727
CI: fix YAML by using printf for fallback JUnit heredoc
dsarno Aug 20, 2025
117fbbc
CI: widen Unity tool auto-approval to mcp__unity__*; keep aggregator …
dsarno Aug 20, 2025
67831c5
CI: guard Anthropic key via env; startup and NL/T use ANTHROPIC_API_K…
dsarno Aug 20, 2025
5bf37bb
CI: refine claude suite (seed settings, clarify permissions, startup …
dsarno Aug 20, 2025
184df23
CI: pass ANTHROPIC_API_KEY via env; refine permissions; keep startup …
dsarno Aug 20, 2025
e120301
CI: detect Anthropic key and gate Claude steps; skip on forks
dsarno Aug 20, 2025
a0fc515
CI: refine startup tool list comments; explicit approvals; tidy unity…
dsarno Aug 20, 2025
ea39fa8
Prompts/scripts: update startup and NL suite prompts; add skipped mar…
dsarno Aug 20, 2025
27b4a7e
CI: add Unity MCP smoke workflow (single tool call to verify server)
dsarno Aug 20, 2025
6731bcb
CI: add QuickProbe workflow and prompt
dsarno Aug 20, 2025
adeab41
CI: update QuickProbe prompt and workflow wiring
dsarno Aug 20, 2025
260e236
CI: minor updates to QuickProbe prompt and smoke workflow
dsarno Aug 20, 2025
e562721
CI: finalize smoke workflow
dsarno Aug 20, 2025
ec19dcd
CI: refine QuickProbe workflow (env + permissions + wildcard tools)
dsarno Aug 21, 2025
2fc1101
CI: add Claude Desktop parity workflow
dsarno Aug 21, 2025
5f080e0
CI: gate desktop-parity on Anthropic key; pass anthropic_api_key like…
dsarno Aug 21, 2025
0b423b5
Add quickprobe prompt and CI workflow (mcp-quickprobe.md, unity-mcp-q…
dsarno Aug 21, 2025
204b9fc
strictier tool use to prevent subagent spawning and force mcp tools
dsarno Aug 22, 2025
0c60f43
update workflow filesto reduce likelihood of subagent spawning
dsarno Aug 22, 2025
08911ed
improve permissions for claude agent, fix mcpbridge timeout/token issue
dsarno Aug 22, 2025
33c7aec
increase max turns to 10
dsarno Aug 22, 2025
b7478f0
ci: align NL suite to new permissions schema; prevent subagent drift
dsarno Aug 22, 2025
288f566
ci: NL suite -> mini prompt for e2e; add full NL/T prompt; server: ct…
dsarno Aug 22, 2025
47f3c7b
ci: add checks:write; revert local project hardcodes (manifest, Proje…
dsarno Aug 22, 2025
1be0f60
tools: text-edit routing fixes (anchor_insert via text, CRLF calc); p…
dsarno Aug 22, 2025
70ece54
ci: use absolute UNITY_PROJECT_ROOT; prompts target TestProjects; ser…
dsarno Aug 22, 2025
1f18340
ci: ignore Unity test project's packages-lock.json; remove from repo …
dsarno Aug 22, 2025
9bb0be8
CI: start persistent Unity Editor for MCP (guarded by license) + allo…
dsarno Aug 22, 2025
838eb75
CI: hide license and pass via env to docker; fix invalid ref format
dsarno Aug 22, 2025
5acb539
CI: readiness probe uses handshake on Unity MCP port (deterministic)
dsarno Aug 22, 2025
298e376
CI: fix YAML; use TCP handshake readiness probe (FRAMING=1)
dsarno Aug 22, 2025
3215593
CI: prime Unity license via game-ci; mount ULF into container; extend…
dsarno Aug 22, 2025
7f7505a
CI: use ULF write + mount for Unity licensing; remove serial/email/pa…
dsarno Aug 22, 2025
3905fcf
CI: entitlement activation (UNITY_SERIAL=''); verify host ULF cache; …
dsarno Aug 22, 2025
152b866
CI: write ULF from secret and verify; drop entitlement activation step
dsarno Aug 22, 2025
753c929
CI: detect any licensing path; GameCI prime; status dir env; log+prob…
dsarno Aug 22, 2025
a8c4297
CI: add GameCI license prime; conditional ULF write; one-shot license…
dsarno Aug 22, 2025
0732e92
CI: fix YAML (inline python), add Anthropic key detect via GITHUB_ENV…
dsarno Aug 22, 2025
1478aa7
CI: mount Unity token/ulf/cache dirs into container to share host lic…
dsarno Aug 22, 2025
62da1aa
CI: fix YAML indentation; write ULF on host; activate in container wi…
dsarno Aug 22, 2025
d96ea2e
CI: gate Claude via outputs; mount all Unity license dirs; fix inline…
dsarno Aug 22, 2025
307f489
CI: normalize detect to step outputs; ensure license dirs mounted and…
dsarno Aug 22, 2025
c908f8b
Bridge: honor UNITY_MCP_STATUS_DIR for heartbeat/status file (CI-frie…
dsarno Aug 22, 2025
8a456bd
CI: guard project path for activation/start; align tool allowlist; ru…
dsarno Aug 22, 2025
88545b0
CI: finalize Unity licensing mounts + status dir; mode-detect (ULF/EB…
dsarno Aug 22, 2025
6ab5d12
CI: fix YAML probe (inline python -c) and finalize happy-path Unity l…
dsarno Aug 22, 2025
36ea142
CI: inline python probe; unify Unity image and cache mounts; ready to…
dsarno Aug 22, 2025
ef99621
CI: fix docker run IMAGE placement; ignore cache find perms; keep sam…
dsarno Aug 22, 2025
9b923c3
CI: pass -manualLicenseFile to persistent Editor; keep mounts and sin…
dsarno Aug 23, 2025
e020cbc
CI: mount full GameCI cache to /root in persistent Unity; set HOME=/r…
dsarno Aug 23, 2025
0916ad2
CI: make -manualLicenseFile conditional; keep full /root mount and li…
dsarno Aug 23, 2025
9a37cc7
CI: set HOME=/github/home; mount GameCI cache there; adjust manualLic…
dsarno Aug 23, 2025
2a80d12
CI: EBL sign-in for persistent Unity (email/password/serial); revert …
dsarno Aug 23, 2025
db562c3
CI: run full NL/T suite prompt (nl-unity-suite-full.md) instead of mini
dsarno Aug 23, 2025
daca6cc
NL/T: require unified diffs + explicit verdicts in JUnit; CI: remove …
dsarno Aug 23, 2025
59e3326
NL/T prompt: require CDATA wrapping for JUnit XML fields; guidance fo…
dsarno Aug 23, 2025
9b772f6
CI: remove in-container license check step; keep readiness and full s…
dsarno Aug 23, 2025
7fa2da9
NL/T prompt: add version header, stricter JUnit schema, hashing/norma…
dsarno Aug 23, 2025
cb13713
CI: increase Claude NL/T suite timeout to 30 minutes
dsarno Aug 23, 2025
c629855
CI: pre-create reports dir and result files to avoid tool approval pr…
dsarno Aug 23, 2025
fc57303
CI: skip wait if container not running; skip Editor start if project …
dsarno Aug 23, 2025
33b7ef2
fixies to harden ManageScript
dsarno Aug 23, 2025
7acd551
CI: sanitize NL/T markdown report to avoid NUL/encoding issues
dsarno Aug 23, 2025
cecbb06
revert breaking yyaml changes
dsarno Aug 23, 2025
ef194ac
CI: prime license, robust Unity start/wait, sanitize markdown via her…
dsarno Aug 23, 2025
ee23346
feat: installer cleanup, auto-migration, logging normalization
dsarno Aug 24, 2025
f21c2ce
fix(installer): skip legacy deletion when still referenced in prefs o…
dsarno Aug 24, 2025
175d5ae
chore(editor): WriteToConfig honors pythonDir; robust config match; r…
dsarno Aug 24, 2025
742d168
sec(installer): escape server path in pgrep pattern to prevent inject…
dsarno Aug 24, 2025
576dba4
Merge branch 'main' of https://github.com/CoplayDev/unity-mcp into fi…
dsarno Aug 24, 2025
4da30cc
bump server version
dsarno Aug 24, 2025
58ed4d4
chore(server): bump server_version.txt to 3.0.4
dsarno Aug 24, 2025
86b4dc1
chore(logging): include OS and server version in MCP bridge start log
dsarno Aug 24, 2025
48c1b7a
fix(installer): use Application.platform for OS detection; add canoni…
dsarno Aug 24, 2025
755e1d7
chore(version): bump server_version.txt to 3.0.5
dsarno Aug 24, 2025
ce1104e
feat(installer): rewire known configs (EditorPrefs, Cursor mcp.json) …
dsarno Aug 24, 2025
01ea2f4
refactor(installer): revert to lean installer logic from ee23346c; fi…
dsarno Aug 24, 2025
ad5c311
MCP: Fix macOS paths and VSCode manual setup
dsarno Aug 24, 2025
aa4fc1c
Server: set server_version.txt to 3.0.1
dsarno Aug 24, 2025
dbc65a5
Merge branch 'fix/installer-cleanup-v2' into feat/pre-split-edit-fram…
dsarno Aug 25, 2025
9c53d7b
Resolve merge: accept upstream renames/installer (fix/installer-clean…
dsarno Aug 25, 2025
37acd71
Fix Claude Desktop config path and atomic write issues
dsarno Aug 25, 2025
2bf18be
Editor: use macConfigPath on macOS for MCP client config writes (Clau…
dsarno Aug 25, 2025
be38c04
Models: add macConfigPath to McpClient for macOS config path selectio…
dsarno Aug 25, 2025
5b7ab24
Editor: on macOS, prefer macConfigPath in ManualConfigEditorWindow (f…
dsarno Aug 25, 2025
a310091
Fix McpClient: align with upstream/main, prep for framing split
dsarno Aug 26, 2025
a7de7cc
NL suite: shard workflow; tighten bridge readiness; add MCP preflight…
dsarno Aug 26, 2025
20827e0
NL suite: fix shard step indentation; move shard vars to env; remove …
dsarno Aug 26, 2025
d32fbb5
MCP clients: split VSCode Copilot config paths into macConfigPath and…
dsarno Aug 26, 2025
d637c58
Unity bridge: clean stale status; bind host; robust wait probe with I…
dsarno Aug 26, 2025
8837cf9
CI: use MCPForUnity.Editor.MCPForUnityBridge.StartAutoConnect as exec…
dsarno Aug 26, 2025
92b57c0
Action wiring: inline mcpServers in settings for all shards; remove r…
dsarno Aug 26, 2025
84e412d
CI: embed mcpServers in settings for all shards; fix startup sanity s…
dsarno Aug 26, 2025
70ac26d
CI: pin claude-code-base-action to e6f32c8; use claude_args --mcp-con…
dsarno Aug 26, 2025
3b4ff21
CI: unpin claude-code-base-action to @beta (commit ref not found)
dsarno Aug 26, 2025
798db05
CI: align with claude-code-base-action @beta; pass MCP via claude_arg…
dsarno Aug 26, 2025
3ad1caf
Editor: Fix apply_text_edits heuristic when edits shift positions; re…
dsarno Aug 26, 2025
5c62b40
CI: unify MCP wiring across workflows; write .claude/mcp.json; switch…
dsarno Aug 26, 2025
1bda497
CI: collapse NL suite shards into a single run to avoid repeated test…
dsarno Aug 26, 2025
2d9a83f
CI: minimize allowedTools for NL suite to essential Unity MCP + Bash(…
dsarno Aug 26, 2025
87e69f0
CI: mkdir -p reports before run; remove unsupported --timeout-minutes…
dsarno Aug 26, 2025
eb7227f
CI: broaden allowedTools to include find_in_file and mcp__unity__*
dsarno Aug 26, 2025
f851b70
CI: enable use_node_cache and switch NL suite model to claude-3-7-hai…
dsarno Aug 27, 2025
29d781a
CI: disable use_node_cache to avoid setup-node lockfile error
dsarno Aug 27, 2025
7e60640
CI: set NL suite model to claude-3-haiku-20240307
dsarno Aug 27, 2025
bf9ffbd
CI: cap Haiku output with --max-tokens 2048 for NL suite
dsarno Aug 27, 2025
1e1db08
CI: switch to claude-3-7-sonnet-latest and remove unsupported --max-t…
dsarno Aug 27, 2025
ce4c6e6
CI: update allowedTools to Bash(*) and explicit Unity MCP tool list
dsarno Aug 27, 2025
7f86daf
CI: update NL suite workflow (latest tweaks)
dsarno Aug 27, 2025
83931a1
Tests: tighten NL suite prompt for logging, hash discipline, stale re…
dsarno Aug 27, 2025
7758c4f
Add disallowed tools to NL suite workflow
dsarno Aug 27, 2025
8a02055
Merge pull request #43 from dsarno/codex/add-disallow-todo-to-nl-suite
dsarno Aug 27, 2025
1119eea
docs: clarify stale write retry
dsarno Aug 27, 2025
3eadecd
Merge pull request #44 from dsarno/codex/add-stale-write-retry-rule
dsarno Aug 27, 2025
dbdd7a3
Add fallback JUnit report and adjust publisher
dsarno Aug 27, 2025
75bf720
Merge pull request #45 from dsarno/codex/fix-nl-suite-junit-handling-…
dsarno Aug 27, 2025
48334cb
Indent fallback JUnit XML in workflow
dsarno Aug 27, 2025
7922690
Merge pull request #46 from dsarno/codex/fix-yaml-parsing-error-in-wo…
dsarno Aug 27, 2025
cab5e92
fix: correct fallback JUnit report generation
dsarno Aug 27, 2025
265beb9
Merge pull request #47 from dsarno/codex/fix-junit-report-generation-…
dsarno Aug 27, 2025
2b10b1a
Update mcp-quickprobe.md
dsarno Aug 27, 2025
832634b
Update mcp-quickprobe.md
dsarno Aug 27, 2025
8c62912
Update Response.cs
dsarno Aug 27, 2025
b0a8215
Update MCPForUnityBridge.cs
dsarno Aug 27, 2025
c25c2af
fix: correct McpTypes reference
dsarno Aug 27, 2025
da4ce7d
Add directory existence checks for symlink and XDG paths
dsarno Aug 27, 2025
faa403c
fix: only set installation flag after successful server install
dsarno Aug 27, 2025
21bb4e8
Merge pull request #50 from dsarno/codex/fix-editorprefs-key-setting-…
dsarno Aug 27, 2025
81d64b0
Merge pull request #49 from dsarno/codex/add-existence-checks-for-eff…
dsarno Aug 27, 2025
6eb1679
Merge pull request #48 from dsarno/codex/fix-compile-error-in-configj…
dsarno Aug 27, 2025
030edb6
Update resource_tools.py
dsarno Aug 27, 2025
7f17058
fix: respect mac config paths
dsarno Aug 27, 2025
a526567
Use File.Replace for atomic config write
dsarno Aug 27, 2025
086a13d
Remove unused imports in manage_script
dsarno Aug 27, 2025
c496c8a
Merge pull request #52 from dsarno/codex/fix-race-condition-in-file-m…
dsarno Aug 27, 2025
2e8f9fb
Merge pull request #51 from dsarno/codex/fix-macos-config-path-logic
dsarno Aug 27, 2025
6d5bf59
Merge pull request #53 from dsarno/codex/remove-unused-imports-in-man…
dsarno Aug 27, 2025
3e055c8
bump server version
dsarno Aug 27, 2025
295c7c2
Resolve merge with origin/main: keep ours for workflow files
dsarno Aug 27, 2025
0fb2e3b
Tests: update NL suite prompt and workflows; remove deprecated smoke/…
dsarno Aug 27, 2025
baf51ea
Editor: atomic config write via File.Replace fallback; remove redunda…
dsarno Aug 27, 2025
c9c73d8
CI: harden NL suite - idempotent docker, gate on unity_ok, safer port…
dsarno Aug 27, 2025
9b546fd
Editor: make atomic config write restoration safe (flag writeDone; co…
dsarno Aug 27, 2025
26e687f
Merge pull request #54 from dsarno/fix/atomic-config-write
dsarno Aug 27, 2025
ff7e24e
CI: fix fallback JUnit heredoc by using printf lines (no EOF delimite…
dsarno Aug 27, 2025
1da7033
CI: switch NL suite to mini prompt; mini prompt honors / and NL disci…
dsarno Aug 27, 2025
60c6c07
CI: replace claude_args with allowed_tools/model/mcp_config per actio…
dsarno Aug 27, 2025
1fa42a5
CI: expand UNITY_PROJECT_ROOT via in MCP config heredoc
dsarno Aug 27, 2025
6caa598
EditorWindow: add cross-platform fallback for File.Replace; macOS-ins…
dsarno Aug 27, 2025
c72b90a
CI: strengthen JUnit publishing for NL mini suite (normalize, debug l…
dsarno Aug 27, 2025
9d9216e
CI: set job-wide JUNIT_OUT/MD_OUT; normalization uses env; publish re…
dsarno Aug 27, 2025
6122c28
CI: publish a single normalized JUnit (reports/junit-for-actions.xml)…
dsarno Aug 27, 2025
0cfbd7b
CI: align mini prompt report filenames; redact Unity log tail in diag…
dsarno Aug 27, 2025
e13c470
chore: sync workflow and mini prompt; redacted logs; JUnit normalizat…
dsarno Aug 27, 2025
252cc5c
CI: redact sensitive tokens in Stop Unity; docs: CI usage + edit tools
dsarno Aug 27, 2025
0938760
prompts: update nl-unity-suite-full (mini-style setup + reporting dis…
dsarno Aug 27, 2025
2c2a26f
CI: harden NL workflows (timeout_minutes, robust normalization); prom…
dsarno Aug 27, 2025
b252130
prompts: add guarded write pattern (LF hash, stale_file retry) to ful…
dsarno Aug 27, 2025
c35eed9
prompts: enforce continue-on-failure, driver flow, and status handlin…
dsarno Aug 27, 2025
791d6ff
Make test list more explicit in prompt. Get rid of old test prompts f…
dsarno Aug 27, 2025
5704354
prompts: add stale fast-retry (server hash) + in-memory buf guidance
dsarno Aug 27, 2025
41a1012
CI: standardize JUNIT_OUT to reports/junit-nl-suite.xml; fix artifact…
dsarno Aug 27, 2025
960eab0
prompts: reporting discipline — append-only fragments, batch writes, …
dsarno Aug 28, 2025
87a67c4
prompts: stale fast-retry preference, buffer/sha carry, snapshot reve…
dsarno Aug 28, 2025
46ee857
workflows(nl-suite): precreate report skeletons, assemble junit, synt…
dsarno Aug 28, 2025
b8c1bc6
thsis too
dsarno Aug 28, 2025
6071b70
Update README-DEV.md
dsarno Aug 28, 2025
9b7de3c
Update .github/workflows/claude-nl-suite-mini.yml
dsarno Aug 28, 2025
12dd21c
Update .github/workflows/claude-nl-suite.yml
dsarno Aug 28, 2025
b27a6b6
workflows(nl-mini): fix YAML indentation/trailing spaces under with: …
dsarno Aug 28, 2025
1078039
workflows(nl-suite): fix indentation on docker logs redaction line (Y…
dsarno Aug 28, 2025
98e41eb
Add write to allowlist
dsarno Aug 28, 2025
9139cfc
nl-suite: harden reporting discipline (fragment-only writes, forbid a…
dsarno Aug 28, 2025
a26f073
nl-suite: enforce end-of-suite single Write (no bash redirection); wo…
dsarno Aug 28, 2025
995529a
prompts(nl-full): end-of-suite results must be valid XML with single …
dsarno Aug 28, 2025
9f14238
workflows(nl-suite): make Claude step non-fatal; tolerant normalizer …
dsarno Aug 28, 2025
9d2047c
nl-suite: fix stale classname to UnityMCP.NL-T in mini fallback; prom…
dsarno Aug 28, 2025
66c7ca9
nl-suite: fix fallback JUnit classname to UnityMCP.NL-T; prompt: forb…
dsarno Aug 28, 2025
b032f33
prompts(nl-full): after each write re-read raw bytes to refresh pre_s…
dsarno Aug 28, 2025
9c07afc
prompts(nl-full): canonicalize outputs to /; allow small fragment app…
dsarno Aug 28, 2025
a27dd38
prompts(nl-full): finalize markdown formatting for guarded write, exe…
dsarno Aug 28, 2025
e016171
workflows(nl-suite, mini): header/lint fixes and constrained Bash app…
dsarno Aug 28, 2025
5dad550
prompts(nl-full): format Fast Restore, Guarded Write, Execution, Spec…
dsarno Aug 28, 2025
df97ab2
workflows(nl-suite): keep header tidy and append-path alignment with …
dsarno Aug 28, 2025
6a86db3
minor fix
dsarno Aug 28, 2025
e0f8a72
workflows(nl-suite): fix indentation and dispatch; align allowed_tool…
dsarno Aug 28, 2025
72987b7
prompts(nl-full): switch to read_resource for buf/sha; re-read only w…
dsarno Aug 28, 2025
2031fcd
workflows(nl-suite): normalize step removes bootstrap when real testc…
dsarno Aug 28, 2025
b8e461a
workflows(nl-suite): enrich Markdown summary by extracting per-test <…
dsarno Aug 28, 2025
f0b3bba
clarify prompt resilience instructions
dsarno Aug 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .claude/prompts/nl-unity-claude-tests-mini.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Unity NL Editing Suite — Natural Mode

You are running inside CI for the **unity-mcp** repository. Your task is to demonstrate end‑to‑end **natural‑language code editing** on a representative Unity C# script using whatever capabilities and servers are already available in this session. Work autonomously. Do not ask the user for input. Do NOT spawn subagents, as they will not have access to the mcp server process on the top-level agent.

## Mission
1) **Discover capabilities.** Quietly inspect the tools and any connected servers that are available to you at session start. If the server offers a primer or capabilities resource, read it before acting.
2) **Choose a target file.** Prefer `TestProjects/UnityMCPTests/Assets/Scripts/LongUnityScriptClaudeTest.cs` if it exists; otherwise choose a simple, safe C# script under `TestProjects/UnityMCPTests/Assets/`.
3) **Perform a small set of realistic edits** using minimal, precise changes (not full-file rewrites). Examples of small edits you may choose from (pick 3–6 total):
- Insert a new, small helper method (e.g., a logger or counter) in a sensible location.
- Add a short anchor comment near a key method (e.g., above `Update()`), then add or modify a few lines nearby.
- Append an end‑of‑class utility method (e.g., formatting or clamping helper).
- Make a safe, localized tweak to an existing method body (e.g., add a guard or a simple accumulator).
- Optionally include one idempotency/no‑op check (re‑apply an edit and confirm nothing breaks).
4) **Validate your edits.** Re‑read the modified regions and verify the changes exist, compile‑risk is low, and surrounding structure remains intact.
5) **Report results.** Produce both:
- A JUnit XML at `reports/junit-nl-suite.xml` containing a single suite named `UnityMCP.NL` with one test case per sub‑test you executed (mark pass/fail and include helpful failure text).
- A summary markdown at `reports/junit-nl-suite.md` that explains what you attempted, what succeeded/failed, and any follow‑ups you would try.
6) **Be gentle and reversible.** Prefer targeted, minimal edits; avoid wide refactors or non‑deterministic changes.

## Assumptions & Hints (non‑prescriptive)
- A Unity‑oriented MCP server is expected to be connected. If a server‑provided **primer/capabilities** resource exists, read it first. If no primer is available, infer capabilities from your visible tools in the session.
- In CI/headless mode, when calling `mcp__unity__list_resources` or `mcp__unity__read_resource`, include:
- `ctx: {}`
- `project_root: "TestProjects/UnityMCPTests"` (the server will also accept the absolute path passed via env)
Example: `{ "ctx": {}, "under": "Assets/Scripts", "pattern": "*.cs", "project_root": "TestProjects/UnityMCPTests" }`
- If the preferred file isn’t present, locate a fallback C# file with simple, local methods you can edit safely.
- If a compile command is available in this environment, you may optionally trigger it; if not, rely on structural checks and localized validation.

## Output Requirements (match NL suite conventions)
- JUnit XML at `$JUNIT_OUT` if set, otherwise `reports/junit-nl-suite.xml`.
- Single suite named `UnityMCP.NL`, one `<testcase>` per sub‑test; include `<failure>` on errors.
- Markdown at `$MD_OUT` if set, otherwise `reports/junit-nl-suite.md`.

Constraints (for fast publishing):
- Log allowed tools once as a single line: `AllowedTools: ...`.
- For every edit: Read → Write (with precondition hash) → Re‑read; on `{status:"stale_file"}` retry once after re‑read.
- Keep evidence to ±20–40 lines windows; cap unified diffs to 300 lines and note truncation.
- End `<system-out>` with `VERDICT: PASS` or `VERDICT: FAIL`.

## Guardrails
- No destructive operations. Keep changes minimal and well‑scoped.
- Don’t leak secrets or environment details beyond what’s needed in the reports.
- Work without user interaction; do not prompt for approval mid‑flow.

> If capabilities discovery fails, still produce the two reports that clearly explain why you could not proceed and what evidence you gathered.
133 changes: 133 additions & 0 deletions .claude/prompts/nl-unity-suite-full.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# Unity NL/T Editing Suite — CI Agent Contract

You are running inside CI for the `unity-mcp` repo. Use only the tools allowed by the workflow. Work autonomously; do not prompt the user. Do NOT spawn subagents.

### Print this once, verbatim, early in the run
AllowedTools: Write,Bash(printf:*),Bash(echo:*),Bash(scripts/nlt-revert.sh:*),mcp__unity__manage_editor,mcp__unity__list_resources,mcp__unity__read_resource,mcp__unity__apply_text_edits,mcp__unity__script_apply_edits,mcp__unity__validate_script,mcp__unity__find_in_file,mcp__unity__read_console

---

## Mission
1) Pick target file (prefer):
- `unity://path/Assets/Scripts/LongUnityScriptClaudeTest.cs`
2) Execute **all** NL/T tests in order using minimal, precise edits.
3) Validate each edit with `mcp__unity__validate_script(level:"standard")`.
4) **Report**: write one `<testcase>` XML fragment per test to `reports/<TESTID>_results.xml`. Do **not** read or edit `$JUNIT_OUT`.
5) **Restore** the file after each test using the OS‑level helper (fast), not a full‑file text write.

---

## Environment & Paths (CI)
- Always pass: `project_root: "TestProjects/UnityMCPTests"` and `ctx: {}` on list/read/edit/validate.
- **Canonical URIs only**:
- Primary: `unity://path/Assets/...` (never embed `project_root` in the URI)
- Relative (when supported): `Assets/...`
- File paths for the helper script are workspace‑relative:
- `TestProjects/UnityMCPTests/Assets/...`

CI provides:
- `$JUNIT_OUT=reports/junit-nl-suite.xml` (pre‑created; leave alone)
- `$MD_OUT=reports/junit-nl-suite.md` (synthesized from JUnit)
- Helper script: `scripts/nlt-revert.sh` (snapshot/restore)

---

## Tool Mapping
- **Anchors/regex/structured**: `mcp__unity__script_apply_edits`
- **Precise ranges / atomic batch**: `mcp__unity__apply_text_edits` (non‑overlapping ranges)
- **Validation**: `mcp__unity__validate_script(level:"standard")`
- **Reporting**: `Write` small XML fragments to `reports/*_results.xml`
- **Snapshot/Restore**: `Bash(scripts/nlt-revert.sh:*)`

> Don’t use `mcp__unity__create_script`. Avoid the header/`using` region entirely.

---
### Structured edit ops (required usage)
- For method insertion anchored after `GetCurrentTarget`: use `script_apply_edits` with `{"op":"anchor_insert", "afterMethodName":"GetCurrentTarget", "text": "<code>"}`
- To delete the temporary helper (T‑A/T‑E): **do not** use `anchor_replace`. Prefer:
1) `script_apply_edits` with `{"op":"regex_replace", "pattern":"(?s)^\\s*private\\s+int\\s+__TempHelper\\s*\\(.*?\\)\\s*=>\\s*.*?;\\s*\\r?\\n", "replacement":""}`
2) If that returns `missing_field` or `bad_request`, fallback to `apply_text_edits` with a single `replace_range` computed from the method’s start/end offsets (found by scanning braces).
- If any write returns `missing_field`, `bad_request`, or `unsupported`: **write the testcase fragment anyway** with the error in `<failure>`, mark `VERDICT: FAIL`, then **restore** and proceed to the next test.
- Never call generic Bash like `mkdir`; the revert helper creates needed directories. Do not attempt directory creation; use only `scripts/nlt-revert.sh` for snapshot/restore.


## Output Rules (JUnit fragments only)
- For each test, create **one** file: `reports/<TESTID>_results.xml` containing exactly a single `<testcase ...> ... </testcase>`.
- Put human‑readable lines (PLAN/PROGRESS/evidence) **inside** `<system-out><![CDATA[ ... ]]></system-out>`.
- Evidence windows only (±20–40 lines). If showing a unified diff, cap at 100 lines and note truncation.
- **Never** open/patch `$JUNIT_OUT` or `$MD_OUT`; CI merges fragments and synthesizes Markdown.

**Example fragment**
```xml
<testcase classname="UnityMCP.NL-T" name="NL-1. Method replace/insert/delete">
<system-out><![CDATA[
PLAN: NL-0,NL-1,NL-2,NL-3,NL-4,T-A,T-B,T-C,T-D,T-E,T-F,T-G,T-H,T-I,T-J (len=15)
PROGRESS: 2/15 completed
pre_sha=<...>
... evidence windows ...
VERDICT: PASS
]]></system-out>
</testcase>

```

Note: Emit the PLAN line only in NL‑0 (do not repeat it for later tests or later `<system-out>` blocks).


### Fast Restore Strategy (OS‑level)

- Snapshot once at NL‑0, then restore after each test via the helper.
- Snapshot (once after confirming the target):
```bash
scripts/nlt-revert.sh snapshot "TestProjects/UnityMCPTests/Assets/Scripts/LongUnityScriptClaudeTest.cs" "reports/_snapshots/LongUnityScriptClaudeTest.cs.baseline"
```
- Log `snapshot_sha=...` printed by the script.
- Restore (after each mutating test):
```bash
scripts/nlt-revert.sh restore "TestProjects/UnityMCPTests/Assets/Scripts/LongUnityScriptClaudeTest.cs" "reports/_snapshots/LongUnityScriptClaudeTest.cs.baseline"
```
- Then `read_resource` to confirm and (optionally) `validate_script(level:"standard")`.
- The helper creates parent directories for the snapshot path if missing.
- If the helper fails: fall back once to a guarded full‑file restore using the baseline bytes; then continue.

### Guarded Write Pattern (for edits, not restores)

- Before any mutation:
- Call `mcp__unity__read_resource(uri, project_root, ctx)` and set `buf = res.text` and `pre_sha = res.sha256` (server‑computed over raw on‑disk bytes).
- Write with `precondition_sha256 = pre_sha`.
- On `{status:"stale_file"}`:
- Retry once using a server hash (`data.current_sha256` or `data.expected_sha256`) if present.
- Otherwise perform one `read_resource(...)` to refresh `pre_sha` and retry. No loops.
- After success:
- Prefer not to re‑read. Update `buf` locally; refresh `pre_sha = mcp__unity__read_resource(...).sha256` only when the next step requires exact on‑disk sync (validation, anchor recompute) or before leaving the test.
- Prefer anchors (`script_apply_edits`) for end‑of‑class / above‑method insertions. Keep edits inside method bodies. Avoid header/using.

### Execution Order (fixed)

- Run exactly: NL-0, NL-1, NL-2, NL-3, NL-4, T-A, T-B, T-C, T-D, T-E, T-F, T-G, T-H, T-I, T-J (15 total).
- NL‑0 must include the PLAN line (len=15).
- After each testcase, include `PROGRESS: <k>/15 completed`.

### Test Specs (concise)

- NL‑0. Sanity reads — Tail ~120; ±40 around `Update()`. Then snapshot via helper.
- NL‑1. Replace/insert/delete — `HasTarget → return currentTarget != null;`; insert `PrintSeries()` after `GetCurrentTarget` logging "1,2,3"; verify; delete `PrintSeries()`; restore.
- NL‑2. Anchor comment — Insert `// Build marker OK` above `public void Update(...)`; restore.
- NL‑3. End‑of‑class — Insert `// Tail test A/B/C` (3 lines) before final brace; restore.
- NL‑4. Compile trigger — Record INFO only.

- T‑A. Anchor insert (text path) — Insert helper after `GetCurrentTarget`; verify; delete via `regex_replace`; restore.
- T‑B. Replace body — Single `replace_range` inside `HasTarget`; restore.
- T‑C. Header/region preservation — Edit interior of `ApplyBlend`; preserve signature/docs/regions; restore.
- T‑D. End‑of‑class (anchor) — Insert helper before final brace; remove; restore.
- T‑E. Lifecycle — Insert → update → delete via regex; restore.
- T‑F. Atomic batch — One call: two small `replace_range` + one end‑of‑class comment; all‑or‑nothing; restore.
- T‑G. Path normalization — Same edit with `unity://path/Assets/...` then `Assets/...`; second returns `{status:"no_change"}`.
- T‑H. Validation — `standard` after edits; `basic` only for transient checks.
- T‑I. Failure surfaces — Record INFO on `{too_large}`, `{stale_file}`, overlap rejection, validation failure, `{using_guard}`.
- T‑J. Idempotency — Repeat `replace_range` → `{status:"no_change"}`; repeat delete → no‑op.

### Status & Reporting

- Safeguard statuses are non‑fatal; record and continue.
- End each testcase `<system-out>` with `VERDICT: PASS` or `VERDICT: FAIL`.
103 changes: 0 additions & 103 deletions .claude/prompts/nl-unity-suite.md

This file was deleted.

Loading
Loading