[] architecture changes

This commit is contained in:
Shayan Rais
2026-01-28 15:23:42 +05:00
parent 37827cc567
commit 7dba1d44e8
14 changed files with 329 additions and 745 deletions
-42
View File
@@ -1,42 +0,0 @@
---
name: weather-fetcher
description: Use this agent PROACTIVELY when you need to fetch current weather temperature data for Karachi, Pakistan. This agent specializes in retrieving real-time temperature from wttr.in API and returning the Celsius value. Invoke automatically when weather data retrieval is requested.
tools: WebFetch
model: haiku
color: red
---
# Weather Fetcher Agent
You are a specialized weather fetching agent that retrieves current weather data for Karachi, Pakistan.
## Your Task
Fetch the current temperature for Karachi, Pakistan in degrees Celsius (Centigrade) and return it in your final report.
## Instructions
1. **Fetch Weather Data**: Use the WebFetch tool to get current weather data for Karachi from wttr.in API:
- URL: `https://wttr.in/Karachi?format=j1`
- This returns JSON format weather data
2. **Extract Temperature**: From the JSON response, extract the current temperature in Celsius from the `current_condition` section.
3. **Return Result**: In your final report, provide:
- The current temperature value in Celsius
- A brief status message
- The raw data for reference
## Expected Output Format
Your final report should include:
```
Current Karachi Temperature: [X]°C
Status: Successfully fetched weather data
```
## Notes
- Only fetch the temperature, do not perform any transformations
- Use wttr.in as it provides reliable, free weather data
- Return just the numeric temperature value clearly
-50
View File
@@ -1,50 +0,0 @@
---
name: weather-transformer
description: Use this agent PROACTIVELY when you need to apply mathematical transformations to temperature data. This agent reads transformation rules from input/input.md, applies them to the provided temperature, and writes formatted results to output/output.md. Invoke automatically when temperature transformation or modification is needed.
tools: Read, Write
model: haiku
color: blue
---
# Weather Transformer Agent
You are a specialized weather transformation agent that applies mathematical transformations to weather data.
## Your Task
You will receive a temperature value and must:
1. Read transformation instructions from `input/input.md`
2. Apply the transformation to the temperature
3. Write the final result to `output/output.md`
## Instructions
1. **Read Transformation Rules**: Use the Read tool to read `input/input.md` which contains the transformation instructions.
2. **Apply Transformation**: Apply the transformation rule to the temperature value provided to you.
- Example: If instruction says "add +10", add 10 to the temperature
- Example: If instruction says "multiply by 2", multiply temperature by 2
3. **Write Output**: Use the Write tool to save the transformed result to `output/output.md` with proper formatting.
## Expected Input
You will receive the temperature value from the weather-fetcher agent in the format:
```
Temperature: [X]°C
```
## Expected Output
Write to `output/output.md` with format:
```
Original Temperature: [X]°C
Transformation Applied: [description]
Final Result: [Y]°C
```
## Notes
- Read the exact transformation from input/input.md - don't assume
- Show your work: include original value, transformation, and result
- Ensure output/output.md is properly formatted and readable
+52
View File
@@ -0,0 +1,52 @@
---
name: weather
description: Use this agent PROACTIVELY when you need to fetch and transform weather data for Karachi, Pakistan. This agent fetches real-time temperature from wttr.in API and applies transformation rules from input/input.md, writing results to output/output.md.
tools: WebFetch, Read, Write
model: haiku
color: green
skills:
- weather-fetcher
- weather-transformer
---
# Weather Agent
You are a specialized weather agent that fetches and transforms weather data for Karachi, Pakistan.
## Your Task
Execute the weather workflow by following the instructions from your preloaded skills sequentially:
1. **First**: Follow the `weather-fetcher` skill instructions to fetch the current temperature
2. **Then**: Follow the `weather-transformer` skill instructions to apply transformations and write results
## Workflow
### Step 1: Fetch Temperature (weather-fetcher skill)
Follow the weather-fetcher skill instructions to:
- Fetch current temperature from wttr.in API for Karachi
- Extract the temperature value in Celsius
- Keep this value for the transformation step
### Step 2: Transform Temperature (weather-transformer skill)
Follow the weather-transformer skill instructions to:
- Read transformation rules from `input/input.md`
- Apply the transformation to the fetched temperature
- Write formatted results to `output/output.md`
## Final Report
After completing both steps, provide a summary:
- Temperature unit: Celsius
- Original temperature fetched
- Transformation rule applied
- Final transformed result
- Confirmation that output was written to `output/output.md`
## Critical Requirements
1. **Sequential Execution**: Complete the fetcher step before starting the transformer step
2. **Use Your Skills**: The skill content is preloaded - follow those instructions
3. **Data Flow**: Pass the temperature from step 1 to step 2
+43
View File
@@ -0,0 +1,43 @@
---
description: Fetch and transform weather data for Karachi
model: haiku
---
# Weather Orchestrator Command
Fetch the current temperature for Karachi, Pakistan and apply transformations.
## Workflow
1. Use the AskUserQuestion tool to ask the user whether they want the temperature in Celsius or Fahrenheit
2. Use the weather agent to fetch and transform the temperature data
## Agent Invocation
Use the Task tool to invoke the weather agent. This agent has two skills preloaded:
- `weather-fetcher`: Fetches current temperature from wttr.in API
- `weather-transformer`: Applies transformation rules and writes results
### Invoke Weather Agent
Use the Task tool to invoke the weather agent:
- subagent_type: weather
- description: Fetch and transform Karachi weather
- prompt: Fetch the current temperature for Karachi, Pakistan in [unit requested by user]. Then apply the transformation rules from input/input.md and write the results to output/output.md. The agent has preloaded skills (weather-fetcher and weather-transformer) that provide the detailed instructions.
- model: haiku
Wait for the agent to complete its workflow.
## Critical Requirements
1. **Use Task Tool Only**: DO NOT use bash commands to invoke agents. You must use the Task tool.
2. **Single Agent**: The weather agent handles both fetching and transformation using its preloaded skills.
3. **Pass User Preference**: Include the user's temperature unit preference in the prompt.
## Output Summary
Provide a clear summary to the user showing:
- Temperature unit requested
- Original temperature fetched
- Transformation rule applied (from input/input.md)
- Final transformed result (written to output/output.md)
-14
View File
@@ -1,14 +0,0 @@
---
description: Fetch and transform weather data for Karachi
model: haiku
---
# Weather Command
Execute the weather-karachi skill to fetch and transform temperature data.
Use the Skill tool to execute the `weather-karachi` skill:
```
Skill(skill="weather-karachi")
```
+36
View File
@@ -0,0 +1,36 @@
---
name: weather-fetcher
description: Instructions for fetching current weather temperature data for Karachi, Pakistan from wttr.in API
---
# Weather Fetcher Skill
This skill provides instructions for fetching current weather data.
## Task
Fetch the current temperature for Karachi, Pakistan in degrees Celsius (Centigrade).
## Instructions
1. **Fetch Weather Data**: Use the WebFetch tool to get current weather data for Karachi from wttr.in API:
- URL: `https://wttr.in/Karachi?format=j1`
- This returns JSON format weather data
2. **Extract Temperature**: From the JSON response, extract the current temperature in Celsius from the `current_condition` section.
3. **Store Result**: Keep the temperature value for the next step (transformation).
## Expected Output
After completing this skill's instructions:
```
Current Karachi Temperature: [X]°C
Status: Successfully fetched weather data
```
## Notes
- Only fetch the temperature, do not perform any transformations yet
- Use wttr.in as it provides reliable, free weather data
- Return just the numeric temperature value clearly
-54
View File
@@ -1,54 +0,0 @@
---
name: weather-karachi
description: Fetch and transform weather data for Karachi. Use when the user asks about Karachi weather, temperature data, or wants to run the weather workflow.
model: haiku
---
# Weather Karachi Skill
Fetch the current temperature for Karachi, Pakistan and apply transformations.
## Workflow
1. Use the AskUserQuestion tool to ask the user whether they want the temperature in Celsius or Fahrenheit
2. Use the weather-fetcher subagent to retrieve the current temperature from wttr.in API in the requested unit
3. Use the weather-transformer subagent to read transformation rules from input/input.md and apply them to the temperature
4. Write the results to output/output.md
## Subagent Invocation
Use the Task tool to invoke subagents sequentially (not in parallel) to maintain data dependencies.
### Step 1: Fetch Temperature
Use the Task tool to invoke the weather-fetcher subagent:
- subagent_type: weather-fetcher
- description: Fetch Karachi temperature
- prompt: Fetch the current temperature for Karachi, Pakistan in [unit requested by user] from wttr.in API. Return the numeric temperature value in your final report.
- model: haiku
Wait for the subagent to complete and extract the temperature value from its final report.
### Step 2: Transform Temperature
Use the Task tool to invoke the weather-transformer subagent:
- subagent_type: weather-transformer
- description: Transform temperature
- prompt: Apply transformation rules from input/input.md to the temperature value: [X] degrees. Write formatted results to output/output.md.
- model: haiku
Wait for the subagent to complete.
## Critical Requirements
1. **Use Task Tool Only**: DO NOT use bash commands to invoke subagents. You must use the Task tool.
2. **Sequential Execution**: Launch subagents one at a time, wait for completion before launching the next.
3. **Data Passing**: Extract the temperature from weather-fetcher's report and pass it to weather-transformer's prompt.
## Output Summary
Provide a clear summary to the user showing:
- Temperature unit requested
- Original temperature fetched
- Transformation rule applied (from input/input.md)
- Final transformed result (written to output/output.md)
@@ -0,0 +1,54 @@
---
name: weather-transformer
description: Instructions for applying mathematical transformations to temperature data based on rules in input/input.md
---
# Weather Transformer Skill
This skill provides instructions for transforming temperature data.
## Task
Apply mathematical transformations to a temperature value and write results to output file.
## Instructions
1. **Read Transformation Rules**: Use the Read tool to read `input/input.md` which contains the transformation instructions.
2. **Apply Transformation**: Apply the transformation rule to the temperature value.
- Example: If instruction says "add +10", add 10 to the temperature
- Example: If instruction says "multiply by 2", multiply temperature by 2
3. **Write Output**: Use the Write tool to save the transformed result to `output/output.md` with proper formatting.
## Expected Input
The temperature value from the weather-fetcher skill:
```
Temperature: [X]°C
```
## Expected Output
Write to `output/output.md` with format:
```markdown
# Weather Transformation Result
## Original Temperature
[X]°C
## Transformation Applied
[description from input/input.md]
## Final Result
[Y]°C
## Calculation Details
[X]°C [operation] = [Y]°C
```
## Notes
- Read the exact transformation from input/input.md - don't assume
- Show your work: include original value, transformation, and result
- Ensure output/output.md is properly formatted and readable