## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work. > - The LLM Wiki plugin gives Paperclip a local-file wiki. It reads sources, writes pages, and answers queries. > - The plugin package contains a sample wiki tree under `fixtures/basic-root/`. > - No test, script, workflow, or package export reads this tree. The tests read the live `templates/` tree through `src/templates.ts`. > - Two fixture files, `AGENTS.md` and `IDEA.md`, are byte-identical copies of `templates/AGENTS.md` and `templates/IDEA.md`. > - This pull request removes the unused `fixtures/basic-root/` tree. > - The benefit is a smaller test-support surface. No stale copy of the wiki schema remains. ## Linked Issues or Issue Description No public GitHub issue exists for this cleanup. The in-PR description follows the enhancement template. **What existing behavior does this improve?** Test support for the LLM Wiki plugin package. The package carries a sample fixture tree that no code selects or reads. **Subsystem affected** `packages/plugins/plugin-llm-wiki` — test support files only. **Current behavior** The package contains 14 fixture files under `fixtures/basic-root/` (258 lines). The files describe a sample wiki: a schema (`AGENTS.md`), a pattern note (`IDEA.md`), raw sources, and generated pages. Nothing loads them: - The plugin vitest config selects `tests/**/*.spec.ts` only. No workflow, script, or runner executes a file under `fixtures/`. - The package `files` list (`agents`, `dist`, `migrations`, `skills`, `templates`, `README.md`) excludes `fixtures`. The published artifact does not contain it. - The fixture was added with the initial plugin import (May 2026) and was not touched again. - `fixtures/basic-root/AGENTS.md` and `IDEA.md` duplicate `templates/AGENTS.md` and `templates/IDEA.md` byte for byte. `src/templates.ts` reads the `templates/` copies. **Proposed behavior** Delete `packages/plugins/plugin-llm-wiki/fixtures/basic-root/` and the now-empty `fixtures/` directory. No test, production file, lockfile, or workflow changes. **Reason and benefit** The tree is dead test-support weight. A stale, byte-identical copy of the wiki schema can mislead a future maintainer into editing the wrong tree. Removal keeps 258 test-support lines out of the package and does not change any executed or published path. **Breaking changes** None. The deleted files are outside the package `files` list, so npm-published artifacts are unchanged. No test or production code references them. **Additional context** Nightly test-gardening audit of unaudited plugin-package test support. ## What Changed - Removed `packages/plugins/plugin-llm-wiki/fixtures/basic-root/**` — 14 files, 258 test-support lines. Zero production lines, zero registered test cases (no case referenced these files), zero lockfile or workflow changes. ## Verification Reference and selection proof: - Searched all tracked file types for `basic-root`, `basic_root`, `basicRoot`, and each fixture filename. Only the fixture files themselves match. No code, workflow, script, skill, agent prompt, or documentation path references them. - GitHub history: one commit touches this path — the initial plugin import. No later commit reads or changes it. - No open or merged pull request touches `packages/plugins/plugin-llm-wiki/fixtures/**`. - Selection: `vitest.config.ts` includes `tests/**/*.spec.ts` only. No CI lane or npm script executes files under `fixtures/`. Local runs, `packages/plugins/plugin-llm-wiki`, before and after the deletion: - `pnpm exec vitest run --config ./vitest.config.ts` — same result both runs: 4 tests passed; `tests/plugin.spec.ts` passed. `tests/wiki-route-sidebar-ui.spec.ts` and `tests/issue-attachments.spec.ts` fail identically before and after on `Failed to resolve import "react"`. The `react` peer dependency is not installed in this container. This is a pre-existing environment setup failure, unrelated to this deletion. - `pnpm run typecheck` — passes after the deletion (tsc reports no errors). - Repo-wide `pnpm -r typecheck`, `pnpm test:run`, and `pnpm build` were not run locally. The required CI lanes supply that coverage for this pull request head. ## Risks - Low risk. Deletion only. No runtime path reads the removed files, and the published package never contained them. ## Model Used - Zhipu GLM via OpenRouter, model id `z-ai/glm-5.3` (Paperclip Test Gardener agent). Context window size is not disclosed to the agent. No special reasoning mode. Tools: shell, file search, and the GitHub REST API. Every pull request section above was written by this model. ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes: #` / `Refs: #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [ ] I have run tests locally and they pass — the runnable plugin suite passes; two spec files fail on a pre-existing missing `react` peer in this container, identically before and after the change - [x] I have added or updated tests where applicable — no test references the deleted fixtures, so no test change applies - [x] I have updated relevant documentation to reflect my changes — no documentation references the deleted files - [x] I have considered and documented any risks above - [ ] All Paperclip CI gates are green — pending on this pull request head - [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups — pending review - [ ] I will address all Greptile and reviewer comments before requesting merge Co-Authored-By: Paperclip <Paperclip-Paperclip@users.noreply.github.com>
LLM Wiki
Local-file LLM Wiki plugin for source ingestion, wiki browsing, query, lint, and maintenance workflows.
Scope
This package is the standalone home for LLM Wiki behavior. Wiki-specific routes, UI, prompts, tools, local-folder templates, migrations, fixtures, and tests live here rather than in Paperclip core.
The alpha surface includes:
- manifest-declared Wiki page, sidebar entry, and settings page
- trusted local folder declaration for
raw/,wiki/,AGENTS.md,IDEA.md,wiki/index.md, andwiki/log.md - plugin database namespace migration for wiki instances, sources, pages, operations, query sessions, and resource bindings
- managed
Wiki Maintaineragent, managedLLM Wikiproject, and paused managed routines for wiki update processing, lint, and index refresh - plugin-operation issue creation using
surfaceVisibility: "plugin_operation" - local source capture into
raw/with metadata rows in the plugin DB namespace - opt-in company-scoped Paperclip event ingestion controls for issues, comments, and documents; event ingestion is disabled by default and routes captured raw provenance into the default space only
- manual Paperclip project/root issue distillation and bounded backfill actions with explicit work items, operation issues, source caps, and estimated cost recording
- Paperclip-derived distillation (cursor windows, manual
distill-now, backfill) always writes into the default wiki space in Phase 1; non-default spaces remain on manual / raw-file ingest until per-space Paperclip ingestion profiles ship - Paperclip-derived distillation maintains
wiki/projects/<slug>/standup.mdas the executive current-state view for each represented project, alongside durablewiki/projects/<slug>/index.mdknowledge pages - wiki page writes with plugin path validation, atomic local-folder writes, metadata/revision rows, backlink extraction, and optional stale-hash protection
- wiki tools for search/read/write/propose patch/source/log/index/backlinks workflows
Phase 5 Security Gate
Paperclip-derived text ingestion stays limited to issue titles/descriptions, issue comments, and issue documents.
- Issue attachments/assets are metadata-only in Phase 5.
- Issue work products are metadata-only in Phase 5.
- The wiki must not fetch
/api/assets/:id/content, dereference work-producturlfields, or store those capability-bearing links in source bundles/snapshots.
The accepted policy lives in doc/plans/2026-05-06-llm-wiki-paperclip-asset-security-gate.md.
Development
pnpm install
pnpm dev # watch builds
pnpm dev:ui # local dev server with hot-reload events
pnpm test
From the Paperclip repo root:
pnpm --filter @paperclipai/plugin-llm-wiki typecheck
pnpm --filter @paperclipai/plugin-llm-wiki test
pnpm --filter @paperclipai/plugin-llm-wiki build
Alpha Verification
Run these commands from the Paperclip repo root before handing off alpha plugin changes:
pnpm --filter @paperclipai/plugin-llm-wiki typecheck
pnpm --filter @paperclipai/plugin-llm-wiki test
pnpm --filter @paperclipai/plugin-llm-wiki build
The focused Vitest suite covers:
- standalone package boundaries and package-local harness dependencies
- required local folder bootstrap writes
- raw source capture plus ingest metadata persistence
- hidden plugin-operation issue creation for ingest/query/file-as-page workflows
- disabled and enabled Paperclip event ingestion paths
- managed routine declarations, manual distill/backfill work items, source cap handling, and backfill project/date scoping
- atomic page writes, metadata/revision rows, backlinks, and stale-hash refusal
- query session creation, run-id recording, stream event forwarding, and completion updates
- filing a streamed query answer back into the wiki through a hidden operation
Remaining alpha gaps:
- Browser screenshot capture is maintained separately under
tests/screenshots; generatedscreenshots/outputs are local artifacts and are ignored by git. - Host-level plugin install and live agent invocation still need Paperclip server/runtime smoke coverage when preparing a release candidate.
Install Into Paperclip
curl -X POST http://127.0.0.1:3100/api/plugins/install \
-H "Content-Type: application/json" \
-d '{"packageName":"/Users/dotta/paperclip/.paperclip/worktrees/PAP-3179-design-a-llm-wiki-plugin/packages/plugins/plugin-llm-wiki","isLocalPath":true}'
Build Options
pnpm builduses esbuild presets from@paperclipai/plugin-sdk/bundlers.pnpm build:rollupuses rollup presets from the same SDK.
After changing manifest-loaded assets such as skills, agent instructions, or templates, recompile the local plugin before re-enabling it:
pnpm --filter @paperclipai/plugin-llm-wiki build
The package-local dist/ directory is ignored by git, but local Paperclip
installs load the compiled dist/manifest.js and dist/worker.js files at
runtime. If activation failed before the rebuild, re-enable the plugin or
restart the Paperclip dev server so the host imports the fresh bundle.
Local File Layout
<configured-wiki-root>/
AGENTS.md
IDEA.md
.gitignore
raw/
.gitkeep
wiki/
index.md
log.md
sources/
.gitkeep
projects/
.gitkeep
<project-slug>/
index.md
standup.md
decisions.md
history.md
entities/
.gitkeep
concepts/
.gitkeep
synthesis/
.gitkeep
Use the settings page or bootstrap-root action to configure the folder and
write the starter files. The plugin uses Paperclip's local folder API for path
containment, symlink checks, read/write validation, and atomic writes.
Bootstrap preserves existing files rather than overwriting operator edits. The
default first-install skeleton is copied from the vanilla LLM Wiki layout, with
CLAUDE.md renamed to AGENTS.md and Paperclip project overviews, standups,
decisions, and history kept together under wiki/projects/<slug>/.
Managed Agent Instructions
Plugin-managed agent instruction bundles live under:
agents/<agent-key>/AGENTS.md
For this plugin the Wiki Maintainer source bundle is agents/wiki-maintainer/AGENTS.md.
Any additional files in that folder are installed as sibling instruction files
for the managed agent. The settings health check reports drift from these
defaults, and resetting the managed agent asks for confirmation before replacing
customized instructions.