Skip to content

Commit ffade0a

Browse files
committed
Add iso-facts package
1 parent 98947a9 commit ffade0a

24 files changed

Lines changed: 2096 additions & 9 deletions
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: iso-facts Release to npm
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
defaults:
8+
run:
9+
working-directory: packages/iso-facts
10+
11+
jobs:
12+
publish:
13+
if: startsWith(github.ref_name, 'iso-facts-v')
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
checks: read
18+
id-token: write
19+
steps:
20+
- uses: actions/checkout@v6
21+
22+
- uses: actions/setup-node@v6
23+
with:
24+
node-version: '22'
25+
registry-url: 'https://registry.npmjs.org'
26+
cache: 'npm'
27+
28+
- name: Set version from release tag
29+
run: |
30+
VERSION="${GITHUB_REF_NAME#iso-facts-v}"
31+
echo "VERSION=$VERSION" >> $GITHUB_ENV
32+
33+
- name: Verify required CI passed for release commit
34+
uses: ./.github/actions/verify-release-gate
35+
env:
36+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
38+
- name: Verify package.json version matches release tag
39+
run: npm run release:check-source -- "$VERSION"
40+
41+
- name: Install (workspace root)
42+
run: npm ci
43+
working-directory: .
44+
45+
- name: Publish to npm (with provenance)
46+
run: npm publish --provenance --access public
47+
env:
48+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

INTEGRATIONS.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Integrations
22

3-
This repo ships nineteen packages that **work on their own** but are **designed
3+
This repo ships twenty packages that **work on their own** but are **designed
44
to compose**. The planned cross-package compositions listed here are already
55
shipped, so this file now serves as:
66

@@ -243,6 +243,19 @@ remember sensitive-data handling rules.
243243

244244
---
245245

246+
## 17. `iso-facts` ← deterministic fact materialization for domain packages — **DONE**
247+
248+
Introduced as a standalone package. `iso-facts` does not import JobForge,
249+
`iso-index`, `iso-contract`, `iso-canon`, `iso-preflight`, or any other
250+
domain package; it provides the on-disk JSON fact policy and fact set formats
251+
that domain tools can share. JobForge-style examples cover report URLs/scores,
252+
scan-history TSV rows, tracker tables, JSONL outcomes, and preflight candidate
253+
JSON, but the package remains generic: extract/query/has/verify/check
254+
provenance-rich fact records from local artifacts without asking a model to
255+
reread broad source trees.
256+
257+
---
258+
246259
## Design questions that are *not* open integrations
247260

248261
The following look like integrations but are deliberately decoupled —
@@ -292,6 +305,10 @@ don't "fix" them without a conversation first.
292305
It builds and verifies lookup records from configured sources. Domain
293306
packages still own which source wins when report, tracker, scan, cache,
294307
and ledger facts disagree, and when an index should be rebuilt.
308+
- **`iso-facts` does not decide domain truth or stale-fact policy.**
309+
It materializes configured facts with provenance. Domain packages still own
310+
source precedence, staleness rules, conflict handling, and how facts feed
311+
contracts, preflight gates, ledgers, or downstream prompts.
295312
- **`iso-canon` does not decide duplicate policy for a domain.** It emits
296313
stable keys and explainable comparisons. Domain packages still own whether
297314
a `possible` match blocks work, warns, or routes to review, and which

README.md

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ to 7B local models). The repo now covers the full loop: build portable
1313
harness files, route models, replay evals, parse production traces, scope
1414
role capabilities, select deterministic context bundles, audit runtime policy,
1515
cache reusable artifacts, canonicalize identity keys, plan dispatches, settle
16-
dispatch results, redact sensitive output, migrate consumer projects, validate
17-
artifact contracts, and persist local workflow truth. The only narrower surface is `iso-trace model-score`, which still
16+
dispatch results, redact sensitive output, materialize source-backed facts,
17+
migrate consumer projects, validate artifact contracts, and persist local
18+
workflow truth. The only narrower surface is `iso-trace model-score`, which still
1819
depends on transcripts exposing stable model metadata.
1920

2021
Today, agent workflow reliability is fragmented on three axes:
@@ -29,11 +30,11 @@ Today, agent workflow reliability is fragmented on three axes:
2930
unstructured rationale all drop silently at 7B. You don't find out
3031
until the agent misbehaves in production.
3132
3. **Runtime fragmentation.** Workflows rely on fragile prompt prose for
32-
fan-out limits, context loading, artifact reuse, identity keys, project upgrades, role permissions, output shape, duplicate checks, post-dispatch settlement, redaction, and
33+
fan-out limits, context loading, artifact reuse, fact extraction, identity keys, project upgrades, role permissions, output shape, duplicate checks, post-dispatch settlement, redaction, and
3334
"what already happened." Those invariants belong in deterministic local packages,
3435
not in repeatedly re-tokenized instructions.
3536

36-
Nineteen packages solve that in one pipeline with runtime control and a
37+
Twenty packages solve that in one pipeline with runtime control and a
3738
feedback loop:
3839

3940
- **Four build-time tools** turn your authored source into every harness's file layout:
@@ -43,7 +44,7 @@ feedback loop:
4344
[`@razroo/iso-route`](./packages/iso-route) compiles *one model policy* into each harness's config.
4445
- **One wrapper** runs the whole build chain:
4546
[`@razroo/iso`](./packages/iso) chains the above into a single `iso build`.
46-
- **Twelve runtime-control libraries** handle durable execution, context selection, artifact caching, artifact lookup, identity canonicalization, preflight dispatch planning, postflight settlement, redaction, project migration, role capabilities, artifact shape, and operational truth:
47+
- **Thirteen runtime-control libraries** handle durable execution, context selection, artifact caching, artifact lookup, fact materialization, identity canonicalization, preflight dispatch planning, postflight settlement, redaction, project migration, role capabilities, artifact shape, and operational truth:
4748
[`@razroo/iso-orchestrator`](./packages/iso-orchestrator) provides resumable
4849
steps, keyed mutexes, and bounded fan-out for side-effectful agent workflows,
4950
[`@razroo/iso-context`](./packages/iso-context) resolves context bundles,
@@ -52,6 +53,8 @@ feedback loop:
5253
content-addressed local artifacts with TTL-aware reads and pruning,
5354
[`@razroo/iso-index`](./packages/iso-index) builds and queries compact
5455
local indexes that point to authoritative facts across artifacts,
56+
[`@razroo/iso-facts`](./packages/iso-facts) extracts, queries, verifies,
57+
and checks provenance-rich local facts,
5558
[`@razroo/iso-canon`](./packages/iso-canon) produces stable URL,
5659
company, role, and company-role keys for duplicate checks,
5760
[`@razroo/iso-preflight`](./packages/iso-preflight) validates
@@ -87,6 +90,7 @@ feedback loop:
8790
│ │ iso-context ─▶ context bundle plan
8891
│ │ iso-cache ─▶ artifact reuse
8992
│ │ iso-index ─▶ artifact lookup
93+
│ │ iso-facts ─▶ fact materialization
9094
│ │ iso-canon ─▶ identity keys
9195
│ │ iso-preflight ─▶ dispatch plan
9296
│ │ iso-postflight ─▶ settlement gate
@@ -145,6 +149,8 @@ the repo now supports a tighter loop:
145149
refetching or rederiving safe inputs on every run.
146150
- `iso-index build/query/has` keeps artifact lookup local instead of
147151
grepping and loading growing state/report trees into prompts.
152+
- `iso-facts build/query/has/verify` keeps source-backed fact extraction
153+
local instead of asking a model to reread broad artifact trees.
148154
- `iso-canon normalize/key/compare` keeps duplicate/entity keys local
149155
instead of repeatedly restating URL, company, and role matching rules.
150156
- `iso-preflight plan/check` keeps dispatch eligibility and batching local
@@ -186,6 +192,9 @@ of the prompt:
186192
- `iso-index` makes artifact lookup executable: text/TSV/markdown-table/JSONL
187193
sources compile into a compact queryable index, so agents can ask where a
188194
fact lives without repeatedly grepping or loading growing files.
195+
- `iso-facts` makes fact materialization executable: local artifacts compile
196+
into provenance-rich fact records that can be queried, verified, and checked
197+
before downstream contracts or dispatch gates run.
189198
- `iso-canon` makes identity canonicalization executable: URLs, companies,
190199
roles, and company-role pairs compile to stable keys with explainable
191200
`same` / `possible` / `different` comparisons.
@@ -305,6 +314,13 @@ of the prompt:
305314
authoritative facts without loading whole artifact trees into prompt
306315
context.
307316

317+
- **[`packages/iso-facts`](./packages/iso-facts)**[`@razroo/iso-facts`](https://www.npmjs.com/package/@razroo/iso-facts)
318+
Deterministic fact materialization for agent workflows. Extracts
319+
provenance-rich facts from configured text, TSV, markdown-table, JSONL,
320+
and JSON sources, then supports `query/has/verify/check` so domain
321+
packages can feed source-backed facts into contracts and dispatch gates
322+
without model calls.
323+
308324
- **[`packages/iso-canon`](./packages/iso-canon)**[`@razroo/iso-canon`](https://www.npmjs.com/package/@razroo/iso-canon)
309325
Deterministic canonicalization and entity matching for agent workflows.
310326
Normalizes URLs, companies, roles, and company-role pairs into stable
@@ -503,6 +519,17 @@ iso-index verify --index .iso-index.json
503519
iso-index explain --config index.json
504520
```
505521

522+
### `@razroo/iso-facts` — what facts can this workflow trust?
523+
524+
```bash
525+
iso-facts build --config facts.json --root . --out .iso-facts.json
526+
iso-facts query --facts .iso-facts.json --fact job.url
527+
iso-facts has --facts .iso-facts.json --fact job.score
528+
iso-facts verify --facts .iso-facts.json
529+
iso-facts check --facts .iso-facts.json --config facts.json
530+
iso-facts explain --config facts.json
531+
```
532+
506533
### `@razroo/iso-canon` — what stable key names this entity?
507534

508535
```bash
@@ -585,6 +612,7 @@ iso/
585612
├── iso-context/ # deterministic context bundle policy
586613
├── iso-cache/ # deterministic content-addressed artifact cache
587614
├── iso-index/ # deterministic local artifact lookup index
615+
├── iso-facts/ # deterministic source-backed fact materialization
588616
├── iso-canon/ # deterministic identity canonicalization
589617
├── iso-preflight/ # deterministic preflight dispatch planning
590618
├── iso-postflight/ # deterministic postflight settlement
@@ -611,6 +639,7 @@ npm --workspace @razroo/iso-ledger run test # iso-ledger event/state tests
611639
npm --workspace @razroo/iso-context run test # iso-context bundle/budget tests
612640
npm --workspace @razroo/iso-cache run test # iso-cache artifact cache tests
613641
npm --workspace @razroo/iso-index run test # iso-index artifact lookup tests
642+
npm --workspace @razroo/iso-facts run test # iso-facts materialization tests
614643
npm --workspace @razroo/iso-canon run test # iso-canon identity key tests
615644
npm --workspace @razroo/iso-preflight run test # iso-preflight dispatch planning tests
616645
npm --workspace @razroo/iso-postflight run test # iso-postflight settlement tests
@@ -653,7 +682,7 @@ build, and `npm publish --provenance`.
653682
## End-to-end example
654683

655684
[`examples/pipeline/`](./examples/pipeline) is an executable demonstration
656-
that exercises **seven of the nineteen packages end-to-end** in one `npm run
685+
that exercises **seven of the twenty packages end-to-end** in one `npm run
657686
test:pipeline` invocation: `agentmd lint` + `render``isolint lint` →
658687
`iso-route build` (from a bundled `models.yaml` that extends the
659688
`standard` preset) → `iso-harness build` (which consumes iso-route's
@@ -672,7 +701,7 @@ downstream repo would use.
672701

673702
`npm run test:pack` goes one level further: it packs the local workspaces into
674703
tarballs, installs them into fresh temp projects, and smoke-tests the packaged
675-
`iso-harness`, `iso`, `iso-eval`, `iso-trace`, `iso-route`, `iso-guard`, `iso-ledger`, `iso-context`, `iso-cache`, `iso-index`, `iso-canon`, `iso-preflight`, `iso-postflight`, `iso-redact`, `iso-migrate`, `iso-contract`, and `iso-capabilities`
704+
`iso-harness`, `iso`, `iso-eval`, `iso-trace`, `iso-route`, `iso-guard`, `iso-ledger`, `iso-context`, `iso-cache`, `iso-index`, `iso-facts`, `iso-canon`, `iso-preflight`, `iso-postflight`, `iso-redact`, `iso-migrate`, `iso-contract`, and `iso-capabilities`
676705
CLIs. This guards against packaging regressions that workspace-only tests can
677706
miss.
678707

package-lock.json

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/iso-facts/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# @razroo/iso-facts
2+
3+
## 0.1.0
4+
5+
- Initial release.
6+
- Adds deterministic fact extraction from text, TSV, markdown tables, JSONL,
7+
and JSON files.
8+
- Adds `build`, `query`, `has`, `verify`, `check`, and `explain` CLI commands.

packages/iso-facts/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Razroo
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)