@structured-vibe-coding/core 0.17.1 → 0.18.0
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/defaults/prices.yaml +9 -0
- package/defaults/search.yaml +18 -0
- package/dist/{agents-CLTJJVOD.js → agents-AKSUXQHN.js} +18 -7
- package/dist/{change-context-W4HDO2IK.js → change-context-REE7UKU7.js} +2 -4
- package/dist/chunk-44LQ5BKZ.js +2628 -0
- package/dist/{chunk-KYWETNFU.js → chunk-4BRO7BOJ.js} +2 -4
- package/dist/chunk-4PIRWYRA.js +1125 -0
- package/dist/{chunk-72QJHR53.js → chunk-LHSR7JG2.js} +569 -39
- package/dist/{chunk-EPFURATC.js → chunk-O5SP6X5R.js} +89 -0
- package/dist/{chunk-BGM6KS64.js → chunk-QGP43XCN.js} +2 -2
- package/dist/{chunk-A752UVPF.js → chunk-QHV5KZKX.js} +193 -28
- package/dist/{gather-S4A5YR7X.js → gather-ZNV2NAUN.js} +3 -4
- package/dist/{greenfield-QQJH3XL3.js → greenfield-I5S5OS2D.js} +5 -6
- package/dist/index.d.ts +1034 -40
- package/dist/index.js +2927 -988
- package/dist/{sources-PF45EUH2.js → sources-3TXUPU6V.js} +2 -3
- package/package.json +11 -3
- package/vendor/tree-sitter/NOTICE +29 -0
- package/vendor/tree-sitter/tree-sitter-javascript.wasm +0 -0
- package/vendor/tree-sitter/tree-sitter-python.wasm +0 -0
- package/vendor/tree-sitter/tree-sitter-rust.wasm +0 -0
- package/vendor/tree-sitter/tree-sitter-tsx.wasm +0 -0
- package/vendor/tree-sitter/tree-sitter-typescript.wasm +0 -0
- package/dist/chunk-67AUAGNV.js +0 -150
- package/dist/chunk-7MJYPJMR.js +0 -51
- package/dist/chunk-BVCTVKBD.js +0 -538
- package/dist/chunk-WHDG6OTG.js +0 -46
- package/dist/chunk-WPAGUBZ5.js +0 -139
- package/dist/config-X5VDBVR4.js +0 -16
- package/dist/fs-J6DIV6CX.js +0 -28
- package/dist/paths-64GA32IZ.js +0 -28
package/dist/chunk-WPAGUBZ5.js
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getStage,
|
|
3
|
-
isStageSkipped,
|
|
4
|
-
shouldAutoSkip
|
|
5
|
-
} from "./chunk-A752UVPF.js";
|
|
6
|
-
|
|
7
|
-
// src/agent-handoff.ts
|
|
8
|
-
import { join } from "pathe";
|
|
9
|
-
function formatStatus(ctx) {
|
|
10
|
-
const lines = [];
|
|
11
|
-
lines.push(`Change: ${ctx.meta.title}`);
|
|
12
|
-
lines.push(`ID: ${ctx.id}`);
|
|
13
|
-
lines.push(`Status: ${ctx.meta.status}`);
|
|
14
|
-
lines.push(`Workflow: ${ctx.meta.workflow}`);
|
|
15
|
-
lines.push(`Path: ${ctx.path}`);
|
|
16
|
-
lines.push("");
|
|
17
|
-
lines.push("Stages:");
|
|
18
|
-
for (const stage of ctx.stages) {
|
|
19
|
-
const skipped = isStageSkipped(ctx.meta, stage.id) || shouldAutoSkip(stage, ctx.meta);
|
|
20
|
-
let mark = " ";
|
|
21
|
-
if (skipped) mark = "\xB7";
|
|
22
|
-
else if (stage.id === ctx.meta.stage) mark = "\u25CF";
|
|
23
|
-
else {
|
|
24
|
-
const order = ctx.active.map((s) => s.id);
|
|
25
|
-
const cur = order.indexOf(ctx.meta.stage);
|
|
26
|
-
const idx = order.indexOf(stage.id);
|
|
27
|
-
if (idx >= 0 && cur >= 0 && idx < cur) mark = "\u2713";
|
|
28
|
-
}
|
|
29
|
-
const gate = ctx.meta.gates?.[stage.id];
|
|
30
|
-
const gateInfo = gate ? ` [${gate.status}]` : "";
|
|
31
|
-
const skipInfo = skipped ? " (skipped)" : "";
|
|
32
|
-
lines.push(
|
|
33
|
-
` [${mark}] ${stage.id}${stage.title ? ` \u2014 ${stage.title}` : ""}${gateInfo}${skipInfo}`
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
if (ctx.meta.overrides?.skip_stages?.length) {
|
|
37
|
-
lines.push("");
|
|
38
|
-
lines.push(`Overrides: skip=${ctx.meta.overrides.skip_stages.join(", ")}`);
|
|
39
|
-
}
|
|
40
|
-
return lines.join("\n");
|
|
41
|
-
}
|
|
42
|
-
async function buildAgentPrompt(ctx, config, projectRoot) {
|
|
43
|
-
const stage = getStage(ctx.workflow, ctx.meta, ctx.meta.stage);
|
|
44
|
-
const parts = [];
|
|
45
|
-
parts.push(`# SDD Agent Handoff`);
|
|
46
|
-
parts.push("");
|
|
47
|
-
parts.push(`You are implementing a change under Structured Vibe Coding (local SDD).`);
|
|
48
|
-
parts.push("");
|
|
49
|
-
parts.push(`## Change`);
|
|
50
|
-
parts.push(`- Title: ${ctx.meta.title}`);
|
|
51
|
-
parts.push(`- ID: ${ctx.id}`);
|
|
52
|
-
parts.push(`- Workflow: ${ctx.meta.workflow}`);
|
|
53
|
-
parts.push(`- Current stage: ${ctx.meta.stage}${stage?.title ? ` (${stage.title})` : ""}`);
|
|
54
|
-
parts.push(`- Change path: ${ctx.path}`);
|
|
55
|
-
parts.push("");
|
|
56
|
-
if (stage?.summary) {
|
|
57
|
-
parts.push(`## Stage goal`);
|
|
58
|
-
parts.push(stage.summary);
|
|
59
|
-
parts.push("");
|
|
60
|
-
}
|
|
61
|
-
if (stage?.agent_context?.instructions) {
|
|
62
|
-
parts.push(`## Instructions`);
|
|
63
|
-
parts.push(stage.agent_context.instructions);
|
|
64
|
-
parts.push("");
|
|
65
|
-
}
|
|
66
|
-
parts.push(`## Constraints`);
|
|
67
|
-
parts.push(`- Follow artifacts in the change directory as source of truth.`);
|
|
68
|
-
parts.push(`- Honor \`memory/constitution.md\` when present (non-negotiables).`);
|
|
69
|
-
parts.push(`- Do not skip ARB/decision constraints if present.`);
|
|
70
|
-
parts.push(`- Local development only \u2014 verify on this machine.`);
|
|
71
|
-
parts.push(`- Prefer small, reviewable commits.`);
|
|
72
|
-
parts.push("");
|
|
73
|
-
parts.push(`## Artifacts to read`);
|
|
74
|
-
const memoryHint = join(projectRoot, config.memory_path);
|
|
75
|
-
parts.push(`- Documentation map (if present): ${memoryHint}/index.md`);
|
|
76
|
-
parts.push(`- Memory: ${memoryHint}/`);
|
|
77
|
-
for (const s of ctx.stages) {
|
|
78
|
-
for (const a of s.artifacts) {
|
|
79
|
-
parts.push(`- ${join(ctx.path, a.path)}`);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
parts.push("");
|
|
83
|
-
parts.push(`## Current stage artifacts`);
|
|
84
|
-
if (stage) {
|
|
85
|
-
for (const a of stage.artifacts) {
|
|
86
|
-
parts.push(`- ${a.path}${a.required ? " (required)" : ""}`);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
parts.push("");
|
|
90
|
-
const stageId = ctx.meta.stage;
|
|
91
|
-
if (stageId === "implement" || stageId === "local_verify") {
|
|
92
|
-
parts.push(`## Code context (product code)`);
|
|
93
|
-
parts.push("");
|
|
94
|
-
parts.push(`Process context above is not enough for product code structure.`);
|
|
95
|
-
parts.push(`When you need symbols, callers, or package-boundary context:`);
|
|
96
|
-
parts.push(
|
|
97
|
-
`1. Run: \`sdd context\` (optional: \`--path \u2026\`, \`--symbol \u2026\`, \`--out change\`)`
|
|
98
|
-
);
|
|
99
|
-
parts.push(`2. If present, read: \`changes/${ctx.id}/code-context.md\` (regenerate if stale)`);
|
|
100
|
-
parts.push(
|
|
101
|
-
`3. Org libraries / remote AST: \`.sdd/mcp.yaml\` sources via \`sdd mcp sources\` / \`sdd mcp fetch\``
|
|
102
|
-
);
|
|
103
|
-
parts.push(`Do not dump unbounded source into the prompt; prefer sliced / MCP output.`);
|
|
104
|
-
parts.push("");
|
|
105
|
-
}
|
|
106
|
-
try {
|
|
107
|
-
const { loadMcpConfig } = await import("./sources-PF45EUH2.js");
|
|
108
|
-
const { gatherMcpContextForChange, formatMcpContextForHandoff } = await import("./gather-S4A5YR7X.js");
|
|
109
|
-
const mcpCfg = await loadMcpConfig(projectRoot);
|
|
110
|
-
if (mcpCfg.auto_fetch_on_handoff && mcpCfg.sources.length) {
|
|
111
|
-
const fetched = await gatherMcpContextForChange(projectRoot, ctx);
|
|
112
|
-
const block = formatMcpContextForHandoff(fetched.filter((r) => r.ok || r.error));
|
|
113
|
-
if (block) {
|
|
114
|
-
parts.push(block);
|
|
115
|
-
}
|
|
116
|
-
} else if (mcpCfg.sources.length === 0) {
|
|
117
|
-
parts.push(`## External MCP sources`);
|
|
118
|
-
parts.push("");
|
|
119
|
-
parts.push(`No sources in \`.sdd/mcp.yaml\` yet. To attach org libraries / AST engines:`);
|
|
120
|
-
parts.push(`\`sdd mcp sources add --help\` \xB7 docs: Configure MCP sources`);
|
|
121
|
-
parts.push("");
|
|
122
|
-
}
|
|
123
|
-
} catch (err) {
|
|
124
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
125
|
-
parts.push(`## External MCP sources`);
|
|
126
|
-
parts.push("");
|
|
127
|
-
parts.push(`_MCP auto-fetch skipped (non-fatal): ${msg}_`);
|
|
128
|
-
parts.push("");
|
|
129
|
-
}
|
|
130
|
-
parts.push(
|
|
131
|
-
`When done with this stage, the human will run \`sdd next\` or \`sdd verify\` / \`sdd complete\`.`
|
|
132
|
-
);
|
|
133
|
-
return parts.join("\n");
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
export {
|
|
137
|
-
formatStatus,
|
|
138
|
-
buildAgentPrompt
|
|
139
|
-
};
|
package/dist/config-X5VDBVR4.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
defaultConfig,
|
|
3
|
-
isInitialized,
|
|
4
|
-
loadConfig,
|
|
5
|
-
saveConfig
|
|
6
|
-
} from "./chunk-WHDG6OTG.js";
|
|
7
|
-
import "./chunk-67AUAGNV.js";
|
|
8
|
-
import "./chunk-MHODNFIL.js";
|
|
9
|
-
import "./chunk-7MJYPJMR.js";
|
|
10
|
-
import "./chunk-EPFURATC.js";
|
|
11
|
-
export {
|
|
12
|
-
defaultConfig,
|
|
13
|
-
isInitialized,
|
|
14
|
-
loadConfig,
|
|
15
|
-
saveConfig
|
|
16
|
-
};
|
package/dist/fs-J6DIV6CX.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
copyDir,
|
|
3
|
-
copyDirSkipExisting,
|
|
4
|
-
ensureDir,
|
|
5
|
-
listDirs,
|
|
6
|
-
listFiles,
|
|
7
|
-
pathExists,
|
|
8
|
-
readText,
|
|
9
|
-
readYaml,
|
|
10
|
-
removePath,
|
|
11
|
-
writeText,
|
|
12
|
-
writeTextIfMissing,
|
|
13
|
-
writeYaml
|
|
14
|
-
} from "./chunk-EPFURATC.js";
|
|
15
|
-
export {
|
|
16
|
-
copyDir,
|
|
17
|
-
copyDirSkipExisting,
|
|
18
|
-
ensureDir,
|
|
19
|
-
listDirs,
|
|
20
|
-
listFiles,
|
|
21
|
-
pathExists,
|
|
22
|
-
readText,
|
|
23
|
-
readYaml,
|
|
24
|
-
removePath,
|
|
25
|
-
writeText,
|
|
26
|
-
writeTextIfMissing,
|
|
27
|
-
writeYaml
|
|
28
|
-
};
|
package/dist/paths-64GA32IZ.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SDD_DIR,
|
|
3
|
-
activePointerPath,
|
|
4
|
-
archiveDir,
|
|
5
|
-
changeMetaPath,
|
|
6
|
-
changePath,
|
|
7
|
-
changesDir,
|
|
8
|
-
configPath,
|
|
9
|
-
domainsDir,
|
|
10
|
-
memoryDir,
|
|
11
|
-
sddRoot,
|
|
12
|
-
templatesDir,
|
|
13
|
-
workflowsDir
|
|
14
|
-
} from "./chunk-7MJYPJMR.js";
|
|
15
|
-
export {
|
|
16
|
-
SDD_DIR,
|
|
17
|
-
activePointerPath,
|
|
18
|
-
archiveDir,
|
|
19
|
-
changeMetaPath,
|
|
20
|
-
changePath,
|
|
21
|
-
changesDir,
|
|
22
|
-
configPath,
|
|
23
|
-
domainsDir,
|
|
24
|
-
memoryDir,
|
|
25
|
-
sddRoot,
|
|
26
|
-
templatesDir,
|
|
27
|
-
workflowsDir
|
|
28
|
-
};
|