agents-lab

Local-first lab for reusable AI-agent primitives and the curated pi-stack.

View on GitHub

Tool hygiene

Syntax hygiene signal

tool_hygiene_scorecard inclui uma camada report-only para higiene sintática quando fontes são fornecidas ao construtor do scorecard. A camada é language-agnostic por contrato e começa com regras JS/TS determinísticas.

Campos mínimos de evidência por achado:

Padrões iniciais JS/TS:

Regra de revisão: achados não bloqueiam execução por si só; eles exigem decisão registrada. Exceções aceitáveis precisam declarar motivo de legibilidade de API pública, compatibilidade, performance ou contrato de segurança/teste.

Line budget configuration

line_budget_snapshot reads its scan scope from .pi/settings.json before falling back to the packaged default. This keeps the reusable primitive project-agnostic while letting this lab dogfood its own policy.

Path:

{
  "piStack": {
    "guardrailsCore": {
      "lineBudget": {
        "roots": ["packages/pi-stack"],
        "ignoredDirs": [".cache", ".pi-lens", "_site", "coverage", "dist", "node_modules"],
        "extensions": [".ts"],
        "ignoreDeclarationFiles": true,
        "thresholds": {
          "watch": 1000,
          "extract": 1400,
          "critical": 2000
        }
      }
    }
  }
}

The packet reports configSource, scanRoots, configWarnings, and thresholds so downstream projects can tell whether they are using project settings, user settings, or the default.