Quickstart
Compile one canonical manifest into native project artifacts.
1. Define a manifest
import type { Manifest } from '@jstn-sdk/agents';
const manifest: Manifest = {
version: 1,
project: { name: 'my-app', stack: ['typescript'] },
instructions: ['Run tests and type checks before completion'],
skills: {
architecture-review: {
description: 'Review architecture boundaries',
instructions: ['Check dependency direction'],
triggers: ['architecture', 'refactor'],
},
},
};Install the package first with npm install @jstn-sdk/agents. The SDK accepts
objects; if your source is YAML, parse it in your application before calling
the API.
2. Detect environments
import { Agents } from '@jstn-sdk/agents';
const detected = await Agents.detect('./my-project');Detection uses repository files and directories. It does not require vendor binaries to be installed.
3. Compile and validate
const result = await Agents.compile(manifest, {
targets: detected.map((item) => item.id),
output: './my-project',
});
const report = await Agents.validate('./my-project');Use dryRun: true to preview writes. Managed blocks are updated without replacing unrelated user content.
4. Make validation a gate
if (!report.valid) {
console.error(report.summary);
process.exitCode = 1;
}For the complete field reference, see Manifest reference.