undercover

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package undercover implements undercover mode — safety instructions for commits/PRs to public repos, preventing AI attribution leaks.

Mirrors src/utils/undercover.ts. In the TS source all logic is gated on USER_TYPE==='ant' (Anthropic internal builds only); external builds return trivial values. Here we expose the env-override path (CLAUDE_CODE_UNDERCOVER) so any user can opt in when working on public repos.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUndercoverInstructions

func GetUndercoverInstructions() string

GetUndercoverInstructions returns the system-prompt block injected when undercover mode is active. Empty string when mode is off.

func IsUndercover

func IsUndercover() bool

IsUndercover reports whether undercover mode is active. Activated by setting CLAUDE_CODE_UNDERCOVER=1 (or true/yes/on). Off by default in external builds (no auto-detection of internal repos).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL