Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Sources/SpecGraph/Documentation.docc/OntologyCAdapterReport.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ runs/ontology_semantic_review_surface.json
runs/ontology_supervisor_semantic_gate.json
runs/ontology_delta_draft_intake.json
runs/ontology_closed_loop_evidence.json
runs/ontology_review_dashboard.json
runs/ontology_owner_decision_report.json
runs/ontology_decision_import_preview.json
runs/ontology_semantic_lint_smoke.json
```

Expand Down Expand Up @@ -88,6 +91,20 @@ surface for those intake requests. It reports blocked or pending owner-decision
states and preserves empty Ontology decision refs until real owner evidence is
available; it does not close semantic gates or mutate canonical specs.

`runs/ontology_review_dashboard.json` is the richer SpecGraph/SpecSpace
projection over semantic review, gate, intake, and closed-loop evidence. It is
read-only review material and does not import owner decisions.

`runs/ontology_owner_decision_report.json` carries typed Ontology owner decision
evidence only when those decisions match pending closed-loop owner-review
evidence. Blocked, stale, or unmatched owner-decision inputs remain ignored
diagnostics instead of becoming importable evidence.

`runs/ontology_decision_import_preview.json` joins the review dashboard with the
owner decision report. It shows no-decision, blocked, ready, rejected,
clarification, or unmatched preview states, preserves ignored owner-decision
diagnostics, and does not apply imports or mutate canonical specs.

## Boundary

The adapter report must not:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Ontology Decision Import Preview

Source artifact class: working draft

## Motivating concern

SpecGraph now has a typed Ontology owner decision report, but it still needs a
deterministic preview that shows how accepted/rejected decisions line up with
closed-loop evidence before any operator considers importing them into
SpecGraph.

## Bounded scope

Add a deterministic `ontology_decision_import_preview` artifact under `runs/`
that joins `ontology_review_dashboard` and `ontology_owner_decision_report` by
candidate id and intake id. The preview records matched evidence ids, source
intake state, owner decision state, preview state, required human action, and
explicit false apply/import/gate-close/canonical-mutation flags. Ignored owner
decisions from the source report remain visible as diagnostics and do not become
import previews.

This slice must not apply owner decisions, import decisions into SpecGraph, mark
candidates accepted, close semantic gates, write Ontology packages, update
ontology lockfiles, mutate canonical specs, invoke prompt agents, parse
arbitrary text, or run ontologyc.

## Acceptance sketch

- Declare the decision import preview layout and contract in
`tools/ontology_semantic_control_policy.json`.
- Build `runs/ontology_decision_import_preview.json` from the review dashboard
and owner decision report.
- Classify preview rows as blocked, ready for operator review, rejected,
clarification-needed, unmatched, or no-decisions.
- Carry ignored owner-decision diagnostics from the source report without
recommending import.
- Validate the read-only boundary and reject policy or source authority
expansion.
- Cover artifact shape, write path, generated output, and authority rejection in
focused tests.
- Register proposal `0115` in promotion and runtime registries.

## Next gap

```text
build_specspace_owner_decision_review_surface
```
135 changes: 135 additions & 0 deletions docs/proposals/0115_ontology_decision_import_preview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# Ontology Decision Import Preview

RFC: SG-RFC-0115
Version: 0.1.0

## Status

Implemented

Decision scope: read-only import preview for Ontology owner decisions.

This document does not apply owner decisions, import decisions into SpecGraph,
write Ontology packages, update ontology lockfiles, mutate canonical SpecGraph
specs, mark candidate terms accepted, close semantic gates, invoke prompt
agents, parse arbitrary text, or run ontologyc.

## Source Material

This proposal implements the next bounded runtime slice after
`0114_ontology_owner_decision_contract`.

Source draft:

- `docs/archive/proposal_sources/0115_ontology_decision_import_preview.md`

## Summary

SpecGraph now emits a deterministic decision import preview artifact:

```text
runs/ontology_decision_import_preview.json
```

The artifact joins the rich ontology review dashboard with the owner decision
report. It shows whether each valid owner decision is blocked by the semantic
gate, ready for operator review, rejected, clarification-needed, or unmatched,
while keeping the result as review evidence only. Invalid or stale owner
decision inputs that the owner decision report ignored remain visible as
ignored-owner-decision diagnostics instead of becoming import previews.

## Goals

- Add `ontology_decision_import_preview` to the semantic policy layout.
- Define preview states for blocked, ready, rejected, clarification, unmatched,
and no-decision cases.
- Preserve owner decision refs, candidate ids, intake ids, matched closed-loop
evidence ids, source intake state, and required human action.
- Preserve ignored owner-decision diagnostics from the source owner decision
report.
- Keep apply/import, semantic gate closure, canonical mutation, Ontology package
writes, lockfile writes, and prompt execution authority disabled.
- Cover preview shape, write path, generated output, authority boundary, and
registry trace in tests.

## Non-Goals

- Applying owner decisions to SpecGraph specs.
- Marking candidates accepted in canonical SpecGraph state.
- Closing semantic gates.
- Writing Ontology packages or lockfiles.
- Adding SpecSpace mutation UI.

## Runtime Contract

The preview artifact declares:

```json
{
"artifact_kind": "ontology_decision_import_preview",
"schema_version": 1,
"proposal_id": "0115",
"source_artifacts": {
"ontology_review_dashboard": "runs/ontology_review_dashboard.json",
"ontology_owner_decision_report": "runs/ontology_owner_decision_report.json"
},
"canonical_mutations_allowed": false,
"tracked_artifacts_written": false,
"decision_import_previews": [],
"ignored_owner_decisions": []
}
```

Each preview row records:

- preview id;
- decision id;
- candidate id;
- intake id;
- owner decision state;
- Ontology decision ref;
- matched closed-loop evidence id when present;
- matched source intake state when present;
- preview state;
- required human action;
- import recommendation;
- explicit false import, gate-close, canonical mutation, Ontology package write,
and lockfile update flags.

When the source owner decision report contains no valid decisions, the preview
summary reports `status: "no_decisions"` and carries ignored owner decisions as
diagnostics only.

## Authority Boundary

The preview may be used by SpecGraph and SpecSpace as a read-only review surface.

The preview may not:

- apply itself;
- import decisions into SpecGraph;
- mark candidates accepted;
- close semantic gates;
- mutate canonical specs;
- write Ontology packages;
- update ontology lockfiles;
- execute prompt agents.

## Acceptance

This slice is complete when:

- `tools/ontology_semantic_control_policy.json` declares
`ontology_decision_import_preview`;
- `tools/ontology_imports.py` builds and validates the decision import preview;
- `make ontology-imports` writes `runs/ontology_decision_import_preview.json`;
- focused tests cover no-decision, pending-decision, ignored-input, and read-only
preview behavior;
- proposal `0115` is tracked in promotion and runtime registries;
- proposal gates, DocC sync, and focused Python tests pass.

## Next Gap

```text
build_specspace_owner_decision_review_surface
```
4 changes: 4 additions & 0 deletions docs/supervisor_manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -1650,6 +1650,10 @@ authoritative.
- typed read-only Ontology owner decision report carrying accepted/rejected
decision evidence for later import previews without closing gates or
mutating canonical specs
- `runs/ontology_decision_import_preview.json`
- read-only preview that matches Ontology owner decisions to closed-loop
evidence and shows operator-review/import readiness without applying those
decisions or mutating canonical specs

### Queue and proposal surfaces

Expand Down
Loading