CoreAI v6.7.0
Prompt-delivery fix, a measured Lua guard optimization, and a full read-only audit of the Hub, core and Unity packages.
Fixed
-
Built-in agent prompts never reached a Unity host.
AgentPromptsInstallerchains theResources/AgentPrompts/Systemprovider ahead of the built-in one, so a prompt shipped there permanently shadows its C# const — and the package shipped copies of seven built-in prompts. The shippedProgrammer.txthad already drifted: it was missing the "answer plain questions directly — do NOT callread_skillor any tool for those" rule, thereport()/logic_*globals list, and theForbidden: io, os, require, load, loadfile, dofile, debugline. Every Unity host was therefore running an older Programmer prompt than the code said.The eight shadowing/dead assets are deleted (
PlayerChat.txtwas dead outright — the role id becamePlainChat), leavingDeveloperSampleAgent.txt, which has no const.Resources/AgentPrompts/Systemis now purely the consumer's override slot, as its own doc comment says. A new test,NoBuiltInRolePromptIsShadowedByAShippedResourceCopy, fails if such a copy is reintroduced.
Changed
- Lua execution guard: the wall clock is now sampled every 64th hook fire instead of every fire. Measured:
Stopwatch.GetTimestamp()~44 ns vs ~14 ns for the heap read, i.e. ~76% of the work inside a hook that fires every 4 VM instructions. The step budget is still charged on every fire, so a runaway is cut exactly as before. Guarded-execution overhead: 3.67× → 3.21×.
Docs
dev-docs/LUA_PERF_AUDIT_v6.6_2026-07.md— two findings worth reading: the published Luau comparison was measured without the execution guard and understates the real gap by ~3.7×; and the guard's cost is dominated by the number of hook fires (~600 ns each — the VM's async hook dispatch), not the work inside the hook. Raising the batch to 64 measures 1.21× overhead (a 2.65× speedup) but was deliberately not shipped: the small batch is load-bearing for the allocation-bomb backstop. The doc specifies the adaptive-batch design that would capture the win safely.dev-docs/CODE_AUDIT_v6.6_2026-07.md— audit backlog forCoreAIHub,CoreAIandCoreAiUnity.
Full EditMode suite: 2386 passed, 0 failed, 9 skipped (intentional).