Purpose
Perform a "structural restructuring plan" on the specified Markdown study notes, and generate a sibling "actionable framework md document" so the user can manually copy the original text block by block to complete the migration.
Core constraints:
- Read-only: headings + a small amount of content (used to determine boundaries)
- Do not modify the body text, do not move the body text
- Deliverables: checklist + framework (scaffold) file content/path
Dependencies
- skill: planning-with-files
- The execution steps and deliverable structure must follow the skill's process skeleton (Read → Diagnose → Propose → Map → Deliver)
- skill: learning-notes-organizer
- The restructuring principles must follow the skill (redraw boundaries, classify and reorganize, streamline colloquial language, add guiding comments, connect basics → advanced)
- Still comply with the overall constraint of "deliver only the checklist / do not modify the body text"
Inputs
- target_file: <path/to/file.md>
- scope_policy (default: headings + small content)
- Extract all headings (H1-H6)
- Under each heading, read at most the first N lines or 1-3 paragraphs (only used to determine topic attribution)
- Reading the full text is prohibited; rewriting the body text is prohibited
- scaffold_suffix (default): "-To be organized"
- scaffold_same_dir (default): true
- scaffold_overwrite_policy (default): "safe"
- safe: if the output filename already exists, append "-v2"/"-v3" to the end of the filename (or add a timestamp)
- optional: domain_hint (e.g., netty / node networking / RPC / TCP)
Outputs
- Checklist (conversation output)
- New planned heading structure (including guiding comments)
- Old heading → new heading mapping table (including action labels)
- Renaming suggestions (global summary)
- Questions to be confirmed (a small number)
- Suggested migration order (operational steps)
- Scaffold Markdown Content (complete framework md content)
- Write path rules:
- dir = dirname(target_file)
- base = basename(target_file, ".md")
- out = dir + "/" + base + scaffold_suffix + ".md"
- If the file cannot be written automatically: you must still output "the path it should be written to + the complete md content", and the user saves it to that path themselves.
- Write path rules:
Procedure (must be expressed using planning-with-files)
Step 1 — Read (limited)
- Extract the heading tree (hierarchical structure: H1-H6)
- For each heading, extract only the small amount of content allowed by scope_policy, used to determine:
- Which topic domain it belongs to
- Whether it is duplicated/too broad/too fragmented
- Whether it should be merged/split/moved
- Do not output body-text excerpts (unless extremely short and used to locate a problem, and no more than a few lines)
Step 2 — Diagnose
- Mark and explain (with brief bullets):
- Duplication/overlap
- Too broad/too fragmented
- Unreasonable order (missing prerequisite concepts or advanced content appearing too early)
- Nonstandard heading naming (colloquial, unsearchable, vague)
- Missing modules (e.g., concepts/mechanisms/practice/pitfalls/optimization/source code)
Step 3 — Propose New Outline (from basics to advanced)
- Provide a new 2-4 level heading structure (suggested)
- Each first-level/second-level heading must have 1 line of "guiding comment: after reading you will..."
- Structural priority:
- Concepts and background
- Core mechanisms/models
- Practice and patterns
- Common pitfalls/troubleshooting
- Performance optimization/principles/source code (if applicable)
Step 4 — Mapping (old → new)
- For each old heading, give its destination: new heading path
- Tag the action label (choose exactly one):
- KEEP / MOVE / MERGE / SPLIT / RENAME / DROP / TBD
- Merge/split must state the reason and destination in the notes
Step 5 — Rename Suggestions
- Only give suggestions for old headings that "really need renaming"
- Do not include ones that do not need renaming in this list (keep it clean)
- Naming suggestion principles:
- Searchable (standard terms)
- Short, clear, well-defined boundaries
- Avoid weak titles such as "Miscellaneous/Notes/Some Thoughts"
Step 6 — Generate Scaffold File (operational md)
- Generate the -待整理.md framework content, placed in the same directory as target_file
- The framework file must:
- Top metadata (source file, scope, rules)
- Main body: new outline structure (with guiding comments)
- Generate a "migration block" under each new heading (see Scaffold Format)
- Appendix: old→new mapping table, renaming suggestion summary, issues to confirm, migration order suggestions
Step 7 — Deliver
- In the conversation output:
- Checklist(A-E)
- Output file path + complete Scaffold Markdown content
Output Format (Checklist in chat)
A) New planned heading structure (suggested outline)
- H1 ...
- H2 ... (guiding comment: ...)
- H3 ...
- H2 ... (guiding comment: ...)
B) Old heading → new heading mapping table
| Old heading (including hierarchy) | Action (KEEP/MOVE/MERGE/SPLIT/RENAME/DROP/TBD) | New heading path | Notes |
|---|
C) Renaming suggestions (global summary, list only those needed)
旧标题->建议标题(Reason: more standard/shorter/more searchable/more accurate boundaries)
D) Issues to confirm (maximum 3-7 items)
- ...
E) Migration order suggestions (operation steps)
- First create the new structure skeleton (using Scaffold)
- Then copy the body text block by block into the corresponding migration blocks according to the mapping table
- Finally handle cross-references/duplicate paragraphs/terminology consistency all at once
Scaffold Markdown Format (must follow exactly)
File name: -待整理.md
Goal: let the user "open it and process it block by block", with each block having: source old heading + (optional) renaming suggestion + migration points + paste area.
Scaffold file structure
All of the following are H1 level
- Title + metadata
- New outline and migration workspace (one migration block per new heading)
- Appendix A: Old→new mapping table (complete)
- Appendix B: Renaming suggestion summary (complete, list only those needed)
- Appendix C: Issues to confirm
- Appendix D: Migration order suggestions
Migration Block Template (for every new section)
- Must include "source old heading (multiple allowed)"
- "Renaming suggestion" paragraph: appears only when this block has old headings that need renaming; otherwise omit the entire paragraph
- Must include "migration points" and "paste area"
The template is as follows (generate section by section):
Template
<new heading>
Guiding comment: <one sentence>
Source old headings (multiple allowed, may be merged):
- (<action>)
<旧标题1> - (<action>)
<旧标题2> - (<action>)
<旧标题3>
Renaming suggestions (list only old headings that need renaming):
<旧标题2>-><建议标题2>(Reason: ...)<旧标题3>-><建议标题3>(Reason: ...)
Migration points (pay attention to when copying):
- <point 1>
- <point 2>
- <point 3>
⬇️ Paste the original text content below ⬇️
(copy the original text here)