Integration mega prompt

Hand your own coding agent one prompt and it integrates PCIFIC end to end.

Copy the prompt below into the coding agent you already use (Claude Code, Cursor, Codex, or any agent that can read your repository) and run it from your shop's own project. It takes your codebase from never having used PCIFIC to fully integrated: the tools you choose are built into your own screens, in your own code and style, tried on your own listings, covered by your own tests, and shown to you running on your machine.

What it will do

The agent starts by telling you this list in its own words and asking whether it may begin, so nothing comes as a surprise.

  • 1. Work in a separate copy of your code: a git worktree (a second checkout of the same repository) called Pcific-Integration, so your own checkout stays untouched. It recommends this and you can say no.
  • 2. Read your codebase: what you sell, how a listing is stored, and every screen where a PCIFIC tool could help, from the publish button to the moderation queue to an import feed nobody reviews. Reading changes nothing. If your agent can run sub agents (helpers working in parallel), it sends them out for this.
  • 3. Ask you one round of questions, each with a recommended answer: which placements to build, how each one is delivered (native in your code is the default), how the AI should speak for your trade, and any field it could not work out from the code.
  • 4. Connect a test key with a few plain curl requests to PCIFIC. Nothing is downloaded or installed. You approve the key on your dashboard by typing a code, and it goes straight into your .env without appearing in the agent's conversation.
  • 5. Register your listing fields and settings, then try each tool you chose on a few of your real listings and show you the actual results. This uses your test key, which spends no credits.
  • 6. Build what you chose into your code, with tests in your repository's own style, and run your linter, tests and build.
  • 7. Start your site locally, open it in your browser, and walk you through each change: the normal case, a weak listing, and what happens if PCIFIC cannot be reached (your sellers can always still publish).
  • 8. Hand back: explain how going live works, offer a review by a separate agent, and ask whether the work becomes a pull request, a merge, or stays as local changes.

What it will not do

  • It never asks for a key in the chat, never opens or prints your .env, and never touches your live key. Going live is your step on the API keys page.
  • It does not choose for you. "Just do it" gets you its recommended list to confirm, not a silent pick.
  • It does not commit, push or merge anything until you say yes to that step, and it leaves any unfinished work it finds in your repository alone.

Going live

PCIFIC approves your account before you can make keys. Approved company email domains and accepted team invitations skip the wait. Account approval is the only approval from PCIFIC. To go live, choose Live key on the API keys page and press Activate live key; live calls spend credits bought from PCIFIC. Staff can suspend and restore live-key access (LIVE_KEYS_OFF).

Using PixelTrace

Live PixelTrace groups only take photos from the seller's phone camera, in iPhone Safari or Android Chrome, so arrange a person with a phone first. Opening the link on a computer does not use it up. Test keys can upload and confirm with test-photos and test-confirm.

If the run stops halfway

It keeps a status note in your docs folder (pcific-integration-status.md) with what it found, what you agreed, and the next action, and points your AGENTS.md at it. Paste the prompt again in a new session, with this agent or another one, and it carries on from where the last run stopped. Run it again whenever your listing model changes, so the fields PCIFIC knows about match yours.

The mega prompt (copy everything)
You are integrating this shop's codebase with PCIFIC (https://business.pcific.ai). PCIFIC licenses AI tools to shops over a REST API: listing checks for buyers and sellers, listing generation from photos, copied photo checks, and answers to buyer questions from the business's own documents.

Live PixelTrace groups only take photos from the seller's phone camera, in iPhone Safari or Android Chrome, so arrange a person with a phone first. Opening the link on a computer does not use it up. Test keys can upload and confirm with test-photos and test-confirm.

Never fetch the dashboard page this prompt came from; use the text you were given.

Integrate their chosen tools into their screens and code, prove them on real listings, test them, show them locally and document the work.

START BY SAYING WHAT YOU WILL DO
Before reading or changing anything, explain this list in one short, plain message:
1. Work in a separate copy of the code (a git worktree, a second checkout of the same repository, called Pcific-Integration) so their own checkout stays untouched. Recommended, and they can say no.
2. Read the codebase: what it sells, how a listing is stored, and every screen where a PCIFIC tool could help. Reading changes nothing.
3. Ask one round of questions, each with a recommended answer, so "yes" is often enough.
4. Connect a PCIFIC test key using a few curl requests to https://business.pcific.ai. Nothing is downloaded or installed. They approve it in their PCIFIC dashboard, and the key goes straight into .env without appearing in this conversation.
5. Send listing fields and settings, then try each chosen tool on real listings. Test keys spend no PCIFIC credits. Bring Your Own provider charges may still apply.
6. Build what they chose into their own code, with tests.
7. Start their site locally and show them each change.
8. Leave a status note in their docs and ask where the work should land (pull request, merge, or left local).
End that message with the first question: may you start, and should the work go in the Pcific-Integration worktree? Recommend the worktree.

HOW TO WORK
- Read before you ask. Anything the repository can answer, find out yourself. Ask only what the human owns: their business, their taste, and their choices.
- Ask in batches. Use the question tool if available, otherwise a numbered list. Every question carries your recommendation. Use their business language and show real fields or output.
- Make routine calls yourself and note them in the status document. Ask only when different answers would lead to different work.
- Stop before anything that changes the whole account, even when it is a routine call. Publishing a listing-fields version, changing shop or tool settings, and adding or changing documents all change what sellers and buyers see. Before any of these, show the human exactly what will change, in plain words, then end your turn. Make the change only after they say yes in a later message.
- Use sub agents if this environment has them. Each reading task names one question, allowed files and expected output. Split listing, seller, buyer, moderation and import flows, plus one reader per chosen tool's doc page. Later split placements while building and have a helper compare every mapped field with test output. You keep the human conversation and decisions.
- Talk plainly in their words. Keep updates short: done, found, next. Explain each PCIFIC term in brackets on first use.
- Keep keys out of the conversation. Never ask for a key, never open or print .env (only the step 4 checks may read it, printing a count or name), and never put a key in a committed file or in anything the browser receives. If they paste one anyway, tell them to revoke it on the API keys page and connect again. Work with the test key only; the live key is theirs to put into their production server.
- Leave their git history to them. Leave any uncommitted work you find exactly as it is. Do not commit, push, merge, or rewrite history until they have said yes to that specific step.
- The documentation is the contract. This prompt is the plan; where the two disagree, the documentation wins. Fetch a page whenever you are about to guess a field name, a request shape, or a limit. The index is https://business.pcific.ai/docs.txt (plain text, no key needed). Read https://business.pcific.ai/docs/getting-started.txt and https://business.pcific.ai/docs/marketplace-configuration.txt, then only the pages for the tools they choose. A 404 on a documentation link means the page is missing, not that the key expired.

THE TOOLS
Every tool the business has enabled is in scope, including Ask PCIFIC and PixelTrace. Leave a tool out only if it does not fit or the human declines it. Ask if you cannot tell which are enabled.
- Ask PCIFIC ("ask-pcific", POST /api/v1/ask-pcific): Give customers AI answers with checked sources and optional word-for-word quotes.
  Fits: Any shop, insurer, rental or business whose customers ask questions that its own policies, terms and help pages answer.
  Where it sits: In your own question box beside a listing, product, policy or booking page, or on a help page, backed by your server.
  Prove it: Add a returns policy via POST /api/v1/documents. With a test key, POST /api/v1/ask-pcific and quotes: true; check its quote and source. Check an uncovered question returns not_covered and supportLink. Update the policy, approve if required, and check the next answer uses it.
  Docs: https://business.pcific.ai/docs/ask-pcific.txt
- Safeguard listing check ("safeguard", POST /api/v1/safeguard/reviews): Closes the information gap between buyer and seller.
  Fits: Any shop, classifieds site, resale shop, rental, car dealer, ticketing or claims form that has listings with fields you can describe. The same review reads a car, a phone, a flat or a ticket, using your own fields.
  Where it sits: On the seller's publish action, as a gate (block below your minimum score) or as a recommendation, and again in the edit flow so a listing held back can be improved in place. On a seller's questions screen: show every question in sellerQuestions together, then send all the answers at once. On the listing page, a buyer FAQ from the faq field, and the questions a buyer would ask from questions. Over imported listings (feeds, partner uploads) that nobody reads, to sort the ones that need a person.
  Optional extras to offer: faq: true (Answers buyer questions upfront. The review keeps web search when enabled. A separate FAQ writer uses only the listing, photos and seller's words, never web pages. Leave it off if your listing page has nowhere to show them.) rewrite: true (Gives the seller better wording to accept. The listing itself is not changed, so you decide what to save.)
  Prove it: Review one complete listing and one missing important details using the test key. Poll each review to done, show its score and fixes, answer its seller questions together, and confirm the updated review is visible. On a refusal or failure, keep the listing and show its next step.
  Docs: https://business.pcific.ai/docs/safeguard.txt
- Orbit listing generation ("listing-generation", POST /api/v1/listings): Photos and a few words in, a finished listing in your own fields out.
  Fits: Anywhere an item is listed: shops and classifieds, resale shops and refurbishers listing in bulk, car dealers, rental and property listings, trade-in desks, and insurers who describe an asset from photos. Nothing in Orbit is tied to one kind of product. It writes only into the listing fields you publish, so it needs them set up first.
  Where it sits: At the start of the create listing page, before the form: the seller adds photos and a few words, and the form fills itself. Behind a Write it for me button on a listing the seller has already started. In a bulk tool for shops and refurbishers: upload each item's photos, start one listing per item and read them back as they finish.
  Optional extras to offer: safeguard: true (The seller sees what to improve before publishing. Show the draft straight away, but wait to publish until parts.safeguard is passed and publishReady is true. A failed review never loses the listing.) faq: true (Answers common buyer questions on the listing page before they are asked. It arrives after the draft; leave it off if your listing page has nowhere to show it.) price: true (An estimate based on real prices from at least two web pages, or no_price. It is not a guaranteed sale price. The check runs beside the listing and can return not_available if slow.)
  Prove it: Upload two real photos with POST /api/v1/images. Start POST /api/v1/listings with notes and the returned photo ids. Poll GET /api/v1/listings/{runId} every second while processing is true. Show all questions and send every answer in one request. Show the draft immediately. Check that item uses only your fields, pcific.category is valid, pcific.sources credits every value, and pcific.unfilled lists missing required fields with pcific.complete false. When Safeguard is on, publish only after parts.safeguard is passed and publishReady is true. Report the outcome with POST /api/v1/listings/{runId}/outcome.
  Docs: https://business.pcific.ai/docs/listing-generation.txt
- PCIFIC PixelTrace ("pixel-trace", POST /api/v1/pixel-trace/captures): Record submitted photo evidence taken with the PixelTrace camera, and flag copies of those photos in your own shop.
  Fits: Any business where a photo is evidence: second-hand and resale shops, classifieds, car dealers, rentals and holiday lets, and insurance claims. It matters most where a copied or old photo hurts the buyer.
  Where it sits: Start a group at the seller's photo step. Show its camera link and QR code, then wait for confirmation. Publish ready groups when their listings go live. Keep code and certificateUrl. Link the listing's badge to its certificate. Cancel unfinished groups with retract or Cancel photo group. Retract groups when their listings come down.
  Prove it: Use a test key. (a) You check by yourself, with no phone: POST /api/v1/pixel-trace/captures, check cameraUrl and minPhotos, then GET /api/v1/pixel-trace/captures/{id} (status capturing). Send at least minPhotos (1 by default) JPEG, PNG or WebP photos (640 to 4096 pixels) as the body of POST /api/v1/pixel-trace/captures/{id}/test-photos, then POST /api/v1/pixel-trace/captures/{id}/test-confirm (no body). These two calls work only with a test key on a test group. (b) A person tests the camera page: start a separate group with POST /api/v1/pixel-trace/captures, show its cameraUrl as a QR code, scan it on ONE phone, take the photos, then put them in order and confirm the photo group on the camera page; a second device is refused. To carry on with another phone, open the same link there and type the six-character code shown under "Switch phone" on the first phone; the first phone then stops working. Once the group is ready, publish it with POST /api/v1/pixel-trace/captures/{id}/complete and verify its certificate signature. Send one of its photos to POST /api/v1/pixel-trace/check and expect same_photo, an unrelated photo and expect no_match, then retract it with POST /api/v1/pixel-trace/captures/{id}/retract and expect its certificate to say it was retracted. It is marked test.
  Docs: https://business.pcific.ai/docs/pixel-trace.txt
The seller takes PixelTrace photos on PCIFIC's cameraUrl, sent as a link or QR code, on one phone only. Keep PCIFIC's camera steps; style only shop UI. Links wait 15 minutes unopened. Later, PUT {"openWithinMinutes":1440} to /api/v1/pixel-trace/settings (test key, 5 to 10080 minutes). Keep choices; sessions default to 30 minutes, publishing to 1 day. Checks get 600/key/minute within 600/account/minute for groups and checks, separate from 120 work starts. Ask the admin which policy and help documents Ask PCIFIC needs; request missing ones, never invent policies. Ask PCIFIC supports English only; other languages are not supported yet. Show answers with their sources. Citations always point to a real source Ask has read, and quotes are checked word for word. Ask is instructed to stay within its sources, but a sentence can occasionally add general advice that is not in them. For status not_covered, show the answer's supportLink instead of a guess. Send item.details.status, opaque buyer.accountId and item.reservedForAccountId, and item.price {amount,currency}; lookup receives buyerAccountId and returns status, reservedForAccountId and price.

WHEN TO CALL EACH TOOL
Wire each call at the moment its answer changes what the person sees or does, and no more often.
- Tool Safeguard listing check. Call it when: Once, when the seller presses Publish, to review the listing before it goes live. Once when a buyer asks for a check, if you offer that. A review takes a few seconds to a minute, so start it and read it back until it is done. Don't call it when: On every edit or page load, or again for a listing that has not changed since the last result. Reuse the last result until the listing changes.
- Tool Orbit listing generation. Call it when: When a seller asks for a draft from their notes and photos. If Orbit asks the seller questions, show them all together and send every answer in one request. Don't call it when: On every keystroke, or to fill in a listing that is already complete.
- Tool Ask PCIFIC. Call it when: When a buyer or visitor types a question that your documents could answer. Don't call it when: To prefill a chat box, on page load, or for a question your page already answers in fixed text.
- Tool PCIFIC PixelTrace. Call it when: When a seller takes photos in the managed camera, and before publishing to check them. Don't call it when: On every page load, or for listings that have no photos.
- Orbit outcome: POST /api/v1/listings/{runId}/outcome with {"event":"published","changes":[{"field":"title","percentChanged":20}],"finalListing":{"title":"Example item","quantity":1,"available":true}}; after giving up, send {"event":"abandoned"}. Changes are whole percentages 0 to 100. finalListing is up to 200 KB: preserve types and exclude photos and seller identity or contact details. Known runs need full monitoring (409 MONITORING_OFF); unknown runs return 404. Below the Safeguard minimum, answer open questions and wait for the review before reporting published.

WHAT EVERYTHING YOU BUILD HAS TO DO
These protect the people who use the shop, which is why they are not negotiable:
- PCIFIC being slow or down never stops a seller saving or publishing. The listing flow already works without us. Show a short apology in their words ("Sorry, we could not connect to the listing checks. You can still publish this advert.") and carry on.
- Call PCIFIC from their server only. Read the key from the environment: PCIFIC_LIVE_KEY when it is set, PCIFIC_TEST_KEY otherwise, so the same code runs here on the test key and in production on the live key.
- Everything a buyer or seller reads is plain and specific: what happened and what they can do next. Never show error codes, status numbers, hostnames or raw JSON.
- Never name PCIFIC or its tools (Safeguard, Orbit, Ask PCIFIC, PixelTrace) to buyers or sellers in the shop's own screens or messages. Beside AI text, show the shop's aiNotice setting (GET /api/v1/marketplace/settings) word for word, or nothing when empty.
- It looks native. Reuse their components, styles and wording. No raw browser controls (such as an unstyled file input) beside their own buttons.
- From their server, upload each photo with POST /api/v1/images as a multipart/form-data file, then pass the photo ids the response lists under images to the tool. One upload: up to 12 photos, 15 MB each, 60 MB in all. PCIFIC accepts JPEG, PNG and WebP only, so keep the photo picker's accept list to those three, and convert a HEIC photo (iPhone) to JPEG in the browser before uploading, with a clear message if that fails. See the iPhone photos (HEIC) section of https://business.pcific.ai/docs/listing-generation.txt.
- Handle errors from the body. Every PCIFIC error carries error (what went wrong), code (a stable code to branch on), tryThis (what to do next) and, when a field is at fault, problems (each place with its own tryThis). Follow tryThis. A 429 carries a Retry-After header. Automatically retry RATE_LIMITED only, after that wait. For TEST_DAILY_CAP_REACHED or SPEND_LIMIT_REACHED, stop and follow tryThis until the cap resets. Read code and tryThis before handling a 5xx. A 5xx is on PCIFIC's side: keep building with saved responses, retry after the Retry-After header when there is one, then back off (2, 4 then 8 seconds) and stop after three tries, sending the same Idempotency-Key each time where the call takes one. BYO_PROVIDER_ERROR means your own model provider (Bring Your Own) did not answer: check with that provider that the key, its credits and the model work, and contact PCIFIC support to change them. Never retry a 4xx other than 429 without changing the request.
- Their tests stub PCIFIC with recorded responses, so the suite never spends credits.

THE STEPS

1. Set up
If they agreed, use ../<repo-folder>-pcific-integration, named after this repository's folder. Before reusing it, git -C <path> rev-parse --show-toplevel must print that folder, and git worktree list must show it. If either check fails, pick another name and tell the human. If both pass, enter that existing worktree without creating it again or overwriting its local files. Only for a new folder, run git worktree add -b Pcific-Integration <path>, confirm it in git worktree list, then copy .env and any other hidden env files, data/, uploads/, and node_modules (or install dependencies). Enter it and name the folder and branch. If they said no, confirm changes will land here. If this is not a git repository, first copy the whole folder to ../<repo-folder>-before-pcific as a backup, tell the human where it is, and work in the original folder. Do not run git init without asking.
Then look for the status document, docs/pcific-integration-status.md (or the same name in whichever folder this repository keeps its docs). If it exists, read it, tell them where the last run got to, and carry on from its next action. If not, create it with these headings and keep it current after every step and before you stop for any reason:
  # PCIFIC integration status
  Status: / Step: / Next action: / Blocked on: / Last updated: / PCIFIC changes read to:
  ## The shop
  ## Field mapping
  ## Where PCIFIC fits
  ## What we agreed to build
  ## Registered configuration
  ## Verification results
  ## What is wired in, and where
  ## Decisions and open questions
Add a short section to this checkout's AGENTS.md (or CLAUDE.md, or whichever instructions file it uses; create AGENTS.md if there is none) titled "PCIFIC integration", pointing at that document and saying the setup is not finished yet.

2. Read the shop
Use sub agents for this. Find out, and record in the status document:
- What it sells, in which language and currency, and whether prices are stored in major or minor units (pounds or pence).
- The listing model: the table, model or type for one item for sale, with every field, its type, constraints, and what it means to a buyer. What the code calls a draft, a published listing and a sold one.
- The journey by file and function: create, edit, validate and publish a listing, search and read listings, messaging, checkout and staff review.
- Imported listings, feeds and partner APIs: seller review may be valuable where nobody checks them.
- How the code already handles secrets, outbound requests, errors and tests, so nothing you add is a new pattern.
Map every place a tool fits without filtering: one tool may fit publish, edit and imports. Missing surfaces are findings. Leave out tools that do not fit this business. Under Where PCIFIC fits, record each placement, tool, user benefit and rough effort.
Draft the field mapping under Field mapping: which field is the title, description, price, images, category and condition; which fields identify the exact item (brand, model, reference number); which fields are required to publish; and anything you could not resolve from the code.

3. Ask one round of questions
Open with the size of the map in their words: "I found eleven places where these tools would fit, across three tools." Walk it grouped by where things sit in their flow, and for each placement say what changes for the person using it. Then ask everything in one batch, each with your recommendation:
- Which placements to build. Each one is a yes or no. Recommend a starting set and say why. "Just do it" is not a choice of placements: if they say it, show your recommended set as a short list and ask them to confirm it.
- How each one is delivered: native in their own code (recommended, because they own it and it matches their site), or API only behind a button they already have.
- Any optional extras for the chosen tools, with their trade off.
- Field mapping rows you could not resolve, and anything they call by a different name than the code does.
- How the AI should speak and judge for their trade, because taste cannot be read from code: tone and voice, words or claims that are banned, what each condition grade means, how a specialist in their trade checks an item and which sites they trust, how every description should be laid out (bullet points recommended), whether to switch on the price check, and what they call each buyer check verdict and whether it lets a listing through, sends it to a person, or stops it.
Record the answers under What we agreed to build, and mark the placements they turned down as declined rather than deleting them. Only ask a second round if their answers open a genuinely new question.

4. Connect a test key
Run grep -c '^PCIFIC_TEST_KEY=.' .env here (prints only a count). If .env is missing or the count is zero, connect a key. Otherwise check it below: skip to step 5 only when GET /api/v1/key succeeds and "can" lists every scope below; otherwise connect a new key. Tell the human: curl requests to https://business.pcific.ai install nothing. They approve the key in their dashboard; it goes straight into .env without appearing here. Sign in first; only accounts still pending wait for staff review and an approval email. Approved-domain signups and accepted invitations continue after second-check setup. On the link page, keep the requested permissions ticked (Use the tools; Change tool settings, Set up listing fields and Manage Ask PCIFIC documents under Change your setup), or step 5 fails with a 403. Run here:

# 1. Start a connection. The answer holds id, confirmationCode and pollToken.
curl -fsS -X POST https://business.pcific.ai/api/key-link \
  -H 'content-type: application/json' \
  -d '{"suggestedName": "<a short name for this business>", "destination": ".env", "scopes": ["orbit","safeguard","ask-pcific","pixel-trace","settings","listing-fields","read"]}'

# 2. The human opens https://business.pcific.ai/dashboard/link-key?connection=<id>,
#    enters the code, checks the key, clicks Generate, then confirms with a password or code if asked.

# 3. Check whether they have clicked Generate. Wait for "status": "ready".
curl -fsS -X POST https://business.pcific.ai/api/key-link \
  -H 'content-type: application/json' \
  -H 'x-pcific-link-token: <pollToken>' \
  -d '{"id": "<id>", "action": "poll"}'

# 4. Collect the test key, once only. It goes straight into .env and is never printed.
#    If this fails, stop and tell the human. Never run it a second time. On installation failure, keep the private .pcific-key.*/key response for recovery.
(umask 077 && key_dir=$(mktemp -d .pcific-key.XXXXXX) && curl -fsS -X POST https://business.pcific.ai/api/key-link \
  -H 'content-type: application/json' \
  -H 'x-pcific-link-token: <pollToken>' \
  -d '{"id": "<id>", "action": "collect"}' > "$key_dir/key" && { if [ -f .env ]; then cp -p .env "$key_dir/env"; else : > "$key_dir/env"; fi; } && { grep -v '^PCIFIC_TEST_KEY=' .env 2>/dev/null; cat "$key_dir/key"; } > "$key_dir/env" && mv "$key_dir/env" .env && rm -f "$key_dir/key" && rmdir "$key_dir")

# 5. Prove the key works without showing it. The answer names the key, never its secret.
(PCIFIC_TEST_KEY="$(grep '^PCIFIC_TEST_KEY=' .env | tail -n 1 | cut -d= -f2-)" && curl -fsS https://business.pcific.ai/api/v1/key -H "Authorization: Bearer $PCIFIC_TEST_KEY")

Suggest a short name for this shop in step 1, plus "shop": "<shop name>" if known, and "scopes": [<each chosen tool>, "settings", "listing-fields", "read"] plus "documents" if needed (tools: "orbit", "safeguard", "ask-pcific", "pixel-trace"); keep it valid JSON. Give the human step 1's link and code. Connections last 30 minutes before Generate; five wrong codes cancel them. Once they confirm Generate, poll until ready, collect and check. Collect once: if it fails, stop and tell them. Add .env to .gitignore first if absent. If the check gives no key name, reconnect; never inspect .env.

If curl fails, ask them to make a test key on the API keys page (https://business.pcific.ai/dashboard/keys) with those permissions, add it to .env as PCIFIC_TEST_KEY, and run the key check.

5. Register the shop
Send every request here with Authorization: Bearer $PCIFIC_TEST_KEY, from the environment. Follow HOW TO WORK.
- GET /api/v1/marketplaces lists this key's shops. A repository works in one shop: ask which, and before adding one. Never change another brand's. Keep its id as PCIFIC_MARKETPLACE_ID and send ?marketplaceId=<id> on every call. One business key can serve several repositories; each shop has its own test allowance.
- Read GET /api/v1/marketplace/settings, GET /api/v1/schema-draft and each chosen tool's settings with GET /api/v1/{tool}/settings (orbit, safeguard, ask-pcific or pixel-trace). Keep what the human already set.
- Write one JSON Schema per category from the field mapping, in draft 2020-12. Each description is 1 to 2,000 characters. A price is an object marked "x-pcific-money": true: a whole-number amount in the currency's smallest unit (pence, cents, or yen for JPY) and a currency code. Mark seller-only values "x-pcific-ask-seller": true. Include a field only in the category files it belongs to. Keep each file under 10 MB and each category under 500 fields. Every $ref points inside the same file. Full rules: https://business.pcific.ai/docs/listing-fields-by-hand.txt.
- Show the human, in plain words, the settings you will change with their new values, the categories and fields you will upload, and that publishing makes them the live listing fields. Then end your turn, and wait for a yes in a later message.
- After the yes, set the shared settings with PUT /api/v1/marketplace/settings and each chosen tool's settings with PUT /api/v1/{tool}/settings (a PUT changes only what it sends). Upload each category with PUT /api/v1/schema-draft/categories/{category}, with ?parent= for a sub-category and the name percent-encoded. PCIFIC checks each file as it arrives and refuses a bad one with 422 SCHEMA_INVALID, naming each problem and where it is: fix those and send the file again. Uploading changes no live listings.
- Show the final fields: publishing makes them live. End your turn and wait for a yes in a later message. Then publish with POST /api/v1/schema-versions and a fresh random Idempotency-Key header. Reuse that same key and request body if the response is lost. Record the returned version. Published versions never change. Edits need a new version.
- Fetch https://business.pcific.ai/changelog.txt and put the date of its newest entry in "PCIFIC changes read to".

6. Prove each chosen tool on real listings
Test each chosen tool on three real listings: strong, weak and ordinary, plus relevant imports. For Safeguard only, also run a suspicious listing (far too cheap, with scam signs) and check its verdict reaches the buyer. Send an optional Idempotency-Key on every POST, PUT and DELETE; save the exact request. For a broken run, drop the reply and retry. Check Idempotent-Replayed: true, the same result and usage to prove no duplicate work. Ask PCIFIC replays its saved JSON or stream through done with no second charge. Replace partial text. Test keys spend no credits. Disclose made up data. Read back each field; follow each tool's "Prove it" line. For generic output, check field descriptions, the category files and condition-grade settings; fix them and publish the next fields version. Retry rules and Node/Python: https://business.pcific.ai/docs/errors-and-limits.txt.
Be careful with the test cap: settle each request shape from the docs first, send one call per thing you need to learn, and never repeat a request to see if the answer changes. GET /api/v1/usage shows the test cap and how many AI requests you have used today. If a call answers 429 TEST_DAILY_CAP_REACHED, the day's cap is used up: stop and tell the human, and try again after midnight UTC.
Show each listing's real outputs and ask whether they sound right for this trade. Put long output in a local HTML page and open it (if you cannot open a browser, give the human the path and wait). Ask for feedback and record Verification results.

7. Build
Build the agreed placements and nothing else, the way step 3 agreed for each. Put the PCIFIC calls in one shared server module that follows this codebase's existing patterns. Use sub agents per placement where they can work without touching the same files. Then add tests in this repository's own style covering each placement, a successful call, a retryable failure, and the unreachable path that still lets the seller save and publish. Run their tests, linter and build, and fix what fails.

8. Show them
Start the full local site as this repository does, open it (if you cannot open a browser, give the human the local address and wait), and walk each placement in user order: normal, weak listing and unreachable. Explain what changed and why it helps buyers, sellers or staff. Ask what to change and do it.

9. Hand back
- Bring the status document to complete: the schema version, the mapping, the config choices, the verification results, and every placement with the file and function it lives in. Keep the declined placements, marked declined, so the next person can see what else is possible.
- Change the AGENTS.md section to say the integration is done, point at the status document, and remind future work to register a new schema version when the listing model changes and to check https://business.pcific.ai/changelog.txt?since=<that date> for changes.
- Going live: PCIFIC approves your account before you can make keys. Approved company email domains and accepted team invitations skip the wait. Account approval is the only approval from PCIFIC. To go live, choose Live key on the API keys page and press Activate live key; live calls spend credits bought from PCIFIC. Staff can suspend and restore live-key access (LIVE_KEYS_OFF). If the page says live keys are off, contact PCIFIC support before using it. Put the key in production as PCIFIC_LIVE_KEY yourself. Set daily, weekly and monthly spending limits with GET and PUT /api/v1/spend-limits.
- Offer a review of the work by a separate agent or another model, and offer to build any declined placements in parallel with sub agents.
- Ask where the work should land: a pull request (recommended if the project uses them), a merge into their main branch, or left as local changes. Do what they choose and nothing more.
- Ask whether anything about this integration was confusing or broken, and offer to send it to PCIFIC through the feedback form in their dashboard.
Then say in one short message where the work is and that you are done.