feat(tcl): tool-qualification workstream A + AI session provenance (#127)#289
Merged
Conversation
) Closes #127 (AI session provenance — schema half) and ships the smallest viable surface of TCL design workstream A (per docs/design/tool-confidence-level.md §7.4). **Schema additions (schemas/common.yaml)** - `ai-session` artifact type — pins a Claude Code (or other AI) session to a commit so the auditor can reconstruct *who/what* authored a change. Fields: session-id, session-hash (SHA-256 of transcript), model-id, tool-version, commit-sha, started-at, ended-at, invoker. - `ai-found-defect` artifact type (TCL A3) — typed defect record for errors introduced by AI authoring that rivet's detection machinery caught. Fields: severity, triage-status (open/accepted/rejected/ deduplicated), detected-by, discovered-at, triaged-at, triaged-by. - Link types: `defect-against` (defect → target), `corrects` (fix → defect), `produced-by` (artifact → ai-session). **Schema additions (schemas/iso-26262.yaml)** - `tool-confidence` artifact type (TCL A2) — typed tool-qualification claim per ISO 26262-8 §11.4.7. Fields: tool-id, ti (TI1/TI2), td (TD1/TD2/TD3), tcl (TCL1/TCL2/TCL3), regime (iso-26262/do-178c/ do-330/en-50128/iec-61508/iec-62304/iso-21434/iso-pas-8800), claim- status (self-claimed/qualified/conditional/target), scope. link-field `qualification-evidence` points at the proofs / oracle runs that defend the TD claim. **Dogfood (TCL A1)** - Fix inverted TCL/TQL convention in safety/stpa/tool-qualification.yaml header (now follows ISO 26262 Table 3: TCL1 = lowest demand). - New typed claim `TQ-CONF-RIVET` at safety/tool-qualification/ rivet-tool-confidence.yaml — rivet's own TI2/TD1/TCL1 self-claim links to the seven hazards in the dogfood STPA. - rivet.yaml: load `iso-26262` schema + scan `safety/tool-qualification/` source path. **CLI (TCL A4, A5)** - `--qualification-mode` flag on the top-level Cli. Initial gate refuses `rivet sync` (Phase 2 federation, out of scope per dossier §4). Read-only commands stay allowed; the list is deliberately narrow — better to expand than to silently block audit work. - `rivet stats --qualification` — JSON-only configuration baseline manifest for the dossier. Lists rivet version, schemas in use, every `tool-confidence` artifact with its claim, and `ai-found- defect` aggregates (by severity, by triage-status, plus open-IDs). This is the snapshot the safety manager pastes into the dossier. - `rivet docs tool-qualification` — renders the new dossier doc (docs/design/tool-qualification-dossier.md) wired into the docs topic registry. **Tests** - Integration: `stats_qualification_emits_baseline_manifest_for_dogfood` validates the full JSON envelope contains TQ-CONF-RIVET at TCL1. - Integration: `qualification_mode_blocks_sync` asserts the gate produces a non-zero exit with a discoverable error message. **Not in this PR** - `rivet check ai-defects-open` oracle (deferred — needs the agent- pipelines wiring, which is a bigger refactor). - Phase 2 of #127 (commit hook to auto-stamp ai-session metadata, `rivet audit` to enforce that every AI commit has a session record). - Independent assessment (claim-status stays self-claimed). Implements: REQ-002, REQ-007, REQ-010 Refs: FEAT-001, #127 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
📐 Rivet artifact delta
Graphgraph LR
TQ_CONF_RIVET["TQ-CONF-RIVET"]:::added
classDef added fill:#d4edda,stroke:#28a745,color:#155724
classDef removed fill:#f8d7da,stroke:#dc3545,color:#721c24
classDef modified fill:#fff3cd,stroke:#ffc107,color:#856404
classDef overflow fill:#e2e3e5,stroke:#6c757d,color:#495057,stroke-dasharray: 3 3
Added
Posted by |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
4 tasks
avrabe
added a commit
that referenced
this pull request
May 16, 2026
…290) * release(v0.10.0): variant + supplier + AI session + TCL workstream A Workspace version bump 0.9.0 → 0.10.0. Theme: audit-grade story — three orthogonal features that together move rivet from "trace your project" to "describe the boundary and defend the tool's role across it." Highlights (full notes in CHANGELOG.md): - Variant-aware properties — per-variant field values (#285, #255). - Cross-org / supplier-boundary coverage MVP (#286, #253). - AI session provenance — schema half (#289, partially #127). - Tool-qualification workstream A — typed claim + dossier (#289). - rivet stats --qualification + --qualification-mode flag (#289). - TCL/TQL numbering convention fix in dogfood STPA (#289). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(release): docs-check violations on v0.10.0 release commit Two docs-check violations on PR #290: - VersionConsistency: vscode-rivet/package.json bumped 0.9.0 → 0.10.0 (it has its own version field, not workspace-inherited). - SubcommandReferences: CHANGELOG mentioned `rivet audit` which is a Phase 2 future subcommand. Rephrased to "audit-side enforcement subcommand" so the literal `rivet audit` no longer parses as a current-cli reference. Local `rivet docs check` now passes (54 files, 0 violations). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ships the smallest viable surface of TCL design workstream A (
docs/design/tool-confidence-level.md§7.4) and closes the schema half of #127 AI session provenance. The ai-session and ai-found-defect schemas compose: an AI-introduced defect points back to the session that produced it.Schema additions
schemas/common.yaml:ai-session(feat: AI session provenance — link Claude Code session logs to traceability chain #127) — pins a Claude Code (or other AI) session to a commit. session-id, session-hash, model-id, tool-version, commit-sha, started-at, ended-at, invoker.ai-found-defect(TCL A3) — typed record for AI-introduced errors that rivet's detection machinery caught. severity (critical/major/minor/info), triage-status (open/accepted/rejected/deduplicated), detected-by, …defect-against,corrects,produced-by.schemas/iso-26262.yaml:tool-confidence(TCL A2) — typed claim per ISO 26262-8 §11.4.7. ti (TI1/TI2), td (TD1/TD2/TD3), tcl, regime (8 standards regimes), claim-status (self-claimed/qualified/conditional/target), scope, plusqualification-evidencelink-field.Dogfood (TCL A1)
safety/stpa/tool-qualification.yamlheader (now follows ISO 26262 Table 3: TCL1 = lowest demand).TQ-CONF-RIVETatsafety/tool-qualification/rivet-tool-confidence.yaml— rivet's own TI2/TD1/TCL1 self-claim, links to the seven dogfood hazards.rivet.yamlnow loadsiso-26262schema + scanssafety/tool-qualification/.CLI (TCL A4, A5)
rivet docs tool-qualification— renders the new dossier (docs/design/tool-qualification-dossier.md).rivet stats --qualification— JSON-only baseline manifest: rivet version, schemas in use, everytool-confidenceclaim,ai-found-defectaggregates. The snapshot a safety manager pastes into the dossier.--qualification-modetop-level flag — initial gate refusesrivet sync(Phase 2 federation, out of scope per dossier §4). Read-only commands stay allowed.What's NOT in this PR
rivet check ai-defects-openoracle (needs agent-pipelines wiring, bigger refactor).rivet auditto enforce coverage).claim-statusstaysself-claimed).Test plan
cargo test --workspace --lib— 994 pass.cargo test --workspace— green.stats_qualification_emits_baseline_manifest_for_dogfood(asserts TQ-CONF-RIVET surfaces at TCL1),qualification_mode_blocks_sync(asserts gate produces non-zero exit with discoverable message).cargo clippy --workspace --all-targets— clean.cargo fmt --all— clean.rivet docs tool-qualificationrenders the dossier;rivet stats --qualificationproduces the manifest with TQ-CONF-RIVET present.🤖 Generated with Claude Code