ingr

package
v0.32.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package ingr writes SpecScore Studio facts as INGR recordsets — the same fixed-header/one-JSON-value-per-line encoding the CodeGrapher snapshots committed under codegraph/ use (and the codegraph adapter parses).

Feature: cli/studio/index (REQ: ingr-export)

Layout: one directory per repo slug under the export root, each holding a single facts.ingr recordset with one record per fact attributed to that repo. The file starts with the fixed header

# INGR.io | facts: subject, predicate, object, evidence_class, evidence_pointer, adapter_id, adapter_version, observed_at, ecosystem

followed by one JSON string per line (nine lines per record, in header order) and a trailing `# <n> records` comment. The export root is replaced wholesale on every run — like the fact store, it is a disposable cache.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Export

func Export(dir string, repos []Repo) error

Export replaces the recordset tree at dir with one directory per repo, each containing a facts.ingr recordset holding exactly that repo's facts (a repo with zero facts gets an empty recordset, keeping the per-repo record counts comparable with the index summary). Any failure aborts the export and returns an error for the caller to downgrade to a warning (REQ: ingr-export — the store stays the query surface).

Types

type Repo

type Repo struct {
	Slug  string
	Facts []fact.Fact
}

Repo is one repo's slice of an export: its stable slug (the directory name under the export root) and the facts the ingestion run attributed to it.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL