Commit graph

53 commits

Author SHA1 Message Date
justin
a4bad723bc esign: ink-reproduction consent gate + patent-risk research
Consent gate (the legal linchpin from the wet-signature memo):
- migration 092 adds ink_consent/ink_consent_at/ink_consent_text to esign_records
- extract pure, unit-tested gate logic into esign-ink-consent.ts (DRY single
  source for route + signing page): isInkReproduction / inkConsentRequired /
  inkConsentSatisfied + verbatim client-safe INK_CONSENT_TEXT
- portal-esign-generic.ts: GET surfaces ink_reproduction + consent text; POST
  gates DRAWN signatures on ink-path docs on explicit consent, stores it
- signing page locks the signature block until consent is checked (drawn only)
- npi_provider marks cms855/cms10114 esign metadata ink_reproduction=true
- 33 unit checks: gate truth table + consent text omits all internal mechanics
  (plotter/machine/CMS/MAC/etc) and keeps required legal reassurances

Patent-risk memo (docs/legal/patent-risk-mechanical-wet-signature.md):
- prior-art-dated risk analysis (autopen 1803/1942, plotters, CNC = public domain
  => low risk on core concept; e-sign workflow space litigious)
- firsthand recent-grant sweep (1.58M USPTO grants 2021-2025, queried via DuckDB):
  ZERO patents on machine-applies-signature-in-ink; e-sign players hold only
  electronic-workflow patents. Not an FTO; flags where attorney search is needed
2026-06-07 04:44:11 -05:00
justin
f8d2a7f01f docs: remote wet-signature product opportunity map + legal precedent research
Two internal docs:

- docs/plans/remote-wet-signature-products.md: opportunity map for new remote
  signing/filing services that leverage the existing esign + wet-ink + fulfillment
  stack (83(b) IRS filings, apostille concierge, estate packages, mechanics
  liens, FinCEN BOI / SAM.gov renewals, RON layer, proof-of-life attestations).
  Prioritized by revenue x fit x moat; top 3 = 83(b), apostille, estate package.

- docs/legal/remote-mechanical-wet-signature-precedent.md: source-grounded legal
  research on whether a machine-applied wet-ink signature (autopen/plotter
  reproducing the signer's own captured strokes) is authentic/valid/accepted.
  Primary sources retrieved firsthand: DOJ/OLC 2005 autopen opinion (29 Op.
  O.L.C. 97); CMS-855B 'signatures must be original'; ESIGN 15 USC 7001/7006;
  UCC 1-201 'Signed'. Key finding: common-law + autopen precedent strongly
  support own-signature-by-directed-machine as VALID, but 'original ink / no
  stamps' administrative rules (CMS-855) are UNADJUDICATED -> highest risk, keep
  true wet-sign fallback. Notarized/witnessed instruments: do NOT use plotter.
  Explicitly separates established law from interpretive/no-precedent zones.
2026-06-07 04:24:06 -05:00
justin
894d989445 Add portable Line-us pen-arm support to ink-signature pipeline
Adds a second machine class (small fan-shaped reach arm) alongside the
CR-10/AxiDraw rectangular-bed plotters, so wet signatures can be produced
while away from the home station.

ink_signature_plotter.py:
- PlotterConfig gains dialect (marlin|lineus) + name; new LineUsConfig
  (native units, pen height = per-move Z, reach annulus from shoulder pivot).
- Named machine profiles (cr10 default, axidraw, lineus) via load_profile().
- bed_mm_to_lineus_units(), check_reach() (annulus for lineus, rectangle for
  marlin), compute_jig_offset_for_box() (solves jig from the ACTUAL fitted ink
  extent so a wide cell line doesn't over-constrain a small arm).
- emit_gcode() dispatches to emit_marlin_gcode()/emit_lineus_gcode().
- send_lineus(): WiFi TCP 1337 (NUL-terminated, ok-acked) or USB serial,
  dry_run=True default (same gating as the CR-10 path).

ink_signature_cli.py: --profile, --solve-jig (auto-applies jig offset),
--lineus-host/--lineus-usb, reach-check that refuses to --plot out-of-reach
on Line-us.

Tests: 43 checks (was 30) covering profiles, reach check, jig solve, lineus
emitter, dry-run sender. Docs updated with profiles + portable workflow.
2026-06-07 03:45:46 -05:00
justin
0b06043437 healthcare: verify wet-signature requirements across all services
Source-grounded check of which services need an ORIGINAL ink signature (plotter
target) vs e-sign/typed. Verified firsthand against the official forms:

- Confirmed wet-ink: the 5 CMS Medicare/NPI paper filings only (855I/B/O +
  10114), which are exactly the no-login Standard-path filings the plotter serves.
- CLIA CMS-116 does NOT require original ink — the form explicitly permits 'SIGN
  IN INK OR USE A SECURE ELECTRONIC SIGNATURE', so our digital stamp suffices;
  plotter optional for CLIA.
- DEA registration/renewal is online-only (Form 224 unavailable in PDF),
  e-certified, no wet ink.
- State CSR / state Medicaid are the only open items: paper in many states but
  original-ink-vs-e-sign is state-specific; verify per state.
- All FCC/telecom/DOT/BOC-3/CRTC/PUC filings are electronic (e-sign fine).

Added the verified matrix to state-healthcare-compliance-opportunities.md, saved
docs/CMS-116 Form.pdf, and the plotter plan.
2026-06-07 02:40:47 -05:00
justin
b0a8563a93 ink-signature: pen-plotter pipeline for original wet-ink CMS signatures
The Standard no-login CMS path needs an ORIGINAL ink signature on paper
(CMS-10114: 'Stamped, faxed or copied signatures will not be accepted'). This
adds a pipeline to redraw the provider's own captured strokes in real ink with a
pen on a CR-10 V2 (or any Marlin/GRBL machine) — original, in ink, never copied.

- migration 090: esign_records.signature_vector (JSONB stroke paths, 0..1).
- signing page now captures normalized stroke paths alongside the PNG; API
  stores a size-bounded vector for drawn signatures.
- ink_signature_plotter.py (hardware-independent): fit strokes to the signature
  anchor box, PDF-pt -> bed-mm via jig offset, emit Marlin/GRBL G-code (Z pen or
  M280 servo/BLTouch), SVG toolpath preview, and render_signature_on_pdf (a
  digital twin that proves the toolpath lands on the cert line). Gated serial
  sender (dry_run default).
- ink_signature_cli.py: end-to-end load-record -> gcode+preview, --test-box jig
  calibration, --plot to stream over USB.
- Corrected CMS-10114 signature anchor to sit inside the Section 4A signing cell
  (above the bottom rule, below the label).
- docs/ink-signature-plotter.md documents the CR-10 retrofit + interpretive risk.

Tests: test_ink_signature.py 30/30, test_cms10114.py 27/27, test_paper_batch.py
15/15, API tsc clean, Astro build 58 pages.
2026-06-07 02:34:17 -05:00
justin
e6a630ada1 healthcare: verify CMS-10114 update path, correct NPI Enumerator address, build CMS-10114 filler
Verified firsthand against the live CMS-10114 (Rev. 02/25, OMB 0938-0931):
- Section 1A confirms paper is valid for Change of Information (#2) AND
  Reactivation (#4), not just initial enumeration. Resolves the UNCERTAIN flag.
- Current mailing address is CMS NPI Enumerator Services, Mail Stop DO-01-51,
  7500 Security Blvd, Baltimore MD 21244. The old Fargo PO Box 6059 is retired;
  corrected in mac_routing.NPI_ENUMERATOR + all docs.
- No electronic no-login equivalent exists for CMS (NPI Registry API is
  read-only; PECOS/NPPES-IA require login), unlike FMCSA's ask.fmcsa ticket form.
  So tiers stay: Standard=paper CMS-10114 (no login), Expedited=NPPES surrogate.

New: cms10114_pdf_filler.py fills the flat official form via text overlay
(reason checkbox + NPI + Section 2A identity + Section 4A cert name + signature
anchor); wired into npi_provider._generate_10114_for_signing for nppes-update.
Signed forms route to the NPI Enumerator via the existing daily batch.

Tests: test_cms10114.py 27/27, test_paper_batch.py 15/15, Astro build 58 pages.
2026-06-07 02:04:41 -05:00
justin
f9c294e962 healthcare: state/adjacent no-login matrix + verified-tiers status
- state-healthcare-compliance-opportunities.md: add A/B/C/D no-login
  classification per service (Medicaid, CAQH, payer credentialing, DEA/CSR,
  PDMP, CLIA, license). CLIA (CMS-116 paper) + state CSR reuse the daily batch.
- healthcare-filing-tiers-verified.md: implementation status + TODO-before-live
  (MAC addresses, CMS-10114 filler, migration run, print-mail API phase 2).
2026-06-07 00:34:34 -05:00
justin
258d23bdc6 healthcare: two-tier (standard paper / expedited surrogate) filing model
- Verified Standard(no-login)/Expedited(surrogate) matrix from official CMS-855
  PDFs (docs/healthcare-filing-tiers-verified.md): reactivation+revalidation are
  855I paper-to-MAC reasons, original-signature, routed by state; sig may not be
  delegated; 855B needs PECOS app fee.
- Add scripts/workers/mac_routing.py: state->MAC routing (all 56 jurisdictions,
  12 destinations) for envelope addressing + daily batch grouping. Addresses
  marked VERIFY before live mail.
- npi_provider.py: fix access strings to two-tier framing; NPPES update/reactivation
  no longer 'online-only'; note 855B fee.
- checkout.ts + service pages: strip client-facing mechanics & the paper-vs-tier
  choice; surrogate is the only optional, positively-framed ask (faster, never
  required, never share password).
2026-06-07 00:24:56 -05:00
justin
74c1259c9a docs: state healthcare compliance service opportunities (Medicaid revalidation/enrollment, CAQH, payer credentialing, DEA/CSR/PDMP, CLIA, license renewal) 2026-06-06 22:34:46 -05:00
justin
2c4854f2db hc tracking: fix listmonk-hc app.root_url (was localhost:9000 -> zero views) to public domain + enable individual tracking; verified pixel records views 2026-06-06 16:40:22 -05:00
justin
0d212787ef healthcare email: add 'No logins. No portals. No headaches.' value-add (sells the relief, hides the mechanics); research doc on verified no-login third-party submission paths 2026-06-06 04:53:26 -05:00
justin
695c3e2431 security: drop all CBC TLS suites (Qualys WEAK -> AEAD-only, still A+); sync ansible nginx templates (ciphers + ywxi CSP); capture host firewall as IaC 2026-06-06 00:49:21 -05:00
justin
780b4219d3 feat(site): stage TrustedSite trustmark slot (opt-in prop) + setup doc; CSP/verification steps pre-documented 2026-06-06 00:27:02 -05:00
justin
5526fb79b9 security: harden nginx TLS ciphers (drop SHA-1 CBC -> HIPAA/NIST clean, still A+); document ImmuniWeb free badge + PCI/HIPAA/NIST/GDPR compliance 2026-06-06 00:22:59 -05:00
justin
6121c0a6f4 security: harden VM - nft+DOCKER-USER firewall closing public exposure of postgres/k8s/forgejo/listmonk/apis; remove inbound :25 (send-only); docs 2026-06-06 00:18:02 -05:00
justin
c3b2c4e89a hc-email: prod listmonk_hc installed + 3 SMTP servers + rampcap cron; end-to-end validated to Gmail via .107-.109 2026-06-05 23:12:03 -05:00
justin
61dac80dc6 hc-email: PTR/FCrDNS for hc IPs (.107-.109 -> hcmta01-03) done + SPF/DKIM/DMARC verified 2026-06-05 23:01:34 -05:00
justin
8c51fa4b99 docs: record dual-stream implementation status + remaining DNS/prod steps 2026-06-05 19:22:02 -05:00
justin
54a342059b docs: lock dual-stream email decisions + verified institutional audience size
Measured against May 2026 NPPES endpoint_pfile (tightened HISP filter):
- 92,592 institutional NPIs across 38,873 practice domains (76% single-provider)
- 19,072 consumer-webmail NPIs (ride trucking discipline)
- 242,441 Direct/HISP rows parked until DirectTrust.
Decisions: single Postfix + class hc transport (:2526), 2nd Listmonk instance
(listmonk-hc, own cap + own listmonk_hc DB), 10k/day institutional ceiling.
2026-06-05 18:57:18 -05:00
justin
40090da1dd docs: plan dual-stream outbound email (healthcare-hot + trucking-trickle)
Today one global Listmonk cap + shared Postfix rotation pool governs all mail,
sized to protect consumer-ISP (Gmail/MS/Yahoo) reputation for trucking cold mail.
Healthcare practice-domain (institutional) mail has an independent deliverability
profile and should run hotter without endangering the warmed trucking IPs.

Plan: isolate two streams sharing one Postfix/Listmonk:
- carve hc-dedicated sending IPs (.107-.109) with their own PTR/SPF + warmup;
- a 2nd Postfix submission service (:2526) bound to the hc pool;
- a 2nd Listmonk instance (or SMTP server) with its own sliding-window cap;
- split the healthcare list into institutional (hot) vs consumer-webmail (rides
  trucking discipline) vs DirectTrust (parked);
- free MX+SMTP verify the institutional list on a non-sending IP first.

Includes mermaid topology, separate hc warmup/cap schedule, validation (isolation/
identity/deliverability/cap proofs), and open decisions for sizing.
2026-06-05 18:51:05 -05:00
justin
e212f20a34 Add CMS-855 PDF filler + e-sign fulfillment for Medicare revalidation/enrollment
- cms855_pdf_filler.py: fills official CMS-855I/B/O/A AcroForms from intake
  (name, NPI, DOB, cert-page printed name) and records the signature anchor at
  the form's official /Sig box so the e-sign stamper lands on the cert line.
- npi_provider handlers (revalidation/reactivation/enrollment) now generate the
  paper CMS-855, upload it to MinIO, request_esign with anchors, and email the
  signing link. Human completes/verifies + USPS Priority Mails to the MAC.
- scripts/Dockerfile: copy the official CMS-855I/B/O/A forms into the image.
2026-06-05 02:27:11 -05:00
justin
8748c0a141 docs: NPI/healthcare products implementation plan 2026-06-05 01:21:58 -05:00
justin
73e09b12a0 feat: NPI outreach list pipeline (120k cold-emailable + 236k DirectTrust-later) + doc 2026-06-05 01:08:26 -05:00
justin
091ebbd7f9 docs: verified free NPI email-append paths (NPPES endpoint file + free SMTP/MX verify) 2026-06-05 01:00:54 -05:00
justin
604ad151c7 docs: add verified NPI services/pricing + companion-db analysis (217k overdue revalidations) 2026-06-05 00:57:09 -05:00
justin
2db2106ad5 docs: add postcard print-and-mail vendor pricing (Lob verified, PostGrid/Click2Mail quote-gated) 2026-06-05 00:38:41 -05:00
justin
5e4e73674a docs: verify NPPES + EPA RCRA field schemas against live files 2026-06-05 00:34:56 -05:00
justin
70d05e0607 docs: new compliance sectors (NPPES/FMC/EPA) + contact channels beyond postal mail 2026-06-05 00:25:51 -05:00
justin
058d7cfbfe docs: trucking state-campaign send runbook
Ties the prioritized marketing-send plan (NY HUT -> CT HUF -> D&A -> New
Carrier Startup -> CA MCP) to the existing Listmonk builders
(setup_trucking_campaigns.py creates the drafts + tests;
populate_new_carrier_startup_campaign.py builds the data-targeted New
Carrier audience). Draft/populate/test steps are safe and idempotent;
starting a bulk send is flagged as an irreversible operator-only step.
Cross-references the new fulfillment_status machine and the authorization
e-sign so campaign expectations match fulfillment.
2026-06-02 16:51:08 -05:00
justin
1584a6692b Pivot CRTC offering on FCC carrier page for A-Z wholesale carriers
The international (Q6) CRTC block was framed as a generic upsell (Expand
2026-06-02 13:26:39 -05:00
justin
8090fe0589 docs: ramp schedule + pw-listmonk-rampcap, fresh-IP day-0 send started 2026-06-02 12:32:42 -05:00
justin
98bcf0bbb0 docs: email deliverability + IP warmup runbook
Document the self-hosted MTA layout, the May 30-31 reputation collapse, the
Jun 02 remediation (retired burned IPs .91/.92/.93, swapped rotation to fresh
.94/.95/.96, full Yahoo-family hold map, Listmonk sliding-window cap, paused
the 13k-recipient blast scheduled for Jun 03), and the fresh-IP warmup rules +
monitoring commands.
2026-06-02 12:25:33 -05:00
justin
426fbb2ea1 docs(plan): mark all fulfillment phases complete + validated 2026-06-02 03:38:47 -05:00
justin
9c6b8d95e0 feat(fulfillment): state-trucking intake form + hazmat/emissions products
- Add StateTruckingIntakeStep.astro with slug-gated sections (IRP/IFTA,
  emissions, intrastate authority, OSOW, hazmat/PHMSA); wired into Wizard
- Register hazmat-phmsa + state-emissions products & SERVICE_INFO
- Add server-side bundle/mutual-exclusion enforcement + REQUIRED_FIELDS
- State-trucking slugs now collect real intake data (were review-only)
- Surface slug-specific intake fields in admin todo (_summarize_intake)
- Remove state slugs from email ADMIN_ASSISTED set (now get intake links)
2026-06-02 03:27:51 -05:00
justin
4f4edb5f00 Add new carrier startup campaign targeting 2026-06-01 20:19:55 -05:00
justin
2232570c9f Add trucking state authorization plan 2026-06-01 20:14:36 -05:00
justin
a2aaac0066 Document trucking state campaign fulfillment requirements 2026-06-01 20:06:53 -05:00
justin
cf270e9f5b add Wyoming formation package doc: full component breakdown, pricing, wizard logic, photo ID reuse, annual compliance, LTV estimates 2026-05-30 22:34:51 -05:00
justin
7197b95946 add virtual mailbox notes: Anytime Mailbox already in use, photo ID reuse for 1583 2026-05-30 22:32:47 -05:00
justin
260bfd04c3 add foreign qualification fee reference: all 50 states, one-time vs annual, wizard pricing guidance 2026-05-30 22:30:07 -05:00
justin
6c75a27893 add vehicle buy/sell referral topics: ByeTruck, Kelly, Big Rig Lending, Truck Trader 2026-05-30 21:37:08 -05:00
justin
6b20ba7f08 add post-completion flow: exit survey, Google review ask, referral program spec 2026-05-30 21:17:01 -05:00
justin
4cde6bbb4a add financing/factoring interest checkbox on success page + campaign topics 16-17
- Checkbox on post-order success page: 'Interested in freight factoring?'
- Stores lead via /api/v1/insurance-leads with source=financing_interest
- Added factoring + fuel card campaign topics to docs
2026-05-30 21:15:25 -05:00
justin
0c9a500fee correct campaign topic #1: MC numbers NOT eliminated yet, still proposed 2026-05-30 21:12:31 -05:00
justin
91501f78cd add 15 trucking campaign topics with priority matrix — sourced from forums + FMCSA changes 2026-05-30 21:11:18 -05:00
justin
a265990351 Add official FMCSA MCS-150 fillable PDF forms
MCS-150 (standard), MCS-150B (hazmat), MCS-150C (intermodal).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-30 13:08:32 -05:00
justin
ba3eb30b58 Add trucking system documentation and architecture SVG
trucking-system.md: comprehensive doc covering data pipeline, compliance
checker (14 checks), 21 service slugs, vendors, database tables, frontend
pages, order flow, and campaign segmentation (29,792 eligible).

trucking-architecture.svg: visual diagram of full system — data sources,
processing layer, database, frontend, campaigns, and order flow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-29 14:10:57 -05:00
justin
79ebcc001a Add comprehensive FMCSA trucking compliance product plan
Covers all 5 phases: data pipeline (done), additional checks (UCR,
IFTA, IRP, D&A, new entrant, hazmat, state-level), service catalog
with 10 services and pricing, email campaign segmentation for 29K+
overdue carriers, and filing automation roadmap.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-28 21:43:54 -05:00
justin
71d466c922 Wire createCommission() into compliance batch checkout
Compliance batch orders now create commission ledger entries when
a discount code (agent referral) is used. Tracks total order amount,
discount applied, and links to the agent for payout processing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-11 11:00:38 -05:00
justin
9c1b1387cb Update docs + add 3 SVG flowcharts
New diagrams:
- business-flow.svg: acquisition → check → order → filing → delivery
- technical-architecture.svg: full Docker stack, data tier, external services
- order-flow.svg: detailed worker pipeline with eSign gate and handler map

Updated docs:
- infrastructure.md: DocServer, email servers, backup server sections
- architecture.md: linked to new SVGs, updated date

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-07 09:17:36 -05:00