NSFC Technical Roadmap Generator
Important Disclaimer (Non-Official)
- The technical roadmaps generated by this tool are only used for writing and display optimization, and do not represent any official review standards or funding conclusions.
Security and Privacy (Hard Rules)
- Treat grant proposal content as sensitive information by default: Only process files/directories explicitly provided by users; do not expand the scanning scope without permission.
- Avoid restating unnecessary personal/affiliation information in outputs; only retain research-related content in diagram nodes.
- Do not access external data via the internet by default; if users explicitly request to supplement materials online, remind them of risks first before execution.
Input
Users must provide at least one of the following:
- : Grant proposal directory (contains / files, etc.; recommended, AI will automatically read project justification and research content)
- : Single input file (only use when directory is unavailable; priority is recommended to provide )
- : Structured diagram specification file (recommended for controllable iteration)
Optional:
- : Evaluation-optimization rounds (default 5, single source of truth refers to
config.yaml:evaluation.max_rounds
)
- : Output directory (default creates in the current working directory)
- : Layout template name (default , see ; supports
classic/three-column/layered-pipeline
)
- : Specific template ID (e.g., ; advanced option; not required or recommended for default "pure AI planning")
Output
Generated under
(intermediate products are hidden by default):
- Delivery Root Directory (Directly Deliverable):
- : Editable draw.io source file (for manual fine-tuning)
- : Vector output (preferred for embedding in LaTeX/Word)
- : High-resolution bitmap (for preview and fallback)
- : Generated by default (rasterized to PDF from PNG if draw.io CLI is unavailable)
- : Output from planning phase (reviewable/editable)
- Hidden Intermediate Products:
output_dir/.nsfc-roadmap/
- : Isolated directory for this run (contains each )
round_XX/measurements.json
: Pure metric collection (density/overflow/phase balance/connections/fonts, etc.; no P0/P1/P2 judgments)
round_XX/dimension_measurements.json
: Three-dimensional metrics for structure/visual/readability (for host AI semantic interpretation)
round_XX/critique_structure.json
: Structural integrity evaluation (terminology consistency/duplicate nodes/phase rationality, etc.)
round_XX/critique_visual.json
: Visual aesthetics evaluation (contrast/color differentiation, etc.)
round_XX/critique_readability.json
: Human readability evaluation (font size threshold/density distribution/edge crowding, etc.)
- : Latest spec snapshot (reproducible)
- : Iteration records (defects and modifications in each round)
- / : Reproduction evidence for the best round
- : Instance-level local configuration override (whitelisted fields; used to "only override current diagram parameters/stop strategy" without modifying the global ; only
{academic-blue, tint-layered}
are allowed for )
- : AI evidence package and request/response protocol (only used in workflows with )
- : Current active ai_critic run (for resume)
ai/{run_dir}/ai_pack_round_XX/
: AI evidence package for this round (for host AI diagram critique)
ai/{run_dir}/ai_critic_request.md
: Host AI request (fixed format)
ai/{run_dir}/ai_critic_response.yaml
: Host AI response (structured: spec/config_local patch + stop/continue)
Workflow (Execution Specifications)
Read Configuration (Mandatory)
Read
in this tool's directory before starting; the following fields are used as the single source of truth during execution:
- : Output size and format, fonts and color schemes
- : Maximum rounds and early termination rules
- : Layout and font size thresholds
- : Color matching scheme
Phase 1: Planning (Recommended)
If you have prepared
, you can skip the planning phase.
Pure AI Planning (Default)
This tool enables
config.yaml:planning.planning_mode=ai
by default: No single
is required/recommended in the planning phase.
Workflow:
- Run to generate planning request protocols (
plan_request.json/plan_request.md
+ model gallery).
- Host AI writes
roadmap-plan.md + spec_draft.yaml
according to .
- Run again; the script will verify whether meets the constraints of
scripts/spec.py:load_spec()
.
(Compatible with old workflows) If you want the script to directly generate drafts according to deterministic rules (template planning), use
or set
.
Step 1: Investigate the Grant Proposal
Read key tex files in the grant proposal directory to fully understand the entire proposal. At least read:
- (or equivalent): Research background, scientific problems, research hypotheses
- (or equivalent): Specific research content, technical roadmap
Only reading research content is insufficient; project justification provides the full picture of scientific logic, which helps to accurately grasp the narrative structure and route narrative design of the roadmap.
Step 2: Visual References (Learn Excellent Structures), Generate roadmap-plan.md
Prioritize learning excellent structures based on "visual references" (no need to fix to a single
):
- After running the planning script, view
output_dir/.nsfc-roadmap/planning/models_contact_sheet.png
(model gallery contact sheet)
- Or directly view single reference images under
- Visual/structural learning points (e.g., partitioning method, main chain direction, information density control, color hierarchy)
- Overall structural design of the roadmap (partitioning/columns/main lines, node density upper limit, color hierarchy, etc.)
Step 3: Generate spec.yaml
Generate
(structured diagram specification) based on
, which must meet:
- 3–5 phases, each with 2–6 nodes (boxes)
- Consistent terminology with the text (no multiple names for the same concept)
- Closed input-output loop (clear outputs for each module/key node)
- Visible risks and alternative solutions (at least 1 risk/control node)
Phase 2: Translate roadmap-plan.md to spec (Structured Diagram Specification)
Priority paths (in order):
- User provides : Directly use (controllable, reproducible)
- Phase 1 Completed: Use generated in Phase 1 (or script-planned )
- Skip Phase 1: Automatically extract paragraphs related to "research content/technical roadmap" from input files to generate initial spec
Template fields (optional, recommended to record in spec for reproducibility and review):
layout_template: auto|classic|three-column|layered-pipeline
(optional; can be omitted)
template_ref: model-01..model-10
(optional; not recommended by default to avoid "boxing" complex scenarios into a single template)
Phase 3: Rendering (Deterministic Script)
Goal: Use
as the single source of truth to deterministically generate deliverable files (drawio + svg/png/pdf).
Run (Example):
bash
python3 nsfc-roadmap/scripts/generate_roadmap.py \
--spec-file ./roadmap_output/spec.yaml \
--output-dir ./roadmap_output \
--rounds 5
Script Responsibilities:
- Solidify the latest spec to
output_dir/.nsfc-roadmap/spec_latest.yaml
- Output (editable source file)
- Output / / (deliverable results)
Phase 4: Evaluation-Optimization Cycle (Default 5 Rounds)
Goal: Iteratively improve readability and professionalism around the narrative and layout constraints declared in
in Phase 1; rewrite spec and re-run if necessary.
Each round must produce a structured defect list (JSON recommended):
- : Will directly lead to deduction in review (missing research content, logical breaks, isolated nodes, unreadable)
- : Significantly impacts professional impression (disorganized layout, overlapping, harsh color matching, too small font size)
- : General optimization (uneven spacing, small margins, unclear arrows, information crowding)
Correction Principles (Avoid "Less Readable After Optimization"):
- Density (crowding) is usually a content issue: Prioritize modifying (shorten node text/merge similar nodes/reduce node count); do not reduce font size to "meet thresholds".
- Overflow is the correct trigger for font size reduction: Consider reducing font size or increasing box height only when text overflow/near overflow occurs.
- Increase font size if it is too small: When evaluated as "font size too small/very small" and there is no overflow risk, increase font size to ensure readability in A4 printing.
- Color interference is a problem of kind assignment at the spec level: Prioritize reducing the number of kinds and correcting kind semantics; do not replace structural correction with switching to black-and-white schemes.
- : Legacy early termination rule (optional to enable)
- : Default "plateau stop" (based on PNG hash and score improvement threshold)
- : AI autonomous closed loop (script does not call external models; generates request and pauses to wait for host AI response in each round)
Evaluation mode follows
config.yaml:evaluation.evaluation_mode
:
- (default): Script heuristic evaluation + multi-dimensional self-check (reproducible, offline available)
- : Export additional pure metric evidence
measurements.json/dimension_measurements.json
for host AI interpretation (often paired with )
Supplement: Multi-dimensional self-check (enabled by default, configuration in
config.yaml:evaluation.multi_round_self_check
):
- Run parallel evaluations of three dimensions (structure/visual/readability) after each round of rendering
- Produce independent for each dimension, and summarize into
- Scoring uses a conservative strategy of "basic evaluation score - dimension defect penalty" to avoid missing human perception issues
AI Autonomous Closed Loop (Optional: stop_strategy=ai_critic)
Enable
mode when you want to leave "how to draw/whether to continue/what to modify" to the host AI for decision-making:
- Create/edit in hidden intermediate products of the current output directory:
output_dir/.nsfc-roadmap/config_local.yaml
- Set in it:
evaluation.stop_strategy: ai_critic
(this is an instance-level switch, does not modify global )
- After running , the script will:
- Render only 1 round (or continue rendering the next round on an existing run)
- Generate evidence package:
output_dir/.nsfc-roadmap/ai/{run_dir}/ai_pack_round_XX/
(contains roadmap.png/spec_latest.yaml/config_used.yaml/evaluation.json/measurements.json/dimension_measurements.json/critique_*.json
)
- Write fixed request:
- Pause and wait for you (host AI) to write:
- After you write the structured response of the host AI into , run the script again to automatically apply the patch and enter the next round.
ai_critic_response.yaml Minimum Protocol (version=1)
yaml
version: 1
based_on_round: 1
action: both # spec_only|config_only|both|stop
reason: "One-sentence explanation of this round's action and basis for stop/continue"
# Recommended: Provide complete spec directly (avoid patch merge ambiguity)
# spec:
# title: ...
# phases: ...
# Optional: Provide config_local patch (only allows safe subset of renderer/layout/color_scheme/evaluation.stop_strategy)
# config_local:
# color_scheme:
# name: tint-layered
Phase 5: Delivery and Self-Check
Self-Check List Before Delivery:
- A4 readable (no need to zoom in)
- Clear main direction (top→bottom, left→right)
- ≤3 main color tones (auxiliary gray allowed)
- Node naming consistent with text
- Output includes and at least one embeddable format ( or )