opencode-skills-collection 3.0.46 → 3.0.47

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 (71) hide show
  1. package/bundled-skills/.antigravity-install-manifest.json +10 -1
  2. package/bundled-skills/2slides-ppt-generator/SKILL.md +1 -1
  3. package/bundled-skills/2slides-ppt-generator/scripts/create_pdf_slides.py +2 -1
  4. package/bundled-skills/2slides-ppt-generator/scripts/generate_narration.py +2 -1
  5. package/bundled-skills/2slides-ppt-generator/scripts/generate_slides.py +13 -7
  6. package/bundled-skills/android-dev/references/hybrid.md +7 -4
  7. package/bundled-skills/android-dev/references/react-native.md +5 -2
  8. package/bundled-skills/atlas-contract/SKILL.md +4 -4
  9. package/bundled-skills/atlas-ledger/SKILL.md +10 -7
  10. package/bundled-skills/bun-development/SKILL.md +1 -1
  11. package/bundled-skills/cloud-penetration-testing/SKILL.md +1 -1
  12. package/bundled-skills/codebase-to-wordpress-converter/SKILL.md +1 -0
  13. package/bundled-skills/docs/integrations/jetski-cortex.md +3 -3
  14. package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +1 -1
  15. package/bundled-skills/docs/maintainers/repo-growth-seo.md +3 -3
  16. package/bundled-skills/docs/maintainers/skills-update-guide.md +1 -1
  17. package/bundled-skills/docs/users/bundles.md +1 -1
  18. package/bundled-skills/docs/users/claude-code-skills.md +1 -1
  19. package/bundled-skills/docs/users/gemini-cli-skills.md +1 -1
  20. package/bundled-skills/docs/users/getting-started.md +1 -1
  21. package/bundled-skills/docs/users/kiro-integration.md +1 -1
  22. package/bundled-skills/docs/users/usage.md +4 -4
  23. package/bundled-skills/docs/users/visual-guide.md +4 -4
  24. package/bundled-skills/dos-verify-done-claims/SKILL.md +173 -0
  25. package/bundled-skills/ecl-harness-engineer/LICENSE +21 -0
  26. package/bundled-skills/ecl-harness-engineer/SKILL.md +714 -0
  27. package/bundled-skills/ecl-harness-engineer/agents/analyzer.md +119 -0
  28. package/bundled-skills/ecl-harness-engineer/agents/auditor.md +212 -0
  29. package/bundled-skills/ecl-harness-engineer/agents/creator-config.md +343 -0
  30. package/bundled-skills/ecl-harness-engineer/agents/creator-docs.md +201 -0
  31. package/bundled-skills/ecl-harness-engineer/agents/creator-linters.md +123 -0
  32. package/bundled-skills/ecl-harness-engineer/references/adapters/adapter-schema.md +204 -0
  33. package/bundled-skills/ecl-harness-engineer/references/adapters/generic.md +156 -0
  34. package/bundled-skills/ecl-harness-engineer/references/adapters/go.md +212 -0
  35. package/bundled-skills/ecl-harness-engineer/references/adapters/java.md +205 -0
  36. package/bundled-skills/ecl-harness-engineer/references/adapters/python.md +225 -0
  37. package/bundled-skills/ecl-harness-engineer/references/adapters/rust.md +220 -0
  38. package/bundled-skills/ecl-harness-engineer/references/adapters/typescript.md +245 -0
  39. package/bundled-skills/ecl-harness-engineer/references/architecture-diagrams.md +420 -0
  40. package/bundled-skills/ecl-harness-engineer/references/audit-templates.md +649 -0
  41. package/bundled-skills/ecl-harness-engineer/references/capability-registry.md +485 -0
  42. package/bundled-skills/ecl-harness-engineer/references/darwin-eval-prompts.md +373 -0
  43. package/bundled-skills/ecl-harness-engineer/references/documentation-templates.md +741 -0
  44. package/bundled-skills/ecl-harness-engineer/references/durability-patterns.md +423 -0
  45. package/bundled-skills/ecl-harness-engineer/references/ecl-harness.md +1431 -0
  46. package/bundled-skills/ecl-harness-engineer/references/environment-config-guide.md +534 -0
  47. package/bundled-skills/ecl-harness-engineer/references/environment-detection-guide.md +751 -0
  48. package/bundled-skills/ecl-harness-engineer/references/eval-templates.md +377 -0
  49. package/bundled-skills/ecl-harness-engineer/references/gc-templates.md +798 -0
  50. package/bundled-skills/ecl-harness-engineer/references/greenfield-templates.md +1385 -0
  51. package/bundled-skills/ecl-harness-engineer/references/linter-templates.md +448 -0
  52. package/bundled-skills/ecl-harness-engineer/references/observability-templates.md +315 -0
  53. package/bundled-skills/environment-setup-guide/SKILL.md +2 -2
  54. package/bundled-skills/evolution/SKILL.md +1 -1
  55. package/bundled-skills/gitops-workflow/SKILL.md +1 -1
  56. package/bundled-skills/linkerd-patterns/SKILL.md +1 -1
  57. package/bundled-skills/loki-mode/examples/todo-app-generated/frontend/package-lock.json +504 -1317
  58. package/bundled-skills/loki-mode/examples/todo-app-generated/frontend/package.json +2 -2
  59. package/bundled-skills/lovable-cleanup/SKILL.md +416 -0
  60. package/bundled-skills/monopoly/SKILL.md +397 -0
  61. package/bundled-skills/monopoly/patterns/SKILL.md +331 -0
  62. package/bundled-skills/monopoly/scale-benchmarks/SKILL.md +174 -0
  63. package/bundled-skills/monopoly/security-checklist/SKILL.md +69 -0
  64. package/bundled-skills/monopoly/tech-matrix/SKILL.md +268 -0
  65. package/bundled-skills/pagespeed-enhancer/SKILL.md +579 -0
  66. package/bundled-skills/polis-protocol/SKILL.md +6 -3
  67. package/bundled-skills/unship/SKILL.md +11 -5
  68. package/bundled-skills/uv-package-manager/resources/implementation-playbook.md +1 -1
  69. package/bundled-skills/varlock/SKILL.md +2 -2
  70. package/package.json +1 -1
  71. package/skills_index.json +204 -4
@@ -0,0 +1,212 @@
1
+ ---
2
+ adapter:
3
+ language: go
4
+ display_name: "Go"
5
+ version: "1.0"
6
+
7
+ detection:
8
+ files: [go.mod, go.sum]
9
+ confidence: 0.95
10
+
11
+ commands:
12
+ build: "go build ./..."
13
+ test: "go test ./..."
14
+ lint: "golangci-lint run"
15
+ lint_arch: "make lint-arch"
16
+ format: "gofmt -w ."
17
+ start: null # Inferred from cmd/ structure or main.go
18
+ dev: null # Often uses "air" but not assumed
19
+
20
+ package_manager:
21
+ detection: [] # Go modules are built-in
22
+ default: "go"
23
+ install_command: "go mod download"
24
+
25
+ route_detection:
26
+ server_indicators:
27
+ - pattern: 'http\.ListenAndServe|http\.Server\{|\.Listen\('
28
+ description: "Standard library HTTP server"
29
+ frameworks: ["net/http"]
30
+ - pattern: 'gin\.Default|gin\.New'
31
+ description: "Gin web framework"
32
+ frameworks: ["gin"]
33
+ - pattern: 'chi\.NewRouter|chi\.NewMux'
34
+ description: "Chi router"
35
+ frameworks: ["chi"]
36
+ - pattern: 'echo\.New\(\)'
37
+ description: "Echo web framework"
38
+ frameworks: ["echo"]
39
+ - pattern: 'mux\.NewRouter'
40
+ description: "Gorilla Mux router"
41
+ frameworks: ["gorilla/mux"]
42
+ - pattern: 'fiber\.New\(\)'
43
+ description: "Fiber web framework"
44
+ frameworks: ["fiber"]
45
+
46
+ cli_indicators:
47
+ - pattern: 'github\.com/spf13/cobra'
48
+ description: "Cobra CLI framework"
49
+ frameworks: ["cobra"]
50
+ - pattern: 'github\.com/urfave/cli'
51
+ description: "urfave/cli framework"
52
+ frameworks: ["urfave/cli"]
53
+ - pattern: 'flag\.Parse\(\)|flag\.String\('
54
+ description: "Standard library flags"
55
+ frameworks: ["flag"]
56
+
57
+ frontend_indicators: [] # Go is not typically used for frontend
58
+
59
+ patterns:
60
+ # Chi router
61
+ - type: route
62
+ regex: 'r\.(Get|Post|Put|Delete|Patch|Head|Options)\s*\(\s*["\x27]([^"\x27]+)["\x27]'
63
+ groups: [method, path]
64
+ frameworks: ["chi"]
65
+ # Gin
66
+ - type: route
67
+ regex: '\.(GET|POST|PUT|DELETE|PATCH)\s*\(\s*["\x27]([^"\x27]+)["\x27]'
68
+ groups: [method, path]
69
+ frameworks: ["gin"]
70
+ # Echo
71
+ - type: route
72
+ regex: 'e\.(GET|POST|PUT|DELETE|PATCH)\s*\(\s*["\x27]([^"\x27]+)["\x27]'
73
+ groups: [method, path]
74
+ frameworks: ["echo"]
75
+ # Gorilla Mux
76
+ - type: route
77
+ regex: '\.HandleFunc\s*\(\s*["\x27]([^"\x27]+)["\x27].*\)\.(Methods)\s*\(\s*["\x27]([^"\x27]+)["\x27]\)'
78
+ groups: [path, _, method]
79
+ frameworks: ["gorilla/mux"]
80
+ # net/http
81
+ - type: route
82
+ regex: 'http\.HandleFunc\s*\(\s*["\x27]([^"\x27]+)["\x27]'
83
+ groups: [path]
84
+ frameworks: ["net/http"]
85
+ # Cobra CLI
86
+ - type: command
87
+ regex: '&cobra\.Command\s*\{\s*Use:\s*["\x27]([^"\x27\s]+)'
88
+ groups: [command_name]
89
+ frameworks: ["cobra"]
90
+
91
+ import_analysis:
92
+ list_packages: "go list -json ./..."
93
+ import_pattern: '"([^"]+)"'
94
+ source_extensions: [".go"]
95
+ module_root_file: "go.mod"
96
+
97
+ layer_conventions:
98
+ patterns:
99
+ - layer: 0
100
+ paths: ["internal/types", "types", "domain", "model", "entity"]
101
+ description: "Pure types, zero internal imports"
102
+ - layer: 1
103
+ paths: ["internal/utils", "utils", "pkg/utils", "lib"]
104
+ description: "Utilities, depend only on types"
105
+ - layer: 2
106
+ paths: ["internal/core", "core", "internal/service", "service"]
107
+ description: "Business logic, depend on types + utils"
108
+ - layer: 3
109
+ paths: ["internal/handler", "handler", "api", "internal/api"]
110
+ description: "HTTP/gRPC handlers, depend on core"
111
+ - layer: 4
112
+ paths: ["cmd"]
113
+ description: "Entry points, depend on everything"
114
+
115
+ dependency_detection:
116
+ manifest_file: "go.mod"
117
+ databases:
118
+ - pattern: "github.com/jackc/pgx|github.com/lib/pq"
119
+ type: "postgres"
120
+ default_port: 5432
121
+ - pattern: "github.com/go-sql-driver/mysql"
122
+ type: "mysql"
123
+ default_port: 3306
124
+ - pattern: "go.mongodb.org/mongo-driver"
125
+ type: "mongodb"
126
+ default_port: 27017
127
+ - pattern: "github.com/go-redis/redis|github.com/redis/go-redis"
128
+ type: "redis"
129
+ default_port: 6379
130
+ - pattern: "github.com/mattn/go-sqlite3|modernc.org/sqlite"
131
+ type: "sqlite"
132
+ default_port: 0
133
+ services:
134
+ - pattern: "github.com/segmentio/kafka-go|github.com/IBM/sarama"
135
+ type: "kafka"
136
+ default_port: 9092
137
+ - pattern: "github.com/rabbitmq/amqp091-go|github.com/streadway/amqp"
138
+ type: "rabbitmq"
139
+ default_port: 5672
140
+ - pattern: "github.com/nats-io/nats.go"
141
+ type: "nats"
142
+ default_port: 4222
143
+ - pattern: "github.com/elastic/go-elasticsearch"
144
+ type: "elasticsearch"
145
+ default_port: 9200
146
+ env_var_patterns:
147
+ - pattern: 'os\.Getenv\("([^"]+)"\)'
148
+ - pattern: 'os\.LookupEnv\("([^"]+)"\)'
149
+ - pattern: 'viper\.\w+\("([^"]+)"\)'
150
+
151
+ linter:
152
+ template_section: "go-linter"
153
+ script_extension: ".go"
154
+ run_command: "go run scripts/lint-deps.go"
155
+
156
+ naming:
157
+ file_pattern: "^[a-z][a-z0-9_]*\\.go$"
158
+ test_pattern: "^[a-z][a-z0-9_]*_test\\.go$"
159
+ directory_style: "snake_case"
160
+
161
+ ci:
162
+ github_actions:
163
+ image: "golang:1.22"
164
+ setup_steps:
165
+ - "uses: actions/setup-go@v5\n with:\n go-version: '1.22'"
166
+ cache_paths: ["~/go/pkg/mod", "~/.cache/go-build"]
167
+ ---
168
+
169
+ # Go Adapter
170
+
171
+ ## Server Start Command Inference
172
+
173
+ Priority order for detecting the server start command:
174
+
175
+ 1. Existing `harness/config/environment.json` startup command, if present
176
+ 2. `cmd/server/main.go` exists → `go run cmd/server/main.go`
177
+ 3. `cmd/api/main.go` exists → `go run cmd/api/main.go`
178
+ 4. `main.go` at root with `http` import → `go run main.go`
179
+ 5. Fail with actionable error
180
+
181
+ ## CLI Binary Inference
182
+
183
+ 1. `cmd/cli/main.go` exists → `go build -o bin/cli cmd/cli/main.go`
184
+ 2. `cmd/<name>/main.go` exists → `go build -o bin/<name> cmd/<name>/main.go`
185
+ 3. `main.go` at root with `cobra`/`flag` import → `go build -o bin/app .`
186
+
187
+ ## Testing Patterns
188
+
189
+ - Unit tests: `*_test.go` files alongside source
190
+ - Integration tests: `//go:build integration` build tag → `go test -tags=integration ./...`
191
+ - Table-driven tests are idiomatic
192
+
193
+ ## Common Frameworks
194
+
195
+ | Framework | Detection Pattern | Route Style |
196
+ |-----------|------------------|-------------|
197
+ | chi | `github.com/go-chi/chi` | `r.Get("/path", handler)` |
198
+ | gin | `github.com/gin-gonic/gin` | `r.GET("/path", handler)` |
199
+ | echo | `github.com/labstack/echo` | `e.GET("/path", handler)` |
200
+ | fiber | `github.com/gofiber/fiber` | `app.Get("/path", handler)` |
201
+ | gorilla/mux | `github.com/gorilla/mux` | `r.HandleFunc("/path", handler).Methods("GET")` |
202
+ | net/http | stdlib | `http.HandleFunc("/path", handler)` |
203
+
204
+ ## Structured Logging
205
+
206
+ Go projects should use structured loggers. Common patterns to detect:
207
+ - `go.uber.org/zap` → `zap.String()`, `zap.Int()`
208
+ - `log/slog` (stdlib) → `slog.Info()`, `slog.With()`
209
+ - `github.com/rs/zerolog` → `log.Info().Str().Msg()`
210
+ - `github.com/sirupsen/logrus` → `logrus.WithFields()`
211
+
212
+ Unstructured patterns to flag: `log.Printf`, `log.Println`, `log.Fatalf`, `fmt.Printf` (in non-CLI code)
@@ -0,0 +1,205 @@
1
+ ---
2
+ adapter:
3
+ language: java
4
+ display_name: "Java / Kotlin"
5
+ version: "1.0"
6
+
7
+ detection:
8
+ files: [pom.xml, build.gradle, build.gradle.kts, settings.gradle, settings.gradle.kts]
9
+ content_patterns:
10
+ - file: "pom.xml"
11
+ pattern: "<groupId>"
12
+ - file: "build.gradle.kts"
13
+ pattern: "plugins|dependencies"
14
+ confidence: 0.90
15
+
16
+ commands:
17
+ build: null # Detected from build tool
18
+ test: null # Detected from build tool
19
+ lint: null # Often spotbugs, checkstyle, or ktlint
20
+ lint_arch: null
21
+ format: null
22
+ start: null
23
+ dev: null
24
+
25
+ package_manager:
26
+ detection:
27
+ - lockfile: "pom.xml"
28
+ manager: "maven"
29
+ - lockfile: "build.gradle"
30
+ manager: "gradle"
31
+ - lockfile: "build.gradle.kts"
32
+ manager: "gradle"
33
+ default: "maven"
34
+ install_command: null # Dependencies resolved during build
35
+
36
+ route_detection:
37
+ server_indicators:
38
+ - pattern: '@RestController|@Controller|@RequestMapping'
39
+ description: "Spring MVC/Boot controller"
40
+ frameworks: ["spring"]
41
+ - pattern: 'import io\.micronaut'
42
+ description: "Micronaut framework"
43
+ frameworks: ["micronaut"]
44
+ - pattern: 'import io\.quarkus'
45
+ description: "Quarkus framework"
46
+ frameworks: ["quarkus"]
47
+ - pattern: 'import io\.vertx'
48
+ description: "Vert.x framework"
49
+ frameworks: ["vertx"]
50
+ - pattern: 'import io\.ktor'
51
+ description: "Ktor framework (Kotlin)"
52
+ frameworks: ["ktor"]
53
+ - pattern: 'import io\.javalin'
54
+ description: "Javalin web framework"
55
+ frameworks: ["javalin"]
56
+
57
+ cli_indicators:
58
+ - pattern: 'import picocli|@CommandLine'
59
+ description: "picocli CLI framework"
60
+ frameworks: ["picocli"]
61
+ - pattern: 'public static void main\(String'
62
+ description: "Java main method (potential CLI)"
63
+ frameworks: ["stdlib"]
64
+
65
+ frontend_indicators: []
66
+
67
+ patterns:
68
+ # Spring MVC annotations
69
+ - type: route
70
+ regex: '@(GetMapping|PostMapping|PutMapping|DeleteMapping|PatchMapping)\s*\(\s*(?:value\s*=\s*)?["\x27]([^"\x27]*)["\x27]'
71
+ groups: [method, path]
72
+ frameworks: ["spring"]
73
+ # Spring RequestMapping
74
+ - type: route
75
+ regex: '@RequestMapping\s*\(.*(?:value|path)\s*=\s*["\x27]([^"\x27]+)["\x27].*method\s*=\s*RequestMethod\.(\w+)'
76
+ groups: [path, method]
77
+ frameworks: ["spring"]
78
+ # Ktor (Kotlin)
79
+ - type: route
80
+ regex: '(get|post|put|delete|patch)\s*\(\s*["\x27]([^"\x27]+)["\x27]'
81
+ groups: [method, path]
82
+ frameworks: ["ktor"]
83
+ # Javalin
84
+ - type: route
85
+ regex: 'app\.(get|post|put|delete|patch)\s*\(\s*["\x27]([^"\x27]+)["\x27]'
86
+ groups: [method, path]
87
+ frameworks: ["javalin"]
88
+
89
+ import_analysis:
90
+ list_packages: null
91
+ import_pattern: "^import\\s+([\\w.]+)"
92
+ source_extensions: [".java", ".kt"]
93
+ module_root_file: "pom.xml"
94
+
95
+ layer_conventions:
96
+ patterns:
97
+ - layer: 0
98
+ paths: ["src/main/java/**/model", "src/main/java/**/entity", "src/main/java/**/dto"]
99
+ description: "Domain models, entities, DTOs"
100
+ - layer: 1
101
+ paths: ["src/main/java/**/util", "src/main/java/**/common", "src/main/java/**/config"]
102
+ description: "Utilities and configuration"
103
+ - layer: 2
104
+ paths: ["src/main/java/**/service", "src/main/java/**/repository", "src/main/java/**/dao"]
105
+ description: "Service and data access layer"
106
+ - layer: 3
107
+ paths: ["src/main/java/**/controller", "src/main/java/**/api", "src/main/java/**/resource"]
108
+ description: "REST controllers, API endpoints"
109
+ - layer: 4
110
+ paths: ["src/main/java/**/Application.java", "src/main/java/**/Main.java"]
111
+ description: "Application entry point"
112
+
113
+ dependency_detection:
114
+ manifest_file: "pom.xml"
115
+ databases:
116
+ - pattern: "postgresql|postgres"
117
+ type: "postgres"
118
+ default_port: 5432
119
+ - pattern: "mysql-connector"
120
+ type: "mysql"
121
+ default_port: 3306
122
+ - pattern: "mongodb-driver|mongo-java-driver"
123
+ type: "mongodb"
124
+ default_port: 27017
125
+ - pattern: "jedis|lettuce-core|spring-data-redis"
126
+ type: "redis"
127
+ default_port: 6379
128
+ - pattern: "h2|sqlite-jdbc"
129
+ type: "sqlite"
130
+ default_port: 0
131
+ services:
132
+ - pattern: "kafka-clients|spring-kafka"
133
+ type: "kafka"
134
+ default_port: 9092
135
+ - pattern: "amqp-client|spring-amqp|spring-rabbit"
136
+ type: "rabbitmq"
137
+ default_port: 5672
138
+ - pattern: "elasticsearch-rest-client|spring-data-elasticsearch"
139
+ type: "elasticsearch"
140
+ default_port: 9200
141
+ env_var_patterns:
142
+ - pattern: 'System\.getenv\(\s*["\x27]([^"\x27]+)["\x27]\)'
143
+ - pattern: '\\$\\{([A-Z_][A-Z0-9_]*)\\}'
144
+
145
+ linter:
146
+ template_section: "java-linter"
147
+ script_extension: ".java"
148
+ run_command: null # Typically integrated into build tool (spotbugs, checkstyle)
149
+
150
+ naming:
151
+ file_pattern: "^[A-Z][a-zA-Z0-9]*\\.java$"
152
+ test_pattern: "^[A-Z][a-zA-Z0-9]*Test\\.java$"
153
+ directory_style: "lowercase"
154
+
155
+ ci:
156
+ github_actions:
157
+ image: null # Uses setup-java action
158
+ setup_steps:
159
+ - "uses: actions/setup-java@v4\n with:\n distribution: 'temurin'\n java-version: '21'"
160
+ cache_paths: ["~/.m2/repository", "~/.gradle/caches"]
161
+ ---
162
+
163
+ # Java / Kotlin Adapter
164
+
165
+ ## Build Tool Detection
166
+
167
+ | File | Build Tool | Build Command | Test Command |
168
+ |------|-----------|---------------|--------------|
169
+ | `pom.xml` | Maven | `mvn package -DskipTests` | `mvn test` |
170
+ | `build.gradle` | Gradle (Groovy) | `./gradlew build -x test` | `./gradlew test` |
171
+ | `build.gradle.kts` | Gradle (Kotlin DSL) | `./gradlew build -x test` | `./gradlew test` |
172
+
173
+ If `mvnw` or `gradlew` wrapper exists, prefer the wrapper over system-installed tool.
174
+
175
+ ## Server Start Command Inference
176
+
177
+ 1. Existing `harness/config/environment.json` startup command, if present
178
+ 2. Spring Boot → `./gradlew bootRun` or `mvn spring-boot:run`
179
+ 3. Fat JAR exists → `java -jar target/*.jar` or `java -jar build/libs/*.jar`
180
+ 4. Main class annotated with `@SpringBootApplication` → infer from pom.xml/build.gradle
181
+
182
+ ## Framework-Specific Notes
183
+
184
+ ### Spring Boot
185
+ - Routes via annotations: `@GetMapping("/path")`, `@PostMapping("/path")`
186
+ - Controller prefix: `@RequestMapping("/api/v1")` on class
187
+ - Auto-configuration: `application.properties` or `application.yml`
188
+ - Default port: 8080 (configurable via `server.port`)
189
+ - Actuator health: `/actuator/health`
190
+
191
+ ### Micronaut
192
+ - Similar annotation style to Spring: `@Get("/path")`, `@Post("/path")`
193
+ - Compile-time DI (no reflection)
194
+ - Default port: 8080
195
+
196
+ ### Ktor (Kotlin)
197
+ - DSL-based routing: `routing { get("/path") { ... } }`
198
+ - Configuration via `application.conf` (HOCON) or `application.yaml`
199
+
200
+ ## Testing Patterns
201
+
202
+ - JUnit 5 is standard: `@Test`, `@ParameterizedTest`
203
+ - Kotlin: same JUnit 5 + kotest as alternative
204
+ - Integration tests often use `@SpringBootTest` + Testcontainers
205
+ - Test directory: `src/test/java/` or `src/test/kotlin/`
@@ -0,0 +1,225 @@
1
+ ---
2
+ adapter:
3
+ language: python
4
+ display_name: "Python"
5
+ version: "1.0"
6
+
7
+ detection:
8
+ files: [pyproject.toml, setup.py, requirements.txt, Pipfile]
9
+ content_patterns:
10
+ - file: "pyproject.toml"
11
+ pattern: '\\[project\\]|\\[tool\\.poetry\\]'
12
+ confidence: 0.90
13
+
14
+ commands:
15
+ build: null # Python typically doesn't need a build step
16
+ test: "pytest"
17
+ lint: "ruff check ."
18
+ lint_arch: "python scripts/lint_deps.py src/"
19
+ format: "ruff format ."
20
+ start: null # Inferred from framework
21
+ dev: null
22
+
23
+ package_manager:
24
+ detection:
25
+ - lockfile: "poetry.lock"
26
+ manager: "poetry"
27
+ - lockfile: "uv.lock"
28
+ manager: "uv"
29
+ - lockfile: "Pipfile.lock"
30
+ manager: "pipenv"
31
+ - lockfile: "pdm.lock"
32
+ manager: "pdm"
33
+ default: "pip"
34
+ install_command: "{manager} install"
35
+
36
+ route_detection:
37
+ server_indicators:
38
+ - pattern: 'from fastapi|import fastapi|FastAPI\(\)'
39
+ description: "FastAPI ASGI framework"
40
+ frameworks: ["fastapi"]
41
+ - pattern: 'from flask|import flask|Flask\(__name__\)'
42
+ description: "Flask WSGI framework"
43
+ frameworks: ["flask"]
44
+ - pattern: 'from django|import django'
45
+ description: "Django web framework"
46
+ frameworks: ["django"]
47
+ - pattern: 'from aiohttp|import aiohttp\.web'
48
+ description: "aiohttp async web framework"
49
+ frameworks: ["aiohttp"]
50
+ - pattern: 'from starlette|import starlette'
51
+ description: "Starlette ASGI framework"
52
+ frameworks: ["starlette"]
53
+ - pattern: 'from litestar|import litestar'
54
+ description: "Litestar ASGI framework"
55
+ frameworks: ["litestar"]
56
+
57
+ cli_indicators:
58
+ - pattern: 'import click|from click'
59
+ description: "Click CLI framework"
60
+ frameworks: ["click"]
61
+ - pattern: 'import typer|from typer'
62
+ description: "Typer CLI framework"
63
+ frameworks: ["typer"]
64
+ - pattern: 'import argparse|from argparse'
65
+ description: "Standard library argparse"
66
+ frameworks: ["argparse"]
67
+ - pattern: 'import fire|from fire'
68
+ description: "Google Python Fire"
69
+ frameworks: ["fire"]
70
+
71
+ frontend_indicators: [] # Python is not typically used for frontend
72
+
73
+ patterns:
74
+ # FastAPI
75
+ - type: route
76
+ regex: '@(?:app|router)\.(get|post|put|delete|patch)\s*\(\s*["\x27]([^"\x27]+)["\x27]'
77
+ groups: [method, path]
78
+ frameworks: ["fastapi", "starlette", "litestar"]
79
+ # Flask
80
+ - type: route
81
+ regex: '@(?:app|bp|blueprint)\.(route)\s*\(\s*["\x27]([^"\x27]+)["\x27](?:.*methods\s*=\s*\[([^\]]+)\])?'
82
+ groups: [_, path, method]
83
+ frameworks: ["flask"]
84
+ # Django URLs
85
+ - type: route
86
+ regex: 'path\s*\(\s*["\x27]([^"\x27]+)["\x27]'
87
+ groups: [path]
88
+ frameworks: ["django"]
89
+ # Click
90
+ - type: command
91
+ regex: '@\w+\.command\s*\(\s*(?:name\s*=\s*)?["\x27]?([^"\x27\)]+)'
92
+ groups: [command_name]
93
+ frameworks: ["click"]
94
+ # Typer
95
+ - type: command
96
+ regex: '@app\.command\s*\(\s*(?:name\s*=\s*)?["\x27]?([^"\x27\)]*)'
97
+ groups: [command_name]
98
+ frameworks: ["typer"]
99
+
100
+ import_analysis:
101
+ list_packages: null
102
+ import_pattern: "^(?:from|import)\\s+([\\w.]+)"
103
+ source_extensions: [".py"]
104
+ module_root_file: "pyproject.toml"
105
+
106
+ layer_conventions:
107
+ patterns:
108
+ - layer: 0
109
+ paths: ["src/models", "src/schemas", "src/types", "models", "schemas"]
110
+ description: "Data models, Pydantic schemas, type definitions"
111
+ - layer: 1
112
+ paths: ["src/utils", "src/lib", "src/common", "utils", "lib"]
113
+ description: "Shared utilities"
114
+ - layer: 2
115
+ paths: ["src/services", "src/core", "src/domain", "services", "core"]
116
+ description: "Business logic, service layer"
117
+ - layer: 3
118
+ paths: ["src/api", "src/routes", "src/views", "src/handlers", "api", "routes"]
119
+ description: "API endpoints, request handlers"
120
+ - layer: 4
121
+ paths: ["src/main.py", "src/app.py", "src/cli.py", "main.py", "app.py"]
122
+ description: "Application entry points"
123
+
124
+ dependency_detection:
125
+ manifest_file: "pyproject.toml"
126
+ databases:
127
+ - pattern: "psycopg|asyncpg|sqlalchemy.*postgres|databases.*postgres"
128
+ type: "postgres"
129
+ default_port: 5432
130
+ - pattern: "pymysql|aiomysql|mysqlclient"
131
+ type: "mysql"
132
+ default_port: 3306
133
+ - pattern: "pymongo|motor"
134
+ type: "mongodb"
135
+ default_port: 27017
136
+ - pattern: "redis|aioredis"
137
+ type: "redis"
138
+ default_port: 6379
139
+ - pattern: "aiosqlite|sqlite3"
140
+ type: "sqlite"
141
+ default_port: 0
142
+ services:
143
+ - pattern: "confluent-kafka|aiokafka"
144
+ type: "kafka"
145
+ default_port: 9092
146
+ - pattern: "pika|aio-pika"
147
+ type: "rabbitmq"
148
+ default_port: 5672
149
+ - pattern: "elasticsearch|elastic-transport"
150
+ type: "elasticsearch"
151
+ default_port: 9200
152
+ env_var_patterns:
153
+ - pattern: 'os\.environ\.get\(\s*["\x27]([^"\x27]+)["\x27]'
154
+ - pattern: 'os\.environ\[["\x27]([^"\x27]+)["\x27]\]'
155
+ - pattern: 'os\.getenv\(\s*["\x27]([^"\x27]+)["\x27]'
156
+
157
+ linter:
158
+ template_section: "python-linter"
159
+ script_extension: ".py"
160
+ run_command: "python scripts/lint_deps.py src/"
161
+
162
+ naming:
163
+ file_pattern: "^[a-z][a-z0-9_]*\\.py$"
164
+ test_pattern: "^test_[a-z][a-z0-9_]*\\.py$"
165
+ directory_style: "snake_case"
166
+
167
+ ci:
168
+ github_actions:
169
+ image: "python:3.12"
170
+ setup_steps:
171
+ - "uses: actions/setup-python@v5\n with:\n python-version: '3.12'"
172
+ cache_paths: ["~/.cache/pip", ".venv"]
173
+ ---
174
+
175
+ # Python Adapter
176
+
177
+ ## Server Start Command Inference
178
+
179
+ 1. Existing `harness/config/environment.json` startup command, if present
180
+ 2. FastAPI detected → `python -m uvicorn {module}:app --port 8080`
181
+ - Module inferred from main app file location
182
+ 3. Flask detected → `python -m flask run --port 8080`
183
+ 4. Django detected → `python manage.py runserver 8080`
184
+ 5. `main.py` exists → `python main.py`
185
+
186
+ ## Virtual Environment Detection
187
+
188
+ The adapter checks for virtual environments in this order:
189
+ 1. `.venv/` directory → `source .venv/bin/activate`
190
+ 2. `venv/` directory → `source venv/bin/activate`
191
+ 3. `poetry.lock` → `poetry shell` or prefix with `poetry run`
192
+ 4. `uv.lock` → prefix with `uv run`
193
+ 5. `Pipfile.lock` → prefix with `pipenv run`
194
+
195
+ ## Framework-Specific Notes
196
+
197
+ ### FastAPI
198
+ - Routes via decorators: `@app.get("/path")`, `@router.post("/path")`
199
+ - Dependency injection via `Depends()`
200
+ - Auto-generated OpenAPI docs at `/docs` and `/redoc`
201
+ - Start with uvicorn: `uvicorn app.main:app --reload`
202
+
203
+ ### Flask
204
+ - Routes via decorators: `@app.route("/path", methods=["GET"])`
205
+ - Blueprints for modular routing
206
+ - Start with: `flask run` or `python -m flask run`
207
+
208
+ ### Django
209
+ - URL configuration in `urls.py`: `path("api/", include("app.urls"))`
210
+ - Class-based views and function-based views
211
+ - Start with: `python manage.py runserver`
212
+ - Migrations: `python manage.py migrate`
213
+
214
+ ### Click / Typer (CLI)
215
+ - Click: `@cli.command()` decorator pattern
216
+ - Typer: `@app.command()` decorator pattern, with auto-generated help
217
+
218
+ ## Type Checking
219
+
220
+ Python projects may use type checkers:
221
+ - `mypy` — most common, configured in `pyproject.toml` or `mypy.ini`
222
+ - `pyright` — Microsoft's type checker, often via Pylance
223
+ - `pytype` — Google's type checker
224
+
225
+ Detection: check `pyproject.toml` `[tool.mypy]` or `mypy.ini` existence.