CawPlan Internal QA — Classify One Human Input
Task
Given one piece of content (required) and, optionally, its paired assistant_message (this
turn's AI reply) and prev_message (the last paragraph of the immediately previous
assistant reply — not the previous human turn), classify using references/CATEGORY_TAXONOMY.md
and references/TOPIC_TAXONOMY.md. This makes no CawPlan API calls and needs no cawplan auth —
it is a pure reasoning check against uid.core-product's current classify rules, not a lookup.
Workflow
- Read
references/CATEGORY_TAXONOMY.md, references/TOPIC_TAXONOMY.md, and
references/PRODUCTION_CLASSIFY_PROMPT.md (full production snapshot) if you haven't already
this session. When the curated docs and the snapshot disagree, follow the snapshot.
new_feature is the last resort topic. When more than one topic plausibly fits, do not
pick it — prefer the specific one (design_ui for anything about how something is displayed,
including a NEW node/panel/screen whose ask is what it shows; integration_api for wiring or
for a field an external system must carry; security, infra, refactor, bug,
investigation). A new screen or a new field does not by itself make it new_feature.
- Prepare
assistant_message the same way production does before reading it — don't reason
over raw untruncated text:
- Normalize literal
\n / \t escapes and line endings to real whitespace.
- Strip
[REDACTED] placeholders (upload-time redaction — not real bracketed content like
[Done] / [QA Testing], which must stay).
- Strip markdown noise within each paragraph (table rules,
--- horizontal rules, heading/bold
markers, emoji).
- Split on blank lines into paragraphs; keep only the first 3 paragraphs.
- Join those paragraphs with
\n\n, then cap at ~1200 runes (head cut with ... if
longer) — mirrors ClassifyAssistantSnippet /
AISessionClassifyAssistantMaxRunes.
- Prepare
prev_message when provided (same paragraph split + per-paragraph sanitize as
step 2, but take only the last paragraph; cap at ~500 runes) — mirrors
ClassifyPrevAssistantTail / AISessionClassifyPrevMaxRunes. When omitted, treat prev as
empty; bare follow-ups ("commit & push", "直接改") may be ambiguous without it.
- Route categories exactly like production (see
CATEGORY_TAXONOMY.md):
- Primary signal:
content. Always read this first.
prev: use ONLY on short bare follow-ups (typically ≤12 Han chars or ≤6 English
words) to distinguish decision (human names/repeats the concrete action the assistant
offered) vs approval (generic go-ahead: "直接改", "可以", "do it"). Never use prev for
any other category; never treat it as a prior human requirement.
assistant_message: use for category ONLY when content is a bare hand-off (URL, file
path, screenshot path, log path) with no intent words. Do not infer category from what
the assistant already did or verified.
- Determine every category from the taxonomy that clearly applies, then sort by the priority
order in the reference doc (highest → lowest). Use the exact snake_case leaf names
(
direction_constraint, rejection_rollback, question_clarification, other_meta, … —
not shortened forms like direction / rejection / question / other). Don't invent a
secondary category just to fill the list. When only one applies, the list has one element.
- The first element of that sorted list is the primary category.
- Pick exactly one topic from
TOPIC_TAXONOMY.md using content + prepared
assistant_message only — never use prev_message for topic. Apply ASKING vs CHANGING,
bare commit & push → git_ops, and Slack-heavy hints from the reference doc.
- Write one short
topic_reason sentence and topic_confidence (0.0–1.0 per
TOPIC_TAXONOMY.md) mirroring production.
Output
Report:
category — the primary category (single value, first element of categories).
categories — the full priority-ordered list (may be a single value).
topic — exactly one value from the 17-topic list in TOPIC_TAXONOMY.md.
topic_reason — one short sentence explaining the topic pick.
topic_confidence — float 0.0–1.0 (how sure you are about the topic pick).
- One short sentence explaining the primary category pick, citing the specific phrase in
content, prev_message, or prepared assistant_message that drove the decision — this is
what makes a caller's downstream disagreement (e.g. vs. an already-persisted cloud category)
reviewable rather than opaque.
References
references/PRODUCTION_CLASSIFY_PROMPT.md — full prompt exported from uid.core-product
references/CATEGORY_TAXONOMY.md — curated category routing + examples
references/TOPIC_TAXONOMY.md — curated topic routing + examples
Sync snapshot after prompt ships:
node skills/cawplan-internal-qa-coding-humaninputs/scripts/sync-classify-prompt-from-core-product.mjs
1---2name: cawplan-internal-qa-coding-humaninputs3description: Classifies a single piece of text (an AI-coding human input, optionally with its paired assistant reply and previous-assistant tail) into the current v2 human-input category + topic taxonomies, returning the primary category, the full priority-ordered categories array, one topic, topic_reason, and topic_confidence — a pure reasoning check against uid.core-product's classify rules (gpt-4o production prompt, postprocess off), no CawPlan data or API calls involved. Use when: asked to classify/categorize a specific sentence or human input against the current category and topic rules — e.g. "what category/topic is this: ...", "classify this with this assistant reply" — or as the per-row classification step used by cawplan-internal-qa-coding-humaninputs-test. NOT for: bulk/batch accuracy testing across many already-uploaded human inputs, or fetching data from CawPlan at all (use cawplan-internal-qa-coding-humaninputs-test for that), submitting reports, or creating tickets.4---56# CawPlan Internal QA — Classify One Human Input78## Task910Given one piece of `content` (required) and, optionally, its paired `assistant_message` (this11turn's AI reply) and `prev_message` (the **last paragraph** of the **immediately previous**12assistant reply — not the previous human turn), classify using `references/CATEGORY_TAXONOMY.md`13and `references/TOPIC_TAXONOMY.md`. This makes no CawPlan API calls and needs no `cawplan` auth —14it is a pure reasoning check against uid.core-product's current classify rules, not a lookup.1516## Workflow17181. Read `references/CATEGORY_TAXONOMY.md`, `references/TOPIC_TAXONOMY.md`, and19 `references/PRODUCTION_CLASSIFY_PROMPT.md` (full production snapshot) if you haven't already20 this session. When the curated docs and the snapshot disagree, follow the snapshot.212. **`new_feature` is the last resort topic.** When more than one topic plausibly fits, do not22 pick it — prefer the specific one (`design_ui` for anything about how something is displayed,23 including a NEW node/panel/screen whose ask is what it shows; `integration_api` for wiring or24 for a field an external system must carry; `security`, `infra`, `refactor`, `bug`,25 `investigation`). A new screen or a new field does not by itself make it `new_feature`.263. **Prepare `assistant_message`** the same way production does before reading it — don't reason27 over raw untruncated text:28 - Normalize literal `\n` / `\t` escapes and line endings to real whitespace.29 - Strip `[REDACTED]` placeholders (upload-time redaction — not real bracketed content like30 `[Done]` / `[QA Testing]`, which must stay).31 - Strip markdown noise within each paragraph (table rules, `---` horizontal rules, heading/bold32 markers, emoji).33 - Split on blank lines into paragraphs; keep only the **first 3 paragraphs**.34 - Join those paragraphs with `\n\n`, then cap at **~1200 runes** (head cut with `...` if35 longer) — mirrors `ClassifyAssistantSnippet` /36 `AISessionClassifyAssistantMaxRunes`.374. **Prepare `prev_message`** when provided (same paragraph split + per-paragraph sanitize as38 step 2, but take only the **last paragraph**; cap at **~500 runes**) — mirrors39 `ClassifyPrevAssistantTail` / `AISessionClassifyPrevMaxRunes`. When omitted, treat `prev` as40 empty; bare follow-ups ("commit & push", "直接改") may be ambiguous without it.415. **Route categories** exactly like production (see `CATEGORY_TAXONOMY.md`):42 - **Primary signal: `content`.** Always read this first.43 - **`prev`:** use ONLY on short bare follow-ups (typically ≤12 Han chars or ≤6 English44 words) to distinguish `decision` (human names/repeats the concrete action the assistant45 offered) vs `approval` (generic go-ahead: "直接改", "可以", "do it"). Never use `prev` for46 any other category; never treat it as a prior human requirement.47 - **`assistant_message`:** use for category ONLY when `content` is a bare hand-off (URL, file48 path, screenshot path, log path) with no intent words. Do **not** infer category from what49 the assistant already did or verified.506. Determine every category from the taxonomy that clearly applies, then sort by the priority51 order in the reference doc (highest → lowest). Use the exact **snake_case** leaf names52 (`direction_constraint`, `rejection_rollback`, `question_clarification`, `other_meta`, … —53 not shortened forms like `direction` / `rejection` / `question` / `other`). Don't invent a54 secondary category just to fill the list. When only one applies, the list has one element.557. The first element of that sorted list is the primary category.568. **Pick exactly one topic** from `TOPIC_TAXONOMY.md` using `content` + prepared57 `assistant_message` only — **never** use `prev_message` for topic. Apply ASKING vs CHANGING,58 bare `commit & push` → `git_ops`, and Slack-heavy hints from the reference doc.599. Write one short `topic_reason` sentence and **`topic_confidence`** (0.0–1.0 per60 `TOPIC_TAXONOMY.md`) mirroring production.6162## Output6364Report:65- `category` — the primary category (single value, first element of `categories`).66- `categories` — the full priority-ordered list (may be a single value).67- `topic` — exactly one value from the 17-topic list in `TOPIC_TAXONOMY.md`.68- `topic_reason` — one short sentence explaining the topic pick.69- `topic_confidence` — float 0.0–1.0 (how sure you are about the topic pick).70- One short sentence explaining the primary **category** pick, citing the specific phrase in71 `content`, `prev_message`, or prepared `assistant_message` that drove the decision — this is72 what makes a caller's downstream disagreement (e.g. vs. an already-persisted cloud category)73 reviewable rather than opaque.7475## References7677- `references/PRODUCTION_CLASSIFY_PROMPT.md` — full prompt exported from uid.core-product78- `references/CATEGORY_TAXONOMY.md` — curated category routing + examples79- `references/TOPIC_TAXONOMY.md` — curated topic routing + examples8081Sync snapshot after prompt ships:8283```bash84node skills/cawplan-internal-qa-coding-humaninputs/scripts/sync-classify-prompt-from-core-product.mjs85```