resource_budgets schema exists for per-entity budget envelopes with token, CPU, and priority fields.resource_usage schema is normalized to the task contract with amount_used and timestamp compatibility columns.allocation_proposals schema is normalized to the task contract with proposer, requested amount, and vote storage.d5cc6ada-a31 — allocation proposal workflow already established and must remain compatible.370890cc-17a6-4afc-803c-f3219625c49d — resource usage tracking already established and must remain compatible.7dea0448787e — daily budget checks already rely on resource_usage cost rows./api/economics/* work can use resource_budgets as the canonical per-entity envelope table.llm_tokens: budgeted by model tier so expensive reasoning models and cheap batch models do not collapse into one pool.cpu_seconds / cpu_budget: used for local analysis jobs, post-processing, and background drivers.storage_gb_hours: used for notebooks, figures, artifacts, and cached intermediate outputs.api_calls: used for PubMed, Semantic Scholar, OpenAlex, Crossref, and other external providers.resource_usage rows, while policy decisions write or update resource_budgets and allocation_proposals.(entity_type, entity_id), where entity_type is typically one of hypothesis, knowledge_gap, analysis, or entity. Each object receives a budget envelope in resource_budgets:
token_budget: token credits available for LLM-bound work.cpu_budget: compute allowance for local or external jobs.storage_budget_gb and api_call_budget: optional secondary caps for artifacts and external APIs.priority_score: policy score used to rank entities when budgets are scarce.market_weight and roi_score: continuously updated modifiers derived from Exchange prices and Atlas ROI metrics.resource_usage; budgets are the editable control surface.priority_score:allocation_score = 0.35 evidence_strength + 0.25 novelty + 0.20 strategic_alignment + 0.20 community_interest
Definitions:
evidence_strength: quality and amount of support already present in papers, debates, replication signals, or KG links.novelty: whether the work opens underexplored terrain rather than re-spending resources on saturated topics.strategic_alignment: how directly the object advances the five-layer world-model roadmap.community_interest: demand signal from debates, comments, votes, bounties, or review attention.market_weight is not folded into the base score. It is applied after scoring so Exchange signals modulate, rather than fully overwrite, Senate judgment.allocation_proposals. The governance workflow is:
proposer, entity_type, entity_id, requested_amount, justification, and optional votes ledger.resource_budgets row; all actual spend continues to land in resource_usage.The justification requirement is intentionally strict: a resource increase is valid only when the proposer links the requested spend to expected world-model gain.
effective_budget = base_budget * (1 + market_weight)
where market_weight is derived from normalized Exchange confidence or price signals. High-confidence hypotheses therefore receive proportionally more budget, but only after clearing the Senate scoring and governance thresholds above.
This keeps market signals directional rather than sovereign: speculative enthusiasm can accelerate work, but it cannot bypass evidence standards.
roi_score = kg_edges_gained / tokens_spent
This can be extended with papers added, hypotheses improved, or artifact-quality gains, but KG-edge gain per token spent is the primary anchor because it maps directly to world-model expansion. During review:
resource_usage already tracked amount, created_at, cost, model, and artifact context.allocation_proposals already tracked requested_tokens, proposer metadata, approval state, and evidence fields.resource_usage.amount_used mirrors amount.resource_usage.timestamp mirrors created_at.allocation_proposals.requested_amount mirrors requested_tokens.allocation_proposals.proposer mirrors proposer_id or proposer_agent.allocation_proposals.votes stores structured Senate vote records as jsonb.resource_usage and allocation_proposals already exist in PostgreSQL, but resource_budgets does not.resource_budgets existed and pointed to an external Google Doc instead of serving as the in-repo design source.migrations/121_resource_allocation_economics.py.resource_budgets with token, CPU, storage, API, priority, market-weight, and ROI fields plus ranking indexes.resource_usage (amount_used, timestamp) and allocation_proposals (proposer, requested_amount, votes) with backfills from existing canonical columns.python3 migrations/121_resource_allocation_economics.py successfully against PostgreSQL.resource_budgets now exists and inspected its full column list through information_schema.columns.resource_usage now exposes amount_used and timestamp.allocation_proposals now exposes proposer, requested_amount, and votes.scidex/core/resource_tracker.py and scidex/senate/resource_governance.py to confirm they still rely on the original canonical columns.resource_usage.amount_used/timestamp and allocation_proposals.proposer/requested_amount/votes all returned zero missing rows.origin/main still carried the stale external-doc placeholder spec, so this task remained necessary and non-duplicative.python3 migrations/121_resource_allocation_economics.py to confirm the migration remains idempotent after the first successful apply.information_schema.columns for resource_budgets and re-checked null counts on the new compatibility columns; all expected columns remain present and the new fields still report zero missing rows.origin/main before commit preparation.origin/main:docs/planning/specs/economics_framework_spec.md still contains the stale external-doc placeholder, while this worktree contains the in-repo framework and migration.python3 migrations/121_resource_allocation_economics.py and an information_schema.columns audit; resource_budgets exists, the compatibility columns remain present, and null-count checks for amount_used, timestamp, proposer, and requested_amount all remained at zero.