agentsclimarketplace

Kb postmortem

Skill Iabstergo1/pdf-to-study-kb/.agents/skills/kb-postmortem

对话式 agent(Claude Code / Codex)驱动的本地知识库编译器:把 PDF/DOCX/PPTX/Markdown 增量编译进一个去重、互联、可复现的 Obsidian 学习知识库。

Install
npx -y skills add Iabstergo1/pdf-to-study-kb --skill kb-postmortem

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Post-publish retrospective on one ingested source — collect deterministic proxy metrics (ingest-stats), refresh the failure-signal backlog with increment context (snapshot the old backlog.yaml BEFORE skill-mine, then diff), read the digest routing deviations, and write one standardized report with recommendations only (skill-evolve triggers, gate/truth updates, proposals-resolve dry-run commands). Use when the user says "postmortem this ingest / 复盘这次入库 / how did this book's ingest go / ingest retrospective for <source>". Only for a source already published; "run a KB QA / audit coverage" is kb-qa, "semantic health check" is wiki-lint-semantic, and "distill this failure into the skill" is skill-evolve — none of those trigger this.

SKILL.md

6.1 KB, as published. Nobody here has run it

kb-postmortem — post-publish ingest retrospective (report-only)

After a source publishes, turn the manual "lessons learned" pass into a standard step: deterministic proxy metrics + digest deviations + backlog delta → one report. Recommendations only — every follow-up action (skill-evolve, gate edits, proposals-resolve --apply) is decided by the human. Project truth: AGENTS.md.

1. Triggers / Non-triggers

  • Triggers: "postmortem <source>", "复盘这次入库", "how did this ingest go", "ingest retrospective / review this book's ingest".
  • Non-triggers (never fire):
    • "run a KB QA / audit coverage / spot-check evidence / run the Q-chain" → kb-qa.
    • "semantic health check / contradictions / L4 / Q2 added value" → wiki-lint-semantic.
    • "distill this failure into the skill / evolve a skill / handle backlog item N" → skill-evolve (this skill only recommends it).
    • "work the review queue item by item" → kb-review.
    • the source is not published yet → finish the ingest (lint gate) first; this skill never runs mid-ingest.

2. Inputs

  • source_id — must show lint/published in status.
  • Proxy metrics via ingest-stats (windows, stage durations and reruns, lint failures ≈ rollbacks, pages estimate, violations by kind). Token/cost numbers are not available — never invent them.
  • pipeline-workspace/staging/<src>/digest.md: the per-chapter content-routing table + logged deviations.
  • The old pipeline-workspace/skill-evolution/backlog.yamlread and snapshot it BEFORE running skill-mine: skill-mine overwrites the whole file, so mining first destroys the increment context.
  • Residue in wiki/Review-Queue/ for this source.

3. Outputs

One standardized report pipeline-workspace/reports/postmortem/<src>-<YYYY-MM-DD>.md with four sections:

  1. Proxy metrics (from ingest-stats; honest scope — no invented token/cost data).
  2. Digest routing deviations (from digest.md; absent → marked degraded).
  3. Backlog delta (old snapshot vs refreshed) + skill-evolve trigger recommendations (recurring signatures with count >= 2 only).
  4. Gate / AGENTS.md update recommendations.

Plus a suggested-commands list: proposals-resolve dry-runs for signatures this ingest's fixes covered. Recommendations only — this skill never executes them.

4. Dependencies

  • CLI: status, ingest-stats, skill-mine; proposals-resolve appears in suggestions only (human confirms and runs --apply).
  • staging/<src>/digest.md (may be absent for md fast-path sources → degraded, noted in the report).
  • Truth: AGENTS.md. No new LLM judgement enters the CLI.

5. Persisted artifacts

  • The report pipeline-workspace/reports/postmortem/<src>-<YYYY-MM-DD>.md (the old-backlog snapshot is embedded in its delta section).
  • No vault page is written; no DB row is changed (skill-mine only rewrites the derived backlog.yaml).

6. CLI commands

python scripts/pipeline.py status                                  # W1: confirm lint/published
python scripts/pipeline.py ingest-stats --source <src> --json      # W2: proxy metrics
# W3: FIRST copy/read pipeline-workspace/skill-evolution/backlog.yaml (old state), THEN:
python scripts/pipeline.py skill-mine                              # refresh (overwrites backlog.yaml)
# suggested only — never auto-run by this skill:
python scripts/pipeline.py proposals-resolve --signature <kind> --source <src>   # dry-run first

7. Workflow

Sub-unitInputOutputAcceptancePersistedFailure stop
W1 confirm publishedstatussource is lint/publishedotherwise stopnot published
W2 metricsingest-stats --jsonmetrics sectionnumbers come from the state db, none inventedreport draftnon-zero exit
W3 backlog deltaold backlog.yaml snapshot → skill-mine → diffdelta sectionold file snapshotted before miningsnapshot in reportmine fails
W4 digest deviationsstaging/<src>/digest.mddeviations sectionabsent → degraded note, continuereport draft
W5 write reportW2–W4reports/postmortem/<src>-<date>.mdfour sections presentthe report
W6 recommendationsdelta + deviationsskill-evolve / gate / proposals-resolve suggestionscommands are suggestions only, count>=2 rulereport section

8. Failure stops / recovery

  • Source not lint/published → stop and point to the finishing gate (lint) or kb-review for pending violations.
  • ingest-stats exits non-zero → stop, report the error verbatim.
  • digest.md missing (md fast-path source) → do not stop; mark the deviations section degraded.
  • Never run proposals-resolve --apply, skill-adopt, or any vault/DB write from this skill.
  • Recovery: the report is idempotent — re-running the retrospective overwrites the same day's file.

9. Acceptance criteria

  • Report exists at pipeline-workspace/reports/postmortem/<src>-<YYYY-MM-DD>.md with the four sections.
  • The old backlog was snapshotted before skill-mine ran (the delta section shows old vs new).
  • Zero vault writes, zero DB changes; proposals-resolve appears only as suggested dry-run commands.
  • skill-evolve recommendations name only recurring signatures (count >= 2).

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.