Documentation
README
Food-Pipeline β Master Research-to-Publication Orchestrator
The top-level conductor. It does not do research, writing, or review itself β it routes the project to the specialist skills (each a multi-subagent system), enforces quality gates between stages, and manages the reviewβrevise loop. Original work.
Skills it orchestrates (each brings its own subagent team)
journal-selectorβ target-journal constraints (structure, limits, reference style, figure spec).food-researchβ literature/evidence synthesis (quick brief / full review / systematic PRISMA + OHAT). Usefood-deep-researchinstead for an open-ended, source-validated deep dive or a standalone literature review.food-paperβ whole-process manuscript system (field β questions β data/stats β figures β argument β draft β polish β self-review).food-figureβ submission-grade figures at the journal spec (invoked withinfood-paper).food-reviewβ multi-reviewer peer-review panel + formatting compliance.
Own subagents
intake_routerβ reads the project's current state and materials, resolves the target journal, picks the entry stage, and assembles the context each downstream skill needs.quality_gateβ the checkpoint between stages: verifies the stage's deliverable meets the gate criteria (integrity, journal compliance, evidence sufficiency) and decides proceed / revise / stop, with the author at mandatory gates.
Stages
| Stage | Skill / agent | Deliverable | Gate |
|---|---|---|---|
| 0 Β· ROUTE | intake_router + journal-selector |
Entry point + journal constraints | β |
| 1 Β· RESEARCH | food-research (or food-deep-research) |
Evidence brief / gap list / (systematic report) | evidence sufficiency |
| 2 Β· WRITE | food-paper |
Draft: analysis, figures (food-figure), argument, references |
integrity + journal compliance |
| 3 Β· REVIEW | food-review |
Review & Response Report (.docx) β feedback + editorial decision β plus margin comments on the manuscript (when Word tooling available) |
mandatory author decision |
| 4 Β· REVISE | food-paper (revise) |
Revision + response entries β tracked changes on the original Word only if the author authorizes | issues resolved |
| 5 Β· RE-REVIEW | food-review (re-review) |
Only if the author authorizes a second round β verifies the revision; may add new comments | accept / stop (no auto third round) |
| 6 Β· FINALIZE | food-paper (format-convert) + writer |
Submission-ready manuscript (.docx) + the one Review & Response Report (.docx) |
final compliance |
Knowledge reuse β don't research the same field twice
When the pipeline ran Stage 1 (it entered at Stage 0 or 1), the field has already
been searched and synthesized. Stages 3 Β· REVIEW and 5 Β· RE-REVIEW must
therefore carry the Stage-1 evidence base into food-review rather than let its
knowledge_builder repeat a full literature search:
- Pass forward the Stage-1 output (
food-research/food-deep-research: validated sources, evidence matrix / synthesis, grading, gap list) as the review's field-knowledge foundation; don't re-fetch what Stage 1 already validated. - Top it up with the
food-researchquick briefstream to find the field's key review publications and read those reviews in full (state of the art, consensus vs contested, standard methods, benchmark ranges). - Knowledge base = Stage-1 knowledge + key-review knowledge. The manuscript's own cited sources are still read and audited (Pathway A), reusing Stage-1 records where the source was already retrieved.
If Stage 1 did not run (entry at Stage 2/3 with a finished draft), there is
nothing to inherit β food-review builds its knowledge base the full way
(Pathway A + B). Using food-review standalone is unaffected by this rule. See
food-review/agents/knowledge_builder.md.
Review & revision defaults (Stage 3 onward) β explicit authorization
Default: one reviewβrevise round, then FINALIZE. Do not auto-run a second round or silently rewrite the author's original Word file.
Ask once (consolidate) before Stage 4 when a .docx (or equivalent) is in play:
- Second review round? Default no. Run Stage 5 (RE-REVIEW) only if the author explicitly authorizes it. Hard cap remains 2 rounds total.
- Edit the original Word with Tracked Changes? Default no. Only modify the original manuscript in place when the author explicitly authorizes it. Without that authorization: deliver a revised copy (or a change log / marked draft) plus the Review & Response Report β leave the original file untouched.
Deliverables β exactly two files, both Word (.docx)
The pipeline produces one manuscript and one report. Never a separate review report and a response letter; never Markdown.
-
One manuscript file (
.docx). Revisions are Tracked Changes on that single original Word file when authorized (otherwise a revised copy);food-reviewadds margin comments to that same file each round, and every Editor query item gets a comment/note at its location. -
One
Review_and_Response_Report_<slug>_<date>.docxβ the same document evolving through the stages, in the canonicalfood-review/references/report-format.mdstructure (Parts A/B/C; stable issue IDs; precise locations; colour legend):- Stage 3 (REVIEW) β
food-reviewwrites the reviewer feedback (black): every concern with its ID and location, plus the editorial decision. - Stage 4 (REVISE) β
food-paperupdates that same file in place, filling each item'sResponse (<type>)(blue) = Tracked edit Β· Editor query Β· Recommendation Β· Residual, with what was actually done and where. - Stage 5 (RE-REVIEW), if authorized β append
R2-*items to the same file.
The result carries both the reviewer feedback and the editing response in one document, labelled by round. Do not create a separate reviewer report, and do not create a standalone response letter β this report is the response. (A point-by-point letter to a journal's editor is only produced by
food-paperrevise standalone, responding to real reviewers.) - Stage 3 (REVIEW) β
Markdown is a working format only: convert with Pandoc (pandoc report.md -o report.docx) or the docx skill, and never claim a .docx you did not produce.
Run scripts/privacy_scan.py on every file before delivery.
See food-review/references/report-format.md,
food-review/references/word-review-comments.md, and
food-paper/references/revision-response.md.
Workflow
flowchart TD
A[Project in] --> R[intake_router<br/>state + materials + journal + entry stage]
R --> J[journal-selector]
R --> S1[Stage 1 RESEARCH<br/>food-research / food-deep-research]
S1 --> G1{quality_gate<br/>evidence sufficient?}
G1 -- yes --> S2[Stage 2 WRITE<br/>food-paper -> food-figure]
G1 -- no --> S1
S2 --> G2{quality_gate<br/>integrity + journal compliance}
G2 -- pass --> S3[Stage 3 REVIEW<br/>food-review panel]
G2 -- fail --> S2
S3 --> G3{{author decision<br/>mandatory gate}}
G3 -- revise --> S4[Stage 4 REVISE<br/>food-paper revise]
S4 --> G4{{author: second round?}}
G4 -- no / default --> S6[Stage 6 FINALIZE<br/>format + Word export]
G4 -- yes authorized --> S5[Stage 5 RE-REVIEW<br/>food-review re-review]
S5 -- issues + author continues --> S4
S5 -- accept --> S6
G3 -- accept --> S6
S6 --> OUT[Submission-ready manuscript]
Entry points (mid-pipeline)
intake_router detects where to start: a topic/dataset β Stage 1; a full draft β
Stage 2 or 3; reviewer comments in hand β Stage 4. It never restarts completed
stages unnecessarily. At Stage 3/4 it records whether the author has authorized
a second round and/or in-place tracked changes on the original Word file.
References (load as needed)
references/mode-advisor.mdβintake_routeruses it to pick entry stage, research flavor, and skills.references/pipeline-state-machine.mdβ states, transitions, entry points, loop caps.references/quality-gates.mdβ the per-stage gate criteriaquality_gateapplies.
Rules
- Journal first, journal throughout: re-flow references and re-check limits whenever the target journal changes.
- Gates are real:
quality_gatecan send a stage back; integrity and review gates cannot be skipped, and the review decision is always the author's. - One round by default: do not auto-run RE-REVIEW; a second round needs explicit author authorization (hard cap 2).
- Original Word is opt-in: do not apply tracked changes to the author's original file unless they authorize it; otherwise leave the original untouched and deliver a revised copy / change log + the Review & Response Report.
- Food-science standards everywhere: n and error type, validated methods, panel details, ethics/food-safety β enforced at every write/review gate.
- Don't duplicate work: the specialist skills own their subagents; the pipeline sequences and gates them, it does not re-implement them.
- Two deliverables, both
.docx, always: one manuscript and one Review & Response Report carrying reviewer feedback and the editing response. Never a separate reviewer report or a standalone response letter; never Markdown (see "Deliverables").