Skip to content

Standardize feature modules behind a common trait system #67

Description

@MasonRhodesDev

We keep landing in the same shape: a feature area (harnesses, directories, git actions, MCP, shortcuts, toasts, ...) needs to declare metadata, capabilities, overrides, and UI hooks, and every new call site has to match-arm against an enum instead of asking the feature itself.

Existing issues circling this:

Proposal: design and land a single feature-module convention that all of the above slot into, instead of each one inventing its own trait. A feature module declares:

  • Identity: stable id, label, icon.
  • Scopes: where it can be configured (global / repo / project / task / session).
  • Settings: typed setting leaves with defaults, overrides, and resolution order.
  • Capabilities: boolean/enum supports(Feature) bits so UI can gate.
  • Actions: named actions the feature exposes (maps to shortcuts, menu items, MCP tools, etc. — one declaration, many surfaces).
  • Lifecycle hooks: init/teardown, reacting to scope changes (e.g. .git appears, harness updated, MCP toggled).
  • Parsing/detection hooks: narrow, feature-owned escape hatches (e.g. status probes in Surface task status CTAs in the task list (working / awaiting input / idle / read / unread) #27), never free-floating per-tool code.

Payoff:

Out of scope here: the exact trait shape, migration order, or which of the existing issues gets migrated first — that's the design work this issue is asking for.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions