Nexus KDG
Local-First Private AI Coder
Created on 12th July 2026
•
Nexus KDG
Local-First Private AI Coder
The problem Nexus KDG solves
The problem it solves
cloud coding agents are powerful, but the context sent to them can contain way more than the developer intended
api keys, database urls, personal data, internal class names, proprietary functions, diagnostics, test output and business logic can all leave the machine inside one normal-looking prompt
Nexus-KDG sits locally between the developer and the AI model
before any request reaches the cloud, it:
detects and removes credentials and sensitive data
pseudonymizes proprietary Python identifiers
checks local security policies
chooses between a local model, sanitized cloud request, or a complete block
verifies the exact outbound payload
restores the original identifiers locally when the answer returns
records a truthful, tamper-evident receipt of what actually happened
developers can use Nexus directly inside VS Code or Cursor through Nexus Chat. responses are streamed back, but no code changes are applied silently. the developer first reviews the suggestion and generated diff, then chooses Approve & Apply or Deny Suggestion
temporary secret material is kept only inside a session-scoped local vault so placeholders can be restored safely. that data is deleted when the suggestion is approved, denied, cancelled, expired, when a new chat begins, or during stale cleanup after restart
for larger projects, Nexus can also index and scan the repository locally, rank risky files, ignore dependencies and generated artifacts, ask the developer which exact files they approve, and generate redacted patch previews without automatically changing the source
so teams can keep using capable cloud models without manually cleaning every prompt or blindly trusting what left their machine
The current extension includes synchronized Nexus Chat and Command Center views, explicit review/approval actions, temporary session-scoped secret handling, exact outbound evidence, and local repository remediation workflows.
Challenges we ran into
Challenges I ran into
the hard part was not- okay, it was not just detecting a secret with regex
the difficult part was making sure every security claim stayed true across cloud calls, local fallback, streamed events, audit receipts and actual file edits
one example was network_call_occurred
entering the provider adapter does not mean a network request happened. credentials could be missing, client creation could fail, or payload verification could reject the request first. we had to move that state change to the exact point where the external request was actually about to begin
live events caused another issue
the extension originally received the request id only after the model response finished, which meant the “live” timeline appeared all at once afterward. we changed the flow so the extension creates the request id first, opens the authenticated SSE stream, sends the assist request using that same id, then handles ordering, reconnects, duplicate events and exactly one terminal state
the new chat approval workflow added a different security problem
Nexus needs the original local values temporarily so it can restore placeholders in the developer-facing answer and patch preview, but those values should not survive longer than the session. we built a session-scoped temporary vault and had to cover every exit path: approve, deny, cancel, new session, timeout and stale cleanup after restart
applying model-generated code also needed strict boundaries
the model suggestion is never written immediately. Nexus generates a diff, waits for explicit approval, checks that the file has not changed since the suggestion was created, rejects unsafe paths, and only then applies the approved patch. repo-wide remediation follows the same idea with exact file selection and non-writing redacted previews
there were also cases where audit_persisted=true while the full ledger chain was not intact. those are different facts, so we separated current-request persistence from global chain verification instead of showing one vague green “verified” status
a lot of the build became this loop:
make something work
find the edge case where the UI could overclaim what happened
tighten the state model
run the real Groq request again
and then find another one at 2am somehow
The latest repository changes add the chat approval sessions, temporary vault lifecycle, synchronized request evidence and human-controlled patch workflow rather than silent model edits.
Technologies used
