Skip to content

Requirements

Package: packages/agent-requirements

Requirements gathering plugin: read_requirement_collection + operation-level write tools (add/update/status/citations/links/verification/remove).

@alphacro/agent-requirements: lifts the requirement-gathering tools into a self-contained Plugin. Composing this plugin contributes:

  • the requirement tools: read_requirement_collection plus the operation-level write tools (add_requirements, update_requirement, set_status, manage_citations, manage_links, manage_verification_steps, remove_requirements, and the add_assumptions / add_questions adders).

The plugin holds no state of its own — the {@link RequirementsStore} passed by the host owns the broadcast RequirementCollection slice and the chat-source projection. This mirrors how apps/editor-web/worker/edit-session-requirements.ts already wires the DO’s RoomState.requirements slice and event log into the tools’ read/apply path.

The plugin is Layer-2 portable: no Cloudflare types, no SDK coupling beyond @alphacro/agent-core / @alphacro/agent-tools.

ContributionDeclared
Tools✅
Hooks✅
Sub-agents❌
Slash commands❌
HTTP routes❌
RPC methods❌
Workflows❌
Permissions❌
Tool cards❌
State slice❌
Reducer❌
Session start handler❌
Session end handler❌
Startup phase❌
Dependencies❌
  • read_requirement_collection
  • requirement_write
  • DecorateSystemPrompt

Defines the Requirement and VerificationSpec data structures used by the agent runtime. This package is the single source of truth for what the product should do and how to verify it.

  • A Requirement captures what the product should do. It is sourced from chat messages via sourceCitations, so you can always trace a requirement back to the user intent that created it.
  • Each Requirement embeds a VerificationSpec — a structured given/when/then checklist that defines how to verify the requirement is satisfied. Verification lives inside the Requirement, not as a separate entity.
TypePurpose
RequirementAcceptance criterion with sourceCitations and an embedded verification
VerificationSpecGiven/when/then steps that define “done”
SourceCitationLink back to the chat message that inspired a requirement

See src/types.ts for the full type definitions.