AX principles + go/agent + core/agent + php/agent specs. Temporary — needed in-repo until core-agent mount bug is fixed. Co-Authored-By: Virgil <virgil@lethean.io>
4.2 KiB
Plugin Restructure: dappcore → core + API/MCP Integration
Context
3 skeleton plugins (core-go, core-php, infra) need building out. The go-agent repo has 67 commands across 11 plugins that can enrich them. Plugins need configuring to work with {api,mcp}.lthn.sh endpoints (JSON via Accept header, default returns HTML).
Step 1: Rename dappcore-go → core-go
Files to modify:
plugins/dappcore-go/.claude-plugin/plugin.json— change name, update metadata- Rename directory:
dappcore-go/→core-go/
Keep existing skills (they're solid):
core/SKILL.md— CLI reference & decision treecore-go/SKILL.md— Go framework patterns (pkg structure, CLI helpers, i18n, test naming)go-agent/SKILL.md— Autonomous dev workflow (7-step loop, PR management, CodeRabbit)
Add from go-agent/claude/code:
commands/qa.md— QA fix loop (from code plugin, Go-specific)commands/commit.md— Smart conventional commitcommands/review.md— Code review (from review plugin)commands/verify.md— Verification gate (from verify plugin)
Add agents:
agents/go-developer.md— Go dev agent persona (derived from go-agent skill)
Add:
README.mdmarketplace.yaml(template from agentic-flows)
Step 2: Rename dappcore-php → core-php
Files to modify:
plugins/dappcore-php/.claude-plugin/plugin.json— change name, update metadata- Rename directory:
dappcore-php/→core-php/
Keep existing skills:
core-php/SKILL.md— Module structure, Boot class, Action pattern, multi-tenantphp-agent/SKILL.md— Autonomous PHP dev workflow (TDD, CodeRabbit, issue loop)
Add from go-agent/claude/code:
commands/qa.md— QA fix loop (PHP-specific: pest, pint, analyse)commands/commit.md— Smart conventional commitcommands/review.md— Code reviewcommands/verify.md— Verification gate
Add agents:
agents/php-developer.md— PHP/Laravel dev agent persona
Add:
README.mdmarketplace.yaml
Step 3: Update infra plugin
Keep existing skills (content is detailed and good):
infra/SKILL.md— Machine inventory, NOC services, network configgitea/SKILL.md— Forge/Forgejo CLI commands, org structure, mirrors
Rename skill: agents/ → brand/ (it's about Vi mascot & brand voice, not agent definitions)
Add agents:
agents/infra-ops.md— Infrastructure operations agent
Add from go-agent/claude/coolify:
commands/deploy.md— Service deploymentcommands/status.md— Deployment status check
Add:
README.mdmarketplace.yaml
Fix plugin.json: Update skill references after rename
Step 4: API/MCP endpoint configuration
Add a shared skill or pattern file that documents the endpoint convention for all plugins:
Create core-go/skills/api-endpoints/SKILL.md (and symlink or copy to core-php, infra):
Content covers:
api.lthn.sh— REST APImcp.lthn.sh— MCP bridge endpoint- Must send
Accept: application/json— default returns HTML - Must send
Content-Type: application/jsonfor POST bodies - Auth: Bearer token in
Authorizationheader - REST convention:
/v1/{resource} - This is both OSS (people run their own lthn.sh) and production
Update .mcp.json in core-go and core-php to reference core mcp serve (same pattern as agentic-flows).
Step 5: Add marketplace.yaml to all 3 plugins
Template from agentic-flows, adjusted per plugin:
marketplace:
registry: forge.lthn.ai
organization: core
repository: {plugin-name}
auto_update: true
check_interval: 24h
Verification
- Check plugin structure matches convention:
.claude-plugin/plugin.jsonat root, commands/agents/skills at root level - Validate all SKILL.md files have proper YAML frontmatter
- Validate all command .md files have proper frontmatter with name/description
- Confirm no hardcoded paths (use
${CLAUDE_PLUGIN_ROOT}where needed) - Test that
core mcp servestill works with updated .mcp.json configs
Out of Scope
- lethean & cryptonote-archive plugins (reference material)
- go-agent/claude/ plugins (stay in Go repo, not merged into shared plugins)
- EaaS subsystem references (stripped for OSS release)
- Codex/Gemini plugins (stay in go-agent)