Skip to content

Commit 6cd9174

Browse files
author
chenbo
committed
Add OpenCode preset commands
1 parent a057e19 commit 6cd9174

41 files changed

Lines changed: 14415 additions & 12540 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agent-context/architecture.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ This document is generated from static repository signals. Treat it as a startin
1010

1111
## Important Modules
1212
- `outputs`: outputs contains 27 files and depends on core, harness, integrations.
13-
- `test`: test contains 35 files and depends on analyzers, benchmarks, cli, config, core, harness, integrations, mcp, outputs, retrievers.
13+
- `test`: test contains 36 files and depends on analyzers, benchmarks, cli, config, core, harness, integrations, mcp, outputs, retrievers.
1414
- `core`: core contains 18 files and depends on analyzers, config, llm, outputs.
1515
- `harness`: harness contains 9 files and depends on core, outputs, sandbox.
1616
- `retrievers`: retrievers contains 7 files and depends on core, integrations, outputs.
1717
- `benchmarks`: benchmarks contains 25 files and depends on core, harness, outputs.
1818
- `analyzers`: analyzers contains 6 files and depends on core.
19-
- `benchmarks/fixtures/small-ts-app`: benchmarks/fixtures/small-ts-app contains 13 files.
19+
- `benchmarks/fixtures/small-ts-app`: benchmarks/fixtures/small-ts-app contains 17 files.
20+
- `cli`: cli contains 3 files and depends on benchmarks, config, core, harness, integrations, outputs, retrievers.
2021
- `benchmarks/fixtures/monorepo/packages/api`: benchmarks/fixtures/monorepo/packages/api contains 5 files and depends on benchmarks/fixtures/monorepo/packages/config.
21-
- `benchmarks/fixtures/react-app`: benchmarks/fixtures/react-app contains 8 files.
2222

2323
## Agent Guidance
2424
- Start with `AGENTS.md`, then read `key-files.md` for the highest-signal files.

.agent-context/contracts/architecture.contract.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
"outputs",
135135
"retrievers"
136136
],
137-
"summary": "test contains 35 files and depends on analyzers, benchmarks, cli, config, core, harness, integrations, mcp, outputs, retrievers."
137+
"summary": "test contains 36 files and depends on analyzers, benchmarks, cli, config, core, harness, integrations, mcp, outputs, retrievers."
138138
},
139139
{
140140
"name": "core",
@@ -202,7 +202,23 @@
202202
"benchmarks/fixtures/small-ts-app/**"
203203
],
204204
"imports": [],
205-
"summary": "benchmarks/fixtures/small-ts-app contains 13 files."
205+
"summary": "benchmarks/fixtures/small-ts-app contains 17 files."
206+
},
207+
{
208+
"name": "cli",
209+
"owns": [
210+
"src/cli/**"
211+
],
212+
"imports": [
213+
"benchmarks",
214+
"config",
215+
"core",
216+
"harness",
217+
"integrations",
218+
"outputs",
219+
"retrievers"
220+
],
221+
"summary": "cli contains 3 files and depends on benchmarks, config, core, harness, integrations, outputs, retrievers."
206222
},
207223
{
208224
"name": "benchmarks/fixtures/monorepo/packages/api",
@@ -222,22 +238,6 @@
222238
"imports": [],
223239
"summary": "benchmarks/fixtures/react-app contains 8 files."
224240
},
225-
{
226-
"name": "cli",
227-
"owns": [
228-
"src/cli/**"
229-
],
230-
"imports": [
231-
"benchmarks",
232-
"config",
233-
"core",
234-
"harness",
235-
"integrations",
236-
"outputs",
237-
"retrievers"
238-
],
239-
"summary": "cli contains 2 files and depends on benchmarks, config, core, harness, integrations, outputs, retrievers."
240-
},
241241
{
242242
"name": "sandbox",
243243
"owns": [

.agent-context/contracts/module-boundaries.json

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -341,16 +341,22 @@
341341
"benchmarks/fixtures/small-ts-app/src/index.ts"
342342
]
343343
},
344-
"benchmarks/fixtures/monorepo/packages/api": {
344+
"cli": {
345345
"owns": [
346-
"benchmarks/fixtures/monorepo/packages/api/**"
346+
"src/cli/**"
347347
],
348348
"allowedImports": [
349-
"benchmarks/fixtures/monorepo/packages/api/**",
349+
"benchmarks/**",
350350
"benchmarks/fixtures/monorepo/packages/config/**",
351351
"benchmarks/fixtures/monorepo/packages/shared/**",
352+
"src/benchmarks/**",
353+
"src/cli/**",
352354
"src/config/**",
353-
"src/core/**"
355+
"src/core/**",
356+
"src/harness/**",
357+
"src/integrations/**",
358+
"src/outputs/**",
359+
"src/retrievers/**"
354360
],
355361
"forbiddenImports": [
356362
"**/*.generated.*",
@@ -363,21 +369,28 @@
363369
"src/payments/**"
364370
],
365371
"observedImports": [
366-
"benchmarks/fixtures/monorepo/packages/config"
372+
"benchmarks",
373+
"config",
374+
"core",
375+
"harness",
376+
"integrations",
377+
"outputs",
378+
"retrievers"
367379
],
368380
"publicFiles": [
369-
"benchmarks/fixtures/monorepo/packages/api/src/config.ts",
370-
"benchmarks/fixtures/monorepo/packages/api/src/server.ts"
381+
"src/cli/index.ts",
382+
"src/cli/opencode-preset.ts",
383+
"src/cli/task-args.ts"
371384
]
372385
},
373-
"benchmarks/fixtures/react-app": {
386+
"benchmarks/fixtures/monorepo/packages/api": {
374387
"owns": [
375-
"benchmarks/fixtures/react-app/**"
388+
"benchmarks/fixtures/monorepo/packages/api/**"
376389
],
377390
"allowedImports": [
391+
"benchmarks/fixtures/monorepo/packages/api/**",
378392
"benchmarks/fixtures/monorepo/packages/config/**",
379393
"benchmarks/fixtures/monorepo/packages/shared/**",
380-
"benchmarks/fixtures/react-app/**",
381394
"src/config/**",
382395
"src/core/**"
383396
],
@@ -391,31 +404,24 @@
391404
"src/payment/**",
392405
"src/payments/**"
393406
],
394-
"observedImports": [],
407+
"observedImports": [
408+
"benchmarks/fixtures/monorepo/packages/config"
409+
],
395410
"publicFiles": [
396-
"benchmarks/fixtures/react-app/src/App.tsx",
397-
"benchmarks/fixtures/react-app/src/auth/useAuthState.ts",
398-
"benchmarks/fixtures/react-app/src/billing/audit.ts",
399-
"benchmarks/fixtures/react-app/src/billing/invoice.ts",
400-
"benchmarks/fixtures/react-app/src/components/LoginStatus.tsx"
411+
"benchmarks/fixtures/monorepo/packages/api/src/config.ts",
412+
"benchmarks/fixtures/monorepo/packages/api/src/server.ts"
401413
]
402414
},
403-
"cli": {
415+
"benchmarks/fixtures/react-app": {
404416
"owns": [
405-
"src/cli/**"
417+
"benchmarks/fixtures/react-app/**"
406418
],
407419
"allowedImports": [
408-
"benchmarks/**",
409420
"benchmarks/fixtures/monorepo/packages/config/**",
410421
"benchmarks/fixtures/monorepo/packages/shared/**",
411-
"src/benchmarks/**",
412-
"src/cli/**",
422+
"benchmarks/fixtures/react-app/**",
413423
"src/config/**",
414-
"src/core/**",
415-
"src/harness/**",
416-
"src/integrations/**",
417-
"src/outputs/**",
418-
"src/retrievers/**"
424+
"src/core/**"
419425
],
420426
"forbiddenImports": [
421427
"**/*.generated.*",
@@ -427,18 +433,13 @@
427433
"src/payment/**",
428434
"src/payments/**"
429435
],
430-
"observedImports": [
431-
"benchmarks",
432-
"config",
433-
"core",
434-
"harness",
435-
"integrations",
436-
"outputs",
437-
"retrievers"
438-
],
436+
"observedImports": [],
439437
"publicFiles": [
440-
"src/cli/index.ts",
441-
"src/cli/task-args.ts"
438+
"benchmarks/fixtures/react-app/src/App.tsx",
439+
"benchmarks/fixtures/react-app/src/auth/useAuthState.ts",
440+
"benchmarks/fixtures/react-app/src/billing/audit.ts",
441+
"benchmarks/fixtures/react-app/src/billing/invoice.ts",
442+
"benchmarks/fixtures/react-app/src/components/LoginStatus.tsx"
442443
]
443444
},
444445
"sandbox": {

.agent-context/contracts/test.contract.json

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"test/impact.test.ts",
2323
"test/loop-controller.test.ts",
2424
"test/mcp.test.ts",
25+
"test/opencode-preset.test.ts",
2526
"test/orchestrator.test.ts",
2627
"test/policy-engine.test.ts",
2728
"test/readiness.test.ts",
@@ -105,10 +106,16 @@
105106
"benchmarks/fixtures/monorepo/packages/api/test/config.test.ts",
106107
"benchmarks/fixtures/monorepo/packages/config/test/loader.test.ts"
107108
],
109+
"src/harness/types.ts": [
110+
"test/task-harness.test.ts"
111+
],
108112
"src/cli/index.ts": [
109113
"test/fixtures/monorepo/packages/api/src/index.ts",
110114
"test/fixtures/monorepo/packages/web/src/index.ts"
111115
],
116+
"src/cli/opencode-preset.ts": [
117+
"test/opencode-preset.test.ts"
118+
],
112119
"src/cli/task-args.ts": [
113120
"test/task-args.test.ts"
114121
],
@@ -151,6 +158,7 @@
151158
"test/impact.test.ts",
152159
"test/loop-controller.test.ts",
153160
"test/mcp.test.ts",
161+
"test/opencode-preset.test.ts",
154162
"test/orchestrator.test.ts",
155163
"test/policy-engine.test.ts",
156164
"test/regression-guard.test.ts",
@@ -187,9 +195,6 @@
187195
"test/contract-validator.test.ts",
188196
"test/validator.test.ts"
189197
],
190-
"src/harness/types.ts": [
191-
"test/task-harness.test.ts"
192-
],
193198
"src/config/defaults.ts": [
194199
"test/config.test.ts",
195200
"test/scanner.test.ts",
@@ -215,10 +220,10 @@
215220
"src/integrations/codegraph.ts": [
216221
"test/codegraph.test.ts"
217222
],
218-
"src/llm/provider.ts": [],
219223
"src/mcp/server.ts": [
220224
"test/mcp.test.ts"
221225
],
226+
"src/llm/provider.ts": [],
222227
"src/retrievers/codegraph.ts": [
223228
"test/codegraph.test.ts",
224229
"test/retrievers.test.ts"
@@ -243,9 +248,6 @@
243248
"src/retrievers/types.ts": [
244249
"test/retrievers.test.ts"
245250
],
246-
"src/sandbox/git-worktree-sandbox.ts": [],
247-
"src/sandbox/host-sandbox.ts": [],
248-
"src/sandbox/sandbox-adapter.ts": [],
249251
"src/outputs/agent-events.ts": [
250252
"test/agent-events.test.ts"
251253
],
@@ -296,6 +298,9 @@
296298
"src/outputs/token-savings.ts": [
297299
"test/token-savings.test.ts"
298300
],
301+
"src/sandbox/git-worktree-sandbox.ts": [],
302+
"src/sandbox/host-sandbox.ts": [],
303+
"src/sandbox/sandbox-adapter.ts": [],
299304
"src/harness/control-plane/decision-engine.ts": [
300305
"test/task-harness.test.ts"
301306
],
@@ -546,7 +551,7 @@
546551
"test/fixtures/monorepo/packages/web/src/index.ts",
547552
"test/fixtures/next-app/src/app/api/login/route.ts"
548553
],
549-
"benchmarks/fixtures/react-app/src/billing/audit.ts": [
554+
"benchmarks/fixtures/react-app/src/auth/useAuthState.ts": [
550555
"test/fixtures.test.ts",
551556
"test/fixtures/monorepo/package.json",
552557
"test/fixtures/monorepo/pnpm-workspace.yaml",
@@ -571,7 +576,7 @@
571576
"test/fixtures/monorepo/packages/web/src/index.ts",
572577
"test/fixtures/next-app/src/app/api/login/route.ts"
573578
],
574-
"benchmarks/fixtures/react-app/src/billing/invoice.ts": [
579+
"benchmarks/fixtures/react-app/src/billing/audit.ts": [
575580
"test/fixtures.test.ts",
576581
"test/fixtures/monorepo/package.json",
577582
"test/fixtures/monorepo/pnpm-workspace.yaml",
@@ -596,7 +601,7 @@
596601
"test/fixtures/monorepo/packages/web/src/index.ts",
597602
"test/fixtures/next-app/src/app/api/login/route.ts"
598603
],
599-
"benchmarks/fixtures/react-app/src/auth/useAuthState.ts": [
604+
"benchmarks/fixtures/react-app/src/billing/invoice.ts": [
600605
"test/fixtures.test.ts",
601606
"test/fixtures/monorepo/package.json",
602607
"test/fixtures/monorepo/pnpm-workspace.yaml",
@@ -671,7 +676,7 @@
671676
"test/fixtures/monorepo/packages/web/src/index.ts",
672677
"test/fixtures/next-app/src/app/api/login/route.ts"
673678
],
674-
"benchmarks/fixtures/small-ts-app/src/billing/audit.ts": [
679+
"benchmarks/fixtures/small-ts-app/src/auth/middleware.ts": [
675680
"test/fixtures.test.ts",
676681
"test/fixtures/monorepo/package.json",
677682
"test/fixtures/monorepo/pnpm-workspace.yaml",
@@ -696,7 +701,7 @@
696701
"test/fixtures/monorepo/packages/web/src/index.ts",
697702
"test/fixtures/next-app/src/app/api/login/route.ts"
698703
],
699-
"benchmarks/fixtures/small-ts-app/src/billing/invoice.ts": [
704+
"benchmarks/fixtures/small-ts-app/src/auth/session.ts": [
700705
"test/fixtures.test.ts",
701706
"test/fixtures/monorepo/package.json",
702707
"test/fixtures/monorepo/pnpm-workspace.yaml",
@@ -721,7 +726,7 @@
721726
"test/fixtures/monorepo/packages/web/src/index.ts",
722727
"test/fixtures/next-app/src/app/api/login/route.ts"
723728
],
724-
"benchmarks/fixtures/small-ts-app/src/auth/middleware.ts": [
729+
"benchmarks/fixtures/small-ts-app/src/billing/audit.ts": [
725730
"test/fixtures.test.ts",
726731
"test/fixtures/monorepo/package.json",
727732
"test/fixtures/monorepo/pnpm-workspace.yaml",
@@ -746,7 +751,7 @@
746751
"test/fixtures/monorepo/packages/web/src/index.ts",
747752
"test/fixtures/next-app/src/app/api/login/route.ts"
748753
],
749-
"benchmarks/fixtures/small-ts-app/src/auth/session.ts": [
754+
"benchmarks/fixtures/small-ts-app/src/billing/invoice.ts": [
750755
"test/fixtures.test.ts",
751756
"test/fixtures/monorepo/package.json",
752757
"test/fixtures/monorepo/pnpm-workspace.yaml",

.agent-context/dependency-graph.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ graph TD
6262
| benchmarks/fixtures/monorepo/packages/web | benchmarks/fixtures/monorepo/packages/config | 1 |
6363
| cli | benchmarks | 2 |
6464
| cli | config | 1 |
65-
| cli | core | 8 |
65+
| cli | core | 10 |
6666
| cli | harness | 7 |
6767
| cli | integrations | 1 |
6868
| cli | outputs | 10 |
@@ -91,9 +91,9 @@ graph TD
9191
| sandbox | core | 4 |
9292
| test | analyzers | 3 |
9393
| test | benchmarks | 2 |
94-
| test | cli | 1 |
94+
| test | cli | 2 |
9595
| test | config | 3 |
96-
| test | core | 43 |
96+
| test | core | 44 |
9797
| test | harness | 13 |
9898
| test | integrations | 1 |
9999
| test | mcp | 1 |

0 commit comments

Comments
 (0)