Skip to content

adapters(tooling): add HiL/SiL Predicate Router adapter#21

Merged
cms-pm merged 1 commit into
mainfrom
adapters/hil-sil-predicate-router
May 6, 2026
Merged

adapters(tooling): add HiL/SiL Predicate Router adapter#21
cms-pm merged 1 commit into
mainfrom
adapters/hil-sil-predicate-router

Conversation

@cms-pm
Copy link
Copy Markdown
Owner

@cms-pm cms-pm commented May 5, 2026

Draft — depends on #19 and #20. Mark ready for review after both prerequisites merge.

Summary

Adds a new optional tooling adapter at adapters/tooling/HIL_SIL_PREDICATE_ROUTER.md:

  • Routes deterministic HiL/SiL capture-and-compare work off architect-tier inference onto worker-tier inference
  • Architect (Opus or equivalent) authors predicate.json once at chunk-plan time
  • Worker (Haiku or equivalent) runs CLI, diffs against predicate, emits {scn, status, evidence_uri, predicate_hash} JSONL — no architecture context loaded
  • Architect re-engages only on non-empty diff or unexpected status

Motivation

Phase 6.5.x HiL captures in cms-pm/cockpit dominated per-chunk closeout token cost. The captured outputs are deterministic (e.g. SIDEBAND_STATUS lines, drop-counter deltas, FSM transition markers) — they don't require architectural judgment, they require pinned-expectation diffing. That's a cheap-worker workload.

This adapter makes the routing pattern legible as governance rather than ad-hoc per-project optimization. Projects that opt in publish their predicates as load-bearing artifacts, the router contract caps what the worker is allowed to load, and ledger lines carry predicate_hash so audit can detect drift independent of status.

Compatibility

Pilot consumer

cms-pm/cockpit Phase 8 chunk-8.0t:

  • Predicate: docs/validation/phase-8/predicates/scn-8.0t.json (schema_version 0.1.0-pilot)
  • Runner: scripts/validation/run_phase8_0t_fast_queue_backpressure.py
  • routing_hint.haiku_eligible = ["SCN-8.0t-03","SCN-8.0t-05","SCN-8.0t-06"]
  • routing_hint.in_process = ["SCN-8.0t-01","SCN-8.0t-02","SCN-8.0t-04","SCN-8.0t-07"] (source-shape, runs in the contract test)

Schema posture

predicate.json schema is project-local during pilot (0.1.0-pilot). Will be promoted to a ratified contract under contracts/ once a second project adopts the adapter — premature schema standardization on a single pilot would lock in 8.0t's particular predicate_kind enum.

Stacked PRs

# Branch Status
1 tdr/contract-test-hygiene #19 (ready)
2 evidence/scenario-status-vocabulary #20 (draft, depends on #1)
3 adapters/hil-sil-predicate-router this PR (draft, depends on #1, #2)
4 astaire/scenario-ledger-collection draft, depends on #2

Test plan

🤖 Generated with Claude Code

New optional tooling adapter for projects with substantial HiL or SiL
evidence capture. Routes deterministic capture-and-compare work off
the architect-tier agent onto a worker-tier agent driven by a pinned
predicate.json.

Routing contract:
- architect (Opus or equivalent) authors predicate.json at chunk-plan
  time; worker (Haiku or equivalent) runs CLI, diffs against predicate,
  emits {scn, status, evidence_uri, predicate_hash} JSONL
- worker MUST NOT load architecture context or mutate predicate
- architect re-engages only on non-empty diff or unexpected status

Compatible with the contract test hygiene rule (PR #19) and the
scenario status vocabulary (PR #20). Compounds with the RTK tooling
adapter on shell-visible runner invocations.

Pilot consumer: cms-pm/cockpit Phase 8
- docs/validation/phase-8/predicates/scn-8.0t.json
- scripts/validation/run_phase8_0t_fast_queue_backpressure.py

Predicate schema is project-local at 0.1.0-pilot; will be promoted
to a ratified contract under contracts/ after a second project adopts.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@cms-pm cms-pm mentioned this pull request May 5, 2026
5 tasks
@cms-pm cms-pm marked this pull request as ready for review May 6, 2026 09:24
@cms-pm cms-pm merged commit 5aeb6d7 into main May 6, 2026
1 of 2 checks passed
@cms-pm cms-pm deleted the adapters/hil-sil-predicate-router branch May 6, 2026 09:24
cms-pm added a commit that referenced this pull request May 6, 2026
Defines the per-SCN status ledger (JSONL, append-only) that backs the
Scenario Status Vocabulary (PR #20) and the HiL/SiL Predicate Router
adapter (PR #21).

- Writer contract: validate status against the five-value enum,
  append-only, predicate_hash required when a predicate drives the run
- Reader contract: latest-ts row wins; absent rows resolve to
  not-started, never to passing
- Astaire collection (cms-pm/astaire#16) consumes the ledger; companion
  scenario-predicate collection (cms-pm/astaire#17) joins on
  predicate_hash

Pilot consumer: cms-pm/cockpit
- tests/_contract_support.py — record_scenario writer
- scripts/validation/run_phase8_0t_fast_queue_backpressure.py — HiL
  worker emission contract

Schema is provisional; promotion to contracts/scenario-ledger.schema.json
requires a second adopter, end-to-end Astaire ingestion, and version
pinning alongside the manifest schema.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
cms-pm added a commit that referenced this pull request May 6, 2026
Aggregates three merged PRs since v0.6.1:

- #20 core(evidence): add Scenario Status Vocabulary
- #21 adapters(tooling): add HiL/SiL Predicate Router adapter
- #22 runbooks: add Scenario Ledger Runbook

Bumps the compatibility-matrix Astaire pin from v0.3.1 to v0.4.0
(d244699) so consumers reach the new scenario-predicate (#17) and
scenario-ledger (#16) collection plugins, plus the source_type
taxonomy extension (#15) and the scan refresh-modified-docs fix (#18).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant