Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions policy/tells.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ tells:
terminal: true
phrases: ["running now", "currently deployed", "is deployed", "is it live", "it is live", "which version is live", "what version is deployed", "health endpoint", "is * responding", "responding now", "alive now", "live right now", "port * open", "is the * up"]

# ---- runtime: current/recorded-state qualifier co-occurring with a system/component noun ----
# Issue #10: natural phrasings of the core "what is the current/recorded state?" question
# class were missed (precision>recall inventory). These are high-precision: each phrase only
# fires on a live/recorded-state qualifier tied to a system/component/connector noun, so it is
# almost never another family. Deterministic, local; no LLM in the hook loop.
- id: runtime-current-state
family: runtime
terminal: true
phrases: ["still * from", "still read", "still ingest", "still file-based", "dependent on", "is our ingest still", "does * still ", "are we dependent", "how does * ingest", "ingest * today", "read * from * today", "still * today", "alive right now", "any more", "currently * any way", "in any way"]

# Clause-scoped exclusions. When a clause contains an exclude phrase, the named family
# is suppressed FOR THAT CLAUSE only — not a global abstention.
# e.g. "tell me what we decided, but don't check whether it's deployed" → historical only.
Expand Down
43 changes: 43 additions & 0 deletions test/runtime-current-state.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
'use strict';

// Regression tests for issue #10 (router misses natural phrasings of the
// core "what is the current/recorded state?" question class).
// These reproduce the reported misses before the deterministic current-state
// tell family was added. Keep this file green — it encodes the receipt.

const test = require('node:test');
const assert = require('node:assert/strict');
const path = require('node:path');
const { loadPolicy, matchPrompt } = require('../src/matcher');

const policyPath = path.join(__dirname, '..', 'policy', 'tells.yaml');

function families(prompt) {
const policy = loadPolicy(policyPath);
return matchPrompt(prompt, policy).map((match) => match.family);
}

test('routes "is <component> still <verb>ing from <source>?" to runtime (issue #10 case 1)', () => {
const f = families('does the store still read sales from the vendor archive folder?');
assert.ok(f.includes('runtime'), `expected runtime in ${JSON.stringify(f)}`);
});

test('routes "are we dependent on <vendor> in any way?" to runtime (issue #10 case 2)', () => {
const f = families('are we dependent on the vendor in any way?');
assert.ok(f.includes('runtime'), `expected runtime in ${JSON.stringify(f)}`);
});

test('routes "how does our connector ingest <data> today?" to runtime (issue #10 case 3)', () => {
const f = families('how does our connector ingest sales data today?');
assert.ok(f.includes('runtime'), `expected runtime in ${JSON.stringify(f)}`);
});

test('routes "is our ingest still file-based or register-direct?" to runtime (issue #10 case 4)', () => {
const f = families('is our ingest still file-based or register-direct?');
assert.ok(f.includes('runtime'), `expected runtime in ${JSON.stringify(f)}`);
});

test('routes custom component noun "fleet-hub alive right now?" to runtime (issue #10 observation)', () => {
const f = families('is the fleet-hub alive right now?');
assert.ok(f.includes('runtime'), `expected runtime in ${JSON.stringify(f)}`);
});
Loading