Skip to content

Latest commit

 

History

History
24 lines (20 loc) · 1.81 KB

lightcode4.md

File metadata and controls

24 lines (20 loc) · 1.81 KB

LightCode⁴ (my-harness) — Project Rules

Tech Stack & Dual Runtime

  • Language: TypeScript (strict mode, erasableSyntaxOnly — avoid enum and parameter properties).
  • Dual Runtime: Must pass cleanly on both Bun (bun run tests/run.ts) and Node.js 22+ (node tests/run.ts).
  • Zero-dependency core: Avoid unnecessary npm packages; use built-in bun:sqlite / node:sqlite, node:fs/promises, node:http, and playwright-core for the built-in browser.

Build & Test Commands

  • Unit & Integration Tests (Bun): bun run tests/run.ts
  • Unit & Integration Tests (Node): node tests/run.ts
  • Python SDK Tests: python3 sdk/python/tests/test_sdk.py
  • Dashboard JS Syntax Check: bun -e 'const fs=require("fs"); new Function(fs.readFileSync("src/ui/dashboard.html","utf8").match(/<script>([\s\S]*?)<\/script>/)[1]);'
  • Dev Web Dashboard: bun run src/cli.ts ui --workspace . --port 4310

Directory Structure

  • src/agent/ — Core agent loop (harness.ts), crash-resilient 4-layer memory (crash-memory.ts), sessions (session.ts), Mission Control (mission-control.ts), browser QA (browser.ts), artifacts (artifacts.ts), security audit (security-audit.ts), GitHub auth (github.ts), providers (providers/), and built-in tools (tools/).
  • src/ui/ — Local HTTP/SSE backend (server.ts) and single-file web dashboard (dashboard.html).
  • sdk/python/ — Zero-dependency Python SDK (lightcode4).
  • tests/run.ts — Full dual-runtime test suite.

Hard Constraints

  • Never commit secrets, API keys, harness.config.json, STATE.md, or .harness/ runtime artifacts.
  • Keep all security tooling strictly defensive (SAST, secret scanning, dependency hygiene, LLM guardrails).
  • Always run both Bun and Node.js test suites and verify UI changes live before committing.