wiki-bfs
Run breadth-first research on a topic and route approved wiki changes through /wiki-ingest.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 6
- Forks
- 0
01 前言 Front Matter
- name
- wiki-bfs
- description
- Run breadth-first research on a topic and route approved wiki changes through /wiki-ingest.
03 SKILL.md 正文
/wiki-bfs — Breadth-First Research + Wiki Ingest
This skill researches, deduplicates, and prepares candidate content. All writes
to wiki pages, directories, indexes, sources, or logs must go through
/wiki-ingest; this workflow never edits the wiki directly.
Usage
/wiki-bfs <topic> [--layers N] [--ingest] [--wiki <wiki_dir>]
Performs N-layer breadth-first search on a topic and prepares candidate source pages for /wiki-ingest.
Default: 2 layers. Use --layers N for N layers.
--wiki <wiki_dir> overrides the default wiki location (~/llm_wiki/wiki). The raw/ directory is derived as $(dirname <wiki_dir>)/raw.
Execution
Phase 1: Parse arguments
TOPIC= first positional arg (required)N= from--layers Nflag, default 2INGEST= present if--ingestflag setWIKI= from--wiki <path>flag, default$HOME/llm_wiki/wiki
Phase 2: Resolve wiki path
# Check for local wiki default (project-level override)
if [ -f ".wiki-default" ]; then
WIKI=$(cat .wiki-default)
elif [ -f "$HOME/.wiki-default" ]; then
WIKI=$(cat "$HOME/.wiki-default")
else
WIKI="$HOME/llm_wiki/wiki"
fi
# --wiki flag always wins over .wiki-default
if args contain "--wiki <path>"; then
WIKI="<path>"
fi
# Read existing pages for deduplication only; `/wiki-ingest` owns creation.
Phase 3: BFS Research (N layers)
Launch parallel research agents per layer. Each layer discovers new topics that become the next layer's research targets.
Layer architecture:
Layer 0 (seed): <TOPIC>
Layer 1: Explore <TOPIC>'s primary systems/frameworks/people
Layer 2: Explore Layer 1's supporting infrastructure, alternatives, critics
Layer N: Explore Layer N-1's ecosystem, downstream, upstream
Research areas per topic (auto-detected):
- Governance/constraints/policy → research: governance patterns, fail-closed systems, policy engines
- multi-agent/agent coordination → research: orchestration frameworks, evidence systems, workflow engines
- coding agents/SWE → research: benchmarks, verification, skill libraries
- workflow/durability → research: workflow engines, event sourcing, execution models
For each layer:
- Search web for the topic's canonical projects, papers, people
- Fetch accessible pages (arxiv, github readmes, official docs)
- Extract entity names (people, companies, projects) and concept names (patterns, methods, architectures)
- Compile findings into structured report
Phase 4: Deduplicate against existing wiki
# Check which entities already exist
for entity in "${ENTITIES[@]}"; do
slug=$(echo "$entity" | tr '[:upper:]' '[:lower:]' | tr ' ' '-')
if [ -f "$WIKI/entities/$slug.md" ]; then
echo "EXISTS: $entity"
else
echo "NEW: $entity"
fi
done
# Check which concepts already exist
for concept in "${CONCEPTS[@]}"; do
slug=$(echo "$concept" | tr '[:upper:]' '[:lower:]' | tr ' ' '-')
if [ -f "$WIKI/concepts/$slug.md" ]; then
echo "EXISTS: $concept"
else
echo "NEW: $concept"
fi
done
Phase 5: Prepare and ingest candidate pages
Prepare candidate source documents outside the wiki. To persist them, invoke
/wiki-ingest <candidate-source> --wiki "$WIKI" for each approved source and
let that command create the source/entity/concept pages in the selected wiki.
Do not create or edit wiki files here.
Entity page template:
---
title: "<EntityName>"
type: entity
tags: [<topic-area>, <type>]
date: YYYY-MM-DD
---
## Overview
2–3 sentence overview.
## Key Properties
- **Type**:
- **Key features**:
## Connections
- [[RelatedConcept]] — relationship
- [[RelatedEntity]] — relationship
## See Also
- [[RelatedConcept]]
Concept page template:
---
title: "<ConceptName>"
type: concept
tags: [<topic-area>, <pattern-type>]
date: YYYY-MM-DD
---
## Overview
2–3 sentence overview.
## Key Properties
- **What**:
- **Why matters**:
## Related Systems
| System | Type | Relevance |
|--------|------|-----------|
## Connection to <TOPIC>
How this concept relates to the BFS root topic.
## See Also
- [[RelatedEntity]]
- [[RelatedConcept]]
Phase 6: Index and entity/concept updates
Route index, entity, and concept changes through /wiki-ingest; do not edit
wiki/index.md or page files directly.
Phase 7: Log through ingest
Include the BFS topic and discovered entity/concept counts in the candidate
source document ingested through /wiki-ingest. Do not append directly to
wiki/log.md.
Phase 8: (Optional) wiki-assess
If --ingest is set, ingest each approved candidate with
/wiki-ingest <candidate-source> --wiki "$WIKI", then run
/wiki-assess --wiki "$WIKI" against that same destination. The flag does not
authorize direct wiki writes.
BFS Layer Routing
| Topic keywords | Layer 1 research areas | Layer 2 research areas |
|---|---|---|
| governance, constraint, fail-closed | policy engines, constitutional AI, OPA, GitOps | stream governance, RBAC, drift detection, value alignment |
| multi-agent, orchestration, coordination | LangGraph, AutoGen, CrewAI, MetaGPT | CAMEL, router-architecture, prompt registry, multi-turn alignment |
| coding agent, SWE, evidence | SWE-bench, OpenHands, Voyager, Devin | AgentBench, skill library, self-verification, iterative prompting |
| workflow, durability, execution | Temporal, Prefect, Archon, Airbyte | event sourcing, durable execution, MCP Server, YAML DAGs |
| policy, ACL, authorization | OPA, Rego, Constitutional AI, RLAIF | CIRL, value alignment, scalable oversight, constitutional classifiers |
Research Output Format
Each layer agent returns:
## Entities discovered
- EntityName: type, key properties, source
## Concepts discovered
- ConceptName: definition, key properties, source
## Key quotes
> "Quote" — source
## New topics for next layer
- NextTopicName (reason: discovered in this layer)
Quality Standards
- All entities must have ≥2 factual properties (not just "exists")
- All concepts must connect to ≥2 existing wiki pages
- Key quotes must include attribution and date
- Frontmatter must have title, type, tags, date
04 同仓库更多 Skills
instinct
Use when the user invokes /instinct or /in, or asks to "message Instinct", "ask Instinct", "tell Instinct", "check Instinct", or read replies from the configured peer assistant. iMessage first, WhatsApp Web as fallback.
hr
Compatibility alias for history-resume; produce the same fresh-state, provenance-aware resume briefing.
history-resume
Resume briefing for the current repository branch or worktree using fresh state and admitted history sources.
grok
Alias for the canonical grokbot browser conversation workflow; /grok talks to the Grok bot the same way /dot talks to Dot.
codexa-bench
Compare `codexa` and normal `codex` on a fair split of comparable work by default; use `--strict` for duplicate runs of the exact same task.
frontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.