One folder, one bounded contextLLM view

Bun

Possible, a medium change. A context is one workspace package plus a small contract package.

The files

Explorer
  • package.jsonworkspaces: contexts/* and contexts/*/contract
  • index.tsapi, worker, migrate
  • contexts.tsgeneratednot committed
  • gen.tsfinds the folders
  • boundaries.tsguards layers and contexts
  • context.yaml
  • package.json
  • register.ts
  • policies.yaml
  • flags.yaml

What the tools allow

QuestionAnswerTag
Tests inside, with SITyes: 37 passMEASURED
A planted failing testfailsMEASURED
Tests or docs in the Docker image0 foundMEASURED
Restart after an edit254 msMEASURED
Restart after a test editnoneMEASURED

Adding a context

a third context (real output, shortened)
$scripts/new-context.sh third
$
1 / 4

What changes in the template

ChangeCountTag
Files moved, consumer template42 of 409MEASURED
Root configs edited6MEASURED
Package files per context2MEASURED
New kernel and tool code1,693 linesMEASURED

What does not work cleanly

  • Two new contexts conflict in bun.lock, one hunk. bun install fixes it. MEASURED
  • merge=union on that file is unsafe: the frozen install then fails. MEASURED
  • No linter keeps IO out of the domain, so a 150-line checker does. MEASURED