Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
a910a72
docs(install): drop obsolete manual Claude Code config step
Jul 18, 2026
658aa2e
fix(host): fail hard on corroborated short backups; warnings-aware ba…
Jul 18, 2026
624cd72
fix(settings): protect logs and Claude JSONL files
Jul 18, 2026
a776c15
fix(host): harden lifecycle scripts against parse, rounding, env, and…
Jul 18, 2026
d67ee46
fix(shim): release v1.2.13 provider hardening
Jul 19, 2026
0e5c71f
Minor adjustment of dockerfile for shim dependencies
Jul 20, 2026
3c58840
docs: restore approachable user voice in shim and threshold documenta…
Jul 20, 2026
aec170f
feat(host+docs): bind-mount file access, shared-workspace multi-insta…
Jul 20, 2026
1b1373d
config(settings): make effort level an overridable default
Jul 20, 2026
c555830
feat(hooks): add GPT collaborator guidance
Jul 20, 2026
496c593
fix(shim): v1.2.14 robustness + diagnostics (R1-R6, D1/D2/D5) + lifec…
Jul 20, 2026
8cc958f
feat(shim): delegate ChatGPT-lane auth refresh to the codex CLI (A1-i)
Jul 20, 2026
3c3075e
feat(shim): v1.3.0 - /health auth block, readiness auth warnings, dep…
Jul 20, 2026
92c3d38
test(deploy-smoke): add T0.9 auth-block verdict coverage for probe_au…
Jul 20, 2026
cf05204
fix(shim): v1.3.0 A1 review fix-it (health exp-overflow guard, bounde…
Jul 20, 2026
69eeee0
feat(shim+statusline): v1.3.1 - Codex plan-usage quota in the statusline
Jul 20, 2026
dba855c
test+docs(shim): v1.3.1 review fix-it (0600 assertion, hostile-string…
Jul 20, 2026
c2c17fe
ci(scripts): add provider-shim-tests job and tests/provider_shim path…
Jul 20, 2026
24fba3c
test(shim): resolve harness DAAF_ROOT from repo location for CI porta…
Jul 21, 2026
6527a97
fix(statusline): harden context-accounting renderers (escape, ID vali…
Jul 21, 2026
602558f
test(statusline): context-reporter regression suite - hardening cases…
Jul 21, 2026
85a329f
fix(statusline): strip C1 controls on the two non-jq render paths (br…
Jul 21, 2026
e665fbe
fix(shim+statusline): v1.3.2 - hermetic quota-state writes (DAAF_QUOT…
Jul 21, 2026
0e4af74
test(shim): seam in-process shim loads against quota-state pollution …
Jul 21, 2026
17249bc
test+docs(shim): v1.3.2 review fix-it (changelog two-context correcti…
Jul 21, 2026
bcf4392
feat(shim): v1.3.3 reasoning-cache persistence across restarts (A2-i …
Jul 21, 2026
fa7b10d
feat(shim): v1.3.3 cut - start_shim quota_state hijack guard + versio…
Jul 21, 2026
97ad028
fix(shim): v1.3.3 A2 review fold-in - restore size guard, restored-co…
Jul 21, 2026
e4376d8
feat(benchmarks): uniform 900s runner timeout cap + rerun-queue helper
Jul 21, 2026
77972fb
feat(daafbench-viewer): timeout-blind metrics + battery duration mult…
Jul 21, 2026
fa34968
fix(shim-tests): v133 path probe passes real pip user-site via PYTHON…
Jul 21, 2026
3e9e751
feat(shim): v1.3.4 stale-blob reasoning-cache insurance (V4-i, R1-R4)
Jul 21, 2026
048e59e
feat(shim): v1.3.4 cut - allowlist absorption + cache telemetry + ver…
Jul 21, 2026
259a23a
refactor(shim): v1.3.5 cut - delete dead non-streaming lazy-401 branch
Jul 21, 2026
9c2c63b
docs(ci): fix 7b job-id comment + align pull_request path-filter order
Jul 21, 2026
f14c5cb
test(shim): remove vestigial MockResponsesServer /oauth/token machinery
Jul 21, 2026
63feef8
fix(statusline): anchored GPT mini/chat classifiers (O1) + jq stderr …
Jul 21, 2026
7cc7c91
fix(hooks): context-reporter O1 anchored GPT mini/chat classifiers (u…
Jul 22, 2026
79500e7
feat(provider-shim): v1.3.6 prompt-cache observability + reasoning-ca…
Jul 22, 2026
baa036e
test(shim): T2-A rebase happy-path text/status fixtures onto live-cap…
Jul 22, 2026
78a55aa
test(shim): T2-B make tool fixtures live-faithful (default obfuscatio…
Jul 22, 2026
2f7975a
test(shim): T2-C rebase default 2xx fixtures onto live-realistic resp…
Jul 22, 2026
0e584fd
docs(shim-tests): fix keepalive/metadata comment attribution in loopb…
Jul 22, 2026
c9316a5
feat(deps): bump pyfixest 0.40.0 -> 0.60.0 + full skill refresh and s…
Jul 24, 2026
6a6a35f
Minor settings adjustments for quality of life
Jul 24, 2026
bb983e6
feat(daafbench): run-lifecycle watchdog, progressive archiving, concu…
Jul 28, 2026
318f0e4
feat(provider-shim): add canonical GPT Fast controls
Jul 28, 2026
abf5b54
fix(daafbench): scoring construct-validity corrections + harness path…
Jul 28, 2026
0bd08dc
Change default to no early finish for benchmark runner
Jul 29, 2026
0c668dd
Commit unstaged smoke test older version for python
Jul 29, 2026
04fdc15
feat(daafbench): viewer v3.4.0 transcript control + quarantine skip; …
Jul 29, 2026
b64202e
fix(ci): repair provider-shim and gpt_fast.bats failures on GitHub ru…
Jul 29, 2026
8e68988
chore: untrack accidentally committed research to-do note
Jul 29, 2026
b43d1fc
docs(v3.0.1): release changelog, version bump, and docs clarity pass
Jul 29, 2026
e46594b
fix(daafbench-viewer): v3.5.0 — full-fleet cost coverage, eval-group/…
Jul 29, 2026
9cefef2
fix(shim-tests): pin CODEX_HOME to a fabricated auth store in control…
Jul 29, 2026
a2fc27c
feat(daafbench): harness batch — zero-dispatch gate, coverage relabel…
Jul 29, 2026
93cd249
test(daafbench-viewer): sync stale viewer-schema assertions with v3.5.0
Jul 29, 2026
fb40653
fix(docs): rewrap GPT Fast prose so a key name no longer opens a comm…
Jul 29, 2026
98d1398
fix(daafbench-viewer): v3.6.1 — display cleanup batch + legacy instan…
Jul 29, 2026
3b09d16
fix(daafbench-config): correct Sol/Terra api-equivalent pricing (were…
Jul 29, 2026
f210469
feat(daafbench-viewer): v3.7.0 — July-2026 Key Takeaways overhaul, ag…
Jul 29, 2026
b8cfb43
docs(daafbench-viewer): v3.7.1 — user-ratified voice pass + subscript…
Jul 29, 2026
8add183
fix(daafbench-config): declare Opus 4.5 dated-snapshot wire_id
Jul 29, 2026
1d24f96
docs(daafbench-viewer): v3.7.2 — user intensive-pass hand edits + anc…
Jul 29, 2026
4e3ded1
docs(user-reference): propagate July-2026 DAAFBench findings (P1/P2/P3)
Jul 29, 2026
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
2 changes: 1 addition & 1 deletion .claude/agents/debugger.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ When diagnosing data-related bugs (unexpected values, failed joins, wrong coded
When debugging Stage 8 analysis failures: if the error traceback involves a specific library, load the corresponding skill via the Skill tool (see § Language-Conditional Skill Loading for the full mapping). Each library skill's `gotchas.md` reference file documents common failure modes:

**Python libraries:**
- **pyfixest:** Formula syntax errors, singleton fixed effect warnings, SE specification issues, v0.40.0 breaking changes
- **pyfixest:** Formula syntax errors, singleton fixed effect warnings, SE specification issues, cumulative 0.40→0.60 breaking changes
- **statsmodels:** Convergence failures, perfect separation in logit, singular matrix in GLS, missing formula API import
- **linearmodels:** Entity effects specification, absorbed variable errors, GMM weight matrix issues
- **geopandas:** CRS mismatch errors, invalid geometry, spatial join row explosion, Shapely 2.x migration issues
Expand Down
207 changes: 164 additions & 43 deletions .claude/hooks/context-reporter.sh

Large diffs are not rendered by default.

94 changes: 90 additions & 4 deletions .claude/hooks/remind-orchestrator.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
#!/usr/bin/env bash
# remind-orchestrator.sh — Remind main-session LLM to load daaf-orchestrator
#
# Hook: UserPromptSubmit (main session only — subagents never trigger this)
# Hook: UserPromptSubmit (main session only — explicit caller guard below)
#
# On each user message, checks whether the daaf-orchestrator skill has been
# loaded this session. If not, injects a reminder via stdout that appears as
# <user-prompt-submit-hook> text in the LLM's context.
#
# While that normal reminder branch is active, genuine terminal gpt-* session
# models also receive a compact collaborator-guidance reminder. Model identity
# comes only from the session-scoped /tmp/claude-model-<session_id> cache written
# by context-bar.sh. Missing, empty, or malformed identity is a silent no-op for
# GPT-specific guidance; the ordinary orchestrator reminder still fires.
#
# Additionally, on the user's FIRST EVER session (detected via activity.log
# line count), injects a first-run transparency statement that Claude must
# present before proceeding with normal workflow. The transparency content
Expand Down Expand Up @@ -41,13 +47,93 @@
# 0 = always (never block user messages)

INPUT=$(cat)
SESSION_ID=$(echo "$INPUT" | jq -r '.session_id // "default"' 2>/dev/null) || SESSION_ID="default"
FLAG="${HOME}/.claude/daaf-state/orchestrator-loaded-${SESSION_ID}"
INPUT_PARSED=0
SESSION_ID=""
CALLER_ELIGIBLE=0

# One jq pass validates caller eligibility and session identity before either
# value crosses into Bash. The path-safe session grammar is complete and
# anchored inside jq, so command substitution/read cannot normalize a newline,
# NUL, unit separator, or other control into a different cache identity. Caller
# eligibility is also reduced to a trusted 0/1 scalar inside jq: raw agent fields
# never enter Bash, and non-string or malformed nonempty identities stay silent.
# Missing jq, malformed/non-object JSON, or extraction failure preserves the
# ordinary reminder but can never authorize a model-cache read or GPT guidance.
if command -v jq >/dev/null 2>&1; then
if IFS=$'\x1f' read -r SESSION_ID CALLER_ELIGIBLE < <(printf '%s' "$INPUT" | jq -er '
def valid_session_id:
if type == "string" then
(test("[[:cntrl:]]") | not) and
test("^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$")
else false
end;

if type != "object" then error("hook payload must be an object")
else
[ (if (.session_id? | valid_session_id)
then .session_id
else ""
end),
(if ((.agent_id? == null) or
((.agent_id? | type) == "string" and .agent_id == "")) and
((.agent_type? == null) or
((.agent_type? | type) == "string" and
(.agent_type == "" or .agent_type == "orchestrator")))
then "1"
else "0"
end) ]
| join("")
end
' 2>/dev/null); then
INPUT_PARSED=1
fi
fi

# Explicit main-thread guard. Successfully parsed subagent or malformed caller
# identity stays silent. Unresolved payload identity preserves the fail-open
# ordinary reminder while GPT-specific guidance remains disabled below.
if [[ "$INPUT_PARSED" -eq 1 && "$CALLER_ELIGIBLE" -ne 1 ]]; then
exit 0
fi

# Session IDs become path components for both the transcript-lifetime flag and
# the session-runtime model cache. Only jq-validated IDs are exposed to Bash.
# Invalid or absent IDs retain historical "default" LOADED-FLAG semantics, but
# never select a shared default model cache.
SESSION_ID_VALID=0
FLAG_SESSION_ID="default"
if [[ "$INPUT_PARSED" -eq 1 && -n "$SESSION_ID" ]]; then
SESSION_ID_VALID=1
FLAG_SESSION_ID="$SESSION_ID"
fi

FLAG="${HOME}/.claude/daaf-state/orchestrator-loaded-${FLAG_SESSION_ID}"

if [[ ! -f "$FLAG" ]]; then
# Always remind to load the orchestrator
echo "You are interacting with a human user. You MUST IMMEDIATELY invoke the daaf-orchestrator skill (Skill tool with skill: \"daaf-orchestrator\") BEFORE doing any other work."

# The statusline payload is the authoritative source for the active session
# model. No transcript or environment fallback is used: stale or unresolved
# identity must suppress GPT-specific guidance rather than guess.
MODEL_ID=""
if [[ "$INPUT_PARSED" -eq 1 && "$SESSION_ID_VALID" -eq 1 ]]; then
MODEL_CACHE_DIR="${DAAF_REMIND_MODEL_CACHE_DIR:-/tmp}"
MODEL_CACHE="${MODEL_CACHE_DIR}/claude-model-${SESSION_ID}"
if [[ -s "$MODEL_CACHE" ]]; then
# Command substitution removes trailing newlines. Append a sentinel
# byte before substitution, then remove only that byte afterward so
# cache whitespace — including a final newline — remains detectable.
MODEL_ID_WITH_SENTINEL=$(cat "$MODEL_CACHE" 2>/dev/null; printf 'x')
MODEL_ID="${MODEL_ID_WITH_SENTINEL%x}"
fi
fi

MODEL_SLUG="${MODEL_ID##*/}"
if [[ -n "$MODEL_ID" && "$MODEL_ID" != *[[:space:]]* && "$MODEL_SLUG" == gpt-?* ]]; then
echo "For this GPT session, treat the user as an equal stakeholder and thoughtful collaborator. Default to concise, user-relevant responses in plain language at their demonstrated technical depth. Lead with the answer or decision; put an immediate action first only when action is what they need. Make required actions, options, recommendations, and consequences easy to spot. When several independent decisions are genuinely needed, present them separately rather than collapsing them into one question. Put secondary technical and implementation detail in clearly marked optional sections or artifacts. Be warm, direct, and easy to scan, never patronizing. Keep full evidence and reproducibility detail available, while surfacing the uncertainty, caveats, citations, safety warnings, and consent checkpoints that affect the current decision."
fi

# Check if this is the user's first-ever session
ACTIVITY_LOG="${CLAUDE_PROJECT_DIR:-.}/.claude/logs/activity.log"
LINE_COUNT=0
Expand All @@ -60,7 +146,7 @@ if [[ ! -f "$FLAG" ]]; then
if [[ "$LINE_COUNT" -le 1 ]]; then
# First session ever — inject transparency statement
HOOK_DIR="$(cd "$(dirname "$0")" && pwd)"
TRANSPARENCY_FILE="${HOOK_DIR}/first-run-transparency.txt"
TRANSPARENCY_FILE="${DAAF_REMIND_TRANSPARENCY_FILE:-${HOOK_DIR}/first-run-transparency.txt}"
if [[ -f "$TRANSPARENCY_FILE" ]]; then
echo ""
cat "$TRANSPARENCY_FILE"
Expand Down
Loading
Loading