Files
Aron PrinsandClaude Opus 5 325c9eb819 seo: hand-write titles and descriptions for all 192 pages (#115)
## Why

The build derived `<title>` from the **sidebar label** and the
description from the **first paragraph clipped to 220 characters**. Both
are the wrong source. A sidebar label is written for a 240px-wide nav
that supplies its own context; a search result has none.

On production that produced:

- **7 pages titled "Overview"**, and 32 pages sharing a title with
another page
- **109 of 193 descriptions cut off mid-word**, and 174 over 160
characters (where Google truncates)

```
/guides/welcome/key-concepts/
  BEFORE (220):  ...and if you misunderstand them early, the product wi
```

Near-identical titles are the weak-differentiation signal behind
"crawled — currently not indexed", which is the exact symptom on this
property.

## What changed

`seo_title` and `seo_description` frontmatter on **every one of the 192
pages**, written by hand against each page's real content and optimised
for the click — lead with what the reader can do, name the concrete
things covered, no keyword stuffing, no repeating the title.

| | Before | After |
|---|---|---|
| Duplicate titles | 32 pages | **0** |
| Duplicate descriptions | — | **0** |
| Descriptions cut mid-word | 109 | **0** |
| Descriptions over 160 chars | 174 | **0** |
| Title length (incl. suffix) | up to "Overview" | **26–60** |
| Description length | 31–240 | **122–158** |

**No prose was rewritten.** I measured content overlap between the
colliding pairs first — only 17–23%, so these were always distinct pages
wearing the same label, not duplicate content. The `docs/` diff is **564
insertions, zero deletions**.

### Examples

```
BEFORE — all seven identical:  "Overview | Paperclip Docs"
AFTER:  "Adapters Overview"      "API Overview"        "CLI Overview"
        "Deployment Overview"    "Bundled Skills"      "Optional Skills"
        "Experimental Features"

BEFORE — both identical:  "Issues | Paperclip Docs"
AFTER:  "Issues: Creating and Tracking Work"   /guides/day-to-day/issues/
        "Issues API"                           /reference/api/issues/
```

```
/guides/getting-started/five-minute-path/
BEFORE (220):  The shortest route from a running Paperclip instance to an agent that has
               just completed work for you. After Paperclip is installed, the path takes
               about 5 minutes: create a company, hire a CEO agent, approve its first s
AFTER  (131):  Install Paperclip, create a company, hire a CEO agent, and approve its
               first strategy — a working AI company in about five minutes.
```

## Plumbing

- **`site/build-release.mjs`** prefers the authored fields; the derived
path stays only as a fallback the CI gate prevents ever reaching.
`<title>`, `<meta name="description">`, and the `TechArticle` JSON-LD
all read from the same source.
- **`site/app.js`** uses the same fields, so a client-side transition
cannot leave a different title on screen than the crawler was served.
Verified in-browser: navigating `/guides/day-to-day/issues/` →
`/reference/api/issues/` swaps to exactly the server-rendered values, no
JS errors.
- **`scripts/verify-seo-metadata.mjs`** (new) enforces presence,
uniqueness, length, complete-sentence endings, and the
frontmatter-safety rules. Wired into `docs:test` and CI as its own step.

I negative-tested the gate rather than assuming it works — it correctly
fails on a duplicate title, a mid-word description, and a missing field,
and passes again once restored.

## Automating it going forward

`skills/sync-docs/SKILL.md` now:

- gains an **"Authored SEO metadata"** section: why the fields exist,
the enforced rules as a table, and how to actually write them (title
names the subject not the nav position; description writes for the
click; never generate mechanically from the first paragraph — *that is
the fallback the gate exists to prevent*).
- requires both fields in the **page-authoring instruction** given to
every subagent, with guidance on when to update an existing description
versus leave it.
- runs `docs:test:seo-metadata` and `docs:test:crawlable-links` as
**fail-loud gates in Phase 7** before commit.
- documents all six build gates in the files/gates section.

So once this lands, a new page cannot ship without hand-written
metadata, and a title collision cannot reach production.

## Verified

All six verifiers pass:

```
Static route verification passed
Asset fingerprint verification passed
Hierarchical Skills nav verification passed
Skill source block verification passed (11 skill pages, 1 control page)
Crawlable-link contract passed: 40886 internal links across 194 pages resolve in one hop
Authored-SEO contract passed: 192 pages carry a unique, hand-written seo_title and seo_description
```

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
2026-08-25 22:51:42 +02:00

154 lines
5.6 KiB
Markdown

---
paperclip_version: v2026.626.0
seo_title: Hermes Adapter
seo_description: Run Hermes Agent by Nous Research on the Paperclip host, with persistent memory and a 30-plus tool suite available to the agent on every run.
---
# Hermes
`hermes_local` runs [Hermes Agent](https://github.com/NousResearch/hermes-agent) — a full-featured AI agent by Nous Research — on the same machine as Paperclip. Use it when you want persistent memory, a 30+ tool suite, 80+ loadable skills, multi-provider model routing, and MCP client support in a single adapter.
---
## When To Use
- Hermes is a built-in adapter — no plugin install required. Paperclip ships `hermes_local` out of the box.
- You need persistent memory, FTS5 session search, or sub-agent delegation.
- You want to route to multiple inference providers (Anthropic, OpenRouter, OpenAI, Nous, OpenAI Codex, Copilot, Copilot ACP, HuggingFace, ZAI, Kimi Coding, MiniMax, Kilocode).
- You want filesystem checkpoints for rollback safety.
## When Not To Use
- The runtime lives behind a webhook or API. Use [OpenClaw Gateway](./openclaw-gateway.md) or [HTTP](./http.md).
- You only need a one-shot shell command. Use [Process](./process.md).
- Hermes Agent is not installed on the machine (requires Python 3.10+).
---
## Common Fields
### Core
| Field | Required | Default | Notes |
|---|---:|---|---|
| `provider` | no | `auto` | API provider. Accepts `auto`, `openrouter`, `nous`, `openai-codex`, `copilot`, `copilot-acp`, `anthropic`, `huggingface`, `zai`, `kimi-coding`, `minimax`, `minimax-cn`, `kilocode`. Usually leave this on `auto` — Hermes infers it from your model or `~/.hermes/config.yaml`. |
| `timeoutSec` | no | `1800` | Execution timeout in seconds. |
| `graceSec` | no | `10` | Seconds to wait after SIGTERM before killing the Hermes process. |
### Tools
| Field | Required | Default | Notes |
|---|---:|---|---|
| `toolsets` | no | all | Comma-separated list of toolsets, such as `terminal,file,web`. |
| `maxTurnsPerRun` | no | — | Optional Hermes `--max-turns` limit for tool-calling iterations. |
### Session & workspace
| Field | Required | Default | Notes |
|---|---:|---|---|
| `persistSession` | no | `true` | Resume sessions across heartbeats via Hermes `--resume`. |
| `worktreeMode` | no | `false` | Git worktree isolation. |
| `checkpoints` | no | `false` | Enables filesystem checkpoints for rollback. |
### Advanced
| Field | Required | Default | Notes |
|---|---:|---|---|
| `verbose` | no | `false` | Verbose output. |
| `quiet` | no | `true` | Clean output — no banner or spinner. |
| `promptTemplate` | no | built-in | Custom prompt template (see below). |
| `paperclipApiUrl` | no | — | Optional API base override. Defaults to `PAPERCLIP_API_URL`. |
---
## Model Selection
Hermes manages its own model. You set the model in `~/.hermes/config.yaml` or through Hermes's own configuration — there is no `model` field in the Paperclip adapter config. This keeps the "add a Hermes agent" flow one-click: if Hermes is already configured on your machine, you're done.
---
## Session Persistence
When `persistSession=true` (the default), each run resumes via Hermes's `--resume` flag. This preserves:
- Conversation context.
- Memories.
- Tool state.
Sessions are tagged as `tool` source so they don't clutter the user's interactive Hermes history. The adapter's `sessionCodec` validates and migrates session state between runs.
---
## Skills Integration
The adapter scans two skill sources and merges them in the UI:
- **Paperclip-managed skills** — bundled with the adapter, togglable from the board UI.
- **Hermes-native skills** — from `~/.hermes/skills/`, read-only, always loaded.
`listSkills` and `syncSkills` expose the unified snapshot so the Paperclip UI shows both categories in one view.
---
## Prompt Template Variables
Use `{{variable}}` syntax in `promptTemplate`:
| Variable | Description |
|---|---|
| `{{agentId}}` | Paperclip agent ID |
| `{{agentName}}` | Agent display name |
| `{{companyId}}` | Company ID |
| `{{companyName}}` | Company name |
| `{{runId}}` | Current heartbeat run ID |
| `{{taskId}}` | Assigned task/issue ID |
| `{{taskTitle}}` | Task title |
| `{{taskBody}}` | Task instructions |
| `{{projectName}}` | Project name |
| `{{paperclipApiUrl}}` | Paperclip API base URL |
| `{{commentId}}` | Comment ID (when woken by a comment) |
| `{{wakeReason}}` | Reason this run was triggered |
Conditional sections:
- `{{#taskId}}...{{/taskId}}` — included only when a task is assigned.
- `{{#noTask}}...{{/noTask}}` — included only on plain heartbeat checks.
- `{{#commentId}}...{{/commentId}}` — included only when woken by a comment.
---
## Execution Details
The adapter spawns Hermes Agent in single-query mode (`hermes chat -q ...`). Hermes processes the task using its full tool suite, then exits. The adapter:
1. Captures stdout/stderr and parses token usage, session IDs, and cost.
2. Parses raw output into structured `TranscriptEntry` objects (tool cards with status icons).
3. Post-processes Hermes ASCII banners, setext headings, and `+--+` table borders into clean GFM markdown.
4. Reclassifies benign stderr (MCP init messages, structured logs) so they don't appear as errors.
5. Tags sessions as `tool` source.
6. Reports results back to Paperclip with cost, usage, and session state.
---
## Example
```json
{
"adapterType": "hermes_local",
"adapterConfig": {
"toolsets": "terminal,file,web",
"persistSession": true,
"checkpoints": true,
"timeoutSec": 1800,
"graceSec": 10
}
}
```
---
## Next Steps
- [Creating an Adapter](./creating-an-adapter.md)
- [Adapter UI Parser Contract](./adapter-ui-parser.md)