thevoidforge 21.0.4 → 21.0.5

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.
@@ -148,8 +148,10 @@ function sendJson(res, status, data) {
148
148
  res.end(JSON.stringify(data));
149
149
  }
150
150
  // ── Route Registration ──────────────────────────────
151
- addRoute('GET', '/api/blueprint/detect', async (_req, res) => {
152
- const projectRoot = process.cwd();
151
+ addRoute('GET', '/api/blueprint/detect', async (req, res) => {
152
+ const url = new URL(req.url ?? '/', `http://${req.headers.host ?? 'localhost'}`);
153
+ const dirParam = url.searchParams.get('dir');
154
+ const projectRoot = dirParam && dirParam !== 'undefined' ? dirParam : process.cwd();
153
155
  const prdPath = join(projectRoot, 'docs/PRD.md');
154
156
  if (existsSync(prdPath)) {
155
157
  const content = await readFile(prdPath, 'utf-8');
@@ -177,10 +177,11 @@
177
177
  }
178
178
 
179
179
  // Blueprint auto-detection: when moving from Step 3 → Step 4,
180
- // check if docs/PRD.md already exists in the project directory
180
+ // check if docs/PRD.md already exists in the TARGET project directory (not CWD).
181
+ // During init, the project dir doesn't exist yet — detection is skipped.
181
182
  if (currentStep === 3 && state.projectDir) {
182
183
  try {
183
- const detectRes = await fetch('/api/blueprint/detect');
184
+ const detectRes = await fetch('/api/blueprint/detect?dir=' + encodeURIComponent(state.projectDir));
184
185
  const detectData = await detectRes.json();
185
186
  if (detectData.detected) {
186
187
  const blueprintBanner = $('#blueprint-detection');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thevoidforge",
3
- "version": "21.0.4",
3
+ "version": "21.0.5",
4
4
  "description": "From nothing, everything. A methodology framework for building with Claude Code.",
5
5
  "type": "module",
6
6
  "engines": {