Skip to content

Instantly share code, notes, and snippets.

@dpolishuk
dpolishuk / README.md
Last active September 23, 2026 08:02
Маршрутизация моделей для Claude Code: Fable координирует, Opus/Sonnet пишут и проверяют; хук-гейт по agent_id

Маршрутизация моделей для Claude Code

Аналог setup-codex-routing.sh для экосистемы Claude Code: модель главного треда координирует и решает сложное, код пишут другие роли, проверяет третья.

Раскладка ниже — умолчание (пресет opus); всё настраивается флагами и файлом .claude/routing.json, см. «Настройка».

Координатор — модель главного треда владельца, Opus 5.5: на ней идёт вся сессия, от неё зависят разбор задачи и приёмка. На той же модели работают

@dpolishuk
dpolishuk / 00-README.md
Created September 14, 2026 19:34
Codex model routing: Astra orchestrator, Terra workers, Sol escalation — configs and Russian guide

Codex: Astra → Terra → Sol

Частично проверенный универсальный шаблон маршрутизации с русским руководством и английскими инструкциями агентов. Модельные маршруты подтверждены в CLI; техническое отключение рекурсии остаётся UNVERIFIED. Подготовлен 14 сентября 2026 года. Исходный codex-routing-gist.zip недоступен и не использовался: комплект собран заново по требованиям и официальной документации. Он не содержит пользовательской конфигурации или исходников проекта.

Роли

Роль Model ID Reasoning Назначение
root gpt-6-astra medium Архитектура, декомпозиция, маршрутизация, ревью и приёмка
worker gpt-5.6-terra medium Реализация и локальные исправления
@dpolishuk
dpolishuk / README.md
Created October 9, 2019 10:24 — forked from sma/README.md
This is an ad-hoc Java-to-Dart translator written in three days. This is version 2 which some bug fixes.

Java to Dart

This is an ad-hoc Java-to-Dart translator originally written on two (admittedly long) evenings.

See http://sma.github.io/stuff/java2dartweb/java2dartweb.html for a demo.

Note: It doesn't support the complete Java grammar specification and cannot translate everything. It only translates syntax and does not attempt to translate Java library classes and methods to Dart equivalents (with the exception of String.charAt and StringBuffer.append). You will have to make changes to the resulting Dart code. It does not support anonymous inner classes.

However, I was able to successfully convert a 7000+ line command line application with only minimal fixes in 30 minutes.

@dpolishuk
dpolishuk / MyPreference.kt
Created November 19, 2015 08:52
MyPreference.kt
fun SharedPreferences.edit(func: SharedPreferences.Editor.() -> Array<Pair<String, Any>>) : SharedPreferences.Editor {
val editor = edit()
val pairs = editor.func()
for ((key, value) in pairs) {
when (value) {
is String -> editor.putString(key, value)
is Set<*> -> {
if (!value.all { it is String }) {
@dpolishuk
dpolishuk / WeatherFor5DaysView.kt
Last active November 18, 2015 09:14
kotlinx android does not work for view ;(
import kotlinx.android.synthetic.view_weather_for_week.view.*
public class WeatherFor5DaysView : LinearLayout {
val dayNameViews: List<TextView> = arrayListOf(day_name_1, day_name_2, day_name_3, day_name_4, day_name_5)
val dayViews: List<ImageView> = arrayListOf(day_1, day_2, day_3, day_4, day_5)
val tempViews: List<TextView> = arrayListOf(temp_1, temp_2, temp_3, temp_4, temp_5)
lateinit var transformation: Transformation
@dpolishuk
dpolishuk / gist:ecd944f9cf84c62dfd5d
Created November 17, 2015 07:31
Broken kapt in latest Kotlin beta [1.0.0-beta-2422, 1.0.0-beta-2417]
Note: Generating a MembersInjector or Factory for io.dp.weather.app.activity.debug.DebugActivity. Prefer to run the dagger processor over that class instead.
warning: The following options were not recognized by any processor: '[kapt.kotlin.generated]'
/Users/deepol/work/weather-android-kotlin/app/build/generated/source/kapt/release/io/dp/weather/app/adapter/PlacesAdapter_MembersInjector.java:14: error: cannot access NonExistentClass
private final MembersInjector<OrmliteCursorRecyclerViewAdapter<Place, Holder>> supertypeInjector;
^
class file for error.NonExistentClass not found
Note: /Users/deepol/work/weather-android-kotlin/app/build/generated/source/kapt/release/io/dp/weather/app/activity/DaggerActivityComponent.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
:app:compileReleaseJavaWithJavac FAILED
@Module
public class AppModule {
private final Application application;
public AppModule(Application application) {
this.application = application;
}
@Provides public Application application() {
@dpolishuk
dpolishuk / 0_BaseActivityComponent.java
Last active September 13, 2015 10:31
HOWTO override module in dagger2
public interface BaseActivityComponent {
}
@dpolishuk
dpolishuk / HamiltonianRegion.java
Created July 31, 2014 19:45
Find hamiltonian and build android.graphics.Region from this
import android.graphics.Path;
import android.graphics.Rect;
import android.graphics.Region;
import android.graphics.RegionIterator;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
<ListView
android:paddingTop="?actionBarSize"
android:layout_gravity="start|bottom"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/chats_list"
android:clipToPadding="false"
android:transcriptMode="normal"/>