mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 03:23:23 +08:00
- Rename platform/ to svc/ to avoid shadowing stdlib platform. - Replace from oclaw.* with from svc/runtime/interfaces; update -m CLI paths. - tests/conftest: prepend repo root to sys.path (no parent-folder package name). - CI: paths and offline_eval script under repo root. - Ops scripts: PYTHONPATH must be repo root for python -m runtime.* (fixes gateway/WhatsApp sidecar startup). - Fix default oclaw.json path in tabular/file attachment limits; stabilize attachment test config. Co-authored-by: Cursor <cursoragent@cursor.com>
1,006 B
1,006 B
Prompt Style Guide
Goal
- System/builtin model-facing prompt templates live under
runtime/workspaces/_system/; role-specific copy lives underruntime/workspaces/<role>/(e.g.ROLE_SYSTEM.md). Load viaruntime.prompt_templates. - Business code must inject variables only; no long inline prompt strings.
Template Contract
- File format:
.mdwith frontmatter. - Required frontmatter keys:
title,summary,read_when. - Variables use
{{var_name}}. - Missing variables must fail in strict mode.
Required Section Order
- Identity and objective
- Input constraints
- Execution rules
- Output format
- Safety and prohibitions
- Optional runtime context blocks
Rules
- Use imperative instructions: must / must not / only when.
- Keep deterministic section ordering for cache stability.
- Prefer machine-parseable blocks for injected context.
- Do not embed raw JSON protocol examples unless needed.
- Keep bilingual copies as separate template files when wording diverges.