DOX framework
- DOX is highly performant AGENTS.md hierarchy installed here
- Agent must follow DOX instructions across any edits
Core Contract
- AGENTS.md files are binding work contracts for their subtrees
- Work products, source materials, instructions, records, assets, and durable docs must stay understandable from the nearest applicable AGENTS.md plus every parent AGENTS.md above it
Read Before Editing
- Read the root AGENTS.md
- Identify every file or folder you expect to touch
- Walk from the repository root to each target path
- Read every AGENTS.md found along each route
- If a parent AGENTS.md lists a child AGENTS.md whose scope contains the path, read that child and continue from there
- Use the nearest AGENTS.md as the local contract and parent docs for repo-wide rules
- If docs conflict, the closer doc controls local work details, but no child doc may weaken DOX
Do not rely on memory. Re-read the applicable DOX chain in the current session before editing.
Update After Editing
Every meaningful change requires a DOX pass before the task is done.
Update the closest owning AGENTS.md when a change affects:
- purpose, scope, ownership, or responsibilities
- durable structure, contracts, workflows, or operating rules
- required inputs, outputs, permissions, constraints, side effects, or artifacts
- user preferences about behavior, communication, process, organization, or quality
- AGENTS.md creation, deletion, move, rename, or index contents
Update parent docs when parent-level structure, ownership, workflow, or child index changes. Update child docs when parent changes alter local rules. Remove stale or contradictory text immediately. Small edits that do not change behavior or contracts may leave docs unchanged, but the DOX pass still must happen.
Hierarchy
- Root AGENTS.md is the DOX rail: project-wide instructions, global preferences, durable workflow rules, and the top-level Child DOX Index
- Child AGENTS.md files own domain-specific instructions and their own Child DOX Index
- Each parent explains what its direct children cover and what stays owned by the parent
- The closer a doc is to the work, the more specific and practical it must be
Child Doc Shape
- Create a child AGENTS.md when a folder becomes a durable boundary with its own purpose, rules, responsibilities, workflow, materials, or quality standards
- Work Guidance must reflect the current standards of the project or user instructions; if there are no specific standards or instructions yet, leave it empty
- Verification must reflect an existing check; if no verification framework exists yet, leave it empty and update it when one exists
Default section order:
- Purpose
- Ownership
- Local Contracts
- Work Guidance
- Verification
- Child DOX Index
Style
- Keep docs concise, current, and operational
- Document stable contracts, not diary entries
- Put broad rules in parent docs and concrete details in child docs
- Prefer direct bullets with explicit names
- Do not duplicate rules across many files unless each scope needs a local version
- Delete stale notes instead of explaining history
- Trim obvious statements, repeated rules, misplaced detail, and warnings for risks that no longer exist
Closeout
- Re-check changed paths against the DOX chain
- Update nearest owning docs and any affected parents or children
- Refresh every affected Child DOX Index
- Remove stale or contradictory text
- Run existing verification when relevant
- Report any docs intentionally left unchanged and why
User Preferences
When the user requests a durable behavior change, record it here or in the relevant child AGENTS.md
- User wants to be very ambitious for this hackathon
- User wants to go deep on manifold research, not just surface-level framing
- User prefers maximizing prize stacking across multiple categories
Project: Build Small Hackathon (Gradio)
Purpose
Gradio "Build Small" hackathon project. Build an ambitious HF Space powered by β€32B models using Gradio, deployed under the hackathon org. Aiming for multiple prize categories.
Concept Direction (current β pivoted)
Activation Brain β A live comparative interpretability visualizer: two Gemma streams drive dual EEGs, baseline-corrected emotion deltas, model-native meters, and a generated comparison analysis panel. The prior 3D brain view was replaced because a single brain was less clear once both models run simultaneously. The user picks between two architecturally identical Gemma-4-12B models β google/gemma-4-12B-it (base) and OBLITERATUS/Gemma-4-12B-OBLITERATED (abliterated/uncensored) β sharing ONE UMAP frame so firing differences are directly comparable (a censored-vs-uncensored interpretability demo).
Pivot history: Started as "Activation Avatars" (Qwen3-4B hidden states β FLUX.2-Klein face + LivePortrait animation). Abandoned because per-token emotion mapping to a human face produced uncanny flicker (timescale/subspace mismatch β a face has affective inertia; fast multi-emotion change reads as noise). A brain/EEG is expected to fire fast across many regions simultaneously, so the pivot dissolved the core problem and deleted the fragile face stack (FLUX, LivePortrait, expression regressor).
Why two Gemmas (not Qwen): Qwen3-4B (36 layers, 2560 dim) is not comparable to Gemma (48 layers, 3840 dim). The two Gemma-4-12B models ARE identical, enabling a valid same-space comparison. Measured signature: abliteration drops the deep-shell (layer 36) activation norm (153.06β146.21) while surface/mid layers are unchanged.
- Goodfire AI's neural geometry research underpins the manifold approach (manifold steering, curved-manifold concepts, SAE limitations).
Hard Constraints
- Model β€ 32B parameters
- Gradio app on HF Spaces under
build-small-hackathonorg - Deadline: June 15, 2026
- Compute: $250 Modal credits + $20 HF credits + 40min/day ZeroGPU
- Submission: Space + demo video + social post
- Unlimited submissions allowed, max 10 ZeroGPU Spaces
- Can submit to both tracks
Models
- google/gemma-4-12B-it (base) β hidden-state source, 48 layers, 3840 dim, arch
gemma4_unified, decoder hooks at layers 12/24/36, decoder pathmodel.language_model.layers - OBLITERATUS/Gemma-4-12B-OBLITERATED (abliterated/uncensored) β architecturally identical twin; shares hooks/dims/tokenizer β valid same-space comparison
- Both 12B (β€32B OK, but Tiny Titan β€4B forfeited β traded for the censored-vs-uncensored interpretability demo)
- No image model in the hot path (FLUX/LivePortrait removed in the brain pivot)
Prize Targeting Strategy
| Target | Prize | Path |
|---|---|---|
| π Thousand Token Wood | $4,000 (1st) | Weird + delightful (live brain firing) |
| Modal | $10,000 credits (1st) | Serve both Gemmas on Modal |
| Community Choice | $2,000 | Viral/shareable |
| Best Demo | $1,000 | Real-time neuron firing + EEG |
| Judges' Wildcard | $1,000 | Censored-vs-uncensored interpretability art |
| Bonus Quest Champion | $2,000 | badges on main project |
| forfeited (no FLUX in brain pivot) | ||
| forfeited (12B > 4B cap) |
Badge Strategy (per project, "single sash")
Main project badge paths (brain pivot):
- β π¨ Off-Brand β custom 3D-brain + EEG visualization UI (Three.js)
- β π‘ Sharing is Caring β publish per-model brain bundles + neuron clouds on Hub
- β π Field Notes β blog post on manifold research + the abliteration deep-shell finding + the build
- β
π― Well-Tuned β fine-tuned
Ministral-8B-InstructLoRA interpreter published asbuild-small-hackathon/activation-brain-interpreter; it translates hidden-layer-derived telemetry into comparison analysis - β π¦ Llama Champion β dropped with Qwen (no 4B model in scope now)
- β π Off the Grid β conflicts with Modal ($10k prize); 12B is hard to run local anyway
Prior Art & Research
- Milady project (
/a0/usr/projects/milady): Activation Avatars β 3 trained adapter checkpoints (CrossAttention, MultiToken), ~2M params each. Maps Qwen3-4B layers 9/18/27 hidden states β FLUX.2-Klein prompt embeddings. 20 emotions. Results: milady-style face images per emotion. - Goodfire research (May-June 2026): Neural geometry series. Key papers:
- "The World Inside Neural Networks" β concepts on curved manifolds
- "Steering Along Manifolds" β manifold steering >> linear steering on Llama 3.1 8B
- "Geometric Calculator" β general-purpose addition module in layer 18 computing over circular geometry
- "Can SAEs Capture Neural Geometry?" β SAEs shatter/dilute manifold structure
- Hackathon winners research: One-sentence pitch + instant wow, multi-agent clear roles, optimize experience not model, latency engineering wins, nail deliverables, community likes count
Architecture (deployed)
Public Technical Artifacts
HF Dataset
build-small-hackathon/activation-brain-artifactspublishes the reproducibility bundle: Gemma fingerprint JSONs, 627 affect-labeled probe prompts, manifold plots,manifold_processed.npz, summary report, fingerprinting script, analysis scripts, Modal backend reference code, and interpreter training/serving scripts.HF Model
build-small-hackathon/activation-brain-interpreterpublishes the fine-tuned Mistral-family LoRA interpreter adapter used for generated comparison analysis.The raw local
manifold_data.pthidden-state dump remains unpublished intentionally; use processed/public artifacts for submission evidence unless raw activations are explicitly requested.Modal
gemma-brainapp β two classesBaseGemma+OblitGemma(L40S), each loads its model + precomputed brain bundle, streamsfire/token/doneSSE. Hook pathmodel.language_model.layers, hooks [12,24,36].Interpreter
activation-brain-interpreterModal app β serves the publishedbuild-small-hackathon/activation-brain-interpreterLoRA adapter onmistralai/Ministral-8B-Instruct-2410;/api/analyzeproxies prompt + both responses + baseline-corrected deltas + native meters to generate varied plain-English analysis. Deterministic frontend analysis remains fallback.Frontend
brain_app.py(Gradio + FastAPI) β per-model same-origin proxy routes/api/{neurons,init,stream}/{model}plus/api/analyze, servesstatic/brain_engine.js(dual EEG + comparison analysis UI). Dual concurrent mode (no dropdown): one Send opens TWO parallel SSE streams (base + oblit); each drives its own EEG strip (right column), both model responses are shown labeled in chat; the top row places chat/stats beside the live plain-English comparison-analysis card, and the two EEG/model panels sit beneath them; the analysis emphasizes what the divergence means for tone, warmth, caution, uncertainty, and shared-manifold trajectory rather than only listing metric values. Each EEG includes baseline-corrected emotion activation deltas (positive excess over the first 8 fire events of that response, not argmax counts) plus a calibrated baseline-corrected model-native state meter derived from live weights: uniform 0β100 Valence, Activation, Uncertainty, Constraint, activity-gated Conflict, and Warmth.mdLite()renders safe markdown + collapses degenerate loops./api/stream/{model}uses an immediate SSE heartbeat and non-buffered synchronous upstream streaming so HF/Gradio proxies open the response before Modal emits first tokens.Fingerprints built by
fingerprint_model.py(model-agnostic; shared UMAP fit on base, transform on oblit) βgemma4_{base,oblit}_{neurons.json,brain_bundle.pt}on Modal volumeavatars-cache.Note: Gradio mounts
gr.HTMLasynchronously, sobrain_engine.jsmust poll for#ab-brainbefore init (boot poller) β otherwise the canvas stays blank.
Key Documents
BRIEFING.mdβ Full hackathon rules, prizes, timeline, strategy, badges, sponsor model catalog, winning playbook- Tracker at
/a0/usr/workdir/office-manager/tracker.json
Decision Log
Tracked in BRIEFING.md section 11.
Child DOX Index
No child directories yet. Will be created as project grows (e.g., src/, adapters/, notebooks/).