Add agent skill for creating integration packages, with AdonisJS and Nuxt as proof#671
Add agent skill for creating integration packages, with AdonisJS and Nuxt as proof#6712chanhaeng wants to merge 10 commits intofedify-dev:mainfrom
Conversation
Replace @david/dax process spawning with node:child_process.spawn() using detached: true to create a new process group. On cleanup, use process.kill(-child.pid, 'SIGKILL') to terminate the entire process group, ensuring all descendant processes (tsx watch, dotenvx, etc.) are killed. @david/dax's CommandChild.kill() only sends a signal through its internal KillSignal abstraction, which cannot propagate to the full OS process tree. This is a known limitation (dsherret/dax#351). Closes: fedify-dev#667 Co-Authored-By: GitHub Copilot <noreply@github.com>
…-package` skill in one-shot No error while `mise test:init`.
…skill in one-shot The agent did not automatically formatted, so it was manually formatted by a human. No error while `mise test:init`.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds agent skill and example templates for creating framework integration packages; introduces Adonis and Nuxt integration packages with examples, updates init scaffolding/templates to support both frameworks, and adjusts workspace/config/docs (changelog, contributing, examples, workspace manifests). Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Nuxt_Nitro as Nitro/Event Pipeline
participant FedifyHandler as `@fedify/nuxt.fedifyHandler`
participant Federation as Federation Instance
participant ErrorHandler as `@fedify/nuxt.fedifyErrorHandler`
Client->>Nuxt_Nitro: HTTP Request (Accept: application/activity+json)
Nuxt_Nitro->>FedifyHandler: invoke handler(event)
FedifyHandler->>Federation: federation.fetch(Request, {contextData})
Federation-->>FedifyHandler: Response (status 200 / 404 / 406)
alt status 200
FedifyHandler->>Nuxt_Nitro: event.respondWith(Response)
Nuxt_Nitro-->>Client: Response (ActivityPub JSON)
else status 404
FedifyHandler-->>Nuxt_Nitro: return (allow Nuxt routing)
Nuxt_Nitro->>Nuxt_Nitro: proceed to route (may throw 404)
Nuxt_Nitro-->>Client: route response or 404
else status 406
FedifyHandler->>Nuxt_Nitro: store Response in event.context
FedifyHandler-->>Nuxt_Nitro: return (defer)
Nuxt_Nitro->>ErrorHandler: error handling stage (error thrown or 404)
ErrorHandler->>Nuxt_Nitro: if stored 406 and error is 404 -> respondWith(stored 406)
Nuxt_Nitro-->>Client: Response (406 ActivityPub JSON)
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~70 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces integration packages for AdonisJS and Nuxt, accompanied by example applications and updates to the @fedify/init package. It also adds a new AI agent skill to provide a structured workflow for creating future framework integrations. Feedback includes a recommendation to define a command for the 'dev' script in the integration package template and a suggestion to implement error logging for child processes within the server test utility.
| // `dev` script STRONGLY RECOMMENDED for `mise test:example`. | ||
| // Other scripts can be added as needed. | ||
| // Follow the convention of the framework you are integrating with. | ||
| "dev": "" |
| }); | ||
|
|
||
| // Prevent unhandled exception when the process is killed | ||
| child.on("error", () => {}); |
|
Too big to review. |
Summary
Closes #653, #139, #149.
Background
Most Fedify integration packages follow the same pattern: wrap
federation.fetch()as middleware. This PR adds an AI coding agent skill that automates the entire workflow—from framework research through package creation,fedify initsupport, example apps, and testing.To prove the skill works, two integrations were created with it in a single exchange each:
@fedify/adonis— by Claude Opus 4.6@fedify/nuxt— by GPT 5.4Changes
create-integration-packageskill.agents/skills/create-integration-package/SKILL.mdwith step-by-step guide and reference templates (package/,example/,init/) covering framework research, package implementation,fedify initintegration, example creation, and testing.@fedify/adonis(#139)fedify inittemplates, example app, test registration@fedify/nuxt(#149)fedifyHandler()(server middleware) andfedifyErrorHandler()(Nitro error handler) for shared-path content negotiationfedify inittemplates, example app, test registrationCo-Authored-By: Claude Opus 4.6 (Anthropic), GPT 5.4 (OpenAI)