Skip to content

feat: multilingual imperative sentence detection#79

Open
pinghe wants to merge 1 commit into
agent-ecosystem:mainfrom
pinghe:main
Open

feat: multilingual imperative sentence detection#79
pinghe wants to merge 1 commit into
agent-ecosystem:mainfrom
pinghe:main

Conversation

@pinghe

@pinghe pinghe commented Jun 8, 2026

Copy link
Copy Markdown

Add config-driven imperative sentence detection with Chinese support.

  • Add imperative_default.yaml with embedded defaults (EN: 45 verbs, ZH: 32 verbs + 10 keywords like 请, 务必, 确保)
  • Add imperative_config.go with YAML config loading via go:embed; lookup order: CWD > ~/.config/skill-validator > embedded
  • Refactor content.go: imperativeDetector type with per-language verb sets, keyword regexps, mixed CJK/Latin sentence splitting
  • Add AnalyzeWithConfig() API (Analyze() unchanged for compatibility)
  • Add --imperative-config flag to 'analyze content' CLI command
  • Add 14 new tests covering Chinese verbs, keywords, mixed content, config loading, and backward compatibility
  • go test -race ./... passes; golangci-lint run clean

What this PR does

How to test

Checklist

  • Tests pass locally (go test -race ./... -count=1)
  • Lint passes locally (golangci-lint run)
  • New functionality includes tests
  • Breaking changes are noted above (if any)

Add config-driven imperative sentence detection with Chinese support.

- Add imperative_default.yaml with embedded defaults (EN: 45 verbs,
  ZH: 32 verbs + 10 keywords like 请, 务必, 确保)
- Add imperative_config.go with YAML config loading via
  go:embed; lookup order: CWD > ~/.config/skill-validator > embedded
- Refactor content.go: imperativeDetector type with per-language
  verb sets, keyword regexps, mixed CJK/Latin sentence splitting
- Add AnalyzeWithConfig() API (Analyze() unchanged for compatibility)
- Add --imperative-config flag to 'analyze content' CLI command
- Add 14 new tests covering Chinese verbs, keywords, mixed content,
  config loading, and backward compatibility
- go test -race ./... passes; golangci-lint run clean
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.

1 participant