steerdev 0.4.27__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. steerdev-0.4.27.dist-info/METADATA +224 -0
  2. steerdev-0.4.27.dist-info/RECORD +57 -0
  3. steerdev-0.4.27.dist-info/WHEEL +4 -0
  4. steerdev-0.4.27.dist-info/entry_points.txt +2 -0
  5. steerdev_agent/__init__.py +10 -0
  6. steerdev_agent/api/__init__.py +32 -0
  7. steerdev_agent/api/activity.py +278 -0
  8. steerdev_agent/api/agents.py +145 -0
  9. steerdev_agent/api/client.py +158 -0
  10. steerdev_agent/api/commands.py +399 -0
  11. steerdev_agent/api/configs.py +238 -0
  12. steerdev_agent/api/context.py +306 -0
  13. steerdev_agent/api/events.py +294 -0
  14. steerdev_agent/api/hooks.py +178 -0
  15. steerdev_agent/api/implementation_plan.py +408 -0
  16. steerdev_agent/api/messages.py +231 -0
  17. steerdev_agent/api/prd.py +281 -0
  18. steerdev_agent/api/runs.py +526 -0
  19. steerdev_agent/api/sessions.py +403 -0
  20. steerdev_agent/api/specs.py +321 -0
  21. steerdev_agent/api/tasks.py +659 -0
  22. steerdev_agent/api/workflow_runs.py +351 -0
  23. steerdev_agent/api/workflows.py +191 -0
  24. steerdev_agent/cli.py +2254 -0
  25. steerdev_agent/config/__init__.py +19 -0
  26. steerdev_agent/config/models.py +236 -0
  27. steerdev_agent/config/platform.py +272 -0
  28. steerdev_agent/config/settings.py +62 -0
  29. steerdev_agent/daemon.py +675 -0
  30. steerdev_agent/executor/__init__.py +64 -0
  31. steerdev_agent/executor/base.py +121 -0
  32. steerdev_agent/executor/claude.py +328 -0
  33. steerdev_agent/executor/stream.py +163 -0
  34. steerdev_agent/git/__init__.py +1 -0
  35. steerdev_agent/handlers/__init__.py +5 -0
  36. steerdev_agent/handlers/prd.py +533 -0
  37. steerdev_agent/integration.py +334 -0
  38. steerdev_agent/prompt/__init__.py +10 -0
  39. steerdev_agent/prompt/builder.py +263 -0
  40. steerdev_agent/prompt/templates.py +422 -0
  41. steerdev_agent/py.typed +0 -0
  42. steerdev_agent/runner.py +829 -0
  43. steerdev_agent/setup/__init__.py +5 -0
  44. steerdev_agent/setup/claude_setup.py +560 -0
  45. steerdev_agent/setup/templates/claude_md_section.md +140 -0
  46. steerdev_agent/setup/templates/settings.json +69 -0
  47. steerdev_agent/setup/templates/skills/activity/SKILL.md +160 -0
  48. steerdev_agent/setup/templates/skills/context/SKILL.md +122 -0
  49. steerdev_agent/setup/templates/skills/git-workflow/SKILL.md +218 -0
  50. steerdev_agent/setup/templates/skills/progress-logging/SKILL.md +211 -0
  51. steerdev_agent/setup/templates/skills/specs-management/SKILL.md +161 -0
  52. steerdev_agent/setup/templates/skills/task-management/SKILL.md +343 -0
  53. steerdev_agent/setup/templates/steerdev.yaml +51 -0
  54. steerdev_agent/version.py +149 -0
  55. steerdev_agent/workflow/__init__.py +10 -0
  56. steerdev_agent/workflow/executor.py +494 -0
  57. steerdev_agent/workflow/memory.py +185 -0
@@ -0,0 +1,422 @@
1
+ """Prompt templates for different agent scenarios."""
2
+
3
+
4
+ class PromptTemplates:
5
+ """Collection of prompt templates."""
6
+
7
+ # Base system prompt template
8
+ SYSTEM_PROMPT = """You are an AI coding assistant working on a software project.
9
+
10
+ ## Project Information
11
+ {project_info}
12
+
13
+ ## Task
14
+ {task_info}
15
+
16
+ ## Instructions
17
+ {instructions}
18
+ """
19
+
20
+ # Task prompt template
21
+ TASK_PROMPT = """## Current Task
22
+
23
+ **Title:** {title}
24
+ **ID:** {task_id}
25
+ **Priority:** {priority}
26
+ **Status:** {status}
27
+
28
+ ### Description
29
+ {prompt}
30
+
31
+ ### Working Directory
32
+ {working_directory}
33
+ """
34
+
35
+ # Project info template
36
+ PROJECT_INFO = """**Project:** {name}
37
+ **ID:** {project_id}
38
+ **Description:** {description}
39
+ """
40
+
41
+ # Workflow phase template
42
+ WORKFLOW_PHASE = """## Workflow Phase
43
+
44
+ **Phase:** {phase_name}
45
+ **Description:** {phase_description}
46
+
47
+ ### Phase Instructions
48
+ {phase_instructions}
49
+ """
50
+
51
+ # Default instructions when none are provided
52
+ DEFAULT_INSTRUCTIONS = """1. Analyze the task requirements carefully
53
+ 2. Break down the work into logical steps
54
+ 3. Implement changes incrementally, testing as you go
55
+ 4. Write clean, maintainable code
56
+ 5. Follow the project's coding conventions
57
+ 6. Document significant changes
58
+ 7. Ensure all tests pass before completing
59
+ """
60
+
61
+ # Resume prompt template
62
+ RESUME_PROMPT = """Continue working on the previous task.
63
+
64
+ {message}
65
+ """
66
+
67
+ # Spec generation prompt
68
+ SPEC_GENERATION = """You are generating a technical specification for a new feature or change.
69
+
70
+ ## Task
71
+ {task_info}
72
+
73
+ ## Instructions
74
+ 1. Analyze the requirements thoroughly
75
+ 2. Create a detailed technical specification
76
+ 3. Include:
77
+ - Overview and goals
78
+ - Technical approach
79
+ - Implementation details
80
+ - Testing strategy
81
+ - Potential risks and mitigations
82
+ 4. Be specific about file changes needed
83
+ 5. Consider edge cases and error handling
84
+ """
85
+
86
+ # Implementation prompt
87
+ IMPLEMENTATION = """You are implementing a task based on an existing specification.
88
+
89
+ ## Task
90
+ {task_info}
91
+
92
+ ## Specification
93
+ {spec}
94
+
95
+ ## Instructions
96
+ 1. Follow the specification closely
97
+ 2. Implement all required changes
98
+ 3. Write tests as specified
99
+ 4. Ensure code quality and best practices
100
+ 5. Report any deviations from the spec
101
+ """
102
+
103
+ # PRD Analysis prompt - for analyzing PRDs and generating clarification questions
104
+ PRD_ANALYZE = """Analyze this Product Requirements Document (PRD) and identify areas needing clarification.
105
+
106
+ ## PRD Title
107
+ {prd_title}
108
+
109
+ ## PRD Content
110
+ {prd_content}
111
+
112
+ ## Instructions
113
+ 1. Read the PRD carefully and thoroughly
114
+ 2. Identify ambiguous, incomplete, or unclear requirements
115
+ 3. Generate specific questions that need answers before implementation can begin
116
+ 4. Group related questions logically by category (Technical, UX, Business, etc.)
117
+ 5. For each question, provide context explaining why this clarification is needed
118
+
119
+ ## Response Format
120
+ You MUST respond with valid JSON in this exact format:
121
+ {{
122
+ "summary": "Brief 2-3 sentence summary of what this PRD is about",
123
+ "questions": [
124
+ {{
125
+ "question": "What authentication method should be used?",
126
+ "context": "The PRD mentions 'secure login' but doesn't specify OAuth, JWT, session cookies, etc.",
127
+ "category": "Technical"
128
+ }},
129
+ {{
130
+ "question": "Should the dashboard support mobile responsive design?",
131
+ "context": "Screen dimensions and breakpoints are not specified",
132
+ "category": "UX"
133
+ }}
134
+ ],
135
+ "initial_observations": "Any immediate feedback, concerns, or suggestions about the PRD"
136
+ }}
137
+
138
+ Focus on questions that would meaningfully impact the implementation approach.
139
+ Avoid trivial questions that can be reasonably assumed or decided during implementation.
140
+ """
141
+
142
+ # PRD Plan Generation prompt - for creating implementation plans from clarified PRDs
143
+ PRD_GENERATE_PLAN = """Generate an implementation plan from this Product Requirements Document.
144
+
145
+ ## PRD Title
146
+ {prd_title}
147
+
148
+ ## PRD Content
149
+ {prd_content}
150
+
151
+ ## Clarifications Received
152
+ {clarifications}
153
+
154
+ ## Instructions
155
+ 1. Based on the PRD and clarifications, create a comprehensive implementation plan
156
+ 2. Break the work into logical sections/phases
157
+ 3. Each section should represent a cohesive unit of work
158
+ 4. Estimate complexity for each section (low, medium, high)
159
+ 5. Preview the types of tasks that would be created for each section
160
+ 6. Identify dependencies between sections
161
+ 7. Note any risks or considerations
162
+
163
+ ## Response Format
164
+ You MUST respond with valid JSON in this exact format:
165
+ {{
166
+ "plan_summary": "High-level overview of the implementation approach (2-3 paragraphs)",
167
+ "sections": [
168
+ {{
169
+ "title": "Authentication System",
170
+ "description": "Detailed description of what needs to be built in this section",
171
+ "estimated_complexity": "medium",
172
+ "tasks_preview": [
173
+ "Set up OAuth provider integration",
174
+ "Implement login/logout flow",
175
+ "Add session management",
176
+ "Create protected route middleware"
177
+ ]
178
+ }},
179
+ {{
180
+ "title": "User Dashboard",
181
+ "description": "Build the main user dashboard with key metrics and actions",
182
+ "estimated_complexity": "high",
183
+ "tasks_preview": [
184
+ "Design dashboard layout",
185
+ "Implement metrics widgets",
186
+ "Add data visualization components",
187
+ "Create responsive mobile view"
188
+ ]
189
+ }}
190
+ ],
191
+ "dependencies": [
192
+ "Authentication System must complete before User Dashboard",
193
+ "Database schema must be finalized before API development"
194
+ ],
195
+ "risks": [
196
+ "Third-party API rate limits may affect performance",
197
+ "Mobile responsive requirements may extend timeline"
198
+ ]
199
+ }}
200
+
201
+ Create sections that represent meaningful units of work that can be developed and tested independently where possible.
202
+ """
203
+
204
+ # PRD Task Generation prompt - for creating development tasks from implementation plan
205
+ PRD_GENERATE_TASKS = """Generate specific development tasks from this implementation plan.
206
+
207
+ ## PRD Title
208
+ {prd_title}
209
+
210
+ ## Implementation Plan
211
+ {implementation_plan}
212
+
213
+ ## Instructions
214
+ 1. Convert the implementation plan sections into actionable development tasks
215
+ 2. Each task should be specific, well-defined, and independently completable
216
+ 3. Include clear acceptance criteria in the description
217
+ 4. Assign appropriate priority (0=None, 1=Urgent, 2=High, 3=Medium, 4=Low)
218
+ 5. Note any dependencies between tasks
219
+ 6. Ensure tasks are appropriately sized (not too large, not too small)
220
+
221
+ ## Response Format
222
+ You MUST respond with valid JSON in this exact format:
223
+ {{
224
+ "tasks": [
225
+ {{
226
+ "title": "Set up OAuth provider integration",
227
+ "description": "Integrate with the selected OAuth provider (e.g., Auth0, Clerk).\\n\\nAcceptance Criteria:\\n- OAuth client configured\\n- Callback URLs set up\\n- Environment variables documented\\n- Basic login test passing",
228
+ "priority": 2,
229
+ "section": "Authentication System",
230
+ "dependencies": []
231
+ }},
232
+ {{
233
+ "title": "Implement login/logout flow",
234
+ "description": "Create the login and logout user flows with proper session handling.\\n\\nAcceptance Criteria:\\n- Login page with OAuth buttons\\n- Logout functionality\\n- Session persistence\\n- Redirect after auth",
235
+ "priority": 2,
236
+ "section": "Authentication System",
237
+ "dependencies": ["Set up OAuth provider integration"]
238
+ }}
239
+ ]
240
+ }}
241
+
242
+ Create tasks that can be completed by a single developer in a reasonable time (1-2 days).
243
+ Larger work should be broken into multiple tasks.
244
+ """
245
+
246
+ @classmethod
247
+ def format_system_prompt(
248
+ cls,
249
+ project_info: str = "",
250
+ task_info: str = "",
251
+ instructions: str = "",
252
+ ) -> str:
253
+ """Format the system prompt with provided context.
254
+
255
+ Args:
256
+ project_info: Formatted project information.
257
+ task_info: Formatted task information.
258
+ instructions: Custom instructions or defaults.
259
+
260
+ Returns:
261
+ Formatted system prompt.
262
+ """
263
+ return cls.SYSTEM_PROMPT.format(
264
+ project_info=project_info or "No project information available.",
265
+ task_info=task_info or "No task information available.",
266
+ instructions=instructions or cls.DEFAULT_INSTRUCTIONS,
267
+ )
268
+
269
+ @classmethod
270
+ def format_task(
271
+ cls,
272
+ title: str,
273
+ task_id: str,
274
+ prompt: str,
275
+ priority: int = 3,
276
+ status: str = "unstarted",
277
+ working_directory: str = ".",
278
+ ) -> str:
279
+ """Format task information.
280
+
281
+ Args:
282
+ title: Task title.
283
+ task_id: Task ID.
284
+ prompt: Task prompt/description.
285
+ priority: Task priority (1-4).
286
+ status: Task status.
287
+ working_directory: Working directory.
288
+
289
+ Returns:
290
+ Formatted task information.
291
+ """
292
+ priority_names = {1: "Urgent", 2: "High", 3: "Medium", 4: "Low", 0: "None"}
293
+ priority_display = priority_names.get(priority, "Unknown")
294
+
295
+ return cls.TASK_PROMPT.format(
296
+ title=title,
297
+ task_id=task_id,
298
+ priority=priority_display,
299
+ status=status,
300
+ prompt=prompt,
301
+ working_directory=working_directory,
302
+ )
303
+
304
+ @classmethod
305
+ def format_project(
306
+ cls,
307
+ name: str,
308
+ project_id: str,
309
+ description: str = "",
310
+ ) -> str:
311
+ """Format project information.
312
+
313
+ Args:
314
+ name: Project name.
315
+ project_id: Project ID.
316
+ description: Project description.
317
+
318
+ Returns:
319
+ Formatted project information.
320
+ """
321
+ return cls.PROJECT_INFO.format(
322
+ name=name,
323
+ project_id=project_id,
324
+ description=description or "No description available.",
325
+ )
326
+
327
+ @classmethod
328
+ def format_workflow_phase(
329
+ cls,
330
+ phase_name: str,
331
+ phase_description: str = "",
332
+ phase_instructions: str = "",
333
+ ) -> str:
334
+ """Format workflow phase information.
335
+
336
+ Args:
337
+ phase_name: Name of the workflow phase.
338
+ phase_description: Description of the phase.
339
+ phase_instructions: Specific instructions for this phase.
340
+
341
+ Returns:
342
+ Formatted workflow phase information.
343
+ """
344
+ return cls.WORKFLOW_PHASE.format(
345
+ phase_name=phase_name,
346
+ phase_description=phase_description or "No description available.",
347
+ phase_instructions=phase_instructions or "Follow standard procedures.",
348
+ )
349
+
350
+ @classmethod
351
+ def format_prd_analyze(
352
+ cls,
353
+ prd_title: str,
354
+ prd_content: str,
355
+ ) -> str:
356
+ """Format PRD analysis prompt.
357
+
358
+ Args:
359
+ prd_title: Title of the PRD.
360
+ prd_content: Full content of the PRD.
361
+
362
+ Returns:
363
+ Formatted PRD analysis prompt.
364
+ """
365
+ return cls.PRD_ANALYZE.format(
366
+ prd_title=prd_title,
367
+ prd_content=prd_content,
368
+ )
369
+
370
+ @classmethod
371
+ def format_prd_generate_plan(
372
+ cls,
373
+ prd_title: str,
374
+ prd_content: str,
375
+ clarifications: list[dict[str, str]] | None = None,
376
+ ) -> str:
377
+ """Format PRD plan generation prompt.
378
+
379
+ Args:
380
+ prd_title: Title of the PRD.
381
+ prd_content: Full content of the PRD.
382
+ clarifications: List of Q&A clarifications.
383
+
384
+ Returns:
385
+ Formatted PRD plan generation prompt.
386
+ """
387
+ clarifications_text = "No clarifications provided."
388
+ if clarifications:
389
+ clarifications_text = "\n".join(
390
+ f"**Q:** {c.get('question', 'N/A')}\n**A:** {c.get('answer', 'N/A')}\n"
391
+ for c in clarifications
392
+ )
393
+
394
+ return cls.PRD_GENERATE_PLAN.format(
395
+ prd_title=prd_title,
396
+ prd_content=prd_content,
397
+ clarifications=clarifications_text,
398
+ )
399
+
400
+ @classmethod
401
+ def format_prd_generate_tasks(
402
+ cls,
403
+ prd_title: str,
404
+ implementation_plan: dict,
405
+ ) -> str:
406
+ """Format PRD task generation prompt.
407
+
408
+ Args:
409
+ prd_title: Title of the PRD.
410
+ implementation_plan: The implementation plan as a dictionary.
411
+
412
+ Returns:
413
+ Formatted PRD task generation prompt.
414
+ """
415
+ import json
416
+
417
+ plan_text = json.dumps(implementation_plan, indent=2)
418
+
419
+ return cls.PRD_GENERATE_TASKS.format(
420
+ prd_title=prd_title,
421
+ implementation_plan=plan_text,
422
+ )
File without changes