opencodekit 0.21.10 → 0.23.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 (213) hide show
  1. package/README.md +1 -1
  2. package/dist/index.js +4 -25
  3. package/dist/template/.opencode/.template-manifest.json +115 -188
  4. package/dist/template/.opencode/AGENTS.md +127 -484
  5. package/dist/template/.opencode/README.md +2 -2
  6. package/dist/template/.opencode/agent/build.md +158 -356
  7. package/dist/template/.opencode/agent/explore.md +0 -1
  8. package/dist/template/.opencode/agent/plan.md +7 -16
  9. package/dist/template/.opencode/agent/review.md +0 -1
  10. package/dist/template/.opencode/agent/scout.md +2 -3
  11. package/dist/template/.opencode/agent/vision.md +0 -1
  12. package/dist/template/.opencode/artifacts/.active +1 -0
  13. package/dist/template/.opencode/artifacts/example/plan.md +12 -0
  14. package/dist/template/.opencode/artifacts/example/progress.md +4 -0
  15. package/dist/template/.opencode/artifacts/example/research.md +4 -0
  16. package/dist/template/.opencode/artifacts/example/spec.md +16 -0
  17. package/dist/template/.opencode/artifacts/todo.md +5 -0
  18. package/dist/template/.opencode/artifacts/verify.log +4 -0
  19. package/dist/template/.opencode/command/clarify.md +46 -0
  20. package/dist/template/.opencode/command/commit.md +53 -0
  21. package/dist/template/.opencode/command/create.md +29 -71
  22. package/dist/template/.opencode/command/design.md +1 -2
  23. package/dist/template/.opencode/command/explore.md +3 -4
  24. package/dist/template/.opencode/command/fix.md +55 -0
  25. package/dist/template/.opencode/command/improve-architecture.md +55 -0
  26. package/dist/template/.opencode/command/init.md +86 -69
  27. package/dist/template/.opencode/command/plan.md +30 -60
  28. package/dist/template/.opencode/command/pr.md +10 -28
  29. package/dist/template/.opencode/command/refactor.md +65 -0
  30. package/dist/template/.opencode/command/research.md +7 -29
  31. package/dist/template/.opencode/command/review-codebase.md +6 -13
  32. package/dist/template/.opencode/command/ship.md +136 -78
  33. package/dist/template/.opencode/command/test.md +66 -0
  34. package/dist/template/.opencode/command/ui-review.md +2 -4
  35. package/dist/template/.opencode/command/verify.md +15 -23
  36. package/dist/template/.opencode/dcp.jsonc +96 -85
  37. package/dist/template/.opencode/memory/README.md +4 -6
  38. package/dist/template/.opencode/memory/_templates/adr.md +45 -0
  39. package/dist/template/.opencode/memory/_templates/prd.md +1 -1
  40. package/dist/template/.opencode/memory/_templates/roadmap.md +1 -1
  41. package/dist/template/.opencode/memory/_templates/state.md +1 -1
  42. package/dist/template/.opencode/memory/project/gotchas.md +4 -4
  43. package/dist/template/.opencode/memory/project/project.md +2 -2
  44. package/dist/template/.opencode/memory/project/roadmap.md +1 -1
  45. package/dist/template/.opencode/memory/project/state.md +2 -2
  46. package/dist/template/.opencode/memory/project/tech-stack.md +2 -2
  47. package/dist/template/.opencode/memory/session-context.md +1 -1
  48. package/dist/template/.opencode/opencode.json +14 -152
  49. package/dist/template/.opencode/plugin/README.md +2 -2
  50. package/dist/template/.opencode/plugin/guard.ts +62 -0
  51. package/dist/template/.opencode/plugin/{lib/memory-admin-tools.ts → memory/admin.ts} +4 -4
  52. package/dist/template/.opencode/plugin/{lib → memory}/capture.ts +1 -1
  53. package/dist/template/.opencode/plugin/{lib → memory}/compile.ts +2 -2
  54. package/dist/template/.opencode/plugin/{lib → memory}/context.ts +1 -1
  55. package/dist/template/.opencode/plugin/{lib → memory}/curator.ts +1 -1
  56. package/dist/template/.opencode/plugin/{lib → memory}/db/observations.ts +102 -3
  57. package/dist/template/.opencode/plugin/{lib → memory}/db/schema.ts +43 -1
  58. package/dist/template/.opencode/plugin/{lib → memory}/db/types.ts +22 -0
  59. package/dist/template/.opencode/plugin/{lib/memory-db.ts → memory/db.ts} +1 -1
  60. package/dist/template/.opencode/plugin/{lib → memory}/distill.ts +1 -1
  61. package/dist/template/.opencode/plugin/{lib/memory-helpers.ts → memory/helpers.ts} +5 -1
  62. package/dist/template/.opencode/plugin/{lib/memory-hooks.ts → memory/hooks.ts} +1 -1
  63. package/dist/template/.opencode/plugin/{lib → memory}/index-generator.ts +2 -2
  64. package/dist/template/.opencode/plugin/{lib → memory}/inject.ts +1 -1
  65. package/dist/template/.opencode/plugin/{lib → memory}/lint.ts +2 -2
  66. package/dist/template/.opencode/plugin/memory/tools.ts +322 -0
  67. package/dist/template/.opencode/plugin/{lib → memory}/validate.ts +2 -2
  68. package/dist/template/.opencode/plugin/memory.ts +7 -17
  69. package/dist/template/.opencode/plugin/srcwalk.ts +721 -0
  70. package/dist/template/.opencode/skill/agent-code-quality-gate/SKILL.md +98 -0
  71. package/dist/template/.opencode/skill/behavioral-kernel/SKILL.md +52 -0
  72. package/dist/template/.opencode/skill/brainstorming/SKILL.md +1 -1
  73. package/dist/template/.opencode/skill/browser-testing-with-devtools/SKILL.md +85 -0
  74. package/dist/template/.opencode/skill/code-cleanup/SKILL.md +114 -0
  75. package/dist/template/.opencode/skill/code-navigation/SKILL.md +142 -0
  76. package/dist/template/.opencode/skill/code-review-and-quality/SKILL.md +131 -0
  77. package/dist/template/.opencode/skill/context-engineering/SKILL.md +1 -1
  78. package/dist/template/.opencode/skill/debugging-and-error-recovery/SKILL.md +109 -0
  79. package/dist/template/.opencode/skill/deep-module-design/SKILL.md +207 -0
  80. package/dist/template/.opencode/skill/development-lifecycle/SKILL.md +26 -45
  81. package/dist/template/.opencode/skill/gemini-large-context/SKILL.md +4 -4
  82. package/dist/template/.opencode/skill/git-workflow-and-versioning/SKILL.md +77 -0
  83. package/dist/template/.opencode/skill/grill-me/SKILL.md +140 -0
  84. package/dist/template/.opencode/skill/memory-system/SKILL.md +9 -10
  85. package/dist/template/.opencode/skill/opensrc/references/example-workflow.md +1 -1
  86. package/dist/template/.opencode/skill/planning-and-task-breakdown/SKILL.md +116 -0
  87. package/dist/template/.opencode/skill/shipping-and-launch/SKILL.md +95 -0
  88. package/dist/template/.opencode/skill/source-driven-development/SKILL.md +103 -0
  89. package/dist/template/.opencode/skill/spec-driven-development/SKILL.md +121 -0
  90. package/dist/template/.opencode/skill/srcwalk/SKILL.md +161 -0
  91. package/dist/template/.opencode/skill/subagent-driven-development/SKILL.md +1 -1
  92. package/dist/template/.opencode/skill/ubiquitous-language/SKILL.md +184 -0
  93. package/dist/template/.opencode/skill/using-git-worktrees/SKILL.md +6 -6
  94. package/dist/template/.opencode/skill/verification-before-completion/SKILL.md +6 -6
  95. package/dist/template/.opencode/skill/verification-before-completion/references/VERIFICATION_PROTOCOL.md +5 -5
  96. package/package.json +76 -76
  97. package/dist/template/.opencode/AGENT_ALIGNMENT.md +0 -564
  98. package/dist/template/.opencode/agent/painter.md +0 -83
  99. package/dist/template/.opencode/command/compound.md +0 -240
  100. package/dist/template/.opencode/command/curate.md +0 -299
  101. package/dist/template/.opencode/command/handoff.md +0 -149
  102. package/dist/template/.opencode/command/health.md +0 -356
  103. package/dist/template/.opencode/command/init-context.md +0 -297
  104. package/dist/template/.opencode/command/init-user.md +0 -125
  105. package/dist/template/.opencode/command/iterate.md +0 -200
  106. package/dist/template/.opencode/command/lfg.md +0 -173
  107. package/dist/template/.opencode/command/resume.md +0 -78
  108. package/dist/template/.opencode/command/status.md +0 -126
  109. package/dist/template/.opencode/command/ui-slop-check.md +0 -169
  110. package/dist/template/.opencode/plans/1768385996691-silent-wizard.md +0 -247
  111. package/dist/template/.opencode/plans/1770006237537-mighty-otter.md +0 -418
  112. package/dist/template/.opencode/plans/1770006913647-glowing-forest.md +0 -170
  113. package/dist/template/.opencode/plans/1770013678126-witty-planet.md +0 -278
  114. package/dist/template/.opencode/plans/1770112267595-shiny-rocket.md +0 -258
  115. package/dist/template/.opencode/plans/swarm-protocol.md +0 -123
  116. package/dist/template/.opencode/plugin/lib/memory-tools.ts +0 -535
  117. package/dist/template/.opencode/skill/agent-evals/SKILL.md +0 -208
  118. package/dist/template/.opencode/skill/anti-ai-slop/SKILL.md +0 -76
  119. package/dist/template/.opencode/skill/augment-context-engine/SKILL.md +0 -122
  120. package/dist/template/.opencode/skill/augment-context-engine/mcp.json +0 -6
  121. package/dist/template/.opencode/skill/beads/SKILL.md +0 -182
  122. package/dist/template/.opencode/skill/beads/references/BEST_PRACTICES.md +0 -27
  123. package/dist/template/.opencode/skill/beads/references/BOUNDARIES.md +0 -219
  124. package/dist/template/.opencode/skill/beads/references/DEPENDENCIES.md +0 -124
  125. package/dist/template/.opencode/skill/beads/references/EXAMPLES.md +0 -45
  126. package/dist/template/.opencode/skill/beads/references/FILE_CLAIMING.md +0 -101
  127. package/dist/template/.opencode/skill/beads/references/GIT_SYNC.md +0 -25
  128. package/dist/template/.opencode/skill/beads/references/HIERARCHY.md +0 -71
  129. package/dist/template/.opencode/skill/beads/references/MULTI_AGENT.md +0 -40
  130. package/dist/template/.opencode/skill/beads/references/RESUMABILITY.md +0 -177
  131. package/dist/template/.opencode/skill/beads/references/SESSION_PROTOCOL.md +0 -61
  132. package/dist/template/.opencode/skill/beads/references/TASK_CREATION.md +0 -38
  133. package/dist/template/.opencode/skill/beads/references/TROUBLESHOOTING.md +0 -38
  134. package/dist/template/.opencode/skill/beads/references/WORKFLOWS.md +0 -226
  135. package/dist/template/.opencode/skill/brand-asset-protocol/SKILL.md +0 -222
  136. package/dist/template/.opencode/skill/code-search-patterns/SKILL.md +0 -224
  137. package/dist/template/.opencode/skill/code-simplification/SKILL.md +0 -211
  138. package/dist/template/.opencode/skill/context-condensation/SKILL.md +0 -149
  139. package/dist/template/.opencode/skill/context-initialization/SKILL.md +0 -69
  140. package/dist/template/.opencode/skill/context-management/SKILL.md +0 -390
  141. package/dist/template/.opencode/skill/deep-research/SKILL.md +0 -384
  142. package/dist/template/.opencode/skill/design-direction-advisor/SKILL.md +0 -139
  143. package/dist/template/.opencode/skill/dispatching-parallel-agents/SKILL.md +0 -191
  144. package/dist/template/.opencode/skill/executing-plans/SKILL.md +0 -247
  145. package/dist/template/.opencode/skill/figma-go/SKILL.md +0 -65
  146. package/dist/template/.opencode/skill/finishing-a-development-branch/SKILL.md +0 -357
  147. package/dist/template/.opencode/skill/full-output-enforcement/SKILL.md +0 -62
  148. package/dist/template/.opencode/skill/gh-address-comments/SKILL.md +0 -29
  149. package/dist/template/.opencode/skill/gh-address-comments/scripts/fetch_comments.py +0 -237
  150. package/dist/template/.opencode/skill/gh-fix-ci/SKILL.md +0 -38
  151. package/dist/template/.opencode/skill/gh-fix-ci/scripts/inspect_pr_checks.py +0 -509
  152. package/dist/template/.opencode/skill/hi-fi-prototype-html/SKILL.md +0 -253
  153. package/dist/template/.opencode/skill/html-deck-export/SKILL.md +0 -189
  154. package/dist/template/.opencode/skill/index-knowledge/SKILL.md +0 -413
  155. package/dist/template/.opencode/skill/memory-grounding/SKILL.md +0 -68
  156. package/dist/template/.opencode/skill/playwriter/SKILL.md +0 -158
  157. package/dist/template/.opencode/skill/portless/SKILL.md +0 -109
  158. package/dist/template/.opencode/skill/prd/SKILL.md +0 -146
  159. package/dist/template/.opencode/skill/prd-task/SKILL.md +0 -182
  160. package/dist/template/.opencode/skill/prd-task/references/prd-schema.json +0 -124
  161. package/dist/template/.opencode/skill/prompt-leverage/SKILL.md +0 -90
  162. package/dist/template/.opencode/skill/prompt-leverage/references/framework.md +0 -91
  163. package/dist/template/.opencode/skill/prompt-leverage/scripts/augment_prompt.py +0 -157
  164. package/dist/template/.opencode/skill/receiving-code-review/SKILL.md +0 -263
  165. package/dist/template/.opencode/skill/reconcile/SKILL.md +0 -183
  166. package/dist/template/.opencode/skill/reflection-checkpoints/SKILL.md +0 -183
  167. package/dist/template/.opencode/skill/requesting-code-review/SKILL.md +0 -443
  168. package/dist/template/.opencode/skill/requesting-code-review/references/specialist-profiles.md +0 -108
  169. package/dist/template/.opencode/skill/requesting-code-review/review.md +0 -160
  170. package/dist/template/.opencode/skill/rtk-command-compression/SKILL.md +0 -134
  171. package/dist/template/.opencode/skill/screenshot/SKILL.md +0 -48
  172. package/dist/template/.opencode/skill/screenshot/scripts/ensure_macos_permissions.sh +0 -54
  173. package/dist/template/.opencode/skill/screenshot/scripts/macos_display_info.swift +0 -22
  174. package/dist/template/.opencode/skill/screenshot/scripts/macos_permissions.swift +0 -40
  175. package/dist/template/.opencode/skill/screenshot/scripts/macos_window_info.swift +0 -126
  176. package/dist/template/.opencode/skill/screenshot/scripts/take_screenshot.ps1 +0 -163
  177. package/dist/template/.opencode/skill/screenshot/scripts/take_screenshot.py +0 -585
  178. package/dist/template/.opencode/skill/security-threat-model/SKILL.md +0 -36
  179. package/dist/template/.opencode/skill/security-threat-model/references/prompt-template.md +0 -255
  180. package/dist/template/.opencode/skill/security-threat-model/references/security-controls-and-assets.md +0 -32
  181. package/dist/template/.opencode/skill/sharing-skills/SKILL.md +0 -214
  182. package/dist/template/.opencode/skill/skill-creator/SKILL.md +0 -181
  183. package/dist/template/.opencode/skill/skill-installer/SKILL.md +0 -58
  184. package/dist/template/.opencode/skill/skill-installer/scripts/github_utils.py +0 -21
  185. package/dist/template/.opencode/skill/skill-installer/scripts/install-skill-from-github.py +0 -313
  186. package/dist/template/.opencode/skill/skill-installer/scripts/list-skills.py +0 -106
  187. package/dist/template/.opencode/skill/swarm-coordination/SKILL.md +0 -244
  188. package/dist/template/.opencode/skill/swarm-coordination/references/architecture.md +0 -39
  189. package/dist/template/.opencode/skill/swarm-coordination/references/delegation-worker-protocol.md +0 -145
  190. package/dist/template/.opencode/skill/swarm-coordination/references/dependency-graph.md +0 -50
  191. package/dist/template/.opencode/skill/swarm-coordination/references/drift-check.md +0 -90
  192. package/dist/template/.opencode/skill/swarm-coordination/references/integration-beads.md +0 -20
  193. package/dist/template/.opencode/skill/swarm-coordination/references/launch-flow.md +0 -186
  194. package/dist/template/.opencode/skill/swarm-coordination/references/reconciler.md +0 -172
  195. package/dist/template/.opencode/skill/swarm-coordination/references/tier-enforcement.md +0 -78
  196. package/dist/template/.opencode/skill/swarm-coordination/references/tmux-integration.md +0 -134
  197. package/dist/template/.opencode/skill/systematic-debugging/SKILL.md +0 -402
  198. package/dist/template/.opencode/skill/terse-output-mode/SKILL.md +0 -95
  199. package/dist/template/.opencode/skill/think-in-code/SKILL.md +0 -136
  200. package/dist/template/.opencode/skill/ux-quality-gates/SKILL.md +0 -137
  201. package/dist/template/.opencode/skill/v1-run/SKILL.md +0 -175
  202. package/dist/template/.opencode/skill/v1-run/mcp.json +0 -6
  203. package/dist/template/.opencode/skill/verification-gates/SKILL.md +0 -63
  204. package/dist/template/.opencode/skill/visual-analysis/SKILL.md +0 -154
  205. package/dist/template/.opencode/skill/web-design-guidelines/SKILL.md +0 -46
  206. package/dist/template/.opencode/skill/workspace-setup/SKILL.md +0 -76
  207. package/dist/template/.opencode/skill/writing-plans/SKILL.md +0 -320
  208. /package/dist/template/.opencode/plugin/{lib → memory}/compact.ts +0 -0
  209. /package/dist/template/.opencode/plugin/{lib → memory}/db/graph.ts +0 -0
  210. /package/dist/template/.opencode/plugin/{lib → memory}/db/maintenance.ts +0 -0
  211. /package/dist/template/.opencode/plugin/{lib → memory}/db/pipeline.ts +0 -0
  212. /package/dist/template/.opencode/plugin/{lib → memory}/notify.ts +0 -0
  213. /package/dist/template/.opencode/plugin/{lib → memory}/operation-log.ts +0 -0
@@ -1,169 +0,0 @@
1
- ---
2
- description: Audit changed UI files for AI slop patterns and design-system violations
3
- argument-hint: "[path|auto] [--staged] [--since=<ref>] [--full-report]"
4
- agent: vision
5
- model: proxypal/gemini-3-pro-preview
6
- ---
7
-
8
- # UI Slop Check: $ARGUMENTS
9
-
10
- Run a focused anti-slop audit against changed UI files using the frontend-design taxonomy.
11
-
12
- ## Load Skills
13
-
14
- ```typescript
15
- skill({ name: "frontend-design" }); // Anti-pattern taxonomy + design references
16
- skill({ name: "visual-analysis" }); // Structured visual/code analysis workflow
17
- skill({ name: "accessibility-audit" }); // Keyboard/focus/contrast checks
18
- skill({ name: "ux-quality-gates" }); // UX correctness gates beyond visual slop
19
- ```
20
-
21
- ## Parse Arguments
22
-
23
- | Argument | Default | Description |
24
- | --------------- | ------- | ----------------------------------------------------------- |
25
- | `[path\|auto]` | `auto` | Specific file/dir to audit, or auto-detect changed UI files |
26
- | `--staged` | false | Audit staged changes only (`git diff --cached`) |
27
- | `--since=<ref>` | `HEAD` | Compare against ref (`main`, `HEAD~1`, commit SHA) |
28
- | `--full-report` | false | Include all categories even when no issues found |
29
-
30
- ## Phase 1: Resolve Target Files
31
-
32
- If `[path]` is provided:
33
-
34
- - Audit that path directly
35
-
36
- If `auto`:
37
-
38
- ```bash
39
- # unstaged + staged by default
40
- git diff --name-only $SINCE_REF -- \
41
- '*.tsx' '*.jsx' '*.css' '*.scss' '*.sass' '*.less' '*.html' '*.mdx'
42
- ```
43
-
44
- If `--staged`:
45
-
46
- ```bash
47
- git diff --cached --name-only -- \
48
- '*.tsx' '*.jsx' '*.css' '*.scss' '*.sass' '*.less' '*.html' '*.mdx'
49
- ```
50
-
51
- Prioritize files under:
52
-
53
- - `src/components/**`
54
- - `src/app/**`
55
- - `src/pages/**`
56
- - `app/**`
57
- - `components/**`
58
-
59
- If no UI files changed, return: **PASS (no changed UI files)**.
60
-
61
- ## Phase 2: Run AI Slop Checklist
62
-
63
- Evaluate each target file (or rendered screenshot if provided) against these checks.
64
-
65
- ### A) Typography
66
-
67
- - Banned default aesthetics (Inter/Roboto/Arial/Open Sans as dominant display voice)
68
- - Body text uses `rem/em`, not fixed `px`
69
- - Clear hierarchy (size/weight/spacing), not color-only hierarchy
70
- - Body line length near readable measure (around 65ch when applicable)
71
-
72
- ### B) Color and Theming
73
-
74
- - No AI default palette tropes (purple-blue gradient defaults, neon-on-dark clichés)
75
- - No pure `#000` / `#fff` as dominant surfaces
76
- - Gray text is not placed on saturated backgrounds
77
- - Semantic tokens are used (not random per-component hardcoded colors)
78
- - Dark mode is adapted, not simple inversion
79
-
80
- ### C) Layout and Spatial Rhythm
81
-
82
- - No cards-inside-cards without strong information architecture reason
83
- - No repetitive cookie-cutter card blocks with identical structure
84
- - Spacing rhythm is consistent (4pt-style cadence), not arbitrary jumps
85
- - Uses `gap`/layout primitives cleanly; avoids margin hacks when possible
86
-
87
- ### D) Motion and Interaction
88
-
89
- - No bounce/elastic gimmick motion for product UI
90
- - Animations use transform/opacity (avoid layout-thrashing properties)
91
- - Reduced motion support exists for meaningful motion
92
- - States exist: hover, focus-visible, active, disabled, loading/error where relevant
93
-
94
- ### E) UX Writing
95
-
96
- - Buttons are verb + object (e.g. "Save changes")
97
- - Error copy includes what happened + why + how to fix
98
- - Empty states include guidance + next action
99
- - Terminology is consistent (avoid mixed synonyms for same action)
100
- - User-facing labels avoid implementation terms, database names, and internal acronyms
101
-
102
- ### F) UX Quality Gates
103
-
104
- - One dominant filled primary action per view/section
105
- - Destructive actions require explicit confirm or undo, with specific entity/count in copy
106
- - No placeholder-as-label form fields
107
- - Form errors are associated with controls (`aria-describedby`, `aria-invalid`, `role="alert"`)
108
- - Submit/loading states prevent double-submit without layout shift
109
- - Empty, loading, error, and success states exist where async/data flows exist
110
- - Error toasts/banners persist long enough and include retry/undo/support where applicable
111
- - Data-heavy UI distinguishes empty state from filtered no-results state
112
- - Bulk actions show selected count and confirm destructive scope
113
-
114
- ### G) Accessibility Safety Nets
115
-
116
- - Keyboard-visible focus treatment (`:focus-visible`)
117
- - Contrast baseline expectations (WCAG AA)
118
- - Touch targets reasonable (44x44 context where applicable)
119
- - Native semantic elements are used before ARIA patches (`button`, `a`, `form`, landmarks)
120
- - Heading structure has one logical `h1` per page/screen context
121
-
122
- ### H) Component Family Consistency
123
-
124
- - Buttons and inputs in the same form share height, radius, border, and focus treatment
125
- - Focus, error, disabled, and loading states use the same token logic across components
126
- - No one-off radius/shadow/border width unless documented as a system-level exception
127
- - Semantic color roles are consistent: success, warning, destructive, info, primary
128
-
129
- ## Phase 3: Severity and Scoring
130
-
131
- Group findings by severity:
132
-
133
- - **Critical**: accessibility failures, broken interaction states, unreadable contrast
134
- - **Warning**: strong AI fingerprint/slop patterns, inconsistent design system usage
135
- - **Info**: polish/consistency opportunities
136
-
137
- Score each category 1-10 and include evidence (`file:line` for code audits).
138
-
139
- ## Phase 4: Output
140
-
141
- Return:
142
-
143
- 1. **Result**: PASS / NEEDS WORK
144
- 2. **Audited files** (list)
145
- 3. **Category scores**
146
- 4. **Findings by severity** with actionable fixes
147
- 5. **Fast remediation plan** (top 3 fixes first)
148
-
149
- If `--full-report` is false, omit empty categories.
150
-
151
- ## Record Findings
152
-
153
- ```typescript
154
- observation({
155
- type: "warning",
156
- title: "UI Slop Check: [scope]",
157
- narrative: "Detected [count] critical, [count] warning slop issues in changed UI files.",
158
- concepts: "ui, design, anti-patterns, frontend",
159
- confidence: "high",
160
- });
161
- ```
162
-
163
- ## Related Commands
164
-
165
- | Need | Command |
166
- | ---------------------------------------- | ------------ |
167
- | Design from scratch | `/design` |
168
- | Full UI review (single screen/component) | `/ui-review` |
169
- | Implementation work | `/ship` |
@@ -1,247 +0,0 @@
1
- # Plan: Optimize Scout Agent for External Research
2
-
3
- **Goal:** Enhance Scout agent prompt with missing tool integrations and workflows for optimal external research.
4
-
5
- **Scope:** READ-ONLY external research only (no local codebase changes)
6
-
7
- ---
8
-
9
- ## Changes Required
10
-
11
- ### File: `.opencode/agent/scout.md`
12
-
13
- #### 1. Add Memory-First Protocol (after line 43, before "External research:")
14
-
15
- ````markdown
16
- ## Memory First
17
-
18
- Before hitting external APIs, check past research:
19
-
20
- ```typescript
21
- memory - search({ query: "<topic keywords>", limit: 3 });
22
- ```
23
- ````
24
-
25
- If memory returns high-confidence findings on this exact topic, synthesize and return without external calls. Only proceed to external sources if:
26
-
27
- - No relevant memory found
28
- - Memory findings are outdated or low-confidence
29
- - Question requires fresher data
30
-
31
- ````
32
-
33
- #### 2. Add Tool Priority Section (replace/enhance "## Guidelines" around line 88)
34
-
35
- ```markdown
36
- ## Tool Priority (External Sources Only)
37
-
38
- | Priority | Tool | Use Case | Speed |
39
- |----------|------|----------|-------|
40
- | 1 | memory-search | Past research findings | Instant |
41
- | Priority | Tool | Use Case | Speed |
42
- |----------|------|----------|-------|
43
- | 1 | memory-search | Past research findings | Instant |
44
- | 2 | context7_resolve-library-id | Resolve library names to IDs | Fast |
45
- | 3 | context7_query-docs | Official library docs | Fast |
46
- | 4 | codesearch | Exa Code API for SDK/library patterns | Fast |
47
- | 5 | grepsearch | Cross-repo GitHub code search | Medium |
48
- | 6 | webfetch | Specific doc URLs, READMEs, changelogs | Medium |
49
- | 7 | opensrc + LSP | Clone & analyze source code | Slow |
50
- | 8 | websearch | Tutorials, blog posts, recent news | Slow |
51
- | 3 | codesearch | Usage patterns in real code | Fast |
52
- | 4 | gh_grep | Cross-repo deep code search | Medium |
53
- | 5 | webfetch | Specific doc URLs, READMEs, changelogs | Medium |
54
- | 6 | opensrc + LSP | Clone & analyze source code | Slow |
55
- | 7 | websearch | Tutorials, blog posts, recent news | Slow |
56
-
57
- **Rule:** Exhaust faster tools before slower ones. Run tools in parallel when independent.
58
- ````
59
-
60
- #### 3. Add webfetch Section (new section after Tool Priority)
61
-
62
- ````markdown
63
- ## webfetch Usage
64
-
65
- Use `webfetch` for specific external URLs when you have a known target:
66
-
67
- ```typescript
68
- // GitHub raw files
69
- webfetch({
70
- url: "https://raw.githubusercontent.com/owner/repo/main/README.md",
71
- format: "markdown",
72
- });
73
-
74
- // Documentation pages
75
- webfetch({ url: "https://zod.dev/docs/guides/async", format: "markdown" });
76
-
77
- // Release notes
78
- webfetch({ url: "https://github.com/colinhacks/zod/releases", format: "markdown" });
79
-
80
- // API references
81
- webfetch({ url: "https://docs.example.com/api/authentication", format: "markdown" });
82
- ```
83
- ````
84
-
85
- **When to use:**
86
-
87
- - User provides a specific URL
88
- - context7_resolve-library-id returns a library ID
89
- - context7_query-docs returns a doc link worth fetching
90
- - Need CHANGELOG or release notes
91
- - GitHub README has details not in context7
92
-
93
- ````
94
-
95
- #### 4. Add Source Code Deep Dive Section (new section, expand on existing clone guidance)
96
-
97
- ```markdown
98
- ## Source Code Deep Dive
99
-
100
- When documentation is insufficient, analyze actual source code.
101
-
102
- ### Step 1: Load the Skill
103
- ```typescript
104
- skill({ name: "source-code-research" })
105
- ````
106
-
107
- ### Step 2: Clone the Package
108
-
109
- ```bash
110
- npx opensrc <package> # npm (auto-detects version)
111
- npx opensrc <package>@<version> # specific version
112
- npx opensrc pypi:<package> # Python
113
- npx opensrc <owner>/<repo> # GitHub repo
114
- ```
115
-
116
- ### Step 3: Navigate with LSP
117
-
118
- After cloning, source lands in `opensrc/repos/github.com/<owner>/<repo>/`. Use LSP:
119
-
120
- ```typescript
121
- // Get file structure
122
- lsp({
123
- operation: "documentSymbol",
124
- filePath: "opensrc/repos/.../src/index.ts",
125
- line: 1,
126
- character: 1,
127
- });
128
-
129
- // Jump to definition
130
- lsp({
131
- operation: "goToDefinition",
132
- filePath: "opensrc/repos/.../src/types.ts",
133
- line: 42,
134
- character: 10,
135
- });
136
-
137
- // Find all usages
138
- lsp({
139
- operation: "findReferences",
140
- filePath: "opensrc/repos/.../src/core.ts",
141
- line: 100,
142
- character: 5,
143
- });
144
- ```
145
-
146
- ### Step 4: Search Within Clone
147
-
148
- ```typescript
149
- // Find specific patterns
150
- grep({ pattern: "async.*refine", path: "opensrc/", include: "*.ts" });
151
-
152
- // Check tests for usage examples
153
- glob({ pattern: "opensrc/**/test/**/*.ts" });
154
- glob({ pattern: "opensrc/**/*.test.ts" });
155
- ```
156
-
157
- ### Step 5: Construct Permalinks
158
-
159
- Build GitHub permalinks from cloned code:
160
-
161
- ```
162
- https://github.com/<owner>/<repo>/blob/<sha>/path/to/file.ts#L42-L56
163
- ```
164
-
165
- Get SHA from `opensrc/sources.json` or the cloned repo.
166
-
167
- ````
168
-
169
- #### 5. Update Fallback Chain in "When Things Fail" Section (enhance existing)
170
-
171
- ```markdown
172
- ## When Things Fail
173
-
174
- ### Fallback Chain
175
- ````
176
-
177
- context7 fails → try codesearch for patterns
178
- codesearch empty → try gh_grep with broader query
179
- gh_grep empty → webfetch specific doc URLs if known
180
- still stuck → opensrc clone + LSP analysis
181
- last resort → websearch for tutorials/blogs
182
-
183
- ```
184
-
185
- ### Specific Failures
186
-
187
- **context7 doesn't find library:**
188
- 1. Try `codesearch({ query: "<library> <function> example" })`
189
- 2. Try `gh_grepsearchGitHub({ query: "import.*from.*<library>" })`
190
- 3. Clone with `npx opensrc <library>` and read source
191
-
192
- **gh_grep returns nothing:**
193
- - Broaden query: search concepts, not exact function names
194
- - Try different language filters
195
- - Search for error messages or config patterns
196
-
197
- **opensrc clone fails:**
198
- - Check if package exists on npm/pypi/crates
199
- - Try GitHub URL directly: `npx opensrc owner/repo`
200
- - Fall back to `webfetch` on raw GitHub files
201
-
202
- **API rate limits:**
203
- - Work from already-cloned repos in `opensrc/`
204
- - Use `memory-search` to find cached findings
205
- - Reduce parallel calls, go sequential
206
- ```
207
-
208
- ---
209
-
210
- ## Summary of Additions
211
-
212
- | Addition | Lines | Purpose |
213
- | ----------------------- | ----- | ----------------------------------------- |
214
- | Memory-First Protocol | ~15 | Check past research before external calls |
215
- | Tool Priority Table | ~15 | Clear hierarchy for tool selection |
216
- | webfetch Section | ~25 | Document missing tool usage |
217
- | Source Code Deep Dive | ~50 | Full opensrc + LSP workflow |
218
- | Enhanced Fallback Chain | ~30 | Clear failure recovery paths |
219
-
220
- **Total additions:** ~135 lines
221
-
222
- ---
223
-
224
- ## Files to Modify
225
-
226
- 1. `.opencode/agent/scout.md` - Add sections above
227
-
228
- ---
229
-
230
- ## Verification
231
-
232
- After implementation:
233
-
234
- 1. Test Quick Mode: `@scout how to use zod .refine()`
235
- 2. Test Deep Mode: `@scout how do production apps handle zod async validation`
236
- 3. Test Source Dive: `@scout show me zod's internal parse implementation`
237
- 4. Verify memory check appears in scout's first actions
238
- 5. Verify webfetch used when given specific URLs
239
-
240
- ---
241
-
242
- ## Out of Scope
243
-
244
- - Local codebase access (that's Explore agent)
245
- - File modifications outside `.beads/artifacts/`
246
- - Question tool (subagent constraint)
247
- - New MCP integrations (uses existing tools)