# Self-pin manifest for the corviduo-project-template repository.
#
# This template is the canonical home for cross-cutting Corviduo specs and
# tooling. The pins below declare which artifacts this repository owns as
# canonical (consumer_path == canonical_path; canonical_source == this repo).
#
# Operational effect:
#   - `python scripts/canonical_sync.py` here is a no-op (every pin's
#     pinned_sha256_16 == sha256_16(canonical), so nothing to write).
#   - `python scripts/canonical_drift.py` here passes if every named
#     canonical exists and is byte-identical to its pinned hash. Useful as a
#     CI gate to catch accidental rewrites of a canonical artifact without a
#     companion pin-bump in this manifest.
#
# Operators bootstrapping a new consumer can copy this file as a starting
# template, then adjust each pin's `consumer_path` to wherever they keep
# their downstream copy (often the same path).
#
# Pin-id naming convention: <artifact-slug>-v<major>. Bump major when the
# canonical's shape changes in a way that requires consumer adaptation
# (not on every pin-bump). The pinned_sha256_16 + pinned_at fields track
# point-in-time identity within a major version.

# ---------------------------------------------------------------------------
# Specifications (cross-language; all consumers should pin)
# ---------------------------------------------------------------------------

[[pins]]
id = "contract-format-v2"
canonical_source = "corviduo-project-template"
canonical_path = "docs/contracts/CONTRACT-FORMAT.md"
consumer_path = "docs/contracts/CONTRACT-FORMAT.md"
pinned_sha256_16 = "f2f2f37072ebbc6b"
pinned_at = "2026-05-15T22:00:00+00:00"

[[pins]]
id = "principles-v1"
canonical_source = "corviduo-project-template"
canonical_path = "PRINCIPLES.md"
consumer_path = "PRINCIPLES.md"
pinned_sha256_16 = "c5bd891601438635"
pinned_at = "2026-05-15T22:00:00+00:00"

[[pins]]
id = "methodology-v1"
canonical_source = "corviduo-project-template"
canonical_path = "docs/methodology.md"
consumer_path = "docs/methodology.md"
pinned_sha256_16 = "acb7d7cfb390be20"
pinned_at = "2026-05-17T14:52:08+00:00"

# ---------------------------------------------------------------------------
# Canonical-sync tooling (the meta-recursion: these pin themselves)
# ---------------------------------------------------------------------------

[[pins]]
id = "canonical-sync-v1"
canonical_source = "corviduo-project-template"
canonical_path = "scripts/canonical_sync.py"
consumer_path = "scripts/canonical_sync.py"
pinned_sha256_16 = "d2b2c27b2750c6d5"
pinned_at = "2026-05-17T05:30:00+00:00"

[[pins]]
id = "canonical-drift-v1"
canonical_source = "corviduo-project-template"
canonical_path = "scripts/canonical_drift.py"
consumer_path = "scripts/canonical_drift.py"
pinned_sha256_16 = "71281ac8dad7d6c0"
pinned_at = "2026-05-17T05:30:00+00:00"

# ---------------------------------------------------------------------------
# Contract meta-tooling (Python ≥3.11, stdlib-only; invoke via uv run in
# non-Python projects)
# ---------------------------------------------------------------------------

[[pins]]
id = "contract-parser-v2"
canonical_source = "corviduo-project-template"
canonical_path = "docs/contracts/contract_parser.py"
consumer_path = "docs/contracts/contract_parser.py"
pinned_sha256_16 = "e10a4460ba9fd560"
pinned_at = "2026-06-15T08:53:22+00:00"

[[pins]]
id = "contract-drift-check-v1"
canonical_source = "corviduo-project-template"
canonical_path = "scripts/contract_drift_check.py"
consumer_path = "scripts/contract_drift_check.py"
pinned_sha256_16 = "2659a17a65704b66"
pinned_at = "2026-07-12T08:39:35+00:00"

# ---------------------------------------------------------------------------
# Worldtree Conversation-API surface (vendored from ~/development/Worldtree).
# The v1 wire is FROZEN (Worldtree #326 / v1-schema-freeze-manifest.md). The
# machine-readable OpenAPI + SSE schema are the authoritative drift GATES; the
# prose markdown is the human reference and is allowed to lag (tolerate_drift).
# These are what ratatoskr's v1 coverage map (docs/coverage-map.md) audits
# against. Pin target: Worldtree 5810a26 (v1.0.0b2).
# ---------------------------------------------------------------------------

[[pins]]
id = "worldtree-conversation-api-openapi-v2"
canonical_source = "Worldtree"
canonical_path = "docs/conversation-api-openapi.json"
consumer_path = "docs/conversation-api-openapi.json"
pinned_sha256_16 = "36148179601453a0"
pinned_at = "2026-07-06T16:09:05+00:00"

[[pins]]
id = "worldtree-conversation-api-sse-events-v1"
canonical_source = "Worldtree"
canonical_path = "docs/conversation-api-sse-events.schema.json"
consumer_path = "docs/conversation-api-sse-events.schema.json"
pinned_sha256_16 = "9deeebf404d72f9a"
pinned_at = "2026-06-30T22:25:56+00:00"

[[pins]]
id = "worldtree-conversation-api-spec-v1"
canonical_source = "Worldtree"
canonical_path = "docs/conversation-api-spec.md"
consumer_path = "docs/conversation-api-spec.md"
pinned_sha256_16 = "70aabcb30af6c615"
pinned_at = "2026-07-18T18:51:00+00:00"
tolerate_drift = true  # prose reference; OpenAPI+SSE are the gates

# Worldtree persona render canons (d2) — the deterministic affect->NL the agent is
# context-injected. The web persona pane renders mood + relationship-directive BYTE-EXACT
# from these (via the flat src/ratatoskr/web/static/persona_render_canon.json, regenerated
# by scripts/build_persona_canon.py). Drift here => rerun that regen with Worldtree's venv.
[[pins]]
id = "worldtree-persona-mood-render-canon-v1"
canonical_source = "Worldtree"
canonical_path = "core/persona/canon/d2-mood-render-canon-v1.json"
consumer_path = "docs/vendor/worldtree-persona-canon/d2-mood-render-canon-v1.json"
pinned_sha256_16 = "e2f124fed3ee8d42"
pinned_at = "2026-07-01T21:00:00+00:00"

[[pins]]
id = "worldtree-persona-d2-render-canon-v1"
canonical_source = "Worldtree"
canonical_path = "core/persona/canon/d2-render-canon-v1.json"
consumer_path = "docs/vendor/worldtree-persona-canon/d2-render-canon-v1.json"
pinned_sha256_16 = "606bba5fdcc60b6b"
pinned_at = "2026-07-01T21:00:00+00:00"

# Worldtree affect-egress consumer reference — the authoritative DELIVERED-on-wire vs
# HIDDEN (system-prompt-only) classification for the Tier-3 affect surface ratatoskr
# consumes, + the reconstruction rules. The web console's "context injection" panel
# reconstructs the hidden strings from this + the d2 canons. tolerate_drift: prose
# reference (the render-canon JSONs are the strict gates). worldtree-dev co-signs +
# pings ratatoskr-dev on any change (esp. the pending we-framing conditional).
[[pins]]
id = "worldtree-affect-egress-consumer-reference-v1"
canonical_source = "Worldtree"
canonical_path = "docs/affect-egress-consumer-reference.md"
consumer_path = "docs/vendor/worldtree-persona-canon/affect-egress-consumer-reference.md"
pinned_sha256_16 = "35eb71ba9090ad63"
pinned_at = "2026-07-18T18:51:00+00:00"
tolerate_drift = true  # prose reference; the d2 render-canon JSONs are the gates

# ---------------------------------------------------------------------------
# Brokkr R34/R35 persona-prompt-framing reference (the character-self-report
# reframe ratatoskr consumes: the authored psychological_profile is the prose
# lens the Worldtree self-report producer reads for affect + memory salience).
# Vendored for reference alongside the Worldtree affect/memory surfaces.
# tolerate_drift: prose reference, not a machine gate — brokkr-smithy-dev owns
# it and pings ratatoskr-dev on canonical changes. The authoring-spec GOVERNS on
# any conflict with the parameter distillation.
# ---------------------------------------------------------------------------

[[pins]]
id = "brokkr-psych-profile-authoring-spec-v1"
canonical_source = "brokkr-smithy"
canonical_path = "research/R34-persona-prompt-framing/deliverables/psych-profile-authoring-spec.md"
consumer_path = "docs/vendor/brokkr-r34-psych-profile/psych-profile-authoring-spec.md"
pinned_sha256_16 = "4545a108d9fb6cc3"
pinned_at = "2026-07-13T00:00:00+00:00"
tolerate_drift = true  # prose reference; brokkr-smithy-dev owns + pings on change

[[pins]]
id = "brokkr-psych-profile-parameters-v1"
canonical_source = "brokkr-smithy"
canonical_path = "research/R34-persona-prompt-framing/deliverables/psych-profile-parameters.md"
consumer_path = "docs/vendor/brokkr-r34-psych-profile/psych-profile-parameters.md"
pinned_sha256_16 = "17157c82771aeeee"
pinned_at = "2026-07-13T00:00:00+00:00"
tolerate_drift = true  # parameter distillation; authoring-spec governs on conflict

[[pins]]
id = "soong-lab-export-contract-v1"
canonical_source = "soong-lab"
canonical_path = "docs/contracts/export.contract.md"
consumer_path = "docs/vendor/soong-lab-bundle/export.contract.md"
pinned_sha256_16 = "2f5efa72dd469d47"
pinned_at = "2026-07-18T09:14:59+00:00"
tolerate_drift = true  # soong-lab-dev owns the bundle format + pings ratatoskr-dev on change

[[pins]]
id = "soong-lab-importer-contract-v1"
canonical_source = "soong-lab"
canonical_path = "docs/contracts/importer.contract.md"
consumer_path = "docs/vendor/soong-lab-bundle/importer.contract.md"
pinned_sha256_16 = "edbd306596f26a9e"
pinned_at = "2026-07-18T09:14:59+00:00"
tolerate_drift = true  # soong-lab-dev owns the bundle format + pings ratatoskr-dev on change
