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,413 +0,0 @@
1
- ---
2
- name: index-knowledge
3
- description: Use when generating or refreshing AGENTS.md knowledge bases for a codebase. MUST load before creating hierarchical documentation or complexity-scored subdirectory guides.
4
- version: 1.0.0
5
- tags: [documentation, workflow]
6
- dependencies: []
7
- ---
8
-
9
- # index-knowledge
10
-
11
- ## When to Use
12
-
13
- - When you need to generate or update hierarchical AGENTS.md documentation for a codebase.
14
-
15
- ## When NOT to Use
16
-
17
- - When only a single small directory needs a manual note instead of a full knowledge hierarchy.
18
-
19
-
20
- ## Usage
21
-
22
- ```
23
- /index-knowledge # Update mode (default)
24
- /index-knowledge --create-new # Delete all → regenerate from scratch
25
- /index-knowledge --max-depth=2 # Limit directory depth (default: 5)
26
- ```
27
-
28
- ## Load Skills
29
-
30
- ```typescript
31
- skill({ name: "memory-system" }); // Search for existing patterns
32
- skill({ name: "deep-research" }); // For thorough LSP exploration
33
- ```
34
-
35
- ## Check Memory First
36
-
37
- ```typescript
38
- memory_search({ query: "AGENTS.md conventions patterns", limit: 3 });
39
- ```
40
-
41
- ---
42
-
43
- ## Workflow (High-Level)
44
-
45
- 1. **Discovery + Analysis** (concurrent)
46
- - Launch parallel explore agents (multiple Task calls in one message)
47
- - Main session: bash structure + LSP codemap + read existing AGENTS.md
48
- 2. **Score & Decide** - Determine AGENTS.md locations from merged findings
49
- 3. **Generate** - Root first, then subdirs in parallel
50
- 4. **Review** - Deduplicate, trim, validate
51
-
52
- <critical>
53
- **TodoWrite ALL phases. Mark in_progress → completed in real-time.**
54
-
55
- ```typescript
56
- todowrite({ todos: [
57
- { id: "discovery", content: "Fire explore agents + LSP codemap + read existing", status: "pending", priority: "high" },
58
- { id: "scoring", content: "Score directories, determine locations", status: "pending", priority: "high" },
59
- { id: "generate", content: "Generate AGENTS.md files (root + subdirs)", status: "pending", priority: "high" },
60
- { id: "review", content: "Deduplicate, validate, trim", status: "pending", priority: "medium" }
61
- ]});
62
- ```
63
- </critical>
64
-
65
- ---
66
-
67
- ## Phase 1: Discovery + Analysis (Concurrent)
68
-
69
- **Mark "discovery" as in_progress.**
70
-
71
- ### Launch Parallel Explore Agents
72
-
73
- Multiple Task calls in a single message execute in parallel. Results return directly.
74
-
75
- ```
76
- // All Task calls in ONE message = parallel execution
77
-
78
- Task(
79
- description="project structure",
80
- subagent_type="explore",
81
- prompt="Project structure: PREDICT standard patterns for detected language → REPORT deviations only"
82
- )
83
-
84
- Task(
85
- description="entry points",
86
- subagent_type="explore",
87
- prompt="Entry points: FIND main files → REPORT non-standard organization"
88
- )
89
-
90
- Task(
91
- description="conventions",
92
- subagent_type="explore",
93
- prompt="Conventions: FIND config files (.eslintrc, pyproject.toml, .editorconfig) → REPORT project-specific rules"
94
- )
95
-
96
- Task(
97
- description="anti-patterns",
98
- subagent_type="explore",
99
- prompt="Anti-patterns: FIND 'DO NOT', 'NEVER', 'ALWAYS', 'DEPRECATED' comments → LIST forbidden patterns"
100
- )
101
-
102
- Task(
103
- description="build/ci",
104
- subagent_type="explore",
105
- prompt="Build/CI: FIND .github/workflows, Makefile → REPORT non-standard patterns"
106
- )
107
-
108
- Task(
109
- description="test patterns",
110
- subagent_type="explore",
111
- prompt="Test patterns: FIND test configs, test structure → REPORT unique conventions"
112
- )
113
- ```
114
-
115
- <dynamic-agents>
116
- **DYNAMIC AGENT SPAWNING**: After bash analysis, spawn ADDITIONAL explore agents based on project scale:
117
-
118
- | Factor | Threshold | Additional Agents |
119
- | ---------------------------- | --------- | -------------------------- |
120
- | **Total files** | >100 | +1 per 100 files |
121
- | **Total lines** | >10k | +1 per 10k lines |
122
- | **Directory depth** | ≥4 | +2 for deep exploration |
123
- | **Large files (>500 lines)** | >10 files | +1 for complexity hotspots |
124
- | **Monorepo** | detected | +1 per package/workspace |
125
- | **Multiple languages** | >1 | +1 per language |
126
-
127
- ```bash
128
- # Measure project scale first
129
- total_files=$(find . -type f -not -path '*/node_modules/*' -not -path '*/.git/*' | wc -l)
130
- total_lines=$(find . -type f \( -name "*.ts" -o -name "*.py" -o -name "*.go" \) -not -path '*/node_modules/*' -exec wc -l {} + 2>/dev/null | tail -1 | awk '{print $1}')
131
- large_files=$(find . -type f \( -name "*.ts" -o -name "*.py" \) -not -path '*/node_modules/*' -exec wc -l {} + 2>/dev/null | awk '$1 > 500 {count++} END {print count+0}')
132
- max_depth=$(find . -type d -not -path '*/node_modules/*' -not -path '*/.git/*' | awk -F/ '{print NF}' | sort -rn | head -1)
133
- ```
134
-
135
- Example spawning (all in ONE message for parallel execution):
136
-
137
- ```
138
- // 500 files, 50k lines, depth 6, 15 large files → spawn additional agents
139
- Task(
140
- description="large files",
141
- subagent_type="explore",
142
- prompt="Large file analysis: FIND files >500 lines, REPORT complexity hotspots"
143
- )
144
-
145
- Task(
146
- description="deep modules",
147
- subagent_type="explore",
148
- prompt="Deep modules at depth 4+: FIND hidden patterns, internal conventions"
149
- )
150
-
151
- Task(
152
- description="cross-cutting",
153
- subagent_type="explore",
154
- prompt="Cross-cutting concerns: FIND shared utilities across directories"
155
- )
156
- // ... more based on calculation
157
- ```
158
-
159
- </dynamic-agents>
160
-
161
- ### Main Session: Concurrent Analysis
162
-
163
- **While Task agents execute**, main session does:
164
-
165
- #### 1. Bash Structural Analysis
166
-
167
- ```bash
168
- # Directory depth + file counts
169
- find . -type d -not -path '*/\.*' -not -path '*/node_modules/*' -not -path '*/venv/*' -not -path '*/dist/*' -not -path '*/build/*' | awk -F/ '{print NF-1}' | sort -n | uniq -c
170
-
171
- # Files per directory (top 30)
172
- find . -type f -not -path '*/\.*' -not -path '*/node_modules/*' | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -30
173
-
174
- # Code concentration by extension
175
- find . -type f \( -name "*.py" -o -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.go" -o -name "*.rs" \) -not -path '*/node_modules/*' | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -20
176
-
177
- # Existing AGENTS.md / CLAUDE.md
178
- find . -type f \( -name "AGENTS.md" -o -name "CLAUDE.md" \) -not -path '*/node_modules/*' 2>/dev/null
179
- ```
180
-
181
- #### 2. Read Existing AGENTS.md
182
-
183
- ```
184
- For each existing file found:
185
- Read(filePath=file)
186
- Extract: key insights, conventions, anti-patterns
187
- Store in EXISTING_AGENTS map
188
- ```
189
-
190
- If `--create-new`: Read all existing first (preserve context) → then delete all → regenerate.
191
-
192
- #### 3. LSP Codemap (if available)
193
-
194
- ```
195
- lsp_servers() # Check availability
196
-
197
- # Entry points (parallel)
198
- lsp_document_symbols(filePath="src/index.ts")
199
- lsp_document_symbols(filePath="main.py")
200
-
201
- # Key symbols (parallel)
202
- lsp_workspace_symbols(filePath=".", query="class")
203
- lsp_workspace_symbols(filePath=".", query="interface")
204
- lsp_workspace_symbols(filePath=".", query="function")
205
-
206
- # Centrality for top exports
207
- lsp_find_references(filePath="...", line=X, character=Y)
208
- ```
209
-
210
- **LSP Fallback**: If unavailable, rely on explore agents + AST-grep.
211
-
212
- **Merge: bash + LSP + existing + Task agent results. Mark "discovery" as completed.**
213
-
214
- ---
215
-
216
- ## Phase 2: Scoring & Location Decision
217
-
218
- **Mark "scoring" as in_progress.**
219
-
220
- ### Scoring Matrix
221
-
222
- | Factor | Weight | High Threshold | Source |
223
- | -------------------- | ------ | ------------------------ | ------- |
224
- | File count | 3x | >20 | bash |
225
- | Subdir count | 2x | >5 | bash |
226
- | Code ratio | 2x | >70% | bash |
227
- | Unique patterns | 1x | Has own config | explore |
228
- | Module boundary | 2x | Has index.ts/**init**.py | bash |
229
- | Symbol density | 2x | >30 symbols | LSP |
230
- | Export count | 2x | >10 exports | LSP |
231
- | Reference centrality | 3x | >20 refs | LSP |
232
-
233
- ### Decision Rules
234
-
235
- | Score | Action |
236
- | ------------ | ------------------------- |
237
- | **Root (.)** | ALWAYS create |
238
- | **>15** | Create AGENTS.md |
239
- | **8-15** | Create if distinct domain |
240
- | **<8** | Skip (parent covers) |
241
-
242
- ### Output
243
-
244
- ```
245
- AGENTS_LOCATIONS = [
246
- { path: ".", type: "root" },
247
- { path: "src/hooks", score: 18, reason: "high complexity" },
248
- { path: "src/api", score: 12, reason: "distinct domain" }
249
- ]
250
- ```
251
-
252
- **Mark "scoring" as completed.**
253
-
254
- ---
255
-
256
- ## Phase 3: Generate AGENTS.md
257
-
258
- **Mark "generate" as in_progress.**
259
-
260
- ### Root AGENTS.md (Full Treatment)
261
-
262
- ```markdown
263
- # PROJECT KNOWLEDGE BASE
264
-
265
- **Generated:** {TIMESTAMP}
266
- **Commit:** {SHORT_SHA}
267
- **Branch:** {BRANCH}
268
-
269
- ## OVERVIEW
270
-
271
- {1-2 sentences: what + core stack}
272
-
273
- ## STRUCTURE
274
-
275
- \`\`\`
276
- {root}/
277
- ├── {dir}/ # {non-obvious purpose only}
278
- └── {entry}
279
- \`\`\`
280
-
281
- ## WHERE TO LOOK
282
-
283
- | Task | Location | Notes |
284
- | ---- | -------- | ----- |
285
-
286
- ## CODE MAP
287
-
288
- {From LSP - skip if unavailable or project <10 files}
289
-
290
- | Symbol | Type | Location | Refs | Role |
291
-
292
- ## CONVENTIONS
293
-
294
- {ONLY deviations from standard}
295
-
296
- ## ANTI-PATTERNS (THIS PROJECT)
297
-
298
- {Explicitly forbidden here}
299
-
300
- ## UNIQUE STYLES
301
-
302
- {Project-specific}
303
-
304
- ## COMMANDS
305
-
306
- \`\`\`bash
307
- {dev/test/build}
308
- \`\`\`
309
-
310
- ## NOTES
311
-
312
- {Gotchas}
313
- ```
314
-
315
- **Quality gates**: 50-150 lines, no generic advice, no obvious info.
316
-
317
- ### Subdirectory AGENTS.md (Parallel)
318
-
319
- Launch general agents for each location in ONE message (parallel execution):
320
-
321
- ```
322
- // All in single message = parallel
323
- Task(
324
- description="AGENTS.md for src/hooks",
325
- subagent_type="general",
326
- prompt="Generate AGENTS.md for: src/hooks
327
- - Reason: high complexity
328
- - 30-80 lines max
329
- - NEVER repeat parent content
330
- - Sections: OVERVIEW (1 line), STRUCTURE (if >5 subdirs), WHERE TO LOOK, CONVENTIONS (if different), ANTI-PATTERNS
331
- - Write directly to src/hooks/AGENTS.md"
332
- )
333
-
334
- Task(
335
- description="AGENTS.md for src/api",
336
- subagent_type="general",
337
- prompt="Generate AGENTS.md for: src/api
338
- - Reason: distinct domain
339
- - 30-80 lines max
340
- - NEVER repeat parent content
341
- - Sections: OVERVIEW (1 line), STRUCTURE (if >5 subdirs), WHERE TO LOOK, CONVENTIONS (if different), ANTI-PATTERNS
342
- - Write directly to src/api/AGENTS.md"
343
- )
344
- // ... one Task per AGENTS_LOCATIONS entry
345
- ```
346
-
347
- **Results return directly. Mark "generate" as completed.**
348
-
349
- ---
350
-
351
- ## Phase 4: Review & Deduplicate
352
-
353
- **Mark "review" as in_progress.**
354
-
355
- For each generated file:
356
-
357
- - Remove generic advice
358
- - Remove parent duplicates
359
- - Trim to size limits
360
- - Verify telegraphic style
361
-
362
- **Mark "review" as completed.**
363
-
364
- ---
365
-
366
- ## Final Report
367
-
368
- ```
369
- === index-knowledge Complete ===
370
-
371
- Mode: {update | create-new}
372
-
373
- Files:
374
- ✓ ./AGENTS.md (root, {N} lines)
375
- ✓ ./src/hooks/AGENTS.md ({N} lines)
376
-
377
- Dirs Analyzed: {N}
378
- AGENTS.md Created: {N}
379
- AGENTS.md Updated: {N}
380
-
381
- Hierarchy:
382
- ./AGENTS.md
383
- └── src/hooks/AGENTS.md
384
- ```
385
-
386
- ---
387
-
388
- ## Anti-Patterns
389
-
390
- - **Static agent count**: MUST vary agents based on project size/depth
391
- - **Sequential execution**: MUST parallel (multiple Task calls in one message)
392
- - **Ignoring existing**: ALWAYS read existing first, even with --create-new
393
- - **Over-documenting**: Not every dir needs AGENTS.md
394
- - **Redundancy**: Child never repeats parent
395
- - **Generic content**: Remove anything that applies to ALL projects
396
- - **Verbose style**: Telegraphic or die
397
- - **Skipping memory**: ALWAYS search memory for existing patterns before starting
398
-
399
- ---
400
-
401
- ## Record Findings
402
-
403
- After completion, save significant discoveries:
404
-
405
- ```typescript
406
- observation({
407
- type: "pattern",
408
- title: "AGENTS.md patterns for [project]",
409
- narrative: "[Key conventions, anti-patterns, structure decisions]",
410
- concepts: "AGENTS.md, documentation, codebase, knowledge",
411
- confidence: "high",
412
- });
413
- ```
@@ -1,68 +0,0 @@
1
- ---
2
- name: memory-grounding
3
- description: >
4
- Use at the start of any command that needs prior context — searches memory for decisions, patterns, and handoffs before execution to avoid re-solving solved problems.
5
- version: 1.0.0
6
- tags: [memory, grounding, pre-flight]
7
- ---
8
-
9
- # Memory Grounding
10
-
11
- Search institutional memory before executing any command that modifies state or makes decisions.
12
-
13
- ## When to Use
14
-
15
- - At the start of `/ship`, `/plan`, `/create`, `/pr`, `/research`, `/resume`
16
- - Before any command that benefits from prior context
17
- - When you need to check if work was already done or decisions already made
18
-
19
- ## When NOT to Use
20
-
21
- - Read-only commands that don't need historical context (e.g., `/status`)
22
- - Commands that explicitly skip grounding (e.g., `--no-memory` flag)
23
-
24
- ## Protocol
25
-
26
- ### Step 1: Search for relevant context
27
-
28
- ```typescript
29
- // Primary: search by bead ID or topic
30
- memory-search({ query: "$ARGUMENTS" });
31
-
32
- // Secondary: search by keywords with limit
33
- memory-search({ query: "<feature or topic keywords>", limit: 5 });
34
-
35
- // Optional: filter by type for specific needs
36
- memory-search({ query: "<keywords>", type: "decision" }); // Past decisions
37
- memory-search({ query: "<keywords>", type: "bugfix" }); // Known issues
38
- ```
39
-
40
- ### Step 2: Check last session handoff
41
-
42
- ```typescript
43
- memory-read({ file: "handoffs/last" });
44
- ```
45
-
46
- ### Step 3: Check session history (if resuming work)
47
-
48
- ```typescript
49
- find_sessions({ query: "$ARGUMENTS", limit: 3 });
50
- ```
51
-
52
- ### Step 4: Apply findings
53
-
54
- - **If relevant findings exist:** Incorporate them directly. Don't re-solve solved problems.
55
- - **If prior decisions found:** Follow them unless there's a clear reason to diverge (document the divergence).
56
- - **If known issues found:** Account for them in the current approach.
57
- - **If nothing found:** Proceed normally — absence of memory is not a blocker.
58
-
59
- ## Command-Specific Variations
60
-
61
- | Command | Extra Focus |
62
- | ----------- | ------------------------------------------------------ |
63
- | `/plan` | Search bugfixes; check for existing plans to overwrite |
64
- | `/ship` | Search for failed approaches to avoid repeating |
65
- | `/create` | Search for duplicate beads before creating |
66
- | `/pr` | Include findings in PR description |
67
- | `/research` | Search before spawning agents; narrow scope to gaps |
68
- | `/resume` | Read handoff file by bead ID; check session history |
@@ -1,158 +0,0 @@
1
- ---
2
- name: playwriter
3
- description: Use when you need browser automation using the user's existing Chrome with extensions, sessions, and cookies intact. 90% less context than traditional browser MCP. Prefer over playwright skill when existing session state matters.
4
- mcp:
5
- playwriter:
6
- command: npx
7
- args: ["playwriter@latest"]
8
- version: 1.0.0
9
- tags: [automation, mcp]
10
- dependencies: []
11
- ---
12
-
13
- # Playwriter Browser Automation (MCP)
14
-
15
- ## When to Use
16
-
17
- - When you need to automate your existing Chrome browser session via the Playwriter extension.
18
-
19
- ## When NOT to Use
20
-
21
- - When you need a fresh, isolated browser instance without your local extensions/cookies.
22
-
23
-
24
- - **Uses your existing browser** - extensions, sessions, cookies all work
25
- - **Single `execute` tool** - send Playwright code snippets directly
26
- - **90% less context** - no tool schema bloat
27
- - **Full Playwright API** - LLMs already know it from training
28
- - **Bypass automation detection** - disconnect extension when needed
29
-
30
- ## Prerequisites
31
-
32
- **You must install the Chrome extension first:**
33
-
34
- 1. Install [Playwriter Extension](https://chromewebstore.google.com/detail/playwriter-mcp/jfeammnjpkecdekppnclgkkffahnhfhe)
35
- 2. Click extension icon on tabs you want to control (icon turns green)
36
- 3. Now the skill can interact with those tabs
37
-
38
- ## Quick Start
39
-
40
- After loading this skill:
41
-
42
- ```
43
- # List available tabs (enabled ones)
44
- skill_mcp(skill_name="playwriter", tool_name="listTabs")
45
-
46
- # Execute Playwright code on a tab
47
- skill_mcp(skill_name="playwriter", tool_name="execute", arguments='{"tabId": "tab-id-here", "code": "await page.goto(\"https://example.com\")"}')
48
- ```
49
-
50
- ## Available Tools
51
-
52
- | Tool | Description | Arguments |
53
- | ---------- | -------------------------------- | --------------------------------- |
54
- | `listTabs` | List tabs with extension enabled | `{}` |
55
- | `execute` | Run Playwright code snippet | `{"tabId": "...", "code": "..."}` |
56
-
57
- That's it. Two tools. The power is in the Playwright code you send.
58
-
59
- ## The `execute` Pattern
60
-
61
- Send any valid Playwright code. The `page` object is already available:
62
-
63
- ```javascript
64
- // Navigate
65
- await page.goto("https://github.com");
66
-
67
- // Click
68
- await page.click("button.sign-in");
69
-
70
- // Fill form
71
- await page.fill("#email", "user@example.com");
72
- await page.fill("#password", "secret");
73
- await page.click('button[type="submit"]');
74
-
75
- // Wait for element
76
- await page.waitForSelector(".dashboard");
77
-
78
- // Get text
79
- const title = await page.title();
80
-
81
- // Screenshot
82
- await page.screenshot({ path: "/tmp/screenshot.png" });
83
-
84
- // Complex selectors
85
- await page.click("text=Submit");
86
- await page.click('[data-testid="login-btn"]');
87
-
88
- // Evaluate JS in page
89
- const links = await page.evaluate(() =>
90
- Array.from(document.querySelectorAll("a")).map((a) => a.href),
91
- );
92
- ```
93
-
94
- ## Examples
95
-
96
- ### Navigate and Screenshot
97
-
98
- ```
99
- skill_mcp(skill_name="playwriter", tool_name="execute", arguments='{"tabId": "abc123", "code": "await page.goto(\"https://example.com\"); await page.screenshot({ path: \"/tmp/example.png\" })"}')
100
- ```
101
-
102
- ### Fill a Form
103
-
104
- ```
105
- skill_mcp(skill_name="playwriter", tool_name="execute", arguments='{"tabId": "abc123", "code": "await page.fill(\"#name\", \"John Doe\"); await page.fill(\"#email\", \"john@example.com\"); await page.click(\"button[type=submit]\")"}')
106
- ```
107
-
108
- ### Login Flow (Using Your Saved Sessions)
109
-
110
- ```
111
- # If you're already logged in via browser, just navigate
112
- skill_mcp(skill_name="playwriter", tool_name="execute", arguments='{"tabId": "abc123", "code": "await page.goto(\"https://github.com/settings/profile\")"}')
113
-
114
- # Your cookies/session already work - no login needed!
115
- ```
116
-
117
- ### Scrape Data
118
-
119
- ```
120
- skill_mcp(skill_name="playwriter", tool_name="execute", arguments='{"tabId": "abc123", "code": "const items = await page.$$eval(\".product\", els => els.map(e => ({ name: e.querySelector(\"h2\").textContent, price: e.querySelector(\".price\").textContent }))); return items"}')
121
- ```
122
-
123
- ### Test Responsive
124
-
125
- ```
126
- skill_mcp(skill_name="playwriter", tool_name="execute", arguments='{"tabId": "abc123", "code": "await page.setViewportSize({ width: 375, height: 667 }); await page.screenshot({ path: \"/tmp/mobile.png\" })"}')
127
- ```
128
-
129
- ## Bypassing Automation Detection
130
-
131
- For sites that detect automation (Google login, etc.):
132
-
133
- 1. **Disconnect the extension** before sensitive actions
134
- 2. Perform login manually
135
- 3. **Reconnect** after authentication
136
- 4. Continue automation with your authenticated session
137
-
138
- This works because the browser is real - not a Puppeteer/Playwright-spawned instance.
139
-
140
- ## vs Traditional Playwright MCP
141
-
142
- | Aspect | `playwright` skill | `playwriter` skill |
143
- | -------------------- | ----------------------- | ----------------------- |
144
- | Tools | 17+ | 2 |
145
- | Context usage | High | ~90% less |
146
- | Browser | New instance | Your existing browser |
147
- | Extensions | None | All yours |
148
- | Sessions/cookies | Fresh | Your logged-in sessions |
149
- | Automation detection | Always detected | Can bypass |
150
- | API knowledge | Must learn tool schemas | Standard Playwright |
151
-
152
- ## Tips
153
-
154
- - **List tabs first** to get valid tabId values
155
- - **Chain commands** in single execute for efficiency
156
- - **Use your sessions** - if you're logged into GitHub in Chrome, it just works
157
- - **Return data** from execute to get values back
158
- - **Standard Playwright docs** apply - no special syntax to learn