mirror of
https://github.com/paperclipai/paperclip-docs.git
synced 2026-11-08 17:37:51 -10:00
## 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]>
103 lines
3.4 KiB
Markdown
103 lines
3.4 KiB
Markdown
---
|
|
seo_title: Process Adapter
|
|
seo_description: Run an arbitrary command on the Paperclip host. The right choice when your agent is really a script, a shell command, or a custom runtime.
|
|
---
|
|
|
|
# Process
|
|
|
|
The `process` adapter runs an arbitrary command on the same machine as Paperclip. Use it when your agent is just a script, a shell command, or a custom runtime that already knows how to do its own work.
|
|
|
|
> **Info:** `process` is a built-in internal adapter used by Paperclip's runtime. It's currently shown as **"Coming soon"** in the agent-config adapter-type dropdown and can't be selected manually. To target it today, configure the agent via the API or an imported company export.
|
|
|
|
---
|
|
|
|
## When To Use
|
|
|
|
- You want to run a local script as an agent.
|
|
- You already have a custom command-line workflow.
|
|
- You want Paperclip to inject company context into a process and collect its output.
|
|
|
|
## When Not To Use
|
|
|
|
- The runtime is a long-lived service or remote webhook. Use [HTTP](./http.md) instead.
|
|
- You need built-in session persistence or a vendor-specific CLI integration. Use one of the local adapters instead.
|
|
- You need a richer transcript parser than plain stdout/stderr capture.
|
|
|
|
---
|
|
|
|
## Common Fields
|
|
|
|
| Field | Required | Notes |
|
|
|---|---:|---|
|
|
| `command` | yes | Executable command or script path. |
|
|
| `args` | no | Command arguments, either as a string array or a whitespace-delimited string. |
|
|
| `cwd` | no | Working directory for the process. Must be absolute in normal use. |
|
|
| `env` | no | Extra environment variables passed to the process. |
|
|
| `timeoutSec` | no | Run timeout in seconds. `0` means no timeout. |
|
|
| `graceSec` | no | Grace period before a forced stop. Defaults to `15` in the server adapter. |
|
|
|
|
> **Note:** The process adapter does not invent a higher-level protocol. It launches the command, streams logs, and returns stdout/stderr plus exit metadata.
|
|
|
|
---
|
|
|
|
## How It Works
|
|
|
|
1. Paperclip builds the runtime environment and injects the standard `PAPERCLIP_*` variables.
|
|
2. The adapter resolves the command for logs and execution.
|
|
3. Paperclip starts the child process with the configured arguments.
|
|
4. The run completes when the process exits, times out, or fails.
|
|
5. Stdout and stderr are returned in the run result so the UI can render them.
|
|
|
|
If the process exits non-zero, the run returns an error message and the raw output payload.
|
|
|
|
---
|
|
|
|
## Environment Test
|
|
|
|
The `Test Environment` button checks:
|
|
|
|
- A `command` is configured.
|
|
- The working directory exists or can be created.
|
|
- The command is resolvable on the target machine.
|
|
|
|
If the command cannot be found, the adapter will not run.
|
|
|
|
---
|
|
|
|
## Example
|
|
|
|
```json
|
|
{
|
|
"adapterType": "process",
|
|
"adapterConfig": {
|
|
"command": "python3",
|
|
"args": ["scripts/run-agent.py", "--company-id", "company-1"],
|
|
"cwd": "/Users/me/projects/paperclip-workspace",
|
|
"env": {
|
|
"OPENAI_API_KEY": {
|
|
"type": "secret_ref",
|
|
"secretId": "secret-id",
|
|
"version": "latest"
|
|
}
|
|
},
|
|
"timeoutSec": 300,
|
|
"graceSec": 15
|
|
}
|
|
}
|
|
```
|
|
|
|
---
|
|
|
|
## Practical Notes
|
|
|
|
- Use a process adapter when you want full control over the runtime.
|
|
- If your script needs to call back into Paperclip, use the injected `PAPERCLIP_API_URL` and `PAPERCLIP_API_KEY`.
|
|
- Keep the command deterministic when possible so heartbeats are easier to debug.
|
|
|
|
---
|
|
|
|
## Next Steps
|
|
|
|
- [Creating an Adapter](./creating-an-adapter.md)
|
|
- [External Adapters](./external-adapters.md)
|