dark-research-lab 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dark_research_lab-0.1.0/.gitignore +48 -0
- dark_research_lab-0.1.0/AGENTS.md +246 -0
- dark_research_lab-0.1.0/LICENSE +21 -0
- dark_research_lab-0.1.0/PKG-INFO +125 -0
- dark_research_lab-0.1.0/README.md +97 -0
- dark_research_lab-0.1.0/go/.golangci.yml +81 -0
- dark_research_lab-0.1.0/go/Makefile +70 -0
- dark_research_lab-0.1.0/go/cmd/drl/main.go +78 -0
- dark_research_lab-0.1.0/go/go.mod +22 -0
- dark_research_lab-0.1.0/go/go.sum +61 -0
- dark_research_lab-0.1.0/go/internal/build/build.go +20 -0
- dark_research_lab-0.1.0/go/internal/build/build_test.go +76 -0
- dark_research_lab-0.1.0/go/internal/capture/quality.go +144 -0
- dark_research_lab-0.1.0/go/internal/capture/quality_test.go +553 -0
- dark_research_lab-0.1.0/go/internal/capture/triggers.go +198 -0
- dark_research_lab-0.1.0/go/internal/capture/triggers_test.go +527 -0
- dark_research_lab-0.1.0/go/internal/cli/benchmark_test.go +107 -0
- dark_research_lab-0.1.0/go/internal/cli/commands.go +549 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_advanced.go +212 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_advanced_test.go +57 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_capture.go +507 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_capture_test.go +719 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_crud.go +476 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_crud_test.go +574 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_health.go +120 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_health_test.go +90 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_info.go +399 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_info_test.go +499 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_knowledge.go +171 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_knowledge_test.go +102 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_literature.go +130 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_maintenance.go +563 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_maintenance_test.go +713 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_migrate.go +207 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_migrate_test.go +305 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_phase.go +280 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_phase_test.go +384 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_polish_epic_test.go +237 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_scripts.go +1584 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_scripts_improve.go +243 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_scripts_improve_test.go +196 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_scripts_polish.go +777 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_scripts_polish_test.go +800 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_scripts_review.go +497 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_scripts_review_test.go +1163 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_scripts_test.go +665 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_setup.go +627 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_setup_test.go +349 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_test.go +359 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_verify_gates.go +217 -0
- dark_research_lab-0.1.0/go/internal/cli/commands_verify_gates_test.go +297 -0
- dark_research_lab-0.1.0/go/internal/cli/cross_epic_integration_test.go +462 -0
- dark_research_lab-0.1.0/go/internal/cli/integration_test.go +494 -0
- dark_research_lab-0.1.0/go/internal/compound/compound.go +340 -0
- dark_research_lab-0.1.0/go/internal/compound/compound_test.go +266 -0
- dark_research_lab-0.1.0/go/internal/contracts/windows_integration_test.go +259 -0
- dark_research_lab-0.1.0/go/internal/embed/client.go +122 -0
- dark_research_lab-0.1.0/go/internal/embed/client_test.go +290 -0
- dark_research_lab-0.1.0/go/internal/embed/daemon_unix.go +130 -0
- dark_research_lab-0.1.0/go/internal/embed/daemon_windows.go +10 -0
- dark_research_lab-0.1.0/go/internal/embed/daemon_windows_test.go +24 -0
- dark_research_lab-0.1.0/go/internal/embed/flock_unix.go +23 -0
- dark_research_lab-0.1.0/go/internal/embed/flock_windows.go +48 -0
- dark_research_lab-0.1.0/go/internal/embed/flock_windows_test.go +83 -0
- dark_research_lab-0.1.0/go/internal/embed/integration_test.go +496 -0
- dark_research_lab-0.1.0/go/internal/embed/lifecycle.go +259 -0
- dark_research_lab-0.1.0/go/internal/embed/lifecycle_test.go +164 -0
- dark_research_lab-0.1.0/go/internal/embed/protocol.go +43 -0
- dark_research_lab-0.1.0/go/internal/embed/protocol_test.go +176 -0
- dark_research_lab-0.1.0/go/internal/embed/retry.go +81 -0
- dark_research_lab-0.1.0/go/internal/embed/retry_test.go +189 -0
- dark_research_lab-0.1.0/go/internal/hook/benchmark_test.go +54 -0
- dark_research_lab-0.1.0/go/internal/hook/failure_integration_test.go +102 -0
- dark_research_lab-0.1.0/go/internal/hook/failure_search.go +133 -0
- dark_research_lab-0.1.0/go/internal/hook/failure_search_test.go +233 -0
- dark_research_lab-0.1.0/go/internal/hook/failure_tracker.go +151 -0
- dark_research_lab-0.1.0/go/internal/hook/failure_tracker_test.go +235 -0
- dark_research_lab-0.1.0/go/internal/hook/phase_guard.go +37 -0
- dark_research_lab-0.1.0/go/internal/hook/phase_guard_test.go +147 -0
- dark_research_lab-0.1.0/go/internal/hook/phase_state.go +220 -0
- dark_research_lab-0.1.0/go/internal/hook/phase_state_test.go +374 -0
- dark_research_lab-0.1.0/go/internal/hook/read_tracker.go +47 -0
- dark_research_lab-0.1.0/go/internal/hook/read_tracker_test.go +149 -0
- dark_research_lab-0.1.0/go/internal/hook/resolve_skill_path_test.go +130 -0
- dark_research_lab-0.1.0/go/internal/hook/runner.go +299 -0
- dark_research_lab-0.1.0/go/internal/hook/runner_test.go +265 -0
- dark_research_lab-0.1.0/go/internal/hook/skill_path.go +30 -0
- dark_research_lab-0.1.0/go/internal/hook/stop_audit.go +67 -0
- dark_research_lab-0.1.0/go/internal/hook/stop_audit_test.go +153 -0
- dark_research_lab-0.1.0/go/internal/hook/telemetry_overhead_test.go +112 -0
- dark_research_lab-0.1.0/go/internal/hook/user_prompt.go +105 -0
- dark_research_lab-0.1.0/go/internal/hook/user_prompt_test.go +114 -0
- dark_research_lab-0.1.0/go/internal/knowledge/chunking.go +315 -0
- dark_research_lab-0.1.0/go/internal/knowledge/chunking_test.go +205 -0
- dark_research_lab-0.1.0/go/internal/knowledge/embedding.go +95 -0
- dark_research_lab-0.1.0/go/internal/knowledge/embedding_test.go +162 -0
- dark_research_lab-0.1.0/go/internal/knowledge/indexing.go +191 -0
- dark_research_lab-0.1.0/go/internal/knowledge/indexing_test.go +186 -0
- dark_research_lab-0.1.0/go/internal/knowledge/search.go +187 -0
- dark_research_lab-0.1.0/go/internal/knowledge/search_test.go +157 -0
- dark_research_lab-0.1.0/go/internal/memory/compact.go +224 -0
- dark_research_lab-0.1.0/go/internal/memory/compact_test.go +223 -0
- dark_research_lab-0.1.0/go/internal/memory/jsonl.go +172 -0
- dark_research_lab-0.1.0/go/internal/memory/jsonl_test.go +334 -0
- dark_research_lab-0.1.0/go/internal/memory/types.go +186 -0
- dark_research_lab-0.1.0/go/internal/memory/types_test.go +352 -0
- dark_research_lab-0.1.0/go/internal/retrieval/plan.go +95 -0
- dark_research_lab-0.1.0/go/internal/retrieval/plan_test.go +135 -0
- dark_research_lab-0.1.0/go/internal/retrieval/session.go +57 -0
- dark_research_lab-0.1.0/go/internal/retrieval/session_test.go +168 -0
- dark_research_lab-0.1.0/go/internal/search/batch_test.go +99 -0
- dark_research_lab-0.1.0/go/internal/search/hybrid.go +134 -0
- dark_research_lab-0.1.0/go/internal/search/hybrid_test.go +234 -0
- dark_research_lab-0.1.0/go/internal/search/ranking.go +95 -0
- dark_research_lab-0.1.0/go/internal/search/ranking_test.go +182 -0
- dark_research_lab-0.1.0/go/internal/search/vector.go +307 -0
- dark_research_lab-0.1.0/go/internal/search/vector_test.go +412 -0
- dark_research_lab-0.1.0/go/internal/setup/detect.go +116 -0
- dark_research_lab-0.1.0/go/internal/setup/detect_test.go +215 -0
- dark_research_lab-0.1.0/go/internal/setup/hints.go +50 -0
- dark_research_lab-0.1.0/go/internal/setup/hints_test.go +113 -0
- dark_research_lab-0.1.0/go/internal/setup/init.go +284 -0
- dark_research_lab-0.1.0/go/internal/setup/init_test.go +511 -0
- dark_research_lab-0.1.0/go/internal/setup/primitives.go +706 -0
- dark_research_lab-0.1.0/go/internal/setup/primitives_test.go +1109 -0
- dark_research_lab-0.1.0/go/internal/setup/settings.go +508 -0
- dark_research_lab-0.1.0/go/internal/setup/settings_test.go +395 -0
- dark_research_lab-0.1.0/go/internal/setup/skill_index_test.go +148 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agent-role-skills/architecture-reviewer/SKILL.md +33 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agent-role-skills/audit/SKILL.md +25 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agent-role-skills/cct-subagent/SKILL.md +38 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agent-role-skills/compounding/SKILL.md +36 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agent-role-skills/context-analyzer/SKILL.md +35 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agent-role-skills/design-craft-reviewer/SKILL.md +154 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agent-role-skills/doc-gardener/SKILL.md +29 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agent-role-skills/drift-detector/SKILL.md +35 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agent-role-skills/implementer/SKILL.md +37 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agent-role-skills/lesson-extractor/SKILL.md +35 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agent-role-skills/memory-analyst/SKILL.md +29 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agent-role-skills/pattern-matcher/SKILL.md +36 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agent-role-skills/performance-reviewer/SKILL.md +33 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agent-role-skills/repo-analyst/SKILL.md +31 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agent-role-skills/runtime-verifier/SKILL.md +118 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agent-role-skills/runtime-verifier/references/playwright-patterns.md +290 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agent-role-skills/scenario-coverage-reviewer/SKILL.md +39 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agent-role-skills/security-auth/SKILL.md +56 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agent-role-skills/security-data/SKILL.md +51 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agent-role-skills/security-deps/SKILL.md +48 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agent-role-skills/security-injection/SKILL.md +50 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agent-role-skills/security-reviewer/SKILL.md +55 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agent-role-skills/security-secrets/SKILL.md +50 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agent-role-skills/simplicity-reviewer/SKILL.md +32 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agent-role-skills/solution-writer/SKILL.md +36 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agent-role-skills/test-coverage-reviewer/SKILL.md +36 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agent-role-skills/test-writer/SKILL.md +40 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agents/audit.md +9 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agents/cct-subagent.md +9 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agents/doc-gardener.md +9 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agents/drift-detector.md +9 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agents/external-reviewer-codex.md +58 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agents/external-reviewer-gemini.md +58 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agents/lessons-reviewer.md +17 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agents/lint-classifier.md +214 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agents/memory-analyst.md +9 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agents/repo-analyst.md +9 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agents/research-specialist.md +35 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/agents-md.md +54 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/claude-md-reference.md +4 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/commands/agentic-audit.md +12 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/commands/agentic-setup.md +12 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/commands/architect.md +12 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/commands/build-great-things.md +10 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/commands/check-that.md +14 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/commands/compound.md +10 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/commands/cook-it.md +11 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/commands/get-a-phd.md +12 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/commands/launch-loop.md +10 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/commands/learn-that.md +21 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/commands/plan.md +10 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/commands/prime.md +9 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/commands/research.md +10 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/commands/review.md +10 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/commands/spec-dev.md +10 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/commands/test-clean.md +10 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/commands/work.md +10 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/embed.go +214 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/embed_test.go +366 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/integration_verification_coherence_test.go +242 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/integration_verification_test.go +138 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/plugin.json +11 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skill_phase_test.go +154 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/agentic/SKILL.md +245 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/architect/GOTCHA.md +42 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/architect/SKILL.md +198 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/architect/references/advisory-fleet.md +271 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/architect/references/infinity-loop/README.md +65 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/architect/references/infinity-loop/epic-ordering.md +97 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/architect/references/infinity-loop/logging.md +164 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/architect/references/infinity-loop/memory-safety.md +167 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/architect/references/infinity-loop/pre-flight.md +86 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/architect/references/infinity-loop/review-fleet.md +237 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/architect/references/infinity-loop/troubleshooting.md +299 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/architect/references/polish-loop/README.md +82 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/architect/references/polish-loop/audit-prompt.md +45 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/build-great-things/SKILL.md +210 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/build-great-things/references/webapp/01-foundation.md +106 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/build-great-things/references/webapp/02-structure.md +78 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/build-great-things/references/webapp/03-craft.md +82 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/build-great-things/references/webapp/04-motion-and-interaction.md +70 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/build-great-things/references/webapp/05-performance-and-polish.md +101 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/build-great-things/references/webapp/06-launch-and-growth.md +76 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/build-great-things/references/website/01-foundation.md +23 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/build-great-things/references/website/02-structure.md +21 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/build-great-things/references/website/03-craft.md +24 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/build-great-things/references/website/04-motion-and-interaction.md +20 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/build-great-things/references/website/05-performance-and-polish.md +20 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/build-great-things/references/website/06-launch-and-growth.md +22 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/compound/SKILL.md +74 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/cook-it/SKILL.md +100 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/loop-launcher/SKILL.md +156 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/plan/SKILL.md +118 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/qa-engineer/SKILL.md +247 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/qa-engineer/references/browser-automation.md +403 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/qa-engineer/references/constitution-schema.md +140 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/qa-engineer/references/exploratory-testing.md +207 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/researcher/SKILL.md +107 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/review/SKILL.md +205 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/review/references/lesson-calibration.md +91 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/spec-dev/SKILL.md +107 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/spec-dev/references/spec-guide.md +265 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/test-cleaner/SKILL.md +77 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/skills/work/SKILL.md +96 -0
- dark_research_lab-0.1.0/go/internal/setup/templates/template_drift_test.go +231 -0
- dark_research_lab-0.1.0/go/internal/setup/tier_test.go +163 -0
- dark_research_lab-0.1.0/go/internal/storage/cache.go +154 -0
- dark_research_lab-0.1.0/go/internal/storage/cache_test.go +267 -0
- dark_research_lab-0.1.0/go/internal/storage/flock_unix.go +18 -0
- dark_research_lab-0.1.0/go/internal/storage/flock_windows.go +37 -0
- dark_research_lab-0.1.0/go/internal/storage/flock_windows_test.go +184 -0
- dark_research_lab-0.1.0/go/internal/storage/knowledge_db.go +567 -0
- dark_research_lab-0.1.0/go/internal/storage/knowledge_db_test.go +488 -0
- dark_research_lab-0.1.0/go/internal/storage/migration_integration_test.go +247 -0
- dark_research_lab-0.1.0/go/internal/storage/search.go +365 -0
- dark_research_lab-0.1.0/go/internal/storage/search_test.go +306 -0
- dark_research_lab-0.1.0/go/internal/storage/sqlite.go +211 -0
- dark_research_lab-0.1.0/go/internal/storage/sqlite_flock_test.go +92 -0
- dark_research_lab-0.1.0/go/internal/storage/sqlite_test.go +383 -0
- dark_research_lab-0.1.0/go/internal/storage/sync.go +195 -0
- dark_research_lab-0.1.0/go/internal/storage/sync_test.go +368 -0
- dark_research_lab-0.1.0/go/internal/telemetry/concurrent_test.go +138 -0
- dark_research_lab-0.1.0/go/internal/telemetry/telemetry.go +163 -0
- dark_research_lab-0.1.0/go/internal/telemetry/telemetry_test.go +319 -0
- dark_research_lab-0.1.0/go/internal/util/cosine.go +28 -0
- dark_research_lab-0.1.0/go/internal/util/cosine_test.go +63 -0
- dark_research_lab-0.1.0/go/internal/util/reporoot.go +20 -0
- dark_research_lab-0.1.0/go/internal/util/reporoot_test.go +43 -0
- dark_research_lab-0.1.0/go/internal/util/shellescape.go +11 -0
- dark_research_lab-0.1.0/go/internal/util/shellescape_test.go +28 -0
- dark_research_lab-0.1.0/go/internal/util/stdin.go +52 -0
- dark_research_lab-0.1.0/go/internal/util/stdin_test.go +154 -0
- dark_research_lab-0.1.0/hatch_build.py +40 -0
- dark_research_lab-0.1.0/infinity-loop.sh +988 -0
- dark_research_lab-0.1.0/pipeline.sh +6 -0
- dark_research_lab-0.1.0/polish-loop.sh +596 -0
- dark_research_lab-0.1.0/pyproject.toml +63 -0
- dark_research_lab-0.1.0/python/drl/__init__.py +66 -0
- dark_research_lab-0.1.0/python/drl/__main__.py +4 -0
- dark_research_lab-0.1.0/scripts/build.sh +40 -0
- dark_research_lab-0.1.0/scripts/hooks/decision-reminder.sh +61 -0
- dark_research_lab-0.1.0/src/__init__.py +5 -0
- dark_research_lab-0.1.0/src/analysis/__init__.py +4 -0
- dark_research_lab-0.1.0/src/analysis/descriptive.py +53 -0
- dark_research_lab-0.1.0/src/analysis/econometrics.py +111 -0
- dark_research_lab-0.1.0/src/analysis/robustness.py +53 -0
- dark_research_lab-0.1.0/src/config.py +14 -0
- dark_research_lab-0.1.0/src/data/__init__.py +3 -0
- dark_research_lab-0.1.0/src/data/cleaners.py +44 -0
- dark_research_lab-0.1.0/src/data/loaders.py +50 -0
- dark_research_lab-0.1.0/src/orchestrators/__init__.py +5 -0
- dark_research_lab-0.1.0/src/orchestrators/repro.py +100 -0
- dark_research_lab-0.1.0/src/visualization/__init__.py +2 -0
- dark_research_lab-0.1.0/src/visualization/plots.py +37 -0
- dark_research_lab-0.1.0/uv.lock +981 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
*.env
|
|
2
|
+
# Dolt database files (added by bd init)
|
|
3
|
+
.dolt/
|
|
4
|
+
*.db
|
|
5
|
+
|
|
6
|
+
# Python bytecode
|
|
7
|
+
**/__pycache__/
|
|
8
|
+
*.pyc
|
|
9
|
+
|
|
10
|
+
# Build artifacts
|
|
11
|
+
go/dist/
|
|
12
|
+
go/drl
|
|
13
|
+
dist/
|
|
14
|
+
*.egg-info/
|
|
15
|
+
|
|
16
|
+
# Bundled Go binary (copied by hatch build hook)
|
|
17
|
+
python/drl/drl
|
|
18
|
+
python/drl/drl.exe
|
|
19
|
+
|
|
20
|
+
# Agent cache files
|
|
21
|
+
**/.claude/.cache/
|
|
22
|
+
|
|
23
|
+
# Agent runtime logs
|
|
24
|
+
agent_logs/
|
|
25
|
+
|
|
26
|
+
# Credential keys
|
|
27
|
+
.beads/.beads-credential-key
|
|
28
|
+
|
|
29
|
+
# Ephemeral hook state
|
|
30
|
+
.claude/.drl-last-phase
|
|
31
|
+
.drl-phase-state.json
|
|
32
|
+
|
|
33
|
+
# Stale worktree debris
|
|
34
|
+
drltmp/
|
|
35
|
+
|
|
36
|
+
# LaTeX build artifacts
|
|
37
|
+
paper/*.aux
|
|
38
|
+
paper/*.log
|
|
39
|
+
paper/*.bbl
|
|
40
|
+
paper/*.blg
|
|
41
|
+
paper/*.out
|
|
42
|
+
paper/*.toc
|
|
43
|
+
paper/*.synctex.gz
|
|
44
|
+
paper/*.pdf
|
|
45
|
+
paper/sections/*.aux
|
|
46
|
+
|
|
47
|
+
# Reproducibility manifest (generated)
|
|
48
|
+
paper/repro_manifest.json
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
# Agent Instructions
|
|
2
|
+
|
|
3
|
+
This project uses **bd** (beads) for issue tracking. Run `bd onboard` to get started.
|
|
4
|
+
|
|
5
|
+
## DRL Research Workflow
|
|
6
|
+
|
|
7
|
+
This project is an autonomous research paper factory. Agents operate within a structured research pipeline.
|
|
8
|
+
|
|
9
|
+
### Research Agent Roles
|
|
10
|
+
|
|
11
|
+
#### Skills (orchestration roles -- not agent files)
|
|
12
|
+
|
|
13
|
+
| Role | Skill File (from project root) | Responsibility |
|
|
14
|
+
|------|-------------------------------|---------------|
|
|
15
|
+
| Research Architect | `.claude/skills/drl/research-architect/SKILL.md` | Decomposes research questions into epics with methodology specs |
|
|
16
|
+
|
|
17
|
+
#### Agents (spawnable subagent definitions)
|
|
18
|
+
|
|
19
|
+
| Role | Agent File (from project root) | Responsibility |
|
|
20
|
+
|------|-------------------------------|---------------|
|
|
21
|
+
| Research Analyst | `.claude/agents/drl/analyst.md` | Executes statistical analysis with Polars, produces tables/figures |
|
|
22
|
+
| Literature Analyst | `.claude/agents/drl/literature-analyst.md` | Surveys existing research via PDF + RAG pipeline |
|
|
23
|
+
| Methodology Reviewer | `.claude/agents/drl/methodology-reviewer.md` | Audits statistical methods and causal inference validity |
|
|
24
|
+
| Robustness Checker | `.claude/agents/drl/robustness-checker.md` | Verifies findings hold under alternative specifications |
|
|
25
|
+
| Coherence Reviewer | `.claude/agents/drl/coherence-reviewer.md` | Ensures logical consistency across paper sections |
|
|
26
|
+
| Reproducibility Verifier | `.claude/agents/drl/reproducibility-verifier.md` | Validates all outputs can be independently reproduced |
|
|
27
|
+
| Citation Checker | `.claude/agents/drl/citation-checker.md` | Verifies citation accuracy and bibliography completeness |
|
|
28
|
+
| Writing Quality Reviewer | `.claude/agents/drl/writing-quality-reviewer.md` | Evaluates academic writing clarity and publication standards |
|
|
29
|
+
| Advisory Fleet | (external CLIs) | Multi-model review (Claude + Gemini + Codex) for critical decisions |
|
|
30
|
+
|
|
31
|
+
### Decision Logging
|
|
32
|
+
|
|
33
|
+
All agents MUST log methodological decisions to `docs/decisions/` (from project root) using the ADR template (`docs/decisions/0000-template.md`). Use `/drl:decision` for guided logging. Before making a choice between statistical methods, data sources, or analytical approaches, create an ADR with alternatives considered and rationale.
|
|
34
|
+
|
|
35
|
+
### Research Phases
|
|
36
|
+
|
|
37
|
+
Research follows the compound-agent cook-it workflow adapted for academic work:
|
|
38
|
+
|
|
39
|
+
| Phase | Skill File (from project root) | Gate |
|
|
40
|
+
|-------|-----------|------|
|
|
41
|
+
| Spec | `.claude/skills/drl/research-spec/SKILL.md` | RQ + hypotheses approved |
|
|
42
|
+
| Plan | `.claude/skills/drl/research-plan/SKILL.md` | Methodology approved |
|
|
43
|
+
| Work | `.claude/skills/drl/research-work/SKILL.md` | All analyses complete |
|
|
44
|
+
| Review | `.claude/skills/drl/methodology-review/SKILL.md` | All checks pass |
|
|
45
|
+
| Synthesis | `.claude/skills/drl/synthesis/SKILL.md` | Paper compiles + all refs resolve |
|
|
46
|
+
|
|
47
|
+
## Quick Reference
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
bd ready # Find available work
|
|
51
|
+
bd show <id> # View issue details
|
|
52
|
+
bd update <id> --claim # Claim work atomically
|
|
53
|
+
bd close <id> # Complete work
|
|
54
|
+
bd dolt push # Push beads data to remote
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Non-Interactive Shell Commands
|
|
58
|
+
|
|
59
|
+
**ALWAYS use non-interactive flags** with file operations to avoid hanging on confirmation prompts.
|
|
60
|
+
|
|
61
|
+
Shell commands like `cp`, `mv`, and `rm` may be aliased to include `-i` (interactive) mode on some systems, causing the agent to hang indefinitely waiting for y/n input.
|
|
62
|
+
|
|
63
|
+
**Use these forms instead:**
|
|
64
|
+
```bash
|
|
65
|
+
# Force overwrite without prompting
|
|
66
|
+
cp -f source dest # NOT: cp source dest
|
|
67
|
+
mv -f source dest # NOT: mv source dest
|
|
68
|
+
rm -f file # NOT: rm file
|
|
69
|
+
|
|
70
|
+
# For recursive operations
|
|
71
|
+
rm -rf directory # NOT: rm -r directory
|
|
72
|
+
cp -rf source dest # NOT: cp -r source dest
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Other commands that may prompt:**
|
|
76
|
+
- `scp` - use `-o BatchMode=yes` for non-interactive
|
|
77
|
+
- `ssh` - use `-o BatchMode=yes` to fail instead of prompting
|
|
78
|
+
- `apt-get` - use `-y` flag
|
|
79
|
+
- `brew` - use `HOMEBREW_NO_AUTO_UPDATE=1` env var
|
|
80
|
+
|
|
81
|
+
<!-- BEGIN BEADS INTEGRATION profile:full hash:d4f96305 -->
|
|
82
|
+
## Issue Tracking with bd (beads)
|
|
83
|
+
|
|
84
|
+
**IMPORTANT**: This project uses **bd (beads)** for ALL issue tracking. Do NOT use markdown TODOs, task lists, or other tracking methods.
|
|
85
|
+
|
|
86
|
+
### Why bd?
|
|
87
|
+
|
|
88
|
+
- Dependency-aware: Track blockers and relationships between issues
|
|
89
|
+
- Git-friendly: Dolt-powered version control with native sync
|
|
90
|
+
- Agent-optimized: JSON output, ready work detection, discovered-from links
|
|
91
|
+
- Prevents duplicate tracking systems and confusion
|
|
92
|
+
|
|
93
|
+
### Quick Start
|
|
94
|
+
|
|
95
|
+
**Check for ready work:**
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
bd ready --json
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**Create new issues:**
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
bd create "Issue title" --description="Detailed context" -t bug|feature|task -p 0-4 --json
|
|
105
|
+
bd create "Issue title" --description="What this issue is about" -p 1 --deps discovered-from:bd-123 --json
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**Claim and update:**
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
bd update <id> --claim --json
|
|
112
|
+
bd update bd-42 --priority 1 --json
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**Complete work:**
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
bd close bd-42 --reason "Completed" --json
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Issue Types
|
|
122
|
+
|
|
123
|
+
- `bug` - Something broken
|
|
124
|
+
- `feature` - New functionality
|
|
125
|
+
- `task` - Work item (tests, docs, refactoring)
|
|
126
|
+
- `epic` - Large feature with subtasks
|
|
127
|
+
- `chore` - Maintenance (dependencies, tooling)
|
|
128
|
+
|
|
129
|
+
### Priorities
|
|
130
|
+
|
|
131
|
+
- `0` - Critical (security, data loss, broken builds)
|
|
132
|
+
- `1` - High (major features, important bugs)
|
|
133
|
+
- `2` - Medium (default, nice-to-have)
|
|
134
|
+
- `3` - Low (polish, optimization)
|
|
135
|
+
- `4` - Backlog (future ideas)
|
|
136
|
+
|
|
137
|
+
### Workflow for AI Agents
|
|
138
|
+
|
|
139
|
+
1. **Check ready work**: `bd ready` shows unblocked issues
|
|
140
|
+
2. **Claim your task atomically**: `bd update <id> --claim`
|
|
141
|
+
3. **Work on it**: Implement, test, document
|
|
142
|
+
4. **Discover new work?** Create linked issue:
|
|
143
|
+
- `bd create "Found bug" --description="Details about what was found" -p 1 --deps discovered-from:<parent-id>`
|
|
144
|
+
5. **Complete**: `bd close <id> --reason "Done"`
|
|
145
|
+
|
|
146
|
+
### Auto-Sync
|
|
147
|
+
|
|
148
|
+
bd automatically syncs via Dolt:
|
|
149
|
+
|
|
150
|
+
- Each write auto-commits to Dolt history
|
|
151
|
+
- Use `bd dolt push`/`bd dolt pull` for remote sync
|
|
152
|
+
- No manual export/import needed!
|
|
153
|
+
|
|
154
|
+
### Important Rules
|
|
155
|
+
|
|
156
|
+
- ✅ Use bd for ALL task tracking
|
|
157
|
+
- ✅ Always use `--json` flag for programmatic use
|
|
158
|
+
- ✅ Link discovered work with `discovered-from` dependencies
|
|
159
|
+
- ✅ Check `bd ready` before asking "what should I work on?"
|
|
160
|
+
- ❌ Do NOT create markdown TODO lists
|
|
161
|
+
- ❌ Do NOT use external issue trackers
|
|
162
|
+
- ❌ Do NOT duplicate tracking systems
|
|
163
|
+
|
|
164
|
+
For more details, see README.md and docs/QUICKSTART.md.
|
|
165
|
+
|
|
166
|
+
## Landing the Plane (Session Completion)
|
|
167
|
+
|
|
168
|
+
**When ending a work session**, you MUST complete ALL steps below. Work is NOT complete until `git push` succeeds.
|
|
169
|
+
|
|
170
|
+
**MANDATORY WORKFLOW:**
|
|
171
|
+
|
|
172
|
+
1. **File issues for remaining work** - Create issues for anything that needs follow-up
|
|
173
|
+
2. **Run quality gates** (if code changed) - Tests, linters, builds
|
|
174
|
+
3. **Update issue status** - Close finished work, update in-progress items
|
|
175
|
+
4. **PUSH TO REMOTE** - This is MANDATORY:
|
|
176
|
+
```bash
|
|
177
|
+
git pull --rebase
|
|
178
|
+
bd dolt push
|
|
179
|
+
git push
|
|
180
|
+
git status # MUST show "up to date with origin"
|
|
181
|
+
```
|
|
182
|
+
5. **Clean up** - Clear stashes, prune remote branches
|
|
183
|
+
6. **Verify** - All changes committed AND pushed
|
|
184
|
+
7. **Hand off** - Provide context for next session
|
|
185
|
+
|
|
186
|
+
**CRITICAL RULES:**
|
|
187
|
+
- Work is NOT complete until `git push` succeeds
|
|
188
|
+
- NEVER stop before pushing - that leaves work stranded locally
|
|
189
|
+
- NEVER say "ready to push when you are" - YOU must push
|
|
190
|
+
- If push fails, resolve and retry until it succeeds
|
|
191
|
+
|
|
192
|
+
<!-- END BEADS INTEGRATION -->
|
|
193
|
+
<!-- compound-agent:start -->
|
|
194
|
+
## Compound Agent Integration
|
|
195
|
+
|
|
196
|
+
This project uses compound-agent for session memory via **CLI commands**.
|
|
197
|
+
|
|
198
|
+
### CLI Commands (ALWAYS USE THESE)
|
|
199
|
+
|
|
200
|
+
**You MUST use CLI commands for lesson management:**
|
|
201
|
+
|
|
202
|
+
| Command | Purpose |
|
|
203
|
+
|---------|---------|
|
|
204
|
+
| `ca search "query"` | Search lessons - MUST call before architectural decisions; use anytime you need context |
|
|
205
|
+
| `ca knowledge "query"` | Semantic search over project docs - MUST call before architectural decisions; use keyword phrases, not questions |
|
|
206
|
+
| `ca learn "insight"` | Capture lessons - use AFTER corrections or discoveries |
|
|
207
|
+
| `ca list` | List all stored lessons |
|
|
208
|
+
| `ca show <id>` | Show details of a specific lesson |
|
|
209
|
+
| `ca wrong <id>` | Mark a lesson as incorrect |
|
|
210
|
+
|
|
211
|
+
### Mandatory Recall
|
|
212
|
+
|
|
213
|
+
You MUST call `ca search` and `ca knowledge` BEFORE:
|
|
214
|
+
- Architectural decisions or complex planning
|
|
215
|
+
- Patterns you've implemented before in this repo
|
|
216
|
+
- After user corrections ("actually...", "wrong", "use X instead")
|
|
217
|
+
|
|
218
|
+
**NEVER skip search for complex decisions.** Past mistakes will repeat.
|
|
219
|
+
|
|
220
|
+
Beyond mandatory triggers, use these commands freely — they are lightweight queries, not heavyweight operations. Uncertain about a pattern? `ca search`. Need a detail from the docs? `ca knowledge`. The cost of an unnecessary search is near-zero; the cost of a missed one can be hours.
|
|
221
|
+
|
|
222
|
+
### Capture Protocol
|
|
223
|
+
|
|
224
|
+
Run `ca learn` AFTER:
|
|
225
|
+
- User corrects you
|
|
226
|
+
- Test fail -> fix -> pass cycles
|
|
227
|
+
- You discover project-specific knowledge
|
|
228
|
+
|
|
229
|
+
**Workflow**: Search BEFORE deciding, capture AFTER learning.
|
|
230
|
+
|
|
231
|
+
### Quality Gate
|
|
232
|
+
|
|
233
|
+
Before capturing, verify the lesson is:
|
|
234
|
+
- **Novel** - Not already stored
|
|
235
|
+
- **Specific** - Clear guidance
|
|
236
|
+
- **Actionable** (preferred) - Obvious what to do
|
|
237
|
+
|
|
238
|
+
### Never Edit JSONL Directly
|
|
239
|
+
|
|
240
|
+
**WARNING: NEVER edit .claude/lessons/index.jsonl directly.**
|
|
241
|
+
|
|
242
|
+
The JSONL file requires proper ID generation, schema validation, and SQLite sync.
|
|
243
|
+
Use CLI (`ca learn`) — never manual edits.
|
|
244
|
+
|
|
245
|
+
See [documentation](https://github.com/Nathandela/compound-agent) for more details.
|
|
246
|
+
<!-- compound-agent:end -->
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Nathandela
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dark-research-lab
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Dark Research Lab - autonomous research paper factory
|
|
5
|
+
Project-URL: Homepage, https://github.com/Nathandela/dark-research-lab
|
|
6
|
+
Project-URL: Repository, https://github.com/Nathandela/dark-research-lab
|
|
7
|
+
Project-URL: Issues, https://github.com/Nathandela/dark-research-lab/issues
|
|
8
|
+
Author: Nathan Delacretaz
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: ai,latex,reproducibility,research,social-science
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering
|
|
22
|
+
Classifier: Topic :: Text Processing :: Markup :: LaTeX
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Requires-Dist: matplotlib>=3.8.0
|
|
25
|
+
Requires-Dist: polars>=1.0.0
|
|
26
|
+
Requires-Dist: pymupdf>=1.24.0
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
|
|
29
|
+
# DRL -- Dark Research Lab
|
|
30
|
+
|
|
31
|
+
Autonomous research paper factory for social science. Turn a git repo into a
|
|
32
|
+
reproducible academic paper with AI-driven analysis, literature indexing, and
|
|
33
|
+
LaTeX compilation.
|
|
34
|
+
|
|
35
|
+
## Install
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
uv pip install drl
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Requires Python 3.10+.
|
|
42
|
+
|
|
43
|
+
## Quick Start
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# Initialize a new research project
|
|
47
|
+
drl setup
|
|
48
|
+
|
|
49
|
+
# Walk through configuration
|
|
50
|
+
/drl:onboard
|
|
51
|
+
|
|
52
|
+
# Customize for your field (labor economics, political science, etc.)
|
|
53
|
+
/drl:flavor
|
|
54
|
+
|
|
55
|
+
# Index literature -- drop PDFs into literature/pdfs/, then:
|
|
56
|
+
drl index
|
|
57
|
+
|
|
58
|
+
# Decompose your research question into epics
|
|
59
|
+
/drl:architect
|
|
60
|
+
|
|
61
|
+
# Run the full pipeline (spec -> plan -> work -> review -> synthesis)
|
|
62
|
+
drl loop
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## How It Works
|
|
66
|
+
|
|
67
|
+
DRL wraps [compound-agent](https://github.com/Nathandela/compound-agent) with
|
|
68
|
+
research-specific skills, agents, and guardrails:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
Researcher
|
|
72
|
+
|
|
|
73
|
+
v
|
|
74
|
+
drl CLI (Go binary in a Python wheel)
|
|
75
|
+
|
|
|
76
|
+
+-- Claude Code (executes skills/agents)
|
|
77
|
+
+-- Beads (epic tracking with dependency graphs)
|
|
78
|
+
+-- Literature RAG (PDF extraction + embedding via ca-embed)
|
|
79
|
+
+-- LaTeX toolchain (3-pass pdflatex + bibtex)
|
|
80
|
+
+-- Advisory Fleet (optional: Gemini, Codex reviewers)
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Each research question passes through a **cook-it cycle**:
|
|
84
|
+
1. **Spec** -- research question, hypotheses, literature gap
|
|
85
|
+
2. **Plan** -- methodology, variables, statistical models
|
|
86
|
+
3. **Work** -- analysis, tables, figures, section drafting
|
|
87
|
+
4. **Review** -- methodology audit + external model review
|
|
88
|
+
5. **Synthesis** -- lessons captured, paper section finalized
|
|
89
|
+
|
|
90
|
+
Every methodological decision is logged to `docs/decisions/` for full
|
|
91
|
+
traceability. A reproducibility package (lockfile + data manifest + run script)
|
|
92
|
+
is generated at compilation time.
|
|
93
|
+
|
|
94
|
+
## Project Structure
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
paper/ LaTeX source and compiled outputs
|
|
98
|
+
src/ Analysis scripts
|
|
99
|
+
literature/ PDFs and indexed knowledge base
|
|
100
|
+
docs/ Decisions, specs, agent notes
|
|
101
|
+
tests/ Test suite
|
|
102
|
+
.claude/ Skills, agents, hooks, commands
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Commands
|
|
106
|
+
|
|
107
|
+
| Command | Purpose |
|
|
108
|
+
|---------|---------|
|
|
109
|
+
| `drl setup` | Initialize or update project templates |
|
|
110
|
+
| `drl index` | Index literature PDFs for RAG search |
|
|
111
|
+
| `drl loop` | Run infinity loop over all epics |
|
|
112
|
+
| `/drl:compile` | Compile LaTeX paper + reproducibility package |
|
|
113
|
+
| `/drl:flavor` | Customize skills for your research field |
|
|
114
|
+
| `/drl:onboard` | Guided first-time setup |
|
|
115
|
+
| `/drl:architect` | Decompose research question into epics |
|
|
116
|
+
|
|
117
|
+
## Documentation
|
|
118
|
+
|
|
119
|
+
- [System Specification](docs/specs/drl-package.md)
|
|
120
|
+
- [Architecture Decisions](docs/decisions/)
|
|
121
|
+
- [Agent Configuration](AGENTS.md)
|
|
122
|
+
|
|
123
|
+
## License
|
|
124
|
+
|
|
125
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# DRL -- Dark Research Lab
|
|
2
|
+
|
|
3
|
+
Autonomous research paper factory for social science. Turn a git repo into a
|
|
4
|
+
reproducible academic paper with AI-driven analysis, literature indexing, and
|
|
5
|
+
LaTeX compilation.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
uv pip install drl
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Requires Python 3.10+.
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Initialize a new research project
|
|
19
|
+
drl setup
|
|
20
|
+
|
|
21
|
+
# Walk through configuration
|
|
22
|
+
/drl:onboard
|
|
23
|
+
|
|
24
|
+
# Customize for your field (labor economics, political science, etc.)
|
|
25
|
+
/drl:flavor
|
|
26
|
+
|
|
27
|
+
# Index literature -- drop PDFs into literature/pdfs/, then:
|
|
28
|
+
drl index
|
|
29
|
+
|
|
30
|
+
# Decompose your research question into epics
|
|
31
|
+
/drl:architect
|
|
32
|
+
|
|
33
|
+
# Run the full pipeline (spec -> plan -> work -> review -> synthesis)
|
|
34
|
+
drl loop
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## How It Works
|
|
38
|
+
|
|
39
|
+
DRL wraps [compound-agent](https://github.com/Nathandela/compound-agent) with
|
|
40
|
+
research-specific skills, agents, and guardrails:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
Researcher
|
|
44
|
+
|
|
|
45
|
+
v
|
|
46
|
+
drl CLI (Go binary in a Python wheel)
|
|
47
|
+
|
|
|
48
|
+
+-- Claude Code (executes skills/agents)
|
|
49
|
+
+-- Beads (epic tracking with dependency graphs)
|
|
50
|
+
+-- Literature RAG (PDF extraction + embedding via ca-embed)
|
|
51
|
+
+-- LaTeX toolchain (3-pass pdflatex + bibtex)
|
|
52
|
+
+-- Advisory Fleet (optional: Gemini, Codex reviewers)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Each research question passes through a **cook-it cycle**:
|
|
56
|
+
1. **Spec** -- research question, hypotheses, literature gap
|
|
57
|
+
2. **Plan** -- methodology, variables, statistical models
|
|
58
|
+
3. **Work** -- analysis, tables, figures, section drafting
|
|
59
|
+
4. **Review** -- methodology audit + external model review
|
|
60
|
+
5. **Synthesis** -- lessons captured, paper section finalized
|
|
61
|
+
|
|
62
|
+
Every methodological decision is logged to `docs/decisions/` for full
|
|
63
|
+
traceability. A reproducibility package (lockfile + data manifest + run script)
|
|
64
|
+
is generated at compilation time.
|
|
65
|
+
|
|
66
|
+
## Project Structure
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
paper/ LaTeX source and compiled outputs
|
|
70
|
+
src/ Analysis scripts
|
|
71
|
+
literature/ PDFs and indexed knowledge base
|
|
72
|
+
docs/ Decisions, specs, agent notes
|
|
73
|
+
tests/ Test suite
|
|
74
|
+
.claude/ Skills, agents, hooks, commands
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Commands
|
|
78
|
+
|
|
79
|
+
| Command | Purpose |
|
|
80
|
+
|---------|---------|
|
|
81
|
+
| `drl setup` | Initialize or update project templates |
|
|
82
|
+
| `drl index` | Index literature PDFs for RAG search |
|
|
83
|
+
| `drl loop` | Run infinity loop over all epics |
|
|
84
|
+
| `/drl:compile` | Compile LaTeX paper + reproducibility package |
|
|
85
|
+
| `/drl:flavor` | Customize skills for your research field |
|
|
86
|
+
| `/drl:onboard` | Guided first-time setup |
|
|
87
|
+
| `/drl:architect` | Decompose research question into epics |
|
|
88
|
+
|
|
89
|
+
## Documentation
|
|
90
|
+
|
|
91
|
+
- [System Specification](docs/specs/drl-package.md)
|
|
92
|
+
- [Architecture Decisions](docs/decisions/)
|
|
93
|
+
- [Agent Configuration](AGENTS.md)
|
|
94
|
+
|
|
95
|
+
## License
|
|
96
|
+
|
|
97
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
version: "2"
|
|
2
|
+
run: {}
|
|
3
|
+
linters:
|
|
4
|
+
enable:
|
|
5
|
+
- cyclop
|
|
6
|
+
- funlen
|
|
7
|
+
- gosec
|
|
8
|
+
- revive
|
|
9
|
+
settings:
|
|
10
|
+
cyclop:
|
|
11
|
+
max-complexity: 10
|
|
12
|
+
funlen:
|
|
13
|
+
lines: 50
|
|
14
|
+
statements: 40
|
|
15
|
+
gosec:
|
|
16
|
+
includes:
|
|
17
|
+
- G201
|
|
18
|
+
- G202
|
|
19
|
+
revive:
|
|
20
|
+
rules:
|
|
21
|
+
- name: blank-imports
|
|
22
|
+
- name: context-as-argument
|
|
23
|
+
- name: context-keys-type
|
|
24
|
+
- name: dot-imports
|
|
25
|
+
- name: error-return
|
|
26
|
+
- name: error-strings
|
|
27
|
+
- name: error-naming
|
|
28
|
+
- name: exported
|
|
29
|
+
- name: if-return
|
|
30
|
+
- name: increment-decrement
|
|
31
|
+
- name: var-naming
|
|
32
|
+
- name: package-comments
|
|
33
|
+
disabled: true
|
|
34
|
+
- name: range
|
|
35
|
+
- name: receiver-naming
|
|
36
|
+
- name: time-naming
|
|
37
|
+
- name: unexported-return
|
|
38
|
+
- name: indent-error-flow
|
|
39
|
+
- name: errorf
|
|
40
|
+
- name: empty-block
|
|
41
|
+
- name: superfluous-else
|
|
42
|
+
- name: unreachable-code
|
|
43
|
+
- name: redefines-builtin-id
|
|
44
|
+
exclusions:
|
|
45
|
+
generated: lax
|
|
46
|
+
presets:
|
|
47
|
+
- comments
|
|
48
|
+
- common-false-positives
|
|
49
|
+
- legacy
|
|
50
|
+
- std-error-handling
|
|
51
|
+
rules:
|
|
52
|
+
- linters:
|
|
53
|
+
- funlen
|
|
54
|
+
path: _test\.go
|
|
55
|
+
- linters:
|
|
56
|
+
- cyclop
|
|
57
|
+
path: _test\.go
|
|
58
|
+
- linters:
|
|
59
|
+
- errcheck
|
|
60
|
+
path: _test\.go
|
|
61
|
+
- linters:
|
|
62
|
+
- revive
|
|
63
|
+
path: _test\.go
|
|
64
|
+
text: dot-imports
|
|
65
|
+
paths:
|
|
66
|
+
- third_party$
|
|
67
|
+
- builtin$
|
|
68
|
+
- examples$
|
|
69
|
+
issues:
|
|
70
|
+
max-issues-per-linter: 0
|
|
71
|
+
max-same-issues: 0
|
|
72
|
+
formatters:
|
|
73
|
+
enable:
|
|
74
|
+
- gofmt
|
|
75
|
+
- goimports
|
|
76
|
+
exclusions:
|
|
77
|
+
generated: lax
|
|
78
|
+
paths:
|
|
79
|
+
- third_party$
|
|
80
|
+
- builtin$
|
|
81
|
+
- examples$
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
DIST := dist
|
|
2
|
+
VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
|
|
3
|
+
COMMIT := $(shell git rev-parse --short HEAD 2>/dev/null || echo "unknown")
|
|
4
|
+
LDFLAGS := -s -w -X github.com/nathandelacretaz/dark-research-lab/internal/build.Version=$(VERSION) \
|
|
5
|
+
-X github.com/nathandelacretaz/dark-research-lab/internal/build.Commit=$(COMMIT)
|
|
6
|
+
RUST_DIR := ../rust/embed-daemon
|
|
7
|
+
|
|
8
|
+
PLATFORMS := darwin-arm64 darwin-amd64 linux-arm64 linux-amd64 windows-amd64 windows-arm64
|
|
9
|
+
|
|
10
|
+
.PHONY: build build-release build-all build-daemon build-daemon-all test test-integration lint clean
|
|
11
|
+
|
|
12
|
+
# Build for local platform (development).
|
|
13
|
+
build:
|
|
14
|
+
go build -o drl ./cmd/drl
|
|
15
|
+
|
|
16
|
+
# Build for local platform with version injection and stripped symbols.
|
|
17
|
+
build-release:
|
|
18
|
+
go build -ldflags '$(LDFLAGS)' -o $(DIST)/drl ./cmd/drl
|
|
19
|
+
|
|
20
|
+
# Cross-compile Go binary for all platforms.
|
|
21
|
+
# Pure Go (CGO_ENABLED=0) — no C cross-compiler needed.
|
|
22
|
+
build-all: $(DIST)
|
|
23
|
+
@for platform in $(PLATFORMS); do \
|
|
24
|
+
os=$${platform%%-*}; \
|
|
25
|
+
arch=$${platform##*-}; \
|
|
26
|
+
ext=""; \
|
|
27
|
+
if [ "$$os" = "windows" ]; then ext=".exe"; fi; \
|
|
28
|
+
echo "Building drl-$${platform}$${ext}..."; \
|
|
29
|
+
CGO_ENABLED=0 GOOS=$$os GOARCH=$$arch \
|
|
30
|
+
go build -ldflags '$(LDFLAGS)' \
|
|
31
|
+
-o $(DIST)/drl-$$platform$$ext ./cmd/drl || exit 1; \
|
|
32
|
+
done
|
|
33
|
+
|
|
34
|
+
# Build Rust embed-daemon for local platform.
|
|
35
|
+
build-daemon:
|
|
36
|
+
cd $(RUST_DIR) && cargo build --release
|
|
37
|
+
@mkdir -p $(DIST)
|
|
38
|
+
cp $(RUST_DIR)/target/release/drl-embed $(DIST)/drl-embed
|
|
39
|
+
|
|
40
|
+
# Cross-compile Rust embed-daemon for all platforms.
|
|
41
|
+
# Requires rustup target add for each target triple.
|
|
42
|
+
build-daemon-all: $(DIST)
|
|
43
|
+
@for platform in $(PLATFORMS); do \
|
|
44
|
+
case $$platform in \
|
|
45
|
+
windows-*) continue ;; \
|
|
46
|
+
darwin-arm64) triple="aarch64-apple-darwin" ;; \
|
|
47
|
+
darwin-amd64) triple="x86_64-apple-darwin" ;; \
|
|
48
|
+
linux-arm64) triple="aarch64-unknown-linux-gnu" ;; \
|
|
49
|
+
linux-amd64) triple="x86_64-unknown-linux-gnu" ;; \
|
|
50
|
+
esac; \
|
|
51
|
+
echo "Building embed-daemon-$$platform ($$triple)..."; \
|
|
52
|
+
cd $(RUST_DIR) && cargo build --release --target $$triple || exit 1; \
|
|
53
|
+
cp $(RUST_DIR)/target/$$triple/release/drl-embed $(DIST)/drl-embed-$$platform; \
|
|
54
|
+
done
|
|
55
|
+
|
|
56
|
+
test:
|
|
57
|
+
go test ./...
|
|
58
|
+
|
|
59
|
+
test-integration:
|
|
60
|
+
go test -tags integration ./...
|
|
61
|
+
|
|
62
|
+
lint:
|
|
63
|
+
go vet ./...
|
|
64
|
+
|
|
65
|
+
clean:
|
|
66
|
+
rm -rf $(DIST) drl
|
|
67
|
+
rm -rf $(RUST_DIR)/target
|
|
68
|
+
|
|
69
|
+
$(DIST):
|
|
70
|
+
@mkdir -p $(DIST)
|