opencodekit 0.3.3 → 0.5.0

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 (36) hide show
  1. package/dist/index.js +10 -1
  2. package/dist/template/.opencode/AGENTS.md +78 -55
  3. package/dist/template/.opencode/agent/build.md +20 -0
  4. package/dist/template/.opencode/agent/rush.md +27 -15
  5. package/dist/template/.opencode/agent/vision.md +95 -60
  6. package/dist/template/.opencode/command/accessibility-check.md +66 -0
  7. package/dist/template/.opencode/command/analyze-mockup.md +43 -0
  8. package/dist/template/.opencode/command/design-audit.md +53 -0
  9. package/dist/template/.opencode/command/edit-image.md +40 -0
  10. package/dist/template/.opencode/command/generate-diagram.md +48 -0
  11. package/dist/template/.opencode/command/generate-icon.md +40 -0
  12. package/dist/template/.opencode/command/generate-image.md +27 -0
  13. package/dist/template/.opencode/command/generate-pattern.md +41 -0
  14. package/dist/template/.opencode/command/generate-storyboard.md +41 -0
  15. package/dist/template/.opencode/command/init.md +176 -0
  16. package/dist/template/.opencode/command/new-feature.md +137 -0
  17. package/dist/template/.opencode/command/research-ui.md +34 -27
  18. package/dist/template/.opencode/command/restore-image.md +39 -0
  19. package/dist/template/.opencode/command/revert-feature.md +127 -0
  20. package/dist/template/.opencode/command/ui-review.md +26 -34
  21. package/dist/template/.opencode/memory/project/README.md +59 -0
  22. package/dist/template/.opencode/memory/project/architecture.md +26 -0
  23. package/dist/template/.opencode/memory/project/commands.md +26 -0
  24. package/dist/template/.opencode/memory/project/conventions.md +26 -0
  25. package/dist/template/.opencode/memory/project/gotchas.md +26 -0
  26. package/dist/template/.opencode/memory/user.example.md +21 -0
  27. package/dist/template/.opencode/memory/user.md +21 -0
  28. package/dist/template/.opencode/opencode.json +475 -457
  29. package/dist/template/.opencode/package.json +1 -2
  30. package/dist/template/.opencode/skills/accessibility-audit/SKILL.md +180 -0
  31. package/dist/template/.opencode/skills/design-system-audit/SKILL.md +141 -0
  32. package/dist/template/.opencode/skills/frontend-aesthetics/SKILL.md +40 -65
  33. package/dist/template/.opencode/skills/mockup-to-code/SKILL.md +158 -0
  34. package/dist/template/.opencode/skills/ui-ux-research/SKILL.md +60 -131
  35. package/dist/template/.opencode/skills/visual-analysis/SKILL.md +130 -0
  36. package/package.json +1 -1
@@ -0,0 +1,127 @@
1
+ ---
2
+ description: Smart git-aware revert for a bead/feature
3
+ argument-hint: "<bead-id> [--phase=N] [--task=N] [--soft]"
4
+ agent: build
5
+ model: proxypal/gemini-3-flash-preview
6
+ ---
7
+
8
+ # Revert Feature: $ARGUMENTS
9
+
10
+ Intelligently revert changes for a bead with git awareness.
11
+
12
+ ## Instructions
13
+
14
+ Parse from `$ARGUMENTS`:
15
+
16
+ - Bead ID (required)
17
+ - `--phase=N`: Revert only specific phase
18
+ - `--task=N`: Revert only specific task
19
+ - `--soft`: Stage reverts without committing
20
+
21
+ ## Workflow
22
+
23
+ ### Step 1: Analyze Bead History
24
+
25
+ ```bash
26
+ bd show [bead-id] --history
27
+ ```
28
+
29
+ Identify:
30
+
31
+ - All commits associated with this bead
32
+ - Files changed per phase/task
33
+ - Current phase and task
34
+
35
+ ### Step 2: Determine Revert Scope
36
+
37
+ **Full revert (no flags):**
38
+
39
+ - All commits for this bead
40
+ - Reset bead status to initial
41
+
42
+ **Phase revert (--phase=N):**
43
+
44
+ - Only commits tagged with phase N
45
+ - Reset bead to previous phase
46
+
47
+ **Task revert (--task=N):**
48
+
49
+ - Only commits for specific task
50
+ - Keep bead in current phase
51
+
52
+ ### Step 3: Git Analysis
53
+
54
+ ```bash
55
+ # Find commits for this bead
56
+ git log --oneline --all --grep="[bead-id]"
57
+
58
+ # Show files that would be affected
59
+ git diff --stat [commit-range]
60
+ ```
61
+
62
+ Present:
63
+
64
+ - Commits to revert
65
+ - Files affected
66
+ - Potential conflicts
67
+
68
+ ### Step 4: Confirm and Execute
69
+
70
+ Ask for confirmation before reverting.
71
+
72
+ **Hard revert (default):**
73
+
74
+ ```bash
75
+ git revert --no-commit [commits...]
76
+ git commit -m "revert: [bead-id] [scope]"
77
+ ```
78
+
79
+ **Soft revert (--soft):**
80
+
81
+ ```bash
82
+ git revert --no-commit [commits...]
83
+ # Leave changes staged for review
84
+ ```
85
+
86
+ ### Step 5: Update Bead
87
+
88
+ ```bash
89
+ bd update [bead-id] --status reverted --note "Reverted [scope]"
90
+ ```
91
+
92
+ ## Safety Checks
93
+
94
+ Before reverting:
95
+
96
+ - [ ] Check for uncommitted changes
97
+ - [ ] Verify bead exists and has commits
98
+ - [ ] Check for dependent beads
99
+ - [ ] Identify potential merge conflicts
100
+
101
+ If conflicts detected:
102
+
103
+ 1. List conflicting files
104
+ 2. Offer to abort or continue with manual resolution
105
+ 3. Provide conflict resolution guidance
106
+
107
+ ## Output
108
+
109
+ Report:
110
+
111
+ - Commits reverted
112
+ - Files restored
113
+ - Bead status updated
114
+ - Next steps
115
+
116
+ ## Related Commands
117
+
118
+ ```bash
119
+ # View bead history
120
+ bd show [bead-id] --history
121
+
122
+ # Check current status
123
+ bd status
124
+
125
+ # Re-implement after revert
126
+ /implement [bead-id]
127
+ ```
@@ -1,52 +1,44 @@
1
1
  ---
2
- description: Review UI/UX design or mockup with optional bead tracking
3
- argument-hint: "[bead-id] [path to image or component]"
2
+ description: Review UI/UX design for quality and aesthetics
3
+ argument-hint: "<image-or-component-path> [bead-id]"
4
4
  agent: vision
5
+ model: proxypal/gemini-3-pro-preview
5
6
  ---
6
7
 
7
8
  # UI Review: $ARGUMENTS
8
9
 
9
- use_skill("ui-ux-research")
10
10
  use_skill("frontend-aesthetics")
11
+ use_skill("visual-analysis")
11
12
 
12
- ## Parse Arguments
13
+ Review UI/UX design for quality, aesthetics, and best practices.
13
14
 
14
- Extract bead ID (if provided) and path/component from `$ARGUMENTS`. If a bead ID is present, findings will be recorded to the bead.
15
+ ## Instructions
15
16
 
16
- ## How to Analyze
17
+ Parse image/component path and optional bead ID from `$ARGUMENTS`.
17
18
 
18
- First, determine what you're reviewing. If it's an image or screenshot, start Gemini in interactive mode and reference the image to analyze it. If it's component code, analyze it directly with local tools. For large codebases spanning many files, use Gemini's non-interactive mode to scan the entire directory.
19
+ ## What to Evaluate
19
20
 
20
- ## What to Look For
21
+ 1. **Typography** - Avoid generic fonts (Inter/Roboto without purpose)
22
+ 2. **Colors** - Check for overused AI patterns (purple gradients, flat white)
23
+ 3. **Layout** - Hierarchy, spacing, visual rhythm
24
+ 4. **Motion** - Micro-interactions, transitions
25
+ 5. **Atmosphere** - Texture, depth, personality
26
+ 6. **Accessibility** - Contrast, focus states, ARIA
21
27
 
22
- Check typography first—generic fonts like Inter or Roboto are signs of "AI slop" aesthetics. Look at the color palette for overused patterns like purple gradients or flat white backgrounds. Assess whether the UI has any motion or micro-interactions, and whether backgrounds feel atmospheric or just flat.
28
+ ## Anti-Patterns to Flag
23
29
 
24
- For accessibility, verify color contrast meets WCAG AA minimum, check for ARIA labels on interactive elements, ensure keyboard navigation works, and confirm focus indicators are visible.
30
+ - Cookie-cutter card layouts
31
+ - Excessive rounded corners
32
+ - Glassmorphism without purpose
33
+ - Generic stock illustration style
25
34
 
26
- ## Recommendations
27
-
28
- Provide specific, actionable improvements: suggest alternative fonts, propose color palette changes, identify opportunities for subtle animations, and recommend layout enhancements. Include code snippets when they would help clarify the suggestion.
29
-
30
- ## Record Findings
31
-
32
- ### With Bead ID
33
-
34
- Update the bead with review findings:
35
-
36
- ```bash
37
- bd edit <bead-id> --note "UI Review: <summary of issues found and recommendations>"
38
- ```
39
-
40
- If review reveals implementation tasks, create child beads:
41
-
42
- ```bash
43
- bd create --title "<specific UI fix>" --type task --parent <bead-id>
44
- ```
45
-
46
- ### Without Bead ID
35
+ ## Output
47
36
 
48
- Output findings directly to the user.
37
+ Provide:
49
38
 
50
- ## Output
39
+ 1. Summary of issues found
40
+ 2. Specific actionable recommendations
41
+ 3. Code snippets for improvements
42
+ 4. Before/after suggestions
51
43
 
52
- Summarize what issues you found, what specific changes you recommend, and show before/after comparisons for significant improvements.
44
+ If bead ID provided, record findings to the bead.
@@ -0,0 +1,59 @@
1
+ ---
2
+ purpose: Persistent project knowledge that survives across sessions
3
+ updated: 2024-12-21
4
+ ---
5
+
6
+ # Project Memory
7
+
8
+ This directory stores persistent project knowledge that agents use across sessions.
9
+
10
+ ## Standard Files
11
+
12
+ | File | Purpose | Update When |
13
+ | ----------------- | --------------------------------------- | ----------------------- |
14
+ | `commands.md` | Build, test, lint, deploy commands | Discover new command |
15
+ | `conventions.md` | Code patterns, commit style, PR process | Learn team pattern |
16
+ | `gotchas.md` | Footguns, edge cases, warnings | Hit unexpected behavior |
17
+ | `architecture.md` | Key modules, directory structure | Map new area |
18
+
19
+ ## File Format
20
+
21
+ Each file uses YAML frontmatter:
22
+
23
+ ```yaml
24
+ ---
25
+ purpose: How this memory should influence agent behavior
26
+ updated: YYYY-MM-DD
27
+ ---
28
+ ```
29
+
30
+ ## How Agents Use This
31
+
32
+ - **Session start**: Agents read relevant memory files for context
33
+ - **During work**: Agents update files when learning new information
34
+ - **Session end**: Critical learnings persisted here survive context reset
35
+
36
+ ## Integration
37
+
38
+ ### With Commands
39
+
40
+ - `/implement` - Reads conventions for code style
41
+ - `/setup-project` - Populates these files initially
42
+ - `/review-codebase` - Checks against conventions
43
+
44
+ ### With Beads
45
+
46
+ ```bash
47
+ bd new feature "Add auth" --context .opencode/memory/project/
48
+ ```
49
+
50
+ ## Philosophy
51
+
52
+ **Don't rely on implicit learning.** When agents discover:
53
+
54
+ - Non-obvious behavior → Update `gotchas.md`
55
+ - New commands → Update `commands.md`
56
+ - Code patterns → Update `conventions.md`
57
+ - Architecture insights → Update `architecture.md`
58
+
59
+ Explicit memory beats hoping the agent remembers.
@@ -0,0 +1,26 @@
1
+ ---
2
+ purpose: Key modules, directory structure, architectural decisions
3
+ updated: 2024-12-21
4
+ ---
5
+
6
+ # Project Architecture
7
+
8
+ ## Directory Structure
9
+
10
+ <!-- Key directories and their purpose -->
11
+
12
+ ## Key Modules
13
+
14
+ <!-- Core files/modules and what they do -->
15
+
16
+ ## Data Flow
17
+
18
+ <!-- How data moves through the system -->
19
+
20
+ ## External Dependencies
21
+
22
+ <!-- Critical third-party services, APIs -->
23
+
24
+ ## Architectural Decisions
25
+
26
+ <!-- Why things are structured this way -->
@@ -0,0 +1,26 @@
1
+ ---
2
+ purpose: Build, test, lint, deploy commands discovered for this project
3
+ updated: 2024-12-21
4
+ ---
5
+
6
+ # Project Commands
7
+
8
+ ## Build
9
+
10
+ <!-- npm run build, make, cargo build, etc. -->
11
+
12
+ ## Test
13
+
14
+ <!-- npm test, pytest, cargo test, etc. -->
15
+
16
+ ## Lint
17
+
18
+ <!-- npm run lint, ruff check, etc. -->
19
+
20
+ ## Deploy
21
+
22
+ <!-- Deployment commands if applicable -->
23
+
24
+ ## Other
25
+
26
+ <!-- Project-specific commands worth remembering -->
@@ -0,0 +1,26 @@
1
+ ---
2
+ purpose: Code patterns, commit style, PR process, team conventions
3
+ updated: 2024-12-21
4
+ ---
5
+
6
+ # Project Conventions
7
+
8
+ ## Code Style
9
+
10
+ <!-- Naming conventions, formatting rules, import ordering -->
11
+
12
+ ## Commit Messages
13
+
14
+ <!-- Conventional commits? Prefix style? -->
15
+
16
+ ## PR Process
17
+
18
+ <!-- Review requirements, CI checks, merge strategy -->
19
+
20
+ ## Patterns to Follow
21
+
22
+ <!-- Recurring patterns in this codebase -->
23
+
24
+ ## Patterns to Avoid
25
+
26
+ <!-- Anti-patterns specific to this project -->
@@ -0,0 +1,26 @@
1
+ ---
2
+ purpose: Footguns, edge cases, and "don't forget this" warnings
3
+ updated: 2024-12-21
4
+ ---
5
+
6
+ # Project Gotchas
7
+
8
+ ## Code That Looks Right But Breaks
9
+
10
+ <!-- Subtle bugs, misleading APIs -->
11
+
12
+ ## Non-Obvious Dependencies
13
+
14
+ <!-- Hidden coupling, initialization order -->
15
+
16
+ ## Configuration Quirks
17
+
18
+ <!-- Environment variables, config files that bite -->
19
+
20
+ ## Time Wasters
21
+
22
+ <!-- Things that will waste 2+ hours if you forget -->
23
+
24
+ ## Platform-Specific Issues
25
+
26
+ <!-- macOS vs Linux, Node versions, etc. -->
@@ -0,0 +1,21 @@
1
+ ---
2
+ purpose: User identity, preferences, communication style
3
+ updated: 2024-12-21
4
+ ---
5
+
6
+ # User Profile
7
+
8
+ ## Identity
9
+ <!-- Name, role, git contributor identity -->
10
+
11
+ ## Communication Preferences
12
+ <!-- Concise vs detailed, tone preferences -->
13
+
14
+ ## Workflow Preferences
15
+ <!-- Preferred tools, testing habits, review style -->
16
+
17
+ ## Technical Preferences
18
+ <!-- Languages, frameworks, patterns they favor -->
19
+
20
+ ## Things to Remember
21
+ <!-- Personal quirks, pet peeves, preferences learned -->
@@ -0,0 +1,21 @@
1
+ ---
2
+ purpose: User identity, preferences, communication style
3
+ updated: 2024-12-21
4
+ ---
5
+
6
+ # User Profile
7
+
8
+ ## Identity
9
+ <!-- Name, role, git contributor identity -->
10
+
11
+ ## Communication Preferences
12
+ <!-- Concise vs detailed, tone preferences -->
13
+
14
+ ## Workflow Preferences
15
+ <!-- Preferred tools, testing habits, review style -->
16
+
17
+ ## Technical Preferences
18
+ <!-- Languages, frameworks, patterns they favor -->
19
+
20
+ ## Things to Remember
21
+ <!-- Personal quirks, pet peeves, preferences learned -->