chore: add real content that was sitting untracked

Surfaced by today's untracked-files audit. None of these are accidents —
multiple are referenced by name in CLAUDE.md and memory files but were
never added.

Categories:
- docs/PHASE_AUDIT_GUIDE.md (106 LOC) — Claude Code phase audit guidance
- ops/systemd/lakehouse-langfuse-bridge.service — Langfuse bridge unit
- package.json — top-level npm manifest
- scripts/e2e_pipeline_check.sh + production_smoke.sh — real test scripts
- reports/kimi/audit-last-week*.md — the "Two reports live" CLAUDE.md cites
- tests/multi-agent/scenarios/ — 44 staffing scenarios (cutover decision A)
- tests/multi-agent/playbooks/ — 102 playbook records
- tests/battery/, tests/agent_test/PRD.md, tests/real-world/* — real tests
- sidecar/sidecar/{lab_ui,pipeline_lab}.py — 888 LOC dev-only UIs that
  remain in service post-sidecar-drop (commit ba928b1 explicitly kept them)

Sensitivity check: scenarios use synthetic company names ("Heritage Foods",
"Cornerstone Fabrication"); audit reports describe code findings only;
no PII or secrets surfaced.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
root
2026-05-02 22:22:10 -05:00
co-authored by Claude Opus 4.7
parent 6e34ef7baf
commit 41b0a99ed2
788 changed files with 107142 additions and 0 deletions
@@ -0,0 +1,2 @@
{"after_event":"12:15","event_kind":"expansion","ok":true,"model":"gpt-oss:20b","duration_secs":12.189,"risk":"JSON syntax error in tool calls","hint":"For the next Forklift Operator expansion, escape single quotes in SQL query or use a parameterized query; validate JSON with a linter before execution."}
{"after_event":"15:45","event_kind":"misplacement","ok":true,"model":"gpt-oss:20b","duration_secs":15.773,"risk":"Warehouse Associate JSON error","hint":"Escape quotes in SQL query; close JSON braces before sending to executor."}
@@ -0,0 +1 @@
# Client emails — Riverfront Steel, 2026-04-21
@@ -0,0 +1,6 @@
# Cross-day lesson — Riverfront Steel, 2026-04-21
_Generated by `gpt-oss:20b` in 4.3s. Based on 5 events + 2 mid-day checkpoints._
**
Before any tool call, run the JSON payload through a linter and escape all single quotes or use parameterized queries to avoid syntax errors. Validate the entire JSON structure—especially braces and commas—before sending it to the executor. Pre‑fetch the required pool data for each role so that the `pool` field is populated, preventing the “pool=?” placeholder that caused the failures. This will eliminate the repeated JSON syntax failures seen in the Forklift Operator expansion and Warehouse Associate misplacement.
@@ -0,0 +1,54 @@
[
{
"date": "2026-04-21",
"client": "Riverfront Steel",
"cities": "Toledo",
"states": "OH",
"events_total": 5,
"events_ok": 1,
"checkpoint_count": 2,
"model": "gpt-oss:20b",
"cloud": false,
"lesson": "** \nBefore any baseline, recurring, or emergency fill, query the pool size and turn count; missing data causes the job to fail. Replicate the expansion logic that pulls pool and turns for all event types. If the GPT‑OSS model is unavailable, switch to a local fallback or log a warning instead of returning empty risk text. Validate that gaps are accounted for before committing the fill to avoid single‑gap failures.",
"checkpoints": [
{
"after": "12:15",
"risk": "generate returned empty text from gpt-oss:20b: {\"text\":\"\",\"model\":\"gpt-oss:20b\",",
"hint": "(T3 unavailable)"
},
{
"after": "15:45",
"risk": "generate returned empty text from gpt-oss:20b: {\"text\":\"\",\"model\":\"gpt-oss:20b\",",
"hint": "(T3 unavailable)"
}
],
"created_at": "2026-04-21T00:34:20.521Z",
"file": "2026-04-21_Riverfront_Steel_1776731660521.json"
},
{
"date": "2026-04-21",
"client": "Riverfront Steel",
"cities": "Toledo",
"states": "OH",
"events_total": 5,
"events_ok": 0,
"checkpoint_count": 2,
"model": "gpt-oss:20b",
"cloud": false,
"lesson": "** \nBefore any event, pre‑fetch the full pool roster and skill certification data for Toledo, OH; the missing pool data caused every shift to fail. Verify forklift operator certifications and tool compatibility ahead of time, as the misplacement risk highlighted a skill gap. Ensure the risk‑generation model (gpt‑oss:20b) is online or have a manual fallback; the empty response after the expansion shows a T3 unavailability that halted risk assessment. Apply these checks for baseline, recurring, expansion, emergency, and misplacement events to avoid the single‑gap failure pattern.",
"checkpoints": [
{
"after": "12:15",
"risk": "generate returned empty text from gpt-oss:20b: {\"text\":\"\",\"model\":\"gpt-oss:20b\",",
"hint": "(T3 unavailable)"
},
{
"after": "15:45",
"risk": "Forklift Operator skill gap",
"hint": "Verify forklift operator certification and tool compatibility for Toledo shift."
}
],
"created_at": "2026-04-21T00:39:54.327Z",
"file": "2026-04-21_Riverfront_Steel_1776731994327.json"
}
]
@@ -0,0 +1,60 @@
# Scenario retrospective — Riverfront Steel, 2026-04-21
Executor: `mistral:latest` Reviewer: `qwen2.5:latest` Draft: `qwen2.5:latest` Overview(T3): `gpt-oss:20b`
Prior lessons loaded into executor context: **2** (from 2026-04-21, 2026-04-21)
## Events
| At | Kind | Role / Count | Pool | Fills | Turns | Dur(s) | Cites | Gaps |
|---|---|---|---|---|---|---|---|---|
| 08:00 | baseline_fill | Warehouse Associate × 3 | - | ✗ 0 | 0 | 43.8 | 0 | 1 |
| 10:30 | recurring | Machine Operator × 2 | - | ✗ 0 | 0 | 22.7 | 0 | 1 |
| 12:15 | expansion | Forklift Operator × 5 | - | ✗ 0 | 0 | 34.8 | 0 | 1 |
| 14:00 | emergency | Loader × 4 | - | ✗ 0 | 0 | 54.0 | 0 | 1 |
| 15:45 | misplacement | Warehouse Associate × 1 | - | ✗ 0 | 0 | 39.7 | 0 | 1 |
## Final roster
| Worker | Booked | Role | City, ST | Status |
|---|---|---|---|---|
## Gap signals
### drift_or_tool
- **08:00** — invalid JSON from executor: JSON Parse error: Unterminated string | raw: {"kind":"plan",
"steps":["TOOL_CALL{\"tool\":\"sql\",\"args\":{\"query\":\"SELECT COUNT(*) FROM workers_500k WHERE role = 'Forklift Operator' AND city = 'Toledo' AND state = 'OH'\",\"rationale\":\"Check the number of forklift operators in Toledo, OH\"}}",
"TOOL_CALL{\"tool\":\"sql\",\"args\":{\"quer
- **10:30** — invalid JSON from executor: JSON Parse error: Expected ']' | raw: {"kind":"plan","steps":["TOOL_CALL{\"tool\":\"hybrid_search\",\"args\":{\"index_name\":\"workers_500k_v1\",\"sql_filter\":\"role = 'Machine Operator' AND city = 'Toledo' AND state = 'OH' AND CAST(availability AS DOUBLE) > 0.5\"}}",
"TOOL_CALL{\"tool\":\"sql\",\"args\":{\"query\":\"SELECT COUNT(*) FR
- **12:15** — invalid JSON from executor: JSON Parse error: Invalid escape character ' | raw: {"kind":"plan","steps":["TOOL_CALL sql({'query':'SELECT COUNT(*) FROM workers_500k WHERE city = \'Toledo\' AND state = \'OH\' AND role = \'Forklift Operator\'})","TOOL_RESULT sql: Verify the total number of Forklift Operators in Toledo, OH.","TOOL_CALL hybrid_search({'index_name':'workers_500k_v1','
- **14:00** — aborted — 3 consecutive drift flags
- **15:45** — invalid JSON from executor: JSON Parse error: Unterminated string | raw: {"kind":"plan", "steps":["TOOL_CALL{\"tool\":\"sql\", \"args\":{\"query\":\"SELECT COUNT(*) FROM workers_500k WHERE role = 'Warehouse Associate' AND city = 'Toledo' AND state = 'OH'\", \"rationale\":\"Check the pool size for Warehouse Associates in Toledo, OH\"}}",
"TOOL_CALL{\"tool\":\"sql\", \"arg
### write_through_audit
- _post-run_ — playbook_memory has 1164 entries (ran 5 events, expected ≥ 0 new entries from this run)
## Workers touched across the week
0 distinct workers made it through to a decision. Every one is accounted for below — no-shows flagged, rebookings noted, everyone visible.
| Worker ID | Name | Events | Outcome |
|---|---|---|---|
## Discovered patterns (meta-index)
What the system identified across semantically-similar past fills as each event ran:
- **08:00 baseline_fill** (Warehouse Associate): —
- **10:30 recurring** (Machine Operator): —
- **12:15 expansion** (Forklift Operator): —
- **14:00 emergency** (Loader): —
- **15:45 misplacement** (Warehouse Associate): —
## Narrative
- 0/5 events reached consensus.
- Final roster: 0 bookings across 0 distinct workers.
- Workers touched (booked, failed, or otherwise decided): 0.
- Playbook citations across the day: 0 (proof the feedback loop fired across events).
- Dropped events: 08:00 baseline_fill, 10:30 recurring, 12:15 expansion, 14:00 emergency, 15:45 misplacement.
@@ -0,0 +1,104 @@
[
{
"event": {
"kind": "baseline_fill",
"at": "08:00",
"role": "Warehouse Associate",
"count": 3,
"city": "Toledo",
"state": "OH",
"shift_start": "08:00 AM",
"scenario_note": "Regular Monday morning shift, 8-hour."
},
"ok": false,
"fills": [],
"turns": 0,
"duration_secs": 43.792,
"error": "invalid JSON from executor: JSON Parse error: Unterminated string | raw: {\"kind\":\"plan\",\n\"steps\":[\"TOOL_CALL{\\\"tool\\\":\\\"sql\\\",\\\"args\\\":{\\\"query\\\":\\\"SELECT COUNT(*) FROM workers_500k WHERE role = 'Forklift Operator' AND city = 'Toledo' AND state = 'OH'\\\",\\\"rationale\\\":\\\"Check the number of forklift operators in Toledo, OH\\\"}}\",\n\"TOOL_CALL{\\\"tool\\\":\\\"sql\\\",\\\"args\\\":{\\\"quer",
"gap_signals": [
"drift_or_tool: invalid JSON from executor: JSON Parse error: Unterminated string | raw: {\"kind\":\"plan\",\n\"steps\":[\"TOOL_CALL{\\\"tool\\\":\\\"sql\\\",\\\"args\\\":{\\\"query\\\":\\\"SELECT COUNT(*) FROM workers_500k WHERE role = 'Forklift Operator' AND city = 'Toledo' AND state = 'OH'\\\",\\\"rationale\\\":\\\"Check the number of forklift operators in Toledo, OH\\\"}}\",\n\"TOOL_CALL{\\\"tool\\\":\\\"sql\\\",\\\"args\\\":{\\\"quer"
]
},
{
"event": {
"kind": "recurring",
"at": "10:30",
"role": "Machine Operator",
"count": 2,
"city": "Toledo",
"state": "OH",
"shift_start": "11:00 AM",
"scenario_note": "Recurring Tuesday/Thursday slot — prior workers may still be available."
},
"ok": false,
"fills": [],
"turns": 0,
"duration_secs": 22.683,
"error": "invalid JSON from executor: JSON Parse error: Expected ']' | raw: {\"kind\":\"plan\",\"steps\":[\"TOOL_CALL{\\\"tool\\\":\\\"hybrid_search\\\",\\\"args\\\":{\\\"index_name\\\":\\\"workers_500k_v1\\\",\\\"sql_filter\\\":\\\"role = 'Machine Operator' AND city = 'Toledo' AND state = 'OH' AND CAST(availability AS DOUBLE) > 0.5\\\"}}\",\n\"TOOL_CALL{\\\"tool\\\":\\\"sql\\\",\\\"args\\\":{\\\"query\\\":\\\"SELECT COUNT(*) FR",
"gap_signals": [
"drift_or_tool: invalid JSON from executor: JSON Parse error: Expected ']' | raw: {\"kind\":\"plan\",\"steps\":[\"TOOL_CALL{\\\"tool\\\":\\\"hybrid_search\\\",\\\"args\\\":{\\\"index_name\\\":\\\"workers_500k_v1\\\",\\\"sql_filter\\\":\\\"role = 'Machine Operator' AND city = 'Toledo' AND state = 'OH' AND CAST(availability AS DOUBLE) > 0.5\\\"}}\",\n\"TOOL_CALL{\\\"tool\\\":\\\"sql\\\",\\\"args\\\":{\\\"query\\\":\\\"SELECT COUNT(*) FR"
]
},
{
"event": {
"kind": "expansion",
"at": "12:15",
"role": "Forklift Operator",
"count": 5,
"city": "Toledo",
"state": "OH",
"shift_start": "01:00 PM",
"scenario_note": "New warehouse location opening, five-worker team needed."
},
"ok": false,
"fills": [],
"turns": 0,
"duration_secs": 34.756,
"error": "invalid JSON from executor: JSON Parse error: Invalid escape character ' | raw: {\"kind\":\"plan\",\"steps\":[\"TOOL_CALL sql({'query':'SELECT COUNT(*) FROM workers_500k WHERE city = \\'Toledo\\' AND state = \\'OH\\' AND role = \\'Forklift Operator\\'})\",\"TOOL_RESULT sql: Verify the total number of Forklift Operators in Toledo, OH.\",\"TOOL_CALL hybrid_search({'index_name':'workers_500k_v1','",
"gap_signals": [
"drift_or_tool: invalid JSON from executor: JSON Parse error: Invalid escape character ' | raw: {\"kind\":\"plan\",\"steps\":[\"TOOL_CALL sql({'query':'SELECT COUNT(*) FROM workers_500k WHERE city = \\'Toledo\\' AND state = \\'OH\\' AND role = \\'Forklift Operator\\'})\",\"TOOL_RESULT sql: Verify the total number of Forklift Operators in Toledo, OH.\",\"TOOL_CALL hybrid_search({'index_name':'workers_500k_v1','"
]
},
{
"event": {
"kind": "emergency",
"at": "14:00",
"role": "Loader",
"count": 4,
"city": "Toledo",
"state": "OH",
"shift_start": "04:00 PM same day",
"deadline": "16:00",
"scenario_note": "Walkoff incident — replacement crew needed by 16:00 sharp."
},
"ok": false,
"fills": [],
"turns": 0,
"duration_secs": 53.976,
"error": "aborted — 3 consecutive drift flags",
"gap_signals": [
"drift_or_tool: aborted — 3 consecutive drift flags"
]
},
{
"event": {
"kind": "misplacement",
"at": "15:45",
"role": "Warehouse Associate",
"count": 1,
"city": "Toledo",
"state": "OH",
"shift_start": "remainder of 08:00 shift",
"scenario_note": "One worker from the 08:00 fill didn't show; rebuild the gap.",
"replaces_event": "08:00"
},
"ok": false,
"fills": [],
"turns": 0,
"duration_secs": 39.717,
"error": "invalid JSON from executor: JSON Parse error: Unterminated string | raw: {\"kind\":\"plan\", \"steps\":[\"TOOL_CALL{\\\"tool\\\":\\\"sql\\\", \\\"args\\\":{\\\"query\\\":\\\"SELECT COUNT(*) FROM workers_500k WHERE role = 'Warehouse Associate' AND city = 'Toledo' AND state = 'OH'\\\", \\\"rationale\\\":\\\"Check the pool size for Warehouse Associates in Toledo, OH\\\"}}\",\n\"TOOL_CALL{\\\"tool\\\":\\\"sql\\\", \\\"arg",
"gap_signals": [
"drift_or_tool: invalid JSON from executor: JSON Parse error: Unterminated string | raw: {\"kind\":\"plan\", \"steps\":[\"TOOL_CALL{\\\"tool\\\":\\\"sql\\\", \\\"args\\\":{\\\"query\\\":\\\"SELECT COUNT(*) FROM workers_500k WHERE role = 'Warehouse Associate' AND city = 'Toledo' AND state = 'OH'\\\", \\\"rationale\\\":\\\"Check the pool size for Warehouse Associates in Toledo, OH\\\"}}\",\n\"TOOL_CALL{\\\"tool\\\":\\\"sql\\\", \\\"arg"
]
}
]
@@ -0,0 +1 @@
# SMS drafts — Riverfront Steel, 2026-04-21