Skip to content

Document Processing Analyst — P0 Pre-Wave Subagent for Client Document Extraction #8

Description

@Number531

Document Processing Analyst — P0 Pre-Wave Subagent

New subagent that processes client-uploaded documents before research planning begins. Extracts text, analyzes content, identifies critical issues, and maps documents to specialist domains.

Full spec: docs/pending-updates/document-extractor-agent.md

Key Facts

  • Scope: ~1,500 new lines across 12 files (6 new, 6 modified)
  • Risk: HIGH (65-75%) without 3 mandatory mitigations → 0% with mitigations applied
  • Dependencies: None (fully additive)
  • Feature flag: Document-conditional — only activates when documents.length > 0

Implementation Phases

  1. Frontend upload UI (file input, drag-and-drop, FormData transport)
  2. Session initialization (sessionInitializer.js, multer middleware, 3 mandatory mitigations)
  3. Subagent definition (legalSubagents.js, PARALLEL_EXECUTION_GROUPS)
  4. SDK hooks & SSE bridge updates
  5. Prompt updates (roles.md, completion.md, waves-execution.md, state-file-schemas.md)
  6. Orchestrator integration (manifest reading, P0 invocation, enhanced research plan)
  7. Specialist updates (document citation format, fact registry schema)
  8. Testing (backward compat for query-only sessions is critical)

Mandatory Mitigations (spec §Breaking Risk Assessment)

  1. Add 'initial-query-docs', 'documents' to KNOWN_SUBDIRS
  2. All manifest reads use existsSync() + null-check
  3. initializeSession() only called when documents.length > 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature implementationroadmapPlanned feature on the project roadmap

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions