Skip to content

CAP-PFM-LLM-006Check AI behavior with scripted models and deliberate live runs

Markdown

CAP-PFM-LLM-006

Check AI behavior with scripted models and deliberate live runs

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaPlatformModuleAI Requests, Usage and the Jazz AI TeammateRevision1

Read atservices-platform ad3f6a65

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Ordinary verification uses scripted provider responses.Accounting tests exercise production pricing calculations.Live checks require a deliberate opt-in and disclose skipped runs.
Surfaces
job
Intent sources
services-platform:docs/llm.md#The live runs

Controls

46 controls apply, from the corpus control catalogue.

TC-AI-001 TC-AI-002 TC-AI-003 TC-AI-004 TC-AI-006 TC-AI-007 TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-AZ-006 TC-CHG-001 TC-CHG-002 TC-CHG-003 TC-CHG-004 TC-CHG-005 TC-CHG-006 TC-CRY-001 TC-CRY-002 TC-CRY-003 TC-CRY-004 TC-DAT-001 TC-DAT-002 TC-DAT-003 TC-DAT-006 TC-IAM-001 TC-IAM-002 TC-IAM-004 TC-IAM-005 TC-LOG-001 TC-LOG-004 TC-LOG-005 TC-PI-001 TC-PI-005 TC-PRV-001 TC-PRV-002 TC-SEC-001 TC-SEC-002 TC-SEC-003 TC-SEC-004 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-VEN-001 TC-VEN-002 TC-VEN-003

Business Rules

7 rules, 4 to be proved before approval. A rule's product intent is derived from its origin: 0 confirmed by a product decision, the rest inheriting this capability's proposed.

IdRuleKindEnforced atProvenance
01must prove
Proposed
Integration and end-to-end test scripts enable stub mode before test collection, preventing those tiers from making real model requests.
policyservicetest
services-platform:tests/unit/llm-stub-mode-config.spec.ts#forces stub mode in the integration tier
02must prove
Proposed
The live adapter refuses construction in stub mode or without credentials instead of deferring the failure to a provider request.
validationservicetest
services-platform:modules/llm/tests/unit/runtime/anthropic-provider.spec.ts#refuses, rather than reaching a provider a test never meant to call
03
Proposed
Scripted requests use the declared model’s published prices, so ledger tests exercise the production cost calculation.
calculationservicetest
services-platform:modules/llm/tests/integration/lifecycle/run-operation.integration.spec.js#charges what that usage costs at the published rate, not the estimate
04
Proposed
The scripted provider rejects an operation with no script and any requested turn beyond the prepared sequence.
validationservicetest
services-platform:modules/llm/tests/unit/runtime/stub-provider.spec.ts#refuses to answer at all, rather than inventing a turn
05must prove
Proposed
Live smoke and evaluation commands require deliberate enablement, a credential source and a test database without stub mode; missing prerequisites produce a did-not-run result without reading or printing a key.
validationservicedocumented
06
Proposed
Evaluation compares the records returned by the generated query with expected records, and its exit status describes harness execution rather than model correctness.
policyservicedocumented
07must prove
Proposed
Each deployed environment obtains its model key from the same designated secret name within its own account, and warm functions refresh that secret after the credential cache expires.
policyservicetest
services-platform:modules/llm/tests/unit/runtime/anthropic-credentials.spec.ts#refuses that variable inside a deployed function, where the secret is the only source

Scenarios

IdGivenWhenThenProvenance
01Live model use has not been enabled.The verification run reaches its live check.The check reports that it did not run and explains why.documented

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.