-
Notifications
You must be signed in to change notification settings - Fork 0
Spec-driven development: schema packages, bridges, guide API, CRUD CLI #93
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Context
Rivet's strategic positioning as a spec-driven SDLC engine. Schemas become distributable packages that define lifecycle methodologies, enforce compliance, teach AI agents, and produce audit evidence.
Spec: docs/superpowers/specs/2026-03-29-spec-driven-development-design.md (on docs/specs-and-plans branch)
Positioning
Schema as contract (enforces) + curriculum (teaches) + evidence (proves).
Phases
Phase 1: Schema package format + built-in packaging
- Add
manifest.yamlto existing schemas (name, version, bridges, min_rivet_version) - Add guidance fields to schema YAML (
description,common-mistakes,exampleper type) rivet schema validateandrivet schema list- Package existing schemas with docs and starters
- Built-in schema resolution (compiled via
include_str!)
Phase 2: Bridge schemas + rivet init
- Bridge schema format (link_types + traceability_rules only, no artifact_types)
BridgeFilestruct,Schema::apply_bridges()loading mechanism- Auto-resolution of bridges from manifests
rivet init --schema aspice,stpawith bridge auto-detect + starter artifactsrivet schema newscaffolding
Phase 3: CLI enhancements
rivet getcommand (single artifact read,--format json/yaml)--format jsononvalidate,stats,matrix,stpa,coveragerivet modify --add-reffor source-ref management- Note:
rivet add/link/modify/removealready exist viamutate.rs/yaml_edit.rs
Phase 4: Guide API + CLI
GuideReportstruct inrivet-core(static schema guidance + dynamic project health)/api/v1/guideendpoint with sub-routes (depends on PR feat(api): oEmbed provider and Grafana JSON API endpoints #89)rivet guideCLI with all subcommands +--format json- Uses cached diagnostics from AppState
Phase 5: Source refs
source-refsfield on Artifact struct (Vec<SourceRef>)- Schema
source-refsconfig (expect: optional/recommended/required, labels) - Code comment cross-validation (
// rivet: implements REQ-042) - Dashboard + API integration
Phase 6: Git-based schema distribution
- Schema loading from git repos (extend existing externals sync)
- Version pinning in
rivet.yaml(aspice@2.1.0)
Parallel execution
Phase 1 → (Phase 2 + Phase 3 + Phase 4 in parallel) → Phase 5 + Phase 6
Key codebase notes
- Existing CRUD:
rivet add/link/modify/removealready work (mutate.rs,yaml_edit.rs) - Schema format: list-of-structs, kebab-case keys (not map-style)
baselines:config key already used for scoped validation — snapshot config usessnapshots:keyrivet diffalready exists for artifact directory comparison — snapshot diff usesrivet snapshot diffrivet inithas existing--presetand--schemaflags
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request