{
  "version": 1,
  "note": "v1 \u2014 FedM8 directive: llm.fedm8.com + FedM8 processes; billables stay on bill.jbnx.io via projects.jbnx.io claim loop",
  "text": "# FedM8 \u2014 work directive (1099)\n\n**https://hi.fedm8.com** \u00b7 version **1** \u00b7 re-fetch; don't trust a paste.\n\nYou are here to **get FedM8 work done**. Attach this URL **once**. After that, the human only needs to name the task. Company claims, portal handovers, and **billables stay on the JBNX stack** (`projects.jbnx.io` \u2192 `bill.jbnx.io`).\n\nFour rules matter:\n\n1. **Respect claims** \u2014 one live lease per project slug (`fedm8`).\n2. **Update the portal via the API** \u2014 status / close-out, not by rewriting marketing HTML for product status.\n3. **Track token usage on every ask** \u2014 record it, show it at the end of the chat reply, and attach the same numbers to the portal status/handover.\n4. **Every run is customer-billable \u2014 once.** Your claim opens **one** billable work session on **bill.jbnx.io**; status/close-out `--done` updates that same receipt; release stops the clock. Never work unclaimed; never walk away without release; **never post a second billable for the same claim.**\n\nEverything else is in service of those four.\n\n- `AGENT_API_BASE=https://projects.jbnx.io`\n- Models (FedM8): `https://llm.fedm8.com/v1`\n- Product: `https://scan.fedm8.com`\n- **No X-Agent-Gate.** `/api/1099/*` is ungated and rate-limited.\n- Helper: `projects-portal/scripts/agent.sh` (canonical) \u00b7 `./scripts/agent.sh` when present  \n  (`sign-in` \u00b7 `claim` \u00b7 `boot` \u00b7 `brief` \u00b7 `facts` \u00b7 `usage` \u00b7 `ai-os` \u00b7 `renew`/`rn` \u00b7 `status`/`st` \u00b7 `release` \u00b7 `free` \u00b7 `held` \u00b7 `whoami` \u00b7 `next` \u00b7 `doctor`)\n\n---\n\n## FedM8 stack (use these, not jbnx product hosts)\n\n| What | Value |\n|---|---|\n| Marketing | https://scan.fedm8.com/ |\n| Tools | https://scan.fedm8.com/app.html |\n| Academy | https://scan.fedm8.com/learn.html |\n| Features by plan | https://scan.fedm8.com/features-by-tier.html |\n| Compare | https://scan.fedm8.com/compare.html |\n| Ship board | https://scan.fedm8.com/features.html |\n| Hub (internal) | https://scan.fedm8.com/hub/ \u00b7 `hub.fedm8.com` when DNS live |\n| This directive | https://hi.fedm8.com \u00b7 `/hi/` on Pages until DNS |\n| LiteLLM | https://llm.fedm8.com/v1 (aliases `cheap` / `standard` / `frontier`) |\n| scan-worker | https://scan-worker-production-6648.up.railway.app |\n| AI health | `GET \u2026/ai/health` \u2192 `litellm_base: \"https://llm.fedm8.com/v1\"` |\n| Billing health | `GET \u2026/billing/health` |\n| Supabase | project `oeohvlajtexuxjfrtcdb` |\n| Repo | https://github.com/jbnx/fedm8-scan |\n| Portal project slug | **`fedm8`** |\n| Claims / handover API | https://projects.jbnx.io/api/1099/* |\n| Billables | **bill.jbnx.io** (automatic via claim \u2192 release \u2014 do not double-post) |\n\nWorker env for models: `LITELLM_BASE=https://llm.fedm8.com/v1`, `LITELLM_API_KEY` = LiteLLM master key. Never put LLM keys in the browser.\n\n---\n\n## How the company portal works (still projects.jbnx.io)\n\nhttps://projects.jbnx.io is the company command center. FedM8 product HTML is **not** the source of truth for agent handovers.\n\n| Surface | What it is |\n|---|---|\n| `#/p/fedm8` | FedM8 project page \u2014 handover BLUF, usage, next |\n| `#/` home | RAD lifecycle board |\n| `/api/1099/*` | Claim / status / close-out / usage / release |\n\nAgent \u2194 portal contract:\n\n1. Claim **`fedm8`** before product work on this repo.\n2. `boot` / `brief` loads handover + top facts (\u22642k). Do not re-paste this whole page every turn.\n3. Product status lives in portal handovers + repo `HANDOVER.md` \u2014 never by rewriting `index.html` as the only status.\n4. Publish feature board via `node portal/publish-features.cjs` (claims `fedm8`, close-out, release).\n\nCatalog: `GET /api/1099/help` \u00b7 Who\u2019s free: `GET /api/1099/board?free=1` \u00b7 Contract: `GET /api/1099/ai-os`\n\n---\n\n## Token usage (always)\n\nOn **every** completed ask / turn that used a model:\n\n1. **Record** via API / helper:  \n   `./scripts/agent.sh usage --engine cursor --model <model> --in <n> --out <n> [--slug fedm8]`  \n   or `POST /api/1099/record-usage`\n2. **Show** at the end of the chat reply:  \n   `Token usage: in=\u2026 out=\u2026 model=\u2026 \u00b7 recorded`\n3. **Attach** the same line to `status` / `close-out`.\n\nGateway agents calling FedM8 product AI should prefer **`llm.fedm8.com`**. Portal metering still goes through the 1099 usage API.\n\nSilent $0 is a defect.\n\n---\n\n## Billable time (always) \u2014 bill.jbnx.io\n\nCustomers pay for AI work by the hour at **bill.jbnx.io**. Recording is **automatic through the portal claim loop** \u2014 do not skip, and **do not double-post**.\n\n1. **`claim` starts the clock** \u2014 one session in `billing.work_sessions`.\n2. **`status` / `close-out` updates that same receipt** \u2014 `--done` is customer-facing plain language.\n3. **`release` stops the clock** \u2014 claim\u2192release is what gets billed.\n4. **Never also call** `POST https://bill.jbnx.io/api/agent/work-start` / `work-end` when you claimed via the portal.\n5. **One claim \u2192 one session \u2192 one release.**\n\nA run with no billable session is a defect. Duplicate billables are also a defect.\n\n---\n\n## Token health (always)\n\n| in:out | Band | Action |\n|---|---|---|\n| < 5:1 | Healthy | keep going |\n| 5\u201310:1 | Good | keep going |\n| 10\u201315:1 | Neutral | finish the task |\n| 15\u201320:1 | Degrading | cycle at next boundary |\n| > 20:1 | Unhealthy | cycle NOW |\n\nAppend after the usage line: `Token health: 15:1 \u00b7 Degrading \u2192 cycle at the next task boundary`\n\n---\n\n## Default loop (every FedM8 job)\n\n```bash\n./scripts/agent.sh sign-in\n./scripts/agent.sh claim fedm8 \"what you'll do\"\n./scripts/agent.sh boot                 # Compiled Brief \u22642k\n# \u2026work in jbnx/fedm8-scan; models via llm.fedm8.com when calling FedM8 AI\u2026\n# verify live scan.fedm8.com / worker health \u2014 then:\n./scripts/agent.sh usage --engine \u2026 --model \u2026 --in \u2026 --out \u2026 --slug fedm8\n./scripts/agent.sh status --state \"\u2026\" --next \"\u2026\" --done \"\u2026\" --tokens-in \u2026 --tokens-out \u2026 --model \u2026\n./scripts/agent.sh release \"done\"\n```\n\nPrefer `boot` over re-pasting this directive every turn.\n\nShip path: PR on `fedm8-scan` \u2192 verify \u2192 present in chat \u2192 chat approve \u2192 merge. After merge, confirm GitHub Pages / Railway as needed. Do **not** ask the human to click Approve on GitHub.\n\n---\n\n## FedM8 product honesty (do not break)\n\n- USAspending publishes **awardees**, not losers \u2014 never invent win/loss.\n- Public Basic/Pro/Pro+AI = Stripe Checkout after sign-in (`BILLING_ENABLED=true`).\n- Consulting invoices stay **off** the website.\n- FedM8 AI is **read-only** (whitelist tools; cite-or-blank).\n- Academy lessons stay on `learn.html` \u2014 not buried in tool UIs.\n- Voice scripts (`_internal/VOICE_SCRIPTS.md`) are internal only.\n\n---\n\n## Verify before you call it done\n\n1. Hit live URLs you changed (`scan.fedm8.com/\u2026`, worker `/ai/health`, `/billing/health`).\n2. If you shipped Pages HTML: confirm the live document shows the new content (not only git).\n3. If you changed worker AI: `litellm_base` must be `https://llm.fedm8.com/v1`.\n4. Record usage + portal status, then release.\n\n---\n\n## Don\u2019t\n\n- Use `llm.jbnx.io` for FedM8 product AI \u2014 use **`llm.fedm8.com`**.\n- Call `/api/1099/*` on hi.fedm8.com \u2014 use **projects.jbnx.io**.\n- Skip billables, double-post billables, or work without claiming `fedm8`.\n- Invent win/loss, FedRAMP stickers, or \u201cfull SLED ingest\u201d claims.\n- Paste secrets into chats or commits.\n- Auto-merge to production without chat approve.\n- Re-paste this full directive every turn after the first attach \u2014 use `boot`.\n",
  "urls": {
    "html": "https://hi.fedm8.com/",
    "md": "https://hi.fedm8.com/md",
    "json": "https://hi.fedm8.com/json",
    "txt": "https://hi.fedm8.com/txt",
    "md_pages": "https://scan.fedm8.com/hi/directive.md",
    "json_pages": "https://scan.fedm8.com/hi/directive.json",
    "txt_pages": "https://scan.fedm8.com/hi/directive.txt",
    "pages_path": "https://scan.fedm8.com/hi/",
    "portal": "https://projects.jbnx.io/#/p/fedm8",
    "llm": "https://llm.fedm8.com/v1",
    "product": "https://scan.fedm8.com",
    "billing": "https://bill.jbnx.io",
    "agent_api": "https://projects.jbnx.io"
  },
  "security": {
    "secrets_on_page": false,
    "agent_gate": false,
    "api": "https://projects.jbnx.io/api/1099/* ungated rate-limited"
  }
}
