Product Documentation Quality Review -- Track 1
Product Documentation Quality Review — Track 1
Section titled “Product Documentation Quality Review — Track 1”Reviewer: Claude Opus 4.6 (adversarial verification agent) Date: 3 April 2026 Scope: 10 documents across 4 domains (search, bid-management, quality-governance, administration) Method: Every factual claim cross-referenced against codebase files, database types, schema reference, and MCP inventory
Overall Assessment
Section titled “Overall Assessment”| Document | Verdict | Accuracy |
|---|---|---|
| search/technical.md | FAIL | ~45% |
| search/user-journeys.md | PASS WITH NOTES | ~80% |
| bid-management/technical.md | FAIL | ~55% |
| bid-management/user-journeys.md | PASS WITH NOTES | ~75% |
| bid-management/workflows.md | PASS WITH NOTES | ~80% |
| quality-governance/technical.md | PASS WITH NOTES | ~70% |
| quality-governance/user-journeys.md | FAIL | ~55% |
| quality-governance/workflows.md | PASS WITH NOTES | ~75% |
| administration/technical.md | PASS WITH NOTES | ~75% |
| administration/user-journeys.md | PASS WITH NOTES | ~80% |
Summary: 3 documents FAIL outright due to critical factual errors (wrong HTTP methods, hallucinated components, incorrect column names). 7 documents pass with notes but contain errors that would mislead developers. No document is fully accurate. The docs read plausibly but contain the classic Gemini pattern of confident, specific claims that are subtly wrong.
Document-by-Document Findings
Section titled “Document-by-Document Findings”search/technical.md
Section titled “search/technical.md”Verdict: FAIL Accuracy: ~45%
Factual Errors Found
Section titled “Factual Errors Found”-
Wrong HTTP method. Doc says
GET /api/search. Actual:POST /api/search(app/api/search/route.tsline 15:export async function POST). -
Wrong parameter names and types. Doc claims query params
q, limit, content_types, domain. Actual POST body params arequery, threshold, limit, layer(defined inSearchBodySchemaatlib/validation/schemas.tsline 67-76). None of the four documented params match the actual four. -
Hallucinated RPC function. Doc lists
search_qa_libraryas an RPC function. It does NOT exist as a database RPC — it is an MCP tool registered inlib/mcp/tools/search.tsline 181. Thesupabase/types/database.types.tshas nosearch_qa_libraryfunction. -
Wrong
hybrid_searchparameters. Doc says params arequery_text, query_embedding, match_count, filter_domain. Actual params (fromdatabase.types.tsline 2958-2963):query_embedding, query_text, similarity_threshold, limit_count. Two of four are wrong. -
Wrong file path for highlight utility. Doc says
lib/highlight.tsx. Actual location:components/shared/highlight.tsx. -
Wrong page component path. Doc says
app/(authenticated)/browse/page.tsx. No(authenticated)route group exists. Actual:app/browse/page.tsx. -
Missing route.
app/api/search/suggestions/route.tsexists but is not documented. -
Wrong
useSearchreturn shape. Doc says{ results, isSearching, performSearch }. Actual return (hooks/use-search.tsline 102-108):{ results, count, isLoading, error, search }. All three field names are wrong.
Correct Claims Verified
Section titled “Correct Claims Verified”useSearchexists athooks/use-search.ts— correctContentLibraryResultexists atcomponents/content/content-library-result.tsx— correctcontent_itemstable hasembeddingvector(1024) — correct- Search consolidated into browse — correct
/searchredirects to/browse— correct (though redirect is 307, not 302 as implied)
search/user-journeys.md
Section titled “search/user-journeys.md”Verdict: PASS WITH NOTES Accuracy: ~80%
Factual Errors Found
Section titled “Factual Errors Found”-
/libraryroute exists but description is imprecise. Doc says “The Q&A Library (/library) restricts this search strictly to items where content-type isqa.” The route exists atapp/library/page.tsxbut the claim about restricting toqacontent type should be verified against the component logic. -
Dashboard header search claim unverified. Doc says “Dashboard (
/Header Search)” as an entry point. The dashboard exists at/but whether a header search widget redirects to/browse?q=...needs specific component verification.
Missing Information
Section titled “Missing Information”- No mention of the search suggestions endpoint (
/api/search/suggestions) - No mention that search uses POST, not GET (carries forward from technical.md error)
- No mention of
thresholdparameter for tuning semantic similarity
bid-management/technical.md
Section titled “bid-management/technical.md”Verdict: FAIL Accuracy: ~55%
Factual Errors Found
Section titled “Factual Errors Found”-
Hallucinated route. Doc lists
GET /api/bids/[id]/extract-metadata. This route does NOT exist. The actual tender-related routes are/api/bids/[id]/tender/route.tsand/api/bids/[id]/tender/download/route.ts. -
Massively incomplete route list. Doc lists 6 routes. Actual count: 29 route files under
app/api/bids/. Missing routes include:export/docx,export/xlsx,outcome,outcome/integrate,questions/[qId],questions/match,readiness,responses/[rId],responses/[rId]/history,responses/[rId]/regenerate,responses/[rId]/restore,responses/draft-all,responses/draft-stream,responses/estimate,templates/,templates/[templateId]/analyse,templates/[templateId]/auto-map,templates/[templateId]/fields/,templates/[templateId]/fill,tender/,tender/download. This is a significant omission. -
Wrong route path. Doc says
/api/bids/[id]/match. Actual:/api/bids/[id]/questions/match/route.ts(nested under questions). -
Wrong hook paths. Doc says
hooks/use-bid-export.tsandhooks/use-draft-recovery.ts. Actual locations:hooks/bid/use-bid-export.tsandhooks/streaming/use-draft-recovery.ts. -
Wrong page component paths. Doc says
app/(authenticated)/bid/[id]/page.tsxandapp/(authenticated)/bid/[id]/session/page.tsx. No(authenticated)group exists. Actual:app/bid/[id]/page.tsxandapp/bid/[id]/session/page.tsx. -
Hallucinated component. Doc lists
MobileActionMenuundercomponents/bid/.... No such component exists incomponents/bid/. -
Wrong
template_requirementscolumn name. Doc saysembedding. Actual column:requirement_embedding(fromdatabase.types.tsline 2098). -
Hallucinated test file. Doc references
__tests__/app/bid-pipeline.spec.ts. No such file exists. Related tests include__tests__/api/bid-drafting-pipeline.test.ts,__tests__/api/bid-questions-pipeline.test.ts,__tests__/lib/bid-state-machine.test.ts, and 22 other bid test files. -
Reference to CopilotPlugin. Doc mentions “ContentTabs/CopilotPlugin bridging” in the user-journeys file. CopilotKit was removed in Session 109 (see CLAUDE.md session history). The only file referencing
CopilotPluginis the doc itself.
Correct Claims Verified
Section titled “Correct Claims Verified”bid_questionshassection_name, question_sequence, confidence_posture, matched_content_ids— correctbid_responseshasresponse_text, review_status, drafted_by— correctbid_response_historyhasversion, change_reason— correcttemplate_completionshasfields_filled, storage_path— correctworkspacestable withtypediscriminator — correct- MCP tools
list_active_bids,get_bid_detail,get_bid_question,show_bid_dashboard,cite_content,get_content_effectiveness— all verified in MCP inventory search_for_bid_responseRPC exists — confirmed indatabase.types.tsline 3076
bid-management/user-journeys.md
Section titled “bid-management/user-journeys.md”Verdict: PASS WITH NOTES Accuracy: ~75%
Factual Errors Found
Section titled “Factual Errors Found”-
CopilotPlugin reference. Line 58 mentions “ContentTabs/CopilotPlugin bridging”. CopilotKit was removed in S109. The drafting streams via
draft-streamroute, not through CopilotPlugin. -
content_citationspopulation claim. Doc says “Citations to source KB articles are tracked incontent_citations” during save. While the table exists, the claim that auto-save populates it during drafting needs verification — citations are created via thecite_contentMCP tool, not automatically. -
Role permissions for “Delete Bid Workspace”. Doc says only Admin can delete. This should be verified against the actual API route RLS policies.
Correct Claims Verified
Section titled “Correct Claims Verified”- Entry points
/workspacesand/bid/[id]— correct routes exist ReadinessChecklistcomponent exists atcomponents/bid/readiness-checklist.tsxBidExportMenuexists atcomponents/bid/bid-export-menu.tsxuseDraftRecoveryuses localStorage — confirmed from hook implementation- Tiptap editor in bid session — confirmed
bid-management/workflows.md
Section titled “bid-management/workflows.md”Verdict: PASS WITH NOTES Accuracy: ~80%
Factual Errors Found
Section titled “Factual Errors Found”-
Missing state in bid lifecycle. Doc lists:
draft -> questions_extracted -> drafting -> in_review -> ready_for_export -> submitted -> won/lost/withdrawn. Actual states fromlib/validation/schemas.tsline 524-536 includematchingbetweenquestions_extractedanddrafting. Full sequence:draft, questions_extracted, matching, drafting, in_review, ready_for_export, submitted, won, lost, withdrawn. -
Match output terminology. Doc says Pass 1 output is “Matching constraints (
strong,partial,needs_sme)”. The actualconfidence_posturevalues onbid_questionsarestrong_match,partial_match,no_content(from schema reference line 321). Close but not exact. -
ReadinessBadgedescribed as separate component. Doc says “ReadinessBadge lights up green” as a side effect.ReadinessBadgeis actually exported fromcomponents/bid/readiness-checklist.tsx(line 253), not a standalone component file.
Correct Claims Verified
Section titled “Correct Claims Verified”- 3-pass AI pipeline (match, outline, stream) in
lib/ai/draft.tsandlib/ai/match.ts— correct bid_response_historyis append-only withversionandchange_reason— correct- OpenAI for embeddings, Anthropic for drafting — correct architecture
quality-governance/technical.md
Section titled “quality-governance/technical.md”Verdict: PASS WITH NOTES Accuracy: ~70%
Factual Errors Found
Section titled “Factual Errors Found”-
Wrong
review_assignmentskey columns. Doc sayscontent_id, reviewer_id, due_date, priority. Actual columns (fromdatabase.types.tslines 1565-1582):reviewer_id, assigned_by, assignment_type, filter_domains, filter_content_types, filter_freshness, due_date, status. There is NOcontent_idcolumn (assignments scope by filters, not individual content items). There is NOprioritycolumn. -
Wrong
verification_historycolumn names. Doc sayscontent_id, verified_by, verification_type. Actual columns:content_item_id, performed_by, action_type. All three names are wrong. -
VerificationBadgeprops wrong. Doc says props areverified, trustData. Need to verify against actual component but these prop names seem plausible though potentially inaccurate. -
Missing governance_config columns. The technical doc table omits
auto_flag_on_quality_drop,auto_flag_on_freshness_transition,auto_flag_cooldown_days,quality_score_threshold— all of which exist in the actual table (confirmed indatabase.types.tslines 1145-1153) and are central to the governance bridge logic described in workflows.md.
Correct Claims Verified
Section titled “Correct Claims Verified”- All 6 review API routes exist and paths match
- Governance API routes exist (
GET/POST /api/governance) ReviewQueuePanel,AssignmentManager,ReviewCadenceCardexist at stated pathsVerificationBadgeandQualityBadgeexist at stated pathsgovernance_confighasdomain, posture, timeout_days— correctdigeststable columns match- MCP tools
delete_content_item,update_governance_status,get_quality_briefing,get_quality_actionsall verified
quality-governance/user-journeys.md
Section titled “quality-governance/user-journeys.md”Verdict: FAIL Accuracy: ~55%
Factual Errors Found
Section titled “Factual Errors Found”-
Wrong review action model. Doc describes Journey 1 step 2 as: “Reviewer approves -> status transitions to
approved. A toast notification appears enabling anUndoaction.” The actual review actions (fromapp/api/review/action/route.tslines 14-22) are:verify, flag, skip, unverify, unflag. There is NOapproveaction. The system uses verification (verified_at/verified_by), not approval-based governance_review_status transitions. -
Fabricated “Flag quality” button. Journey 2 describes a “Flag quality” button in the AI summary tab footer. The actual review action is
flagwhich creates areview_neededentry iningestion_quality_log— the UI mechanism needs verification but the description oversimplifies. -
Wrong VerificationBadge states. Doc says trust levels are “Unverified (yellow), Verified (green check), Curated (green ellipsis icon - indicating verification + brief + detail + owner assigned)”. The progressive trust model is more nuanced and the specific visual representations should be verified against
components/shared/verification-badge.tsx. -
Governance review status model confusion. The entire framing implies a
governance_review_statusapprove/reject workflow, but the actual review action route uses a verification model (verify/unverify/flag/unflag), which is a fundamentally different paradigm. Thegovernance_review_statuscolumn exists oncontent_itemsbut its transitions are NOT managed by/api/review/action.
Correct Claims Verified
Section titled “Correct Claims Verified”- Entry points
/review,/change-reports,/item/[id],/settingsall exist - Editor+ access for review queue — correct
- Change Reports at
/change-reports— correct - Role permissions table broadly correct
quality-governance/workflows.md
Section titled “quality-governance/workflows.md”Verdict: PASS WITH NOTES Accuracy: ~75%
Factual Errors Found
Section titled “Factual Errors Found”-
Wrong governance review states. Doc workflow 3 lists transitions:
approved -> pending -> approved/changes_requested. The actualgovernance_review_statusvalues need to be checked, butchanges_requestedappears to be fabricated — no codebase reference to this status was found. -
Wrong
verification_historycolumn names. Workflow 3 database operations table says columnscontent_id, verified_by, verification_type. Actual:content_item_id, performed_by, action_type. -
content_historyclaim. Doc says edits create “Original snapshot preserved incontent_history”. Thecontent_historytable exists with trigger-based population, but the doc implies it’s part of the review action flow, which is misleading — it’s a separate trigger mechanism.
Correct Claims Verified
Section titled “Correct Claims Verified”- Quality-to-governance bridge via
lib/quality/quality-score.ts— file exists - Freshness bridge via
lib/freshness.ts— file exists - Cron routes:
freshness-transitions,quality-score,classification-quality— all exist governance_config.quality_score_thresholdandauto_flag_on_quality_drop— confirmed in DB typesgovernance_config.auto_flag_on_freshness_transition— confirmed in DB typesauto_flag_cooldown_days— confirmed in DB types
administration/technical.md
Section titled “administration/technical.md”Verdict: PASS WITH NOTES Accuracy: ~75%
Factual Errors Found
Section titled “Factual Errors Found”-
Incomplete admin API routes. Doc lists only
GET/POST /api/admin/users/. Actual routes include:/api/admin/users/route.ts,/api/admin/users/[userId]/route.ts,/api/admin/users/invite/route.ts. The [userId] and invite sub-routes are missing. -
“chron” typo. Doc says “automated lifecycle chron jobs” (line 9). Should be “cron jobs”.
-
Settings sections undercount. Doc references “9 settings sections” via the sidebar. Actual components in
components/settings/include at least 13 distinct section components: profile, connected-apps, connections, content-organisation, taxonomy, tags, entities, guides, layers, team, governance, activity, developer-setup. The doc misses connected-apps, connections, content-organisation, developer-setup, and layers. -
taxonomy_domains.provenanceCHECK values. Doc says values arename, provenanceas key columns. The actual CHECK values for provenance arebaseline, client, recommended(notseededas the schema quick reference says — there’s a discrepancy between the schema doc and actual DB).
Missing Information
Section titled “Missing Information”- No mention of taxonomy-related API routes (domains/subtopics are managed via Supabase client queries, not dedicated API routes, which is worth noting)
- No mention of the notification system beyond the table listing
- No mention of
intelligence-pollcron (though this is correctly scoped out as SI)
Correct Claims Verified
Section titled “Correct Claims Verified”SettingsSidebar,TaxonomySection,TagsSection,TeamSection,LayersSectionall exist at stated pathsuser_roleshasrolecolumn withadmin/editor/viewerCHECK — correctuser_roleshasdisplay_name— confirmed indatabase.types.tslayer_vocabularyhaskey, label, display_order— correctnotificationshasuser_id, type, entity_type— correct- 5 cron routes (excluding SI) — correct listing
administration/user-journeys.md
Section titled “administration/user-journeys.md”Verdict: PASS WITH NOTES Accuracy: ~80%
Factual Errors Found
Section titled “Factual Errors Found”-
Oversimplified settings access. Doc says “All roles (view adapted)” can access
/settings. The actual role-based visibility of individual settings sections needs component-level verification. -
Missing settings sections. Doc references “9 settings sections” (from Track 1 continuation prompt). Actual count is 13+ components as noted above.
Correct Claims Verified
Section titled “Correct Claims Verified”/settingspage route existsTaxonomySectionmanagestaxonomy_domainsandtaxonomy_subtopics— correctTeamSectionmanages user roles — correct- Role promotion workflow (viewer to editor) — plausible
- Database trigger for
auth.userstouser_roles— confirmed architecture
Cross-Cutting Issues
Section titled “Cross-Cutting Issues”1. Phantom (authenticated) Route Group
Section titled “1. Phantom (authenticated) Route Group”Multiple documents reference app/(authenticated)/... paths. This route group
does NOT exist in the codebase. All authenticated pages live directly under
app/ (e.g., app/browse/page.tsx, app/bid/[id]/page.tsx). This error
appears in search/technical.md and bid-management/technical.md.
2. Systematic Column Name Errors
Section titled “2. Systematic Column Name Errors”The verification_history table columns are wrong in every document that
references them. The docs say content_id, verified_by, verification_type but
the actual columns are content_item_id, performed_by, action_type.
3. Review Action Model Misunderstood
Section titled “3. Review Action Model Misunderstood”The governance docs describe an approve/reject workflow, but the actual system uses a verify/flag model. This is not a minor naming error — it represents a fundamental misunderstanding of how the review system works.
4. Hook Subdirectory Structure Ignored
Section titled “4. Hook Subdirectory Structure Ignored”Hooks are organised into subdirectories (hooks/bid/, hooks/streaming/, etc.)
but docs list flat paths (hooks/use-bid-export.ts). This reflects incomplete
research of the actual file structure.
Recommendations
Section titled “Recommendations”1. Should existing docs be corrected?
Section titled “1. Should existing docs be corrected?”Yes, mandatory. Three documents fail and should be rewritten with actual codebase verification. The remaining seven need targeted corrections. The error density is high enough that these docs cannot be trusted as authoritative references in their current state.
2. Should Track 2 proceed?
Section titled “2. Should Track 2 proceed?”Yes, but with a different process. Track 2 should NOT use the same agent/model that produced Track 1. The systematic errors (phantom route groups, wrong column names, fabricated components) indicate the research phase was inadequate. Track 2 should ensure the research agent reads actual source files, not just reference documents.
3. Should client-facing docs be updated?
Section titled “3. Should client-facing docs be updated?”Not yet. Fix Track 1 first. Using these docs to update client documentation would propagate errors.
4. Does the documentation strategy need revision?
Section titled “4. Does the documentation strategy need revision?”The strategy is sound; execution was poor. The four-phase process (research, draft, adversarial verify, finalise) is correct. The problem is that Phase 3 (adversarial verification) either was not performed or was performed superficially. The strategy document itself correctly warns against this.
Priority Actions
Section titled “Priority Actions”-
Critical — Fix search/technical.md: Wrong HTTP method (POST not GET), wrong params, wrong hook return shape, hallucinated RPC function. Nearly every technical detail is wrong.
-
Critical — Fix quality-governance/user-journeys.md: Wrong review action model (verify/flag not approve/reject). Fundamental misunderstanding of the system.
-
Critical — Fix bid-management/technical.md: Hallucinated route, hallucinated component, wrong hook paths, wrong column name, 23 missing routes.
-
High — Fix verification_history columns everywhere:
content_id -> content_item_id,verified_by -> performed_by,verification_type -> action_type. -
High — Remove all
(authenticated)route group references: Replace with actual paths (e.g.,app/browse/page.tsx). -
High — Fix review_assignments columns: Remove phantom
content_idandpriority; document the filter-based scoping model. -
Medium — Add missing bid state
matching: Add to workflows state machine diagram. -
Medium — Fix governance_config column documentation: Add the bridge-related columns that drive automation.
-
Medium — Remove CopilotPlugin references: CopilotKit was removed in S109.
-
Low — Fix
template_requirements.embeddingtorequirement_embedding.