plexium-dev
Develop and contribute to the Plexium codebase — package structure, build commands, test patterns, architecture layers
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-02
- Stars
- ★ 5
- Forks
- 0
01 前言 Front Matter
- name
- plexium-dev
- description
- Develop and contribute to the Plexium codebase — package structure, build commands, test patterns, architecture layers
02 资源文件 5
- 参考文档reference/agent-system.md2.8 KB
- 参考文档reference/daemon-system.md2.7 KB
- 参考文档reference/index.md558 B
- 参考文档reference/packages.md3.6 KB
- 参考文档reference/testing.md2.4 KB
03 SKILL.md 正文
Contributing to Plexium
Plexium is a Go CLI tool that gives repositories a persistent, agent-maintained wiki. This skill covers the codebase structure, build process, and contribution patterns.
Build and Test
# Build
go build ./...
# Run the full test suite across all packages
go test ./...
# Run a specific package
go test ./internal/agent/...
# Build the binary
go build -o plexium ./cmd/plexium
# Run the binary
./plexium --help
Package Structure
cmd/plexium/ # CLI entry point — cobra commands across multiple *.go files
internal/
agent/ # Provider cascade, task router, rate limiter, HTTP transport, setup
ci/ # CI check command (diff-aware wiki validation)
compile/ # Navigation file regeneration (_index.md, _Sidebar.md)
config/ # Config loading (viper), validation, env overrides
convert/ # Brownfield ingestion pipeline (scour/filter/ingest/link/lint)
daemon/ # Autonomous maintenance loop, workspace manager, runners, trackers
generate/ # Page generators for each taxonomy section
hook/ # Git hook handlers (pre-commit, post-commit)
integrations/
beads/ # Task tracking integration
memento/ # Session provenance (ingest transcripts, CI gate)
pageindex/ # PageIndex search engine, MCP server, retrieval
roles/ # Agent role definitions (coder, retriever, documenter, ingestor)
lint/ # Deterministic lint + LLM-augmented analysis, doctor
manifest/ # Manifest manager (bidirectional source-wiki mapping)
markdown/ # Markdown parser (frontmatter extraction, wiki-link parsing)
migrate/ # Schema version migrations
plugins/ # Plugin architecture (manifest, loader, schema generation)
publish/ # GitHub Wiki publishing
reports/ # Report generation (bootstrap, sync, lint)
retry/ # Exponential backoff with jitter
scanner/ # Source file scanner with glob matching
template/ # Page templates
wiki/ # Wiki scaffolding (init), page operations
Architecture Layers
Source Layer (immutable) — src/**, docs/**
State Manifest — .plexium/manifest.json
Wiki Layer — .wiki/**
Control Layer — _schema.md, config.yml, lefthook.yml
Enforcement — Schema (soft) → Git hooks (medium) → CI (hard)
Invariants (these must never break):
- Wiki operations never modify source code
- Pages with
ownership: human-authoredare never overwritten - Partial failures roll back — no half-updated wikis
- All
[[wiki-links]]validated before commit - Sync is idempotent (same commit → identical output)
Key Patterns
- Injectable dependencies: HTTP functions, runners, trackers use injectable function signatures for testing. See
cascade.goproviders anddaemon/runner.go. - Structural interfaces:
lint.LLMClient,daemon.RunnerAdapter,daemon.TrackerAdapteruse Go's structural typing — implementations don't import the interface package. - Config-driven behavior: Everything reads from
.plexium/config.ymlvia viper. Zero-value defaults preserve backward compatibility. - Testify for assertions: All tests use
github.com/stretchr/testify/assertandrequire.
When to Read Reference Docs
- Need to understand a specific package →
reference/packages.md - Working on the provider cascade or setup →
reference/agent-system.md - Working on the daemon or workspace manager →
reference/daemon-system.md - Need to understand the test patterns →
reference/testing.md
04 同仓库更多 Skills
plexium-user
Operate within a Plexium-powered repository — read wiki before work, update wiki after changes, follow ownership rules, use retrieval
plexium-user
Operate within a Plexium-powered repository — read wiki before work, update wiki after changes, follow ownership rules, use retrieval
plexium-dev
Develop and contribute to the Plexium codebase — package structure, build commands, test patterns, architecture layers
setup-plexium
Use when the user wants to initialize Plexium, set up the current repository for Codex, verify readiness, or connect Plexium's MCP server in Codex.
query-plexium-wiki
Use when the user wants to search or retrieve information from the Plexium wiki in the current repository.
install-plexium
Use when the user wants to install or verify the Plexium CLI from inside Codex.