Skip to content

chore(env): add Cursor Cloud Agent development environment - #216

Open
Looted wants to merge 2 commits into
developfrom
cursor/cloud-agent-dev-environment-0c92
Open

chore(env): add Cursor Cloud Agent development environment#216
Looted wants to merge 2 commits into
developfrom
cursor/cloud-agent-dev-environment-0c92

Conversation

@Looted

@Looted Looted commented Aug 18, 2026

Copy link
Copy Markdown
Owner

What

Adds a repo-managed Cursor Cloud Agent development environment so agents boot into a ready-to-work Kibi checkout.

  • .cursor/environment.json — uses the default base image and wires the install phase.
  • .cursor/install.sh — idempotent bootstrap that installs the two toolchain prerequisites missing from the default image and then installs workspace dependencies:
    • SWI-Prolog (>= 9, from the official ppa:swi-prolog/stable, matching CI) + bubblewrap
    • Bun pinned to 1.3.10 (the version CI uses), symlinked onto PATH
    • bun install --frozen-lockfile for the workspace (and .opencode when it declares a manifest)

The default base image already provides Node.js, git, python3, curl, and passwordless sudo, so only Prolog and Bun need to be added. The script is guarded (command -v) so re-runs are no-ops.

Why

The repo requires SWI-Prolog and Bun (see CONTRIBUTING.md and .github/workflows/ci.yml), neither of which ships in the default Cloud Agent image. Without this, agents can't bun install, build, run tests, or exercise the Prolog-backed kibi CLI.

Validation

Validated on this VM and in a fresh Cloud Agent booted from a draft build of this branch (build bld-20260818-1d724271-cc8f-463b-9ddf-d625f657b91b, status SUCCEEDED).

Check Result
install.sh (SWI-Prolog + Bun + deps) Exit 0; SWI-Prolog 10.0.2, Bun 1.3.10 installed
bun install --frozen-lockfile idempotence "no changes" on re-run
bun run typecheck (full matrix, 15 projects) 0 errors
bun run build (all packages) Exit 0
bun run test:unit 1809 pass (see note below)
kibi sync on the real repo KB 900+ entities, 7729 relationships via the Prolog engine
kibi check (structural + contradiction rules) 0 violations
kibi doctor (fresh agent) All checks pass, SWI-Prolog detected
Fresh Cloud Agent from build bun 1.3.10 / node v22.14.0 / swipl 10.0.2; build + CLI + tests pass

Note on unit tests

The full test:unit orchestrator reported 3 failures, all environment artifacts rather than repo or environment-config defects (each passes in isolation / in CI):

  • kibi init > init --github scaffolds the documented report workflow — the Cloud Agent injects a ~/.gitconfig insteadOf rewrite that turns https://github.com/... into https://x-access-token:<token>@github.com/... (required for git push). The test's remote-URL parser doesn't expect the embedded token, so the badge isn't written. This does not affect real usage.
  • kibi migrate > reports missing config file... and kibi branch lifecycle > rejects cross-branch copying...beforeEach/afterEach timeouts under the full parallel orchestrator on a cold VM (SWI-Prolog subprocess cold-start). Both pass cleanly when run in isolation.

Notes

  • biome check reports pre-existing style errors on develop; it is not a CI gate in ci.yml, so it is left untouched (out of scope for environment setup).
Open in Web Open in Cursor 

cursoragent and others added 2 commits August 18, 2026 21:32
Adds a repo-managed Cursor Cloud Agent environment for the Kibi monorepo:
- .cursor/Dockerfile bakes SWI-Prolog (stable PPA), Node.js 24, and Bun 1.3.10
- .cursor/install.sh runs an idempotent 'bun install --frozen-lockfile'
- .cursor/environment.json wires the Dockerfile build + install phase

Co-authored-by: Piotr Franczyk <pfranczyk87@gmail.com>
…base

Use the default Cloud Agent base image plus an idempotent install script that
installs SWI-Prolog (stable PPA) and pinned Bun 1.3.10, then runs the workspace
'bun install'. This is the config validated by a draft build and a fresh agent.

Co-authored-by: Piotr Franczyk <pfranczyk87@gmail.com>
@Looted
Looted marked this pull request as ready for review August 18, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants