@seoagent-official/seoagent 1.79.2 → 1.81.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seoagent-official/seoagent",
3
- "version": "1.79.2",
3
+ "version": "1.81.0",
4
4
  "description": "The persistent AI SEO agent for Claude Code. Audits, keyword strategy, briefs, articles, real product screenshots from your repo, and the autopilot loop (cloud detects → CLI executes → ack closes) — other SEO tools write the prompt, SEOAgent runs it.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,68 @@
1
+ # Draft Review — Visual Review Loop (human-review)
2
+
3
+ An optional, higher-fidelity way for the user to review a draft before it publishes. Instead of pasting the draft into chat and collecting feedback as prose, open it in the browser with [human-review](https://github.com/petergyang/human-review) (MIT, runs fully local via `npx`, no account or API key). The user edits text directly, drags blocks, and leaves comments anchored to exact phrases; you receive everything as one structured batch and apply it to the source.
4
+
5
+ ## When to use it
6
+
7
+ Offer this loop in **interactive sessions**, after you have written or rewritten something the user will read: an article (Phase 4), a landing page, a rewrite (Phase 4b), or a draft from an inbox action (`cli_new_content`, `cli_content_update`, `cli_new_landing_page`). It replaces the "show the user the draft in chat" step with a real review surface.
8
+
9
+ Do NOT use it when:
10
+
11
+ - The session is headless / non-interactive (CI, autopilot one-shots) — nobody is there to review.
12
+ - `npx` is unavailable.
13
+ - The user prefers chat review or a PR diff — the PR remains the review surface for `mdx_sync` cluster batches.
14
+
15
+ Offer it once; if the user declines, fall back to chat/PR review and don't re-offer in the session.
16
+
17
+ ## The loop
18
+
19
+ 1. Write or update the draft file first (repo article, `.seoagent/content/{slug}.md`, or landing page source).
20
+ 2. Open it for the user:
21
+
22
+ ```bash
23
+ npx -y human-review path/to/draft.md
24
+ ```
25
+
26
+ For a page served by a local dev server the user already runs, open the real route instead of recreating it as a file:
27
+
28
+ ```bash
29
+ npx -y human-review http://localhost:3000/blog/my-post
30
+ ```
31
+
32
+ 3. Wait for feedback. This blocks until the user hits Send, or the timeout passes:
33
+
34
+ ```bash
35
+ npx -y human-review poll path/to/draft.md --timeout 600
36
+ ```
37
+
38
+ Keep the poll in the foreground; don't end your turn while it waits. `{"status":"timeout"}` means no feedback yet — run the same poll again. `{"status":"closed"}` means the user ended the review from the browser — stop polling; unsent feedback ships on the next review of the same target.
39
+
40
+ 4. Apply the batch, then acknowledge and wait again:
41
+
42
+ ```bash
43
+ npx -y human-review poll path/to/draft.md --ack --timeout 600
44
+ ```
45
+
46
+ Repeat 3–4 until the user says they are done. To check for waiting feedback without blocking (e.g. at the start of a new turn):
47
+
48
+ ```bash
49
+ npx -y human-review status path/to/draft.md
50
+ ```
51
+
52
+ ## Applying the feedback batch
53
+
54
+ The batch is JSON with `pages[]`, each carrying `comments[]` (anchored to an exact `quote`) and `edits[]` (`before` / `after`, plus `after_html` when formatting changed). Rules:
55
+
56
+ - **`edits` are changes the user already made. `after` is their exact wording — carry it verbatim and never revert or "improve" it.** The user's own words always win over the writing rules; do not run the no-slop pass over text the user typed.
57
+ - Markdown files open rendered; quotes and edits reference the rendered text. Apply every change to the **markdown source**, keeping its syntax (`<strong>` → `**`, pasted `<img src="assets/...">` → `![](assets/...)`, keep the relative path).
58
+ - For a localhost page (`kind: "url"`), find the project source that renders the route (MDX, TSX, template) and apply the edits there — never write rendered HTML back into the app.
59
+ - An edit with `kind: "moved"` relocates a whole block — reposition it in the source without rewriting its content.
60
+ - Find each comment by its `quote`; fix every page in `pages`, not just the first.
61
+ - When a comment asks for a rewrite, apply the writing rules from `references/writing-rules.md` — including its voice-preservation section — to YOUR new text, never to the user's.
62
+ - **Do not write a chat reply for each item.** The page reloads when you save; the user sees the result there. Summarize what you applied once per batch.
63
+
64
+ ## After the review
65
+
66
+ 1. Re-run the self-check from `references/writing-rules.md` on any text you (not the user) rewrote.
67
+ 2. Continue the normal flow: `seoagent sync`, cluster link-graph updates, publish per `publishing.strategy`.
68
+ 3. Log one changelog line: `[date] Applied human-review batch to {slug}: {N} edits, {M} comments`.
@@ -31,6 +31,7 @@ Before any edits, read:
31
31
  - `.seoagent/context.md` — current brand voice, banned topics, audience
32
32
  - `.seoagent/strategy/clusters/{cluster}.md` — the article's role and link graph
33
33
  - `.seoagent/briefs/{slug}.md` if it exists — the original brief
34
+ - `references/writing-rules.md` — the prose rules, especially its **"Editing existing content"** section (voice preservation, minimum effective edit)
34
35
 
35
36
  ### Step 3: Diagnose the Gaps
36
37
 
@@ -71,6 +72,7 @@ Wait for user confirmation before executing.
71
72
  Rules:
72
73
  - **Preserve the URL slug.** Never change `slug` — even if the title changes, the URL stays.
73
74
  - **Preserve sections that rank.** If a section is the page's strongest signal, keep its core wording.
75
+ - **Preserve the voice.** Follow `references/writing-rules.md` § "Editing existing content": note the article's voice signals before editing, make the minimum effective edit, remove slop patterns without flattening distinctive sentences, and never invent claims or stats the original didn't have.
74
76
  - **Use `Edit`, not `Write`.** Edit one section at a time so changes are reviewable.
75
77
  - **Update `dateModified`** in JSON-LD. Don't change `datePublished` — that resets ranking signal.
76
78
  - **Bump `version`** in frontmatter (1 → 2 → 3).
@@ -101,6 +103,10 @@ Add to JSON-LD:
101
103
 
102
104
  Both dates in the schema. Google uses `dateModified` to know freshness without resetting ranking signal.
103
105
 
106
+ ### Step 5b: Optional Visual Review
107
+
108
+ In interactive sessions, offer to open the rewritten article with the visual review loop (`references/draft-review.md`): the user fixes small things directly in the browser and comments on the rest, and you apply the batch to the source. Their exact wording always wins — never revert or "improve" text they typed.
109
+
104
110
  ### Step 6: Update Internal Links
105
111
 
106
112
  If the rewrite added or changed internal links:
@@ -0,0 +1,66 @@
1
+ # Writing Rules — No AI Slop
2
+
3
+ Prose-craft rules for EVERY article, landing page, brief, and rewrite this skill produces. Adapted from the `no-ai-slop` skill (github.com/petergyang/no-ai-slop, MIT). The page-type references (pillar, sub-pillar, long-tail, listicle, landing-pages) set the *structure*; this file sets the *sentences*. Load it whenever you draft, edit, or rewrite content.
4
+
5
+ These rules also ship inside cloud-generated briefs as a "## Writing rules (no AI slop)" section. When a brief carries that section, it is the same contract as this file — don't apply the rules twice, just follow them.
6
+
7
+ ## Banned words
8
+
9
+ Never use: delve, foster, leverage, utilize, facilitate, empower, streamline, robust, cutting-edge, paradigm shift, game changer, "this is huge", "this changes everything", tapestry, realm, beacon, multifaceted, meticulous, intricate, paramount, transformative, elevate, embark, supercharge, harness, ever-evolving.
10
+
11
+ ## Phrases that delay the point
12
+
13
+ Cut these and state the point: "it's worth noting", "it's important to note", "at the end of the day", "when it comes to", "at its core", "in today's world", "in the age of", "in the world of", "the reality is", "the truth is", "in terms of", "with regard to", "in order to" (write "to"), "going forward", "in this article", "let's dive in".
14
+
15
+ ## Patterns never to produce
16
+
17
+ 1. **Binary contrasts** — "This is not X. It's Y." / "The question isn't X, it's Y." / "It's not just X but Y." State Y directly: "The eval matters more than the model."
18
+ 2. **Throat-clearing openers** — "Here's the thing", "Let me be clear", "I'll be honest", "The uncomfortable truth is". Start with the point.
19
+ 3. **Faux-insight setups** — "What most people get wrong", "Here's what nobody tells you", "The part everyone misses". Make the claim stand on its own.
20
+ 4. **Colon reveals** — a noun phrase, a colon, then a dramatic reveal ("The best part: it learns"). Write a plain sentence. Colons are for lists, labels, and quotes.
21
+ 5. **Fake-strong verbs** — "serves as a centralized hub for" → say what it does: "tracks sponsors, drafts, and due dates in one place". Prefer "is" and "has" when they are clearer.
22
+ 6. **Synonym cycling** — if the clear word is right, repeat it. Don't rotate "the agent / the assistant / the tool" for style.
23
+ 7. **Negative listing** — "Not a X. Not a Y. A Z." Just say Z.
24
+ 8. **Dramatic fragmentation** — "X. And Y. And Z." or "That's it. That's the whole thing." Use complete sentences.
25
+ 9. **Rhetorical setups** — "What if I told you...", "Think about it:", "Plot twist:", self-answered "Question? Answer." pairs. Drop them and make the point.
26
+ 10. **Interpretive metadiscourse** — "That last part matters more than it sounds", "The key point is", "As you can see", redundant "In other words". If the point is clear, delete the aside; otherwise support it with facts.
27
+ 11. **Fake-profound kickers** — never end on a cute metaphor, aphorism, or mic-drop line. End on the clearest concrete point, takeaway, or next action.
28
+ 12. **Summary-recap endings** — no "In conclusion", "Ultimately", "Overall", and no final paragraph that restates the piece.
29
+ 13. **Weasel attribution** — "Experts agree", "studies show", "industry reports suggest". Name the source or cut the claim. Never invent one.
30
+ 14. **Robotic rhythm** — avoid repeated sentence shapes, identical paragraph structures, and stacked punchy fragments. Vary sentence length deliberately: put a short sentence next to a long one.
31
+
32
+ ## Concreteness
33
+
34
+ - **Portability test**: if a sentence could move unchanged to another company, product, or country, it is filler. Cut it or replace it with a fact, number, mechanism, or consequence specific to THIS subject. Never invent specifics; use labeled typical-case ranges when you lack real numbers.
35
+ - **Protect the specific fact**: never smooth a useful detail into generic importance. "Significantly improves productivity" → "cut review time from 30 minutes to 8" (real or clearly-labeled numbers only).
36
+ - **Show, don't tell**: facts, actions, examples, and consequences carry the emphasis. Cut commentary that labels a point important, surprising, or subtle instead of demonstrating why.
37
+ - **Direct verbs**: "made a decision" → "decided"; "has the ability to" → "can".
38
+ - **Active voice with human subjects**: "The team shipped it Tuesday" beats "the decision emerged". Never let inanimate things do human verbs.
39
+
40
+ ## Formatting
41
+
42
+ - Em dashes: at most 1–2 in the whole piece. No clusters, no decorative dashes.
43
+ - No emoji in headings or body. No bold sprinkled mid-sentence for emphasis.
44
+ - No bullet lists where two sentences of prose read better. No headers over two-sentence sections.
45
+
46
+ ## Editing existing content (rewrites, refreshes, user drafts)
47
+
48
+ When revising a page that already exists — Phase 4b rewrites, `cli_content_update` inbox actions, or a draft the user wrote — the job changes from "never produce slop" to "remove slop without flattening the voice":
49
+
50
+ - **Preserve the writer's real voice.** Before editing, note 3–5 voice signals: vocabulary, cadence, bluntness, humor, uncertainty, digressions. Keep the traits that feel personal. Do not make every paragraph equally tidy.
51
+ - **Make the minimum effective edit.** Fix slop patterns, errors, and unclear passages. Leave strong human sentences alone. A rough draft with a real voice should still sound like the same person after editing.
52
+ - **Keep the user's meaning.** Don't invent claims, examples, stats, or opinions. If something is unclear, ask.
53
+ - **Keep useful edge.** Strong opinions, blunt language, humor, and honest admissions stay if they belong to the writer. Don't replace them with safer wording.
54
+ - **Keep structure unless it hurts the piece.** If you reorganize, say why in the change summary.
55
+ - Empty qualifiers like "I think", "maybe", "to be honest" stay when they express real uncertainty or the writer's spoken rhythm.
56
+
57
+ ## Self-check before showing a draft
58
+
59
+ After writing or editing, check the draft against this file before you show it or publish it. If a check fails, fix the draft first:
60
+
61
+ 1. No banned words, delay phrases, or listed patterns (unless quoted as examples).
62
+ 2. Every generic sentence passes the portability test or was cut.
63
+ 3. Active voice with human subjects where possible; direct verbs.
64
+ 4. Em dashes ≤ 2; no emoji; no decorative bold; no recap ending.
65
+ 5. The piece ends on a concrete point, takeaway, or next action.
66
+ 6. For edits of existing content: the writer would recognize the result as their own voice, and the edit summary lists what changed.
@@ -36,6 +36,8 @@ This SKILL.md is the orchestration layer. Detailed protocols live in `references
36
36
 
37
37
  | Task | Read |
38
38
  |---|---|
39
+ | Writing or editing ANY content (always, alongside the page-type reference) | `references/writing-rules.md` |
40
+ | Reviewing a draft with the user in the browser (interactive sessions) | `references/draft-review.md` |
39
41
  | Running a full audit | `references/audit-checks.md` |
40
42
  | Keyword research | `references/keyword-research.md` |
41
43
  | Migrating legacy ranking authority after a pivot/rebrand | `references/migration-planning.md` |
@@ -82,7 +84,7 @@ Activate this skill silently — without announcing it — whenever the user:
82
84
  - Asks about meta tags, slugs, URLs, headings, schema, sitemaps, or robots.txt
83
85
 
84
86
  When implicitly activated:
85
- 1. Apply the SEO writing rules from the matching `references/*.md` for the page type
87
+ 1. Apply the SEO writing rules from the matching `references/*.md` for the page type, plus the prose rules in `references/writing-rules.md` (for edits to existing content, use its voice-preservation section)
86
88
  2. Persist the work to `.seoagent/` (a brief if a brief doesn't exist; an article entry if writing content)
87
89
  3. Append a one-line note to `.seoagent/changelog.md` so the user can see what was tracked
88
90
  4. Run `seoagent sync` after the change so it reaches the dashboard
@@ -168,13 +170,13 @@ Offer **once per session per topic**; if declined, drop it and keep working. Nev
168
170
  4. For each `cli_new_content-<id>.md` file:
169
171
  - `Read` it. The frontmatter has `action_id`, `brief_slug`, `primary_keyword`, `cluster`, and `priority`. The body points at the synced brief.
170
172
  - **Read the full brief** under `.seoagent/` (briefs file or `strategy/` entry matching `brief_slug`) for the outline, word-count target, and internal-link plan.
171
- - Write the article following the skill's **content-production protocol** (Phase 4 below), then publish it where this project's content lives (repo `content/` or the connected CMS — you are the publishing engine). Show the user the draft before publishing.
173
+ - Write the article following the skill's **content-production protocol** (Phase 4 below), then publish it where this project's content lives (repo `content/` or the connected CMS — you are the publishing engine). Show the user the draft before publishing (interactive sessions can use the visual review loop — `references/draft-review.md`).
172
174
  - **If the action body has a "Screenshots to capture" section** (autopilot flagged this as a SaaS product), follow `references/screenshots.md` — capture real product screenshots from this repo's UI for the relevant sections instead of shipping illustration-only.
173
175
  - Acknowledge it: `seoagent ack <action_id>` (or `--failed --reason "skipped; off-strategy"` to decline).
174
176
 
175
177
  5. For each `cli_content_update-<id>.md` file:
176
178
  - `Read` it. The frontmatter has `action_id`, `reason` (`declining_clicks`|`low_ctr`|`stale_thin`), and `page_url`; the body has the signals.
177
- - **Find the page's source** for `page_url`. Apply the revision per `reason`: `declining_clicks` → refresh/expand the content; `low_ctr` → rewrite title + meta description; `stale_thin` → expand and update. Follow the skill's **rewrite/revise protocol**. Reversible edit — show the user the diff (confirm once per session, then proceed).
179
+ - **Find the page's source** for `page_url`. Apply the revision per `reason`: `declining_clicks` → refresh/expand the content; `low_ctr` → rewrite title + meta description; `stale_thin` → expand and update. Follow the skill's **rewrite/revise protocol**. Reversible edit — show the user the diff (confirm once per session, then proceed; interactive sessions can review the revised draft via `references/draft-review.md`).
178
180
  - Acknowledge it: `seoagent ack <action_id>` (or `--failed --reason "kept as-is; ..."` to decline).
179
181
 
180
182
  6. For each `cli_sitemap_update-<id>.md` file:
@@ -188,7 +190,7 @@ Offer **once per session per topic**; if declined, drop it and keep working. Nev
188
190
  - `Read` it. The frontmatter has `action_id`, `keyword`, `opportunity` (`easy_win` | `competitor_gap`), `volume`, `difficulty`, and `intent`. The body explains why this keyword is worth a page.
189
191
  - Cross-reference `.seoagent/keywords.md` for related keywords — they tell you which cluster this page belongs to and which secondary keywords to weave in.
190
192
  - Pick an article type from `intent` (commercial/transactional → product or comparison page; informational → guide or pillar). Pick a clean URL slug from `keyword`.
191
- - Write the article following the skill's **content-production protocol** (Phase 4 — match the article type's quality rules, add internal links from related cluster pages, etc.). Show the user the draft before publishing.
193
+ - Write the article following the skill's **content-production protocol** (Phase 4 — match the article type's quality rules, add internal links from related cluster pages, etc.). Show the user the draft before publishing (interactive sessions can use the visual review loop — `references/draft-review.md`).
192
194
  - **If the action body has a "Screenshots to capture" section** (SaaS product), follow `references/screenshots.md` — a landing page for a SaaS product should lead with a real product screenshot in the hero + feature sections, captured from this repo's UI.
193
195
  - Publish where this project's content lives (repo `content/` or the connected CMS). Safe (new content) — but still confirm the user wants this specific page before committing.
194
196
  - Acknowledge it: `seoagent ack <action_id>` (or `--failed --reason "already covered by /existing-page"` to decline).
@@ -770,6 +772,7 @@ For each planned article (in priority order from strategy):
770
772
  - Programmatic → `references/programmatic.md`
771
773
  - **Then check the FORMAT (orthogonal to role).** Role sets where the article sits in the cluster; *format* sets how it's written. If the title/intent is a **listicle** — "Top N", "Best N", "N Best/Top/Ways/Tips/Reasons" (commercial "best/top/alternatives" intent) — also read `references/listicle-articles.md` and follow **its** section structure (it overrides the role's outline), and tag the brief `article_type: listicle`. (The cloud pipeline already has a `listicle` type; tagging keeps local + cloud in sync.)
772
774
  5. Generate the brief — markdown with frontmatter — using the structure that reference file specifies.
775
+ 6. **End every brief with a `## Writing rules (no AI slop)` section** — copy the "Banned words", "Phrases that delay the point", and "Formatting" rules from `references/writing-rules.md` in compact form (cloud-generated briefs already carry this section; local briefs must match). The brief travels to whoever writes the article, so the rules must travel with it.
773
776
 
774
777
  ### Output: `.seoagent/briefs/{slug}.md`
775
778
 
@@ -824,7 +827,7 @@ This is the per-article procedure. When executing an approved **plan** (see "Pla
824
827
  3. Read the cluster file to confirm internal-link targets.
825
828
  4. **Read the matching page-type reference** for the article's `role` / `page_type`. The reference file gives the title pattern, section ordering, internal-linking rules, metadata defaults, and JSON-LD schema for that type. **If the brief is `article_type: listicle` (or the title is "Top N" / "Best X"), read `references/listicle-articles.md`** and follow its structure (consistent per-item layout, quick-pick + comparison table, `ItemList` schema) — it overrides the role's outline.
826
829
  5. Read `references/schema-markup.md` if you need JSON-LD examples beyond what the page-type reference covers.
827
- 6. Follow the outline. Apply the writing rules.
830
+ 6. **Read `references/writing-rules.md`** — the prose rules (banned words, slop patterns, concreteness, formatting). Follow the outline and apply them while drafting. Before showing or publishing the draft, run the file's **self-check** and fix any failures first.
828
831
  7. **Write the article where it actually renders — and keep ONE source of truth** (this depends on `publishing.strategy`, see the Publishing Target Decision section):
829
832
  - **Repo-native (`mdx_sync`) or CMS (`custom`)** — the article body lives in the repo file / CMS entry, NOT in `.seoagent/`. Write it there (matching the site's existing frontmatter/model), then **register it so the cloud + dashboard can see it**:
830
833
 
@@ -838,6 +841,10 @@ This is the per-article procedure. When executing an approved **plan** (see "Pla
838
841
  - **Cloud-hosted (`managed_proxy` / `subdomain`)** — the SEOAgent cloud renders the article, so the body DOES live in `.seoagent/`: write the full article to `.seoagent/content/{slug}.md` with full SEO frontmatter (slug, page_type, title, meta_title, meta_description, canonical, og, twitter, json_ld, images, internal_links) and `seoagent sync`. (No `content track` needed — the full file is the record.)
839
842
  8. **Update the cluster's link graph** — for sub_pillar/long_tail writes, edit the parent (and the cluster file) to add the new link UP. For pillar writes, ensure all sub_pillars are referenced.
840
843
 
844
+ ### Draft Review with the User (interactive sessions)
845
+
846
+ When the user is present and a draft is worth their eyes — the first article of a cluster, a landing page, or anything they asked to review — offer the **visual review loop** from `references/draft-review.md` instead of pasting the draft into chat: `npx -y human-review {draft-path}` opens it in their browser, they edit text directly and leave anchored comments, and you apply the whole batch to the source. Offer it once per session; if declined (or the session is headless), fall back to chat/PR review. For `mdx_sync` cluster batches the PR diff remains the default review surface — human-review is for single-draft, tight-loop review.
847
+
841
848
  ### Product Screenshots (SaaS — do this before AI images)
842
849
 
843
850
  **If `project.md` has `site_type: saas` (or the repo renders a real product UI), prefer real product screenshots over AI illustrations** — they're the highest-converting visual on a SaaS landing page or how-to article. Before falling back to a generated image, **read `references/screenshots.md`** and follow it: scan the page for spots where a UI shot would add value and is missing (hero, feature sections, how-to steps), then capture those screens **from the product's own code in this repo** (using your environment's screenshot capability + the project's dev server — no Playwright/Puppeteer dependency, no paid API), save them under `public/screenshots/`, and reference them with descriptive alt text. If you can't capture (no dev server / no screenshot tool / no real UI), the protocol's fallback leaves a `<!-- SCREENSHOT-TODO -->` marker + an AI image prompt so publishing still works. Non-SaaS sites skip this and go straight to image generation below.