docs: fix public-facing accuracy (flat-repo, links, drop solo/GTM framing) - #10
Merged
Merged
Conversation
…o/GTM framing The repo is public now, so the README + docs must be accurate: - README: flat-repo layout (web app at root, not apps/web; no packages/core), `cd practiq-oss` (not practiq), compose path docker/docker-compose.yml. - Broken `docs.practiq.dev` (DNS does not resolve) -> `practiq.dev/docs` (the live docs) across all files. - Self-host section is honest about the Docker route-serving gap (#9) and points to the fully-working MCP server as the entry point. - Cliwant is a venture studio, not "a one-person venture studio"; drop the solo-founder / "6-week solo project" / mikeoss "Harvey vs Mike" framing and the "posted every Sunday on LinkedIn/IndieHackers" line (no SNS launch). - Remove docs/playbooks/* (internal GTM outreach scripts — not product docs). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
seungdo-keum
added a commit
that referenced
this pull request
May 28, 2026
…eiling, calibration tracking - P0-01 (Vercel KV rate limiter): rate-limit.ts now picks an adapter at module load. Vercel KV when KV_REST_API_URL+TOKEN are set, else in-memory fallback. Public API stays identical except checkRateLimit is now async — every caller (auth, chat, events, stripe, team) was updated to await. Adapter exposes .distributed flag for tests + an isDistributedRateLimit() helper. KV writes carry a 2× window TTL so stale buckets self-evict without a GC pass. Tests now use async/await + __resetRateLimits is async. - P0-02 (per-firm Claude spend ceiling): new src/lib/spend-ceiling.ts. Sums every UsageEvent in the user's billing period at conservative Anthropic list prices, ranks against a plan-keyed ceiling (free $5 / solo $20 / practice $80 / firm $300). Chat route calls assertSpendUnderCeiling BEFORE the model call — exceeds throws SpendCeilingExceededError, translated to 402 + Slack ping + upgradeUrl. Emergency escape via SPEND_CEILING_DISABLED=1. - P0-03 (calibration tracking): approval-queue PATCH now writes a Brier-style residual into AuditLog.details. verdictWeight: approve=1, modify=0.5, reject=0; calibrationError = |verdictWeight − originalAi Confidence|. New /admin/spend-calibration page surfaces top spenders + mean error by approval type so we can see which agents systemically over- or under-claim confidence. Lovable-mark gates touched: #6 (cost guards in place — rate limit on KV adapter, per-firm spend ceiling enforced) + #10 (/admin/analytics now linked to live calibration + spend funnel via /admin/spend-calibration). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
seungdo-keum
added a commit
that referenced
this pull request
May 28, 2026
…brid / Slack unification / extensions The infrastructure audit (background research, see .cycle/research/2026-04-28-infrastructure-audit.md) found 5 broken, 7 stubbed, and 8 dead/orphaned items. This commit fixes the most critical operational ones in one batch: 🔴 #5 pg_trgm + vector extensions - schema-migrate endpoint now CREATE EXTENSION IF NOT EXISTS for pg_trgm + vector + adds GIN trigram indexes on client_contexts.title + content. Chat search_knowledge_base relied on these silently — without them the % operator was falling back to seq scan and similarity() returned 0. 🔴 #6 ANOMALY_DETECTOR + COMMS_DRAFTER agents never ran - Registered both in /api/agents/run AGENT_REGISTRY (was daily_briefing-only). - New cron routes /api/cron/anomaly-detector (11:00 UTC) and /api/cron/comms-drafter (22:00 UTC) wrapping the unified cron-runner helper. - vercel.json gets both new entries plus the previously-orphaned digest-compactor (02:30 UTC) and practiq-hourly-heartbeat (every hour) — both routes existed but were never scheduled. 🔴 #2 nightly-briefing had zero Slack alert on completion - New runAgentCronHandler() shared helper in src/lib/agents/cron-runner.ts. - Emits agent_cron_summary on clean run / agent_cron_warning on any failure / spend-ceiling skip / budget skip / >5% failure rate, with full per-cron stats (runs / succeeded / failed / retried / approvals / USD / token totals / skipped reasons / elapsed seconds / failure rate %). - All three nightly agents now use the same handler so adding a new one is one route file + one vercel.json line. 🔴 #1 early_access route had a dead Block Kit formatter - Replaced raw fetch(SLACK_WEBHOOK_URL) shim with safeNotify("early_access", …). The structured Block Kit formatter that builds emoji header + 5-field section now actually fires; the previous one-line plain text bypassed it. 🔴 #3 seo-submit cron auth was inverted - Previous logic `if (!isVercelCron && !secret)` rejected only when BOTH the cron header was missing AND the env var was unset. Once SEO_DEPLOY_SECRET was configured, every unauthenticated POST passed. Now correctly matches the request header against the secret value (with CRON_SECRET / Authorization Bearer fallbacks for Vercel's newer scheme). 🟠 #10 chat tool-handlers.searchKnowledgeBase used trigram-only - Migrated to hybridSearchKnowledgeBase (P1-05) so the chat tool sees BOTH trigram + pgvector cosine. Embeddings were already backfilled in production (RUN 12) — the cosine pass actually fires now. Graceful degradation when embedding service is down. 🟠 New NotificationType: agent_cron_summary / agent_cron_warning - Block Kit formatter produces 14-field section with full per-cron stats. _warning vs _summary chosen based on whether any failure or spend-ceiling skip was observed. 213/213 vitest pass · type-check ✅ · lint ✅ 4 background research reports archived to .cycle/research/. Next batch: chat rule-blind fix, durable audit shadow, .env.example rebuild, then apply the schema-migrate to production to enable pg_trgm + vector. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
seungdo-keum
added a commit
that referenced
this pull request
May 28, 2026
…o/GTM framing (#10) The repo is public now, so the README + docs must be accurate: - README: flat-repo layout (web app at root, not apps/web; no packages/core), `cd practiq-oss` (not practiq), compose path docker/docker-compose.yml. - Broken `docs.practiq.dev` (DNS does not resolve) -> `practiq.dev/docs` (the live docs) across all files. - Self-host section is honest about the Docker route-serving gap (#9) and points to the fully-working MCP server as the entry point. - Cliwant is a venture studio, not "a one-person venture studio"; drop the solo-founder / "6-week solo project" / mikeoss "Harvey vs Mike" framing and the "posted every Sunday on LinkedIn/IndieHackers" line (no SNS launch). - Remove docs/playbooks/* (internal GTM outreach scripts — not product docs). Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
seungdo-keum
added a commit
that referenced
this pull request
May 29, 2026
…eiling, calibration tracking - P0-01 (Vercel KV rate limiter): rate-limit.ts now picks an adapter at module load. Vercel KV when KV_REST_API_URL+TOKEN are set, else in-memory fallback. Public API stays identical except checkRateLimit is now async — every caller (auth, chat, events, stripe, team) was updated to await. Adapter exposes .distributed flag for tests + an isDistributedRateLimit() helper. KV writes carry a 2× window TTL so stale buckets self-evict without a GC pass. Tests now use async/await + __resetRateLimits is async. - P0-02 (per-firm Claude spend ceiling): new src/lib/spend-ceiling.ts. Sums every UsageEvent in the user's billing period at conservative Anthropic list prices, ranks against a plan-keyed ceiling (free $5 / solo $20 / practice $80 / firm $300). Chat route calls assertSpendUnderCeiling BEFORE the model call — exceeds throws SpendCeilingExceededError, translated to 402 + Slack ping + upgradeUrl. Emergency escape via SPEND_CEILING_DISABLED=1. - P0-03 (calibration tracking): approval-queue PATCH now writes a Brier-style residual into AuditLog.details. verdictWeight: approve=1, modify=0.5, reject=0; calibrationError = |verdictWeight − originalAi Confidence|. New /admin/spend-calibration page surfaces top spenders + mean error by approval type so we can see which agents systemically over- or under-claim confidence. Lovable-mark gates touched: #6 (cost guards in place — rate limit on KV adapter, per-firm spend ceiling enforced) + #10 (/admin/analytics now linked to live calibration + spend funnel via /admin/spend-calibration). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
seungdo-keum
added a commit
that referenced
this pull request
May 29, 2026
…brid / Slack unification / extensions The infrastructure audit (background research, see .cycle/research/2026-04-28-infrastructure-audit.md) found 5 broken, 7 stubbed, and 8 dead/orphaned items. This commit fixes the most critical operational ones in one batch: 🔴 #5 pg_trgm + vector extensions - schema-migrate endpoint now CREATE EXTENSION IF NOT EXISTS for pg_trgm + vector + adds GIN trigram indexes on client_contexts.title + content. Chat search_knowledge_base relied on these silently — without them the % operator was falling back to seq scan and similarity() returned 0. 🔴 #6 ANOMALY_DETECTOR + COMMS_DRAFTER agents never ran - Registered both in /api/agents/run AGENT_REGISTRY (was daily_briefing-only). - New cron routes /api/cron/anomaly-detector (11:00 UTC) and /api/cron/comms-drafter (22:00 UTC) wrapping the unified cron-runner helper. - vercel.json gets both new entries plus the previously-orphaned digest-compactor (02:30 UTC) and practiq-hourly-heartbeat (every hour) — both routes existed but were never scheduled. 🔴 #2 nightly-briefing had zero Slack alert on completion - New runAgentCronHandler() shared helper in src/lib/agents/cron-runner.ts. - Emits agent_cron_summary on clean run / agent_cron_warning on any failure / spend-ceiling skip / budget skip / >5% failure rate, with full per-cron stats (runs / succeeded / failed / retried / approvals / USD / token totals / skipped reasons / elapsed seconds / failure rate %). - All three nightly agents now use the same handler so adding a new one is one route file + one vercel.json line. 🔴 #1 early_access route had a dead Block Kit formatter - Replaced raw fetch(SLACK_WEBHOOK_URL) shim with safeNotify("early_access", …). The structured Block Kit formatter that builds emoji header + 5-field section now actually fires; the previous one-line plain text bypassed it. 🔴 #3 seo-submit cron auth was inverted - Previous logic `if (!isVercelCron && !secret)` rejected only when BOTH the cron header was missing AND the env var was unset. Once SEO_DEPLOY_SECRET was configured, every unauthenticated POST passed. Now correctly matches the request header against the secret value (with CRON_SECRET / Authorization Bearer fallbacks for Vercel's newer scheme). 🟠 #10 chat tool-handlers.searchKnowledgeBase used trigram-only - Migrated to hybridSearchKnowledgeBase (P1-05) so the chat tool sees BOTH trigram + pgvector cosine. Embeddings were already backfilled in production (RUN 12) — the cosine pass actually fires now. Graceful degradation when embedding service is down. 🟠 New NotificationType: agent_cron_summary / agent_cron_warning - Block Kit formatter produces 14-field section with full per-cron stats. _warning vs _summary chosen based on whether any failure or spend-ceiling skip was observed. 213/213 vitest pass · type-check ✅ · lint ✅ 4 background research reports archived to .cycle/research/. Next batch: chat rule-blind fix, durable audit shadow, .env.example rebuild, then apply the schema-migrate to production to enable pg_trgm + vector. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
seungdo-keum
added a commit
that referenced
this pull request
May 29, 2026
…o/GTM framing (#10) The repo is public now, so the README + docs must be accurate: - README: flat-repo layout (web app at root, not apps/web; no packages/core), `cd practiq-oss` (not practiq), compose path docker/docker-compose.yml. - Broken `docs.practiq.dev` (DNS does not resolve) -> `practiq.dev/docs` (the live docs) across all files. - Self-host section is honest about the Docker route-serving gap (#9) and points to the fully-working MCP server as the entry point. - Cliwant is a venture studio, not "a one-person venture studio"; drop the solo-founder / "6-week solo project" / mikeoss "Harvey vs Mike" framing and the "posted every Sunday on LinkedIn/IndieHackers" line (no SNS launch). - Remove docs/playbooks/* (internal GTM outreach scripts — not product docs). Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now that the repo is public, the README + docs must be accurate.
apps/web; nopackages/core);cd practiq-oss; compose pathdocker/docker-compose.yml.docs.practiq.dev(DNS doesn't resolve) →practiq.dev/docseverywhere.docs/playbooks/*(internal GTM outreach scripts — not product docs).Docs-only; no code paths touched.