Files
homeclaw/.smallclaw/templates/SELF.md
T
kimandClaude Sonnet 4.6 5608b83850 Refactor project layout and fix workspace/subagent paths
- Remove global workspace (workspace/) — all data migrated to .smallclaw/
- Move ppt/ skins & templates to .smallclaw/skills/presenter/ppt/
- Add .smallclaw/templates/ for user bootstrap files
- Move dental_images to .smallclaw/databases/, update 1,485 DB entries
- Fix subagent store paths to use SMALLCLAW_DATA_DIR instead of workspace.path
- Per-user Telegram bots: MultiUserTelegramManager, vault-stored tokens
- Fix Telegram token persistence (vault fallback, strip from config.json)
- Fix session migration: delete global originals even when skipping
- Delete unused root images, MD docs, tests/, smallclawworkspace/ artifacts
- Add meteorologist skill, counselor skill, presenter skill scaffold
- Strip workspace.path from config.json (was causing path confusion)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 15:21:21 +09:00

1.2 KiB

SELF.md — Technical Self-Knowledge

Stack

  • Runtime: Node.js + TypeScript → dist/ via npm run build
  • Gateway: Express+WS on http://127.0.0.1:18789
  • Model: Ollama (primary in config.json)

Key Source Files

server-v2.ts → main loop, system prompt, tool routing session.ts → in-memory + disk session history task-runner.ts → sliding-context multi-step engine config.ts → config loader, getConfig() singleton

System Prompt Per Turn

buildPersonalityContext() injection order by mode:

  • Autonomous: IDENTITY(600) → SOUL(1500) → USER(1000) → AGENTS(1500)
  • First turn: IDENTITY(600) → USER(1000) → AGENTS(1500) (no SOUL)
  • Normal chat: IDENTITY(600) → USER(1000) → AGENTS(1500) → SOUL(1500, tool cats only) → [TOOLS] → [SELF](2000, debug only) All truncated to char limits.

Debugging

  1. gateway.err.log → first place for errors
  2. gateway.log → stdout with [Tag] prefixes
  3. .smallclaw/tasks/<id>.json → failed task records

Rules

  • Edit src/, never dist/ — rebuild with npm run build
  • File tools locked to workspace; use read_source for src/
  • Context is ~8K tokens total — keep files concise