Skip to content

feat(keywords): Magic Keyword System — Master Plan (issue #391)#393

Open
quangdang46 wants to merge 1 commit into
masterfrom
feature/keyword-system-391
Open

feat(keywords): Magic Keyword System — Master Plan (issue #391)#393
quangdang46 wants to merge 1 commit into
masterfrom
feature/keyword-system-391

Conversation

@quangdang46
Copy link
Copy Markdown
Owner

Summary

Master implementation plan for the Magic Keyword System — full keyword detection + workflow handlers for natural language mode activation.

Closes #391

What This Plan Covers

1. Keyword Detection (50+ triggers)

  • Natural language triggers (not just $prefix)
  • 8-stage sanitization (code blocks, URLs, quotes, system echoes)
  • Intent disambiguation (informational vs activation vs diagnostic)
  • Multilingual: EN, KO, JA, ZH, VI (128 triggers total)
  • Task size classification (suppress heavy modes for simple tasks)
  • Priority-based conflict resolution

2. Workflow Handlers (14 modes)

Priority Keyword Workflow
11 $ralplan Consensus planning (plan → adversarial review → approve)
10 $ultrawork Parallel execution (spawn 4 sub-agents)
10 $ultragoal Durable goal tracking with token budget
9 canceljcode Cancel all modes + tasks
8 $ultraqa QA cycling (implement → test → fix → repeat)
8 $deep-interview Requirements gathering (Q&A → ambiguity scoring)
7 $ultrathink Extended thinking (deep reasoning)
7 $deepsearch Multi-strategy codebase search
7 $tdd Test-driven development
6 $code-review Code review agent
6 $security-review Security audit (OWASP Top 10)
6 $analyze Deep structured analysis
5 $wiki Documentation lookup
5 ai-slop-cleaner Fix AI-generated low-quality code

3. Additional Features

  • Persistent mode state (.jcode/state/modes.toml)
  • Visual effects (rainbow highlighting, shimmer animation, toast notifications)
  • Per-model prompt variants (Claude, GPT, Gemini)
  • State machines per workflow
  • Error handling per workflow
  • Edge case handling (10 scenarios)

Plan Location

Full plan: docs/keyword-system-master-plan.md (2,209 lines)

Implementation Phases

  1. Detection Engine — registry, sanitizer, detector, intent, task_size, conflict
  2. State + Prompt Injection — TOML persistence, prompt_builder, prompting.rs integration
  3. Core Workflows — ultrawork, deep-interview, tdd, code-review, ultrathink
  4. Extended Workflows — ultragoal, ultraqa, ralplan, security, search, analyze, wiki, slop, cancel
  5. TUI Effects — rainbow, shimmer, toast, mode indicator
  6. Config + Polish

Estimate

~6,080 lines of new/modified code across 27 new files + 8 modified files.

For Implementer

Start with Phase 1 (Detection Engine) in crates/jcode-keywords/. The plan has exact Rust code snippets for every component. Follow the phases in order — each phase builds on the previous one.

Comprehensive 2,209-line implementation plan for the magic keyword system:
- 50+ NL keyword triggers with sanitization, intent disambiguation, multilingual
- 14 workflow handlers (ultrawork, ralplan, tdd, code-review, etc.)
- Persistent mode state (TOML)
- Visual effects (rainbow, shimmer, toast)
- Task size classification + cancel system

Research: oh-my-codex, oh-my-openagent, oh-my-claudecode, claude-code, codebuff, oh-my-pi

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

[WIP] feat: Magic keyword system (NL aliases + priority)

1 participant