External pre-run initialization layer for Multica agent tasks.
This project does not fork Multica or replace its issue board, runtime daemon, skill registry, or autopilot system. It generates a reviewable Runtime Agent Spec before a task is launched, so a user can inspect the goal, runtime, skills, instruction overlays, capabilities, permission scopes, and initial plan.
Runtime Agent Spec: a stable JSON snapshot for one agent run.Instruction Overlay Diff: workspace, agent, task, comment, and autopilot instruction layers rendered as a review diff.Capability And Permission Review: repos, env keys, secret-like env keys, MCP servers, task token type, scopes, and risk flags.Goal/Plan Ledger Lite: JSONL events fordraft -> locked -> running -> completed.
Create an input JSON file:
{
"goal": "Fix the checkout retry bug",
"task": {
"kind": "issue_assignment",
"taskId": "task-1",
"issueId": "MUL-123",
"prompt": "Fix retry behavior and add tests."
},
"workspace": {
"id": "ws-1",
"name": "Core",
"context": "Prefer small changes.",
"repos": [{ "url": "https://github.com/acme/shop" }]
},
"agent": {
"id": "agent-1",
"name": "Fixer",
"runtimeId": "runtime-1",
"provider": "codex",
"model": "gpt-5-codex",
"instructions": "Use tests first.",
"skills": [
{
"name": "bug-fixer",
"version": "1.0.0",
"permissions": ["repo:write", "shell:write"],
"riskLevel": "high"
}
],
"customEnv": {
"ANTHROPIC_API_KEY": "secret"
},
"mcpServers": ["filesystem"]
},
"permissions": {
"tokenType": "mat_task_scoped",
"ttlMinutes": 1440,
"scopes": ["workspace:read", "issue:comment", "repo:write"]
},
"plan": ["Read issue and comments", "Patch retry code", "Run tests"]
}Generate review artifacts:
node src/cli.js \
--input examples/issue-assignment.json \
--spec-out out/spec.json \
--review-out out/review.md \
--ledger out/ledger.jsonlIf no output files are supplied, the launch review markdown is printed to stdout.
Use this as a pre-submit or pre-launch step around Multica:
- Collect the task description, selected agent, runtime, workspace context, project repos, skills, env keys, MCP servers, and intended permission scopes.
- Generate a draft Runtime Agent Spec and review markdown.
- Have a human review instruction diffs and high-risk capability flags.
- Lock the ledger entry.
- Create or dispatch the Multica issue/task using the locked spec as the launch record.
The MVP is intentionally external. A deeper integration can later store this spec near Multica's task claim flow, but that becomes an upstream PR or fork.
npm test