sofhiaazzhr Claude Opus 4.8 commited on
Commit
f7f7b17
Β·
1 Parent(s): 49b0848

[KM-711] Retire /report slash command; report is Generate-button only

Browse files

Report generation is now button-only (Generate button on the Report panel).
The /report slash command is retired: typed manually it misroutes to the check
tool, so surfacing it would mislead users.

- help.md -> v6: Section C, how-to phrasing, and help_ex_guard_ready now point to
the Generate button, anchored on the button label (not an exact corner). Never
mention /report.
- eval/help/help_dataset.json: ready cases reward Generate/report and forbid /report.
- api/v1/tools.py: /report entry in _COMMAND_CATALOG commented out (kept, not
deleted); catalog now only /help. The POST /tools/report endpoint stays (the
Generate button calls it).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

eval/help/help_dataset.json CHANGED
@@ -89,8 +89,11 @@
89
  "report_ready": { "ready": true, "missing": [] },
90
  "history": [{ "role": "human", "content": "what should I do next?" }],
91
  "message": null,
92
- "asserts": [{ "type": "must_contain_any", "patterns": ["/report", "report"] }],
93
- "note": "MIRRORS help.md example help_ex_guard_ready. Enough analysis done β€” SHOULD nudge toward the report (mention /report or the report option)."
 
 
 
94
  },
95
  {
96
  "id": "guard_03", "group": "report_guard", "carried_over": false, "manual_review": false,
@@ -108,10 +111,11 @@
108
  "history": [{ "role": "human", "content": "selanjutnya aku ngapain?" }],
109
  "message": null,
110
  "asserts": [
111
- { "type": "must_contain_any", "patterns": ["/report", "laporan", "report"] },
 
112
  { "type": "language_match", "expected": "Indonesian" }
113
  ],
114
- "note": "Ready + Indonesian conversation β€” should nudge toward the report AND stay in Indonesian (two rules at once)."
115
  },
116
  {
117
  "id": "guard_05", "group": "report_guard", "carried_over": false, "manual_review": false,
 
89
  "report_ready": { "ready": true, "missing": [] },
90
  "history": [{ "role": "human", "content": "what should I do next?" }],
91
  "message": null,
92
+ "asserts": [
93
+ { "type": "must_contain_any", "patterns": ["Generate", "generate", "report"] },
94
+ { "type": "must_not_contain_any", "patterns": ["/report"] }
95
+ ],
96
+ "note": "MIRRORS help.md example help_ex_guard_ready. Enough analysis done β€” SHOULD nudge toward the report by pointing at the Generate button; must NOT offer /report (removed in v6)."
97
  },
98
  {
99
  "id": "guard_03", "group": "report_guard", "carried_over": false, "manual_review": false,
 
111
  "history": [{ "role": "human", "content": "selanjutnya aku ngapain?" }],
112
  "message": null,
113
  "asserts": [
114
+ { "type": "must_contain_any", "patterns": ["Generate", "generate", "laporan", "report"] },
115
+ { "type": "must_not_contain_any", "patterns": ["/report"] },
116
  { "type": "language_match", "expected": "Indonesian" }
117
  ],
118
+ "note": "Ready + Indonesian conversation β€” should nudge toward the report (Generate button) AND stay in Indonesian; must NOT offer /report (removed in v6)."
119
  },
120
  {
121
  "id": "guard_05", "group": "report_guard", "carried_over": false, "manual_review": false,
src/api/v1/tools.py CHANGED
@@ -4,8 +4,10 @@ Exposes the agent's user-invocable slash-command catalog so the Golang backend
4
  can cache it and the frontend can render its "/" command menu WITHOUT calling the
5
  AI agent for every list (Golang GETs + caches `list_tools`).
6
 
7
- Scope (2026-06-24, KM-674): the FE slash-command catalog is now just the two
8
- FE-callable skills β€” `/help` and `/report`. Naming: verb-first, kebab-case, `/`
 
 
9
  prefix; each command maps 1:1 to a real internal tool/intent `name` (the dispatch
10
  key).
11
 
@@ -49,8 +51,12 @@ class ListToolsResponse(BaseModel):
49
  # Keep `command` in Harry's convention (verb-first, kebab-case, `/`); `name` is the
50
  # internal route/tool name used by the orchestrator.
51
  #
52
- # 2026-06-24 (KM-674 batch): the FE-callable skills are ONLY /help + /report. The rest
53
- # below are COMMENTED OUT β€” NOT deleted β€” on purpose:
 
 
 
 
54
  # - /problem-statement is retired (objective + business_questions now live in the
55
  # New-Analysis form, not a slash skill).
56
  # - check_data / check_knowledge stay available but are served by Golang, not exposed
@@ -65,13 +71,13 @@ _COMMAND_CATALOG: list[CommandResponse] = [
65
  type="skill",
66
  description="Show what the assistant can do and guide your next step.",
67
  ),
68
- CommandResponse(
69
- command="/report",
70
- name="report",
71
- type="skill",
72
- description="Generate a versioned analysis report (background, EDA, "
73
- "key findings, insights).",
74
- ),
75
  # CommandResponse(
76
  # command="/problem-statement",
77
  # name="problem_statement",
 
4
  can cache it and the frontend can render its "/" command menu WITHOUT calling the
5
  AI agent for every list (Golang GETs + caches `list_tools`).
6
 
7
+ Scope (2026-07-09): the FE slash-command catalog is now just `/help`. `/report` was
8
+ removed β€” report generation is button-only (the Generate button in the Report panel);
9
+ typing `/report` no longer creates a report (the router sends it to `check`), so
10
+ surfacing it as a slash command would mislead. Naming: verb-first, kebab-case, `/`
11
  prefix; each command maps 1:1 to a real internal tool/intent `name` (the dispatch
12
  key).
13
 
 
51
  # Keep `command` in Harry's convention (verb-first, kebab-case, `/`); `name` is the
52
  # internal route/tool name used by the orchestrator.
53
  #
54
+ # 2026-07-09: the only FE-callable slash skill is now /help. The rest below are
55
+ # COMMENTED OUT β€” NOT deleted β€” on purpose:
56
+ # - /report is retired as a slash command: report generation is button-only (Generate
57
+ # button in the Report panel). Typing /report no longer generates a report (the router
58
+ # routes it to `check`), so exposing it here would misdirect users. The report HTTP
59
+ # endpoint (POST /api/v1/tools/report in report.py) stays β€” the Generate button calls it.
60
  # - /problem-statement is retired (objective + business_questions now live in the
61
  # New-Analysis form, not a slash skill).
62
  # - check_data / check_knowledge stay available but are served by Golang, not exposed
 
71
  type="skill",
72
  description="Show what the assistant can do and guide your next step.",
73
  ),
74
+ # CommandResponse(
75
+ # command="/report",
76
+ # name="report",
77
+ # type="skill",
78
+ # description="Generate a versioned analysis report (background, EDA, "
79
+ # "key findings, insights).",
80
+ # ),
81
  # CommandResponse(
82
  # command="/problem-statement",
83
  # name="problem_statement",
src/config/prompts/help.md CHANGED
@@ -1,4 +1,10 @@
1
- <!-- help.md Β· v5 Β· Help skill prompt.
 
 
 
 
 
 
2
  v5 (2026-07-07): added the "Capability boundary" section β€” Help now only suggests
3
  analyses the live tools can actually deliver (descriptive, group-by, correlation, trend)
4
  and must NOT suggest significance tests, forecasting/modeling, causal claims, clustering/
@@ -72,9 +78,11 @@ recommend the specific next questions that would fill those gaps (phrase them as
72
  the user can ask), still anchored to the objective and business questions.
73
 
74
  ### C. `report_ready.ready == true` β†’ nudge toward the report
75
- There's enough to report. Encourage them to generate it. Report can be triggered **two ways**:
76
- the **`/report`** skill **or** the report button β€” mention both so it feels natural.
77
- Do not over-promise the report's depth.
 
 
78
 
79
  > Edge case: if `objective` looks empty (unusual β€” it's required at onboarding), don't push a
80
  > chat skill to fix it; gently suggest they set the objective + business questions in the New
@@ -111,8 +119,9 @@ the gap β€” rather than promising the unsupported analysis.
111
 
112
  ## How-to phrasing (degrade gracefully)
113
 
114
- - **Via chat / skills** β€” write these **accurately and specifically**; they are stable (e.g. "type your question in the chat", "run `/report`").
115
- - **Via the UI (buttons/menus)** β€” the frontend isn't final yet. Describe UI steps **generically** ("use the Generate Report option") rather than naming exact buttons/positions you're unsure of. Prefer the chat/skill path when unsure. *(A later version of this file will fill in the real UI steps.)*
 
116
  - If a field in `analysis_state` is missing or the state looks unwired, **fall back to generic guidance** rather than guessing specifics.
117
 
118
  ## Tone
@@ -158,6 +167,6 @@ State: report_ready.ready=false, missing=["a new analysis since the last report"
158
 
159
  <!-- id: help_ex_guard_ready -->
160
  State: report_ready.ready=true
161
- β†’ "You've covered enough to summarize. You can generate your report now β€” run /report
162
- or use the report option to create it."
163
  ```
 
1
+ <!-- help.md Β· v6 Β· Help skill prompt.
2
+ v6 (2026-07-09): report trigger changed β€” the `/report` skill and the old report button
3
+ are GONE. A report is now generated ONE way only: the **Generate** button on the Report
4
+ panel (single source of truth). Help must no longer tell users to run `/report` or "use
5
+ the report skill"; it points them to the Generate button β€” anchored on the button LABEL,
6
+ not an exact corner/position (layout isn't final). Updated Section C, the How-to phrasing
7
+ note, and the help_ex_guard_ready example accordingly.
8
  v5 (2026-07-07): added the "Capability boundary" section β€” Help now only suggests
9
  analyses the live tools can actually deliver (descriptive, group-by, correlation, trend)
10
  and must NOT suggest significance tests, forecasting/modeling, causal claims, clustering/
 
78
  the user can ask), still anchored to the objective and business questions.
79
 
80
  ### C. `report_ready.ready == true` β†’ nudge toward the report
81
+ There's enough to report. Encourage them to generate it. A report is generated **one way**:
82
+ by clicking the **Generate** button on the Report panel. Anchor on the button's label
83
+ (**Generate**) β€” that's the unambiguous, layout-stable cue β€” rather than an exact
84
+ position/corner. There is no `/report` skill or manual command anymore β€” do **not** mention
85
+ `/report`. Do not over-promise the report's depth.
86
 
87
  > Edge case: if `objective` looks empty (unusual β€” it's required at onboarding), don't push a
88
  > chat skill to fix it; gently suggest they set the objective + business questions in the New
 
119
 
120
  ## How-to phrasing (degrade gracefully)
121
 
122
+ - **Via chat / skills** β€” write these **accurately and specifically**; they are stable (e.g. "type your question in the chat"). Note: report is **not** a chat skill β€” never write `/report`.
123
+ - **Generating a report** β€” the only way is the **Generate** button on the Report panel. Name the button by its label; don't pin an exact corner/position (the layout isn't final). Don't offer `/report` or a "report skill" as an alternative.
124
+ - **Other UI steps (buttons/menus)** β€” the rest of the frontend isn't final yet. Describe those steps **generically** rather than naming exact buttons/positions you're unsure of.
125
  - If a field in `analysis_state` is missing or the state looks unwired, **fall back to generic guidance** rather than guessing specifics.
126
 
127
  ## Tone
 
167
 
168
  <!-- id: help_ex_guard_ready -->
169
  State: report_ready.ready=true
170
+ β†’ "You've covered enough to summarize. You can generate your report now β€” click the
171
+ Generate button on the Report panel to create it."
172
  ```