Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Wiki Bfs?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/jleechanorg-wiki-bfs)
---
name: wiki-bfs
description: Run breadth-first research on a topic and route approved wiki changes through /wiki-ingest.
---
# /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 N` flag, default 2
- `INGEST` = present if `--ingest` flag set
- `WIKI` = from `--wiki <path>` flag, default `$HOME/llm_wiki/wiki`
### Phase 2: Resolve wiki path
```bash
# 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:**
1. Search web for the topic's canonical projects, papers, people
2. Fetch accessible pages (arxiv, github readmes, official docs)
3. Extract entity names (people, companies, projects) and concept names (patterns, methods, architectures)
4. Compile findings into structured report
### Phase 4: Deduplicate against existing wiki
```bash
# 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:**
```markdown
---
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:**
```markdown
---
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