Requirements
@alphacro/agent-requirements
Section titled “@alphacro/agent-requirements”Package: packages/agent-requirements
Requirements gathering plugin: read_requirement_collection + operation-level write tools (add/update/status/citations/links/verification/remove).
Overview
Section titled “Overview”@alphacro/agent-requirements: lifts the requirement-gathering tools
into a self-contained Plugin. Composing this plugin contributes:
- the requirement tools:
read_requirement_collectionplus the operation-level write tools (add_requirements,update_requirement,set_status,manage_citations,manage_links,manage_verification_steps,remove_requirements, and theadd_assumptions/add_questionsadders).
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.
Contributions
Section titled “Contributions”| Contribution | Declared |
|---|---|
| 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_collectionrequirement_write
DecorateSystemPrompt
Package README
Section titled “Package README”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.
Key concepts
Section titled “Key concepts”- 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.
Data structures (summary)
Section titled “Data structures (summary)”| Type | Purpose |
|---|---|
Requirement | Acceptance criterion with sourceCitations and an embedded verification |
VerificationSpec | Given/when/then steps that define “done” |
SourceCitation | Link back to the chat message that inspired a requirement |
See src/types.ts for the full type definitions.
Source
Section titled “Source”- Plugin factory:
packages/agent-requirements/src/plugin.ts