mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 04:40:45 +08:00
- 在 oclaw/ 下重新初始化 Git 仓库 - 补齐子仓库 .gitignore,避免提交本地运行态数据(_local、node_modules、logs 等) - 提交当前工程代码与配置 Made-with: Cursor
873 B
873 B
Prompt Style Guide
Goal
- All model-facing prompts must be Markdown templates under
oclaw/prompts/. - 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.