Add CommandAction metadata DSL (requires_position, requires_balance, cooldown) #111

Open
opened 2026-03-15 04:13:18 +00:00 by freemo · 0 comments
Owner

Metadata

  • Commit Message: feat(dispatch): add CommandAction metadata DSL
  • Branch: feature/m1-middleware-pipeline

Background and Context

Actions need to declare their requirements declaratively so middleware can inspect them.
The metadata DSL provides class-level macros: requires_position :standing,
requires_balance true, requires_alive true, cooldown 5, min_permission :mortal.

Expected Behavior

  • Class-level macros store metadata on the action class
  • Middleware reads metadata to determine check requirements
  • Defaults are permissive (no position required, no balance required, etc.)

Acceptance Criteria

  • requires_position, requires_balance, requires_alive, cooldown, min_permission macros
  • Metadata stored as class-level instance variables
  • Defaults allow unrestricted execution
  • BDD scenarios verifying metadata declaration and reading

Subtasks

  • Add metadata macros to CommandAction base class
  • Implement metadata storage and accessor methods
  • Write Cucumber scenarios
  • Add example metadata declarations to a few existing actions

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the
    Commit Message in Metadata exactly.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata.
  • The commit is submitted as a pull request to master, reviewed, and merged.
## Metadata - **Commit Message**: `feat(dispatch): add CommandAction metadata DSL` - **Branch**: `feature/m1-middleware-pipeline` ## Background and Context Actions need to declare their requirements declaratively so middleware can inspect them. The metadata DSL provides class-level macros: `requires_position :standing`, `requires_balance true`, `requires_alive true`, `cooldown 5`, `min_permission :mortal`. ## Expected Behavior - Class-level macros store metadata on the action class - Middleware reads metadata to determine check requirements - Defaults are permissive (no position required, no balance required, etc.) ## Acceptance Criteria - `requires_position`, `requires_balance`, `requires_alive`, `cooldown`, `min_permission` macros - Metadata stored as class-level instance variables - Defaults allow unrestricted execution - BDD scenarios verifying metadata declaration and reading ## Subtasks - [ ] Add metadata macros to CommandAction base class - [ ] Implement metadata storage and accessor methods - [ ] Write Cucumber scenarios - [ ] Add example metadata declarations to a few existing actions ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged**.
freemo added this to the (deleted) milestone 2026-03-15 04:13:18 +00:00
freemo self-assigned this 2026-03-15 04:25:24 +00:00
freemo modified the milestone from (deleted) to v1.0.0 2026-03-16 00:28:05 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference: aethyr/Aethyr#111
No description provided.