dotagents

Facebook Page Publishing

Overview

Operate Guillaume’s Facebook Pages through a dedicated, user-authenticated Chromium profile connected to Hermes by Chrome DevTools Protocol (CDP). The skill separates four states that must never be conflated:

  1. Observed — the Page and its live UI were inspected.
  2. Drafted — copy/media were prepared outside or inside the composer.
  3. Previewed — the final Page identity, audience, copy, media, labels, and available action were verified.
  4. Published — Facebook accepted the action and the resulting timeline/content-library entry was read back.

A draft is not a publication. A clicked button is not proof of publication. A proposed future is not an observed fact.

When to Use

Use for requests such as:

Do not use for personal-profile posting, advertising spend, credential entry, account recovery, payment, permission changes, or 2FA approval unless the user explicitly scopes that separate action.

Required Runtime

Read references/connected-browser.md before attaching or repairing the browser.

The normal local configuration is:

browser:
  cdp_url: http://127.0.0.1:9222

The dedicated profile is:

/home/mia/.hermes/chrome-debug

The user performs login, password, CAPTCHA, and 2FA interactions directly in Chrome. Never request or type credentials. Keep the CDP endpoint bound to 127.0.0.1; do not expose port 9222 to the LAN or Internet.

Hard Publication Contract

Authority

Preview checkpoint

Immediately before publication, verify from a fresh browser snapshot:

If any item differs from the authorized content, stop and report the difference.

Proof

After the final action:

  1. Wait for the composer to close or a success state to appear.
  2. Open the Page timeline or Professional Dashboard content library.
  3. Locate the new item by a distinctive excerpt, not merely by list position.
  4. Read back its Page identity, publication state/time, and permalink when available.
  5. Report the URL. If no item can be read back, report publication as unverified, not successful.

Workflow

1. Attach without moving the user’s session

Start by listing tabs:

browser_cdp(method="Target.getTargets", params={})

Prefer the Page tab already opened by the user. Do not navigate unrelated tabs. If browser tools require initialization, navigate only the intended Facebook Page URL.

2. Verify the Page and active identity

From a fresh snapshot, verify at least two independent signals:

Facebook can show one Page while the session is acting as another. For example, a Switch into <Page>'s Page to take more actions prompt means the visible Page and active identity are not the same. Never publish until the intended identity is explicit.

3. Observe before composing

For voice/trajectory work:

  1. Read the profile bio, category, links, cover/profile imagery, and current Page state.
  2. Sample several posts across the requested time range.
  3. Expand See more before quoting or classifying a long post.
  4. Capture the displayed date. Facebook often stores it in text referenced by aria-labelledby even when the visible DOM contains only a dot.
  5. Separate:
    • Page-authored words;
    • shared-source text;
    • linked-page preview text;
    • your interpretation.
  6. Label future directions as plausible possibilities, not facts.

Never infer a Page’s enduring character from one post. Read references/page-voices.md for the measured Tushell and Guillaume Coder baselines, then re-observe the live Page because those baselines can evolve.

4. Detect current composer capability

Open the composer but enter no text. Snapshot the available buttons, then inspect More post options if present.

Treat the live UI as authoritative. Do not assume a feature exists because Facebook once supported it or another surface supports it.

For polls:

Close the untouched composer after reconnaissance.

5. Draft in the correct voice

Use the requested Page’s reference profile, recent live posts, and the user’s immediate purpose. Preserve the distinction between the Pages:

Do not copy old posts verbatim unless quoting with attribution. Do not manufacture events, results, dates, relationships, or endorsements.

6. Populate and preview

  1. Re-snapshot immediately before each click; Facebook ref IDs become stale after UI changes.
  2. Open the composer by accessible name such as What's on your mind?, Share a thought..., or Create a post.
  3. Type the approved draft into the textbox.
  4. Attach requested media through the visible Photo/video or upload control.
  5. Do not click Next merely to see what happens if that transition can publish or schedule; inspect its semantics first.
  6. Return a concise preview: target Page, text, media, audience, timing, labels, and detected publication action.

7. Publish only under authority

Use a fresh snapshot and click the exact final action. Handle confirmation dialogs explicitly. Never accept native browser dialogs blindly; read the message and use browser_dialog only when it matches the authorized action.

8. Verify and return a receipt

The receipt should contain:

Page: <exact Page>
State: published | scheduled | unverified
Time: <Facebook-displayed time when available>
URL: <permalink when available>
Excerpt: <distinctive opening text>

Browser Reliability Rules

Common Pitfalls

  1. Wrong active Page identity. The timeline name is not proof of posting identity. Check the composer and Comment as indicator.
  2. Mistaking linked preview copy for Page-authored copy. Record the story message separately from the preview title/description.
  3. Treating Next as harmless. It can lead directly to distribution settings or publication. Respect the preview checkpoint.
  4. Claiming poll support from memory. Inspect More post options; on 2026-09-23 Tushell’s standard Page composer exposed no native poll.
  5. Reusing stale refs. Every modal change can renumber elements.
    • Facebook may reset an upload input’s files after accepting media. Verify the composer’s attached-media preview, filename and dimensions; an empty input is not proof of failed attachment. Do not attach a duplicate to repair it.
    • A newly published timestamp anchor may initially contain a placeholder fragment such as #?..., not its permalink. Hover that actual timestamp through the browser, then read the hydrated /posts/... href and open its clean permalink to verify the named post. Never invent a permalink from the placeholder.
    • The Public audience icon can be svg[role="img"][title="Shared with Public"], not an img[alt]. Prefer the accessibility snapshot; inspect SVG titles when a DOM-only check misses it.
    • Detached clones can collapse paragraph boundaries in innerText. Read the attached message or serialize its actual paragraph blocks. For a live-copy comparison, normalize Facebook’s whitespace and decode the episode destination from l.facebook.com only; retain the exact composer-text comparison before publishing.
  6. Calling a submitted click success. Read the post back and return its URL.
  7. Overwriting the Page voice with generic marketing. Ground drafts in live posts and the page-voice reference.
  8. Making a forecast sound settled. Mark it as inferred or possible and name the observations supporting it.

Verification Checklist