Skip to content

feat(nl): Spanish natural-language control for group bot capabilities - #48

Merged
TOMOKI977 merged 11 commits into
mainfrom
feat/natural-language-text
Oct 6, 2026
Merged

TOMOKI977 merged 11 commits into
mainfrom
feat/natural-language-text

Conversation

@TOMOKI977

Copy link
Copy Markdown
Contributor

Summary

Implements and archives OpenSpec change natural-language-text: team members can drive existing group bot capabilities in Spanish via @mention or reply-to-bot (confirm-first for mutations).

  • Eligibility, Workers AI intent classifier (NL_MODEL_PRIMARY, GLM thinking off), per-team classify quota, and read intents (list/show hackathons, repos, profiles, topic analysis).
  • Confirm-first mutates via nl: buttons, sí / cancelar lexicon replies, CAS consume, and execute path to existing use cases — including unlink by name/esta with pick disambiguation.
  • Gentle AI verify PASS WITH WARNINGS (12/12 requirements, 36/36 scenarios); archived to openspec/changes/archive/2026-10-05-natural-language-text/ with main specs synced.

size:exception: stacked delivery landed as one branch (~7k lines / 9 commits). Review by commit (planning → quota/classifier → reads → confirms → GLM fix → unlink/pick → smoke docs → verify tests → archive).

Test plan

  • npm test — 1137 passed
  • npm run typecheck — clean
  • Operator Telegram smoke (Phase 4): ayuda, list, mutate confirm/cancel/sí, profile gate, DM ignore, slash spot-check
  • Remote migrate 0005 + deploy with NL_MODEL_PRIMARY=@cf/zai-org/glm-4.7-flash

Commits

  1. docs(nl): add natural-language-text OpenSpec planning
  2. feat(nl): add eligibility, intent schema, and classify quota
  3. feat(nl): classify group mentions into read intents
  4. feat(nl): confirm mutates via buttons and lexicon replies
  5. fix(nl): disable GLM thinking in the intent classifier
  6. feat(nl): unlink hackathons by name or esta with pick confirm
  7. docs(nl): mark Phase 4 operator smoke complete
  8. test(nl): cover list, show, expired confirm, cancelar, and participate paths
  9. docs(nl): archive natural-language-text and sync main specs

Made with Cursor

TOMOKI977 and others added 9 commits October 5, 2026 15:42
Lock Spanish-first NL design, specs, and phased tasks for roadmap change 5.

Co-authored-by: Cursor <cursoragent@cursor.com>
Introduce closed-intent types, mention/reply eligibility, migration 0005, and the soft per-team daily classify cap.

Co-authored-by: Cursor <cursoragent@cursor.com>
Wire IntentClassifier, NL_MODEL_PRIMARY, and handleNaturalLanguage so @mention/reply-to-bot can run help/unknown and read use cases.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add nl_confirmations CAS consume, Spanish yes/cancel lexicon, mutate confirm-first path, nl:ok/nl:no callbacks, and data-channel gate for profile updates.

Co-authored-by: Cursor <cursoragent@cursor.com>
Workers AI was returning empty content for glm-4.7-flash; mirror the extractor override so classify no longer fails closed on help/reads.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add unlinkHackathonFromTopic (clear link, unpin, close topic), /unlinkhackathon, NL unlink_hackathon_topic with name matching and disambiguation buttons, and sole-linked esta resolution.

Co-authored-by: Cursor <cursoragent@cursor.com>
Record remote migrate/deploy, Telegram smoke checklist, and post-smoke follow-ups before verify/archive.

Co-authored-by: Cursor <cursoragent@cursor.com>
…e paths

Close Gentle AI verify CRITICALs for Closed Intent Coverage, Reads Execute Immediately, Mutations Are Confirm-First, and Participate Maps to Existing Use Case.

Co-authored-by: Cursor <cursoragent@cursor.com>
Verify PASS WITH WARNINGS (12/12 requirements, 36/36 scenarios). Create natural-language-text main spec and update telegram-webhook Command-Only Routing for nl: callbacks and eligible NL delivery.

Co-authored-by: Cursor <cursoragent@cursor.com>
@TOMOKI977 TOMOKI977 added the size:exception PR over the 400-line review budget, accepted explicitly label Oct 5, 2026
Cancel the pick row before fallback create when editMessage fails; always reply after CAS consume (map topic errors + executeFailed); fail-closed classify quota; prefer named unlink over topic link; bind confirm chatId and validate promote membershipId.

Co-authored-by: Cursor <cursoragent@cursor.com>
@TOMOKI977

Copy link
Copy Markdown
Contributor Author

Review follow-up

Addressed REQUEST CHANGES from the PR review:

  • CRITICAL: resolveNlPick no longer leaves two confirmable rows on editMessage failure (defer updateSlots, cancel pick, then create one confirm).
  • CRITICAL: After CAS consume, mutate failures always return a user reply (topic rights/forum/create errors mapped; unmapped → executeFailed). Adapter catch also best-effort replies.
  • WARNING: classify quota fail-closed; named unlink wins over current topic link; confirm chatId bind; promote membershipId must exist on the team.

npm test 1143 passed · npm run typecheck clean.

Avoid minting a second confirmable row if two pick callbacks race after editMessage failure.

Co-authored-by: Cursor <cursoragent@cursor.com>
@TOMOKI977
TOMOKI977 merged commit 94c3498 into main Oct 6, 2026
2 checks passed
@TOMOKI977
TOMOKI977 deleted the feat/natural-language-text branch October 6, 2026 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:exception PR over the 400-line review budget, accepted explicitly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant