@glrs-dev/cli 0.0.1 → 0.1.1
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.
- package/CHANGELOG.md +50 -0
- package/README.md +14 -15
- package/dist/chunk-3RG5ZIWI.js +10 -0
- package/dist/chunk-6RHN2EDH.js +93 -0
- package/dist/chunk-DEODG2LC.js +55 -0
- package/dist/chunk-FSAGM22T.js +17 -0
- package/dist/chunk-GQBZREK5.js +136 -0
- package/dist/chunk-HWMRY35D.js +139 -0
- package/dist/chunk-LMRDQ4GW.js +129 -0
- package/dist/chunk-NLPX2KOF.js +149 -0
- package/dist/chunk-P7PRH4I3.js +177 -0
- package/dist/chunk-VCN7RNLU.js +60 -0
- package/dist/chunk-VJFNIKQJ.js +120 -0
- package/dist/chunk-W37UX3U2.js +35 -0
- package/dist/chunk-YBCA3IP6.js +25 -0
- package/dist/chunk-YGNDPKIW.js +99 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +89 -36
- package/dist/commands/cleanup.d.ts +19 -0
- package/dist/commands/cleanup.js +11 -0
- package/dist/commands/create.d.ts +17 -0
- package/dist/commands/create.js +12 -0
- package/dist/commands/delete.d.ts +17 -0
- package/dist/commands/delete.js +12 -0
- package/dist/commands/go.d.ts +4 -0
- package/dist/commands/go.js +11 -0
- package/dist/commands/list.d.ts +15 -0
- package/dist/commands/list.js +12 -0
- package/dist/commands/switch.d.ts +11 -0
- package/dist/commands/switch.js +12 -0
- package/dist/commands/types.d.ts +10 -0
- package/dist/commands/types.js +0 -0
- package/dist/index.d.ts +16 -19
- package/dist/index.js +4 -1
- package/dist/lib/config.d.ts +14 -0
- package/dist/lib/config.js +14 -0
- package/dist/lib/fmt.d.ts +12 -0
- package/dist/lib/fmt.js +25 -0
- package/dist/lib/git.d.ts +26 -0
- package/dist/lib/git.js +25 -0
- package/dist/lib/registry.d.ts +14 -0
- package/dist/lib/registry.js +13 -0
- package/dist/lib/select.d.ts +21 -0
- package/dist/lib/select.js +10 -0
- package/dist/lib/worktree.d.ts +35 -0
- package/dist/lib/worktree.js +17 -0
- package/dist/vendor/harness-opencode/dist/agents/prompts/agents-md-writer.md +89 -0
- package/dist/vendor/harness-opencode/dist/agents/prompts/architecture-advisor.md +46 -0
- package/dist/vendor/harness-opencode/dist/agents/prompts/build.md +93 -0
- package/dist/vendor/harness-opencode/dist/agents/prompts/code-searcher.md +54 -0
- package/dist/vendor/harness-opencode/dist/agents/prompts/docs-maintainer.md +128 -0
- package/dist/vendor/harness-opencode/dist/agents/prompts/gap-analyzer.md +44 -0
- package/dist/vendor/harness-opencode/dist/agents/prompts/lib-reader.md +39 -0
- package/dist/vendor/harness-opencode/dist/agents/prompts/pilot-builder.md +107 -0
- package/dist/vendor/harness-opencode/dist/agents/prompts/pilot-planner.md +153 -0
- package/dist/vendor/harness-opencode/dist/agents/prompts/plan-reviewer.md +49 -0
- package/dist/vendor/harness-opencode/dist/agents/prompts/plan.md +144 -0
- package/dist/vendor/harness-opencode/dist/agents/prompts/prime.md +374 -0
- package/dist/vendor/harness-opencode/dist/agents/prompts/qa-reviewer.md +68 -0
- package/dist/vendor/harness-opencode/dist/agents/prompts/qa-thorough.md +63 -0
- package/dist/vendor/harness-opencode/dist/agents/prompts/research.md +138 -0
- package/dist/vendor/harness-opencode/dist/agents/shared/index.ts +26 -0
- package/dist/vendor/harness-opencode/dist/agents/shared/workflow-mechanics.md +32 -0
- package/dist/vendor/harness-opencode/dist/bin/memory-mcp-launcher.sh +145 -0
- package/dist/vendor/harness-opencode/dist/bin/plan-check.sh +255 -0
- package/dist/vendor/harness-opencode/dist/chunk-VJUETC6A.js +205 -0
- package/dist/vendor/harness-opencode/dist/chunk-VVMP6QWS.js +731 -0
- package/dist/vendor/harness-opencode/dist/chunk-XCZ3NOXR.js +703 -0
- package/dist/vendor/harness-opencode/dist/cli.d.ts +1 -0
- package/dist/vendor/harness-opencode/dist/cli.js +5096 -0
- package/dist/vendor/harness-opencode/dist/commands/prompts/autopilot.md +96 -0
- package/dist/vendor/harness-opencode/dist/commands/prompts/costs.md +94 -0
- package/dist/vendor/harness-opencode/dist/commands/prompts/fresh.md +382 -0
- package/dist/vendor/harness-opencode/dist/commands/prompts/init-deep.md +196 -0
- package/dist/vendor/harness-opencode/dist/commands/prompts/research.md +27 -0
- package/dist/vendor/harness-opencode/dist/commands/prompts/review.md +96 -0
- package/dist/vendor/harness-opencode/dist/commands/prompts/ship.md +104 -0
- package/dist/vendor/harness-opencode/dist/index.d.ts +21 -0
- package/dist/vendor/harness-opencode/dist/index.js +2092 -0
- package/dist/vendor/harness-opencode/dist/install-4EYR56OR.js +9 -0
- package/dist/vendor/harness-opencode/dist/skills/agent-estimation/SKILL.md +159 -0
- package/dist/vendor/harness-opencode/dist/skills/paths.ts +18 -0
- package/dist/vendor/harness-opencode/dist/skills/pilot-planning/SKILL.md +49 -0
- package/dist/vendor/harness-opencode/dist/skills/pilot-planning/rules/dag-shape.md +47 -0
- package/dist/vendor/harness-opencode/dist/skills/pilot-planning/rules/decomposition.md +36 -0
- package/dist/vendor/harness-opencode/dist/skills/pilot-planning/rules/first-principles.md +29 -0
- package/dist/vendor/harness-opencode/dist/skills/pilot-planning/rules/milestones.md +57 -0
- package/dist/vendor/harness-opencode/dist/skills/pilot-planning/rules/self-review.md +46 -0
- package/dist/vendor/harness-opencode/dist/skills/pilot-planning/rules/task-context.md +47 -0
- package/dist/vendor/harness-opencode/dist/skills/pilot-planning/rules/touches-scope.md +47 -0
- package/dist/vendor/harness-opencode/dist/skills/pilot-planning/rules/verify-design.md +53 -0
- package/dist/vendor/harness-opencode/dist/skills/research/SKILL.md +350 -0
- package/dist/vendor/harness-opencode/dist/skills/research-auto/SKILL.md +283 -0
- package/dist/vendor/harness-opencode/dist/skills/research-local/SKILL.md +268 -0
- package/dist/vendor/harness-opencode/dist/skills/research-web/SKILL.md +119 -0
- package/dist/vendor/harness-opencode/dist/skills/review-plan/SKILL.md +32 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-composition-patterns/AGENTS.md +946 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-composition-patterns/README.md +60 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-composition-patterns/SKILL.md +89 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-composition-patterns/rules/architecture-avoid-boolean-props.md +100 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-composition-patterns/rules/architecture-compound-components.md +112 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-composition-patterns/rules/patterns-children-over-render-props.md +87 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-composition-patterns/rules/patterns-explicit-variants.md +100 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-composition-patterns/rules/react19-no-forwardref.md +42 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-composition-patterns/rules/state-context-interface.md +191 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-composition-patterns/rules/state-decouple-implementation.md +113 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-composition-patterns/rules/state-lift-state.md +125 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/AGENTS.md +2975 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/README.md +123 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/SKILL.md +137 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +55 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/advanced-init-once.md +42 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/advanced-use-latest.md +39 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/async-api-routes.md +38 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/async-defer-await.md +80 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/async-dependencies.md +51 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/async-parallel.md +28 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +99 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +59 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/bundle-conditional.md +31 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +49 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +35 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/bundle-preload.md +50 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/client-event-listeners.md +74 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/client-localstorage-schema.md +71 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/client-passive-event-listeners.md +48 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/client-swr-dedup.md +56 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/js-batch-dom-css.md +107 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/js-cache-function-results.md +80 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/js-cache-property-access.md +28 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/js-cache-storage.md +70 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/js-combine-iterations.md +32 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/js-early-exit.md +50 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/js-hoist-regexp.md +45 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/js-index-maps.md +37 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/js-length-check-first.md +49 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/js-min-max-loop.md +82 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/js-set-map-lookups.md +24 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +57 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/rendering-activity.md +26 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/rendering-conditional-render.md +40 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/rendering-content-visibility.md +38 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +46 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/rendering-svg-precision.md +28 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/rendering-usetransition-loading.md +75 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/rerender-defer-reads.md +39 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/rerender-dependencies.md +45 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/rerender-derived-state.md +29 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +74 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +58 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/rerender-memo.md +44 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/rerender-transitions.md +40 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/server-after-nonblocking.md +73 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/server-auth-actions.md +96 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/server-cache-lru.md +41 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/server-cache-react.md +76 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/server-dedup-props.md +65 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/server-hoist-static-io.md +142 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/server-parallel-fetching.md +83 -0
- package/dist/vendor/harness-opencode/dist/skills/vercel-react-best-practices/rules/server-serialization.md +38 -0
- package/dist/vendor/harness-opencode/dist/skills/web-design-guidelines/SKILL.md +39 -0
- package/dist/vendor/harness-opencode/package.json +11 -0
- package/package.json +20 -15
- package/LICENSE +0 -21
- package/dist/chunk-TU23AE2F.js +0 -69
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Generate hierarchical AGENTS.md files. Root plus complexity-scored subdirectories.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Generate or refresh hierarchical `AGENTS.md` files.
|
|
6
|
+
|
|
7
|
+
**Arguments:** `$ARGUMENTS` — optional flags:
|
|
8
|
+
- `--create-new` — read existing AGENTS.md files (capture context), then delete all, then regenerate from scratch
|
|
9
|
+
- `--max-depth=N` — limit directory depth (default: 3)
|
|
10
|
+
- `--dry-run` — produce the inclusion list + size estimates, but do not write files
|
|
11
|
+
|
|
12
|
+
Default (no flags): update mode. Modify existing files in-place; create new ones where a directory's score warrants it.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Phase 1 — Discovery + Analysis (concurrent)
|
|
17
|
+
|
|
18
|
+
**Subagent choice: route to `@code-searcher` explicitly (not the built-in `general` subagent).** The code-searcher has Serena allowed and is prompted to use it first; the built-in `general` is more generic and may default to grep. When invoking via the task tool, specify the subagent name exactly.
|
|
19
|
+
|
|
20
|
+
**Mandate Serena in each subagent prompt.** Don't just say "explore conventions" — tell them which Serena tool to call. Examples below include the explicit Serena call each subagent should use.
|
|
21
|
+
|
|
22
|
+
Fire these in parallel via the task tool (they can run concurrently since they don't depend on each other):
|
|
23
|
+
|
|
24
|
+
- `@code-searcher` — "Map project structure. Call `serena_get_symbols_overview` on `apps/` and `packages/` top-level directories to inventory module boundaries and symbol counts. Supplement with bash `find` for file counts per directory. Skip node_modules, dist, .next, .turbo, build, coverage, .serena."
|
|
25
|
+
- `@code-searcher` — "Find entry points. Call `serena_find_symbol` for common entry-point names (index, main, App, page). Supplement with glob for apps/*/src/index.ts, apps/*/src/main.ts, apps/*/src/app/page.tsx, packages/*/src/index.ts. Return paths + the symbol kind (function, class, default export)."
|
|
26
|
+
- `@code-searcher` — "Find project conventions. Read tsconfig files, eslint configs, prettier configs, turbo.json, pnpm-workspace.yaml, .*rc files. Report non-default settings only. This is config-file work — Serena isn't useful here; use `read` directly."
|
|
27
|
+
- `@code-searcher` — "Find anti-patterns in existing AGENTS.md files: `find . -name AGENTS.md -not -path '*/node_modules/*'` then read each. Extract any NEVER/ALWAYS/DO NOT rules. Consolidate. This is markdown prose; use `grep` / `read`."
|
|
28
|
+
- `@code-searcher` — "Find build/CI patterns: .github/workflows, .husky, scripts/sh, any Makefile. Use `read` — these are mostly YAML/shell. Report non-standard patterns only."
|
|
29
|
+
- `@code-searcher` — "Find test patterns. Call `serena_find_symbol` for `describe`, `it`, `test`, `beforeEach` to measure test density per directory. Read vitest/jest/playwright configs via `read`. Report unique conventions only."
|
|
30
|
+
|
|
31
|
+
While the subagents run, YOU do:
|
|
32
|
+
|
|
33
|
+
### Structural bash analysis
|
|
34
|
+
```bash
|
|
35
|
+
# Directory depth + files per dir (top 30)
|
|
36
|
+
find . -type d \
|
|
37
|
+
-not -path '*/node_modules/*' -not -path '*/.git/*' \
|
|
38
|
+
-not -path '*/dist/*' -not -path '*/.next/*' -not -path '*/.turbo/*' \
|
|
39
|
+
| awk -F/ '{print NF-1}' | sort -n | uniq -c
|
|
40
|
+
|
|
41
|
+
find . -type f \
|
|
42
|
+
-not -path '*/node_modules/*' -not -path '*/.git/*' \
|
|
43
|
+
-not -path '*/dist/*' -not -path '*/.next/*' -not -path '*/.turbo/*' \
|
|
44
|
+
| sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -30
|
|
45
|
+
|
|
46
|
+
# Code concentration by extension
|
|
47
|
+
find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.py" -o -name "*.go" -o -name "*.rs" \) \
|
|
48
|
+
-not -path '*/node_modules/*' -not -path '*/dist/*' \
|
|
49
|
+
| sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -20
|
|
50
|
+
|
|
51
|
+
# Existing AGENTS.md / CLAUDE.md
|
|
52
|
+
find . -type f \( -name "AGENTS.md" -o -name "CLAUDE.md" \) -not -path '*/node_modules/*'
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Read every existing AGENTS.md
|
|
56
|
+
Capture their contents into a per-path map. These are the manual authoring we must preserve (if update mode) or extract context from before deletion (if `--create-new`).
|
|
57
|
+
|
|
58
|
+
### Serena symbol density (LSP-grade codemap) — REQUIRED
|
|
59
|
+
|
|
60
|
+
For each candidate top-level directory (every `apps/*` and `packages/*`), call `serena_get_symbols_overview` with the directory path. Record:
|
|
61
|
+
- Total symbol count per directory
|
|
62
|
+
- Top 5 exports by name
|
|
63
|
+
- Whether an `index.ts` entry point exists
|
|
64
|
+
|
|
65
|
+
Then for the top-3 symbol-densest directories, call `serena_find_referencing_symbols` on their 1-2 most load-bearing exports to measure reference centrality across the repo.
|
|
66
|
+
|
|
67
|
+
This data feeds the Phase 2 scoring (symbol density ×2, export count ×2, reference centrality ×3). Skipping Serena here means those three factors are zero, which collapses the score-based decision. **Do not skip.**
|
|
68
|
+
|
|
69
|
+
### Dynamic agent scaling
|
|
70
|
+
After bash analysis, if the project is large, spawn more `@code-searcher` tasks:
|
|
71
|
+
|
|
72
|
+
| Factor | Threshold | Additional agents |
|
|
73
|
+
|---|---|---|
|
|
74
|
+
| Total source files | >500 | +1 per 500 |
|
|
75
|
+
| Large files (>500 lines) | >10 | +1 focused on complexity hotspots |
|
|
76
|
+
| Directory depth | ≥5 | +2 for deep exploration |
|
|
77
|
+
| Monorepo packages | each | +1 per workspace package |
|
|
78
|
+
|
|
79
|
+
For monorepos with many packages, spawn one more `@code-searcher` per major package (`apps/*`, `packages/*`, workspace members from `pnpm-workspace.yaml` / `package.json` `workspaces`).
|
|
80
|
+
|
|
81
|
+
### Merge
|
|
82
|
+
Collect results from all subagents + bash + Serena. Build a single consolidated view of the repo.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Phase 2 — Score & Decide
|
|
87
|
+
|
|
88
|
+
Score each candidate directory using these weighted factors:
|
|
89
|
+
|
|
90
|
+
| Factor | Weight | High threshold | Source |
|
|
91
|
+
|---|---|---|---|
|
|
92
|
+
| File count | 3× | >20 | bash |
|
|
93
|
+
| Subdirectory count | 2× | >5 | bash |
|
|
94
|
+
| Code ratio (code files / total) | 2× | >70% | bash |
|
|
95
|
+
| Unique patterns (own eslint/tsconfig/etc.) | 1× | has own config | code-searcher |
|
|
96
|
+
| Module boundary (index.ts / main.py) | 2× | has entry | bash |
|
|
97
|
+
| Symbol density | 2× | >30 symbols | Serena |
|
|
98
|
+
| Export count | 2× | >10 exports | Serena |
|
|
99
|
+
| Reference centrality (imports in other dirs) | 3× | >20 refs | Serena |
|
|
100
|
+
|
|
101
|
+
**Decision:**
|
|
102
|
+
- **Root (`.`)** — always create/update
|
|
103
|
+
- **Score >15** — create/update AGENTS.md
|
|
104
|
+
- **Score 8-15** — create if it's a distinct domain (distinct config OR distinct import-graph cluster); otherwise skip
|
|
105
|
+
- **Score <8** — skip (parent covers)
|
|
106
|
+
|
|
107
|
+
Produce the inclusion list:
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
[
|
|
111
|
+
{ path: ".", type: "root", existing: true },
|
|
112
|
+
{ path: "apps/api", score: 24, existing: true, reason: "API app, own tsconfig, high symbol density" },
|
|
113
|
+
{ path: "packages/core", score: 22, existing: true, reason: "Shared domain logic, distinct import cluster" },
|
|
114
|
+
...
|
|
115
|
+
]
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Phase 3 — Show the user + gate
|
|
121
|
+
|
|
122
|
+
Before writing anything, print the inclusion list to the user with scores, existing-or-new, and estimated size (30-80 for subdirs, 50-150 for root). Ask: **"Proceed with this plan? (yes/edit/cancel)"**
|
|
123
|
+
|
|
124
|
+
This is a deliberate gate. `/init-deep` is destructive-adjacent on `--create-new` and touches many files in update mode. Do NOT skip the confirmation.
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Phase 4 — Generate (parallel)
|
|
129
|
+
|
|
130
|
+
On user approval:
|
|
131
|
+
|
|
132
|
+
1. **Root first.** Write/Edit the root `AGENTS.md` yourself (not a subagent) — 50-150 lines covering: OVERVIEW, STRUCTURE (non-obvious purpose only), WHERE TO LOOK (task → location table), CODE MAP (top exports from Serena), CONVENTIONS (deviations from standard TS only), ANTI-PATTERNS (this project's NEVERs), UNIQUE STYLES, COMMANDS, NOTES.
|
|
133
|
+
|
|
134
|
+
2. **Subdirectories in parallel.** For each non-root inclusion-list entry, delegate to `@agents-md-writer`:
|
|
135
|
+
```
|
|
136
|
+
task(agents-md-writer, "Generate AGENTS.md for <directory>. Reason: <score breakdown>. Root AGENTS.md content (for dedup reference): <inlined>.")
|
|
137
|
+
```
|
|
138
|
+
Fire them all at once.
|
|
139
|
+
|
|
140
|
+
**Edit-vs-Write discipline:** If the target `AGENTS.md` already exists, use Edit (preserve manual additions). If not, Write. Never Write over an existing file.
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Phase 5 — Review & dedupe
|
|
145
|
+
|
|
146
|
+
Once all writers have returned:
|
|
147
|
+
|
|
148
|
+
- Read each generated/updated file
|
|
149
|
+
- Remove any bullet that duplicates content from the parent AGENTS.md (exact text match or equivalent claim)
|
|
150
|
+
- Trim to size caps (30-80 subdirs, 50-150 root)
|
|
151
|
+
- Scan for verbose prose or generic advice ("this directory contains TypeScript code", "follow best practices") — delete
|
|
152
|
+
- Delegate to `@plan-reviewer` for a final coherence pass if >5 files were written
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Report
|
|
157
|
+
|
|
158
|
+
```
|
|
159
|
+
=== /init-deep complete ===
|
|
160
|
+
|
|
161
|
+
Mode: update | create-new
|
|
162
|
+
Dirs analyzed: N
|
|
163
|
+
AGENTS.md created: M
|
|
164
|
+
AGENTS.md updated: K
|
|
165
|
+
AGENTS.md skipped (low score): J
|
|
166
|
+
|
|
167
|
+
Files:
|
|
168
|
+
[UPDATED] ./AGENTS.md (N lines)
|
|
169
|
+
[CREATED] ./packages/ui/AGENTS.md (N lines)
|
|
170
|
+
[UPDATED] ./packages/core/AGENTS.md (N lines)
|
|
171
|
+
...
|
|
172
|
+
|
|
173
|
+
Hierarchy:
|
|
174
|
+
./AGENTS.md
|
|
175
|
+
├── apps/api/AGENTS.md
|
|
176
|
+
├── apps/web/AGENTS.md
|
|
177
|
+
└── packages/
|
|
178
|
+
├── core/AGENTS.md
|
|
179
|
+
├── ui/AGENTS.md
|
|
180
|
+
└── ...
|
|
181
|
+
|
|
182
|
+
Suggested commit: chore: refresh per-directory AGENTS.md
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Anti-patterns (things that fail this command)
|
|
188
|
+
|
|
189
|
+
- **Static agent count** — must scale agents to project size (see dynamic scaling above).
|
|
190
|
+
- **Sequential execution** — Phase 1 agents must fire concurrently.
|
|
191
|
+
- **Ignoring existing** — always read existing AGENTS.md first, even on `--create-new` (to capture context before overwrite).
|
|
192
|
+
- **Over-documenting** — not every directory gets an AGENTS.md. Score-gate is the whole point.
|
|
193
|
+
- **Child duplicating parent** — Phase 5 dedup is mandatory, not optional.
|
|
194
|
+
- **Generic content** — "use TypeScript strict mode" applies to every TS project; remove it.
|
|
195
|
+
- **Verbose prose** — telegraphic. Bullets over paragraphs.
|
|
196
|
+
- **Skipping the Phase 3 gate** — users must see the plan before you write files.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Deep codebase exploration via parallel subagents.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /research — Research Command
|
|
6
|
+
|
|
7
|
+
**Research Topic:** $ARGUMENTS
|
|
8
|
+
|
|
9
|
+
## Behavior
|
|
10
|
+
|
|
11
|
+
This command is a **thin delegator** to the `@research` agent.
|
|
12
|
+
|
|
13
|
+
1. If no topic is provided, ask the user what they want to research.
|
|
14
|
+
2. Otherwise, invoke the `@research` agent via the task tool with the user's topic.
|
|
15
|
+
|
|
16
|
+
The `@research` agent handles all planning, parallel dispatch, gap review, iteration, and synthesis. Do NOT orchestrate research inline here.
|
|
17
|
+
|
|
18
|
+
## Delegation Template
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
Task tool → @research agent:
|
|
22
|
+
"Research query: {user's topic}
|
|
23
|
+
|
|
24
|
+
Context: Invoked via /research command."
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Wait for `@research` to complete and return its findings to the user.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Review an existing PR, current branch, staged changes, or a commit range. PRIME-driven, read-only, no file edits.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Review target: $ARGUMENTS
|
|
6
|
+
|
|
7
|
+
You are the PRIME. This command is **read-only** — you will NOT modify files, run tests in a way that touches the filesystem, commit, push, or edit any plan. You produce a structured review report and stop.
|
|
8
|
+
|
|
9
|
+
## 1. Resolve the target
|
|
10
|
+
|
|
11
|
+
Classify the review target silently. Do NOT ask the user to clarify which form they meant — pick the most likely and proceed.
|
|
12
|
+
|
|
13
|
+
- **Empty / missing** — review the current branch's changes: `git diff $(git merge-base HEAD origin/main)..HEAD` (all commits ahead of main) plus any uncommitted + staged changes (`git diff HEAD`).
|
|
14
|
+
- **Number** (e.g. `1234`) or **merge-request URL** (GitHub PR, GitLab MR, Bitbucket PR, Gitea PR, …) — treat as a merge request. Fetch via whichever host CLI / MCP is available:
|
|
15
|
+
- **GitHub** (`gh` CLI or `github` MCP): `gh pr view <num> --json title,body,author,labels,files,baseRefName,headRefName` + `gh pr diff <num>`
|
|
16
|
+
- **GitLab** (`glab` CLI): `glab mr view <num>` + `glab mr diff <num>`
|
|
17
|
+
- **Bitbucket** (`bb` CLI) or **Gitea** (`tea` CLI): equivalent view/diff commands
|
|
18
|
+
- **No CLI available**: use `git remote -v` to detect the host, then fetch the patch over HTTPS (e.g., `curl` the PR's `.patch` URL on GitHub) and the metadata via the host's REST API if an auth token is in env
|
|
19
|
+
If the PR's head branch is checked out locally, also include any uncommitted changes (`git diff HEAD`).
|
|
20
|
+
- **Commit SHA** (7+ hex chars) — review that single commit: `git show <sha>`.
|
|
21
|
+
- **Range** (`A..B` or `A...B`) — review the commit range: `git diff <range>`.
|
|
22
|
+
- **"staged"** — review staged changes only: `git diff --cached`.
|
|
23
|
+
- **"HEAD"** — review the most recent commit only: `git show HEAD`.
|
|
24
|
+
- **A file path** — review uncommitted + last commit touching that file: `git diff HEAD <path>` + `git log -1 -p <path>`.
|
|
25
|
+
|
|
26
|
+
If the scope is ambiguous after the classifier (rare), make the most-likely pick and state it in your report's opening line.
|
|
27
|
+
|
|
28
|
+
## 2. Gather context
|
|
29
|
+
|
|
30
|
+
- **Branch name** → if it looks like it contains a ticket reference (e.g. `<team>/<TICKET>-<slug>`, `<team>-<NUM>`, `feature/<NUM>`, `<prefix>/<TICKET>-...`), try to fetch the underlying issue via any configured issue-tracker MCP. Probe in order: `linear`, `github`/`gh` CLI, `jira`/`atlassian`, other issue MCPs. Use the fetched title + description + acceptance criteria as the "intent" baseline the diff should satisfy. Do NOT ask the user which tracker — probe.
|
|
31
|
+
- **PR description** (if target is a PR) → that's the intent baseline. Note: if the PR body contains a ticket reference (often linked in an "## Issue" / "Fixes:" / "Closes:" section), also try the tracker probe above for the richer source.
|
|
32
|
+
- **No tracker issue, no PR description** → state "no stated intent captured" in the report; judge the diff on its own merits.
|
|
33
|
+
- **Recently modified files in the diff** → for files > 200 lines, run `comment_check` to surface existing `@TODO`/`@FIXME`/`@HACK` context.
|
|
34
|
+
- **Changed TS symbols** → use `serena_find_symbol` + `serena_find_referencing_symbols` on the top-3 most load-bearing symbol changes to measure blast radius. This is the single most important tool-preference for review work.
|
|
35
|
+
|
|
36
|
+
## 3. Run the review
|
|
37
|
+
|
|
38
|
+
Delegate to `@qa-reviewer` with:
|
|
39
|
+
- The resolved target (e.g., "PR #1234" or "current branch ahead of main")
|
|
40
|
+
- The intent baseline (tracker issue body + acceptance criteria, or PR description, or "no stated intent")
|
|
41
|
+
- A directive: "Review this as PR-style adversarial analysis — not vs a specific plan. Output structured FAIL findings (file:line + specific issue) or PASS with summary."
|
|
42
|
+
|
|
43
|
+
If `@qa-reviewer` returns `[PASS]`, accept it. If `[FAIL]`, that's your finding list.
|
|
44
|
+
|
|
45
|
+
For any finding flagged as security-sensitive or architecture-level (new service boundary, new entity, new auth path, public API shape change), also delegate to `@architecture-advisor` for a second opinion. Include its recommendation in the report.
|
|
46
|
+
|
|
47
|
+
## 4. Run automated checks inline
|
|
48
|
+
|
|
49
|
+
- **Type check** (if the project uses a typed language): `tsc_check` on a TS project root, or the equivalent shell invocation (`mypy`, `cargo check`, `go vet`, etc.). Discover from `package.json` / `Cargo.toml` / `go.mod` / `pyproject.toml`.
|
|
50
|
+
- **Lint** (on the specific files changed): `eslint_check` for JS/TS, or the project's configured linter (`ruff`, `golangci-lint`, `rubocop`, etc.). Read from the project's lint config / `CI.yml` / `package.json` scripts to discover the right invocation.
|
|
51
|
+
- `todo_scan` with `onlyChanged: true` against the diff — surface any TODO/FIXME/HACK that was added
|
|
52
|
+
|
|
53
|
+
Include the output of each in the report. Failures here are not auto-failures of the review (users may be WIP) but they should be surfaced. If the project isn't typed or has no configured linter, skip those lines and note "(not applicable)".
|
|
54
|
+
|
|
55
|
+
## 5. Report
|
|
56
|
+
|
|
57
|
+
Output format:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
# Review: <target>
|
|
61
|
+
|
|
62
|
+
## Intent
|
|
63
|
+
<1-2 sentences from tracker issue / PR body, or "no stated intent captured">
|
|
64
|
+
|
|
65
|
+
## Verdict
|
|
66
|
+
[PASS] or [FAIL] or [PASS WITH CONCERNS]
|
|
67
|
+
|
|
68
|
+
## Findings
|
|
69
|
+
|
|
70
|
+
### Must fix (blocking)
|
|
71
|
+
- `<file>:<line>` — <specific issue + suggested approach (not a patch)>
|
|
72
|
+
|
|
73
|
+
### Should consider (non-blocking)
|
|
74
|
+
- `<file>:<line>` — <concern>
|
|
75
|
+
|
|
76
|
+
### Automated checks
|
|
77
|
+
- Typecheck: <N errors | clean | not applicable>
|
|
78
|
+
- Lint: <N issues | clean | not applicable>
|
|
79
|
+
- New TODO/FIXME/HACK in diff: <list or none>
|
|
80
|
+
|
|
81
|
+
### Blast radius
|
|
82
|
+
- <symbol> → used in <N> places, changes are/aren't backwards-compatible
|
|
83
|
+
|
|
84
|
+
## Architecture note
|
|
85
|
+
<Only if @architecture-advisor was consulted. One paragraph summary.>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Keep findings specific and actionable. Avoid "consider adding tests" — instead, "no test covers the branch at <file>:<line> where <specific scenario>."
|
|
89
|
+
|
|
90
|
+
## Hard rules
|
|
91
|
+
|
|
92
|
+
- Read-only. NEVER commit, push, edit files, check out branches, or mutate anything.
|
|
93
|
+
- If the target is a PR on a different branch and you need to see the code, use the host CLI's *diff* subcommand (e.g., `gh pr diff`, `glab mr diff`) — do NOT check out the PR branch locally (`gh pr checkout`, `git fetch + checkout`, etc.). The user's working tree is sacred.
|
|
94
|
+
- One report at the end, not a running commentary.
|
|
95
|
+
- Prefer `serena_find_referencing_symbols` over grep when measuring blast radius on TS code.
|
|
96
|
+
- Do NOT ask the user clarifying questions unless the target genuinely can't be resolved. Pick the most-likely scope and state it.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Finalize, commit, squash, push, and open a PR for QA-passed changes. Handles both single-commit and multi-commit (hybrid-autonomy) flows.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
The plan at $ARGUMENTS has passed QA review. Ship it.
|
|
6
|
+
|
|
7
|
+
**User invoking `/ship` IS the approval.** Execute the pipeline end-to-end without asking for per-step permission. Commits, pushes, and PR creation are not destructive — they're the whole point of this command. Only stop for genuinely unexpected states (see "Stop conditions" at the bottom).
|
|
8
|
+
|
|
9
|
+
**The top-level "YOU MUST use the `question` tool for any clarification" rule is suspended for the duration of this command.** Invoke the `question` tool ONLY for the listed Stop conditions below — not for commit message wording, not for squash-vs-keep-separate, not for "push to origin?", not for "open a PR?". If you find yourself about to call `question`, check the Stop conditions list first; if your situation isn't on it, proceed silently.
|
|
10
|
+
|
|
11
|
+
Report what you did in one compact message at the end with the PR URL. Do NOT narrate each step individually.
|
|
12
|
+
|
|
13
|
+
## 1. Survey the working state
|
|
14
|
+
|
|
15
|
+
Run in parallel:
|
|
16
|
+
- `git status --short`
|
|
17
|
+
- `git log --oneline origin/$(git rev-parse --abbrev-ref HEAD)..HEAD 2>/dev/null || git log $(git merge-base HEAD origin/main)..HEAD --oneline` — local commits ahead of origin (or ahead of main if branch is not pushed)
|
|
18
|
+
- `git diff --stat`
|
|
19
|
+
|
|
20
|
+
Classify the shape silently and proceed:
|
|
21
|
+
- **Clean + no local commits** — nothing to ship; report "Nothing to ship — working tree clean and no local commits ahead of origin." and STOP.
|
|
22
|
+
- **Dirty + no local commits** — Path A.
|
|
23
|
+
- **Clean + local commits** — Path C.
|
|
24
|
+
- **Dirty + local commits** — Path B.
|
|
25
|
+
|
|
26
|
+
## 2. Commit / squash
|
|
27
|
+
|
|
28
|
+
### Path A — single commit
|
|
29
|
+
|
|
30
|
+
1. Derive a commit message:
|
|
31
|
+
- If a plan path was given on the command line and the file exists, read its `# <Title>` and `## Goal` to shape the message.
|
|
32
|
+
- If no plan, derive a title and paragraph from the diff itself (infer the `<type>`: feat / fix / chore / refactor / docs / test / perf).
|
|
33
|
+
2. Format:
|
|
34
|
+
```
|
|
35
|
+
<type>: <title>
|
|
36
|
+
|
|
37
|
+
<one paragraph summarizing what and why>
|
|
38
|
+
|
|
39
|
+
Plan: <plan-path> ← only if a plan path was given (absolute; e.g. ~/.glorious/opencode/<repo>/plans/<slug>.md)
|
|
40
|
+
```
|
|
41
|
+
3. `git add -u && git commit -m "<subject>" -m "<body>"` — do it. No confirmation prompt.
|
|
42
|
+
|
|
43
|
+
### Path B — hybrid (local commits exist + uncommitted changes)
|
|
44
|
+
|
|
45
|
+
1. Commit the uncommitted changes using Path A's message logic (one atomic commit of the remaining work).
|
|
46
|
+
2. Squash all local commits into one:
|
|
47
|
+
- Determine base: `BASE=$(git merge-base HEAD origin/main)`
|
|
48
|
+
- Derive the final squash message from the plan (if given) or from the union of commit subjects.
|
|
49
|
+
- `git reset --soft "$BASE" && git commit -m "<subject>" -m "<body>"`
|
|
50
|
+
3. No confirmation prompts. Just do it.
|
|
51
|
+
|
|
52
|
+
### Path C — local commits only, no dirty changes
|
|
53
|
+
|
|
54
|
+
- **Single local commit** → skip straight to push.
|
|
55
|
+
- **Multiple local commits** → squash to one using Path B's squash sub-flow (derive message from plan / commit subjects).
|
|
56
|
+
|
|
57
|
+
## 3. Push
|
|
58
|
+
|
|
59
|
+
1. `BRANCH=$(git rev-parse --abbrev-ref HEAD)`
|
|
60
|
+
2. `git push -u origin "$BRANCH"` — just do it. First push sets upstream automatically.
|
|
61
|
+
3. On non-fast-forward or hook failure → STOP (see stop conditions).
|
|
62
|
+
|
|
63
|
+
## 4. Open a PR
|
|
64
|
+
|
|
65
|
+
1. Detect the git host from `git remote get-url origin`.
|
|
66
|
+
2. Derive the PR body:
|
|
67
|
+
- If a plan path was given and the file exists → body is the plan contents (escape backticks/dollar signs/newlines for shell).
|
|
68
|
+
- Else → body is the commit's body (from `git log -1 --pretty=%b`).
|
|
69
|
+
3. Create the PR:
|
|
70
|
+
- **GitHub**: `gh pr create --title "<subject>" --body "$(cat <path-or-tempfile>)"`
|
|
71
|
+
- **GitLab**: `glab mr create --title "<subject>" --description "$(cat <path-or-tempfile>)"`
|
|
72
|
+
- **Bitbucket**: `bb pr create --title "<subject>" --body "$(cat ...)"` (fall through if `bb` unavailable)
|
|
73
|
+
- **Gitea / Codeberg**: `tea pr create --title "<subject>" --description "$(cat ...)"`
|
|
74
|
+
- **Unknown host or no CLI**: construct and print the web URL (e.g., `https://<host>/<owner>/<repo>/compare/<base>...<head>?expand=1`). Report it so the user can open it manually.
|
|
75
|
+
4. Report the PR URL.
|
|
76
|
+
|
|
77
|
+
Prefer writing the body to a tempfile and using `--body-file` or `$(cat <tempfile>)` over inlining to dodge shell-escape bugs with backticks and dollar signs in plan content.
|
|
78
|
+
|
|
79
|
+
## Final report
|
|
80
|
+
|
|
81
|
+
One message, compact:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
Shipped.
|
|
85
|
+
- Commit: <subject> (<sha>)
|
|
86
|
+
- Branch: <branch> → origin
|
|
87
|
+
- PR: <url>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Stop conditions
|
|
91
|
+
|
|
92
|
+
Only stop and ask if:
|
|
93
|
+
- **Non-fast-forward push** — someone else pushed to this branch; never force. Report and ask what to do.
|
|
94
|
+
- **Pre-commit or pre-push hook failure** — NEVER use `--no-verify`. Report the hook output verbatim and ask the user. Fix the root cause if they direct you to.
|
|
95
|
+
- **Working tree shape doesn't match any of the four classes above** (e.g., detached HEAD, merge in progress, rebase in progress) — report and ask.
|
|
96
|
+
- **User has *unstaged* changes that look unrelated to the plan** — e.g., the plan says you're shipping a React refactor but the diff includes edits to unrelated files. Report the suspicious files and ask before committing them.
|
|
97
|
+
|
|
98
|
+
## Hard rules
|
|
99
|
+
|
|
100
|
+
- **Never** `git push --force` or `git push -f`. Permission-denied anyway. If non-fast-forward, stop and ask — the user decides.
|
|
101
|
+
- **Never** `git reset --hard`. Use `git reset --soft` only, and only for the squash case in Path B/C.
|
|
102
|
+
- **Never** use `--no-verify` or `--no-gpg-sign`. If a hook fails, stop and report.
|
|
103
|
+
- **Never** merge a PR — that's always the user's call.
|
|
104
|
+
- Everything else (commit, push, PR open, PR body write, upstream set) is a normal tool call. Just do it.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Plugin } from '@opencode-ai/plugin';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @glrs-dev/harness-plugin-opencode — OpenCode plugin entry point.
|
|
5
|
+
*
|
|
6
|
+
* Registers agents, commands, MCPs, tools, and skills at runtime via the
|
|
7
|
+
* OpenCode plugin `config` hook. Zero filesystem writes to user space.
|
|
8
|
+
*
|
|
9
|
+
* Skills are registered by pushing the bundled dist/skills/ directory onto
|
|
10
|
+
* config.skills.paths. OpenCode's scanner processes hardcoded paths first,
|
|
11
|
+
* then config.skills.paths last — so plugin-bundled skills win on name
|
|
12
|
+
* collision (plugin-wins precedence, empirically verified in Spike 1).
|
|
13
|
+
*
|
|
14
|
+
* Agents, commands, and MCPs use user-wins precedence:
|
|
15
|
+
* input.agent = { ...ourAgents, ...(input.agent ?? {}) }
|
|
16
|
+
* so user's opencode.json overrides take effect.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
declare const plugin: Plugin;
|
|
20
|
+
|
|
21
|
+
export { plugin as default };
|