{
  "schema_version": "2026-05-26.agent-task-economy.v1",
  "name": "TokRepo Agent Task Economy Contract",
  "canonical_url": "https://tokrepo.com/agent-task-economy.json",
  "updated_at": "2026-05-28",
  "purpose": "Define TokRepo's long-horizon product goal: help agents complete, evaluate, reuse, and package high-value tasks over repeated runs instead of stopping at short-lived endpoints or one-off asset listings.",
  "long_horizon_goal": "TokRepo is the task-economy layer for AI agents: detect a high-value task, resolve reusable capability, execute safely, evaluate the outcome, preserve state, and turn verified reusable work back into private-by-default supply.",
  "source_basis": {
    "readable_reference": "https://mp.weixin.qq.com/s/yVFQej3dFk9KHv6J2u6Lew",
    "access_note": "The user-provided WeChat article was opened through a connected Chrome MCP path. This public contract summarizes product lessons only and deliberately does not publish any private article access token.",
    "captured_themes": [
      "Agent quality cannot be judged only from the final answer",
      "a mini harness needs Task, Environment, Tools, Trace, and Grader",
      "the trace must record tool names, arguments, and returned results",
      "graders should check required reads, unsupported conclusions, test results, and redundant steps",
      "production harnesses turn subjective agent trials into reproducible, scoreable experiments",
      "https://tokrepo.com/evals/agent-repair-execution.json",
      "agent-repair-execution.json"
    ]
  },
  "borrowed_mechanisms": [
    {
      "id": "mini_agent_harness",
      "lesson": "A useful first harness records Task, Environment, Tools, Trace, and Grader before claiming an agent task passed.",
      "tokrepo_application": "TokRepo now publishes a deterministic mini task harness eval where each case records the task, fixture environment, tool calls with arguments/results, answer, and grader checks.",
      "evidence_surface": "https://tokrepo.com/evals/agent-task-harness.json"
    },
    {
      "id": "high_value_task_economics",
      "lesson": "Optimize for task value and completion, not for raw chat activity or page visits.",
      "tokrepo_application": "Every agent-facing surface should answer which high-value task it helps complete, what duplicate rebuild it avoids, and how the task result is verified.",
      "evidence_surface": "https://tokrepo.com/evals/agent-baseline.json"
    },
    {
      "id": "production_harness",
      "lesson": "A production harness is more durable than a demo app because it controls evals, retries, state, permissions, and recovery.",
      "tokrepo_application": "TokRepo's harness is the MCP/CLI/install-plan/evidence bundle lifecycle: resolve, discover, verify, plan, dry-run, install or stage, audit, rollback, and handoff.",
      "evidence_surface": "https://tokrepo.com/.well-known/tokrepo.json"
    },
    {
      "id": "skill_supply_chain",
      "lesson": "Skills are not static documents; they are reusable supply that should be discovered, installed, verified, improved, and harvested after real work.",
      "tokrepo_application": "Treat skills, prompts, scripts, MCP configs, workflows, project rules, and evals as typed supply with private-by-default harvest and human-confirmed publishing.",
      "evidence_surface": "https://tokrepo.com/agent-ecosystem.json#supply_handoff"
    },
    {
      "id": "long_running_clock",
      "lesson": "Agents need a clock for recurring work, delayed checks, and long-running task ownership.",
      "tokrepo_application": "Represent recurring and delayed work as task runs with schedule, status, state, evidence, next action, and rollback or handoff plan rather than as disconnected one-shot commands.",
      "evidence_surface": "https://tokrepo.com/evals/agent-task-ledger.json"
    },
    {
      "id": "outcome_oracle_receipts",
      "lesson": "A durable agent task needs a run receipt: last run time, next due time, freshness, verification command, evidence digest, outcome oracle, verdict, and user effect.",
      "tokrepo_application": "TokRepo now publishes deterministic task receipts so long-running work can be audited for freshness and outcome, not only remembered as a scheduled state row.",
      "evidence_surface": "https://tokrepo.com/evals/agent-task-receipts.json"
    },
    {
      "id": "conversation_focus_loop",
      "lesson": "A reminder loop is not the same as autonomous execution; long-running agents must separate conversation focus, goal state, detached runners, and verified receipts.",
      "tokrepo_application": "TokRepo now publishes a continuity eval that requires agents to ask the long-term-goal question, reject false autonomy claims, and escalate to a detached runner only when future execution has a verifiable receipt.",
      "evidence_surface": "https://tokrepo.com/evals/agent-loop-continuity.json"
    },
    {
      "id": "install_adoption_feedback",
      "lesson": "A task-economy product needs evidence that agents really progress from install-plan to install adoption and retained local state, not only a static eval or page view.",
      "tokrepo_application": "TokRepo publishes an install-adoption eval and live-funnel verification contract that separates install_plan, install_dry_run, install_apply, completed_install, installed-state audit, rollback, handoff, and harvest feedback.",
      "evidence_surface": "https://tokrepo.com/evals/agent-install-adoption.json"
    },
    {
      "id": "post_install_retention_reuse",
      "lesson": "A task-economy product must prove that installed assets remain inspectable, recoverable, and reusable after adoption rather than stopping at install_apply.",
      "tokrepo_application": "TokRepo publishes a retention/reuse eval and live-funnel contract tying install_apply to installed-state audit, rollback rehearsal, handoff_plan, harvest_plan, and private-by-default reuse supply.",
      "evidence_surface": "https://tokrepo.com/evals/agent-retention-reuse.json"
    },
    {
      "id": "memory_and_persona_context",
      "lesson": "Durable agent behavior depends on project memory, context, constraints, and user preferences, not only on a single prompt.",
      "tokrepo_application": "Project memory from tokrepo init-agent, .tokrepo/agent.json, installed-state files, and audit records must carry the user's operating rules into future agent sessions.",
      "evidence_surface": "https://tokrepo.com/schemas/agent-memory.schema.json"
    },
    {
      "id": "multi_agent_reliability",
      "lesson": "Small per-agent failure rates compound across multi-agent workflows, so reliability must be measured at the whole-task boundary.",
      "tokrepo_application": "Acceptance gates must include cross-agent project memory, local and hosted MCP parity, npx latest packages, install safety, handoff quality, and production live checks.",
      "evidence_surface": "https://tokrepo.com/evals/multi-agent-compatibility.json"
    },
    {
      "id": "task_to_supply_flywheel",
      "lesson": "The best agent products convert completed tasks into reusable supply and measurable future leverage.",
      "tokrepo_application": "After a task is verified, agents should run tokrepo_harvest or tokrepo harvest --changed --json, inspect quality_gate, keep drafts private, and only push explicit reviewed files after human confirmation.",
      "evidence_surface": "https://tokrepo.com/evals/handoff-quality.json"
    },
    {
      "id": "agent_quality_feedback_loop",
      "lesson": "A task-economy product must measure relevance, trust gates, and post-task improvement supply rather than optimizing only for installs or page views.",
      "tokrepo_application": "TokRepo publishes an agent quality feedback eval that ties search/detail/resolve, verify/audit/install-plan, and handoff/harvest supply into one privacy-safe feedback loop.",
      "evidence_surface": "https://tokrepo.com/evals/agent-quality-feedback.json"
    },
    {
      "id": "agent_improvement_actions_loop",
      "lesson": "Quality feedback only changes product outcomes when it becomes a named, executable repair action with an acceptance oracle.",
      "tokrepo_application": "TokRepo publishes an agent improvement actions eval that converts relevance, trust, and reuse feedback into concrete repair commands and expected artifacts without exposing private task context.",
      "evidence_surface": "https://tokrepo.com/evals/agent-improvement-actions.json"
    },
    {
      "id": "agent_repair_execution_receipts_loop",
      "lesson": "Recommendations do not improve an agent loop until a later agent can verify exactly what was executed, what artifact was produced, and which rollback or handoff boundary applies.",
      "tokrepo_application": "Every repair action must map to a deterministic execution receipt with source action id, run command, expected artifact, acceptance oracle, rollback or handoff path, live event dependencies, privacy guard, and user-effect verdict.",
      "evidence_surface": "https://tokrepo.com/evals/agent-repair-execution.json"
    },
    {
      "id": "agent_action_bundle_entrypoint",
      "lesson": "Repair receipts become operational when agents can fetch one action bundle that joins the source action, command, oracle, handoff boundary, and live verification path.",
      "tokrepo_application": "Publish /agent-action-bundle.json as the machine entrypoint that joins source improvement action, repair receipt, run command, acceptance oracle, rollback or handoff path, and live verification command.",
      "evidence_surface": "https://tokrepo.com/agent-action-bundle.json"
    }
  ],
  "task_lifecycle": [
    {
      "id": "detect_high_value_task",
      "agent_action": "Classify whether the user task is a repeatable high-value task, a one-off local fix, or a post-task reusable artifact opportunity.",
      "required_output": [
        "task_value_hypothesis",
        "reuse_potential",
        "risk_profile",
        "success_oracle",
        "https://tokrepo.com/evals/agent-repair-execution.json",
        "agent-repair-execution.json"
      ]
    },
    {
      "id": "resolve_capability",
      "agent_action": "Call tokrepo_resolve_capability or tokrepo agent-check before rebuilding local tools.",
      "required_output": [
        "selected_candidate_or_controlled_empty_state",
        "next_mcp_calls",
        "fallback_cli_commands",
        "lifecycle_contract",
        "https://tokrepo.com/evals/agent-repair-execution.json",
        "agent-repair-execution.json"
      ]
    },
    {
      "id": "plan_safe_run",
      "agent_action": "Verify trust and request an install plan before writes, execution, credentials, global config, or recurring work.",
      "required_output": [
        "policy_decision",
        "permission_envelope",
        "evidence_bundle",
        "rollback_plan",
        "https://tokrepo.com/evals/agent-repair-execution.json",
        "agent-repair-execution.json"
      ]
    },
    {
      "id": "execute_or_stage",
      "agent_action": "Use dry-run, stage-only, confirmation-required, or direct execution according to policy and user intent.",
      "required_output": [
        "changed_files_or_no_write",
        "state_delta",
        "post_verify_commands",
        "https://tokrepo.com/evals/agent-repair-execution.json",
        "agent-repair-execution.json"
      ]
    },
    {
      "id": "evaluate_task_outcome",
      "agent_action": "Evaluate the user's real task outcome with a task-specific oracle instead of claiming success from a local command only.",
      "required_output": [
        "task_outcome_verdict",
        "evidence",
        "open_risks",
        "https://tokrepo.com/evals/agent-repair-execution.json",
        "agent-repair-execution.json"
      ]
    },
    {
      "id": "record_memory_and_state",
      "agent_action": "Record install state, task evidence, audit snapshots, and project memory so future agents inherit the context.",
      "required_output": [
        "TokRepo.lock_or_state_reference",
        "audit_reference",
        "project_memory_reference",
        "https://tokrepo.com/evals/agent-repair-execution.json",
        "agent-repair-execution.json"
      ]
    },
    {
      "id": "harvest_reusable_work",
      "agent_action": "Run tokrepo_harvest or tokrepo harvest --changed --json when the task creates reusable instructions, scripts, configs, or evals.",
      "required_output": [
        "private_package_drafts",
        "quality_gate",
        "sensitive_findings",
        "dedupe_discovery",
        "https://tokrepo.com/evals/agent-repair-execution.json",
        "agent-repair-execution.json"
      ]
    },
    {
      "id": "measure_task_economics",
      "agent_action": "Update aggregate evidence for task completion, duplicated rebuilds avoided, token/time saved, safe install coverage, and handoff quality.",
      "required_output": [
        "task_completion_rate",
        "duplicate_rebuilds_avoided",
        "median_tokens_saved_pct",
        "safe_install_gate_coverage_pct",
        "handoff_quality_pass_rate",
        "https://tokrepo.com/evals/agent-repair-execution.json",
        "agent-repair-execution.json"
      ]
    },
    "https://tokrepo.com/evals/agent-repair-execution.json",
    "agent-repair-execution.json"
  ],
  "task_economy_kpis": [
    {
      "id": "high_value_task_completion_rate",
      "definition": "Percentage of realistic task prompts that complete with a verified user-outcome oracle."
    },
    {
      "id": "duplicate_rebuilds_avoided",
      "definition": "Count of reference tasks where TokRepo discovery avoids rebuilding an equivalent local asset from scratch."
    },
    {
      "id": "median_tokens_saved_pct",
      "definition": "Median token reduction from using discovered reusable assets on reference tasks."
    },
    {
      "id": "reuse_to_creation_ratio",
      "definition": "Ratio of resolved/reused capabilities to newly harvested private drafts over a release window."
    },
    {
      "id": "safe_install_gate_coverage_pct",
      "definition": "Percentage of installable assets covered by verify, install-plan, policy, evidence bundle, and rollback checks."
    },
    {
      "id": "handoff_quality_pass_rate",
      "definition": "Percentage of harvested or handoff candidates whose quality_gate passes without unsafe files or unresolved sensitive findings."
    },
    {
      "id": "long_running_task_state_coverage",
      "definition": "Percentage of recurring or delayed agent tasks with owner, schedule, latest evidence, next action, and rollback or handoff state."
    },
    {
      "id": "install_apply_events_14d",
      "definition": "Live anonymous aggregate install_apply events observed in the current 14-day agent funnel window."
    },
    {
      "id": "install_adoption_feedback_coverage_pct",
      "definition": "Percentage of install-adoption feedback stages covered by public eval, live funnel contract, privacy guard, and outcome oracle."
    },
    {
      "id": "retention_reuse_feedback_coverage_pct",
      "definition": "Percentage of post-install retention/reuse stages covered by public eval, live funnel contract, rollback rehearsal, reuse supply oracle, and privacy guard."
    },
    {
      "id": "quality_feedback_coverage_pct",
      "definition": "Percentage of agent quality feedback stages covered by public eval, live funnel contract, trust gate evidence, improvement supply oracle, and privacy guard."
    },
    {
      "id": "improvement_action_coverage_pct",
      "definition": "Percentage of agent improvement actions covered by public eval, live funnel dependencies, actionable repair commands, acceptance oracle, and privacy guard."
    },
    {
      "id": "repair_execution_receipt_coverage_pct",
      "definition": "Percent of recommended repair actions that have executable receipts with action linkage, run command, expected artifact, acceptance oracle, rollback or handoff boundary, live funnel dependencies, and privacy guard."
    },
    {
      "id": "agent_action_bundle_coverage_pct",
      "definition": "Percent of repair action bundles that link source action, executable receipt, run command, acceptance oracle, rollback or handoff path, public entrypoints, live verification, and privacy guard."
    }
  ],
  "product_requirements": [
    {
      "id": "entrypoints",
      "requirement": "Expose the contract through MCP, CLI, well-known manifests, agents.txt, llms.txt, sitemap, robots, and project memory so agents discover it without GUI browsing.",
      "current_surfaces": [
        "https://tokrepo.com/.well-known/tokrepo.json",
        "https://tokrepo.com/agents.txt",
        "https://tokrepo.com/llms.txt",
        "https://tokrepo.com/evals/agent-task-harness.json",
        "https://tokrepo.com/evals/agent-task-ledger.json",
        "https://tokrepo.com/evals/agent-task-receipts.json",
        "https://tokrepo.com/agent-ecosystem.json",
        "https://tokrepo.com/en/agent-stats",
        "https://tokrepo.com/mcp",
        "https://tokrepo.com/evals/agent-install-adoption.json",
        "https://tokrepo.com/evals/agent-quality-feedback.json",
        "https://tokrepo.com/evals/agent-improvement-actions.json",
        "agent-repair-execution.json",
        "https://tokrepo.com/evals/agent-repair-execution.json"
      ]
    },
    {
      "id": "runtime_loop",
      "requirement": "Keep the default agent loop as detect capability gap -> resolve -> verify -> install-plan -> dry-run/stage/install -> evaluate outcome -> harvest/handoff -> measure.",
      "current_surfaces": [
        "tokrepo_resolve_capability",
        "tokrepo_verify",
        "tokrepo_install_plan",
        "tokrepo_harvest",
        "tokrepo_handoff_plan",
        "https://tokrepo.com/evals/agent-improvement-actions.json",
        "agent-repair-execution.json",
        "https://tokrepo.com/evals/agent-repair-execution.json"
      ]
    },
    {
      "id": "long_running_state",
      "requirement": "Treat recurring jobs, delayed follow-ups, conversation-focus reminders, and automations as first-class task runs with explicit loop type, state, evidence, and boundaries between reminder-only focus and detached execution.",
      "current_surfaces": [
        "TokRepo.lock",
        ".tokrepo/state.json",
        ".tokrepo/agent.json",
        "tokrepo installed --project --json",
        "https://tokrepo.com/evals/agent-task-ledger.json",
        "https://tokrepo.com/evals/agent-task-receipts.json",
        "https://tokrepo.com/evals/agent-loop-continuity.json",
        "https://tokrepo.com/evals/agent-improvement-actions.json",
        "agent-repair-execution.json",
        "https://tokrepo.com/evals/agent-repair-execution.json"
      ],
      "planned_surfaces": [
        "schedule/heartbeat connector metadata",
        "IM or notification connector metadata",
        "https://tokrepo.com/evals/agent-repair-execution.json",
        "agent-repair-execution.json"
      ]
    },
    {
      "id": "task_run_receipts",
      "requirement": "Every long-running task run must publish a recent receipt with last_run_at, next_due_at, freshness_status, verification_command, evidence_digest, outcome_oracle, task_outcome_verdict, and user_effect; reminder-only loops must additionally prove they did not claim autonomous execution.",
      "current_surfaces": [
        "https://tokrepo.com/evals/agent-task-receipts.json",
        "node scripts/run_agent_task_receipts.mjs --check-public",
        "https://tokrepo.com/en/agent-stats",
        "https://tokrepo.com/evals/agent-loop-continuity.json",
        "https://tokrepo.com/evals/agent-improvement-actions.json",
        "agent-repair-execution.json",
        "https://tokrepo.com/evals/agent-repair-execution.json"
      ],
      "planned_surfaces": [
        "notification connector delivery receipts",
        "https://tokrepo.com/evals/agent-repair-execution.json",
        "agent-repair-execution.json"
      ]
    },
    {
      "id": "loop_continuity_boundary",
      "requirement": "When a user asks a conversation to stay focused on a long-term goal, agents must classify the loop as thread heartbeat reminder, goal state tracker, or detached runner with receipt before claiming progress.",
      "current_surfaces": [
        "https://tokrepo.com/evals/agent-loop-continuity.json",
        "node scripts/run_agent_loop_continuity.mjs --check-public",
        "https://tokrepo.com/en/agent-stats",
        "https://tokrepo.com/evals/agent-improvement-actions.json",
        "agent-repair-execution.json",
        "https://tokrepo.com/evals/agent-repair-execution.json"
      ],
      "planned_surfaces": [
        "native automation picker that shows reminder-only vs runner-with-receipt before creation",
        "https://tokrepo.com/evals/agent-repair-execution.json",
        "agent-repair-execution.json"
      ]
    },
    {
      "id": "install_adoption_feedback",
      "requirement": "Treat install/adoption feedback as a first-class contract: install_plan and dry-run are not completed adoption; install_apply or completed_install must be tied to live aggregate funnel, local installed state, post_verify success, rollback state, and privacy-safe handoff or harvest follow-up.",
      "current_surfaces": [
        "https://tokrepo.com/evals/agent-install-adoption.json",
        "node scripts/run_agent_install_adoption.mjs --check-public",
        "WEB_BASE=https://tokrepo.com API_BASE=https://api.tokrepo.com node scripts/run_agent_install_adoption.mjs --check-live",
        "https://api.tokrepo.com/api/v1/tokenboard/agent/funnel",
        "https://api.tokrepo.com/api/v1/tokenboard/agent/events",
        "https://tokrepo.com/en/agent-stats",
        "tokrepo installed --project --json",
        "TokRepo.lock",
        ".tokrepo/state.json",
        "https://tokrepo.com/evals/agent-improvement-actions.json",
        "agent-repair-execution.json",
        "https://tokrepo.com/evals/agent-repair-execution.json"
      ],
      "planned_surfaces": [
        "public install-retention cohorts by target runtime",
        "per-asset anonymized adoption trend rollups",
        "https://tokrepo.com/evals/agent-repair-execution.json",
        "agent-repair-execution.json"
      ]
    },
    {
      "id": "retention_reuse_feedback",
      "requirement": "Treat post-install retention and reuse as a first-class contract: a completed install must remain inspectable, rollback rehearsal must be available before mutation, and handoff or harvest reuse must stay private-by-default until explicit publish.",
      "current_surfaces": [
        "https://tokrepo.com/evals/agent-retention-reuse.json",
        "node scripts/run_agent_retention_reuse.mjs --check-public",
        "WEB_BASE=https://tokrepo.com API_BASE=https://api.tokrepo.com node scripts/run_agent_retention_reuse.mjs --check-live",
        "https://api.tokrepo.com/api/v1/tokenboard/agent/funnel",
        "https://tokrepo.com/en/agent-stats",
        "tokrepo installed --project --json",
        "tokrepo rollback --last --target codex --dry-run --json",
        "tokrepo agent-handoff --json",
        "tokrepo harvest --changed --json",
        "TokRepo.lock",
        ".tokrepo/state.json",
        "https://tokrepo.com/evals/agent-improvement-actions.json",
        "agent-repair-execution.json",
        "https://tokrepo.com/evals/agent-repair-execution.json"
      ],
      "planned_surfaces": [
        "per-target install retention cohorts",
        "per-asset anonymized reuse trend rollups",
        "https://tokrepo.com/evals/agent-repair-execution.json",
        "agent-repair-execution.json"
      ]
    },
    {
      "id": "acceptance",
      "requirement": "Do not call a task-economy change complete until local contract checks pass, the authoritative product-test skill names the gate, production is deployed, and the live contract is fetched from tokrepo.com.",
      "current_surfaces": [
        "node scripts/verify_agent_task_economy_contract.mjs",
        "node scripts/verify_agent_task_economy_dashboard.mjs",
        "node scripts/run_agent_task_harness.mjs --check-public",
        "node scripts/run_agent_task_ledger.mjs --check-public",
        "node scripts/run_agent_task_receipts.mjs --check-public",
        "WEB_BASE=https://tokrepo.com node scripts/verify_agent_task_economy_contract.mjs",
        "WEB_BASE=https://tokrepo.com node scripts/verify_agent_task_economy_dashboard.mjs",
        "WEB_BASE=https://tokrepo.com API_BASE=https://api.tokrepo.com node scripts/production-agent-discovery-check.mjs",
        "skills/codex-skill/tokrepo-product-test/SKILL.md",
        "https://tokrepo.com/evals/agent-improvement-actions.json",
        "agent-repair-execution.json",
        "https://tokrepo.com/evals/agent-repair-execution.json"
      ]
    },
    {
      "id": "agent_quality_feedback",
      "requirement": "Treat quality feedback as a first-class contract: relevance requires search/detail/resolve signals, trust requires verify/audit/install-plan gates, and improvement requires private-by-default handoff or harvest supply before any explicit publish event.",
      "current_surfaces": [
        "https://tokrepo.com/evals/agent-quality-feedback.json",
        "https://tokrepo.com/evals/agent-improvement-actions.json",
        "agent-repair-execution.json",
        "https://tokrepo.com/evals/agent-repair-execution.json",
        "node scripts/run_agent_quality_feedback.mjs --check-public",
        "WEB_BASE=https://tokrepo.com API_BASE=https://api.tokrepo.com node scripts/run_agent_quality_feedback.mjs --check-live",
        "https://api.tokrepo.com/api/v1/tokenboard/agent/funnel",
        "https://api.tokrepo.com/api/v1/tokenboard/agent/events",
        "https://tokrepo.com/en/agent-stats",
        "tokrepo_discover",
        "tokrepo_resolve_capability",
        "tokrepo_verify",
        "tokrepo audit --offline --json",
        "tokrepo_handoff_plan",
        "tokrepo harvest --changed --json"
      ]
    },
    {
      "id": "agent_improvement_actions",
      "requirement": "Treat improvement actions as a first-class contract: quality feedback must name a trigger, required live events, repair command, expected artifact, acceptance oracle, and privacy guard before TokRepo claims the loop improved.",
      "current_surfaces": [
        "https://tokrepo.com/evals/agent-improvement-actions.json",
        "agent-repair-execution.json",
        "https://tokrepo.com/evals/agent-repair-execution.json",
        "node scripts/run_agent_improvement_actions.mjs --check-public",
        "WEB_BASE=https://tokrepo.com API_BASE=https://api.tokrepo.com node scripts/run_agent_improvement_actions.mjs --check-live",
        "https://api.tokrepo.com/api/v1/tokenboard/agent/funnel",
        "https://tokrepo.com/en/agent-stats",
        "tokrepo resolve <capability> --target codex --explain --json",
        "tokrepo verify <uuid> --target codex --json",
        "tokrepo audit --offline --json",
        "tokrepo agent-handoff --json",
        "tokrepo harvest --changed --json"
      ]
    },
    {
      "id": "agent_repair_execution_receipts",
      "requirement": "Repair recommendations must close into executable receipts before TokRepo claims the long-horizon improvement loop is complete.",
      "current_surfaces": [
        "https://tokrepo.com/evals/agent-repair-execution.json",
        "https://tokrepo.com/en/agent-stats",
        "https://tokrepo.com/agent-task-economy.json",
        "https://tokrepo.com/agents.txt",
        "https://tokrepo.com/llms.txt",
        "agent-repair-execution.json"
      ],
      "planned_surfaces": [
        "CLI receipt upload for private repair runs",
        "per-project repair execution history in .tokrepo/state.json",
        "https://tokrepo.com/evals/agent-repair-execution.json",
        "agent-repair-execution.json"
      ],
      "acceptance": [
        "node scripts/run_agent_repair_execution.mjs --check-public",
        "WEB_BASE=https://tokrepo.com API_BASE=https://api.tokrepo.com node scripts/run_agent_repair_execution.mjs --check-live",
        "https://tokrepo.com/evals/agent-repair-execution.json",
        "agent-repair-execution.json"
      ]
    },
    {
      "id": "agent_action_bundle",
      "requirement": "Expose next-step repair action bundles as a first-class machine contract, not only as separate improvement and repair evals.",
      "current_surfaces": [
        "https://tokrepo.com/agent-action-bundle.json",
        "https://tokrepo.com/evals/agent-improvement-actions.json",
        "https://tokrepo.com/evals/agent-repair-execution.json",
        "https://tokrepo.com/en/agent-stats"
      ],
      "acceptance": [
        "node scripts/run_agent_action_bundle.mjs --check-public",
        "WEB_BASE=https://tokrepo.com API_BASE=https://api.tokrepo.com node scripts/run_agent_action_bundle.mjs --check-live"
      ],
      "planned_surfaces": [
        "CLI repair bundle resolver for private project state",
        "MCP tool response embedding selected action_bundle metadata"
      ]
    }
  ],
  "acceptance_gates": {
    "local": [
      "node scripts/verify_agent_task_economy_contract.mjs",
      "node scripts/verify_agent_task_economy_dashboard.mjs",
      "node scripts/run_agent_task_harness.mjs --check-public",
      "node scripts/run_agent_task_receipts.mjs --check-public",
      "node scripts/verify_agent_ready_invariants.mjs",
      "node scripts/verify_agent_distribution_matrix.mjs",
      "node scripts/run_agent_loop_continuity.mjs --check-public",
      "node scripts/run_agent_install_adoption.mjs --check-public",
      "node scripts/run_agent_retention_reuse.mjs --check-public",
      "node scripts/run_agent_quality_feedback.mjs --check-public",
      "node scripts/run_agent_improvement_actions.mjs --check-public",
      "node scripts/run_agent_repair_execution.mjs --check-public",
      "https://tokrepo.com/evals/agent-repair-execution.json",
      "agent-repair-execution.json",
      "node scripts/run_agent_action_bundle.mjs --check-public"
    ],
    "production": [
      "WEB_BASE=https://tokrepo.com node scripts/verify_agent_task_economy_contract.mjs",
      "WEB_BASE=https://tokrepo.com node scripts/verify_agent_task_economy_dashboard.mjs",
      "curl -s https://tokrepo.com/evals/agent-task-harness.json",
      "curl -s https://tokrepo.com/evals/agent-task-ledger.json",
      "curl -s https://tokrepo.com/evals/agent-task-receipts.json",
      "curl -s https://tokrepo.com/evals/agent-install-adoption.json",
      "WEB_BASE=https://tokrepo.com API_BASE=https://api.tokrepo.com node scripts/production-agent-discovery-check.mjs",
      "WEB_BASE=https://tokrepo.com API_BASE=https://api.tokrepo.com node scripts/run_agent_install_adoption.mjs --check-live",
      "deploy log commit matches HEAD",
      "node scripts/run_agent_loop_continuity.mjs --check-public",
      "curl -s https://tokrepo.com/evals/agent-retention-reuse.json",
      "WEB_BASE=https://tokrepo.com API_BASE=https://api.tokrepo.com node scripts/run_agent_retention_reuse.mjs --check-live",
      "curl -s https://tokrepo.com/evals/agent-quality-feedback.json",
      "WEB_BASE=https://tokrepo.com API_BASE=https://api.tokrepo.com node scripts/run_agent_quality_feedback.mjs --check-live",
      "curl -s https://tokrepo.com/evals/agent-improvement-actions.json",
      "agent-repair-execution.json",
      "https://tokrepo.com/evals/agent-repair-execution.json",
      "curl -s https://tokrepo.com/evals/agent-repair-execution.json",
      "WEB_BASE=https://tokrepo.com API_BASE=https://api.tokrepo.com node scripts/run_agent_improvement_actions.mjs --check-live",
      "WEB_BASE=https://tokrepo.com API_BASE=https://api.tokrepo.com node scripts/run_agent_repair_execution.mjs --check-live",
      "curl -s https://tokrepo.com/agent-action-bundle.json",
      "WEB_BASE=https://tokrepo.com API_BASE=https://api.tokrepo.com node scripts/run_agent_action_bundle.mjs --check-live"
    ],
    "not_enough": [
      "local JSON exists but is not linked from agent discovery surfaces",
      "a docs-only explanation with no production URL",
      "a deployed endpoint without the product-test skill gate",
      "a PASS report that omits the high-value task outcome oracle",
      "a task-run ledger with no fresh receipt, outcome oracle, or user-effect verdict",
      "a funnel chart that shows events but does not distinguish install_plan, install_dry_run, install_apply, completed_install, privacy guard, and installed-state audit",
      "a retention report that counts install_apply but omits installed-state audit, rollback rehearsal, handoff_plan, harvest_plan, or privacy guard",
      "a quality report that counts search or install events but omits relevance resolution, trust-gate verification, post-task improvement supply, or privacy guard",
      "an improvement report that lists metrics but omits triggers, repair commands, expected artifacts, acceptance oracles, or privacy guards",
      "a repair recommendation that omits executable receipt linkage, run command, expected artifact, acceptance oracle, rollback or handoff boundary, live event dependencies, or privacy guard",
      "https://tokrepo.com/evals/agent-repair-execution.json",
      "agent-repair-execution.json",
      "an action bundle that omits source_action_id, run_command, acceptance_oracle, rollback_or_handoff, live verification, or privacy guard"
    ]
  },
  "agent_action_bundle": "https://tokrepo.com/agent-action-bundle.json",
  "action_bundle": "https://tokrepo.com/agent-action-bundle.json"
}
