feat: add lazy-code ladder to rules and a routed lazy-code skill - #1188
feat: add lazy-code ladder to rules and a routed lazy-code skill#1188fuentes71 wants to merge 3 commits into
Conversation
|
Warning Review limit reached
Next review available in: 17 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
DCO sign-off missing One or more commits in this PR are missing a How to fix: # Single commit
git commit --amend -s
git push --force-with-lease
# Multiple commits -- replace N with the number of commits in your PR
git rebase --signoff HEAD~N
git push --force-with-lease
|
Adiciona a escada de decisao (7 degraus, para no primeiro que segura) antes de KISS/DRY/YAGNI. Os principios existentes dizem o que valorizar, mas nenhum deles diz quando parar, que e o que faltava. Resolve dois conflitos que a escada criaria se fosse so empilhada: - "MANY SMALL FILES" contra "menor numero de arquivos": passam a ter escopo explicito. A regra de organizacao governa estrutura existente, a escada governa trabalho novo. Espalhar mudanca pequena em varios arquivos novos deixa de ser licenciado; dividir modulo que cresceu de verdade continua exigido. - Escada contra as regras de estilo: precedencia declarada. A escada decide SE e QUANTO codigo existe, o resto do arquivo decide COMO ele e escrito. Inclui a lista "Never Simplified Away". Ela nao e enfeite: no benchmark de origem, o braco que recebeu so "prefira one-liners" escreveu menos linhas e foi o unico a deixar path traversal escapar do diretorio base. As linhas que ele economizou eram a checagem. Escada adaptada de github.com/DietrichGebert/ponytail (MIT). Signed-off-by: Matheus Fuentes <matheus.fu.p@hotmail.com>
Cria skills/general/lazy-code com a parte da disciplina que nao merece espaco sempre-ligado: niveis de intensidade, contrato de saida e exemplos trabalhados. A escada curta fica em rules/common/coding-style.md, que ja e sempre carregado. O motivo de ser skill roteada e nao instrucao permanente esta na propria description, que exclui request nao-codigo. Em sessao de investigacao ou documento o ruleset nao tem codigo pra encolher e vira custo puro. Isso tambem e o que evita a inversao de custo medida no projeto de origem: em modelo de raciocinio cuja saida base ja e enxuta, ruleset sempre-ligado e reenviado como input a cada chamada e o overhead engole a economia, virando 26-39% mais caro em vez de 20% mais barato. Carregado por tarefa, nao inverte. E o que torna isso util fora do Claude. catalog-index.ts regerado pelo build-skill-index.js (433 entradas). Adaptado de github.com/DietrichGebert/ponytail (MIT). Signed-off-by: Matheus Fuentes <matheus.fu.p@hotmail.com>
O catalog.js do CI exige que a contagem no README bata com a real. A skill lazy-code levou o total de 230 pra 231. AGENTS.md nao muda: usa "230+", que continua verdadeiro. Signed-off-by: Matheus Fuentes <matheus.fu.p@hotmail.com>
9a459e6 to
ac9be49
Compare
|
❌ The last analysis has failed. |
|
Thanks @fuentes71, the two-layer design is genuinely good and this discipline belongs in EGC. One direction change before it can move forward: I want this as a first-party EGC concept, designed and written from scratch for our rules and skill runtime, with EGC terminology throughout. That also means the layer split needs to stand on its own reasoning, or on measurements taken in EGC itself. The skeleton you built is the right one: a short always-on ladder plus a routed skill, with conflicts resolved by declared precedence. Want to take the rewrite? |
|
Two acceptance criteria for the rewrite, @fuentes71. First: zero inherited text. Every line of the rule and the skill is written fresh for EGC, including names and headings; if a sentence from the current branch survives, it does not land. Second: our own numbers. The external benchmark figures go away. In their place, a small eval measured on EGC itself: one fixed set of coding tasks run with and without the two layers, reporting tokens per completed task, a correctness gate, and a safety probe set showing the non-negotiable checklist still blocks the dangerous shortcut. If the eval is too big for one PR, land the rewrite justified by reasoning alone and ship the eval as a follow-up, but the external figures go either way. |
|
Checking in, @fuentes71: the rewrite direction from the two comments above still stands, and the slot is yours. If anything in the acceptance criteria is unclear, or you want a skeleton to start from, say the word and I will sketch the rule and skill headings with you. And if life got busy and you would rather hand it back, that is completely fine too, just let me know either way. |
|
@fuentes71 this idea just shipped: #1256 landed the minimal-change ladder as an always-on rule in the shared coding style plus a routed skill, and the squash commit carries your co-authorship, because the push to give EGC a discipline against overengineering and half-done code came from you. I ended up rewriting the content from scratch so it could be born wired into today's distribution machinery (the module manifests, the generated catalog indices and the per-harness condensations, which this branch predated), and with install-level verification across the supported harnesses. Closing this PR in favor of #1256. Thank you for pushing this forward, Matheus. Your name is on it. |
O que a branch entrega
Traz pro EGC a disciplina de "menor solucao que funciona" em duas camadas, para que ela valha em qualquer LLM que consuma o EGC, nao so no Claude.
Adaptado de ponytail (MIT), com atribuicao nos dois arquivos.
Por que duas camadas, e nao um ruleset unico
Essa e a decisao central da branch.
O ganho medido do ruleset original nao e universal. No benchmark publicado pelo proprio projeto de origem, em modelos de raciocinio cuja saida base ja e enxuta ele inverte: de ~20% mais barato para 26-39% mais caro. A causa e estrutural e vale para qualquer LLM com esse perfil: um ruleset sempre-ligado e reenviado como input a cada chamada, e o overhead de input supera as linhas economizadas.
Portar como instrucao permanente teria feito o EGC custar mais caro exatamente nas LLMs que a branch pretende cobrir. Dai a separacao:
Camada 1, sempre-ligada e curta (
rules/common/coding-style.md): a escada de decisao de 7 degraus e a lista "Never Simplified Away". Sao ~400 tokens marginais num arquivo que ja era carregado, e se distribuem sozinhos para Gemini, Cursor, Codex, opencode, trae e kiro pelo caminho querules/common/ja tem.Camada 2, roteada (
skills/general/lazy-code/): intensidade, contrato de saida e exemplos, que e o volume. Adescriptiondo frontmatter exclui request nao-codigo de proposito, porque e o texto que oorchestrate_taskusa para rotear. Carregado por tarefa, a inversao nao acontece.Conflitos resolvidos, nao empilhados
A escada colide com regras que o
coding-style.mdja tinha. Resolver isso foi o trabalho real da branch; empilhar sem resolver faz o agente obedecer a regra que vier por ultimo no contexto.coding-style.mddecide como ele e escrito. Nao competem.Por que a lista "Never Simplified Away" nao e enfeite
No benchmark de origem, o braco que recebeu apenas "prefira solucoes de uma linha" escreveu menos linhas e foi o unico a deixar um input de path traversal escapar do diretorio base. As linhas que ele economizou eram a checagem. A lista e o que separa preguicoso de descuidado.
Arquivos
rules/common/coding-style.md: escada, precedencia, lista de nao-negociaveisskills/general/lazy-code/SKILL.md: skill roteadacatalog-index.tseskills-index.json: regerados porscripts/build-skill-index.jsVerificacao
tsc --noEmitlimpo enpm run buildcom exit 0 noegc-guardian; entradalazy-codepresente no catalogo compilado e noskill-index.json.Nao verificado, e vale dizer: o roteamento discriminando codigo de nao-codigo. O
egc-guardiancarrega o catalogo quando o servidor MCP sobe, entao uma skill nova so passa a rotear na sessao seguinte. Vale um teste manual pos-merge com um prompt de codigo e um de investigacao.🤖 Generated with Claude Code
Summary by cubic
Adds a two-layer “lazy code” discipline: a short always-on decision ladder in
rules/common/coding-style.mdand a routedlazy-codeskill for code tasks. This keeps solutions minimal while avoiding extra token cost on non-code requests.New Features
rules/common/coding-style.mdwith precedence, root-cause bug-fix guidance, “Mark deliberate shortcuts”, and a “Never Simplified Away” list. Clarifies “MANY SMALL FILES” (existing structure) vs new work (fewest files).skills/general/lazy-codewith intensity levels (lite/full/ultra), an output contract, and examples. Routed to load only for coding tasks. Updatedcatalog-index.tsandscripts/lib/skill-index.json.README.mdto reflect 231 skills.Migration
egc-guardianMCP server to load the new skill.Written for commit ac9be49. Summary will update on new commits.