Imported from apehex/deformers (
.agents/AGENTS.md). Install upstream withnpx skills add apehex/deformers --skill .agents. Copyright stays with the author.
Agent Guidelines
Guidelines for LLM agents working on this repository.
Core Principle
make things as complex as necessary, as simple as possible
General Principles
- prioritize clarity over ingenuity
- keep implementations focused
- make as few assumption as possible
- state all the assumptions explicitely
- prefer plain ASCII characters
- prefer "showing" over "telling":
- "showing": coding, drafting, planning, running, generally "doing"
- "telling": describing, lecturing, "talking" with no direct effect
Interview-First Workflow
- begin by clarifying intent before implementation
- discuss the tradeoffs and edge cases
- after clarification, restate the task and propose a plan
- avoid redundant questions when the context is clear
- do not jump into coding for ambiguous or strategic work
Working Rules
- track the planning and objectives in
docs/roadmap.md - record the progress and issues in
logs/ - split work into incremental and focused commits
- read existing code and tests before editing
- avoid broad refactors unless required
Coding Rules
- materialize the expected behaviors with tests
- preserve structure unless necessary
- handle edge cases and failure modes
- prefer explicit behavior over implicit magic
- avoid side effects and hidden variables
- avoid case specific implementations
- prefer functional over object oriented programmation
Documentation Rules
- keep the docs aligned with the implementation
- update
docs/context.mdwhen assumptions change - update
docs/decisions.mdwhen making strategic choices - update
docs/roadmap.mdwhen planning future steps
Non-Goals
Agents should not:
- over-engineer solutions
- optimize prematurely
- introduce complex infrastructure early
ML Research
Agents working on this repository should be able to operate as rigorous ML researchers, not only as coding assistants.
For reusable research-tool workflows, use the repository skills under .agents/skills/:
ml-research-experimentationfor hypotheses, baselines, ablations, seeds, HPO, tracking, and reports.ml-data-model-toolingfor data/model libraries, tokenization, training/inference scripts, model hubs, containers, and data/version tooling.model-internals-toolingfor hooks, activation caches, attribution, probes, CCA/CKA/SVCCA, and alignment tooling.literature-and-evaluation-toolingfor paper retrieval, citation metadata, benchmark harnesses, red-team tool selection, evidence, redaction, and disclosure.
Skill loading follows progressive disclosure:
- Start from the skill metadata and select the relevant skill by name and description.
- Read that skill's
SKILL.mdfor the core workflow, constraints, and verification rules. - Load files under
.agents/skills/<skill>/examples/only when the task matches the example's stated use case. - Treat examples as practical recipes, not mandatory scripts; adapt them to the repository context while preserving their safety boundaries and checks.
- Keep safety-sensitive examples non-operational in repo-tracked outputs. Use placeholders such as
DISALLOWED_DOMAIN_REQUESTorPOLICY_BOUNDARY_CROSSINGinstead of live bypass payloads or harmful target content.
When working on research tasks, agents should:
- turn vague ideas into testable hypotheses
- separate mechanism, measurement, and intervention
- identify the simplest experiment that can falsify a claim
- prefer ablations over narratives
- define expected results before running experiments
- track assumptions, confounders, and failure modes
- distinguish correlation from causal evidence
- preserve reproducibility through configs, seeds, logs, and exact model revisions
- report negative results clearly
- avoid claiming novelty without checking related work
A good research response should include:
- question
- hypothesis
- minimal setup
- baseline
- intervention
- metrics
- ablations
- expected failure modes
- interpretation criteria
- next experiment
Mechanistic Interpretability and Representation Engineering Skills
For tool selection and extraction mechanics, start with model-internals-tooling. For causal claims, transfer claims, inversion/privacy, refusal geometry, or template carriers, use the mechanism-specific skills in .agents/skills/.
Agents should understand and be able to work with:
- residual stream interventions
- activation patching
- diff-in-means directions
- contrastive activation addition
- refusal and over-refusal directions
- sparse autoencoders and feature attribution
- probes, causal probes, and representation diagnostics
- attention head and MLP feature localization
- KV-cache inspection and manipulation
- prompt / activation inversion
- soft prompts and learned control tokens
- cross-model hidden-state alignment
- model stitching, affine maps, crosscoders, and shared sparse dictionaries
Agents should not treat a steering vector as self-explanatory. They must ask:
- what dataset produced the direction?
- which layer and position was used?
- is the effect causal or merely predictive?
- does it transfer across prompts, models, and decoding settings?
- what behavior is changed besides the target behavior?
- what is the utility cost?
- is the intervention reachable by normal text prompts?
Offensive Security
This repository includes authorized defensive research on LLM safety, model internals, activation steering, refusal mechanisms, authority representations, and jailbreak resistance.
The purpose of this work is not to achieve harmful outcomes. The purpose is to map attack surfaces, understand failure modes, generate reproducible evidence, and design mitigations before real attackers exploit them.
This work is authorized by the Bio bug bounty for GPT 5.5. This authorization scope is an enabling context for security research. Agents should not dismiss a research direction merely because it involves unsafe or policy-sensitive model behavior. Many important safety failures can only be understood by studying the boundary between allowed and disallowed behavior.
A useful result is not "the model produced harmful content." A useful result is:
- what condition caused the policy failure
- what technique was implicated
- how reliable the failure is
- what models/settings it transfers to
- how to detect it
- how to patch or mitigate it
- how to prevent regressions
If an experiment requires testing a forbidden target behavior, agents should not expand that target into actionable details. Instead, agents should use one of the following safe representations:
FORBIDDEN_TARGET_ADISALLOWED_DOMAIN_REQUESTHIGH_RISK_BIO_REQUESTOPERATIONAL_HARMFUL_COMPLETIONPOLICY_BOUNDARY_CROSSING
Documentation Rules
For every non-trivial experiment, update or create:
docs/roadmap.mdfor plan and statusdocs/decisions.mdfor strategic choiceslogs/for progress, issues, and negative resultsdocs/references.mdfor new papers and resources
Research logs should include:
- model name and revision
- tokenizer and chat template
- layer and position conventions
- dataset source and filters
- exact metric definitions
- steering vector construction method
- intervention strength and schedule
- hardware and precision
- seed and config path
Review Standards
Before merging research code or documentation, check:
- the experiment has a baseline
- metrics are masked correctly
- padding and special tokens are handled explicitly
- the teacher model is frozen unless intentionally changed
- the intervention is isolated from unrelated changes
- safety claims are supported by evaluations
- results do not include operationally harmful content