|
| 1 | +from __future__ import annotations |
| 2 | + |
| 3 | +from typing import Any |
| 4 | + |
| 5 | + |
| 6 | +DEEP_RESEARCH_CATALOG_ENTRY: dict[str, Any] = { |
| 7 | + "id": "deep-research", |
| 8 | + "origin": "builtin", |
| 9 | + "visibility": "public", |
| 10 | + "provider_id": "loopx-core", |
| 11 | + "documentation": { |
| 12 | + "source_root": "loopx/capabilities/deep_research", |
| 13 | + "site_root": "capabilities/deep-research", |
| 14 | + "canonical": "README.md", |
| 15 | + }, |
| 16 | + "title": "Evidence-ledger deep research loop", |
| 17 | + "status": "experimental", |
| 18 | + "real_world_anchor": ( |
| 19 | + "one user question driven by packet-cut expeditions over question, source, " |
| 20 | + "claim, and contradiction ledgers, ending in a citation-auditable report" |
| 21 | + ), |
| 22 | + "user_value": ( |
| 23 | + "Run a bounded, auditable research session per project: claims must come from " |
| 24 | + "recorded sources, answers must cite recorded claims, and closeout is blocked " |
| 25 | + "while any contradiction stays unresolved." |
| 26 | + ), |
| 27 | + "entry_command": "loopx deepresearch start --question <text>", |
| 28 | + "commands": [ |
| 29 | + { |
| 30 | + "command": "loopx deepresearch start --question <text> [--max-sources N] [--new-run]", |
| 31 | + "purpose": "Open a research run; archives the previous closed/stopped run instead of editing state files by hand.", |
| 32 | + "write_boundary": ".loopx/deepresearch/ state and report files only", |
| 33 | + }, |
| 34 | + { |
| 35 | + "command": "loopx deepresearch status", |
| 36 | + "purpose": "Emit the expedition packet: contract, ledgers, next expedition, stop conditions, evidence commands.", |
| 37 | + "write_boundary": "read-only projection over the research ledger", |
| 38 | + }, |
| 39 | + { |
| 40 | + "command": "loopx deepresearch add-source --url-or-path <ref> --tool <tool> --claims-json <json>", |
| 41 | + "purpose": "Record one consulted source and the claims extracted from it.", |
| 42 | + "write_boundary": "one ledger transaction under the project research lock", |
| 43 | + }, |
| 44 | + { |
| 45 | + "command": "loopx deepresearch add-subquestion --text <text> --from-claim <claim-id>", |
| 46 | + "purpose": "Open a subquestion that derives from a recorded claim.", |
| 47 | + "write_boundary": "one ledger transaction under the project research lock", |
| 48 | + }, |
| 49 | + { |
| 50 | + "command": "loopx deepresearch resolve-question --question-id <id> --answer <text> --evidence-claims <ids>", |
| 51 | + "purpose": "Answer a recorded question citing recorded evidence claims; contradictions touching the evidence must be resolved in the same transition.", |
| 52 | + "write_boundary": "one ledger transaction under the project research lock", |
| 53 | + }, |
| 54 | + { |
| 55 | + "command": "loopx deepresearch resolve-contradiction --contradiction-id <id> --sides-with <claim-id> --rationale <text>", |
| 56 | + "purpose": "Close one open contradiction standalone with an explicit sides-with rationale.", |
| 57 | + "write_boundary": "one ledger transaction under the project research lock", |
| 58 | + }, |
| 59 | + { |
| 60 | + "command": "loopx deepresearch close [--note <text>]", |
| 61 | + "purpose": "Terminal transition marking this run closed and its ledger immutable; the next start archives it.", |
| 62 | + "write_boundary": "marks the run closed; the next start performs the archive rotation", |
| 63 | + }, |
| 64 | + { |
| 65 | + "command": "loopx deepresearch report", |
| 66 | + "purpose": "Render the citation-auditable markdown report from the ledgers.", |
| 67 | + "write_boundary": "writes .loopx/deepresearch/report.md only", |
| 68 | + }, |
| 69 | + ], |
| 70 | + "implemented_protocols": [ |
| 71 | + { |
| 72 | + "schema_version": "loopx_deepresearch_state_v0", |
| 73 | + "module": "loopx.capabilities.deep_research.runtime", |
| 74 | + "doc": "loopx/capabilities/deep_research/README.md", |
| 75 | + }, |
| 76 | + { |
| 77 | + "schema_version": "loopx_deepresearch_packet_v0", |
| 78 | + "module": "loopx.capabilities.deep_research.runtime", |
| 79 | + "doc": "loopx/capabilities/deep_research/README.md", |
| 80 | + }, |
| 81 | + ], |
| 82 | + "smokes": [ |
| 83 | + "python3 -m pytest tests/test_deepresearch_command.py -q", |
| 84 | + ], |
| 85 | + "docs": [ |
| 86 | + "loopx/capabilities/deep_research/README.md", |
| 87 | + ], |
| 88 | + "boundaries": [ |
| 89 | + ( |
| 90 | + "Distinct from the auto-research capability: auto-research launches " |
| 91 | + "role-scoped workers inside a LoopX goal for open exploration; " |
| 92 | + "deep-research is a single-session, user-facing evidence ledger whose " |
| 93 | + "truth is the .loopx/deepresearch state, not goal todos." |
| 94 | + ), |
| 95 | + ( |
| 96 | + "Distinct from the explore capability: explore owns the goal-scoped, " |
| 97 | + "public-safe, cross-session question/finding topology; deep-research " |
| 98 | + "owns this private, session-scoped ledger — raw source locators, claim " |
| 99 | + "lineage, contradiction adjudication, stop/close/report. Any future " |
| 100 | + "bridge is a one-way, idempotent, public-safe projection: explore " |
| 101 | + "never reads the raw ledger, never dual-writes, and graph resolution " |
| 102 | + "never closes a research run." |
| 103 | + ), |
| 104 | + ( |
| 105 | + "The packet owns research progression and stop decisions; the model " |
| 106 | + "executes bounded expeditions and records typed ledger transitions only. " |
| 107 | + "No contradiction adjudication — in-call or standalone — may overrule " |
| 108 | + "a claim an already-answered question cites as evidence." |
| 109 | + ), |
| 110 | + ( |
| 111 | + "Claims carry caller-declared provenance: --tool records the tool the " |
| 112 | + "caller says produced the evidence, and the CLI records it without " |
| 113 | + "attesting execution; reports must keep every citation resolvable to a " |
| 114 | + "recorded source." |
| 115 | + ), |
| 116 | + ( |
| 117 | + "One active run per project; finished or closed runs are archived under " |
| 118 | + ".loopx/deepresearch/archive/ by typed transitions, never by hand edits." |
| 119 | + ), |
| 120 | + ], |
| 121 | + "next_real_step": ( |
| 122 | + "Keep the deep-research entrypoint as the single evidence-ledger authority and " |
| 123 | + "reuse LoopX goal/todo/quota projections rather than adding a second scheduler." |
| 124 | + ), |
| 125 | +} |
0 commit comments