forked from farhoodlabs/paperclip
508355b8fc
## Thinking Path > - Paperclip orchestrates AI agents for zero-human companies. > - The plugin system is the extension surface for optional product capabilities without baking every workflow into core. > - The LLM Wiki plugin package was reviewed in stacked PR #5592, which targeted `pap-9173-llm-wiki-rest`. > - The stack base PR #5597 merged to `master` before #5592 was merged into that branch, so the plugin package never reached `master`. > - A direct PR from `pap-9173-llm-wiki-rest` back to `master` would be noisy because that branch has diverged from current `master`. > - This pull request reapplies the reviewed `packages/plugins/plugin-llm-wiki/` package onto current `master` and updates Docker deps-stage manifest coverage. > - The branch intentionally no longer changes `pnpm-workspace.yaml` after maintainer feedback; because the new package is now a root workspace importer, the remaining integration question is how maintainers want the root lockfile handled under the current PR policy. ## What Changed - Added the LLM Wiki plugin package under `packages/plugins/plugin-llm-wiki/` from the merged PR #5592 head. - Preserved the post-review cleanup from #5592: generated design/screenshot artifacts are not committed, and `src/ui/index.tsx` / `src/wiki.ts` are small public entrypoints. - Added the new plugin package manifest to the Docker deps stage so policy can validate package manifest coverage. - Removed the earlier `pnpm-workspace.yaml` exclusion per maintainer request, so the plugin is included by the existing `packages/plugins/*` workspace glob. ## Verification Current head: - PGlite migration harness: ran migrations 001-003, verified old non-space distillation unique constraints were removed, inserted duplicate cursor and work-item keys in a second space, then reran migration 003 successfully - `node ./scripts/check-docker-deps-stage.mjs` - `git diff --check` Known current-head install result after removing the workspace exclusion: - `pnpm install --frozen-lockfile` fails because `pnpm-lock.yaml` has no importer for `packages/plugins/plugin-llm-wiki/package.json`. Previously verified on the same plugin source before the workspace-exclusion removal: - `pnpm --filter @paperclipai/plugin-sdk build` - `cd packages/plugins/plugin-llm-wiki && pnpm install --lockfile=false && pnpm test` ## Risks - The branch now includes `packages/plugins/plugin-llm-wiki` in the root workspace but does not update `pnpm-lock.yaml`. Root frozen install will fail until maintainers choose a lockfile path that fits repo policy. - Committing `pnpm-lock.yaml` directly on this PR conflicts with the current PR policy check, while excluding the package from `pnpm-workspace.yaml` was rejected in maintainer feedback. - The package includes UI code already reviewed in #5592; generated screenshot/design artifacts were intentionally removed per maintainer request, so visual review should regenerate screenshots locally if needed. - The package depends on plugin host support from #5597, which is already merged to `master`. > For core feature work, check [`ROADMAP.md`](ROADMAP.md) first and discuss it in `#dev` before opening the PR. Feature PRs that overlap with planned core work may need to be redirected — check the roadmap first. See `CONTRIBUTING.md`. ## Model Used - OpenAI GPT-5 Codex via Codex CLI, tool use and local code execution enabled; context window not exposed. ## 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 run the targeted checks listed above - [x] I have added or updated tests where applicable - [ ] If this change affects the UI, I have included before/after screenshots - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [x] I will address all Greptile and reviewer comments before requesting merge Stack context: #5592 was merged into `pap-9173-llm-wiki-rest` after #5597 had already merged that branch to `master`, so this follow-up PR is needed to carry the plugin package itself into `master`. Co-authored-by: Paperclip <noreply@paperclip.ing>
4.0 KiB
4.0 KiB
name, description
| name | description |
|---|---|
| index-refresh | Use when an operation issue is an index refresh — typically the hourly index-refresh routine. Rebuild `wiki/index.md` so each entry has a tight, scannable one-line summary and the catalog tracks the actual contents of `wiki/`. Resolve drift between the index and recent log activity, but do not edit page content. |
Index Refresh
Keep wiki/index.md accurate and scannable. The index is the maintainer's first stop for navigation — its quality determines how cheap every subsequent operation becomes.
Inputs
- An operation issue with
operationType: "index"(or theindex-refreshroutine title). - The operation issue's target
wikiId,spaceSlug, and space root. Refresh only that space unless the issue explicitly says this is a multi-space sweep.
Workflow
- Read the target space's
wiki/index.mdas it currently stands. - Walk the target space's
wiki/.wiki/projects/<slug>/standup.mdentries are current-state companions for durablewiki/projects/<slug>/index.mdpages; index them only as links attached to the matching project entry. Walkwiki/by category (sources/,projects/,entities/,concepts/,synthesis/, plus any custom subdirectories the wiki schema added). - Read the target space's last ~50 entries of
wiki/log.mdto spot pages that were created or substantially changed but never made it to the index. - Per category, produce sorted entries of the form:
The summary is one factual sentence pulled from the page's first paragraph or its title. No status, no datestamps in the index — those belong in the page itself or in the log.
- [[<path>]] — <one-line summary> - Drop entries whose page no longer exists. Note the deletion in the log:
## [YYYY-MM-DD] index-refresh | reconciled - removed: [[wiki/old-page]] (page deleted) - added: [[wiki/new-page]] — <summary> - Add entries for pages that exist on disk but were missing from the index. Skip
wiki/log.mdandwiki/index.mdthemselves. For standalonewiki/projects/<slug>/standup.mdwithout a matching durable project page, add it under Projects and flag it for later durable-page distillation. - Write project entries editorially. The Projects section should group work by the project's concept and purpose, not by issue ids, dates, statuses, UUIDs, or source metadata. Link task identifiers only as supporting evidence.
- Preserve custom categories. If the wiki has added e.g.
wiki/papers/orwiki/runbooks/, keep its index section. Do not collapse to the default five categories. - Append a log entry with counts:
If the index was already accurate, the log entry says
## [YYYY-MM-DD] index-refresh | added=N removed=M - operation issue: <issue identifier>added=0 removed=0— still write it so future audits can see the run happened.
What this skill does NOT do
- Does not change page content.
- Does not resolve contradictions, fix broken links, or fill concept gaps. Those go to the next
wiki-lintrun. - Does not write summaries that are not already supported by the page itself. If a page lacks a clear first paragraph to summarise, flag it for
wiki-lint.
Voice
- Index entries are one factual line per page, present tense.
- No emojis, no statuses, no dates in
wiki/index.md. Dates live in the log.
Verification
Before closing the operation issue:
wiki/index.mdmatches the actual contents ofwiki/— no missing pages, no dangling entries.- Project entries include current
wiki/projects/<slug>/standup.mdlinks when standups exist. - Each index line has the form
- [[path]] — <summary>. - Custom category sections are preserved.
wiki/log.mdhas the index-refresh entry with counts (even if the counts are zero).- No page bodies were modified. No file under
raw/was modified.
Tools
wiki_search, wiki_read_page, wiki_write_page (for wiki/index.md and wiki/log.md only). Always include the operation issue's wikiId and spaceSlug.