| name | create-spec |
| description | Create a spec.md file based on task.md and lesson.md files. |
Create Specification for AI Agent Implementation
- Create a spec.md based in the root of the project on spec-template.md to serve as a coding guideline for the agent implementing the solution described in task.md.
- Use lesson.md as an extended reference and inspiration for the possible ways to implement the solution.
- Adhere to the AGENTS.md guidelines in the project.
- Ask follow-up questions to clarify the requirements and drive key decisions if needed.
--- Spec.md Template ---
AI Agent for [Task Name]
1. Overview & Goal
Task Summary
Hardcoded Inputs / Initial Data
Final Deliverable
2. Agent Persona & Prompt Strategy
System Prompt (for the inner LLM agent)
<!-- Provide the template for the system prompt used to instruct the agent. -->
You are a [Persona Description]. Your job is to [Main Task].
## Your workflow of agent loop
1. STEP ONE: [Action]
2. STEP TWO: [Action]
3. ...
## Rules
- RULE ONE: [Constraint]
- RULE TWO: [Constraint]
3. Tool Definitions (Function Calls)
3.1 [tool_name]
Description:
Input Schema:
{
"type": "object",
"properties": {
"param1": {
"type": "string",
"description": "..."
}
},
"required": ["param1"]
}
Behavior:
Return value:
{
"result": "..."
}
4. Execution Flow
<!-- Provide an ASCII flowchart or step-by-step logic of the expected agent execution -->
START
│
├─ 1. [Initial Step]
│
├─ 2. [Next Step / Sub-loop]
│
└─ END ([Final Action])
Key Decision Points
5. Dependencies & Environment
package.json additions
| Package | Purpose |
|---|
example-pkg | Does something |
Environment Variables (.env)
# List required environment variables
API_KEY=<your api key>
Project Structure
# Suggest a basic directory layout
src/
index.ts # Entry point
agent.ts # Agent logic
tools.ts # Tool implementations
prompts.ts # Prompts
6. Key Implementation Notes
- [Note 1]
- [Note 2]
7. Acceptance Criteria