Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 52 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<h3 align="center">Your Claude Code gets smarter every session.</h3>

<p align="center">
Self-correcting memory that compounds over 50+ sessions. You correct Claude once &mdash; it never makes the same mistake again.<br/>
<b>24 skills</b> &bull; <b>8 agents</b> &bull; <b>21 commands</b> &bull; <b>29 hook scripts across 24 events</b><br/>
Self-correcting memory that compounds over 50+ sessions. You correct Claude once &mdash; it never makes the same mistake again. Persistent research wikis indexed in FTS5 surface relevant prior work the moment you ask. Auto-research loop grows the knowledge base while you sleep.<br/>
<b>33 skills</b> &bull; <b>8 agents</b> &bull; <b>22 commands</b> &bull; <b>37 hook scripts across 24 events</b><br/>
Works with <b>Claude Code</b>, <b>Cursor</b>, and <b>32+ agents</b> via SkillKit.
</p>

Expand Down Expand Up @@ -75,6 +75,50 @@ cd ~/.claude/plugins/*/pro-workflow && npm install && npm run build

---

## Wiki Knowledge Base — 60-second tour

Auto-grow a persistent FTS5-indexed research wiki next to your code:

```bash
# Scaffold
/wiki init agent-memory --title "Agent Memory" --flavor research

# Add a page (any .md you wrote — file gets FTS-indexed)
/wiki page agent-memory wiki/concepts/episodic-memory.md --type concept

# Ask the wiki anything
/wiki ask "what is episodic memory" --wiki agent-memory

# Auto-grow it: queue a seed, run the loop, watch it write pages + enqueue follow-ups
/wiki seed agent-memory "memory consolidation in agents"
/wiki research agent-memory --max-pages 5 --budget-usd 0.50

# Hybrid retrieval (BM25 + vector RRF) — needs OPENAI_API_KEY or VOYAGE_API_KEY
/wiki embed agent-memory
/wiki hybrid "consolidation patterns" --wiki agent-memory

# Multi-LLM deliberation, transcript persisted as a wiki page
/wiki council "should we adopt episodic memory?" --wiki agent-memory
```

Every wiki hit auto-loads on `UserPromptSubmit` when prompts mention indexed topics. Kill-switch: `touch ~/.pro-workflow/STOP`.

---

## What's New in v3.3

Persistent knowledge plane on top of the self-correction memory.

- **Wiki Builder** &mdash; Persistent research wikis on disk + SQLite FTS5 shadow index. 9 flavors: research, paper, domain, product, person, organization, project, codebase, incident. `/wiki init`, `/wiki page`, `/wiki reindex`.
- **Wiki Query** &mdash; BM25 retrieval across wiki pages. `/wiki ask "<query>"` returns top-K with citations. `related` and `show` subcommands. Auto-loads top-3 hits on UserPromptSubmit when prompt mentions indexed topics.
- **Wiki-scoped learnings** &mdash; `[LEARN] ... Wiki: <slug>` binds a rule to one wiki, no cross-project pollution.
- **Auto-research loop** &mdash; Budget-capped BFS driver. Pluggable source fetchers (web/arXiv/GitHub + custom). Convergence detection, kill-switch, depth caps. `/wiki seed`, `/wiki research`, `/wiki seeds`, `/wiki cancel`, `/wiki status`.
- **Hybrid retrieval (optional)** &mdash; sqlite-vec compatible embeddings via OpenAI or Voyage. RRF fusion of BM25 + vector. `/wiki embed`, `/wiki hybrid`. Degrades cleanly to BM25-only when no embedding key set.
- **LLM Council** &mdash; Provider-agnostic 3-phase deliberation (Anthropic/OpenAI/OpenRouter/Fireworks/custom OpenAI-compat). Persists transcript as a wiki page when `--wiki` is passed. `/wiki council`.
- **Survey Generator** &mdash; Provider-agnostic literature survey artifact. Output target = wiki markdown page (not standalone HTML). Bibliography rows append to `sources.md` deduped. `/wiki survey`.
- **Reactive triggers** &mdash; Edits inside a wiki tree auto-enqueue verify-seeds. Cron-tick script (`scripts/research-tick.js`) runs one iteration of the oldest opted-in wiki with pending seeds.
- **Schema additions** &mdash; `wikis`, `wiki_pages` (+ FTS5), `wiki_sources`, `wiki_claims`, `wiki_seeds`, `wiki_embeddings`, `learnings_wiki`.

## What's New in v3.2

- **LLM Gates** &mdash; First plugin with `type: "prompt"` hooks for AI-powered commit validation and secret detection
Expand All @@ -94,15 +138,19 @@ cd ~/.claude/plugins/*/pro-workflow && npm install && npm run build
| Feature | Pro Workflow | [Superpowers](https://github.com/obra/superpowers) | [ECC](https://github.com/affaan-m/everything-claude-code) | [gstack](https://github.com/garrytan/gstack) | [GSD](https://github.com/gsd-build/get-shit-done) |
|---------|:-----------:|:-----------:|:---:|:------:|:---:|
| Self-correcting memory (SQLite + FTS5) | **Yes** | No | No | No | No |
| Persistent research wikis (FTS5-indexed) | **Yes** | No | No | No | No |
| Auto-research loop (budget-capped BFS) | **Yes** | No | No | No | No |
| Hybrid retrieval (BM25 + vector + RRF) | **Yes** | No | No | No | No |
| Multi-provider LLM council | **Yes** | No | No | No | No |
| LLM-powered hooks (`type: "prompt"`) | **Yes** | No | No | No | No |
| Permission denial analysis | **Yes** | No | No | No | No |
| Compaction-aware state preservation | **Yes** | No | No | No | No |
| Cost tracking and budget alerts | **Yes** | No | No | No | No |
| MCP overhead auditing | **Yes** | No | No | No | No |
| Cross-agent (32+ agents via SkillKit) | **Yes** | No | Some | No | No |
| Skills | 24 | 14 | 140+ | 18+ | 0 |
| Skills | 33 | 14 | 140+ | 18+ | 0 |
| Agents | 8 | 5 | 36 | 0 | 18 |
| Commands | 21 | 3 | 60+ | 5+ | 57 |
| Commands | 22 | 3 | 60+ | 5+ | 57 |
| Hook Events | 24 | 8 | 18 | 0 | 0 |

---
Expand Down
16 changes: 16 additions & 0 deletions commands/doctor.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,22 @@ cat ~/.claude/settings.json 2>/dev/null | head -3
- Check for conflicting settings between project and user level
- Verify permission rules are correct

### 8. Wiki Knowledge Base
```bash
node $PRO_WORKFLOW_ROOT/skills/wiki-builder/scripts/wiki-cli.js list 2>/dev/null
node $PRO_WORKFLOW_ROOT/skills/wiki-research-loop/scripts/research-loop.js status 2>/dev/null
ls -1 ~/.pro-workflow/STOP 2>/dev/null && echo "KILL SWITCH ACTIVE — no research runs"
tail -5 ~/.pro-workflow/tick.log 2>/dev/null
```
- List of wikis · seed counts per status · kill-switch state · last cron-tick activity
- Embeddings: `OPENAI_API_KEY`/`VOYAGE_API_KEY` set? Hybrid search uses provider; otherwise BM25-only.

### 9. Council Providers
```bash
node $PRO_WORKFLOW_ROOT/skills/llm-council/scripts/council.js providers 2>/dev/null
```
- Shows which provider env vars are set (Anthropic/OpenAI/OpenRouter/Fireworks/custom).

## Quick Fixes

| Issue | Fix |
Expand Down
83 changes: 83 additions & 0 deletions commands/wiki.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# /wiki — Persistent Research Wikis

Build, query, and maintain long-lived knowledge bases. Each wiki = markdown folder + SQLite FTS5 shadow index. Survives sessions, indexes auto-load on `SessionStart`.

## Subcommands

| Subcommand | Action |
|------------|--------|
| `/wiki init <slug> --title "X" [--flavor research] [--scope global\|project]` | Scaffold + register a new wiki |
| `/wiki list [--scope global\|project]` | List registered wikis |
| `/wiki info <slug>` | Show wiki metadata + page count |
| `/wiki page <slug> <rel-path> [--title "X"] [--type concept\|paper\|...]` | Upsert a markdown page into the FTS index |
| `/wiki reindex <slug>` | Walk `wiki/` and re-index all `*.md` |
| `/wiki ask "<query>" [--wiki <slug>] [--limit N]` | BM25 search over wiki pages |
| `/wiki related <slug> <rel-path>` | Find adjacent pages by reusing title+summary as query |
| `/wiki show <slug> <rel-path>` | Print a page from the index |
| `/wiki seed <slug> "<query>" [--depth 0]` | Enqueue a research seed |
| `/wiki research <slug> [--max-pages 5] [--budget-usd 0.50] [--fetchers web,arxiv,github]` | Run the auto-research loop |
| `/wiki seeds <slug> [--status pending\|active\|done\|failed]` | List queued seeds |
| `/wiki cancel <slug>` | Mark all pending/active seeds as failed |
| `/wiki status` | Cross-wiki seed counts + kill-switch state |
| `/wiki embed [<slug>] [--limit N]` | Compute embeddings for indexed pages (needs `OPENAI_API_KEY` or `VOYAGE_API_KEY`) |
| `/wiki hybrid "<query>" [--wiki <slug>]` | Hybrid retrieval: BM25 + vector + RRF |
| `/wiki council "<query>" --wiki <slug>` | Run llm-council; persist transcript as a wiki page |
| `/wiki survey --bundle <path> --wiki <slug>` | Generate literature survey from a research_bundle.json |

## Routes to skills

- `init / list / info / page / reindex` → `wiki-builder`
- `ask / related / show / hybrid` → `wiki-query` (+ `embed-wiki.js` for hybrid)
- `seed / research / seeds / cancel / status` → `wiki-research-loop`
- `council` → `llm-council`
- `survey` → `survey-generator`
- `embed` → `scripts/embed-wiki.js`

## Storage

- **Global** (default): `~/.pro-workflow/wikis/<slug>/`
- **Project**: `<project>/.claude/wikis/<slug>/` via `--scope project`

Both indexed in `~/.pro-workflow/data.db`.

## Flavors

`research`, `paper`, `domain`, `product`, `person`, `organization`, `project`, `codebase`, `incident`. See wiki-builder skill for layout per flavor.

## Examples

```
/wiki init agent-memory --title "Agent Memory" --flavor research
/wiki page agent-memory wiki/concepts/episodic-memory.md --type concept
/wiki ask "what is episodic memory" --wiki agent-memory
/wiki related agent-memory wiki/concepts/episodic-memory.md
```

## Auto-research (Phase 3.3.1+)

Loop is opt-in per-wiki via `wiki.config.md`:

```yaml
auto_research:
enabled: true
max_pages_per_run: 5
max_depth: 3
budget_usd: 0.50
```

Phase 3.3.0 ships the index + manual page workflow. Loop driver lands next.

## Cited recall

Every answer that uses a wiki hit must cite as:

```
[wiki:<slug>] <Title> — `<rel_path>`
```

No paraphrase without citation.

## Related

- `/learn` (and `learn-rule`) accepts `--wiki <slug>` to scope a learning rule to one wiki.
- SessionStart auto-loads top-3 wiki hits when prompt matches indexed content.
37 changes: 21 additions & 16 deletions docs/infographic.html
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@
<div class="header-sub" style="margin-left: 18px;">github.com/rohitg00/pro-workflow &middot; <a href="https://rohitg00-pro-workflow.mintlify.app/" style="color:var(--anthro-coral); text-decoration:none;">docs</a></div>
</div>
<div class="header-right">
<div class="star-count">v3.2</div>
<div class="star-count">v3.3</div>
<div class="star-label">Latest Release</div>
</div>
</div>
Expand All @@ -690,8 +690,8 @@
<div class="title">Pro Workflow</div>
<div class="subtitle">
Battle-tested Claude Code patterns from power users who ship production code daily.
Self-correcting memory, parallel worktrees, quality gates, and the 80/20 AI coding ratio &mdash;
24 Skills, 8 Agents, 24 Hooks, 21 Commands, 3 Contexts, 7 Guides.
Self-correcting memory, persistent FTS5-indexed wikis, auto-research loop, multi-LLM council, parallel worktrees, quality gates &mdash;
33 Skills, 8 Agents, 24 Hook events, 22 Commands, 3 Contexts, 7 Guides.
</div>
</div>

Expand Down Expand Up @@ -751,10 +751,10 @@
<div class="section-num">03 Components</div>
<div class="section-title">Everything Included</div>
<div class="comp-grid" style="grid-template-columns: repeat(4, 1fr);">
<div class="comp-item"><div class="comp-num">24</div><div class="comp-label">Skills</div></div>
<div class="comp-item"><div class="comp-num">33</div><div class="comp-label">Skills</div></div>
<div class="comp-item"><div class="comp-num">8</div><div class="comp-label">Agents</div></div>
<div class="comp-item"><div class="comp-num">24</div><div class="comp-label">Hooks</div></div>
<div class="comp-item"><div class="comp-num">21</div><div class="comp-label">Commands</div></div>
<div class="comp-item"><div class="comp-num">24</div><div class="comp-label">Hook events</div></div>
<div class="comp-item"><div class="comp-num">22</div><div class="comp-label">Commands</div></div>
<div class="comp-item"><div class="comp-num">3</div><div class="comp-label">Contexts</div></div>
<div class="comp-item"><div class="comp-num">7</div><div class="comp-label">Rules</div></div>
<div class="comp-item"><div class="comp-num">29</div><div class="comp-label">Scripts</div></div>
Expand Down Expand Up @@ -1161,29 +1161,34 @@
<!-- 10 SKILLS -->
<div>
<div class="section-num">10 Skills Library</div>
<div class="section-title">24 Skills</div>
<div class="section-title">33 Skills</div>
<table>
<tr><th>Skill</th><th>What It Does</th></tr>
<tr><td><strong>pro-workflow</strong></td><td>Core 8 patterns</td></tr>
<tr style="background:var(--anthro-light-coral);"><td><strong>wiki-builder</strong></td><td>Persistent FTS5-indexed research wikis (9 flavors)</td></tr>
<tr style="background:var(--anthro-light-coral);"><td><strong>wiki-query</strong></td><td>BM25 retrieval, snippets, related/show</td></tr>
<tr style="background:var(--anthro-light-coral);"><td><strong>wiki-research-loop</strong></td><td>Budget-capped BFS auto-research over web/arXiv/GH</td></tr>
<tr style="background:var(--anthro-light-coral);"><td><strong>llm-council</strong></td><td>Provider-agnostic 3-phase multi-LLM deliberation</td></tr>
<tr style="background:var(--anthro-light-coral);"><td><strong>survey-generator</strong></td><td>Provider-agnostic literature survey to wiki page</td></tr>
<tr><td><strong>smart-commit</strong></td><td>Quality gates + conventional commits</td></tr>
<tr><td><strong>wrap-up</strong></td><td>Session ritual with learning capture</td></tr>
<tr><td><strong>learn-rule</strong></td><td>Persist corrections to memory</td></tr>
<tr><td><strong>learn-rule</strong></td><td>Persist corrections to memory (wiki-scoped)</td></tr>
<tr><td><strong>parallel-worktrees</strong></td><td>Git worktree setup for zero dead time</td></tr>
<tr><td><strong>replay-learnings</strong></td><td>Surface relevant past patterns</td></tr>
<tr><td><strong>session-handoff</strong></td><td>Resume docs for next session</td></tr>
<tr><td><strong>insights</strong></td><td>Analytics, heatmaps, trends</td></tr>
<tr><td><strong>deslop</strong></td><td>Remove AI code slop before commit</td></tr>
<tr><td><strong>context-optimizer</strong></td><td>Token management and MCP audit</td></tr>
<tr><td><strong>orchestrate</strong></td><td>Multi-phase dev workflow</td></tr>
<tr style="background:var(--anthro-light-coral);"><td><strong>permission-tuner</strong></td><td>Optimize allow/deny rules</td></tr>
<tr style="background:var(--anthro-light-coral);"><td><strong>compact-guard</strong></td><td>Protect context through compaction</td></tr>
<tr style="background:var(--anthro-light-coral);"><td><strong>cost-tracker</strong></td><td>Session cost awareness + budgets</td></tr>
<tr style="background:var(--anthro-light-coral);"><td><strong>auto-setup</strong></td><td>Auto-configure quality gates</td></tr>
<tr style="background:var(--anthro-light-coral);"><td><strong>mcp-audit</strong></td><td>MCP overhead analysis</td></tr>
<tr style="background:var(--anthro-light-coral);"><td><strong>llm-gate</strong></td><td>AI-powered quality gates</td></tr>
<tr style="background:var(--anthro-light-coral);"><td><strong>file-watcher</strong></td><td>Reactive file change workflows</td></tr>
<tr><td><strong>permission-tuner</strong></td><td>Optimize allow/deny rules</td></tr>
<tr><td><strong>compact-guard</strong></td><td>Protect context through compaction</td></tr>
<tr><td><strong>cost-tracker</strong></td><td>Session cost awareness + budgets</td></tr>
<tr><td><strong>auto-setup</strong></td><td>Auto-configure quality gates</td></tr>
<tr><td><strong>mcp-audit</strong></td><td>MCP overhead analysis</td></tr>
<tr><td><strong>llm-gate</strong></td><td>AI-powered quality gates</td></tr>
<tr><td><strong>file-watcher</strong></td><td>Reactive file change workflows</td></tr>
</table>
<div style="font-size:10px; color:var(--anthro-muted); margin-top:6px;">+ 7 more: context-engineering, batch-orchestration, thoroughness-scoring, sprint-status, agent-teams, safe-mode</div>
<div style="font-size:10px; color:var(--anthro-muted); margin-top:6px;">Coral rows = new in v3.3 (knowledge plane). + 10 more: context-engineering, batch-orchestration, thoroughness-scoring, sprint-status, agent-teams, safe-mode, token-efficiency, anti-sycophancy, tool-call-budget, design-rules</div>
</div>

<!-- 11 MODEL SELECTION -->
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "pro-workflow",
"version": "3.2.0",
"description": "Complete AI coding workflow system with orchestration patterns, cross-agent support, reference guides, and searchable learnings",
"version": "3.3.0",
"description": "Complete AI coding workflow system with orchestration patterns, cross-agent support, reference guides, searchable learnings, and persistent research wikis",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc",
"build": "tsc && node -e \"const fs=require('fs');fs.mkdirSync('dist/db',{recursive:true});fs.copyFileSync('src/db/schema.sql','dist/db/schema.sql')\"",
"clean": "rm -rf dist",
"prepublishOnly": "npm run build",
"db:init": "node dist/db/index.js"
Expand Down
Loading