Undercover Mode

Advanced adversarial stylometry techniques to maintain your authorship.

What is Undercover Mode?

Undercover Mode takes code humanization to the next level by specifically targeting structural fingerprints often left by Large Language Models. It actively modifies code syntax, comments, and commit messages to align perfectly with your past Git history.

Using Undercover

Transform Commit Messages

LLMs tend to write highly structured and predictable commit messages (e.g., using rigid Conventional Commits perfectly). Undercover mode breaks this rigidity:

phantomdev undercover --message "feat: Implement comprehensive user authentication"

This will rewrite the message into something more organically human based on your repository history.

Rewrite Comments

AI writes overly enthusiastic and descriptive comments. You can tone them down and rephrase them:

phantomdev undercover --comments

Variable Name Substitution

If you usually name your variables a certain way (e.g., idx instead of index), Undercover Mode will enforce it on AI-generated snippets:

phantomdev undercover --variables

Combined Power

You can execute multiple transformations simultaneously before staging your files:

phantomdev undercover --comments --variables

Stylistic Rules

Undercover Mode applies the following transformations based on your repository history:

Case Sensitivity

Prefer lowercase for short descriptions. Use Sentence case only for long explanations.

Punctuation

Remove terminal periods from 80% of single-line strings.

Vocabulary Filter

Strictly ban: "comprehensive", "ensure", "robust", "leveraging", "meticulous", "seamless", "enhanced".

Semantic Compression

Replace formal words with dev-slang (e.g., "authentication" → "auth", "information" → "info", "utility" → "utils").

Grammar

Accept fragments. Prioritize brevity over "proper" English.

Examples

Before (AI-generated)

// This function implements comprehensive user authentication // It ensures robust security by leveraging JWT tokens function authenticateUser(userCredentials) { // Validate the provided information if (!userCredentials) { return null; } // Generate enhanced token return generateToken(userCredentials); }

After (Undercover-transformed)

// auth check function authUser(creds) { if (!creds) return null; return genToken(creds); }