Goal
Provide an advanced prompt/skill that can design and scaffold a new BTrace extension for a target library, framework, runtime, or external system.
Unlike #906, which migrates an existing legacy integration, this workflow starts from a target system and derives a maintainable extension architecture.
Inputs
The skill should be able to work from one or more of:
- Maven coordinates and supported version range
- a local or remote source repository
- target JARs and API documentation
- example application code
- desired observations, metrics, or probe operations
Workflow
The skill should:
- Inspect the target API, dependency graph, classloading behavior, and version compatibility.
- Identify stable integration points and define the probe-facing use cases.
- Design the bootstrap-safe extension API using
@ServiceDescriptor, Object hand-off, and @ExternalType where appropriate.
- Separate public API from runtime implementation and prevent target-library types from leaking onto the bootstrap classpath.
- Determine required BTrace permissions and explain why each is necessary.
- Implement target interaction through appropriate classloaders, reflection, or cached method handles when direct linkage would be unsafe.
- Create the required
META-INF/services provider declaration.
- Scaffold the
io.btrace.extension Gradle project, metadata, dependencies, shading rules, tests, and documentation.
- Optionally scaffold example probes and a masked fat-agent configuration for deployment.
- Verify API purity, artifact contents, provider loading, supported target versions, and a live first trace.
Design requirements
- Prefer stable public target APIs; clearly flag use of internal or version-sensitive APIs.
- Keep target types out of bootstrap-visible extension interfaces unless explicitly modeled as external types.
- Use the defining/application classloader for target-library interaction.
- Support multiple target versions without silently assuming binary compatibility.
- Fail closed when permissions, provider metadata, or classloading boundaries cannot be established safely.
- Explain generated code and leave clear maintenance/version-upgrade guidance.
Acceptance criteria
Relationship
Related to #906, but intentionally separate:
Goal
Provide an advanced prompt/skill that can design and scaffold a new BTrace extension for a target library, framework, runtime, or external system.
Unlike #906, which migrates an existing legacy integration, this workflow starts from a target system and derives a maintainable extension architecture.
Inputs
The skill should be able to work from one or more of:
Workflow
The skill should:
@ServiceDescriptor,Objecthand-off, and@ExternalTypewhere appropriate.META-INF/servicesprovider declaration.io.btrace.extensionGradle project, metadata, dependencies, shading rules, tests, and documentation.Design requirements
Acceptance criteria
Relationship
Related to #906, but intentionally separate: