Delivers the offline runnable specification foundation for the Trust Layer (TSD §3-§6), not a hosted Trust Service: - JSON Schemas for Phase Manifest, Ledger Entry, Extension Contract, and Conversion Attestation, encoding the Stage 0 working defaults (Q3 future license enum, Q6 single-currency Phases, Q8 required longstop_at). - src/target_revenue: pure Outstanding Target fold, SHA-256 hash-chain verification, Ed25519 signing helpers, extension conformance checks (including a core-term-redefinition heuristic), and conversion detection that never requires an attestation document to determine conversion status. - examples/phase-001: golden Phase package matching the concept doc's worked example, generated via scripts/generate_golden_phase.py so the hash chain is computed by the library itself, not hand-typed. - 32 passing pytest tests covering manifest/ledger/extension conformance, tamper/reorder detection, and the full lifecycle fold to conversion. - docs/adr/ADR-0001: proposed (not accepted) Stage 0 stack choice, per the WP-0002-T01 human-accept gate — implementation proceeded against the proposal as the workplan note permits, but the task stays open. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
52 lines
1.8 KiB
JSON
52 lines
1.8 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://target-revenue.example/schemas/conversion_attestation.schema.json",
|
|
"title": "Conversion Attestation",
|
|
"description": "Stage 0 schema per specs/TechnicalSpecificationDocument.md §3.5. Evidence of conversion only — never a precondition for conversion status (PRD FR-7/G6, working default Q13). Tooling must be able to recompute conversion from the Phase Manifest and Target Ledger alone, without this document.",
|
|
"type": "object",
|
|
"required": [
|
|
"phase",
|
|
"milestone_release",
|
|
"conversion_timestamp",
|
|
"future_license",
|
|
"final_development_credit",
|
|
"final_remission_credit",
|
|
"final_outstanding_target",
|
|
"ledger_checkpoint"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"phase": {
|
|
"type": "string",
|
|
"pattern": "^trsl:phase:[a-zA-Z0-9._-]+$"
|
|
},
|
|
"milestone_release": {
|
|
"type": "string",
|
|
"description": "Must match phase.milestone_release.name in the Phase Manifest."
|
|
},
|
|
"conversion_timestamp": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"description": "The moment the ledger fold first reaches Outstanding Target = 0."
|
|
},
|
|
"future_license": {
|
|
"type": "string",
|
|
"enum": ["MIT", "Apache-2.0"]
|
|
},
|
|
"final_development_credit": { "type": "number", "minimum": 0 },
|
|
"final_remission_credit": { "type": "number", "minimum": 0 },
|
|
"final_outstanding_target": {
|
|
"type": "number",
|
|
"const": 0,
|
|
"description": "MUST equal 0."
|
|
},
|
|
"ledger_checkpoint": {
|
|
"type": "string",
|
|
"description": "Points to the last ledger entry id or hash included in the fold."
|
|
},
|
|
"signature": {
|
|
"type": "string",
|
|
"description": "Ed25519 signature over the canonical serialization. Optional for Stage 0 fixtures."
|
|
}
|
|
}
|
|
}
|