AGENT SKILL

background-jobs

Orchestrate a long KB operation — migration, archive scan, enrichment batch, research backfill — as batched, checkpointed, resumable work with sample-before-bulk gates, and save/restore resumable context so a job survives across sessions. Trigger on 'run this KB job in batches', 'long/background KB job', 'save/resume KB progress', 'checkpoint this job'. Absorbs context-checkpoint. Recurring-schedule design lives in references/automation.md; the actual ingestion is done by ingest or media-ingest.

适用职业人力资源
License 许可
MIT
最近更新
2026-11-11
Stars
★ 1
Forks
0

01 前言 Front Matter

name
background-jobs
version
0.2.0
mutating
true
triggers
[ "run this kb job in batches", "long background kb job", "checkpoint this kb job", "resume this kb job" ]
description
Orchestrate a long KB operation — migration, archive scan, enrichment batch, research backfill — as batched, checkpointed, resumable work with sample-before-bulk gates, and save/restore resumable context so a job survives across sessions. Trigger on 'run this KB job in batches', 'long/background KB job', 'save/resume KB progress', 'checkpoint this job'. Absorbs context-checkpoint. Recurring-schedule design lives in references/automation.md; the actual ingestion is done by ingest or media-ingest.
allowed-tools
[ "Read", "Write", "Edit", "Bash" ]
disable-model-invocation
false

03 SKILL.md 正文

Background Jobs

Contract

  • Long jobs are batched, checkpointed, resumable, and validated after each batch; bulk writes only follow a passing sample.
  • Checkpoints capture enough state to resume without rescanning everything.
  • Secrets, raw private content, and long diffs are never stored in checkpoints.
  • Mutating skill: it may write checkpoint files and batch outputs, but it must stop before any strategy change that would widen scope, overwrite many pages, or discard failed work.

Intake And Modes

  • Treat $ARGUMENTS as the job goal plus optional vault root, source set, batch size, and resume checkpoint.
  • Quick mode: inspect or restore an existing checkpoint and report next safe action.
  • Standard mode: run a sampled batch, checkpoint state, validate, and summarize remaining work.
  • Deep mode: plan or execute a multi-batch migration/backfill with retries, validation gates, and resume instructions.
  • Use ask-user before changing batch scope, deleting checkpoint history, or continuing after repeated validation failure.

Evidence Requirements

  • Inspect the current checkpoint, target file list, changed files, and last validation output before resuming.
  • For migrations or enrichment backfills, verify the source map and sample output before bulk writes.

Workflow

  • Plan batch size, ordering, retry policy, and stop conditions.
  • Run a 3-5 item sample and inspect the output before bulk.
  • Checkpoint before and after each batch with checkpoint (branch, batch ids, files changed, validation, blockers, next step).
  • Validate citations, frontmatter, graph links, and indexes between batches.
  • On restore, load the latest checkpoint, verify current state, and resume from the next safe batch.

Operating System Backing

This skill is backed by the shared deterministic KB operations harness. Use these commands for audits, CI fixtures, and repeatable agent runs:

  • python3 "${CLAUDE_PLUGIN_ROOT}/scripts/kb_ops.py" checkpoint
  • python3 "${CLAUDE_PLUGIN_ROOT}/scripts/kb_ops.py" dashboard

Output Format

  • BACKGROUND JOB
  • Status: DONE, DONE_WITH_CONCERNS, BLOCKED, or NEEDS_CONTEXT.
  • Batch status, checkpoint path, completed, remaining, validation, blockers, next batch.
  • Artifact path: checkpoint at .kb/checkpoints/<YYYYMMDD>-<slug>.md or the user-specified checkpoint path.

Anti-Patterns

  • Running 100 items before inspecting the first 3.
  • Losing progress state between sessions, or storing secrets/transcripts in checkpoints.

04 同仓库更多 Skills

weisberg
weisberg/agile_agentic_analytics

metric-reconciliation

Use when two reports disagree, a KPI needs reconciliation across sources, or actuals need to be compared with a plan, forecast vintage, or prior methodology. Align population, coverage, calendar, attribution, and observation windows before computing gaps. Identify missing slices and preserve unresolved residuals.

★ 1
weisberg
weisberg/agile_agentic_analytics

analysis-handoff

Use to make a recurring SQL analysis reproducible, hand it to another analyst, or check whether an analysis bundle changed. Capture the exact query, metric definitions, inputs, source vintages, checks, and rerun steps in a portable folder without requiring a copy of row-level results.

★ 1
weisberg
weisberg/agile_agentic_analytics

conversation-ingestion

File a conversation transcript or notes from an interview, research discussion, or support exchange. Preserve the raw material, capture decisions and actions, and update participant and company timelines. Trigger on 'process this conversation', 'ingest this conversation', 'file this transcript', or 'conversation notes to KB'. For standalone media use media-ingest. For source routing use ingest.

★ 1
weisberg
weisberg/agile_agentic_analytics

minimal-skill

Minimal shared skill fixture for marketplace renderer and validator examples.

Skill与智能体开发
★ 1
weisberg
weisberg/agile_agentic_analytics

roadmap

Use this skill when the user wants a product roadmap, initiative sequencing, Now/Next/Later plan, quarterly roadmap, release theme map, product strategy-to-roadmap translation, or executive roadmap narrative. Trigger on phrases like "build a roadmap", "roadmap these initiatives", "what should be now next later", "sequence this backlog", "quarterly product roadmap", "theme-based roadmap", or "plan the next two quarters". Do NOT trigger for drafting or reviewing a single PRD (use prd-writer or prd-review), converting a PRD into an agentic PLAN.md (use prd-to-plan), or scoring/ranking a set of options without a time horizon (use prioritization).

产品经理
★ 1
weisberg
weisberg/agile_agentic_analytics

prioritization

Use this skill when the user wants to rank, score, triage, or compare product opportunities, features, PRD requirements, backlog items, roadmap candidates, or initiatives using RICE, impact-effort, confidence, reach, value, effort, risk, or tradeoff analysis. Trigger on phrases like "prioritize these features", "rank this backlog", "RICE score", "impact effort matrix", "what should we build first", "compare these initiatives", or "stack rank product bets". Do NOT trigger for a time-based roadmap (use roadmap), writing or reviewing one PRD (use prd-writer or prd-review), turning a PRD into an agentic plan (use prd-to-plan), or analyzing experiment results (use ab-testing or experimentation skills).

产品经理
★ 1