{"_id":"@borgesius/openclaw-style-guide","name":"@borgesius/openclaw-style-guide","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@borgesius/openclaw-style-guide","version":"0.1.0","description":"OpenClaw context-engine plugin that injects writing style rules (Chicago, AP, MLA) into agent system prompts","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","prepublishOnly":"npm run build","test":"npx ts-node src/test.ts"},"keywords":["openclaw","openclaw-plugin","context-engine","style-guide","writing","prose","chicago-style","ap-style","mla-style","grammar","llm","ai-assistant","system-prompt"],"author":{"name":"borgesius"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/borgesius/openclaw-style-guide.git"},"homepage":"https://github.com/borgesius/openclaw-style-guide#readme","bugs":{"url":"https://github.com/borgesius/openclaw-style-guide/issues"},"engines":{"node":">=18.0.0"},"devDependencies":{"typescript":"^5.0.0","ts-node":"^10.0.0"},"gitHead":"0bca9ee84bccce947f5de4220df2727f1555ad08","_id":"@borgesius/openclaw-style-guide@0.1.0","_nodeVersion":"25.8.0","_npmVersion":"11.11.0","dist":{"integrity":"sha512-AzRblPNWaQXSXicEdnKE6zD9iipKTa1neJvdP438AKTna7WBrMJa3xhDJq+HOfSJSpdE2ZgFWGrhVAbikBwBXA==","shasum":"b63ef4d47472d9c75342bed654e9911173401d2c","tarball":"https://registry.npmjs.org/@borgesius/openclaw-style-guide/-/openclaw-style-guide-0.1.0.tgz","fileCount":8,"unpackedSize":13099,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFebDMxjrK0OGEZMcfbxYLZISGrDB2SDl9+lRuVa8A3dAiB6+7O1W4asnuvjSLQTchQBui4Ss7H9FCUIO8Zz8aD4jw=="}]},"_npmUser":{"name":"borgesius","email":"danadzik@gmail.com"},"directories":{},"maintainers":[{"name":"borgesius","email":"danadzik@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/openclaw-style-guide_0.1.0_1773891146708_0.6881443225163966"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-19T03:32:26.612Z","0.1.0":"2026-03-19T03:32:26.839Z","modified":"2026-03-19T03:32:27.042Z"},"maintainers":[{"name":"borgesius","email":"danadzik@gmail.com"}],"description":"OpenClaw context-engine plugin that injects writing style rules (Chicago, AP, MLA) into agent system prompts","homepage":"https://github.com/borgesius/openclaw-style-guide#readme","keywords":["openclaw","openclaw-plugin","context-engine","style-guide","writing","prose","chicago-style","ap-style","mla-style","grammar","llm","ai-assistant","system-prompt"],"repository":{"type":"git","url":"git+https://github.com/borgesius/openclaw-style-guide.git"},"author":{"name":"borgesius"},"bugs":{"url":"https://github.com/borgesius/openclaw-style-guide/issues"},"license":"MIT","readme":"# @borgesius/openclaw-style-guide\n\n[![npm version](https://img.shields.io/npm/v/@borgesius/openclaw-style-guide.svg)](https://www.npmjs.com/package/@borgesius/openclaw-style-guide)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\nAn OpenClaw context-engine plugin that injects writing style rules into every agent system prompt. Enforce consistent prose—Chicago, AP, MLA, or your own custom style—across all your AI outputs.\n\n## Why?\n\nLLMs default to inconsistent, often corporate-sounding prose. They overuse em dashes, hedge constantly, and throw in phrases like \"Certainly!\" and \"Great question!\" that make your assistant sound like a chatbot.\n\nThis plugin fixes that by injecting clear, forceful style rules into every system prompt. Your agents write better because they have explicit rules to follow.\n\n## Installation\n\n```bash\nopenclaw plugins install @borgesius/openclaw-style-guide\n```\n\nOr with npm:\n\n```bash\nnpm install @borgesius/openclaw-style-guide\n```\n\nThen add to your `openclaw.json`:\n\n```json\n{\n  \"plugins\": {\n    \"entries\": {\n      \"@borgesius/openclaw-style-guide\": {}\n    }\n  }\n}\n```\n\n## Configuration\n\nConfigure via `plugins.entries.@borgesius/openclaw-style-guide.config`:\n\n```json\n{\n  \"plugins\": {\n    \"entries\": {\n      \"@borgesius/openclaw-style-guide\": {\n        \"config\": {\n          \"preset\": \"chicago\"\n        }\n      }\n    }\n  }\n}\n```\n\n### Presets\n\n| Preset | Description |\n|--------|-------------|\n| `chicago` | **Default.** Chicago Manual of Style. Oxford comma, em dashes without spaces (used sparingly), spell out numbers 1–100. |\n| `ap` | AP Style. No Oxford comma, em dashes with spaces, spell out 1–9 only. |\n| `mla` | MLA Academic Style. Oxford comma, academic conventions. |\n| `custom` | Your own rules via the `rules` field. |\n\n### Custom Rules\n\nDefine your own style guide:\n\n```json\n{\n  \"plugins\": {\n    \"entries\": {\n      \"@borgesius/openclaw-style-guide\": {\n        \"config\": {\n          \"preset\": \"custom\",\n          \"rules\": \"Always use active voice. Keep sentences under 25 words. No jargon. Oxford comma required. Never start a sentence with 'I'.\"\n        }\n      }\n    }\n  }\n}\n```\n\n## What Gets Injected\n\nWhen using `chicago` (the default), the plugin adds this to every system prompt:\n\n```\n## Writing Style: Chicago Manual of Style\n\nYou follow Chicago Manual of Style. These rules are non-negotiable:\n\n**Em dashes:** No spaces around em dashes—like this, not like — this.\nUse em dashes sparingly. Most of the time a colon, semicolon, or period\nis the better choice.\n\n**Oxford comma:** Always use the serial (Oxford) comma in lists of three\nor more items: red, white, and blue.\n\n**Quotation marks:** Double quotes for primary quotations. Single quotes\nfor quotations within quotations.\n\n**Punctuation placement:** Periods and commas go inside quotation marks.\nColons and semicolons go outside.\n\n**Numbers:** Spell out one through one hundred. Use numerals for 101 and\nabove. Spell out any number that begins a sentence.\n\n**Voice:** No passive voice abuse. Prefer active constructions.\n\n**Filler phrases to avoid:** Never write \"certainly!\", \"great question!\",\n\"I would be happy to\", \"absolutely!\", or similar hollow corporate filler.\nJust answer directly.\n```\n\n## Token Cost\n\nIt's like 200–300 tokens per prompt. Basically nothing. Your conversations use thousands of tokens anyway, so this is <1% overhead for much better writing.\n\nHow well the model actually follows the rules depends on the model. Bigger models tend to be better at it.\n\n## How It Works\n\nThis is a `context-engine` plugin. It hooks into OpenClaw's `before_prompt_build` event and appends the style rules to the system context. The rules appear in every agent's system prompt, ensuring consistent style across all conversations.\n\n## TypeScript\n\nThe package exports types if you want to use the style blocks programmatically:\n\n```typescript\nimport { getStyleBlock, StyleGuideConfig, StylePreset } from '@borgesius/openclaw-style-guide';\n\nconst config: StyleGuideConfig = { preset: 'chicago' };\nconst styleBlock = getStyleBlock(config);\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-111f28a07c0244a3bec9f28801fd25ac"}