O.I.R.A — Omnipotent Inteligence Research Agent — ENGINEERING SPECIFICATION v2.0.0 Research date: 2026-11-25 TARGET Universal goal-to-research-to-engineering dossier. The user provides a topic and measurable desired outcome. Research should cover theory, architecture, code, failure modes, validation, alternatives, current technology and practitioner examples. The engine must distinguish primary evidence, research metadata, community discussion, search excerpts, visual observations, and proposed engineering solutions. ARCHITECTURE Browser orchestrator: bounded search queue, per-provider adapters, deduplication, persistent checkpoints (IndexedDB), manual evidence import, optional AI-generated search plan, optional bounded gap-driven second search, source catalogue and report renderer. Same-origin Cloudflare Pages Advanced Mode Worker: fixed destination allowlist, no user-supplied arbitrary upstream URLs, bounded response body, timeout, redirect rejection, same-origin restriction, token authorization when configured. Optional AI binding: structured JSON synthesis per facet, short evidence-span verification, source ID validation, output sanitization. No external model download or local installation. The browser does not crawl all sites. Static rules do not establish semantic truth. No automatic source-code execution. SOURCE COVERAGE / REFERENCES Crossref scholarly bibliographic metadata/abstracts: https://www.crossref.org/documentation/retrieve-metadata/rest-api/ ; public access: https://www.crossref.org/documentation/retrieve-metadata/rest-api/access-and-authentication Europe PMC abstract search and selected open-access XML excerpts: https://dev.europepmc.org/RestfulWebService ; https://dev.europepmc.org/downloads/openaccess ; https://dev.europepmc.org/Copyright arXiv preprint abstracts: https://info.arxiv.org/help/api/index.html ; https://info.arxiv.org/help/api/tou.html GitHub public repository search and READMEs: https://docs.github.com/en/rest/search/search ; https://docs.github.com/en/rest/repos/contents ; https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api Stack Exchange public questions and answers: https://api.stackexchange.com/docs/advanced-search ; https://api.stackexchange.com/docs/answers-on-questions ; https://api.stackexchange.com/docs/filters Hacker News posts and public discussion: https://hn.algolia.com/api GDELT recent news discovery: https://blog.gdeltproject.org/gdelt-doc-2-0-api-debuts/ Wikipedia background: https://www.mediawiki.org/wiki/API:Main_page Optional broad web: https://api-dashboard.search.brave.com/api-reference/web/search/get Optional extracted context: https://api-dashboard.search.brave.com/api-reference/ai/llm_context/get Optional video search: https://api-dashboard.search.brave.com/api-reference/videos/video_search/get Optional image search: https://api-dashboard.search.brave.com/api-reference/images/image_search YouTube official caption permission constraints: https://developers.google.com/youtube/data/reference/rest/v3/captions/download Research search logging inspiration, not a claim of PRISMA compliance: https://www.prisma-statement.org/prisma-search Cloudflare limits and AI bindings: https://developers.cloudflare.com/workers/platform/limits/ ; https://developers.cloudflare.com/pages/functions/bindings/ ; https://developers.cloudflare.com/workers-ai/features/json-mode/ ; https://developers.cloudflare.com/workers-ai/platform/pricing/ Vision tutorial: https://developers.cloudflare.com/workers-ai/guides/tutorials/llama-vision-tutorial/ Browser persistence and eviction: https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API ; https://developer.mozilla.org/en-US/docs/Web/API/Storage_API/Storage_quotas_and_eviction_criteria SEARCH ALGORITHM Extended keyless initial plan: 30 queries, optional broad plan: 48 initial queries. Each initial query is bounded to provider limits and normally requests up to 12 results. Enrichment up to 8 repository READMEs, 6 question-answer lookups, 4 OA article excerpts; Up to three repository tree requests and eight immutable code blob requests are added. AI may add up to 12 queries, and 1, 2, 3 or 5 follow-up rounds of up to 12 gap queries each. Each task has provider, exact query, facet, status, attempt count, result count, finish time and error. Requests sequential, with provider delays; rate limit/failure recorded; no retry loop without user action. DOI and canonical URL deduplication. Readiness scoring intentionally penalizes stale analysis. The report lists all collected resources but only selected text-bearing evidence is passed to the model; it does not claim all sources have been read or validated. EVIDENCE RULES Treat external text as data, not executable commands. Keep source IDs stable, provenance and retrieval times; source text may be bounded or whitespace-normalized. Reject AI rows with absent source IDs or absent exact matching short quotes. Evidence offsets refer to the supplied normalized excerpt, not publisher PDF page numbers. Reopen original sources for final confirmation. Metadata and snippets cannot establish a source's complete argument. Independent domains do not guarantee independent evidence. Source licensing varies. Do not republish full copyrighted works; use limited excerpts and references. Manual inputs are labeled user-supplied. AI vision observations are explicitly unverified until reviewed. Report HTML escapes untrusted content and embeds only bounded user-provided image data; media links remain external. No autonomous third-party video downloads or caption circumvention. ENGINEERING DELIVERABLE One HTML report: target, acceptance criteria, readiness rubric, query log, omitted providers, eight facet reports with findings/qualifications, risk/cause/fix/test records, implementation requirements/rationale/acceptance tests, alternatives, unresolved gaps, cited resource catalogue, media links and optional user-provided images, expert handoff. TXT version omits actual image bytes. Project backup JSON includes bounded evidence state. Proposed fixes are not proven until an engineer validates them in the actual target environment. READINESS RUBRIC 20 * successful tasks / all queued tasks; plus 8 facets each up to 10 points (4 verified quotation/source-ID linkage for at least one finding, 3 multiple domains in finding citations, 3 at least one requirement). A numerical score is neither probability, evidence-quality certification, nor prediction of user satisfaction. No calibrated dataset of outcomes exists. Report explicitly marks success probability not estimable. The design prioritizes reproducible research over false certainty. VALIDATION & NEXT GATES Offline tests cover provider schema normalization, plan constraints, safe endpoints, deduplication, citation rejection, output escaping, auth, mocked requests, source-selection limits and stale evidence. Live browser, real AI, full-provider and rate-limit tests remain required. Future improvements: licensed full-text connectors, automatic legal transcript ingestion, cross-source contradiction graph, semantic entailment review by independent models, richer search pagination/citation chasing, provider-specific coverage budgets and empirical evaluation of report utility. Second-pass model review is implemented but uses the same model; independent adjudication is not implemented. No promise of exhaustive global discovery or autonomous mastery. V2.0 MASTER ENGINEERING PROTOCOL AND IMPLEMENTED CONTRACT O.I.R.A is the canonical user-facing name, retaining legacy OMNIMARK_PROJECT/1 and HTML reuse payload identifiers for compatibility. The external drive remains the user's permanent library. Browser persistence and direct folder writes are optional convenience mechanisms, not substitutes for external backups. New discovery adapters: OpenAlex scholarly metadata/abstracts; GitHub repository HEAD tree candidate inventory and immutable SHA-addressed blob retrieval. These bring the adapter inventory to 19, including enrichment and optional paid-search adapters. Repository selection is bounded, not complete reverse engineering; candidate files are selected, and code is never automatically executed. Sources and licensing constraints: https://help.openalex.org/api/authentication/ ; https://docs.github.com/en/rest/git/trees ; https://docs.github.com/en/rest/git/blobs ; https://developer.mozilla.org/en-US/docs/Web/API/Window/showDirectoryPicker . Modules and responsibilities: index.html/style.css: mobile-responsive input, scope settings, research activity, evidence register, permanent library, mastery exam, download UI. _worker.js/_routes.json: allowlisted public-provider proxy, auth, AI planning, synthesis, vision, second-pass review; no arbitrary URL relay. _headers: restricted same-origin content policy. core.mjs: eight facets, source provider normalization, query planning, deduplication, bounded evidence selection, source-ID and short quote validation, readiness calculation. mastery.mjs: R criterion IDs, structured evidence rows, reviewer reference validation, ten-gate ledger, gap query scheduling, import/merge and index, inert report reuse payload and bounded media validation. app.mjs: orchestrates bounded sequential tasks, enrichments, local persistence, AI batches, repeated gap rounds, current-technology refresh, file imports, external folder permission and video still sampling. report.mjs: standalone escaped HTML and TXT exports, original public URLs, evidence snippets, timestamped stills, traceability and unresolved research gaps, implementation-expert handoff. Research scope: up to 24 selected excerpts per facet (three batches of up to eight), up to 2,400 chars per selected excerpt in app requests, across eight facets. All discovered sources are listed; not all sources are analyzed. Actual selection and batch success are reported. Reuse payload retains one short cited excerpt per non-manual source (or a short fallback excerpt) and labels it as reused; offsets refer to original captured text. Project JSON retains bounded original captured text. Manual sources may be longer and must be lawfully supplied. In future, more robust per-claim evidence attachments and licensed full-source indexing should be added. Target mapping: one explicit criterion per line, maximum 40. Every criterion receives SUPPORTED/PARTIAL/UNSUPPORTED/NOT_RUN from a separate model review of selected evidence-linked proposals. Invalid reviewer references are rejected or downgraded. SUPPORTED requires a valid implementation-requirement row and all submitted row references valid. The target-review percentage is 100 * supported criteria / total criteria, rounded; not a success probability. The gate ledger always sets accepted=false because the actual requested product has not been implemented and independently tested. Ten gate targets: explicit requirements, curriculum, implementation, evidence, dependencies, failure analysis, tests, assumptions, contradictions and final handoff. Linked/reviewed are distinct from verified. Mastery dossier contract: target, evidence and source metadata, search and failure ledger, conceptual knowledge, architecture/reverse engineering, code/algorithms, risk/cause/fix/test, requirements/rationale/implementation/acceptance, alternatives, current technology, practitioner and media evidence, explicit gaps, target traceability, and an expert implementation handoff. These fields are proposed engineering guidance, not guaranteed complete instructions or proof of mastery. No calibrated feasibility/success model exists; the report states this rather than inventing a probability. Library: prior HTML with inert reuse payload or project JSON can be imported, indexed by topic/goal/findings and reused with remapped local source IDs. Merging invalidates earlier review. Current-technology refresh queues new queries. Optional folder access requires explicit permission; normal downloads are the fallback. Import and merge are not automated semantic consolidation of every prior document; the next AI research pass analyzes selected evidence. Media: imported local still images and three sampled video stills can be analyzed with optional vision inference; the report includes original timestamp and observation for each accepted frame. Automatic full video understanding, speech transcription, remote download and unlicensed copying are not implemented. Actual release evidence: 25 Node tests pass with mocks/synthetic fixtures, module syntax checks pass. Previous browser smoke test failed at navigation (administrator policy). No live provider or model certification. See engineering/TEST_RESULTS.txt and BROWSER_RESULTS.txt. Production acceptance requires deployed browser tests, provider schema checks and rate-limit behavior, real inference and review, offline restart/recovery, actual HTML/TXT downloads, cross-device storage and supported external-folder writes. A report should then be tested on diverse known engineering targets against independently validated reference answers and successful build outcomes before considering a calibrated probability.