@structured-vibe-coding/core 0.4.0 → 0.4.1
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.
|
@@ -518,7 +518,7 @@ async function createChange(input) {
|
|
|
518
518
|
await materializeStageArtifacts(projectRoot, config, id, workflow, meta, firstStage);
|
|
519
519
|
await setActiveChange(projectRoot, config, id);
|
|
520
520
|
try {
|
|
521
|
-
const { refreshActiveAgentContext: refreshActiveAgentContext2 } = await import("./agents-
|
|
521
|
+
const { refreshActiveAgentContext: refreshActiveAgentContext2 } = await import("./agents-ADF5FNBS.js");
|
|
522
522
|
await refreshActiveAgentContext2(projectRoot);
|
|
523
523
|
} catch {
|
|
524
524
|
}
|
|
@@ -738,7 +738,7 @@ async function advanceStage(projectRoot, config, changeId, opts) {
|
|
|
738
738
|
stage
|
|
739
739
|
);
|
|
740
740
|
try {
|
|
741
|
-
const { refreshActiveAgentContext: refreshActiveAgentContext2 } = await import("./agents-
|
|
741
|
+
const { refreshActiveAgentContext: refreshActiveAgentContext2 } = await import("./agents-ADF5FNBS.js");
|
|
742
742
|
await refreshActiveAgentContext2(projectRoot);
|
|
743
743
|
} catch {
|
|
744
744
|
}
|
|
@@ -960,32 +960,32 @@ async function buildAgentPrompt(ctx, config, projectRoot) {
|
|
|
960
960
|
}
|
|
961
961
|
|
|
962
962
|
// src/agents.ts
|
|
963
|
-
var ALL_AGENT_TARGETS = ["copilot", "claude-code"
|
|
963
|
+
var ALL_AGENT_TARGETS = ["copilot", "claude-code"];
|
|
964
964
|
var AGENT_TARGET_OPTIONS = [
|
|
965
965
|
{
|
|
966
966
|
id: "copilot",
|
|
967
967
|
label: "GitHub Copilot",
|
|
968
|
-
hint: ".github/agents/*.agent.md"
|
|
968
|
+
hint: ".github/agents/*.agent.md \u2014 works in VS Code, Cursor, JetBrains, \u2026"
|
|
969
969
|
},
|
|
970
970
|
{
|
|
971
971
|
id: "claude-code",
|
|
972
972
|
label: "Claude Code",
|
|
973
|
-
hint: ".claude/agents/*.md"
|
|
974
|
-
},
|
|
975
|
-
{
|
|
976
|
-
id: "intellij",
|
|
977
|
-
label: "IntelliJ / JetBrains",
|
|
978
|
-
hint: ".idea/sdd-agent-notes.md"
|
|
973
|
+
hint: ".claude/agents/*.md \u2014 CLI / terminal agent"
|
|
979
974
|
}
|
|
980
975
|
];
|
|
981
976
|
function parseAgentTargets(raw) {
|
|
982
977
|
const parts = (Array.isArray(raw) ? raw : [raw]).flatMap((s) => String(s).split(",")).map((s) => s.trim().toLowerCase()).filter(Boolean);
|
|
983
978
|
const out = [];
|
|
984
979
|
for (const p of parts) {
|
|
985
|
-
|
|
980
|
+
if (p === "intellij" || p === "idea" || p === "jetbrains" || p === "vscode" || p === "vs-code" || p === "cursor") {
|
|
981
|
+
throw new Error(
|
|
982
|
+
`"${p}" is an IDE, not an AI coding agent. Choose: copilot (GitHub Copilot in any IDE) or claude-code.`
|
|
983
|
+
);
|
|
984
|
+
}
|
|
985
|
+
const id = p === "claude" || p === "claude-code" || p === "claudecode" ? "claude-code" : p === "github-copilot" || p === "gh-copilot" || p === "copilot" ? "copilot" : p;
|
|
986
986
|
if (!ALL_AGENT_TARGETS.includes(id)) {
|
|
987
987
|
throw new Error(
|
|
988
|
-
`Unknown agent
|
|
988
|
+
`Unknown AI coding agent "${p}". Choose one of: ${ALL_AGENT_TARGETS.join(", ")}`
|
|
989
989
|
);
|
|
990
990
|
}
|
|
991
991
|
if (!out.includes(id)) out.push(id);
|
|
@@ -1034,7 +1034,7 @@ var SDD_AGENT_ROLES = [
|
|
|
1034
1034
|
async function installAgentIntegrations(opts) {
|
|
1035
1035
|
if (!opts.targets?.length) {
|
|
1036
1036
|
throw new Error(
|
|
1037
|
-
`Specify at least one agent
|
|
1037
|
+
`Specify at least one AI coding agent: ${ALL_AGENT_TARGETS.join(", ")} (not an IDE; do not install all by default)`
|
|
1038
1038
|
);
|
|
1039
1039
|
}
|
|
1040
1040
|
const targets = opts.targets;
|
|
@@ -1053,23 +1053,16 @@ async function installAgentIntegrations(opts) {
|
|
|
1053
1053
|
};
|
|
1054
1054
|
await write(join4(".sdd", "protocol.md"), PROTOCOL_MD);
|
|
1055
1055
|
await refreshActiveAgentContext(root);
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
await write(`.github/agents/${role.id}.agent.md`, body);
|
|
1064
|
-
}
|
|
1056
|
+
for (const role of SDD_AGENT_ROLES) {
|
|
1057
|
+
const body = renderThinAgent(role);
|
|
1058
|
+
if (targets.includes("claude-code")) {
|
|
1059
|
+
await write(`.claude/agents/${role.id}.md`, body);
|
|
1060
|
+
}
|
|
1061
|
+
if (targets.includes("copilot")) {
|
|
1062
|
+
await write(`.github/agents/${role.id}.agent.md`, body);
|
|
1065
1063
|
}
|
|
1066
1064
|
}
|
|
1067
|
-
|
|
1068
|
-
await write(".idea/sdd-agent-notes.md", INTELLIJ_NOTES);
|
|
1069
|
-
}
|
|
1070
|
-
if (targets.includes("copilot") || targets.includes("claude-code") || targets.includes("intellij")) {
|
|
1071
|
-
await write("AGENTS.md", AGENTS_MD_THIN);
|
|
1072
|
-
}
|
|
1065
|
+
await write("AGENTS.md", renderAgentsMd(targets));
|
|
1073
1066
|
await write(
|
|
1074
1067
|
join4(".sdd", "agents.json"),
|
|
1075
1068
|
JSON.stringify(
|
|
@@ -1214,31 +1207,36 @@ sdd complete
|
|
|
1214
1207
|
- Deleting \`.sdd\` / archive history
|
|
1215
1208
|
- Claiming complete without verify when required
|
|
1216
1209
|
`;
|
|
1217
|
-
|
|
1210
|
+
function renderAgentsMd(targets) {
|
|
1211
|
+
const rows = [];
|
|
1212
|
+
if (targets.includes("claude-code")) {
|
|
1213
|
+
rows.push(
|
|
1214
|
+
"| Claude Code | `.claude/agents/` (`sdd`, `sdd-planner`, `sdd-implementer`, `sdd-reviewer`) |"
|
|
1215
|
+
);
|
|
1216
|
+
}
|
|
1217
|
+
if (targets.includes("copilot")) {
|
|
1218
|
+
rows.push(
|
|
1219
|
+
"| GitHub Copilot | `.github/agents/*.agent.md` (same roles; any IDE that supports Copilot agents) |"
|
|
1220
|
+
);
|
|
1221
|
+
}
|
|
1222
|
+
return `# Agents
|
|
1218
1223
|
|
|
1219
1224
|
This repo uses **SDD agents only** (no skills).
|
|
1220
1225
|
|
|
1226
|
+
AI coding agents are **not** the same as IDEs: VS Code, Cursor, and IntelliJ host tools like Copilot or Claude Code.
|
|
1227
|
+
|
|
1221
1228
|
| Read first | |
|
|
1222
1229
|
|------------|--|
|
|
1223
1230
|
| Live task | \`.sdd/active-context.md\` |
|
|
1224
1231
|
| Playbook | \`.sdd/protocol.md\` |
|
|
1225
1232
|
|
|
1226
|
-
|
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
| GitHub Copilot | \`.github/agents/*.agent.md\` (same roles) |
|
|
1233
|
+
| AI agent | Files |
|
|
1234
|
+
|----------|--------|
|
|
1235
|
+
${rows.join("\n")}
|
|
1230
1236
|
|
|
1231
1237
|
Refresh context: \`sdd agents refresh\`.
|
|
1232
1238
|
`;
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
Agents only. Playbook: \`.sdd/protocol.md\`. Live: \`.sdd/active-context.md\`.
|
|
1236
|
-
|
|
1237
|
-
1. Install \`sdd\` on PATH: \`npm i -g @structured-vibe-coding/cli\`
|
|
1238
|
-
2. Tools \u2192 SDD \u2192 Initialize / Install Agent Integrations
|
|
1239
|
-
3. GitHub Copilot uses \`.github/agents/*\` + active-context (same as VS Code)
|
|
1240
|
-
4. After stage changes: **Refresh Agent Context**
|
|
1241
|
-
`;
|
|
1239
|
+
}
|
|
1242
1240
|
|
|
1243
1241
|
export {
|
|
1244
1242
|
GateSchema,
|
package/dist/index.d.ts
CHANGED
|
@@ -1164,9 +1164,13 @@ declare function completeChange(projectRoot: string, config: Config, changeId: s
|
|
|
1164
1164
|
declare function formatStatus(ctx: ChangeContext): string;
|
|
1165
1165
|
declare function buildAgentPrompt(ctx: ChangeContext, config: Config, projectRoot: string): Promise<string>;
|
|
1166
1166
|
|
|
1167
|
-
|
|
1167
|
+
/**
|
|
1168
|
+
* AI coding agents (not IDEs).
|
|
1169
|
+
* VS Code / Cursor / IntelliJ are editors; they host tools like Copilot or Claude Code.
|
|
1170
|
+
*/
|
|
1171
|
+
type AgentTarget = "copilot" | "claude-code";
|
|
1168
1172
|
declare const ALL_AGENT_TARGETS: AgentTarget[];
|
|
1169
|
-
/** Human-facing labels for interactive
|
|
1173
|
+
/** Human-facing labels for interactive AI-agent pick (CLI / IDE). */
|
|
1170
1174
|
declare const AGENT_TARGET_OPTIONS: {
|
|
1171
1175
|
id: AgentTarget;
|
|
1172
1176
|
label: string;
|
|
@@ -1214,9 +1218,10 @@ interface InitOptions {
|
|
|
1214
1218
|
force?: boolean;
|
|
1215
1219
|
pack?: "default" | "enterprise";
|
|
1216
1220
|
/**
|
|
1217
|
-
*
|
|
1221
|
+
* AI coding agents to install (copilot | claude-code). Not IDEs.
|
|
1222
|
+
* Opt-in only — never defaults to all agents.
|
|
1218
1223
|
* - omit / `false` — no agent files
|
|
1219
|
-
* - `AgentTarget[]` — install only those
|
|
1224
|
+
* - `AgentTarget[]` — install only those AI agents
|
|
1220
1225
|
*/
|
|
1221
1226
|
agents?: false | AgentTarget[];
|
|
1222
1227
|
}
|
package/dist/index.js
CHANGED