From codagent
Drives interactive requirement discovery from proposals to generate spec files for capabilities, with approval gates. Use for 'spec this', 'write specs' requests.
npx claudepluginhub codagent-ai/agent-skills --plugin codagentThis skill uses the workspace's default tool permissions.
Help turn proposals into fully specified requirements through natural collaborative dialogue.
Creates or updates SPEC.md documents from requirements, notes, or interview output, structuring into sections for goals, design, edge cases, security, testing, and success criteria. Use for feature specs.
Generates canonical specifications from feature requests or user stories using EARS notation, acceptance criteria, INVEST scores, and validation. Saves to .specs/{feature}/spec.md as phase 1 of spec-driven workflow.
Guides structured requirements gathering via questions to produce complete specification documents through non-blocking conversational interaction.
Share bugs, ideas, or general feedback.
Help turn proposals into fully specified requirements through natural collaborative dialogue.
Start by reading the proposal's Capabilities section to know which spec files to create, then walk through each capability conversationally — asking questions one at a time to elicit behaviors, boundaries, error conditions, and edge cases. Once you have enough information for a capability, present the proposed requirements and scenarios for user approval, then write the spec file.
Do NOT write any spec files until you have presented the proposed requirements and scenarios to the user and received approval for that capability. Use the appropriate tool for asking the user a question or requesting input to get this approval. This applies to EVERY capability regardless of perceived simplicity.Every capability needs its behavioral contract specified before design begins. Edge cases, error conditions, and boundaries that feel "obvious" are where misaligned assumptions cause the most rework. The spec can be short (a few scenarios for simple capabilities), but you MUST elicit them conversationally and get approval.
You MUST create a task for each of these items and complete them in order:
digraph spec {
"Read proposal capabilities" [shape=box];
"Survey existing specs" [shape=box];
"Pick next capability" [shape=box];
"Ask clarifying questions" [shape=box];
"Present spec sections" [shape=box];
"User approves?" [shape=diamond];
"Write spec file" [shape=box];
"More capabilities?" [shape=diamond];
"Done" [shape=box];
"Read proposal capabilities" -> "Survey existing specs";
"Survey existing specs" -> "Pick next capability";
"Pick next capability" -> "Ask clarifying questions";
"Ask clarifying questions" -> "Present spec sections";
"Present spec sections" -> "User approves?";
"User approves?" -> "Ask clarifying questions" [label="no, revise"];
"User approves?" -> "Write spec file" [label="yes"];
"Write spec file" -> "More capabilities?";
"More capabilities?" -> "Pick next capability" [label="yes"];
"More capabilities?" -> "Done" [label="no"];
}
Reading the proposal:
Asking clarifying questions:
codagent:ask-questions skill for how to ask questions (tool to use, batching strategy, question quality)When a requirement depends on architectural knowledge:
<!-- deferred-to-design: <reason> --> — the design skill will complete or revise itPresenting for approval:
Writing spec files:
When a scenario's behavior depends on an unresolved architectural decision, write the scenario with a best-effort condition and outcome, and add a <!-- deferred-to-design: <reason> --> comment explaining what architectural decision is needed to complete it.
The design skill reads all spec files before starting and will complete or revise these scenarios when it has the architectural context.
Tell the user the relative path of each spec file created. This skill does not invoke other skills or manage sequencing.
codagent:ask-questions — For tool choice and batching strategy when gathering informationUse this structure when writing spec files. Create one spec file per capability listed in the proposal's Capabilities section.
specs/<capability>/spec.md).### Requirement: <name> followed by description#### Scenario: <name> with WHEN/THEN format####). Using 3 or bullets will break parsing.Scenarios describe observable behavioral contracts — what the system does when invoked under specific conditions. Focus on orchestration behavior (dispatch, gating, error handling, control flow), NOT file contents or internal structure.
Write scenarios as behavioral contracts the capability guarantees to its callers:
Use ## headers to categorize changes:
When modifying existing requirements: if a prior spec file exists, copy the ENTIRE requirement block (from ### Requirement: through all scenarios), paste under ## MODIFIED Requirements, and edit to reflect new behavior. Using MODIFIED with partial content loses detail. If no prior spec file exists, investigate the existing code to understand current behavior, then write the full modified requirement (including all scenarios) as it should be after the change. If adding new concerns without changing existing behavior, use ADDED instead.
## ADDED Requirements
### Requirement: <!-- requirement name -->
<!-- requirement text -->
#### Scenario: <!-- scenario name -->
- **WHEN** <!-- condition -->
- **THEN** <!-- expected outcome -->
<!--
Example of additional delta sections:
## REMOVED Requirements
### Requirement: Legacy export
**Reason**: Replaced by new export system
**Migration**: Use new export endpoint at /api/v2/export
-->