@useavalon/caelence-agent 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/README.md +201 -0
  2. package/bin/harness.ts +10 -0
  3. package/package.json +75 -0
  4. package/skills/copy-editor/SKILL.md +74 -0
  5. package/skills/copy-editor/references/anti-slop.md +62 -0
  6. package/skills/copy-editor/references/ui-states.md +46 -0
  7. package/skills/copy-editor/scripts/lint-copy.py +78 -0
  8. package/skills/copy-harry-dry/SKILL.md +120 -0
  9. package/skills/copy-rmbc/SKILL.md +97 -0
  10. package/skills/copywriting/SKILL.md +73 -0
  11. package/skills/impeccable/SKILL.md +133 -0
  12. package/skills/impeccable/references/visual-slop.md +36 -0
  13. package/src/cli/main.test.ts +36 -0
  14. package/src/cli/main.ts +384 -0
  15. package/src/cli/media-models.ts +82 -0
  16. package/src/cli/models.ts +43 -0
  17. package/src/cli/openrouter-live.test.ts +35 -0
  18. package/src/cli/openrouter-live.ts +72 -0
  19. package/src/cli/openrouter-modality.test.ts +25 -0
  20. package/src/cli/openrouter-modality.ts +83 -0
  21. package/src/cli/picker.test.ts +53 -0
  22. package/src/cli/picker.ts +48 -0
  23. package/src/cli/plain-text.ts +15 -0
  24. package/src/cli/slash-dispatch.test.ts +213 -0
  25. package/src/cli/slash-dispatch.ts +298 -0
  26. package/src/cli/slash.test.ts +113 -0
  27. package/src/cli/slash.ts +119 -0
  28. package/src/cli/theme.test.ts +10 -0
  29. package/src/cli/theme.ts +44 -0
  30. package/src/cli/tui-layout.test.ts +33 -0
  31. package/src/cli/tui-layout.ts +33 -0
  32. package/src/cli/tui-screen.test.ts +33 -0
  33. package/src/cli/tui-screen.ts +13 -0
  34. package/src/cli/tui.tsx +735 -0
  35. package/src/config.ts +86 -0
  36. package/src/core/approval.test.ts +60 -0
  37. package/src/core/approval.ts +83 -0
  38. package/src/core/auto-router.test.ts +31 -0
  39. package/src/core/auto-router.ts +66 -0
  40. package/src/core/errors.ts +67 -0
  41. package/src/core/events.ts +85 -0
  42. package/src/core/hooks.test.ts +66 -0
  43. package/src/core/hooks.ts +94 -0
  44. package/src/core/ids.ts +6 -0
  45. package/src/core/instructions.test.ts +49 -0
  46. package/src/core/instructions.ts +44 -0
  47. package/src/core/logger.ts +45 -0
  48. package/src/core/mcp.ts +191 -0
  49. package/src/core/mode.test.ts +63 -0
  50. package/src/core/mode.ts +60 -0
  51. package/src/core/run-turn.test.ts +339 -0
  52. package/src/core/run-turn.ts +487 -0
  53. package/src/core/session.test.ts +203 -0
  54. package/src/core/session.ts +349 -0
  55. package/src/core/stdio-mcp.ts +143 -0
  56. package/src/core/strands.ts +262 -0
  57. package/src/core/usage.test.ts +69 -0
  58. package/src/core/usage.ts +171 -0
  59. package/src/desktop/bridge.test.ts +331 -0
  60. package/src/desktop/bridge.ts +729 -0
  61. package/src/desktop/open-local.test.ts +40 -0
  62. package/src/desktop/open-local.ts +52 -0
  63. package/src/desktop/preview-cache.test.ts +36 -0
  64. package/src/desktop/preview-cache.ts +63 -0
  65. package/src/desktop/secrets.test.ts +44 -0
  66. package/src/desktop/secrets.ts +60 -0
  67. package/src/evals/runner.test.ts +43 -0
  68. package/src/evals/runner.ts +225 -0
  69. package/src/index.ts +132 -0
  70. package/src/init.test.ts +54 -0
  71. package/src/init.ts +117 -0
  72. package/src/integrations/catalog-data.json +424 -0
  73. package/src/integrations/catalog.ts +81 -0
  74. package/src/integrations/connect.ts +231 -0
  75. package/src/integrations/integrations.test.ts +329 -0
  76. package/src/integrations/marks/airtable.svg +1 -0
  77. package/src/integrations/marks/algolia-mcp.svg +1 -0
  78. package/src/integrations/marks/canva.jpg +0 -0
  79. package/src/integrations/marks/cloudflare-mcp.svg +1 -0
  80. package/src/integrations/marks/contentful-mcp.svg +1 -0
  81. package/src/integrations/marks/craft.png +0 -0
  82. package/src/integrations/marks/dinero.png +0 -0
  83. package/src/integrations/marks/figma.svg +1 -0
  84. package/src/integrations/marks/gitlab.svg +1 -0
  85. package/src/integrations/marks/google-calendar.svg +1 -0
  86. package/src/integrations/marks/google-docs.svg +1 -0
  87. package/src/integrations/marks/google-drive.svg +1 -0
  88. package/src/integrations/marks/google-gmail.svg +1 -0
  89. package/src/integrations/marks/google-sheets.svg +1 -0
  90. package/src/integrations/marks/google-slides.svg +1 -0
  91. package/src/integrations/marks/granola.png +0 -0
  92. package/src/integrations/marks/jira.svg +1 -0
  93. package/src/integrations/marks/linear.svg +1 -0
  94. package/src/integrations/marks/microsoft-365.svg +7 -0
  95. package/src/integrations/marks/miro.svg +1 -0
  96. package/src/integrations/marks/mixpanel-mcp.svg +1 -0
  97. package/src/integrations/marks/monday.png +0 -0
  98. package/src/integrations/marks/mux-mcp.png +0 -0
  99. package/src/integrations/marks/neon-mcp.svg +1 -0
  100. package/src/integrations/marks/notion.svg +1 -0
  101. package/src/integrations/marks/paddle-mcp.svg +1 -0
  102. package/src/integrations/marks/posthog-mcp.svg +1 -0
  103. package/src/integrations/marks/prismic-mcp.svg +1 -0
  104. package/src/integrations/marks/replicate-mcp.svg +1 -0
  105. package/src/integrations/marks/resend-mcp.svg +1 -0
  106. package/src/integrations/marks/sanity-mcp.svg +1 -0
  107. package/src/integrations/marks/sceneplane.png +0 -0
  108. package/src/integrations/marks/sentry-mcp.svg +1 -0
  109. package/src/integrations/marks/stripe-mcp.svg +1 -0
  110. package/src/integrations/marks/supabase-mcp.svg +1 -0
  111. package/src/integrations/marks/upstash-mcp.svg +1 -0
  112. package/src/integrations/marks/vercel.svg +1 -0
  113. package/src/integrations/marks/webflow.svg +1 -0
  114. package/src/integrations/mcp-oauth.test.ts +39 -0
  115. package/src/integrations/mcp-oauth.ts +330 -0
  116. package/src/integrations/oauth-clients.test.ts +77 -0
  117. package/src/integrations/oauth-clients.ts +127 -0
  118. package/src/integrations/oauth.ts +145 -0
  119. package/src/integrations/remote-mcp.ts +307 -0
  120. package/src/integrations/store.ts +149 -0
  121. package/src/media/openrouter-generate.test.ts +80 -0
  122. package/src/media/openrouter-generate.ts +178 -0
  123. package/src/media/prefs.ts +54 -0
  124. package/src/observability/categories.ts +41 -0
  125. package/src/observability/create.test.ts +56 -0
  126. package/src/observability/create.ts +45 -0
  127. package/src/observability/experiments.ts +113 -0
  128. package/src/observability/fake.ts +191 -0
  129. package/src/observability/index.ts +57 -0
  130. package/src/observability/judges.ts +91 -0
  131. package/src/observability/langfuse.ts +275 -0
  132. package/src/observability/noop.ts +33 -0
  133. package/src/observability/observability.test.ts +113 -0
  134. package/src/observability/prompts.ts +98 -0
  135. package/src/observability/regression-items.ts +158 -0
  136. package/src/observability/sanitize.test.ts +26 -0
  137. package/src/observability/sanitize.ts +57 -0
  138. package/src/observability/types.ts +122 -0
  139. package/src/observability/version.ts +41 -0
  140. package/src/product.ts +2 -0
  141. package/src/runtime.test.ts +98 -0
  142. package/src/runtime.ts +438 -0
  143. package/src/skills/author-skill.ts +49 -0
  144. package/src/skills/create-skill.test.ts +108 -0
  145. package/src/skills/create-skill.ts +70 -0
  146. package/src/skills/loader.test.ts +122 -0
  147. package/src/skills/loader.ts +162 -0
  148. package/src/skills/registry.test.ts +190 -0
  149. package/src/skills/registry.ts +402 -0
  150. package/src/skills/skill-command.ts +53 -0
  151. package/src/skills/user-dir.ts +8 -0
  152. package/src/tools/git.test.ts +71 -0
  153. package/src/tools/git.ts +126 -0
  154. package/src/tools/local.ts +258 -0
  155. package/src/tools/paths.test.ts +24 -0
  156. package/src/tools/paths.ts +39 -0
  157. package/src/tools/read-skill.ts +43 -0
  158. package/src/tools/subagent.test.ts +77 -0
  159. package/src/tools/subagent.ts +74 -0
  160. package/src/tools/todo.test.ts +25 -0
  161. package/src/tools/todo.ts +70 -0
package/README.md ADDED
@@ -0,0 +1,201 @@
1
+ # @useavalon/caelence-agent
2
+
3
+ Caelence agent: a Strands turn loop, local filesystem tools, Cursor-style skills, eval suites, and a themable terminal UI. Hosts add their own skills, sandboxes, and product rules. This package does not import them.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ bun add github:useAvalon/caelence-agent
9
+ # or, once published to npm
10
+ bun add @useavalon/caelence-agent
11
+ ```
12
+
13
+ Global CLI:
14
+
15
+ ```bash
16
+ bun add -g github:useAvalon/caelence-agent
17
+ harness
18
+ ```
19
+
20
+ ## Host project
21
+
22
+ ```bash
23
+ bunx harness init
24
+ ```
25
+
26
+ Writes `harness.config.ts`, `AGENTS.md`, a sample skill, and a smoke eval. Then:
27
+
28
+ ```bash
29
+ export OPENROUTER_API_KEY=…
30
+ harness
31
+ ```
32
+
33
+ | File | Role |
34
+ |------|------|
35
+ | `harness.config.ts` | Name, model, mode, skill/eval dirs, theme, exec approval, hooks |
36
+ | `skills/**/SKILL.md` | Cursor-style skills (YAML `name` / `description`) |
37
+ | `evals/<suite>/eval.ts` | Eval suites (`export default { name, steps }`) |
38
+ | `AGENTS.md` | Project instructions (stacked under user instructions) |
39
+ | `~/.harness/AGENTS.md` | User instructions for every host (`HARNESS_USER_INSTRUCTIONS` overrides the path) |
40
+ | `.harness/sessions/` | JSON session logs (gitignored) |
41
+
42
+ ```ts
43
+ import type { HarnessConfig } from "@useavalon/caelence-agent";
44
+
45
+ export default {
46
+ name: "my-agent",
47
+ model: "~x-ai/grok-latest",
48
+ instructionsFile: "AGENTS.md",
49
+ skillsDir: "skills",
50
+ evalsDir: "evals",
51
+ theme: "caelence",
52
+ mode: "agent",
53
+ tools: { exec: { approval: "prompt" } },
54
+ mcp: [],
55
+ // hooks: [{ event: "pre_tool", command: "jq -e .toolName" }],
56
+ } satisfies HarnessConfig;
57
+ ```
58
+
59
+ Env: `OPENROUTER_API_KEY`, optional `OPENROUTER_MODEL`, `OPENROUTER_BASE_URL`.
60
+
61
+ Optional Langfuse tracing (server/CLI only — never set these in a browser):
62
+
63
+ ```
64
+ LANGFUSE_SECRET_KEY=
65
+ LANGFUSE_PUBLIC_KEY=
66
+ LANGFUSE_BASE_URL=
67
+ CAELENCE_AGENT_VERSION= # optional; defaults to the package version
68
+ ```
69
+
70
+ When both Langfuse keys are set, each chat turn, tool call, subagent, and eval run is traced. With keys unset the observer is a no-op. Set `observability: { enabled: false }` in `harness.config.ts` to force it off.
71
+
72
+ Set `LANGFUSE_QUALITY_EVAL=1` to run the optional LLM-as-judge after a turn (OpenRouter spend). Leave it unset otherwise.
73
+
74
+ ```
75
+ harness experiment Run the local website-generation-regression dataset
76
+ ```
77
+
78
+ Documented quality gates live in `DEFAULT_GATES` (`build_success >= 0.98`, and later instruction/visual thresholds). They are config, not CI fail rules, until baselines exist. Full Agent_Layer + Daytona runs stay opt-in / nightly.
79
+
80
+ ## Commands
81
+
82
+ ```
83
+ harness Fullscreen terminal UI
84
+ harness --mode plan Start in plan mode
85
+ harness chat -m "…" One-shot turn (non-TTY denies exec)
86
+ harness eval [name] Run or list eval suites
87
+ harness experiment Run the local regression dataset
88
+ harness init Scaffold host files
89
+ harness desktop Open the Tauri app window
90
+ ```
91
+
92
+ Type `/` in the terminal for a command list (tab completes, arrows move). `--help` as a chat line is treated as `/help` so it does not go to the model.
93
+
94
+ `/resume` and `/model` open a list. Tab or arrows move, enter chooses. Sessions show their title, not the file id. `/resume billing` also matches a title; `/resume 2` is the second row.
95
+
96
+ `/skills` prints names only.
97
+
98
+ Install from [skills.sh](https://skills.sh) into the harness user store (`~/.harness/skills`, or `HARNESS_USER_SKILLS`). That does not write into the repo:
99
+
100
+ ```
101
+ /skill find
102
+ /skill add copywriting
103
+ /skill add impeccable
104
+ /skill add anthropics/skills@frontend-design
105
+ /skill remove copywriting
106
+ ```
107
+
108
+ `/skill add --project <name>` writes into the host `skillsDir` instead. `/skill new <name> <what it should do>` still authors a project skill from a brief.
109
+
110
+ Skills are portable Agent Skill files (`SKILL.md` + YAML `name` / `description`). Load order: user (`~/.harness/skills`), then host (host wins). The package catalog is not loaded until you add a skill. The harness also reads `skills/`, `.cursor/skills`, and `.claude/skills` when those folders exist.
111
+
112
+ `harness` (no args) is a fullscreen terminal UI: alternate screen, sticky composer, session rail when the terminal is wide. Same idea as Claude Code. It is not a browser tab.
113
+
114
+ `/settings` shows whether an OpenRouter key is stored. `/settings key <token>` writes it to `~/.harness`. `/resume` picks a session by title.
115
+
116
+ `harness desktop` is the optional OS window. Same runtime. Rust (`rustup`) and bun are required.
117
+
118
+ ```
119
+ harness
120
+ harness desktop
121
+ ```
122
+
123
+ ## Modes
124
+
125
+ | Mode | Tools |
126
+ |------|--------|
127
+ | `ask` | `read_file`, `glob`, `grep`, `read_skill`, `git_status`, `git_diff`, `git_log` |
128
+ | `plan` | ask plus `todo_write` |
129
+ | `agent` | all tools, including writes, `exec`, `git_commit`, and `task` |
130
+
131
+ Switch in the TUI with `/mode ask`, `/mode plan`, or `/mode agent`. The header shows the current mode. Token counts (and USD only when the provider reports a cost) appear there after a turn.
132
+
133
+ ## Git
134
+
135
+ Prefer `git_status`, `git_diff`, and `git_log` over `exec`. `git_commit` needs approval, commits listed paths or already-staged files, and does not push. Paths stay under the project root.
136
+
137
+ `exec` and `git_commit` are gated. Default policy is `prompt` (y / n / always this session). `auto` still denies destructive commands. Local exec is the host, not a sandbox.
138
+
139
+ ## Hooks
140
+
141
+ Optional `hooks` in `harness.config.ts`. Each hook is a shell command. JSON on stdin. `pre_tool` with a nonzero exit denies the call (stderr is the reason). Spawn failure fails open.
142
+
143
+ ```
144
+ session_start After the runtime starts
145
+ pre_tool Before a tool runs. Nonzero exit denies
146
+ post_tool After a tool finishes
147
+ ```
148
+
149
+ User and project instruction files stack. Project `AGENTS.md` does not replace `~/.harness/AGENTS.md`.
150
+
151
+ ## Subagents
152
+
153
+ The parent agent has a `task` tool. It runs a nested turn with the same local tools except `task` (no recursive spawn). Optional `skills` injects those skill bodies into the subagent. Nested sessions stay in memory and do not appear in `/resume`.
154
+
155
+ Use it for one copy-pipeline step, isolated research, or a bounded edit. Not for a one-line question.
156
+
157
+ ## Optional catalog skills
158
+
159
+ The package ships a generic writing pipeline and a visual-QA skill. They are not loaded until you add them:
160
+
161
+ - `/skill add copywriting` — router plus `copy-rmbc`, `copy-harry-dry`, `copy-editor`
162
+ - `/skill add copy-editor` — that step only, including `references/anti-slop.md`
163
+ - `/skill add impeccable` — visual QA (critique / polish / audit). Honor the host `design.md`. Not copy.
164
+
165
+ `/skill remove copywriting` drops the writing pack. Host `skills/` of the same name still win. Read loaded skills with `read_skill`. Invented metrics and testimonials stay illegal.
166
+
167
+ A host can add its own skills in `skills/`, `.cursor/skills`, or `.claude/skills`. Those are not shipped here.
168
+
169
+ ## Library
170
+
171
+ ```ts
172
+ import { createHarness, loadSkills, runEvalSuite } from "@useavalon/caelence-agent";
173
+ ```
174
+
175
+ Agent events use these kinds: `text_delta`, `tool_call_*`, `approval_request`, `session_meta`, `usage`, `todos`, `error`, `completion`.
176
+
177
+ ## Publish
178
+
179
+ The package ships TypeScript source for Bun. CI on `main` and pull requests runs Biome, `tsc --noEmit`, and `bun run test`.
180
+
181
+ Publishing uses [npm trusted publishing](https://docs.npmjs.com/trusted-publishers/), not a GitHub `NPM_TOKEN` secret. Classic npm tokens are revoked. After the first local publish (`npm login`, then `npm publish --access public`):
182
+
183
+ 1. Open the package on npmjs.com → Settings → Trusted publishing
184
+ 2. Add GitHub Actions for `useAvalon` / `caelence-agent` with workflow `release.yml` (allow `npm publish`)
185
+ 3. Add a second publisher for `canary.yml`
186
+ 4. Optionally set publishing access to require 2FA and disallow tokens
187
+
188
+ Until the package exists on the registry, canary is a no-op. Release still dry-runs without a publisher.
189
+
190
+ | Workflow | When |
191
+ |------|--------|
192
+ | `CI` | Push or PR to `main` |
193
+ | `Canary Release` | Push to `main` that touches `src/`, `bin/`, or `skills/` |
194
+ | `Release` | Manual. Channel: stable, beta, or rc. Default is dry-run |
195
+
196
+ ```bash
197
+ bun run lint
198
+ bun run typecheck
199
+ bun run test
200
+ bun run check:exports
201
+ ```
package/bin/harness.ts ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env bun
2
+ import { main } from "../src/cli/main.ts";
3
+
4
+ main().then(
5
+ (code) => process.exit(code),
6
+ (err) => {
7
+ process.stderr.write(`${err instanceof Error ? err.message : String(err)}\n`);
8
+ process.exit(1);
9
+ },
10
+ );
package/package.json ADDED
@@ -0,0 +1,75 @@
1
+ {
2
+ "name": "@useavalon/caelence-agent",
3
+ "version": "0.1.0",
4
+ "description": "Caelence agent: Strands turn loop, local tools, skills, evals, and a themable terminal UI.",
5
+ "type": "module",
6
+ "license": "UNLICENSED",
7
+ "author": "useAvalon",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/useAvalon/caelence-agent.git"
11
+ },
12
+ "homepage": "https://github.com/useAvalon/caelence-agent#readme",
13
+ "bugs": {
14
+ "url": "https://github.com/useAvalon/caelence-agent/issues"
15
+ },
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "engines": {
20
+ "bun": ">=1.2.0"
21
+ },
22
+ "bin": {
23
+ "harness": "./bin/harness.ts",
24
+ "caelence-agent": "./bin/harness.ts"
25
+ },
26
+ "exports": {
27
+ ".": "./src/index.ts",
28
+ "./cli": "./src/cli/main.ts",
29
+ "./observability": "./src/observability/index.ts"
30
+ },
31
+ "files": [
32
+ "bin",
33
+ "src",
34
+ "skills",
35
+ "README.md"
36
+ ],
37
+ "scripts": {
38
+ "start": "bun bin/harness.ts",
39
+ "test": "bun test src/core src/tools src/skills src/evals src/cli src/observability src/desktop src/integrations src/media src/init.test.ts src/runtime.test.ts desktop/src/rich-text.test.ts desktop/src/stream.test.ts desktop/src/dictation.test.ts desktop/src/thought.test.ts",
40
+ "typecheck": "bunx tsc --noEmit -p tsconfig.json",
41
+ "lint": "biome ci .",
42
+ "format": "biome format --write .",
43
+ "check": "biome check --write .",
44
+ "check:exports": "node scripts/check-exports.mjs",
45
+ "prepare": "husky",
46
+ "prepublishOnly": "bun run typecheck && bun run test && bun run check:exports",
47
+ "desktop": "bun src/cli/main.ts desktop"
48
+ },
49
+ "lint-staged": {
50
+ "*.{ts,tsx,js,jsx,json,mjs}": [
51
+ "biome check --write --no-errors-on-unmatched"
52
+ ]
53
+ },
54
+ "dependencies": {
55
+ "@strands-agents/sdk": "^1.10.0",
56
+ "ink": "^5.2.1",
57
+ "ink-text-input": "^6.0.0",
58
+ "openai": "^6.45.0",
59
+ "react": "^18.3.1"
60
+ },
61
+ "optionalDependencies": {
62
+ "@langfuse/client": "^5.11.1",
63
+ "@langfuse/otel": "^5.11.1",
64
+ "@langfuse/tracing": "^5.11.1",
65
+ "@opentelemetry/sdk-node": "^0.222.0"
66
+ },
67
+ "devDependencies": {
68
+ "@biomejs/biome": "^2.5.2",
69
+ "@types/bun": "^1.3.14",
70
+ "@types/react": "^18.3.18",
71
+ "husky": "^9.1.7",
72
+ "lint-staged": "^16.4.0",
73
+ "typescript": "^5.9.3"
74
+ }
75
+ }
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: copy-editor
3
+ description: >-
4
+ Edits and writes product and marketing copy: clarity, specificity, voice,
5
+ UI state strings, and anti-AI-slop sweeps. Use when the user says copy
6
+ editor, fix the copy, remove AI-isms, anti-slop, CTA, error copy, empty
7
+ state, or after RMBC and Harry Dry. Two modes: write and edit. Any
8
+ category. Never invent proof. Not visual QA.
9
+ ---
10
+
11
+ # Copy editor
12
+
13
+ Adapted from [mblode copywriting](https://github.com/mblode/agent-skills)
14
+ (MIT as stated for that skill). Ideas from George-Brothers Copywriter: swap
15
+ test, `[VERIFY]` instead of invented numbers. Not a vendor of either repo.
16
+
17
+ Router: copywriting. After copy-harry-dry. Lists:
18
+ `references/anti-slop.md`, `references/ui-states.md` (read with
19
+ `read_skill`, `file` set to that path).
20
+
21
+ Sentence case. Oxford comma. Present tense. No exclamation marks.
22
+
23
+ **Unproven claims:** omit, or `[VERIFY]` in a draft. Never a fake figure,
24
+ testimonial, or metric. Shipped UI and HTML must not contain `[VERIFY]`.
25
+
26
+ ## Modes (do not ask)
27
+
28
+ - Copy exists or was pasted **and the job is to polish it**: **Edit**.
29
+ - Nothing written yet, or a **facts brief** for a lander: **Write**.
30
+ Descriptive sentences in a brief are facts, not drafted copy.
31
+ - Ambiguous with no copy in scope: ask one question, then commit.
32
+
33
+ Point edit: change only the named line plus connective tissue.
34
+
35
+ ## Write
36
+
37
+ 1. Brief: page, goal, reader, core outcome. Mark inferred fields.
38
+ 2. Voice: this project's brief.
39
+ 3. Marketing: RMBC already chose the angle. UI state: load `ui-states.md`.
40
+ 4. One strong draft.
41
+ 5. Harry Dry on body and proof.
42
+ 6. Verify: no banned word, no invented specific, every supplied fact kept.
43
+
44
+ ## Edit
45
+
46
+ 1. Read the copy in context.
47
+ 2. North star only if that pain is in the brief. Do not invent the pain.
48
+ 3. Swap test on **proof lines** against a competitor in this category.
49
+ Also swap-test a hero that is `The {category} for {audience}`. Do not
50
+ demand a number to keep a named role.
51
+ 4. Anti-slop: load `anti-slop.md`. Flag `[AI-ISM]`.
52
+ 5. Sweeps (in order): clarity, voice, so-what, prove-it (omit or `[VERIFY]`,
53
+ never invent), specificity from the brief, CTA as a verb matching the state.
54
+ 6. Flag 3-7 weakest lines. Labels: `[VAGUE]`, `[DEAD-WEIGHT]`, `[AI-ISM]`,
55
+ `[NO-PROOF]`, `[WEAK-CTA]`, `[STATE-COPY]`, `[SWAP]`, `[APHORISM]`
56
+ (repeated `Not X. A Y.` down the page; one hero thesis is allowed),
57
+ `[THEATER]`, `[EYEBROW]`, `[STOCK-H2]`, `[LIST-H2]`, `[INSTRUCTION-HERO]`,
58
+ `[UI-NARRATION]`, `[EMPTY-EPITHET]`, `[TAUTOLOGY]`, `[EMPTY-PROCESS]`,
59
+ `[FREE-HEADLINE]`.
60
+ 7. Rewrite flagged lines. Cut hard. Do not add proof.
61
+ 8. Optional mechanical lint, if the draft is a file under the project:
62
+ `python3` on this skill's `scripts/lint-copy.py`.
63
+
64
+ Visual layout (kickers, equal cards) is `impeccable`, not this skill.
65
+
66
+ ## Prove-it (inverted)
67
+
68
+ A missing quote is correct. `[NO-PROOF]` means the line *claims* proof it
69
+ does not have: cut the claim, or `[VERIFY]`. Do not fetch a sample quote
70
+ to "fix" it.
71
+
72
+ ## After
73
+
74
+ One revision. Before/after only when editing. Do not add a methodology essay.
@@ -0,0 +1,62 @@
1
+ # Anti-slop (adapted)
2
+
3
+ mblode word lists and AI patterns. Distilled. Not a vendor. Any site category.
4
+
5
+ A phrase already in the project's brief or in its live UI outranks a list word.
6
+
7
+ ## Never write
8
+
9
+ exclamation marks, seamless, effortless, magic, powerful, simply, just, easily,
10
+ unlock, supercharge, revolutionary, game-changing, streamline, empower,
11
+ world-class, enterprise-grade, delve, leverage (verb), robust, holistic,
12
+ paradigm, cutting-edge, synergy, showcase, tapestry, realm, embark, beacon,
13
+ utilise, nestled, vibrant, deep dive, unpack, intricate, actionable, impactful,
14
+ learnings, thought leadership, best practices, in order to, due to the fact that.
15
+
16
+ Also: "simple" as an unearned claim ("our simple onboarding").
17
+
18
+ ## Flag when 2+ in one paragraph
19
+
20
+ harness, navigate, foster, elevate, unleash, bolster, spearhead, resonate,
21
+ revolutionise, facilitate, nuanced, crucial, ecosystem (metaphor), myriad,
22
+ plethora, catalyse, transformative, cornerstone, paramount, burgeoning, nascent.
23
+
24
+ ## Patterns (fix before ship)
25
+
26
+ - Em dash (`—`), `--`, or spaced hyphen ` - ` as a dash. Comma, colon, period,
27
+ or parentheses.
28
+ - `Not X. A Y.` repeated down the page. One hero thesis is allowed. Adjective
29
+ triads (`Secure, Safe, and Trustworthy`) are not a thesis.
30
+ - Theater framing. Say what it does.
31
+ - Same label repeated inside one container.
32
+ - How it works, Features, Our story, Get in touch, Why choose us as an h2
33
+ or kicker.
34
+ - Kicker / eyebrow / hero pill above the heading.
35
+ - Prompt echo: handing the brief's wording back.
36
+ - Process slogan: how the thing is built, as a headline.
37
+ - Invented local color: a town, trade, or customer the brief did not supply.
38
+ - Generic default over a supplied specific.
39
+ - Chatbot artefacts: "I hope this helps", "Great question", "Let's dive in."
40
+ - "Whether you're X or Y", "in today's [x]", "here's the thing", "your [x]
41
+ journey", "serves as" / "boasts" instead of "is".
42
+ - Vague attributions: "experts believe", "studies show" with no named source.
43
+ - List headline: `Noun, noun, and noun` as an h1/h2.
44
+ - Instruction hero: two steps as a slogan (`Do X, then click Y`).
45
+ - UI narration as the hero: a tour of the website instead of the business.
46
+ - Empty epithet: The {category} for {generic audience}.
47
+ - Tautology heading: the opposite would be a bug.
48
+ - Empty process: continuity or layout as the heading.
49
+ - Free as the heading: selling the free tier from the section title.
50
+ A price on a plan card is fine.
51
+
52
+ ## Swap test
53
+
54
+ On body, proof, **and** an empty hero epithet: if a competitor in this
55
+ category can paste their name on the line unchanged, it fails. Do not use
56
+ the swap test to demand a number on a named role.
57
+
58
+ ## `[VERIFY]`
59
+
60
+ Unproven claim in a draft: mark `[VERIFY]`. Do not invent a number to clear
61
+ the mark. Shipped copy: resolve (supplied fact) or delete the claim. Never
62
+ leave the token in UI or HTML.
@@ -0,0 +1,46 @@
1
+ # UI state copy
2
+
3
+ Product strings, not lander persuasion.
4
+
5
+ Buttons are verbs that match the state they produce: `Start building` →
6
+ `Building`. Feature and panel titles are bare noun phrases. Descriptions are
7
+ one mechanical sentence. No second-person persuasion inside a description.
8
+
9
+ Errors say what happened and what to do next. No apology, no blame, no
10
+ personality, never humour.
11
+
12
+ > Good: `Builder service is unreachable at localhost:8788. Is it running?`
13
+ > Bad: `Oops! Something went wrong :(`
14
+
15
+ Empty states name what is missing and offer one action.
16
+
17
+ > `No drafts in progress. Start one in the builder.`
18
+
19
+ ## Destructive labels
20
+
21
+ Verb plus object. Never `Confirm`, `OK`, `Yes`, or a bare `Delete` on a
22
+ consequential action.
23
+
24
+ | Bad | Good |
25
+ |---|---|
26
+ | Confirm | Delete project |
27
+ | OK | Remove member |
28
+ | Success! | Changes saved |
29
+
30
+ ## Canonical verbs
31
+
32
+ One verb per operation, used everywhere: Create vs Add, Delete vs Remove,
33
+ Archive, Save vs Apply, Cancel vs Discard.
34
+
35
+ ## Loading
36
+
37
+ Prefer `Loading your projects` over bare `Loading...` when the target is known.
38
+ Do not invent a duration.
39
+
40
+ ## Permission
41
+
42
+ Benefit, then the ask. Ask in context, not at launch.
43
+
44
+ ## Without the screen
45
+
46
+ No "click here", no "above" / "below". Name the place (`in Settings`).
@@ -0,0 +1,78 @@
1
+ #!/usr/bin/env python3
2
+ """Copy lint. Mechanical bans only; inventing proof is a human gate.
3
+
4
+ Usage:
5
+ python3 lint-copy.py path/to/draft.txt
6
+ printf '%s' "$draft" | python3 lint-copy.py -
7
+ """
8
+ from __future__ import annotations
9
+
10
+ import re
11
+ import sys
12
+
13
+ CHECKS: list[tuple[str, re.Pattern[str], str]] = [
14
+ (
15
+ "em/en dash",
16
+ re.compile(r"[—–]"),
17
+ "use a comma, colon, period, or parentheses",
18
+ ),
19
+ (
20
+ "spaced-hyphen dash",
21
+ re.compile(r"\S - \S"),
22
+ "same rhythm as an em dash; rewrite the sentence",
23
+ ),
24
+ (
25
+ "exclamation",
26
+ re.compile(r"!"),
27
+ "no exclamation marks",
28
+ ),
29
+ (
30
+ "aphoristic Not X. A Y.",
31
+ re.compile(
32
+ r"\b(?:it'?s|it is|this is|that'?s|that is)\s+not\s+(?:just\s+)?(?:about\s+)?.{1,40}?\.\s+(?:it'?s|it is|a)\b",
33
+ re.IGNORECASE,
34
+ ),
35
+ "state the positive claim; no Not X. A Y. cadence",
36
+ ),
37
+ (
38
+ "banned marketing word",
39
+ re.compile(
40
+ r"\b(seamless(ly)?|effortless(ly)?|magic|powerful|simply|easily|"
41
+ r"unlock(s|ed|ing)?|supercharg(e|es|ed|ing)|revolutionary|"
42
+ r"game-?changing|streamlin(e|es|ed|ing)|empower(s|ed|ing)?|"
43
+ r"world-class|enterprise-grade|delve|leverag(e|es|ed|ing)|robust|"
44
+ r"holistic|cutting-edge|synergy|showcase)\b",
45
+ re.IGNORECASE,
46
+ ),
47
+ "banned in anti-slop",
48
+ ),
49
+ (
50
+ "unresolved VERIFY",
51
+ re.compile(r"\[VERIFY(:[^\]]*)?\]"),
52
+ "resolve with a supplied fact or delete the claim before ship",
53
+ ),
54
+ ]
55
+
56
+
57
+ def main() -> int:
58
+ if len(sys.argv) < 2:
59
+ print("usage: lint-copy.py <file|->", file=sys.stderr)
60
+ return 2
61
+ src = sys.argv[1]
62
+ text = sys.stdin.read() if src == "-" else open(src, encoding="utf-8").read()
63
+ hits: list[tuple[int, str, str, str]] = []
64
+ for i, line in enumerate(text.splitlines(), 1):
65
+ for label, pat, hint in CHECKS:
66
+ for m in pat.finditer(line):
67
+ hits.append((i, label, m.group(0).strip(), hint))
68
+ if not hits:
69
+ print("LINT CLEAN: 0 violations.")
70
+ return 0
71
+ print(f"LINT FAILED: {len(hits)} violation(s).\n")
72
+ for ln, label, frag, hint in hits:
73
+ print(f" L{ln} [{label}] {frag!r} -> {hint}")
74
+ return 1
75
+
76
+
77
+ if __name__ == "__main__":
78
+ raise SystemExit(main())
@@ -0,0 +1,120 @@
1
+ ---
2
+ name: copy-harry-dry
3
+ description: >-
4
+ Harry Dry line test for distinctive copy: visualize, falsify, ownable.
5
+ Use when sharpening a headline, tagline, hook, or value line, or when
6
+ the user names Harry Dry, swap test, or ownable. Any category. Facts
7
+ from the brief only. Not long-form funnel copy.
8
+ ---
9
+
10
+ # Harry Dry (line test)
11
+
12
+ Adapted from [entpnomad/copywriting](https://github.com/entpnomad/copywriting)
13
+ (MIT, Copyright 2026 entpnomad). Method: Harry Dry (Marketing Examples). Not a
14
+ vendor of that repository.
15
+
16
+ Router: copywriting. After RMBC, before copy-editor.
17
+
18
+ Copywriting is an argument in the fewest words. If the argument is not true,
19
+ do not make it. No fake urgency. No bonus stacks.
20
+
21
+ **Facts only from the brief.** No number in the brief: omit, or `[VERIFY]`.
22
+ Never mint a figure so the line looks falsifiable.
23
+
24
+ ## Where this test runs
25
+
26
+ **Body and proof:** prices, hours, FAQ, capability lines. Visualize, falsify,
27
+ swap against a competitor **in that category**.
28
+
29
+ **Hero:** name the product or the transformation. Falsify-a-number does not
30
+ kill a named role (`The AI Code Reviewer`). Swap test **does** kill an empty
31
+ epithet: if a rival in this category can run `The {category} for {audience}`
32
+ unchanged, rewrite.
33
+
34
+ ## The test (body and proof)
35
+
36
+ 1. **Can I visualize it?** Close your eyes. Can you see it?
37
+ 2. **Can I falsify it?** Is it provably true or false from supplied facts?
38
+ 3. **Can nobody else say it?** Could a competitor in this category sign the
39
+ exact same line? (Swap test. If yes, it fails.)
40
+
41
+ Three nos: rewrite. Three yeses: keep. A line that only rearranges the
42
+ brief fails visualize and the swap test.
43
+
44
+ ## Concrete
45
+
46
+ Abstract fades. Rewrite "what do I actually mean?" until you could drop it on
47
+ your foot. Harry Dry's drill: regain fitness → **"Couch to 5K"** — a real
48
+ programme name. Do not mint a keep-example.
49
+
50
+ ## Falsifiable: point, don't talk
51
+
52
+ | Talking | Pointing (only if that fact exists) |
53
+ |---|---|
54
+ | intelligent | reads on the tube |
55
+ | great investment | the 50-year price chart |
56
+ | easy / powerful | a measured figure already in the brief |
57
+
58
+ ## Ownable (body and proof)
59
+
60
+ If a rival in this category could paste their logo on a proof line, it says
61
+ nothing. Volvo ran *"Your car has five numbers on the speedometer. Volvo has
62
+ six."* Do not pass the test by narrating how the website works.
63
+
64
+ ## 2-second test
65
+
66
+ If they do not get it in two seconds, it failed. Exception: a line the *target*
67
+ gets instantly.
68
+
69
+ ## Who → what → how
70
+
71
+ 1. Who are you talking to?
72
+ 2. Have something to say. A spine beats clever phrasing with none.
73
+ 3. Say it well. Narrow beats broad. Published: *"1,000 songs in your pocket"*
74
+ (iPod), not "media player."
75
+
76
+ ## Contrast
77
+
78
+ A single hero thesis is allowed. Do not land the rest of the page on
79
+ repeated `Not X. A Y.` Adjective triads (`Secure, Safe, and Trustworthy`)
80
+ are not a thesis.
81
+
82
+ ## Skip here
83
+
84
+ LinkedIn unicode-bold posts, newsletter feed structure, and swipe files.
85
+
86
+ ## Examples (published only)
87
+
88
+ Do **not** invent a keep-example. Quote a real line, name who ran it.
89
+
90
+ **Passes (body / proof)**
91
+
92
+ - New Balance: *"worn by supermodels in London and dads in Ohio."*
93
+ - Apple iPod (2001): *"1,000 songs in your pocket."*
94
+ - Hinge: *"the dating app designed to be deleted."*
95
+ - Volvo: *"Your car has five numbers on the speedometer. Volvo has six."*
96
+
97
+ A company site that is not an ad still points at the door: hours, address,
98
+ price, what you walk out with. It does not list frameworks.
99
+
100
+ **Hero register (form only)**
101
+
102
+ Write a new spine from this brief. Sentence case, no terminal period.
103
+
104
+ - Epithet: *"The continual learning platform for agents."*
105
+ - Transformation: *"Shift your product into self-driving mode"*
106
+ - Named role: *"The AI Code Reviewer."*
107
+ - Thesis: *"The future isn't writing code. It's reviewing it."*
108
+
109
+ **Fails**
110
+
111
+ - Recruiter empty: *"Don't just get a job. Change an entire industry."*
112
+ - Stack list as the h1 (frameworks, tools, file types).
113
+ - Process slogan: how it is built, as advertising.
114
+ - List headline: `Noun, noun, and noun` as an h1/h2.
115
+ - Instruction hero: two steps as a slogan (`Do X, then click Y`).
116
+ - UI narration as the hero: a tour of the website instead of the business.
117
+ - Empty epithet: `The {category} for {audience}` using the brief's own nouns.
118
+ - Empty process: a continuity or layout slogan.
119
+ - Free as the heading: selling the free tier from the section title.
120
+ - Tautology: a heading whose opposite would be a product bug.