Nano Banana Pro
Agent skill for nano-banana-pro
This document provides guidelines for AI coding agents working on the Whatsun project.
Sign in to like and favorite skills
This document provides guidelines for AI coding agents working on the Whatsun project.
Whatsun is a tool and library for code analysis that detects project structure, frameworks, build tools, and package managers.
It can produce an efficient "digest" of a repository (
whatsun digest), which can be used to give context to an LLM.
Whatsun is configured via rules defined in YAML in the
config/ directory, which use CEL expressions for pattern matching.
any instead of interface{}whatsun/ ├── cmd/ # Command-line tools │ ├── whatsun/ # Main CLI binary │ ├── gen_docs/ # Documentation generator (updates files in "docs") │ └── warm_cache/ # Cache warming utility (used by the build) ├── pkg/ # Public library packages │ ├── dep/ # Dependency detection │ ├── digest/ # Digest generation: tree, reports and file contents │ ├── eval/ # CEL expression evaluation │ ├── files/ # File operations │ └── rules/ # Rule matching and analysis ├── internal/ # Private packages ├── config/ # Rule definitions in CEL format (in YAML files) └── docs/ # Documentation
github.com/stretchr/testifyBuild the project:
make build
This creates the
whatsun binary with optimized build flags. It also prewarms the cache in expr.cache.
Run tests:
make test
Runs unit tests with race detection.
Run linting:
make lint
Includes both
go mod tidy validation and golangci-lint checks.
Check for vulnerabilities:
make govulncheck
Generate documentation:
make gen_docs
This updates the Markdown files in the
docs directory.
make testmake lintmake govulncheckmake buildmake test-coveragemake bench for performance testingconfig/expr.cache)pkg/dep/: Language-specific dependency detection (Go, JS, Python, etc.)pkg/eval/: CEL expression evaluation with cachingpkg/files/: File tree operations, digest generation, comments parsingpkg/rules/: Rule loading, matching, and analysis coordinationmake profile for optimization opportunitiesfmt.Errorf and %w verb.golangci.yml)go.mod tidy (enforced by make lint)make govulncheck regularlymake gen_docs to regenerate function documentationWhen working on this codebase:
Always run tests and linting after making changes:
make test lint
Understand the rule system before modifying analysis logic - rules in
config/ drive the core functionality
Use existing patterns - check similar implementations in
pkg/dep/ when adding new language support
Consider performance - this tool processes large codebases, so optimize for speed and memory usage
Follow the architecture - keep public APIs in
pkg/, private code in internal/
Update tests - add or modify tests for any functionality changes
Validate CLI - test changes using
./whatsun analyze [path] (after building), on real projects