Skip to content

Add deep research local-context preflight#318

Draft
Christoffer91 wants to merge 4 commits intosnarktank:mainfrom
Christoffer91:feat/dr-phase1-preflight
Draft

Add deep research local-context preflight#318
Christoffer91 wants to merge 4 commits intosnarktank:mainfrom
Christoffer91:feat/dr-phase1-preflight

Conversation

@Christoffer91
Copy link

Summary

This adds a local-context preflight step to the deep-research workflow.

Changes in this PR:

  • add a new preflight agent with analysis role
  • run preflight before plan
  • thread local context fields into plan, research, and verify
  • add agent guidance so planner/orchestrator/verifier explicitly respect the preflight output
  • add a focused test that checks the preflight agent, step order, and local-context wiring

Closes #316.

Why

Deep-research should look at local context before going broad on the web. That improves scoping, reduces noise, and makes it easier to preserve established local facts and constraints.

Validation

Ran:

  • npm run build
  • node --test dist/installer/workflow-spec.deep-research.test.js
  • node --test dist/installer/step-ops.contract.test.js dist/installer/workflow-spec.test.js dist/installer/workflow-spec.deep-research.test.js

@vercel
Copy link

vercel bot commented Mar 15, 2026

@Christoffer91 is attempting to deploy a commit to the Ryan Team on Vercel.

A member of the Team first needs to authorize it.

florianbeisel referenced this pull request in beisel-it/antfarm Mar 19, 2026
…#318)

Three new roles from upstream PR #318 (deep research local-context preflight):

- planning: read-only, no exec/web/sessions/memory — for planners,
  writers, reviewers, investigators, triagers
- coordination: read + sessions, no exec/memory — for orchestrators
- research: read + web_search/web_fetch, no exec/sessions/memory —
  for scouts, analysts, skeptics, verifiers

inferRole() updated to match new patterns:
  planner/writer/prioritizer/reviewer/investigator/triager → planning
  orchestrator → coordination
  scout/analyst/skeptic/verifier → research

Previous analysis role is preserved but no longer matched by inferRole
(existing installs unaffected; workflows can still declare role: analysis
explicitly).
florianbeisel referenced this pull request in beisel-it/antfarm Mar 19, 2026
…tfarm@feat/dr-phase1-preflight)

Multi-agent deep research pipeline with preflight local-context step:

Agents: preflight, planner, orchestrator, scout, x-scout, analyst,
        skeptic, verifier, writer

Pipeline: preflight (local context scan) → planner → orchestrator
          → [scout / x-scout loop] → analyst → skeptic → verifier → writer

Key design:
- preflight runs first, inspects local files/codebase before going broad
- orchestrator spawns scout stories in parallel (loop step)
- x-scout handles X/Twitter API via scripts/x_api.py
- analyst + skeptic apply pressure-testing to gathered evidence
- verifier checks claims before writer produces final output

Also installs new agent roles used by this workflow (planning,
coordination, research) added in previous commit.
florianbeisel referenced this pull request in beisel-it/antfarm Mar 19, 2026
…ry-run + circuit breaker)

Key changes from upstream:
- dry-run support: antfarm workflow run --dry-run (validates + prints plan, no DB/crons)
- failStep() now kills associated gateway session on manual fail (no more token waste)
- medic circuit breaker: auto-disables cron jobs after 5 consecutive errors
- gateway-api: disableCronJob(), extract consecutiveErrors/lastStatus for medic checks
- medic/checks: checkFailingCrons() + disable_cron action
- step-ops: validate required output keys before step completion
- step-ops: safety reset if loop step running but no current_story_id
- run.ts: dryRunWorkflow() exported
- bug-fix AGENTS.md (fixer/investigator/triager): explicit step complete instructions
- coding-sprint workflow: new planner → coder (loop) → reviewer pipeline

Preserved our local fixes on top:
- #306 verify_each deadlock fix (claimStep NOT EXISTS carve-out)
- #307 --timeout-seconds fix in gateway-api CLI fallback
- OPENCLAW_GATEWAY_URL env-var support + gatewayCliFlags()
- planning/coordination/research agent roles (PR #318)
- tsconfig: exclude run.test.ts (references not-yet-implemented concurrency guard exports)
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.

Add a local-context preflight step to deep-research

1 participant