Skip to content

Add Socratic intake stage to support richer input types (fixes #16)#17

Merged
youngbeauty250 merged 3 commits intomainfrom
fix/issue-16-socratic-intake
Apr 4, 2026
Merged

Add Socratic intake stage to support richer input types (fixes #16)#17
youngbeauty250 merged 3 commits intomainfrom
fix/issue-16-socratic-intake

Conversation

@yyifan-Onyen
Copy link
Copy Markdown
Collaborator

Summary

Closes #16

  • Adds a Claude-driven Stage 00 (Research Intake) that runs before Stage 01, using the same operator + approval loop as all other stages
  • Supports user-provided resources: PDFs, code repos, datasets, .bib files, notes — auto-classified and copied into workspace
  • Claude analyzes the goal and resources via Socratic Q&A, producing a research brief with stage-readiness assessment
  • New CLI flags: --resources PATH [PATH ...] and --skip-intake
  • Fully backward compatible: --skip-intake or piped stdin preserves old behavior; all 48 tests pass (23 new + 25 existing unchanged)

What this addresses from the issue

Issue request Implementation
Support PDFs, code, datasets, notes, bib classify_resource() handles all types, copies to correct workspace dirs
Skip steps if resources provided Claude's intake output includes per-stage readiness assessment
Start from actual research materials Resources are in workspace before any stage runs
Socratic Q&A style Claude generates context-aware questions via src/prompts/00_intake.md

Files changed

  • src/intake.pyNEW: dataclasses, resource classification/ingestion, serialization
  • src/prompts/00_intake.mdNEW: Claude prompt template for Socratic intake
  • tests/test_intake.pyNEW: 23 test cases
  • main.py--resources, --skip-intake flags
  • src/manager.py_run_intake(), intake context injection into prompts
  • src/terminal_ui.pyask_yes_no(), ask_resource_paths(), show_intake_summary()
  • src/utils.pyINTAKE_STAGE, intake_context in RunPaths

Test plan

  • All 48 unit tests pass (python -m unittest discover tests/ -v)
  • Integration tests: resource classification, ingestion, serialization round-trip, prompt injection
  • E2E: --skip-intake backward compatibility with fake-operator
  • Manual test: interactive intake with PDF resource, Claude analyzes and produces Socratic Q&A

🤖 Generated with Claude Code

Closes #16

Before this change, AutoR accepted only a single research goal string.
This adds a Claude-driven intake stage that runs before Stage 01,
enabling users to provide PDFs, code repos, datasets, .bib files, and
notes. Claude analyzes the goal and resources via Socratic Q&A using
the same operator and approval loop as all other stages.

New files:
- src/intake.py: resource classification, ingestion, serialization
- src/prompts/00_intake.md: Claude prompt template for intake
- tests/test_intake.py: 23 new tests

Modified:
- main.py: --resources and --skip-intake CLI flags
- src/manager.py: _run_intake() method, intake context in prompts
- src/terminal_ui.py: ask_yes_no, ask_resource_paths, show_intake_summary
- src/utils.py: INTAKE_STAGE constant, intake_context in RunPaths

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@yyifan-Onyen yyifan-Onyen requested a review from black-yt April 3, 2026 01:58
@youngbeauty250 youngbeauty250 merged commit 6eac41a into main Apr 4, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Support More Input Types or Socratic Q&A style

2 participants