Multi-topic batch. The big-ticket item is the skills audit; the rest are smaller patches that compounded during the audit work. ## Skills audit (rules→recipes split) Vendored all 26 skills from /home/samkintop/opt/skills/ into data/skills/ (the boocode-repo-local skill library — see docker-compose change below). Audited via 5 parallel Claude Code agent-teams running the mgechev/skills-best-practices 4-step protocol (Discovery → Logic → Edge Case → self-Architecture-Refinement) per skill, ~2 min wall-clock vs the ~3.7-hour serial estimate. Result: 14 skills surviving (renamed to gerund form, frontmatter matched), 11 deleted (duplicates, BooCode-irrelevant patterns, Claude-already-does- natively), 1 migrated to BOOCHAT.md/BOOCODER.md as an always-true rule (verification-before-completion). Each surviving skill had its description refined to fix specific trigger gaps surfaced by the protocol — 4 real-bug findings landed (dead refs, stale tags, broken sub-file references in the original vendored content). Audit decisions documented in openspec/changes/v1.13.12-skills-audit/ audit-notes.md. Convention codified in BOOCHAT.md/BOOCODER.md "rules vs recipes" sections — future workflow rules go to those files (100% present), recipes stay in data/skills/ (~6% invoke rate in multi-turn per the Codeminer42 measurement). ## Token tracking + stale-stream banner fix (same root cause) ws-frames.ts IsoTimestamp was z.string().min(1) but postgres returns timestamp columns as JS Date objects. Every message_complete / session_updated / chat_updated frame was failing the v1.13.11 Zod gate and being silently dropped. Symptoms: token tracking blank in the UI (no usage frames landed); the 60s no-token-activity timer tripped the stale-stream banner because the frontend's local message state never saw status='streaming' flip to 'complete'. Fix: z.preprocess(v => v instanceof Date ? v.toISOString() : v, z.string().min(1)) applied to the IsoTimestamp primitive. Centralized, no publisher changes, works identically server + web (the parity test still passes). ## Codecontext .codecontextignore auto-install services/codecontext_client.ts now copies the codecontext/.codecontextignore.template into any project's root on the first call to that project if no .codecontextignore exists. One file written per project, idempotent (in-memory Set guard + access-check), silent fallback on read-only project. Stops the upstream empty-source- file parser crash on foreign projects' node_modules — previously required manually copying the template per project. ## Tool-call budget cap 30 → 50 services/inference/budget.ts: BUDGET_READ_ONLY and BUDGET_NO_AGENT bumped to 50 (from 30). BUDGET_NON_READ_ONLY stays at 10 (no write tools landed yet). Real recon sessions were hitting 30 with ~3 turns wasted on codecontext parse failures; legitimate need was ~27, and Architect-class system overviews want deeper recon. Headroom of 20 absorbs failure-retry turns without changing the safety floor — the doom-loop guard (3 identical calls → abort) catches the actual failure mode this cap was guarding against. v1.14 (Phase C outer agent loop) will supersede this via per-agent agent.steps. Throwaway-ish patch but unblocks deeper recon today. ## UI cleanups - ChatPane queued-message dropdown removed. Each queued message now has three buttons: edit (pop back into ChatInput via sendToChat event), force-send (was the dropdown's only useful action), and cancel. Default behavior (send when streaming completes) needs no UI — it's the implicit do-nothing path. - ChatThroughput removed from desktop tab strip (ChatTabBar.tsx). Mobile tab switcher still shows it. ## Plumbing - .gitignore: data/* + !data/AGENTS.md + !data/skills/ negation patterns so the vendored skill library + agent registry become git-tracked while session DB state stays out. - docker-compose.yml: removed /opt/skills:/data/skills override mount. Skills now live in the boocode repo at data/skills/, auditable per-batch. The host-level /opt/skills/ is preserved untouched for any other tools that read from it. - .codecontextignore at repo root: auto-installed when codecontext was first called against /opt/boocode itself; matches the template. - CLAUDE.md: updated to document the v1.13.11 publishFrame wrapper + message_parts table + tool_cost_stats view + DB-integration test pattern + host-side smoke endpoint quirk. (Pre-existing in working tree before this batch; shipped here for completeness.) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
101 lines
3.1 KiB
YAML
101 lines
3.1 KiB
YAML
services:
|
|
boocode:
|
|
build: .
|
|
container_name: boocode
|
|
restart: unless-stopped
|
|
ports:
|
|
- "100.114.205.53:9500:3000"
|
|
env_file: .env
|
|
environment:
|
|
CODECONTEXT_URL: http://codecontext:8080
|
|
CONTAINER_GUIDANCE_FILE: /app/BOOCHAT.md
|
|
DATABASE_URL: postgres://boocode:${POSTGRES_PASSWORD}@boocode_db:5432/boocode
|
|
volumes:
|
|
- /opt:/opt
|
|
- /opt/projects:/opt/projects:rw
|
|
- ./secrets/boocode_gitea:/root/.ssh/id_ed25519:ro
|
|
- ./data:/data
|
|
# v1.13.12: override-mount /opt/skills:/data/skills removed. Skill
|
|
# library now lives in the boocode repo at data/skills/, audited
|
|
# per-batch. The host-level /opt/skills is preserved for other tools
|
|
# (Claude Code, etc.) but boocode reads only from its repo-local
|
|
# data/skills/ tree.
|
|
# v1.12: bind-mount BOOCHAT.md so host-side edits land in the container
|
|
# without a rebuild. system-prompt.ts mtime-watch picks up changes on the
|
|
# next chat turn. Read-only — the chat surface must never write here.
|
|
- /opt/boocode/BOOCHAT.md:/app/BOOCHAT.md:ro
|
|
depends_on:
|
|
- boocode_db
|
|
networks:
|
|
- boocode_net
|
|
|
|
booterm:
|
|
build:
|
|
context: .
|
|
dockerfile: apps/booterm/Dockerfile
|
|
container_name: booterm
|
|
restart: unless-stopped
|
|
ports:
|
|
- "100.114.205.53:9501:3000"
|
|
env_file: .env
|
|
environment:
|
|
NODE_ENV: production
|
|
PORT: 3000
|
|
DATABASE_URL: postgres://boocode:${POSTGRES_PASSWORD}@boocode_db:5432/boocode
|
|
volumes:
|
|
- /opt:/opt:rw
|
|
- /home/samkintop:/home/samkintop:rw
|
|
depends_on:
|
|
- boocode_db
|
|
networks:
|
|
- boocode_net
|
|
|
|
boocode_db:
|
|
image: postgres:16-alpine
|
|
container_name: boocode_db
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: boocode
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
POSTGRES_DB: boocode
|
|
ports:
|
|
- "127.0.0.1:5500:5432"
|
|
volumes:
|
|
- boocode_pgdata:/var/lib/postgresql/data
|
|
networks:
|
|
- boocode_net
|
|
|
|
# v1.12 Track B: codecontext sidecar. Stdio MCP server wrapped by a small
|
|
# HTTP shim (see ./codecontext/). No host port — reached from boocode at
|
|
# http://codecontext:8080 over the boocode_net bridge.
|
|
#
|
|
# Mounts /opt:/opt:ro (not just /opt/projects:ro): BooCode projects live
|
|
# at /opt/<slug> on the host, not exclusively under /opt/projects. The
|
|
# mount must cover anywhere a project.path could resolve to. Read-only
|
|
# because codecontext only analyzes — never writes. The model can't
|
|
# arbitrarily set target_dir to a sensitive subtree because the B.2
|
|
# wrappers validate target_dir against project.path before calling the
|
|
# shim, and the shim isn't reachable from outside boocode_net.
|
|
codecontext:
|
|
build:
|
|
context: ./codecontext
|
|
container_name: boocode_codecontext
|
|
restart: unless-stopped
|
|
networks:
|
|
- boocode_net
|
|
volumes:
|
|
- /opt:/opt:ro
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -qO- http://localhost:8080/health || exit 1"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 30s
|
|
|
|
volumes:
|
|
boocode_pgdata:
|
|
|
|
networks:
|
|
boocode_net:
|
|
driver: bridge
|