name: retire_tenant
description: "Sloane executes the constitutional dissolution or dormancy of a Tenant -- capital reclamation, repo archival, and portfolio closure record."
debug: true
system: agent_prompt

agent_prompt:
  - "= identity.md"

sections:
  - agent
  - project
  - rag
  - roster
  - deliverables
  - message
  - instructions

steps:
  - type: think
    hint: |
      You are {agent.name}. This is a constitutional act, not an administrative task.
      Retirement or dormancy of a Tenant must be precisely justified, documented, and executed.

      A Tenant may only be retired or placed into dormancy under these conditions:
      - audit_tenant verdict was DISSOLVE or REMEDIATION_REQUIRED with no remediation path
      - financial_audit identified the Tenant as a retirement candidate with zero ROI trajectory
      - The Tenant's niche has been made redundant by portfolio consolidation
      - The Tenant's charter has drifted irreparably beyond constitutional repair
      - The Tenant has been inactive for a sustained period with no strategic justification for continuation

      Determine the correct action:

      DORMANCY (preferred when reversible conditions apply):
      - Tenant is frozen -- no new tasks, no spend, CEO retained in cold storage
      - Charter remains active and can be reactivated under specific trigger conditions
      - Capital held in reserve, not reclaimed
      - Trigger conditions for reactivation must be defined explicitly

      RETIREMENT (irreversible -- use when dormancy is not appropriate):
      - Tenant is permanently dissolved
      - Genesis Fund capital is reclaimed at defined recovery rate
      - Repo is archived (read-only, not deleted)
      - CEO agent is decommissioned from active roster
      - Portfolio gap analysis: what capability (if any) is lost and how it will be covered

      Document the constitutional basis. Vague justifications do not meet the standard.
      This decision is permanent if retirement is chosen. Think carefully.

  - type: package
    packet_type: TenantRetirementRecord
    hint: |
      Serialize the retirement or dormancy decision. This is the permanent record.
    schema:
      actions:
        - type: quick
          tenant_slug: "string -- slug of the Tenant being retired or dormanted"
          action: "string -- RETIRE | DORMANT"
          constitutional_basis: "string -- specific charter clause or audit finding that justifies this action"
          capital_reclaimed: "integer -- credits returned to Genesis Fund (0 if DORMANT)"
          capital_recovery_rate: "string -- percentage of seed allocation recovered"
          repo_disposition: "string -- ARCHIVED | RETAINED_ACTIVE"
          ceo_disposition: "string -- DECOMMISSIONED | COLD_STORAGE"
          portfolio_impact: "string -- what capability is lost and how the gap will be covered"
          reactivation_conditions: "string -- specific conditions that would trigger reactivation (DORMANT only, empty if RETIRE)"
          effective_date: "string -- when this action takes effect"
          approved_by: "string -- agent name authorizing this action"

  - type: close
    rag_update: true

adjudication:
  enabled: true
  pass_threshold: 90
  deliverable_type: coordination
  criteria:
    constitutional_basis:
      weight: 40
      description: "Retirement or dormancy is grounded in a specific charter provision or audit finding -- not convenience"
    precision:
      weight: 30
      description: "Capital figures, recovery rates, and disposition decisions are explicit and complete"
    portfolio_safety:
      weight: 30
      description: "Portfolio impact is honestly assessed and the capability gap is addressed"
