@aexol/spectral 0.6.3 → 0.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/relay/auto-research.js +33 -1
- package/package.json +1 -1
|
@@ -46,7 +46,39 @@ function findAgentDef(projectPath) {
|
|
|
46
46
|
continue;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
|
|
49
|
+
// Hardcoded fallback: system prompt for when the agent definition file
|
|
50
|
+
// is not found in the project or user agent directories. This ensures
|
|
51
|
+
// auto-research works out of the box on first use.
|
|
52
|
+
return getDefaultAgentDef();
|
|
53
|
+
}
|
|
54
|
+
/** Default agent definition used as a fallback when no agent .md file exists. */
|
|
55
|
+
function getDefaultAgentDef() {
|
|
56
|
+
return {
|
|
57
|
+
model: "claude-sonnet-4-5",
|
|
58
|
+
systemPrompt: [
|
|
59
|
+
"You are an auto-research agent. Analyze the project and generate custom",
|
|
60
|
+
"pi coding agent extensions. Output ONLY JSON lines (one per line).",
|
|
61
|
+
"",
|
|
62
|
+
"## Process",
|
|
63
|
+
'1. Context: emit {"type":"progress","phase":"context_collecting","message":"..."}',
|
|
64
|
+
'2. Analysis: emit {"type":"progress","phase":"context_analyzing","message":"..."}',
|
|
65
|
+
'3. Generation: emit {"type":"progress","phase":"extension_generating","message":"..."}',
|
|
66
|
+
'4. Validation: emit {"type":"progress","phase":"extension_validating","message":"..."}',
|
|
67
|
+
"",
|
|
68
|
+
"## Extension categories",
|
|
69
|
+
"A. Workflow automation B. Code gen C. Project-specific tools",
|
|
70
|
+
"D. Quality/review E. Documentation F. LLM-powered G. Stateful",
|
|
71
|
+
"",
|
|
72
|
+
'When you generate an extension, emit:',
|
|
73
|
+
'{"type":"extension_generated","name":"...","path":"...","description":"...","usesLLM":bool,"fileCount":n}',
|
|
74
|
+
"Extensions go under .pi/extensions/auto-research/",
|
|
75
|
+
"",
|
|
76
|
+
'When done, emit: {"type":"done","extensions":[...]}',
|
|
77
|
+
"",
|
|
78
|
+
"IMPORTANT: Output ONLY JSON lines. No markdown, no code blocks.",
|
|
79
|
+
"Each line must be a single valid JSON object.",
|
|
80
|
+
].join("\n"),
|
|
81
|
+
};
|
|
50
82
|
}
|
|
51
83
|
// ---------------------------------------------------------------------------
|
|
52
84
|
// Helpers
|