{
  "markdown": "# Tula\n\nCode quality, security, and documentation analysis using YAML rules, bash\nscripts, and LLM reasoning.\n\n*Tula* (Sanskrit: balance, weighing scale) analyses projects across five\ncategories — security, reliability, performance, maintainability, and\ndocumentation — producing a scored report on a 1000-point scale.\n\n## Supported Languages\n\nPython, JavaScript/TypeScript, Java, Go, C/C++\n\n## Prerequisites\n\n| Tool | Required | Purpose | Install |\n|------|----------|---------|---------|\n| `jq` | Yes | JSON processing | `brew install jq` |\n| `python3` | Recommended | Tool output parsing, metrics | System default |\n| `git` | Recommended | Diff analysis | System default |\n\nLanguage-specific static analysis tools (bandit, eslint, etc.) are optional.\nTula auto-detects what is installed and skips missing tools gracefully. The\nreport notes reduced coverage when tools are unavailable.\n\n## Quick Start\n\n```bash\nbash <(curl -fsSL https://raw.githubusercontent.com/DaxGoon/tula/main/install.sh)\n```\n\nInstall with all language tools:\n\n```bash\nbash <(curl -fsSL https://raw.githubusercontent.com/DaxGoon/tula/main/install.sh) --all-tools\n```\n\nOr pick specific languages: `--lang python`, `--lang js`, `--lang go`, `--lang java`, `--lang cpp`\n\n## Installation\n\n### Claude Code Plugin (recommended)\n\n```\n/plugin marketplace add daxgoon/tula\n/plugin install tula@daxgoon-tools\n```\n\n### Claude Code Manual Install\n\n```bash\ngit clone https://github.com/daxgoon/tula.git ~/tula\nbash ~/tula/install.sh\n```\n\nThis clones the repository and links the `/tula` skill into Claude Code.\nAfter installation, type `/tula` in any project to run an analysis.\n\n### Per-Project (team usage)\n\nAdd as a git submodule so every team member gets it on clone:\n\n```bash\ncd <your-project>\ngit submodule add https://github.com/daxgoon/tula.git .tula/plugin\nmkdir -p .claude/skills/tula\nln -s ../../.tula/plugin/adapters/claude-code/SKILL.md .claude/skills/tula/SKILL.md\ngit add .tula .claude/skills/tula\ngit commit -m \"Add tula code quality analysis\"\n```\n\nDevelopers cloning the project run `git submodule update --init` to activate.\n\n### GitHub Copilot\n\n```bash\ncp ~/tula/adapters/copilot/copilot-instructions.md <project>/.github/copilot-instructions.md\n```\n\n### Cursor\n\n```bash\ncp ~/tula/adapters/cursor/tula.mdc <project>/.cursor/rules/tula.mdc\n```\n\n### CI/CD Only (no LLM required)\n\n```bash\ngit clone https://github.com/daxgoon/tula.git ~/tula\n~/tula/scripts/ci.sh --profile default --threshold 800\n```\n\n## Uninstallation\n\n```bash\nbash ~/tula/uninstall.sh\n```\n\nThis removes the Claude Code skill link. The source directory is preserved.\nTo fully remove: `rm -rf ~/tula`\n\n## Usage\n\n### Claude Code\n\n```\n/tula                        # full analysis, default profile\n/tula --profile strict       # strict thresholds (900)\n/tula --profile security     # security-focused (950)\n/tula docs                   # documentation quality only\n/tula --diff HEAD~3          # analyse changed files only\n/tula --fix                  # include fix suggestions\n/tula --lang python          # single language only\n```\n\nThe analysis runs unattended after a single permission approval. No further\ninput required.\n\n### CI/CD\n\n```bash\n~/tula/scripts/ci.sh [OPTIONS]\n\nOptions:\n  --profile PROFILE     Scoring profile (default: default)\n  --threshold N         Minimum pass score (default: from profile)\n  --format json|text    Output format (default: json)\n  --diff REF            Analyse only files changed since REF\n  --output FILE         Write report to FILE\n  --project-root DIR    Target project (default: current directory)\n  --deterministic       Skip LLM, use jq-based scoring\n\nExit codes:\n  0  Pass (score >= threshold, no warnings)\n  1  Pass with warnings (score >= threshold, issues present)\n  2  Fail (score < threshold)\n  3  Tool error\n```\n\n## Scoring\n\n| Category        | Weight | Focus |\n|-----------------|--------|-------|\n| Security        | 1.5x   | Vulnerabilities, secrets, injection, CVEs |\n| Reliability     | 1.2x   | Bugs, crashes, type errors, resource leaks |\n| Performance     | 1.0x   | Inefficiency, unnecessary copies |\n| Maintainability | 0.8x   | Complexity, style, naming, duplication |\n| Documentation   | 0.6x   | README, API docs, inline comments |\n\nSeverity penalties: critical (-200), high (-100), medium (-25), low (-5),\nmultiplied by category weight. Base score is 1000.\n\n### Profiles\n\n| Profile     | Pass Threshold | Description |\n|-------------|----------------|-------------|\n| default     | 800            | Balanced analysis |\n| strict      | 900            | All checks, higher weights |\n| security    | 950            | Security-focused, 3x security weight |\n| performance | 850            | Performance-focused, 2x performance weight |\n| fast        | 700            | Quick analysis, fast tools only |\n| docs        | 700            | Documentation quality focused |\n\n## Static Analysis Tools\n\n| Language | Tools |\n|----------|-------|\n| Python | bandit, pylint, flake8, mypy, safety |\n| JavaScript/TS | eslint, tsc, npm audit, semgrep |\n| Java | spotbugs, pmd, checkstyle, findsecbugs, owasp-dep-check |\n| Go | golangci-lint, go vet, govulncheck, staticcheck |\n| C/C++ | clang-tidy, cppcheck |\n\nAll tools are optional. Install the ones relevant to your stack:\n\n```bash\n# Python\npip install bandit pylint flake8 mypy safety\n\n# JavaScript/TypeScript\nnpm install -g eslint\n\n# Go\ngo install github.com/golangci/golangci-lint/cmd/golangci-lint@latest\ngo install golang.org/x/vuln/cmd/govulncheck@latest\ngo install honnef.co/go/tools/cmd/staticcheck@latest\n\n# C/C++\nbrew install llvm cppcheck   # macOS\napt install clang-tidy cppcheck   # Ubuntu/Debian\n```\n\n## Extending Rules\n\n### Project Overrides\n\nCreate `.tula/overrides.yml` in your project root:\n\n```yaml\ndisable: [todo-comment, line-too-long]\nseverity_overrides:\n  function-too-long: low\nthreshold_overrides:\n  function-too-long:\n    value: 100\nprofile: strict\nexclude_paths: [\"generated/**\"]\n```\n\n### Custom Rules\n\nAdd YAML files to `.tula/rules/<language>/<category>.yml`:\n\n```yaml\nlanguage: python\ncategory: maintainability\n\npatterns:\n  - id: no-print\n    pattern: 'print\\s*\\('\n    message: \"Use logger instead of print()\"\n    severity: medium\n    category: maintainability\n```\n\nRules with matching `id` fields replace base rules. New rules are appended.\n\n### Override Priority\n\n1. Base rules (`~/tula/rules/`) — shipped with tula\n2. Project rules (`.tula/rules/`) — committed to project repo\n3. Project overrides (`.tula/overrides.yml`) — disable/adjust rules\n4. Personal overrides (`~/.config/tula/overrides.yml`) — developer preference\n\n## Architecture\n\n```\nRules (YAML)  →  Scripts (Bash)  →  LLM (Reasoning)  →  Report\n   data            invocation        scoring + semantics    output\n```\n\n```\ntula/\n├── .claude-plugin/     Plugin manifest for Claude Code marketplace\n├── rules/              25 YAML files defining checks per language\n│   ├── _scoring.yml    Scoring algorithm, weights, profiles\n│   ├── _categories.yml Category and severity definitions\n│   ├── <language>/     4 files: security, reliability, maintainability, performance\n│   └── documentation/  3 files: readme, api-docs, inline-docs\n├── scripts/            8 bash scripts\n│   ├── detect.sh       Language and tool detection\n│   ├── scan-*.sh       Per-language scan scripts (6)\n│   └── ci.sh           CI/CD wrapper with exit codes\n├── skills/             Claude Code plugin skill\n│   └── tula/          /tula slash command\n├── adapters/           Platform-specific integration\n│   ├── claude-code/    SKILL.md for manual install\n│   ├── copilot/        GitHub Copilot instructions\n│   └── cursor/         Cursor rules file\n├── tests/              Validation and smoke tests\n├── install.sh          One-command installation\n├── uninstall.sh        Clean removal\n└── AGENTS.md           Portable cross-tool context\n```\n\nNo application code. Rules are data. Scripts are thin wrappers. The LLM\ndoes the interpretation, scoring, and reporting.\n\n## Updating\n\n```bash\ncd ~/tula && git pull\n```\n\nRules, scripts, and the skill prompt are updated in place. No reinstallation\nneeded — the symlink from `install.sh` points to the live files.\n",
  "bytes": 8164,
  "sha": "432c102dc79f819d1dee49ce35cfb77ea434c6ead9e104afd6439bf0d7e1be9c",
  "repo_slug": "daxgoon/tula",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_daxgoon_tula_tula_e37b712c/readme"
}