Skip to content

Unify command vocabulary across CLI, MCP and agent surfaces#2

Merged
benfortuna merged 5 commits into
developfrom
unify-command-vocabulary
Jun 6, 2026
Merged

Unify command vocabulary across CLI, MCP and agent surfaces#2
benfortuna merged 5 commits into
developfrom
unify-command-vocabulary

Conversation

@benfortuna

Copy link
Copy Markdown
Member

Summary

Introduces a shared controlled vocabulary — canonical verbs, entity types, loci, and serialization families — that all command surfaces (CLI, MCP, agent) name operations from. Surfaces share the names but keep their own dispatch (Option B: shared vocabulary, separate dispatch).

What changed

  • New ical4j-command-core moduleVerb, EntityType, Locus, SerializationFamily, SendMethod enums (vocabulary only, no dispatch; JPMS module).
  • CLIdeleteremove; strategy group newgenerate (+ create-calendar/cardcalendar/card); calendar/card CRUD reframed as import/export; depends on core.
  • MCP — service methods renamed to canonical verbs (list*, add/remove, import*, get*); removed the dead ListCommand reach-through in WorkspaceService (Option B).
  • Agent@Tool names aligned to the generate verb; publish/request/reply map to specialised send; core dependency wired.
  • Docsdocs/command-protocols.md and README.md now document the vocabulary as source of truth.
  • OpenSpec — adds the command-vocabulary spec; the change is archived under openspec/changes/archive/.

Verification

  • core, cli, mcp all compile; agent module compiles (left disabled in settings.gradle as before).
  • openspec validate passes.

Notes / follow-ups (pre-existing, out of scope)

  • 3 CLI test failures (ListCommandTest, AddCollectionTest, RemoveCollectionTest) test unfinished stub commands and are not touched by this change.
  • The agent module remains disabled due to a pre-existing test-discovery config issue; its vocabulary edits are ready for when it's re-enabled.
  • Strict literal-elimination (task 5.4) is partial: picocli/Spring annotations require literal name strings at declaration sites — would need static final String constants in core.

🤖 Generated with Claude Code

benfortuna and others added 5 commits June 6, 2026 13:38
Introduce a shared controlled vocabulary (verbs, entity types, loci,
serialization families) that all command surfaces name operations from,
while keeping each surface's dispatch independent (Option B).

- Add ical4j-command-core module defining Verb, EntityType, Locus,
  SerializationFamily and SendMethod enums (vocabulary only, no dispatch)
- CLI: standardise delete->remove, strategy new->generate, and reframe
  calendar/card CRUD as import/export; restructure command packages
- MCP: rename service methods to canonical verbs (list*, add/remove,
  import*, get*) and drop the dead CLI reach-through in WorkspaceService
- Agent: align @tool names to the generate verb; wire core dependency
- Docs: document the canonical vocabulary in command-protocols.md and
  README.md as the source of truth
- OpenSpec: add command-vocabulary spec and archive the change

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The AddCollection, RemoveCollection and ListCommand tests targeted a
dependency-injected design, but the commands used the CommandConfig
singleton and were not unit-testable (they threw on construction/run).

- AddCollection/RemoveCollection now extend AbstractWorkspaceCommand,
  adding a (Consumer, ObjectStore) constructor and withCollectionName
  builder with an injected-store fast path; the CLI path via CommandConfig
  is preserved for non-injected use
- ListCommand accepts an injectable CommandConfig; ListCommandTest is
  rewritten to verify real collection-name listing instead of a stub string

Full build (core, cli, mcp) is green: 13/13 CLI tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The connector/serializer/extensions SNAPSHOTs only existed in the local
maven cache and are not published to any CI-reachable repository, so CI
could not resolve them. Pin to released versions available on Maven
Central; the project compiles and all tests pass against them.

- ical4j-connector  2.0.0-beta2-SNAPSHOT -> 2.0.0-beta1
- ical4j-serializer 0.4.0-develop-SNAPSHOT -> 0.4.1
- ical4j-extensions 2.0.1-develop-SNAPSHOT -> 2.0.0

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@benfortuna benfortuna merged commit 5dba996 into develop Jun 6, 2026
1 check passed
@benfortuna benfortuna deleted the unify-command-vocabulary branch June 6, 2026 04:24
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