begin;

set local statement_timeout = '30s';

-- rollback-only rehearsal: do not replace ROLLBACK with COMMIT without separate review

insert into public.claims (id, type, text, status, confidence, tags, created_by)
select '004195cc-ab62-526c-90fb-51cb0f826ec0'::uuid, 'structural', 'Capital allocation is a form of civilizational steering because it determines which futures receive resources.',
       'open', 0.65, array['capital-allocation', 'civilizational-steering', 'coordination', 'rio', 'teleo-strategy']::text[],
       '11111111-1111-1111-1111-111111111111'::uuid
 where not exists (select 1 from public.claims where id = '004195cc-ab62-526c-90fb-51cb0f826ec0'::uuid);

insert into public.claims (id, type, text, status, confidence, tags, created_by)
select 'd009dfc4-9755-58a7-affb-80e3e842a775'::uuid, 'structural', 'Capital allocation depends on distributed knowledge, incentives, liquidity, and feedback loops.',
       'open', 0.7, array['capital-allocation', 'distributed-market-intelligence', 'hayek', 'mechanism-design', 'collective-intelligence']::text[],
       '11111111-1111-1111-1111-111111111111'::uuid
 where not exists (select 1 from public.claims where id = 'd009dfc4-9755-58a7-affb-80e3e842a775'::uuid);

insert into public.claims (id, type, text, status, confidence, tags, created_by)
select '67003e10-e1ee-5905-8b51-1b0cb263ec11'::uuid, 'structural', 'Internet finance has structural advantages over traditional finance and is likely to become an increasingly important capital-allocation mechanism.',
       'open', 0.45, array['internet-finance', 'capital-allocation', 'programmable-governance', 'liquidity', 'rio']::text[],
       '11111111-1111-1111-1111-111111111111'::uuid
 where not exists (select 1 from public.claims where id = '67003e10-e1ee-5905-8b51-1b0cb263ec11'::uuid);

insert into public.claims (id, type, text, status, confidence, tags, created_by)
select 'e6ce4e36-15d2-53bc-8b74-dda0efc095c1'::uuid, 'normative', 'Internet finance is not Teleo’s telos; it is a candidate mechanism for pursuing the telos.',
       'open', 0.8, array['telos', 'internet-finance', 'rio', 'governance', 'strategy-boundary']::text[],
       '11111111-1111-1111-1111-111111111111'::uuid
 where not exists (select 1 from public.claims where id = 'e6ce4e36-15d2-53bc-8b74-dda0efc095c1'::uuid);

insert into public.sources (id, source_type, url, storage_path, excerpt, hash, created_by)
select '9a0d2429-b98b-585a-980c-0176db7f9fe7'::uuid, 'dm', null,
       null, '{"excerpt": "Yes let’s do this. do the work for this, then come back to me with what you''d like me to approve\n\nOld claim: Internet finance is the coordination mechanism for capital allocation — capital allocation is expressed priorities.\n\nBetter split: A. Capital allocation is a form of civilizational steering... B. Capital allocation depends on distributed knowledge... C. Internet finance has structural advantages... D. Internet finance is not the telos; it is a candidate mechanism.", "metadata": {"source_key": "m3ta_telegram_approval_supersede_split_2026_07_05", "source_quality": "primary operator/reviewer direction", "title": "m3ta Telegram approval to supersede compressed internet-finance claim", "usage_limits": "Provenance for proposal direction and review intent; not external empirical evidence."}}', '3fb4a747e76ec4116993a1cd4d59c1710e849a92dcc75bb0a179931be03a10c8',
       '11111111-1111-1111-1111-111111111111'::uuid
 where not exists (select 1 from public.sources where id = '9a0d2429-b98b-585a-980c-0176db7f9fe7'::uuid);

insert into public.sources (id, source_type, url, storage_path, excerpt, hash, created_by)
select '87f49cf0-5516-5aef-8ed9-f69292917d32'::uuid, 'other', null,
       null, '{"excerpt": "Hayek''s knowledge problem reveals that economic planning requires both local and global information which are never simultaneously available to decision makers", "metadata": {"claim_id": "7da4851c-0aac-4084-a99f-baeeeb3aa23e", "source_key": "kb_existing_hayek_claim_7da4851c", "source_quality": "canonical KB neighbor with evidence rows; needs reframing under distributed market intelligence concept map", "title": "Existing KB Hayek claim", "usage_limits": "Use as an existing graph neighbor, not as the final Hayek concept-map root."}}', '5ab1eae24c2acd3363a4cd2c2e0581e7c5e379753773719230419aa3b4c539fb',
       '11111111-1111-1111-1111-111111111111'::uuid
 where not exists (select 1 from public.sources where id = '87f49cf0-5516-5aef-8ed9-f69292917d32'::uuid);

insert into public.sources (id, source_type, url, storage_path, excerpt, hash, created_by)
select '33fadb51-0bd8-5f2d-87fe-758a3dd7fac0'::uuid, 'article', 'https://fee.org/articles/the-use-of-knowledge-in-society/',
       '/home/teleo/.hermes/profiles/leoclean/kb_stage/research/claim-node-standard/hayek_fee_text.txt', '{"excerpt": "There is beyond question a body of very important but unorganized knowledge... the knowledge of the particular circumstances of time and place.\n\nBy the price system... all the relevant information is concentrated...\n\nThe marvel is that... without an order being issued... tens of thousands of people... are made to use the material or its products more sparingly.", "metadata": {"source_key": "hayek_use_of_knowledge_in_society_fee_snapshot", "source_quality": "primary essay text snapshot", "title": "F. A. Hayek, The Use of Knowledge in Society", "usage_limits": "Supports the distributed market intelligence concept map and claim B; does not by itself prove internet finance superiority."}}', 'bb4934d37d3b327de5d12d62d58997b2c41e199e27c4a1407295ed36c975ed66',
       '11111111-1111-1111-1111-111111111111'::uuid
 where not exists (select 1 from public.sources where id = '33fadb51-0bd8-5f2d-87fe-758a3dd7fac0'::uuid);

insert into public.sources (id, source_type, url, storage_path, excerpt, hash, created_by)
select '3a57238c-ca31-5fe1-bece-e5fb2f174e32'::uuid, 'other', null,
       null, '{"excerpt": "Capital allocation is civilizational infrastructure, not a financial service.", "metadata": {"source_key": "rio_belief_capital_allocation_civilizational_infrastructure", "source_quality": "canonical agent belief/context neighbor", "title": "Rio belief rank 1", "usage_limits": "Use as internal Rio strategy/belief grounding, not external evidence."}}', 'fc6b6fa09947c04ed44df6570aa0389744e62e3e5b7d04ecfeda080fae6cbc89',
       '11111111-1111-1111-1111-111111111111'::uuid
 where not exists (select 1 from public.sources where id = '3a57238c-ca31-5fe1-bece-e5fb2f174e32'::uuid);

insert into public.sources (id, source_type, url, storage_path, excerpt, hash, created_by)
select '8f952541-5f12-5f24-88b3-21e7842163a1'::uuid, 'other', null,
       null, '{"excerpt": "Humanity is in the early innings of a species-level inflection... changes in how society distributes value, forms capital, and coordinates around shared futures.", "metadata": {"source_key": "leo_active_strategy_v2_context", "source_quality": "canonical agent strategy/context neighbor", "title": "Leo active strategy v2 context", "usage_limits": "Use as internal strategy-context grounding only."}}', 'a00f39707b1d90c31303da603d9daa1198ae1b810b45f54bd48bb599b64212be',
       '11111111-1111-1111-1111-111111111111'::uuid
 where not exists (select 1 from public.sources where id = '8f952541-5f12-5f24-88b3-21e7842163a1'::uuid);

insert into public.sources (id, source_type, url, storage_path, excerpt, hash, created_by)
select 'f80c01fe-63bb-5ccf-9bdd-744bab0e9163'::uuid, 'other', null,
       null, '{"body": "Capital allocation is not merely financial plumbing. It decides which companies, technologies, infrastructures, institutions, and narratives get enough resources to become real. Because many possible futures compete for scarce capital, allocation decisions function as steering inputs: they amplify some attractors and starve others. This does not mean capital is the only steering mechanism or that markets should decide the telos; it means resource flows are one of the main ways a society reveals and operationalizes priorities.", "candidate_review_note": "Approve as a structural/internal strategy claim at moderate confidence; external evidence can later raise confidence.", "claim_key": "capital_allocation_is_civilizational_steering", "evidence_tier": "internal/theoretical; needs external grounding for stronger confidence", "headline": "Capital allocation is a form of civilizational steering because it determines which futures receive resources.", "needs_research": null, "proposal_id": "14fa5ecc-ac7a-41c1-807d-a2e85b936617", "review_note": "Approved by m3ta in Telegram: supersede old compressed internet-finance/capital-allocation claim; approve successor A, B, and D at stated confidence/evidence tiers; approve C only as low-confidence research thesis; approve Distributed market intelligence as concept-map dependency. Canonical application still requires apply workflow for successor rows/edges/evidence.", "reviewed_by_handle": "m3ta", "source_ref": "telegram:m3ta:2026-07-05:supersede-old-internet-finance-claim"}', '4b7d20219f51607e05010cd8c6b888c3b5a96f9a7a534c4c7907b765e8a10955',
       '11111111-1111-1111-1111-111111111111'::uuid
 where not exists (select 1 from public.sources where id = 'f80c01fe-63bb-5ccf-9bdd-744bab0e9163'::uuid);

insert into public.sources (id, source_type, url, storage_path, excerpt, hash, created_by)
select '9fd61e7e-d5cb-5904-b5c2-a539946f7c96'::uuid, 'other', null,
       null, '{"body": "Good capital allocation requires more than a central thesis about what matters. It needs distributed knowledge about local opportunities, credible incentives that reward truth-seeking and execution, liquidity or price discovery that updates beliefs, and feedback loops that reveal whether resources were well allocated. This connects Hayek’s price-system insight to Teleo’s capital thesis: markets are a kind of social computation, but the computation is only as good as its mechanism design, participation, information quality, and correction loops.", "candidate_review_note": "This is the cleanest immediate Hayek-linked successor component. It should not replace the pure Hayek concept map; it applies that concept to capital allocation.", "claim_key": "capital_allocation_depends_on_distributed_market_intelligence", "evidence_tier": "primary-theoretical plus internal synthesis", "headline": "Capital allocation depends on distributed knowledge, incentives, liquidity, and feedback loops.", "needs_research": null, "proposal_id": "14fa5ecc-ac7a-41c1-807d-a2e85b936617", "review_note": "Approved by m3ta in Telegram: supersede old compressed internet-finance/capital-allocation claim; approve successor A, B, and D at stated confidence/evidence tiers; approve C only as low-confidence research thesis; approve Distributed market intelligence as concept-map dependency. Canonical application still requires apply workflow for successor rows/edges/evidence.", "reviewed_by_handle": "m3ta", "source_ref": "telegram:m3ta:2026-07-05:supersede-old-internet-finance-claim"}', '0972238794dffe6993ce6dfed7e652b184a15675c1e1e1149643e9212f033596',
       '11111111-1111-1111-1111-111111111111'::uuid
 where not exists (select 1 from public.sources where id = '9fd61e7e-d5cb-5904-b5c2-a539946f7c96'::uuid);

insert into public.sources (id, source_type, url, storage_path, excerpt, hash, created_by)
select '6c3c26c1-39bc-58e5-8c76-28b5712420ce'::uuid, 'other', null,
       null, '{"body": "Internet finance may improve capital allocation by making ownership, capital formation, settlement, liquidity, governance, and market feedback more digitally native, programmable, global, and composable. The thesis is not that crypto automatically wins or that all financial activity should move on-chain. The claim is that when financial primitives become cheaper, more transparent, more programmable, and more broadly accessible, they can outperform legacy intermediary-heavy systems in some allocation contexts. This remains the main empirical research claim in the cluster and should stay lower confidence until supported by evidence on costs, liquidity, access, governance quality, fraud, regulation, and adverse selection.", "candidate_review_note": "Approve as a research queue / thesis candidate, not as high-confidence canonical conclusion.", "claim_key": "internet_finance_structural_advantages_capital_allocation", "evidence_tier": "thesis candidate; requires research", "headline": "Internet finance has structural advantages over traditional finance and is likely to become an increasingly important capital-allocation mechanism.", "needs_research": ["transaction cost and intermediation cost evidence", "settlement/tokenization evidence", "liquidity and price-discovery evidence", "global access and capital-formation evidence", "programmable governance/futarchy evidence", "counterevidence: hacks, fraud, manipulation, regulatory frictions, adverse selection, governance capture"], "proposal_id": "14fa5ecc-ac7a-41c1-807d-a2e85b936617", "review_note": "Approved by m3ta in Telegram: supersede old compressed internet-finance/capital-allocation claim; approve successor A, B, and D at stated confidence/evidence tiers; approve C only as low-confidence research thesis; approve Distributed market intelligence as concept-map dependency. Canonical application still requires apply workflow for successor rows/edges/evidence.", "reviewed_by_handle": "m3ta", "source_ref": "telegram:m3ta:2026-07-05:supersede-old-internet-finance-claim"}', 'e332679983a38ab0fc14ba88327394ee08ba94f454ce2f918ca98881d7da11b2',
       '11111111-1111-1111-1111-111111111111'::uuid
 where not exists (select 1 from public.sources where id = '6c3c26c1-39bc-58e5-8c76-28b5712420ce'::uuid);

insert into public.sources (id, source_type, url, storage_path, excerpt, hash, created_by)
select '997e5e58-b20d-560a-a73a-eaa4bff1dc3e'::uuid, 'other', null,
       null, '{"body": "Teleo’s telos is emergent collective superintelligence oriented toward better futures, not internet finance for its own sake. Internet finance matters insofar as it can help coordinate capital, incentives, forecasts, ownership, and resource flows toward mission-oriented builders and desirable attractor states. This distinction prevents Rio’s mechanism from becoming the collective’s purpose and keeps capital allocation subordinate to human agency, safety, governance, and the broader post-scarcity/multiplanetary aim.", "candidate_review_note": "This should be approved as a boundary claim to prevent mechanism/telos collapse.", "claim_key": "internet_finance_is_mechanism_not_telos", "evidence_tier": "internal strategy/governance", "headline": "Internet finance is not Teleo’s telos; it is a candidate mechanism for pursuing the telos.", "needs_research": null, "proposal_id": "14fa5ecc-ac7a-41c1-807d-a2e85b936617", "review_note": "Approved by m3ta in Telegram: supersede old compressed internet-finance/capital-allocation claim; approve successor A, B, and D at stated confidence/evidence tiers; approve C only as low-confidence research thesis; approve Distributed market intelligence as concept-map dependency. Canonical application still requires apply workflow for successor rows/edges/evidence.", "reviewed_by_handle": "m3ta", "source_ref": "telegram:m3ta:2026-07-05:supersede-old-internet-finance-claim"}', '75e3f94ad2b7fcbdc096e56f05bc396c8f62fad055326c9d0ee7d760090746d9',
       '11111111-1111-1111-1111-111111111111'::uuid
 where not exists (select 1 from public.sources where id = '997e5e58-b20d-560a-a73a-eaa4bff1dc3e'::uuid);

insert into public.claim_evidence (claim_id, source_id, role, weight)
select '004195cc-ab62-526c-90fb-51cb0f826ec0'::uuid, 'f80c01fe-63bb-5ccf-9bdd-744bab0e9163'::uuid,
       'illustrates'::evidence_role, null
 where not exists (
   select 1 from public.claim_evidence
    where claim_id = '004195cc-ab62-526c-90fb-51cb0f826ec0'::uuid
      and source_id = 'f80c01fe-63bb-5ccf-9bdd-744bab0e9163'::uuid
      and role = 'illustrates'::evidence_role);

insert into public.claim_evidence (claim_id, source_id, role, weight)
select '004195cc-ab62-526c-90fb-51cb0f826ec0'::uuid, '3a57238c-ca31-5fe1-bece-e5fb2f174e32'::uuid,
       'grounds'::evidence_role, null
 where not exists (
   select 1 from public.claim_evidence
    where claim_id = '004195cc-ab62-526c-90fb-51cb0f826ec0'::uuid
      and source_id = '3a57238c-ca31-5fe1-bece-e5fb2f174e32'::uuid
      and role = 'grounds'::evidence_role);

insert into public.claim_evidence (claim_id, source_id, role, weight)
select '004195cc-ab62-526c-90fb-51cb0f826ec0'::uuid, '8f952541-5f12-5f24-88b3-21e7842163a1'::uuid,
       'grounds'::evidence_role, null
 where not exists (
   select 1 from public.claim_evidence
    where claim_id = '004195cc-ab62-526c-90fb-51cb0f826ec0'::uuid
      and source_id = '8f952541-5f12-5f24-88b3-21e7842163a1'::uuid
      and role = 'grounds'::evidence_role);

insert into public.claim_evidence (claim_id, source_id, role, weight)
select '004195cc-ab62-526c-90fb-51cb0f826ec0'::uuid, '9a0d2429-b98b-585a-980c-0176db7f9fe7'::uuid,
       'grounds'::evidence_role, null
 where not exists (
   select 1 from public.claim_evidence
    where claim_id = '004195cc-ab62-526c-90fb-51cb0f826ec0'::uuid
      and source_id = '9a0d2429-b98b-585a-980c-0176db7f9fe7'::uuid
      and role = 'grounds'::evidence_role);

insert into public.claim_evidence (claim_id, source_id, role, weight)
select 'd009dfc4-9755-58a7-affb-80e3e842a775'::uuid, '9fd61e7e-d5cb-5904-b5c2-a539946f7c96'::uuid,
       'illustrates'::evidence_role, null
 where not exists (
   select 1 from public.claim_evidence
    where claim_id = 'd009dfc4-9755-58a7-affb-80e3e842a775'::uuid
      and source_id = '9fd61e7e-d5cb-5904-b5c2-a539946f7c96'::uuid
      and role = 'illustrates'::evidence_role);

insert into public.claim_evidence (claim_id, source_id, role, weight)
select 'd009dfc4-9755-58a7-affb-80e3e842a775'::uuid, '33fadb51-0bd8-5f2d-87fe-758a3dd7fac0'::uuid,
       'grounds'::evidence_role, null
 where not exists (
   select 1 from public.claim_evidence
    where claim_id = 'd009dfc4-9755-58a7-affb-80e3e842a775'::uuid
      and source_id = '33fadb51-0bd8-5f2d-87fe-758a3dd7fac0'::uuid
      and role = 'grounds'::evidence_role);

insert into public.claim_evidence (claim_id, source_id, role, weight)
select '67003e10-e1ee-5905-8b51-1b0cb263ec11'::uuid, '6c3c26c1-39bc-58e5-8c76-28b5712420ce'::uuid,
       'illustrates'::evidence_role, null
 where not exists (
   select 1 from public.claim_evidence
    where claim_id = '67003e10-e1ee-5905-8b51-1b0cb263ec11'::uuid
      and source_id = '6c3c26c1-39bc-58e5-8c76-28b5712420ce'::uuid
      and role = 'illustrates'::evidence_role);

insert into public.claim_evidence (claim_id, source_id, role, weight)
select '67003e10-e1ee-5905-8b51-1b0cb263ec11'::uuid, '9a0d2429-b98b-585a-980c-0176db7f9fe7'::uuid,
       'grounds'::evidence_role, null
 where not exists (
   select 1 from public.claim_evidence
    where claim_id = '67003e10-e1ee-5905-8b51-1b0cb263ec11'::uuid
      and source_id = '9a0d2429-b98b-585a-980c-0176db7f9fe7'::uuid
      and role = 'grounds'::evidence_role);

insert into public.claim_evidence (claim_id, source_id, role, weight)
select 'e6ce4e36-15d2-53bc-8b74-dda0efc095c1'::uuid, '997e5e58-b20d-560a-a73a-eaa4bff1dc3e'::uuid,
       'illustrates'::evidence_role, null
 where not exists (
   select 1 from public.claim_evidence
    where claim_id = 'e6ce4e36-15d2-53bc-8b74-dda0efc095c1'::uuid
      and source_id = '997e5e58-b20d-560a-a73a-eaa4bff1dc3e'::uuid
      and role = 'illustrates'::evidence_role);

insert into public.claim_evidence (claim_id, source_id, role, weight)
select 'e6ce4e36-15d2-53bc-8b74-dda0efc095c1'::uuid, '8f952541-5f12-5f24-88b3-21e7842163a1'::uuid,
       'grounds'::evidence_role, null
 where not exists (
   select 1 from public.claim_evidence
    where claim_id = 'e6ce4e36-15d2-53bc-8b74-dda0efc095c1'::uuid
      and source_id = '8f952541-5f12-5f24-88b3-21e7842163a1'::uuid
      and role = 'grounds'::evidence_role);

insert into public.claim_evidence (claim_id, source_id, role, weight)
select 'e6ce4e36-15d2-53bc-8b74-dda0efc095c1'::uuid, '9a0d2429-b98b-585a-980c-0176db7f9fe7'::uuid,
       'grounds'::evidence_role, null
 where not exists (
   select 1 from public.claim_evidence
    where claim_id = 'e6ce4e36-15d2-53bc-8b74-dda0efc095c1'::uuid
      and source_id = '9a0d2429-b98b-585a-980c-0176db7f9fe7'::uuid
      and role = 'grounds'::evidence_role);

insert into public.claim_edges (from_claim, to_claim, edge_type, weight)
select '004195cc-ab62-526c-90fb-51cb0f826ec0'::uuid, 'd0000000-0000-0000-0000-000000000005'::uuid,
       'supersedes'::edge_type, null
 where not exists (
   select 1 from public.claim_edges
    where from_claim = '004195cc-ab62-526c-90fb-51cb0f826ec0'::uuid
      and to_claim = 'd0000000-0000-0000-0000-000000000005'::uuid
      and edge_type = 'supersedes'::edge_type);

insert into public.claim_edges (from_claim, to_claim, edge_type, weight)
select 'd009dfc4-9755-58a7-affb-80e3e842a775'::uuid, 'd0000000-0000-0000-0000-000000000005'::uuid,
       'supersedes'::edge_type, null
 where not exists (
   select 1 from public.claim_edges
    where from_claim = 'd009dfc4-9755-58a7-affb-80e3e842a775'::uuid
      and to_claim = 'd0000000-0000-0000-0000-000000000005'::uuid
      and edge_type = 'supersedes'::edge_type);

insert into public.claim_edges (from_claim, to_claim, edge_type, weight)
select '67003e10-e1ee-5905-8b51-1b0cb263ec11'::uuid, 'd0000000-0000-0000-0000-000000000005'::uuid,
       'supersedes'::edge_type, null
 where not exists (
   select 1 from public.claim_edges
    where from_claim = '67003e10-e1ee-5905-8b51-1b0cb263ec11'::uuid
      and to_claim = 'd0000000-0000-0000-0000-000000000005'::uuid
      and edge_type = 'supersedes'::edge_type);

insert into public.claim_edges (from_claim, to_claim, edge_type, weight)
select 'e6ce4e36-15d2-53bc-8b74-dda0efc095c1'::uuid, 'd0000000-0000-0000-0000-000000000005'::uuid,
       'supersedes'::edge_type, null
 where not exists (
   select 1 from public.claim_edges
    where from_claim = 'e6ce4e36-15d2-53bc-8b74-dda0efc095c1'::uuid
      and to_claim = 'd0000000-0000-0000-0000-000000000005'::uuid
      and edge_type = 'supersedes'::edge_type);

insert into public.claim_edges (from_claim, to_claim, edge_type, weight)
select 'd009dfc4-9755-58a7-affb-80e3e842a775'::uuid, '7da4851c-0aac-4084-a99f-baeeeb3aa23e'::uuid,
       'relates'::edge_type, null
 where not exists (
   select 1 from public.claim_edges
    where from_claim = 'd009dfc4-9755-58a7-affb-80e3e842a775'::uuid
      and to_claim = '7da4851c-0aac-4084-a99f-baeeeb3aa23e'::uuid
      and edge_type = 'relates'::edge_type);

insert into public.claim_edges (from_claim, to_claim, edge_type, weight)
select '67003e10-e1ee-5905-8b51-1b0cb263ec11'::uuid, 'd009dfc4-9755-58a7-affb-80e3e842a775'::uuid,
       'requires'::edge_type, null
 where not exists (
   select 1 from public.claim_edges
    where from_claim = '67003e10-e1ee-5905-8b51-1b0cb263ec11'::uuid
      and to_claim = 'd009dfc4-9755-58a7-affb-80e3e842a775'::uuid
      and edge_type = 'requires'::edge_type);

insert into public.claim_edges (from_claim, to_claim, edge_type, weight)
select 'e6ce4e36-15d2-53bc-8b74-dda0efc095c1'::uuid, '67003e10-e1ee-5905-8b51-1b0cb263ec11'::uuid,
       'constrains'::edge_type, null
 where not exists (
   select 1 from public.claim_edges
    where from_claim = 'e6ce4e36-15d2-53bc-8b74-dda0efc095c1'::uuid
      and to_claim = '67003e10-e1ee-5905-8b51-1b0cb263ec11'::uuid
      and edge_type = 'constrains'::edge_type);

commit;


begin;

set local statement_timeout = '30s';

-- rollback-only rehearsal: do not replace ROLLBACK with COMMIT without separate review

insert into public.claims (id, type, text, status, confidence, tags, created_by)
select '9bcf7e6b-4e98-52b1-91ef-96cfc15e3df0'::uuid, 'meta', 'KB claim nodes need explanatory bodies, not only one-sentence headlines.',
       'open', 0.85, '{}'::text[],
       '11111111-1111-1111-1111-111111111111'::uuid
 where not exists (select 1 from public.claims where id = '9bcf7e6b-4e98-52b1-91ef-96cfc15e3df0'::uuid);

insert into public.claims (id, type, text, status, confidence, tags, created_by)
select '62e82ee8-b204-573b-9707-eb5d832b9d9e'::uuid, 'structural', 'Internet finance has structural advantages that make it likely to become an increasingly important capital-allocation mechanism.',
       'open', 0.45, '{}'::text[],
       '11111111-1111-1111-1111-111111111111'::uuid
 where not exists (select 1 from public.claims where id = '62e82ee8-b204-573b-9707-eb5d832b9d9e'::uuid);

insert into public.claims (id, type, text, status, confidence, tags, created_by)
select 'cd8daac8-039c-5349-9c50-02f622e73b03'::uuid, 'structural', 'Hayek’s most relevant contribution for Teleo is that prices coordinate dispersed, local, time-sensitive knowledge without central possession of that knowledge.',
       'open', 0.8, '{}'::text[],
       '11111111-1111-1111-1111-111111111111'::uuid
 where not exists (select 1 from public.claims where id = 'cd8daac8-039c-5349-9c50-02f622e73b03'::uuid);

insert into public.sources (id, source_type, url, storage_path, excerpt, hash, created_by)
select '703fdfaf-22c9-5f5b-8d29-cf238d5e156f'::uuid, 'other', null,
       null, '{"excerpt": "# Teleo Collective Telos and Agent Strategy Kernels ... This is a working synthesis, not canonical KB state.\n\nCore Strategic Tools are named and then elaborated with short explanatory bodies: Inflection map, Attractor-state analysis, Power-window detection, Collective epistemic architecture.\n\nAgent evolution must be legible, reviewable, attributable, corrigible, contributor-shaped, and user-controlled. Identity is a control surface.", "metadata": {"source_key": "telegram_attachment_teleo_agent_strategy_kernels_2026_06_30", "source_quality": "primary/internal working synthesis; explicitly non-canonical", "title": "Teleo Collective Telos and Agent Strategy Kernels", "usage_limits": "Use as provenance for m3ta/Leo working synthesis and agent-strategy formatting expectations, not as empirical evidence for external claims."}}', 'aa2c731057b11788dc1600d4af8570276352bcbdb2be3b307e9ffc5f4670b8ce',
       '11111111-1111-1111-1111-111111111111'::uuid
 where not exists (select 1 from public.sources where id = '703fdfaf-22c9-5f5b-8d29-cf238d5e156f'::uuid);

insert into public.sources (id, source_type, url, storage_path, excerpt, hash, created_by)
select '4787c38e-74cb-5bf5-93e1-0cc9c290684c'::uuid, 'other', null,
       null, '{"excerpt": "Nodes should have a headline that’s the claim belief or concept map etc, but also a body elaborating what the claim means.\n\nStandardize these nodes as: Headline, Body, Edges, Evidence.\n\nFor Hayek that is a claim he makes but I am not sure it is the strongest in the paper or the most relevant to us.", "metadata": {"source_key": "telegram_feedback_m3ta_claim_shape_2026_07_05", "source_quality": "primary operator/reviewer direction", "title": "m3ta Telegram feedback on claim node shape", "usage_limits": "Use as review direction for KB proposal hygiene and candidate reframing; not external evidence."}}', '731dab6bb99a573d0242cdd067661ea9b257a581b8187134f1a1eb04df63d3b3',
       '11111111-1111-1111-1111-111111111111'::uuid
 where not exists (select 1 from public.sources where id = '4787c38e-74cb-5bf5-93e1-0cc9c290684c'::uuid);

insert into public.sources (id, source_type, url, storage_path, excerpt, hash, created_by)
select '4cc0c7ee-2166-5cae-9065-ea226fa2be5b'::uuid, 'article', 'https://fee.org/articles/the-use-of-knowledge-in-society/',
       '/home/teleo/.hermes/profiles/leoclean/kb_stage/research/claim-node-standard/hayek_fee_text.txt', '{"excerpt": "There is beyond question a body of very important but unorganized knowledge... the knowledge of the particular circumstances of time and place.\n\nBy the price system... all the relevant information is concentrated...\n\nThe marvel is that... without an order being issued... tens of thousands of people... are made to use the material or its products more sparingly.", "metadata": {"source_key": "hayek_use_of_knowledge_in_society_fee_snapshot", "source_quality": "primary canonical essay text snapshot", "title": "F. A. Hayek, The Use of Knowledge in Society", "usage_limits": "Supports reframing the Hayek anchor toward dispersed local knowledge and the price system as compressed communication/coordination, not merely a generic local/global-information claim."}}', '4dcf12eda82943e8c945950a866ae699e5bd92584122edffd5456c9b415dc43f',
       '11111111-1111-1111-1111-111111111111'::uuid
 where not exists (select 1 from public.sources where id = '4cc0c7ee-2166-5cae-9065-ea226fa2be5b'::uuid);

insert into public.sources (id, source_type, url, storage_path, excerpt, hash, created_by)
select 'a3cba49b-7016-5f42-9af6-041f12371a24'::uuid, 'other', null,
       null, '{"body": "A one-sentence claim can be useful as a handle, but it often under-specifies scope, mechanism, caveats, and what evidence would actually support it. Bodies make claims reviewable by explaining intended meaning and boundaries, which reduces false agreement and later graph drift.", "candidate_review_note": null, "claim_key": "claim_nodes_need_bodies", "evidence_tier": null, "headline": "KB claim nodes need explanatory bodies, not only one-sentence headlines.", "needs_research": null, "proposal_id": "ac036c9d-20a0-4ffe-881f-57d6b7bacf22", "review_note": "Approved by m3ta in Telegram with caveat: not every node is a claim; concept maps and other node types also need headline/body/edges/evidence-style hygiene where appropriate. Hayek should likely be structured as a pure concept map of distributed market intelligence, then connected to agent/telos extrapolations rather than forcing a replacement claim.", "reviewed_by_handle": "m3ta", "source_ref": "telegram-doc:/home/teleo/.hermes/profiles/leoclean/cache/documents/doc_e37afcd86605_teleo_agent_strategy_kernels_2026-06-30.md; session:20260705_claim_shape"}', 'f9851aa86d9355a37bafc8f7162f17839ab48164e602db7b8d312ad649d0aa0a',
       '11111111-1111-1111-1111-111111111111'::uuid
 where not exists (select 1 from public.sources where id = 'a3cba49b-7016-5f42-9af6-041f12371a24'::uuid);

insert into public.sources (id, source_type, url, storage_path, excerpt, hash, created_by)
select 'eea07732-c65d-5db6-88d6-1ab08511eca6'::uuid, 'other', null,
       null, '{"body": "This does not mean “crypto wins because crypto.” It means digitally native capital formation, programmable governance, global distribution, lower intermediation costs, faster liquidity, composable ownership, and market-based feedback loops may outperform legacy financial institutions in more and more capital-allocation contexts. If capital allocation is society’s revealed prioritization system, then infrastructure that changes how capital is formed, priced, governed, and allocated becomes a coordination mechanism. This remains a research-backed thesis candidate, not an approved empirical conclusion.", "candidate_review_note": null, "claim_key": "internet_finance_structural_advantages_body_draft", "evidence_tier": null, "headline": "Internet finance has structural advantages that make it likely to become an increasingly important capital-allocation mechanism.", "needs_research": ["transaction-cost evidence", "liquidity/cost-of-capital evidence", "tokenization/settlement evidence", "DeFi/composability evidence", "counterevidence on fraud/regulation/adverse-selection/governance capture"], "proposal_id": "ac036c9d-20a0-4ffe-881f-57d6b7bacf22", "review_note": "Approved by m3ta in Telegram with caveat: not every node is a claim; concept maps and other node types also need headline/body/edges/evidence-style hygiene where appropriate. Hayek should likely be structured as a pure concept map of distributed market intelligence, then connected to agent/telos extrapolations rather than forcing a replacement claim.", "reviewed_by_handle": "m3ta", "source_ref": "telegram-doc:/home/teleo/.hermes/profiles/leoclean/cache/documents/doc_e37afcd86605_teleo_agent_strategy_kernels_2026-06-30.md; session:20260705_claim_shape"}', 'e3af0f889ae11a81888de40e34336b05d2bf0dc178b3b76bc6ea8c50edff96cf',
       '11111111-1111-1111-1111-111111111111'::uuid
 where not exists (select 1 from public.sources where id = 'eea07732-c65d-5db6-88d6-1ab08511eca6'::uuid);

insert into public.sources (id, source_type, url, storage_path, excerpt, hash, created_by)
select '244a4c38-86e5-5910-91f4-6d71529e9b31'::uuid, 'other', null,
       null, '{"body": "The existing KB Hayek claim says economic planning requires local and global information that are never simultaneously available to decision makers. That is directionally related, but the stronger Teleo-relevant frame is the positive mechanism: useful knowledge is dispersed among people in particular circumstances of time and place, and the price system compresses signals so many actors can adjust without a central planner knowing the full causal story. This better supports claims about capital allocation, internet finance, prediction markets, and collective intelligence as coordination systems.", "candidate_review_note": null, "claim_key": "hayek_reframed_price_system_distributed_knowledge", "evidence_tier": null, "headline": "Hayek’s most relevant contribution for Teleo is that prices coordinate dispersed, local, time-sensitive knowledge without central possession of that knowledge.", "needs_research": null, "proposal_id": "ac036c9d-20a0-4ffe-881f-57d6b7bacf22", "review_note": "Approved by m3ta in Telegram with caveat: not every node is a claim; concept maps and other node types also need headline/body/edges/evidence-style hygiene where appropriate. Hayek should likely be structured as a pure concept map of distributed market intelligence, then connected to agent/telos extrapolations rather than forcing a replacement claim.", "reviewed_by_handle": "m3ta", "source_ref": "telegram-doc:/home/teleo/.hermes/profiles/leoclean/cache/documents/doc_e37afcd86605_teleo_agent_strategy_kernels_2026-06-30.md; session:20260705_claim_shape"}', 'd6b4ee4312442116877f33e20ae5ed5e14ef2aeae6585ca0e5ab956ba75b9709',
       '11111111-1111-1111-1111-111111111111'::uuid
 where not exists (select 1 from public.sources where id = '244a4c38-86e5-5910-91f4-6d71529e9b31'::uuid);

insert into public.claim_evidence (claim_id, source_id, role, weight)
select '9bcf7e6b-4e98-52b1-91ef-96cfc15e3df0'::uuid, 'a3cba49b-7016-5f42-9af6-041f12371a24'::uuid,
       'illustrates'::evidence_role, null
 where not exists (
   select 1 from public.claim_evidence
    where claim_id = '9bcf7e6b-4e98-52b1-91ef-96cfc15e3df0'::uuid
      and source_id = 'a3cba49b-7016-5f42-9af6-041f12371a24'::uuid
      and role = 'illustrates'::evidence_role);

insert into public.claim_evidence (claim_id, source_id, role, weight)
select '9bcf7e6b-4e98-52b1-91ef-96cfc15e3df0'::uuid, '4787c38e-74cb-5bf5-93e1-0cc9c290684c'::uuid,
       'grounds'::evidence_role, null
 where not exists (
   select 1 from public.claim_evidence
    where claim_id = '9bcf7e6b-4e98-52b1-91ef-96cfc15e3df0'::uuid
      and source_id = '4787c38e-74cb-5bf5-93e1-0cc9c290684c'::uuid
      and role = 'grounds'::evidence_role);

insert into public.claim_evidence (claim_id, source_id, role, weight)
select '62e82ee8-b204-573b-9707-eb5d832b9d9e'::uuid, 'eea07732-c65d-5db6-88d6-1ab08511eca6'::uuid,
       'illustrates'::evidence_role, null
 where not exists (
   select 1 from public.claim_evidence
    where claim_id = '62e82ee8-b204-573b-9707-eb5d832b9d9e'::uuid
      and source_id = 'eea07732-c65d-5db6-88d6-1ab08511eca6'::uuid
      and role = 'illustrates'::evidence_role);

insert into public.claim_evidence (claim_id, source_id, role, weight)
select '62e82ee8-b204-573b-9707-eb5d832b9d9e'::uuid, '4787c38e-74cb-5bf5-93e1-0cc9c290684c'::uuid,
       'grounds'::evidence_role, null
 where not exists (
   select 1 from public.claim_evidence
    where claim_id = '62e82ee8-b204-573b-9707-eb5d832b9d9e'::uuid
      and source_id = '4787c38e-74cb-5bf5-93e1-0cc9c290684c'::uuid
      and role = 'grounds'::evidence_role);

insert into public.claim_evidence (claim_id, source_id, role, weight)
select 'cd8daac8-039c-5349-9c50-02f622e73b03'::uuid, '244a4c38-86e5-5910-91f4-6d71529e9b31'::uuid,
       'illustrates'::evidence_role, null
 where not exists (
   select 1 from public.claim_evidence
    where claim_id = 'cd8daac8-039c-5349-9c50-02f622e73b03'::uuid
      and source_id = '244a4c38-86e5-5910-91f4-6d71529e9b31'::uuid
      and role = 'illustrates'::evidence_role);

insert into public.claim_evidence (claim_id, source_id, role, weight)
select 'cd8daac8-039c-5349-9c50-02f622e73b03'::uuid, '4cc0c7ee-2166-5cae-9065-ea226fa2be5b'::uuid,
       'grounds'::evidence_role, null
 where not exists (
   select 1 from public.claim_evidence
    where claim_id = 'cd8daac8-039c-5349-9c50-02f622e73b03'::uuid
      and source_id = '4cc0c7ee-2166-5cae-9065-ea226fa2be5b'::uuid
      and role = 'grounds'::evidence_role);

insert into public.claim_edges (from_claim, to_claim, edge_type, weight)
select '62e82ee8-b204-573b-9707-eb5d832b9d9e'::uuid, 'cd8daac8-039c-5349-9c50-02f622e73b03'::uuid,
       'derives_from'::edge_type, null
 where not exists (
   select 1 from public.claim_edges
    where from_claim = '62e82ee8-b204-573b-9707-eb5d832b9d9e'::uuid
      and to_claim = 'cd8daac8-039c-5349-9c50-02f622e73b03'::uuid
      and edge_type = 'derives_from'::edge_type);

insert into public.claim_edges (from_claim, to_claim, edge_type, weight)
select '62e82ee8-b204-573b-9707-eb5d832b9d9e'::uuid, 'c0000000-0000-0000-0000-00000000000c'::uuid,
       'relates'::edge_type, null
 where not exists (
   select 1 from public.claim_edges
    where from_claim = '62e82ee8-b204-573b-9707-eb5d832b9d9e'::uuid
      and to_claim = 'c0000000-0000-0000-0000-00000000000c'::uuid
      and edge_type = 'relates'::edge_type);

insert into public.claim_edges (from_claim, to_claim, edge_type, weight)
select 'cd8daac8-039c-5349-9c50-02f622e73b03'::uuid, '7da4851c-0aac-4084-a99f-baeeeb3aa23e'::uuid,
       'supersedes'::edge_type, null
 where not exists (
   select 1 from public.claim_edges
    where from_claim = 'cd8daac8-039c-5349-9c50-02f622e73b03'::uuid
      and to_claim = '7da4851c-0aac-4084-a99f-baeeeb3aa23e'::uuid
      and edge_type = 'supersedes'::edge_type);

insert into public.claim_edges (from_claim, to_claim, edge_type, weight)
select 'cd8daac8-039c-5349-9c50-02f622e73b03'::uuid, '62e82ee8-b204-573b-9707-eb5d832b9d9e'::uuid,
       'supports'::edge_type, null
 where not exists (
   select 1 from public.claim_edges
    where from_claim = 'cd8daac8-039c-5349-9c50-02f622e73b03'::uuid
      and to_claim = '62e82ee8-b204-573b-9707-eb5d832b9d9e'::uuid
      and edge_type = 'supports'::edge_type);

commit;
