elegy-plugin-authoring
Use when creating or reviewing an Elegy system-adapter plugin that connects an agent to a data source, database, platform, API, local system, or executable boundary.
- License 许可
- Apache-2.0
- 所属仓库
- Sofreshx/Elegy
- 最近更新
- 2026-11-02
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- elegy-plugin-authoring
- description
- Use when creating or reviewing an Elegy system-adapter plugin that connects an agent to a data source, database, platform, API, local system, or executable boundary.
02 资源文件 4
- 参考文档readiness.json725 B
- 参考文档README.md669 B
- 参考文档references/private-plugin-release-pipeline.md5.9 KB
- 参考文档references/snippets.md3.0 KB
03 SKILL.md 正文
Elegy Plugin Authoring
Readiness: concept; not agent-routable. This authoring guidance is being proven under the evidence-backed readiness policy.
An Elegy plugin is a reusable system adapter: it connects an agent to a data source, database, platform, API, filesystem or operating-system boundary, or an executable/CLI. Business and domain logic belongs in a library, application, or product-local tool. Do not create a plugin manifest or marketplace wrapper merely to distribute domain logic.
Workflow
- Read the nearest repo instructions, then
docs/architecture/README.md,docs/architecture/skill-core-v1.md,docs/architecture/codex-plugin-projection.md,docs/specs/plugin-connections-v1.md,docs/specs/plugin-marketplace-v2.md, and the current plugin examples that match the target lane. - Apply the eligibility gate before authoring anything:
- Identify the external or local system boundary being adapted.
- Identify reusable operations an agent can invoke across tasks.
- Reject domain analysis, scoring, orchestration, or product workflow logic; keep it product-local.
- Inspect existing manifests,
distribution/surfaces.json, skills, runtime crates, wrappers, and marketplace state before deciding. - Choose the smallest adapter lane:
- Adapter with a typed capability catalog: each entry declares exactly one
concrete interface (
cli,mcp-resource, ormcp-tool). CLI is the default local integration lane; MCP resources and tools are first-class interfaces when the host needs them. - Downstream adapter repository: external repo owning runtime, tests, release archive, and sidecars.
- Instruction-only material: publish through the host's skill lane, not the Elegy plugin marketplace.
- Adapter with a typed capability catalog: each entry declares exactly one
concrete interface (
- Do not extract a generalized Elegy contract until two independent working consumers exhibit the same stable boundary. Record what remains product-local.
- Clarify only decisions that files cannot answer: plugin purpose, public/private source split, runtime surface, connection/authentication requirements, marketplace category, user-visible prompts, and acceptance evidence.
- Read
references/snippets.mdafter choosing the lane, then adapt the relevant snippets to the target repo. - Remove every placeholder before finishing. Do not leave toy commands, dummy tests, generic skill prose, or commented-out future code.
- Validate with the narrowest relevant checks.
Contracts
.elegy-plugin/plugin.jsonis the plugin manifest authority.- Every active Elegy adapter plugin declares a typed
capabilityCatalog. - Use
docs/specs/capability-catalog-v2.mdfor new entries. The v1mcpandapp-bindingvalues are compatibility-only;app-bindingrequires a native Codex app connection binding and is not a portable runtime interface. - New and publishable packages use
elegy-plugin/v3. Keep Codex-native package fields at the top level and put classification, connections, readiness, capability authority, and expected MCP authentication underelegy. - A service slug is not a Codex app ID. Connected Codex plugins require an
explicit opaque
connectionBindingsmapping; the host owns OAuth and connection state. - Never put credentials, tokens, authorization codes, or an authentication flow
in skills, CLI arguments, or MCP tool inputs. Use a host connection or a
credential-owning
elegy-connection-provider/v1. distribution/surfaces.jsonowns marketplace listing order, category, release routing, and wrapper artifact base URLs..elegy/marketplace.jsonis generated. Do not edit it by hand.- Codex plugin output is a derived projection. Preserve native Codex fields
at the v3 top level; export removes only
schemaVersionandelegy. - Declare every MCP server's expected authentication under
elegy.mcpAuthentication. Do not infer OAuth from a remote URL. Forbearer-env, declare only the environment-variable name under Elegy governance and keep the secret outside the package. - Git and npm marketplace sources are descriptor-only today. They must remain
NOT_AVAILABLEuntil a source materializer and installed-task proof exist. - CLI invocation templates are the default integration contract for
clientries.mcp-resourceandmcp-toolentries are direct MCP interfaces, not fallback projections. The legacyfallbackfield has no active runtime consumer and must not drive routing. - Profiles are allowlists, not approvals. Do not treat a profile as permission for side effects.
Validation
Run the checks that match the touched surfaces:
cargo run -p elegy-tooling --bin elegy-plugin-packaging -- marketplace generate --project .
cargo run -p elegy-tooling --bin elegy-plugin-packaging -- marketplace generate --project . --check
cargo run -p elegy-tooling --bin elegy-plugin-packaging -- marketplace validate --source .
cargo run -p elegy-documentation -- check --project .
For Rust-backed plugins, also run the relevant package tests, for example:
cargo test -p <plugin-crate>
References
- Snippets:
references/snippets.md - Architecture entrypoint:
docs/architecture/README.md - Skill authority:
docs/architecture/skill-core-v1.md - Codex projection:
docs/architecture/codex-plugin-projection.md - Marketplace contract:
docs/specs/plugin-marketplace-v2.md
04 同仓库更多 Skills
elegy-skill-authoring
Doctrine for drafting, auditing, and fixing Elegy skills. Use when creating a new skill, running an audit against an existing one, or triaging structural and content findings.
elegy-obsidian
Read, write, and search a local Obsidian vault via the official Obsidian Desktop CLI (v1.12.7+). Non-authoritative convenience layer; durable planning state continues to flow through elegy-planning and SQLite. User-invoked; do not auto-load.
elegy-doc-practices
Use when an agent or contributor needs to classify, place, scaffold, or validate documentation in the Elegy ecosystem — the central doctrine for ADRs, specs, guides, notes, and roadmap material across Elegy and downstream repos.
test-skill
A test skill for the app-binding fixture.
elegy-planning
Use when an agent needs to create, inspect, update, validate, or export durable planning state — goals, roadmaps, plans, work points, todos, issues, review points, insights, and project runs — through the dedicated elegy-planning CLI over SQLite.
elegy-observe
Observe desktop and OS state for agentic workflows. Snapshot running processes, track foreground and visible windows, capture screen, read clipboard, diff filesystem changes, and query system information.