{"modulePath":"github.com/codefit-cli/codefit","version":"v0.2.9","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package context\n\nPackage context defines [AuditContext](#AuditContext), the immutable struct that carries everything a sensor needs about the project under audit: where it lives, its language and framework, the parsed config, and the run modifiers (incremental ref, no-LLM mode).\n\nIt lives in its own package — not in findings — so the leaf findings package stays dependency-free: AuditContext references config, and a finding type must never depend on the config parser.\n\n## Types\n\n```go\ntype AuditContext struct {\n\t// ProjectRoot is the absolute path to the project being audited.\n\tProjectRoot string\n\t// Language is the project language (e.g. \"go\", \"typescript\"); selects the\n\t// LanguageProvider.\n\tLanguage string\n\t// Framework is the detected framework (e.g. \"react\"), optional.\n\tFramework string\n\t// Config is the parsed .codefit.yaml for the project.\n\tConfig *config.Config\n\t// Scope is layer 0 of the filtering pyramid: the files this pass may examine.\n\t// The caller supplies it (codefit never asks git — see the scope package\n\t// doc). A walk must gate on scope.Scope.Narrows, NOT on Includes: the zero\n\t// value includes nothing, so gating on Includes would turn an AuditContext\n\t// assembled without a scope into a silent no-op audit reporting score 100.\n\t// Both the unset value and scope.Full mean \"audit everything\".\n\t//\n\t// It replaces a dead `Since string` that promised a git ref for an\n\t// incremental mode codefit never had, and that never had a reader or a\n\t// writer. A field naming a capability codefit does not have is the same class\n\t// of lie as a manifest that over-promises.\n\tScope scope.Scope\n}\n```\nAuditContext encapsulates all the information about the project being audited and is passed to every sensor. It is assembled once by the orchestrator and treated as read-only by sensors.\n\n","path":"github.com/codefit-cli/codefit/internal/core/context","name":"context","synopsis":"Package context defines AuditContext, the immutable struct that carries everything a sensor needs about the project under audit: where it lives, its language and framework, the parsed config, and the run modifiers (incremental ref, no-LLM mode).","isRedistributable":true}
