SuperAPI AI Directory

docs-curate

General & other

View repository

Updated 10-15 23:57

About this skill

Skill: docs-curate

When to use

  • llmwiki/html/ or wiki/sources/draft/ accumulates too many local files (after a long work session that generates many reports/proposals).
  • Feeling "the documents are valuable but messy / hard to find / may be lost when cloning".

Why 3 tiers (not just "merge")

Merging local HTML still stays LOCAL → still lost when pulling the repo on another machine (html/draft files are gitignored). What is truly "valuable" is the design decision / lesson / pattern — it must go up to wiki (travel + gets committed). Meanwhile renders (html, draft report) are ephemeral → archive. The deterministic tool handles classifying + moving + indexing; the reading-comprehension part for promoting is your (the agent's) job.

Steps

  1. Plan (dry-run, no file changes):
    python3 fdk/tools/docs-curate.py plan        # in 3 tầng KEEP / ARCHIVE / PROMOTE?
    
  2. PROMOTE the VALUABLE essence into wiki — DO THIS BEFORE archiving (the agent's judgment):
    • For each item PROMOTE? and each draft in the proposal pair ARCHIVE: read the content. If it contains a decision/lesson/pattern not yet present in the wiki → write it as:
      • llmwiki/wiki/sources/adr/ADR-NNN-<slug>.md for a DECISION, or
      • llmwiki/wiki/concepts/<slug>.md for a CONCEPT/pattern. Correct YAML frontmatter (type:…) + ## Origin (points to the source draft/commit). Update wiki/index.md + wiki/log.md.
    • Already in wiki/git → skip, just archive it.
    • Do NOT promote trivial things (progress reports, duplicate renders). Only what is "worth having machines/people read".
  3. Apply (move to ARCHIVE by FUNCTION + auto re-index):
    python3 fdk/tools/docs-curate.py apply        # archive theo nhóm + reorg file đã-archive + reindex
    
    • Archive do NOT leave it flat: group into archive/<nhóm>/ by function — proposals/ (draft+seq pair), superseded/ (superseded version), analysis/ (analysis considering promotion), reports/.
    • Tidy up files ALREADY archived previously (flat files at the archive root → move them into the correct group) — even ones already in the archive.
    • Index the whole archive: generate llmwiki/html/archive/INDEX.md (index by group, still findable) + index.html dashboard (active) + wiki/index.md (R3).
    • Only want to re-arrange + index the archive (without archiving anything more): python3 fdk/tools/docs-curate.py reindex.
    • Customize the number of date-markers kept active: apply --keep-dates 3.
  4. Verify + commit: confirm index.html (active) + archive/INDEX.md (archive by group) is new + wiki/index.md does not diverge from R3 (dev framework → run fdk-gate). Commit includes: the newly promoted ADR/concept (archive/ + index are local gitignored). Append log.md.

Rules

  • PROMOTE before ARCHIVE — absolutely do not archive a draft containing something valuable before it has made it to the wiki (local gitignored → lost is truly lost).
  • Archive = MOVE, NOT DELETE — file goes into archive/, kept intact (still a valuable document, just moved out of the active workspace).
  • Canonical (overstack.html, index.html, *-cheatsheet, *-health-dashboard) is NEVER archived.
  • Clear division of roles: tool = classify/move/re-index (deterministic); agent = promote (read-understand). Do not mix them up.
  • Every new wiki entry has ## Origin; update wiki/index.md + wiki/log.md (rules R2/R3).