From 6b854a19406d76599cedcfbebdb9931bcb119b41 Mon Sep 17 00:00:00 2001 From: Thales Raymond <32554150+thalesraymond@users.noreply.github.com> Date: Sun, 14 Jun 2026 21:28:20 -0300 Subject: [PATCH] =?UTF-8?q?docs:=20=E2=9C=8F=EF=B8=8F=20archive=20epic=203?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../.openspec.yaml | 0 .../design.md | 0 .../proposal.md | 0 .../specs/go-event-system/spec.md | 0 .../specs/go-plugin-architecture/spec.md | 0 .../tasks.md | 0 openspec/specs/go-event-system/spec.md | 19 +++++++++++++++++++ openspec/specs/go-plugin-architecture/spec.md | 19 +++++++++++++++++++ 8 files changed, 38 insertions(+) rename openspec/changes/{03-event-system-and-plugin-architecture => archive/2026-06-14-03-event-system-and-plugin-architecture}/.openspec.yaml (100%) rename openspec/changes/{03-event-system-and-plugin-architecture => archive/2026-06-14-03-event-system-and-plugin-architecture}/design.md (100%) rename openspec/changes/{03-event-system-and-plugin-architecture => archive/2026-06-14-03-event-system-and-plugin-architecture}/proposal.md (100%) rename openspec/changes/{03-event-system-and-plugin-architecture => archive/2026-06-14-03-event-system-and-plugin-architecture}/specs/go-event-system/spec.md (100%) rename openspec/changes/{03-event-system-and-plugin-architecture => archive/2026-06-14-03-event-system-and-plugin-architecture}/specs/go-plugin-architecture/spec.md (100%) rename openspec/changes/{03-event-system-and-plugin-architecture => archive/2026-06-14-03-event-system-and-plugin-architecture}/tasks.md (100%) create mode 100644 openspec/specs/go-event-system/spec.md create mode 100644 openspec/specs/go-plugin-architecture/spec.md diff --git a/openspec/changes/03-event-system-and-plugin-architecture/.openspec.yaml b/openspec/changes/archive/2026-06-14-03-event-system-and-plugin-architecture/.openspec.yaml similarity index 100% rename from openspec/changes/03-event-system-and-plugin-architecture/.openspec.yaml rename to openspec/changes/archive/2026-06-14-03-event-system-and-plugin-architecture/.openspec.yaml diff --git a/openspec/changes/03-event-system-and-plugin-architecture/design.md b/openspec/changes/archive/2026-06-14-03-event-system-and-plugin-architecture/design.md similarity index 100% rename from openspec/changes/03-event-system-and-plugin-architecture/design.md rename to openspec/changes/archive/2026-06-14-03-event-system-and-plugin-architecture/design.md diff --git a/openspec/changes/03-event-system-and-plugin-architecture/proposal.md b/openspec/changes/archive/2026-06-14-03-event-system-and-plugin-architecture/proposal.md similarity index 100% rename from openspec/changes/03-event-system-and-plugin-architecture/proposal.md rename to openspec/changes/archive/2026-06-14-03-event-system-and-plugin-architecture/proposal.md diff --git a/openspec/changes/03-event-system-and-plugin-architecture/specs/go-event-system/spec.md b/openspec/changes/archive/2026-06-14-03-event-system-and-plugin-architecture/specs/go-event-system/spec.md similarity index 100% rename from openspec/changes/03-event-system-and-plugin-architecture/specs/go-event-system/spec.md rename to openspec/changes/archive/2026-06-14-03-event-system-and-plugin-architecture/specs/go-event-system/spec.md diff --git a/openspec/changes/03-event-system-and-plugin-architecture/specs/go-plugin-architecture/spec.md b/openspec/changes/archive/2026-06-14-03-event-system-and-plugin-architecture/specs/go-plugin-architecture/spec.md similarity index 100% rename from openspec/changes/03-event-system-and-plugin-architecture/specs/go-plugin-architecture/spec.md rename to openspec/changes/archive/2026-06-14-03-event-system-and-plugin-architecture/specs/go-plugin-architecture/spec.md diff --git a/openspec/changes/03-event-system-and-plugin-architecture/tasks.md b/openspec/changes/archive/2026-06-14-03-event-system-and-plugin-architecture/tasks.md similarity index 100% rename from openspec/changes/03-event-system-and-plugin-architecture/tasks.md rename to openspec/changes/archive/2026-06-14-03-event-system-and-plugin-architecture/tasks.md diff --git a/openspec/specs/go-event-system/spec.md b/openspec/specs/go-event-system/spec.md new file mode 100644 index 0000000..d8885fc --- /dev/null +++ b/openspec/specs/go-event-system/spec.md @@ -0,0 +1,19 @@ +## Purpose + +This document specifies the event dispatching infrastructure for the Go task runner. It defines a central, asynchronous event dispatcher and strongly-typed listener interfaces that allow components to react to task lifecycle events without tight coupling. + +## Requirements + +### Requirement: Central Event Dispatcher +The system SHALL provide a central event dispatcher to broadcast lifecycle events asynchronously. + +#### Scenario: Dispatching an event +- **WHEN** the runner emits a lifecycle event (e.g., TaskStart) +- **THEN** the dispatcher pushes the event to a buffered channel for asynchronous processing + +### Requirement: Interface-Based Event Listeners +The system SHALL define strongly-typed interfaces for each lifecycle event type. + +#### Scenario: Defining event listeners +- **WHEN** a new event type is needed +- **THEN** a specific interface (e.g., `TaskStartListener`) with a typed method is provided diff --git a/openspec/specs/go-plugin-architecture/spec.md b/openspec/specs/go-plugin-architecture/spec.md new file mode 100644 index 0000000..ef094de --- /dev/null +++ b/openspec/specs/go-plugin-architecture/spec.md @@ -0,0 +1,19 @@ +## Purpose + +This document specifies the plugin architecture for the Go task runner. It defines how external plugins are registered with the event dispatcher and how events are selectively delivered to plugins based on the listener interfaces they implement. + +## Requirements + +### Requirement: Plugin Registration +The system SHALL allow plugins to be registered with the central event dispatcher. + +#### Scenario: Registering a plugin +- **WHEN** a plugin struct is passed to the dispatcher registration function +- **THEN** the dispatcher evaluates which listener interfaces the plugin implements and registers it for those specific events + +### Requirement: Event Delivery to Plugins +The system SHALL deliver events only to plugins that have implemented the corresponding listener interface. + +#### Scenario: Delivering TaskStart event +- **WHEN** a TaskStart event is broadcast +- **THEN** only plugins implementing `TaskStartListener` have their `OnTaskStart` method called with the event payload