Handbook
Task `pw_chatgpt_compose` v1
Send a governed prompt to ChatGPT in an existing Edge tab attached over CDP.
Updated
Task pw_chatgpt_compose v1
Send a governed prompt to ChatGPT in an existing Edge tab attached over CDP.
Transport
- Requires generic Edge CDP (
CDP_URL, defaulthttp://127.0.0.1:9222). - Reuses an open
chatgpt.comtab when present (prefers the Forge360 project gizmo URL). Creates a tab only when none exists. Detaches when done without closing a reused operator tab. - Set
CHATGPT_OPEN_NEW_TAB=1to force a fresh tab per run (legacy behavior). - When
chatgpt_project_nameis set (forge360 default: Forge360), resolves the project gizmo and navigates tohttps://chatgpt.com/g/g-p-…so chats are created inside that project (not under common Chats). - Operator must be logged in to ChatGPT in that browser profile.
Inputs
| Field | Required | Notes |
|---|---|---|
prompt |
yes | Full user prompt text |
category_id |
no | Used for dry-run fixtures and fragment defaulting |
cdp_url |
no | Overrides CDP_URL |
chatgpt_project_name |
no | ChatGPT project display name (forge360 default: Forge360); resolves gizmo URL via session API |
CHATGPT_PROJECT_URL |
env | Optional static project URL (skips gizmo lookup) |
dry_run |
no | When true, returns a deterministic pilot fragment (no browser) |
repair_problems |
no | On retry attempts, appended as a REPAIR block |
attempt |
no | Attempt counter from lmeta optimize loop |
Outputs
| Field | Notes |
|---|---|
ok |
true on success |
response_text |
Raw assistant text |
fragment |
Parsed JSON object when response contains JSON |
Pairing
Typically orchestrated by the kb-category-enrich lmeta flow with
kb_category_fragment_validate as the evaluator atom.