Skip to content

v0.8: docs/LIFE_TIER_SPEC.md + schemas/tier.schema.json + Schema D appendix + sanity tests (#104)#113

Merged
LING71671 merged 7 commits into
masterfrom
devin/1777218355-104-life-tier-spec
Apr 26, 2026
Merged

v0.8: docs/LIFE_TIER_SPEC.md + schemas/tier.schema.json + Schema D appendix + sanity tests (#104)#113
LING71671 merged 7 commits into
masterfrom
devin/1777218355-104-life-tier-spec

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot commented Apr 26, 2026

Summary

Closes sub-issue #104 of the v0.8 Asset Architecture epic #106. Lands the per-topic normative spec for Topic 3 — Tier System, including schema, Schema D Cosmic Evolution naming appendix, and sanity tests.

What this PR contains

  • docs/LIFE_TIER_SPEC.md (new, normative): conformance language, six-dimension definition (identity_verification, asset_completeness, consent_completeness, detail_level, audit_chain_strength, jurisdiction_clarity), normative weighted-score formula (consent + identity ×2, others ×1), score → level binding table for all 12 tiers (I–XII), back-compat mapping from v0.7 verification_level to tier.dimensions.identity_verification, worked example, and cross-document interactions.
  • schemas/tier.schema.json (new): exports tier_block + tier_dimensions via $defs. Twelve allOf / if-then rules bind score ranges to Roman-numeral level values. The computed_by pattern ^[A-Za-z0-9_./-]+@[A-Za-z0-9_.+-]+$ requires a <builder>@<version> separator so hand-rolled tier blocks fail validation (decision D3 = auto-compute).
  • docs/appendix/TIER_NAMING_SCHEMA_D.md (new): canonical Schema D Cosmic Evolution table (Quark / Atom / Molecule / Stardust / Nebula / Protostar / Main Sequence / Red Giant / White Dwarf / Neutron Star / Pulsar / Singularity) with glyphs and score ranges. Versioned separately so future naming schemes can ship without a spec major bump.
  • tools/test_tier_schema.py (new): 81 sanity cases (26 happy + 55 negative). Boundary cases for every score → level range, every cross-boundary mismatch, every dimension off-enum, every required-field removal, and the computed_by auto-compute guard. Wired into tools/batch_validate.py.
  • CHANGELOG.md: tier entries added; also fixes the lifecycle test breakdown (9 happy-path + 33 negative for the 42 total) per #112 review finding.

Decisions encoded

# Decision Realisation
D1=C Hybrid vocabulary on tier dimensions Closed enum at v0.8, no x- extension yet
D2=B All six dimensions required required: [identity_verification, ..., jurisdiction_clarity]
D3=auto Auto-computed at build time computed_by pattern requires <path>@<semver> separator
D4=public Tier fully public Lives in life-package.json (the open root), no separate "private tier"
D5=replace Replaces v0.7 verification_level tier.dimensions.identity_verification enum + back-compat mapping table in spec §6

Local validation

  • python tools/test_tier_schema.py81/81 cases pass
  • python tools/batch_validate.py21/21 steps pass

Out of scope (deferred)

  • Folding the tier block into life-package.schema.json (follow-on integration PR).
  • Updating tools/build_life_package.py to auto-compute tier (lands with the integration PR).
  • Marking v0.7 verification_level as deprecated (also lands with integration).

Review & Testing Checklist for Human

Risk: green — pure spec/schema PR; no runtime code, no v0.7 schema changes.

  • python tools/test_tier_schema.py reports run: 81 cases, failures: 0
  • Spot-check the 12 score → level boundary rules in schemas/tier.schema.json against the table in docs/LIFE_TIER_SPEC.md §4.2

Notes

Followup: PR for sub-issue #105 (Runtime / Assembly 5-stage pipeline).

Link to Devin session: https://app.devin.ai/sessions/ff7322e18fd94887875daa2c1c75f87d
Requested by: @LING71671


Open in Devin Review

LING71671 and others added 2 commits April 26, 2026 16:00
…pendix + sanity tests (#104)

Adds the per-topic normative spec for Topic 3 (Tier System) of the
v0.8 architecture epic (#106).

What this PR contains:
- docs/LIFE_TIER_SPEC.md (new, normative): conformance language,
  six-dimension definition, weighted-score formula, score-to-level
  binding table, back-compat mapping from v0.7 verification_level,
  worked example, and cross-document interactions.
- schemas/tier.schema.json (new): exports tier_block + tier_dimensions
  via $defs. 12 allOf/if-then rules bind score ranges to Roman-numeral
  levels. computed_by pattern '^[A-Za-z0-9_./-]+@[A-Za-z0-9_.+-]+$'
  requires builder@version separator so hand-rolled tier blocks fail
  validation.
- docs/appendix/TIER_NAMING_SCHEMA_D.md (new): canonical Schema D
  Cosmic Evolution table (Quark / Atom / Molecule / Stardust / Nebula /
  Protostar / Main Sequence / Red Giant / White Dwarf / Neutron Star /
  Pulsar / Singularity) with glyphs and score ranges. Versioned
  separately so future naming schemes ship without a spec major bump.
- tools/test_tier_schema.py (new): 81 sanity cases (26 happy + 55
  negative). Boundary cases for every score-to-level range, every
  cross-boundary mismatch, every dimension off-enum, every required
  field, and the computed_by auto-compute guard. Wired into
  tools/batch_validate.py.

Decisions encoded:
- D1=C: closed enum on dimensions for v0.8 (no x- extension yet)
- D2=B: all six dimensions required
- D3=auto: auto-computation enforced via computed_by pattern
- D4=public: tier lives in life-package.json (open root)
- D5=replace: verification_level mapping into identity_verification

Local validation:
- python tools/test_tier_schema.py -> 81/81 cases pass
- python tools/batch_validate.py   -> 21/21 steps pass

Out of scope (deferred to a follow-on integration PR):
- Folding tier block into life-package.schema.json
- Updating tools/build_life_package.py to auto-compute tier
- Marking v0.7 verification_level as deprecated

Followups: #105 (Runtime / Assembly 5-stage pipeline).
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown
Contributor Author

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

LING71671 and others added 4 commits April 26, 2026 16:10
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
devin-ai-integration[bot]

This comment was marked as resolved.

Devin Review on PR #113 caught that the worked example shipped
score: 55 while the formula in §4.1 deterministically produces 54
for those dimensions. The earlier prose hand-waved the discrepancy
as ±1 rounding, but §4 explicitly says verifiers SHOULD recompute
and reject mismatches — the example would have failed against any
correct implementation.

- Worked example: score 55 → 54.
- §8 trailing prose: replace the rounding-tolerance hand-wave with
  a clear statement that the example matches the formula and that
  verifiers MUST reject mismatches.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@LING71671 LING71671 merged commit 3d4418c into master Apr 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant