Commit History
24 days ago
-
[NOTICKET] anomaly: name the anomalous rows + a flag-rate quality verdict (D-3)
analyze_anomaly's records carried only the scored numeric columns plus a score, so "which units look unusual?" could never name a unit; and it was the only ML tool with no quality block, so an 86%-flagged run reached the assembler as silence. - Add optional label_columns: identifier columns carried into each record (identifiers first), never fed to the model. Planner guidance to pass the id column follows on Rifqi's side (decided shape (a), tool-side). - Add the reserved quality block: metric anomaly_rate, weak only ABOVE a 0.5 ceiling. A20's flag-rate finding was re-measured, not re-assumed -- clean noise flags 0.14-0.22 (mean 0.17, p95 0.22), a genuine 30%-outlier frame 0.30, the demo's degenerate run 0.86 -- so 0.5 clears the noise floor and a real finding yet still catches "most rows flagged"; the note states the rate plainly either way. Logic in _flag_rate_quality() so both branches are unit-testable (the fit can't be pushed past 0.5 via contamination). PR-0 from…ae50194 -
[NOTICKET] data_quality: actually count the duplicate rows it advertises (D-1)
analyze_data_quality's use_when lists "duplikat"/duplicates, but the file had no duplicated()/drop_duplicates() anywhere -- asked "ada duplikat?" the user got a confident per-column profile with no answer, and the assembler would infer one from distinct_rate. Add duplicate_rows {count, rate} over the profiled columns (df[cols].duplicated(), keep="first" = the redundant copies; a column subset is a candidate-key check) and issues.duplicate_row_count. Always present (0 when none, never None/absent), so the advertised claim is now backed by a real count. PR-0 from docs/plans/PR0_PR1_TOOL_FIXES.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>7078816
27 days ago
-
[NOTICKET] anomaly: bound the returned sample at source, not just the assembler
analyze_anomaly's `anomalies` list could carry up to 200 records (all scored columns + score each). A30 capped the same bloat at the assembler (what reaches the LLM), but the tool output is ALSO persisted to results_snapshot and Langfuse-traced, so the 50k blob still landed there. Cap _MAX_ANOMALY_ROWS 200 -> 50 (a bounded top-by-score SAMPLE, not the full set) and add anomalies_total / anomalies_shown so "N of M" stays honest. The exact count (n_anomalies), rate, and chart are unchanged. Defense-in-depth with A30's assembler cap, not a duplicate. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>a2089ed
28 days ago
-
[NOTICKET] fix(router): route data-condition questions to analysis, not inventory (A23 Bug 4)
Rifqi Hafizuddin +1: Claude Opus 5"Data PA-nya bersih nggak? Ada kolom yang kosong?" routed to `check` at 0.96 confidence, so the slow path never ran and analyze_data_quality was never called. The reply was a 36-row schema table whose "Boleh kosong" column is the catalog's declared `nullable` SCHEMA FLAG -- confident, well formatted, and not an answer to the question the user asked about the actual rows. The prompt defined `check` as "what columns are in this table?", and "ada kolom yang kosong?" is lexically a columns question. The only boundary offered was "what do I have" -> check versus "analyze/compute/trend/correlate" -> structured_flow, and a data-CONDITION question is neither phrasing. Recast the boundary as EXISTENCE vs CONDITION: `check` answers what is there, from metadata alone; the moment the answer depends on the values in the rows it is `structured_flow`, because only computing over the data can answer it. Stated explicitly that naming a column does not make it `check`, and that a `nullable` flag says …e815376 -
[NOTICKET] fix(tools): accept `avg` wherever `mean` works (A23 Bug 2)
Rifqi Hafizuddin +1: Claude Opus 5The planner and the tools disagreed about what "average" is called, and the planner lost. It fills in a QueryIR and a tool call from ONE prompt: QueryIR AggFn count, count_distinct, sum, avg, min, max tools SUPPORTED_AGGS sum, mean, count, min, max, median (+ nunique) planner.md teaches `avg` three times because the IR requires it -- line 331 even says "utilization, scores -> avg", which is exactly the PA case. So the planner wrote agg="avg" into analyze_forecast and the tool raised UnsupportedAggregationError. The dry-run lost its forecast turn that way. The planner was not wrong; it obeyed its own prompt. Blast radius was five tools, not one. analyze_trend, analyze_forecast, analyze_ab_test, analyze_pareto and analyze_segmentation all take an `agg` and all five rejected `avg` -- only forecast happened to be exercised. analyze_aggregate failed differently and more quietly: validator check 8c rejected the plan, burning a retry before execution. Aliasing rath…0f0af11 -
[NOTICKET] fix(tools): analyze_ab_test quality — KeyError on the too-few-rows path
The quality block (added in 2082eba1) read test['p_value'] directly, but _welch_test's too-few-rows branch returns no 'p_value' key -> KeyError, so analyze_ab_test crashed on a valid 'too few rows for a t-test' case (became an error envelope via the never-throw seam instead of a graceful result). Fix: test.get('p_value'). The too-few case now returns significant=None + quality {value: None, weak: True}. Caught by a local ab_test test. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>8400a9e -
[NOTICKET] tools: quality blocks for forecast + ab_test, forecast backtest, CK7 fix
Rifqi Hafizuddin +1: Claude Opus 5Extends the reserved `quality` convention to the tools where it means something, and fixes a CK7 message that was wrong for half its inputs. analyze_forecast -- the substantial one. It reported NO accuracy at all, so "how accurate is it?" had no answer. Now backtests: hold out the last h periods (bounded by a quarter of the series and by the fitting floor), refit, and score with MASE -- mean absolute error over the naive "next = last" error on the training span. MASE is scale-free (Hyndman & Koehler 2006) and, unlike MAPE, neither explodes near zero nor punishes over-prediction asymmetrically. Both fits run in ONE run_fit call, so a forecast still costs one thread hop and one timeout. A series too short to hold anything out, or one that never moves, ships UNVALIDATED -- also weak, with the two causes reported as distinct reasons rather than one wrong one. analyze_ab_test -- free and exact: the statistical verdict IS the quality verdict. A gap the test cannot separate from noise is we…2082eba
29 days ago
-
[NOTICKET] feat(tools): analyze_ab_test — rename analyze_comparison + Welch t-test (A11)
Renames analyze_comparison/comparison.py -> analyze_ab_test/ab_test.py. Keeps the two-group aggregate gap; adds a Welch two-sample t-test (t, p-value, significant at alpha) on the raw values and a bar chart of the two group means with 95% error bars, via the reserved 'charts' key. Registered DEFERRED via spec_from_model. Old name removed — 5 cross-ref DESCRIPTIONs + contracts.py comment repointed. DEV_PLAN §0.9 A11 -> done. Heads-up (Rifqi): analyze_comparison renamed to analyze_ab_test. Local tool tests under tests/unit/tools (gitignored) referencing it break on pull — rename to analyze_ab_test. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>901b03f -
[NOTICKET] feat(tools): analyze_importance + analyze_cluster (unregistered) + CK7
Rifqi Hafizuddin +1: Claude Opus 5A8 and A10. Both files are INERT on purpose: not in _DISPATCH, not in either registry list. registry.py and invoker.py are the two files every tool addition touches, so they stay single-owner until Sofhia makes the call -- the DEFERRED mechanism means an unregistered tool costs nothing. analyze_importance -- rank what explains a target. Standardised coefficients, NOT permutation importance. For a linear model the coefficient IS the importance and comes free with the fit; permutation re-scores once per feature, which is the E4 latency tall pole, and buys nothing here. Ridge for a numeric target, Logistic for a categorical one, auto-detected. Leakage-safe: the scaler is fitted on the TRAIN split only, so no test statistic reaches the fit -- the thing R-3 and the survey literature both single out. analyze_cluster -- discover groups nobody named yet. KMeans with k chosen by silhouette over 2..8, every candidate score returned. Scatter plots two REAL columns rather than PC…9a29ca3 -
[NOTICKET] feat(tools): analyze_segmentation — activate/rename analyze_segment + chart (A13)
Activates + renames analyze_segment -> analyze_segmentation (file segmentation.py unchanged). Keeps edges/quantile binning; adds a per-segment bar chart (count, or the aggregate when value_column given) via the reserved 'charts' key. Registered DEFERRED via spec_from_model. DEV_PLAN §0.9 A13 -> done. Heads-up (Rifqi): analyze_segment renamed to analyze_segmentation. Local tool tests under tests/unit/tools (gitignored) referencing it break on pull — rename to analyze_segmentation. Also a stale '# analyze_segment' comment remains in src/agents/planner/validator.py:152 (your lane) — repoint when convenient. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>8e0301e -
[NOTICKET] feat(tools): analyze_data_quality — rename analyze_profile, activate + chart (A14)
Renames analyze_profile/quality.py -> analyze_data_quality/data_quality.py. Keeps the per-column profile; adds an issues summary (constant + high-null columns) and a missing-rate bar chart via the reserved 'charts' key. Registered DEFERRED via spec_from_model. Old name removed — no eval/agent refs; descriptive cross-ref repointed. DEV_PLAN §0.9 A14 -> done. Heads-up (Rifqi): analyze_profile is gone. Local tool tests under tests/unit/tools (gitignored) that reference it will break on pull — rename to analyze_data_quality. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>6be9611 -
[NOTICKET] feat(tools): analyze_pareto — rename analyze_contribution, Pareto 80/20 (A12)
Renames analyze_contribution/decomposition.py -> analyze_pareto/pareto.py. Keeps the share + cumulative compute; reframes to Pareto 80/20: adds categories_for_80pct and ships the pareto_chart (bars + cumulative-% line) via the reserved 'charts' key. Registered DEFERRED via spec_from_model. Old name fully removed — no eval/agent refs; 3 cross-ref DESCRIPTIONs (aggregation/comparison/segmentation) repointed. DEV_PLAN §0.9 A12 -> done. Heads-up (Rifqi): analyze_contribution is gone. Local tool tests under tests/unit/tools (gitignored) that reference it will break on pull — rename those refs to analyze_pareto. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>cb6a92e -
[NOTICKET] feat(tools): analyze_anomaly (Isolation Forest) — second ML tool, DEFERRED
analyze_anomaly: scores rows across numeric column_ids with a scikit-learn IsolationForest (fit offloaded via run_fit, fixed random_state), flags outliers, returns summary + flagged rows + a scatter with anomaly points highlighted (reserved 'charts' key). output_kind 'stats' (dict), mirroring analyze_forecast's shape. Registered DEFERRED via spec_from_model. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>9f3267d
30 days ago
-
[NOTICKET] feat(tools): analyze_forecast (ETS) — first ML tool, DEFERRED
analyze_forecast: statsmodels ETS (Holt-Winters, additive trend, no AutoML), reusing analyze_trend's date parsing + resampling. Auto-chart (actual-vs-forecast line) via the reserved 'charts' key; deterministic output. Registered in _DISPATCH + registry (spec derived from ForecastInput via spec_builder) as DEFERRED — activation (ACTIVE + examples.py few-shot) follows once A0 scoping locks P1. Wires the ML executor for the first time: the fit is offloaded via run_fit, and the invoker now awaits coroutine compute fns (inspect.isawaitable — opt-in; sync tools unchanged). This resolves the conventions §4/§6 contradiction toward 'sync unless it fits a model'; doc §6 wording needs a follow-up tweak. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>dae102f -
feat(tools): shared chart kit + auto-chart builders
Extract the house-style kit (colorway, layout preset, JSON-safe coercion, axis chrome) into analytics/charts.py as the single source of truth; render_chart now imports it (behaviour unchanged). Add dataeyond.chart.v1 builders: box, pareto, cluster_scatter, anomaly-highlight scatter. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>535f173
-
/fix planner count and report (#19)
- /fix planner count question (11de970ff65be9b4f81f773cfb355d3dc57358d7) - [noticket] fix report bug where some answered analysis isnt included in report summary answers (8dec1825cf803ad28f4ff0400b9c373250a7d90a) - [NOTICKET] fix: split report floor from report body; scope analysis reads by user_id (fd4865b20dfc46782706be9aab318f909b9903c3) - [NOTICKET] docs: sync report floor/body + security posture; add review remediation tracker (fc5200c994441ec505ea7a82469da577afe170a5) - [NOTICKET] test: planner eval harness (rule-compliance, --selfcheck/--rescore) (4292522aa3fa3a7af8f933307334cb7e5eb0b377) - [NOTICKET] eval: repair readiness harness; commit intent/help/readiness baselines (08a0a4ad5eacc6c90df22fab5be69f2d33579f29) - [NOTICKET] fix: compiler parity — F-17 fabricated column, F-18 LIKE nulls, F-25 empty in/not_in (8f736f90f1958960a83847d332b45b13fa346168) - [NOTICKET] feat: bound catalog render + blob read; scope charts/traceability; mark degraded seams (0cb7d53cb6f7f7e7b687dd6d9c27…f282b15
-
fix/ check and new chart tool (#16)
- check: table-level column drill + drop misleading "name a table" hint (ef0c7b1c5aa49a244b02f1b5eea15cc77dcf2bcb) - [KM-715] charts: render_chart tool + message_charts store + GET /api/v1/charts + planner viz slice (87cfcf884d923ee4bcd722e0e4ef4d90d7eaedca) - [KM-715] checkpoint: S1a deterministic quality checkpoint between runner and assembler (f3c8de34dc19a573031b67fd4f48dcfbadcdfed8) - [KM-715] docs: sync REPO_STATUS/DEV_PLAN + land SPINE_V2_PLAN (W1/W2 done) (434eacbf2ac8324188ebe5e32775dbc9d2a3f49a) - planner: value-handoff (${tN.col} → list) for tabular lookup/anti-join (54070ac1407b751000e49dfe7f102a2be5ab1ff8) - [KM-715] charts: GET /charts by message_id only + tri-state status marker (b8d15761addf4d499c9631df64e7693aa1d61fa2) - [KM-715] report: embed charts as plotly EDA fences; render_chart counts toward the floor (89db8be6b6f11e86ad0776d2ee07f2306e3b6079) - [KM-715] docs: contract + status deltas for the charts lead-review round (96347ee7c55a4eb39a906409ec214463e25c5e35) - …5a60e93
-
/fix help and tools analyze (#14)
- [KM-711] Retire /report slash command; report is Generate-button only (f7f7b172da0dc16adac0a7555f6d34a704cc2050) - fix(analyze_trend): handle value_column == date_column (count events per period) (55e3327f7b2e21a954b317e143f46bcea8b5ada7) - [KM-711] Docs: drop /report from list_skills catalog examples (0772863b296e2ed3e2d559df05e98540764e58b0) - fix(planner): reject inlined table-ref as analyze_* data (Pattern A) (776fae3c7c6e3d3a07c22bef10898f6b1c33c701) - fix(analyze_aggregate): reject non-string group_by (CASE/binning) keys (b40fa76e2fa68572dad0d8532e07076207095d6b) - fix(planner): reply-language for infeasible_reason + answer-only-asked rule (4d89d7d93938e41892979cd20e5ccf0c97441dac) Co-authored-by: Sofhia Az-Zahra <sofhiaazzhr@users.noreply.huggingface.co>17e31c6
-
/fix planner and report (#13)
- [KM-644] planner: infeasible plan outcome + entity-ranking few-shots (089b69d9b6111e813307c6afbd3e7613bb823f9d) - [KM-644] harden query path: grouped-select rule, int-date trends, sample decode, trace guard (74ad5261736bda0bd72bccdb41565ea67313993a) - [KM-703] add analyze_merge tool: two-table combine (analytics.combine) (8abf635532366d670367557a3ffa03d42371d831) - [KM-567] planner support for analyze_merge: data_right guard + two-retrieve merge few-shot (a029a843247e6ea4d3c79a4e2c1b7571ba4cda69) - [KM-644] report v2: BQ answers, unresolved/excluded sections, evidence tables + curation/readiness endpoints (4ceb058d85c5a2a289443b9411d2b345027fa226) - [NOTICKET] refactor: mint message_id as UUID to mirror analyses_messages id shape (4253733b6b8db0449a82442a915c732ddd55f528) - [KM-644] report: drop Notes/Unresolved/Method sections from rendered markdown (compact report) (eef6de811a139402c79fd74ad4adfc00cf7aff01) - /edit md file (8198cc188ff05a2798ae2056b90b6e56e1bea87b) Co-authored-by…49b0848
-
fix/ check (#12)
- [NOTICKET] check: scope to analysis catalog + list database tables (db2a10f61e1f6ff9579deaaeafed8fdf0cdf5bb7) - feat(planner/help): graceful degradation for gated analytics capabilities (efc0af7c05308acb564bffdd7d8ab8abd2dd2e81) - Scope structured_flow + report to analysis catalog; drop dead data_sources binding (c333ec84a96b171484af7a87bdf07fd1fb0e9c69) - update md file (c5e2e1b1adcba46b56eaf6bbb85d9b8bb0a0d277) - [NOTICKET] check: read documents from analysis-scope catalog (6977394de88d7944dd2504beeed3e00eafe7857a) Co-authored-by: Sofhia Az-Zahra <sofhiaazzhr@users.noreply.huggingface.co>b9dfc76
-
feat/Knowledge & Data Tools (#3)
- [KM-641] refactor(tools): trim analytics registry to 4 active tools (66e2e4df66f1abf7eaa7e442d9900d428696ece4) - [NOTICKET] docs: add checkpoint plan for 2026-06-17 sync (8c1bb63ebdee02f9db0da9fc2b2269823b0a7688) - [KM-642] refactor(tools): rename data-access tools to data/knowledge naming (c38c0c29d3e6b245f67d03f2c35e451900e1abdb) - [KM-643] feat(tools): merge data sources into data_check + add knowledge_check (4bd5f1efdc560a64092cc8df672a7990fa949b59) - [NOTICKET] docs: record KM-642/643 in checkpoint plan + PROGRESS (4c57588b90fe0cac8d0d4d22cfe5701fc9eb52dd) - [NOTICKET] fix(chat): scope response cache by user_id + drop TTL to 1h (R5) (b701e95d300c7d2480a3608b2d4da6dfe102b19a) - [NOTICKET] feat(slow-path): persist AnalysisRecord via PostgresAnalysisStore (09f845188226dd01633cf74525caa569e4a7d37a) - [NOTICKET] Adopt verb-first skill naming (2d6406def7ed45edd1226e96645ba2a5cdbfa3d0) - [NOTICKET] docs: sync checkpoint plan — verb-first tool names + report-as-API (3b399f84d73b0d98bd99…0721bb4
-
feat/Planner Agent (#2)
- [KM-567][AI] Planner agent: contracts, schemas, inputs, registry (be96601ad46c00e8e789768dd6e89c2db827bde4) - [KM-567][AI] Planner agent: prompt + few-shot examples (83ba6b1743370145454d9315224eeb7b2d12ac18) - [KM-567][AI] Planner agent: validator + service (72306d0ce92c76d60117a20c701c7f8185bcfeef) - [KM-567] docs: record Phase 3 Planner agent in PROGRESS.md (ba2fa8892392028c8d13646c09d1155bbf34e703) - [KM-567][AI] Planner agent: fix PII leak + placeholder/retry robustness (6b3637dda097f16cd98d4b9ad6094fdaed6d1346) - [KM-624] Implement Compute Functions Tools (78c598c22d2f2a14229a83c3f43fa98c5d520ae7) - [KM-624][AI] Planner: realign stub registry + examples to composite analyze_* tools (93a24dabf48d8121e981cc470c835cb10badb62a) - [KM-624] docs: record tool taxonomy + ownership revision in PROGRESS (f3461142542f6216aff23b30a1321dfb4654afdc) - [KM-626][AI] Slow-path agent: seam contracts + TaskRunner (ac310de551d0888ccfef31e981e22d88f54c6a38) - [KM-626][AI] Slow-path agent: Assembler…81e5fe7