@mrciphersmith/keryx 0.3.3 → 0.3.6
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/dist/cli.js +996 -366
- package/docs/README.md +2 -0
- package/package.json +1 -1
- package/src/gdskills/bundled/install-manifest.json +520 -48
- package/src/gdskills/bundled/stacks/csharp-dotnet/agent-refs.json +4 -0
- package/src/gdskills/bundled/stacks/csharp-dotnet/governance/eval.json +1881 -0
- package/src/gdskills/bundled/stacks/csharp-dotnet/governance/scout.json +33 -0
- package/src/gdskills/bundled/stacks/csharp-dotnet/pack.json +38 -0
- package/src/gdskills/bundled/stacks/csharp-dotnet/rules/coding-style.mdc +100 -0
- package/src/gdskills/bundled/stacks/csharp-dotnet/rules/patterns.mdc +107 -0
- package/src/gdskills/bundled/stacks/csharp-dotnet/rules/security.mdc +86 -0
- package/src/gdskills/bundled/stacks/csharp-dotnet/rules/testing.mdc +89 -0
- package/src/gdskills/bundled/stacks/csharp-dotnet/skills/dotnet-build-fix/SKILL.md +143 -0
- package/src/gdskills/bundled/stacks/csharp-dotnet/skills/dotnet-build-fix/evals.json +77 -0
- package/src/gdskills/bundled/stacks/csharp-dotnet/skills/dotnet-code-review/SKILL.md +121 -0
- package/src/gdskills/bundled/stacks/csharp-dotnet/skills/dotnet-code-review/evals.json +77 -0
- package/src/gdskills/bundled/stacks/csharp-dotnet/skills/dotnet-implementation/SKILL.md +134 -0
- package/src/gdskills/bundled/stacks/csharp-dotnet/skills/dotnet-implementation/evals.json +76 -0
- package/src/gdskills/bundled/stacks/csharp-dotnet/skills/dotnet-testing/SKILL.md +130 -0
- package/src/gdskills/bundled/stacks/csharp-dotnet/skills/dotnet-testing/evals.json +77 -0
- package/src/gdskills/bundled/stacks/django/agent-refs.json +3 -0
- package/src/gdskills/bundled/stacks/django/governance/eval.json +1763 -0
- package/src/gdskills/bundled/stacks/django/governance/scout.json +40 -0
- package/src/gdskills/bundled/stacks/django/pack.json +43 -0
- package/src/gdskills/bundled/stacks/django/rules/coding-style.mdc +80 -0
- package/src/gdskills/bundled/stacks/django/rules/patterns.mdc +92 -0
- package/src/gdskills/bundled/stacks/django/rules/security.mdc +92 -0
- package/src/gdskills/bundled/stacks/django/rules/testing.mdc +89 -0
- package/src/gdskills/bundled/stacks/django/skills/django-build-fix/SKILL.md +149 -0
- package/src/gdskills/bundled/stacks/django/skills/django-build-fix/evals.json +49 -0
- package/src/gdskills/bundled/stacks/django/skills/django-code-review/SKILL.md +137 -0
- package/src/gdskills/bundled/stacks/django/skills/django-code-review/evals.json +48 -0
- package/src/gdskills/bundled/stacks/django/skills/django-implementation/SKILL.md +147 -0
- package/src/gdskills/bundled/stacks/django/skills/django-implementation/evals.json +75 -0
- package/src/gdskills/bundled/stacks/django/skills/django-migrate/SKILL.md +166 -0
- package/src/gdskills/bundled/stacks/django/skills/django-migrate/evals.json +49 -0
- package/src/gdskills/bundled/stacks/django/skills/django-testing/SKILL.md +130 -0
- package/src/gdskills/bundled/stacks/django/skills/django-testing/evals.json +48 -0
- package/src/gdskills/bundled/stacks/fastapi/agent-refs.json +3 -0
- package/src/gdskills/bundled/stacks/fastapi/governance/eval.json +1777 -0
- package/src/gdskills/bundled/stacks/fastapi/governance/scout.json +34 -0
- package/src/gdskills/bundled/stacks/fastapi/pack.json +43 -0
- package/src/gdskills/bundled/stacks/fastapi/rules/coding-style.mdc +68 -0
- package/src/gdskills/bundled/stacks/fastapi/rules/patterns.mdc +108 -0
- package/src/gdskills/bundled/stacks/fastapi/rules/security.mdc +99 -0
- package/src/gdskills/bundled/stacks/fastapi/rules/testing.mdc +85 -0
- package/src/gdskills/bundled/stacks/fastapi/skills/fastapi-build-fix/SKILL.md +157 -0
- package/src/gdskills/bundled/stacks/fastapi/skills/fastapi-build-fix/evals.json +76 -0
- package/src/gdskills/bundled/stacks/fastapi/skills/fastapi-code-review/SKILL.md +150 -0
- package/src/gdskills/bundled/stacks/fastapi/skills/fastapi-code-review/evals.json +74 -0
- package/src/gdskills/bundled/stacks/fastapi/skills/fastapi-implementation/SKILL.md +158 -0
- package/src/gdskills/bundled/stacks/fastapi/skills/fastapi-implementation/evals.json +75 -0
- package/src/gdskills/bundled/stacks/fastapi/skills/fastapi-testing/SKILL.md +146 -0
- package/src/gdskills/bundled/stacks/fastapi/skills/fastapi-testing/evals.json +74 -0
- package/src/gdskills/bundled/stacks/flutter-dart/agent-refs.json +4 -0
- package/src/gdskills/bundled/stacks/flutter-dart/governance/eval.json +1849 -0
- package/src/gdskills/bundled/stacks/flutter-dart/governance/scout.json +33 -0
- package/src/gdskills/bundled/stacks/flutter-dart/pack.json +41 -0
- package/src/gdskills/bundled/stacks/flutter-dart/rules/coding-style.mdc +98 -0
- package/src/gdskills/bundled/stacks/flutter-dart/rules/patterns.mdc +88 -0
- package/src/gdskills/bundled/stacks/flutter-dart/rules/security.mdc +91 -0
- package/src/gdskills/bundled/stacks/flutter-dart/rules/testing.mdc +101 -0
- package/src/gdskills/bundled/stacks/flutter-dart/skills/flutter-build-fix/SKILL.md +134 -0
- package/src/gdskills/bundled/stacks/flutter-dart/skills/flutter-build-fix/evals.json +79 -0
- package/src/gdskills/bundled/stacks/flutter-dart/skills/flutter-code-review/SKILL.md +124 -0
- package/src/gdskills/bundled/stacks/flutter-dart/skills/flutter-code-review/evals.json +74 -0
- package/src/gdskills/bundled/stacks/flutter-dart/skills/flutter-implementation/SKILL.md +139 -0
- package/src/gdskills/bundled/stacks/flutter-dart/skills/flutter-implementation/evals.json +77 -0
- package/src/gdskills/bundled/stacks/flutter-dart/skills/flutter-testing/SKILL.md +134 -0
- package/src/gdskills/bundled/stacks/flutter-dart/skills/flutter-testing/evals.json +74 -0
- package/src/gdskills/bundled/stacks/java-kotlin-spring/agent-refs.json +3 -0
- package/src/gdskills/bundled/stacks/java-kotlin-spring/governance/eval.json +2194 -0
- package/src/gdskills/bundled/stacks/java-kotlin-spring/governance/scout.json +39 -0
- package/src/gdskills/bundled/stacks/java-kotlin-spring/pack.json +40 -0
- package/src/gdskills/bundled/stacks/java-kotlin-spring/rules/coding-style.mdc +67 -0
- package/src/gdskills/bundled/stacks/java-kotlin-spring/rules/patterns.mdc +65 -0
- package/src/gdskills/bundled/stacks/java-kotlin-spring/rules/security.mdc +69 -0
- package/src/gdskills/bundled/stacks/java-kotlin-spring/rules/testing.mdc +80 -0
- package/src/gdskills/bundled/stacks/java-kotlin-spring/skills/java-kotlin-spring-build-fix/SKILL.md +144 -0
- package/src/gdskills/bundled/stacks/java-kotlin-spring/skills/java-kotlin-spring-build-fix/evals.json +74 -0
- package/src/gdskills/bundled/stacks/java-kotlin-spring/skills/java-kotlin-spring-code-review/SKILL.md +129 -0
- package/src/gdskills/bundled/stacks/java-kotlin-spring/skills/java-kotlin-spring-code-review/evals.json +74 -0
- package/src/gdskills/bundled/stacks/java-kotlin-spring/skills/java-kotlin-spring-implementation/SKILL.md +147 -0
- package/src/gdskills/bundled/stacks/java-kotlin-spring/skills/java-kotlin-spring-implementation/evals.json +75 -0
- package/src/gdskills/bundled/stacks/java-kotlin-spring/skills/java-kotlin-spring-migrate/SKILL.md +139 -0
- package/src/gdskills/bundled/stacks/java-kotlin-spring/skills/java-kotlin-spring-migrate/evals.json +74 -0
- package/src/gdskills/bundled/stacks/java-kotlin-spring/skills/java-kotlin-spring-testing/SKILL.md +128 -0
- package/src/gdskills/bundled/stacks/java-kotlin-spring/skills/java-kotlin-spring-testing/evals.json +73 -0
- package/src/gdskills/bundled/stacks/kotlin-android/agent-refs.json +4 -0
- package/src/gdskills/bundled/stacks/kotlin-android/governance/eval.json +1889 -0
- package/src/gdskills/bundled/stacks/kotlin-android/governance/scout.json +34 -0
- package/src/gdskills/bundled/stacks/kotlin-android/pack.json +38 -0
- package/src/gdskills/bundled/stacks/kotlin-android/rules/coding-style.mdc +89 -0
- package/src/gdskills/bundled/stacks/kotlin-android/rules/patterns.mdc +96 -0
- package/src/gdskills/bundled/stacks/kotlin-android/rules/security.mdc +90 -0
- package/src/gdskills/bundled/stacks/kotlin-android/rules/testing.mdc +89 -0
- package/src/gdskills/bundled/stacks/kotlin-android/skills/compose-implementation/SKILL.md +150 -0
- package/src/gdskills/bundled/stacks/kotlin-android/skills/compose-implementation/evals.json +77 -0
- package/src/gdskills/bundled/stacks/kotlin-android/skills/kotlin-android-build-fix/SKILL.md +151 -0
- package/src/gdskills/bundled/stacks/kotlin-android/skills/kotlin-android-build-fix/evals.json +76 -0
- package/src/gdskills/bundled/stacks/kotlin-android/skills/kotlin-android-code-review/SKILL.md +139 -0
- package/src/gdskills/bundled/stacks/kotlin-android/skills/kotlin-android-code-review/evals.json +78 -0
- package/src/gdskills/bundled/stacks/kotlin-android/skills/kotlin-android-testing/SKILL.md +131 -0
- package/src/gdskills/bundled/stacks/kotlin-android/skills/kotlin-android-testing/evals.json +77 -0
- package/src/gdskills/bundled/stacks/python/agent-refs.json +2 -1
- package/src/gdskills/bundled/stacks/python/pack.json +1 -1
- package/src/gdskills/bundled/stacks/rust/agent-refs.json +3 -0
- package/src/gdskills/bundled/stacks/rust/governance/eval.json +1823 -0
- package/src/gdskills/bundled/stacks/rust/governance/scout.json +32 -0
- package/src/gdskills/bundled/stacks/rust/pack.json +42 -0
- package/src/gdskills/bundled/stacks/rust/rules/coding-style.mdc +93 -0
- package/src/gdskills/bundled/stacks/rust/rules/patterns.mdc +85 -0
- package/src/gdskills/bundled/stacks/rust/rules/security.mdc +85 -0
- package/src/gdskills/bundled/stacks/rust/rules/testing.mdc +82 -0
- package/src/gdskills/bundled/stacks/rust/skills/rust-build-fix/SKILL.md +141 -0
- package/src/gdskills/bundled/stacks/rust/skills/rust-build-fix/evals.json +78 -0
- package/src/gdskills/bundled/stacks/rust/skills/rust-code-review/SKILL.md +127 -0
- package/src/gdskills/bundled/stacks/rust/skills/rust-code-review/evals.json +72 -0
- package/src/gdskills/bundled/stacks/rust/skills/rust-implementation/SKILL.md +133 -0
- package/src/gdskills/bundled/stacks/rust/skills/rust-implementation/evals.json +79 -0
- package/src/gdskills/bundled/stacks/rust/skills/rust-testing/SKILL.md +130 -0
- package/src/gdskills/bundled/stacks/rust/skills/rust-testing/evals.json +75 -0
- package/src/gdskills/bundled/stacks/swift-ios/agent-refs.json +4 -0
- package/src/gdskills/bundled/stacks/swift-ios/governance/eval.json +1803 -0
- package/src/gdskills/bundled/stacks/swift-ios/governance/scout.json +32 -0
- package/src/gdskills/bundled/stacks/swift-ios/pack.json +38 -0
- package/src/gdskills/bundled/stacks/swift-ios/rules/coding-style.mdc +92 -0
- package/src/gdskills/bundled/stacks/swift-ios/rules/patterns.mdc +112 -0
- package/src/gdskills/bundled/stacks/swift-ios/rules/security.mdc +78 -0
- package/src/gdskills/bundled/stacks/swift-ios/rules/testing.mdc +90 -0
- package/src/gdskills/bundled/stacks/swift-ios/skills/swift-build-fix/SKILL.md +144 -0
- package/src/gdskills/bundled/stacks/swift-ios/skills/swift-build-fix/evals.json +75 -0
- package/src/gdskills/bundled/stacks/swift-ios/skills/swift-code-review/SKILL.md +122 -0
- package/src/gdskills/bundled/stacks/swift-ios/skills/swift-code-review/evals.json +75 -0
- package/src/gdskills/bundled/stacks/swift-ios/skills/swift-testing/SKILL.md +131 -0
- package/src/gdskills/bundled/stacks/swift-ios/skills/swift-testing/evals.json +75 -0
- package/src/gdskills/bundled/stacks/swift-ios/skills/swiftui-implementation/SKILL.md +149 -0
- package/src/gdskills/bundled/stacks/swift-ios/skills/swiftui-implementation/evals.json +76 -0
- package/src/gdskills/bundled/agents/python-build-fixer.md +0 -52
- package/src/gdskills/bundled/agents/python-code-auditor.md +0 -49
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"triggers": {
|
|
3
|
+
"positive": [
|
|
4
|
+
"Add a detail screen that fetches and displays an order from a backend",
|
|
5
|
+
"This screen's counter should live in the view since only it touches it",
|
|
6
|
+
"The child needs to toggle a setting that lives on its parent screen",
|
|
7
|
+
"Hook up a settings toggle whose state a parent view actually owns",
|
|
8
|
+
"Build a profile screen for an app targeting iOS 17 and later",
|
|
9
|
+
"Kick off a fetch when this screen appears and cancel it if the user navigates away",
|
|
10
|
+
"This screen makes a network call and I need it to not block the main thread"
|
|
11
|
+
],
|
|
12
|
+
"negative": [
|
|
13
|
+
"Implement this feature in Kotlin for Android with Jetpack Compose",
|
|
14
|
+
"Add this Flutter widget with a StatefulWidget",
|
|
15
|
+
"Implement this C#/.NET service feature with dependency injection",
|
|
16
|
+
"Implement this React component with the new form fields",
|
|
17
|
+
"Write the equivalent screen in Android using LiveData",
|
|
18
|
+
"Implement a new endpoint in a Go cmd/api binary",
|
|
19
|
+
"Add unit tests for this Swift view model"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"scenarios": [
|
|
23
|
+
{
|
|
24
|
+
"id": "state-ownership-binding",
|
|
25
|
+
"prompt": "I have a screen with a toggle whose value the parent view actually owns and reacts to elsewhere on screen. How should the child view that shows the toggle be wired up?",
|
|
26
|
+
"strictness": "high",
|
|
27
|
+
"expected_behavior": [
|
|
28
|
+
{
|
|
29
|
+
"grader": "judge",
|
|
30
|
+
"rubric": "A correct answer wires the child view's toggle through a @Binding parameter, with the parent passing $value from its own owned @State (or an @Observable model property), rather than giving the child its own local @State that only mirrors the parent's value and cannot propagate a change back.",
|
|
31
|
+
"pass_criteria": [
|
|
32
|
+
"Names @Binding as the property wrapper for the child's toggle parameter, not a local copy.",
|
|
33
|
+
"Shows the parent passing the binding with the $ prefix (e.g. `ToggleRow(isOn: $isEnabled)`) from state the parent itself owns.",
|
|
34
|
+
"Explains why a local @State in the child is wrong here: it would not propagate the change back to the parent that actually owns and reacts to the value."
|
|
35
|
+
],
|
|
36
|
+
"fail_criteria": [
|
|
37
|
+
"Recommends giving the child view its own @State for the toggle when the parent is stated to own and react to the value elsewhere on screen, with no mechanism to propagate the change back up."
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"calibration": {
|
|
42
|
+
"known_right": "Give the child view a `@Binding var isOn: Bool` parameter instead of its own `@State` -- the parent already owns this value and reacts to it elsewhere, so the child needs to both display and mutate the parent's copy, not keep an independent one. In the parent, declare the value with `@State private var isEnabled = false` (or as a property on an `@Observable` model the parent owns), and pass it down as `ToggleRow(isOn: $isEnabled)` -- the `$` gives the child a two-way binding into the parent's storage. When the child's `Toggle(\"Enabled\", isOn: $isOn)` flips, it writes straight through to the parent's `isEnabled`, so anything else on the parent's screen that reads `isEnabled` sees the update immediately. Giving the child its own `@State` here would be wrong: it would start as a copy of whatever initial value was passed in, but toggling it inside the child would never reach the parent's `isEnabled` at all -- the two would immediately diverge.",
|
|
43
|
+
"known_wrong": "Just give the child view `@State private var isOn: Bool = false` for the toggle -- it's simpler than threading a binding through, and the child can just call an `onToggle` closure the parent passes in whenever it changes, so the parent finds out that way instead. You don't really need `@Binding` for something this small; closures work fine and keep the child's state self-contained.",
|
|
44
|
+
"vague": "Wire the toggle up so the parent and child both see the current value and stay in sync when it changes.",
|
|
45
|
+
"subtle_wrong": "Give the child view `@State private var isOn: Bool`, initialized from a value the parent passes into its initializer (`ToggleRow(initialValue: isEnabled)`). When the toggle changes inside the child, call an `onChange(of: isOn) { _, newValue in onToggleChanged(newValue) }` closure that was also passed in, so the parent's `isEnabled` gets updated a moment later through the callback. That way the child still manages its own local UI state directly, and the parent just gets notified after the fact."
|
|
46
|
+
},
|
|
47
|
+
"anti_patterns": []
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"id": "mainactor-async-fetch",
|
|
51
|
+
"prompt": "A SwiftUI screen needs to fetch some data from the network when it appears and show a loading state while it waits. How should I structure the concurrency for this?",
|
|
52
|
+
"strictness": "high",
|
|
53
|
+
"expected_behavior": [
|
|
54
|
+
{
|
|
55
|
+
"grader": "judge",
|
|
56
|
+
"rubric": "A correct answer uses SwiftUI's .task modifier (or an equivalent view-lifetime-scoped async entry point) to kick off the async fetch with async/await, keeps the view-facing state (the loading flag, the fetched result) main-actor-isolated -- either directly as @State on the View (automatically @MainActor-isolated since the iOS 18 SDK, since View conformance itself is main-actor-isolated) or, if the state lives on a separate model/class, marks that type @MainActor explicitly, since a standalone type does not inherit the View's own isolation -- and relies on .task's automatic cancellation when the view disappears rather than a manually created, unjoined Task with no cancellation handling.",
|
|
57
|
+
"pass_criteria": [
|
|
58
|
+
"Uses `.task { }` (or explicitly discusses tying the async work to the view's lifetime) as the entry point for the fetch, not a bare `Task {}` fired from `onAppear` with no lifetime tie.",
|
|
59
|
+
"States that the loading flag/fetched result are main-actor-isolated -- either implicitly (kept as @State directly on the View, which is @MainActor-isolated automatically since the iOS 18 SDK) or explicitly (a separate @Observable model/class marked @MainActor, since a standalone type outside the View does not inherit that automatic isolation).",
|
|
60
|
+
"Mentions that `.task`'s work is automatically cancelled when the view disappears, or otherwise addresses cancellation, rather than leaving the fetch to run unconditionally to completion regardless of navigation."
|
|
61
|
+
],
|
|
62
|
+
"fail_criteria": [
|
|
63
|
+
"Starts the fetch with a bare `Task { ... }` inside `.onAppear` (or similar) with no mention of cancellation or view-lifetime scoping, presented as the complete/preferred approach."
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
"calibration": {
|
|
68
|
+
"known_right": "Kick the fetch off from a `.task { }` modifier on the view rather than a bare `Task {}` inside `.onAppear` -- `.task` ties the async work to the view's lifetime automatically: if the view disappears before the fetch finishes, SwiftUI cancels the task for you, so you don't leak a fetch for a screen the user already navigated away from. Inside the `.task`, `await` the network call directly through whatever client protocol the feature already depends on, set a `isLoading` flag to true before the call and false after (in a `defer` or in both success/failure paths), and store the result. If this state is simple enough to live directly on the view, plain `@State` properties are fine as-is -- `View` conformance is itself `@MainActor`-isolated since the iOS 18 SDK, so state kept on the view struct is already main-actor-isolated with no extra annotation needed. If instead you pull the loading flag and fetched value out onto a separate `@Observable` model (worth doing once there's real logic beyond a couple of properties), mark THAT type `@MainActor` explicitly -- a standalone type does not inherit the view's own isolation just because a view happens to hold and read it. If the fetch can be cancelled mid-flight, check `Task.isCancelled` or let a `CancellationError` from the awaited call propagate naturally rather than swallowing it.",
|
|
69
|
+
"known_wrong": "In `onAppear`, just fire off `Task { let result = try await client.fetchOrder(id: id); self.order = result; self.isLoading = false }` -- that's enough to get the data loading and update the UI once it comes back. You don't really need to worry about `.task` versus a plain `Task {}` here, and cancellation isn't a big deal for a quick fetch like this since it'll almost always finish before the user navigates anywhere else.",
|
|
70
|
+
"vague": "Fetch the data asynchronously when the screen appears and make sure the loading state updates correctly on the main thread.",
|
|
71
|
+
"subtle_wrong": "Use `.task { isLoading = true; let result = try? await client.fetchOrder(id: id); self.order = result; isLoading = false }` on the view, which is good since `.task` handles the async lifecycle for you. But keep `isLoading` and `order` on a shared `OrderCache` class the view holds a reference to (`let cache = OrderCache.shared`) instead of on the view itself, mutating `cache.isLoading`/`cache.order` directly inside the `.task` -- no need for `@MainActor` or `@Observable` on `OrderCache`, since the `.task` closure that touches it already runs in the view's own main-actor context, so whatever reads or writes `cache`'s properties there is safe by extension."
|
|
72
|
+
},
|
|
73
|
+
"anti_patterns": []
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
schema_version: 1
|
|
3
|
-
name: "python-build-fixer"
|
|
4
|
-
description: "Reproduces and fixes a Python build, lint, type-check, or test failure with the smallest root-cause change, isolated in a worktree. Dispatched after a python build/CI command fails and needs a targeted fix rather than a full implementation pass, always re-running the same commands to prove the fix actually holds."
|
|
5
|
-
role: "A Python build-and-test fixer who reproduces the reported failure, finds the smallest root-cause fix, and proves the original commands pass again before reporting done."
|
|
6
|
-
tools:
|
|
7
|
-
- "read_file"
|
|
8
|
-
- "list_dir"
|
|
9
|
-
- "get_cwd"
|
|
10
|
-
- "search_code"
|
|
11
|
-
- "graph_affected"
|
|
12
|
-
- "apply_patch"
|
|
13
|
-
- "shell_exec"
|
|
14
|
-
model_tier: "standard"
|
|
15
|
-
policy_profile: "workspace-write"
|
|
16
|
-
skills:
|
|
17
|
-
- "python-build-fix"
|
|
18
|
-
stacks:
|
|
19
|
-
- "python"
|
|
20
|
-
output_contract: "subagent-result"
|
|
21
|
-
isolation: "worktree"
|
|
22
|
-
origin:
|
|
23
|
-
kind: "generated"
|
|
24
|
-
sourceRef: "python"
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
# Python Build Fixer
|
|
28
|
-
|
|
29
|
-
## Scope
|
|
30
|
-
|
|
31
|
-
Workspace-write build/lint/type/test-failure fixing for Python projects, isolated in a worktree so a bad fix never lands in the parent checkout. Only the smallest fix needed to turn the given failure green.
|
|
32
|
-
|
|
33
|
-
## Procedure
|
|
34
|
-
|
|
35
|
-
1. Reproduce the reported failure by running, in this order:
|
|
36
|
-
1. `ruff check .`
|
|
37
|
-
2. `ruff format --check .`
|
|
38
|
-
3. `mypy . || pyright`
|
|
39
|
-
4. `pytest -x -q`
|
|
40
|
-
2. Read the failing output and the smallest set of files it implicates, using `read_file`, `search_code`, and `graph_affected` to trace the failure to its root cause before changing anything.
|
|
41
|
-
3. Make the smallest root-cause fix with `apply_patch`. Never do any of the following:
|
|
42
|
-
- never add `# type: ignore` or `# noqa` to silence a checker without fixing or explaining the underlying issue
|
|
43
|
-
- never pin or downgrade a dependency to route around a real incompatibility without saying so in the report
|
|
44
|
-
- never widen a narrowed exception catch or a real type hole just to make a check pass
|
|
45
|
-
- fix the smallest root cause; do not refactor unrelated code while resolving a build/lint/type failure
|
|
46
|
-
4. Re-run the exact same commands from step 1, in the same order, and confirm every one is green before reporting.
|
|
47
|
-
|
|
48
|
-
## Report
|
|
49
|
-
|
|
50
|
-
Findings section: which command(s) were failing, the root cause, the fix applied, and the final re-run result for each command from step 1.
|
|
51
|
-
|
|
52
|
-
The reply's first line is `STATUS: DONE|DONE_WITH_CONCERNS|NEEDS_CONTEXT|BLOCKED` per the subagent-result contract. Use `DONE_WITH_CONCERNS` when a fix landed but a related risk remains; `BLOCKED` when the failure could not be reproduced at all.
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
schema_version: 1
|
|
3
|
-
name: "python-code-auditor"
|
|
4
|
-
description: "Reviews Python code, read-only, for the 6 stack-specific risk patterns this pack's authors documented for python (correctness, resource, and security patterns particular to Python). Dispatched for a stack-specific code-quality pass distinct from generic review, gated the same stack_requires-style way review-orchestrator already uses for per-stack reviewers."
|
|
5
|
-
role: "A Python-focused code auditor who reads for this stack's known risk patterns without editing anything, and ranks findings by real-world impact rather than listing every theoretical concern equally."
|
|
6
|
-
tools:
|
|
7
|
-
- "read_file"
|
|
8
|
-
- "list_dir"
|
|
9
|
-
- "get_cwd"
|
|
10
|
-
- "search_code"
|
|
11
|
-
- "graph_affected"
|
|
12
|
-
- "memory_search"
|
|
13
|
-
model_tier: "deep"
|
|
14
|
-
policy_profile: "read-only"
|
|
15
|
-
skills:
|
|
16
|
-
- "python-code-review"
|
|
17
|
-
stacks:
|
|
18
|
-
- "python"
|
|
19
|
-
output_contract: "subagent-result"
|
|
20
|
-
isolation: "none"
|
|
21
|
-
origin:
|
|
22
|
-
kind: "generated"
|
|
23
|
-
sourceRef: "python"
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
# Python Code Auditor
|
|
27
|
-
|
|
28
|
-
## Scope
|
|
29
|
-
|
|
30
|
-
Read-only review of Python code within the given diff or area, gated on the `python` stack. Never edits files — findings and remediation guidance only.
|
|
31
|
-
|
|
32
|
-
## Procedure
|
|
33
|
-
|
|
34
|
-
1. Identify the scope: which files are in the diff or named area, and which of them are actually written in this stack.
|
|
35
|
-
2. Use `search_code` and `read_file` to check each of the following python-specific risk patterns:
|
|
36
|
-
- mutable default arguments (`def f(x=[])`) instead of `None` + inside-body init
|
|
37
|
-
- broad `except:`/`except Exception:` that swallows an unrelated failure
|
|
38
|
-
- resource handles (files, sockets, DB connections, locks) opened without a `with` block
|
|
39
|
-
- blocking calls (`requests`, `time.sleep`, sync file I/O) inside an `async def`
|
|
40
|
-
- typing holes: untyped public signatures, bare `Any`, or an implicit-`None` return missing `| None`/`Optional`
|
|
41
|
-
- security sinks: `shell=True`, `eval`/`exec`, `pickle`/`yaml.load` on untrusted input, unparameterized SQL
|
|
42
|
-
3. Trace anything ambiguous with `graph_affected` before ruling on it, and check `memory_search` for a prior accepted finding in this area before re-raising something already reviewed.
|
|
43
|
-
4. For any pattern not covered above, consult the `python-code-review` skill(s) and this pack's rules under `stacks/python/rules` (module `python-rules`).
|
|
44
|
-
|
|
45
|
-
## Report
|
|
46
|
-
|
|
47
|
-
Findings section, ordered by severity: file path and line, which audit-focus pattern it matches, and a specific remediation. Note anything checked and found clean.
|
|
48
|
-
|
|
49
|
-
The reply's first line is `STATUS: DONE|DONE_WITH_CONCERNS|NEEDS_CONTEXT|BLOCKED` per the subagent-result contract. Use `DONE_WITH_CONCERNS` when findings exist; `BLOCKED` only when the scope could not be read.
|