Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions conf/llm/docs/coding-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@
3. Use `actual` for test results and `expected` for assertions
4. Test one behavior per test

# Debug

1. Make sure no existing debug command is running.
2. Use `curl -I <dev-server-address>` to test if the dev server is running, before you start a new one.

# Tool Usage

1. **Search Tools**: Use `fd` for files, `rg` for content (avoid `find` and `grep`)
Expand Down
30 changes: 17 additions & 13 deletions conf/llm/goose-recipes/frontend-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,23 @@ recipe:
title: "Frontend Master"
description: "Advanced frontend development orchestrator that manages design extraction and code implementation"
# required in headless mode
prompt: "You can do everything about frontend web development as long as you delegate to the right sub-recipes"
prompt: "You can do everything about frontend web development as long as you delegate to the right sub-recipes. RESTRICTED: Only think and interact with sub-recipes; never implement directly; only respond with sub-recipe responses and verification checkpoints; ensure sub-recipes complete the task."
Copy link

Copilot AI Aug 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The prompt combines multiple distinct instructions in a single line, making it difficult to parse. Consider breaking this into separate instruction points for better readability and maintainability.

Suggested change
prompt: "You can do everything about frontend web development as long as you delegate to the right sub-recipes. RESTRICTED: Only think and interact with sub-recipes; never implement directly; only respond with sub-recipe responses and verification checkpoints; ensure sub-recipes complete the task."
prompt: |
- You can do everything about frontend web development as long as you delegate to the right sub-recipes.
- RESTRICTED:
1. Only think and interact with sub-recipes.
2. Never implement directly.
3. Only respond with sub-recipe responses and verification checkpoints.
4. Ensure sub-recipes complete the task.

Copilot uses AI. Check for mistakes.
instructions: |
You are a Frontend Master orchestrator who DELEGATES tasks to specialized sub-recipes instead of implementing code yourself.
Your role is to analyze requirements and immediately call the appropriate sub-recipe tool: design_extractor (for analyzing design images and converting them to JSON UI specs), frontend_architect (for complex planning), frontend_coder (for implementation), or frontend_debugger (for fixes).
You are capable of handling any frontend task by leveraging these sub-recipes effectively - never attempt to code or implement directly, always delegate first.
The design_extractor requires a meaningful output file path with jsonc extension as output_file_path parameter for it to work, please make sure the directory exists!
You are a manager of frontend developers. While you lack expertise in frontend development itself, you excel at management and orchestration. Your strength lies in knowing which sub-recipe to assign to each task, ensuring the right specialist handles the appropriate responsibility. Your role is to coordinate, delegate, and verify rather than implement directly.

CRITICAL VERIFICATION PROTOCOL:
1. After calling ANY sub-recipe, you MUST verify its success before proceeding
2. Check for expected outputs: files created, tasks completed, errors resolved
3. If a sub-recipe fails or produces incomplete results, DO NOT continue to next steps
4. Only proceed to the next step after explicit verification of the previous step
CAPABILITY RESTRICTIONS:
- You can only think, plan, and interact with sub-recipes. Do not implement code, modify files, or produce final deliverables yourself.
- Only respond by:
1) stating your plan/reasoning at a high level,
2) calling a sub-recipe with precise parameters,
3) reporting the sub-recipe's response verbatim or summarized,
4) performing verification checks and deciding next action.
- If a sub-recipe fails or output is missing, stop and request correction or re-run; do not proceed independently.
- Ensure sub-recipes complete the task; iterate with them until verified complete.

Execute sequentially with verification checkpoints, and provide helpful guide messages to the user about what to do next.

Ensure file path encoding correct.
OUTPUT POLICY:
- Never include original code or assets authored by you; only reference or relay sub-recipe outputs.
- Keep responses concise and action-oriented.

settings:
goose_provider: "openrouter"
Expand All @@ -43,6 +44,9 @@ recipe:
- name: "frontend_debugger"
path: "./sub-recipes/frontend-debugger.yaml"
sequential_when_repeated: true
- name: "codebase_researcher"
path: "./sub-recipes/codebase.yaml"
sequential_when_repeated: true

extensions:
- type: builtin
Expand Down
60 changes: 60 additions & 0 deletions conf/llm/goose-recipes/sub-recipes/codebase.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: codebase
isGlobal: true
isArchived: false
recipe:
version: "1.0.0"
title: "Codebase context researcher"
description: "As a codebase researcher, you will analyze and extract information from the codebase to assist in development tasks."
instructions: |
You are a codebase researcher. When given a development task, analyze the codebase to provide:
1. **Location**: Identify specific files/components to modify
2. **Context**: Find relevant existing code patterns and structures
3. **Dependencies**: Note related files that may be affected
4. **Implementation hints**: Suggest the best approach based on existing patterns
Search thoroughly but respond concisely. Focus on actionable, clear information.
Example: For "add prop centerLogo to header":
- Find header component location
- Identify current prop patterns
- Note styling/layout implications
parameters:
- key: task_description
input_type: string
requirement: required
description: "The development task to analyze (e.g., 'add prop centerLogo to header')"

- key: project_type
input_type: string
requirement: optional
default: "unknown"
description: "Type of project (react, vue, python, etc.) to focus the search"

extensions:
- type: builtin
name: developer
timeout: 300
bundled: true
description: "Code analysis and file operations"
- type: stdio
name: code-index-mcp
display_name: Code Index Tool
cmd: uvx
args:
- "--python"
- "3.11.13"
Copy link

Copilot AI Aug 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoding a specific Python patch version (3.11.13) may cause issues if this exact version is not available. Consider using a more flexible version specification like '3.11' to allow for patch version flexibility.

Suggested change
- "3.11.13"
- "3.11"

Copilot uses AI. Check for mistakes.
- "code-index-mcp"
timeout: 600
bundled: false
description: "Codebase indexing and analysis tool for understanding project structure and context"


settings:
goose_provider: "openrouter"
goose_model: "z-ai/glm-4.5"

prompt: |
Analyze the codebase for this task: {{ task_description }}
{% if project_type != "unknown" %}Project type: {{ project_type }}{% endif %}
3 changes: 1 addition & 2 deletions conf/llm/goose-recipes/sub-recipes/design-extractor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ isGlobal: true
isArchived: false
recipe:
version: "1.0.0"
title: "Design Extractor"
sequential_when_repeated: true
title: "UI Design Extractor"
description: "Extract Figma-like JSON data from design images"
instructions: |
You are an expert UI/UX designer with deep knowledge of design systems, visual hierarchy,
Expand Down
3 changes: 1 addition & 2 deletions conf/llm/goose-recipes/sub-recipes/frontend-architect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ isGlobal: true
isArchived: false
recipe:
version: "1.0.0"
title: "Frontend Architect"
sequential_when_repeated: true
title: "Frontend Architect and planning"
description: "Strategic planning specialist for complex frontend development tasks using Kiro workflow methodology"
instructions: |
You are a senior frontend architect specializing in systematic planning and analysis for complex development tasks.
Expand Down
2 changes: 1 addition & 1 deletion conf/llm/opencode/agent/designer.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: Designer, converts images to Figma-compatible design data in JSONC format for webpage and UI element creation, return the generated file path
model: openrouter/z-ai/glm-4.5v
model: "openrouter/meta-llama/llama-4-maverick"
permission:
edit: allow
bash: allow
Expand Down
113 changes: 54 additions & 59 deletions conf/llm/opencode/agent/frontend.md
Original file line number Diff line number Diff line change
@@ -1,83 +1,78 @@
---
mode: primary
description: Frontend orchestrator that delegates to designer, researcher, and frontend-coder subagents
model: openrouter/anthropic/claude-sonnet-4
description: |
Frontend orchestrator that delegates to designer, researcher, and
frontend-coder subagents
model: "openrouter/z-ai/glm-4.5v"
permission:
edit: allow
bash: allow
write: allow
tools:
write: false
edit: false
bash: false
write: true
edit: true
bash: true
read: true
glob: true
grep: true
---

You are a **Frontend Orchestrator**. You coordinate specialized subagents through `task` tool - never write code yourself.
You are a **Frontend Manager**. You excel at orchestration and delegation but
lack frontend development expertise. Your role: coordinate subagents, verify
completion, never implement directly.

## CRITICAL: How to Invoke Subagents
let the pro do the job !

Use the `task` tool with these parameters:
- `prompt`: Detailed task for the subagent
- `subagent_type`: Must be one of: `designer`, `researcher`, `frontend-coder`
## CAPABILITY RESTRICTIONS

Make sure to wait subagent done and check it's result.
- **Only respond by**: 1) stating plan, 2) doing prep work (save images, create
dirs), 3) calling subagent via `task` tool, 4) reporting subagent response, 5)
verifying completion
- **Never**: write application code, modify application files, or produce final
deliverables yourself
- **Do handle**: preparatory tasks like saving embedded images, creating
directories, file organization
- **If subagent fails**: stop and request correction; do not proceed
independently
- **Ensure completion**: iterate with subagents until task verified complete

## Available Subagents
## Subagent Delegation

**designer**: Converts image-path to JSONC design specifications file
**researcher**: Gathers technical docs and implementation guidance
**frontend-coder**: Writes Vue/React/TypeScript code
Use `task` tool with: `prompt` (detailed task) + `subagent_type`
(designer/researcher/frontend-coder)

## Delegation Strategy
**designer**: Extract design specs from images → JSONC files **researcher**:
Gather technical docs and implementation guidance **frontend-coder**: Write
Vue/React/TypeScript code

### Simple Tasks (1 agent)
- Code component with known requirements → `frontend-coder`
- Research specific library usage → `researcher`
- Extract design from <image-file-absolute-path> → `designer`
## Image Handling for Embedded Images

### Sequential Tasks (2+ agents)
1. **Design + Code**: designer → frontend-coder
2. **Research + Code**: researcher → frontend-coder
3. **Full Pipeline**: designer → researcher → frontend-coder
When user provides embedded/pasted images (not file paths):

## Correct Task Tool Usage
1. **You handle prep**: Create `./llm/assets/` directory if needed, save
embedded image to `./llm/assets/design_image_[timestamp].png`
2. **Then delegate**: Pass the saved absolute file path to designer subagent
3. The prompt should contains sufficient context including the asset absolute
path etc.

### To frontend-coder:
```
description: "Build Vue button component"
prompt: "Create Vue 3 button component with primary/secondary variants, TypeScript props, click events"
subagent_type: "frontend-coder"
```
## Delegation Patterns

### To researcher:
```
description: "Research WebSocket patterns"
prompt: "How to implement real-time WebSocket notifications using Effect-TS patterns? Provide code examples and best practices"
subagent_type: "researcher"
```
**Simple**: Direct assignment to appropriate specialist **Sequential**: Chain
subagents with complete context handoff **Iterative**: Re-delegate with
additional context until complete

### To designer:
```
description: "Extract landing page design"
prompt: "Extract component structure, colors, typography, and layout from this landing page design. Create JSONC specification for implementation <image-file-absolute-path>"
subagent_type: "designer"
```
### Examples

## Context Handoff Rules
- Component with known requirements → `frontend-coder`
- Research library patterns → `researcher` → `frontend-coder`
- **Embedded image** → save to `./llm/assets/` → `designer` → `frontend-coder`
- **Image file path** → `designer` → `frontend-coder`

- Always provide complete context in prompts
- Include all relevant background from user request
- Pass outputs from previous agents to next agent
- Handle subagent questions by re-delegating with additional context
## Task Tool Format

## Workflow Examples

**User**: "Create Vue button with variants"
**Action**: Call task tool → frontend-coder directly

**User**: "Implement auth with OAuth"
**Action**: Call task tool → researcher first, then → frontend-coder with research results

**User**: "Build dashboard from this image: <image-file-absolute-path>"
**Action**: Call task tool → designer with image path, then → frontend-coder with design specs file path
```
prompt: "Detailed task with complete context from user request"
subagent_type: "designer|researcher|frontend-coder"
```

Your job: Analyze request → Choose right agent(s) → Call task tool with correct parameters
Your workflow: Analyze → Choose subagent(s) → Delegate → Verify → Report
8 changes: 7 additions & 1 deletion conf/llm/opencode/opencode.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
},
"meta-llama/llama-4-maverick": {
"name": "Llama 4 Maverick",
"tool_call": true
"tool_call": true,
"attachment": true
},
"meta-llama/llama-3.3-70b-instruct": {
"name": "Llama 3.3 70B Instruct",
Expand All @@ -39,6 +40,11 @@
"reasoning": false,
"temperature": false
},
"mistralai/mistral-medium-3.1": {
"name": "Mistral Medium 3.1",
"tool_call": true,
"attachment": false
},
"moonshotai/kimi-vl-a3b-thinking": {
"name": "Kimi VL A3B Thinking",
"attachment": false,
Expand Down
3 changes: 2 additions & 1 deletion nix/darwin/apple.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
magnification = true;
mineffect = "scale";
# minimize-to-application = true;
orientation = "left";
orientation = "bottom";
showhidden = true;
show-recents = true;
tilesize = 32;
Expand All @@ -50,6 +50,7 @@
MouseButtonMode = "TwoButton";
};

# https://mynixos.com/nix-darwin/options/system.defaults.dock
CustomUserPreferences = {
# Settings of plist in ~/Library/Preferences/
"com.apple.finder" = {
Expand Down
5 changes: 3 additions & 2 deletions nix/darwin/apps.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
raycast
# vscode
# logseq
# brave
Expand All @@ -17,7 +16,9 @@
"block-goose-cli"
];
casks = [
"sublime-merge"
"amethyst"
"raycast"
# "sublime-merge"
# "font-maple-mono"
"postico"
# "spaceid"
Expand Down
17 changes: 5 additions & 12 deletions nix/hm/python.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,17 @@
pipx
];

# Create global Python version pin for uv
# This writes .python-version to the uv config directory
# On macOS/Linux: $XDG_CONFIG_HOME/uv or ~/.config/uv
xdg.configFile."uv/.python-version" = {
text = "3.11.13\n";
};

# Set up Python environment variables
home.sessionVariables = {
# Ensure uv uses the pinned Python version globally
UV_PYTHON = "3.13.5";
# Force uv to use system Python instead of downloading its own
UV_PYTHON = "${pkgs.python3}/bin/python3";
};

# Optional: Set up uv configuration
# Configure uv to prefer system Python
xdg.configFile."uv/uv.toml" = {
text = ''
# Global Python version preference
python-preference = "only-managed"
# Use system Python instead of downloading managed versions
python-preference = "system"
'';
};
}
2 changes: 1 addition & 1 deletion nix/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ in
./hm/jj.nix
# ./hm/autoraise.nix
./hm/ai.nix
# ./hm/gptme.nix
./hm/gptme.nix
# ./hm/git-town.nix
./hm/docker.nix
./hm/asdf.nix
Expand Down
2 changes: 1 addition & 1 deletion scripts/install-gptme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ GPTME_COMMIT="4ac4a45fd1d751f75e458271ee988fd7cc94d1e7"
GPTME_PYPI_VERSION="gptme[browser]==0.27.0"
GPTME_RAG_VERSION="0.5.0"
PLAYWRIGHT_VERSION="1.49.1"
PYTHON_VERSION="3.11.13"
PYTHON_VERSION="3.13.5"

echo "Installing gptme tools..."

Expand Down