karajan-code 4.20.0 → 4.20.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "karajan-code",
3
- "version": "4.20.0",
3
+ "version": "4.20.1",
4
4
  "description": "Local multi-agent coding orchestrator with TDD, SonarQube, and code review pipeline",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0",
@@ -80,7 +80,11 @@ export async function startCommand({ task = "", config, logger, flags = {}, deps
80
80
  const spawn = deps.spawnKj || spawnKj;
81
81
  const makeWizard = deps.makeWizard || (() => createWizard());
82
82
 
83
- const bundle = await sweep(config.projectDir, { declared: flags.maturity || null });
83
+ // KJC-BUG-0145 (campo, #1471): loadConfig never sets projectDir — passing
84
+ // config.projectDir straight through handed `undefined` to the sweep, every
85
+ // collector failed silently and the project read as "new, no source code".
86
+ const projectDir = config.projectDir || process.cwd();
87
+ const bundle = await sweep(projectDir, { declared: flags.maturity || null });
84
88
  const { text, summary } = assess(bundle);
85
89
  let result = await decide({ task, text, config, logger, makeDecider });
86
90
 
@@ -111,7 +115,7 @@ export async function startCommand({ task = "", config, logger, flags = {}, deps
111
115
  // Dispatch the chosen intent to its saved command, confirming first (it writes).
112
116
  const toArgs = DISPATCH[result.intent];
113
117
  if (interactive && toArgs && (await confirmApply(makeWizard))) {
114
- await spawn(toArgs(goal), { cwd: config.projectDir });
118
+ await spawn(toArgs(goal), { cwd: projectDir });
115
119
  }
116
120
  return { ok: true, intent: result.intent };
117
121
  }
@@ -112,6 +112,9 @@ function readRagStatus(projectDir) {
112
112
  * declared = user-declared maturity; deps = injected collaborators (defaults = real collectors).
113
113
  */
114
114
  export async function runReadOnlySweep(projectDir, { declared = null, profile = "standard", deps = {} } = {}) {
115
+ // KJC-BUG-0145: a missing projectDir must fail LOUD — every collector is
116
+ // wrapped in safe(), so an undefined root used to read as an empty project.
117
+ if (!projectDir) throw new Error("runReadOnlySweep: projectDir is required (got " + String(projectDir) + ")");
115
118
  const d = {
116
119
  collectAll, detectTestFramework, checkHarden, compareHarden, sourceScan: deepSourceScan,
117
120
  detectQmd, ragStatus: readRagStatus, gitAgeDays: lastCommitAgeDays, ...deps,