8000 feat(workflows): a classify node on the canvas by adeelahmad · Pull Request #498 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

feat(workflows): a classify node on the canvas - #498

Merged
adeelahmad merged 2 commits into
mainfrom
claude/project-thread-26l27n
Oct 17, 2026
Merged

adeelahmad merged 2 commits into
mainfrom
claude/project-thread-26l27n

Conversation

@adeelahmad
@adeelahmad adeelahmad commented Oct 17, 2026 •
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: classify (#494) was reachable from the API, MCP and the assistant. A workflow could only reach it with an LLM prompt of its own, so a pipeline couldn't label every asset it ran on.

After: the workflow canvas has a Classify node, under AI. It picks one of your labels, a content type or one of the namespace's topics. It classifies the asset, or what came in as text (Classify: What comes in). It passes on {choice, confidence, sure, ranked, by}, so a Condition or Switch can branch on the choice or on sure, or Save output can keep it.

With Act on a sure answer on, a sure answer does one of these:

  • sets the content type;
  • suggests the topic, which waits for someone to accept it;
  • adds the label as a tag.

Such a node counts as keeping something, so a workflow needs nothing else. A try on the canvas only says "would act on it". Settings are checked on save, in the backend and on the canvas: labels or a vocabulary, at least two labels, and acting only on the asset.

The README's built list now names find, classify and this node, with their checks in docs/requirements.md, and the merged #398 leaves In progress.

Motivation and Context

This is the last part of Adeel's "core services such as classify, search by face/voice/entity/type/content type/date" ask, which said "usable by agents and workflows". Find (#398) and classify (#494) are merged.

How: classify joins the recording kit's own nodes (workflows.OWN_NODES, _check_classify, _classify over classify.classify). The kit's existing keeps hook makes a classify node that acts count as keeping something. The frontend adds the node's info, settings panel, summary line and checks (workflow-model.ts, node-settings.tsx).

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change; ! in the title)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (make hooks checks it on commit).
  • I added or updated tests.
  • My change requires documentation updates, and I have updated docs/ accordingly.
  • Users need more than the title to understand it, so I wrote it under ## Unreleased in CHANGELOG.md.

Done questions (AGENTS.md)

  • Goal: workflows classify, which completes find and classify for agents and workflows. It merges on green CI.
  • Agents: agents build workflows through the workflows API and MCP as before. The node is in the catalog (GET /workflows node types).
  • Zero setup: it uses the decision model, else the LLM, as classify does.
  • Fewest clicks and keystrokes: a new node starts with the namespace's topics, so no labels need typing. Labels are one per line.
  • Configurable: everything is set on the node. No new settings.
  • Light: no new dependency.
  • Private and secure: it runs as the workflow does. The archive's text is marked untrusted (classify.py). No new surface.
  • Cost: decision model first. Each call is in the activity ledger.
  • User decides: it acts only when set to and only on a sure answer. Topics are only suggested. Existing workflows and defaults are unchanged.
  • Upgrades: n/a, nothing new is stored.
  • Honest: the node passes on how sure it is and who answered. Docs say what a try does.
  • Tests, docs and generated files updated: test_a_workflow_classifies, workflow-flow.test.ts, docs/processing.md (Workflows and the canvas, Classifying), README built list and docs/requirements.md rows for find, classify and the node (make requirements passes). make openapi gave no change.
  • Open standards; dependencies keep Lens MIT (none added).
  • Result reported with evidence. Refine later: classifying many assets at once from the API, and labels with examples.
  • Reuse: classify.classify, the kit's keeps hook, the canvas's Lines/Select/Checkbox.

Local checks: ruff check, ruff format --check, mypy, the classify and workflow tests, tsc, eslint, prettier, the workflow jest suites, make requirements, mkdocs build --strict.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GKv2oVRvFRdiSf4USLsM1N

A Classify node picks one of your labels, a content type or a topic for the
recording (or for what came in) and passes on the choice, how sure and every
label ranked; set to act, a sure answer sets the content type, suggests the
topic or adds the tag, so the node keeps something by itself.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GKv2oVRvFRdiSf4USLsM1N
@adeelahmad adeelahmad self-assigned this Oct 17, 2026
… checks

The README's Connect your agents and Automate it items now name find,
classify and the workflow Classify node, docs/requirements.md backs each
with its tests, and the merged #398 leaves In progress.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GKv2oVRvFRdiSf4USLsM1N
@adeelahmad
adeelahmad merged commit c442e9e into main Oct 17, 2026
10 of 11 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-26l27n branch October 17, 2026 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0