Skip to content

Commit 75da7bd

Browse files
committed
Add iso-index package
1 parent 4714caf commit 75da7bd

26 files changed

Lines changed: 1654 additions & 6 deletions

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ jobs:
6262
- workspace: "@razroo/iso-cache"
6363
node: "20.6.0"
6464
extra: ""
65+
- workspace: "@razroo/iso-index"
66+
node: "20.6.0"
67+
extra: ""
6568
- workspace: "@razroo/iso-contract"
6669
node: "20.6.0"
6770
extra: ""
@@ -195,6 +198,13 @@ jobs:
195198
node packages/iso-cache/dist/cli.js has "jd:example" --cache /tmp/iso-cache-example
196199
node packages/iso-cache/dist/cli.js verify --cache /tmp/iso-cache-example
197200
201+
- name: iso-index example build/query
202+
run: |
203+
node packages/iso-index/dist/cli.js build --config packages/iso-index/examples/jobforge-index.json --root packages/iso-index/examples/jobforge-project --out /tmp/jobforge.iso-index.json
204+
node packages/iso-index/dist/cli.js has --index /tmp/jobforge.iso-index.json --key "company-role:example-labs:staff-agent-engineer"
205+
node packages/iso-index/dist/cli.js query --index /tmp/jobforge.iso-index.json --kind jobforge.report.url --key "url:https://example.test/jobs/123"
206+
node packages/iso-index/dist/cli.js verify --index /tmp/jobforge.iso-index.json
207+
198208
- name: iso-contract example validate/render
199209
run: |
200210
node packages/iso-contract/dist/cli.js validate jobforge.tracker-row --contracts packages/iso-contract/examples/jobforge-contracts.json --input @packages/iso-contract/examples/tracker-row.json
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: iso-index Release to npm
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
defaults:
8+
run:
9+
working-directory: packages/iso-index
10+
11+
jobs:
12+
publish:
13+
if: startsWith(github.ref_name, 'iso-index-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-index-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 fourteen packages that **work on their own** but are **designed
3+
This repo ships fifteen 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

@@ -177,6 +177,19 @@ without asking the model to refetch or rederive safe artifacts.
177177

178178
---
179179

180+
## 12. `iso-index` ← deterministic artifact lookup for domain packages — **DONE**
181+
182+
Introduced as a standalone package. `iso-index` does not import JobForge,
183+
`iso-cache`, `iso-ledger`, `iso-contract`, or any other domain package; it
184+
provides the on-disk JSON index format and extractor rules that domain
185+
tools can share. JobForge-style examples cover report URLs/scores,
186+
tracker markdown tables, scan-history TSVs, and ledger JSONL records, but
187+
the package remains generic: build compact lookup records from configured
188+
text, TSV, markdown-table, and JSONL sources, then query/has/verify them
189+
without asking the model to grep or load entire artifact trees.
190+
191+
---
192+
180193
## Design questions that are *not* open integrations
181194

182195
The following look like integrations but are deliberately decoupled —
@@ -222,3 +235,7 @@ don't "fix" them without a conversation first.
222235
integrity. Domain packages still own which artifacts are safe to cache,
223236
how long they stay fresh, and which side-effectful operations must never
224237
be replayed from cache.
238+
- **`iso-index` does not decide source precedence for a domain.**
239+
It builds and verifies lookup records from configured sources. Domain
240+
packages still own which source wins when report, tracker, scan, cache,
241+
and ledger facts disagree, and when an index should be rebuilt.

README.md

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Today, agent workflow reliability is fragmented on three axes:
3131
"what already happened." Those invariants belong in deterministic local packages,
3232
not in repeatedly re-tokenized instructions.
3333

34-
Fourteen packages solve that in one pipeline with runtime control and a
34+
Fifteen packages solve that in one pipeline with runtime control and a
3535
feedback loop:
3636

3737
- **Four build-time tools** turn your authored source into every harness's file layout:
@@ -41,13 +41,15 @@ feedback loop:
4141
[`@razroo/iso-route`](./packages/iso-route) compiles *one model policy* into each harness's config.
4242
- **One wrapper** runs the whole build chain:
4343
[`@razroo/iso`](./packages/iso) chains the above into a single `iso build`.
44-
- **Six runtime-control libraries** handle durable execution, context selection, artifact caching, role capabilities, artifact shape, and operational truth:
44+
- **Seven runtime-control libraries** handle durable execution, context selection, artifact caching, artifact lookup, role capabilities, artifact shape, and operational truth:
4545
[`@razroo/iso-orchestrator`](./packages/iso-orchestrator) provides resumable
4646
steps, keyed mutexes, and bounded fan-out for side-effectful agent workflows,
4747
[`@razroo/iso-context`](./packages/iso-context) resolves context bundles,
4848
estimates tokens, checks budgets, and renders deterministic context packs,
4949
[`@razroo/iso-cache`](./packages/iso-cache) stores and verifies
5050
content-addressed local artifacts with TTL-aware reads and pruning,
51+
[`@razroo/iso-index`](./packages/iso-index) builds and queries compact
52+
local indexes that point to authoritative facts across artifacts,
5153
[`@razroo/iso-capabilities`](./packages/iso-capabilities) resolves,
5254
checks, and renders role-level tool/MCP/command/filesystem/network policy,
5355
[`@razroo/iso-contract`](./packages/iso-contract) validates, parses, and
@@ -70,6 +72,7 @@ feedback loop:
7072
│ │ iso-guard ─▶ policy pass / fail
7173
│ │ iso-context ─▶ context bundle plan
7274
│ │ iso-cache ─▶ artifact reuse
75+
│ │ iso-index ─▶ artifact lookup
7376
│ │ iso-capabilities ─▶ role permission policy
7477
┌────────────────────┐ │ .codex/config.toml │
7578
│ models.yaml │ ───────────────────── iso-route build ─────────────────────────────────────▶│ opencode.json │
@@ -121,6 +124,8 @@ the repo now supports a tighter loop:
121124
instead of repeating context-loading matrices in prompts.
122125
- `iso-cache put/get/verify` keeps reusable artifacts local instead of
123126
refetching or rederiving safe inputs on every run.
127+
- `iso-index build/query/has` keeps artifact lookup local instead of
128+
grepping and loading growing state/report trees into prompts.
124129
- `iso-capabilities check/render` keeps role permission matrices local
125130
instead of repeating tool/MCP/filesystem boundaries in prompts.
126131
- `iso-trace model-score` catches tool-schema failures that weaker routes
@@ -148,6 +153,9 @@ of the prompt:
148153
- `iso-cache` makes artifact reuse executable: stable keys,
149154
content-addressed blobs, TTL-aware reads, integrity verification, and
150155
pruning without asking a model to refetch safe inputs.
156+
- `iso-index` makes artifact lookup executable: text/TSV/markdown-table/JSONL
157+
sources compile into a compact queryable index, so agents can ask where a
158+
fact lives without repeatedly grepping or loading growing files.
151159
- `iso-capabilities` makes role boundaries executable: resolve inherited
152160
tool/MCP/command/filesystem/network policy, check proposed actions, and
153161
render compact harness guidance without asking a model to remember a
@@ -245,6 +253,13 @@ of the prompt:
245253
expired/orphaned artifacts so domain packages can reuse safe inputs
246254
without model calls or MCP overhead.
247255

256+
- **[`packages/iso-index`](./packages/iso-index)**[`@razroo/iso-index`](https://www.npmjs.com/package/@razroo/iso-index)
257+
Deterministic local artifact index for agent workflows. Builds compact
258+
lookup indexes from configured text, TSV, markdown-table, and JSONL
259+
sources, then supports `query/has/verify` so domain packages can find
260+
authoritative facts without loading whole artifact trees into prompt
261+
context.
262+
248263
- **[`packages/iso-contract`](./packages/iso-contract)**[`@razroo/iso-contract`](https://www.npmjs.com/package/@razroo/iso-contract)
249264
Deterministic artifact contracts for agent workflows. Loads JSON
250265
contract catalogs, validates records, and parses/renders JSON, TSV,
@@ -401,6 +416,16 @@ iso-cache verify
401416
iso-cache prune --expired
402417
```
403418

419+
### `@razroo/iso-index` — where is the authoritative fact?
420+
421+
```bash
422+
iso-index build --config index.json --root . --out .iso-index.json
423+
iso-index query "example labs" --index .iso-index.json
424+
iso-index has --index .iso-index.json --key "company-role:example-labs:staff-agent-engineer"
425+
iso-index verify --index .iso-index.json
426+
iso-index explain --config index.json
427+
```
428+
404429
### `@razroo/iso-contract` — what shape must this artifact have?
405430

406431
```bash
@@ -439,6 +464,7 @@ iso/
439464
├── iso-ledger/ # append-only operational event/state ledger
440465
├── iso-context/ # deterministic context bundle policy
441466
├── iso-cache/ # deterministic content-addressed artifact cache
467+
├── iso-index/ # deterministic local artifact lookup index
442468
├── iso-contract/ # deterministic artifact contracts
443469
└── iso-capabilities/ # deterministic role capability policy
444470
```
@@ -459,6 +485,7 @@ npm --workspace @razroo/iso-guard run test # iso-guard policy engine tests
459485
npm --workspace @razroo/iso-ledger run test # iso-ledger event/state tests
460486
npm --workspace @razroo/iso-context run test # iso-context bundle/budget tests
461487
npm --workspace @razroo/iso-cache run test # iso-cache artifact cache tests
488+
npm --workspace @razroo/iso-index run test # iso-index artifact lookup tests
462489
npm --workspace @razroo/iso-contract run test # iso-contract artifact contract tests
463490
npm --workspace @razroo/iso-capabilities run test # iso-capabilities policy tests
464491

@@ -496,7 +523,7 @@ build, and `npm publish --provenance`.
496523
## End-to-end example
497524

498525
[`examples/pipeline/`](./examples/pipeline) is an executable demonstration
499-
that exercises **seven of the fourteen packages end-to-end** in one `npm run
526+
that exercises **seven of the fifteen packages end-to-end** in one `npm run
500527
test:pipeline` invocation: `agentmd lint` + `render``isolint lint` →
501528
`iso-route build` (from a bundled `models.yaml` that extends the
502529
`standard` preset) → `iso-harness build` (which consumes iso-route's
@@ -515,7 +542,7 @@ downstream repo would use.
515542

516543
`npm run test:pack` goes one level further: it packs the local workspaces into
517544
tarballs, installs them into fresh temp projects, and smoke-tests the packaged
518-
`iso-harness`, `iso`, `iso-eval`, `iso-trace`, `iso-route`, `iso-guard`, `iso-ledger`, `iso-context`, `iso-cache`, `iso-contract`, and `iso-capabilities`
545+
`iso-harness`, `iso`, `iso-eval`, `iso-trace`, `iso-route`, `iso-guard`, `iso-ledger`, `iso-context`, `iso-cache`, `iso-index`, `iso-contract`, and `iso-capabilities`
519546
CLIs. This guards against packaging regressions that workspace-only tests can
520547
miss.
521548

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-index/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# @razroo/iso-index
2+
3+
## 0.1.0
4+
5+
### Minor Changes
6+
7+
- Initial release: deterministic local artifact index for agent workflows with text, TSV, markdown-table, and JSONL source indexing, query/has/verify CLI commands, examples, and tests.

packages/iso-index/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)